/* 777 Holigainz — 777 Strength styling, holiday edition */
:root {
  --purple: #753BBD;
  --purple-d: #5d2c9b;
  --purple-l: #efe6fa;
  --ink: #06090A;
  --text: #333333;
  --muted: #6b6b75;
  --bg: #f6f5f8;
  --card: #ffffff;
  --line: #e4e1ea;
  --pine: #1F6F4A;
  --gold: #F2C14E;
  --warn: #c2410c;
  --radius: 8px;
  --radius-lg: 16px;
  --tab-h: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font-display: 'Montserrat', 'Arial Black', 'Helvetica Neue', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d10; --card: #15181d; --text: #e9e7ee; --muted: #9a97a3; --line: #262a31;
    --purple-l: #2a1d3d; --ink: #ffffff; color-scheme: dark;
  }
}

[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--font-body); color: var(--text); background: var(--bg);
  font-size: 16px; line-height: 1.4; min-height: 100dvh;
  padding-bottom: calc(var(--safe-b) + 16px);
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
input, textarea, select { font: inherit; font-size: 16px; /* prevents iOS zoom */ }
a { color: var(--purple); }

/* ---------- Top bar (dark band, like the site's hero) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; background: #06090A; color: #fff;
  padding: calc(var(--safe-t) + 10px) 16px 10px; display: flex; align-items: center; justify-content: space-between;
  overflow: hidden; min-height: calc(var(--safe-t) + 56px);
}
#snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wordmark { position: relative; font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 22px; letter-spacing: .3px; text-transform: uppercase; }
.wordmark .w7 { color: #b48cf0; }
.avatar { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--purple); background: #1b1f25; padding: 0; overflow: hidden; display: grid; place-items: center; font-size: 20px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Layout ---------- */
#main { max-width: 560px; margin: 0 auto; }
.screen { padding: 16px; }
.display {
  font-family: var(--font-display); font-style: italic; font-weight: 900; color: var(--ink);
  font-size: 30px; line-height: 1.05; margin: 4px 0 8px; letter-spacing: -.2px;
}
.display.sm { font-size: 24px; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.6px; font-size: 12px; font-weight: 700; color: var(--purple); margin: 0; }
.lede { font-size: 16px; color: var(--muted); margin: 6px 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.label { display: block; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .8px; margin: 18px 0 8px; color: var(--muted); }
.section-title { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 18px; margin: 24px 0 8px; color: var(--ink); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 6px 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 18px; border-radius: var(--radius); border: 2px solid transparent;
  background: var(--purple-l); color: var(--purple); font-weight: 800; font-size: 16px; text-transform: capitalize;
  transition: transform .08s ease, background .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:active { background: var(--purple-d); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-done { background: var(--pine); color: #fff; }
.btn-xl { min-height: 58px; font-size: 18px; width: 100%; }
.btn-sm { min-height: 40px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; margin: 10px 0; }
.btn-round { width: 52px; height: 52px; min-height: 52px; padding: 0; border-radius: 50%; font-size: 26px; }
.btn-round.sm { width: 40px; height: 40px; min-height: 40px; font-size: 20px; }
.btn[disabled] { opacity: .8; }
.btn-google { width: 100%; min-height: 58px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-size: 17px; }
.link { background: none; border: 0; color: var(--purple); font-weight: 700; padding: 8px 0; }

/* ---------- Welcome ---------- */
.welcome { min-height: calc(70dvh - 40px); display: flex; flex-direction: column; justify-content: space-between; padding: 0; }
.welcome-hero { background: linear-gradient(180deg, #06090A 0%, #1d1230 100%); color: #fff; padding: 40px 20px 48px; }
.welcome-hero .display { color: #fff; font-size: 46px; }
.welcome-hero .eyebrow { color: #b48cf0; }
.welcome-hero .lede { color: #d7d2e2; font-size: 17px; }
.welcome-actions { padding: 24px 16px calc(24px + var(--safe-b)); }
.fineprint { font-size: 13px; color: var(--muted); text-align: center; margin-top: 12px; }

/* ---------- Loading ---------- */
.loading { display: grid; place-items: center; padding: 80px 16px; color: var(--muted); }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--purple-l); border-top-color: var(--purple); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Inputs ---------- */
.input { width: 100%; min-height: 50px; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--card); color: var(--text); padding: 10px 12px; }
textarea.input { min-height: 64px; resize: vertical; }
.input:focus, .input-unit:focus-within { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(117,59,189,.18); }
.input-unit { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--card); min-height: 50px; padding: 0 12px; }
.input-unit input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 10px 0; outline: none; }
.input-unit span { color: var(--muted); font-weight: 700; }
.input-unit .pre { margin-right: 6px; font-size: 13px; }
.input-unit.big { min-height: 64px; }
.input-unit.big input { font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: 30px; text-align: center; color: var(--ink); }
.input-unit.sm { min-height: 42px; width: 120px; }
.input-unit .plus { font-family: var(--font-display); font-weight: 900; font-size: 26px; color: var(--purple); }
.row2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { min-height: 64px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--card); font-weight: 800; font-family: var(--font-display); font-style: italic; font-size: 16px; color: var(--ink); padding: 6px 8px; }
.choice.on { border-color: var(--purple); background: var(--purple); color: #fff; }

.seg { display: flex; background: var(--purple-l); border-radius: var(--radius); padding: 4px; gap: 4px; }
.seg button { flex: 1; min-height: 42px; border: 0; border-radius: 6px; background: transparent; font-weight: 800; color: var(--purple); }
.seg button.on { background: var(--purple); color: #fff; }
.seg.sm button { min-height: 36px; font-size: 14px; }
.seg-4 { display: grid; grid-template-columns: repeat(4, 1fr); }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.card > :last-child { border-bottom: 0; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i { flex: none; width: 52px; height: 32px; border-radius: 16px; background: var(--line); position: relative; transition: background .15s; }
.switch-row i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch-row input:checked + i { background: var(--purple); }
.switch-row input:checked + i::after { transform: translateX(20px); }
.switch-row input:focus-visible + i { box-shadow: 0 0 0 3px rgba(117,59,189,.35); }

.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 56px; }
.pair { display: flex; gap: 6px; }
.pair .input-unit.sm { width: 104px; }
.counter { display: flex; align-items: center; gap: 12px; }
.counter span { min-width: 22px; text-align: center; font-weight: 800; }
.plate-name { font-weight: 700; }

/* ---------- Sticky bottom actions (thumb zone) ---------- */
.sticky-actions {
  position: sticky; bottom: 0; z-index: 5; display: grid; gap: 10px;
  margin: 18px -16px 0; padding: 12px 16px calc(12px + var(--safe-b));
  background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -8px 20px rgba(6,9,10,.08);
}
.sticky-actions.two { grid-template-columns: 1fr 2fr; }
.sticky-actions .btn { min-height: 58px; font-size: 18px; }


/* ---------- Candy-cane progress ---------- */
.cane { height: 12px; border-radius: 99px; background: var(--purple-l); overflow: hidden; }
.cane > div { height: 100%; background: var(--purple); border-radius: 99px; transition: width .4s ease; min-width: 12px; }
.holiday .cane > div {
  background: repeating-linear-gradient(-45deg, var(--purple) 0 10px, #fff 10px 20px);
  background-size: 28px 28px; animation: cane 1.6s linear infinite;
}
@keyframes cane { to { background-position: 28px 0; } }
.cane-label { font-size: 12px; color: var(--muted); margin: 6px 0 12px; font-weight: 600; }

/* ---------- Today hero card ---------- */
.hero-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 16px; position: relative; overflow: hidden; }
.hero-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--purple); }
.holiday .hero-card::before { background: repeating-linear-gradient(180deg, var(--purple) 0 14px, #fff 14px 20px, var(--pine) 20px 34px, #fff 34px 40px); }
.hero-card.is-done::before { background: var(--pine); }
.hero-card .display { font-size: 32px; }
.opt { font-size: 13px; font-style: normal; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; background: var(--purple-l); color: var(--purple); padding: 3px 8px; border-radius: 99px; vertical-align: middle; }
.big-weight { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 2px; }
.big-weight span { font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: 54px; line-height: 1; color: var(--ink); letter-spacing: -1px; }
.big-weight small { font-size: 18px; font-weight: 800; color: var(--muted); }
.scheme { font-weight: 700; font-size: 17px; margin: 4px 0 10px; }
.flag { background: #fff3e6; color: var(--warn); border-radius: var(--radius); padding: 8px 10px; font-size: 14px; font-weight: 600; margin: 8px 0; }
@media (prefers-color-scheme: dark) { .flag { background: #3a2412; color: #ffb27a; } }

.plates { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.plates-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-right: 4px; }
.plate { --h: 1; display: inline-grid; place-items: center; min-width: 40px; height: calc(48px * var(--h)); padding: 0 6px; border-radius: 6px; background: var(--ink); color: var(--bg); font-weight: 900; font-size: 15px; }
.bar-note { margin-left: auto; font-size: 12px; color: var(--muted); }

/* ---------- Saturday choice ---------- */
.sat-choice { display: grid; gap: 10px; margin-top: 16px; text-align: center; }
.sat-choice p { font-weight: 700; margin: 4px 0; }

/* ---------- Sets ---------- */
.sets-head { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 0 10px; }
.sets-head h2 { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 20px; margin: 0; color: var(--ink); }
.sets-head .muted { font-size: 13px; }
.sets { display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 10px; justify-items: center; }
.set {
  width: 100%; max-width: 84px; aspect-ratio: 1; min-height: 52px; border-radius: 50%; border: 3px solid var(--purple); background: var(--card);
  color: var(--purple); font-weight: 900; font-size: 20px; font-family: var(--font-display);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .08s, background .12s;
}
.set:active { transform: scale(.92); }
.set.done { background: var(--purple); color: #fff; }
.holiday .set.done { background: var(--pine); border-color: var(--pine); }
.set.short { border-color: var(--gold); color: #8a6200; background: #fff8e6; font-size: 15px; }
.set.missed { border-color: var(--warn); color: var(--warn); background: #fff0ea; font-size: 15px; }
@media (prefers-color-scheme: dark) { .set.short { background: #3a3012; color: var(--gold); } .set.missed { background: #3a1c12; } }
.set[disabled] { opacity: .9; }

.rpe { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.rpe button { min-height: 48px; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--card); font-weight: 800; font-size: 14px; padding: 0; }
.rpe button.on { background: var(--purple); border-color: var(--purple); color: #fff; }

.banner { background: #fff3e6; color: var(--warn); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; font-weight: 700; }
.banner p { margin: 0 0 6px; font-size: 14px; }
.banner-row { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; padding: 3px 0; }
@media (prefers-color-scheme: dark) { .banner { background: #3a2412; color: #ffb27a; } }

/* ---------- Check-in ---------- */
.checkin { text-align: center; }
.checkin .gift { font-size: 56px; animation: wiggle 1.4s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.stepper { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 12px 0 6px; }
.stepper .input-unit { min-width: 0; }

/* ---------- Program ---------- */
.week { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); margin: 12px 0; overflow: hidden; }
.week.wrapped { border-color: var(--pine); }
.week-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 6px; }
.week-head h2 { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 20px; margin: 0; color: var(--ink); }
.pill { font-weight: 800; font-size: 14px; background: var(--purple-l); color: var(--purple); padding: 6px 12px; border-radius: 99px; border: 0; }
.pill-btn { min-height: 40px; }
.day-row { display: grid; grid-template-columns: 64px 1fr 1fr 44px; align-items: center; width: 100%; min-height: 58px; padding: 6px 14px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.day-row small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.day-row .d { font-weight: 800; }
.day-row .sr { font-weight: 700; }
.day-row .w { font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: 20px; color: var(--ink); }
.day-row .i { text-align: right; font-size: 18px; }
.day-row.st-skipped { opacity: .5; }
.day-row.st-done .w { color: var(--pine); }
.holiday .day-row.st-done .w { color: var(--pine); }

/* ---------- Progress ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 10px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.tbl tfoot td { font-weight: 800; border-bottom: 0; }
.hist { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 8px 0; }
.result.pr .big-weight span { color: var(--purple); }

/* ---------- Avatar dropdown menu ---------- */
.avatar[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(180,140,240,.55); }
.menu-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(6,9,10,.25); }
.menu {
  position: fixed; z-index: 45; top: calc(var(--safe-t) + 60px); right: 10px; min-width: 230px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px;
  box-shadow: 0 12px 32px rgba(6,9,10,.28); transform-origin: top right; transform: scale(.96); opacity: 0;
  transition: transform .12s ease, opacity .12s ease;
}
.menu.open { transform: none; opacity: 1; }
.menu-who { font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 12px 6px; text-transform: uppercase; letter-spacing: .8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; font-weight: 800; font-size: 17px; font-family: var(--font-display); font-style: italic; color: var(--ink); text-align: left; }
.menu-item .mi { font-size: 20px; width: 24px; text-align: center; font-style: normal; }
.menu-item:active, .menu-item:hover { background: var(--purple-l); }
.menu-item.active { background: var(--purple); color: #fff; }
.menu-signout { border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; font-size: 15px; color: var(--muted); }
.menu:not(.has-cycle) [data-tab] { display: none; }

/* ---------- Rest pill / timer ---------- */
.rest-pill { position: fixed; top: calc(var(--safe-t) + 8px); right: 58px; z-index: 25; background: var(--purple); color: #fff; border: 2px solid #fff; border-radius: 99px; min-height: 46px; padding: 0 16px; font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 24px; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; animation: pillpulse 2s ease-in-out infinite; }
.rest-pill .rp-label { font-family: var(--font-body); font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; opacity: .85; }
.rest-pill.urgent { background: var(--gold); color: var(--ink); border-color: var(--gold); animation: pillurgent .6s ease-in-out infinite; }
@keyframes pillpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(180,140,240,.7); } 50% { box-shadow: 0 0 0 7px rgba(180,140,240,0); } }
@keyframes pillurgent { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.ring-wrap { position: relative; width: 260px; height: 260px; margin: 8px auto 16px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--purple-l); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--purple); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset .25s linear; }
.ring-time { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: 64px; color: var(--ink); font-variant-numeric: tabular-nums; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
body.flash::after { content: ''; position: fixed; inset: 0; background: var(--purple); opacity: 0; z-index: 100; pointer-events: none; animation: flash 1.2s ease-out; }
@keyframes flash { 0%, 40% { opacity: .55; } 20%, 60% { opacity: .1; } 100% { opacity: 0; } }

/* ---------- Sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(6,9,10,.55); opacity: 0; transition: opacity .2s; }
.sheet-body {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 88dvh; overflow-y: auto;
  background: var(--card); border-radius: 20px 20px 0 0; padding: 10px 18px calc(20px + var(--safe-b));
  transform: translateY(100%); transition: transform .22s ease;
}
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-body { transform: none; }
.grabber { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.sheet-actions.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 10px; }
.sheet-actions .btn { min-height: 54px; }
.reps-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.reps-pick .btn { min-height: 60px; font-size: 22px; }

/* ---------- Toast / snackbar ---------- */
.toast, .snack {
  position: fixed; left: 50%; transform: translate(-50%, -12px); z-index: 60; opacity: 0; pointer-events: none;
  top: calc(var(--safe-t) + 66px); max-width: calc(100% - 32px); width: max-content;
  background: var(--ink); color: var(--bg); border-radius: 12px; padding: 12px 16px; font-weight: 700; transition: all .2s;
}
.toast.show, .snack.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.snack { display: flex; align-items: center; gap: 16px; }
.snack button { background: none; border: 0; color: #c9a8ff; font-weight: 900; text-transform: uppercase; min-height: 40px; padding: 0 4px; }

/* ---------- Celebrations ---------- */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.particle { position: absolute; left: 50%; top: 45%; animation: burst 1.4s cubic-bezier(.15,.7,.3,1) var(--delay) forwards; opacity: 0; }
@keyframes burst { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.4); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1) rotate(200deg); } }
.particle.rain { left: var(--x); top: -40px; animation: rain 2.2s ease-in var(--delay) forwards; }
@keyframes rain { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: .9; transform: translateY(110vh) rotate(360deg); } }

.credit { text-align: center; color: var(--muted); font-size: 13px; margin: 24px 0 8px; }

@media (max-width: 359px) {
  .big-weight span { font-size: 45px; }
  .rpe { grid-template-columns: repeat(5, 1fr); }
  .choice-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.btn.is-locked { background: var(--line); color: var(--muted); }
.lock-hint { margin: 8px 0 0; }
.grabber { cursor: grab; padding: 0; }
.sheet-body .grabber { width: 52px; height: 6px; margin-bottom: 14px; }
.lock-hint { grid-column: 1 / -1; }

/* ---------- Holiday mode, turned up ---------- */
.page-snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; display: none; }
.holiday .page-snow { display: block; }
#main { position: relative; z-index: 1; }
.holiday .sticky-actions { border-top: 0; border-image: repeating-linear-gradient(90deg, var(--purple) 0 16px, #fff 16px 22px, var(--pine) 22px 38px, #fff 38px 44px) 4; border-top: 4px solid; }

/* twinkling string lights along the header */
.lights { display: none; position: absolute; left: -6px; right: -6px; bottom: 2px; height: 14px; justify-content: space-between; pointer-events: none;
  background: linear-gradient(transparent 3px, #3a3f46 3px 4px, transparent 4px); }
.holiday .lights { display: flex; }
.lights i { width: 7px; height: 10px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; margin-top: 4px; animation: twinkle 1.8s ease-in-out infinite; }
.lights i:nth-child(4n+1) { background: #C8102E; box-shadow: 0 0 8px #C8102E; animation-delay: 0s; }
.lights i:nth-child(4n+2) { background: var(--gold); box-shadow: 0 0 8px var(--gold); animation-delay: .45s; }
.lights i:nth-child(4n+3) { background: #b48cf0; box-shadow: 0 0 8px #b48cf0; animation-delay: .9s; }
.lights i:nth-child(4n)   { background: #3fbf7f; box-shadow: 0 0 8px #3fbf7f; animation-delay: 1.35s; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.holiday .topbar { padding-bottom: 16px; }

/* santa hat on the avatar */
.avatar { overflow: visible; }
.avatar img, .avatar span { border-radius: 50%; overflow: hidden; width: 100%; height: 100%; display: grid; place-items: center; }
.holiday .avatar::after {
  content: ''; position: absolute; width: 30px; height: 24px; top: -15px; right: -9px; transform: rotate(18deg); pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 24'%3E%3Cpath d='M3 19 Q8 2 22 4 Q27 6 26 13 L20 9 Q14 9 12 19Z' fill='%23C8102E'/%3E%3Crect x='1' y='17' width='15' height='6' rx='3' fill='%23fff'/%3E%3Ccircle cx='26' cy='14' r='3.5' fill='%23fff'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* sleigh riding the candy-cane progress bar */
.cane-wrap { position: relative; }
.sleigh { display: none; position: absolute; top: -13px; transform: translateX(-50%) scaleX(-1); font-size: 20px; transition: left .5s ease; }
.holiday .sleigh { display: block; }

/* logged sets become ornaments */
.set { position: relative; }
.holiday .set.done::before { content: ''; position: absolute; top: -7px; left: 50%; width: 16px; height: 9px; transform: translateX(-50%); background: var(--gold); border-radius: 3px 3px 1px 1px; }
.holiday .set.done::after { content: ''; position: absolute; top: -14px; left: 50%; width: 8px; height: 8px; transform: translateX(-50%); border: 2px solid var(--gold); border-radius: 50%; }

/* candy-cane "Sleighed It." button */
.holiday .btn-primary[data-action="complete"]:not(.is-locked) {
  background: repeating-linear-gradient(-45deg, var(--purple) 0 16px, var(--purple-d) 16px 32px); background-size: 45px 45px; animation: cane 1.4s linear infinite;
}

/* ---------- In-page actions (no floating bar) ---------- */
.page-actions { display: grid; gap: 10px; margin: 22px 0 8px; }
.page-actions.two { grid-template-columns: 1fr 2fr; }
.page-actions .btn { min-height: 58px; font-size: 18px; }
.page-actions p { margin: 2px 0 0; }
.page-actions .link { padding: 4px 2px; text-decoration: underline; font-size: 13px; }
.btn-pop { animation: pop .35s ease-out; }
@keyframes pop { 0% { transform: scale(.85); opacity: 0; } 70% { transform: scale(1.04); opacity: 1; } 100% { transform: scale(1); } }
.holiday .btn-primary[data-action="complete"].btn-pop { animation: pop .35s ease-out, cane 1.4s linear .35s infinite; }
/* other screens: actions sit at the end of the page too */
.sticky-actions { position: static; margin: 22px 0 8px; padding: 0; background: none; border: 0; box-shadow: none; }
.holiday .sticky-actions { border: 0; border-image: none; }
