/* Room Hub v6
   Pure black base, glass panels, one muted accent per mode.
   Type: Bahnschrift for UI and numbers, Sitka for mode names.
   Both ship with Windows 10 and 11, so nothing downloads and it works offline. */

@property --accent { syntax: "<color>"; inherits: true; initial-value: #93a8d8; }

:root {
  --bone: #eceef2;
  --ash: #858d9e;
  --dim: #4b5262;
  --line: rgba(255, 255, 255, .075);
  --line2: rgba(255, 255, 255, .14);
  --ui: "Bahnschrift", "Barlow", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --disp: "Sitka Banner", "Sitka Display", "Sitka Heading", Constantia, Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.5, .5, 1);
  --r-lg: 28px;
  --r-md: 22px;
  --r-sm: 12px;
}

body.morning { --accent: #e2a85c; --hill1: #2a2130; --hill2: #140e17; }
body.focus   { --accent: #5fc3d4; --hill1: #0b2229; --hill2: #061417; }
body.chill   { --accent: #86c79b; --hill1: #13241d; --hill2: #091410; }
body.movie   { --accent: #d9666f; --hill1: #1c0b0f; --hill2: #0d0507; }
body.night   { --accent: #93a8d8; --hill1: #0c1324; --hill2: #060a14; }

body {
  --a06: color-mix(in srgb, var(--accent) 6%, transparent);
  --a10: color-mix(in srgb, var(--accent) 10%, transparent);
  --a14: color-mix(in srgb, var(--accent) 14%, transparent);
  --a20: color-mix(in srgb, var(--accent) 20%, transparent);
  --a25: color-mix(in srgb, var(--accent) 25%, transparent);
  --a35: color-mix(in srgb, var(--accent) 35%, transparent);
  --a40: color-mix(in srgb, var(--accent) 40%, transparent);
  --a50: color-mix(in srgb, var(--accent) 50%, transparent);
  --a60: color-mix(in srgb, var(--accent) 60%, transparent);
  --a70: color-mix(in srgb, var(--accent) 70%, transparent);
  --a80: color-mix(in srgb, var(--accent) 80%, transparent);
  --acc2: color-mix(in srgb, var(--accent) 58%, #ffffff);
  --acc3: color-mix(in srgb, var(--accent) 50%, #39404d);
  transition: --accent .9s ease;
}

* { box-sizing: border-box; }
html, body {
  height: 100%;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: #000;
  color: var(--bone);
  font-family: var(--ui);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
body { position: relative; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--a40); }

/* Background aura (static so the glass stays cheap to draw) */
.aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(70vw 60vh at 8% -10%, var(--a14), transparent 70%),
    radial-gradient(60vw 60vh at 105% 110%, var(--a10), transparent 70%),
    radial-gradient(40vw 40vh at 60% 40%, rgba(255, 255, 255, .025), transparent 70%),
    #000;
}

/* ---------- header ---------- */
header.top {
  position: relative;
  z-index: 2;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--disp);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: .01em;
}
.mark {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  position: relative;
  border: 1px solid var(--line2);
  background: linear-gradient(180deg, #0b0f18, #000);
  overflow: hidden;
}
.mark::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  right: 4px;
  top: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 1px var(--accent);
}
.mark::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: -9px;
  height: 14px;
  border-radius: 50%;
  background: #1a2133;
}
.hdrR { display: flex; align-items: baseline; gap: 14px; }
#dateLine { color: var(--ash); font-size: 13px; }
#clock {
  font-size: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
body[data-tab="home"] #clock { display: none; }

/* ---------- main + views ---------- */
main {
  position: relative;
  z-index: 1;
  height: calc(100% - 56px - 78px);
  padding: 2px 18px 12px;
}
.view { display: none; height: 100%; min-height: 0; }
.view.active { display: block; animation: viewIn .55s var(--ease) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.homeGrid, .splitGrid { height: 100%; min-height: 0; display: grid; gap: 14px; }
.homeGrid { grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
.splitGrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); }
.lifeGrid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
.yamiGrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }

/* ---------- glass panel ---------- */
.panel {
  position: relative;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(14px, 1.5vw, 22px);
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(165deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015) 42%, rgba(255, 255, 255, .03));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 40px 80px -40px rgba(0, 0, 0, .9);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(140deg, var(--a50), transparent 30%, transparent 72%, rgba(255, 255, 255, .1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.panel > * { position: relative; z-index: 1; }

.pHead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex: none; }
.pHead h2 { margin: 0; font-family: var(--disp); font-weight: 600; font-size: clamp(22px, 2vw, 28px); line-height: 1; }
.num { color: var(--ash); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.num b { color: var(--bone); font-weight: 500; font-size: 24px; }
.chartHead { flex: none; color: var(--ash); font-size: 12px; margin: 6px 0 8px; }

/* ---------- controls ---------- */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, .045);
  color: var(--bone);
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s var(--ease), background .25s, border-color .25s, box-shadow .3s, color .25s, opacity .25s;
}
button svg { width: 18px; height: 18px; flex: none; transition: transform .25s var(--spring); }
button:hover { transform: translateY(-1px) scale(1.035); border-color: var(--a50); background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 1px var(--a20), 0 12px 30px -12px var(--a60); }
button:active { transform: scale(.94); transition-duration: .08s; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .35; cursor: default; transform: none; box-shadow: none; border-color: var(--line2); }
button.primary {
  background: var(--accent);
  color: #05070b;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 10px 30px -12px var(--a80), inset 0 1px 0 rgba(255, 255, 255, .35);
}
button.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); box-shadow: 0 0 0 1px var(--a50), 0 14px 36px -10px var(--a80), inset 0 1px 0 rgba(255, 255, 255, .4); }
.iconBtn { width: 44px; padding: 0; }

input[type="text"], input[type="time"] {
  height: 44px;
  min-width: 0;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line2);
  background: rgba(0, 0, 0, .5);
  color: var(--bone);
  font-family: var(--ui);
  font-size: 15px;
  transition: border-color .2s, box-shadow .25s;
}
input[type="time"] { color-scheme: dark; flex: none; width: 112px; font-variant-numeric: tabular-nums; }
input::placeholder { color: var(--dim); }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--a20); }
input.shake { animation: shake .4s; border-color: var(--accent); }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.addRow { display: flex; gap: 8px; margin-top: 12px; flex: none; }
.addRow input[type="text"] { flex: 1; }

.bar { flex: none; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .06); overflow: hidden; margin-bottom: 12px; }
.bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--a50), var(--accent)); box-shadow: 0 0 12px var(--accent); transition: width .7s var(--ease); }

/* ---------- lists ---------- */
.list { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 2px 6px; scrollbar-width: thin; scrollbar-color: var(--a35) transparent; }
.list::-webkit-scrollbar, .tiles::-webkit-scrollbar { width: 6px; }
.list::-webkit-scrollbar-thumb, .tiles::-webkit-scrollbar-thumb { background: var(--a35); border-radius: 3px; }
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 6px 6px 6px 12px;
  margin-bottom: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
  cursor: pointer;
  transition: transform .2s var(--ease), background .25s, border-color .25s, box-shadow .3s;
}
.item:hover { transform: translateX(3px); border-color: var(--a35); background: rgba(255, 255, 255, .045); }
.item:active { transform: scale(.985); }
.item.next { border-color: var(--a50); background: var(--a10); box-shadow: inset 3px 0 0 var(--accent), 0 0 30px -14px var(--accent); }
.item .tm { flex: none; width: 50px; color: var(--accent); font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 500; }
.item .txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; transition: color .25s; }
.item.done .txt { color: var(--dim); text-decoration: line-through; }
.item.done .tm { color: var(--dim); }
.hRow.done .txt { text-decoration: none; color: var(--acc2); }
.item.pop .check { animation: pop .45s var(--spring); }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.empty { color: var(--dim); font-size: 14px; padding: 16px 4px; }

.check {
  flex: none;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 9px;
  border: 1.5px solid var(--line2);
  background: transparent;
  color: transparent;
}
.check svg { width: 17px; height: 17px; stroke-width: 2.6; }
.check:hover { transform: scale(1.12); }
.check.on { background: var(--accent); border-color: var(--accent); color: #05070b; box-shadow: 0 0 16px -2px var(--a70); }
.del { flex: none; width: 36px; height: 36px; min-height: 36px; padding: 0; border-color: transparent; background: transparent; color: var(--dim); }
.del svg { width: 16px; height: 16px; }
.del:hover { color: var(--bone); background: rgba(255, 255, 255, .06); border-color: var(--line2); box-shadow: none; transform: scale(1.08); }

/* ---------- bar charts ---------- */
.bars { flex: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; height: var(--bh, 104px); align-items: end; }
.bc { display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; min-width: 0; }
.bcN { height: 13px; font-size: 11px; font-weight: 500; color: var(--ash); font-variant-numeric: tabular-nums; line-height: 13px; }
.bcT { position: relative; flex: 1; width: 100%; max-width: 34px; border-radius: 8px; background: rgba(255, 255, 255, .035); overflow: hidden; }
.bcF {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--a60), var(--a14));
  transform-origin: bottom;
  animation: barUp .9s var(--ease) both;
}
.bc.today .bcF { background: linear-gradient(180deg, var(--accent), var(--a35)); box-shadow: 0 0 18px -2px var(--a60); }
.bc.today .bcT { box-shadow: inset 0 0 0 1px var(--a35); }
.bc.none .bcT { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .03) 0 4px, transparent 4px 8px); }
.bcL { font-size: 11px; color: var(--dim); }
.bc.today .bcL { color: var(--accent); font-weight: 600; }
.bc:nth-child(1) .bcF { animation-delay: .02s; }
.bc:nth-child(2) .bcF { animation-delay: .06s; }
.bc:nth-child(3) .bcF { animation-delay: .1s; }
.bc:nth-child(4) .bcF { animation-delay: .14s; }
.bc:nth-child(5) .bcF { animation-delay: .18s; }
.bc:nth-child(6) .bcF { animation-delay: .22s; }
.bc:nth-child(7) .bcF { animation-delay: .26s; }
@keyframes barUp { from { transform: scaleY(0); } }
.bars.mini { --bh: 100%; gap: 5px; }
.bars.mini .bcN { display: none; }
.bars.mini .bcT { max-width: 18px; border-radius: 5px; }
.bars.mini .bcF { border-radius: 5px; }

/* ---------- HOME: sky hero ---------- */
.sky { grid-row: 1 / 3; padding: 0; border-radius: var(--r-lg); background: #000; }
.skyBg, .skyBg i { position: absolute; inset: 0; border-radius: inherit; }
.skyBg i { opacity: 0; transition: opacity 1.2s ease; }
.skyBg i.on { opacity: 1; }
.skyBg [data-m="morning"] { background: linear-gradient(180deg, #0a0f1f 0%, #1d1a33 38%, #4a2b3a 66%, #8e5536 100%); }
.skyBg [data-m="focus"]   { background: linear-gradient(180deg, #02101a 0%, #082634 45%, #0f4656 75%, #1b6170 100%); }
.skyBg [data-m="chill"]   { background: linear-gradient(180deg, #02090a 0%, #0a211e 42%, #263826 72%, #57492e 100%); }
.skyBg [data-m="movie"]   { background: linear-gradient(180deg, #000 0%, #0f0305 45%, #2c090e 78%, #4a1018 100%); }
.skyBg [data-m="night"]   { background: linear-gradient(180deg, #000 0%, #030712 40%, #0a1630 78%, #13234a 100%); }

.stars { position: absolute; left: 0; right: 0; top: 0; height: 72%; opacity: var(--starOp, 1); transition: opacity 1.2s ease; }
body.night { --starOp: 1; }
body.movie { --starOp: .8; }
body.chill { --starOp: .55; }
body.morning { --starOp: .28; }
body.focus { --starOp: .14; }
.stars i, .tvStars i {
  position: absolute;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 5px rgba(255, 255, 255, .7);
  opacity: .15;
  animation: twinkle var(--d) ease-in-out var(--dl) infinite alternate;
}
@keyframes twinkle { to { opacity: 1; } }
.shoot {
  position: absolute;
  top: 14%;
  left: 78%;
  width: 130px;
  height: 1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0));
  opacity: 0;
  transform: rotate(155deg);
  transform-origin: left center;
  animation: shoot 13s linear 4s infinite;
}
@keyframes shoot {
  0%, 90% { opacity: 0; transform: rotate(155deg) translateX(0); }
  91% { opacity: 1; }
  96% { opacity: 0; transform: rotate(155deg) translateX(320px); }
  100% { opacity: 0; transform: rotate(155deg) translateX(320px); }
}

.orb {
  --os: clamp(56px, 8.5vmin, 104px);
  position: absolute;
  left: var(--ox, 72%);
  top: var(--oy, 22%);
  width: var(--os);
  height: var(--os);
  margin: calc(var(--os) / -2) 0 0 calc(var(--os) / -2);
  transition: left 2s var(--ease), top 2s var(--ease);
}
.orb .bob { position: absolute; inset: 0; animation: floaty 7s ease-in-out infinite; }
.orb i { position: absolute; border-radius: 50%; display: block; }
.orb .halo { inset: -85%; background: radial-gradient(circle, var(--a35) 0%, var(--a10) 40%, transparent 68%); animation: halo 5.5s ease-in-out infinite; }
.orb .rays {
  inset: -42%;
  background: repeating-conic-gradient(from 0deg, var(--a35) 0deg 3deg, transparent 3deg 15deg);
  -webkit-mask: radial-gradient(circle, transparent 43%, #000 47%, transparent 71%);
  mask: radial-gradient(circle, transparent 43%, #000 47%, transparent 71%);
  animation: spin 70s linear infinite;
  transition: opacity 1s;
}
.orb .core {
  inset: 0;
  background: radial-gradient(circle at 36% 34%, #fff 0%, color-mix(in srgb, var(--accent) 55%, #fff) 30%, var(--accent) 62%, color-mix(in srgb, var(--accent) 70%, #000) 100%);
  box-shadow: 0 0 34px 6px var(--a60), 0 0 110px 26px var(--a20);
}
.orb .core::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 1s;
  background:
    radial-gradient(circle at 64% 60%, rgba(40, 50, 75, .22) 0 10%, transparent 11%),
    radial-gradient(circle at 38% 68%, rgba(40, 50, 75, .18) 0 7%, transparent 8%),
    radial-gradient(circle at 58% 30%, rgba(40, 50, 75, .14) 0 6%, transparent 7%),
    radial-gradient(circle at 30% 42%, rgba(40, 50, 75, .1) 0 4%, transparent 5%);
}
body.night .orb .core, body.movie .orb .core { background: radial-gradient(circle at 38% 36%, #fcfdff 0%, #e2e7f2 46%, #aeb8cf 100%); }
body.night .orb .core::after, body.movie .orb .core::after { opacity: 1; }
body.night .orb .rays, body.movie .orb .rays { opacity: 0; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes halo { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.14); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene .h1 { fill: var(--hill1); transition: fill 1s; }
.scene .h2 { fill: var(--hill2); transition: fill 1s; }
.scene .h3, .scene .pine path, .scene .hb { fill: #020306; }
.scene .roofEdge { fill: none; stroke: var(--a40); stroke-width: 1.2; }
.scene .win { fill: var(--accent); animation: winGlow 3.4s ease-in-out infinite alternate; }
.scene .w2 { animation-delay: -1.3s; animation-duration: 4.1s; }
.scene .w3 { animation-delay: -2.2s; animation-duration: 2.8s; }
.scene .pane { stroke: #020306; stroke-width: 2; fill: none; }
.scene .door { fill: var(--a20); stroke: var(--a40); stroke-width: 1; }
.scene .sp0 { stop-color: var(--accent); stop-opacity: .3; }
.scene .sp1 { stop-color: var(--accent); stop-opacity: 0; }
.scene .smoke { fill: rgba(255, 255, 255, .12); transform-box: fill-box; transform-origin: center; animation: smoke 6s ease-out infinite; opacity: 0; }
.scene .s2 { animation-delay: 2s; }
.scene .s3 { animation-delay: 4s; }
@keyframes winGlow { from { opacity: .62; } to { opacity: 1; } }
@keyframes smoke {
  0% { opacity: 0; transform: translate(0, 0) scale(.6); }
  15% { opacity: .9; }
  100% { opacity: 0; transform: translate(14px, -46px) scale(2.4); }
}

.skyTop { position: absolute; z-index: 2; top: clamp(16px, 2.4vh, 26px); left: clamp(18px, 2vw, 28px); right: 40%; }
.chip {
  min-height: 30px;
  height: 30px;
  padding: 0 12px 0 10px;
  gap: 8px;
  border-radius: 9px;
  font-size: 12.5px;
  background: rgba(0, 0, 0, .35);
  border-color: var(--line2);
  color: var(--bone);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: livePulse 2.2s ease-in-out infinite; }
.chip.manual i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ash); animation: none; }
@keyframes livePulse { 50% { opacity: .35; } }
.modeName {
  margin-top: clamp(10px, 2vh, 18px);
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(30px, 3.4vw, 50px);
  line-height: 1;
  color: var(--acc2);
  text-shadow: 0 0 30px var(--a35);
  white-space: nowrap;
}
.bigTime {
  margin-top: 4px;
  font-family: var(--ui);
  font-weight: 200;
  font-size: clamp(64px, min(11vw, 17vh), 168px);
  line-height: .95;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-shadow: 0 8px 40px rgba(0, 0, 0, .6);
}
.colon { animation: colon 2s ease-in-out infinite; }
@keyframes colon { 50% { opacity: .3; } }

.skyBottom { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 14px; display: grid; gap: 10px; }
.modes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mode {
  flex-direction: column;
  gap: 6px;
  min-height: 64px;
  padding: 10px 4px;
  font-size: 12.5px;
  color: var(--ash);
  background: rgba(0, 0, 0, .5);
  border-color: var(--line2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.mode svg { width: 21px; height: 21px; }
.mode:hover svg { transform: scale(1.15); }
.mode.active { color: var(--bone); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, rgba(0, 0, 0, .55)); box-shadow: inset 0 0 0 1px var(--a40), 0 0 30px -6px var(--a70); }
.mode.active svg { color: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }

.timeline {
  padding: 12px 14px 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.tl { position: relative; height: 8px; }
.tl .seg { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: rgba(255, 255, 255, .07); border-left: 2px solid #000; transition: background .8s, box-shadow .8s; }
.tl .seg.on { background: var(--a35); box-shadow: 0 0 14px var(--a40); }
#dayTrack { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: linear-gradient(90deg, rgba(255, 255, 255, .02), var(--a50)); pointer-events: none; transition: width 1s var(--ease); }
.tlEvents .ev { position: absolute; top: -5px; width: 2px; height: 18px; margin-left: -1px; border-radius: 1px; background: var(--bone); opacity: .7; }
.tlEvents .ev.done { opacity: .2; }
.tlEvents .ev.next { background: var(--accent); opacity: 1; box-shadow: 0 0 8px var(--accent); }
.tl .now { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--bone); box-shadow: 0 0 0 3px var(--a50), 0 0 18px 2px var(--accent); transition: left 1s var(--ease); }
.tl .now::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--accent); animation: ping 2.4s ease-out infinite; }
@keyframes ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(2); opacity: 0; } }
.tlLabels { position: relative; height: 14px; margin-top: 8px; font-size: 11px; color: var(--dim); }
.tlLabels span { position: absolute; transform: translateX(-50%); white-space: nowrap; transition: color .6s; }
.tlLabels span.on { color: var(--accent); font-weight: 600; }

/* ---------- HOME: today rings ---------- */
.ringsRow { flex: 1; min-height: 0; display: flex; align-items: center; gap: clamp(14px, 1.8vw, 26px); }
.rings { position: relative; height: 100%; max-height: 230px; aspect-ratio: 1; max-width: 52%; flex: none; }
.rings svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.rings circle { fill: none; stroke-width: 12.5; }
.rings .trk { stroke: rgba(255, 255, 255, .055); }
.rings .arc { stroke-linecap: round; opacity: 0; transition: stroke-dashoffset 1.1s var(--ease), opacity .4s; }
.rings .a1 { stroke: var(--accent); filter: drop-shadow(0 0 6px var(--a60)); }
.rings .a2 { stroke: var(--acc2); }
.rings .a3 { stroke: var(--acc3); }
.ringC { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.ringC b { font-weight: 300; font-size: clamp(22px, 2.2vw, 34px); line-height: 1; font-variant-numeric: tabular-nums; }
.ringC span { color: var(--ash); font-size: 12px; margin-top: 4px; }
.legend { flex: 1; min-width: 0; display: grid; gap: clamp(8px, 1.4vh, 14px); }
.lg { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; row-gap: 6px; font-size: 14px; color: var(--ash); }
.lg i { width: 10px; height: 10px; border-radius: 3px; }
.lg .k1 { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.lg .k2 { background: var(--acc2); }
.lg .k3 { background: var(--acc3); }
.lg b { color: var(--bone); font-weight: 500; font-size: 20px; font-variant-numeric: tabular-nums; }
.lg em { grid-column: 2 / 4; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.lg em u { display: block; height: 100%; width: 0; background: var(--accent); transition: width 1s var(--ease); }
.lg:nth-child(2) em u { background: var(--acc2); }
.lg:nth-child(3) em u { background: var(--acc3); }

.nextBox {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .35);
  font-size: 14px;
}
.tag { flex: none; padding: 3px 8px; border-radius: 6px; background: var(--a20); color: var(--accent); font-size: 11.5px; font-weight: 600; }
.nextBox .nT { flex: none; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--bone); }
.nextBox .nX { flex: 1; min-width: 0; color: var(--ash); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nextBox.clear .nX { color: var(--accent); }

/* ---------- HOME: focus timer ---------- */
.focusRow { flex: 1; min-height: 0; display: flex; align-items: center; gap: clamp(14px, 1.8vw, 26px); }
.tRing { position: relative; height: 100%; max-height: 230px; aspect-ratio: 1; max-width: 50%; flex: none; }
.tRing svg { width: 100%; height: 100%; overflow: visible; }
.tTrk { fill: none; stroke: rgba(255, 255, 255, .055); stroke-width: 9; }
.tArc { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .5s linear; filter: drop-shadow(0 0 5px var(--a50)); }
.tk { stroke: rgba(255, 255, 255, .14); stroke-width: 2; stroke-linecap: round; transition: stroke .4s; }
.tk.on { stroke: var(--accent); }
body.timer-on .tRing svg { animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { filter: drop-shadow(0 0 14px var(--a40)); } }
body.timer-paused .tArc { stroke: var(--ash); filter: none; }
.tC { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.tC b { font-weight: 300; font-size: clamp(26px, 2.8vw, 42px); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tC span { color: var(--ash); font-size: 12px; margin-top: 4px; }
body.timer-on .tC span { color: var(--accent); }
.fSide { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.fBtns { display: flex; gap: 8px; flex-wrap: wrap; }
.fBtns .primary { flex: 1; min-width: 104px; }
.fStat { display: flex; align-items: stretch; gap: 14px; height: clamp(54px, 9vh, 84px); }
.fNum { display: flex; flex-direction: column; justify-content: flex-end; }
.fNum b { font-size: 30px; font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; }
.fNum span { color: var(--ash); font-size: 12px; margin-top: 4px; }
.fStat .bars { flex: 1; height: 100%; }

/* ---------- PLAN: 24h dial ---------- */
.dialPanel { padding: clamp(10px, 1.2vw, 18px); }
.dialWrap { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; }
.dial { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dTrack { fill: none; stroke: rgba(255, 255, 255, .05); stroke-width: 2; }
.dElapsed { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; filter: drop-shadow(0 0 4px var(--accent)); }
.dseg { fill: none; stroke: rgba(255, 255, 255, .065); stroke-width: 12; transition: stroke .8s; }
.dseg.on { stroke: var(--a35); }
.dTick { stroke: rgba(255, 255, 255, .16); stroke-width: 1.2; stroke-linecap: round; }
.dTick.major { stroke: rgba(255, 255, 255, .4); stroke-width: 1.6; }
.dLbl { fill: var(--ash); font-family: var(--ui); font-size: 10px; text-anchor: middle; }
.dEv { fill: #000; stroke: var(--bone); stroke-width: 2; transition: r .3s; cursor: default; }
.dEv.done { fill: var(--a50); stroke: var(--a50); }
.dEv.next { fill: var(--accent); stroke: #fff; stroke-width: 1.5; }
.dPulse { fill: none; stroke: var(--accent); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: dpulse 2.2s ease-out infinite; }
@keyframes dpulse { from { transform: scale(.8); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
.dHandLine { stroke: var(--bone); stroke-width: 2; stroke-linecap: round; opacity: .75; }
.dTip { fill: var(--bone); filter: drop-shadow(0 0 6px var(--accent)); }
.dialC { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; pointer-events: none; padding: 0 30%; }
.dialC b { margin-top: 8px; font-weight: 200; font-size: clamp(34px, 4.4vw, 62px); line-height: 1; font-variant-numeric: tabular-nums; }
.dText { margin-top: 6px; max-width: 100%; color: var(--ash); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- CLEAN ---------- */
.cleanViz { justify-content: space-between; }
.cRingWrap { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; }
.cRing { position: absolute; inset: 6px 0; width: 100%; height: calc(100% - 12px); overflow: visible; }
.cTrk { fill: none; stroke: rgba(255, 255, 255, .03); stroke-width: 22; }
.cseg { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 18; transition: stroke .5s, filter .5s; }
.cseg.on { stroke: var(--accent); filter: drop-shadow(0 0 7px var(--a70)); }
.ringC.big b { font-size: clamp(36px, 4.6vw, 66px); font-weight: 200; }
.ringC.big span { font-size: 14px; }
.cleanViz .bars { --bh: clamp(70px, 14vh, 120px); }

.tiles { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: minmax(84px, auto); gap: 10px; align-content: start; margin: 0 -6px; padding: 2px 6px; scrollbar-width: thin; scrollbar-color: var(--a35) transparent; }
.tile { position: relative; border-radius: 16px; transition: transform .22s var(--ease); }
.tile:hover { transform: scale(1.03); }
.tile:active { transform: scale(.97); }
.tileBtn {
  width: 100%;
  height: 100%;
  min-height: 84px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  text-align: left;
  background: rgba(255, 255, 255, .03);
  border-color: var(--line);
}
.tileBtn:hover, .tileBtn:active { transform: none; }
.tile .tk {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1.5px solid var(--line2);
  color: transparent;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.tile .tk svg { width: 16px; height: 16px; stroke-width: 2.6; }
.tile .nm { font-size: 15px; line-height: 1.25; padding-right: 20px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile.on .tileBtn { background: color-mix(in srgb, var(--accent) 13%, transparent); border-color: var(--a50); box-shadow: 0 0 30px -14px var(--accent); }
.tile.on .tk { background: var(--accent); border-color: var(--accent); color: #05070b; box-shadow: 0 0 14px -2px var(--a70); }
.tile.on .nm { color: var(--ash); }
.tile.pop .tk { animation: pop .45s var(--spring); }
.tile .x { position: absolute; z-index: 2; top: 6px; right: 6px; width: 30px; height: 30px; min-height: 30px; padding: 0; border-color: transparent; background: transparent; color: var(--dim); }
.tile .x svg { width: 15px; height: 15px; }
.tile .x:hover { color: var(--bone); background: rgba(0, 0, 0, .4); box-shadow: none; }

/* ---------- LIFE ---------- */
.lifeGrid .bars.stack { --bh: clamp(74px, 14vh, 118px); margin-bottom: 12px; }
.hRow .streak { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--dim); font-variant-numeric: tabular-nums; }
.hRow .streak svg { width: 15px; height: 15px; }
.hRow .streak b { font-weight: 500; font-size: 15px; min-width: 14px; }
.hRow .streak.hot { color: var(--accent); }
.hRow .streak.hot svg { fill: var(--a35); filter: drop-shadow(0 0 4px var(--accent)); }
.hRow .streak.hot b { color: var(--bone); }
.wk { flex: none; display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.wk i { display: block; width: 7px; height: 7px; border-radius: 2px; background: rgba(255, 255, 255, .09); transition: height .4s var(--ease), background .3s; }
.wk i.on { height: 26px; background: linear-gradient(180deg, var(--accent), var(--a35)); }
.wk i.today { box-shadow: 0 0 0 1px var(--a50); }
.winTop { flex: none; display: flex; align-items: stretch; gap: 18px; margin-bottom: 12px; height: clamp(74px, 14vh, 118px); }
.winBig { display: flex; flex-direction: column; justify-content: flex-end; min-width: 64px; }
.winBig b { font-size: clamp(40px, 4vw, 58px); font-weight: 200; line-height: .9; font-variant-numeric: tabular-nums; color: var(--acc2); }
.winBig span { color: var(--ash); font-size: 12px; margin-top: 6px; }
.winTop .bars { flex: 1; height: 100%; }
.wItem { cursor: default; padding-left: 14px; }
.wItem:hover { transform: none; }
.wItem .dia { flex: none; width: 8px; height: 8px; transform: rotate(45deg); background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.wItem .wd { flex: none; color: var(--dim); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* ---------- YAMI ---------- */
.yamiPanel { align-items: stretch; }
.stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--sz) * .3); --sz: clamp(96px, min(21vh, 18vw), 210px); }
.avatar { position: relative; width: var(--sz); height: var(--sz); flex: none; }
.orbit { position: absolute; border-radius: 50%; display: block; pointer-events: none; }
.orbit.o1 { inset: -13%; border: 1px dashed var(--a50); animation: spin 36s linear infinite; }
.orbit.o2 { inset: -27%; border: 1px solid var(--a14); animation: spin 60s linear infinite reverse; }
.orbit.o2::after { content: ""; position: absolute; top: 50%; left: -4px; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, color-mix(in srgb, var(--accent) 34%, #1b2230) 0%, #070a10 62%, #000 100%);
  box-shadow: inset 0 0 0 1px var(--a40), inset 0 -24px 46px -14px var(--a50), 0 0 70px -10px var(--a60);
  animation: floaty 6s ease-in-out infinite;
}
.eyes { position: absolute; left: 0; right: 0; top: 34%; height: 22%; display: flex; justify-content: center; gap: 20%; }
.eyes i { display: block; width: 11%; height: 100%; border-radius: 40% / 30%; background: var(--bone); box-shadow: 0 0 14px var(--accent), 0 0 4px #fff; animation: blink 5.2s infinite; transform-origin: center 60%; }
.eyes i:nth-child(2) { animation-delay: .06s; }
@keyframes blink { 0%, 44%, 50%, 100% { transform: scaleY(1); } 47% { transform: scaleY(.08); } }
.avatar.happy .eyes i { height: 46%; margin-top: 6%; background: transparent; border: 3px solid var(--bone); border-bottom: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; box-shadow: none; filter: drop-shadow(0 0 6px var(--accent)); animation: none; width: 15%; }
.mouth { position: absolute; left: 50%; top: 64%; transform: translateX(-50%); display: flex; align-items: center; gap: 3px; height: 14%; }
.mouth i { display: block; width: 4px; height: 20%; border-radius: 2px; background: var(--accent); box-shadow: 0 0 6px var(--accent); animation: hum 1.6s ease-in-out infinite; }
.mouth i:nth-child(2) { animation-delay: -.2s; }
.mouth i:nth-child(3) { animation-delay: -.4s; }
.mouth i:nth-child(4) { animation-delay: -.6s; }
.mouth i:nth-child(5) { animation-delay: -.8s; }
.mouth i:nth-child(6) { animation-delay: -1s; }
.mouth i:nth-child(7) { animation-delay: -1.2s; }
@keyframes hum { 0%, 100% { height: 18%; } 50% { height: 42%; } }
.avatar.talk .mouth i { animation: talk .32s ease-in-out 5 alternate; }
@keyframes talk { from { height: 20%; } to { height: 100%; } }
body.music-on .mouth i { animation-duration: .5s; }
.yamiMsg { margin: 0; font-family: var(--disp); font-weight: 600; font-size: clamp(24px, 2.6vw, 36px); line-height: 1.1; text-align: center; color: var(--bone); min-height: 1.1em; }
.vbars { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; height: clamp(96px, 20vh, 170px); margin: 6px 0 14px; }
.vb { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.vb b { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--bone); }
.vb span { font-size: 12px; color: var(--ash); }
.tube { position: relative; flex: 1; width: 100%; max-width: 52px; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.tube i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; display: block; background: linear-gradient(180deg, var(--accent), var(--a25)); box-shadow: 0 -2px 16px var(--a60); transition: height 1.2s var(--ease); overflow: hidden; }
.tube i::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #fff; opacity: .55; animation: capGlow 2s ease-in-out infinite; }
.tube i::after { content: ""; position: absolute; left: 0; right: 0; height: 60%; top: 100%; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .28), transparent); animation: rise 2.8s ease-in-out infinite; }
.vb:nth-child(2) .tube i::after { animation-delay: .5s; }
.vb:nth-child(3) .tube i::after { animation-delay: 1s; }
.vb:nth-child(4) .tube i::after { animation-delay: 1.5s; }
@keyframes rise { from { top: 100%; } to { top: -60%; } }
@keyframes capGlow { 50% { opacity: .15; } }
.vbars.scan .tube i { animation: refill .9s var(--ease); }
@keyframes refill { 0% { transform: translateY(100%); } 100% { transform: none; } }
.btnRow { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#autoBtn.on { border-color: var(--a50); color: var(--accent); }

.musicPanel { gap: 12px; }
.viz { position: relative; flex: 1; min-height: 80px; border-radius: 16px; background: radial-gradient(120% 90% at 50% 50%, var(--a10), transparent 70%), rgba(0, 0, 0, .3); border: 1px solid var(--line); overflow: hidden; }
.viz canvas { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); display: block; }
.track { flex: none; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
#trackName { min-width: 0; font-family: var(--disp); font-weight: 600; font-size: clamp(20px, 2vw, 26px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tTime { flex: none; display: flex; gap: 10px; color: var(--ash); font-size: 13px; font-variant-numeric: tabular-nums; }
#trackCount { color: var(--accent); }
input[type="range"] { -webkit-appearance: none; appearance: none; flex: none; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; --p: 0%; }
input[type="range"]::-webkit-slider-runnable-track { height: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p), rgba(255, 255, 255, .09) var(--p)); }
input[type="range"]::-moz-range-track { height: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p), rgba(255, 255, 255, .09) var(--p)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; margin-top: -5px; border-radius: 50%; background: var(--bone); box-shadow: 0 0 0 3px var(--a40), 0 0 12px var(--accent); transition: transform .2s; }
input[type="range"]::-moz-range-thumb { width: 15px; height: 15px; border: 0; border-radius: 50%; background: var(--bone); box-shadow: 0 0 0 3px var(--a40), 0 0 12px var(--accent); }
input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.25); }
input[type="range"]:focus { outline: none; box-shadow: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent); }
.ctrls { flex: none; display: flex; align-items: center; justify-content: center; gap: 16px; }
.ctrls .iconBtn { width: 50px; height: 50px; border-radius: 14px; }
.ctrls svg { width: 20px; height: 20px; }
.playBtn { width: 66px; height: 66px; padding: 0; border-radius: 20px; }
.playBtn svg { width: 26px; height: 26px; }
body.music-on .playBtn { animation: playGlow 2.4s ease-in-out infinite; }
@keyframes playGlow { 50% { box-shadow: 0 0 0 6px var(--a14), 0 14px 40px -8px var(--a80); } }
.grid3 { flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid2b { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- nav ---------- */
nav { position: relative; z-index: 2; height: 78px; padding: 4px 18px 14px; }
.navInner {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .035);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  overflow: hidden;
}
.navInk { position: absolute; top: 0; bottom: 0; left: 0; width: 20%; transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .5s var(--ease); pointer-events: none; }
.navInk::before { content: ""; position: absolute; inset: 6px; border-radius: 12px; background: var(--a14); border: 1px solid var(--a35); }
.navInk::after { content: ""; position: absolute; left: 32%; right: 32%; top: 0; height: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 14px 2px var(--accent); }
nav button { position: relative; z-index: 1; flex-direction: column; gap: 4px; height: 100%; min-height: 0; border: 0; border-radius: 0; background: transparent; color: var(--ash); font-size: 12px; }
nav button svg { width: 22px; height: 22px; }
nav button:hover { transform: none; background: transparent; box-shadow: none; color: var(--bone); }
nav button:hover svg { transform: scale(1.14); }
nav button:active svg { transform: scale(.88); }
nav button.active { color: var(--bone); }
nav button.active svg { color: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
nav button:focus-visible { outline-offset: -4px; border-radius: 14px; }

/* ---------- TV ---------- */
#tvView { display: none; position: fixed; inset: 0; z-index: 50; overflow: hidden; background: #000; }
body.show-tv #tvView { display: block; }
body.show-tv header.top, body.show-tv main, body.show-tv nav, body.show-tv .aura { display: none; }
#tvGlow { position: absolute; inset: -20%; pointer-events: none; background: radial-gradient(42% 42% at 50% 46%, var(--a25), transparent 70%), radial-gradient(30% 30% at 80% 20%, var(--a14), transparent 70%); animation: tvDrift 24s ease-in-out infinite alternate; }
@keyframes tvDrift { from { transform: translate(-2%, -1%) scale(1); } to { transform: translate(2%, 1.5%) scale(1.06); } }
.tvStars { position: absolute; inset: 0 0 30% 0; opacity: var(--starOp, 1); }
.tvOrb { position: absolute; right: 8vw; top: 9vh; width: 16vmin; height: 16vmin; animation: floaty 9s ease-in-out infinite; }
.tvOrb i { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 36% 34%, #fff 0%, var(--acc2) 34%, var(--accent) 70%); box-shadow: 0 0 60px 10px var(--a50), 0 0 200px 60px var(--a20); opacity: .85; }
.tvOrb i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: 0; background: radial-gradient(circle at 64% 60%, rgba(40, 50, 75, .2) 0 10%, transparent 11%), radial-gradient(circle at 38% 68%, rgba(40, 50, 75, .16) 0 7%, transparent 8%), radial-gradient(circle at 58% 30%, rgba(40, 50, 75, .12) 0 6%, transparent 7%); }
body.night .tvOrb i::after, body.movie .tvOrb i::after { opacity: 1; }
body.night .tvOrb i, body.movie .tvOrb i { background: radial-gradient(circle at 38% 36%, #fcfdff 0%, #dfe5f2 48%, #a8b3cc 100%); }
.tvCenter { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-bottom: 6vh; }
#tvMode { font-family: var(--disp); font-weight: 600; font-size: clamp(24px, 3.6vw, 60px); color: var(--acc2); text-shadow: 0 0 40px var(--a50); }
#tvClock { font-family: var(--ui); font-weight: 200; font-size: min(27vw, 50vh); line-height: .9; letter-spacing: -.03em; font-variant-numeric: tabular-nums; text-shadow: 0 0 80px var(--a25); }
#tvDate { margin-top: 1.5vh; color: var(--ash); font-size: clamp(14px, 1.9vw, 30px); }
#tvFocus { margin-top: 2vh; font-size: clamp(16px, 2vw, 32px); color: var(--accent); font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .5s; }
#tvFocus.show { opacity: 1; }
.tvBottom { position: absolute; left: 6vw; right: 6vw; bottom: 6vh; }
.tvNext { margin: 0; padding: 14px 18px; font-size: clamp(16px, 2.1vw, 34px); border-radius: 16px; background: rgba(0, 0, 0, .4); }
.tvNext .tag { font-size: .55em; padding: .3em .7em; }
.tvTrack { height: 4px; margin-top: 18px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.tvTrack i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--a25), var(--accent)); box-shadow: 0 0 12px var(--accent); transition: width 1s var(--ease); }
.tvCtl { position: absolute; top: 20px; right: 20px; z-index: 2; display: flex; gap: 8px; transition: opacity .5s; }
.tvCtl button { background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#tvView.idle { cursor: none; }
#tvView.idle .tvCtl { opacity: 0; pointer-events: none; }

/* ---------- toast ---------- */
#toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: 100px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid var(--a50);
  background: rgba(8, 10, 14, .88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 30px -8px var(--a60);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity .3s, transform .35s var(--ease);
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- short screens ---------- */
@media (max-height: 720px) and (min-width: 900px) {
  header.top { height: 48px; }
  main { height: calc(100% - 48px - 70px); }
  nav { height: 70px; padding-bottom: 10px; }
  .mode { min-height: 54px; padding: 7px 4px; gap: 4px; }
  .mode svg { width: 18px; height: 18px; }
  .timeline { padding: 10px 12px 6px; }
  .tlLabels { margin-top: 6px; }
  .item { min-height: 46px; margin-bottom: 6px; }
  .nextBox { margin-top: 8px; padding: 8px 10px; }
  .vbars { margin-bottom: 10px; }
  .musicPanel { gap: 9px; }
  .grid2b { padding-top: 9px; }
  .playBtn { width: 56px; height: 56px; }
  .ctrls .iconBtn { width: 44px; height: 44px; }
}

/* ---------- phones and narrow windows ---------- */
@media (max-width: 899px) {
  header.top { padding: 0 14px; }
  #dateLine { display: none; }
  main { padding: 2px 10px 8px; }
  .view.active { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
  .homeGrid, .splitGrid { display: flex; flex-direction: column; height: auto; gap: 12px; padding-bottom: 6px; }
  .panel { flex: none; }
  .sky { min-height: min(560px, 82vh); }
  .skyTop { right: 18px; }
  .orb { --os: 52px; }
  .mode span { font-size: 11px; }
  .today, .focus { min-height: 230px; }
  .rings, .tRing { height: 180px; }
  .dialPanel { height: min(92vw, 420px); }
  .cleanViz .cRingWrap { height: 240px; flex: none; }
  .list, .tiles { flex: none; overflow: visible; max-height: none; }
  .yamiPanel .stage { min-height: 300px; }
  .viz { min-height: 160px; flex: none; }
  nav { padding: 4px 10px 10px; height: 74px; }
  main { height: calc(100% - 56px - 74px); }
  .wk { display: none; }
}
@media (max-width: 420px) {
  .hRow .streak b { min-width: 0; }
  .bigTime { font-size: 64px; }
  .modeName { font-size: 28px; }
  .addRow input[type="time"] { width: 96px; padding: 0 8px; }
}

/* ---------- reduced motion: keep it alive, drop the big moves ---------- */
@media (prefers-reduced-motion: reduce) {
  .view.active { animation-name: fadeOnly; }
  @keyframes fadeOnly { from { opacity: 0; } }
  .orb .bob, .face, .tvOrb, #tvGlow, .orbit, .orb .rays { animation: none; }
  .shoot { display: none; }
}

.liveTag{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 11px;border-radius:9px;font-size:12px;font-weight:600;letter-spacing:.08em;color:#9acb9b;background:rgba(154,203,155,.12);border:1px solid rgba(154,203,155,.35);}
.liveTag i{width:7px;height:7px;border-radius:50%;background:#9acb9b;box-shadow:0 0 8px #9acb9b;animation:livePulse 2.2s ease-in-out infinite;}
