:root {
  --bg: #0e0f12;
  --panel: #17191e;
  --panel-2: #1f2229;
  --line: #2b2f38;
  --ink: #f3f1ec;
  --muted: #9aa0ab;
  --flame: #ff6a2b;
  --flame-2: #ffb02e;
  --good: #3fcf8e;
  --ice: #6cc7ff;
  --bad: #ff5a5f;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--flame-2); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 640px; }
.eyebrow { color: var(--flame); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; margin: 0 0 8px; }
h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.03; margin: 0 0 16px; letter-spacing: -.02em; }
h2 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 12px; letter-spacing: -.01em; }
h3 { margin: 0 0 6px; font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.grad { background: linear-gradient(90deg, var(--flame), var(--flame-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* nav */
.nav { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; }
.logo { font-weight: 900; font-size: 20px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.logo span { color: var(--flame); }

/* buttons & inputs */
.btn {
  display: inline-block; border: 0; border-radius: 999px; padding: 13px 22px; font: inherit; font-weight: 800; cursor: pointer;
  background: linear-gradient(90deg, var(--flame), var(--flame-2)); color: #1a0d05; text-decoration: none; text-align: center;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { display: block; width: 100%; }
input[type=text], input[type=email], input[type=date], textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
input:focus, textarea:focus { outline: 2px solid var(--flame); outline-offset: 1px; }
label.field { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 6px; }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

/* landing */
.hero { padding: 56px 0 40px; }
.hero p.lede { font-size: 19px; color: #c9ccd3; max-width: 620px; margin: 0 0 26px; }
.steps .num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--panel-2); color: var(--flame); font-weight: 900; margin-bottom: 10px; }
section { padding: 34px 0; }
.price { font-size: 40px; font-weight: 900; letter-spacing: -.02em; }
.price small { font-size: 15px; color: var(--muted); font-weight: 600; }
.reward { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 999px; background: rgba(255,106,43,.12); color: var(--flame-2); font-weight: 700; font-size: 13px; }
.plan.best { border-color: var(--flame); box-shadow: 0 0 0 1px var(--flame) inset; }
.faq dt { font-weight: 800; margin-top: 14px; }
.faq dd { margin: 4px 0 0; color: #c9ccd3; }
footer { color: var(--muted); font-size: 13px; padding: 30px 0 50px; }

/* app */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.stat { background: var(--panel-2); border-radius: 12px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 26px; }
.stat span { color: var(--muted); font-size: 12px; }
.goal-row { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--panel-2); border-radius: 12px; margin-bottom: 8px; cursor: pointer; }
.goal-row input { width: 22px; height: 22px; accent-color: var(--flame); }
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.photos img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.photo-pick { display: block; border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; color: var(--muted); }
.photo-pick input { display: none; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.badge.good { background: rgba(63,207,142,.15); color: var(--good); }
.badge.warn { background: rgba(255,176,46,.15); color: var(--flame-2); }
.badge.bad { background: rgba(255,90,95,.15); color: var(--bad); }
.dots { display: grid; grid-template-columns: repeat(var(--cols, 15), 1fr); gap: 5px; max-width: 520px; margin: 16px 0; }
.dots i { display: block; aspect-ratio: 1; border-radius: 4px; background: var(--panel-2); }
.dots i.done { background: var(--flame); }
.dots i.frozen { background: var(--ice); }
.dots i.excused, .dots i.appeal_pending { background: var(--flame-2); }
.dots i.missed { background: var(--bad); }
.dots i.today { outline: 2px solid var(--flame); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lengths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lengths label { display: block; padding: 12px 8px; border: 1px solid var(--line); border-radius: 12px; text-align: center; cursor: pointer; background: var(--panel-2); }
.lengths input { display: none; }
.lengths input:checked + div { color: var(--flame-2); }
.lengths label:has(input:checked) { border-color: var(--flame); }
.lengths b { display: block; font-size: 20px; }
.goal-input { display: flex; gap: 8px; margin-bottom: 8px; }
.goal-input button { flex: none; }
.msg { margin-top: 10px; font-weight: 700; }
.msg.error { color: var(--bad); }
.msg.ok { color: var(--good); }
.hidden { display: none !important; }

/* plans page */
.plans-head { padding: 36px 0 10px; }
.plans-head .lede { font-size: 18px; max-width: 620px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: stretch; }
.plans .plan { position: relative; display: flex; flex-direction: column; margin: 0; }
.plans .plan h2 { margin-bottom: 4px; }
.plan-tag { font-weight: 800; color: var(--flame-2); margin: 6px 0 4px; }
.perks { list-style: none; padding: 0; margin: 10px 0 20px; flex: 1; }
.perks li { padding: 8px 0 8px 26px; border-bottom: 1px dashed var(--line); position: relative; color: #c9ccd3; font-size: 15px; }
.perks li::before { content: '✓'; position: absolute; left: 2px; color: var(--flame); font-weight: 900; }
.perks li.win { color: var(--ink); border-bottom: 0; }
.perks li.win::before { content: '🏆'; font-size: 14px; }
.ribbon { position: absolute; top: -11px; right: 18px; background: linear-gradient(90deg, var(--flame), var(--flame-2)); color: #1a0d05; font-weight: 900; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.milestones { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.milestones li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.milestones b { display: block; color: var(--flame); font-size: 18px; }
.milestones span { color: #c9ccd3; font-size: 14px; }
.picked { background: rgba(255,106,43,.12); border: 1px solid rgba(255,106,43,.4); color: var(--flame-2); border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 14px; }

/* today's sports card */
.center { text-align: center; }
.flame { color: var(--flame); }
.pcard-wrap { display: flex; flex-direction: column; align-items: center; margin-bottom: 16px; }
.pcard {
  width: 100%; max-width: 360px; padding: 9px; border-radius: 22px;
  background: linear-gradient(145deg, var(--flame), var(--flame-2) 42%, #ffe2b0 52%, var(--flame-2) 62%, var(--flame));
  box-shadow: 0 22px 50px -22px rgba(255,106,43,.6); transition: transform .25s, box-shadow .3s;
}
.pcard:hover { transform: translateY(-3px) rotate(-.4deg); }
.pcard.done { box-shadow: 0 0 0 3px var(--good), 0 22px 50px -18px rgba(63,207,142,.55); }
.pcard-in { position: relative; overflow: hidden; border-radius: 15px; padding: 12px; background: linear-gradient(180deg, #1c1e24, #111216); }
.pcard-in::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; background-size: 250% 100%;
  background-image: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.07) 45%, rgba(255,200,120,.12) 50%, transparent 64%);
  animation: shine 7s linear infinite;
}
@keyframes shine { from { background-position: 160% 0; } to { background-position: -110% 0; } }
.pcard-top { display: flex; justify-content: space-between; align-items: center; font-weight: 900; letter-spacing: .06em; font-size: 13px; margin-bottom: 9px; }
.pcard-len { background: var(--flame); color: #1a0d05; padding: 2px 8px; border-radius: 6px; font-size: 11px; }
.pcard-photo {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 3.5; border: 0; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer;
  font: inherit; color: var(--muted); background: repeating-linear-gradient(135deg, #22252d 0 12px, #1c1f26 12px 24px);
}
.pcard-photo:focus-visible { outline: 3px solid var(--flame-2); outline-offset: 2px; }
.pcard-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-weight: 800; font-size: 15px; line-height: 1.5; }
.pc-day {
  position: absolute; left: 10px; bottom: 10px; padding: 4px 11px; border-radius: 12px; text-align: center; line-height: 1.05;
  background: rgba(14,15,18,.86); border: 2px solid var(--flame-2); color: var(--flame-2); font-size: 10px; font-weight: 900; letter-spacing: .12em;
}
.pc-day b { display: block; font-size: 28px; color: var(--ink); letter-spacing: 0; }
.pc-day small { display: block; font-size: 10px; color: var(--muted); letter-spacing: .04em; }
.pc-stamp {
  position: absolute; top: 18px; right: 8px; opacity: 0; transform: rotate(12deg) scale(1.7);
  border: 3px solid var(--good); color: var(--good); background: rgba(14,15,18,.78); padding: 4px 10px; border-radius: 8px;
  font-weight: 900; letter-spacing: .12em; font-size: 16px; transition: opacity .3s, transform .4s cubic-bezier(.2,1.6,.4,1);
}
.pcard.done .pc-stamp { opacity: 1; transform: rotate(12deg) scale(1); }
.pcard-name {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 10px 0 8px; padding: 6px 10px;
  background: linear-gradient(90deg, rgba(255,106,43,.25), transparent); border-left: 3px solid var(--flame);
  font-weight: 900; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; overflow: hidden;
}
.pcard-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-name small { color: var(--muted); font-weight: 700; text-transform: none; flex: none; margin-left: auto; }
.pc-edit { flex: none; background: none; border: 0; padding: 0 2px; cursor: pointer; font-size: 13px; opacity: .55; }
.pc-edit:hover, .pc-edit:focus-visible { opacity: 1; }
.share-name { margin: 0 0 4px; font-size: 22px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; color: var(--flame-2); }
.pcard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.pcard-stats div { background: var(--panel-2); border-radius: 8px; text-align: center; padding: 6px 4px; }
.pcard-stats b { display: block; font-size: 20px; line-height: 1.15; }
.pcard-stats span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.pcard-goals label { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px dashed var(--line); cursor: pointer; font-weight: 650; }
.pcard-goals label:last-child { border-bottom: 0; }
.pcard-goals input { width: 20px; height: 20px; flex: none; accent-color: var(--flame); }
.pcard-goals input:checked + span { color: var(--muted); text-decoration: line-through; }
#pc-open { margin-top: 10px; position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .pcard-in::after { animation: none; } .pcard, .pc-stamp { transition: none; } }

/* share */
body.share { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.share-card { max-width: 520px; width: 100%; }
.share-card .goals { padding-left: 20px; color: #c9ccd3; }
