/* Open Museum — phone remote. Design tokens first; see DESIGN.md. */
@font-face { font-family: "Lora"; src: url(../fonts/lora-var.woff2) format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url(../fonts/lora-italic-var.woff2) format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url(../fonts/inter-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url(../fonts/inter-medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url(../fonts/inter-semibold.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  /* colour: light = "gallery by day" (limewash wall, ink, terracotta label) */
  --bg: #F4EFE6; --bg-2: #EAE3D6; --surface: #FFFCF6; --surface-2: #F7F2E9; --sunk: #E4DCCD;
  --ink: #1D1A16; --ink-2: #4B443A; --ink-3: #6B6357; --line: rgba(29,26,22,.12); --line-2: rgba(29,26,22,.22);
  --accent: #8E3B22; --accent-2: #B5552F; --on-accent: #FFF8F1; --accent-wash: rgba(142,59,34,.09);
  --gold: #9A7428; --ok: #2E6B48; --focus: #1E56B0;
  --matte: #2A2622; --shadow-art: 0 1px 2px rgba(40,28,14,.18), 0 10px 28px -10px rgba(40,28,14,.35);
  --shadow-sheet: 0 -12px 40px rgba(30,20,10,.18);
  --scrim: rgba(24,18,12,.42);
  /* type */
  --serif: "Lora", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --t-hero: clamp(2.05rem, 1.6rem + 2.2vw, 3rem); --t-h1: 1.75rem; --t-h2: 1.3125rem; --t-h3: 1.0625rem;
  --t-body: 1rem; --t-small: .875rem; --t-micro: .75rem; --t-kicker: .6875rem;
  /* space (4 px grid) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --gutter: 20px; --tap: 48px; --tap-lg: 60px;
  --r-s: 8px; --r-m: 14px; --r-l: 22px; --r-xl: 28px; --r-pill: 999px;
  /* motion */
  --ease: cubic-bezier(.2,.7,.2,1); --ease-io: cubic-bezier(.65,0,.35,1);
  --d-tap: 140ms; --d-ui: 260ms; --d-view: 420ms; --d-art: 2400ms;
  --tabbar-h: 68px; --mini-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #100F0D; --bg-2: #181613; --surface: #1D1A16; --surface-2: #24201B; --sunk: #0B0A09;
  --ink: #F3EDE2; --ink-2: #CFC6B7; --ink-3: #A39A8B; --line: rgba(243,237,226,.11); --line-2: rgba(243,237,226,.22);
  --accent: #E6A27C; --accent-2: #F0B892; --on-accent: #22120A; --accent-wash: rgba(230,162,124,.12);
  --gold: #D8B46A; --ok: #8FD3A8; --focus: #9CC2FF; --matte: #050505;
  --shadow-art: 0 1px 2px rgba(0,0,0,.5), 0 14px 36px -12px rgba(0,0,0,.8); --shadow-sheet: 0 -12px 40px rgba(0,0,0,.55); --scrim: rgba(0,0,0,.6);
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #100F0D; --bg-2: #181613; --surface: #1D1A16; --surface-2: #24201B; --sunk: #0B0A09;
  --ink: #F3EDE2; --ink-2: #CFC6B7; --ink-3: #A39A8B; --line: rgba(243,237,226,.11); --line-2: rgba(243,237,226,.22);
  --accent: #E6A27C; --accent-2: #F0B892; --on-accent: #22120A; --accent-wash: rgba(230,162,124,.12);
  --gold: #D8B46A; --ok: #8FD3A8; --focus: #9CC2FF; --matte: #050505;
  --shadow-art: 0 1px 2px rgba(0,0,0,.5), 0 14px 36px -12px rgba(0,0,0,.8); --shadow-sheet: 0 -12px 40px rgba(0,0,0,.55); --scrim: rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-body)/1.5 var(--sans); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; min-height: 100dvh; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.serif { font-family: var(--serif); }
.kicker { font: 600 var(--t-kicker)/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
.muted { color: var(--ink-3); }
svg.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; stroke: none; }

/* ---------------------------------------------------------------- shell */
.app { min-height: 100dvh; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
.app.has-mini { padding-bottom: calc(var(--tabbar-h) + var(--mini-h) + 12px + env(safe-area-inset-bottom)); }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s2); padding: calc(env(safe-area-inset-top) + 10px) var(--gutter) 10px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color var(--d-ui); }
.top.scrolled { border-bottom-color: var(--line); }
.brand { font: italic 500 1.375rem/1 var(--serif); letter-spacing: -.01em; margin: 0; white-space: nowrap; }
.brand b { font-style: normal; font-weight: 600; }
.top .title { font: 500 1.125rem/1.2 var(--serif); margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .spacer { flex: 1; }
@media (max-width: 480px) { .top .title.with-pill { visibility: hidden; } }
.iconbtn { width: var(--tap); height: var(--tap); display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: 50%; color: var(--ink); transition: background var(--d-tap); flex: none; }
.iconbtn:active { background: var(--line); }
.iconbtn.ghost { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.target { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 10px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); font: 500 var(--t-small)/1 var(--sans); max-width: 58vw; white-space: nowrap; }
.target span { overflow: hidden; text-overflow: ellipsis; }
.target svg.i { width: 18px; height: 18px; color: var(--accent); }
.target.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }

main.view { padding: var(--s2) var(--gutter) var(--s6); max-width: 1100px; margin: 0 auto; animation: viewIn var(--d-view) var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* bottom tab bar: five thumb-reachable targets, voice in the middle */
.tabs { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; padding: 6px 0; color: var(--ink-3); font: 500 .6875rem/1 var(--sans); letter-spacing: .01em; text-decoration: none; min-height: var(--tap); justify-content: center; border-radius: var(--r-m); }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] svg.i { color: var(--accent); stroke-width: 2; }
.tab.mic { justify-self: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--bg); box-shadow: 0 6px 18px -6px rgba(0,0,0,.45); margin-top: -18px; }
.tab.mic svg.i { width: 24px; height: 24px; }

/* mini player */
.mini { position: fixed; z-index: 29; left: 10px; right: 10px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); height: var(--mini-h); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; border-radius: var(--r-l); background: var(--surface); box-shadow: 0 10px 30px -10px rgba(0,0,0,.35), inset 0 0 0 1px var(--line); animation: viewIn var(--d-ui) var(--ease) both; }
.mini .thumb { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; background: var(--sunk); flex: none; }
.mini .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini .meta { flex: 1; min-width: 0; border: 0; background: none; text-align: left; padding: 0; }
.mini .meta b { display: block; font: 500 .9375rem/1.25 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini .meta span { display: block; font-size: var(--t-micro); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- type + sections */
h1, h2, h3 { margin: 0; font-weight: 500; }
.hero-title { font: 500 var(--t-hero)/1.04 var(--serif); letter-spacing: -.02em; margin: var(--s3) 0 var(--s2); }
.hero-title em { font-style: italic; color: var(--accent); }
.h1 { font: 500 var(--t-h1)/1.12 var(--serif); letter-spacing: -.015em; }
.h2 { font: 500 var(--t-h2)/1.2 var(--serif); letter-spacing: -.01em; }
.h3 { font: 600 var(--t-h3)/1.3 var(--sans); }
.lede { color: var(--ink-2); font-size: 1.0625rem; margin: 0 0 var(--s5); max-width: 34ch; }
.section { margin-top: var(--s7); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.link { border: 0; background: none; padding: 8px 0; color: var(--accent); font: 500 var(--t-small)/1 var(--sans); text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; gap: 4px; }

/* ---------------------------------------------------------------- buttons */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--tap); padding: 0 22px; border-radius: var(--r-pill); border: 0; font: 600 var(--t-body)/1 var(--sans); letter-spacing: .005em; text-decoration: none; transition: transform var(--d-tap) var(--ease), background var(--d-tap), opacity var(--d-tap); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn.quiet { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.lg { min-height: var(--tap-lg); padding: 0 28px; font-size: 1.0625rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .count { font-weight: 500; opacity: .8; font-variant-numeric: tabular-nums; }
.play-round { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; border: 0; background: var(--accent); color: var(--on-accent); flex: none; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 80%, black); transition: transform var(--d-tap) var(--ease); }
.play-round:active { transform: scale(.94); }
.play-round svg.i { width: 26px; height: 26px; }

/* ---------------------------------------------------------------- art frames (attribution is never drawn on top of art) */
.art { position: relative; overflow: hidden; background: var(--sunk); border-radius: 4px; }
.art img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 600ms var(--ease); }
.art img.ok { opacity: 1; }
.art.contain img { object-fit: contain; }
.framed { box-shadow: var(--shadow-art); }

/* home */
.justplay { display: block; width: 100%; border: 0; padding: 0; text-align: left; background: var(--surface); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-art), inset 0 0 0 1px var(--line); color: var(--ink); }
.justplay .art { aspect-ratio: 16/10; border-radius: 0; }
.justplay .row { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s4) var(--s4) var(--s5); }
.justplay .row > div { flex: 1; min-width: 0; }
.justplay h2 { font: 500 1.75rem/1.05 var(--serif); letter-spacing: -.015em; }
.justplay p { margin: 6px 0 0; color: var(--ink-2); font-size: var(--t-small); }
.justplay .tiny { margin-top: 8px; font-size: var(--t-micro); color: var(--ink-3); }
.make { display: flex; align-items: center; gap: var(--s4); width: 100%; margin-top: var(--s3); padding: var(--s4); border: 0; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-align: left; color: var(--ink); }
.make .stack { position: relative; width: 84px; height: 72px; flex: none; }
.make .stack .art { position: absolute; width: 52px; height: 64px; border-radius: 3px; box-shadow: var(--shadow-art); }
.make .stack .art:nth-child(1) { left: 0; top: 6px; transform: rotate(-6deg); }
.make .stack .art:nth-child(2) { left: 16px; top: 2px; transform: rotate(1deg); z-index: 1; }
.make .stack .art:nth-child(3) { left: 32px; top: 6px; transform: rotate(7deg); z-index: 2; }
.make h2 { font: 500 1.375rem/1.1 var(--serif); }
.make p { margin: 4px 0 0; font-size: var(--t-small); color: var(--ink-2); }
.make > svg.i { color: var(--ink-3); }

.rail { display: flex; gap: var(--s3); overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) var(--s3); scrollbar-width: none; scroll-padding: 0 var(--gutter); }
.rail::-webkit-scrollbar { display: none; }
.channel { flex: none; width: 168px; scroll-snap-align: start; border: 0; padding: 0; background: none; text-align: left; color: var(--ink); }
.channel .art { aspect-ratio: 4/5; border-radius: var(--r-m); box-shadow: var(--shadow-art); }
.channel b { display: block; margin-top: 10px; font: 500 1.0625rem/1.2 var(--serif); }
.channel span { display: block; font-size: var(--t-small); color: var(--ink-3); margin-top: 2px; }
.channel .art .chip-play { position: absolute; right: 8px; bottom: 8px; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--ink); display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.channel .art .chip-play svg.i { width: 16px; height: 16px; }
.own { flex: none; width: 240px; scroll-snap-align: start; border-radius: var(--r-m); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: var(--s4); display: flex; flex-direction: column; gap: 10px; }
.own b { font: 500 1.0625rem/1.2 var(--serif); }
.own p { margin: 0; font-size: var(--t-small); color: var(--ink-3); }
.field { display: flex; align-items: center; gap: 8px; height: var(--tap); padding: 0 6px 0 14px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--focus); }
.field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; height: 100%; font-size: 1rem; }
.field input::placeholder { color: var(--ink-3); }
.field .go { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; flex: none; }
.field .go svg.i { width: 18px; height: 18px; }

.tile-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s3); }
.card { display: flex; flex-direction: column; gap: 10px; padding: var(--s4); border: 0; border-radius: var(--r-l); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-align: left; color: var(--ink); text-decoration: none; }
.card b { font: 500 1.125rem/1.15 var(--serif); }
.card p { margin: 0; font-size: var(--t-small); color: var(--ink-3); }
.card .glyph { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent); }
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 10px; overflow: hidden; }
.mosaic div { aspect-ratio: 1; background: var(--sunk); }
.mosaic div:nth-child(1) { background: linear-gradient(135deg, #d8b49a, #8a6f5c); } .mosaic div:nth-child(2) { background: linear-gradient(135deg, #9fb8c8, #5f7686); } .mosaic div:nth-child(3) { background: linear-gradient(135deg, #c7c39a, #7e7a52); }

.roomlist { display: flex; flex-direction: column; gap: 2px; border-radius: var(--r-l); overflow: hidden; background: var(--line); box-shadow: inset 0 0 0 1px var(--line); }
.roomrow { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--surface); border: 0; text-align: left; color: var(--ink); width: 100%; min-height: 72px; }
.roomrow .thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; flex: none; background: var(--sunk); display: grid; place-items: center; color: var(--ink-3); }
.roomrow .thumb img { width: 100%; height: 100%; object-fit: cover; }
.roomrow .txt { flex: 1; min-width: 0; }
.roomrow .txt b { display: block; font: 600 var(--t-small)/1.3 var(--sans); }
.roomrow .txt span { display: block; font: 400 .9375rem/1.3 var(--serif); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roomrow .txt small { display: block; font-size: var(--t-micro); color: var(--ink-3); margin-top: 2px; }
.roomrow .state { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.roomrow .state.off { background: var(--line-2); }

/* ---------------------------------------------------------------- stepper + facet chips */
.steps { display: flex; gap: 6px; align-items: center; margin: var(--s2) 0 var(--s4); font: 500 var(--t-micro)/1 var(--sans); color: var(--ink-3); }
.steps span { display: inline-flex; align-items: center; gap: 6px; }
.steps span i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; box-shadow: inset 0 0 0 1px var(--line-2); font-size: .6875rem; }
.steps span.on { color: var(--ink); } .steps span.on i { background: var(--ink); color: var(--bg); box-shadow: none; }
.steps span.done i { background: var(--accent-wash); color: var(--accent); box-shadow: none; }
.steps .bar { flex: 0 0 18px; height: 1px; background: var(--line-2); }
.facet { margin-top: var(--s5); }
.facet h3 { font: 600 var(--t-small)/1 var(--sans); margin: 0 0 10px; display: flex; justify-content: space-between; align-items: baseline; }
.facet h3 button { border: 0; background: none; color: var(--accent); font: 500 var(--t-micro)/1 var(--sans); padding: 6px 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px; scrollbar-width: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font: 500 var(--t-small)/1 var(--sans); white-space: nowrap; transition: background var(--d-tap), box-shadow var(--d-tap), color var(--d-tap); }
.chip .n { font-weight: 400; color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: var(--t-micro); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.chip[aria-pressed="true"] .n { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.chip.zero { opacity: .45; }
.chip .x { font-size: 1.05em; opacity: .7; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: 14px 0; border-top: 1px solid var(--line); margin-top: var(--s5); }
.toggle-row b { display: block; font: 600 var(--t-small)/1.3 var(--sans); }
.toggle-row span { display: block; font-size: var(--t-micro); color: var(--ink-3); }
.switch { position: relative; width: 52px; height: 32px; flex: none; border-radius: var(--r-pill); border: 0; background: var(--line-2); transition: background var(--d-ui); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform var(--d-ui) var(--ease); }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.summary { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-top: var(--s6); }
.bignum { font: 500 2.5rem/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums lining-nums; }
.bignum + small { display: block; color: var(--ink-3); font-size: var(--t-small); margin-top: 4px; }
.preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: var(--s4); }
.preview .art { aspect-ratio: 1; border-radius: 6px; }
.dock { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px); z-index: 15; margin-top: var(--s6); display: flex; gap: 10px; }
.app.has-mini .dock { bottom: calc(var(--tabbar-h) + var(--mini-h) + env(safe-area-inset-bottom) + 20px); }
.dock .btn.quiet { flex: 0 0 auto; }
.dock .btn { flex: 1; box-shadow: 0 12px 30px -12px rgba(0,0,0,.45); }
.suggest { margin-top: 6px; border-radius: var(--r-m); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.suggest button { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 12px 16px; border: 0; background: none; text-align: left; min-height: var(--tap); }
.suggest button + button { border-top: 1px solid var(--line); }
.suggest button span { color: var(--ink-3); font-size: var(--t-micro); }
.empty { padding: var(--s6) 0; text-align: center; color: var(--ink-2); }
.empty .h2 { margin-bottom: 8px; }

/* music list */
.mgroup { margin-top: var(--s5); }
.mgroup h3 { font: 600 var(--t-kicker)/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }
.tracks { border-radius: var(--r-l); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.track { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border: 0; background: none; text-align: left; min-height: 68px; color: var(--ink); }
.track + .track { border-top: 1px solid var(--line); }
.track .sw { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; color: rgba(255,255,255,.92); }
.track .sw svg.i { width: 18px; height: 18px; }
.track .txt { flex: 1; min-width: 0; }
.track .txt b { display: block; font: 500 1rem/1.25 var(--serif); }
.track .txt span { display: block; font-size: var(--t-micro); color: var(--ink-3); margin-top: 2px; }
.track .tick { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); display: grid; place-items: center; flex: none; color: transparent; }
.track[aria-checked="true"] .tick { background: var(--accent); box-shadow: none; color: var(--on-accent); }
.track[aria-checked="true"] .txt b { color: var(--accent); }
.track .tick svg.i { width: 15px; height: 15px; stroke-width: 2.4; }
.note { font-size: var(--t-micro); color: var(--ink-3); margin: var(--s3) 2px 0; line-height: 1.45; }
.note svg.i { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; gap: 4px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { min-height: 40px; border: 0; border-radius: var(--r-pill); background: none; font: 500 var(--t-small)/1 var(--sans); color: var(--ink-2); padding: 0 6px; white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--bg); }

/* ---------------------------------------------------------------- now playing */
.np { max-width: 1100px; margin: 0 auto; padding: 0 var(--gutter) var(--s6); animation: viewIn var(--d-view) var(--ease) both; }
.np .where { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 14px; font: 500 var(--t-micro)/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.np .where i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.screen { position: relative; border-radius: 14px; padding: 10px; background: var(--matte); box-shadow: 0 24px 48px -24px rgba(0,0,0,.6); }
.screen.tv { aspect-ratio: 16/9; }
.screen.phone { aspect-ratio: 4/5; background: transparent; box-shadow: none; padding: 0; }
.screen .stage { position: absolute; inset: 10px; overflow: hidden; border-radius: 4px; background: #0b0a09; }
.screen.phone .stage { inset: 0; background: transparent; }
.stage .slide { position: absolute; inset: 0; opacity: 0; transition: opacity var(--d-art) var(--ease-io); display: grid; place-items: center; }
.stage .slide.on { opacity: 1; }
.stage .slide .bd { position: absolute; inset: -10%; background-size: cover; background-position: center; filter: blur(28px) brightness(.55) saturate(1.1); }
.screen.phone .stage .slide .bd { display: none; }
.stage .slide img { position: absolute; inset: 0; margin: auto; max-width: 94%; max-height: 92%; object-fit: contain; box-shadow: 0 8px 30px rgba(0,0,0,.5); animation: drift 40s var(--ease-io) infinite alternate; }
.screen.phone .stage .slide img { max-width: 100%; max-height: 100%; box-shadow: var(--shadow-art); }
.stage .slide.photo img { max-width: 100%; max-height: 100%; box-shadow: none; }
.stage .slide.sound { background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 40%, #000), #0b0a09 70%); color: #f3ede2; text-align: center; font: italic 500 1.5rem/1.2 var(--serif); }
/* credit on demand: the art steps up and shrinks, the caption takes the space beneath it (never over the art) */
.stage .slide img { transition: max-height var(--d-ui) var(--ease), transform var(--d-ui) var(--ease); }
.stage .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 5% 3.2%; color: #F3EDE2; opacity: 0; transition: opacity var(--d-ui) var(--ease); pointer-events: none; }
.stage .cap b { display: block; font: 500 clamp(.8rem, 2.6cqw, 1.25rem)/1.2 var(--serif); }
.stage .cap span { display: block; margin-top: 2px; font: 400 clamp(.62rem, 1.7cqw, .875rem)/1.3 var(--sans); color: #CFC6B7; }
.screen .stage { container-type: inline-size; }
.stage.credit-on .slide { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3%; padding: 3% 5%; }
.stage.credit-on .slide img { position: relative; inset: auto; margin: 0; max-height: 76%; max-width: 100%; transform: none; animation: none; }
.stage.credit-on .cap { position: relative; opacity: 1; padding: 0; text-align: center; flex: none; }
.screen.phone .stage .cap { display: none; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.035) translate(-.6%, -.4%); } }
.np-meta { display: flex; align-items: flex-start; gap: var(--s3); margin-top: var(--s4); }
.np-meta .txt { flex: 1; min-width: 0; }
.np-meta h1 { font: 500 1.5rem/1.15 var(--serif); letter-spacing: -.01em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.np-meta p { margin: 4px 0 0; color: var(--ink-2); font-size: var(--t-small); }
.credit { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 9px; border-radius: var(--r-pill); border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font: 500 var(--t-micro)/1 var(--sans); margin-top: 2px; }
.credit svg.i { width: 15px; height: 15px; }
.transport { display: flex; align-items: center; justify-content: center; gap: var(--s5); margin: var(--s5) 0 var(--s4); }
.transport .iconbtn { width: 56px; height: 56px; }
.transport .iconbtn svg.i { width: 26px; height: 26px; }
.transport .play-round { width: 76px; height: 76px; }
.transport .play-round svg.i { width: 30px; height: 30px; }
.np-row { display: flex; align-items: center; gap: var(--s3); padding: 14px 0; border-top: 1px solid var(--line); }
.np-row .lbl { flex: 1; min-width: 0; }
.np-row .lbl b { display: block; font: 600 var(--t-small)/1.3 var(--sans); }
.np-row .lbl span { display: block; font: 400 .9375rem/1.3 var(--serif); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-row > svg.i { color: var(--ink-3); }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font: 500 var(--t-small)/1 var(--sans); white-space: nowrap; }
.pill svg.i { width: 17px; height: 17px; }
.pill.on { background: var(--accent-wash); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); }
.pace { padding: 14px 0 6px; border-top: 1px solid var(--line); }
.pace .top-l { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.pace .top-l b { font: 600 var(--t-small)/1 var(--sans); }
.pace .top-l span { font: 500 var(--t-small)/1 var(--sans); color: var(--accent); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 32px; }
.pace .ends { display: flex; justify-content: space-between; font-size: var(--t-micro); color: var(--ink-3); }

/* ---------------------------------------------------------------- search grid (masonry, infinite) */
.searchbar { position: sticky; top: calc(env(safe-area-inset-top) + 68px); z-index: 12; padding: 6px 0 10px; background: var(--bg); }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin: var(--s2) 0 var(--s4); }
.result-head .count { font: 500 var(--t-small)/1 var(--sans); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.masonry { display: flex; gap: 14px; align-items: flex-start; }
.masonry .col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.tile { text-decoration: none; display: block; border: 0; padding: 0; background: none; text-align: left; color: var(--ink); width: 100%; }
.tile .art { border-radius: 3px; box-shadow: var(--shadow-art); }
.tile b { display: block; margin-top: 10px; font: 500 .9375rem/1.25 var(--serif); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile span { display: block; margin-top: 3px; font-size: var(--t-micro); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sentinel { height: 1px; }
.loadmore { text-align: center; color: var(--ink-3); font-size: var(--t-small); padding: var(--s5) 0; }

/* ---------------------------------------------------------------- artwork detail */
.wall { margin: 0 calc(var(--gutter) * -1); padding: var(--s6) var(--gutter); background: var(--bg-2); display: grid; place-items: center; min-height: 46vh; }
.wall .art { max-height: 62vh; box-shadow: var(--shadow-art); border-radius: 2px; }
.wall .art img { object-fit: contain; }
.work-head { margin-top: var(--s5); }
.work-head h1 { font: 500 1.875rem/1.1 var(--serif); letter-spacing: -.015em; }
.work-head .by { margin: 8px 0 0; font-size: 1.0625rem; color: var(--ink-2); }
.work-head .by button { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: var(--s5) 0; }
.actions .btn { flex: 1 1 160px; }
dl.facts { margin: 0; border-top: 1px solid var(--line); }
dl.facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s3); padding: 12px 0; border-bottom: 1px solid var(--line); }
dl.facts dt { font: 500 var(--t-micro)/1.5 var(--sans); color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }
dl.facts dd { margin: 0; font-size: var(--t-small); color: var(--ink); overflow-wrap: anywhere; }
.extlink { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s5); color: var(--accent); font-weight: 600; text-decoration: none; min-height: var(--tap); }
.extlink svg.i { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- rooms */
.room { display: flex; flex-direction: column; gap: 0; border-radius: var(--r-xl); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: var(--s4); }
.room .scr { position: relative; aspect-ratio: 16/9; background: var(--matte); border: 0; padding: 8px; display: block; width: 100%; }
.room .scr .stage { position: absolute; inset: 8px; overflow: hidden; border-radius: 3px; background: #0b0a09; }
.room.speaker .scr { aspect-ratio: auto; height: 120px; }
.room .body { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); }
.room .body .txt { flex: 1; min-width: 0; }
.room .body .txt small { display: flex; align-items: center; gap: 6px; font: 600 var(--t-micro)/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.room .body .txt small svg.i { width: 15px; height: 15px; }
.room .body .txt b { display: block; margin-top: 8px; font: 500 1.25rem/1.2 var(--serif); }
.room .body .txt span { display: block; margin-top: 3px; font-size: var(--t-small); color: var(--ink-2); }
.room .body .txt em { display: block; margin-top: 6px; font-style: normal; font-size: var(--t-micro); color: var(--accent); }
.speaker-viz { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5px; }
.speaker-viz i { width: 4px; height: 20px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 80%, white); animation: eq 1.6s var(--ease-io) infinite alternate; opacity: .85; }
.speaker-viz i:nth-child(2n) { animation-duration: 2.1s; } .speaker-viz i:nth-child(3n) { animation-duration: 1.2s; }
.paused .speaker-viz i { animation-play-state: paused; opacity: .35; }
@keyframes eq { from { transform: scaleY(.3); } to { transform: scaleY(1.6); } }
.addroom { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: var(--s4); border-radius: var(--r-xl); border: 1.5px dashed var(--line-2); background: none; color: var(--ink-2); min-height: 64px; }

/* ---------------------------------------------------------------- photos */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: var(--s3); padding: var(--s6) var(--s5); border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.dropzone .fan { position: relative; width: 150px; height: 110px; }
.dropzone .fan i { position: absolute; width: 74px; height: 92px; border-radius: 6px; background: var(--sunk); box-shadow: var(--shadow-art); top: 8px; left: 38px; border: 4px solid var(--surface); }
.dropzone .fan i:nth-child(1) { transform: rotate(-12deg) translateX(-34px); background: linear-gradient(160deg, #b9cbd8, #6d8798); }
.dropzone .fan i:nth-child(2) { transform: rotate(10deg) translateX(34px); background: linear-gradient(160deg, #e3c3a1, #a27350); }
.dropzone .fan i:nth-child(3) { background: linear-gradient(160deg, #b8c79a, #5f7748); z-index: 1; }
.privacy { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-m); background: var(--accent-wash); color: var(--ink-2); font-size: var(--t-small); margin-top: var(--s4); }
.privacy svg.i { color: var(--accent); width: 20px; height: 20px; margin-top: 1px; }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: var(--s4); }
.photo-grid button { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: var(--sunk); overflow: hidden; border-radius: 4px; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid button .rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; font-size: 14px; line-height: 1; }
.progress { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width var(--d-ui) var(--ease); }

/* ---------------------------------------------------------------- sheets */
.scrim { position: fixed; inset: 0; z-index: 50; background: var(--scrim); opacity: 0; transition: opacity var(--d-ui) var(--ease); }
.scrim.on { opacity: 1; }
.sheet { position: fixed; z-index: 51; left: 0; right: 0; bottom: 0; max-height: 88dvh; overflow-y: auto; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-sheet); padding: 10px var(--gutter) calc(var(--s5) + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform var(--d-ui) var(--ease); overscroll-behavior: contain; }
.sheet.on { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 12px; }
.sheet .sh-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.sheet .sh-head h2 { font: 500 1.375rem/1.2 var(--serif); }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 6px; border: 0; background: none; text-align: left; border-radius: var(--r-m); min-height: 60px; color: var(--ink); }
.opt + .opt { border-top: 1px solid var(--line); border-radius: 0; }
.opt .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); flex: none; color: var(--ink-2); }
.opt .txt { flex: 1; min-width: 0; }
.opt .txt b { display: block; font: 600 .9375rem/1.3 var(--sans); }
.opt .txt span { display: block; font-size: var(--t-micro); color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt .tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); flex: none; }
.opt[aria-checked="true"] .tick { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.opt[aria-checked="true"] .ic { background: var(--accent-wash); color: var(--accent); box-shadow: none; }
.opt .tick svg.i { width: 14px; height: 14px; stroke-width: 2.6; }
.sub-h { font: 600 var(--t-kicker)/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: var(--s5) 0 6px; }
.universal-slot { margin-top: 6px; color: var(--ink); }
.credit-card .t { font: 500 1.375rem/1.2 var(--serif); }
.credit-card .a { color: var(--ink-2); margin: 6px 0 var(--s4); }

/* voice */
.voice { text-align: center; }
.voice .orb { width: 112px; height: 112px; margin: var(--s4) auto; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; position: relative; }
.voice .orb svg.i { width: 36px; height: 36px; }
.voice .orb.listening::before, .voice .orb.listening::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--accent); animation: ring 1.8s var(--ease) infinite; }
.voice .orb.listening::after { animation-delay: .9s; }
@keyframes ring { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.voice .status { font: italic 500 1.25rem/1.3 var(--serif); min-height: 1.6em; }
.voice .reply { color: var(--accent); font-weight: 500; min-height: 1.5em; margin: 6px 0 var(--s4); }
.voice .tries { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: var(--s4) 0; }
.voice .tries button { font-style: italic; font-family: var(--serif); font-weight: 400; font-size: .9375rem; }
.voice .priv { font-size: var(--t-micro); color: var(--ink-3); margin-top: var(--s3); }

.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px); transform: translate(-50%, 12px); opacity: 0; padding: 12px 18px; border-radius: var(--r-pill); background: var(--ink); color: var(--bg); font: 500 var(--t-small)/1.3 var(--sans); box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); transition: opacity var(--d-ui) var(--ease), transform var(--d-ui) var(--ease); pointer-events: none; max-width: calc(100vw - 40px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- tablet: rail on the left, more columns, two-pane now playing */
@media (min-width: 760px) {
  :root { --gutter: 32px; }
  .app, .app.has-mini { padding-bottom: 0; padding-left: 92px; }
  .tabs { top: 0; right: auto; width: 92px; height: 100dvh; grid-template-columns: 1fr; grid-auto-rows: 72px; align-content: center; gap: 10px; border-top: 0; border-right: 1px solid var(--line); padding: 0 10px; }
  .tab.mic { margin: 0; justify-self: center; }
  .mini { left: auto; right: 24px; bottom: 24px; width: 380px; }
  .app.has-mini .dock, .dock { bottom: 24px; max-width: 520px; margin-left: auto; margin-right: auto; }
  .toast { bottom: 24px; }
  .tile-row { margin-top: var(--s4); }
  .channel { width: 200px; }
  .preview { grid-template-columns: repeat(6, 1fr); }
  .photo-grid { grid-template-columns: repeat(6, 1fr); }
  .sheet { left: 50%; right: auto; width: 560px; margin-left: -234px; border-radius: var(--r-xl); bottom: 24px; max-height: 80dvh; }
  .rooms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
  .rooms-grid .room { margin: 0; }
  .work-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s6); align-items: start; }
  .work-grid .wall { margin: 0; border-radius: var(--r-l); position: sticky; top: 90px; }
  .work-grid .work-head { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .stage .slide { transition: opacity 600ms linear !important; }
}

.sleep-pills { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: 100%; margin-top: 8px; }
.sleep-pills .pill { justify-content: center; padding: 0 4px; }
/* tablet portrait: screen on top, large; controls beneath. Two panes only when there is width for both. */
@media (min-width: 760px) {
  .np { max-width: 760px; }
  .np-grid { display: block; }
  .np-grid .transport { justify-content: center; }
  .np-controls { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s6); }
  .np-controls > .np-meta, .np-controls > .transport, .np-controls > .actions { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .np { max-width: 1200px; }
  .np-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--s6); align-items: start; }
  .np-controls { display: block; }
  .np-grid .transport { justify-content: flex-start; }
}
@media (min-width: 1000px) {
  .home-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--s5); align-items: start; }
  .home-grid .make { margin-top: 0; }
}
@media (min-width: 760px) and (max-width: 999px) {
  .justplay .art { aspect-ratio: 16/8; }
  .home-grid .tile-row { grid-template-columns: 1fr 1fr; }
}
.room .body .txt small { flex-wrap: wrap; row-gap: 4px; }
