/* V14: continuous walking, with one movement surface per device. */
.walk-perspective {
  position: absolute; z-index: 8; left: 24px; bottom: 304px;
  display: flex; gap: 3px; padding: 4px; border: 1px solid var(--control-edge);
  border-radius: 13px; background: var(--ui-float); box-shadow: var(--control-shadow);
}
.walk-perspective button {
  min-height: 40px; padding: 0 12px; border-radius: 9px;
  color: var(--ui-muted); font-size: 10px; white-space: nowrap;
}
.walk-perspective button[aria-pressed=true] { background: var(--ui-accent); color: var(--ui-on-accent); }
.walk-perspective button:disabled { opacity: .45; }
.walk-player-status {
  position: absolute; z-index: 8; left: 24px; bottom: 356px; max-width: 235px;
  margin: 0; padding: 7px 10px; border-radius: 8px; font-size: 10px; line-height: 1.6;
  color: var(--ui-muted); background: var(--ui-float);
}
.mobile-walk { display: none; }
.nearby-booth {
  position: absolute; z-index: 8; right: 24px; bottom: 106px;
  min-height: 70px; max-width: 230px; min-width: 172px; padding: 13px 17px;
  border: 1px solid var(--control-edge); border-radius: 16px;
  color: var(--ui-ink); background: var(--ui-paper); box-shadow: var(--control-shadow); text-align: left;
}
.nearby-booth small { display: block; max-width: 194px; font-size: 10px; line-height: 1.7; color: var(--ui-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nearby-booth>span { display: flex; justify-content: space-between; gap: 28px; margin-top: 5px; font-size: 15px; color: var(--ui-accent); }
.nearby-booth b { font-weight: 400; }
#detail { touch-action: pan-y; }
#detail .detail-actions { position: static; margin-bottom: 0; }
.detail-resume {
  position: sticky; z-index: 3; bottom: -24px; margin: 14px -2px -24px; padding: 12px 0 18px;
  border-top: 1px solid var(--ui-line); background: var(--ui-paper);
}
.detail-resume button {
  width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 15px; border-radius: 11px; background: var(--ui-accent); color: var(--ui-on-accent); font-size: 13px;
}
.detail-resume small { display: block; margin: 8px 0 0; text-align: center; font-size: 10px; color: var(--ui-muted); }
.scene-shell:has(.detail-panel:not([hidden]), #search-panel:not([hidden]), #journey-welcome:not([hidden])) :is(.walk-nav, .mobile-walk, .walk-perspective, .walk-player-status, .nearby-booth),
body:has(#modal[open]) :is(.walk-nav, .mobile-walk, .walk-perspective, .walk-player-status, .nearby-booth) { visibility: hidden; pointer-events: none; }

@media (max-width: 700px), (pointer: coarse) {
  #walk-nav { display: none; }
  .mobile-walk { display: block; position: absolute; z-index: 8; left: 20px; bottom: 97px; width: 124px; }
  .walk-thumbstick {
    position: relative; width: 124px; height: 124px; border: 1px solid #87977966;
    border-radius: 50%; background: #fafbf3c9; touch-action: none; user-select: none; -webkit-user-select: none;
    box-shadow: 0 3px 22px #25321f14, inset 0 0 0 10px #ffffff3b;
  }
  .stick-track { position: absolute; inset: 24px; border: 1px solid #788c615c; border-radius: 50%; }
  .walk-thumbstick-knob {
    position: absolute; left: 37px; top: 37px; width: 48px; height: 48px; border-radius: 50%;
    background: #5b7050; border: 1px solid #fff8; box-shadow: 0 3px 9px #2d422733;
    transform: translate(var(--stick-x, 0px), var(--stick-y, 0px)); pointer-events: none;
  }
  .walk-thumbstick[data-active=true] { background: #fafbf3ed; border-color: #5b7050; }
  .mobile-walk>p { margin: 9px -10px 0; text-align: center; font-size: 10px; color: var(--ui-ink); text-shadow: 0 1px 4px var(--ui-paper); }
  .walk-perspective { left: 14px; bottom: 256px; }
  .walk-perspective button { min-height: 38px; padding: 0 10px; }
  .walk-player-status { left: 14px; bottom: 306px; max-width: 185px; }
  .nearby-booth { right: 14px; bottom: 113px; min-width: 148px; max-width: calc(100% - 181px); padding: 12px 14px; }
  .nearby-booth>span { gap: 12px; font-size: 14px; }
}

@media (max-width: 700px) {
  #detail.detail-panel {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; height: min(76svh, calc(100% - 85px));
    max-height: none; padding: 18px 20px max(18px, env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0; border-bottom: 0; z-index: 30;
    overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch;
    box-shadow: 0 -8px 35px #26342024; animation: visit-sheet-in 180ms ease-out;
  }
  #detail .detail-top { top: -18px; margin-top: -6px; padding: 6px 0 10px; }
  #detail .detail-code { font-size: 26px; }
  #detail .detail-resume { bottom: -18px; margin-bottom: -18px; padding: 10px 0 max(14px, env(safe-area-inset-bottom)); }
  #detail .detail-resume small { margin-top: 6px; }
  .scene-shell:has(#detail:not([hidden])) :is(.scene-bottom, .scene-tools, .scene-disclaimer) { visibility: hidden; pointer-events: none; }
  .scene-shell.walking .scene-tools { top: 96px; transform: none; }
  .scene-shell.walking .scene-tools [data-action=zoom-in], .scene-shell.walking .scene-tools [data-action=zoom-out], .scene-shell.walking .scene-tools>span { display: none; }
  dialog:has(.product-detail-heading) { max-height: 90svh; overscroll-behavior: contain; }
}
@media (max-height: 560px) {
  .walk-perspective { bottom: 266px; }
  .walk-player-status { bottom: 316px; }
}
@media (max-height: 560px) and (pointer: coarse) {
  .mobile-walk { left: 18px; bottom: 84px; }
  .walk-perspective { left: 166px; bottom: 88px; }
  .walk-player-status { left: 166px; bottom: 136px; }
  .nearby-booth { bottom: 90px; }
}
@keyframes visit-sheet-in { from { opacity: .5; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { #detail.detail-panel { animation: none; } }
