:root {
  --bg: #0b110f;
  --surface: rgba(18, 27, 23, 0.84);
  --line: rgba(94, 140, 120, 0.25);
  --ink: #eef5f1;
  --muted: #98aea4;
  --accent: #3ecf8e;
  --accent-ink: #062115;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.bg-video, .bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bg-canvas { opacity: 0.45; pointer-events: none; }
.scrim { position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(15, 32, 24, 0.55), rgba(8, 12, 10, 0.88)); }

.shell { position: relative; z-index: 1; max-width: 1080px; min-height: 100%; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 18px; backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { border-radius: 8px; }
.brand h1 { margin: 0; font-size: 17px; }
.subtitle { margin: 0; font-size: 12px; color: var(--muted); }
.top-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge { padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--muted); }
.badge.pro { border-color: var(--accent); color: var(--accent); }

.grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; backdrop-filter: blur(14px); display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 16px; }
.hint { margin: 0; font-size: 12px; color: var(--muted); }

.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--ink); cursor: pointer; }
.chip.active, .chip:hover { border-color: var(--accent); color: var(--accent); }

.phase-label { text-align: center; font-size: 12px; letter-spacing: 0.14em; color: var(--accent); font-weight: 700; margin-top: 6px; }
.clock { text-align: center; font-size: clamp(56px, 9vw, 84px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; line-height: 1.05; }
.timer-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

.btn { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.06); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.accent { border-color: var(--accent); color: var(--accent); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.lg { padding: 10px 18px; }
.hidden { display: none !important; }

.stats-row { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
.stat-num { display: block; font-size: 20px; font-weight: 700; }
.stat-lbl { font-size: 11px; color: var(--muted); }

.sliders { display: flex; flex-direction: column; gap: 12px; }
.slider-row { display: grid; grid-template-columns: 1fr 130px 42px; align-items: center; gap: 10px; font-size: 13px; }
.slider-row input[type="range"] { accent-color: var(--accent); width: 100%; }
.slider-row output { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }

.foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); padding: 4px 6px; }
.foot a { color: var(--accent); }

.modal { background: #121b17; color: var(--ink); border: 1px solid var(--line); border-radius: 16px; width: min(440px, 92vw); padding: 20px; }
.modal::backdrop { background: rgba(0,0,0,0.72); }
.modal-form { display: flex; flex-direction: column; gap: 12px; }
.modal-form input { width: 100%; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line); background: #0b110f; color: var(--ink); font: inherit; margin-top: 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
