/* ==========================================================================
   Showdown — quiz-show review game builder
   Uses the Sure Step PRODUCT palette (BehaviorLog Pro + IEP Compliance
   Tracker): navy #1E3A5F, teal #1A7FA8, warm paper #F2F0EC, borders #DEDAD3,
   amber #D99200, error red #D43C3C. Success is teal, never literal green.
   It sits inside the site's Paper & Emerald chrome; everything is scoped
   under .sd / .sd-* so none of it leaks into main.css territory.
   The projected board uses a deeper navy and a brighter amber than the
   screens do — a washed-out classroom projector eats mid-tones.
   ========================================================================== */

@layer components {

  .sd {
    --sd-navy:       #1E3A5F;
    --sd-navy-deep:  #132840;
    --sd-navy-ink:   #0D1D30;
    --sd-teal:       #1A7FA8;
    --sd-teal-hover: #15668A;
    --sd-teal-soft:  #DDF0F8;
    --sd-sky:        #5BC4E8;
    --sd-paper:      #F2F0EC;
    --sd-surface:    #FFFFFF;
    --sd-surface-2:  #F7F5F1;
    --sd-border:     #DEDAD3;
    --sd-text:       #1C1C1C;
    --sd-text-2:     #3A3A3A;
    --sd-muted:      #6B6862;
    --sd-amber:      #D99200;
    --sd-amber-soft: #FBF1DC;
    --sd-gold:       #F0B429;   /* projector-bright amber for point values */
    --sd-red:        #D43C3C;
    --sd-red-soft:   #FBE7E7;
    --sd-chalk:      #F3F1EC;
    --sd-chalk-dim:  #A9B8CC;
    --sd-radius:     14px;
    color: var(--sd-text);
    background: var(--sd-paper);
    font-family: var(--sans);
  }
  :where(.sd) *, :where(.sd) *::before, :where(.sd) *::after { box-sizing: border-box; }
  :where(.sd) [hidden] { display: none !important; }
  :where(.sd) :where(button, input, select, textarea) { font: inherit; color: inherit; }
  .sd :focus-visible { outline: 3px solid var(--sd-teal); outline-offset: 2px; border-radius: 6px; }
  .sd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* ── buttons ───────────────────────────────────────────────────────── */
  .sd-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; padding: 10px 20px;
    border-radius: 10px; border: 1.5px solid var(--sd-border);
    background: var(--sd-surface); color: var(--sd-navy);
    font-weight: 600; font-size: 1rem; line-height: 1.2; cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
  }
  .sd-btn:hover { border-color: var(--sd-teal); color: var(--sd-teal); }
  .sd-btn.sd-primary { background: var(--sd-teal); border-color: var(--sd-teal); color: #fff; }
  .sd-btn.sd-primary:hover { background: var(--sd-teal-hover); border-color: var(--sd-teal-hover); color: #fff; }
  .sd-btn:disabled { opacity: .45; cursor: not-allowed; }
  .sd-btn.sd-small { min-height: 36px; padding: 6px 14px; font-size: .9rem; }
  .sd-linkbtn { background: none; border: none; padding: 0; color: var(--sd-teal); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
  .sd-linkbtn:hover { color: var(--sd-teal-hover); }

  /* ── setup ─────────────────────────────────────────────────────────── */
  .sd-hero {
    background:
      radial-gradient(70% 120% at 85% 0%, rgba(26, 127, 168, .45) 0%, transparent 60%),
      linear-gradient(145deg, var(--sd-navy) 0%, var(--sd-navy-deep) 100%);
    color: #fff;
    padding: var(--s8) 0 var(--s6);
  }
  .sd-hero .eyebrow { color: var(--sd-gold); }
  .sd-hero .eyebrow::before { background: var(--sd-gold); }
  .sd-wordmark {
    font-family: var(--serif); font-weight: 400;
    font-size: clamp(3rem, 9vw, 5.5rem); line-height: .95; letter-spacing: -.01em;
    margin: 0 0 var(--s2); color: #fff;
  }
  .sd-wordmark::after {
    content: ""; display: block; width: 88px; height: 6px; border-radius: 3px;
    background: linear-gradient(90deg, var(--sd-gold), var(--sd-teal));
    margin-top: var(--s2);
  }
  .sd-lede { max-width: 60ch; color: rgba(255, 255, 255, .82); margin: 0; }

  .sd-setup-body { padding-block: var(--s5) var(--s8); }
  .sd-setup-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s3); align-items: start; }
  @media (max-width: 860px) { .sd-setup-grid { grid-template-columns: 1fr; } }

  .sd-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    min-height: 240px; padding: var(--s5) var(--s3); text-align: center; cursor: pointer;
    border: 2.5px dashed #C9C3B8; border-radius: var(--sd-radius); background: var(--sd-surface);
    transition: border-color .15s, background-color .15s;
  }
  .sd-drop:hover, .sd-drop.is-over { border-color: var(--sd-teal); background: var(--sd-teal-soft); }
  .sd-drop:focus-within { outline: 3px solid var(--sd-teal); outline-offset: 2px; }
  .sd-drop strong { font-size: 1.3rem; color: var(--sd-navy); }
  .sd-drop > span { color: var(--sd-text-2); }
  .sd-drop .sd-types { color: var(--sd-muted); font-size: .92rem; max-width: 40ch; }
  .sd-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
  .sd-drop-icon {
    display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
    background: var(--sd-teal-soft); color: var(--sd-teal); margin-bottom: 4px;
  }

  .sd-privacy {
    margin: var(--s2) 0 0; padding: 12px 16px; font-size: .92rem; line-height: 1.5;
    background: var(--sd-amber-soft); border: 1px solid #EED9A8; border-left: 4px solid var(--sd-amber);
    border-radius: 10px; color: var(--sd-text-2);
  }
  .sd-privacy b { color: var(--sd-text); }

  .sd-paste { margin-top: var(--s2); }
  .sd-paste summary { cursor: pointer; font-weight: 600; color: var(--sd-navy); }
  .sd-paste textarea {
    width: 100%; min-height: 9rem; margin-top: 10px; padding: 12px; resize: vertical;
    border: 1.5px solid var(--sd-border); border-radius: 10px; background: var(--sd-surface);
  }
  .sd-paste textarea:focus { border-color: var(--sd-teal); outline: none; box-shadow: 0 0 0 3px rgba(26, 127, 168, .18); }
  .sd-row { display: flex; justify-content: flex-end; margin-top: 8px; }

  .sd-panel { background: var(--sd-surface); border: 1px solid var(--sd-border); border-radius: var(--sd-radius); padding: var(--s3); box-shadow: 0 1px 2px rgba(30, 58, 95, .04); }
  .sd-panel h2 {
    font-family: var(--sans); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--sd-muted); margin: 0 0 var(--s1);
  }
  .sd-field { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--sd-border); }
  .sd-panel h2 + .sd-field { border-top: none; }
  .sd-field label { font-weight: 600; color: var(--sd-navy); }
  .sd-field small { display: block; font-weight: 400; color: var(--sd-muted); font-size: .85rem; }
  .sd-field select {
    min-width: 9rem; padding: 7px 10px; border: 1.5px solid var(--sd-border); border-radius: 8px;
    background: var(--sd-surface-2); color: var(--sd-navy); font-weight: 500;
  }
  .sd-field select:focus { border-color: var(--sd-teal); }
  .sd-field input[type="checkbox"] { width: 1.3rem; height: 1.3rem; accent-color: var(--sd-teal); }
  .sd-note { margin: var(--s2) 0 0; font-size: .92rem; color: var(--sd-muted); }

  .sd-resume {
    margin-top: var(--s3); display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    padding: 14px 16px; border-radius: 10px; background: var(--sd-teal-soft); border: 1px solid #B9DDEC;
  }
  .sd-resume span { flex: 1 1 16rem; color: var(--sd-navy); font-weight: 500; }

  .sd-status {
    margin-top: var(--s2); padding: 14px 16px; border-radius: 10px; background: var(--sd-surface);
    border: 1px solid var(--sd-border); border-left: 4px solid var(--sd-teal);
    display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  }
  .sd-status.is-err { border-left-color: var(--sd-red); background: var(--sd-red-soft); border-color: #F0C4C4; }
  .sd-status p { margin: 0; flex: 1 1 16rem; }
  .sd-spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--sd-teal-soft); border-top-color: var(--sd-teal); animation: sd-spin .9s linear infinite; flex: none; }
  @keyframes sd-spin { to { transform: rotate(1turn); } }

  .sd-help { margin-top: var(--s5); color: var(--sd-muted); font-size: .95rem; max-width: 70ch; }
  .sd-help h3 { font-family: var(--sans); font-weight: 700; color: var(--sd-navy); font-size: 1rem; margin: 0 0 6px; }
  .sd-help code { font-family: var(--mono); font-size: .85em; background: var(--sd-surface); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--sd-border); color: var(--sd-navy); }

  /* ── review ────────────────────────────────────────────────────────── */
  .sd-review { padding-block: var(--s4) var(--s8); }
  .sd-review .container { max-width: 1320px; }
  .sd-review-head { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: flex-end; justify-content: space-between; margin-bottom: var(--s3); }
  .sd-review-head > div:first-child { flex: 1 1 26rem; min-width: 0; }
  .sd-review-head .eyebrow { margin-bottom: 6px; }
  .sd-title-input {
    width: min(36rem, 100%); padding: 2px 0; border: none; border-bottom: 2px dashed var(--sd-border); background: transparent;
    font-family: var(--serif); font-size: clamp(1.7rem, 3.5vw, 2.4rem); color: var(--sd-navy);
  }
  .sd-title-input:focus { outline: none; border-bottom-color: var(--sd-teal); }
  .sd-review-note { margin: 8px 0 0; color: var(--sd-muted); }
  .sd-actions { display: flex; gap: 8px; flex-wrap: wrap; }
  .sd-warn { color: var(--sd-red); font-weight: 700; }

  .sd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s2); }
  .sd-card {
    background: var(--sd-surface); border: 1px solid var(--sd-border); border-radius: var(--sd-radius);
    padding: 14px; display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--sd-navy);
  }
  .sd-cat { font-weight: 700; font-size: 1.08rem; color: var(--sd-navy); border: none; border-bottom: 2px solid var(--sd-teal-soft); background: transparent; padding: 4px 0; }
  .sd-cat:focus { outline: none; border-bottom-color: var(--sd-teal); }
  .sd-clue-edit { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: start; }
  .sd-val { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-weight: 700; color: var(--sd-teal); font-size: 1rem; line-height: 2rem; min-width: 2.8rem; font-variant-numeric: tabular-nums; }
  .sd-clue-edit textarea, .sd-clue-edit input, .sd-final-edit textarea, .sd-final-edit input {
    width: 100%; padding: 7px 9px; border: 1.5px solid var(--sd-border); border-radius: 8px; background: var(--sd-surface-2); resize: vertical;
  }
  .sd-clue-edit textarea:focus, .sd-clue-edit input:focus, .sd-final-edit textarea:focus, .sd-final-edit input:focus,
  .sd-teams-edit input:focus, .sd-teams-edit select:focus { outline: none; border-color: var(--sd-teal); background: #fff; box-shadow: 0 0 0 3px rgba(26, 127, 168, .15); }
  .sd-clue-edit textarea, .sd-final-edit textarea { min-height: 3.3rem; field-sizing: content; overflow: hidden; }
  .sd-clue-edit .sd-a { grid-column: 2; }
  .sd-clue-edit.is-empty textarea, .sd-clue-edit.is-empty input { border-color: #E9A5A5; background: var(--sd-red-soft); }
  .sd-clue-edit.is-dup .sd-a { border-color: var(--sd-amber); background: var(--sd-amber-soft); }
  .sd-dd-tag { font-size: .72rem; font-weight: 700; color: var(--sd-navy-ink); background: var(--sd-gold); border-radius: 5px; padding: 1px 6px; line-height: 1.4; }

  .sd-final-edit {
    margin-top: var(--s2); padding: 14px; display: grid; gap: 10px; grid-template-columns: 1fr 2fr 1fr;
    background: var(--sd-surface); border: 1px solid var(--sd-border); border-radius: var(--sd-radius); border-top: 4px solid var(--sd-amber);
  }
  .sd-final-edit h2, .sd-teams-edit h2 { grid-column: 1 / -1; margin: 0; font-family: var(--sans); font-size: 1.05rem; font-weight: 700; color: var(--sd-navy); }
  @media (max-width: 760px) { .sd-final-edit { grid-template-columns: 1fr; } }
  .sd-teams-edit {
    margin-top: var(--s2); padding: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    background: var(--sd-surface); border: 1px solid var(--sd-border); border-radius: var(--sd-radius);
  }
  .sd-teams-edit h2 { margin-right: 6px; }
  .sd-teams-edit input { width: 10rem; max-width: 100%; padding: 7px 10px; border: 1.5px solid var(--sd-border); border-left-width: 8px; border-radius: 8px; background: var(--sd-surface-2); }
  .sd-teams-edit select { padding: 7px 10px; border: 1.5px solid var(--sd-border); border-radius: 8px; background: var(--sd-surface-2); }

  /* ── play (projected) ──────────────────────────────────────────────── */
  body[data-sd-screen="play"] { overflow: hidden; }
  body[data-sd-screen="play"] .site-header,
  body[data-sd-screen="play"] .site-footer { display: none; }
  .sd-play {
    height: 100vh; height: 100dvh;
    display: flex; flex-direction: column;
    background:
      radial-gradient(80% 60% at 50% -10%, rgba(26, 127, 168, .28) 0%, transparent 60%),
      var(--sd-navy-ink);
    color: var(--sd-chalk);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .sd-playbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
  .sd-playbar h1 {
    flex: 1 1 auto; min-width: 0; margin: 0;
    font-family: var(--serif); font-weight: 400; font-size: clamp(1.3rem, 3vw, 2.1rem); color: #fff;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .sd-play .sd-btn, .sd-overlay .sd-btn { background: transparent; border-color: rgba(169, 184, 204, .55); color: var(--sd-chalk); }
  .sd-play .sd-btn:hover, .sd-overlay .sd-btn:hover { background: rgba(255, 255, 255, .08); border-color: var(--sd-sky); color: #fff; }
  .sd-overlay .sd-btn.sd-primary { background: var(--sd-teal); border-color: var(--sd-teal); color: #fff; }
  .sd-overlay .sd-btn.sd-primary:hover { background: var(--sd-teal-hover); border-color: var(--sd-teal-hover); }

  .sd-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--sd-chalk); line-height: 1; padding-right: 12px; border-right: 1.5px solid rgba(255, 255, 255, .18); }
  .sd-brand:hover { color: #fff; }
  .sd-brand svg { width: 30px; height: 30px; flex: none; }
  .sd-brand-words { display: flex; flex-direction: column; gap: 3px; }
  .sd-brand b { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; }
  .sd-brand small { font-family: var(--mono); font-size: .56rem; letter-spacing: .22em; text-transform: uppercase; color: var(--sd-chalk-dim); }
  @media (max-width: 600px) { .sd-brand-words { display: none; } .sd-brand { padding-right: 8px; } }

  .sd-board-wrap { flex: 1 1 auto; min-height: 0; padding: 0 12px 12px; overflow: auto; }
  .sd-board { display: grid; gap: clamp(4px, .7vw, 10px); height: 100%; min-height: 300px; grid-auto-rows: minmax(0, 1fr); }
  .sd-head {
    display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px;
    font-weight: 700; font-size: clamp(.85rem, 1.7vw, 1.35rem); line-height: 1.15; color: #fff;
    text-transform: uppercase; letter-spacing: .02em;
    border-bottom: 3px solid var(--sd-teal); overflow-wrap: break-word; hyphens: auto; min-width: 0;
  }
  .sd-tile {
    border: none; border-radius: 10px; cursor: pointer;
    background: linear-gradient(180deg, #24476F 0%, var(--sd-navy) 100%);
    color: var(--sd-gold);
    min-height: 0; padding: 0; line-height: 1;
    font-family: var(--sans); font-weight: 700; font-size: clamp(1.3rem, min(4.4vw, 7vh), 3.6rem); font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
    box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .08);
    transition: background-color .12s, transform .12s, box-shadow .12s;
  }
  .sd-tile:hover:not(:disabled) { background: linear-gradient(180deg, #1F8AB6 0%, var(--sd-teal) 100%); color: #fff; transform: translateY(-2px); }
  .sd-tile:focus-visible { outline: 3px solid var(--sd-gold); outline-offset: 2px; }
  .sd-tile:disabled { cursor: default; background: transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .06); color: transparent; text-shadow: none; }

  .sd-scores { display: flex; gap: clamp(6px, 1vw, 14px); padding: 12px; overflow-x: auto; }
  .sd-team {
    flex: 1 1 0; min-width: 9.5rem; padding: 8px 12px; border-radius: 12px;
    background: rgba(255, 255, 255, .06); border-top: 6px solid var(--tc);
    display: flex; flex-direction: column; align-items: center;
  }
  .sd-team-name { width: 100%; padding: 0; border: none; background: transparent; color: var(--sd-chalk); text-align: center; font-weight: 700; font-size: clamp(.95rem, 1.6vw, 1.2rem); }
  .sd-score { font-weight: 700; font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.1; font-variant-numeric: tabular-nums; color: #fff; }
  .sd-score.is-neg { color: #F4A3A3; }
  .sd-adj { display: flex; gap: 6px; }
  .sd-adj button { width: 2.2rem; height: 1.9rem; border-radius: 7px; border: 1.5px solid rgba(169, 184, 204, .55); background: transparent; color: var(--sd-chalk); font-weight: 700; cursor: pointer; }
  .sd-adj button:hover { border-color: var(--sd-sky); }

  /* ── clue overlay ──────────────────────────────────────────────────── */
  .sd-overlay {
    position: fixed; inset: 0; z-index: 150; overflow: auto;
    display: flex; flex-direction: column;
    padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px calc(env(safe-area-inset-bottom, 0px) + 16px);
    background:
      radial-gradient(90% 70% at 50% 0%, rgba(26, 127, 168, .3) 0%, transparent 60%),
      var(--sd-navy-deep);
    color: var(--sd-chalk);
  }
  .sd-ov-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 700; color: var(--sd-chalk-dim); font-size: clamp(1rem, 1.8vw, 1.3rem); text-transform: uppercase; letter-spacing: .04em; }
  .sd-value { color: var(--sd-gold); font-size: clamp(1.5rem, 3vw, 2.4rem); font-variant-numeric: tabular-nums; }
  .sd-ov-body { flex: 1 1 auto; width: 100%; max-width: 62rem; margin: 0 auto; padding: 24px 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 24px; text-align: center; }
  .sd-clue-text { margin: 0; font-weight: 700; font-size: clamp(1.6rem, 4.6vw, 3.6rem); line-height: 1.2; color: #fff; overflow-wrap: anywhere; }
  .sd-answer-text { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 5vw, 4.2rem); line-height: 1.1; color: var(--sd-gold); overflow-wrap: anywhere; }
  .sd-dd { font-weight: 700; color: var(--sd-navy-ink); background: var(--sd-gold); padding: 4px 16px; border-radius: 8px; font-size: clamp(1.2rem, 2.6vw, 2rem); text-transform: uppercase; letter-spacing: .04em; }
  .sd-timer { min-width: 3ch; text-align: right; color: #fff; font-size: clamp(1.4rem, 3vw, 2.2rem); font-variant-numeric: tabular-nums; }
  .sd-timer.is-low { color: #F4A3A3; }
  .sd-ov-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
  .sd-ov-actions .sd-btn { font-size: 1.05rem; }
  .sd-award { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
  .sd-who { display: flex; border-radius: 12px; overflow: hidden; border: 2px solid var(--tc); }
  .sd-who button { border: none; background: transparent; color: var(--sd-chalk); padding: 10px 14px; cursor: pointer; font-weight: 700; font-size: 1rem; }
  .sd-who .sd-plus { background: color-mix(in srgb, var(--tc) 30%, transparent); }
  .sd-who button:hover { background: color-mix(in srgb, var(--tc) 50%, transparent); }
  .sd-who .sd-minus { border-left: 2px solid var(--tc); }
  .sd-who .sd-minus[aria-pressed="true"] { background: rgba(212, 60, 60, .45); }
  .sd-keys { color: var(--sd-chalk-dim); font-size: .92rem; text-align: center; margin: 12px 0 0; }
  .sd-wagers { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
  .sd-wager { min-width: 10rem; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .06); border-top: 6px solid var(--tc); display: flex; flex-direction: column; gap: 6px; align-items: center; }
  .sd-wager input { width: 7rem; text-align: center; font-weight: 700; font-size: 1.6rem; background: transparent; border: 2px solid rgba(169, 184, 204, .55); border-radius: 10px; color: var(--sd-gold); }
  .sd-wager small { color: var(--sd-chalk-dim); }
  .sd-judge { display: flex; gap: 6px; }
  .sd-judge button { padding: 6px 12px; border-radius: 8px; border: 2px solid rgba(169, 184, 204, .55); background: transparent; color: var(--sd-chalk); font-weight: 700; cursor: pointer; }
  .sd-judge .sd-right[aria-pressed="true"] { background: var(--sd-teal); border-color: var(--sd-teal); color: #fff; }
  .sd-judge .sd-wrong[aria-pressed="true"] { background: var(--sd-red); border-color: var(--sd-red); color: #fff; }
  .sd-winner { margin: 0; font-family: var(--serif); font-weight: 400; color: var(--sd-gold); font-size: clamp(3rem, 10vw, 7.5rem); line-height: .95; animation: sd-pop .7s cubic-bezier(.2, 1.4, .4, 1) both; }
  @keyframes sd-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .sd-standings { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; min-width: min(24rem, 100%); }
  .sd-standings li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 14px; border-radius: 10px; background: rgba(255, 255, 255, .06); border-left: 6px solid var(--tc); font-size: 1.2rem; }
  .sd-standings b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }

  .sd-toast {
    position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); transform: translateX(-50%); z-index: 200;
    max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 10px;
    background: var(--sd-navy); color: #fff; font-weight: 600; box-shadow: 0 8px 24px rgba(13, 29, 48, .3);
  }

  @media (prefers-reduced-motion: reduce) {
    .sd-winner { animation: none; }
    .sd-tile { transition: none; }
    .sd-spinner { animation-duration: 3s; }
  }
  @media (max-width: 600px) {
    .sd-head { font-size: .72rem; letter-spacing: 0; padding: 4px 2px; }
    .sd-team { min-width: 7rem; }
    .sd-field { grid-template-columns: 1fr; }
    .sd-field select { width: 100%; }
    .sd-actions .sd-btn { flex: 1 1 auto; }
  }
}
