/* ============ Duetour ============ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --px: 0;   /* look-around parallax, -1..1 */
  --py: 0;
  --yaw: 0;
  --pitch: 0;

  /* ambient LED strips (user-pickable, independent of cabin glow) */
  --ambient-rgb: 102, 199, 255;

  /* cabin glow (user-pickable) */
  --glow-rgb: 255, 180, 94;
  --amber: rgb(var(--glow-rgb));
  --amber-dim: color-mix(in srgb, rgb(var(--glow-rgb)) 72%, #201008);
  --lcd-bg: #1c1206;
  --lcd-ink: color-mix(in srgb, rgb(var(--glow-rgb)) 72%, #fff);

  /* interior theme (walnut default) */
  --d1: #241a12; --d2: #1b130d; --d3: #140e09; --dtop: #35271b;
  --w1: #5e3b1d; --w2: #8a5a2b; --w3: #6b4423; --w4: #93622f; --w5: #59371b;
  --ring: 122, 79, 38;
  --leather1: #3a2e24; --leather2: #221912; --leather3: #140e09;
  --rimbase: #241b15;
  --rimw1: #7a4a20; --rimw2: #96622c; --rimw3: #6b3f1c; --rimw4: #8a5626;
  --mat1: #2c2118; --mat2: #1d150e;
}

#app.int-noir {
  --d1: #1c1c22; --d2: #141419; --d3: #0e0e12; --dtop: #2a2a32;
  --w1: #33343c; --w2: #4a4c58; --w3: #3a3c46; --w4: #545664; --w5: #2e2f38;
  --ring: 90, 94, 110;
  --leather1: #2e2e36; --leather2: #1a1a20; --leather3: #0e0e12;
  --rimbase: #1c1c22;
  --rimw1: #3c3e48; --rimw2: #50525e; --rimw3: #34363e; --rimw4: #484a56;
  --mat1: #242430; --mat2: #16161e;
}
#app.int-crimson {
  --d1: #2a1216; --d2: #1e0d10; --d3: #14080a; --dtop: #3a1a20;
  --w1: #0e0c10; --w2: #26222a; --w3: #16141a; --w4: #2e2a34; --w5: #0c0a0e;
  --ring: 140, 40, 55;
  --leather1: #48202a; --leather2: #2a1218; --leather3: #160a0d;
  --rimbase: #2e1218;
  --rimw1: #101014; --rimw2: #2a2a32; --rimw3: #18181e; --rimw4: #26262e;
  --mat1: #341820; --mat2: #200e13;
}
#app.int-cream {
  --d1: #40332a; --d2: #332822; --d3: #241c17; --dtop: #55453a;
  --w1: #8a6a38; --w2: #c09a55; --w3: #a5824a; --w4: #caa45e; --w5: #7e5f32;
  --ring: 170, 130, 80;
  --leather1: #6b5847; --leather2: #4a3b2f; --leather3: #2e241c;
  --rimbase: #4a3b30;
  --rimw1: #b08748; --rimw2: #d0a860; --rimw3: #96713c; --rimw4: #c49c56;
  --mat1: #55463a; --mat2: #3a2e25;
}

/* modern trims: carbon sport sedan */
#app.int-sport {
  --d1: #1a1c20; --d2: #131418; --d3: #0c0d10; --dtop: #26282e;
  --w1: #1c1e24; --w2: #2a2d36; --w3: #22242c; --w4: #30333e; --w5: #191b21;
  --ring: 80, 130, 205;
  --leather1: #26282e; --leather2: #17181d; --leather3: #0e0f13;
  --rimbase: #1b1d22;
  --rimw1: #2c2f36; --rimw2: #3a3e48; --rimw3: #262930; --rimw4: #343842;
  --mat1: #1e2026; --mat2: #121318;
}
/* modern trims: brushed-aluminum tech saloon */
#app.int-tech {
  --d1: #202024; --d2: #17171b; --d3: #0f0f12; --dtop: #2c2c32;
  --w1: #787e88; --w2: #9aa0aa; --w3: #868c96; --w4: #a4aab4; --w5: #6e747e;
  --ring: 150, 158, 170;
  --leather1: #2a2c32; --leather2: #1b1d22; --leather3: #101116;
  --rimbase: #23252b;
  --rimw1: #8e949e; --rimw2: #b8bec8; --rimw3: #7c828c; --rimw4: #a6acb6;
  --mat1: #1c1c22; --mat2: #121216;
}
/* modern trims: piano-black luxury */
#app.int-lux {
  --d1: #241f1e; --d2: #1a1615; --d3: #100e0d; --dtop: #322b29;
  --w1: #0c0b0d; --w2: #262327; --w3: #121013; --w4: #2a262b; --w5: #0e0d0f;
  --ring: 205, 150, 95;
  --leather1: #3e302b; --leather2: #281d19; --leather3: #151009;
  --rimbase: #241f1d;
  --rimw1: #40291c; --rimw2: #5a3c26; --rimw3: #33220f; --rimw4: #523823;
  --mat1: #2a2320; --mat2: #181412;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: #050408;
  font-family: "Avenir Next", Avenir, "Trebuchet MS", system-ui, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

button, input { font-family: inherit; }
button { cursor: pointer; }
input { user-select: text; -webkit-user-select: text; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--amber, #d98a58);
  outline-offset: 3px;
}
.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 100;
  transform: translateY(-150%); padding: 8px 12px; border-radius: 6px;
  background: #17110c; color: #f4dfc4; text-decoration: none;
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- start screen ---------- */

#start {
  position: fixed; inset: 0; z-index: 60; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 14% 18%, rgba(199, 117, 73, .13), transparent 28%),
    radial-gradient(circle at 82% 76%, rgba(74, 92, 85, .11), transparent 32%),
    repeating-linear-gradient(92deg, rgba(70, 48, 34, .018) 0 1px, transparent 1px 5px),
    linear-gradient(155deg, #f3e9dd 0%, #efe5d8 40%, #ecdcd4 100%);
  background-color: #eee7da;
  transition: opacity 1.1s ease, visibility 1.1s;
}
#start.gone { opacity: 0; visibility: hidden; pointer-events: none; }

/* slow drifting warm glow, like passing headlights at dusk */
.start-glow {
  position: absolute; inset: -22%;
  pointer-events: none;
  background:
    radial-gradient(36% 42% at 30% 64%, rgba(240, 164, 109, .32), transparent 70%),
    radial-gradient(32% 38% at 72% 32%, rgba(217, 138, 138, .26), transparent 72%),
    radial-gradient(26% 30% at 52% 14%, rgba(190, 150, 210, .14), transparent 74%);
  filter: blur(24px);
  animation: glowDrift 18s ease-in-out infinite alternate;
}
@keyframes glowDrift {
  0%   { transform: translate(-2.5%, 1.5%) scale(1); }
  100% { transform: translate(3%, -2%) scale(1.14); }
}

/* soft light motes floating up */
.start-motes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.start-motes span {
  position: absolute; bottom: -6%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 206, 156, .95), rgba(255, 150, 120, .25) 60%, transparent 72%);
  filter: blur(.4px);
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0%   { transform: translateY(0) translateX(0) scale(.5); opacity: 0; }
  12%  { opacity: 1; }
  86%  { opacity: 1; }
  100% { transform: translateY(-116vh) translateX(26px) scale(1); opacity: 0; }
}

/* whisper of a lit road along the bottom */
.start-road {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  pointer-events: none;
  background: radial-gradient(120% 100% at 50% 128%, rgba(240, 164, 109, .22), transparent 60%);
  animation: roadPulse 7s ease-in-out infinite;
}
@keyframes roadPulse { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .start-glow, .start-motes span, .start-road, #start h1 { animation: none; }
}

.start-inner { position: relative; z-index: 2; width: min(92vw, 820px); text-align: center; color: #342a24; }
.start-kicker {
  margin-bottom: 18px; color: #a06443; font-size: 11px; font-weight: 600;
  letter-spacing: .32em; text-transform: uppercase;
}
#start h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(62px, 10vw, 142px);
  font-weight: 400; line-height: .86; letter-spacing: -.065em;
  color: #342a24;
  text-shadow: 0 2px 28px rgba(79, 48, 30, .11);
  animation: titleBreath 7s ease-in-out infinite;
}
@keyframes titleBreath {
  0%, 100% { text-shadow: 0 2px 28px rgba(79, 48, 30, .11); }
  50%      { text-shadow: 0 3px 46px rgba(217, 138, 138, .26); }
}
#start h1 em { font-style: italic; }
#start h1 span {
  font-size: .38em; vertical-align: middle; letter-spacing: .3em;
  color: #a4707f; text-transform: uppercase; padding: 0 .6em;
}

#startBtn {
  margin-top: 2.8em;
  width: 118px; height: 118px; border-radius: 50%;
  border: 2px solid #4b3a30;
  background:
    radial-gradient(circle at 50% 34%, #3c3038 0%, #241c26 55%, #150f19 100%);
  color: #d8cfc4;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  box-shadow:
    0 0 0 7px rgba(75,58,48,.14),
    0 0 0 8.5px rgba(75,58,48,.25),
    0 12px 34px rgba(79,48,30,.28),
    inset 0 2px 3px rgba(255,255,255,.09);
  transition: transform .14s ease, box-shadow .3s ease;
}
#startBtn .eng { font-size: 9px; letter-spacing: .28em; color: #8f7f88; }
#startBtn strong {
  font-size: 17px; letter-spacing: .18em; color: #efaf7f;
  text-shadow: 0 0 12px rgba(239,145,90,.48);
}
#startBtn:hover {
  transform: scale(1.04);
  box-shadow:
    0 0 0 7px rgba(69,48,57,.22), 0 0 0 8.5px rgba(69,48,57,.4),
    0 14px 40px rgba(120,60,80,.42), 0 0 34px rgba(255,120,90,.25),
    inset 0 2px 3px rgba(255,255,255,.12);
}
#startBtn:active { transform: scale(.97); }
.start-hint {
  margin-top: 1.6em; font-size: 11px; letter-spacing: .3em; color: #9a6c50;
  text-transform: uppercase; animation: pulse 2.6s ease-in-out infinite;
}
.start-deck {
  margin: 20px auto 0; color: #9a6650;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 2.1vw, 25px); font-style: italic; line-height: 1.4;
  letter-spacing: .01em; text-wrap: balance;
}
.start-deck em { font-style: italic; color: #b8546a; }

/* share (copy link) — top corner of the intro */

#shareBtn {
  position: absolute; top: 20px; right: 22px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 22px;
  background: rgba(255, 248, 240, .62); border: 1.5px solid #cca187;
  color: #7a4f38; font-size: 12.5px; font-weight: 600; letter-spacing: .07em;
  backdrop-filter: blur(4px);
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
#shareBtn svg { width: 15px; height: 15px; fill: currentColor; }
#shareBtn:hover { background: #f4e5d5; border-color: #a8785a; color: #583d2e; transform: translateY(-1px); }
#shareBtn.copied { background: #e0e7d3; border-color: #9bb082; color: #4c6238; }

/* drive-together room UI */

#together { margin-top: 2.1em; }
#togetherBtn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 22px; border-radius: 24px;
  background: rgba(255, 248, 240, .55); border: 1.5px solid #c69f86;
  color: #7a4f38; font-size: 15px; font-weight: 600; letter-spacing: .05em;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
#togetherBtn svg { width: 18px; height: 18px; fill: currentColor; opacity: .82; }
#togetherBtn:hover { background: #f4e5d5; border-color: #a8785a; color: #583d2e; transform: translateY(-1px); }
#roomBox {
  margin-top: 1.3em;
  display: flex; flex-direction: column; align-items: center; gap: 11px;
}
#roomBox.hidden { display: none; }
#roomCode {
  width: 236px; padding: 10px 14px;
  border-radius: 22px; border: 1.5px solid #c6a38a;
  background: #f7f0e6; color: #45352c;
  font-family: inherit; font-size: 14px; text-align: center; letter-spacing: .12em;
  outline: none;
}
#roomCode::placeholder { color: #c298a4; letter-spacing: .06em; }
#roomCode:focus { border-color: #c2879a; }
.room-btns { display: flex; gap: 10px; }
.room-btns button {
  padding: 8px 18px; border-radius: 18px;
  border: 1.5px solid #a8785a; background: #e8c8ae; color: #54392b;
  font-size: 12.5px; letter-spacing: .1em;
  transition: background .15s ease;
}
.room-btns button:hover { background: #ddb38f; }
#roomStatus { font-size: 12px; color: #7a5845; min-height: 1.3em; letter-spacing: .04em; }
@keyframes pulse { 0%,100% { opacity: .45; } 50% { opacity: 1; } }

/* ---------- app / scene ---------- */

#app { position: fixed; inset: 0; overflow: hidden; }

#persp {
  position: absolute; inset: 0;
  perspective: 860px;
  perspective-origin: 50% 54%;
}
#scene {
  position: absolute; inset: 0;
  transform-style: flat;
  transform-origin: 50% 58%;
  will-change: transform;
  backface-visibility: hidden;
}
.layer { position: absolute; inset: 0; pointer-events: none; }
.layer > * { pointer-events: auto; }

/* --- sky --- */

#skyLayer {
  inset: -15% -15% 51% -15%;
  transform: translate(calc(var(--px) * -94px), calc(var(--py) * -42px));
}
#skyLayer::before,
#skyLayer::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 1.8s ease, background 1.8s ease;
}
#skyLayer::before {
  opacity: .46;
  background:
    radial-gradient(ellipse at 28% 100%, rgba(255, 187, 116, .34) 0%, rgba(255, 130, 91, .08) 29%, transparent 58%),
    radial-gradient(ellipse at 74% 24%, rgba(117, 143, 210, .1), transparent 48%);
  mix-blend-mode: screen;
}
#skyLayer::after {
  opacity: .4;
  background:
    linear-gradient(112deg, transparent 0 34%, rgba(255,255,255,.035) 44%, transparent 56%),
    radial-gradient(ellipse at 50% 112%, rgba(255,255,255,.12), transparent 46%);
}
#app[data-scene='city'] #skyLayer::after {
  opacity: .68;
  background:
    radial-gradient(ellipse at 65% 108%, rgba(103, 141, 255, .2), transparent 43%),
    radial-gradient(ellipse at 22% 110%, rgba(255, 103, 131, .14), transparent 34%);
}
#app[data-scene='coast'] #skyLayer::after {
  opacity: .72;
  background:
    linear-gradient(106deg, transparent 12%, rgba(255,255,255,.08) 46%, transparent 68%),
    radial-gradient(ellipse at 28% 112%, rgba(255, 221, 163, .2), transparent 40%);
}
#app[data-scene='desert'] #skyLayer::after {
  opacity: .6;
  background: radial-gradient(ellipse at 32% 112%, rgba(255, 169, 88, .28), transparent 51%);
}
#app[data-scene='forest'] #skyLayer::after {
  opacity: .48;
  background:
    radial-gradient(ellipse at 72% 110%, rgba(100, 154, 133, .16), transparent 42%),
    linear-gradient(to bottom, transparent 58%, rgba(21, 42, 38, .16));
}
.mode-night #skyLayer::before { opacity: .18; }
.mode-night #skyLayer::after { filter: saturate(.75) brightness(.72); }
.sky { position: absolute; inset: 0; opacity: 0; transition: opacity 2.2s ease; }
.sky-dusk {
  background: linear-gradient(to bottom,
    #191a38 0%, #33254e 42%, #6e4463 70%, #c46a55 92%, #e8895d 100%);
}
.sky-morning {
  background: linear-gradient(to bottom,
    #43537a 0%, #7c6484 40%, #d4756b 70%, #ffb166 90%, #ffd98f 100%);
}
.sky-night {
  background: linear-gradient(to bottom,
    #04050c 0%, #0a0e21 55%, #17203c 85%, #2a3050 100%);
}
.mode-dusk .sky-dusk { opacity: 1; }
.mode-morning .sky-morning { opacity: 1; }
.mode-night .sky-night { opacity: 1; }

.stars {
  position: absolute; inset: 0 0 20% 0; opacity: 0; transition: opacity 2.2s ease;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, #fff, transparent),
    radial-gradient(1px 1px at 28% 44%, #dfe6ff, transparent),
    radial-gradient(1.6px 1.6px at 41% 15%, #fff, transparent),
    radial-gradient(1px 1px at 55% 36%, #cdd8ff, transparent),
    radial-gradient(1.3px 1.3px at 67% 10%, #fff, transparent),
    radial-gradient(1px 1px at 76% 30%, #e8eeff, transparent),
    radial-gradient(1.5px 1.5px at 88% 18%, #fff, transparent),
    radial-gradient(1px 1px at 6% 54%, #dfe6ff, transparent),
    radial-gradient(1.2px 1.2px at 20% 8%, #fff, transparent),
    radial-gradient(1px 1px at 34% 60%, #cdd8ff, transparent),
    radial-gradient(1.2px 1.2px at 49% 50%, #fff, transparent),
    radial-gradient(1px 1px at 61% 64%, #dfe6ff, transparent),
    radial-gradient(1.4px 1.4px at 72% 48%, #fff, transparent),
    radial-gradient(1px 1px at 83% 58%, #cdd8ff, transparent),
    radial-gradient(1.2px 1.2px at 94% 40%, #fff, transparent),
    radial-gradient(1px 1px at 97% 66%, #dfe6ff, transparent);
  animation: twinkle 5s ease-in-out infinite alternate;
}
.mode-night .stars { opacity: .95; }
.mode-dusk .stars { opacity: .3; }
@keyframes twinkle { from { filter: brightness(.75); } to { filter: brightness(1.15); } }

.sun {
  position: absolute; left: 26%; bottom: 4%;
  width: 12vw; height: 12vw; min-width: 110px; min-height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6d8 0%, #ffd98a 34%, rgba(255,170,90,.55) 60%, transparent 72%);
  filter: blur(1px);
  box-shadow: 0 0 90px 50px rgba(255,170,90,.35);
  opacity: 0; transition: opacity 2.2s ease;
}
.mode-morning .sun { opacity: 1; }

.moon {
  position: absolute; right: 20%; top: 34%;
  width: 4.4vw; height: 4.4vw; min-width: 44px; min-height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fdfbf2 0%, #d9d7ce 55%, #b9b7ae 100%);
  box-shadow: 0 0 40px 12px rgba(220,225,255,.28), inset -9px -7px 16px rgba(120,120,140,.5);
  opacity: 0; transition: opacity 2.2s ease;
}
.mode-night .moon { opacity: 1; }

/* --- road canvas --- */

#worldLayer {
  inset: -12% -12% 20% -12%;
  transform: translate(calc(var(--px) * -64px), calc(var(--py) * -29px));
}
#road {
  position: absolute; inset: 0; width: 100%; height: 100%;
  filter: saturate(1.06) contrast(1.03);
  transition: filter 1.6s ease;
}
.mode-night #road { filter: brightness(1.1) saturate(1.18) contrast(1.06); }
#app[data-scene='city'].mode-night #road {
  filter: brightness(1.22) saturate(1.3) contrast(1.08);
}
#app[data-scene='coast'] #road { filter: saturate(1.18) contrast(1.04); }
#app[data-scene='desert'] #road { filter: saturate(1.16) contrast(1.05); }

/* --- cabin: hood, glass, pillars, roof, mirror --- */

#cabinLayer {
  transform: translate(calc(var(--px) * -25px), calc(var(--py) * -12px));
}

#hood {
  position: absolute; left: -6%; right: -6%; top: 47.5vh; height: 12vh;
  border-radius: 48% 48% 0 0 / 90% 90% 0 0;
  background:
    linear-gradient(to bottom, #a8916b 0%, #8a744e 26%, #5c4c33 70%, #3a3022 100%);
  box-shadow: inset 0 6px 18px rgba(255,240,200,.25), inset 0 -10px 24px rgba(0,0,0,.55);
}
#hood::after {
  content: ""; position: absolute; left: 24%; right: 24%; top: 12%;
  height: 34%; border-radius: 50%;
  background: linear-gradient(to bottom, rgba(255,250,230,.28), transparent);
  filter: blur(6px);
}
.mode-night #hood { filter: brightness(.5) saturate(.8); }
.mode-dusk #hood { filter: brightness(.72); }
#hood { transition: filter 2s ease; }

#glass {
  position: absolute; left: 0; right: 0; top: 0; height: 56vh;
  background:
    linear-gradient(115deg, transparent 32%, rgba(255,255,255,.045) 40%, transparent 47%,
      transparent 60%, rgba(255,255,255,.03) 67%, transparent 74%),
    linear-gradient(to bottom, rgba(20,20,40,.16), transparent 30%);
  pointer-events: none;
  overflow: hidden;
}
#glass::before {
  content: ""; position: absolute; inset: -12%;
  background:
    radial-gradient(42% 28% at calc(32% + var(--px) * 9%) calc(12% + var(--py) * 5%), rgba(255,255,255,.085), transparent 72%),
    linear-gradient(108deg, transparent 29%, rgba(255,255,255,.055) 38%, transparent 47%);
  transform: translate(calc(var(--px) * -20px), calc(var(--py) * -10px));
  mix-blend-mode: screen;
  opacity: .72;
}
#glass::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(103deg, transparent 0 46px, rgba(255,255,255,.012) 47px, transparent 49px);
  opacity: .42;
}

.pillar {
  position: absolute; top: -4vh; height: 66vh; width: 16vw;
  background:
    repeating-linear-gradient(88deg, rgba(255,255,255,.018) 0 1px, transparent 1px 5px),
    linear-gradient(to bottom, var(--d3), var(--d2) 60%, var(--d1));
  pointer-events: none;
}
.pillar.left {
  left: -6.5vw;
  clip-path: polygon(0 0, 58% 0, 100% 100%, 0 100%);
  box-shadow: inset -14px 0 22px -10px rgba(0,0,0,.8);
}
.pillar.right {
  right: -6.5vw;
  clip-path: polygon(42% 0, 100% 0, 100% 100%, 0 100%);
  box-shadow: inset 14px 0 22px -10px rgba(0,0,0,.8);
}

#roof {
  position: absolute; left: -2%; right: -2%; top: -2vh; height: 9.5vh;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background:
    repeating-linear-gradient(92deg, transparent 0 5px, rgba(255,255,255,.018) 5px 6px),
    linear-gradient(to bottom, var(--d3), var(--d2) 70%, var(--d1));
  box-shadow: 0 8px 26px -6px rgba(0,0,0,.85);
  pointer-events: none;
}

#mirror {
  position: absolute; left: 50%; top: 5.2vh; transform: translateX(-50%);
  width: 17vw; min-width: 170px; height: 6vh; min-height: 44px;
  background: linear-gradient(145deg, var(--d1), var(--d3));
  border-radius: 10px;
  padding: 5px;
  border: 1px solid rgba(255,235,200,.08);
  box-shadow: 0 12px 30px rgba(0,0,0,.68), inset 0 1px rgba(255,255,255,.055);
  pointer-events: none;
}
#mirror::before {
  content: ""; position: absolute; top: -2.2vh; left: 50%;
  width: 14px; height: 2.6vh; transform: translateX(-50%);
  background: #17120e; border-radius: 4px;
}
.mglass {
  width: 100%; height: 100%; border-radius: 7px;
  background: linear-gradient(to bottom, #3d3550 0%, #6e4a58 70%, #a06a58 100%);
  opacity: .9; transition: background 2.2s ease, filter 2.2s ease;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.2);
}
.mode-night .mglass { background: linear-gradient(to bottom, #0a0e1e 0%, #17203c 80%, #2a3050 100%); }
.mode-morning .mglass { background: linear-gradient(to bottom, #5a6488 0%, #cf7a6c 70%, #ffb166 100%); }

/* --- dashboard --- */

#dashLayer {
  transform: translate(calc(var(--px) * 12px), calc(var(--py) * 6px));
}

#dash {
  position: absolute; left: -3%; right: -3%; top: 51.5vh; bottom: -3vh;
  background:
    radial-gradient(70% 32% at calc(52% + var(--px) * 5%) 0%, rgba(255,235,205,.075), transparent 70%),
    repeating-linear-gradient(92deg, rgba(255,255,255,.014) 0 1px, transparent 1px 6px),
    linear-gradient(to bottom, var(--d1) 0%, var(--d2) 34%, var(--d3) 100%);
  border-radius: 46% 46% 0 0 / 9% 9% 0 0;
  box-shadow: 0 -10px 36px rgba(0,0,0,.68), inset 0 1px rgba(255,240,215,.055);
}
#dashTop {
  position: absolute; left: 0; right: 0; top: 0; height: 5.4vh;
  border-radius: 46% 46% 0 0 / 60% 60% 0 0;
  background: linear-gradient(to bottom, var(--dtop), var(--d1) 80%);
  box-shadow: inset 0 3px 6px rgba(255,220,180,.08);
}
#woodBand {
  position: absolute; left: 4%; right: 4%; top: 6.2vh; height: 5.6vh;
  border-radius: 18px;
  background:
    repeating-linear-gradient(94deg,
      rgba(0,0,0,.12) 0 2px, transparent 2px 7px, rgba(255,235,190,.05) 7px 9px, transparent 9px 14px),
    linear-gradient(100deg, var(--w1) 0%, var(--w2) 22%, var(--w3) 45%, var(--w4) 68%, var(--w5) 100%);
  box-shadow:
    inset 0 2px 3px rgba(255,240,200,.25),
    inset 0 -3px 6px rgba(0,0,0,.5),
    0 4px 12px rgba(0,0,0,.46),
    0 1px rgba(255,236,195,.12);
}
.mode-night #dash { filter: brightness(.82); }
#dash { transition: filter 2s ease; }

/* modern trim materials replace the wood grain */

#app.int-sport #woodBand {
  background:
    linear-gradient(118deg, rgba(255,255,255,.06), transparent 30%),
    repeating-linear-gradient(45deg, #1a1b20 0 4px, #23252e 4px 8px),
    repeating-linear-gradient(-45deg, rgba(140,170,220,.06) 0 2px, transparent 2px 8px),
    #1c1e24;
  border: 1px solid #2e3138;
  box-shadow:
    inset 0 2px 3px rgba(160,190,235,.12),
    inset 0 -3px 6px rgba(0,0,0,.6),
    0 4px 12px rgba(0,0,0,.46);
}
#app.int-sport #woodBand::after {
  content: ""; position: absolute; right: 12px; top: 24%; bottom: 24%; width: 20px;
  background: linear-gradient(90deg, #6ea8dc 0 33%, #274b8f 33% 66%, #c23a3a 66%);
  border-radius: 2px; opacity: .85;
}
#app.int-tech #woodBand {
  background:
    linear-gradient(to bottom, rgba(255,255,255,.28), rgba(255,255,255,0) 34%, rgba(0,0,0,.22) 82%),
    repeating-linear-gradient(90deg, #9aa0aa 0 1px, #7e848e 1px 2px, #8d939d 2px 3px);
  border: 1px solid #4a4e58;
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,.35),
    inset 0 -3px 6px rgba(0,0,0,.35),
    0 4px 12px rgba(0,0,0,.46);
}
#app.int-tech #woodBand::after {
  content: ""; position: absolute; left: 12px; top: 26%; bottom: 26%; width: 4px;
  background: #c23a44; border-radius: 2px; opacity: .9;
}
#app.int-lux #woodBand {
  background:
    linear-gradient(100deg, #0c0b0d 0%, #2c282e 26%, #121013 52%, #2e2a30 78%, #0e0d0f 100%);
  border: 1px solid #3a3236;
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,.14),
    inset 0 -3px 6px rgba(0,0,0,.65),
    0 4px 12px rgba(0,0,0,.5);
}
#app.int-lux #woodBand::after {
  content: ""; position: absolute; left: 6%; right: 6%; bottom: 4px; height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(205,150,95,.75), transparent);
  border-radius: 2px;
}

/* --- ambient LED strips --- */

#ambientWood {
  position: absolute; left: 4.5%; right: 4.5%;
  top: calc(6.2vh + 5.6vh + 4px);
  height: 2.5px; border-radius: 3px;
  background: linear-gradient(90deg,
    transparent, rgba(var(--ambient-rgb), .95) 10%,
    rgba(var(--ambient-rgb), .95) 90%, transparent);
  filter: drop-shadow(0 0 5px rgb(var(--ambient-rgb))) drop-shadow(0 0 16px rgba(var(--ambient-rgb), .55));
  animation: ambBreathe 5.2s ease-in-out infinite;
  pointer-events: none;
}
.ambient-door {
  position: absolute; width: 2.5px; top: 7vh; height: 32vh;
  border-radius: 3px;
  background: linear-gradient(to bottom,
    rgba(var(--ambient-rgb), .9), rgba(var(--ambient-rgb), .28) 78%, transparent);
  filter: drop-shadow(0 0 5px rgb(var(--ambient-rgb))) drop-shadow(0 0 14px rgba(var(--ambient-rgb), .5));
  animation: ambBreathe 5.2s ease-in-out infinite;
  animation-delay: 1.2s;
  pointer-events: none;
}
#ambientDoorL { left: 1.1%; transform: rotate(7deg); transform-origin: top; }
#ambientDoorR { right: 1.1%; transform: rotate(-7deg); transform-origin: top; }
#ambientFoot {
  position: absolute; left: 0; right: 0; bottom: -2vh; height: 15vh;
  background:
    radial-gradient(30% 90% at 21% 100%, rgba(var(--ambient-rgb), .22), transparent 70%),
    radial-gradient(30% 90% at 79% 100%, rgba(var(--ambient-rgb), .22), transparent 70%);
  filter: blur(7px);
  animation: ambBreathe 5.2s ease-in-out infinite;
  animation-delay: 2.4s;
  pointer-events: none;
}
@keyframes ambBreathe {
  0%, 100% { opacity: .78; }
  50% { opacity: 1; }
}
#app:not(.amb-off) #stack { border-color: rgba(var(--ambient-rgb), .32); }
#app.amb-off #ambientWood,
#app.amb-off .ambient-door,
#app.amb-off #ambientFoot { display: none; }

/* instrument cluster */

#binnacle {
  position: absolute; left: 5vw; top: 4.6vh;
  width: 30vw; height: 21vh;
  background: radial-gradient(120% 130% at 50% 0%, var(--d1) 0%, var(--d3) 58%, #0b0805 100%);
  border-radius: 46% 46% 34% 34% / 70% 70% 26% 26%;
  box-shadow:
    inset 0 -8px 18px rgba(0,0,0,.7),
    inset 0 4px 6px rgba(255,225,180,.06),
    0 14px 30px rgba(0,0,0,.62),
    0 0 0 1px rgba(255,235,200,.035);
  overflow: hidden;
}
#clusterMount { position: absolute; inset: 5% 3% 2% 3%; }
#clusterMount svg { width: 100%; height: 100%; }

/* center stack */

#stack {
  position: absolute; left: 50%; top: 2.2vh; transform: translateX(-50%);
  width: clamp(300px, 25vw, 360px);
  padding: 8px 10px 10px;
  background:
    linear-gradient(118deg, rgba(255,255,255,.03), transparent 24%),
    linear-gradient(to bottom, var(--d3), var(--d2) 12%, var(--d2) 88%, var(--d3));
  border: 1px solid rgba(var(--ring), .42);
  border-radius: 16px;
  box-shadow:
    0 0 0 4px rgba(var(--ring), .42),
    0 0 0 5px rgba(0,0,0,.62),
    0 20px 48px rgba(0,0,0,.76),
    inset 0 1px rgba(255,240,215,.055);
  z-index: 3;
}

#ventRow {
  display: flex; align-items: stretch; gap: 8px; margin-bottom: 7px; height: 26px;
}
.vent {
  flex: 1; border-radius: 6px; background: #0b0805;
  border: 1px solid #2c2115;
  display: flex; flex-direction: column; justify-content: space-evenly; padding: 3px 6px;
}
.vent i { display: block; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #241a10, #3a2c1c 50%, #241a10); }

#cdslot {
  position: relative; flex: 2.2;
  border-radius: 7px;
  background: linear-gradient(to bottom, #060402, #171009 45%, #060402);
  border: 1px solid #33261731;
  box-shadow: inset 0 0 8px rgba(0,0,0,.9), 0 1px 0 rgba(255,220,170,.06);
  display: flex; align-items: center; justify-content: center;
}
#cdslot .slit {
  width: 78%; height: 4px; border-radius: 3px;
  background: linear-gradient(to bottom, #000, #0e0c0a);
  box-shadow: inset 0 1px 3px #000, 0 1px 1px rgba(255,220,170,.08);
  transition: box-shadow .3s ease;
}
#cdslot .slot-tag {
  position: absolute; bottom: 1px; right: 7px;
  font-size: 6.5px; letter-spacing: .22em; color: #6d5535;
}
#slotLed {
  position: absolute; left: 7px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: #3a2b18; transition: all .3s ease;
}
#app.disc-in #slotLed { background: var(--amber); box-shadow: 0 0 8px 2px rgba(var(--glow-rgb),.55); }
#app.drag-live #cdslot .slit {
  box-shadow: inset 0 1px 3px #000, 0 0 14px 3px rgba(var(--glow-rgb),.5);
}
#app.drag-live #cdslot { border-color: var(--amber-dim); }

/* head unit screen */

#headunit { position: relative; }

#screenWrap {
  position: relative; width: 100%; aspect-ratio: 16 / 9.4;
  background: #000; border-radius: 8px; overflow: hidden;
  border: 1px solid #060403;
  box-shadow: inset 0 0 0 1px rgba(255,200,140,.05), inset 0 0 24px rgba(0,0,0,.8);
}
#ytMount { position: absolute; inset: 0 0 27% 0; background: #000; pointer-events: none; }
#ytMount iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* the screen face fully covers the video: audio only, lyrics on top */

#screenFace {
  position: absolute; inset: 0 0 27% 0; z-index: 4;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, rgba(255,190,110,.015) 0 2px, transparent 2px 4px),
    radial-gradient(130% 130% at 50% 0%, #191009 0%, #0b0705 58%, #050302 100%);
}

#lyrScroll {
  position: absolute; left: 7%; right: 7%; top: 0; bottom: 0;
  overflow: hidden; display: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 76%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 76%, transparent 100%);
}
#screenFace.has-lyrics #lyrScroll { display: block; }
#screenFace.has-lyrics #faceIdle { display: none; }
#lyrInner {
  transition: transform .55s cubic-bezier(.3, 0, .2, 1);
  padding: 45% 0;
}
#screenFace.lyr-plain #lyrInner { transition: transform .3s linear; }
.lyr-line {
  padding: 2.5px 0;
  font-size: 12.5px; line-height: 1.35; text-align: center;
  color: #6d5a3f; opacity: .55;
  transition: color .4s ease, opacity .4s ease, transform .4s ease;
}
.lyr-line.cur {
  color: var(--lcd-ink); opacity: 1; font-weight: 600;
  text-shadow: 0 0 12px rgba(var(--glow-rgb),.4);
  transform: scale(1.05);
}
#screenFace.lyr-plain .lyr-line { opacity: .8; font-size: 11.5px; }

#faceIdle {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px;
}
.mini-disc {
  width: 46px; height: 46px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #171310 0 15%, rgba(255,255,255,.55) 16% 22%, transparent 23%),
    conic-gradient(from 210deg,
      #cfd4d8 0deg, #e8d9e2 40deg, #cfe0d4 90deg, #dcd8e8 140deg,
      #e6ded0 190deg, #cdd8e0 240deg, #e2d6da 300deg, #cfd4d8 360deg);
  box-shadow: 0 3px 10px rgba(0,0,0,.6), inset 0 1px 1px rgba(255,255,255,.6);
  animation: discspin 2.8s linear infinite;
  animation-play-state: paused;
  opacity: .9;
}
#app.is-playing .mini-disc { animation-play-state: running; }
@keyframes discspin { to { transform: rotate(360deg); } }

.face-title {
  max-width: 86%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13.5px; font-weight: 600; color: var(--lcd-ink);
  text-shadow: 0 0 12px rgba(var(--glow-rgb),.35);
}
.face-sub {
  max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10.5px; color: #8a6d47; letter-spacing: .08em;
}
.eq { display: flex; gap: 3px; align-items: flex-end; height: 22px; margin-top: 3px; }
.eq i {
  width: 4px; height: 22%; border-radius: 2px;
  background: linear-gradient(to top, #8a5e2e, var(--amber));
  animation: eqb 720ms ease-in-out infinite alternate;
  animation-play-state: paused;
}
#app.is-playing .eq i { animation-play-state: running; }
.eq i:nth-child(2n)  { animation-duration: 580ms; animation-delay: 120ms; }
.eq i:nth-child(3n)  { animation-duration: 840ms; animation-delay: 60ms; }
.eq i:nth-child(4n)  { animation-duration: 660ms; animation-delay: 200ms; }
.eq i:nth-child(5n)  { animation-duration: 900ms; animation-delay: 40ms; }
@keyframes eqb { from { height: 14%; } to { height: 100%; } }

#screenOff {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background:
    repeating-linear-gradient(0deg, rgba(255,190,110,.016) 0 2px, transparent 2px 4px),
    radial-gradient(90% 90% at 50% 40%, #17100a 0%, #0a0705 70%, #050302 100%);
  transition: opacity .6s ease, visibility .6s;
}
#screenOff .so-big {
  font-family: Consolas, monospace; font-size: 21px; letter-spacing: .34em;
  color: var(--lcd-ink); text-shadow: 0 0 14px rgba(var(--glow-rgb),.5);
  animation: pulse 3.2s ease-in-out infinite;
}
#screenOff .so-small { font-size: 10px; letter-spacing: .3em; color: #7d6142; text-transform: uppercase; }
#app.disc-in #screenOff { opacity: 0; visibility: hidden; }

#clickzones { position: absolute; inset: 0 0 27% 0; z-index: 6; display: flex; }
.cz { flex: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cz span {
  font-size: 17px; color: #fff; opacity: 0;
  text-shadow: 0 1px 8px rgba(0,0,0,.9);
  transition: opacity .18s ease; pointer-events: none;
}
#app.disc-in .cz:hover span { opacity: .75; }
.cz[data-z="toggle"] { flex: 1.3; }

#osd {
  position: absolute; left: 50%; top: 34%; z-index: 7;
  transform: translate(-50%, -50%);
  font-size: 30px; color: #fff; opacity: 0; pointer-events: none;
  text-shadow: 0 2px 14px rgba(0,0,0,.9);
}
#osd.flash { animation: osd .7s ease forwards; }
@keyframes osd {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.7); }
  18% { opacity: .95; transform: translate(-50%, -50%) scale(1); }
  70% { opacity: .95; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.12); }
}

#nowbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 27%;
  z-index: 6;
  background: linear-gradient(to bottom, #17100a, #0c0805);
  border-top: 1px solid #33241457;
  padding: 4px 10px 5px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.np-line {
  display: flex; align-items: baseline; gap: 8px; overflow: hidden; white-space: nowrap;
}
#npTitle {
  font-size: 13px; font-weight: 600; color: var(--lcd-ink);
  text-shadow: 0 0 10px rgba(var(--glow-rgb),.35);
  overflow: hidden; text-overflow: ellipsis; max-width: 68%;
}
#npArtist {
  font-size: 10.5px; color: #96794f; overflow: hidden; text-overflow: ellipsis; flex: 1;
}
#progress {
  position: relative; height: 12px; display: flex; align-items: center; cursor: pointer;
}
#progress::before {
  content: ""; position: absolute; left: 0; right: 0; height: 3px; border-radius: 2px;
  background: #33261a;
}
#progFill {
  position: absolute; left: 0; width: 0%; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--amber-dim), var(--amber));
  box-shadow: 0 0 8px rgba(var(--glow-rgb),.5);
}
#progDot {
  position: absolute; left: 0; width: 7px; height: 7px; border-radius: 50%;
  background: #ffd9a8; transform: translateX(-50%);
  box-shadow: 0 0 6px rgba(var(--glow-rgb),.8);
}
.np-times {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: Consolas, monospace; font-size: 9.5px; color: #8a6d47;
}
#discName { font-size: 8.5px; letter-spacing: .26em; color: #6d5535; text-transform: uppercase; }

/* next bar */

#nextbar {
  margin-top: 6px; height: 20px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 9px;
  background: var(--lcd-bg);
  border: 1px solid #33241457; border-radius: 5px;
  cursor: pointer; overflow: hidden; white-space: nowrap;
  box-shadow: inset 0 1px 4px rgba(0,0,0,.7);
}
#nextbar:hover { border-color: #5c432a; }
.nb-label { font-size: 8.5px; letter-spacing: .2em; color: #8a6236; flex-shrink: 0; }
#nextTitle {
  font-family: Consolas, monospace; font-size: 11px; color: var(--lcd-ink);
  overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 0 8px rgba(var(--glow-rgb),.3);
}

/* buttons + knobs */

#unitBtns {
  margin-top: 7px;
  display: flex; align-items: center; justify-content: space-between; gap: 5px;
}
.hbtn {
  flex: 1; height: 27px;
  background: linear-gradient(to bottom, #2c2118, #17100a 60%, #100b07);
  border: 1px solid #000; border-radius: 6px;
  box-shadow: 0 1px 0 rgba(255,220,170,.09), inset 0 1px 1px rgba(255,235,200,.12);
  display: flex; align-items: center; justify-content: center;
  color: #c99b5e;
  transition: color .15s ease, box-shadow .15s ease, transform .06s ease;
}
.hbtn svg { width: 15px; height: 15px; fill: currentColor; }
.hbtn:hover { color: var(--amber); box-shadow: 0 1px 0 rgba(255,220,170,.09), inset 0 1px 1px rgba(255,235,200,.12), 0 0 10px rgba(var(--glow-rgb),.22); }
.hbtn:active { transform: translateY(1px); }
.hbtn.wide { flex: 1.35; }
.ic-pause { display: none; }
#app.is-playing .ic-pause { display: block; }
#app.is-playing .ic-play { display: none; }

.knob {
  position: relative; width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: ns-resize;
}
.knob .cap {
  width: 30px; height: 30px; border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, var(--leather1) 0%, var(--leather2) 55%, var(--leather3) 100%);
  border: 1px solid #000;
  box-shadow: 0 2px 5px rgba(0,0,0,.7), inset 0 1px 2px rgba(255,235,200,.14);
  display: flex; align-items: flex-start; justify-content: center;
  transition: box-shadow .2s ease;
}
.knob:hover .cap { box-shadow: 0 2px 5px rgba(0,0,0,.7), inset 0 1px 2px rgba(255,235,200,.14), 0 0 12px rgba(var(--glow-rgb),.25); }
.knob .cap i {
  display: block; width: 2.5px; height: 9px; margin-top: 3px; border-radius: 2px;
  background: var(--amber);
  box-shadow: 0 0 5px rgba(var(--glow-rgb),.7);
}
.knob .klabel {
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  font-size: 7px; letter-spacing: .22em; color: #7d6142;
}

/* climate strip */

#climate {
  margin-top: 8px; height: 25px;
  display: flex; align-items: center; justify-content: center;
}
#lcd {
  min-width: 62%; height: 100%;
  background: var(--lcd-bg);
  border: 1px solid #060403; border-radius: 6px;
  box-shadow: inset 0 1px 5px rgba(0,0,0,.8), 0 1px 0 rgba(255,220,170,.06);
  display: flex; align-items: center; justify-content: space-evenly;
  font-family: Consolas, monospace; font-size: 12px; color: var(--lcd-ink);
  text-shadow: 0 0 9px rgba(var(--glow-rgb),.4);
}
#lcd .lcd-dim { font-size: 9px; color: #8a6236; letter-spacing: .18em; }

/* --- CD tray --- */

#tray {
  position: absolute; right: 1.2vw; top: 8.2vh;
  width: 25vw; min-width: 276px; height: 20vh;
}
.tray-mat {
  position: absolute; inset: 6% -3% -6% -3%;
  border-radius: 16px;
  background:
    radial-gradient(120% 100% at 50% 0%, var(--mat1) 0%, var(--mat2) 70%);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.6), inset 0 -1px 2px rgba(255,225,180,.05);
}
.tray-mat::after {
  content: "your mixes"; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  font-family: "Segoe Print", "Comic Sans MS", cursive;
  font-size: 10px; color: #6d5947; white-space: nowrap;
}

.disc {
  position: absolute; top: 12%;
  width: clamp(78px, 8vw, 108px); height: clamp(78px, 8vw, 108px);
  cursor: grab; touch-action: none;
}
.disc[data-disc="night"]   { left: 2%;  transform: rotate(-7deg); }
.disc[data-disc="morning"] { left: 34%; top: 18%; transform: rotate(4deg); }
.disc[data-disc="all"]     { left: 66%; transform: rotate(10deg); }
.disc.loaded { display: none; }
.disc.drag-src { visibility: hidden; }

.disc-face {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 13%, #d8d5cf 13.5% 17%, transparent 17.5%),
    conic-gradient(from 210deg,
      #cfd4d8 0deg, #e8d9e2 40deg, #cfe0d4 90deg, #dcd8e8 140deg,
      #e6ded0 190deg, #cdd8e0 240deg, #e2d6da 300deg, #cfd4d8 360deg);
  box-shadow:
    0 5px 14px rgba(0,0,0,.55),
    inset 0 1px 2px rgba(255,255,255,.7),
    inset 0 -2px 5px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.disc-face::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 19%; height: 19%; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #171310;
  box-shadow: 0 0 0 4px rgba(255,255,255,.55), inset 0 1px 3px #000;
}
.disc-face::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0deg, rgba(255,255,255,.5) 24deg, transparent 60deg,
    transparent 160deg, rgba(255,255,255,.35) 200deg, transparent 250deg, transparent 360deg);
  mix-blend-mode: soft-light;
}
.disc:hover .disc-face { transform: scale(1.06); box-shadow: 0 9px 20px rgba(0,0,0,.6), inset 0 1px 2px rgba(255,255,255,.7); }
.disc:focus-visible { outline: none; }
.disc:focus-visible .disc-face {
  transform: scale(1.06);
  box-shadow: 0 0 0 3px var(--amber), 0 9px 20px rgba(0,0,0,.6), inset 0 1px 2px rgba(255,255,255,.7);
}
.disc-ink {
  position: relative; z-index: 2;
  font-family: "Segoe Print", "Comic Sans MS", cursive;
  font-size: clamp(10px, 1vw, 13px); line-height: 1.25;
  color: #2b2b33; text-align: center;
  transform: translateY(-88%);
}

/* drag ghost */

.disc.ghost {
  position: fixed; left: 0; top: 0; margin: 0; z-index: 80;
  cursor: grabbing; pointer-events: none;
  visibility: visible;
}
.disc.ghost .disc-face { box-shadow: 0 22px 44px rgba(0,0,0,.65), inset 0 1px 2px rgba(255,255,255,.7); }

/* --- steering wheel --- */

#wheelLayer {
  transform: translate(calc(var(--px) * 31px), calc(var(--py) * 16px));
}
#wheel {
  position: absolute; left: 20vw; bottom: -19vw;
  width: 38vw; height: 38vw; max-width: 560px; max-height: 560px;
  transform: translateX(-50%);
  animation: wheelsway 9s ease-in-out infinite;
}
@media (max-width: 1400px) { #wheel { bottom: max(-19vw, -280px); } }
@keyframes wheelsway {
  0%, 100% { rotate: -1.2deg; } 50% { rotate: 1.4deg; }
}
#wheel .rim {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    conic-gradient(from -32deg,
      var(--rimbase) 0deg 24deg,
      var(--rimw1) 40deg, var(--rimw2) 70deg, var(--rimw3) 105deg, var(--rimw4) 140deg,
      var(--rimbase) 156deg 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent 0 79%, #000 80%);
  mask: radial-gradient(farthest-side, transparent 0 79%, #000 80%);
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.64));
}
#wheel .rim::before {
  content: ""; position: absolute; inset: 3.4%; border-radius: 50%;
  background: repeating-conic-gradient(from 1deg, transparent 0 4deg, rgba(230,195,145,.34) 4deg 4.8deg, transparent 4.8deg 8deg);
  -webkit-mask: radial-gradient(farthest-side, transparent 0 82.5%, #000 83% 85%, transparent 85.5%);
  mask: radial-gradient(farthest-side, transparent 0 82.5%, #000 83% 85%, transparent 85.5%);
  opacity: .5;
}
#wheel .rim::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(to bottom, rgba(255,240,210,.16), transparent 40%);
  -webkit-mask: radial-gradient(farthest-side, transparent 0 79%, #000 80%);
  mask: radial-gradient(farthest-side, transparent 0 79%, #000 80%);
}
#wheel .spoke {
  position: absolute; left: 50%; top: 50%;
  width: 42%; height: 7.5%;
  background: linear-gradient(to bottom, var(--leather1), var(--leather2) 70%);
  border-radius: 8px;
  transform-origin: 0 50%;
  border: 1px solid rgba(255,240,210,.045);
  box-shadow: 0 4px 10px rgba(0,0,0,.58), inset 0 1px rgba(255,240,215,.05);
}
#wheel .s1 { transform: rotate(170deg); }
#wheel .s2 { transform: rotate(10deg); }
#wheel .s3 { transform: rotate(90deg); width: 40%; }
#wheel .hub {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 34%; height: 26%;
  border-radius: 46%;
  background:
    radial-gradient(circle at 42% 30%, rgba(255,240,220,.08), transparent 28%),
    radial-gradient(circle at 42% 32%, var(--leather1) 0%, var(--leather2) 60%, var(--leather3) 100%);
  border: 1px solid rgba(255,235,200,.055);
  box-shadow: 0 9px 24px rgba(0,0,0,.68), inset 0 1px 2px rgba(255,235,200,.11), inset 0 -8px 15px rgba(0,0,0,.18);
}
#wheel .hub::before, #wheel .hub::after { content: none !important; }

/* --- riders --- */

#peopleLayer {
  transform: translate(calc(var(--px) * 7px), calc(var(--py) * 4px));
}

.person {
  position: absolute; width: 20vw; min-width: 190px;
  transition: opacity 1.2s ease;
  pointer-events: none;
}
.person.off { opacity: 0; }
.person svg {
  width: 100%; height: auto;
  animation: bob 1.5s ease-in-out infinite alternate;
  transform-origin: 50% 92%;
}
#app.is-playing .person svg { animation-duration: .64s; }
@keyframes bob {
  from { transform: translateY(0) rotate(-.6deg); }
  to   { transform: translateY(3.5px) rotate(.8deg); }
}
/* seated right beside you: sized against viewport height so the face
   always lands above the dash line (head sits near 38vh) */
#passenger { right: -3vw; top: 11vh; width: clamp(280px, 46vh, 40vw); }
#driverChar { left: 2vw; top: 12vh; width: clamp(260px, 42vh, 36vw); transform: scaleX(-1); }
#driverChar.off { transform: scaleX(-1); }

/* exit drive button, under the presence pill */
#exitBtn {
  position: absolute; left: 2.5vw; top: 8.8vh; z-index: 36;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 18px;
  background: rgba(14, 10, 6, .92);
  border: 1px solid #4a3a26;
  color: #d89b8a; font-size: 11px; letter-spacing: .08em;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  transition: color .15s ease, border-color .15s ease;
}
#exitBtn svg { width: 13px; height: 13px; fill: currentColor; }
#exitBtn:hover { color: #ff9b7a; border-color: #6d4535; }
#exitBtn.hidden { display: none; }

/* --- presence pill --- */

/* push-to-talk */

#micBtn {
  position: absolute; left: 2.5vw; bottom: 3.5vh; z-index: 46;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 22px;
  background: rgba(14, 10, 6, .92);
  border: 1px solid #4a3a26;
  color: #e8cfa5; font-size: 11.5px; letter-spacing: .08em;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  cursor: pointer; touch-action: none;
}
#micBtn.hidden { display: none; }
#micBtn svg { width: 15px; height: 15px; fill: currentColor; }
#micBtn kbd {
  font-family: Consolas, monospace; font-size: 9.5px;
  padding: 1px 5px; border-radius: 4px;
  border: 1px solid #4a3a26; color: #8a6d47;
}
#micBtn:hover { color: var(--amber); border-color: #6d5535; }
#micBtn.live {
  color: color-mix(in srgb, rgb(var(--glow-rgb)) 60%, #fff);
  border-color: var(--amber-dim);
  background: rgba(var(--glow-rgb), .18);
  animation: micpulse 1.1s ease-in-out infinite;
}
#micBtn.live kbd { color: inherit; border-color: var(--amber-dim); }
@keyframes micpulse {
  0%, 100% { box-shadow: 0 0 10px rgba(var(--glow-rgb), .3), 0 8px 24px rgba(0,0,0,.5); }
  50% { box-shadow: 0 0 26px rgba(var(--glow-rgb), .6), 0 8px 24px rgba(0,0,0,.5); }
}

#talkPill {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 3.8vh; z-index: 46;
  padding: 7px 15px; border-radius: 18px;
  background: rgba(14, 10, 6, .92);
  border: 1px solid var(--amber-dim);
  color: var(--lcd-ink); font-size: 11.5px; letter-spacing: .06em;
  box-shadow: 0 0 16px rgba(var(--glow-rgb), .3);
  pointer-events: none;
}
#talkPill.hidden { display: none; }
#voiceOut { display: none; }

#micModal {
  position: fixed; inset: 0; z-index: 55;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 4, 8, .6);
  backdrop-filter: blur(3px);
}
#micModal.hidden { display: none; }
.mic-card {
  width: min(92vw, 370px);
  background: rgba(14, 10, 6, .97);
  border: 1px solid #4a3a26; border-radius: 14px;
  padding: 22px 22px 18px;
  text-align: center; color: #c9baa5;
  box-shadow: 0 24px 60px rgba(0,0,0,.7), 0 0 0 4px rgba(var(--ring), .25);
}
.mic-card svg { width: 30px; height: 30px; fill: var(--amber); margin-bottom: 8px; }
.mic-card h3 { font-size: 15px; color: var(--lcd-ink); letter-spacing: .06em; margin-bottom: 8px; }
.mic-card p { font-size: 12px; line-height: 1.55; color: #a08d74; }
.mic-status { min-height: 1em; margin-top: 8px; color: #e0a35a; font-size: 11.5px; }
.mic-status:empty { margin-top: 0; }
.mic-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
#micAllow {
  padding: 8px 18px; border-radius: 18px;
  background: rgba(var(--glow-rgb), .15); border: 1px solid var(--amber-dim);
  color: var(--lcd-ink); font-size: 12.5px; letter-spacing: .05em;
}
#micAllow:hover { background: rgba(var(--glow-rgb), .25); }
#micCancel {
  padding: 8px 14px; border-radius: 18px;
  background: none; border: 1px solid #3a2b18;
  color: #8a6d47; font-size: 12px;
}
#micCancel:hover { color: #c9baa5; }

#presencePill {
  position: absolute; left: 2.5vw; top: 3.4vh; z-index: 35;
  padding: 7px 15px;
  background: rgba(14, 10, 6, .92);
  border: 1px solid #4a3a26; border-radius: 20px;
  font-size: 11.5px; letter-spacing: .05em; color: #e8cfa5;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  transition: opacity .4s ease, visibility .4s;
  pointer-events: none;
}
#presencePill.hidden { opacity: 0; visibility: hidden; }
#presencePill b { color: var(--amber); font-weight: 600; letter-spacing: .16em; }

/* --- queue panel --- */

#queuePanel {
  position: absolute; right: 3vw; top: 5vh; z-index: 40;
  width: clamp(300px, 26vw, 380px); max-height: 44vh;
  display: flex; flex-direction: column;
  background: rgba(14, 10, 6, .93);
  border: 1px solid #4a3a26;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,.7), 0 0 0 4px rgba(122,79,38,.25);
  backdrop-filter: blur(6px);
  overflow: hidden;
  transition: opacity .28s ease, transform .28s ease, visibility .28s;
}
#queuePanel.hidden { opacity: 0; visibility: hidden; transform: translateY(10px); pointer-events: none; }
#queuePanel header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #33241457;
  background: linear-gradient(to bottom, #1d140c, #140d07);
}
.qp-cap { font-size: 10px; letter-spacing: .3em; color: #8a6236; text-transform: uppercase; }
.qp-cap span { color: var(--lcd-ink); }
#qClose {
  background: none; border: none; color: #8a6d47; font-size: 13px; padding: 2px 6px;
}
#qClose:hover { color: var(--amber); }

#qSearch {
  display: flex; gap: 6px; padding: 8px 10px;
  border-bottom: 1px solid #33241457;
  background: #120c07;
}
#searchInput {
  flex: 1; min-width: 0;
  background: var(--lcd-bg); border: 1px solid #3a2b18; border-radius: 6px;
  color: var(--lcd-ink); font-family: inherit; font-size: 12px;
  padding: 6px 10px; outline: none;
}
#searchInput::placeholder { color: #7d6142; }
#searchInput:focus { border-color: #6d4f2c; }
#searchGo {
  width: 34px; flex-shrink: 0;
  border-radius: 6px; border: 1px solid #3a2b18;
  background: #241809; color: var(--amber); font-size: 15px;
}
#searchGo:hover { background: #33220e; }

#qResults {
  list-style: none; overflow-y: auto; padding: 4px 0;
  border-bottom: 1px solid #33241457;
  max-height: 24vh; flex-shrink: 0;
  scrollbar-width: thin; scrollbar-color: #4a3a26 transparent;
}
#qResults.hidden { display: none; }
#qResults li {
  display: flex; flex-direction: column; gap: 1px;
  padding: 6px 14px; cursor: pointer;
}
#qResults li:hover { background: rgba(var(--glow-rgb),.08); }
#qResults .rt {
  font-size: 12.5px; color: #e8d5ae;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#qResults .rc { font-size: 10.5px; color: #8a6d47; }
#qResults li.searching, #qResults li.noresult {
  cursor: default; color: #8a6d47; font-size: 12px;
}
#qResults li.searching:hover, #qResults li.noresult:hover { background: none; }

#qList {
  list-style: none; overflow-y: auto; padding: 6px 0;
  scrollbar-width: thin; scrollbar-color: #4a3a26 transparent;
}
#qList li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 6px 14px; cursor: pointer;
  font-size: 12.5px; color: #c9baa5;
  border-left: 2px solid transparent;
}
#qList li:hover { background: rgba(var(--glow-rgb),.07); }
#qList li .qn {
  font-family: Consolas, monospace; font-size: 10px; color: #6d5535; width: 18px; flex-shrink: 0;
}
#qList li .qt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#qList li .qa { font-size: 10.5px; color: #7d6a55; margin-left: auto; padding-left: 8px; flex-shrink: 0; max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#qList li.current {
  color: var(--lcd-ink); background: rgba(var(--glow-rgb),.1);
  border-left-color: var(--amber);
}
#qList li.current .qn { color: var(--amber); }

/* --- hint, toast, vignette --- */

#dragHint {
  position: absolute; right: 3vw; top: 48.5vh; z-index: 30;
  padding: 8px 14px;
  background: rgba(20, 14, 8, .92);
  border: 1px solid #4a3a26; border-radius: 20px;
  font-family: "Segoe Print", "Comic Sans MS", cursive;
  font-size: 12.5px; color: #e8cfa5;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  animation: hintbob 2.2s ease-in-out infinite;
  transition: opacity .5s ease, visibility .5s;
  pointer-events: none;
}
#dragHint span { color: var(--amber); }
#dragHint.hidden { opacity: 0; visibility: hidden; }
@keyframes hintbob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

#lookHint {
  position: absolute; left: 50%; top: 16vh; z-index: 31;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 11px;
  padding: 10px 14px 10px 11px;
  background: rgba(14,10,7,.7);
  border: 1px solid rgba(232,207,165,.15); border-radius: 12px;
  color: #e5d5c0; box-shadow: 0 16px 38px rgba(0,0,0,.38), inset 0 1px rgba(255,255,255,.05);
  backdrop-filter: blur(14px);
  pointer-events: none;
  transition: opacity .35s ease, visibility .35s ease, transform .35s ease;
}
#lookHint.hidden { opacity: 0; visibility: hidden; transform: translate(-50%, 7px); }
#lookHint > span:last-child { display: flex; flex-direction: column; gap: 2px; }
#lookHint strong { font-size: 10px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
#lookHint small { color: #8e7c68; font-size: 9.5px; letter-spacing: .025em; }
.look-orbit {
  position: relative; width: 34px; height: 24px; flex: 0 0 auto;
  border: 1px solid #73583a; border-radius: 50%;
}
.look-orbit::before, .look-orbit::after {
  content: ""; position: absolute; top: 50%; width: 5px; height: 1px; background: #73583a;
}
.look-orbit::before { left: -5px; }
.look-orbit::after { right: -5px; }
.look-orbit i {
  position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 8px rgba(var(--glow-rgb), .7);
  animation: lookorbit 2.5s cubic-bezier(.45,0,.25,1) infinite;
}
@keyframes lookorbit {
  0%,100% { transform: translate(-13px,-50%); }
  50% { transform: translate(8px,-50%); }
}

#toast {
  /* above the start screen (z 60) so "they left" messages show after returning home */
  position: absolute; left: 50%; top: 8vh; transform: translateX(-50%); z-index: 70;
  padding: 9px 18px;
  background: rgba(14, 10, 6, .94);
  border: 1px solid #4a3a26; border-radius: 22px;
  font-size: 12.5px; color: #e8cfa5;
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
  transition: opacity .4s ease, visibility .4s;
  pointer-events: none; white-space: nowrap;
}
#toast.hidden { opacity: 0; visibility: hidden; }

#vignette {
  position: absolute; inset: 0; z-index: 45; pointer-events: none;
  background:
    repeating-linear-gradient(97deg, rgba(255,255,255,.007) 0 1px, transparent 1px 4px),
    radial-gradient(115% 100% at 50% 42%, transparent 54%, rgba(0,0,0,.52) 100%);
  mix-blend-mode: normal;
}

/* ---------- drive controls + settings panel ---------- */

.drive-controls {
  position: absolute; right: 2.5vw; top: 3.4vh; z-index: 36;
  display: flex; align-items: center; gap: 2px;
  padding: 4px;
  background: rgba(15, 11, 8, .68);
  border: 1px solid rgba(232, 207, 165, .14); border-radius: 13px;
  box-shadow: 0 14px 34px rgba(0,0,0,.38), inset 0 1px rgba(255,255,255,.055);
  backdrop-filter: blur(18px) saturate(1.15);
}
.drive-controls button {
  position: static;
  min-height: 31px; padding: 6px 12px;
  background: transparent;
  border: 0; border-radius: 8px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .09em; color: #d8c4a9;
  box-shadow: none;
  transition: color .2s ease, background .2s ease, transform .18s ease;
}
.drive-controls button:hover { color: var(--lcd-ink); background: rgba(var(--glow-rgb), .09); transform: translateY(-1px); }
.drive-controls button:active { transform: translateY(1px) scale(.98); }
#timeBtn { min-width: 82px; border-right: 1px solid rgba(232,207,165,.11); border-radius: 8px 3px 3px 8px; }
.control-icon { margin-right: 5px; color: var(--amber); filter: drop-shadow(0 0 5px rgba(var(--glow-rgb),.36)); }

#trimBtn {
  position: static;
}
#trimBtn:hover { color: var(--amber); border-color: #6d5535; }

#trimPanel {
  position: absolute; right: 2.5vw; top: 9vh; z-index: 41;
  width: clamp(286px, 23vw, 334px);
  background:
    radial-gradient(80% 55% at 100% 0%, rgba(var(--glow-rgb), .075), transparent 70%),
    rgba(15, 11, 7, .93);
  border: 1px solid rgba(218,177,124,.26); border-radius: 16px;
  box-shadow: 0 28px 72px rgba(0,0,0,.68), inset 0 1px rgba(255,255,255,.055), 0 0 0 4px rgba(var(--ring), .16);
  backdrop-filter: blur(20px) saturate(1.08);
  overflow: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
#trimPanel.hidden { opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none; }
#trimPanel header, #discPanel header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #33241457;
  background: linear-gradient(to bottom, rgba(38,27,17,.82), rgba(20,14,8,.74));
}
#trimClose, #discClose {
  background: none; border: none; color: #8a6d47; font-size: 13px; padding: 2px 6px;
}
#trimClose:hover, #discClose:hover { color: var(--amber); }

.trim-group { padding: 11px 14px 3px; }
.trim-group label {
  display: block; font-size: 9px; font-weight: 600; letter-spacing: .23em; text-transform: uppercase;
  color: #a2784a; margin-bottom: 8px;
}
.trim-group label span {
  float: right; margin-top: 1px; color: #716250; font-size: 8px; font-weight: 400;
  letter-spacing: .02em; text-transform: none;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  padding: 6px 10px; border-radius: 7px;
  background: rgba(35,25,15,.72); border: 1px solid rgba(125,95,58,.28);
  color: #bcae9b; font-size: 10.5px; font-weight: 500; letter-spacing: .035em;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
.chips button:hover { border-color: #755936; color: #e8d5ae; transform: translateY(-1px); }
.chips button.on {
  background: rgba(var(--glow-rgb), .125);
  border-color: var(--amber-dim); color: var(--lcd-ink);
  box-shadow: inset 0 1px rgba(255,255,255,.055), 0 0 12px rgba(var(--glow-rgb), .13);
}
.camera-chips { display: grid; grid-template-columns: repeat(3, 1fr); }
.camera-chips button { padding-inline: 6px; }
.glow-row { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; }
#glowPick {
  width: 40px; height: 28px; padding: 0; border: 1px solid #3a2b18; border-radius: 6px;
  background: #1c130a; cursor: pointer;
}
.swatch, .aswatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,.4); cursor: pointer;
  transition: transform .12s ease;
}
.swatch:hover, .aswatch:hover { transform: scale(1.15); }
.amb-off-btn {
  padding: 4px 11px; border-radius: 12px;
  background: #1c130a; border: 1px solid #3a2b18;
  color: #c9baa5; font-size: 11px; letter-spacing: .06em;
  transition: all .15s ease;
}
.amb-off-btn:hover { border-color: #755936; color: #e8d5ae; }
.amb-off-btn.on {
  background: rgba(var(--glow-rgb), .14);
  border-color: var(--amber-dim); color: var(--lcd-ink);
}

/* ---------- disc case panel ---------- */

#discPanel {
  position: absolute; left: 50%; top: 5vh; transform: translateX(-50%); z-index: 42;
  width: clamp(320px, 30vw, 420px); max-height: 74vh;
  display: flex; flex-direction: column;
  background: rgba(14, 10, 6, .95);
  border: 1px solid #4a3a26; border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,.7), 0 0 0 4px rgba(var(--ring), .25);
  backdrop-filter: blur(6px);
  overflow: hidden;
  transition: opacity .25s ease, visibility .25s;
}
#discPanel.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

#burner { padding: 10px 12px; border-bottom: 1px solid #33241457; display: flex; flex-direction: column; gap: 8px; }
.burn-guide {
  color: #9b856f; font-size: 11px; line-height: 1.55; text-wrap: pretty;
}
.burn-guide span {
  color: var(--amber); font-family: Consolas, monospace; font-size: 9px; letter-spacing: .08em;
}
#discNameIn {
  background: var(--lcd-bg); border: 1px solid #3a2b18; border-radius: 6px;
  color: var(--lcd-ink); font-family: "Segoe Print", "Comic Sans MS", cursive;
  font-size: 13px; padding: 7px 10px; outline: none;
}
#discNameIn::placeholder { color: #7d6142; font-family: "Segoe UI", system-ui, sans-serif; }
#discNameIn:focus { border-color: #6d4f2c; }
.playlist-import {
  display: grid; gap: 6px; padding: 9px;
  border: 1px solid rgba(var(--glow-rgb), .2); border-radius: 8px;
  background:
    radial-gradient(circle at 9% 0%, rgba(var(--glow-rgb), .1), transparent 45%),
    rgba(31, 22, 12, .55);
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.playlist-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.playlist-label span {
  color: #d9c39a; font-size: 10px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
}
.playlist-label small { color: #7f6a50; font-size: 9px; }
.playlist-fields { display: flex; gap: 6px; }
#playlistIn {
  flex: 1; min-width: 0; padding: 7px 9px;
  border: 1px solid #49351d; border-radius: 6px; outline: none;
  background: #120e08; color: #ead8b7; font: 11px/1.2 inherit;
}
#playlistIn::placeholder { color: #735d43; }
#playlistIn:focus { border-color: var(--amber-dim); box-shadow: 0 0 0 2px rgba(var(--glow-rgb), .08); }
#playlistImport {
  min-width: 64px; padding: 0 10px; border: 1px solid var(--amber-dim); border-radius: 6px;
  background: rgba(var(--glow-rgb), .14); color: var(--lcd-ink);
  font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  transition: background .2s ease, transform .15s ease, opacity .2s ease;
}
#playlistImport:hover { background: rgba(var(--glow-rgb), .24); }
#playlistImport:active { transform: translateY(1px); }
#playlistImport:disabled { cursor: wait; opacity: .55; }
#playlistStatus { color: #9c8668; font-size: 10px; line-height: 1.35; }
#playlistStatus.hidden { display: none; }
#playlistStatus.ok { color: #b9c995; }
#playlistStatus.error { color: #d58a73; }
.playlist-resolver {
  position: fixed; left: -20px; bottom: -20px; width: 2px; height: 2px;
  overflow: hidden; opacity: .001; pointer-events: none;
}
.burn-divider { display: flex; align-items: center; gap: 8px; color: #6f5c46; font-size: 8.5px; letter-spacing: .08em; }
.burn-divider::before, .burn-divider::after { content: ''; height: 1px; flex: 1; background: #33241480; }
.bsearch { display: flex; gap: 6px; }
#bSearchIn {
  flex: 1; min-width: 0;
  background: var(--lcd-bg); border: 1px solid #3a2b18; border-radius: 6px;
  color: var(--lcd-ink); font-family: inherit; font-size: 12px;
  padding: 6px 10px; outline: none;
}
#bSearchIn::placeholder { color: #7d6142; }
#bSearchIn:focus { border-color: #6d4f2c; }
#bSearchGo {
  width: 34px; flex-shrink: 0; border-radius: 6px; border: 1px solid #3a2b18;
  background: #241809; color: var(--amber); font-size: 15px;
}
#bSearchGo:hover { background: #33220e; }

#bResults {
  list-style: none; overflow-y: auto; max-height: 20vh;
  border: 1px solid #33241457; border-radius: 6px;
  scrollbar-width: thin; scrollbar-color: #4a3a26 transparent;
}
#bResults.hidden { display: none; }
#bResults li { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; cursor: pointer; }
#bResults li:hover { background: rgba(var(--glow-rgb), .08); }
#bResults .rt { font-size: 12px; color: #e8d5ae; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bResults .rc { font-size: 10px; color: #8a6d47; }
#bResults li.searching, #bResults li.noresult { cursor: default; color: #8a6d47; font-size: 12px; }

#bSongs {
  list-style: none; overflow-y: auto; max-height: 20vh;
  scrollbar-width: thin; scrollbar-color: #4a3a26 transparent;
}
#bSongs li {
  display: flex; align-items: baseline; gap: 8px;
  padding: 4px 6px; font-size: 12px; color: #c9baa5;
}
#bSongs .bt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#bSongs .ba { font-size: 10px; color: #7d6a55; margin-left: auto; flex-shrink: 0; max-width: 32%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#bSongs .bx {
  background: none; border: none; color: #8a6d47; font-size: 11px; padding: 0 4px; flex-shrink: 0;
}
#bSongs .bx:hover { color: #e07a5a; }
.burn-row { display: flex; align-items: center; justify-content: space-between; }
#bCount { font-size: 10.5px; color: #8a6d47; letter-spacing: .06em; }
#burnSave {
  padding: 7px 16px; border-radius: 16px;
  background: rgba(var(--glow-rgb), .15); border: 1px solid var(--amber-dim);
  color: var(--lcd-ink); font-size: 12px; letter-spacing: .08em;
}
#burnSave:hover { background: rgba(var(--glow-rgb), .25); }

#invHead {
  padding: 8px 14px 4px;
  font-size: 9.5px; letter-spacing: .26em; text-transform: uppercase; color: #8a6236;
}
#invHead span {
  float: right; color: #6f604f; font-size: 8px; letter-spacing: .06em; text-transform: none;
}
#invList { overflow-y: auto; padding: 2px 0 8px; scrollbar-width: thin; scrollbar-color: #4a3a26 transparent; }
.inv-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; font-size: 12.5px; color: #c9baa5;
}
.inv-item:hover { background: rgba(var(--glow-rgb), .06); }
.inv-item .in { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "Segoe Print", "Comic Sans MS", cursive; }
.inv-item .ic { font-size: 10px; color: #7d6a55; flex-shrink: 0; }
.inv-item button {
  background: none; border: 1px solid #3a2b18; border-radius: 10px;
  color: #c99b5e; font-size: 10.5px; padding: 3px 9px; flex-shrink: 0;
}
.inv-item button:hover { color: var(--amber); border-color: #6d5535; }
.inv-item button.del:hover { color: #e07a5a; border-color: #6d3524; }
.inv-empty { padding: 4px 14px 8px; font-size: 11.5px; color: #7d6a55; font-style: italic; }

/* queue header actions */
.qp-actions { display: flex; align-items: center; gap: 6px; }
#saveMixBtn {
  background: none; border: 1px solid #3a2b18; border-radius: 10px;
  color: #c99b5e; font-size: 10px; letter-spacing: .12em; padding: 3px 10px;
  text-transform: uppercase;
}
#saveMixBtn:hover { color: var(--amber); border-color: #6d5535; }

/* blank + lofi tray discs */
.disc.blank .disc-face {
  background: rgba(255,255,255,.03);
  border: 2px dashed #6d5947;
  box-shadow: none;
}
.disc.blank .disc-face::before, .disc.blank .disc-face::after { display: none; }
.disc.blank .disc-ink {
  transform: none; font-size: 24px; color: #8a6d47; line-height: 1;
}
.disc.blank:hover .disc-face { border-color: #a98d5f; }
.disc .disc-tag {
  position: absolute; left: 50%; bottom: -17px; transform: translateX(-50%);
  font-family: "Segoe Print", "Comic Sans MS", cursive;
  font-size: 9.5px; color: #8a7663; white-space: nowrap;
  max-width: 130px; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- first-drive music setup ---------- */

#app.setup-open::after {
  content: ""; position: absolute; inset: 0; z-index: 52;
  background: rgba(5, 4, 3, .48); backdrop-filter: blur(3px);
}
#driveSetup {
  position: absolute; left: 50%; top: 6vh; z-index: 54;
  width: min(520px, calc(100vw - 36px)); max-height: 86vh; overflow-y: auto;
  transform: translateX(-50%);
  padding: 25px 26px 21px;
  border: 1px solid rgba(218, 177, 124, .32); border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.035), transparent 32%),
    rgba(20, 14, 9, .975);
  box-shadow: 0 30px 90px rgba(0,0,0,.72), inset 0 1px rgba(255,255,255,.055), 0 0 0 5px rgba(var(--ring), .22);
  color: #eadbc8; scrollbar-width: thin; scrollbar-color: #59432c transparent;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
#driveSetup.hidden {
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translate(-50%, 9px);
}
.setup-kicker {
  color: #9a784f; font-size: 9px; font-weight: 600; letter-spacing: .27em; text-transform: uppercase;
}
.setup-close {
  position: absolute; top: 17px; right: 18px; width: 31px; height: 31px;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.035); color: #8c775f;
  transition: color .18s ease, background .18s ease;
}
.setup-close:hover { color: var(--amber); background: rgba(var(--glow-rgb), .08); }
#driveSetup h2 {
  margin-top: 9px; padding-right: 30px;
  font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 4vw, 43px);
  font-weight: 400; line-height: 1.05; letter-spacing: -.035em; text-wrap: balance;
}
.setup-lede {
  max-width: 48ch; margin-top: 11px; color: #ac9982; font-size: 13px; line-height: 1.62; text-wrap: pretty;
}
.setup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 19px; }
.setup-choice {
  min-height: 118px; padding: 15px 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  text-align: left; border: 1px solid #473725; border-radius: 12px;
  background: #191109; color: #dfcfba;
  box-shadow: inset 0 1px rgba(255,255,255,.025);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.setup-choice:hover { transform: translateY(-2px); border-color: #82613d; background: #21160c; }
.setup-choice:active { transform: translateY(0) scale(.985); }
.setup-choice.primary { background: rgba(var(--glow-rgb), .09); border-color: rgba(var(--glow-rgb), .38); }
.setup-choice strong { display: block; font-size: 13px; font-weight: 600; }
.setup-choice small { display: block; margin-top: 4px; color: #8f7b65; font-size: 10.5px; line-height: 1.4; }
.choice-disc {
  position: relative; width: 35px; height: 35px; border-radius: 50%;
  background: conic-gradient(#d8d5d0, #d4b8c6, #c8d4c9, #e0c8a9, #d8d5d0);
  box-shadow: 0 4px 9px rgba(0,0,0,.35);
}
.choice-disc::after {
  content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #17110c;
  box-shadow: 0 0 0 3px rgba(255,255,255,.48);
}
.choice-plus {
  width: 35px; height: 35px; display: grid; place-items: center; border: 1px dashed #79634d; border-radius: 50%;
  color: var(--amber); font-size: 22px; font-weight: 300;
}
.setup-saved { margin-top: 16px; }
.setup-saved.hidden { display: none; }
.setup-rule { display: flex; align-items: center; gap: 10px; color: #746452; font-size: 9px; letter-spacing: .15em; text-transform: uppercase; }
.setup-rule::before, .setup-rule::after { content: ""; flex: 1; height: 1px; background: #342719; }
#setupSavedList { display: flex; gap: 7px; overflow-x: auto; padding: 10px 1px 3px; scrollbar-width: thin; }
.saved-setup-disc {
  flex: 0 0 auto; max-width: 150px; padding: 7px 11px; border: 1px solid #3f3020; border-radius: 9px;
  background: #171008; color: #cdbba5; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: border-color .18s ease, color .18s ease;
}
.saved-setup-disc:hover { border-color: #76583a; color: var(--amber); }
.setup-note { margin-top: 17px; color: #6f604f; font-size: 10px; line-height: 1.5; }

/* ---------- narrow-screen guard ---------- */

#rotateNotice { display: none; }

@media (max-width: 980px) and (orientation: landscape) {
  #driveSetup { top: 3vh; max-height: 92vh; }
  #discPanel { top: 3vh; max-height: 91vh; }
  #queuePanel { right: 2vw; top: 3vh; max-height: 54vh; }
  .drive-controls { right: 1.8vw; top: 2.5vh; }
  .drive-controls button { padding: 6px 11px; font-size: 10.5px; }
  #trimPanel { right: 1.8vw; top: 10vh; }
  #tray { right: -1vw; }
}

@media (max-width: 720px) and (orientation: portrait) {
  #rotateNotice {
    position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 11px; padding: 28px; text-align: center;
    background: #17110c; color: #e9dac8;
  }
  #rotateNotice strong { font-family: Georgia, serif; font-size: 29px; font-weight: 400; letter-spacing: -.02em; }
  #rotateNotice span { color: #9e8972; font-size: 13px; }
  .rotate-disc {
    position: relative; width: 74px; height: 74px; margin-bottom: 7px; border-radius: 50%;
    background: conic-gradient(#d8d5d0, #d4b8c6, #c8d4c9, #e0c8a9, #d8d5d0);
    animation: discspin 5s linear infinite;
  }
  .rotate-disc::after { content: ""; position: absolute; inset: 27px; border-radius: 50%; background: #17110c; }
}

@media (max-width: 560px) {
  .setup-actions { grid-template-columns: 1fr; }
  #driveSetup { padding: 22px 18px 18px; }
  #invHead span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
