/* Palace-only picture walking. The original art and clue anchors share one plane. */
.palace-page .ar-stage.palace-picture-stage,
.palace-page.ar-immersive .ar-stage.palace-picture-stage {
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: none;
  aspect-ratio: 1456 / 816;
  background: #eee5d4;
  border-color: #aa8858;
  box-shadow: 0 12px 28px #533a2412;
  cursor: grab;
  touch-action: pan-y;
  isolation: isolate;
}
.palace-picture-stage:active { cursor: grabbing; }
.palace-page .palace-picture-stage .ar-depth { display: none; }
.palace-page .palace-picture-stage::before,
.palace-page .palace-picture-stage::after { pointer-events: none; }
.palace-page .palace-picture-stage:not(.ar-art-failed)::before,
.palace-page .palace-picture-stage:not(.ar-art-failed)::after { content: none; }
.palace-page .palace-picture-stage .palace-picture-plane {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: center;
  will-change: transform;
  user-select: none;
}
.palace-page .palace-picture-stage .ar-plane > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none !important;
  opacity: 1;
  pointer-events: none;
  image-rendering: auto;
}
.palace-page .palace-picture-stage .ar-plane > .palace-runner-foreground[hidden] {
  display: none;
}
.palace-picture-paths {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.palace-page .palace-picture-path {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 44px;
  max-width: 160px;
  padding: 8px 13px 8px 25px;
  border: 1px solid #ead5a4;
  border-radius: 4px;
  background: #f8efdcf2;
  color: #52382a;
  box-shadow: 0 3px 10px #2e1f1b35, inset 0 0 0 2px #c8ac7733;
  font: 13px/1.35 system-ui, 'Microsoft YaHei', sans-serif;
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  text-align: center;
  transition: background-color 160ms, box-shadow 160ms;
}
.palace-picture-path::before {
  content: '›';
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-54%);
  color: #a66c30;
  font: 24px/1 Georgia, serif;
}
.palace-picture-path[data-back='true']::before { content: '‹'; }
.palace-picture-path > span { font-weight: 650; }
.palace-picture-path > small {
  color: #806b50;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: .04em;
}
.palace-page .palace-picture-path:hover,
.palace-page .palace-picture-path:focus-visible {
  background: #fff8e8;
  border-color: #fff1ce;
  box-shadow: 0 4px 15px #2e1f1b38, inset 0 0 0 2px #bd985c66;
}
.palace-page .palace-picture-path[aria-disabled='true'] {
  border-style: dashed;
  background: #f3e8d5ee;
  color: #6e6050;
  box-shadow: 0 2px 8px #2e1f1b26;
}
.palace-page .palace-picture-path[aria-disabled='true']::before { color: #8e7c65; }
.palace-page .palace-picture-stage .ar-hotspot {
  background: #4c2d24e8 !important;
  border-color: #dbc397 !important;
  box-shadow: 0 3px 10px #20170c38;
}
/* Keep the 44px hit area, but paint only a small clue dot when names are hidden. */
.palace-page .palace-picture-stage .ar-labels-hidden .ar-hotspot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px !important;
  padding: 0 !important;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none;
  text-shadow: none;
  font-size: 0 !important;
}
.palace-page .palace-picture-stage .ar-labels-hidden .ar-hotspot::before {
  width: 9px;
  height: 9px;
  margin: 0;
  border-color: #fff5d5;
  background: #d7b36c;
  box-shadow: 0 1px 5px #34201480;
}
.palace-page .palace-picture-stage .ar-labels-hidden .ar-hotspot:hover::before,
.palace-page .palace-picture-stage .ar-labels-hidden .ar-hotspot:focus-visible::before {
  box-shadow: 0 0 0 4px #f5d99a44, 0 1px 6px #34201480;
}
.palace-page .palace-picture-controls {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px !important;
  min-height: 56px;
  padding: 9px 13px !important;
  border: 1px solid #c9b48d;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #f4eddf;
  color: #685540;
}
.palace-page .palace-picture-actions {
  display: flex !important;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px !important;
  margin: 0 !important;
  min-width: 0;
}
.palace-page .palace-picture-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #c2a372;
  border-radius: 4px;
  background: #fff9ed;
  color: #684936;
  font: 13px/1.4 system-ui, 'Microsoft YaHei', sans-serif;
  white-space: nowrap;
  box-shadow: inset 0 1px #fff;
}
.palace-page .ar-camera.palace-picture-controls .palace-picture-actions > .palace-picture-button,
.palace-page .ar-camera.palace-picture-controls .palace-picture-actions > .palace-picture-button:first-child,
.palace-page .ar-camera.palace-picture-controls .palace-picture-actions > .palace-picture-button:last-child {
  font-size: 13px;
}
.palace-page .palace-picture-button:hover:not(:disabled),
.palace-page .palace-picture-button:focus-visible {
  border-color: #9e7745;
  background: #f0e1c4;
  color: #4e3024;
}
.palace-page .palace-picture-button:disabled { opacity: .48; }
.palace-picture-status {
  margin-left: auto;
  font: 12px/1.6 system-ui, 'Microsoft YaHei', sans-serif;
  color: #806a4d;
  white-space: nowrap;
}
.palace-picture-caption {
  display: block;
  margin: 0;
  font: 12px/1.6 system-ui, 'Microsoft YaHei', sans-serif;
  color: #806f58;
}
.palace-picture-transition {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  filter: none !important;
  transform-origin: center;
}
.palace-page .palace-picture-stage .ar-win { z-index: 6; }
@media (max-width: 640px) {
  .palace-page .palace-picture-controls { gap: 7px !important; padding: 8px !important; }
  .palace-page .palace-picture-actions { width: 100%; gap: 5px !important; }
  .palace-page .palace-picture-button { flex: 1; min-width: 0; padding: 8px 4px; font-size: 11px; }
  .palace-page .palace-picture-path { max-width: 125px; padding: 7px 9px 7px 19px; font-size: 11px; }
  .palace-picture-path::before { left: 6px; font-size: 20px; }
  .palace-picture-path > small { font-size: 9px; }
  .palace-picture-caption, .palace-picture-status { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .palace-page .palace-picture-path { transition: none; }
}
