/* Screentime: Liquid Glass design system.
   Mark asked for Apple's Liquid Glass look, so glass, blur and soft light are the brand here
   (the taste skill's "no glass" rule is overridden on purpose). Colour still lives on data:
   ice cyan = phone, amber = PC, red only when time is nearly gone. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
  --r-xl: 30px; --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --gutter: 16px;
  --spring: cubic-bezier(.34, 1.36, .64, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --blur: 28px; --sat: 185%;
  color-scheme: dark;

  /* dark (default) */
  --bg: #03060b;
  --blob-1: #1a6fa8; --blob-2: #0f6b70; --blob-3: #24407f; --blob-4: #6fd6f5;
  --text: #f4f8fb;
  --muted: rgba(226, 238, 248, .68);
  --faint: rgba(226, 238, 248, .52);
  --glass: rgba(255, 255, 255, .065);
  --glass-strong: rgba(255, 255, 255, .11);
  --glass-press: rgba(255, 255, 255, .16);
  --hl-top: rgba(255, 255, 255, .42);
  --hl-bot: rgba(255, 255, 255, .08);
  --edge: rgba(255, 255, 255, .13);
  --drop: 0 10px 40px rgba(0, 0, 0, .35);
  --spec: rgba(255, 255, 255, .16);
  --track: rgba(255, 255, 255, .1);
  --phone: #5fd0f3;
  --pc: #ffb950;
  --low: #ff6f6b;
  --ok: #4fd68a;
  --primary-fill: rgba(236, 248, 255, .92);
  --primary-ink: #061018;
  --scrim: rgba(0, 4, 10, .5);
  --liquid-1: rgba(120, 214, 245, .55);
  --liquid-2: rgba(160, 232, 255, .85);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #e4eef4;
    --blob-1: #8fd0ee; --blob-2: #a9e3dc; --blob-3: #b4c8f2; --blob-4: #e8f7ff;
    --text: #0a1520;
    --muted: rgba(16, 32, 46, .7);
    --faint: rgba(16, 32, 46, .58);
    --glass: rgba(255, 255, 255, .42);
    --glass-strong: rgba(255, 255, 255, .62);
    --glass-press: rgba(255, 255, 255, .78);
    --hl-top: rgba(255, 255, 255, .95);
    --hl-bot: rgba(255, 255, 255, .35);
    --edge: rgba(20, 60, 90, .1);
    --drop: 0 10px 34px rgba(30, 70, 100, .14);
    --spec: rgba(255, 255, 255, .55);
    --track: rgba(10, 40, 60, .09);
    --phone: #0b84c2;
    --pc: #b5690a;
    --low: #d93a35;
    --ok: #188a4a;
    --primary-fill: #0b1b26;
    --primary-ink: #f2f9fd;
    --scrim: rgba(40, 70, 90, .25);
    --liquid-1: rgba(40, 160, 215, .35);
    --liquid-2: rgba(25, 140, 200, .6);
  }
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- the icy backdrop the glass refracts ---------- */
.sky { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.sky i {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .7;
  animation: drift 26s var(--ease) infinite alternate;
}
.sky i:nth-child(1) { width: 70vmax; height: 70vmax; left: -25vmax; top: -30vmax; background: var(--blob-1); }
.sky i:nth-child(2) { width: 55vmax; height: 55vmax; right: -25vmax; top: 10vh; background: var(--blob-2); animation-duration: 31s; }
.sky i:nth-child(3) { width: 60vmax; height: 60vmax; left: -10vmax; bottom: -35vmax; background: var(--blob-3); animation-duration: 37s; }
.sky i:nth-child(4) { width: 22vmax; height: 22vmax; right: 8vw; top: -6vmax; background: var(--blob-4); opacity: .35; animation-duration: 23s; }
@keyframes drift { to { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); } }

/* ---------- glass ---------- */
.glass {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  border-radius: var(--r-lg);
  box-shadow:
    inset 0 1px 0 0 var(--hl-top),
    inset 0 -1px 0 0 var(--hl-bot),
    inset 0 0 0 1px var(--edge),
    var(--drop);
  isolation: isolate;
}
/* specular sheen: light caught on the top-left of the pane */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(120% 80% at 10% 0%, var(--spec), transparent 55%);
}
.glass.strong { background: var(--glass-strong); }

/* ---------- shell ---------- */
.app { position: relative; z-index: 1; max-width: 620px; margin: 0 auto; padding:
  calc(env(safe-area-inset-top) + 12px) var(--gutter) calc(env(safe-area-inset-bottom) + 112px); }

.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px 4px 14px; }
.topbar h1 { margin: 0; font-size: 34px; line-height: 1.05; font-weight: 700; letter-spacing: -.02em; }
.topbar .sub { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  transition: transform .35s var(--spring), background .2s;
}
.icon-btn:active { transform: scale(.9); }
.icon-btn svg { width: 20px; height: 20px; }

.view { display: grid; gap: 14px; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }

.card { padding: 18px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.card-head h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.card-head .link { color: var(--muted); font-size: 14px; }
.hint { color: var(--muted); font-size: 14px; margin: 0; }
.section-title { margin: 10px 6px 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }

/* ---------- tab bar: a floating glass capsule with a liquid thumb ---------- */
.tabbar {
  position: fixed; z-index: 20; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 14px);
  width: min(420px, calc(100% - 28px));
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border-radius: 999px;
}
.tabbar .thumb {
  position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 4);
  border-radius: 999px; background: var(--glass-press);
  box-shadow: inset 0 1px 0 var(--hl-top), inset 0 0 0 1px var(--edge);
  transition: transform .55s var(--spring);
}
.tabbar button {
  position: relative; z-index: 1; height: 54px; display: grid; place-items: center; align-content: center; gap: 2px;
  color: var(--muted); font-size: 11px; font-weight: 600; transition: color .25s, transform .35s var(--spring);
}
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button[aria-current="page"] { color: var(--text); }
.tabbar button:active { transform: scale(.92); }

/* ---------- buttons ---------- */
.btn {
  min-height: 44px; padding: 0 18px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 600; background: var(--glass-strong);
  box-shadow: inset 0 1px 0 var(--hl-top), inset 0 0 0 1px var(--edge);
  transition: transform .35s var(--spring), background .2s;
}
.btn:active { transform: scale(.95); background: var(--glass-press); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--primary-fill); color: var(--primary-ink); box-shadow: none; }
.btn.danger { color: var(--low); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn:focus-visible, .icon-btn:focus-visible, .row:focus-visible, .tabbar button:focus-visible, .chip:focus-visible, .seg button:focus-visible {
  outline: 2px solid var(--phone); outline-offset: 2px;
}

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick .btn { padding: 0 6px; }
.quick .btn { min-height: 52px; font-size: 17px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- the pool orb ---------- */
.pool { display: grid; justify-items: center; padding: 22px 18px 20px; gap: 16px; }
.orb { position: relative; width: min(300px, 78vw); aspect-ratio: 1; }
.orb svg { width: 100%; height: 100%; overflow: visible; }
.orb .ring-track { fill: none; stroke: var(--track); stroke-width: 9; }
.orb .ring { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray 1.1s var(--spring), stroke-dashoffset 1.1s var(--spring); }
.orb .ring.phone { stroke: var(--phone); }
.orb .ring.pc { stroke: var(--pc); }
.orb .bowl { fill: var(--glass); stroke: var(--edge); stroke-width: 1; }
.orb .liquid { transition: transform 1.4s var(--spring); }
.orb .wave { animation: wave 7s linear infinite; }
.orb .wave.back { animation-duration: 11s; animation-direction: reverse; opacity: .7; }
.orb .wave path { transition: fill .6s; }
@keyframes wave { from { transform: translateX(0); } to { transform: translateX(-240px); } }
.orb .shine { fill: url(#shine); pointer-events: none; }
.orb .center {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none;
}
.orb .left { font-size: 54px; font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.orb .left small { font-size: .5em; font-weight: 600; letter-spacing: -.01em; margin-left: 1px; }
.orb .of { margin-top: 8px; color: var(--muted); font-size: 15px; }
.orb.low .left { color: var(--low); }
.orb.empty .left { font-size: 34px; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: 14px; color: var(--muted); }
.legend b { color: var(--text); font-weight: 600; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.phone { background: var(--phone); } .dot.pc { background: var(--pc); }
.status-line { font-size: 15px; color: var(--muted); text-align: center; margin: -4px 0 0; }
.status-line b { color: var(--text); font-weight: 600; }

/* ---------- lists ---------- */
.list { display: grid; }
.row {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px;
  min-height: 64px; padding: 8px 6px; border-radius: var(--r-md); text-align: left; width: 100%;
  transition: background .2s, transform .35s var(--spring);
}
.row + .row { box-shadow: 0 -1px 0 0 var(--track); }
.row:active { background: var(--glass-press); transform: scale(.985); }
.row .t { font-size: 16px; font-weight: 600; line-height: 1.25; display: flex; align-items: center; gap: 6px; min-width: 0; }
.row .t span.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.row .v { font-size: 16px; font-weight: 600; text-align: right; white-space: nowrap; }
.row .v small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.row.compact { min-height: 52px; grid-template-columns: 1fr auto; }

.app-icon {
  width: 44px; height: 44px; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  font-size: 19px; font-weight: 700; color: var(--text);
  background: var(--glass-strong); box-shadow: inset 0 1px 0 var(--hl-top), inset 0 0 0 1px var(--edge);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-icon.big { width: 64px; height: 64px; border-radius: 16px; font-size: 28px; }

.plat { display: inline-flex; gap: 3px; flex: none; }
.plat svg { width: 13px; height: 13px; color: var(--faint); }

/* usage bar under a row: phone + PC segments on one track */
.ubar { display: flex; height: 4px; border-radius: 4px; background: var(--track); margin-top: 7px; overflow: hidden; }
.ubar i { display: block; height: 100%; transition: width .9s var(--spring); }
.ubar i.phone { background: var(--phone); } .ubar i.pc { background: var(--pc); }
.ubar i.free { background: var(--faint); }

.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--track); color: var(--muted); white-space: nowrap; }
.pill.blocked { color: var(--low); background: color-mix(in srgb, var(--low) 16%, transparent); }
.pill.free { color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
.pill.live { color: var(--text); background: var(--glass-strong); }
.pill.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 6px; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- requests ---------- */
.request { padding: 16px 18px; display: grid; gap: 12px; }
.request .q { font-size: 17px; font-weight: 600; }
.request .note { color: var(--muted); font-size: 15px; margin-top: 2px; }
.request .btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

/* ---------- now using ---------- */
.now { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.now .dev { padding: 14px; display: grid; gap: 10px; min-height: 120px; align-content: space-between; text-align: left; }
.now .dev .k { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.now .dev .app { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.now .dev .app .app-icon { width: 34px; height: 34px; border-radius: 9px; font-size: 15px; }
.now .dev .idle { color: var(--faint); font-size: 15px; }
.now .dev .since { font-size: 13px; color: var(--muted); }

/* ---------- controls ---------- */
.seg {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px;
  background: var(--track);
}
.seg .thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 999px; background: var(--glass-press);
  box-shadow: inset 0 1px 0 var(--hl-top), 0 2px 10px rgba(0,0,0,.12); transition: transform .5s var(--spring), width .5s var(--spring); }
.seg button { position: relative; z-index: 1; height: 36px; font-size: 14px; font-weight: 600; color: var(--muted); border-radius: 999px; transition: color .2s; }
.seg button[aria-pressed="true"] { color: var(--text); }

.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--track); transition: background .25s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .45s var(--spring), width .2s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:active + i::after { width: 34px; }
.switch input:checked:active + i::after { transform: translateX(14px); }
.switch input:focus-visible + i { outline: 2px solid var(--phone); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; min-width: 44px; padding: 0 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted);
  background: var(--track); transition: transform .3s var(--spring), background .2s, color .2s; }
.chip[aria-pressed="true"] { background: var(--primary-fill); color: var(--primary-ink); }
.chip:active { transform: scale(.92); }

.field { display: grid; gap: 6px; }
.field > label, .field > .lbl { font-size: 13px; color: var(--muted); font-weight: 600; padding-left: 4px; }
.input {
  height: 48px; width: 100%; padding: 0 14px; border-radius: var(--r-sm); border: 0; outline: 0;
  background: var(--track); font-size: 17px; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px var(--edge);
}
.input:focus { box-shadow: inset 0 0 0 2px var(--phone); }
input[type="time"].input, input[type="date"].input { -webkit-appearance: none; appearance: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.stepper { display: flex; align-items: center; gap: 10px; }
.stepper .val { min-width: 92px; text-align: center; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.stepper .btn { width: 44px; padding: 0; }

input[type="range"].slider { width: 100%; -webkit-appearance: none; appearance: none; height: 32px; background: none; }
input[type="range"].slider::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: var(--track); }
input[type="range"].slider::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
input[type="range"].slider::-moz-range-track { height: 8px; border-radius: 8px; background: var(--track); }
input[type="range"].slider::-moz-range-thumb { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.3); }

.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.set-row + .set-row { box-shadow: 0 -1px 0 0 var(--track); }
.set-row .l { font-size: 16px; font-weight: 500; }
.set-row .l small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }

/* ---------- week budget bars ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 150px; }
.week button { display: grid; grid-template-rows: 1fr auto auto; gap: 6px; height: 100%; text-align: center; }
.week .col { position: relative; border-radius: 10px; background: var(--track); overflow: hidden; }
.week .col i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--liquid-2); border-radius: 10px; transition: height .8s var(--spring); }
.week .d { font-size: 12px; font-weight: 600; color: var(--muted); }
.week .m { font-size: 12px; font-weight: 600; }
.week button[aria-current="date"] .d { color: var(--text); }
.week button:active .col { transform: scale(.94); }
.week .col { transition: transform .3s var(--spring); }

/* ---------- schedules ---------- */
.sched { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; min-height: 72px; padding: 8px 6px; width: 100%; text-align: left; border-radius: var(--r-md); }
.sched + .sched { box-shadow: 0 -1px 0 0 var(--track); }
.sched .glyph { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--glass-strong); box-shadow: inset 0 1px 0 var(--hl-top), inset 0 0 0 1px var(--edge); }
.sched .glyph svg { width: 22px; height: 22px; }
.sched .time { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.sched .meta { font-size: 13px; color: var(--muted); }
.sched.off .time, .sched.off .glyph { opacity: .45; }
.sched.active .time::after { content: "Now"; margin-left: 8px; font-size: 12px; font-weight: 700; vertical-align: 3px; color: var(--ok); }

/* ---------- sheets ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; transition: opacity .3s; }
.scrim.open { opacity: 1; }
.sheet {
  position: fixed; z-index: 41; left: 50%; bottom: 0; width: min(620px, 100%);
  max-height: calc(100dvh - env(safe-area-inset-top) - 24px); overflow: auto; overscroll-behavior: contain;
  border-radius: 34px 34px 0 0; padding: 8px 18px calc(env(safe-area-inset-bottom) + 22px);
  transform: translate(-50%, 105%); transition: transform .55s var(--spring);
  --glass: var(--glass-strong);
}
.sheet.open { transform: translate(-50%, 0); }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--track); margin: 4px auto 10px; }
.sheet h2 { margin: 6px 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.sheet .body { display: grid; gap: 18px; padding-top: 8px; }
.sheet .head { display: flex; align-items: center; gap: 14px; }
.sheet .close { position: absolute; top: 14px; right: 14px; }

/* ---------- PIN ---------- */
.pin { min-height: 100dvh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.pin .panel { width: min(360px, 100%); padding: 28px 22px 22px; border-radius: 34px; display: grid; gap: 18px; justify-items: center; text-align: center; }
.pin h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.pin p { margin: 0; color: var(--muted); font-size: 15px; }
.dots { display: flex; gap: 14px; height: 18px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--muted); transition: transform .3s var(--spring), background .15s; }
.dots i.on { background: var(--text); box-shadow: none; transform: scale(1.15); }
.dots.shake { animation: shake .45s var(--ease); }
@keyframes shake { 20% { transform: translateX(-12px); } 40% { transform: translateX(10px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(3px); } }
.err { color: var(--low); font-size: 14px; min-height: 20px; }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 22px; }
.keypad button {
  width: 76px; height: 76px; border-radius: 50%; font-size: 30px; font-weight: 500;
  background: var(--glass-strong); box-shadow: inset 0 1px 0 var(--hl-top), inset 0 0 0 1px var(--edge);
  transition: transform .3s var(--spring), background .15s;
}
.keypad button:active { transform: scale(.9); background: var(--glass-press); }
.keypad button.plain { background: none; box-shadow: none; font-size: 16px; font-weight: 600; color: var(--muted); }
.keypad button svg { width: 26px; height: 26px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 60; left: 50%; top: calc(env(safe-area-inset-top) + 12px);
  transform: translate(-50%, -160%); opacity: 0; transition: transform .5s var(--spring), opacity .3s;
  padding: 12px 18px; border-radius: 999px; font-size: 15px; font-weight: 600; max-width: calc(100% - 32px);
  --glass: var(--glass-strong);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- states ---------- */
.skel { display: inline-block; border-radius: 8px; background: var(--track); color: transparent !important; }
.empty { padding: 18px 8px; color: var(--muted); font-size: 15px; text-align: center; }
.error-box { padding: 14px 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--low) 12%, transparent); color: var(--text); font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.banner { padding: 12px 16px; display: flex; align-items: center; gap: 12px; font-size: 15px; }
.banner svg { width: 20px; height: 20px; flex: none; }
.banner .grow { flex: 1; }

.code { font-size: 44px; font-weight: 700; letter-spacing: .12em; text-align: center; font-variant-numeric: tabular-nums; }

@media (min-width: 700px) {
  .topbar h1 { font-size: 40px; }
  .now { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .orb .wave { animation: none; }
  .sky i { animation: none; }
}

/* weekday pickers: always one row of seven */
.chips.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.chips.days .chip { min-width: 0; padding: 0; }



.quick .btn { white-space: nowrap; font-size: 15px; }
.legend span { white-space: nowrap; }

/* ================= motion ================= */
/* navigation: blocks rise in one after another; tabs slide in from the side you move toward */
@keyframes rise { from { opacity: 0; transform: translate(var(--dx, 0), 22px) scale(.97); } }
.view.enter > * { animation: rise .65s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
.view.enter.from-r > * { --dx: 36px; }
.view.enter.from-l > * { --dx: -36px; }
.view.enter .list > .row { animation: rise .55s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 60ms + var(--j, 0) * 40ms + 140ms); --dx: 0; }
@keyframes growX { from { transform: scaleX(0); } }
@keyframes growY { from { transform: scaleY(0); } }
.view.enter .ubar i { transform-origin: left; animation: growX 1s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms + var(--j, 0) * 40ms + 320ms); }
.view.enter .week .col i, .view.enter .week .col > i { transform-origin: bottom; animation: growY .9s var(--spring) backwards; }
.view.enter .week > *:nth-child(2) .col i { animation-delay: 40ms; } .view.enter .week > *:nth-child(3) .col i { animation-delay: 80ms; }
.view.enter .week > *:nth-child(4) .col i { animation-delay: 120ms; } .view.enter .week > *:nth-child(5) .col i { animation-delay: 160ms; }
.view.enter .week > *:nth-child(6) .col i { animation-delay: 200ms; } .view.enter .week > *:nth-child(7) .col i { animation-delay: 240ms; }

/* the orb: rings draw in, liquid fills, bubbles rise, it sloshes when time changes */
.orb .bub { fill: rgba(255, 255, 255, .55); animation: bubble 8s linear infinite; opacity: 0; }
@keyframes bubble { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: .9; } 85% { opacity: .6; } 100% { transform: translateY(-220px); opacity: 0; } }
.orb .slosh.go { animation: slosh 1.2s var(--ease); transform-origin: 150px 0; }
@keyframes slosh { 0% { transform: translateY(0) skewY(0); } 20% { transform: translateY(-14px) skewY(-4deg); } 45% { transform: translateY(6px) skewY(3deg); }
  70% { transform: translateY(-3px) skewY(-1.2deg); } 100% { transform: translateY(0) skewY(0); } }
.orb .ring { transition-duration: 1.4s; }
.pool .orb { animation: orbIn 1s var(--spring) backwards; }
@keyframes orbIn { from { opacity: 0; transform: scale(.86); } }

.fly-chip { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; padding: 7px 14px; border-radius: 999px; font: 700 16px/1 var(--font);
  color: #04121a; background: #bff0ff; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); white-space: nowrap; }
.fly-chip.neg { background: #ffd0cc; color: #3a0705; }

/* sheets: rows settle in on first open */
@keyframes settle { from { opacity: 0; transform: translateY(16px); } }
.sheet.fresh .body > * { animation: settle .5s var(--spring) backwards; animation-delay: calc(var(--j, 0) * 45ms + 140ms); }

/* toast: drops in with a little overshoot */
.toast { transform: translate(-50%, -160%) scale(.9); }
.toast.show { transform: translate(-50%, 0) scale(1); }

/* buttons: lift on hover (mouse), sink on press */
@media (hover: hover) { .btn:hover, .row:hover, .icon-btn:hover { filter: brightness(1.12); } }
.btn.glass:active { transform: scale(.94); }

/* request card arrives with a soft glow */
.request.new { animation: reqGlow 2.4s var(--ease) 1; }
@keyframes reqGlow { 0%, 100% { box-shadow: inset 0 1px 0 0 var(--hl-top), inset 0 0 0 1px var(--edge), var(--drop); }
  35% { box-shadow: inset 0 1px 0 0 var(--hl-top), inset 0 0 0 1px color-mix(in srgb, var(--phone) 60%, transparent), 0 0 30px color-mix(in srgb, var(--phone) 35%, transparent); } }

/* keep the orb's text readable when the liquid is high behind it */
.orb .of { color: color-mix(in srgb, var(--text) 78%, transparent); text-shadow: 0 1px 10px rgba(0, 0, 0, .45); }
.orb .left { text-shadow: 0 2px 22px rgba(0, 0, 0, .35); }

/* category symbols for apps without a real icon: a glass tile, the symbol in the category's hue */
.app-icon.cat { --c: #b9c6d2; color: var(--c); background: color-mix(in srgb, var(--c) 15%, rgba(255,255,255,.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent); }
.app-icon.cat svg { width: 56%; height: 56%; }
.app-icon.cat-games { --c: #7fd68f; } .app-icon.cat-video { --c: #ff8274; } .app-icon.cat-browser { --c: #79bdff; } .app-icon.cat-chat { --c: #64d6a0; }
.app-icon.cat-music { --c: #ff8cbd; } .app-icon.cat-learn { --c: #ffc761; } .app-icon.cat-create { --c: #ffab6b; } .app-icon.cat-camera { --c: #c2ccd6; } .app-icon.cat-other { --c: #b9c6d2; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .app-icon.cat { color: color-mix(in srgb, var(--c) 70%, #000); } }
.app-icon.real { background: none; box-shadow: none; }

/* ---------- text polish ---------- */
.topbar { align-items: center; }
.row .t { font-weight: 600; letter-spacing: -.01em; }
.row .s { color: var(--muted); }
.ubar { height: 3px; margin-top: 9px; }
.week .m { font-weight: 600; color: var(--text); }
.week .m.zero { color: var(--faint); font-weight: 500; }
.week .d { font-weight: 500; }
.pill { font-weight: 600; letter-spacing: 0; }
.card-head h2, .section-title { letter-spacing: -.015em; }

/* ---------- background: one calm deep field, no black holes between the blobs ---------- */
.sky { background: radial-gradient(120% 80% at 20% 0%, #10324d 0%, transparent 60%), radial-gradient(90% 70% at 100% 60%, #0c3a3f 0%, transparent 65%),
  linear-gradient(165deg, #0a1b2b 0%, #07131f 55%, #0b1a2e 100%); }
.sky i { opacity: .38; filter: blur(110px); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .sky {
  background: radial-gradient(120% 80% at 20% 0%, #cfe7f5 0%, transparent 60%), radial-gradient(90% 70% at 100% 60%, #d3eee9 0%, transparent 65%),
    linear-gradient(165deg, #e6f0f6 0%, #eef4f8 55%, #e3edf5 100%); } }

/* week chart: the day's allowance is a faint tint; only real usage is solid */
.week .col { background: rgba(255, 255, 255, .035); }
.week .col i[style*="--track"] { background: rgba(255, 255, 255, .06) !important; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .week .col { background: rgba(12, 28, 42, .035); }
  :root:not([data-theme="dark"]) .week .col i[style*="--track"] { background: rgba(12, 28, 42, .06) !important; } }

/* deeper, richer liquid so white text stays crisp when the orb is full */
:root { --liquid-1: rgba(56, 150, 210, .5); --liquid-2: rgba(48, 140, 205, .72); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --liquid-1: rgba(40, 150, 210, .35); --liquid-2: rgba(25, 125, 190, .6); } }

/* =====================================================================
   NEUTRAL PALETTE (Mark, 2026-12-01): the blue/teal haze looked AI-made.
   Apple's own apps sit on neutral black / grouped grey; glass reads through its
   light edges, and colour appears only on data (system cyan, orange, red, blue).
   ===================================================================== */
:root {
  --bg: #000;
  --text: #f5f5f7;
  --muted: rgba(235, 235, 245, .6);
  --faint: rgba(235, 235, 245, .38);
  --glass: rgba(255, 255, 255, .07);
  --glass-strong: rgba(255, 255, 255, .1);
  --glass-press: rgba(255, 255, 255, .16);
  --hl-top: rgba(255, 255, 255, .22);
  --hl-bot: rgba(255, 255, 255, .04);
  --edge: rgba(255, 255, 255, .09);
  --drop: 0 10px 30px rgba(0, 0, 0, .5);
  --spec: rgba(255, 255, 255, .07);
  --track: rgba(255, 255, 255, .09);
  --phone: #64d2ff;
  --pc: #ff9f0a;
  --low: #ff453a;
  --ok: #30d158;
  --primary-fill: #f5f5f7;
  --primary-ink: #000;
  --scrim: rgba(0, 0, 0, .55);
  --liquid-1: rgba(10, 132, 255, .42);
  --liquid-2: rgba(10, 132, 255, .78);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f2f7;
    --text: #000;
    --muted: rgba(60, 60, 67, .62);
    --faint: rgba(60, 60, 67, .42);
    --glass: rgba(255, 255, 255, .72);
    --glass-strong: rgba(255, 255, 255, .86);
    --glass-press: #fff;
    --hl-top: rgba(255, 255, 255, 1);
    --hl-bot: rgba(255, 255, 255, .5);
    --edge: rgba(0, 0, 0, .06);
    --drop: 0 6px 24px rgba(0, 0, 0, .07);
    --spec: rgba(255, 255, 255, .6);
    --track: rgba(120, 120, 128, .14);
    --phone: #0a84c6;
    --pc: #c26a00;
    --low: #d70015;
    --ok: #248a3d;
    --primary-fill: #000;
    --primary-ink: #fff;
    --scrim: rgba(0, 0, 0, .25);
    --liquid-1: rgba(0, 122, 255, .28);
    --liquid-2: rgba(0, 122, 255, .62);
  }
}
/* one quiet field: a faint grey light from the top, nothing coloured */
.sky { background: radial-gradient(90% 55% at 50% -12%, #232326 0%, transparent 70%), #000; }
.sky i { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .sky { background: radial-gradient(90% 55% at 50% -12%, #ffffff 0%, transparent 70%), #f2f2f7; } }
.glass::before { background: radial-gradient(120% 70% at 15% -10%, var(--spec), transparent 60%); }
.week .col { background: var(--track); }
.week .col i[style*="--track"] { background: rgba(255, 255, 255, .07) !important; }
.week .col i:not([style*="--track"]):not([style*="--low"]) { background: #0a84ff; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .week .col i:not([style*="--track"]):not([style*="--low"]) { background: #007aff; } }
.app-icon.cat { background: color-mix(in srgb, var(--c) 13%, rgba(255, 255, 255, .03)); }
.orb .shine { opacity: .35; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .orb .shine { opacity: .8; } }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .orb .left, :root:not([data-theme="dark"]) .orb .of { text-shadow: none; } }
