/* The Liminal Road, look "Rooms" (option C, the towns as rooms), also the map and rooms at the top of the "Mix" look. Sand look from views/sand/style.css. Written Sat 31 Oct 2026 by Claude (course designer); generic selectors scoped to .hub and .room on 31 Oct (course looks) so the Mix page can carry the Story sections too. */
:root {
  --night: #100d14; --cream: #efe3cc; --cream-2: rgba(239, 227, 204, .74); --cream-3: rgba(239, 227, 204, .52); --line: rgba(239, 227, 204, .16);
  --sans: system-ui, -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --gutter: clamp(18px, 4.4vw, 64px);
  --top: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--night); color: var(--cream); font: 400 16px/1.55 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: #fff; color: #111; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid #7fb4ff; outline-offset: 3px; }

#sand { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; display: none; }
.engine-on #sand { display: block; }


main { position: relative; z-index: 1; }
:is(.hub, .room) .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; opacity: .85; }
.hub .grain-dot { width: 9px; height: 9px; border-radius: 50%; background: conic-gradient(#E8B04B, #C8402F, #6FA8A6, #3B3F8C, #E07A2E, #E8B04B); flex: none; }
:is(.hub, .room) .btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 650; font-size: 15px; text-decoration: none; border: 0; cursor: pointer; }
:is(.hub, .room) .btn.quiet { background: transparent; padding: 0 6px; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* ---------- the hub: the map ---------- */
.hub { position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; padding: calc(var(--top) + 86px) var(--gutter) 24px; }
.hub-copy { position: relative; z-index: 2; max-width: 560px; }
#headline { margin: 0 0 18px; font-size: clamp(2.6rem, 5.6vw, 5.4rem); line-height: .94; letter-spacing: -.045em; font-weight: 820; }
#headline .h-a { font-family: var(--sans); }
#headline .h-b { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -.02em; background: linear-gradient(90deg, #E8B04B, #C8402F, #C8643C, #D88A8A, #6FA8A6, #6B8F5A, #3B3F8C, #E07A2E, #C9A227); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sand-on #headline .h-a, .sand-on #headline .h-b { color: transparent; -webkit-text-fill-color: transparent; background: none; }
.hub .lede { font-size: clamp(.98rem, 1.1vw, 1.08rem); max-width: 30em; color: var(--cream-2); margin: 0 0 14px; }
.hub .lede em { font-family: var(--serif); color: var(--cream); font-size: 1.08em; }
.hub-status { margin: 0; font-size: 13px; color: var(--cream-3); max-width: 34em; }
.hub-status a { color: var(--cream-2); text-underline-offset: 4px; }
.hub .hint { position: absolute; left: var(--gutter); bottom: 22px; margin: 0; font-size: 13px; opacity: .6; display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; z-index: 2; }
.hub .hint::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hub .hint .h-wind { display: none; }
.wind-on .hub .hint .h-wind { display: inline; }

/* the still map (Motion off or no WebGL): the same road and thumbnails drawn once */
.hub-still { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.sand-on .hub-still { visibility: hidden; }

/* lamps: one button per place, placed by script along the road */
.lamps { position: absolute; inset: 0; z-index: 1; }
.lamp { position: absolute; width: var(--s); height: var(--s); transform: translate(-50%, -50%); appearance: none; border: 0; background: transparent; padding: 0; cursor: pointer; display: block; -webkit-tap-highlight-color: transparent; border-radius: 50%; color: var(--cream); }
.lamp i { display: block; width: var(--s); height: var(--s); border-radius: 50%; position: relative; }
.lamp i .still { width: 100%; height: 100%; }
.lamp i::after { content: ""; position: absolute; inset: 18%; border-radius: 50%; background: var(--c); opacity: 0; box-shadow: 0 0 22px var(--c), 0 0 60px color-mix(in srgb, var(--c) 60%, transparent); transition: opacity .25s ease; }
.lamp:hover i::after, .lamp:focus-visible i::after { opacity: .3; }
.lamp span { position: absolute; font-size: 13px; font-weight: 650; white-space: nowrap; letter-spacing: -.01em; text-shadow: 0 1px 8px rgba(0, 0, 0, .8); opacity: .88; line-height: 1.2; }
.lamp span small { display: block; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .6; }
.lamp[data-side="b"] span { top: calc(100% + 4px); left: 50%; transform: translateX(-50%); text-align: center; }
.lamp[data-side="t"] span { bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); text-align: center; }
.lamp[data-side="l"] span { right: calc(100% + 10px); top: 50%; transform: translateY(-50%); text-align: right; }
.lamp[data-side="r"] span { left: calc(100% + 10px); top: 50%; transform: translateY(-50%); text-align: left; }
.lamp:hover span, .lamp:focus-visible span { opacity: 1; }
.in-room .hub { visibility: hidden; }

/* ---------- the room ---------- */
.room { position: fixed; inset: 0; z-index: 40; overflow-y: auto; color: var(--cream); background: var(--bg, #15110f); }
.sand-on .room { background: transparent; }
.room.pre { opacity: 0; pointer-events: none; }
.room.shown { opacity: 1; transition: opacity .4s ease; }
[data-motion="off"] .room.shown { transition: none; }
.room-back { position: fixed; top: calc(var(--top) + 4px); left: var(--gutter); z-index: 3; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(16, 13, 20, .5); color: var(--cream); cursor: pointer; font-weight: 600; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.room-nav { position: fixed; top: calc(var(--top) + 4px); right: var(--gutter); z-index: 3; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line); background: rgba(16, 13, 20, .5); font-size: 13px; font-weight: 600; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.room-nav button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; }
.room-nav button:hover { background: rgba(255, 255, 255, .1); }
.room-nav span { padding: 0 6px; color: var(--cream-2); }
.room-in { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: 6px; padding: calc(var(--top) + 60px) var(--gutter) 84px; max-width: 1320px; margin: 0 auto; }
.lintel { text-align: center; max-width: 820px; margin: 0 auto; }
.room .tag { font-size: 12px; font-weight: 750; letter-spacing: .18em; text-transform: uppercase; color: var(--acc); margin: 0 0 10px; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.room .tag i { font-style: normal; color: var(--cream-3); }
.room .tag .draft { font-style: normal; font-weight: 600; letter-spacing: .08em; font-size: 11px; color: var(--cream-3); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.room h2 { font-size: clamp(2rem, 3.8vw, 3.4rem); line-height: .98; letter-spacing: -.04em; margin: 0 0 10px; font-weight: 800; }
.room h2 small { display: block; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: .5em; letter-spacing: -.01em; color: var(--acc); margin-top: .22em; }
.room .and { margin: 8px auto 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 1.5vw, 1.4rem); color: var(--cream); max-width: 30em; }
.room .and b { font-style: normal; font-weight: 750; color: var(--acc); letter-spacing: .04em; }
.walls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, min(420px, 40vh)) minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); align-items: center; }
.wall .eyebrow { color: var(--acc); opacity: 1; }
.wall-l { text-align: right; } .wall-l .eyebrow { justify-content: flex-end; }
.meaning { font-family: var(--serif); font-size: clamp(1.05rem, 1.3vw, 1.25rem); line-height: 1.45; margin: 0 0 14px; color: var(--cream); }
.psych { font-size: clamp(.95rem, 1.05vw, 1.02rem); margin: 0; color: var(--cream-2); }
.room .meta { font-size: 13px; color: var(--cream-3); margin: 0; }
.room .meta b { color: var(--cream-2); font-weight: 600; }
.room-art { appearance: none; border: 0; background: transparent; padding: 0; width: 100%; aspect-ratio: 1; position: relative; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; border-radius: 24px; display: block; justify-self: center; }
.scooping .room-art { cursor: grabbing; }
.room-art .still { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sand-on .still { visibility: hidden; }
.floor { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 12px; padding-left: 320px; }
.covers-wrap .eyebrow { margin-bottom: 8px; }
.covers { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.covers li { border: 1px solid color-mix(in srgb, var(--cream) 24%, transparent); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--cream-2); }
.doors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.doors li { border: 1px solid var(--line); border-radius: 16px 16px 6px 6px; padding: 10px 14px; background: rgba(255, 255, 255, .03); font-size: 13px; color: var(--cream-2); line-height: 1.45; }
.doors b { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); margin-bottom: 4px; }
.doors em { font-style: normal; color: var(--cream-3); }
.status-row { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin: 0; font-size: 13px; color: var(--cream-3); }
.room .status { display: inline-flex; align-items: center; gap: 8px; }
.room .status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); flex: none; }
.room.shown .room-in > * { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.room.shown .room-in > *:nth-child(2) { animation-delay: .08s; } .room.shown .room-in > *:nth-child(3) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
[data-motion="off"] .room.shown .room-in > * { animation: none; }

/* the mini map: a small road with twelve dots, the current one lit */
.minimap { position: fixed; left: var(--gutter); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 3; display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 10px; border-radius: 999px; background: rgba(16, 13, 20, .72); border: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.minimap svg { display: block; width: 150px; height: 44px; overflow: visible; }
.minimap path { fill: none; stroke: rgba(239, 227, 204, .3); stroke-width: 2; stroke-dasharray: 2 4; }
.minimap circle { cursor: pointer; transition: r .2s ease; }
.minimap circle[data-cur="1"] { stroke: #fff; stroke-width: 2; }
.minimap p { margin: 0; font-size: 12px; color: var(--cream-2); white-space: nowrap; }
.minimap p b { color: var(--cream); font-weight: 650; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .hub { height: auto; min-height: 100svh; overflow: visible; padding-top: calc(var(--top) + 64px); padding-bottom: 90px; }
  .lamps { position: relative; inset: auto; margin-top: 18px; }
  .hub-still { height: 100%; }
  .hub .hint { position: static; margin-top: 10px; }
  #headline { font-size: clamp(2.2rem, 10vw, 3rem); margin-bottom: 10px; }
  .hub .lede { font-size: .95rem; margin-bottom: 8px; }
  .hub-status { font-size: 12px; }
  .lamp span { font-size: 12px; } .lamp span small { font-size: 9px; }
  .hub .hint { bottom: 70px; right: var(--gutter); font-size: 12px; }
  .hub .hint .h-wind { display: none !important; }
  .room-in { padding: calc(var(--top) + 60px) 0 110px; gap: 0; display: block; }
  .lintel { padding: 0 var(--gutter) 10px; text-align: left; margin: 0; }
  .room .tag { justify-content: flex-start; }
  .room h2 { font-size: clamp(1.9rem, 9vw, 2.5rem); }
  .room .and { margin: 6px 0 0; font-size: 1.05rem; }
  .walls { display: block; }
  .room-art { width: 100%; aspect-ratio: auto; height: 38svh; margin: 6px 0 0; cursor: default; }
  .room-art .still { width: auto; height: 100%; left: 0; right: 0; margin: auto; }
  .wall { padding: 0 var(--gutter); }
  .wall-l { text-align: left; } .wall-l .eyebrow { justify-content: flex-start; }
  .sheet { background: var(--bg, #15110f); border-radius: 26px 26px 0 0; padding-top: 22px; position: relative; z-index: 1; }
  .wall-r { margin-top: 16px; }
  .floor { margin: 18px var(--gutter) 0; padding-left: 0; }
  .doors { grid-template-columns: minmax(0, 1fr); }
  .minimap { left: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); padding: 6px 10px; }
  .minimap svg { width: 120px; height: 36px; }
  .minimap p { display: none; }
  .room-back { padding: 0 12px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .lamp i::after, .minimap circle { transition: none; } }
