:root {
  color-scheme: dark;
  --bg: #071018;
  --panel: rgba(11, 25, 37, 0.92);
  --panel-2: rgba(15, 35, 50, 0.82);
  --line: rgba(48, 225, 255, 0.28);
  --cyan: #30e1ff;
  --blue: #2789ff;
  --yellow: #f5ff4a;
  --magenta: #db4dff;
  --text: #f5fbff;
  --muted: #93a9b8;
  --success: #52ffad;
  --danger: #ff5a7a;
  --radius: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(18px, env(safe-area-inset-top)) 16px calc(120px + var(--safe-bottom));
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(48,225,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(48,225,255,.035) 1px, transparent 1px),
    radial-gradient(circle at 50% -10%, rgba(39,137,255,.23), transparent 36%),
    var(--bg);
  background-size: 34px 34px, 34px 34px, auto, auto;
  overflow-x: hidden;
}
button, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.ambient { position: fixed; width: 300px; height: 300px; border-radius: 50%; filter: blur(110px); opacity: .12; pointer-events: none; }
.ambient-one { background: var(--cyan); top: 20%; left: -220px; }
.ambient-two { background: var(--magenta); bottom: 10%; right: -230px; }
.app-header, main { max-width: 1050px; margin-inline: auto; }
.app-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.eyebrow, .metric-label { margin: 0 0 6px; color: var(--cyan); font-size: .68rem; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(1.75rem, 7vw, 3.4rem); line-height: .98; letter-spacing: -.045em; text-transform: uppercase; text-shadow: 0 0 24px rgba(48,225,255,.2); }
.tagline { max-width: 620px; margin: 10px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.icon-button { width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid var(--line); border-radius: 50%; color: var(--cyan); background: rgba(7,16,24,.78); font-size: 1.2rem; font-weight: 800; box-shadow: inset 0 0 18px rgba(48,225,255,.05); }
.dashboard { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: stretch; margin-bottom: 16px; }
.metric, .secondary-button { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.metric { min-width: 0; padding: 14px; }
.metric strong { display: block; font-size: 1.45rem; }
.metric.compact { min-width: 105px; }
.progress-track { height: 5px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: #152534; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan), var(--yellow)); box-shadow: 0 0 12px var(--cyan); transition: width .25s ease; }
.secondary-button { padding: 12px 16px; color: var(--text); font-weight: 800; }
.day-tabs { display: grid; grid-template-columns: repeat(6, minmax(58px, 1fr)); gap: 7px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab { min-height: 52px; padding: 8px 5px; border: 1px solid rgba(147,169,184,.22); border-radius: 12px; color: var(--muted); background: rgba(9,22,32,.85); font-size: .68rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.day-tab span { display: block; margin-top: 3px; font-size: .55rem; color: inherit; opacity: .78; }
.day-tab.active { color: #061019; border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 20px rgba(48,225,255,.28); }
.day-tab.core.active { border-color: var(--yellow); background: var(--yellow); box-shadow: 0 0 20px rgba(245,255,74,.24); }
.workout-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(17,39,55,.94), rgba(7,17,26,.96)); box-shadow: 0 20px 60px rgba(0,0,0,.28), inset 0 0 32px rgba(48,225,255,.025); }
.workout-card::before { content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--blue), var(--cyan), transparent 75%); }
.workout-card.core::before { background: linear-gradient(90deg, var(--yellow), var(--magenta), transparent 75%); }
.workout-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 18px; border-bottom: 1px solid var(--line); }
.day-identity { display: flex; align-items: center; gap: 13px; }
.day-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--cyan); border-radius: 14px; color: var(--cyan); background: rgba(48,225,255,.06); box-shadow: inset 0 0 20px rgba(48,225,255,.06), 0 0 18px rgba(48,225,255,.08); }
.core .day-icon { border-color: var(--yellow); color: var(--yellow); background: rgba(245,255,74,.055); }
.day-icon svg { width: 28px; height: 28px; }
.workout-heading h2 { margin: 0; font-size: 1.2rem; text-transform: uppercase; letter-spacing: -.02em; }
.workout-heading p { margin: 4px 0 0; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
.reset-day { padding: 10px 11px; border: 1px solid rgba(147,169,184,.22); border-radius: 10px; color: var(--muted); background: transparent; font-size: .72rem; font-weight: 800; }
.exercise-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.section-label { grid-column: 1/-1; margin: 6px 3px 0; color: var(--yellow); font-size: .65rem; font-weight: 900; letter-spacing: .18em; }
.exercise { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; min-height: 84px; padding: 12px; border: 1px solid rgba(147,169,184,.16); border-radius: 14px; background: rgba(6,17,25,.74); transition: border-color .2s ease, opacity .2s ease, transform .2s ease; }
.exercise:active { transform: scale(.99); }
.exercise.complete { opacity: .58; border-color: rgba(82,255,173,.3); }
.exercise.complete .exercise-name { text-decoration: line-through; }
.check { appearance: none; width: 25px; height: 25px; margin: 0; border: 1px solid var(--cyan); border-radius: 7px; background: #071018; }
.check:checked { border-color: var(--success); background: var(--success); box-shadow: 0 0 14px rgba(82,255,173,.3); }
.check:checked::after { content: "✓"; display: grid; place-items: center; height: 100%; color: #04150d; font-weight: 1000; }
.exercise-name { display: block; margin-bottom: 5px; font-size: .9rem; line-height: 1.15; }
.exercise-meta { color: var(--muted); font-size: .72rem; line-height: 1.35; }
.exercise-meta b { color: var(--yellow); }
.video-link { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(219,77,255,.42); border-radius: 12px; color: #fff; background: rgba(219,77,255,.09); text-decoration: none; box-shadow: inset 0 0 16px rgba(219,77,255,.05); }
.video-link svg { width: 18px; height: 18px; fill: currentColor; }
.walk-card { grid-column: 1/-1; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 14px; border: 1px solid rgba(245,255,74,.36); border-radius: 14px; background: rgba(245,255,74,.06); }
.walk-card .day-icon { width: 42px; height: 42px; border-color: var(--yellow); color: var(--yellow); }
.walk-card strong { display: block; color: var(--yellow); font-size: .95rem; }
.walk-card span { color: var(--muted); font-size: .75rem; }
.timer { position: fixed; z-index: 20; left: 50%; bottom: calc(12px + var(--safe-bottom)); transform: translateX(-50%); width: min(calc(100% - 24px), 620px); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid rgba(48,225,255,.45); border-radius: 16px; background: rgba(5,14,22,.92); backdrop-filter: blur(18px); box-shadow: 0 12px 40px rgba(0,0,0,.45), 0 0 24px rgba(48,225,255,.08); }
.timer strong { display: block; color: var(--cyan); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.timer-controls { display: flex; gap: 7px; }
.timer select, .timer button { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #0d2130; font-weight: 800; }
.timer select { padding: 0 7px; }
.timer button { padding: 0 12px; color: #041016; background: var(--cyan); }
.timer button.timer-reset { color: var(--muted); background: transparent; }
dialog { width: min(92vw, 520px); border: 1px solid var(--cyan); border-radius: 18px; color: var(--text); background: #091722; box-shadow: 0 24px 80px #000; }
dialog::backdrop { background: rgba(0,0,0,.76); backdrop-filter: blur(8px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; }
dialog h2 { margin: 0; text-transform: uppercase; }
dialog li { margin: 10px 0; color: #dceaf2; line-height: 1.5; }
.dialog-note { padding: 11px; border-left: 3px solid var(--yellow); color: var(--muted); background: rgba(245,255,74,.05); font-size: .82rem; line-height: 1.45; }
@media (max-width: 720px) {
  .dashboard { grid-template-columns: 1fr auto; }
  .secondary-button { grid-column: 1/-1; min-height: 43px; }
  .day-tabs { grid-template-columns: repeat(6, 70px); }
  .exercise-list { grid-template-columns: 1fr; }
  .timer { align-items: stretch; }
  .timer-controls { display: grid; grid-template-columns: repeat(3, auto); }
}
@media (max-width: 430px) {
  body { padding-inline: 12px; }
  .app-header { margin-bottom: 16px; }
  .tagline { font-size: .8rem; }
  .workout-heading { padding: 14px; }
  .reset-day { font-size: 0; width: 38px; height: 38px; padding: 0; }
  .reset-day::after { content: "↺"; font-size: 1.1rem; }
  .exercise-list { padding: 10px; gap: 8px; }
  .exercise { min-height: 80px; padding: 10px; }
  .timer { flex-direction: column; }
  .timer > div:first-child { display: flex; justify-content: space-between; align-items: center; }
  .timer-controls { grid-template-columns: 1fr 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
