/* ==========================================================================
   Startpage — pixel-scenery new tab
   ========================================================================== */
:root {
  --accent: #a78bfa;
  --accent-rgb: 167, 139, 250;
  --tint-rgb: 21, 17, 46;
  --text: #f4f2ff;
  --muted: #bdb7dc;
  --faint: #8d87b0;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.22);
  --surface: rgba(var(--tint-rgb), 0.62);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.1);
  --radius: 18px;
  --radius-sm: 12px;
  --rail-w: 92px;
  --panel-w: 420px;
  --gap: 16px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 10px 30px rgba(4, 2, 16, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: #0c0a1e;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.5; }
kbd {
  font: 600 12px/1 var(--font);
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--surface-3);
  border: 1px solid var(--line);
}
code { font-size: 12px; padding: 1px 5px; border-radius: 5px; background: var(--surface-3); }
.ic { flex: none; display: block; }

/* ---------- background ---------- */
#bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
#bg-canvas, #bg-image { position: absolute; inset: 0; width: 100%; height: 100%; }
#bg-canvas { object-fit: cover; image-rendering: pixelated; }
/* Live sky: time of day and weather tint the scene (see js/sky.js). */
#bg-canvas, #bg-anim { --sky-f: brightness(1); --wx-f: brightness(1); filter: var(--sky-f) var(--wx-f); transition: filter 2s ease; }
[data-sky="day"] #bg-canvas { --sky-f: brightness(1.12) saturate(1.05); }
[data-sky="dawn"] #bg-canvas { --sky-f: brightness(1.04) saturate(1.15) hue-rotate(-8deg); }
[data-sky="dusk"] #bg-canvas { --sky-f: saturate(1.2) hue-rotate(-12deg); }
[data-sky="night"] #bg-canvas { --sky-f: brightness(0.78) saturate(0.9); }
[data-wx="rain"] #bg-canvas, [data-wx="storm"] #bg-canvas { --wx-f: brightness(0.82) saturate(0.7); }
[data-wx="cloudy"] #bg-canvas { --wx-f: saturate(0.8) brightness(0.95); }
[data-wx="fog"] #bg-canvas { --wx-f: contrast(0.78) brightness(1.02) saturate(0.7); }
[data-wx="snow"] #bg-canvas { --wx-f: brightness(1.05) saturate(0.75); }
/* Seasons nudge the palette; events tint it (js/season.js). */
#bg-canvas { filter: var(--sky-f) var(--wx-f) var(--season-f, brightness(1)); }
[data-season="autumn"] #bg-canvas { --season-f: sepia(0.18) saturate(1.1); }
[data-season="winter"] #bg-canvas { --season-f: saturate(0.85) hue-rotate(8deg); }
[data-season="spring"] #bg-canvas { --season-f: saturate(1.08); }
[data-event="haunted"] #bg-canvas { --season-f: hue-rotate(-25deg) saturate(1.2) brightness(0.85); }
/* Ghost grows less transparent the longer you stay with it (js/bonds.js). */
[data-voice="ghost"] .card { transition: opacity 1s; }
[data-voice="ghost"][data-bond="0"] .card { opacity: 0.72; }
[data-voice="ghost"][data-bond="1"] .card { opacity: 0.82; }
[data-voice="ghost"][data-bond="2"] .card { opacity: 0.92; }
#bg-image { background: center / cover no-repeat; }
.bg-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(var(--tint-rgb), 0.55), rgba(var(--tint-rgb), 0) 45%),
    linear-gradient(180deg, rgba(var(--tint-rgb), 0) 35%, rgba(var(--tint-rgb), 0.5) 100%);
}

/* ---------- rail ---------- */
#rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail-w); z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 22px 0 18px;
  background: rgba(var(--tint-rgb), 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-right: 1px solid var(--line);
}
.logo { color: var(--accent); filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.45)); margin-bottom: 12px; }
.spaces { display: flex; flex-direction: column; align-items: center; gap: 14px; flex: 1; overflow-y: auto; scrollbar-width: none; padding: 2px 0; }
.space { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 74px; color: var(--muted); font-size: 13px; font-weight: 500; }
.space-ic { display: grid; place-items: center; width: 64px; height: 44px; border-radius: 14px; transition: background 0.15s, color 0.15s; }
.space:hover .space-ic { background: var(--surface-3); color: var(--text); }
.space.active { color: var(--text); }
.space.active .space-ic {
  background: rgba(var(--accent-rgb), 0.38); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.7), 0 6px 22px rgba(var(--accent-rgb), 0.35);
}
.space-add, .rail-btn {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); color: var(--muted); flex: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.space-add:hover, .rail-btn:hover { color: var(--text); border-color: var(--accent); background: var(--surface-3); }
.rail-btn { border-radius: 12px; border-color: transparent; }
body.panel-open .rail-btn { color: var(--accent); background: rgba(var(--accent-rgb), 0.15); }

/* ---------- main ---------- */
#main {
  margin-left: var(--rail-w);
  min-height: 100vh;
  padding: 72px 32px 32px;
  transition: margin-right 0.2s ease;
}
body.panel-open #main { margin-right: var(--panel-w); }
#hero { position: relative; z-index: 3; max-width: 1320px; margin: 0 auto 36px; padding: 0 12px; }
#hero.compact { margin-top: 40px; }
#greeting { margin-bottom: 30px; }
.g-date { margin: 0 0 4px; font-size: 15px; font-weight: 600; letter-spacing: 0.06em; color: var(--text); }
#greeting h1 {
  margin: 0; font-size: clamp(34px, 4.2vw, 50px); line-height: 1.12; font-weight: 800; letter-spacing: -0.015em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.caret { display: inline-block; width: 3px; height: 0.9em; margin-left: 10px; vertical-align: -0.08em; background: currentColor; opacity: 0.85; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.g-tag { margin: 12px 0 0; font-size: 16px; font-weight: 500; color: rgba(244, 242, 255, 0.88); }

/* ---------- search ---------- */
.search {
  position: relative; display: flex; align-items: center; gap: 14px;
  max-width: 704px; margin: 0 auto; transform: translateX(-8%);
  height: 56px; padding: 0 12px 0 22px;
  border-radius: 999px;
  background: rgba(var(--tint-rgb), 0.6);
  border: 1.5px solid rgba(var(--accent-rgb), 0.75);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12), 0 0 28px rgba(var(--accent-rgb), 0.3), var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.15s;
}
.search:focus-within { box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.25), 0 0 36px rgba(var(--accent-rgb), 0.45), var(--shadow); }
.search > .ic { color: var(--text); }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 16px; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font-size: 15px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.sugg {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20;
  margin: 0; padding: 6px; list-style: none;
  background: rgba(var(--tint-rgb), 0.96); border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: var(--shadow); backdrop-filter: blur(16px);
}
.sugg li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; cursor: pointer; }
.sugg li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg li small { color: var(--faint); }
.sugg li[aria-selected="true"], .sugg li:not(.hint):hover { background: rgba(var(--accent-rgb), 0.2); }
.sugg li.hint { cursor: default; font-size: 12px; color: var(--faint); padding: 8px 14px 6px; }
.sugg li.hint b { color: var(--muted); }

/* ---------- grid ---------- */
.grid { display: flex; flex-wrap: wrap; gap: var(--gap); max-width: 1320px; margin: 0 auto; }
.card {
  --span: 8;
  flex: var(--span) 1 calc(var(--span) / 24 * 100% - var(--gap));
  min-width: 0;
  position: relative; overflow: hidden;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
.layout-focus { max-width: 680px; }
.layout-focus .card { flex-basis: 100%; }
.layout-dense .card { padding: 16px 18px; }
.w-clock { min-width: 240px; } .w-weather { min-width: 380px; } .w-github { min-width: 320px; }
.w-bookmarks { min-width: 400px; } .w-tasks, .w-notes { min-width: 240px; } .w-music { min-width: 500px; } .w-quote { min-width: 300px; }
.grid-empty { width: 100%; padding: 40px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line-strong); border-radius: var(--radius); display: flex; gap: 12px; align-items: center; justify-content: center; }

.card-head { display: flex; align-items: center; gap: 12px; margin: -2px 0 14px; }
.card-head h3 { margin: 0; font-size: 18px; font-weight: 700; flex: 1; }
.ch-icon { display: grid; place-items: center; }
.ch-notes { color: #facc15; }
.ch-github .ic { width: 26px; height: 26px; }
.ch-actions { display: flex; align-items: center; gap: 4px; margin-right: -6px; }
.icon-btn {
  display: inline-grid; place-items: center; position: relative;
  width: 32px; height: 32px; border-radius: 9px; color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.on { color: var(--accent); }
.icon-btn sup { position: absolute; right: 3px; top: 2px; font-size: 9px; font-weight: 800; color: var(--accent); }
.icon-btn.boxed { width: 40px; height: 40px; border: 1px solid var(--line-strong); }
.badge {
  min-width: 30px; height: 26px; padding: 0 8px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(var(--accent-rgb), 0.35); color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.6);
}
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 14px; }

/* drag/edit mode */
.drag-grip { display: none; color: var(--faint); cursor: grab; padding: 6px 4px; }
.drag-grip.floating { position: absolute; top: 10px; right: 10px; }
body.editing .drag-grip { display: grid; place-items: center; }
body.editing .card { outline: 1.5px dashed rgba(var(--accent-rgb), 0.35); outline-offset: -1px; }
.card.dragging { opacity: 0.35; }

/* ---------- clock ---------- */
.w-clock { display: flex; flex-direction: column; justify-content: center; padding-left: 34px; min-height: 140px; }
.clock-time { font-size: clamp(54px, 5.2vw, 72px); font-weight: 600; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; position: relative; }
.clock-time small { font-size: 0.32em; font-weight: 600; margin-left: 6px; color: var(--muted); }
.clock-loc { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--text); font-size: 15px; position: relative; }
.clock-loc .ic { color: var(--muted); }
.card-trees { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 60%; image-rendering: pixelated; opacity: 0.85; pointer-events: none; }

/* ---------- weather ---------- */
.wx { display: flex; align-items: center; height: 100%; gap: 22px; }
.wx-now { display: flex; align-items: center; gap: 8px; flex: 1; }
.wx-now svg { flex: none; margin: -6px -2px -6px -8px; }
.wx-temp { font-size: 52px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.wx-cond { margin-top: 6px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.wx-days { list-style: none; margin: 0; padding: 2px 0 2px 22px; border-left: 1px solid var(--line-strong); display: grid; gap: 4px; }
.wx-days li { display: grid; grid-template-columns: 40px 34px 34px; align-items: center; font-size: 14px; color: var(--muted); }
.wx-days b { color: var(--text); font-weight: 600; text-align: right; }
.wx-empty { display: flex; align-items: center; gap: 10px; height: 100%; color: var(--muted); font-size: 14px; }

/* ---------- github ---------- */
.gh-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gh-list a { display: flex; align-items: center; gap: 10px; padding: 3px 6px; margin: 0 -6px; border-radius: 8px; font-size: 14px; }
.gh-list a:hover { background: var(--surface-2); }
.gh-list svg, .gh-list > li > a > span:first-child { flex: none; }
.gh-repo { font-weight: 600; }
.gh-sep { color: var(--faint); }
.gh-text { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-list time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.gh-pr { color: #c084fc; display: grid; } .gh-push { color: var(--muted); display: grid; }
.gh-run { width: 18px; height: 18px; margin: 1px; border-radius: 50%; border: 2.5px solid #facc15; border-right-color: transparent; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- bookmarks ---------- */
.bm { display: flex; gap: 18px; }
.bm-folders { list-style: none; margin: 0; padding: 0; flex: 0 0 168px; display: grid; align-content: start; gap: 2px; }
.bm-folders button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 8px; margin-left: -8px; border-radius: 9px; font-size: 14.5px; text-align: left; }
.bm-folders button span:nth-child(2) { flex: 1; }
.bm-folders button > .ic { color: var(--muted); }
.bm-folders button:hover { background: var(--surface-3); }
.bm-fi { color: #a5b4fc; display: grid; }
.bm-tiles { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 8px; align-content: start; max-height: 152px; overflow-y: auto; scrollbar-width: thin; }
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  height: 72px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: 11.5px; font-weight: 500; transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.tile:hover { background: var(--surface-3); border-color: rgba(var(--accent-rgb), 0.5); transform: translateY(-1px); }
.tile-ic { position: relative; display: grid; place-items: center; width: 30px; height: 30px; }
.tile-ic img { width: 28px; height: 28px; border-radius: 6px; position: relative; z-index: 1; }
.tile-ic i { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 8px; font-style: normal; font-weight: 800; font-size: 15px; background: rgba(var(--accent-rgb), 0.3); }
.tile-ic.has-img i { display: none; }
.tile-t { max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.add { color: var(--muted); border-style: dashed; }
.tile.add:hover { color: var(--text); }

/* ---------- tasks ---------- */
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 154px; overflow-y: auto; scrollbar-width: thin; }
.task-list li { display: flex; align-items: center; gap: 12px; min-height: 30px; font-size: 14.5px; }
.task-list label { display: grid; cursor: pointer; }
.task-list input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.box { width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--faint); display: grid; place-items: center; color: transparent; transition: 0.15s; flex: none; }
.task-list input:checked + .box { background: #22c55e; border-color: #22c55e; color: #0b1a10; }
.task-list input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.task-list .box .ic { stroke-width: 3.5; }
.task-t { flex: 1; min-width: 0; overflow-wrap: anywhere; outline: 0; border-radius: 4px; }
.task-t[contenteditable="plaintext-only"], .task-t[contenteditable="true"] { background: var(--surface-3); padding: 0 4px; }
.task-list .del { width: 24px; height: 24px; opacity: 0; }
.task-list li:hover .del, .task-list .del:focus-visible { opacity: 1; }
.task-input { flex: 1; background: none; border: 0; border-bottom: 1px solid rgba(var(--accent-rgb), 0.6); outline: 0; padding: 4px 0; }
.empty-li { font-size: 14px; }

/* ---------- notes ---------- */
.notes-body { border-left: 3px solid #facc15; border-radius: 3px; padding-left: 14px; background: linear-gradient(90deg, rgba(250, 204, 21, 0.06), transparent 60%); }
.notes-list { margin: 0; padding: 4px 0 4px 18px; display: grid; gap: 6px; font-size: 14.5px; cursor: text; min-height: 90px; outline: 0; max-height: 154px; overflow-y: auto; scrollbar-width: thin; }
.notes-list .plain { list-style: none; margin-left: -18px; }
.notes-edit { width: 100%; min-height: 128px; resize: vertical; background: none; border: 0; outline: 0; font-size: 14.5px; line-height: 1.55; padding: 2px 0; }

/* ---------- music ---------- */
.w-music { padding: 14px 18px; }
.mu { display: flex; gap: 18px; align-items: stretch; height: 100%; }
.mu-art { flex: none; width: 100px; height: 100px; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.mu-art canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.mu-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.mu-top { display: flex; align-items: center; gap: 12px; }
.mu-meta { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mu-label { font-size: 13px; color: var(--muted); }
.mu-meta strong { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-meta .muted { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-ctrl { display: flex; align-items: center; gap: 4px; color: var(--text); }
.mu-ctrl .icon-btn { color: var(--text); width: 38px; height: 38px; }
.mu-ctrl .icon-btn.on { color: var(--accent); }
.mu-ctrl .icon-btn.liked { color: #f472b6; }
.mu-ctrl .icon-btn.liked svg path { fill: currentColor; }
.mu-play { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #17122e; margin: 0 6px; box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2); transition: transform 0.12s; }
.mu-play:hover { transform: scale(1.06); }
.mu-bottom { display: flex; align-items: center; gap: 16px; }
.mu-bar { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); cursor: pointer; position: relative; }
.mu-bar::before { content: ""; position: absolute; inset: -8px 0; }
.mu-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #c4b5fd); }
.mu-time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- quote ---------- */
.w-quote { padding: 0; min-height: 128px; }
.quote-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.w-quote::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(var(--tint-rgb), 0.55), rgba(var(--tint-rgb), 0.05)); pointer-events: none; }
.quote { position: relative; z-index: 1; display: block; width: 100%; height: 100%; padding: 26px 32px; text-align: left; }
.quote blockquote { margin: 0; font-size: 19px; font-style: italic; font-weight: 500; line-height: 1.4; max-width: 30ch; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.quote cite { display: block; margin-top: 8px; font-size: 13px; font-style: normal; color: rgba(244, 242, 255, 0.85); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.w-quote .drag-grip { z-index: 2; }

/* ---------- panel ---------- */
#panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--panel-w); z-index: 10;
  display: flex; flex-direction: column;
  background: rgba(var(--tint-rgb), 0.9);
  border-left: 1px solid var(--line);
  backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
  animation: slide-in 0.2s ease;
}
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } }
.p-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 10px 24px; }
.p-head h2 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 18px; font-weight: 700; }
.p-find { position: relative; margin: 4px 18px 6px; }
.p-find svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.p-find input { width: 100%; height: 38px; padding: 0 12px 0 36px; border-radius: 11px; font: inherit; font-size: 14px; color: var(--text); outline: 0;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.p-find input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2); }
.p-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; margin: 4px 14px 4px; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); }
.p-tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 7px 1px 6px; border-radius: 9px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.p-tabs button span { max-width: 100%; font-size: 10.5px; line-height: 1.15; text-align: center; overflow-wrap: normal; word-break: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-tabs button:hover { color: var(--text); }
.p-tabs button[aria-selected="true"] { background: rgba(var(--accent-rgb), 0.32); color: #fff; box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.5); }
.p-body { flex: 1; overflow-y: auto; padding: 6px 20px 24px 24px; scrollbar-width: thin; }
.p-sec { padding: 12px 0; }
.p-sec + .p-sec { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.p-sec h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.p-sub { margin: 16px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: end; }
.p-grid .seg { margin: 0; }
.p-more { margin-top: 6px; font-size: 13px; }
.p-more summary { cursor: pointer; color: var(--muted); padding: 4px 0; }
.p-more summary:hover { color: var(--text); }
.p-more p { margin: 6px 0 0; }
.danger-zone h3 { color: #fca5a5; }
.p-none { padding: 28px 4px; text-align: center; font-size: 14px; }
.sr-t { display: grid; gap: 1px; min-width: 0; }
.sr-t small { font-size: 11.5px; color: var(--faint); }

.layout-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.layout-pick button { height: 50px; padding: 8px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--surface-2); }
.layout-pick button[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.35); background: rgba(var(--accent-rgb), 0.12); }
.lp-shape { display: grid; grid-template: repeat(2, 1fr) / repeat(4, 1fr); gap: 3px; width: 100%; height: 100%; }
.lp-shape i { background: rgba(255, 255, 255, 0.25); border-radius: 3px; }
.layout-pick button[aria-checked="true"] i { background: rgba(var(--accent-rgb), 0.55); }

.w-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.w-pick button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  height: 60px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2);
  font-size: 11.5px; color: var(--faint); transition: 0.15s;
}
.w-pick button span { opacity: 0.55; }
.w-pick button[aria-pressed="true"] { color: var(--text); border-color: var(--line-strong); background: var(--surface-3); }
.w-pick button[aria-pressed="true"] span { opacity: 1; }
.w-pick button:hover { border-color: rgba(var(--accent-rgb), 0.6); }
.more-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; height: 32px; border-radius: 9px; border: 1px dashed var(--line-strong); font-size: 13px; color: var(--muted); }
.more-btn:hover { color: var(--text); border-color: var(--accent); }

.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.theme-pick button { position: relative; display: grid; gap: 6px; font-size: 12px; color: var(--muted); text-align: center; }
.theme-pick img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; border: 2px solid transparent; image-rendering: pixelated; transition: 0.15s; }
.theme-pick button:hover img { border-color: var(--line-strong); }
.theme-pick button[aria-pressed="true"] { color: var(--text); }
.theme-pick button[aria-pressed="true"] img { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.35); }
.tick { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; }
.tick .ic { stroke-width: 3.5; }

.bg-row { display: flex; align-items: center; gap: 10px; }
.bg-prev { flex: 1; height: 50px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line-strong); }
.bg-prev img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }

.accent-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.accent-pick button, .accent-custom { width: 32px; height: 32px; border-radius: 50%; background: var(--c); display: grid; place-items: center; color: #fff; transition: transform 0.12s; }
.accent-pick button:hover { transform: scale(1.1); }
.accent-pick button[aria-checked="true"] { box-shadow: 0 0 0 2px rgba(var(--tint-rgb), 1), 0 0 0 4px var(--c); }
.accent-pick button .ic { stroke-width: 3.5; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4)); }
.accent-custom { position: relative; background: conic-gradient(#f87171, #facc15, #4ade80, #22d3ee, #818cf8, #f472b6, #f87171); cursor: pointer; }
.accent-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.accent-custom .ic { stroke-width: 3; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5)); }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { flex: none; width: 40px; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); position: relative; transition: background 0.15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.switch-row input:checked + .switch { background: var(--accent); }
.switch-row input:checked + .switch::after { transform: translateX(16px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-row.bare { padding: 0; }

.w-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.w-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.wl-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); flex: none; }
.wl-t { flex: 1; display: grid; gap: 2px; font-size: 14px; }
.wl-t small { color: var(--faint); font-size: 12px; line-height: 1.35; }

.field { display: grid; gap: 6px; margin: 0 0 12px; font-size: 13px; color: var(--muted); border: 0; padding: 0; min-width: 0; }
.field input:not([type=radio]):not([type=checkbox]), .field select, .loc-search input {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-strong); color: var(--text); font-size: 14px; outline: 0;
}
.field select option { background: #1a1533; }
.field input:focus, .field select:focus, .loc-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.loc-search { display: flex; gap: 8px; }
.loc-results { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 2px; font-size: 14px; }
.loc-results button { width: 100%; text-align: left; padding: 6px 10px; border-radius: 8px; }
.loc-results button:hover { background: var(--surface-3); }
.loc-results li.muted { padding: 4px 10px; font-size: 13px; }
.seg { display: flex; width: max-content; margin: 10px 0 4px; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); }
.seg button { padding: 6px 16px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.seg button[aria-checked="true"] { background: rgba(var(--accent-rgb), 0.35); color: #fff; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-pick label { position: relative; cursor: pointer; }
.icon-pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.icon-pick span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); color: var(--muted); }
.icon-pick input:checked + span { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.25); color: #fff; }
.icon-pick input:focus-visible + span { outline: 2px solid var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-strong);
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: 0.15s;
}
.btn:hover { background: rgba(255, 255, 255, 0.14); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.primary { background: var(--accent); border-color: transparent; color: #140f2a; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: none; }
.btn.danger, .menu-item.danger { color: #fca5a5; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.link { color: var(--accent); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; text-decoration: underline; text-underline-offset: 3px; }
.file-btn { width: 100%; }

/* ---------- dialog / menu / toast ---------- */
dialog#dlg {
  width: min(460px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 18px;
  background: rgba(var(--tint-rgb), 0.97); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
dialog#dlg::backdrop { background: rgba(5, 3, 15, 0.55); backdrop-filter: blur(3px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 6px 22px; }
.dlg-head h2 { margin: 0; font-size: 17px; }
.dlg-body { padding: 10px 22px; max-height: 60vh; overflow-y: auto; }
.dlg-body p { margin: 0 0 14px; }
.dlg-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 10px 22px 20px; }
.dlg-foot .danger { margin-right: auto; }
/* Voiced labels get long ("Never mind (classic)", "Do it. You will anyway"): let them wrap instead of overflowing. */
.dlg-foot .btn { white-space: normal; text-align: center; height: auto; min-height: 40px; padding-top: 8px; padding-bottom: 8px; line-height: 1.25; max-width: 100%; }
@media (max-width: 520px) {
  .dlg-foot { flex-direction: column-reverse; align-items: stretch; }
  .dlg-foot .btn { width: 100%; }
  .dlg-foot .danger { margin-right: 0; order: -1; }
}
.edit-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 2px; font-size: 14px; }
.edit-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0 4px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }

.menu {
  position: fixed; z-index: 50; min-width: 200px; max-width: 300px; max-height: 70vh; overflow-y: auto; padding: 6px;
  background: rgba(var(--tint-rgb), 0.97); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: var(--shadow); backdrop-filter: blur(16px); animation: pop 0.12s ease;
}
@keyframes pop { from { transform: scale(0.97); opacity: 0; } }
.menu-title { padding: 6px 10px 4px; font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; font-size: 14px; text-align: left; color: var(--text); }
.menu-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item:hover, .menu-item:focus-visible { background: rgba(var(--accent-rgb), 0.2); outline: 0; }
.menu-item img { border-radius: 3px; }
.menu-dot { width: 16px; height: 16px; border-radius: 4px; background: rgba(var(--accent-rgb), 0.4); flex: none; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60;
  padding: 10px 18px; border-radius: 12px; font-size: 14px;
  background: rgba(var(--tint-rgb), 0.97); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  transition: opacity 0.3s, transform 0.3s;
}
.toast.out { opacity: 0; transform: translate(-50%, 8px); }
.toast { display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(560px, calc(100vw - 32px)); line-height: 1.4; }
.toast.voiced { flex-wrap: wrap; row-gap: 4px; }
.toast-who { flex-basis: 100%; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.toast span { flex: 1 1 auto; min-width: 0; white-space: pre-line; }
.toast-act { flex: none; font: 600 13px var(--font); color: var(--accent); background: rgba(var(--accent-rgb), 0.15); border: 1px solid rgba(var(--accent-rgb), 0.4); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.toast-act:hover { background: rgba(var(--accent-rgb), 0.28); }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  body.panel-open #main { margin-right: 0; }
  #panel { box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5); }
}
@media (max-width: 900px) {
  .search { transform: none; }
  .card { flex-basis: 100% !important; min-width: 0 !important; }
}
@media (max-width: 720px) {
  :root { --rail-w: 0px; }
  #rail {
    inset: auto 0 0 0; width: auto; height: calc(68px + env(safe-area-inset-bottom)); flex-direction: row; padding: 0 12px env(safe-area-inset-bottom); gap: 8px;
    border-right: 0; border-top: 1px solid var(--line);
  }
  .logo { display: none; }
  .spaces { flex-direction: row; gap: 4px; overflow-x: auto; overflow-y: hidden; }
  .space { width: 60px; font-size: 11px; gap: 2px; }
  .space-ic { width: 48px; height: 32px; }
  #main { padding: calc(36px + env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom)); }
  #hero { padding: 0; margin-bottom: 24px; }
  .bm { flex-direction: column; gap: 12px; }
  .bm-folders { flex-basis: auto; grid-template-columns: 1fr 1fr; }
  .mu { flex-wrap: wrap; }
  .mu-art { width: 72px; height: 72px; }
  .mu-top { flex-wrap: wrap; }
  .mu-ctrl { width: 100%; justify-content: space-between; }
  .mu-ctrl .icon-btn { width: 34px; }
  .search kbd { display: none; }
  .search { padding-left: 18px; }
  #panel { width: 100%; }
  .wx { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ==========================================================================
   v2: card tools, new modules, palette answers
   ========================================================================== */
.g-sub { margin: 8px 0 0; font-size: 14px; color: rgba(244, 242, 255, 0.72); max-width: 60ch; }
.chaos-tag { position: absolute; top: 0; right: 22px; z-index: 2; max-width: calc(100% - 44px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 2px 8px 3px; border-radius: 0 0 7px 7px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.3;
  color: var(--accent); background: rgba(var(--accent-rgb), 0.16); border: 1px solid rgba(var(--accent-rgb), 0.32); border-top: 0; pointer-events: none; }
.card.chaos { padding-top: 30px; } /* room for the voice tab, same on every card */
.dare { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; max-width: 640px; margin: 10px 0 0; padding: 7px 8px 7px 12px; border-radius: 12px; font-size: 13px;
  background: rgba(var(--tint-rgb), 0.55); border: 1px dashed rgba(var(--accent-rgb), 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.dare > svg { flex: none; color: var(--accent); }
.dare span { flex: 1 1 220px; min-width: 0; line-height: 1.4; }
.dare b { color: var(--accent); font-weight: 700; }
.dare.on { border-style: solid; }
.dare.done { border-style: solid; border-color: rgba(74, 222, 128, 0.45); opacity: 0.85; }
.dare.done > svg, .dare.done b { color: #86efac; }
.dare-n { font-style: normal; font-weight: 700; margin-left: 4px; color: var(--accent); }
.g-event { display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 10px 0 0; padding: 6px 6px 6px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4;
  background: rgba(var(--accent-rgb), 0.14); border: 1px solid rgba(var(--accent-rgb), 0.35); }
.g-event b { flex: none; color: var(--accent); }
.g-event span { flex: 1; min-width: 0; }
.g-heckle { margin: 6px 0 0; font-size: 13px; font-style: italic; color: rgba(244, 242, 255, 0.55); max-width: 60ch; }
.g-heckle b { font-style: normal; font-weight: 700; color: var(--accent); margin-right: 2px; }
#bg-anim { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; pointer-events: none; }
.flip { display: grid; transform: scaleX(-1); }
.sugg li span.answer { font-size: 18px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

.card-tools { display: none; position: absolute; right: 10px; bottom: 10px; z-index: 3; }
body.editing .card-tools { display: flex; }
.size-btn { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 7px; font-size: 11px; font-weight: 700;
  background: rgba(var(--tint-rgb), 0.9); border: 1px solid rgba(var(--accent-rgb), 0.5); color: var(--text); }
.size-btn:hover { background: rgba(var(--accent-rgb), 0.3); }
.seg.small { margin: 0; padding: 2px; }
.seg.small button { padding: 4px 10px; font-size: 12px; }
.card-head .seg { margin: 0; }
.w-forecast, .w-focus, .w-calendar, .w-countdown, .w-worldclock, .w-habits, .w-news, .w-vitals { min-width: 280px; }
.w-forecast { min-width: 380px; } .w-news { min-width: 340px; } .w-habits { min-width: 340px; }

/* focus */
.focus { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; }
.focus-ring { position: relative; width: 124px; height: 124px; flex: none; }
.focus-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fr-bg { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 8; }
.fr-fg { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.9s linear; filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.6)); }
.mode-short .fr-fg { stroke: #4ade80; filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.5)); }
.mode-long .fr-fg { stroke: #22d3ee; filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.5)); }
.fr-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; }
.fr-center b { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.fr-center small { font-size: 11.5px; color: var(--muted); max-width: 90px; line-height: 1.2; }
.focus.running .fr-center b { color: #fff; }
.focus-side { flex: 1 1 200px; min-width: 0; display: grid; gap: 12px; justify-items: start; } /* wraps below the ring when there isn't room beside it */
.focus-btns { display: flex; gap: 8px; align-items: center; }
.focus-btns .btn { height: 40px; }
.focus-today { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.focus-today i { width: 9px; height: 9px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); }
.focus-today i.on { background: var(--accent); box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.7); }
.focus-today span { margin-left: 6px; }

/* countdown */
.cd-hero { display: flex; align-items: center; gap: 18px; cursor: pointer; border-radius: 12px; padding: 4px; margin: -4px; }
.cd-hero:hover { background: var(--surface-2); }
.cd-num { display: grid; justify-items: center; min-width: 86px; padding: 8px 10px; border-radius: 14px; background: rgba(var(--accent-rgb), 0.18); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.45); }
.cd-num b { font-size: 34px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.cd-num span { font-size: 11px; color: var(--muted); text-align: center; margin-top: 4px; line-height: 1.2; }
.cd-info { flex: 1; min-width: 0; display: grid; gap: 3px; }
.cd-info strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-info small { color: var(--muted); font-size: 13px; }
.cd-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); margin-top: 6px; overflow: hidden; }
.cd-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #f0abfc); border-radius: inherit; }
.cd-list { list-style: none; margin: 14px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: grid; gap: 2px; max-height: 110px; overflow-y: auto; scrollbar-width: thin; }
.cd-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 4px 6px; margin: 0 -6px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.cd-list li:hover { background: var(--surface-2); }
.cd-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-list li small { color: var(--faint); font-size: 12px; }
.cd-list li b { font-variant-numeric: tabular-nums; font-size: 13px; }
.cd-list li.past { opacity: 0.5; }

/* calendar */
.w-calendar .card-head h3 { font-size: 16px; }
.cal { display: grid; grid-template-columns: 26px repeat(7, 1fr); gap: 2px; text-align: center; font-size: 13px; }
.cal-h { font-size: 11px; font-weight: 700; color: var(--faint); padding: 2px 0 4px; text-transform: uppercase; }
.cal-wk { font-size: 10.5px; color: var(--faint); display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.cal-d { position: relative; height: 28px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.cal-d:hover { background: var(--surface-3); }
.cal-d.out { color: var(--faint); opacity: 0.55; }
.cal-d.today { background: var(--accent); color: #140f2a; font-weight: 800; box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.5); }
.cal-d.ev::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #f472b6; }
.cal-d.today.ev::after { background: #140f2a; }

/* world clocks */
.wc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 170px; overflow-y: auto; scrollbar-width: thin; }
.wc-list li { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.wc-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.wc-ic.day { background: rgba(251, 191, 36, 0.18); color: #fbbf24; }
.wc-ic.night { background: rgba(129, 140, 248, 0.18); color: #c7d2fe; }
.wc-t { flex: 1; min-width: 0; display: grid; }
.wc-t b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-t small { font-size: 12px; color: var(--faint); }
.wc-time { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* news */
.news-list { mask-image: linear-gradient(180deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 85%, transparent); padding-bottom: 14px !important; margin: 0; padding: 0 0 0 26px; display: grid; gap: 9px; max-height: 236px; overflow-y: auto; scrollbar-width: thin; counter-reset: n; list-style: none; }
.news-list li { position: relative; display: grid; gap: 2px; counter-increment: n; }
.news-list li::before { content: counter(n); position: absolute; left: -26px; top: 1px; width: 18px; text-align: right; font-size: 12px; font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
.news-t { font-size: 14px; font-weight: 600; line-height: 1.35; }
.news-t:hover { color: var(--accent); }
.news-t:visited { color: var(--muted); }
.news-meta { font-size: 12px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.news-meta a { display: inline-flex; align-items: center; gap: 3px; }
.news-meta a:hover { color: var(--text); }

/* habits */
.habits { display: grid; gap: 12px; }
.heat { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; aspect-ratio: var(--weeks) / 7; max-height: 130px; }
.heat i { border-radius: 2.5px; background: rgba(255, 255, 255, 0.07); }
.heat i.l1 { background: rgba(var(--accent-rgb), 0.3); } .heat i.l2 { background: rgba(var(--accent-rgb), 0.5); }
.heat i.l3 { background: rgba(var(--accent-rgb), 0.75); } .heat i.l4 { background: var(--accent); box-shadow: 0 0 4px rgba(var(--accent-rgb), 0.6); }
.heat i.fut { background: transparent; }
.habit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 140px; overflow-y: auto; scrollbar-width: thin; }
.habit-list li { display: flex; align-items: center; gap: 10px; }
.habit-n { flex: 1; min-width: 0; text-align: left; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 6px; padding: 2px 4px; margin-left: -4px; }
.habit-n:hover { background: var(--surface-3); }
.habit-s { display: inline-flex; align-items: center; gap: 2px; min-width: 34px; font-size: 12.5px; font-weight: 700; color: #fb923c; font-variant-numeric: tabular-nums; }
.habit-days { display: flex; gap: 3px; }
.habit-days button { width: 24px; height: 24px; border-radius: 7px; font-size: 10.5px; font-weight: 700; color: var(--faint); background: rgba(255, 255, 255, 0.06); border: 1px solid transparent; }
.habit-days button:hover { border-color: rgba(var(--accent-rgb), 0.6); }
.habit-days button.today { border-color: var(--line-strong); color: var(--text); }
.habit-days button.on { background: var(--accent); color: #140f2a; }

/* forecast */
.fc-quip { margin: -6px 0 6px; font-size: 13.5px; color: var(--muted); font-style: italic; }
.fc-chart { display: block; width: 100%; height: auto; overflow: visible; }
.fc-tv { font: 600 12px var(--font); fill: var(--text); }
.fc-tl { font: 500 11px var(--font); fill: var(--faint); }
.fc-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 14px; margin-top: 10px; }
.fc-stat { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 8px; font-size: 13px; padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.fc-stat .ic { color: var(--muted); }
.fc-stat span { color: var(--muted); }
.fc-stat b { font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.aqi-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* repo vitals */
.rv-hero { margin: -4px 0 12px; font-size: 14px; color: var(--text); line-height: 1.45; }
.rv-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; background: rgba(255, 255, 255, 0.06); }
.rv-bar i { display: block; min-width: 4px; }
.rv-legend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.rv-legend li { display: flex; align-items: center; gap: 7px; }
.rv-legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.rv-legend b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.rv-sub { margin: 14px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }
.rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rv-list a { display: flex; align-items: center; gap: 10px; padding: 4px 6px; margin: 0 -6px; border-radius: 8px; font-size: 13.5px; }
.rv-list a:hover { background: var(--surface-2); }
.rv-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rv-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rv-pulse { width: 54px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.rv-pulse i { display: block; height: 100%; background: #facc15; }
.rv-list time { font-size: 12px; color: var(--faint); white-space: nowrap; }
.rv-note { margin: 12px 0 0; }

/* voice picker */
.voice-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.voice-pick button { display: grid; gap: 4px; text-align: left; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); transition: 0.15s; }
.voice-pick button:hover { border-color: rgba(var(--accent-rgb), 0.6); }
.voice-pick button b { font-size: 13.5px; }
.voice-pick button span { font-size: 11.5px; line-height: 1.35; color: var(--faint); }
.voice-pick button[aria-checked="true"] { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.16); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.25); }
.voice-pick button[aria-checked="true"] span { color: var(--muted); }
.theme-pick button.locked { cursor: not-allowed; }
.theme-pick button.locked img { filter: grayscale(0.85) brightness(0.45) blur(1px); }
.theme-pick button.locked span { display: flex; justify-content: center; align-items: center; gap: 4px; font-size: 10.5px; line-height: 1.25; color: var(--faint); }
.ach-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ach-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 11px; border: 1px dashed var(--line); opacity: 0.7; min-width: 0; }
.ach-list li.on { border-style: solid; border-color: rgba(var(--accent-rgb), 0.45); background: rgba(var(--accent-rgb), 0.1); opacity: 1; }
.ach-ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--faint); background: rgba(255, 255, 255, 0.05); }
.ach-list li.on .ach-ic { color: var(--accent); background: rgba(var(--accent-rgb), 0.18); }
.ach-list div { display: grid; gap: 2px; min-width: 0; }
.ach-list b { font-size: 12.5px; }
.ach-list small { font-size: 11px; line-height: 1.3; color: var(--faint); }
.ach-bar { display: block; height: 3px; margin-top: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.ach-bar i { display: block; height: 100%; background: var(--accent); }
@media (max-width: 520px) { .ach-list { grid-template-columns: 1fr; } }
.voice-pick button.locked { cursor: not-allowed; border-style: dashed; background: transparent; opacity: 0.75; }
.voice-pick button.locked b { display: flex; align-items: center; gap: 6px; color: var(--faint); letter-spacing: 0.2em; }
.voice-pick button.locked:hover { border-color: var(--line-strong); }
.voice-pick button.secret b::after { content: "secret"; margin-left: 6px; padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); background: rgba(var(--accent-rgb), 0.15); vertical-align: 1px; }

@media (max-width: 720px) {
  .focus { flex-wrap: wrap; justify-content: center; }
  .focus-side { justify-items: center; }
  .w-forecast, .w-news, .w-habits { min-width: 0; }
  .habit-days button { width: 22px; }
}


/* ---------- wrapped ---------- */
#wrapped { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: 16px;
  background: rgba(5, 3, 15, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade-in 0.25s ease; }
.wr-card { width: min(600px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 18px 24px 20px; border-radius: 22px; animation: pop 0.2s ease;
  background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.2), transparent 45%), rgba(var(--tint-rgb), 0.96); border: 1px solid var(--line-strong); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55); }
.wr-head { display: flex; align-items: center; gap: 12px; }
.wr-kicker { flex: 1; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.wr-card h2 { margin: 10px 0 14px; font-size: clamp(24px, 5vw, 32px); line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
.wr-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wr-rows li { display: flex; gap: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  animation: wr-in 0.45s both; animation-delay: calc(var(--i) * 0.09s); }
@keyframes wr-in { from { opacity: 0; transform: translateY(8px); } }
.wr-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--accent); background: rgba(var(--accent-rgb), 0.15); }
.wr-rows div { min-width: 0; }
.wr-rows b { font-size: 26px; font-weight: 800; line-height: 1; color: var(--text); }
.wr-rows small { margin-left: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.wr-rows p { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.wr-outro { margin: 16px 0 0; font-size: 15px; font-style: italic; }
.wr-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.wr-foot .btn { white-space: normal; }
@media (max-width: 520px) { .wr-foot { flex-direction: column-reverse; } .wr-foot .btn { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .wr-rows li, .wr-card { animation: none; } }

/* ---------- modules: moon, on this day, currency, mood, days since, decide ---------- */
.moon { display: flex; gap: 16px; align-items: flex-start; }
.moon canvas { flex: none; width: 96px; height: 96px; image-rendering: pixelated; filter: drop-shadow(0 0 14px rgba(242, 238, 219, 0.25)); }
.moon-info { display: grid; gap: 4px; min-width: 0; flex: 1; }
.moon-info > b { font-size: 17px; }
.moon-info > small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.moon-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 5px; font-size: 12.5px; }
.moon-list li { display: flex; align-items: center; gap: 7px; }
.moon-list li svg { flex: none; color: var(--faint); }
.moon-list span { flex: 1; color: var(--muted); }
.otd-intro { margin: -6px 0 8px; font-size: 12.5px; }
.otd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.otd-list li { display: grid; grid-template-columns: 46px 1fr; gap: 8px; font-size: 13px; line-height: 1.45; }
.otd-list b { color: var(--accent); font-variant-numeric: tabular-nums; }
.otd-list a { color: inherit; text-decoration: none; }
.otd-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.fx-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; }
.fx-row input, .fx-row select, .dec-in { height: 36px; min-width: 0; padding: 0 10px; border-radius: 9px; font: inherit; font-size: 14px; color: var(--text); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-strong); outline: 0; }
.fx-row select option { background: #1a1533; }
.fx-out { margin: 12px 0 8px; display: grid; gap: 2px; }
.fx-out b { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.fx-out small, .fx-src { font-size: 11.5px; color: var(--faint); }
.fx-others { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.fx-others li { display: flex; justify-content: space-between; }
.fx-others span { color: var(--muted); }
.fx-src { margin: 8px 0 0; }
.mood-q { margin: -4px 0 10px; font-size: 13.5px; color: var(--muted); }
.mood-pick { display: flex; gap: 6px; }
.mood-pick button { flex: 1; height: 42px; border-radius: 11px; font-size: 22px; border: 1px solid var(--line); background: var(--surface-2); filter: grayscale(0.6); opacity: 0.75; transition: 0.15s; }
.mood-pick button:hover, .mood-pick button[aria-checked="true"] { filter: none; opacity: 1; transform: translateY(-1px); }
.mood-pick button[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.3); }
.mood-strip { display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; margin: 12px 0 6px; }
.mood-strip i { height: 14px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); }
.since-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.since-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.since-list li > b { font-size: 26px; font-weight: 800; text-align: center; color: var(--accent); font-variant-numeric: tabular-nums; }
.since-list span { display: grid; min-width: 0; }
.since-list strong { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.since-list small { font-size: 11.5px; color: var(--faint); }
.decide { display: grid; gap: 10px; }
.decide .seg { margin: 0; }
.dec-go { justify-self: start; }
.dec-out { display: grid; gap: 3px; padding: 10px 12px; border-radius: 12px; background: rgba(var(--accent-rgb), 0.12); border: 1px solid rgba(var(--accent-rgb), 0.3); animation: pop 0.25s ease; }
.dec-out b { font-size: 22px; font-weight: 800; }
.dec-out small { font-size: 12.5px; color: var(--muted); }
@media (max-width: 420px) { .fx-row { grid-template-columns: 1fr auto auto; } .fx-row input { grid-column: 1 / -1; } }

/* ---------- morning brief ---------- */
#brief { max-width: 760px; margin: 14px 0 18px; }
.brief-card { padding: 14px 16px 12px; border-radius: 16px; background: rgba(var(--tint-rgb), 0.72); border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: wr-in 0.4s both; }
.brief-head { display: flex; align-items: center; gap: 10px; }
.brief-head b { flex: 1; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.brief-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 7px; }
.brief-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.brief-list li svg { flex: none; margin-top: 3px; color: var(--accent); }
.brief-written { margin: 8px 0 0; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; }
.brief-acts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.brief-acts .link[disabled] { opacity: 0.6; pointer-events: none; }

/* ---------- voice maker ---------- */
.maker { margin-top: 12px; }
.maker-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.maker-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; column-gap: 2px; padding: 8px 6px 8px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); }
.maker-list b { font-size: 13px; grid-column: 1; }
.maker-list span { grid-column: 1; grid-row: 2; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maker-list .icon-btn { grid-row: 1 / span 2; }
.maker-acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- ask a voice ---------- */
#ask { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: 16px; background: rgba(5, 3, 15, 0.5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade-in 0.2s ease; }
.ask-card { width: min(620px, 100%); height: min(640px, calc(100vh - 32px)); display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: 22px;
  background: rgba(var(--tint-rgb), 0.96); border: 1px solid var(--line-strong); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55); animation: pop 0.2s ease; }
.ask-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.ask-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-msg.me { align-self: flex-end; background: rgba(var(--accent-rgb), 0.22); border: 1px solid rgba(var(--accent-rgb), 0.35); }
.ask-msg.them { align-self: flex-start; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.ask-msg.them b { display: block; margin-bottom: 3px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.ask-msg .err { color: #fca5a5; }
.ask-act { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; font-size: 12.5px;
  color: #86efac; background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.25); }
.ask-form { display: flex; gap: 8px; }
.ask-form input, .ask-keyform input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; font-size: 15px; outline: 0;
  background: rgba(255, 255, 255, 0.06); border: 1.5px solid var(--line-strong); color: var(--text); }
.ask-form input:focus, .ask-keyform input:focus { border-color: var(--accent); }
.ask-form .btn, .ask-keyform .btn { height: 44px; }
.ask-setup { display: grid; gap: 10px; font-size: 14px; line-height: 1.5; }
.ask-setup p { margin: 0; }
.ask-setup a { color: var(--accent); }
.ask-keyform { display: flex; gap: 8px; }
.ask-meta { margin: 0; }
@media (max-width: 520px) { .ask-keyform, .ask-form { flex-wrap: wrap; } .ask-keyform .btn { width: 100%; justify-content: center; } }

/* ---------- onboarding ---------- */
#onboard { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px;
  background: rgba(5, 3, 15, 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade-in 0.25s ease; }
@keyframes fade-in { from { opacity: 0; } }
.ob-card { width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; border-radius: 22px;
  background: rgba(var(--tint-rgb), 0.94); border: 1px solid var(--line-strong); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55); }
.ob-card.enter { animation: pop 0.2s ease; }
.ob-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px 12px; transition: box-shadow 0.15s; }
.ob-card.scrolled .ob-head { box-shadow: 0 1px 0 var(--line-strong); } /* divider once the list scrolls under it */
.ob-kicker { display: inline-flex; align-items: center; gap: 8px; flex: 1; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.ob-kicker svg { filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.5)); }
.ob-dots { display: flex; gap: 6px; }
.ob-dots i { width: 22px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.15); transition: background 0.2s; }
.ob-dots i.on { background: var(--accent); }
.ob-body { padding: 8px 22px 8px; overflow-y: auto; }
.ob-body h2 { margin: 0 0 6px; font-size: clamp(22px, 4vw, 28px); line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
.ob-body > p.muted { margin: 0 0 18px; font-size: 14px; line-height: 1.5; }
.ob-input { width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; font-size: 17px; outline: 0;
  background: rgba(255, 255, 255, 0.06); border: 1.5px solid var(--line-strong); color: var(--text); }
.ob-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.2); }
.ob-loc { display: flex; gap: 8px; margin-bottom: 10px; }
.ob-loc .btn { height: 50px; }
.ob-results { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 2px; }
.ob-results button { width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; font-size: 15px; }
.ob-results button:hover, .ob-results button:focus-visible { background: rgba(var(--accent-rgb), 0.2); }
.ob-set { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; font-size: 14px; color: #86efac; }
.ob-voices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ob-voices button { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); transition: 0.15s; }
.ob-voices button:hover { border-color: rgba(var(--accent-rgb), 0.6); }
.ob-voices button b { font-size: 14px; }
.ob-voices button span { font-size: 12.5px; line-height: 1.4; color: var(--muted); font-style: italic; }
.ob-voices button[aria-checked="true"] { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.18); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.3); }
.ob-voices button[aria-checked="true"] span { color: var(--text); }
.ob-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 22px 20px; }
.ob-right { display: flex; gap: 8px; margin-left: auto; }
body.onboarding #main, body.onboarding #rail { pointer-events: none; }
.ob-foot .btn { white-space: normal; text-align: center; height: auto; min-height: 44px; line-height: 1.25; }
@media (max-width: 520px) {
  .ob-voices { grid-template-columns: 1fr; }
  /* Kicker gets its own row; dots and Skip share the next one. */
  .ob-head { flex-wrap: wrap; row-gap: 10px; }
  .ob-kicker { flex-basis: 100%; }
  .ob-dots { flex: 1; }
  /* Buttons stack full-width, main action on top (same as dialogs). */
  .ob-foot { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .ob-right { margin-left: 0; flex-direction: column-reverse; gap: 8px; }
  .ob-foot .btn { width: 100%; }
  .ob-foot > span:empty { display: none; }
}
