/* Nocturne interactive demo. An HTML imitation of the Android app, not the app itself. */
@font-face { font-family: Figtree; src: url(fonts/figtree_regular.ttf); font-weight: 400; }
@font-face { font-family: Figtree; src: url(fonts/figtree_medium.ttf); font-weight: 500; }
@font-face { font-family: Figtree; src: url(fonts/figtree_semibold.ttf); font-weight: 600; }
@font-face { font-family: Figtree; src: url(fonts/figtree_bold.ttf); font-weight: 700; }
@font-face { font-family: Bricolage; src: url(fonts/bricolage_bold.ttf); font-weight: 700; }

:root {
  /* Midnight Ink, from Palettes.kt. JS swaps these when the palette changes. */
  --ground: #0B0D18; --glow: #1A1F3A; --glass: rgba(255,255,255,.075); --glass2: rgba(255,255,255,.12);
  --hair: rgba(255,255,255,.07); --ink: #F1F3F9; --ink2: #BCC2D4; --ink3: #858CA2; --accent: #B48CFF;
  --on-primary: #12152A; --sheet: #171A2C; --menu: #232740; --primary: #F1F3F9;
  --bad: #FF9B91; --warn: #FFCF5C; --good: #7FDCA6;
  --cool: #4FB3FF; --cool2: #9DD6FF; --dry: #E6C35C; --off: #9AA3B6;
  --heat1: #FF8257; --heat2: #F45A40; --heat3: #DC3B32; --heat4: #C0202E;
  --page-bg: #05060c; --page-ink: #e8eaf2; --page-ink2: #a0a6ba; --page-card: #10131f; --page-hair: rgba(255,255,255,.09);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --page-bg: #eceef4; --page-ink: #14171d; --page-ink2: #4d5566; --page-card: #ffffff; --page-hair: rgba(0,0,0,.1); }
}
:root[data-theme="light"] { --page-bg: #eceef4; --page-ink: #14171d; --page-ink2: #4d5566; --page-card: #ffffff; --page-hair: rgba(0,0,0,.1); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--page-bg); color: var(--page-ink); font: 15px/1.4 Figtree, system-ui, sans-serif; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input { font: inherit; color: inherit; }

/* ---------- Page layout ---------- */
.stage { display: flex; height: 100%; align-items: center; justify-content: center; gap: 40px; padding: 20px; }
.panel { width: 340px; max-height: 100%; overflow: auto; color: var(--page-ink); }
.panel h1 { font: 700 28px/1.1 Bricolage, Figtree, sans-serif; margin: 0 0 6px; }
.panel .tag { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--page-ink2); margin-bottom: 14px; }
.panel p { color: var(--page-ink2); margin: 0 0 12px; font-size: 14px; }
.notice { border: 1px solid var(--page-hair); background: var(--page-card); border-radius: 14px; padding: 12px 14px; font-size: 13px; color: var(--page-ink2); margin-bottom: 16px; }
.notice b { color: var(--page-ink); }
.stamp { font-size: 12px; color: var(--page-ink2); margin-top: 8px; }
.try { list-style: none; padding: 0; margin: 0 0 16px; }
.try li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--page-hair); font-size: 14px; }
.try li .box { flex: none; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--page-ink2); margin-top: 1px; display: grid; place-items: center; font-size: 12px; }
.try li.done .box { background: #7a5cd6; border-color: #7a5cd6; color: #fff; }
.try li.done span { color: var(--page-ink2); text-decoration: line-through; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a, .links button { font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--page-hair); background: var(--page-card); color: var(--page-ink); text-decoration: none; }
.links a:focus-visible, .links button:focus-visible { outline: 2px solid #7a5cd6; outline-offset: 2px; }

.device { position: relative; flex: none; width: 390px; height: 844px; border-radius: 46px; padding: 10px; background: #1b1d24; box-shadow: 0 0 0 1px #2c2f38, 0 30px 80px rgba(0,0,0,.45); transform-origin: center; }
.screen { position: relative; width: 100%; height: 100%; border-radius: 37px; overflow: hidden; background: var(--ground); color: var(--ink); isolation: isolate; }
.info-pill { display: none; }

@media (max-width: 760px) {
  .stage { padding: 0; display: block; }
  .panel { display: none; }
  .device { width: 100%; height: 100%; border-radius: 0; padding: 0; box-shadow: none; background: none; transform: none !important; }
  .screen { border-radius: 0; }
  .info-pill { display: block; }
  .panel.as-sheet { display: block; position: fixed; inset: auto 0 0 0; max-height: 85%; width: auto; z-index: 100; background: var(--page-card); border-radius: 22px 22px 0 0; padding: 22px 16px 28px; box-shadow: 0 -10px 40px rgba(0,0,0,.5); }
  .panel-scrim.show { display: block; }
}
.panel-scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 99; }
.panel .close-panel { display: none; }
@media (max-width: 760px) { .panel .close-panel { display: inline-block; } }

/* ---------- App chrome ---------- */
.app { position: absolute; inset: 0; display: flex; flex-direction: column; background: radial-gradient(120% 60% at 50% -10%, var(--glow), var(--ground) 70%); }
.statusbar { flex: none; height: 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-size: 13px; font-weight: 600; color: var(--ink); }
.statusbar .icons { display: flex; gap: 6px; align-items: center; opacity: .9; }
.statusbar svg { width: 14px; height: 14px; fill: currentColor; }
.viewport { position: relative; flex: 1; overflow: hidden; }
.page { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: 6px 18px 28px; scrollbar-width: none; }
.page::-webkit-scrollbar { display: none; }
.page.enter-fwd { animation: inFwd .24s ease-out; }
.page.enter-back { animation: inBack .24s ease-out; }
.page.enter-fade { animation: inFade .18s ease-out; }
@keyframes inFwd { from { transform: translateX(28%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes inBack { from { transform: translateX(-28%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes inFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .page.enter-fwd, .page.enter-back, .page.enter-fade, .sheet, .toast { animation: none !important; } }

.tabbar { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px 14px; border-top: 1px solid var(--hair); background: color-mix(in srgb, var(--ground) 86%, transparent); }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--ink3); padding: 4px 0; }
.tabbar .pip { width: 56px; height: 30px; border-radius: 999px; display: grid; place-items: center; }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.on { color: var(--ink); }
.tabbar button.on .pip { background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--accent); }

/* ---------- Type ---------- */
.h-display { font: 700 34px/1.05 Bricolage, Figtree, sans-serif; letter-spacing: -.01em; margin: 6px 0 2px; }
.h-page { font: 700 26px/1.1 Bricolage, Figtree, sans-serif; margin: 8px 0 14px; }
.h-sec { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); margin: 22px 2px 8px; display: flex; justify-content: space-between; align-items: center; }
.h-sec button { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--accent); font-weight: 600; }
.muted { color: var(--ink2); }
.faint { color: var(--ink3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.big-temp { font: 700 64px/1 Bricolage, Figtree, sans-serif; letter-spacing: -.02em; }

/* ---------- Surfaces ---------- */
.card { background: var(--glass); border: 1px solid var(--hair); border-radius: 22px; padding: 16px; margin-bottom: 12px; }
.card.tight { padding: 12px 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.divider { height: 1px; background: var(--hair); margin: 12px 0; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 700; font-size: 15px; }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.tonal { background: var(--glass2); color: var(--ink); }
.btn.ghost { color: var(--accent); padding: 0 10px; }
.btn.danger { background: color-mix(in srgb, var(--bad) 20%, transparent); color: var(--bad); }
.btn.block { display: flex; width: 100%; }
.btn:focus-visible, .chip:focus-visible, .tile:focus-visible, .listrow:focus-visible, .tabbar button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-row { display: flex; gap: 10px; margin-top: 12px; }
.btn-row > * { flex: 1; }
.link { color: var(--accent); font-weight: 600; }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--glass2); font-size: 14px; font-weight: 600; color: var(--ink2); }
.chip.on { background: color-mix(in srgb, var(--accent) 24%, transparent); border-color: transparent; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--glass2); color: var(--ink2); }
.pill.accent { background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--ink); }
.pill.good { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); }
.pill.bad { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--bad); }
.pill.warn { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }

.seg { display: flex; background: var(--glass); border: 1px solid var(--hair); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { flex: 1; min-height: 36px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--ink2); text-align: center; padding: 0 6px; }
.seg button.on { background: var(--primary); color: var(--on-primary); }

/* list rows */
.list { background: var(--glass); border: 1px solid var(--hair); border-radius: 22px; overflow: hidden; margin-bottom: 12px; }
.listrow { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 10px 16px; border-bottom: 1px solid var(--hair); }
.listrow:last-child { border-bottom: 0; }
.listrow .ic { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--glass2); color: var(--ink2); }
.listrow .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.listrow .t { font-weight: 600; }
.listrow .s { font-size: 13px; color: var(--ink3); }
.listrow .chev { color: var(--ink3); font-size: 20px; }

/* switch */
.switch { flex: none; position: relative; width: 50px; height: 30px; border-radius: 999px; background: var(--glass2); border: 1px solid var(--hair); transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink3); transition: transform .15s, background .15s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(20px); background: var(--on-primary); }

/* slider */
.slider { width: 100%; -webkit-appearance: none; appearance: none; height: 34px; background: transparent; margin: 0; }
.slider::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--fill, var(--accent)) var(--pct, 50%), var(--glass2) var(--pct, 50%)); }
.slider::-moz-range-track { height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--fill, var(--accent)) var(--pct, 50%), var(--glass2) var(--pct, 50%)); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: var(--ink); border: 0; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.slider::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); border: 0; }
.slider:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.slider-head { display: flex; justify-content: space-between; align-items: baseline; }
.slider-head .v { font-weight: 700; font-size: 17px; }
.slider-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink3); }

/* stepper */
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper button { width: 48px; height: 48px; border-radius: 50%; background: var(--glass2); font-size: 24px; font-weight: 600; display: grid; place-items: center; }
.stepper .v { font: 700 30px/1 Bricolage, Figtree, sans-serif; text-align: center; flex: 1; }

/* ---------- Plan bar ---------- */
.planbar { position: relative; display: flex; height: 40px; border-radius: 12px; overflow: hidden; gap: 2px; }
.planbar .seg-b { height: 100%; min-width: 3px; }
.planbar.thin { height: 18px; border-radius: 7px; gap: 1px; }
.planbar .now { position: absolute; top: -3px; bottom: -3px; width: 3px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px var(--ground); }
.plan-labels { position: relative; height: 34px; font-size: 12px; color: var(--ink3); margin-top: 6px; }
.plan-labels span { position: absolute; top: 0; white-space: nowrap; line-height: 1.25; }
.plan-labels b { display: block; color: var(--ink2); font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink2); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- Tonight ---------- */
.hero { padding: 6px 2px 4px; }
.hero .state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink3); }
.dot.live { background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 25%, transparent); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; text-align: left; min-height: 72px; padding: 12px 14px 12px 18px; border-radius: 18px; background: color-mix(in srgb, var(--c) 10%, transparent); overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.tile .t { font-weight: 700; font-size: 16px; }
.tile .s { font-size: 13px; color: var(--ink2); }
.tile.on { background: color-mix(in srgb, var(--c) 24%, transparent); }
.tile.big { min-height: 84px; }
.tile .badge { position: absolute; right: 10px; top: 10px; }

.setup-item { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.setup-item:last-child { border-bottom: 0; }
.setup-item .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }
.setup-item.done .n { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); }

.stagebar { display: flex; height: 14px; border-radius: 6px; overflow: hidden; gap: 1px; }
.stage-awake { background: #FFCF5C; } .stage-rem { background: #B48CFF; } .stage-light { background: #6A8DFF; } .stage-deep { background: #3248B8; }

/* ---------- Running night ---------- */
.night-hero { padding: 4px 2px 0; }
.night-hero .step { font: 700 30px/1.1 Bricolage, Figtree, sans-serif; margin: 6px 0; }
.ring-row { display: flex; gap: 10px; margin: 14px 0 6px; }
.stat { flex: 1; background: var(--glass); border: 1px solid var(--hair); border-radius: 18px; padding: 10px 12px; }
.stat .k { font-size: 12px; color: var(--ink3); font-weight: 600; }
.stat .v { font-size: 20px; font-weight: 700; }

/* ---------- Demo clock ---------- */
.democlock { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px; margin: 0 10px 6px; border-radius: 18px; background: var(--menu); border: 1px solid var(--glass2); font-size: 12px; }
.democlock .lbl { font-weight: 700; color: var(--accent); letter-spacing: .04em; text-transform: uppercase; font-size: 11px; line-height: 1.1; }
.democlock .time { font-weight: 700; font-size: 15px; min-width: 42px; }
.democlock .play { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; flex: none; }
.democlock .play svg { width: 14px; height: 14px; fill: currentColor; }
.democlock .speed { font-weight: 700; padding: 6px 8px; border-radius: 10px; background: var(--glass2); flex: none; }
.democlock input { flex: 1; min-width: 0; }

/* ---------- Overlays ---------- */
.scrim { position: absolute; inset: 0; background: rgba(0,0,0,.55); z-index: 40; }
.anim.scrim, .anim.dialog { animation: inFade .18s ease-out; }
.anim.sheet { animation: up .24s ease-out; }
.anim.menu { animation: inFade .12s ease-out; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 88%; overflow-y: auto; background: var(--sheet); border-radius: 28px 28px 0 0; padding: 10px 18px 24px; scrollbar-width: none; }
.sheet::-webkit-scrollbar { display: none; }
.sheet .grab { width: 36px; height: 4px; border-radius: 4px; background: var(--ink3); opacity: .5; margin: 2px auto 12px; }
.sheet h2 { font: 700 22px/1.15 Bricolage, Figtree, sans-serif; margin: 0 0 4px; }
@keyframes up { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
.dialog { position: absolute; left: 24px; right: 24px; top: 50%; transform: translateY(-50%); z-index: 41; background: var(--menu); border-radius: 28px; padding: 22px 20px 14px; }
.dialog h2 { font: 700 21px/1.2 Bricolage, Figtree, sans-serif; margin: 0 0 8px; }
.dialog .actions { display: flex; justify-content: flex-end; gap: 4px; margin-top: 14px; flex-wrap: wrap; }
.menu { position: absolute; z-index: 41; min-width: 200px; background: var(--menu); border-radius: 16px; padding: 6px 0; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.menu button { display: block; width: 100%; padding: 12px 18px; font-size: 15px; }
.menu button:hover, .menu button:focus-visible { background: var(--glass2); outline: none; }
.menu button.bad { color: var(--bad); }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--hair); margin-bottom: 8px; }
.choice.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.choice .sw { width: 14px; height: 36px; border-radius: 5px; flex: none; }

.toast { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 60; max-width: 86%; background: var(--ink); color: var(--on-primary); padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.4); animation: toastIn .2s ease-out; text-align: center; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Heads-up notification */
.notif { position: absolute; top: 34px; left: 10px; right: 10px; z-index: 55; background: var(--menu); border-radius: 22px; padding: 12px 14px; box-shadow: 0 12px 34px rgba(0,0,0,.55); animation: dropIn .25s ease-out; }
@keyframes dropIn { from { transform: translateY(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
.notif .app-name { font-size: 12px; color: var(--ink3); display: flex; gap: 6px; align-items: center; }
.notif .app-name i { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); display: inline-block; }
.notif .title { font-weight: 700; margin-top: 4px; }
.notif .acts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.notif .acts button { font-size: 13px; font-weight: 700; color: var(--accent); padding: 6px 10px; border-radius: 10px; background: var(--glass); }

/* ---------- Profiles ---------- */
.profile-card { position: relative; }
.profile-card .name { font-weight: 700; font-size: 17px; }
.star { font-size: 20px; color: var(--ink3); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; }
.star.on { color: var(--warn); }
.more { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: var(--ink2); }
.days { display: flex; gap: 4px; margin-top: 10px; }
.days span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--glass); color: var(--ink3); }
.days span.on { background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--ink); }
.days.edit span { width: 38px; height: 38px; font-size: 13px; cursor: pointer; }

.topbar { display: flex; align-items: center; justify-content: space-between; margin: 4px -6px 6px; min-height: 44px; }
.topbar .back { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--accent); padding: 8px 6px; min-height: 44px; }

.phase-head { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 2px 8px; }
.phase-head .kicker b { color: var(--ink2); }
.steprow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px 12px 18px; border-radius: 16px; position: relative; overflow: hidden; background: color-mix(in srgb, var(--c) 9%, transparent); margin-bottom: 8px; }
.steprow::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.steprow .t { font-weight: 700; }
.steprow .s { font-size: 13px; color: var(--ink2); }
.add-step { width: 100%; min-height: 44px; border: 1px dashed var(--glass2); border-radius: 16px; color: var(--ink2); font-weight: 600; font-size: 14px; text-align: center; }

.field { width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid var(--glass2); background: var(--glass); padding: 0 14px; font-size: 16px; }
.field:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* ---------- Remote ---------- */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode { min-height: 64px; border-radius: 16px; padding: 8px 10px; text-align: left; background: color-mix(in srgb, var(--c) 10%, transparent); border: 1.5px solid transparent; }
.mode .t { font-weight: 700; }
.mode .s { font-size: 12px; color: var(--ink3); }
.mode.on { background: color-mix(in srgb, var(--c) 26%, transparent); border-color: var(--c); }

/* ---------- Sleep ---------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 10px; }
.bars button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bars .b { width: 100%; border-radius: 6px 6px 3px 3px; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.bars button.on .b { background: var(--accent); }
.bars .d { font-size: 11px; color: var(--ink3); font-weight: 600; }
.lanes { display: grid; grid-template-columns: 52px 1fr; gap: 4px 8px; align-items: center; font-size: 12px; color: var(--ink3); }
.lane { position: relative; height: 14px; background: var(--glass); border-radius: 4px; overflow: hidden; }
.lane i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- Home screen ---------- */
.home { position: absolute; inset: 0; background: linear-gradient(160deg, #23305a, #0e1428 55%, #1c1030); display: flex; flex-direction: column; color: #fff; }
.home .wall { flex: 1; overflow-y: auto; padding: 10px 16px 20px; scrollbar-width: none; }
.home .clock { font: 700 64px/1 Bricolage, Figtree, sans-serif; margin: 20px 4px 2px; }
.home .date { font-size: 15px; opacity: .8; margin: 0 4px 22px; }
.widget { border-radius: 26px; background: rgba(14,16,30,.82); border: 1px solid rgba(255,255,255,.08); padding: 14px; margin-bottom: 14px; color: var(--ink); }
.widget.grey { filter: grayscale(1); opacity: .7; }
.widget .wtiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.widget .wtile { min-height: 58px; border-radius: 16px; padding: 8px 10px; text-align: left; background: color-mix(in srgb, var(--c) 16%, transparent); position: relative; overflow: hidden; }
.widget .wtile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.widget .wtile .t { font-weight: 700; font-size: 14px; }
.widget .wtile .s { font-size: 11px; color: var(--ink2); }
.home .apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.home .apps button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; }
.home .apps .icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgba(255,255,255,.14); font-size: 22px; }
.home .apps .icon.nocturne { background: radial-gradient(circle at 35% 30%, #B48CFF, #3a2a78); }
.home .apps .icon.nocturne svg { width: 30px; height: 30px; fill: #fff; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Alarm-app tick list */
.appicon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; }
.tickbox { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--ink3); position: relative; }
.tickbox.on { background: var(--accent); border-color: var(--accent); }
.tickbox.on::after { content: ""; position: absolute; left: 6px; top: 1px; width: 6px; height: 12px; border: solid var(--on-primary); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
