/* Walking mode. Tokens come from /style.css. The dock is ink; the plan and
   the place reading are paper. Movement, collision and camera behaviour are
   untouched: this sheet only positions and styles the existing controls.

   Layering contract for anything anchored to the bottom edge:
     --dock-h       height of the walking dock at the current breakpoint
     --dock-gap     space between the dock and the next overlay
     --narration-h  extra lift applied while #narration-player is visible
   Every bottom-anchored overlay (directions, arrival hint, thumb control,
   look hint, narration player) is offset from these, so they stack instead
   of colliding. See outputs/claude-ui/HANDOFF.md for the narration notes. */
:root { --dock-h: 62px; --dock-gap: 10px; --dock-bottom: 16px; }
#experience.walking { min-height: 0; height: 100dvh; }
.walking .bottom-area, .walking .detail-card, .walking .vessel-closeups, .walking .orientation,
.walking #tour, .walking #tour-step, .walking .era, .walking .entry-hint, .walking #welcome { display: none !important; }
.walking .vignette { background: linear-gradient(rgb(20 32 38 / .2), transparent 18%, transparent 84%, rgb(20 32 38 / .24)); }
/* The header's Walk inside / Exit walk button is the exit; keep this DOM hook for integrations. */
.walking #walk-exit { display: none; }

/* Dock ----------------------------------------------------------------- */
.walk-hud {
  position: absolute; bottom: var(--dock-bottom); left: 50%; transform: translateX(-50%);
  width: min(900px, calc(100% - 2 * var(--gutter))); min-height: var(--dock-h); display: flex; align-items: center; gap: 14px;
  padding: 8px 10px 8px 18px; background: var(--ink-veil); color: var(--paper-text);
  border: 1px solid var(--line-paper); border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); z-index: var(--z-ui);
}
.walk-location-block { display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
.walk-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--bronze-2); }
.walk-location-block strong { font-family: var(--font-display); font-weight: 600; font-size: 21px; line-height: 1.05; white-space: nowrap; }
.walk-jump { flex: 1; min-width: 0; display: block; }
.walk-hud select {
  width: 100%; min-height: var(--tap); padding: 8px 34px 8px 12px; border-radius: var(--radius-s);
  border: 1px solid var(--line-paper); color: var(--paper-text); font: inherit; font-size: 14px; font-weight: 500;
  background: rgb(246 241 231 / .08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23c8a15b' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
.walk-hud select:hover { background-color: rgb(246 241 231 / .14); }
.walk-hud select option, .walk-hud select optgroup { color: var(--ink); background: var(--paper); font-weight: 500; }
.walk-actions { display: flex; gap: 4px; flex: none; }
.walk-actions button, .walk-directions button {
  min-height: var(--tap); padding: 0 13px; border-radius: var(--radius-s); border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; color: var(--paper-text); white-space: nowrap;
}
.walk-actions button:hover { background: rgb(246 241 231 / .1); }
.walk-actions button[aria-pressed=true], .walk-actions button[aria-expanded=true] { background: var(--paper); color: var(--ink); }

/* Narration player sits directly above the dock while walking ------------------ */
.walking .narration-player { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--dock-bottom) + var(--dock-h) + var(--dock-gap)); width: min(560px, calc(100% - 2 * var(--gutter))); z-index: var(--z-ui); }

/* Instructions and arrival hints ------------------------------------------- */
.walk-directions {
  position: absolute; bottom: calc(var(--dock-bottom) + var(--dock-h) + var(--dock-gap) + var(--narration-h)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; max-width: calc(100% - 2 * var(--gutter)); white-space: nowrap;
  padding: 4px 5px 4px 14px; border-radius: var(--radius-s); background: var(--ink-veil-2); border: 1px solid var(--line-paper);
  color: var(--paper-text-2); font-size: 12.5px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: var(--z-ui);
}
.walk-directions .walk-directions-compact { display: none; }
.walk-directions kbd { color: var(--bronze-3); }
.walk-directions i { font-style: normal; color: var(--paper-text-3); padding: 0 6px; }
.walk-directions button { min-height: 32px; padding: 0 10px; font-size: 12.5px; background: rgb(246 241 231 / .1); }
.walk-directions button:hover { background: rgb(246 241 231 / .18); }
.walk-directions button[aria-pressed=true] { background: var(--paper); color: var(--ink); }
.walk-directions.lock-notice { color: var(--paper-text); }
.walk-practiced .walk-directions:not(.lock-notice), .walk-practiced .walk-look-hint { display: none; }
#walk-guidance {
  position: absolute; bottom: calc(var(--dock-bottom) + var(--dock-h) + var(--dock-gap) + 44px + var(--narration-h)); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 2 * var(--gutter)); padding: 8px 14px; border-radius: var(--radius-s);
  background: var(--paper-veil); color: var(--ink); font-size: 13px; line-height: 1.45; text-align: center;
  box-shadow: var(--shadow-soft); pointer-events: none; z-index: var(--z-ui);
}
#walk-guidance.is-blocked { background: var(--ink-veil); color: var(--bronze-3); }
.walk-practiced:has(.walk-directions:not(.lock-notice)) #walk-guidance { bottom: calc(var(--dock-bottom) + var(--dock-h) + var(--dock-gap) + var(--narration-h)); }

/* Plan ------------------------------------------------------------------------ */
.walk-map {
  position: absolute; right: var(--gutter); top: calc(18px + var(--header-h) + 14px); width: 268px; max-height: calc(100dvh - 18px - var(--header-h) - 14px - 100px);
  overflow: auto; overscroll-behavior: contain; padding: 12px; background: var(--paper-veil); color: var(--ink);
  border: 1px solid rgb(29 36 39 / .1); border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); z-index: var(--z-panel); scrollbar-width: thin;
}
.walk-map-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.walk-map-head strong { font-family: var(--font-display); font-weight: 600; font-size: 19px; line-height: 1; }
.walk-map-north { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--bronze); }
#walk-map-close { display: grid; place-items: center; width: 36px; height: 36px; margin: -8px -8px -8px 0; border-radius: 50%; font-family: var(--font-display); font-size: 26px; line-height: 1; color: var(--ink-2); }
#walk-map-close:hover { background: var(--paper-2); color: var(--ink); }
.walk-map-canvas { position: relative; }
.walk-map svg { width: 100%; display: block; border-radius: 4px; }
/* Places are drawn as small dots on the plan; the numbered list beneath is the
   control, so nothing on the drawing needs to be a tap target. */
.walk-map-stops { position: absolute; inset: 0; pointer-events: none; }
.walk-map-stops i {
  position: absolute; transform: translate(-50%, -50%); width: 9px; height: 9px; border-radius: 50%;
  background: var(--bronze); border: 1.5px solid var(--paper); box-shadow: 0 0 0 1px var(--bronze); transition: transform .15s, background-color .15s;
}
.walk-map-stops i.is-current { background: var(--ink); box-shadow: 0 0 0 1px var(--ink); width: 11px; height: 11px; }
.walk-map-stops i.is-hot { transform: translate(-50%, -50%) scale(1.5); background: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.walk-map-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px 8px; }
.walk-map-list button {
  display: flex; align-items: baseline; gap: 7px; width: 100%; min-height: 32px; padding: 4px 6px; border-radius: var(--radius-s);
  font-size: 12.5px; font-weight: 500; line-height: 1.25; text-align: left; color: var(--ink);
}
.walk-map-list button > span { flex: none; font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--bronze); min-width: 12px; }
.walk-map-list button:hover { background: var(--paper-2); }
.walk-map-list button[aria-current=true] { background: var(--ink); color: var(--paper-text); }
.walk-map-list button[aria-current=true] > span { color: var(--bronze-3); }
.walk-map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 8px 0 0; font-size: 11.5px; line-height: 1.4; color: var(--ink-2); }
.map-you { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--ink); }
.map-path { width: 16px; border-top: 2px dashed #a9843f; margin-left: 5px; }

/* Place reading ---------------------------------------------------------------- */
.walk-info {
  position: absolute; left: var(--gutter); top: calc(18px + var(--header-h) + 14px); width: 356px;
  max-height: calc(100dvh - 18px - var(--header-h) - 14px - 132px); overflow: auto; overscroll-behavior: contain;
  padding: 22px 24px 24px; background: var(--paper-veil); color: var(--ink); border: 1px solid rgb(29 36 39 / .1);
  border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  z-index: var(--z-panel); scrollbar-width: thin; scrollbar-color: rgb(29 36 39 / .3) transparent;
}
.walk-info > button { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-family: var(--font-display); font-size: 28px; line-height: 1; color: var(--ink-2); }
.walk-info > button:hover { background: var(--paper-2); color: var(--ink); }
.walk-info .walk-eyebrow { color: var(--bronze); }
.walk-info h2 { font-family: var(--font-display); font-weight: 500; font-size: 30px; line-height: 1.05; letter-spacing: -.01em; margin: 8px 36px 2px 0; }
#walk-info-hebrew { font-family: var(--font-hebrew); font-size: 19px; line-height: 1.2; color: var(--bronze); text-align: left; margin: 0 0 12px; }
#walk-info-note { font-size: 14px; line-height: 1.7; color: var(--ink-2); margin: 0 0 12px; }
#walk-info-measure { display: block; font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.15; padding-top: 12px; border-top: 1px solid var(--line-ink); }
#walk-info-source { margin-top: 6px; }
#walk-info-source a { display: block; padding: 7px 0; border-top: 1px solid var(--line-ink); color: var(--ink); font-size: 13.5px; line-height: 1.5; text-decoration: none; }
#walk-info-source a:first-child { border-top: 0; }
#walk-info-source a:hover { color: var(--bronze); text-decoration: underline; text-underline-offset: 3px; }
.walk-info .reconstruction-note { font-size: 12.5px; line-height: 1.6; color: var(--ink-3); margin: 8px 0 0; padding-top: 10px; border-top: 1px solid var(--line-ink); }
.walk-info .reconstruction-note:empty { display: none; }

/* Touch ----------------------------------------------------------------------- */
.walk-stick, .walk-look-hint { display: none; }
@media (pointer: coarse) {
  .walking .walk-stick {
    display: grid; place-items: center; position: absolute; left: calc(var(--gutter) + 10px); bottom: calc(var(--dock-bottom) + var(--dock-h) + 44px + var(--narration-h));
    width: 112px; height: 112px; border-radius: 50%; border: 1.5px solid rgb(246 241 231 / .55); background: rgb(29 36 39 / .38);
    touch-action: none; user-select: none; -webkit-user-select: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: var(--z-ui);
  }
  .walk-stick > span { width: 46px; height: 46px; border-radius: 50%; background: var(--paper); border: 1px solid rgb(29 36 39 / .2); box-shadow: 0 2px 8px rgb(29 36 39 / .35); pointer-events: none; }
  .walk-stick > small { position: absolute; bottom: -22px; font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--paper-text); text-shadow: 0 1px 4px rgb(29 36 39 / .7); pointer-events: none; }
  .walking .walk-look-hint {
    display: block; position: absolute; right: calc(var(--gutter) + 8px); bottom: calc(var(--dock-bottom) + var(--dock-h) + 62px + var(--narration-h)); padding: 8px 12px; border-radius: var(--radius-s);
    background: var(--ink-veil-2); color: var(--paper-text-2); font-size: 12.5px; line-height: 1.5; text-align: right; pointer-events: none; z-index: var(--z-ui);
  }
  .walk-directions { display: none !important; }
  .walking #walk-lock { display: none; }
}

/* Phones ----------------------------------------------------------------------- */
@media (max-width: 760px) {
  :root { --dock-h: 116px; --dock-bottom: 12px; }
  .walking .brand-text { display: none; }
  .walk-hud { width: calc(100% - 2 * var(--gutter)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 8px; padding: 10px; }
  .walk-location-block { min-width: 0; gap: 1px; }
  .walk-location-block strong { font-size: 17px; white-space: normal; }
  .walk-hud select { font-size: 16px; padding-left: 10px; }
  .walk-actions { grid-column: 1 / -1; gap: 3px; }
  .walk-actions button { flex: 1; padding: 0 6px; font-size: 13px; }
  .walk-directions { font-size: 12px; padding: 4px 5px 4px 12px; gap: 8px; }
  .walk-directions .walk-directions-wide { display: none; }
  .walk-directions .walk-directions-compact { display: inline; }
  /* On phones the thumb control and look hint own the lower corners, so the
     arrival hint reads from the free space under the header instead; it steps
     aside entirely while the plan or the place reading covers that space. */
  #walk-guidance, .walk-practiced:has(.walk-directions:not(.lock-notice)) #walk-guidance { top: calc(12px + var(--header-h) + 10px); bottom: auto; font-size: 12.5px; max-width: calc(100% - 2 * var(--gutter)); }
  #experience:has(#walk-map:not([hidden]), #walk-info:not([hidden])) #walk-guidance { display: none; }
  .walk-map { top: calc(12px + var(--header-h) + 10px); right: var(--gutter); width: min(292px, calc(100% - 2 * var(--gutter))); padding: 10px; max-height: calc(100dvh - 12px - var(--header-h) - 10px - var(--dock-h) - 60px); }
  .walk-map-head strong { font-size: 17px; }
  .walk-map-legend { font-size: 11px; }
  .walk-info { left: var(--gutter); right: var(--gutter); width: auto; top: calc(12px + var(--header-h) + 10px); max-height: calc(100dvh - 12px - var(--header-h) - 10px - var(--dock-h) - 60px); padding: 18px 18px 20px; }
  .walk-info h2 { font-size: 26px; }
  #walk-info-note { font-size: 13.5px; }
  .walking .walk-stick { left: 22px; bottom: calc(var(--dock-bottom) + var(--dock-h) + 34px + var(--narration-h)); width: 104px; height: 104px; }
  .walking .walk-look-hint { right: 16px; bottom: calc(var(--dock-bottom) + var(--dock-h) + 54px + var(--narration-h)); }
}

/* Short landscape --------------------------------------------------------------- */
@media (max-height: 520px) {
  :root { --dock-h: 54px; --dock-bottom: 8px; --dock-gap: 8px; }
  .walk-hud { width: calc(100% - 2 * var(--gutter)); padding: 6px 8px 6px 12px; gap: 10px; display: flex; }
  .walk-location-block { min-width: 120px; }
  .walk-location-block strong { font-size: 16px; }
  .walk-hud select { min-height: 40px; }
  .walk-actions { flex: none; }
  .walk-actions button { min-height: 40px; padding: 0 10px; font-size: 12.5px; }
  .walk-directions { display: none !important; }
  #walk-guidance, .walk-practiced:has(.walk-directions:not(.lock-notice)) #walk-guidance { bottom: calc(var(--dock-bottom) + var(--dock-h) + var(--dock-gap) + var(--narration-h)); }
  .walk-map, .walk-info { top: calc(8px + var(--header-h) + 8px); max-height: calc(100dvh - 8px - var(--header-h) - 8px - 78px); }
  .walk-map { width: 232px; padding: 8px; }
  .walk-info { width: 320px; padding: 16px 18px 18px; }
  .walk-info h2 { font-size: 24px; }
  .walking .walk-stick { bottom: calc(var(--dock-bottom) + var(--dock-h) + 18px + var(--narration-h)); width: 92px; height: 92px; }
  .walking .walk-look-hint { bottom: calc(var(--dock-bottom) + var(--dock-h) + 30px + var(--narration-h)); }
}
