/* Room page styles: off-white and off-black with one deep-rose accent, light and dark. 16px cards, pill buttons. */
:root {
  --bg: #f4f4f1; --surface: #ffffff; --raised: #ecece8; --line: #dcdcd6;
  --text: #17171a; --muted: #5d5d64; --faint: #8a8a91;
  --accent: #c42d61; --accent-ink: #ffffff; --accent-soft: #c42d6114;
  --shadow: 0 30px 60px -36px #17171a59;
  --sans: 'Geist', system-ui, sans-serif; --mono: 'Geist Mono', ui-monospace, monospace;
  --r: 16px; --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214; --surface: #1b1b1f; --raised: #242429; --line: #2f2f35;
    --text: #f1f1ee; --muted: #a6a6ad; --faint: #75757d;
    --accent: #ef5c8c; --accent-ink: #121214; --accent-soft: #ef5c8c1f;
    --shadow: 0 30px 60px -30px #000c;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 32px 72px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* Loading screen: the logo breathes, slowly, with the lamp's glow behind it, until the page is ready. It hides
   itself after a few seconds even if the script never runs. */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--bg); transition: opacity .7s var(--ease), visibility .7s; animation: splash-away .7s 7s forwards; }
.splash.done { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-mark { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.splash-mark img { position: relative; width: 96px; height: 96px; animation: breathe 8s ease-in-out infinite; }
.splash-glow { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 42%, transparent) 0%, transparent 70%); animation: glow 8s ease-in-out infinite; }
.splash-word { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.03em; animation: enter 1s .1s var(--ease) both; }
.splash-breath { position: relative; margin: 0; height: 1.6em; width: 12em; text-align: center; font-size: 14px; color: var(--muted); }
.splash-breath span { position: absolute; inset: 0; opacity: 0; animation: breath-in 8s ease-in-out infinite; }
.splash-breath span + span { animation-name: breath-out; }
@keyframes breathe { 0%, 100% { transform: scale(.94); } 50% { transform: scale(1.06); } }
@keyframes glow { 0%, 100% { transform: scale(.7); opacity: .35; } 50% { transform: scale(1.25); opacity: 1; } }
@keyframes breath-in { 0%, 45%, 100% { opacity: 0; } 8%, 37% { opacity: 1; } }
@keyframes breath-out { 0%, 50%, 95% { opacity: 0; } 58%, 87% { opacity: 1; } }
@keyframes splash-away { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@media (prefers-reduced-motion: reduce) { .splash { animation: splash-away .01s 7s forwards !important; } .splash-mark img, .splash-glow { animation: none; } .splash-breath span:first-child { animation: none; opacity: 1; } .splash-breath span + span { display: none; } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.03em; }
h2 { font-size: 24px; line-height: 1.2; }

/* Nav */
.nav { width: 100%; max-width: 1280px; margin: 0 auto; height: 68px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; }
.wordmark { font-weight: 700; font-size: 19px; letter-spacing: -.035em; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.wordmark img { display: block; }
.nav-note { font-size: 13px; color: var(--muted); }

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; border: 0; border-radius: 999px; padding: 13px 22px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px; transition: transform .3s var(--ease), filter .2s; }
.btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn.quiet { background: var(--raised); color: var(--text); }
.field { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: border-color .2s; }
.field:focus-within { border-color: var(--accent); }
.field input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 0 16px; font-size: 16px; }
.field input::placeholder { color: var(--faint); }
label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.help { margin: 8px 0 0 18px; font-size: 13px; color: var(--muted); }

/* Hero: copy left, a real room right. */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; min-height: calc(100dvh - 68px - 40px); padding: 32px 0 64px; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; max-width: 600px; animation: enter .9s var(--ease) both; }
.hero h1 { font-size: clamp(40px, 3.9vw, 56px); line-height: 1.02; letter-spacing: -.045em; }
.accent { color: var(--accent); }
.eyebrow { margin: 0; font-size: 14px; font-weight: 500; color: var(--accent); letter-spacing: .01em; }
.sub { margin: 0; font-size: 18px; color: var(--muted); max-width: 42ch; }
.ask { margin-top: 10px; }
.hero-media { margin: 0; display: flex; flex-direction: column; gap: 12px; animation: enter 1.1s .12s var(--ease) both; }
.hero-pick { display: block; width: 100%; border: 0; padding: 0; border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; background: var(--raised); box-shadow: var(--shadow); }
.hero-pick img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.hero-pick:hover img { transform: scale(1.03); }
.hero-media figcaption { font-size: 14px; color: var(--muted); }

/* Presets: two rooms, the first wider. */
.presets { padding: 24px 0 24px; }
.presets h2 { margin-bottom: 20px; }
.preset-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
.preset { position: relative; border: 0; padding: 0; border-radius: var(--r); overflow: hidden; background: var(--raised); text-align: left; isolation: isolate; aspect-ratio: 4 / 3; }
.preset:first-child .preset-text b { font-size: 28px; }
.preset img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); z-index: -1; }
.preset:hover img { transform: scale(1.04); }
.preset::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 45%, #0a0a0cd9 100%); }
.preset-text { position: absolute; left: 22px; right: 22px; bottom: 20px; display: flex; flex-direction: column; gap: 4px; color: #f6f6f3; }
.preset-text b { font-size: 22px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.preset:nth-child(2) { align-self: end; aspect-ratio: 1 / 1; }
.preset-text span { font-size: 14px; color: #d9d9d4; }

/* Result: the room large, its details beside it. */
.result { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr); gap: 36px; align-items: start; padding-top: 20px; }
.stage { position: relative; margin: 0; border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; background: var(--raised); box-shadow: var(--shadow); }
.stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.02); transition: opacity .9s ease, transform 1.6s var(--ease); }
.stage.ready img { opacity: 1; transform: none; }
/* Skeleton: the shape of the picture, with a light sweep while it is being made. */
.skeleton { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--surface) 70%, transparent) 50%, transparent 70%) 0 0 / 250% 100%, var(--raised); animation: sweep 1.8s linear infinite; }
/* While the room is being made: an hourglass and a line saying what is happening. */
.skeleton .painting { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px; background: var(--surface); color: var(--text); box-shadow: 0 6px 24px #00000014; font-size: 15px; font-weight: 600; white-space: nowrap; }
.skeleton .painting i { font-size: 22px; color: var(--accent); animation: hourglass 1.6s ease-in-out infinite; }
@keyframes hourglass { 0%, 40% { transform: rotate(0deg); } 50%, 90% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .skeleton .painting i { animation: none; } }
.panel { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; animation: enter .7s var(--ease) both; }
.status { margin: 0; font-size: 14px; color: var(--accent); font-weight: 500; }
.panel h1 { font-size: clamp(32px, 3.2vw, 44px); line-height: 1.05; }
.tagline { margin: 0; font-size: 17px; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.demo-note { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--raised); font-size: 13.5px; color: var(--muted); }
.refine label { margin-top: 4px; }
.player { margin-top: 14px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.player h2 { font-size: 17px; }
.yt { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #0a0a0c; }
.yt iframe { width: 100%; height: 100%; border: 0; display: block; }
.yt-status { margin: 0; height: 100%; display: grid; place-items: center; padding: 0 20px; text-align: center; font-size: 14px; color: #a6a6ad; }
.tracks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.track { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 12px; font-size: 14px; font-weight: 500; color: var(--muted); transition: border-color .2s, color .2s, background .2s; }
.track:hover { border-color: var(--text); color: var(--text); }
.track.on { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
/* The equaliser shows which artist is playing. */
.track.on::before { content: ''; width: 12px; height: 11px; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 3px 60% no-repeat, linear-gradient(var(--accent), var(--accent)) 4.5px 100% / 3px 100% no-repeat, linear-gradient(var(--accent), var(--accent)) 9px 100% / 3px 40% no-repeat; animation: eq .9s ease-in-out infinite alternate; }

/* Progress while the room is made: one quiet line per step. */
.steps { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.steps li { display: flex; gap: 10px; align-items: baseline; font-size: 15px; color: var(--muted); animation: enter .4s var(--ease) both; }
.steps li .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); animation: pulse 1s ease-in-out infinite alternate; }
.steps li.done { color: var(--text); } .steps li.done .dot { background: var(--faint); animation: none; }
.steps li.err .dot { background: #d13a3a; animation: none; }
.steps li small { font-size: 13px; color: var(--faint); }
#build.complete .steps { display: none; }

/* Body under the room */
#r-body { display: flex; flex-direction: column; gap: 40px; padding-top: 48px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.summary { max-width: 720px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.summary-text { margin: 0; font-size: clamp(19px, 1.8vw, 22px); line-height: 1.5; letter-spacing: -.01em; }
.more { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 0; color: var(--accent); font-weight: 600; font-size: 15px; }
.more::after { content: ''; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .25s var(--ease); }
.more[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.more-body { display: flex; flex-direction: column; gap: 56px; padding-top: 8px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.more-body > :first-child { padding-top: 32px; }
.brief { max-width: 720px; display: flex; flex-direction: column; gap: 12px; }
.brief-text { margin: 0; font-size: 17px; line-height: 1.65; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; font-weight: 500; padding: 5px 11px; border-radius: 999px; background: var(--raised); color: var(--text); }
.tag.no { background: transparent; border: 1px dashed var(--line); color: var(--faint); }
.choices-section h2 { margin-bottom: 20px; }
/* The raw Qloo lists sit behind a toggle so the page leads with the room and the proof. */
.taste summary { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.taste summary::-webkit-details-marker { display: none; }
.taste .toggle::after { content: "Show"; font-size: 14px; font-weight: 500; color: var(--accent); }
.taste[open] .toggle::after { content: "Hide"; }
.taste[open] summary { margin-bottom: 20px; }
/* With and without Qloo */
.compare { max-width: 820px; display: flex; flex-direction: column; gap: 12px; }
.compare-intro, .compare-foot { margin: 0; color: var(--muted); font-size: 15px; }
.compare-foot { font-size: 13px; color: var(--faint); }
.compare-score { margin: 4px 0 0; font-size: clamp(21px, 2vw, 26px); font-weight: 600; letter-spacing: -.02em; }
.cmp { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cmp li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.cmp-name { font-weight: 600; }
.cmp-kind { font: 400 12px var(--mono); color: var(--faint); align-self: center; }
.cmp-verdict { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.cmp li.ranked { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.cmp li.ranked .cmp-verdict { color: var(--accent); }
.cmp li.unknown .cmp-name { text-decoration: line-through; text-decoration-color: var(--faint); }
@media (max-width: 640px) { .cmp { grid-template-columns: 1fr; } }
.choices { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.choices li { padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; animation: enter .6s var(--ease) both; }
/* Spans are set per item in room.js so every row is full. */
.choices .span-2 { grid-column: span 2; } .choices .span-3 { grid-column: span 3; } .choices .span-6 { grid-column: span 6; }
.choices li:nth-child(1) { background: var(--accent-soft); border-color: transparent; }
.choices h3 { font-size: 15px; letter-spacing: -.01em; color: var(--muted); font-weight: 500; }
.choices p { margin: 0; font-size: 16px; line-height: 1.5; }
.taste-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 28px 32px; }
.taste-col h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.taste-col ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.taste-col li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--muted); }
.taste-col li:first-child { color: var(--text); font-weight: 600; }
.taste-col li span:last-child { font: 400 13px var(--mono); color: var(--faint); }
.again { align-self: flex-start; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 15px; box-shadow: var(--shadow); }
.foot { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 32px 28px; font-size: 13px; color: var(--faint); }

@keyframes enter { from { opacity: 0; transform: translateY(16px); } }
@keyframes sweep { from { background-position: 150% 0, 0 0; } to { background-position: -100% 0, 0 0; } }
@keyframes pulse { to { opacity: .3; } }
@keyframes eq { to { background-size: 3px 100%, 3px 35%, 3px 85%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 32px; padding-top: 16px; }
  .hero-copy { max-width: none; }
  .result { grid-template-columns: 1fr; }
  .panel { position: static; }
  .choices li[class] { grid-column: span 3; }
  .choices li:last-child:nth-child(odd) { grid-column: span 6; }
}
@media (max-width: 767px) {
  main { padding: 0 16px 56px; } .nav { padding: 0 16px; height: 60px; } .foot { padding: 0 16px 24px; }
  .nav-note { display: none; }
  .hero h1 { font-size: 38px; }
  .field { flex-direction: column; border-radius: 20px; }
  .field input { padding: 12px 12px; }
  .field .btn { width: 100%; }
  .help { margin-left: 4px; }
  .preset-grid { grid-template-columns: 1fr; }
  .preset, .preset:nth-child(2) { aspect-ratio: 4 / 3; }
  .preset:first-child .preset-text b { font-size: 22px; }
  .choices { grid-template-columns: 1fr; gap: 10px; }
  .choices li[class], .choices li[class]:last-child:nth-child(odd) { grid-column: auto; }
  .choices li { padding: 16px; }
  #r-body { gap: 32px; padding-top: 32px; }
  .more-body { gap: 44px; }
}

/* Walk inside in 3D: a full-screen canvas with a small heads-up layer. */
.walk3d { background: #1d1218; color: #f6ece4; overflow: hidden; }
.walk3d #view { position: fixed; inset: 0; width: 100vw; height: 100dvh; display: block; touch-action: none; cursor: grab; }
.w3-top { position: fixed; top: 16px; left: 16px; right: 16px; display: flex; align-items: center; gap: 14px; z-index: 2; }
.w3-top .wordmark { color: #f6ece4; padding: 8px 14px; border-radius: 999px; background: rgba(29, 18, 24, .7); }
.w3-name { margin: 0; padding: 8px 14px; border-radius: 999px; background: rgba(29, 18, 24, .7); font-weight: 600; }
.w3-btn { margin-left: auto; height: 40px; padding: 0 18px; border-radius: 999px; border: 0; background: #ef5c8c; color: #1d1218; font-weight: 600; }
.w3-load { position: fixed; inset: 0; display: grid; place-content: center; gap: 14px; text-align: center; z-index: 3; background: #1d1218; }
.w3-load p { margin: 0; font-size: 18px; max-width: 36ch; }
.w3-retry { justify-self: center; border: 0; border-radius: 999px; padding: 11px 22px; font: inherit; font-weight: 600; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.w3-retry[hidden] { display: none; }
.w3-retry:active { transform: scale(.98); }
.w3-bar { width: 260px; height: 4px; border-radius: 2px; background: rgba(246, 236, 228, .15); overflow: hidden; }
.w3-bar i { display: block; height: 100%; width: 0; background: #ef5c8c; transition: width .2s; }
.w3-keys { position: fixed; left: 24px; bottom: 24px; z-index: 2; display: grid; gap: 6px; justify-items: start; }
.w3-row { display: flex; gap: 6px; }
.w3-row:first-child { padding-left: 46px; }
.w3-keys span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; border: 1px solid rgba(246, 236, 228, .35); background: rgba(29, 18, 24, .6); font: 600 16px 'Geist Mono', monospace; transition: background .08s, transform .08s; }
.w3-keys span.on { background: #ef5c8c; color: #1d1218; border-color: #ef5c8c; transform: translateY(1px); }
.w3-keys p { margin: 6px 0 0; font-size: 13px; color: rgba(246, 236, 228, .75); }
.w3-note { position: fixed; right: 24px; bottom: 24px; max-width: 320px; margin: 0; font-size: 12px; color: rgba(246, 236, 228, .6); text-align: right; z-index: 2; }
.w3-note a { color: #f6ece4; }
.w3-load .w3-sub { justify-self: center; max-width: 44ch; font-size: 14px; color: rgba(246, 236, 228, .65); }
.w3-pad { position: fixed; right: 20px; bottom: 64px; z-index: 2; display: none; grid-template-columns: repeat(3, 52px); gap: 6px; }
.w3-pad button { height: 52px; border-radius: 12px; border: 1px solid rgba(246, 236, 228, .35); background: rgba(29, 18, 24, .6); color: #f6ece4; font-size: 20px; touch-action: none; }
@media (pointer: coarse) { .w3-pad { display: grid; } .w3-keys { display: none; } }
@media (max-width: 640px) { .w3-note { left: 16px; right: 16px; max-width: none; text-align: left; bottom: 16px; } .w3-pad { bottom: 72px; } }
