:root {
  --bg: #06111c;
  --bg-2: #0a1a2a;
  --surface: #0e2133;
  --surface-2: #132b42;
  --surface-3: #1a3753;
  --line: rgba(148, 197, 255, 0.12);
  --line-2: rgba(148, 197, 255, 0.22);
  --text: #e9f2fb;
  --muted: #8ea7c0;
  --dim: #5d7790;
  --accent: #38bdf8;
  --accent-2: #67e8f9;
  --work: #2ee6c5;
  --rest: #fbbf24;
  --prep: #94a3b8;
  --danger: #fb7185;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --font-head: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --stroke: var(--accent);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.08; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
main { flex: 1; outline: none; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 8px; }

/* ───────── Top bar ───────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(6, 17, 28, 0.78);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(140deg, #0e3a5a, #0b2236); border: 1px solid var(--line-2); display: grid; place-items: center; }
.brand-mark svg { width: 24px; height: 24px; fill: none; stroke: var(--accent-2); stroke-width: 2.6; stroke-linecap: round; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14.5px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: rgba(148, 197, 255, 0.08); }
.nav a.active { color: var(--text); background: var(--surface-2); }

/* ───────── Buttons & chips ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 15.5px; white-space: nowrap;
  transition: transform .15s ease, background .2s, border-color .2s, box-shadow .2s;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--accent); color: #032033; box-shadow: 0 10px 30px -10px rgba(56, 189, 248, 0.7); }
.btn-primary:hover { background: #5cccfa; }
.btn-ghost { background: rgba(148, 197, 255, 0.06); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(148, 197, 255, 0.12); }
.btn-lg { height: 58px; padding: 0 30px; font-size: 17px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); font-weight: 600; font-size: 14px;
  transition: all .2s;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip[aria-pressed="true"] { color: #04121d; background: var(--c, var(--accent)); border-color: transparent; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); }
.chip[aria-pressed="true"] .dot { background: #04121d; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent);
}
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 16px; height: 16px; opacity: .8; }

/* ───────── Hero ───────── */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 140%;
  background:
    radial-gradient(60% 50% at 80% 20%, rgba(56, 189, 248, 0.22), transparent 60%),
    radial-gradient(45% 40% at 10% 80%, rgba(46, 230, 197, 0.14), transparent 60%),
    radial-gradient(30% 30% at 55% 60%, rgba(103, 232, 249, 0.08), transparent 70%);
  pointer-events: none;
}
.hero-lanes { position: absolute; inset: auto 0 0 0; height: 10px; display: flex; opacity: .55; }
.hero-lanes i { flex: 1; background: repeating-linear-gradient(90deg, #e11d48 0 22px, #f8fafc 22px 44px, #1d4ed8 44px 66px, #f8fafc 66px 88px); opacity: .45; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-2); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.hero h1 { font-size: clamp(40px, 6.2vw, 74px); font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--work)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { margin-top: 20px; font-size: 18.5px; color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-card {
  position: relative; background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-2); border-radius: 24px; padding: 22px; box-shadow: var(--shadow);
}
.hero-card .media { aspect-ratio: 16/10; border-radius: 14px; }
.hero-card-row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 12px; }
.hero-timer { font-family: var(--font-head); font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--work); line-height: 1; }
.hero-card-label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--work); font-weight: 700; }
.hero-card-name { font-weight: 700; font-size: 17px; margin-top: 2px; }
.hero-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.hero-steps div { background: rgba(148, 197, 255, 0.05); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.hero-steps b { display: block; color: var(--text); font-size: 14px; }

/* ───────── Stats ───────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 40px; position: relative; }
.stat { background: rgba(14, 33, 51, 0.7); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.stat b { display: block; font-family: var(--font-head); font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }

/* ───────── Sections ───────── */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; }
.section-head p { color: var(--muted); margin-top: 8px; max-width: 560px; }

/* ───────── Program cards ───────── */
.grid-programs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.pcard {
  --c: var(--accent);
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s ease, border-color .25s, box-shadow .25s;
}
.pcard:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 45%, transparent); box-shadow: var(--shadow); }
.pcard .media { aspect-ratio: 16/9; border-radius: 0; }
.pcard-band { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); z-index: 2; }
.pcard-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard h3 { font-size: 24px; font-weight: 800; }
.pcard p { color: var(--muted); font-size: 14.5px; }
.pcard-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; }
.pcard-time { font-family: var(--font-head); font-size: 26px; font-weight: 800; }
.pcard-time small { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 3px; }
.pcard-go { width: 44px; height: 44px; border-radius: 50%; background: var(--c); color: #04121d; display: grid; place-items: center; transition: transform .2s; }
.pcard:hover .pcard-go { transform: scale(1.08); }
.pcard-go svg { width: 18px; height: 18px; margin-left: 2px; }

/* ───────── How it works / tips ───────── */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.how-num { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--accent-2); font-weight: 800; margin-bottom: 14px; }
.how-item h3 { font-size: 19px; margin-bottom: 6px; }
.how-item p { color: var(--muted); font-size: 14.5px; }

/* ───────── Media (video + placeholder) ───────── */
.media {
  --c: var(--accent);
  position: relative; overflow: hidden; background: #081726; border-radius: var(--radius-sm);
  isolation: isolate;
}
.media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.media.ready video { opacity: 1; }
.media.ready .ph { opacity: 0; }
.ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  padding: 16px; transition: opacity .35s;
  background:
    radial-gradient(80% 70% at 85% 10%, color-mix(in srgb, var(--c) 30%, transparent), transparent 60%),
    radial-gradient(60% 60% at 0% 100%, rgba(46, 230, 197, 0.12), transparent 60%),
    linear-gradient(160deg, #0f2a42, #081726);
}
.ph::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background: repeating-linear-gradient(180deg, transparent 0 22px, rgba(148, 197, 255, 0.05) 22px 23px);
}
.ph-waves { position: absolute; left: -10%; right: -10%; top: 32%; height: 60px; opacity: .35; animation: drift 9s linear infinite; }
.ph-waves path { fill: none; stroke: var(--c); stroke-width: 2; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-9%); } }
.ph-icon { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(6, 17, 28, .5); border: 1px solid var(--line-2); color: var(--c); }
.ph-icon svg { width: 18px; height: 18px; }
.ph-name { position: relative; font-family: var(--font-head); font-weight: 800; font-size: 20px; line-height: 1.1; }
.ph-note { position: relative; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.excard .ph-name { display: none; }
.media.sm .ph { padding: 10px; }
.media.sm .ph-name { font-size: 13px; }
.media.sm .ph-note, .media.sm .ph-icon { display: none; }
.media.xl .ph-name { font-size: clamp(26px, 4vw, 44px); }
.media.xl .ph { padding: 28px; }

/* ───────── Library ───────── */
.page-head { padding-top: 48px; padding-bottom: 8px; }
.page-head h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 10px; max-width: 640px; font-size: 17px; }
.toolbar { display: flex; flex-direction: column; gap: 12px; margin: 26px 0 24px; }
.search {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; max-width: 420px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
}
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font: inherit; min-width: 0; }
.cat-group { margin-bottom: 36px; }
.cat-group h2 { font-size: 22px; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; }
.cat-group h2 span { color: var(--dim); font-size: 15px; font-family: var(--font); font-weight: 600; }
.grid-ex { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.excard { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.excard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.excard .media { aspect-ratio: 16/10; border-radius: 0; }
.excard-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.excard h3 { font-family: var(--font); font-size: 15.5px; font-weight: 700; letter-spacing: 0; }
.stroke-dots { display: flex; gap: 5px; align-items: center; }
.stroke-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.excard small { color: var(--muted); font-size: 12.5px; }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* ───────── Workout detail ───────── */
.detail-hero { position: relative; padding: 40px 0 32px; border-bottom: 1px solid var(--line); overflow: hidden; }
.detail-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 80% at 90% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); pointer-events: none; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 14px; margin-bottom: 22px; }
.back-link:hover { color: var(--text); }
.back-link svg { width: 16px; height: 16px; }
.detail-grid { position: relative; display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }
.detail-hero h1 { font-size: clamp(36px, 5vw, 60px); font-weight: 800; margin: 12px 0 12px; }
.detail-hero .lead { color: var(--muted); font-size: 17px; max-width: 620px; }
.setup { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow); }
.setup-time { display: flex; align-items: baseline; gap: 8px; }
.setup-time b { font-family: var(--font-head); font-size: 52px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.setup-time span { color: var(--muted); font-weight: 600; }
.field-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.seg button { height: 38px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 700; font-size: 13.5px; transition: all .2s; }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.seg-note { margin-top: 8px; font-size: 13px; color: var(--muted); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: none; border: 0; padding: 0; width: 100%; text-align: left; }
.switch-track { width: 46px; height: 28px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background .2s; flex: none; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch[aria-checked="true"] .switch-track { background: var(--accent); }
.switch[aria-checked="true"] .switch-track::after { transform: translateX(18px); }
.switch b { display: block; font-size: 15px; }
.switch small { color: var(--muted); font-size: 13px; }
.need { display: flex; flex-wrap: wrap; gap: 6px; }
.need span { font-size: 13px; padding: 5px 10px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); }

.blocks { display: flex; flex-direction: column; gap: 28px; padding-top: 40px; padding-bottom: 64px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.block-head h3 { font-size: 22px; }
.block-head span { color: var(--muted); font-size: 14px; font-weight: 600; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: 112px 1fr auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; padding-right: 18px; text-align: left; width: 100%; transition: border-color .2s; }
.row:hover { border-color: var(--line-2); }
.row .media { aspect-ratio: 16/10; border-radius: 8px; }
.row h4 { font-family: var(--font); font-size: 16px; font-weight: 700; letter-spacing: 0; }
.row p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.row-time { font-family: var(--font-head); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; color: var(--muted); }
.swap { font-size: 12px; color: var(--rest); font-weight: 600; }

/* ───────── Modal ───────── */
.modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(2, 8, 14, 0.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .2s ease; }
.modal { width: min(880px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--shadow); animation: pop .25s cubic-bezier(.2, .9, .3, 1.2); }
.modal .media { aspect-ratio: 16/9; border-radius: 0; }
.modal-body { padding: 24px 26px 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.modal-title { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.modal-title h2 { font-size: 32px; font-weight: 800; margin-top: 8px; }
.modal-why { grid-column: 1 / -1; color: var(--muted); font-size: 16px; padding: 14px 16px; border-left: 3px solid var(--accent); background: rgba(56, 189, 248, 0.06); border-radius: 0 10px 10px 0; }
.list h4 { font-family: var(--font); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.list ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.list li { display: flex; gap: 10px; font-size: 15px; }
.list li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: color-mix(in srgb, var(--work) 18%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232ee6c5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat; }
.list.bad li::before { background: color-mix(in srgb, var(--danger) 18%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fb7185' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center/11px no-repeat; }
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(148, 197, 255, 0.06); display: grid; place-items: center; transition: background .2s; }
.icon-btn:hover { background: rgba(148, 197, 255, 0.14); }
.icon-btn svg { width: 20px; height: 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ───────── Player ───────── */
.player {
  --phase: var(--work);
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: grid; grid-template-rows: auto 1fr auto; animation: fade .25s ease;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.player[data-phase="rest"] { --phase: var(--rest); }
.player[data-phase="prep"] { --phase: var(--prep); }
.pl-top { display: flex; align-items: center; gap: 14px; padding: 14px 20px; }
.pl-title { flex: 1; min-width: 0; }
.pl-title b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-title span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.pl-progress { position: absolute; left: 0; right: 0; top: 0; height: 4px; display: flex; gap: 2px; }
.pl-progress i { flex: var(--w); background: var(--surface-3); position: relative; overflow: hidden; }
.pl-progress i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }

.pl-main { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; padding: 0 20px 12px; min-height: 0; }
.pl-stage { position: relative; min-height: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); }
.pl-stage .media { position: absolute; inset: 0; border-radius: 0; }
.pl-badge { position: absolute; left: 16px; top: 16px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(6, 17, 28, 0.72); backdrop-filter: blur(8px); font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--phase); }
.pl-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--phase); animation: pulse 1.2s ease-in-out infinite; }
.player.paused .pl-badge::before { animation: none; opacity: .4; }
@keyframes pulse { 50% { opacity: .3; } }
.pl-switch { position: absolute; inset: auto 0 18px 0; z-index: 3; display: flex; justify-content: center; pointer-events: none; }
.pl-switch span { padding: 10px 18px; border-radius: 999px; background: var(--rest); color: #1d1300; font-weight: 800; font-size: 15px; opacity: 0; transform: translateY(10px); transition: all .3s; }
.pl-switch.show span { opacity: 1; transform: none; }

.pl-side { display: flex; flex-direction: column; gap: 18px; min-height: 0; overflow: auto; padding: 4px 2px; }
.pl-clock { display: flex; align-items: center; gap: 22px; }
.ring { position: relative; width: 168px; height: 168px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring .bg { stroke: var(--surface-2); }
.ring .fg { stroke: var(--phase); stroke-linecap: round; transition: stroke .3s; }
.ring-num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-head); font-size: 64px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; }
.pl-phase { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--phase); }
.pl-name { font-size: clamp(26px, 3vw, 38px); font-weight: 800; margin-top: 6px; }
.pl-where { color: var(--muted); font-size: 14px; margin-top: 6px; }
.pl-cues { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.pl-next { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; padding-right: 16px; }
.pl-next .media { width: 96px; aspect-ratio: 16/10; flex: none; border-radius: 10px; }
.pl-next small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.pl-next b { font-size: 15.5px; }

.pl-controls { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 20px 20px; }
.pl-controls .icon-btn { width: 54px; height: 54px; }
.pl-play { width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--phase); color: #04121d; display: grid; place-items: center; box-shadow: 0 12px 36px -12px var(--phase); transition: transform .15s, background .3s; }
.pl-play:active { transform: scale(.95); }
.pl-play svg { width: 30px; height: 30px; }
.pl-toggles { position: absolute; right: 20px; bottom: 26px; display: flex; gap: 8px; }
.pl-toggles .icon-btn { width: 44px; height: 44px; }
.icon-btn[aria-pressed="false"] { opacity: .45; }

/* Done screen */
.done { display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.done-inner { max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.done-badge { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--work) 16%, transparent); color: var(--work); animation: pop .5s cubic-bezier(.2, .9, .3, 1.4); }
.done-badge svg { width: 46px; height: 46px; }
.done h2 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; }
.done-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin: 8px 0; }
.done-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ───────── Log ───────── */
.log-list { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.log-item { display: grid; grid-template-columns: 10px 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; }
.log-item i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.log-item b { display: block; }
.log-item span { color: var(--muted); font-size: 13.5px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 8px; max-width: 520px; }
.week div { text-align: center; font-size: 12px; color: var(--dim); font-weight: 600; }
.week div i { display: block; height: 44px; border-radius: 10px; margin-bottom: 6px; background: var(--surface); border: 1px solid var(--line); }
.week div.on i { background: linear-gradient(160deg, var(--accent), var(--work)); border-color: transparent; }
.week div.today { color: var(--text); }

.footer { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 14px; }
.footer-inner { display: flex; flex-direction: column; gap: 6px; }

/* ───────── Motivation ───────── */
.motivate-sec { padding-bottom: 32px; }
.motivate { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; }
.goal-card { background: linear-gradient(150deg, color-mix(in srgb, var(--work) 14%, var(--surface)), var(--surface)); display: flex; flex-direction: column; gap: 8px; }
.goal-card h2 { font-size: clamp(34px, 4.5vw, 52px); font-weight: 800; background: linear-gradient(90deg, var(--work), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stroke-status { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.stroke-status span { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stroke-status .tag { font-style: normal; }
.goal-meta {display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-top: 4px; }
.goal-meta b { color: var(--text); font-family: var(--font-head); font-size: 20px; margin-right: 4px; }
.goal-card .linkish { align-self: flex-start; margin-top: 6px; font-size: 14px; }
.quote-card { display: flex; flex-direction: column; justify-content: center; }
.quote { margin: 0; }
.quote blockquote { margin: 0; font-family: var(--font-head); font-size: clamp(20px, 2.4vw, 27px); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.quote figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; }
.quote figcaption b { color: var(--accent-2); }
.build-card { align-items: flex-start; justify-content: center; gap: 10px; padding: 28px; min-height: 260px; border-style: dashed; border-color: var(--line-2); background: transparent; }
.build-card h3 { font-size: 24px; }
.build-plus { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 34px; font-weight: 300; color: #04121d; background: linear-gradient(140deg, var(--accent), var(--work)); }

.goals .chart-head { margin-bottom: 10px; }
.goal-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.goal-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.goal-list li.next { border-color: color-mix(in srgb, var(--work) 50%, transparent); }
.goal-text { flex: 1; font-weight: 700; font-size: 16px; }
.goal-list li.done .goal-text { color: var(--muted); text-decoration: line-through; }
.goal-check { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-2); background: none; display: grid; place-items: center; color: transparent; flex: none; }
.goal-check svg { width: 16px; height: 16px; }
.goal-check[aria-pressed="true"] { background: var(--work); border-color: var(--work); color: #04121d; }
.goal-add { display: flex; gap: 8px; }
.goal-add input { flex: 1; min-width: 0; font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 16px; height: 46px; outline: none; }
.goal-add input:focus { border-color: var(--accent); }
.goal-add .btn { height: 46px; }

.pl-cheer { position: absolute; left: 16px; right: 16px; bottom: 18px; z-index: 4; padding: 14px 18px; border-radius: 16px; background: rgba(6, 17, 28, 0.82); backdrop-filter: blur(8px); border: 1px solid color-mix(in srgb, var(--work) 50%, transparent); font-family: var(--font-head); font-weight: 700; font-size: clamp(17px, 2vw, 22px); text-align: center; animation: pop .4s ease; transition: opacity .5s, transform .5s; }
.pl-cheer.out { opacity: 0; transform: translateY(8px); }
.done-love { color: #fda4af; font-weight: 600; font-size: 16px; }
.lang-btn { height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(148, 197, 255, 0.06); font-weight: 800; font-size: 13px; letter-spacing: .06em; }
.lang-btn:hover { background: rgba(148, 197, 255, 0.14); }
.gate-card .lang-btn { position: absolute; top: 18px; right: 18px; }
.done-praise {font-family: var(--font-head); font-size: 22px; font-weight: 700; }
.done .quote { max-width: 460px; padding: 16px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
.done .quote blockquote { font-size: 18px; }

/* ───────── Builder ───────── */
.builder { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; padding-bottom: 64px; }
.b-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 100px); overflow: auto; }
.b-time { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 8px; row-gap: 8px; }
.b-time b { font-family: var(--font-head); font-size: 52px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--rest); }
.b-time.good b { color: var(--work); }
.b-time span { color: var(--muted); font-weight: 600; }
.b-meter { grid-column: 1 / -1; position: relative; height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.b-meter i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--accent), var(--work)); border-radius: 999px; transition: width .3s; }
.b-meter em { position: absolute; top: 0; bottom: 0; left: 50%; width: 25%; border-left: 2px solid rgba(255, 255, 255, .5); border-right: 2px solid rgba(255, 255, 255, .5); }
.b-time small { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.b-sel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.b-sel li { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 10px; background: var(--bg-2); font-size: 14px; }
.b-n { width: 22px; color: var(--dim); font-weight: 700; font-variant-numeric: tabular-nums; }
.b-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-sel .del:disabled { opacity: .25; cursor: default; }
.b-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.b-actions .btn { flex: 1; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.pick { position: relative; }
.pick[aria-pressed="true"] { border-color: var(--work); box-shadow: 0 0 0 2px var(--work); }
.pick-check { position: absolute; top: 8px; left: 8px; z-index: 3; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(6, 17, 28, .6); border: 2px solid rgba(255, 255, 255, .6); color: transparent; }
.pick-check svg { width: 15px; height: 15px; }
.pick[aria-pressed="true"] .pick-check { background: var(--work); border-color: var(--work); color: #04121d; }
.builder .excard .media { aspect-ratio: 16/10; }

/* ───────── Login gate ───────── */
body.gated { overflow: hidden; }
.gate { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; background: var(--bg); overflow: auto; }
.gate-bg { position: absolute; inset: 0; overflow: hidden; }
.gate-bg video { width: 100%; height: 100%; object-fit: cover; opacity: .28; filter: saturate(1.1); }
.gate-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 70% at 50% 40%, rgba(6, 17, 28, .55), var(--bg)); }
.gate-card { position: relative; width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 30px 28px; border-radius: 24px; background: rgba(14, 33, 51, .86); backdrop-filter: blur(14px); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.gate-card .brand { margin-bottom: 4px; }
.gate-card h1 { font-size: 36px; font-weight: 800; }
.gate-card .quote { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.gate-card .quote blockquote { font-size: 16px; }
.gate-card .quote figcaption { font-size: 13px; margin-top: 6px; }
.gate-card [hidden] { display: none; }

/* ───────── Coaches ───────── */
.coach-av { position: relative; display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--c) 22%, var(--surface-2)); color: var(--c); font-weight: 800; font-size: 11px; }
.coach-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.coach-av.xl { width: 132px; height: 132px; font-size: 54px; font-family: var(--font-head); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent); }
.coach-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.coaches { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 980px) {
  .coaches, .motivate { grid-template-columns: 1fr; }
  .builder { grid-template-columns: 1fr; }
  .b-side { position: static; max-height: none; }
  .b-mini { display: flex !important; }
  .builder { padding-bottom: 110px; }
}
.b-mini { display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 18px; background: rgba(19, 43, 66, .95); backdrop-filter: blur(10px); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.b-mini b { font-family: var(--font-head); font-size: 24px; }
.b-mini span { flex: 1; color: var(--muted); font-size: 13px; }
.b-mini .btn { height: 44px; }
.coach { min-width: 0; display: flex; gap: 24px; align-items: center; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 10%, var(--surface)), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.coach-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.coach-body h3 { font-size: 30px; font-weight: 800; }
.coach-body p { color: var(--muted); font-size: 14.5px; }
.coach-body .btn { height: 42px; margin-top: 4px; font-size: 14.5px; }
@media (max-width: 760px) {
  .coaches { grid-template-columns: 1fr; }
  .coach { flex-direction: column; text-align: center; padding: 22px 18px; }
  .coach-body { align-items: center; }
  .coach-av.xl { width: 104px; height: 104px; font-size: 44px; }
}

/* ───────── Account ───────── */
.topbar-inner .nav { margin-left: auto; }
.acct { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(148, 197, 255, 0.06); font-weight: 700; font-size: 14px; white-space: nowrap; }
.acct.signed { padding-left: 4px; }
.acct:hover { background: rgba(148, 197, 255, 0.12); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(140deg, var(--accent), var(--work)); color: #04121d; font-weight: 800; font-size: 14px; flex: none; }
.acct-modal .avatar { width: 48px; height: 48px; font-size: 20px; }
.acct-id { display: flex; align-items: center; gap: 14px; }
.sync-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); margin-right: 6px; vertical-align: 1px; }
.sync-dot.synced { background: var(--work); }
.sync-dot.syncing { background: var(--accent); animation: pulse 1s infinite; }
.sync-dot.offline { background: var(--rest); }
.acct .sync-dot { margin: 0; }
.notice { background: color-mix(in srgb, var(--rest) 12%, transparent); border: 1px solid color-mix(in srgb, var(--rest) 35%, transparent); color: #fde68a; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.form-err { color: var(--danger); font-size: 14px; min-height: 1px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; font-size: inherit; }
.linkish:hover { text-decoration: underline; }

/* ───────── Modal variants & fields ───────── */
.day-modal, .acct-modal { width: min(520px, 100%); padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 18px; }
.dm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dm-head h2 { font-size: 26px; margin-top: 4px; }
.dm-sec { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; }
.dm-sec h4 { font-family: var(--font); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.dm-sec .seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.dm-sec .seg svg { width: 14px; height: 14px; }
.dm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dm-list li { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 12px; border-radius: 10px; background: var(--surface); }
.dm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.dm-row[hidden], .quick[hidden] { display: none; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick .chip { height: 32px; padding: 0 12px; font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.field small { font-weight: 500; color: var(--dim); }
.field input, .field textarea { font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 14px; outline: none; width: 100%; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field input[readonly] { opacity: .7; }
.mk { display: inline-flex; align-items: center; gap: 2px; width: auto; height: 20px; padding: 0 5px; border-radius: 6px; font-style: normal; font-size: 11px; font-weight: 800; }
.mk svg { width: 12px; height: 12px; flex: none; }
.mk em { font-style: normal; }
.mk.dry { background: color-mix(in srgb, var(--work) 20%, transparent); color: var(--work); }
.mk.no { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.mk.swim { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }

/* ───────── Progress ───────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { font-size: 20px; }
.prog-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; padding-top: 28px; padding-bottom: 28px; align-items: start; }
.prog-side { display: flex; flex-direction: column; gap: 18px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; text-align: center; }
.cal-head h3 { font-size: 22px; }
.cal-head span { font-size: 13px; }
.cal-head .icon-btn:disabled { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { margin-bottom: 6px; }
.cal-dow span { text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.cal-cell { aspect-ratio: 1 / 1.05; min-width: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); padding: 6px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; text-align: left; transition: border-color .2s, transform .15s; }
.cal-cell.blank { border: 0; background: none; }
.cal-cell:not(.blank):not(:disabled):hover { border-color: var(--accent); }
.cal-cell:active { transform: scale(.96); }
.cal-cell.future { opacity: .35; cursor: default; }
.cal-cell.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-cell.did { background: linear-gradient(160deg, color-mix(in srgb, var(--work) 16%, var(--bg-2)), var(--bg-2)); }
.cal-n { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.cal-marks { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.chart-legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; }
.bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; height: 190px; align-items: end; }
.bar-col { display: flex; flex-direction: column; align-items: stretch; gap: 6px; height: 100%; }
.bar-pair { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--line-2); }
.bar { width: 42%; max-width: 16px; min-height: 2px; border-radius: 4px 4px 0 0; position: relative; transition: height .5s cubic-bezier(.2, .8, .2, 1); }
.bar.dry { background: var(--work); }
.bar.swim { background: var(--accent); }
.bar b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); padding-bottom: 2px; white-space: nowrap; }
.bar-col small { text-align: center; font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; }
.bar-col.now small { color: var(--text); font-weight: 700; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 140px) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.hbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.hbar div { height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--work), var(--accent)); border-radius: 999px; }
.hbar b { font-variant-numeric: tabular-nums; font-size: 13px; }
.tlist { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; font-size: 14px; align-items: center; }
.tlist b { font-variant-numeric: tabular-nums; }
.log-right { display: inline-flex; align-items: center; gap: 10px; }
.del { width: 30px; height: 30px; border-radius: 50%; border: 0; background: none; color: var(--dim); display: grid; place-items: center; }
.del:hover { color: var(--danger); background: rgba(251, 113, 133, .1); }
.del svg { width: 15px; height: 15px; }

/* ───────── Timer ───────── */
.timer-wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; padding-top: 24px; padding-bottom: 64px; align-items: start; }
.timer-card { padding: 28px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.timer-card .chips { justify-content: center; }
.timer-card .field-label { align-self: center; }
.tm-display { font-family: var(--font-head); font-weight: 800; font-size: clamp(64px, 11vw, 120px); line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; margin: 34px 0 10px; }
.timer-card.running .tm-display { color: var(--work); }
.tm-state { color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; gap: 8px; min-height: 22px; }
.tm-controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
.tm-finish { background: var(--work); box-shadow: 0 10px 30px -10px rgba(46, 230, 197, .7); }
.tm-finish:hover { background: #5cf0d6; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--work); display: inline-block; animation: pulse 1.2s infinite; }
.nav a { white-space: nowrap; }
.live.paused { animation: none; background: var(--rest); }
.nav a.timing { color: var(--work); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; background: var(--work); color: #04121d; font-weight: 700; padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow); animation: pop .3s ease; max-width: calc(100% - 32px); text-align: center; }

/* ───────── Responsive ───────── */
@media (max-width: 980px) {
  .prog-grid, .timer-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar-inner { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 8px; row-gap: 6px; }
  .topbar-inner .nav { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .acct { margin-left: auto; }
  .cal-cell { padding: 4px; border-radius: 9px; }
  .cal-n { font-size: 12px; }
  .mk { height: 16px; padding: 0 3px; }
  .mk em { display: none; }
  .cal-grid { gap: 4px; }
  .card { padding: 16px; }
  .dm-row { grid-template-columns: 1fr; }
  .hbar { grid-template-columns: 90px 1fr auto; }
}
@media (max-width: 980px) {
  .hero-grid, .detail-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .how { grid-template-columns: 1fr; }
  .pl-main { grid-template-columns: 1fr; grid-template-rows: minmax(200px, 42vh) auto; overflow: auto; }
  .pl-side { overflow: visible; }
  .ring { width: 128px; height: 128px; }
  .ring-num { font-size: 50px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav a { padding: 8px 10px; font-size: 13.5px; }
  .brand span:last-child { display: none; }
  .grid-programs { grid-template-columns: 1fr; }
  .grid-ex { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .excard h3 { font-size: 14px; }
  .row { grid-template-columns: 84px 1fr auto; gap: 12px; padding-right: 12px; }
  .row p { display: none; }
  .modal-body { grid-template-columns: 1fr; padding: 20px; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { border-radius: 22px 22px 0 0; max-height: 92vh; }
  .pl-main { padding: 0 12px 8px; gap: 14px; }
  .pl-top { padding: 12px; }
  .pl-cues { padding: 14px; }
  .pl-toggles { position: static; }
  .pl-controls { gap: 10px; flex-wrap: wrap; }
  .hero-steps { grid-template-columns: 1fr; }
  .done-stats { grid-template-columns: 1fr 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
