/* The 3D walkthrough overlay (walkthrough.js). Everything is .wk-*, over a full-screen canvas.
   Glass panels in the venue's palette; the controls sit at the edges so the room stays the picture.
   ⚠️ Every fixed edge pads with env(safe-area-inset-*): the dashboard can be saved to a phone's
   home screen, and a ✕ under the iOS status bar is a modal nobody can close (skill pulse-ui §1).
   "Back to the plan" at the bottom is the second exit. */
html.wk-open, html.wk-open body { overflow: hidden; }
.wk { position: fixed; inset: 0; z-index: 1000; background: #0c1113; color: #f5f1e8; font-family: "Hanken Grotesk", system-ui, sans-serif; overscroll-behavior: contain; -webkit-user-select: none; user-select: none; }
.wk [hidden] { display: none !important; }
.wk-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: grab; touch-action: none; }
.wk-canvas:active { cursor: grabbing; }
.wk.is-overview .wk-canvas { cursor: move; }
.wk-vignette { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(180deg, rgba(6, 10, 12, .58) 0, rgba(6, 10, 12, 0) 140px),
  linear-gradient(0deg, rgba(6, 10, 12, .62) 0, rgba(6, 10, 12, 0) 230px); }

.wk-glass { background: rgba(18, 24, 26, .52); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }

.wk-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 14px;
  padding: calc(14px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 8px calc(20px + env(safe-area-inset-left)); }
.wk-brand { display: flex; flex-direction: column; min-width: 0; margin-right: auto; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.wk-venue { font-family: "Newsreader", Georgia, serif; font-size: 25px; line-height: 1.1; letter-spacing: .005em; }
.wk-plan { margin-top: 3px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(245, 241, 232, .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wk-modes { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(18, 24, 26, .52); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.wk-modes button { border: 0; background: none; color: rgba(245, 241, 232, .86); font: 600 13px/1 "Hanken Grotesk", system-ui, sans-serif; padding: 10px 15px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.wk-modes button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.wk-modes button[aria-pressed="true"] { background: #f5f1e8; color: #13201c; }

.wk-x { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); background: rgba(18, 24, 26, .55); color: #fff; cursor: pointer; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.wk-x:hover { background: rgba(255, 255, 255, .16); }

.wk-rooms { position: absolute; top: calc(78px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; gap: 6px; max-width: calc(100% - 32px); overflow-x: auto; scrollbar-width: none; padding: 2px; }
.wk-rooms::-webkit-scrollbar { display: none; }
.wk-rooms button { flex-shrink: 0; border: 1px solid rgba(255, 255, 255, .16); background: rgba(18, 24, 26, .42); color: rgba(245, 241, 232, .92); font: 600 12px/1 "Hanken Grotesk", system-ui, sans-serif; padding: 8px 12px; border-radius: 999px; cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.wk-rooms button:hover { background: rgba(255, 255, 255, .18); }
.wk.is-overview .wk-rooms { opacity: .9; }

.wk-caption { position: absolute; left: calc(20px + env(safe-area-inset-left)); bottom: 206px; max-width: min(430px, calc(100% - 40px)); padding: 13px 16px; border-radius: 14px; background: rgba(18, 24, 26, .55); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); animation: wk-in .45s ease both; }
.wk-caption b { display: block; font-family: "Newsreader", Georgia, serif; font-weight: 500; font-size: 20px; margin-bottom: 3px; }
.wk-caption span { font-size: 13.5px; line-height: 1.45; color: rgba(245, 241, 232, .86); }
.wk-hint { position: absolute; left: 50%; top: calc(124px + env(safe-area-inset-top)); transform: translateX(-50%); padding: 8px 14px; border-radius: 999px; background: rgba(10, 14, 16, .6); font-size: 12.5px; color: rgba(245, 241, 232, .9); white-space: nowrap; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; pointer-events: none; animation: wk-in .45s ease both; }
@keyframes wk-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wk-hint { animation-name: wk-in-c; }
@keyframes wk-in-c { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .wk-caption, .wk-hint { animation: none; } }

.wk-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; gap: 14px;
  padding: 10px calc(16px + env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left)); pointer-events: none; }
.wk-bottom > * { pointer-events: auto; }
.wk-time { flex: 1 1 auto; max-width: 760px; min-width: 0; padding: 12px 16px 12px; border-radius: 18px; background: rgba(18, 24, 26, .55); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); }
.wk-time-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wk-clock { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 22px; font-weight: 500; letter-spacing: -.01em; min-width: 92px; }
.wk-sunline { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: rgba(245, 241, 232, .75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-datewrap { flex-shrink: 0; }
.wk-date { font: 500 12.5px/1 "IBM Plex Mono", ui-monospace, monospace; color: #f5f1e8; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 9px; padding: 7px 8px; color-scheme: dark; }
.wk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wk-slider { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; margin: 12px 0 11px; border-radius: 99px; background: #445; outline: none; cursor: pointer; }
.wk-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff7e3; border: 3px solid #13201c; box-shadow: 0 0 0 1px rgba(255, 255, 255, .7), 0 2px 10px rgba(0, 0, 0, .45); }
.wk-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff7e3; border: 3px solid #13201c; box-shadow: 0 0 0 1px rgba(255, 255, 255, .7), 0 2px 10px rgba(0, 0, 0, .45); }
.wk-slider:focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }

.wk-presets { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.wk-presets::-webkit-scrollbar { display: none; }
.wk-presets button { flex-shrink: 0; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: rgba(245, 241, 232, .9); font: 600 12.5px/1 "Hanken Grotesk", system-ui, sans-serif; padding: 9px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.wk-presets button:hover { background: rgba(255, 255, 255, .14); }
.wk-presets button.on { background: #f5f1e8; color: #13201c; border-color: transparent; }
.wk-play { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.wk-play[aria-pressed="true"] { background: #0e7c66 !important; border-color: transparent !important; color: #fff !important; }

.wk-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.wk-btn { border: 1px solid rgba(255, 255, 255, .2); background: rgba(18, 24, 26, .55); color: #f5f1e8; font: 600 13px/1 "Hanken Grotesk", system-ui, sans-serif; padding: 12px 16px; min-height: 44px; border-radius: 12px; cursor: pointer; white-space: nowrap; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.wk-btn:hover { background: rgba(255, 255, 255, .16); }
.wk-done { background: #f5f1e8; color: #13201c; border-color: transparent; }
.wk-done:hover { background: #fff; }

.wk-note { position: absolute; right: calc(16px + env(safe-area-inset-right)); bottom: calc(132px + env(safe-area-inset-bottom)); margin: 0; font-size: 10.5px; letter-spacing: .02em; color: rgba(245, 241, 232, .55); text-align: right; max-width: 220px; pointer-events: none; }

.wk button:focus-visible, .wk-date:focus-visible, .wk-canvas:focus-visible { outline: 2px solid #9fe0cf; outline-offset: 2px; }

.wk-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(ellipse at 50% 60%, #1b2a2c, #0c1113 70%); font-family: "Newsreader", Georgia, serif; font-size: 20px; color: rgba(245, 241, 232, .9); z-index: 2; }
.wk-loading.err { font-family: "Hanken Grotesk", system-ui, sans-serif; font-size: 15px; padding: 0 28px; text-align: center; }
.wk-spin { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); border-top-color: #f5f1e8; animation: wk-spin .9s linear infinite; }
@keyframes wk-spin { to { transform: rotate(360deg); } }
.wk:not(.ready) .wk-top .wk-modes, .wk:not(.ready) .wk-rooms, .wk:not(.ready) .wk-bottom .wk-time, .wk:not(.ready) .wk-save { visibility: hidden; }

/* phones: everything compacts, the room buttons and presets scroll sideways */
@media (max-width: 760px) {
  .wk-top { flex-wrap: wrap; gap: 8px 10px; padding-left: calc(14px + env(safe-area-inset-left)); }
  .wk-venue { font-size: 20px; }
  .wk-modes { order: 3; width: 100%; justify-content: space-between; }
  .wk-modes button { flex: 1; padding: 10px 8px; font-size: 12.5px; }
  .wk-rooms { top: calc(116px + env(safe-area-inset-top)); left: 0; right: 0; transform: none; max-width: none; padding: 2px 14px; }
  .wk-hint { top: calc(160px + env(safe-area-inset-top)); white-space: normal; text-align: center; border-radius: 12px; }
  .wk-bottom { flex-direction: column; align-items: stretch; gap: 8px; }
  .wk-time { max-width: none; padding: 10px 12px; }
  .wk-clock { font-size: 18px; min-width: 76px; }
  .wk-sunline { font-size: 11.5px; }
  .wk-actions { flex-direction: row; }
  .wk-actions .wk-btn { flex: 1; }
  .wk-caption { bottom: calc(232px + env(safe-area-inset-bottom)); left: 14px; right: 14px; max-width: none; }
  .wk-caption b { font-size: 17px; }
  .wk-caption span { font-size: 12.5px; }
  .wk-note { display: none; }
}
@media (max-width: 760px) and (max-height: 520px) { .wk-caption, .wk-rooms { display: none; } }
