/* =========================================================
   KAIRO — glossy dark routine timer
   ========================================================= */
:root {
  /* device preset (set per device by js/devices.js) */
  --dev-w: 390px;
  --dev-h: 845px;
  --frame-r: 68px;
  --bezel-r: 64px;
  --screen-r: 55px;
  --bz-t: 9px;
  --bz-x: 9px;
  --bz-b: 9px;
  --safe-top: 58px;
  --safe-bot: 34px;
  --sb-h: 54px;
  --sb-pad: 6px 34px 0 46px;
  --bg: #05050b;
  --bg-2: #0b0b16;
  --text: #f5f6ff;
  --text-2: rgba(232, 236, 255, .72);
  --muted: rgba(220, 226, 255, .48);
  --faint: rgba(220, 226, 255, .28);
  --stroke: rgba(255, 255, 255, .11);
  --stroke-2: rgba(255, 255, 255, .2);
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .09);
  --glass-hi: rgba(255, 255, 255, .16);
  --danger: #ff4d6d;
  --ok: #3cf2a8;
  --c1: #7c5cff;
  --c2: #22d3ee;
  --grad: linear-gradient(135deg, var(--c1), var(--c2));
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Sora', 'Inter', system-ui, sans-serif;
}

/* routine themes */
.t-violet { --c1: #8b5cf6; --c2: #ec4899; --glow: 139, 92, 246; }
.t-cyan   { --c1: #22d3ee; --c2: #3b82f6; --glow: 34, 211, 238; }
.t-lime   { --c1: #c6ff3d; --c2: #10b981; --glow: 163, 230, 53; }
.t-sunset { --c1: #fb923c; --c2: #f43f5e; --glow: 249, 115, 22; }
.t-gold   { --c1: #fde047; --c2: #f97316; --glow: 250, 204, 21; }
.t-ice    { --c1: #c7d2fe; --c2: #60a5fa; --glow: 147, 197, 253; }
.t-rose   { --c1: #f9a8d4; --c2: #a855f7; --glow: 244, 114, 182; }
.t-mint   { --c1: #5eead4; --c2: #a3e635; --glow: 45, 212, 191; }
/* re-resolve the gradient wherever a theme is applied */
.t-violet, .t-cyan, .t-lime, .t-sunset, .t-gold, .t-ice, .t-rose, .t-mint { --grad: linear-gradient(135deg, var(--c1), var(--c2)); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 800px at 50% 30%, #12112a 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; user-select: text; -webkit-user-select: text; }
svg { display: block; }

/* ---------- stage + device frame ---------- */
.stage-glow { position: fixed; border-radius: 50%; filter: blur(90px); opacity: .35; pointer-events: none; }
.stage-glow.g1 { width: 520px; height: 520px; background: #6d28d9; left: calc(50% - 560px); top: 8%; }
.stage-glow.g2 { width: 460px; height: 460px; background: #0891b2; left: calc(50% + 120px); top: 45%; opacity: .25; }
.stage-glow.g3 { width: 300px; height: 300px; background: #db2777; left: calc(50% + 180px); top: -4%; opacity: .18; }

#stage {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#device {
  position: relative;
  width: calc(var(--dev-w) + var(--bz-x) * 2 + 8px);
  height: calc(var(--dev-h) + var(--bz-t) + var(--bz-b) + 8px);
  border-radius: var(--frame-r);
  padding: 4px;
  background:
    linear-gradient(145deg, #5b5c66 0%, #1d1e24 18%, #3b3c45 40%, #121218 62%, #4a4b55 85%, #1a1b20 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06),
    0 40px 120px -20px rgba(0,0,0,.9),
    0 0 80px -10px rgba(124, 92, 255, .25),
    inset 0 1px 1px rgba(255,255,255,.35);
  transform-origin: center center;
  flex: none;
}
.device-bezel {
  position: relative;
  width: 100%; height: 100%;
  border-radius: var(--bezel-r);
  background: #000;
  padding: var(--bz-t) var(--bz-x) var(--bz-b);
  box-shadow: inset 0 0 0 1.5px #000, inset 0 0 4px 2px rgba(255,255,255,.06);
}
.device-btn { position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #2a2b31, #5d5e68, #2a2b31); }
.b-action   { left: -3px; top: 150px; height: 32px; }
.b-vol-up   { left: -3px; top: 205px; height: 60px; }
.b-vol-down { left: -3px; top: 280px; height: 60px; }
.b-power    { right: -3px; top: 240px; height: 96px; }
.stage-caption {
  margin-top: 18px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
}
.brand-mark { font-family: var(--display); font-weight: 800; letter-spacing: .3em; color: var(--text-2); }

#screen {
  position: relative;
  width: var(--dev-w); height: var(--dev-h);
  border-radius: var(--screen-r);
  overflow: hidden;
  background: var(--bg-2);
  isolation: isolate;
  contain: layout paint;
  container: screen / size;
}
/* morph between presets */
#device.animate { transition: width .55s var(--ease), height .55s var(--ease), border-radius .55s var(--ease), transform .55s var(--ease), margin .55s var(--ease); }
#device.animate .device-bezel { transition: border-radius .55s var(--ease), padding .55s var(--ease); }
#device.animate #screen { transition: width .55s var(--ease), height .55s var(--ease), border-radius .55s var(--ease); }

/* ---------- ambient animated background ---------- */
.ambient { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: radial-gradient(120% 70% at 50% 0%, #15132e 0%, #08080f 70%); transition: background .8s var(--ease); }
.ambient .blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; transition: background 1s var(--ease), opacity 1s; will-change: transform; }
.ambient .blob.a { width: 87cqw; height: 87cqw; left: -31cqw; top: -9.5cqh; background: #6d28d9; animation: drift1 22s ease-in-out infinite alternate; }
.ambient .blob.b { width: 77cqw; height: 77cqw; right: -36cqw; top: 33cqh; background: #0e7490; animation: drift2 26s ease-in-out infinite alternate; }
.ambient .blob.c { width: 67cqw; height: 67cqw; left: 10cqw; bottom: -16.5cqh; background: #be185d; opacity: .35; animation: drift3 30s ease-in-out infinite alternate; }
.ambient.themed .blob.a { background: var(--c1); opacity: .5; }
.ambient.themed .blob.b { background: var(--c2); opacity: .42; }
.ambient.themed .blob.c { background: var(--c1); opacity: .25; }
.ambient .grain {
  position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift1 { to { transform: translate(90px, 120px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-80px, -140px) scale(.9); } }
@keyframes drift3 { to { transform: translate(120px, -60px) scale(1.2); } }

/* ---------- status bar ---------- */
.statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: var(--sb-h); z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sb-pad); pointer-events: none;
}
.sb-time { font-weight: 600; font-size: 16px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.sb-right { display: flex; align-items: center; gap: 6px; fill: var(--text); }
.sb-wifi.off { opacity: .3; }
.sb-battery { width: 25px; height: 12px; border-radius: 4px; border: 1.2px solid rgba(255,255,255,.45); padding: 1.5px; position: relative; }
.sb-battery::after { content: ''; position: absolute; right: -3.5px; top: 3.5px; width: 2px; height: 4px; border-radius: 0 2px 2px 0; background: rgba(255,255,255,.45); }
.sb-batt-fill { height: 100%; width: 90%; border-radius: 2px; background: var(--text); }

/* ---------- dynamic island ---------- */
.island {
  position: absolute; top: 11px; left: 50%; z-index: 70;
  width: 124px; height: 36px; transform: translateX(-50%);
  background: #000; border-radius: 22px;
  transition: width .5s var(--spring), height .5s var(--spring), top .5s var(--spring), border-radius .5s var(--ease), box-shadow .4s, opacity .3s;
  overflow: hidden;
  cursor: default;
}
.island.live { width: 184px; cursor: pointer; }
.island.tappable { cursor: pointer; }
#screen.island-live .sb-signal { opacity: 0; }
.sb-signal { transition: opacity .3s; }
.island.toast { width: min(340px, calc(100% - 20px)); height: 64px; border-radius: 32px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.island-content {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; opacity: 0; transition: opacity .25s; white-space: nowrap; gap: 10px;
}
.island.live .island-content, .island.toast .island-content { opacity: 1; transition-delay: .15s; }
.isl-live-left { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; min-width: 0; }
.isl-dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--grad); flex: none; }
.isl-name { max-width: 64px; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.isl-time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.isl-toast { display: flex; align-items: center; gap: 12px; width: 100%; padding-left: 4px; }
.isl-toast-ico { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--grad); font-size: 18px; box-shadow: inset 0 1px 1px rgba(255,255,255,.5); }
.isl-toast-txt { min-width: 0; flex: 1; }
.isl-toast-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.isl-toast-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

.home-indicator { position: absolute; bottom: 8px; left: 50%; width: 136px; height: 5px; margin-left: -68px; border-radius: 3px; background: rgba(255,255,255,.75); z-index: 90; pointer-events: none; }

/* ---------- screens ---------- */
#screens { position: absolute; inset: 0; z-index: 10; }
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding-top: var(--safe-top);
  will-change: transform, opacity;
}
.screen.enter-right { animation: inRight .45s var(--ease) both; }
.screen.exit-left   { animation: outLeft .45s var(--ease) both; }
.screen.enter-left  { animation: inLeft .45s var(--ease) both; }
.screen.exit-right  { animation: outRight .45s var(--ease) both; }
.screen.enter-up    { animation: inUp .55s var(--ease) both; }
.screen.exit-down   { animation: outDown .45s var(--ease) both; }
.screen.enter-fade  { animation: inFade .45s var(--ease) both; }
.screen.exit-fade   { animation: outFade .35s var(--ease) both; }
@keyframes inRight { from { transform: translateX(100%); } }
@keyframes outLeft { to { transform: translateX(-28%); opacity: 0; } }
@keyframes inLeft  { from { transform: translateX(-28%); opacity: 0; } }
@keyframes outRight{ to { transform: translateX(100%); } }
@keyframes inUp    { from { transform: translateY(100%); } }
@keyframes outDown { to { transform: translateY(100%); } }
@keyframes inFade  { from { opacity: 0; transform: scale(.96); } }
@keyframes outFade { to { opacity: 0; transform: scale(1.03); } }

.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; overscroll-behavior: contain; }
.scroll::-webkit-scrollbar { display: none; }
.pad { padding: 0 20px; }

/* ---------- glass primitives ---------- */
.glass {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.1) 0%, rgba(255,255,255,.035) 100%);
  border: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -1px 0 rgba(0,0,0,.25), 0 12px 32px -12px rgba(0,0,0,.6);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
}
.gloss::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 45%);
}

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  transition: transform .2s var(--ease), background .2s;
}
.icon-btn:active { transform: scale(.9); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn-primary {
  position: relative; overflow: hidden;
  height: 58px; border-radius: 20px; width: 100%;
  font-weight: 700; font-size: 16px; letter-spacing: .01em; color: #0a0a12;
  background: var(--grad);
  box-shadow: 0 14px 36px -10px rgba(var(--glow, 124, 92, 255), .7), inset 0 1px 1px rgba(255,255,255,.7), inset 0 -2px 6px rgba(0,0,0,.18);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .2s var(--ease), filter .2s, opacity .2s;
}
.btn-primary::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 50%; background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,.05)); border-radius: 20px 20px 50% 50% / 20px 20px 12px 12px; pointer-events: none; }
.btn-primary::after { content: ''; position: absolute; top: 0; bottom: 0; width: 60px; left: -80px; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-18deg); animation: sheen 4.5s ease-in-out infinite; }
@keyframes sheen { 0%, 70% { left: -80px; } 100% { left: 120%; } }
.btn-primary:active { transform: scale(.97); filter: brightness(1.08); }
.btn-primary[disabled] { opacity: .35; pointer-events: none; }
.btn-primary svg { width: 20px; height: 20px; fill: currentColor; }

.btn-ghost {
  height: 50px; border-radius: 16px; padding: 0 18px; font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .2s var(--ease);
}
.btn-ghost:active { transform: scale(.96); }
.btn-ghost.danger { color: var(--danger); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px; border-radius: 14px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  background: rgba(255,255,255,.07); border: 1px solid var(--stroke);
}
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- top bars ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 8px; gap: 8px; min-height: 56px; position: relative; z-index: 5; }
.topbar .tb-title { font-family: var(--display); font-weight: 600; font-size: 16px; text-align: center; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- HOME ---------- */
.home-head { padding: 8px 22px 6px; display: flex; align-items: flex-end; justify-content: space-between; }
.home-clock { font-weight: 200; font-size: 58px; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.home-clock small { font-size: 18px; font-weight: 500; letter-spacing: 0; margin-left: 4px; color: var(--text-2); }
.home-date { font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.sync-dot.local { background: #fbbf24; box-shadow: 0 0 10px #fbbf24; }
.home-actions { display: flex; gap: 10px; margin-bottom: 6px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; padding: 22px 22px 12px; }
.section-title h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -.02em; }
.section-title .count { color: var(--muted); font-size: 13px; font-weight: 600; }

.now-card { margin: 14px 20px 0; border-radius: var(--r-lg); padding: 16px; display: flex; align-items: center; gap: 14px; overflow: hidden; cursor: pointer; transition: transform .25s var(--ease); }
.now-card:active { transform: scale(.98); }
.now-card::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .8; pointer-events: none; }
.now-ring { width: 62px; height: 62px; flex: none; position: relative; }
.now-ring .emo { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; }
.now-meta { flex: 1; min-width: 0; }
.now-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c1); box-shadow: 0 0 8px var(--c1); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.now-task { font-family: var(--display); font-size: 18px; font-weight: 600; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.now-time { font-size: 26px; font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.routine-list { padding: 0 20px 140px; display: flex; flex-direction: column; gap: 12px; }
.r-card {
  border-radius: var(--r-lg); padding: 16px 16px 14px; overflow: hidden; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.r-card::after { content: ''; position: absolute; width: 180px; height: 180px; right: -70px; top: -90px; border-radius: 50%; background: var(--grad); filter: blur(50px); opacity: .28; pointer-events: none; }
.r-card:active:not(.reordering *) { transform: scale(.985); }
.r-top { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.r-emoji {
  width: 50px; height: 50px; border-radius: 16px; flex: none; display: grid; place-items: center; font-size: 25px;
  background: linear-gradient(145deg, rgba(var(--glow), .45), rgba(var(--glow), .12));
  box-shadow: inset 0 1px 1px rgba(255,255,255,.45), inset 0 -2px 6px rgba(0,0,0,.25), 0 8px 18px -6px rgba(var(--glow), .6);
  border: 1px solid rgba(255,255,255,.15);
}
.r-info { flex: 1; min-width: 0; }
.r-name { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.r-meta .sep { opacity: .5; }
.r-alarm { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.r-alarm svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.r-play {
  width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--grad); color: #0a0a12;
  box-shadow: 0 10px 22px -6px rgba(var(--glow), .8), inset 0 1px 1px rgba(255,255,255,.75), inset 0 -2px 5px rgba(0,0,0,.2);
  position: relative; overflow: hidden; transition: transform .2s var(--spring);
}
.r-play::before { content: ''; position: absolute; inset: 0 0 50% 0; background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0)); border-radius: 50% 50% 0 0; }
.r-play:active { transform: scale(.88); }
.r-play svg { width: 18px; height: 18px; fill: currentColor; margin-left: 2px; position: relative; }
.r-bar { display: flex; gap: 3px; margin-top: 14px; height: 6px; position: relative; z-index: 1; }
.r-bar i { display: block; height: 100%; border-radius: 3px; background: var(--grad); opacity: .85; min-width: 4px; }
.r-bar i:nth-child(even) { opacity: .45; }

.empty { text-align: center; padding: 50px 30px; color: var(--muted); }
.empty .big { font-size: 48px; margin-bottom: 10px; }
.empty h3 { color: var(--text); font-family: var(--display); margin: 0 0 6px; }

.fab {
  position: absolute; right: 22px; bottom: var(--safe-bot); z-index: 20;
  width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center;
  background: var(--grad); color: #0a0a12; overflow: hidden;
  box-shadow: 0 18px 40px -10px rgba(124, 92, 255, .8), inset 0 1px 1px rgba(255,255,255,.8), inset 0 -3px 8px rgba(0,0,0,.2);
  transition: transform .25s var(--spring);
}
.fab::before { content: ''; position: absolute; inset: 0 0 50% 0; background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,.04)); }
.fab:active { transform: scale(.9) rotate(90deg); }
.fab svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; position: relative; }
.bottom-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 130px; z-index: 15; pointer-events: none; background: linear-gradient(180deg, rgba(8,8,15,0), rgba(8,8,15,.92) 70%); }

/* ---------- reorder (long-press) ---------- */
.reorder-item { position: relative; touch-action: pan-y; }
.reorder-item.holding { animation: holdPulse 1s linear forwards; }
.reorder-item .hold-ring { position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0; }
.reorder-item.holding .hold-ring { opacity: 1; background: conic-gradient(rgba(var(--glow, 124,92,255), .9) var(--hold, 0%), transparent 0); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 2px; }
@keyframes holdPulse { to { transform: scale(.97); } }
.reordering .reorder-item { touch-action: none; cursor: grab; animation: jiggle .32s ease-in-out infinite alternate; }
.reordering .reorder-item:nth-child(2n) { animation-delay: -.16s; animation-direction: alternate-reverse; }
.reordering .reorder-item.dragging { animation: none; z-index: 30; cursor: grabbing; box-shadow: 0 26px 50px -10px rgba(0,0,0,.8), 0 0 0 1.5px rgba(var(--glow, 124,92,255), .8); transition: box-shadow .2s, scale .2s; scale: 1.04; }
.reordering .reorder-item.shifting { transition: translate .22s var(--ease); }
@keyframes jiggle { from { rotate: -.6deg; } to { rotate: .6deg; } }
.grip { display: none; width: 26px; flex: none; color: var(--muted); }
.grip svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.reordering .grip { display: grid; place-items: center; }
.reordering .hide-on-reorder { display: none !important; }
.reorder-bar {
  position: absolute; left: 16px; right: 16px; bottom: max(12px, calc(var(--safe-bot) - 4px)); z-index: 40;
  display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 24px;
  transform: translateY(140%); transition: transform .45s var(--spring);
}
.reorder-bar.show { transform: none; }
.reorder-bar .rb-hint { flex: 1; font-size: 12.5px; color: var(--text-2); padding-left: 8px; line-height: 1.3; }
.reorder-bar .rb-hint b { color: var(--text); display: block; font-size: 14px; }
.reorder-bar .btn-primary { width: auto; height: 48px; padding: 0 22px; border-radius: 16px; font-size: 15px; }

/* ---------- EDITOR ---------- */
.ed-hero { padding: 4px 22px 0; display: flex; align-items: center; gap: 14px; }
.ed-emoji { width: 66px; height: 66px; border-radius: 22px; font-size: 34px; }
.ed-name {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0;
  font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -.02em; padding: 6px 0;
  border-bottom: 1.5px solid transparent; transition: border-color .2s;
}
.ed-name:focus { border-bottom-color: rgba(var(--glow), .6); }
.ed-name::placeholder { color: var(--faint); }
.theme-row { display: flex; gap: 10px; padding: 16px 22px 0; }
.theme-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); box-shadow: inset 0 1px 1px rgba(255,255,255,.6), 0 4px 10px -2px rgba(var(--glow), .6); transition: transform .2s var(--spring); position: relative; }
.theme-dot.on { transform: scale(1.12); }
.theme-dot.on::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); }
.ed-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; padding: 18px 20px 4px; }
.stat { border-radius: var(--r-md); padding: 12px 12px 11px; }
.stat .k { font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.stat .v { font-family: var(--display); font-size: 17px; font-weight: 600; margin-top: 5px; white-space: nowrap; letter-spacing: -.01em; }
.list-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 22px 10px; }
.list-head h3 { margin: 0; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.list-head .hint { font-size: 11.5px; color: var(--faint); }
.task-list { padding: 0 20px; display: flex; flex-direction: column; gap: 8px; }
.t-row { border-radius: var(--r-md); display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; cursor: pointer; }
.t-idx {
  width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--text);
  background: linear-gradient(145deg, rgba(var(--glow), .38), rgba(var(--glow), .08)); border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.3);
}
.t-name { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-at { font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 2px; font-variant-numeric: tabular-nums; }
.t-dur { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13.5px; padding: 7px 11px; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid var(--stroke); white-space: nowrap; }
.add-row { margin: 8px 20px 0; height: 56px; border-radius: var(--r-md); border: 1.5px dashed rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-2); font-weight: 600; font-size: 14.5px; width: calc(100% - 40px); transition: background .2s, transform .2s var(--ease); }
.add-row:active { background: rgba(255,255,255,.05); transform: scale(.98); }
.add-row svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.ed-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px max(14px, var(--safe-bot)); z-index: 20; background: linear-gradient(180deg, rgba(8,8,15,0), rgba(8,8,15,.94) 40%); transition: transform .4s var(--ease); }
.reordering-screen .ed-foot { transform: translateY(120%); }

/* ---------- PLAYER ---------- */
.pl-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 16px 0; }
.pl-title { text-align: center; flex: 1; min-width: 0; }
.pl-title .k { font-size: 10.5px; color: var(--muted); letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }
.pl-title .n { font-family: var(--display); font-weight: 600; font-size: 15px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-steps { display: flex; gap: 4px; padding: 16px 22px 0; }
.pl-steps i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; position: relative; }
.pl-steps i.done { background: rgba(var(--glow), .55); }
.pl-steps i.skip { background: rgba(255,255,255,.28); }
.pl-steps i.cur::after { content: ''; position: absolute; inset: 0; width: var(--p, 0%); background: var(--grad); border-radius: 2px; box-shadow: 0 0 8px rgba(var(--glow), .9); }
.pl-stage { position: relative; display: grid; place-items: center; margin-top: 18px; height: 318px; }
.pl-ring { position: absolute; width: 310px; height: 310px; }
.pl-ring circle { fill: none; }
.pl-ring .track { stroke: rgba(255,255,255,.07); }
.pl-ring .prog { stroke-linecap: round; transition: stroke-dashoffset .9s linear; filter: drop-shadow(0 0 10px rgba(var(--glow), .7)); }
.pl-ring .ticks { stroke: rgba(255,255,255,.14); }
.pl-disc {
  width: 236px; height: 236px; border-radius: 50%; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,.16), rgba(255,255,255,.03) 60%), rgba(10,10,20,.35);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 2px 1px rgba(255,255,255,.18), inset 0 -10px 30px rgba(0,0,0,.4), 0 30px 60px -20px rgba(0,0,0,.8), 0 0 60px -10px rgba(var(--glow), .35);
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
}
.pl-disc::before { content: ''; position: absolute; left: 30px; right: 30px; top: 8px; height: 90px; border-radius: 50%; background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0)); pointer-events: none; }
.pl-emoji { font-size: 26px; margin-bottom: 2px; }
.pl-task { font-family: var(--display); font-weight: 600; font-size: 17px; max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-time { font-weight: 200; font-size: 58px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.05; margin: 2px 0; }
.pl-time.long { font-size: 46px; }
.pl-ends { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.pl-badge { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); }
.paused .pl-time { animation: blink 1.6s ease-in-out infinite; }
.overtime .pl-ring .prog { stroke: url(#og) !important; animation: blink 1.2s ease-in-out infinite; }
.overtime .pl-time { color: #ffb86b; }
.pl-controls { display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 16px; }
.ctl { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; transition: transform .2s var(--spring); }
.ctl:active { transform: scale(.88); }
.ctl svg { width: 22px; height: 22px; fill: currentColor; }
.ctl-main {
  width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; position: relative; overflow: hidden;
  background: var(--grad); color: #0a0a12;
  box-shadow: 0 20px 44px -12px rgba(var(--glow), .9), inset 0 2px 2px rgba(255,255,255,.8), inset 0 -4px 10px rgba(0,0,0,.2);
  transition: transform .2s var(--spring);
}
.ctl-main::before { content: ''; position: absolute; inset: 0 0 50% 0; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.04)); }
.ctl-main:active { transform: scale(.9); }
.ctl-main svg { width: 30px; height: 30px; fill: currentColor; position: relative; }
.ctl-main .lbl { position: relative; font-weight: 800; font-size: 15px; }
.pl-chips { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.chip { height: 34px; padding: 0 14px; border-radius: 17px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: transform .2s var(--spring), background .2s; }
.chip:active { transform: scale(.92); }
.chip svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pl-queue { padding: 20px 20px 40px; }
.q-head { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 4px 10px; display: flex; justify-content: space-between; }
.q-next { border-radius: var(--r-md); padding: 14px; display: flex; align-items: center; gap: 12px; }
.q-list { margin-top: 8px; display: flex; flex-direction: column; }
.q-item { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 14px; }
.q-item .tm { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; width: 62px; flex: none; }
.q-item .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); font-weight: 500; }
.q-item .du { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.q-item.done .nm { text-decoration: line-through; color: var(--faint); }

/* ---------- SUMMARY ---------- */
.sum-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 30px 22px max(16px, var(--safe-bot)); text-align: center; }
.sum-badge { width: 130px; height: 130px; border-radius: 50%; display: grid; place-items: center; margin-top: 30px; background: var(--grad); position: relative; box-shadow: 0 30px 70px -10px rgba(var(--glow), .8), inset 0 3px 3px rgba(255,255,255,.7), inset 0 -8px 20px rgba(0,0,0,.25); animation: pop .8s var(--spring) both; }
.sum-badge::before { content: ''; position: absolute; inset: 0 0 50% 0; border-radius: 65px 65px 0 0; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0)); }
.sum-badge svg { width: 58px; height: 58px; stroke: #0a0a12; stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; position: relative; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .6s .45s var(--ease) forwards; }
@keyframes pop { from { transform: scale(.2); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sum-title { font-family: var(--display); font-weight: 800; font-size: 32px; letter-spacing: -.03em; margin: 30px 0 4px; }
.sum-sub { color: var(--muted); font-size: 14px; }
.sum-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; width: 100%; margin-top: 28px; }
.sum-grid .stat { text-align: left; padding: 14px; }
.sum-grid .v { font-size: 22px; }
.sum-actions { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: 8px; }
#confetti { position: absolute; inset: 0; pointer-events: none; z-index: 5; }

/* ---------- SETTINGS ---------- */
.set-group { margin: 0 20px 18px; border-radius: var(--r-lg); overflow: hidden; }
.set-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 10px 26px 8px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 56px; position: relative; }
.set-row + .set-row::before { content: ''; position: absolute; top: 0; left: 58px; right: 0; height: 1px; background: rgba(255,255,255,.07); }
.set-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--grad); color: #0a0a12; box-shadow: inset 0 1px 1px rgba(255,255,255,.6); }
.set-ico svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.set-txt { flex: 1; min-width: 0; }
.set-txt .t { font-weight: 600; font-size: 15px; }
.set-txt .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.set-val { color: var(--muted); font-size: 14px; font-weight: 500; }
.chev { width: 16px; height: 16px; stroke: var(--faint); fill: none; stroke-width: 2.4; flex: none; }

/* toggle switch */
.switch { width: 52px; height: 32px; border-radius: 16px; background: rgba(255,255,255,.12); position: relative; flex: none; transition: background .3s; border: 1px solid var(--stroke); box-shadow: inset 0 2px 4px rgba(0,0,0,.3); }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(180deg, #fff, #d9dbe8); box-shadow: 0 3px 8px rgba(0,0,0,.4); transition: transform .35s var(--spring); }
.switch.on { background: var(--grad); }
.switch.on::after { transform: translateX(20px); }

.seg { display: flex; padding: 3px; border-radius: 13px; background: rgba(255,255,255,.07); border: 1px solid var(--stroke); }
.seg button { flex: 1; height: 32px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-2); transition: background .25s, color .25s; padding: 0 10px; }
.seg button.on { background: rgba(255,255,255,.16); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 2px 8px rgba(0,0,0,.3); }

input[type=range] { -webkit-appearance: none; appearance: none; width: 120px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--c1), var(--c2)) 0/var(--v, 70%) 100% no-repeat, rgba(255,255,255,.12); outline: 0; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(180deg, #fff, #d9dbe8); box-shadow: 0 2px 8px rgba(0,0,0,.5); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; border: 0; background: #fff; }

/* ---------- SHEETS ---------- */
#sheets { position: absolute; inset: 0; z-index: 50; pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .35s var(--ease); pointer-events: auto; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: absolute; left: max(8px, calc(50% - 290px)); right: max(8px, calc(50% - 290px)); bottom: 8px; max-height: calc(100% - var(--safe-top) - 16px);
  border-radius: 44px 44px max(22px, calc(var(--screen-r) - 8px)) max(22px, calc(var(--screen-r) - 8px)); padding: 10px 18px max(18px, calc(var(--safe-bot) - 6px)); pointer-events: auto;
  transform: translateY(105%); transition: transform .5s var(--spring);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(40,40,62,.82), rgba(18,18,30,.9));
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 -20px 60px rgba(0,0,0,.6);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
}
.sheet.show { transform: none; }
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.25); margin: 0 auto 12px; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex: none; }
.sheet-head h3 { margin: 0; font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.sheet-body { overflow-y: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px; min-height: 0; flex: 1 1 auto; }
.sheet-body::-webkit-scrollbar { display: none; }
.text-in { width: 100%; height: 54px; border-radius: 16px; padding: 0 16px; font-size: 16px; font-weight: 600; outline: 0; background: rgba(255,255,255,.07); border: 1px solid var(--stroke); transition: border-color .2s, background .2s; }
.text-in:focus { border-color: rgba(var(--glow, 124,92,255), .7); background: rgba(255,255,255,.1); }
.field-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 16px 4px 8px; }
.quick { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.quick button { height: 34px; padding: 0 13px; border-radius: 12px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.07); border: 1px solid var(--stroke); transition: transform .15s var(--spring), background .2s; }
.quick button:active { transform: scale(.92); background: rgba(255,255,255,.15); }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; flex: none; }
.sheet-actions .btn-primary { flex: 1; }

/* wheels */
.wheels { position: relative; display: flex; justify-content: center; gap: 4px; height: 200px; border-radius: 20px; overflow: hidden; background: rgba(0,0,0,.2); border: 1px solid var(--stroke); }
.wheels::before { content: ''; position: absolute; left: 10px; right: 10px; top: 80px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); pointer-events: none; }
.wheels::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(20,20,34,.95), rgba(20,20,34,0) 35%, rgba(20,20,34,0) 65%, rgba(20,20,34,.95)); }
.wheel-col { display: flex; align-items: center; position: relative; z-index: 1; }
.wheel { height: 200px; width: 64px; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; touch-action: pan-y; }
.wheel::-webkit-scrollbar { display: none; }
.wheel .w-pad { height: 80px; }
.wheel .w-item { height: 40px; scroll-snap-align: center; display: grid; place-items: center; font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--faint); transition: color .15s, transform .15s; cursor: pointer; }
.wheel .w-item.sel { color: var(--text); transform: scale(1.08); }
.wheel-unit { font-size: 13px; font-weight: 600; color: var(--muted); width: 34px; margin-left: -6px; }

/* day chips */
.days { display: flex; justify-content: space-between; gap: 5px; }
.day { width: 40px; height: 40px; border-radius: 50%; font-weight: 700; font-size: 13px; background: rgba(255,255,255,.07); border: 1px solid var(--stroke); color: var(--text-2); transition: all .25s var(--spring); }
.day.on { background: var(--grad); color: #0a0a12; border-color: transparent; box-shadow: inset 0 1px 1px rgba(255,255,255,.6), 0 6px 14px -4px rgba(var(--glow, 124,92,255), .7); transform: scale(1.05); }

.sched-preview { margin-top: 12px; border-radius: 16px; padding: 4px 14px; background: rgba(0,0,0,.18); border: 1px solid var(--stroke); }
.sp-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 13.5px; border-bottom: 1px solid rgba(255,255,255,.05); }
.sp-row:last-child { border-bottom: 0; }
.sp-row .tm { font-variant-numeric: tabular-nums; font-weight: 600; width: 72px; flex: none; }
.sp-row .nm { color: var(--text-2); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-row .bell { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 2; }
.disabled-block { opacity: .35; pointer-events: none; transition: opacity .3s; }

.emoji-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.emoji-grid button { aspect-ratio: 1; border-radius: 16px; font-size: 26px; background: rgba(255,255,255,.06); border: 1px solid var(--stroke); transition: transform .15s var(--spring); }
.emoji-grid button:active { transform: scale(.85); }
.emoji-grid button.on { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.4); }

.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-item { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid var(--stroke); font-weight: 600; font-size: 15px; text-align: left; transition: transform .15s var(--ease), background .2s; }
.menu-item:active { transform: scale(.98); background: rgba(255,255,255,.1); }
.menu-item svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.menu-item.danger { color: var(--danger); }

/* ---------- alarm overlay ---------- */
#overlay-root { position: absolute; inset: 0; z-index: 80; pointer-events: none; }
.alarm {
  position: absolute; inset: 0; pointer-events: auto; display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--safe-top) + 62px) 26px calc(var(--safe-bot) + 16px); text-align: center;
  background: radial-gradient(120% 60% at 50% 30%, rgba(var(--glow), .35), rgba(5,5,11,.96) 70%);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  animation: inFade .5s var(--ease) both;
}
.alarm.out { animation: outFade .35s var(--ease) both; }
.alarm-ring { width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center; position: relative; font-size: 64px; }
.alarm-ring::before, .alarm-ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(var(--glow), .7); animation: ripple 2s ease-out infinite; }
.alarm-ring::after { animation-delay: 1s; }
@keyframes ripple { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
.alarm-core { width: 130px; height: 130px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); box-shadow: 0 0 80px rgba(var(--glow), .8), inset 0 3px 3px rgba(255,255,255,.7); position: relative; animation: shake 1.2s ease-in-out infinite; }
@keyframes shake { 0%, 50%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-8deg); } 20%, 40% { transform: rotate(8deg); } }
.alarm-k { margin-top: 44px; font-size: 12px; letter-spacing: .2em; font-weight: 700; text-transform: uppercase; color: var(--text-2); }
.alarm-t { font-weight: 200; font-size: 72px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; margin: 10px 0 8px; }
.alarm-n { font-family: var(--display); font-weight: 700; font-size: 24px; }
.alarm-s { color: var(--muted); font-size: 14px; margin-top: 6px; }
.alarm-actions { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.alarm-actions .row { display: flex; gap: 10px; }
.alarm-actions .row .btn-ghost { flex: 1; }

/* confirm dialog */
.dialog-wrap { position: absolute; inset: 0; pointer-events: auto; display: grid; place-items: center; background: rgba(0,0,0,.5); animation: inFade .25s var(--ease) both; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dialog { width: 290px; border-radius: 30px; padding: 24px 20px 16px; text-align: center; background: linear-gradient(180deg, rgba(44,44,68,.9), rgba(22,22,36,.94)); border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 30px 80px rgba(0,0,0,.7); }
.dialog h4 { margin: 0 0 6px; font-family: var(--display); font-size: 18px; }
.dialog p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.dialog .row { display: flex; gap: 8px; }
.dialog .row button { flex: 1; height: 48px; border-radius: 16px; font-weight: 700; font-size: 15px; background: rgba(255,255,255,.08); border: 1px solid var(--stroke); }
.dialog .row button.prime { background: var(--grad); color: #0a0a12; border: 0; }
.dialog .row button.danger { background: rgba(255,77,109,.18); color: var(--danger); border-color: rgba(255,77,109,.3); }

.fade-in { animation: inFade .4s var(--ease) both; }
.stagger > * { animation: rise .55s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .03s; } .stagger > *:nth-child(2) { animation-delay: .07s; }
.stagger > *:nth-child(3) { animation-delay: .11s; } .stagger > *:nth-child(4) { animation-delay: .15s; }
.stagger > *:nth-child(5) { animation-delay: .19s; } .stagger > *:nth-child(6) { animation-delay: .23s; }
.stagger > *:nth-child(n+7) { animation-delay: .27s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

.ed-pills { display: flex; gap: 8px; padding: 16px 22px 0; flex-wrap: wrap; }
.ed-pills .pill { cursor: pointer; }
.screen-summary, .screen-player, .screen-editor, .screen-home, .screen-settings, .screen-history { overflow: hidden; }

/* =========================================================
   Device chrome variants (see js/devices.js)
   ========================================================= */
.dev-speaker, .dev-homebtn, .fold-crease { display: none; }

/* Android punch-hole: the idle "island" is the camera hole, and live/toast grow out of it */
.dev-punch .island { top: 12px; width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 2px #111, 0 0 0 1px rgba(255,255,255,.04); }
.dev-punch .island.live { top: 7px; width: 184px; height: 28px; border-radius: 16px; box-shadow: none; }
.dev-punch .island.toast { top: 8px; width: min(340px, calc(100% - 20px)); height: 62px; border-radius: 31px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.dev-punch .b-action, .dev-punch .b-vol-down { display: none; }
.dev-punch .b-vol-up { left: auto; right: -3px; top: 170px; height: 86px; }
.dev-punch .b-power { top: 280px; height: 52px; }

/* no cutout (iPhone 8, tablet, Duo): island is hidden until it has something to say */
.dev-classic .island, .dev-plain .island { opacity: 0; top: 4px; width: 80px; height: 26px; pointer-events: none; }
.dev-classic .island.live, .dev-plain .island.live { opacity: 1; width: 184px; height: 28px; border-radius: 16px; pointer-events: auto; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.dev-classic .island.toast, .dev-plain .island.toast { opacity: 1; top: 6px; width: min(340px, calc(100% - 20px)); height: 62px; border-radius: 31px; pointer-events: auto; }
.dev-classic #screen.island-live .sb-signal, .dev-plain #screen.island-live .sb-signal { opacity: 1; }

/* iPhone 8: big top/bottom bezel, speaker, round home button */
.dev-classic .dev-speaker { display: block; position: absolute; top: 36px; left: 50%; width: 62px; height: 6px; margin-left: -31px; border-radius: 3px; background: #15151a; box-shadow: inset 0 1px 2px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.04); }
.dev-classic .dev-speaker i { position: absolute; left: -26px; top: -2px; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #2b3550, #07070a 60%); }
.dev-classic .dev-homebtn { display: block; position: absolute; bottom: 12px; left: 50%; width: 54px; height: 54px; margin-left: -27px; border-radius: 50%; border: 2px solid #2c2d33; background: radial-gradient(circle at 50% 35%, #111116, #050507); box-shadow: inset 0 1px 2px rgba(255,255,255,.06); }
.dev-classic .home-indicator { display: none; }
.dev-classic .sb-time { font-size: 12px; }

/* tablets / Duo: slim camera dot in the bezel, no side buttons */
.dev-plain .dev-speaker { display: block; position: absolute; top: 8px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #2b3550, #07070a 70%); }
.dev-plain .device-btn { display: none; }
.dev-punch .home-indicator, .dev-plain .home-indicator { width: 108px; height: 4px; margin-left: -54px; bottom: 7px; opacity: .55; }

/* open foldables: a soft crease down the middle */
.fold-open .fold-crease { display: block; position: absolute; top: 0; bottom: 0; left: 50%; width: 22px; margin-left: -11px; z-index: 95; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.03) 35%, rgba(0,0,0,.22) 50%, rgba(255,255,255,.03) 65%, transparent); }
.fold-open .home-indicator { opacity: .4; }

/* ---------- desktop device picker ---------- */
.devpanel {
  position: fixed; left: 20px; top: 50%; transform: translateY(-50%); z-index: 5; display: none;
  width: 228px; max-height: calc(100vh - 40px); overflow-y: auto; scrollbar-width: none;
  padding: 14px 10px 10px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
  border: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 30px 70px -20px rgba(0,0,0,.8);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  animation: inFade .5s var(--ease) both;
}
body.has-devpanel .devpanel { display: block; }
.dp-head { display: flex; flex-direction: column; gap: 4px; padding: 2px 10px 6px; }
.dp-head .brand-mark { font-size: 13px; }
.dp-k { font-size: 10.5px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.dp-group { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); padding: 12px 10px 5px; }
.dp-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; cursor: pointer; border: 1px solid transparent; transition: background .2s, border-color .2s; outline: 0; }
.dp-item:hover, .dp-item:focus-visible { background: rgba(255,255,255,.055); }
.dp-item.on { background: rgba(124,92,255,.14); border-color: rgba(139,92,246,.5); }
.dp-sil { width: 26px; height: 34px; display: grid; place-items: center; flex: none; color: var(--text-2); }
.dp-sil i { display: block; position: relative; border: 1.6px solid currentColor; border-radius: 4px; transition: width .35s var(--ease), height .35s var(--ease); }
.dp-sil i.open::after { content: ''; position: absolute; top: 2px; bottom: 2px; left: 50%; border-left: 1px dashed currentColor; opacity: .7; }
.dp-item.on .dp-sil { color: #b9a4ff; filter: drop-shadow(0 0 6px rgba(139,92,246,.7)); }
.dp-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dp-txt b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-txt small { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 1px; }
.dp-fold { display: flex; margin-top: 7px; padding: 2px; border-radius: 9px; background: rgba(255,255,255,.06); border: 1px solid var(--stroke); width: max-content; }
.dp-fold button { height: 22px; padding: 0 10px; border-radius: 7px; font-size: 11px; font-weight: 600; color: var(--muted); transition: background .2s, color .2s; }
.dp-fold button.on { background: rgba(255,255,255,.16); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.dp-foot { font-size: 10.5px; color: var(--faint); text-align: center; padding: 10px 0 2px; letter-spacing: .04em; }

/* =========================================================
   Fixed headers — only the lists scroll
   ========================================================= */
.list-scroll { flex: 1; min-height: 0; }
.screen-home .section-title { flex: none; }
.ed-head { flex: none; }
.foot-space { height: calc(110px + var(--safe-bot)); }
/* soft edge where the list slides under the fixed header */
.list-scroll { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12px); mask-image: linear-gradient(180deg, transparent 0, #000 12px); padding-top: 4px; }
.routine-list { padding-top: 2px; }

/* =========================================================
   Swipe to delete
   ========================================================= */
.swipe-row { position: relative; border-radius: var(--r-lg); }
.swipe-row.t-wrap { border-radius: var(--r-md); }
.swipe-face { z-index: 1; will-change: transform; }
.swipe-del {
  position: absolute; top: 0; bottom: 0; right: 0; z-index: 0;
  width: max(0px, calc(var(--sx, 0px) - 8px)); overflow: hidden; opacity: 0;
  border-radius: inherit; color: #fff; white-space: nowrap;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; font-weight: 700; letter-spacing: .01em;
  background: linear-gradient(135deg, #ff7a8c, #ff3358);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.45), inset 0 -2px 6px rgba(0,0,0,.18), 0 10px 24px -8px rgba(255,51,88,.65);
}
.swipe-row.swiping .swipe-del { opacity: 1; }
.swipe-del svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; transition: transform .25s var(--spring); }
.swipe-row.armed .swipe-del svg, .swipe-row.deleting .swipe-del svg { transform: scale(1.25); }
.swipe-row.collapse { transition: height .3s var(--ease), margin .3s var(--ease), opacity .25s; opacity: 0; overflow: hidden; }
.r-row.collapse { margin-bottom: -12px; }
.t-wrap.collapse { margin-bottom: -8px; }
.reordering .swipe-del { display: none; }
/* the FAB steps aside while a row shows its Delete button */
.screen-home:has(.has-open) .fab { transform: scale(.4); opacity: 0; pointer-events: none; }
.fab { transition: transform .25s var(--spring), opacity .2s; }

/* =========================================================
   Editor pills: advance toggle + reminder popover
   ========================================================= */
.pill-toggle { transition: background .25s, border-color .25s, color .25s, box-shadow .25s; }
.pill-toggle.on {
  color: #ffc48a; border-color: rgba(251,146,60,.6);
  background: linear-gradient(135deg, rgba(251,146,60,.26), rgba(244,63,94,.16));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 16px -4px rgba(251,146,60,.65);
}
.pill:active { transform: scale(.96); }

.pop-backdrop { position: absolute; inset: 0; pointer-events: auto; background: rgba(0,0,0,0); transition: background .25s; }
.pop-backdrop.show { background: rgba(0,0,0,.28); }
.popover {
  position: absolute; z-index: 2; pointer-events: auto; padding: 14px;
  border-radius: 26px; transform-origin: var(--arrow-x, 50%) 0;
  background: linear-gradient(180deg, rgba(44,44,68,.9), rgba(20,20,34,.94));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 24px 60px rgba(0,0,0,.65), 0 0 40px -12px rgba(var(--glow, 124,92,255), .45);
  backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
  opacity: 0; transform: translateY(-6px) scale(.94); transition: opacity .22s var(--ease), transform .3s var(--spring);
}
.popover.show { opacity: 1; transform: none; }
.popover::before { content: ''; position: absolute; top: -7px; left: calc(var(--arrow-x, 50%) - 7px); width: 14px; height: 14px; transform: rotate(45deg); border-radius: 3px 0 0 0; background: rgb(44,44,68); border-left: 1px solid rgba(255,255,255,.14); border-top: 1px solid rgba(255,255,255,.14); }
.popover.no-arrow::before { display: none; }
.rp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 10px; font-size: 13px; font-weight: 700; }
.rp-head > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.rp-head svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rp-days { color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rem-pop .wheels { height: 160px; }
.rem-pop .wheels::before { top: 60px; }
.rem-pop .wheel { height: 160px; }
.rem-pop .wheel .w-pad { height: 60px; }
.rem-pop .days { margin-top: 12px; gap: 3px; }
.rem-pop .day { width: 36px; height: 36px; font-size: 12.5px; }
.rp-actions { display: flex; gap: 8px; margin-top: 14px; }
.rp-actions .btn-primary { flex: 1; height: 48px; border-radius: 16px; font-size: 15px; }
.rp-actions .btn-ghost { height: 48px; font-size: 14px; }

/* =========================================================
   History
   ========================================================= */
.set-label-row { display: flex; align-items: baseline; justify-content: space-between; padding-right: 26px; }
.link-btn { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-2); padding: 4px 0 4px 10px; transition: color .2s, opacity .2s; }
.link-btn:hover { color: var(--text); }
.link-btn:active { opacity: .6; }
.link-btn[disabled] { opacity: .3; pointer-events: none; }
.tb-link { width: 42px; text-align: right; font-size: 14px; padding: 0; }
.hist-row { width: 100%; text-align: left; transition: background .2s; }
.hist-row:active { background: rgba(255,255,255,.05); }
.hist-row .set-val { margin-right: -2px; }
.hist-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; padding: 4px 20px 12px; flex: none; }
.hist-summary:empty { display: none; }

.hist-detail { padding-bottom: 6px; }
.hd-sub { color: var(--muted); font-size: 13px; margin: -4px 4px 14px; }
.hd-hero { border-radius: 22px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hd-k { font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hd-big { font-weight: 200; font-size: 40px; letter-spacing: -.035em; line-height: 1.05; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hd-plan { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.hd-stats { display: flex; gap: 8px; margin-top: 10px; }
.hd-stats > div { flex: 1 1 0; min-width: 0; border-radius: 14px; padding: 9px 12px; background: rgba(255,255,255,.05); border: 1px solid var(--stroke); display: flex; align-items: baseline; gap: 6px; }
.hd-stats b { font-family: var(--display); font-weight: 600; font-size: 15px; }
.hd-stats span { font-size: 11.5px; color: var(--muted); }
.hd-split { display: flex; gap: 3px; height: 12px; }
.hd-split i { display: block; height: 100%; border-radius: 4px; background: var(--grad); min-width: 4px; opacity: .9; }
.hd-split i:nth-child(even) { opacity: .5; }
.hd-legend { display: inline-flex; align-items: center; gap: 5px; letter-spacing: .04em; text-transform: none; font-weight: 600; }
.hd-legend i { display: inline-block; width: 10px; height: 6px; border-radius: 3px; margin-left: 6px; }
.hd-legend .lp { background: var(--grad); }
.hd-legend .lo { background: repeating-linear-gradient(-45deg, #ffd29a 0 2px, #ff4d6d 2px 4px); }
.hb-list { display: flex; flex-direction: column; gap: 8px; }
.hb-row { border-radius: 16px; padding: 11px 12px 10px; background: rgba(255,255,255,.045); border: 1px solid var(--stroke); }
.hb-top { display: flex; align-items: center; gap: 10px; }
.hb-idx { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; background: rgba(var(--glow), .22); }
.hb-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-act { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.hb-bar { position: relative; height: 7px; margin: 9px 0 7px; border-radius: 4px; background: rgba(255,255,255,.04); }
.hb-bar i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 4px; }
.hb-bar .plan { background: rgba(255,255,255,.09); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.hb-bar .fill { background: var(--grad); box-shadow: 0 0 10px rgba(var(--glow), .45); }
.hb-bar .over { background: repeating-linear-gradient(-45deg, #ffd29a 0 3px, #ff4d6d 3px 6px); border-radius: 0 4px 4px 0; box-shadow: 0 0 10px rgba(255,120,100,.45); }
.hb-bar .mark { width: 2px; margin-left: -1px; top: -3px; bottom: -3px; border-radius: 1px; background: rgba(255,255,255,.75); }
.hb-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); }
.hb-row.skipped .hb-name, .hb-row.unrun .hb-name { color: var(--text-2); }
.hb-row.unrun { opacity: .5; }
.hb-row.skipped .hb-bar .fill { background: rgba(255,255,255,.3); box-shadow: none; }
.dchip { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dchip.lg { font-size: 13px; padding: 6px 11px; border-radius: 12px; }
.dchip.over { color: #ffb86b; background: rgba(255,152,80,.13); border: 1px solid rgba(255,152,80,.28); }
.dchip.under { color: var(--ok); background: rgba(60,242,168,.1); border: 1px solid rgba(60,242,168,.25); }
.dchip.even { color: var(--text-2); background: rgba(255,255,255,.07); border: 1px solid var(--stroke); }
.hd-empty { margin-top: 16px; padding: 18px; border-radius: 16px; text-align: center; color: var(--muted); font-size: 13px; background: rgba(255,255,255,.04); border: 1px dashed var(--stroke-2); }

.menu-item.radio { gap: 12px; }
.menu-item .rdot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--stroke-2); flex: none; position: relative; transition: border-color .2s; }
.menu-item.radio.on { border-color: rgba(255,77,109,.4); background: rgba(255,77,109,.08); }
.menu-item.radio.on .rdot { border-color: var(--danger); }
.menu-item.radio.on .rdot::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--danger); }
.menu-item .rcount { color: var(--muted); font-size: 13px; font-weight: 500; }
.btn-primary.danger-btn { background: linear-gradient(135deg, #ff8a9b, #ff3358); color: #fff; box-shadow: 0 14px 36px -10px rgba(255,51,88,.6), inset 0 1px 1px rgba(255,255,255,.6); }

/* =========================================================
   Responsive: big screens (unfolded, tablet) + short screens
   ========================================================= */
@container screen (min-width: 560px) {
  .screen { padding-left: max(0px, calc((100cqw - 720px) / 2)); padding-right: max(0px, calc((100cqw - 720px) / 2)); }
  .routine-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; align-items: stretch; }
  /* every card fills its cell; the task bar pins to the bottom so short cards don't look hollow */
  .routine-list > .r-row { display: flex; min-width: 0; }
  .routine-list > .r-row > .r-card { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .routine-list > .r-row > .r-card .r-top { margin-bottom: 14px; }
  .routine-list > .r-row > .r-card .r-bar { margin-top: auto; flex: none; }
  .routine-list.reordering { display: flex; }   /* drag-reorder is a single column */
  .r-row.collapse { margin-bottom: 0; }
  .pl-queue { max-width: 600px; margin: 0 auto; width: 100%; }
  .sum-wrap { max-width: 560px; margin: 0 auto; width: 100%; }
  .fab { right: max(22px, calc((100cqw - 720px) / 2 + 22px)); }
}
@container screen (min-width: 760px) {
  .home-clock { font-size: 72px; }
  .pl-stage { transform: scale(1.12); margin: 34px 0 20px; }
}
@container screen (max-height: 700px) {
  .home-clock { font-size: 46px; }
  .section-title { padding: 14px 22px 10px; }
  .now-card { margin-top: 10px; padding: 12px; }
  .ed-hero { padding-top: 0; }
  .ed-emoji { width: 52px; height: 52px; font-size: 27px; border-radius: 18px; }
  .ed-name { font-size: 22px; }
  .theme-row { padding-top: 10px; gap: 8px; }
  .theme-dot { width: 24px; height: 24px; }
  .ed-pills { padding-top: 10px; }
  .ed-stats { padding-top: 10px; gap: 8px; }
  .ed-stats .stat { padding: 9px 10px 8px; }
  .ed-stats .stat .v { font-size: 15px; margin-top: 3px; }
  .list-head { padding: 14px 22px 8px; }
  .ed-foot { padding-top: 12px; }
  .ed-foot .btn-primary { height: 52px; }
  .foot-space { height: calc(96px + var(--safe-bot)); }
  .pl-stage { transform: scale(.84); height: 270px; margin-top: 4px; }
  .pl-controls { margin-top: 4px; }
  .sum-badge { width: 100px; height: 100px; margin-top: 6px; }
  .sum-title { margin-top: 18px; font-size: 28px; }
  .sum-grid { margin-top: 18px; }
}
