:root {
  --bg: #f7f8f7;
  --surface: #ffffff;
  --surface-2: #eef2f1;
  --text: #15201e;
  --muted: #5b6b68;
  --line: #dde4e2;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #d5efec;
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 22, .06), 0 4px 16px rgba(16, 24, 22, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1514;
    --surface: #17201e;
    --surface-2: #1e2a28;
    --text: #e7efed;
    --muted: #9db0ac;
    --line: #2a3835;
    --accent: #2dd4bf;
    --accent-ink: #062b27;
    --accent-soft: #123f3a;
    --ok: #4ade80;
    --warn: #fbbf24;
    --bad: #f87171;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
img, video, canvas { max-width: 100%; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
.logo-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 16px; }
.site-nav { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 14px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent); }

/* typography */
h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.2; margin: 28px 0 8px; letter-spacing: -.01em; }
h2 { font-size: 22px; margin: 36px 0 12px; }
h3 { font-size: 18px; margin: 24px 0 8px; }
.lead { color: var(--muted); font-size: 18px; margin: 0 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* tool card */
.tool {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 16px 0;
}
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.stack > * + * { margin-top: 12px; }

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.big { padding: 14px 24px; font-size: 18px; }

label { font-weight: 600; font-size: 14px; }
select, input[type="text"], input[type="number"], textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}
select:focus, input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field { display: grid; gap: 6px; flex: 1 1 220px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; }

/* status */
.status { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border-left: 4px solid var(--line); }
.status.ok { border-left-color: var(--ok); }
.status.warn { border-left-color: var(--warn); }
.status.bad { border-left-color: var(--bad); }
.status strong { display: block; }

/* level meter */
.meter { position: relative; height: 28px; background: var(--surface-2); border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.meter-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #22c55e 0%, #22c55e 60%, #eab308 80%, #ef4444 100%); transition: width .06s linear; }
.meter-peak { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); left: 0; }
.big-number { font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.stat small { display: block; color: var(--muted); font-size: 13px; }
.stat b { font-variant-numeric: tabular-nums; }

.video-box { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.video-box video { width: 100%; height: 100%; object-fit: contain; }
.video-box .placeholder { color: #9aa; padding: 20px; text-align: center; }
.mirror { transform: scaleX(-1); }

.wave { width: 100%; height: 90px; display: block; background: var(--surface-2); border-radius: 10px; }

/* dropzone */
.drop {
  display: block;
  font-size: 16px;
  font-weight: 400;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-2);
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.file-list { display: grid; gap: 12px; margin-top: 16px; }
.file-item { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.file-item img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.file-item .meta-list { font-size: 14px; margin: 6px 0; padding-left: 18px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); }
.tag.bad { background: var(--bad); color: #fff; }
.tag.ok { background: var(--ok); color: #fff; }

/* results */
.result { font-size: 20px; font-weight: 600; background: var(--accent-soft); border-radius: 10px; padding: 14px 16px; word-break: break-word; }
.result-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.result-table td { padding: 10px 4px; border-bottom: 1px solid var(--line); }
.result-table td:last-child { text-align: right; font-weight: 700; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; background: var(--surface); color: var(--text); padding: 9px 14px; font: inherit; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* tool cards */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.tool-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; }
.tool-card:hover { border-color: var(--accent); }
.tool-card strong { display: block; }
.tool-card small { color: var(--muted); display: block; line-height: 1.4; margin-top: 2px; }
.tool-card.big { padding: 18px; }
.tool-icon { font-size: 26px; line-height: 1; }

/* article and faq */
.article p, .article li { max-width: 72ch; }
.faq-item { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item div { color: var(--muted); margin-top: 8px; }

.ad { margin: 20px 0; min-height: 90px; text-align: center; }

.site-footer { margin-top: 56px; padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-links a { color: var(--muted); }

.copy-ok { color: var(--ok); font-size: 14px; }
.hidden { display: none !important; }

@media (max-width: 560px) {
  .tool { padding: 16px; }
  .file-item { grid-template-columns: 1fr; }
  .file-item img { width: 100%; height: 140px; }
  .file-item img:not([src]) { display: none !important; }
  .seg { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { white-space: nowrap; flex: none; min-height: 44px; }
}

/* keyboard */
.kb-wrap { overflow-x: auto; padding-bottom: 4px; }
.kb { display: flex; gap: clamp(6px, 1.5vw, 14px); user-select: none; -webkit-user-select: none; }
.kb-block { display: flex; flex-direction: column; gap: clamp(2px, 0.6vw, 5px); min-width: 0; }
.kb-main { flex: 15 1 0; }
.kb-nav { flex: 3 1 0; }
.kb-row { display: flex; gap: clamp(2px, 0.6vw, 5px); }
.kb-key, .kb-gap { height: clamp(26px, 5vw, 40px); min-width: 0; }
.kb-key {
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 3px;
  border-radius: clamp(4px, 0.8vw, 7px); font-size: clamp(8px, 1.4vw, 12px); font-weight: 600; color: var(--muted);
  white-space: nowrap; overflow: hidden; transition: background .08s;
}
.kb-key.ok { background: #16a34a; border-color: #15803d; color: #fff; }
.kb-key.chatter { background: #ea580c; border-color: #c2410c; color: #fff; }
.kb-key.down { background: #2563eb; border-color: #1d4ed8; color: #fff; transform: translateY(1px); }

/* screen test */
.screen-fs { position: fixed; inset: 0; z-index: 1000; cursor: none; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--line); cursor: pointer; }

/* user list */
.user-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.user-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.user-list li:last-child { border-bottom: 0; }
.user-list a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; min-width: 0; }
.user-list li > span { white-space: nowrap; flex: none; }

/* ---- touch, accessibility & responsive polish ---- */
.faq-item summary { padding: 10px 0; min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: '+'; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); color: var(--accent); font-weight: 700; flex: none; }
.faq-item[open] summary::before { content: '–'; }
.faq-item { padding: 2px 0; }
.faq-item div { margin: 0 0 12px 30px; }

input[type="range"] { width: 100%; height: 32px; accent-color: var(--accent); cursor: pointer; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.check { min-height: 44px; cursor: pointer; }
.btn, select, input[type="text"], input[type="number"] { min-height: 44px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.btn:focus-visible { outline-offset: 3px; }
.drop:focus-within { border-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* safe areas (iPhone notch / home bar) */
.wrap { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.site-footer { padding-bottom: max(40px, env(safe-area-inset-bottom)); }

/* phones: single-row scrollable nav instead of a tall wrapped block */
@media (max-width: 700px) {
  .header-inner { gap: 6px 16px; }
  .site-nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; padding: 8px 2px; }
  h1 { margin-top: 20px; }
  .lead { font-size: 17px; }
  .btn.big { width: 100%; justify-content: center; }
  .row > .btn { flex: 1 1 auto; justify-content: center; }
  .big-number { font-size: 34px; }
}

/* tablets & desktops: roomier tool card */
@media (min-width: 900px) {
  .tool { padding: 28px; }
  .wrap { max-width: 960px; }
}

/* print: just the content */
@media print {
  .site-header, .site-footer, .ad, .related, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}

@media (max-width: 640px) { .kb-nav { display: none; } .kb-main { flex: 1 1 auto; } }
.row > .field { align-self: flex-start; }

/* toast */
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 2000; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.btn.share::before { content: '↗'; font-weight: 700; }

/* ---- landing components ---- */
.hero { position: relative; margin: 20px 0 8px; padding: clamp(22px, 5vw, 44px) clamp(18px, 4vw, 40px); border-radius: 22px; background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft) 0%, transparent 55%), radial-gradient(120% 140% at 100% 100%, var(--accent-soft) 0%, transparent 50%), var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.hero h1 { margin: 0 0 10px; font-size: clamp(30px, 6vw, 48px); letter-spacing: -.02em; }
.hero .lead { margin: 0 0 16px; max-width: 62ch; }
.hero .eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.badges li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; counter-reset: step; padding: 0; list-style: none; }
.steps li { position: relative; padding: 16px 16px 16px 58px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 16px; top: 16px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.steps b { display: block; margin-bottom: 2px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.feature { padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.feature .ico { font-size: 26px; line-height: 1; }
.feature h3 { margin: 8px 0 4px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.cat-title { display: flex; align-items: center; gap: 8px; margin: 26px 0 10px; font-size: 20px; }
.tool-card { transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
@media (max-width: 560px) { .hero { border-radius: 18px; } .steps li { padding-left: 54px; } }
@media (max-width: 560px) {
  .hero { padding: 18px 16px; margin-top: 14px; }
  .hero h1 { font-size: 28px; }
  .hero .lead { font-size: 16px; margin-bottom: 12px; }
  .badges { gap: 6px; }
  .badges li { font-size: 12.5px; padding: 4px 9px; }
  .hero .cta { margin-top: 14px; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:root{--accent:#c2410c;--accent-soft:#ffedd5;--accent-ink:#ffffff}
@media (prefers-color-scheme: dark){:root{--accent:#fdba74;--accent-soft:#3b1d0f;--accent-ink:#2a1206}}
/* ---------- cozy type: Fredoka (rounded) for headings, Caveat (handwritten) for the little vibe lines ---------- */
@font-face { font-family: 'Fredoka'; src: url('/fonts/fredoka.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Caveat'; src: url('/fonts/caveat.woff2') format('woff2'); font-weight: 500 700; font-display: swap; }
:root { --cozy: 'Fredoka', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif; --hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive; }
h1, h2, h3, .st-txt strong, .deck-tab { font-family: var(--cozy); font-weight: 600; letter-spacing: .005em; }
.st-intro { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.st-intro h1 { margin: 0; font-size: clamp(22px, 3.2vw, 30px); font-weight: 600; }
.st-intro .vibe { margin: 0; font-family: var(--hand); font-size: clamp(22px, 3vw, 28px); font-weight: 600; color: var(--accent); line-height: 1.1; }

/* ---------- cozy room scene ---------- */
.room {
  --wall: #2b2240; --wall2: #3a2c52; --sky1: #1b2a4a; --sky2: #3b3f6b; --orb: #f5ecc8; --orbglow: rgba(245, 236, 200, .35);
  --bld: #161c33; --lit: #ffd27a; --desk: #6b4a3a; --desk2: #553a2e; --glow: rgba(255, 190, 120, .55); --stars: 1;
  position: relative; margin: 18px 0 16px; border-radius: 26px; overflow: hidden; isolation: isolate;
  aspect-ratio: 16 / 9; min-height: 340px; max-height: 78vh;
  background: radial-gradient(120% 90% at 50% 0%, var(--wall2), var(--wall));
  box-shadow: 0 20px 50px rgba(30, 20, 50, .28);
  color: #fff; transition: background 1.2s ease;
}
.room[data-scene="sunset"] { --wall: #5b3550; --wall2: #7a4560; --sky1: #f7a072; --sky2: #c86b98; --orb: #ffd29a; --orbglow: rgba(255, 190, 120, .5); --bld: #4a2a48; --lit: #ffe2a8; --glow: rgba(255, 170, 110, .5); --stars: 0; }
.room[data-scene="snow"] { --wall: #2e2b4d; --wall2: #433e69; --sky1: #3d4a7a; --sky2: #8d8fc0; --orb: #e9ecff; --orbglow: rgba(220, 226, 255, .35); --bld: #26284a; --lit: #ffe9b0; --glow: rgba(255, 200, 140, .5); --stars: .6; }
.room[data-scene="morning"] { --wall: #e9d8c8; --wall2: #f6e8da; --sky1: #9fd3f2; --sky2: #ffe2c6; --orb: #fff4c2; --orbglow: rgba(255, 240, 180, .6); --bld: #9eb0c8; --lit: transparent; --desk: #9c7457; --desk2: #86614a; --glow: rgba(255, 220, 170, .25); --stars: 0; color: #3a2a20; }

.window { position: absolute; left: 8%; top: 9%; width: 46%; height: 58%; border-radius: 18px 18px 8px 8px; overflow: hidden;
  background: linear-gradient(180deg, var(--sky1), var(--sky2)); box-shadow: inset 0 0 0 6px #e8d9c6, 0 10px 30px rgba(0, 0, 0, .25); transition: background 1.2s ease; }
.window .frame { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent calc(50% - 3px), #e8d9c6 calc(50% - 3px), #e8d9c6 calc(50% + 3px), transparent calc(50% + 3px)),
              linear-gradient(0deg, transparent calc(55% - 3px), #e8d9c6 calc(55% - 3px), #e8d9c6 calc(55% + 3px), transparent calc(55% + 3px));
  box-shadow: inset 0 0 0 6px #e8d9c6; }
.window canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.orb { position: absolute; right: 16%; top: 14%; width: 13%; aspect-ratio: 1; border-radius: 50%; background: var(--orb); box-shadow: 0 0 40px 14px var(--orbglow); transition: background 1.2s; }
.room[data-scene="sunset"] .orb { top: 48%; right: 30%; width: 20%; }
.stars { position: absolute; inset: 0 0 40% 0; opacity: var(--stars); transition: opacity 1.2s;
  background-image: radial-gradient(1.5px 1.5px at 12% 20%, #fff, transparent), radial-gradient(1px 1px at 30% 40%, #fff, transparent), radial-gradient(1.5px 1.5px at 48% 12%, #fff, transparent), radial-gradient(1px 1px at 64% 30%, #fff, transparent), radial-gradient(1.2px 1.2px at 82% 18%, #fff, transparent), radial-gradient(1px 1px at 22% 8%, #fff, transparent), radial-gradient(1px 1px at 72% 6%, #fff, transparent);
  animation: twinkle 4s ease-in-out infinite alternate; }
@keyframes twinkle { to { filter: brightness(.6); } }
.cloud { position: absolute; height: 12%; border-radius: 999px; background: rgba(255, 255, 255, .55); filter: blur(2px); opacity: 0; transition: opacity 1.2s; animation: drift 60s linear infinite; }
.cloud.c1 { width: 30%; top: 16%; left: -30%; }
.cloud.c2 { width: 22%; top: 30%; left: -22%; animation-delay: -28s; }
.room[data-scene="morning"] .cloud, .room[data-scene="sunset"] .cloud { opacity: 1; }
@keyframes drift { to { transform: translateX(560%); } }
.city { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 48%; }
.city .bld { fill: var(--bld); transition: fill 1.2s; }
.city .lit { fill: var(--lit); opacity: .85; animation: flicker 7s steps(1) infinite; }
@keyframes flicker { 50% { opacity: .65; } }

.glow { position: absolute; right: 6%; bottom: 14%; width: 46%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--glow) 0%, transparent 65%); pointer-events: none; transition: transform .25s ease, opacity .25s; }
.room.is-playing.beat .glow { animation: beatglow .45s ease-out; }
@keyframes beatglow { 0% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); opacity: .9; } }

.shelf { position: absolute; right: 7%; top: 44%; width: 24%; padding: 0 6px 4px; border-bottom: 7px solid #8a6450; display: flex; justify-content: space-around; font-size: clamp(18px, 3vw, 32px); filter: saturate(.85); }
.desk { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: linear-gradient(180deg, var(--desk), var(--desk2)); box-shadow: 0 -6px 0 rgba(0, 0, 0, .12) inset; transition: background 1.2s; }
.prop { position: absolute; bottom: 60%; font-size: clamp(26px, 5vw, 56px); line-height: 1; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .25)); }
.prop.books { left: 10%; }
.prop.mug { left: 30%; }
.prop.plant { left: 47%; }
.prop.cat { right: 26%; animation: breathe 4s ease-in-out infinite; transform-origin: bottom center; }
@keyframes breathe { 50% { transform: scaleY(1.05) scaleX(.98); } }
.prop.lamp { right: 8%; width: clamp(40px, 8vw, 86px); height: clamp(60px, 12vw, 130px); filter: none; }
.lamp .shade { position: absolute; top: 0; left: 0; right: 0; height: 40%; background: #f4b37a; clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%); border-radius: 4px; box-shadow: 0 0 30px 10px var(--glow); }
.lamp .pole { position: absolute; left: 47%; width: 6%; top: 40%; bottom: 0; background: #3b2a24; border-radius: 3px; }
.steam { position: absolute; left: 45%; bottom: 90%; width: 6px; height: 22px; border-radius: 6px; background: rgba(255, 255, 255, .5); filter: blur(3px); opacity: 0; animation: steam 3.2s ease-in infinite; }
.steam.s2 { left: 30%; animation-delay: 1.1s; } .steam.s3 { left: 60%; animation-delay: 2.1s; }
@keyframes steam { 0% { transform: translateY(0) scaleX(1); opacity: 0; } 30% { opacity: .7; } 100% { transform: translateY(-34px) scaleX(2); opacity: 0; } }

.glass { position: absolute; z-index: 2; background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .28); border-radius: 18px; box-shadow: 0 8px 30px rgba(0, 0, 0, .15); }
.room[data-scene="morning"] .glass { background: rgba(255, 255, 255, .55); border-color: rgba(255, 255, 255, .7); }
.clock { right: 4%; top: 6%; padding: 10px 14px 8px; text-align: center; display: grid; justify-items: center; gap: 2px; }
.clock .time { display: block; font-family: var(--cozy); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1.05; transition: opacity .45s ease, filter .45s ease, transform .45s ease; }
.clock .time b { font-weight: 600; font-size: clamp(26px, 4.6vw, 44px); }
.clock .time i { font-style: normal; font-size: clamp(16px, 2.4vw, 24px); opacity: .7; margin-left: 1px; }
.clock .time.swap { opacity: 0; filter: blur(5px); transform: translateY(3px); }
.clock select { all: unset; cursor: pointer; font-size: 12.5px; opacity: .85; padding: 2px 18px 2px 6px; border-radius: 8px; max-width: 100%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;
  background: linear-gradient(45deg, transparent 50%, currentColor 50%) right 8px top 55% / 5px 5px no-repeat, linear-gradient(-45deg, transparent 50%, currentColor 50%) right 4px top 55% / 5px 5px no-repeat; }
.clock select:hover, .clock select:focus-visible { background-color: rgba(255, 255, 255, .14); opacity: 1; }
.clock select option { color: #1d1714; background: #fff; }
.clock .focusline { font-size: 12.5px; opacity: .92; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .5s ease, opacity .5s ease; }
.clock.timing .focusline { max-height: 2em; opacity: .92; }
.clock .focusline b { font-variant-numeric: tabular-nums; }
.stage { position: relative; }
.stage:fullscreen { display: flex; flex-direction: column; gap: 12px; padding: 12px; background: var(--bg); }
.stage:fullscreen .room { flex: 1; margin: 0; max-height: none; aspect-ratio: auto; border-radius: 22px; }
.stage:fullscreen.idle { cursor: none; }
.stage:fullscreen.idle .player { opacity: 0; transform: translateY(8px); }

/* ---------- player bar ---------- */
.player { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(180px, 1.3fr) minmax(120px, 170px); align-items: center; gap: 10px 18px;
  margin: -4px 0 18px; padding: 12px 18px 12px 12px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); transition: opacity .5s, transform .5s; }
.pl-disc { width: 54px; height: 54px; border-radius: 50%; flex: none; position: relative;
  background: radial-gradient(circle, var(--accent) 0 17%, #1c1612 18% 21%, #2a221d 22% 30%, #1c1612 31% 40%, #2a221d 41% 52%, #1c1612 53% 64%, #2a221d 65% 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.pl-disc i { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 30deg, transparent 0 20%, rgba(255, 255, 255, .14) 25%, transparent 32% 70%, rgba(255, 255, 255, .1) 75%, transparent 82%); }
.player.is-playing .pl-disc { animation: spin 3.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pl-info { min-width: 0; display: grid; gap: 1px; }
.pl-info strong { font-family: var(--cozy); font-weight: 600; font-size: 18px; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-info small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-ctrl { display: flex; align-items: center; gap: 6px; }
.pl-btn, .pl-play { all: unset; cursor: pointer; display: grid; place-items: center; border-radius: 50%; color: var(--text); transition: background .15s, transform .15s; }
.pl-btn { width: 44px; height: 44px; }
.pl-btn.small { width: 44px; height: 44px; }
.pl-btn:hover { background: var(--surface-2); }
.pl-btn svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pl-play { width: 54px; height: 54px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); }
.pl-play:hover { transform: scale(1.05); }
.pl-play svg { width: 26px; height: 26px; fill: currentColor; }
.pl-play .i-pause, .player.is-playing .pl-play .i-play { display: none; }
.player.is-playing .pl-play .i-pause { display: block; }
.pl-btn:focus-visible, .pl-play:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pl-seek { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pl-vol { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px; }
#ln-mute svg { fill: none; }
#ln-mute .spk { fill: currentColor; stroke: none; }
#ln-mute .x { display: none; }
#ln-mute.is-muted .w1, #ln-mute.is-muted .w2 { display: none; }
#ln-mute.is-muted .x { display: block; }
.player input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; cursor: pointer; margin: 0; padding: 0; border: 0; min-height: 0; box-shadow: none; }
.player input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--fill, 0%), var(--line) var(--fill, 0%)); }
.player input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--fill, 0%), var(--line) var(--fill, 0%)); }
.player input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.player input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.player .np-credit { color: var(--muted); }
@media (max-width: 900px) {
  .player { grid-template-columns: auto minmax(0, 1fr) auto; padding: 12px; gap: 10px 12px; }
  .pl-seek { grid-column: 1 / -1; }
  .pl-vol { grid-column: 1 / -1; max-width: 320px; }
}
@media (max-width: 420px) {
  .pl-disc { width: 40px; height: 40px; }
  .pl-play { width: 50px; height: 50px; }
  .pl-ctrl { gap: 2px; }
  .pl-info strong { font-size: 16px; }
}

/* ---------- panels ---------- */
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel-grid .tool { margin: 0; }
.tight { margin: 4px 0 0; }
.mix { display: grid; gap: 6px; }
.mix-row { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; text-align: left; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.todo-form { display: flex; gap: 8px; }
.todo-form input { flex: 1; min-width: 0; }
.todos { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.todos li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.todos li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.todos li.done span { text-decoration: line-through; opacity: .5; }
.todo-x { all: unset; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.todo-x:hover { background: var(--line); }

@media (max-width: 820px) { .panel-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .room { aspect-ratio: auto; height: 74vh; min-height: 460px; border-radius: 20px; }
  .window { left: 6%; width: 88%; top: 18%; height: 44%; }
  .shelf { display: none; }
  .desk { height: 30%; }
  .prop.books { left: 6%; } .prop.mug { left: 26%; } .prop.plant { left: 44%; } .prop.cat { right: 24%; }
  .clock { right: 3%; top: 3%; padding: 6px 12px; }
  .mix-row { grid-template-columns: 120px 1fr; }
}
@media (prefers-reduced-motion: reduce) { .cloud, .stars, .city .lit, .prop.cat, .steam { animation: none !important; } }
.mix-row .chip { white-space: nowrap; }
@media (max-width: 600px) { .mix-row { grid-template-columns: minmax(124px, auto) 1fr; } .mix-row .chip { padding: 9px 12px; } }

/* ---------- stations ---------- */
.stations { margin: 0 0 16px; }
.st-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; margin-bottom: 12px; }
.st-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.st { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.st:hover { border-color: var(--accent); transform: translateY(-1px); }
.st:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.st[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.st-ico { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); font-size: 22px; }
.st-txt { min-width: 0; display: grid; gap: 1px; }
.st-txt strong { font-size: 15px; }
.st-txt small { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.st-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.st-links a { display: inline-block; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }
@media (max-width: 1000px) { .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .st { padding: 8px 10px; gap: 8px; } .st-ico { width: 34px; height: 34px; font-size: 19px; } }
@media (max-width: 600px) {
  .st-grid { gap: 8px; }
  .st { min-height: 56px; padding: 8px 10px; gap: 8px; border-radius: 14px; }
  .st-ico { width: 32px; height: 32px; font-size: 18px; border-radius: 10px; }
  .st-txt strong { font-size: 14.5px; line-height: 1.25; }
  .st-txt small { font-size: 12.5px; }
  .st-bpm { display: none; }
}
.src-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.src-switch .chip { display: grid; gap: 1px; text-align: left; line-height: 1.25; padding: 8px 14px; }
.src-switch .chip small { font-weight: 500; font-size: 12px; color: var(--muted); }
.np-credit { display: block; margin-top: 4px; font-size: 11.5px; color: inherit; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-credit[hidden] { display: none; }
@media (min-width: 1001px) { .st-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .st-grid .st[data-station="all"] { grid-column: span 1; } }
@media (min-width: 1600px) { .st-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---------- more scenes ---------- */
.room[data-scene="autumn"] { --wall: #4a2f2a; --wall2: #6b3f30; --sky1: #f2b56b; --sky2: #d9805a; --orb: #ffe0a8; --orbglow: rgba(255, 196, 120, .45); --bld: #5a3328; --lit: #ffd27a; --glow: rgba(255, 170, 100, .55); --stars: 0; }
.room[data-scene="spring"] { --wall: #e9d6dc; --wall2: #f6e6ea; --sky1: #bfe3f7; --sky2: #ffe3ec; --orb: #fff6cc; --orbglow: rgba(255, 245, 200, .6); --bld: #a9b9d4; --lit: transparent; --desk: #a07a62; --desk2: #8a6650; --glow: rgba(255, 220, 200, .25); --stars: 0; color: #3a2a30; }
.room[data-scene="storm"] { --wall: #1e1d2e; --wall2: #2a2840; --sky1: #141a2c; --sky2: #2b3149; --orb: #c9cfe0; --orbglow: rgba(200, 210, 240, .15); --bld: #0f1424; --lit: #ffd27a; --glow: rgba(255, 190, 120, .5); --stars: 0; }
.room[data-scene="stars"] { --wall: #1c1a35; --wall2: #2a2650; --sky1: #0b1030; --sky2: #232a5c; --orb: #fdf6d8; --orbglow: rgba(250, 240, 200, .45); --bld: #0c1028; --lit: #ffe39a; --glow: rgba(255, 190, 120, .5); --stars: 1; }
.room[data-scene="spring"] .glass, .room[data-scene="autumn"] .glass { background: rgba(255, 255, 255, .3); }
.room[data-scene="spring"] .glass { background: rgba(255, 255, 255, .55); border-color: rgba(255, 255, 255, .7); }
.room[data-scene="spring"] .cloud, .room[data-scene="autumn"] .cloud { opacity: 1; }
.room[data-scene="storm"] .orb { opacity: .35; }
.room[data-scene="stars"] .orb { width: 9%; right: 20%; }
.room::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: rgba(230, 236, 255, calc(var(--flash, 0) * .35)); }
/* lamp off: a darker, moonlit room */
.room.lamp-off .glow { opacity: 0; }
.room.lamp-off .lamp .shade { box-shadow: none; background: #b9906d; }
.room.lamp-off .desk, .room.lamp-off .shelf, .room.lamp-off .prop:not(.lamp) { filter: brightness(.6) saturate(.8); }
.room .lamp, .room .prop.cat { cursor: pointer; }
.room .lamp:focus-visible, .room .prop.cat:focus-visible { outline: 3px solid #fff; outline-offset: 4px; border-radius: 8px; }
.prop.cat.petted { animation: petted .5s ease; }
@keyframes petted { 30% { transform: scale(1.12) rotate(-4deg); } 60% { transform: scale(.96) rotate(3deg); } }
.prop .heart { position: absolute; left: 30%; bottom: 90%; font-size: .45em; animation: heart 1.4s ease-out forwards; pointer-events: none; }
@keyframes heart { from { transform: translateY(0) scale(.6); opacity: 1; } to { transform: translateY(-46px) scale(1.2); opacity: 0; } }
.scene-chips .chip { padding: 8px 12px; }

/* ---------- control deck (tabs) ---------- */
.deck { padding: 0; overflow: hidden; }
.deck-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); overflow-x: auto; scrollbar-width: none; }
.deck-tabs::-webkit-scrollbar { display: none; }
.deck-tab { flex: 1 0 auto; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; padding: 10px 14px; border-radius: 10px; cursor: pointer; min-height: 44px; white-space: nowrap; }
.deck-tab:hover { color: var(--text); }
.deck-tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.deck-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.deck-pane { padding: 18px; }
.deck-pane[hidden] { display: none; }
.deck-foot { padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.small-btn { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.amb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* ambience cards */
.amb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.amb-card { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .15s, background .15s; }
.amb-card.on { border-color: var(--accent); background: var(--accent-soft); }
.amb-card.loading .amb-emoji { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.amb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.amb-toggle { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-weight: 700; }
.amb-toggle:focus-visible, .amb-step:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.amb-emoji { font-size: 22px; }
.amb-nav { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; gap: 4px; }
.amb-step { all: unset; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.amb-step:hover { background: var(--surface-2); color: var(--text); }
.amb-name { font-size: 13px; text-align: center; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amb-card input[type=range] { width: 100%; }
/* focus stats */
.focus-stats { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 10px; }
.focus-stats .stat { display: grid; gap: 2px; align-content: start; }
.focus-stats .stat b { font-size: 22px; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 64px; align-items: end; margin-top: 4px; }
.barcol { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 2px; text-align: center; }
.barcol i { align-self: end; display: block; min-height: 3px; border-radius: 4px 4px 2px 2px; background: var(--accent); opacity: .85; }
.barcol small { font-size: 11px; color: var(--muted); }
/* breathing: in 3 s, out 6 s, drawn frame by frame (see nook-ui.js) */
.breath-card { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; padding: 14px; border-radius: 18px; background: var(--surface-2); transition: box-shadow .3s; }
.breath-card.nudge { box-shadow: 0 0 0 3px var(--accent); }
.breath { --s: .62; --r: 0deg; --glow: .25; position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.breath-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.breath-ring circle { fill: none; stroke-width: 3; }
.breath-ring .track { stroke: var(--line); }
.breath-ring .prog { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; opacity: .8; }
.blob { position: absolute; width: 104px; height: 104px; border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%; background: var(--accent); transform: scale(var(--s)) rotate(var(--r)); will-change: transform; }
.blob.b1 { opacity: .16; filter: blur(6px); transform: scale(calc(var(--s) * 1.18)) rotate(calc(var(--r) * -1)); }
.blob.b2 { opacity: .28; border-radius: 54% 46% 48% 52% / 46% 54% 48% 52%; transform: scale(calc(var(--s) * 1.06)) rotate(calc(var(--r) * 1.6)); }
.blob.b3 { opacity: .9; width: 96px; height: 96px; box-shadow: 0 0 calc(40px * var(--glow)) calc(14px * var(--glow)) color-mix(in srgb, var(--accent) 45%, transparent); }
.breath .core { position: relative; display: grid; gap: 0; text-align: center; color: var(--accent-ink); line-height: 1.1; pointer-events: none; }
.breath .core b { font-family: var(--cozy); font-weight: 600; font-size: 24px; font-variant-numeric: tabular-nums; }
#ln-breath-text b { color: var(--accent); font-family: var(--cozy); font-size: 17px; }
.breath.idle .blob { animation: idleBreath 9s ease-in-out infinite; }
@keyframes idleBreath { 0%, 100% { transform: scale(.6) rotate(0deg); } 33% { transform: scale(.78) rotate(8deg); } }
/* quote */
.quote { position: relative; margin: 0; padding: 14px 44px 14px 16px; border-radius: 14px; background: var(--accent-soft); }
.quote blockquote { margin: 0; font-size: 17px; font-style: italic; }
.quote figcaption { margin-top: 4px; font-size: 13px; color: var(--muted); }
.glass-mini { all: unset; cursor: pointer; position: absolute; right: 8px; top: 8px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; }
.glass-mini:hover { background: var(--surface); }
textarea#ln-notes { width: 100%; font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); resize: vertical; min-height: 110px; }
/* palettes */
.palettes { display: flex; flex-wrap: wrap; gap: 8px; }
.pal { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.pal i { width: 28px; height: 28px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .5); }
.pal[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
/* saved tracks */
.track-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.track-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 4px 10px; padding: 6px 8px; border-radius: 14px; background: var(--surface-2); transition: background .3s, box-shadow .3s; }
.track-list li.is-current { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.tl-play { all: unset; box-sizing: border-box; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.tl-play svg { width: 18px; height: 18px; fill: currentColor; display: block; }
.tl-play:focus-visible, .tl-act:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tl-act { all: unset; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.tl-act:hover { background: var(--line); color: var(--text); }
.tl-act svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tl-act.is-busy { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.tl-txt { min-width: 0; display: grid; }
.tl-txt b, .tl-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-txt small { color: var(--muted); font-size: 12.5px; }
.tl-mini { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto auto minmax(70px, 120px); align-items: center; gap: 8px; padding: 2px 4px 2px 2px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(-4px); } }
.tl-mini input[type=range], .player input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; cursor: pointer; margin: 0; padding: 0; border: 0; min-height: 0; box-shadow: none; }
.tl-mini input[type=range]::-webkit-slider-runnable-track { height: 5px; border-radius: 5px; background: linear-gradient(90deg, var(--accent) var(--fill, 0%), var(--line) var(--fill, 0%)); }
.tl-mini input[type=range]::-moz-range-track { height: 5px; border-radius: 5px; background: linear-gradient(90deg, var(--accent) var(--fill, 0%), var(--line) var(--fill, 0%)); }
.tl-mini input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -4.5px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.tl-mini input[type=range]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
@media (max-width: 480px) { .tl-mini { grid-template-columns: auto 1fr auto; } .tl-vol, .tl-volr { display: none; } }
#ln-like[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); border-color: var(--accent); }
/* help dialog */
dialog.help { border: 0; border-radius: 18px; padding: 22px; max-width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
dialog.help::backdrop { background: rgba(10, 8, 20, .45); backdrop-filter: blur(2px); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 14px 0 18px; }
.keys dt { font-weight: 700; font-family: ui-monospace, monospace; background: var(--surface-2); border-radius: 6px; padding: 2px 8px; text-align: center; }
.keys dd { margin: 0; }
/* focus mode: hide the cursor + controls when idle */
.stage:fullscreen .clock .time b { font-size: clamp(44px, 8vw, 110px); }
.stage:fullscreen .clock .time i { font-size: clamp(22px, 3.5vw, 48px); }
/* animations off */
.no-anim .cloud, .no-anim .stars, .no-anim .city .lit, .no-anim .prop.cat, .no-anim .steam { animation: none !important; }
.no-anim #ln-weather { display: none; }
@media (max-width: 700px) {
  .focus-stats { grid-template-columns: 1fr 1fr; }
  .focus-stats .stat.week { grid-column: 1 / -1; }
  .breath-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .breath-card .row { justify-content: center; }
  .deck-pane { padding: 14px; }
  .deck-tab span { display: none; }
  .deck-tab { font-size: 20px; padding: 8px 10px; }
  .amb-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) { .amb-grid { grid-template-columns: 1fr; } }
/* big screens / TVs */
@media (min-width: 1600px) { .room { max-height: 82vh; } .deck-pane { padding: 24px; } }
.wrap { max-width: 1180px; }
.article { max-width: 780px; }
.credits { padding-left: 18px; display: grid; gap: 4px; font-size: 14.5px; }
details summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
@media (pointer: coarse) {
  .amb-toggle, .small-btn { min-height: 44px; }
  .amb-step { width: 44px; height: 44px; }
  .amb-nav { grid-template-columns: 44px 1fr 44px; }
  .mix input[type=range], .amb-card input[type=range] { height: 40px; }
}

/* ---------- smooth look changes ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .9s; animation-timing-function: ease-in-out; }
.theme-fade, .theme-fade * { transition: background-color .85s ease, color .85s ease, border-color .85s ease, fill .85s ease, box-shadow .85s ease !important; }

/* ---------- rooms: decor and lamps ---------- */
.decor { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.dimmer { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: rgba(8, 5, 18, var(--dim, 0)); transition: background .8s ease; }
.room.room-light .dimmer { background: rgba(40, 30, 50, calc(var(--dim, 0) * .6)); }
.dc { position: absolute; left: var(--x); top: var(--y); font-size: calc(var(--s, 3) * 1vw); line-height: 1; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .25)); }
.lp { all: unset; position: absolute; left: var(--x); top: var(--y); width: var(--w); cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; --tint: #ffd08a; }
.lp:focus-visible { outline: 2px dashed rgba(255, 255, 255, .7); outline-offset: 4px; border-radius: 8px; }
.lp i, .lp b { position: absolute; display: block; }
.lp .halo { left: 50%; top: 50%; width: 520%; aspect-ratio: 1; transform: translate(-50%, -40%); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--tint) 55%, transparent) 0%, transparent 62%); opacity: 0; transition: opacity .7s ease; pointer-events: none; mix-blend-mode: screen; }
.lp.on .halo { opacity: .85; }
/* floor lamp */
.lp-floor { height: 46%; }
.lp-floor .shade { top: 0; left: 0; right: 0; height: 22%; background: #e9c79a; clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%); border-radius: 3px; transition: background .5s, box-shadow .5s; }
.lp-floor .pole { left: 47%; width: 6%; top: 22%; bottom: 3%; background: #2e2420; border-radius: 3px; }
.lp-floor .base { bottom: 0; left: 22%; right: 22%; height: 4%; background: #2e2420; border-radius: 6px; }
.lp-floor.on .shade { background: #ffe0a8; box-shadow: 0 0 22px 8px color-mix(in srgb, var(--tint) 60%, transparent); }
.lp-floor .halo { top: 10%; }
/* pendant */
.lp-pendant { height: 30%; }
.lp-pendant .cord { left: 49%; width: 2%; top: 0; height: 62%; background: #2b2320; }
.lp-pendant .shade { left: 8%; right: 8%; top: 60%; height: 26%; background: var(--tint, #3d3330); clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); }
.lp-pendant:not([style*="--tint"]) .shade { background: #3d3330; }
.lp-pendant .bulb { left: 38%; width: 24%; aspect-ratio: 1; top: 82%; border-radius: 50%; background: #8a7d6e; transition: background .5s, box-shadow .5s; }
.lp-pendant.on .bulb { background: #fff3cf; box-shadow: 0 0 18px 8px rgba(255, 220, 150, .75); }
.lp-pendant .halo { top: 90%; }
/* paper lantern */
.lp-lantern { height: 32%; --tint: #ffb36b; }
.lp-lantern .cord { left: 49%; width: 2%; top: 0; height: 45%; background: #2b2320; }
.lp-lantern .paper { left: 0; right: 0; top: 43%; aspect-ratio: 1 / 1.1; border-radius: 46%; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 14%), color-mix(in srgb, var(--tint) 45%, #6b5a50); transition: background .5s, box-shadow .5s; }
.lp-lantern.on .paper { background: repeating-linear-gradient(0deg, rgba(120, 50, 0, .15) 0 2px, transparent 2px 14%), radial-gradient(circle at 50% 45%, #fff2d6, var(--tint)); box-shadow: 0 0 26px 8px color-mix(in srgb, var(--tint) 55%, transparent); }
.lp-lantern .halo { top: 75%; }
/* bare bulb */
.lp-bulb { height: 26%; }
.lp-bulb .cord { left: 47%; width: 6%; top: 0; height: 70%; background: #2b2320; }
.lp-bulb .bulb { left: 15%; right: 15%; top: 66%; aspect-ratio: 1 / 1.25; border-radius: 50% 50% 46% 46%; background: rgba(200, 190, 170, .5); transition: background .5s, box-shadow .5s; }
.lp-bulb.on .bulb { background: radial-gradient(circle at 50% 40%, #fffbe8, #ffcf7a); box-shadow: 0 0 20px 8px rgba(255, 210, 130, .7); }
.lp-bulb .halo { top: 85%; }
/* wall sconce */
.lp-sconce { height: 14%; }
.lp-sconce .arm { left: 40%; width: 20%; top: 40%; height: 60%; background: #2e2420; border-radius: 3px; }
.lp-sconce .shade { left: 0; right: 0; top: 0; height: 50%; background: #d9b88f; clip-path: polygon(0 0, 100% 0, 78% 100%, 22% 100%); transition: background .5s, box-shadow .5s; }
.lp-sconce.on .shade { background: #ffe6b5; box-shadow: 0 -10px 30px 10px rgba(255, 210, 140, .55); }
.lp-sconce .halo { top: 0; }
/* candles */
.lp-candle { height: 12%; display: flex; }
.lp-candle .wax { position: relative; flex: 1; margin: 0 6%; align-self: flex-end; height: 70%; background: linear-gradient(90deg, #f3e6cf, #fff7e8 40%, #e6d3b3); border-radius: 3px 3px 2px 2px; }
.lp-candle .wax.w1 { height: 50%; } .lp-candle .wax.w2 { height: 85%; }
.lp-candle .flame { left: 50%; bottom: 100%; width: 60%; aspect-ratio: 1 / 1.8; transform: translateX(-50%); border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 70%, #fff6c8, #ffb03a 60%, transparent 70%); opacity: 0; transition: opacity .4s; transform-origin: 50% 100%; animation: flick 1.6s ease-in-out infinite alternate; }
.lp-candle .w1 .flame { animation-delay: -.5s; } .lp-candle .w2 .flame { animation-delay: -1.1s; }
.lp-candle.on .flame { opacity: 1; }
@keyframes flick { 0% { transform: translateX(-50%) scale(1) rotate(-2deg); } 50% { transform: translateX(-50%) scale(1.08, .94) rotate(2deg); } 100% { transform: translateX(-50%) scale(.95, 1.06) rotate(-1deg); } }
.lp-candle .halo { top: 0; width: 360%; }
/* neon sign */
.lp-neon { height: 12%; display: grid; place-items: center; }
.lp-neon .sign { position: relative; font-family: var(--cozy); font-weight: 600; font-size: clamp(14px, 2.6vw, 34px); letter-spacing: .06em; color: color-mix(in srgb, var(--tint, #ff7ab6) 40%, #555); transition: color .4s, text-shadow .4s; white-space: nowrap; }
.lp-neon { --tint: #ff7ab6; }
.lp-neon.on .sign { color: #fff; text-shadow: 0 0 4px #fff, 0 0 10px var(--tint), 0 0 22px var(--tint), 0 0 40px var(--tint); animation: hum 6s steps(1) infinite; }
@keyframes hum { 0%, 96%, 100% { opacity: 1; } 97% { opacity: .75; } 98% { opacity: 1; } 99% { opacity: .85; } }
/* lava lamp */
.lp-lava { height: 18%; --tint: #ff7a59; }
.lp-lava .glass { left: 18%; right: 18%; top: 0; height: 80%; border-radius: 40% 40% 20% 20% / 25% 25% 12% 12%; background: rgba(120, 70, 140, .5); overflow: hidden; transition: background .5s, box-shadow .5s; }
.lp-lava.on .glass { background: linear-gradient(#ffb36b, #ff5e8a); box-shadow: 0 0 16px 4px rgba(255, 120, 120, .5); }
.lp-lava .glass b { width: 50%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 230, 120, .85); left: 25%; animation: lava 9s ease-in-out infinite; }
.lp-lava .glass b:nth-child(2) { width: 34%; left: 10%; animation-duration: 12s; animation-delay: -4s; }
.lp-lava .glass b:nth-child(3) { width: 40%; left: 46%; animation-duration: 14s; animation-delay: -8s; }
@keyframes lava { 0%, 100% { top: 80%; } 50% { top: 2%; } }
.lp-lava .base { left: 10%; right: 10%; bottom: 0; height: 22%; background: #39304a; clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%); }
/* moon lamp */
.lp-moon { aspect-ratio: 1 / 1.25; --tint: #fff1c9; }
.lp-moon .orbx { left: 0; right: 0; top: 0; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #d8d2c4, #9b9384); transition: background .5s, box-shadow .5s; }
.lp-moon.on .orbx { background: radial-gradient(circle at 30% 30%, #fffef4, #ffe9b0 55%, #e8cf8f); box-shadow: 0 0 24px 8px rgba(255, 235, 170, .55); }
.lp-moon .stand { left: 40%; right: 40%; bottom: 0; height: 22%; background: #3b2f2a; border-radius: 3px; }
/* fairy lights */
.lp-string { height: 9%; --tint: #ffd99a; }
.lp-string svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lp-string svg path { fill: none; stroke: #2b2320; stroke-width: .35; vector-effect: non-scaling-stroke; }
.lp-string .fl { width: 7px; margin: 2px 0 0 -3px; height: 9px; border-radius: 50%; background: #8d7d6c; transition: background .4s, box-shadow .4s; }
.lp-string.on .fl { background: #fff1b8; box-shadow: 0 0 8px 3px rgba(255, 215, 130, .85); animation: twink 3s ease-in-out infinite; animation-delay: calc(var(--i) * -.37s); }
.lp-string.on .fl:nth-child(3n) { background: #ffd0e0; box-shadow: 0 0 8px 3px rgba(255, 160, 200, .8); }
.lp-string.on .fl:nth-child(3n+1) { background: #d4f1ff; box-shadow: 0 0 8px 3px rgba(150, 210, 255, .8); }
@keyframes twink { 50% { opacity: .55; } }
.lp-string .halo { display: none; }
/* room picker */
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.roomcard { position: relative; display: grid; gap: 6px; padding: 8px 8px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; transition: border-color .2s, transform .2s; }
.roomcard i { display: grid; place-items: center; height: 62px; border-radius: 11px; font-style: normal; font-size: 30px; background: linear-gradient(180deg, var(--rw2) 0 66%, var(--rd) 66%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.roomcard:hover { border-color: var(--accent); transform: translateY(-1px); }
.roomcard[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
@media (max-width: 600px) {
  .lp, .dc { left: var(--mx, var(--x)); top: var(--my, var(--y)); width: var(--mw, var(--w)); }
  .m-hide { display: none; }
  .lp-pendant, .lp-lantern, .lp-bulb { height: 15%; }
  .lp-lava { height: 10%; }
  .lp-candle { height: 7%; }
  .dc { font-size: calc(var(--s, 3) * 2vw); }
  .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.no-anim .lp *, .no-anim .lp { animation: none !important; }

.support-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.support-btn { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
