/* Rest — the Wins screen.
 *
 * Everything is scoped under .dom-wins so it cannot reach another domain: the
 * lesson from Mellow, whose unscoped stylesheet repainted the whole document.
 * It draws only with tokens the family already defines (--ink, --surface,
 * --accent, --edge), so it follows the one accent picker and dark mode for free.
 */
.screen.dom-wins{ padding:20px 20px calc(32px + var(--tabbar-h)); }

.dom-wins .wins-hero{ text-align:center; padding:22px 16px 18px; }
.dom-wins .wins-total{ display:flex; align-items:baseline; justify-content:center; gap:8px; }
.dom-wins .wins-total .num{
  font-size:56px; font-weight:800; line-height:1; letter-spacing:-.02em;
  color:var(--accent-text, var(--accent)); font-variant-numeric:tabular-nums;
}
.dom-wins .wins-word{ font-size:20px; font-weight:700; color:var(--ink); }
.dom-wins .wins-sub{ margin-top:6px; font-size:14px; }

/* The week: seven days, filled when you showed up. Today is ringed rather than
   coloured, so an empty today reads as "still to come", never as "missed". */
.dom-wins .wins-strip{ display:flex; gap:6px; justify-content:space-between; margin:4px 0 8px; }
.dom-wins .wins-day{ flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; }
.dom-wins .wins-day .dot{
  width:30px; height:30px; border-radius:50%;
  background:var(--surface-quiet); border:1.5px solid var(--edge-strong);
}
.dom-wins .wins-day.on .dot{ background:var(--accent); border-color:var(--accent); }
.dom-wins .wins-day.today .dot{ box-shadow:0 0 0 3px var(--accent-wash, rgba(0,0,0,.08)); }
.dom-wins .wins-day.future .dot{ opacity:.5; border-style:dashed; }
.dom-wins .wins-day .lbl{ font-size:12px; font-weight:600; color:var(--ink-muted); }
.dom-wins .wins-nudge{ margin:6px 0 4px; font-size:14px; }

/* The old "Today" list lived here; the home grid (css/home.css) replaced it. */

.dom-wins .wins-recent{ padding:4px 14px; }
.dom-wins .wins-line{ display:flex; justify-content:space-between; gap:12px; padding:10px 0; font-size:15px; }
.dom-wins .wins-line + .wins-line{ border-top:1px solid var(--edge); }

/* How wins work: the rule table made visible, each with its own switch. */
.dom-wins .wins-rules{ margin-top:22px; border-top:1px solid var(--edge); padding-top:12px; }
.dom-wins .wins-rules summary{
  cursor:pointer; font-weight:700; font-size:15px; padding:6px 0; list-style:none;
}
.dom-wins .wins-rules summary::-webkit-details-marker{ display:none; }
.dom-wins .wins-rules summary::after{ content:" \203A"; color:var(--ink-muted); }
.dom-wins .wins-rules[open] summary::after{ content:" \2304"; }
.dom-wins .wins-rule{ display:flex; gap:12px; align-items:flex-start; padding:10px 0; cursor:pointer; }
.dom-wins .wins-rule input{ margin-top:3px; width:20px; height:20px; flex:none; accent-color:var(--accent); }
.dom-wins .wins-rule-text{ display:flex; flex-direction:column; gap:2px; }
.dom-wins .wins-rule-head{ display:flex; align-items:baseline; gap:8px; }
.dom-wins .wins-pts{ color:var(--accent-text, var(--accent)); font-weight:700; }
.dom-wins .wins-rule-desc{ display:block; }
.dom-wins .wins-rule-count{ color:var(--ink-muted); }

/* The streak safety net's day: missed, but forgiven (2026-10-10). */
.dom-wins .wins-day.frozen .dot{
  background:#dceefa; border-color:#7fb6dc; color:#2f78ad;
  display:flex; align-items:center; justify-content:center; font-size:13px;
}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .dom-wins .wins-day.frozen .dot{ background:#16324a; border-color:#3f7fae; color:#9fd0f5; } }
:root[data-theme="dark"] .dom-wins .wins-day.frozen .dot{ background:#16324a; border-color:#3f7fae; color:#9fd0f5; }

/* Celebrations (2026-10-10): one card, a short burst, tap to close. */
/* Never blocks: it floats over the top of the screen, everything under it
   stays tappable, and it leaves by itself after a few seconds. */
.wins-celebration{
  position:fixed; left:0; right:0; bottom:calc(env(safe-area-inset-bottom, 0px) + 18px); z-index:96;
  display:flex; justify-content:center; padding:0 16px; pointer-events:none;
}
.wins-celebration .wc-card{ pointer-events:auto; }
.wins-celebration.leaving .wc-card{ transition:opacity .3s ease, transform .3s ease; opacity:0; transform:translateY(12px); }
.wins-celebration .wc-card{
  position:relative; width:100%; max-width:320px; text-align:center; padding:28px 22px 20px;
  border-radius:24px; background:var(--surface); color:var(--ink);
  box-shadow:0 20px 50px rgba(0,0,0,.3); animation:wc-pop .45s cubic-bezier(.2,1.4,.4,1) both;
}
.wins-celebration .wc-big{
  font-size:64px; font-weight:800; line-height:1; letter-spacing:-.03em;
  color:var(--accent-text, var(--accent)); font-variant-numeric:tabular-nums;
}
.wins-celebration .wc-title{ font-size:21px; font-weight:800; margin-top:8px; }
.wins-celebration .wc-text{ color:var(--ink-muted); margin:8px 0 18px; font-size:15px; }
/* The darker accent with its own ink, as every main button (the Axe scan, round 4: white on the
   light accent was 3.14 : 1). */
.wins-celebration .wc-close{
  min-width:140px; padding:12px 20px; border:0; border-radius:12px; cursor:pointer;
  background:var(--accent-lo, var(--accent)); color:var(--accent-ink, #fff); font:700 16px var(--font-ui);
}
.wins-celebration .wc-burst{ position:absolute; left:50%; top:62px; width:0; height:0; pointer-events:none; }
.wins-celebration .wc-burst i{
  position:absolute; width:9px; height:9px; border-radius:3px; left:-4px; top:-4px;
  background:hsl(var(--h) 85% 58%); opacity:0;
  animation:wc-fly .9s cubic-bezier(.15,.7,.3,1) var(--d) forwards;
}
@keyframes wc-pop{ from{ transform:scale(.7); opacity:0 } to{ transform:none; opacity:1 } }
@keyframes wc-fly{
  0%{ transform:translate(0,0) rotate(0); opacity:1 }
  100%{ transform:translate(var(--x),var(--y)) rotate(200deg); opacity:0 }
}
@media (prefers-reduced-motion: reduce){
  .wins-celebration .wc-card{ animation:none; }
  .wins-celebration .wc-burst{ display:none; }
}

/* ---------- the week as seven small score wheels (2026-10-15) ---------- */
.dom-wins .wins-day .dot.mw{ width:auto; height:auto; border:0; background:none; box-shadow:none; border-radius:50%; position:relative; display:grid; place-items:center; }
.dom-wins .wins-day.today .dot.mw{ box-shadow:0 0 0 2px var(--canvas, #fff), 0 0 0 4px var(--accent); }
.dom-wins .wins-day.future .dot.mw{ opacity:.45; }
.dom-wins .mw-svg{ display:block; }
.dom-wins .mw-track{ fill:color-mix(in srgb, var(--ink) 9%, transparent); }
.dom-wins .mw-frost{ position:absolute; font-style:normal; font-size:13px; color:#3f7fae; background:var(--surface, #fff); border-radius:50%; width:16px; height:16px; display:grid; place-items:center; }
.dom-wins .mw-n{ font-size:11.5px; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; margin-top:-3px; }

/* A48: seven little wheels fit a 320 px phone - they shrink rather than spill. */
.dom-wins .wins-day{ min-width:0; }
.dom-wins .wins-day .dot.mw{ width:100%; max-width:38px; }
.dom-wins .mw-svg{ width:100%; height:auto; max-width:38px; }

/* Audit A17: the celebration is centred over a dimmed screen, not floating loose. */
.wins-celebration{ top:0; bottom:0; align-items:center; background:rgba(10,14,12,.42); pointer-events:auto; animation:wc-dim .3s ease both; }
.wins-celebration.leaving{ transition:opacity .3s ease; opacity:0; }
@keyframes wc-dim{ from{ background:rgba(10,14,12,0); } }
@media (prefers-reduced-motion: reduce){ .wins-celebration{ animation:none; } }
