/* WC-V2 theme (docs/WC-V2-RULE-LOCK.md, WC-V2-D5). Loaded after wc-ui.css; wc-ui.css itself is unchanged.
   - data-wc-light="0..6" on main.game: a very subtle light tint over the frame interior, one step per round of the 7-round cycle.
   - data-wc-accent="1..3" on every fourth round: a clearer glass rim / accent colour (amethyst, lagoon, amber); 0 = approved raspberry.
   The rim colours are registered colour properties so they interpolate; under prefers-reduced-motion every change is instant.
   Default values below are exactly the approved wc-ui.css raspberry values, so accent 0 renders the approved frame unchanged.
   Also styles the round display ("Round N" only) that replaces the six round buttons (same pill, same height). */
@property --wcv-tint { syntax: "<color>"; inherits: true; initial-value: rgba(255, 255, 255, 0); }
@property --wca-band1 { syntax: "<color>"; inherits: true; initial-value: rgba(255, 236, 244, 0.95); }
@property --wca-band2 { syntax: "<color>"; inherits: true; initial-value: rgba(252, 196, 220, 0.9); }
@property --wca-band3 { syntax: "<color>"; inherits: true; initial-value: rgba(246, 160, 198, 0.9); }
@property --wca-band4 { syntax: "<color>"; inherits: true; initial-value: rgba(236, 116, 172, 0.92); }
@property --wca-line { syntax: "<color>"; inherits: true; initial-value: rgba(232, 40, 118, 0.65); }
@property --wca-depth { syntax: "<color>"; inherits: true; initial-value: rgba(214, 40, 110, 0.14); }
@property --wca-edge { syntax: "<color>"; inherits: true; initial-value: #F24C92; }
@property --wca-deep { syntax: "<color>"; inherits: true; initial-value: #C80F5A; }
@property --wca-under { syntax: "<color>"; inherits: true; initial-value: #A20C4B; }
@property --wca-glow { syntax: "<color>"; inherits: true; initial-value: rgba(245, 60, 135, 0.45); }
@property --wca-drop { syntax: "<color>"; inherits: true; initial-value: rgba(150, 20, 80, 0.6); }
@property --wca-sweep { syntax: "<color>"; inherits: true; initial-value: rgba(232, 22, 106, 0.9); }
@property --wca-text { syntax: "<color>"; inherits: true; initial-value: #E0115F; }
@property --wca-chip1 { syntax: "<color>"; inherits: true; initial-value: #FB5A98; }
@property --wca-chip2 { syntax: "<color>"; inherits: true; initial-value: #E8196A; }
@property --wca-chip3 { syntax: "<color>"; inherits: true; initial-value: #C90E57; }
@property --wca-chip-under { syntax: "<color>"; inherits: true; initial-value: #9E0F4A; }

/* ---------- per-round light step (very subtle: 5-7% tint over the ivory interior) ---------- */
body[data-wc-ui] main.game[data-wc-light="0"] { --wcv-tint: rgba(255, 255, 255, 0); }
body[data-wc-ui] main.game[data-wc-light="1"] { --wcv-tint: rgba(255, 188, 150, 0.07); }  /* apricot */
body[data-wc-ui] main.game[data-wc-light="2"] { --wcv-tint: rgba(255, 168, 200, 0.06); }  /* rose */
body[data-wc-ui] main.game[data-wc-light="3"] { --wcv-tint: rgba(196, 172, 255, 0.07); }  /* lilac (the Hard step) */
body[data-wc-ui] main.game[data-wc-light="4"] { --wcv-tint: rgba(168, 214, 255, 0.06); }  /* sky */
body[data-wc-ui] main.game[data-wc-light="5"] { --wcv-tint: rgba(168, 232, 200, 0.06); }  /* mint */
body[data-wc-ui] main.game[data-wc-light="6"] { --wcv-tint: rgba(255, 222, 150, 0.07); }  /* honey */

/* ---------- every-fourth-round glass rim / accent ---------- */
body[data-wc-ui] main.game[data-wc-accent="1"] { /* amethyst */
  --wca-band1: rgba(243, 236, 255, 0.95); --wca-band2: rgba(214, 196, 252, 0.9); --wca-band3: rgba(183, 160, 246, 0.9); --wca-band4: rgba(145, 110, 236, 0.92);
  --wca-line: rgba(124, 58, 237, 0.62); --wca-depth: rgba(110, 40, 214, 0.14); --wca-edge: #9B6BF2; --wca-deep: #6D28D9; --wca-under: #5B21B6;
  --wca-glow: rgba(139, 92, 246, 0.45); --wca-drop: rgba(76, 29, 149, 0.55); --wca-sweep: rgba(124, 58, 237, 0.9); --wca-text: #6D28D9;
  --wca-chip1: #A78BFA; --wca-chip2: #7C3AED; --wca-chip3: #6D28D9; --wca-chip-under: #4C1D95;
}
body[data-wc-ui] main.game[data-wc-accent="2"] { /* lagoon */
  --wca-band1: rgba(232, 250, 248, 0.95); --wca-band2: rgba(180, 236, 230, 0.9); --wca-band3: rgba(120, 214, 206, 0.9); --wca-band4: rgba(52, 178, 172, 0.92);
  --wca-line: rgba(13, 148, 136, 0.62); --wca-depth: rgba(13, 120, 110, 0.14); --wca-edge: #2CC4B6; --wca-deep: #0F766E; --wca-under: #115E59;
  --wca-glow: rgba(20, 184, 166, 0.45); --wca-drop: rgba(17, 94, 89, 0.55); --wca-sweep: rgba(13, 148, 136, 0.9); --wca-text: #0F766E;
  --wca-chip1: #2BB3A6; --wca-chip2: #0E8F84; --wca-chip3: #0B6F67; --wca-chip-under: #0A4F4A;
}
body[data-wc-ui] main.game[data-wc-accent="3"] { /* amber */
  --wca-band1: rgba(255, 244, 230, 0.95); --wca-band2: rgba(253, 214, 170, 0.9); --wca-band3: rgba(249, 180, 120, 0.9); --wca-band4: rgba(240, 140, 70, 0.92);
  --wca-line: rgba(217, 92, 22, 0.62); --wca-depth: rgba(194, 65, 12, 0.14); --wca-edge: #F08A3C; --wca-deep: #C2410C; --wca-under: #9A3412;
  --wca-glow: rgba(249, 115, 22, 0.45); --wca-drop: rgba(124, 45, 18, 0.55); --wca-sweep: rgba(234, 88, 12, 0.9); --wca-text: #B4400C;
  --wca-chip1: #FB923C; --wca-chip2: #EA580C; --wca-chip3: #C2410C; --wca-chip-under: #7C2D12;
}

/* Frame: the same layers as wc-ui.css, with the tint on top of the interior and the rim colours as variables. */
body[data-wc-ui] main.game {
  background:
    linear-gradient(var(--wcv-tint), var(--wcv-tint)) padding-box,
    radial-gradient(120% 60% at 22% 4%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 58%) padding-box,
    radial-gradient(140% 100% at 50% 40%, rgba(255, 238, 228, 0) 55%, rgba(250, 196, 214, 0.55) 100%) padding-box,
    linear-gradient(180deg, #FFEEE4 0%, #FDE5DC 50%, #FCDDDD 100%) padding-box,
    linear-gradient(100deg, rgba(255, 255, 255, 0) calc(var(--wcu-fs) - 16%), var(--wca-sweep) calc(var(--wcu-fs) - 5%), rgba(255, 255, 255, 0.98) var(--wcu-fs), var(--wca-sweep) calc(var(--wcu-fs) + 5%), rgba(255, 255, 255, 0) calc(var(--wcu-fs) + 16%)) border-box,
    linear-gradient(180deg, var(--wca-band1) 0%, var(--wca-band2) 30%, var(--wca-band3) 66%, var(--wca-band4) 100%) border-box;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.98),
    inset 0 0 0 4.5px var(--wca-line),
    inset 0 10px 18px -6px var(--wca-depth),
    inset 0 -6px 12px -6px rgba(255, 255, 255, 0.7),
    0 0 0 1.5px var(--wca-edge),
    0 0 0 3px var(--wca-deep),
    0 0 0 4px rgba(255, 255, 255, 0.5),
    0 3px 0 2px var(--wca-under),
    0 0 var(--wcu-glow) var(--wca-glow),
    0 22px 40px -28px var(--wca-drop);
  transition: --wcv-tint 700ms ease, --wca-band1 700ms ease, --wca-band2 700ms ease, --wca-band3 700ms ease, --wca-band4 700ms ease,
    --wca-line 700ms ease, --wca-depth 700ms ease, --wca-edge 700ms ease, --wca-deep 700ms ease, --wca-under 700ms ease, --wca-glow 700ms ease,
    --wca-drop 700ms ease, --wca-sweep 700ms ease, --wca-text 700ms ease, --wca-chip1 700ms ease, --wca-chip2 700ms ease, --wca-chip3 700ms ease,
    --wca-chip-under 700ms ease;
}
body[data-wc-ui] .found { color: var(--wca-text); }
body[data-wc-ui] .practice-score { border-left-color: color-mix(in srgb, var(--wca-text) 40%, #FFFFFF); }

/* ---------- round display (replaces the six round buttons; same pill and height) ---------- */
body[data-wc-ui] .wc-round { justify-content: center; gap: 10px; }
body[data-wc-ui] .wc-round .round-legend { float: none; }
body[data-wc-ui] .wc-round-current {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 10px;
  border: 1.5px solid rgba(255, 210, 228, 0.9); border-radius: 14px;
  background: radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, var(--wca-chip1) 0%, var(--wca-chip2) 52%, var(--wca-chip3) 100%);
  color: #FFFFFF; font-size: 1.05rem; font-weight: 900; font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 1px rgba(40, 0, 20, 0.45);
  box-shadow: inset 0 -2px 0 rgba(40, 0, 20, 0.3), 0 3px 0 var(--wca-chip-under), 0 6px 10px -6px var(--wca-chip-under);
}
/* Only "Round" + the current number are shown, so the label stays visible at every width (wc-ui.css hides it below 380 px only to fit
   the old six round buttons). */
@media (max-width: 379px) {
  body[data-wc-ui] .wc-round .round-legend { position: static; width: auto; height: auto; overflow: visible; clip: auto; padding: 0 4px 0 6px; }
}
@media (min-width: 600px) {
  body[data-wc-ui] .wc-round-current { min-width: 48px; min-height: 48px; font-size: 1.15rem; }
  body[data-wc-ui] .wc-round { gap: 14px; }
}
@media (min-width: 960px) {
  body[data-wc-ui] .wc-round-current { min-width: clamp(46px, 6.6vh, 60px); min-height: clamp(46px, 6.6vh, 60px); font-size: 1.5rem; border-radius: 16px; }
  body[data-wc-ui] .wc-round { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-wc-ui] main.game { transition: none; }   /* theme changes apply instantly */
}
