/* ── Hockey Draft — styles.css ── v3 ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #020c16;
  --panel:     #071423;
  --panel-2:   #0b1e30;
  --rim:       rgba(14,165,233,.18);
  --rim-strong:rgba(14,165,233,.45);
  --ice:       #0ea5e9;
  --ice-lt:    #38bdf8;
  --ice-dim:   rgba(14,165,233,.55);
  --silver:    #94a3b8;
  --silver-lt: #cbd5e1;
  --text:      #e2e8f0;
  --text-dim:  rgba(226,232,240,.6);
  --text-muted:rgba(226,232,240,.32);
  --gold:      #f6bd55;
  --gold-dim:  rgba(246,189,85,.55);
  --red:       #ef4444;
  --green:     #22c55e;

  --fw-c:  #0ea5e9;
  --fw-lw: #38bdf8;
  --fw-rw: #7dd3fc;
  --fw-f:  #bae6fd;
  --def:   #94a3b8;
  --goal:  #f1f5f9;

  --font-head: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
  --font-num:  'Orbitron', monospace;
  --font-card: 'Rajdhani', sans-serif;
}

html, body { height: 100%; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font-body);
  display: flex; flex-direction: column;
  background:
    linear-gradient(180deg, rgba(2,12,22,.48) 0%, rgba(2,12,22,.86) 62%, rgba(1,10,18,.94) 100%),
    url("logo/RinkBG.webp") center center / cover no-repeat fixed;
  min-height: 100svh;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; }
.hidden { display: none !important; }

/* ── Topbar ───────────────────────────────────────────────────────── */
.topbar {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem clamp(1rem, 3vw, 2.5rem);
  background: rgba(2,12,22,.92);
  border-bottom: 1px solid var(--rim);
  backdrop-filter: blur(12px);
  z-index: 30;
}

.brand-mark {
  font: 700 .82rem/1 var(--font-head);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text); opacity: .8;
}

.nav-links {
  display: flex; align-items: center;
  gap: clamp(.7rem, 2vw, 1.6rem);
  font: 700 .72rem/1 var(--font-head);
  letter-spacing: .12em; text-transform: uppercase;
}

.nav-links a { color: var(--text-dim); transition: color .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ice); }

.nav-dropdown { position: relative; }

.nav-drop-btn {
  font: 700 .72rem/1 var(--font-head);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim); transition: color .15s;
  display: flex; align-items: center; gap: .28em;
}
.nav-drop-btn:hover,
.nav-dropdown:focus-within .nav-drop-btn { color: var(--ice); }

.nav-drop-btn::after {
  content: ""; display: inline-block; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; transition: transform .2s;
}
.nav-dropdown:hover .nav-drop-btn::after,
.nav-dropdown:focus-within .nav-drop-btn::after { transform: rotate(180deg); }

.nav-drop-menu {
  position: absolute; top: calc(100% + .55rem); left: 50%;
  transform: translateX(-50%) translateY(-6px); min-width: 186px;
  background: linear-gradient(160deg, #071a2e 0%, #030d1a 100%);
  border: 1px solid var(--rim);
  border-top: 2px solid var(--rim-strong);
  border-radius: 10px; padding: .42rem 0 .5rem;
  box-shadow: 0 20px 52px rgba(0,0,0,.9), 0 4px 14px rgba(0,0,0,.4);
  backdrop-filter: blur(18px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .2s, visibility .2s, transform .2s;
}
.nav-dropdown:hover .nav-drop-menu,
.nav-dropdown:focus-within .nav-drop-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.drop-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: .48rem 1rem;
  font: 700 .66rem/1 var(--font-head);
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(226,232,240,.75); transition: background .1s, color .1s;
  white-space: nowrap; position: relative;
}
a.drop-item:hover { background: rgba(14,165,233,.08); color: var(--ice); }
a.drop-item:hover::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--ice); border-radius: 0 2px 2px 0;
}
.drop-item.drop-soon { color: rgba(226,232,240,.22); cursor: default; }
.drop-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14,165,233,.16), transparent);
  margin: .35rem .6rem;
}
.drop-tag {
  font: 800 .44rem/1 var(--font-head);
  letter-spacing: .14em; text-transform: uppercase;
  padding: .2rem .5rem; border-radius: 100px;
}
.drop-tag.live { background: rgba(34,197,94,.15); color: #4ade80; box-shadow: 0 0 8px rgba(34,197,94,.2); }
.drop-tag.beta { background: rgba(14,165,233,.14); color: var(--ice); }
.drop-tag.soon { background: none; color: rgba(226,232,240,.2); font-style: italic; padding: 0; }

/* ── Game Shell ──────────────────────────────────────────────────── */
.game-shell {
  flex: 1; display: flex;
  gap: 0; min-height: 0;
  overflow: hidden;
}

/* ── Roll Panel ──────────────────────────────────────────────────── */
.roll-panel {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  padding: clamp(1rem, 3vw, 2rem);
  overflow-y: auto;
  border-right: 1px solid var(--rim);
  background: linear-gradient(90deg, rgba(2,12,22,.44), rgba(2,12,22,.18));
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.primary-btn {
  padding: .52rem 1.5rem;
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 50%, #0284c7 100%);
  border-top: 1px solid rgba(255,255,255,.3);
  border-radius: 8px;
  box-shadow: 0 4px 0 #075985, 0 8px 24px rgba(14,165,233,.25);
  color: #001820;
  font: 800 .76rem/1 var(--font-head);
  letter-spacing: .08em; text-transform: uppercase;
  transition: filter .14s, transform .08s;
}
.primary-btn:hover:not(:disabled) { filter: brightness(1.1); }
.primary-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 #075985, 0 4px 12px rgba(14,165,233,.2); }
.primary-btn:disabled { opacity: .4; cursor: not-allowed; }

.secondary-btn {
  padding: .5rem 1.2rem;
  background: rgba(14,165,233,.1);
  border: 1px solid var(--rim);
  border-radius: 8px;
  color: var(--ice-lt);
  font: 700 .72rem/1 var(--font-head);
  letter-spacing: .08em; text-transform: uppercase;
  transition: background .14s, border-color .14s;
}
.secondary-btn:hover { background: rgba(14,165,233,.18); border-color: var(--rim-strong); }

/* ── Mode Hero ───────────────────────────────────────────────────── */
.mode-hero {
  display: flex; flex-direction: column;
  align-items: center; gap: 1.2rem;
  padding: clamp(1rem, 4svh, 2.5rem) 0;
  text-align: center;
}

.mode-main-logo {
  width: clamp(150px, 26vw, 260px);
  height: auto;
  filter: drop-shadow(0 8px 28px rgba(14,165,233,.48)) drop-shadow(0 2px 10px rgba(0,0,0,.5));
}

.mode-hero-title {
  font: 900 clamp(2.4rem, 6vw, 4.2rem)/.9 var(--font-head);
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--text);
  text-shadow: 0 2px 0 #000;
}

.ice-accent { color: var(--ice); }

.mode-hero-sub {
  max-width: 42ch;
  font-size: clamp(.82rem, 1.2vw, .96rem);
  line-height: 1.6; color: var(--text-dim);
}

.mode-logo-group {
  display: flex; gap: clamp(1.5rem, 3.5vw, 3.5rem); flex-wrap: wrap;
  justify-content: center; align-items: center;
}

/* Public Beta first-visit welcome -------------------------------------- */
.welcome-dialog {
  display: none;
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(500px, calc(100vw - 1rem));
  max-height: min(720px, calc(100svh - 1rem));
  margin: 0;
  padding: 0;
  overflow: auto;
  border: 2px solid #38bdf8;
  border-radius: 14px;
  background: #f4fbff;
  color: #071423;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .78), 0 0 0 1px rgba(255, 255, 255, .45);
  z-index: 5000;
}
.welcome-dialog[open] { display: block; }
.welcome-dialog::backdrop {
  background: rgba(0, 8, 16, .84);
  backdrop-filter: blur(7px);
}
.welcome-hero {
  position: relative;
  padding: .8rem 1rem .7rem;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 50% 36%, rgba(56, 189, 248, .34), transparent 48%),
    linear-gradient(145deg, #0c2b44, #03111f 70%);
  border-bottom: 3px solid #e11d48;
}
.welcome-logo {
  display: block;
  width: min(42vw, 176px);
  height: auto;
  margin: -.15rem auto -.45rem;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .5));
}
.welcome-beta {
  position: absolute;
  top: .75rem;
  right: .75rem;
  padding: .28rem .5rem;
  border: 1px solid rgba(125, 211, 252, .7);
  border-radius: 999px;
  background: rgba(14, 165, 233, .13);
  color: #7dd3fc;
  font: 800 .67rem/1 'Barlow Condensed', sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.welcome-hero h2 {
  margin: 0;
  font: 900 1.55rem/1 'Barlow Condensed', sans-serif;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.welcome-body { padding: .95rem 1rem .85rem; }
.welcome-pitch {
  margin: 0 0 .8rem;
  color: #31475a;
  font: 500 .88rem/1.45 'Barlow', sans-serif;
}
.welcome-pitch strong { color: #be123c; font-weight: 800; white-space: nowrap; }
.welcome-modes {
  display: grid;
  gap: .42rem;
}
.welcome-mode {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: .7rem;
  min-height: 64px;
  padding: .3rem .65rem .3rem .25rem;
  border: 1px solid #b9d9e9;
  border-radius: 9px;
  background: #fff;
}
.welcome-mode img { width: 58px; height: 58px; object-fit: contain; }
.welcome-mode div { display: grid; gap: .1rem; }
.welcome-mode strong {
  color: #075985;
  font: 900 .95rem/1 'Barlow Condensed', sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.welcome-mode span {
  color: #40566a;
  font: 500 .76rem/1.3 'Barlow', sans-serif;
}
.welcome-footer {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .75rem 1rem .85rem;
  border-top: 1px solid #c7dfeb;
  background: #e9f7fd;
}
.welcome-play-btn {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #0ea5e9, #0369a1);
  color: #fff;
  box-shadow: 0 4px 0 #06466a;
  cursor: pointer;
  font: 800 .96rem/1 'Barlow Condensed', sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.welcome-play-btn:hover { filter: brightness(1.08); }
.welcome-skip-label {
  display: flex;
  align-items: center;
  gap: .36rem;
  color: #40566a;
  cursor: pointer;
  font: 700 .68rem/1.1 'Barlow Condensed', sans-serif;
  letter-spacing: .035em;
  white-space: nowrap;
}
.welcome-skip-label input { width: 18px; height: 18px; accent-color: #0369a1; }

@media (max-width: 520px) {
  .welcome-dialog {
    width: calc(100vw - .75rem);
    max-height: calc(100svh - .75rem);
    border-radius: 10px;
  }
  .welcome-hero { padding: .6rem .75rem .55rem; }
  .welcome-logo { width: min(37vw, 142px); }
  .welcome-beta { top: .5rem; right: .5rem; font-size: .58rem; }
  .welcome-hero h2 { font-size: 1.28rem; }
  .welcome-body { padding: .7rem .7rem .65rem; }
  .welcome-pitch { font-size: .78rem; line-height: 1.35; margin-bottom: .6rem; }
  .welcome-mode { grid-template-columns: 50px 1fr; min-height: 54px; padding: .2rem .5rem .2rem .18rem; }
  .welcome-mode img { width: 50px; height: 50px; }
  .welcome-mode strong { font-size: .87rem; }
  .welcome-mode span { font-size: .69rem; }
  .welcome-footer { padding: .65rem .7rem .72rem; gap: .55rem; }
  .welcome-skip-label { font-size: .62rem; }
}

.mode-logo-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  transition: transform .15s, filter .15s;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,.5));
}
.mode-logo-btn img { width: clamp(150px, min(18vw, 30svh), 230px); height: auto; display: block; }
.mode-logo-btn[data-mode="daily"] img { width: clamp(185px, min(21vw, 34svh), 270px); }
.mode-logo-btn[data-mode="face-off"] img { width: clamp(135px, min(16.5vw, 28svh), 210px); }
.mode-logo-btn:hover { transform: translateY(-4px) scale(1.06); filter: drop-shadow(0 8px 20px rgba(14,165,233,.4)); }

.mode-logo-btn-daily {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.daily-pips {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  min-width: 132px;
  margin-top: .3rem;
  padding: .42rem .68rem .46rem;
  border: 1px solid rgba(125,211,252,.24);
  border-radius: 10px;
  background: rgba(2,12,22,.72);
  color: rgba(226,232,240,.76);
  font: 700 .68rem/1 var(--font-head);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.daily-pip-row { display: flex; gap: .42rem; }
.daily-pip {
  width: 11px;
  height: 11px;
  border: 1px solid rgba(226,232,240,.42);
  border-radius: 50%;
  background: rgba(226,232,240,.12);
}
.daily-pip--used {
  border-color: var(--ice);
  background: var(--ice);
  box-shadow: 0 0 7px rgba(14,165,233,.8);
}
.daily-best {
  color: var(--ice-lt);
  font: 800 .72rem/1 var(--font-num);
  letter-spacing: .04em;
}
.daily-locked-msg { color: #f8d477; }

.hockey-mobile-nav { display: none; }
body:not(.game-active) .hockey-utility-stack { display: none; }

.home-footer-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
}

.home-footer-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  margin-top: 1.2rem;
}

.draft-strip {
  display: inline-flex;
  min-width: 142px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  margin: 0;
  padding: .42rem .8rem;
  border: 1px solid rgba(125, 211, 252, .34);
  border-radius: 9px;
  background: rgba(3, 13, 26, .82);
  box-shadow: 0 7px 20px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .05);
}

.draft-strip-value {
  color: #f8fafc;
  font: 800 .92rem/1 var(--font-num);
  font-variant-numeric: tabular-nums;
}

.draft-strip-label {
  color: #7dd3fc;
  font: 800 .62rem/1 var(--font-head);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav-logo-btn {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.45));
  transition: filter .15s, transform .15s;
  cursor: pointer;
}
.nav-logo-btn:hover { filter: drop-shadow(0 3px 10px rgba(0,0,0,.6)) brightness(1.08); transform: scale(1.06); }
.nav-logo-btn img { display: block; object-fit: contain; width: 68px; height: 68px; }

/* Desktop home staging mirrors Basketball's viewport-filling composition.
   Hockey's square artwork contains more transparent top/bottom padding, so
   its CSS boxes must be larger to produce the same visible logo scale. */
@media (min-width: 701px) {
  body:not(.game-active) .roll-panel {
    padding: clamp(.55rem, 1.5svh, 1rem) 1rem;
  }

  body:not(.game-active) .mode-hero {
    min-height: 100%;
    justify-content: center;
    gap: clamp(.6rem, 1.5svh, 1.15rem);
    padding: .45rem 0 1rem;
  }

  body:not(.game-active) .mode-main-logo {
    width: clamp(225px, min(21vw, 30svh), 300px);
  }

  body:not(.game-active) .mode-logo-group {
    gap: clamp(1.2rem, 3vw, 3rem);
    flex-wrap: nowrap;
  }

  body:not(.game-active) .mode-logo-btn img {
    width: clamp(190px, min(18vw, 28svh), 250px);
  }

  body:not(.game-active) .mode-logo-btn[data-mode="daily"] img {
    width: clamp(220px, min(21vw, 32svh), 285px);
  }

  body:not(.game-active) .mode-logo-btn[data-mode="face-off"] img {
    width: clamp(180px, min(16.5vw, 26svh), 235px);
  }

  body:not(.game-active) .home-footer-area {
    gap: .45rem;
    margin-top: .15rem;
  }

  body:not(.game-active) .home-footer-links {
    gap: clamp(1.75rem, 3vw, 2.75rem);
  }

  body:not(.game-active) .home-footer-links .nav-logo-btn img {
    width: 132px;
    height: 132px;
  }

  body:not(.game-active) .draft-strip {
    min-height: 38px;
    padding: .34rem .78rem;
  }
}

@media (min-width: 701px) and (max-height: 820px) {
  body:not(.game-active) .mode-main-logo {
    width: clamp(210px, 28svh, 250px);
  }

  body:not(.game-active) .mode-logo-btn img {
    width: clamp(180px, 28svh, 230px);
  }

  body:not(.game-active) .mode-logo-btn[data-mode="daily"] img {
    width: clamp(210px, 32svh, 260px);
  }

  body:not(.game-active) .mode-logo-btn[data-mode="face-off"] img {
    width: clamp(170px, 26svh, 215px);
  }

  body:not(.game-active) .home-footer-links .nav-logo-btn img {
    width: 108px;
    height: 108px;
  }
}

.htp-dialog {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  background: #071423;
  border: 1px solid rgba(14,165,233,.38);
  border-radius: 14px;
  color: #e8edf2;
  width: min(680px, calc(100vw - 2rem));
  max-width: none;
  max-height: min(760px, calc(100svh - 2rem));
  padding: 0;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0,0,0,.72), 0 0 35px rgba(14,165,233,.1);
}
.htp-dialog[open] { display: block; }
.htp-dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(5px); }
.htp-dialog-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: inherit;
}
.htp-head {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-shrink: 0;
  padding: .75rem 1rem;
  background: linear-gradient(135deg, rgba(14,165,233,.18), rgba(7,20,35,.98) 55%);
  border-bottom: 2px solid rgba(14,165,233,.3);
}
.htp-head-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.55));
}
.htp-title {
  font: 800 1.25rem/1 var(--font-num);
  color: var(--ice-lt);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.htp-kicker {
  margin-top: .3rem;
  color: var(--text-dim);
  font: 700 .72rem/1 var(--font-head);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.htp-close {
  position: absolute;
  top: .85rem;
  right: .85rem;
  z-index: 2;
  width: 34px;
  height: 34px;
  margin: 0;
  flex: 0 0 auto;
  border: 1px solid var(--rim-strong);
  border-radius: 50%;
  color: var(--text-dim);
  font-size: .9rem;
  line-height: 1;
  transition: color .14s, background .14s, border-color .14s;
}
.htp-close:hover {
  color: #fff;
  background: rgba(14,165,233,.16);
  border-color: var(--ice);
}
.htp-body {
  flex: 1;
  min-height: 0;
  padding: .7rem .8rem .85rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.htp-accord {
  margin-bottom: .55rem;
  overflow: hidden;
  background: rgba(2,12,22,.68);
  border: 1px solid var(--rim);
  border-radius: 8px;
}
.htp-accord-title {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .72rem .8rem;
  color: var(--ice-lt);
  cursor: pointer;
  list-style: none;
  font: 800 .9rem/1 var(--font-head);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.htp-accord-title::-webkit-details-marker { display: none; }
.htp-accord-title::before {
  content: "\25B6";
  color: var(--ice-dim);
  font-size: .55rem;
  transition: transform .18s;
}
.htp-accord[open] .htp-accord-title::before { transform: rotate(90deg); }
.htp-accord-body {
  padding: 0 .9rem .9rem 1.9rem;
  color: var(--text-dim);
  font-size: .86rem;
  line-height: 1.55;
}
.htp-accord-body p { margin: 0 0 .55rem; }
.htp-accord-body p:last-child { margin-bottom: 0; }
.htp-accord-body ul { padding-left: 1.1rem; }
.htp-accord-body li { margin-bottom: .4rem; }
.htp-accord-body li:last-child { margin-bottom: 0; }
.htp-accord-body strong { color: var(--text); font-weight: 700; }
.htp-roster-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .65rem;
}
.htp-chip {
  min-width: 38px;
  padding: .22rem .45rem;
  border: 1px solid;
  border-radius: 5px;
  text-align: center;
  font: 800 .7rem/1 var(--font-head);
  letter-spacing: .06em;
}
.htp-chip-forward { color: #7dd3fc; background: rgba(14,165,233,.14); border-color: rgba(14,165,233,.34); }
.htp-chip-defense { color: #cbd5e1; background: rgba(148,163,184,.13); border-color: rgba(148,163,184,.3); }
.htp-chip-goalie { color: var(--gold); background: rgba(246,189,85,.12); border-color: rgba(246,189,85,.32); }
.htp-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .4rem;
  margin: .6rem 0 .75rem;
}
.htp-score-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .5rem .6rem;
  background: rgba(14,165,233,.06);
  border-left: 3px solid var(--ice);
  border-radius: 4px;
}
.htp-score-grid strong { color: var(--ice-lt); font-family: var(--font-num); font-size: .75rem; }

@media (max-width: 520px) {
  .mode-logo-group { gap: .65rem; flex-wrap: nowrap; }
  .mode-logo-btn img { width: clamp(96px, 27vw, 108px); }
  .mode-logo-btn[data-mode="daily"] img { width: clamp(112px, 32vw, 126px); }
  .mode-logo-btn[data-mode="face-off"] img { width: clamp(88px, 25vw, 100px); }
  .daily-pips {
    min-width: 94px;
    margin-top: .15rem;
    padding: .3rem .4rem .34rem;
    font-size: .56rem;
  }
  .daily-pip { width: 8px; height: 8px; }
  .daily-best { font-size: .6rem; }
  .htp-dialog {
    top: .35rem;
    right: .35rem;
    bottom: .35rem;
    left: .35rem;
    width: auto;
    height: auto;
    max-height: none;
    transform: none;
    border-radius: 12px;
  }
  .htp-dialog-inner {
    width: 100%;
    height: 100%;
    max-height: none;
    overflow: hidden;
  }
  .htp-head {
    position: relative;
    width: 100%;
    min-height: 76px;
    gap: .65rem;
    padding: .65rem 3.15rem .65rem .7rem;
  }
  .htp-close {
    top: .65rem;
    right: .65rem;
    width: 36px;
    height: 36px;
    background: #fff;
  }
  .htp-head-logo { width: 54px; height: 54px; flex: 0 0 54px; }
  .htp-title { font-size: 1.12rem; }
  .htp-kicker { margin-top: .22rem; font-size: .62rem; line-height: 1.15; }
  .htp-body {
    width: 100%;
    padding: .55rem .55rem calc(.8rem + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .htp-accord {
    width: 100%;
    margin-bottom: .48rem;
    border-radius: 9px;
  }
  .htp-accord-title {
    min-height: 48px;
    gap: .6rem;
    padding: .72rem .78rem;
    font-size: .86rem;
    line-height: 1.08;
  }
  .htp-accord-title::before { flex: 0 0 auto; }
  .htp-accord-body {
    width: 100%;
    padding: 0 .85rem .9rem;
    font-size: .91rem;
    line-height: 1.5;
  }
  .htp-accord-body ul { margin: 0; padding-left: 1.2rem; }
  .htp-accord-body li { margin-bottom: .55rem; }
  .htp-roster-chips { gap: .38rem; }
  .htp-chip { min-width: 42px; padding: .3rem .48rem; font-size: .72rem; }
  .htp-score-grid { grid-template-columns: 1fr; gap: .45rem; }
  .htp-score-grid div { min-height: 42px; padding: .58rem .68rem; }
}

.mode-tile-inner {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: .7rem .85rem .8rem;
  background: linear-gradient(180deg, rgba(7,20,35,.94), rgba(2,12,22,.94));
  border: 1px solid var(--rim);
  border-radius: 8px; min-width: 132px;
  transition: background .14s, border-color .14s, transform .1s;
  box-shadow: 0 10px 28px rgba(0,0,0,.32);
}
.mode-tile:hover .mode-tile-inner { border-color: var(--ice-dim); }
.mode-tile input:checked ~ .mode-tile-inner {
  background: rgba(14,165,233,.1);
  border-color: var(--ice);
  box-shadow: 0 0 0 1px var(--ice) inset, 0 6px 20px rgba(14,165,233,.15);
}

.mode-tile-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 5px 14px rgba(0,0,0,.5));
}

.mode-tile-placeholder {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(14,165,233,.1); border: 1px solid var(--rim);
  font: 800 1.1rem/1 var(--font-num); color: var(--ice-dim);
}
.mode-tile-name {
  font: 800 .78rem/1 var(--font-head);
  letter-spacing: .1em; text-transform: uppercase; color: var(--text);
}
.mode-tile-desc { font-size: .64rem; color: var(--text-dim); }

.draft-note { font-size: .68rem; color: var(--text-muted); letter-spacing: .04em; }

/* ── Team Card ───────────────────────────────────────────────────── */
.team-card {
  display: flex; flex-direction: column;
  flex: 1; min-height: 0; gap: .8rem;
}

.team-card-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .6rem; color: var(--text-muted);
}
.team-card-empty-ico { font-size: 2.4rem; }

.team-card-content { flex: 1; display: flex; flex-direction: column; gap: .6rem; overflow-y: auto; }

.team-card-header {
  background: linear-gradient(135deg, #0b1e30 0%, #071423 100%);
  border: 1px solid var(--rim); border-radius: 10px;
  padding: .8rem 1rem;
}

.team-card-meta {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .25rem;
}

.team-year {
  font: 800 .7rem/1 var(--font-num);
  color: var(--ice); letter-spacing: .08em;
}

.team-conf {
  font: 600 .62rem/1 var(--font-head);
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em;
}

.team-name {
  font: 900 clamp(1.3rem, 2.8vw, 2rem)/.95 var(--font-head);
  text-transform: uppercase; letter-spacing: .04em; color: var(--text);
}

.team-record {
  margin-top: .3rem;
  font: 600 .68rem/1 var(--font-head);
  color: var(--text-dim); letter-spacing: .06em;
}
.team-card-record-item { color: var(--ice-lt); }

/* ── Position Filters ────────────────────────────────────────────── */
.player-filters {
  display: flex; flex-wrap: wrap; gap: .35rem;
}

.pos-filter-chip {
  padding: .22rem .65rem;
  background: rgba(14,165,233,.08);
  border: 1px solid var(--rim);
  border-radius: 100px;
  font: 700 .62rem/1 var(--font-head);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); transition: all .12s;
}
.pos-filter-chip:hover { border-color: var(--ice-dim); color: var(--ice); }
.pos-filter-chip--active {
  background: rgba(14,165,233,.18); border-color: var(--ice);
  color: var(--ice-lt);
}

.pos-filter-select {
  display: none;
  width: 100%; padding: .4rem .6rem;
  background: var(--panel); border: 1px solid var(--rim);
  border-radius: 7px; color: var(--text); font: 600 .74rem/1 var(--font-body);
}

/* ── Player List ─────────────────────────────────────────────────── */
.player-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  overflow-y: auto;
}

.player-col { display: flex; flex-direction: column; gap: .5rem; }

.pos-section { border-radius: 8px; overflow: hidden; }
.pos-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .32rem .65rem;
  background: rgba(14,165,233,.08);
  border-left: 3px solid var(--sec-color, var(--ice));
  font: 700 .62rem/1 var(--font-head);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim); cursor: pointer;
  list-style: none;
}
.pos-section-head::-webkit-details-marker { display: none; }
.pos-section-count {
  background: rgba(14,165,233,.15);
  border-radius: 100px; padding: .1rem .4rem;
  font: 700 .58rem/1 var(--font-num); color: var(--ice);
}
.pos-section-body { display: flex; flex-direction: column; gap: .3rem; padding: .3rem 0; }

.player-row {
  display: flex; align-items: center; gap: .55rem;
  padding: .42rem .6rem;
  background: rgba(14,165,233,.04);
  border: 1px solid transparent;
  border-left: 4px solid var(--team-color, #1a2a3a);
  border-radius: 0 6px 6px 0;
  text-align: left; width: 100%;
  transition: background .1s, border-color .1s;
}
.player-row:hover {
  background: rgba(14,165,233,.1);
  border-color: var(--ice-dim);
  border-left-color: var(--team-color, #0ea5e9);
}

.player-row-pos {
  flex-shrink: 0; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font: 800 .58rem/1 var(--font-head); letter-spacing: .04em;
  color: #000; background: var(--team-color, #0ea5e9);
}

.player-row-name {
  font: 700 .8rem/1.1 var(--font-card);
  color: var(--text);
  display: flex; align-items: center; gap: .3rem;
}

.player-row-info {
  min-width: 0;
  flex: 1 1 auto;
}

.player-row-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-row-awards {
  display: flex;
  align-self: stretch;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: .22rem;
  padding-left: .2rem;
}

.player-award-badge {
  width: 18px; height: 18px; object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}

.player-row-stats {
  font: 500 .6rem/1.3 var(--font-body);
  color: var(--text-dim); margin-top: .1rem;
}
.psc strong { color: var(--text); font-weight: 700; }

.no-match-msg {
  text-align: center; padding: 1rem;
  font: 400 .8rem/1.5 var(--font-body);
  color: var(--text-muted); font-style: italic;
}

/* ── Roll Controls ───────────────────────────────────────────────── */
.roll-controls {
  display: flex; align-items: center; justify-content: center;
  gap: .7rem; flex-shrink: 0;
  padding: .6rem 0 .2rem;
  border-top: 1px solid var(--rim);
}

/* Hockey counterpart to Baseball's separate right-side reroll control. */
.hockey-utility-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  pointer-events: none;
  user-select: none;
}

.hockey-reroll-btn {
  position: static;
  z-index: 1;
  display: grid;
  width: 132px;
  min-height: 96px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  pointer-events: auto;
  filter: drop-shadow(0 7px 13px rgba(0,0,0,.58));
  transition: filter .18s ease, transform .14s ease;
}

.hockey-reroll-btn img {
  display: block;
  width: 132px;
  height: 106px;
  object-fit: contain;
}

.hockey-reroll-btn:hover {
  filter: drop-shadow(0 9px 17px rgba(0,0,0,.7)) brightness(1.08);
  transform: scale(1.045);
}

.hockey-reroll-btn:active { transform: scale(.95); }
.hockey-reroll-btn:focus-visible {
  outline: 3px solid #7dd3fc;
  outline-offset: 4px;
  border-radius: 10px;
}

.pc-stack { display: flex; align-items: center; gap: .5rem; }

.play-clock-wrap {
  position: relative; width: 44px; height: 44px;
}
.play-clock-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.pcr-track { fill: none; stroke: rgba(14,165,233,.15); stroke-width: 3; }
.pcr-fill  {
  fill: none; stroke: var(--ice); stroke-width: 3;
  stroke-dasharray: 113; stroke-dashoffset: 0;
  stroke-linecap: round;
  transition: stroke-dashoffset .9s linear, stroke .3s;
}
.pcr-fill.urgent { stroke: var(--red); }
.play-clock-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font: 800 .88rem/1 var(--font-num); color: var(--ice);
}
.play-clock-num.urgent { color: var(--red); }

/* ── Depth Chart Panel ───────────────────────────────────────────── */
body:not(.game-active) .depth-chart-panel { display: none; }
.depth-chart-panel {
  flex-shrink: 0; width: clamp(200px, 26vw, 280px);
  display: flex; flex-direction: column;
  background: var(--panel);
  overflow-y: auto;
}

.dc-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: .45rem;
  padding: .7rem .9rem .5rem;
  border-bottom: 1px solid var(--rim); flex-shrink: 0;
}
.dc-header-logo {
  display: block;
  width: min(100%, 260px);
  height: auto;
  max-height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 3px 7px rgba(7,21,40,.18));
}
.dc-progress {
  font: 700 .72rem/1 var(--font-num); color: var(--ice);
}

.dc-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin: auto .7rem .55rem;
  padding: .55rem .62rem;
  border: 1px solid #bfd7e4;
  border-left: 4px solid #075985;
  border-radius: 3px;
  background: #f4f9fc;
}

.dc-progress-label {
  color: #334b62;
  font: 700 .78rem/1 var(--font-card);
  letter-spacing: .075em;
  text-transform: uppercase;
}

.dc-slots { padding: .5rem .6rem; display: flex; flex-direction: column; gap: .2rem; }

.dc-group-label {
  font: 700 .58rem/1 var(--font-head);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); padding: .5rem .3rem .2rem;
}

.dc-row {
  display: flex; align-items: center; gap: .5rem;
  padding: .38rem .5rem;
  border-radius: 6px;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.dc-row.dc-empty { border-left-color: rgba(148,163,184,.2); background: rgba(148,163,184,.04); }
.dc-row.dc-filled { background: rgba(14,165,233,.08); }
.dc-row.dc-forward.dc-filled { border-left-color: var(--ice); }
.dc-row.dc-defense.dc-filled { border-left-color: var(--def); }
.dc-row.dc-goalie.dc-filled  { border-left-color: var(--goal); }

.dc-slot-label {
  flex-shrink: 0; width: 26px;
  font: 800 .6rem/1 var(--font-head);
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted);
}
.dc-row.dc-filled .dc-slot-label { color: var(--ice-lt); }

.dc-player-name {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dc-player-main {
  display: block;
  font: 600 .74rem/1.1 var(--font-card); color: var(--text);
}
.dc-player-team {
  display: block;
  font: 500 .58rem/1 var(--font-body); color: var(--text-muted);
}
.dc-player-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .32rem;
  margin-top: .12rem;
  overflow: hidden;
  white-space: nowrap;
}
.dc-player-stats {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .22rem;
  overflow: hidden;
  color: #52667a;
  font: 600 .58rem/1 var(--font-body);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dc-player-stats strong { color: #075985; font-weight: 800; }
.dc-stat-sep { color: #8aa0ae; }
.dc-player-awards {
  display: flex;
  max-width: 72px;
  align-items: center;
  justify-content: flex-end;
  padding-left: .2rem;
}
.dc-player-awards:empty { display: none; }
.dc-player-awards .player-award-badge {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}
.dc-player-awards .player-award-badge + .player-award-badge {
  margin-left: -5px;
}

/* ── Assign Dialog ───────────────────────────────────────────────── */
.assign-dialog {
  margin: auto;
  max-width: min(96vw, 720px); width: 100%;
  background: linear-gradient(160deg, #0b1e30 0%, #040e1a 100%);
  border: 1px solid var(--rim);
  border-top: 2px solid var(--rim-strong);
  border-radius: 14px;
  color: var(--text);
  padding: 0;
  box-shadow: 0 30px 80px rgba(0,0,0,.9);
}
.assign-dialog::backdrop { background: rgba(1,6,12,.8); backdrop-filter: blur(6px); }

.assign-dialog-inner { padding: 1.2rem 1.3rem 1.4rem; position: relative; }

.assign-close {
  position: absolute; top: .9rem; right: .9rem;
  color: var(--text-muted); font-size: .88rem;
  transition: color .14s;
}
.assign-close:hover { color: var(--text); }

.assign-player-header {
  display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem;
}
.assign-pos-badge {
  flex-shrink: 0; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--assign-team-color, var(--ice));
  font: 800 .72rem/1 var(--font-head); letter-spacing: .04em; color: #000;
}
.assign-player-name {
  font: 800 1.1rem/1.1 var(--font-card); color: var(--text);
}
.assign-player-meta {
  font: 500 .7rem/1 var(--font-body); color: var(--text-muted); margin-top: .2rem;
}

.assign-stats {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-bottom: .9rem;
}
.assign-stat {
  display: flex; flex-direction: column; align-items: center;
  padding: .35rem .6rem;
  background: rgba(14,165,233,.06); border: 1px solid var(--rim);
  border-radius: 7px; min-width: 60px;
}
.assign-stat-label { font: 600 .54rem/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.assign-stat-value { font: 700 .9rem/1.2 var(--font-num); color: var(--ice-lt); margin-top: .15rem; }

.assign-formation-label {
  font: 700 .62rem/1 var(--font-head);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: .55rem;
}

.assign-formation { display: flex; flex-direction: column; gap: .65rem; }

.formation-rink {
  position: relative;
  height: 330px;
  width: min(100%, 660px);
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 42% 24%, #c8102e 0 4px, transparent 5px),
    radial-gradient(circle at 42% 76%, #c8102e 0 4px, transparent 5px),
    repeating-linear-gradient(0deg, rgba(7,89,133,.025) 0 2px, transparent 2px 8px),
    linear-gradient(180deg, #f9fdff 0%, #dff5fb 52%, #f8fcfe 100%);
  border: 8px solid #8296a5;
  border-right: 0;
  border-radius: 72px 0 0 72px;
  box-shadow:
    0 16px 34px rgba(7,21,40,.24),
    inset 0 0 0 3px #fff,
    inset 0 0 55px rgba(7,89,133,.08);
}

.formation-rink::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      transparent 0 15%,
      rgba(200,16,46,.85) 15% 15.7%,
      transparent 15.7% 76%,
      rgba(7,89,133,.9) 76% 77.3%,
      transparent 77.3% 100%);
  pointer-events: none;
}

.formation-rink::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 7px;
  background: repeating-linear-gradient(180deg, #c8102e 0 9px, #fff 9px 14px);
  box-shadow: -2px 0 0 rgba(200,16,46,.18);
  pointer-events: none;
}

.rink-line { display: none; }
.rink-circle {
  position: absolute;
  left: 42%;
  width: 112px;
  height: 112px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(200,16,46,.72);
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
  pointer-events: none;
}
.rink-circle-left { top: 24%; }
.rink-circle-right { top: 76%; }
.rink-crease {
  position: absolute;
  left: 15.5%;
  top: 50%;
  width: 56px;
  height: 108px;
  transform: translateY(-50%);
  border: 3px solid rgba(7,89,133,.7);
  border-left: 0;
  border-radius: 0 60px 60px 0;
  background: rgba(56,189,248,.16);
  pointer-events: none;
}
.rink-goal {
  position: absolute;
  left: 7%;
  top: 50%;
  width: 58px;
  height: 88px;
  transform: translateY(-50%);
  border: 4px solid #c8102e;
  border-left-width: 2px;
  border-radius: 8px 22px 22px 8px;
  background:
    repeating-linear-gradient(0deg, transparent 0 9px, rgba(82,102,122,.32) 9px 10px),
    repeating-linear-gradient(90deg, transparent 0 9px, rgba(82,102,122,.32) 9px 10px),
    rgba(255,255,255,.42);
  box-shadow: 3px 3px 0 rgba(7,21,40,.14);
  pointer-events: none;
}

.pos-node {
  display: flex; flex-direction: column; align-items: center;
  gap: .2rem; padding: .45rem .55rem; flex: 1; max-width: 90px;
  border: 1px solid var(--rim); border-radius: 8px;
  background: rgba(14,165,233,.04);
  transition: all .14s;
}
.pos-node--wide { max-width: 100%; }

.formation-rink .pos-node {
  position: absolute;
  width: 112px;
  max-width: 112px;
  min-height: 0;
  padding: .42rem .5rem .36rem;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 999px;
  background: linear-gradient(180deg, #0b6f9f, #075985);
  color: #fff;
  box-shadow: 0 3px 0 #043e60, 0 7px 16px rgba(7,21,40,.24);
  z-index: 2;
}
.formation-rink .pos-node::after { display: none; }
.pos-lw { left: 70%; top: 20%; }
.pos-c  { left: 64%; top: 50%; }
.pos-rw { left: 70%; top: 80%; }
.pos-ld { left: 42%; top: 24%; }
.pos-rd { left: 42%; top: 76%; }
.pos-g  { left: 14%; top: 50%; }

.bench-line {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: .42rem;
  padding: .78rem .72rem .7rem;
  border: 1px solid #9eb6c4;
  border-top: 8px solid #8a5a32;
  border-radius: 6px 6px 12px 12px;
  background: linear-gradient(180deg, #e8f0f4, #d8e5ec);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.85), 0 7px 16px rgba(7,21,40,.13);
}
.bench-title {
  grid-column: 1 / -1;
  font: 800 .62rem/1 var(--font-head);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #334b62;
}
.bench-node {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  max-width: none;
  place-self: stretch;
  justify-content: center;
  padding: .48rem .28rem;
  border-color: #8dbed3;
  background: #fff;
  box-shadow: 0 2px 5px rgba(7,21,40,.08);
}
.bench-node .pos-label {
  display: grid;
  width: 100%;
  min-height: 1em;
  place-items: center;
  font: 900 .9rem/1 var(--font-card);
  letter-spacing: .025em;
  text-align: center;
  text-transform: uppercase;
}

.pos-node.pos-eligible {
  border-color: var(--ice);
  background: #030608;
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(14,165,233,.75), 0 10px 24px rgba(14,165,233,.24);
}
.pos-node.pos-eligible:hover {
  background: #08131d;
}
.formation-rink .pos-node.pos-eligible:hover {
  transform: translate(-50%, -52%);
}
.pos-node.pos-filled {
  border-color: var(--pos-team-color, rgba(148,163,184,.3));
  background: linear-gradient(180deg, var(--pos-team-color, #111827), #030608);
  cursor: not-allowed;
}
.pos-node.pos-filled .pos-label { color: #fff; }
.pos-node.pos-filled .pos-player-name {
  color: rgba(255,255,255,.85);
  font-weight: 700;
  font-size: .6rem;
}
.pos-node.pos-ineligible {
  opacity: .3; cursor: not-allowed;
}

.pos-label {
  font: 900 1.05rem/1 var(--font-head);
  letter-spacing: .01em; text-transform: none;
  color: inherit;
  white-space: nowrap;
}
.pos-node.pos-eligible .pos-label { color: inherit; }
.pos-player-name {
  font: 600 .56rem/1 var(--font-body);
  color: var(--text-dim); text-align: center;
  max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Roll Spinner ────────────────────────────────────────────────── */
.roll-spinner {
  position: fixed; inset: 0; z-index: 1010;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.5rem;
  background: rgba(2,12,22,.92); backdrop-filter: blur(12px);
}

.spinner-logo-wrap {
  animation: pulseScale .8s ease-in-out infinite alternate;
}
.spinner-logo {
  width: clamp(110px, 18vw, 180px);
  filter: drop-shadow(0 8px 26px rgba(14,165,233,.45));
}

@keyframes pulseScale {
  from { transform: scale(.95); opacity: .8; }
  to   { transform: scale(1.05); opacity: 1; }
}

.spinner-puck {
  width: 36px; height: 10px;
  background: var(--silver); border-radius: 100px;
  animation: puckSlide 1s ease-in-out infinite alternate;
}
@keyframes puckSlide {
  from { transform: translateX(-30px); opacity: .6; }
  to   { transform: translateX(30px);  opacity: 1; }
}

/* ── Result Overlay ──────────────────────────────────────────────── */
.result-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  background: rgba(2,12,22,.9); backdrop-filter: blur(14px);
  overflow-y: auto;
}

.result-card {
  position: relative;
  background: linear-gradient(160deg, #0b1e30 0%, #040e1a 100%);
  border: 1px solid var(--rim); border-top: 2px solid var(--ice);
  border-radius: 16px; padding: 1.6rem 1.4rem 1.8rem;
  width: 100%; max-width: 520px;
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem;
  box-shadow: 0 30px 80px rgba(0,0,0,.9), 0 0 60px rgba(14,165,233,.06);
}

.result-close-btn {
  position: absolute;
  top: .65rem;
  right: .65rem;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--rim);
  border-radius: 50%;
  font-size: .75rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.result-close-btn:hover { background: rgba(255,255,255,.16); color: var(--text); }

.result-logo {
  width: clamp(110px, 20vw, 170px);
  filter: drop-shadow(0 4px 14px rgba(14,165,233,.4));
}

.result-tier {
  font: 900 clamp(1rem, 3.5vw, 1.5rem)/.95 var(--font-head);
  text-transform: uppercase; letter-spacing: .06em;
  text-align: center; color: var(--text);
}
.result-tier.tier-perfect { color: var(--gold); }
.result-tier.tier-champ   { color: var(--ice-lt); }
.result-tier.tier-finals  { color: var(--silver-lt); }
.result-tier.tier-conf    { color: var(--silver); }
.result-tier.tier-2nd     { color: rgba(226,232,240,.55); }
.result-tier.tier-1st     { color: rgba(226,232,240,.38); }
.result-tier.tier-miss    { color: var(--red); }

.result-record {
  font: 700 2rem/1 var(--font-num);
  color: var(--ice);
  letter-spacing: .04em;
}

.result-score {
  font: 600 .72rem/1 var(--font-body);
  color: var(--text-muted); letter-spacing: .08em; text-transform: uppercase;
}

.result-attempt {
  padding: .42rem .75rem;
  border: 1px solid #8dbed3;
  border-radius: 999px;
  background: #fff;
  color: #075985;
  font: 800 .76rem/1 var(--font-head);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.result-categories {
  display: flex; flex-wrap: wrap; gap: .4rem;
  justify-content: center; width: 100%;
}
.result-cat {
  display: flex; flex-direction: column; align-items: center;
  padding: .4rem .7rem;
  background: rgba(14,165,233,.06); border: 1px solid var(--rim);
  border-radius: 8px; min-width: 80px;
}
.result-cat-label { font: 600 .52rem/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.result-cat-val   { font: 700 1.1rem/1.2 var(--font-num); color: var(--ice-lt); margin-top: .18rem; }

.result-roster {
  display: grid; grid-template-columns: 1fr 1fr; gap: .35rem;
  width: 100%;
}
.result-roster-row {
  display: flex; align-items: center; gap: .5rem;
  padding: .3rem .5rem;
  background: rgba(14,165,233,.04); border: 1px solid var(--rim);
  border-radius: 6px;
}
.result-roster-slot { flex-shrink: 0; width: 24px; font: 700 .6rem/1 var(--font-head); letter-spacing: .06em; color: var(--silver); text-transform: uppercase; }
.result-roster-name { font: 600 .72rem/1.1 var(--font-card); color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-roster-ovr  { font: 700 .62rem/1 var(--font-num); color: var(--silver); }

.result-actions {
  display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center;
}

.result-lb-section {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  width: 100%;
  padding-top: .6rem; border-top: 1px solid var(--rim);
}

.lb-name-input {
  width: 100%; max-width: 280px; padding: .5rem .75rem;
  background: rgba(14,165,233,.06); border: 1px solid var(--rim);
  border-radius: 8px; color: var(--text);
  font: 500 .84rem/1 var(--font-body);
  outline: none; transition: border-color .14s;
}
.lb-name-input:focus { border-color: var(--ice); }
.lb-name-input::placeholder { color: var(--text-muted); }

.lb-status { font: 400 .7rem/1.4 var(--font-body); color: var(--text-muted); text-align: center; }
.lb-status.ok  { color: var(--green); }
.lb-status.err { color: var(--red); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .game-shell { flex-direction: column; overflow: visible; }
  .roll-panel { border-right: none; border-bottom: 1px solid var(--rim); overflow: visible; }
  .depth-chart-panel { width: 100%; flex-shrink: 0; }
  .player-list { grid-template-columns: 1fr; }
  .player-filters { display: none; }
  .pos-filter-select { display: block; }
  .nav-links { gap: .6rem; font-size: .64rem; }
  .assign-dialog {
    max-width: 100vw; max-height: calc(100svh - .5rem);
    height: calc(100svh - .5rem);
    border-radius: 12px 12px 0 0; margin-bottom: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .formation-rink {
    height: 285px;
  }
  .formation-rink .pos-node {
    width: auto;
    max-width: 118px;
    min-height: 0;
    padding: .22rem .34rem .18rem;
  }
  .formation-rink .pos-label {
    font-size: clamp(.58rem, 2.8vw, .82rem);
  }
  .formation-rink .pos-node::after {
    height: 24px;
    width: 10px;
  }
  .bench-line {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* -- Light, high-contrast information surfaces -------------------------- */
.team-card {
  padding: .9rem;
  border: 1px solid rgba(7,89,133,.32);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(248,251,253,.98), rgba(234,247,253,.97));
  color: #071528;
  box-shadow: 0 18px 44px rgba(0,0,0,.34), inset 0 0 0 1px rgba(255,255,255,.9);
}

.team-card-empty { color: #52667a; }
.team-card-empty-ico { color: #075985; }

.team-card-header {
  background: #fff;
  border-color: #bfd7e4;
  box-shadow: 0 3px 10px rgba(7,21,40,.07);
}
.team-year { color: #075985; }
.team-conf { color: #52667a; }
.team-name { color: #071528; }
.team-record { color: #42566d; }
.team-card-record-item { color: #075985; }
.pos-filter-chip {
  background: #fff;
  border-color: #a9cadb;
  color: #334b62;
}
.pos-filter-chip:hover { border-color: #075985; color: #075985; }
.pos-filter-chip--active {
  background: #075985;
  border-color: #075985;
  color: #fff;
}
.pos-filter-select {
  background: #fff;
  border-color: #a9cadb;
  color: #071528;
}

.pos-section {
  border: 1px solid #c9dce7;
  background: rgba(255,255,255,.58);
}
.pos-section-head {
  background: #dff2fb;
  color: #17324d;
}
.pos-section-count { background: #075985; color: #fff; }
.pos-section-body { padding: .35rem; }

.player-row {
  background: #fff;
  border-color: #d3e3ec;
  box-shadow: 0 1px 0 rgba(7,21,40,.04);
}
.player-row:hover,
.player-row:focus-visible {
  background: #f4fbff;
  border-color: #075985;
  border-left-color: var(--team-color, #075985);
  box-shadow: 0 0 0 2px rgba(7,89,133,.12);
  outline: none;
}
.player-row-pos {
  color: #fff;
}
.player-row-name { color: #071528; }
.player-row-stats { color: #42566d; }
.psc strong { color: #075985; }
.no-match-msg { color: #52667a; }
.roll-controls { border-top-color: #bfd7e4; }
.pcr-track { stroke: rgba(7,89,133,.18); }
.pcr-fill { stroke: #075985; }
.play-clock-num { color: #075985; }

.depth-chart-panel {
  background: linear-gradient(180deg, #f8fbfd, #eaf7fd);
  color: #071528;
  border-left: 1px solid #bfd7e4;
}
.dc-header {
  background: #fff;
  border-bottom-color: #bfd7e4;
}
.dc-progress { color: #075985; }
.dc-group-label { color: #52667a; }
.dc-row { border: 1px solid #d3e3ec; }
.dc-row.dc-empty {
  border-left-color: #91a9b9;
  background: #fff;
  color: #6a7e90;
}
.dc-row.dc-filled { background: #dff2fb; }
.dc-row.dc-forward.dc-filled { border-left-color: #075985; }
.dc-row.dc-defense.dc-filled { border-left-color: #52667a; }
.dc-row.dc-goalie.dc-filled { border-left-color: #8a5900; }
.dc-slot-label { color: #52667a; }
.dc-row.dc-filled .dc-slot-label { color: #075985; }
.dc-player-main { color: #071528; }
.dc-player-team { color: #52667a; }
.dc-player-stats { color: #52667a; }

.assign-dialog {
  background: linear-gradient(180deg, #f8fbfd, #eaf7fd);
  border-color: #7fb8d1;
  border-top-color: #075985;
  color: #071528;
  box-shadow: 0 30px 80px rgba(0,0,0,.62);
}
.assign-close { color: #52667a; }
.assign-close:hover { color: #071528; }
.assign-player-name { color: #071528; }
.assign-player-meta { color: #52667a; }
.assign-stat {
  background: #fff;
  border-color: #bfd7e4;
}
.assign-stat-label { color: #52667a; }
.assign-stat-value { color: #075985; }
.assign-formation-label { color: #334b62; }
.bench-line {
  border-color: #bfd7e4;
  background: #dff2fb;
}
.bench-title { color: #075985; }
.bench-node {
  background: #fff;
  border-color: #8dbed3;
}
.bench-node .pos-label { color: #071528; }
.bench-node.pos-eligible { background: #fff; }

.htp-dialog {
  background: #f8fbfd;
  border-color: #7fb8d1;
  color: #071528;
}
.htp-head {
  background: linear-gradient(135deg, #dff2fb, #f8fbfd 70%);
  border-bottom-color: #7fb8d1;
}
.htp-title { color: #075985; }
.htp-kicker { color: #52667a; }
.htp-close {
  border-color: #8dbed3;
  background: #fff;
  color: #334b62;
}
.htp-close:hover { color: #071528; background: #dff2fb; border-color: #075985; }
.htp-body { background: #eef7fb; }
.htp-accord {
  background: #fff;
  border-color: #bfd7e4;
  box-shadow: 0 1px 0 rgba(7,21,40,.04);
}
.htp-accord-title { color: #075985; }
.htp-accord-title::before { color: #075985; }
.htp-accord-body { color: #334b62; }
.htp-accord-body strong { color: #071528; }
.htp-chip-forward { color: #075985; background: #dff2fb; border-color: #8dbed3; }
.htp-chip-defense { color: #334b62; background: #e9eef2; border-color: #b8c7d1; }
.htp-chip-goalie { color: #744b00; background: #fff1cf; border-color: #d6aa4f; }
.htp-score-grid div { background: #f4fbff; border-color: #075985; }
.htp-score-grid strong { color: #075985; }

.result-card {
  background: linear-gradient(180deg, #f8fbfd, #eaf7fd);
  border-color: #7fb8d1;
  color: #071528;
}
.result-close-btn { color: #52667a; }
.result-close-btn:hover { background: #dff2fb; color: #071528; }
.result-tier { color: #071528; }
.result-tier.tier-perfect { color: #744b00; }
.result-tier.tier-champ,
.result-tier.tier-finals,
.result-tier.tier-conf,
.result-tier.tier-2nd,
.result-tier.tier-1st { color: #075985; }
.result-record { color: #075985; }
.result-score { color: #52667a; }
.result-cat,
.result-roster-row {
  background: #fff;
  border-color: #bfd7e4;
}
.result-cat-label { color: #52667a; }
.result-cat-val { color: #075985; }
.result-roster-slot { color: #52667a; }
.result-roster-name { color: #071528; }
.result-roster-ovr { color: #334b62; }
.result-lb-section { border-top-color: #bfd7e4; }
.lb-name-input {
  background: #fff;
  border-color: #a9cadb;
  color: #071528;
}
.lb-name-input::placeholder { color: #6a7e90; }
.lb-status { color: #52667a; }

.team-card .secondary-btn,
.result-card .secondary-btn {
  background: #fff;
  border-color: #8dbed3;
  color: #075985;
}
.team-card .secondary-btn:hover,
.result-card .secondary-btn:hover { background: #dff2fb; border-color: #075985; }

@media (max-width: 700px) {
  .team-card { padding: .65rem; border-radius: 9px; }
  .depth-chart-panel { border-left: 0; border-top: 1px solid #bfd7e4; }
}

/* -- Basketball-style player selection, with a Hockey half-rink -------- */
.assign-dialog {
  width: min(760px, calc(100vw - 1rem));
  max-width: none;
  max-height: min(820px, calc(100svh - 1rem));
  overflow: hidden;
  background: #f8f1df;
  border: 2px solid #8dbed3;
  border-radius: 13px;
  color: #071528;
}
.assign-dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  padding: 0;
  overflow-y: auto;
}
.assign-close {
  z-index: 5;
  top: .7rem;
  right: .7rem;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.78);
}
.assign-close:hover { background: #b51f2e; border-color: #b51f2e; color: #fff; }
.assign-player-card {
  padding: 1.05rem 4.2rem .95rem 1.25rem;
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,.14), transparent 30%),
    linear-gradient(105deg, color-mix(in srgb, var(--assign-team-color, #075985) 42%, #071528), #071528 78%);
  border-bottom: 4px solid var(--assign-team-color, #075985);
  color: #fff;
}
.assign-player-header { display: block; margin: 0; }
.assign-player-top { display: flex; align-items: center; gap: .65rem; min-height: 32px; margin-bottom: .25rem; }
.assign-pos-badge {
  width: auto;
  height: auto;
  padding: .15rem 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font: 600 .96rem/1 var(--font-body);
  letter-spacing: .055em;
}
.assign-player-awards { display: inline-flex; align-items: center; gap: .35rem; }
.assign-player-awards:empty { display: none; }
.assign-player-awards .player-award-badge { width: 32px; height: 32px; filter: drop-shadow(0 2px 5px rgba(0,0,0,.38)); }
.assign-player-name {
  margin: 0 0 .14rem;
  color: #fff;
  font: 600 clamp(2.45rem, 6vw, 3.55rem)/1.02 var(--font-body);
  letter-spacing: -.025em;
}
.assign-player-meta {
  margin: 0 0 .7rem;
  color: rgba(255,255,255,.78);
  font: 600 clamp(.9rem, 2vw, 1.12rem)/1.18 var(--font-body);
  letter-spacing: .035em;
  text-transform: uppercase;
}
.assign-stats { display: flex; align-items: baseline; flex-wrap: wrap; gap: .55rem 1rem; margin: 0; }
.assign-stat {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: .28rem;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.assign-stat-label {
  color: rgba(255,255,255,.72);
  font: 600 .62rem/1 var(--font-body);
  letter-spacing: .045em;
}
.assign-stat-value {
  margin: 0;
  color: #fff;
  font: 600 1.05rem/1.1 var(--font-body);
  letter-spacing: -.015em;
}
.assign-formation {
  gap: .75rem;
  padding: .72rem .88rem .9rem;
  background:
    repeating-linear-gradient(0deg, rgba(7,89,133,.035) 0 1px, transparent 1px 32px),
    #fff8e8;
}
.assign-formation-label {
  margin: 0;
  color: #52667a;
  font: 700 .67rem/1 var(--font-head);
  letter-spacing: .12em;
}
.formation-rink .pos-node {
  width: 62px;
  height: 62px;
  max-width: 62px;
  justify-content: center;
  padding: .2rem;
  border: 3px solid #9cc6d9;
  border-radius: 50%;
  background: #075985;
  color: #fff;
  box-shadow: 0 4px 0 #043e60, 0 8px 18px rgba(7,21,40,.24);
}
.formation-rink .pos-label {
  display: grid;
  width: 100%;
  min-height: 1em;
  margin: 0;
  place-items: center;
  color: inherit;
  font-size: 1.05rem;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}
.formation-rink .pos-player-name { max-width: 48px; color: inherit; font-size: .55rem; }
.formation-rink .pos-player-name:empty { display: none; }
.pos-player-last-name { display: none; }
.formation-rink .pos-node.pos-eligible {
  border-color: #071528;
  background: #ffc928;
  color: #071528;
  box-shadow: 0 0 0 3px rgba(255,255,255,.86), 0 5px 0 #9c6500, 0 10px 22px rgba(7,21,40,.3);
}
.formation-rink .pos-node.pos-eligible:hover {
  background: #ffd95c;
  transform: translate(-50%, -53%);
}
.formation-rink .pos-node.pos-filled {
  border-color: #fff;
  background: linear-gradient(180deg, var(--pos-team-color, #334b62), #071528);
  color: #fff;
}
.formation-rink .pos-node.pos-filled .pos-player-name {
  order: 1;
  display: block;
  width: auto;
  max-width: none;
  color: #fff;
  font: 900 1.05rem/1 var(--font-card);
  letter-spacing: .04em;
  text-align: center;
  white-space: nowrap;
}
.formation-rink .pos-node.pos-filled .pos-label {
  display: none;
}
.formation-rink .pos-node.pos-filled .pos-player-last-name {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  display: block;
  width: max-content;
  max-width: 82px;
  overflow: hidden;
  transform: translateX(-50%);
  color: rgba(7,21,40,.5);
  font: 600 .54rem/1 var(--font-body);
  letter-spacing: .055em;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(255,255,255,.72);
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
.bench-node.pos-filled .pos-player-name {
  order: 1;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  color: #fff;
  font: 900 1rem/1 var(--font-card);
  letter-spacing: .055em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bench-node.pos-filled .pos-label {
  display: none;
}
.bench-node.pos-filled .pos-player-last-name {
  order: 2;
  display: block;
  width: 100%;
  overflow: hidden;
  color: rgba(255,255,255,.58);
  font: 500 .52rem/1 var(--font-body);
  letter-spacing: .055em;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.formation-rink .pos-node.pos-ineligible { opacity: .38; }
.bench-line { margin-top: .05rem; }
.bench-node.pos-eligible {
  border-color: #9c6500;
  background: #fff4c7;
  color: #071528;
  box-shadow: 0 0 0 2px rgba(255,201,40,.38), 0 3px 7px rgba(7,21,40,.1);
}

/* Filled players become selectable when an eligible opposite-line slot is open.
   Bench buttons need a positioning context for the swap badge; rink buttons must
   remain absolutely anchored to their faceoff-dot coordinates. */
.bench-node.pos-swap {
  position: relative;
  cursor: pointer;
}
.formation-rink .pos-node.pos-swap {
  position: absolute;
  cursor: pointer;
}
.formation-rink .pos-node.pos-filled.pos-swap,
.bench-node.pos-filled.pos-swap {
  border-color: #ffc928;
  box-shadow: 0 0 0 3px rgba(255,201,40,.3), 0 0 20px rgba(255,201,40,.42), 0 5px 0 #6f4b00;
}
.bench-node.pos-filled.pos-swap {
  background: linear-gradient(180deg, var(--pos-team-color, #334b62), #071528);
  color: #fff;
}
.bench-node.pos-filled.pos-swap .pos-player-name {
  color: #fff;
  paint-order: stroke fill;
  text-shadow: 0 1px 2px #020c16, 0 0 4px rgba(2,12,22,.85);
  -webkit-text-stroke: .45px #020c16;
}
.pos-node.pos-swap::after,
.formation-rink .pos-node.pos-swap::after {
  content: "⇄";
  position: absolute;
  top: -9px;
  right: -9px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 2px solid #071528;
  border-radius: 50%;
  background: #ffc928;
  color: #071528;
  font: 900 1rem/1 Arial, sans-serif;
  box-shadow: 0 3px 8px rgba(7,21,40,.34);
  pointer-events: none;
}
.pos-node.pos-swap-target:not(.pos-filled) {
  outline: 3px dashed rgba(255,201,40,.82);
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .assign-dialog {
    width: calc(100vw - .5rem);
    max-width: none;
    height: fit-content;
    max-height: calc(100svh - .5rem);
    margin: auto;
    border-radius: 11px;
  }
  .assign-player-card { padding: .8rem 3rem .72rem .9rem; }
  .assign-player-name { font-size: clamp(2rem, 11vw, 2.7rem); }
  .assign-player-meta { font-size: .92rem; margin-bottom: .55rem; }
  .assign-stats { gap: .38rem .7rem; }
  .assign-stat-value { font-size: .92rem; }
  .assign-formation { padding: .58rem .5rem .7rem; }
  .formation-rink { height: 230px; border-width: 6px; border-right: 0; border-radius: 48px 0 0 48px; }
  .rink-circle { width: 78px; height: 78px; }
  .rink-crease { width: 38px; height: 76px; }
  .rink-goal { width: 42px; height: 62px; border-width: 3px; }
  .formation-rink .pos-node {
    width: 48px;
    height: 48px;
    max-width: 48px;
    padding: .12rem;
  }
  /* The compact rink needs extra separation once occupied nodes can swap. */
  .formation-rink .pos-lw { left: 71%; top: 15%; }
  .formation-rink .pos-c  { left: 63%; top: 50%; }
  .formation-rink .pos-rw { left: 71%; top: 85%; }
  .formation-rink .pos-label { font-size: .82rem; }
  .formation-rink .pos-player-name { max-width: 38px; font-size: .46rem; }
  .formation-rink .pos-node.pos-filled .pos-player-name {
    width: auto;
    max-width: none;
    font-size: .82rem;
  }
  .formation-rink .pos-node.pos-filled .pos-player-last-name {
    top: calc(100% + 2px);
    max-width: 60px;
    font-size: .43rem;
  }
  .bench-line { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .25rem; padding: .58rem .42rem .5rem; }
  .bench-node { min-height: 46px; padding: .38rem .12rem; }
  .bench-node .pos-label { font-size: .76rem; }
  .bench-node.pos-filled .pos-player-name { font-size: .86rem; }
  .bench-node.pos-filled .pos-player-last-name { font-size: .46rem; }
  /* Gold borders and the dialog instruction are sufficient on phones;
     floating arrow badges collide with adjacent rink and bench positions. */
  .pos-node.pos-swap::after,
  .formation-rink .pos-node.pos-swap::after { display: none; }
  .pos-node.pos-swap-target:not(.pos-filled) {
    outline-width: 2px;
    outline-offset: 2px;
  }
}

/* -- Football-density Hockey draft board ------------------------------- */
body.game-active .game-shell {
  display: grid;
  grid-template-columns: minmax(230px, 286px) minmax(0, 850px);
  gap: .85rem;
  width: min(1180px, calc(100% - 1.5rem));
  margin: .75rem auto 1rem;
  overflow: hidden;
}

body.game-active .roll-panel,
body.game-active .depth-chart-panel {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(7,21,40,.22);
  border-radius: 7px;
  background: #fff;
  color: #071528;
  box-shadow: 0 18px 42px rgba(0,0,0,.34), inset 0 1px 0 #fff;
}

body.game-active .roll-panel::before,
body.game-active .depth-chart-panel::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  height: 9px;
  background: linear-gradient(90deg, #c8102e 0 30%, #fff 30% 34%, #075985 34% 100%);
}

body.game-active .depth-chart-panel {
  order: 1;
  width: auto;
  padding-top: 9px;
}

body.game-active .roll-panel {
  order: 2;
  padding: 9px 0 0;
  border-right: 1px solid rgba(7,21,40,.22);
}

body.game-active .team-card {
  width: 100%;
  height: 100%;
  padding: .85rem;
  gap: .65rem;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #fff, #f8fbfd);
  box-shadow: none;
}

body.game-active .team-card-content {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: .65rem;
  overflow: hidden;
}

body.game-active .team-card-header {
  position: relative;
  flex: 0 0 auto;
  min-height: 126px;
  padding: .9rem 132px .85rem 1.05rem;
  overflow: hidden;
  border: 1px solid rgba(7,21,40,.18);
  border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 0 70%, rgba(200,16,46,.075)),
    linear-gradient(0deg, rgba(7,89,133,.11) 0 1px, transparent 1px 32px),
    #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8);
}

.team-card-kicker {
  display: block;
  margin-bottom: .38rem;
  color: #c8102e;
  font: 800 .78rem/1 var(--font-head);
  letter-spacing: .16em;
  text-transform: uppercase;
}

body.game-active .team-name {
  max-width: 100%;
  margin: 0 0 .32rem;
  color: #071528;
  font: 900 clamp(2.45rem, 5vw, 3.55rem)/.9 var(--font-head);
  letter-spacing: -.01em;
  text-transform: none;
}

body.game-active .team-card-meta {
  gap: .55rem;
  margin: 0 0 .26rem;
}

body.game-active .team-year {
  color: #c8102e;
  font: 800 1.28rem/1 var(--font-head);
  letter-spacing: .1em;
}

body.game-active .team-conf {
  padding: .18rem .42rem;
  border-radius: 2px;
  background: #075985;
  color: #fff;
  font-size: .7rem;
}

body.game-active .team-record {
  margin: 0;
  color: #42566d;
}

body.game-active .team-card-records {
  display: flex;
  align-items: baseline;
  gap: .42rem;
}

body.game-active .team-card-record-label {
  color: #52667a;
  font: 700 .76rem/1 var(--font-card);
  letter-spacing: .06em;
  text-transform: uppercase;
}

body.game-active .team-card-record-item {
  color: #075985;
  font: 800 .98rem/1 var(--font-num);
  letter-spacing: .035em;
}

.team-card-logo-link {
  position: absolute;
  top: .52rem;
  right: .8rem;
  display: grid;
  width: 116px;
  height: 116px;
  place-items: center;
}

.team-card-mode-logo {
  display: block;
  width: 108px;
  height: 108px;
  object-fit: contain;
  filter: drop-shadow(0 7px 12px rgba(7,21,40,.22));
  transition: transform .15s ease, filter .15s ease;
}

.team-card-logo-link:hover .team-card-mode-logo,
.team-card-logo-link:focus-visible .team-card-mode-logo {
  transform: scale(1.04);
  filter: drop-shadow(0 9px 14px rgba(7,21,40,.3)) brightness(1.06);
}

.draft-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  min-height: 76px;
  padding: .35rem .65rem;
  overflow: hidden;
  border: 1px solid rgba(7,21,40,.28);
  border-bottom: 4px solid #075985;
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(200,16,46,.16), transparent 30%, transparent 70%, rgba(7,89,133,.24)),
    #071528;
}

.draft-nav-left,
.draft-nav-right {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
}

.draft-nav-left { flex: 1; }
.draft-nav-right { flex: 0 0 auto; }
.draft-nav-btn { flex: 0 0 auto; }
.draft-nav .nav-logo-btn img {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.draft-nav .player-filters {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: .32rem;
}

.draft-nav .pos-filter-chip {
  padding: .45rem .72rem;
  border-color: #60758a;
  background: #17283a;
  color: #d7e2ea;
}

.draft-nav .pos-filter-chip:hover {
  border-color: #7dd3fc;
  color: #fff;
}

.draft-nav .pos-filter-chip--active {
  border-color: #fff;
  background: #f8f1df;
  color: #071528;
}

body.game-active .player-list {
  flex: 1;
  min-height: 0;
  grid-template-columns: 1fr 1fr;
  gap: .48rem;
  padding-right: .14rem;
  overflow-y: auto;
}

body.game-active .player-col { gap: .42rem; }
body.game-active .pos-section {
  border-color: #c3d4de;
  border-radius: 3px;
  background: #fff;
}

body.game-active .pos-section-head {
  min-height: 30px;
  padding: .34rem .62rem;
  border-left-width: 5px;
  border-radius: 0;
  background: color-mix(in srgb, var(--sec-color, #075985) 34%, #dce8ee);
  color: #071528;
}

body.game-active .pos-section-body {
  gap: .24rem;
  padding: .26rem;
}

body.game-active .player-row {
  min-height: 44px;
  padding: .36rem .48rem;
  border-color: rgba(7,21,40,.16);
  border-radius: 0 3px 3px 0;
  background: #fff;
}

body.game-active .player-row:nth-child(even) { background: #f4f7fa; }
body.game-active .player-row:hover,
body.game-active .player-row:focus-visible {
  border-color: #075985;
  border-left-color: var(--team-color, #075985);
  background: #f4fbff;
  box-shadow: inset 3px 0 0 var(--team-color, #075985), 0 2px 8px rgba(7,21,40,.1);
}

body.game-active .player-row-pos {
  width: 34px;
  height: 34px;
  border-radius: 2px;
  color: #fff;
}

body.game-active .player-row-name { font-size: .86rem; }
body.game-active .player-row-stats { font-size: .59rem; }

body.game-active .roll-controls {
  flex: 0 0 auto;
  min-height: 46px;
  padding: .38rem .55rem .3rem;
  border-top: 1px solid #bfd7e4;
  background: #eef6fa;
}

body.game-active .dc-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 82px;
  padding: .48rem .65rem;
  border-bottom: 1px solid rgba(7,21,40,.16);
  background:
    linear-gradient(0deg, rgba(7,89,133,.11) 0 1px, transparent 1px 100%),
    #fff;
}

body.game-active .dc-progress {
  min-width: 58px;
  padding: .38rem .48rem;
  border-radius: 3px;
  background: #075985;
  color: #fff;
  font-size: .7rem;
  text-align: center;
}

body.game-active .dc-slots {
  flex: 0 0 auto;
  gap: .38rem;
  padding: .72rem .7rem .55rem;
}

body.game-active .dc-group-label {
  min-height: 22px;
  margin-top: .08rem;
  padding: .3rem .48rem;
  border-radius: 2px;
  background: linear-gradient(90deg, #071528 0 72%, #c8102e 72%);
  color: #fff;
  font-size: .65rem;
}

body.game-active .dc-group-label:nth-of-type(8) {
  background: linear-gradient(90deg, #071528 0 72%, #075985 72%);
}

body.game-active .dc-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  min-height: 34px;
  padding: .32rem .38rem;
  border: 1px solid rgba(7,21,40,.16);
  border-left: 4px solid #91a9b9;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(7,21,40,.05);
}

body.game-active .dc-row:nth-child(odd) { background: #f4f7fa; }
body.game-active .dc-row.dc-filled {
  border-left-color: var(--dc-team-color, #075985);
  background: linear-gradient(90deg, color-mix(in srgb, var(--dc-team-color, #075985) 17%, #fff), #fff 74%);
}

body.game-active .dc-slot-label { width: auto; color: #075985; font-size: .7rem; }
body.game-active .dc-player-name { color: #52667a; font-size: .7rem; }
body.game-active .dc-player-main { font-size: .72rem; }
body.game-active .dc-player-team { font-size: .56rem; }
body.game-active .dc-player-stats { font-size: .56rem; }
body.game-active .dc-player-awards .player-award-badge {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
}

.dc-filler {
  display: block;
  width: min(88%, 224px);
  max-height: 230px;
  margin: 0 auto .7rem;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 7px 11px rgba(7,21,40,.16));
}

@media (max-width: 900px) and (min-width: 701px) {
  body.game-active .game-shell { grid-template-columns: minmax(210px, 242px) minmax(0, 1fr); }
  body.game-active .team-name { font-size: clamp(2rem, 5vw, 2.8rem); }
  .draft-nav .nav-logo-btn img { width: 48px; height: 48px; }
  .draft-nav .pos-filter-chip { padding-inline: .54rem; }
  .dc-filler { max-height: 180px; }
}

@media (max-width: 700px) {
  body.game-active { overflow-y: auto; }
  body.game-active .game-shell {
    display: flex;
    width: 100%;
    margin: 0;
    gap: 0;
    overflow: visible;
  }
  body.game-active .roll-panel {
    order: 1;
    min-height: calc(100svh - 4.4rem);
    overflow: visible;
    border-radius: 0;
  }
  body.game-active .depth-chart-panel {
    order: 2;
    width: 100%;
    overflow: visible;
    border-radius: 0;
  }
  body.game-active .team-card { height: auto; min-height: calc(100svh - 4.4rem); padding: .55rem; }
  body.game-active .team-card-content { overflow: visible; }
  body.game-active .team-card-header { min-height: 108px; padding: .72rem 90px .7rem .75rem; }
  body.game-active .team-name { font-size: clamp(2rem, 11vw, 2.75rem); }
  body.game-active .team-year { font-size: 1.12rem; }
  .team-card-logo-link { top: .5rem; right: .5rem; width: 82px; height: 82px; }
  .team-card-mode-logo { width: 78px; height: 78px; }
  .draft-nav { min-height: 66px; padding: .3rem .42rem; }
  .draft-nav-left { flex: 1; }
  .draft-nav .player-filters { display: none !important; }
  .draft-nav .nav-logo-btn img { width: 48px; height: 48px; }
  .draft-nav .pos-filter-select {
    display: block;
    min-width: 0;
    padding: .55rem .5rem;
    border-color: #60758a;
    background: #fff;
    color: #071528;
  }
  body.game-active .player-list { grid-template-columns: 1fr; overflow: visible; }
  body.game-active .dc-slots { padding-bottom: .8rem; }
  .dc-filler { display: none; }
}

/* -- Readability, expanded controls, and the Daily Penalty clock -------- */
body.game-active .pos-section-head {
  min-height: 42px;
  padding: .5rem .74rem;
  background: color-mix(in srgb, var(--sec-color, #075985) 52%, #dce8ee);
}

body.game-active .pos-section-label {
  color: #071528;
  font: 700 1.02rem/1 var(--font-card);
  letter-spacing: .055em;
}

body.game-active .pos-section-count {
  min-width: 28px;
  padding: .22rem .5rem;
  text-align: center;
  font-size: .76rem;
}

body.game-active .player-row {
  min-height: 62px;
  gap: .7rem;
  padding: .5rem .58rem;
}

body.game-active .player-row-pos {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255,255,255,.86);
  border-radius: 4px;
  color: #fff;
  font: 700 1.22rem/.9 var(--font-card);
  letter-spacing: 0;
  text-shadow: none;
  box-shadow: 0 0 0 1px rgba(7,21,40,.25), 0 2px 5px rgba(7,21,40,.18);
}

body.game-active .player-row-info { min-width: 0; flex: 1 1 auto; }
body.game-active .player-row-name {
  gap: .42rem;
  color: #071528;
  font: 800 1rem/1.05 var(--font-card);
}

body.game-active .player-row-stats {
  margin-top: .24rem;
  color: #334b62;
  font: 600 .79rem/1.35 var(--font-body);
}

body.game-active .player-row .player-award-badge {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.assign-player-awards .player-award-badge {
  width: 52px;
  height: 52px;
}

/* Ice-rimmed octagonal puck crests for verified NHL award winners. */
.player-award-badge {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 3px rgba(7,21,40,.3));
  isolation: isolate;
}

.player-award-badge img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-award-badge > .award-code {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 45%;
  width: 62%;
  transform: translate(-50%, -50%);
  color: #f4fdff;
  font: 900 1rem/.9 var(--font-card);
  letter-spacing: -.035em;
  paint-order: stroke fill;
  text-align: center;
  text-shadow: 0 0 3px #0ea5e9, 0 2px 2px rgba(0,0,0,.9);
  -webkit-text-stroke: .65px #020b12;
  white-space: nowrap;
}

.assign-player-awards .player-award-badge > .award-code { font-size: 1.3rem; }
.dc-player-awards .player-award-badge > .award-code { font-size: .68rem; }

.draft-nav {
  min-height: 92px;
  padding: .4rem .72rem;
}

.draft-nav .player-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  align-items: stretch;
  gap: .4rem;
}

.draft-nav .pos-filter-chip {
  width: 100%;
  min-height: 46px;
  padding: .45rem .5rem;
  justify-content: center;
  font-size: .72rem;
  letter-spacing: .075em;
}

.draft-nav-right { gap: .7rem; }
.draft-nav-right .nav-logo-btn img {
  width: 76px;
  height: 76px;
}

@media (min-width: 701px) {
  body.game-active .game-shell {
    position: relative;
    width: min(1180px, calc(100% - 180px));
    margin-left: max(.75rem, calc((100vw - 1340px) / 2));
    margin-right: 0;
    overflow: visible;
  }

  .hockey-utility-stack {
    position: absolute;
    z-index: 35;
    right: -1px;
    bottom: -1px;
    transform: translateX(calc(100% + 12px));
  }

  body.game-active .roll-panel,
  body.game-active .team-card {
    overflow: visible;
  }

  .icing-clock-stack {
    position: static;
    pointer-events: none;
  }
}

.icing-clock-panel {
  display: flex;
  width: 132px;
  flex-direction: column;
  align-items: center;
  gap: .42rem;
  padding: .72rem .8rem .62rem;
  border: 2px solid rgba(255,255,255,.3);
  border-bottom-color: #075985;
  border-radius: 11px;
  background: rgba(4,10,20,.96);
  box-shadow: 0 9px 30px rgba(0,0,0,.68), inset 0 1px 0 rgba(255,255,255,.08);
}

.icing-clock-label {
  color: rgba(255,255,255,.62);
  font: 800 .68rem/1 var(--font-head);
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.icing-clock-screen {
  display: grid;
  width: 100%;
  min-height: 68px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px;
  background: rgba(0,0,0,.62);
  box-shadow: inset 0 3px 11px rgba(0,0,0,.78);
}

.icing-clock-digits {
  color: #f5f7fa;
  font: 800 3.35rem/.9 var(--font-num);
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 9px rgba(255,255,255,.3);
}

.icing-clock-digits.warning { color: #f6bd55; text-shadow: 0 0 12px rgba(246,189,85,.64); }
.icing-clock-digits.urgent {
  color: #ff394f;
  text-shadow: 0 0 13px rgba(255,57,79,.78);
  animation: icing-clock-pulse .5s ease-in-out infinite alternate;
}

@keyframes icing-clock-pulse { to { opacity: .52; } }

.icing-clock-track {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(200,16,46,.2);
}

.icing-clock-drain {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #dff2fb, #7dd3fc);
  transition: width .85s linear, background .2s;
}
.icing-clock-drain.warning { background: linear-gradient(90deg, #f6bd55, #d98c13); }
.icing-clock-drain.urgent { background: linear-gradient(90deg, #ff394f, #c8102e); }

.line-swap-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(460px, calc(100vw - 1.25rem));
  max-width: none;
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 2px solid #ffc928;
  border-radius: 14px;
  background: #f8fbfd;
  color: #071528;
  box-shadow: 0 28px 80px rgba(0,0,0,.72);
}
.line-swap-dialog::backdrop { background: rgba(1,6,12,.72); backdrop-filter: blur(3px); }
.line-swap-inner { padding: 1.2rem; text-align: center; }
.line-swap-kicker {
  display: block;
  margin-bottom: .35rem;
  color: #c8102e;
  font: 900 .72rem/1 var(--font-head);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.line-swap-title {
  color: #071528;
  font: 900 1.75rem/.95 var(--font-head);
  letter-spacing: .035em;
  text-transform: uppercase;
}
.line-swap-copy { margin: .85rem auto 1rem; color: #334b62; font: 600 1rem/1.45 var(--font-body); }
.line-swap-copy strong { color: #075985; }
.line-swap-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.line-swap-actions button {
  min-height: 46px;
  border-radius: 7px;
  font: 900 .82rem/1 var(--font-head);
  letter-spacing: .075em;
  text-transform: uppercase;
}
.line-swap-cancel { border: 1px solid #9eb6c4; background: #fff; color: #334b62; }
.line-swap-confirm { border: 1px solid #9c6500; background: #ffc928; color: #071528; }
.line-swap-actions button:hover { filter: brightness(1.05); }

.icing-penalty-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(500px, calc(100vw - 1.25rem));
  max-width: none;
  max-height: calc(100svh - 1.25rem);
  margin: 0;
  padding: 0;
  overflow-y: auto;
  transform: translate(-50%, -50%);
  border: 2px solid #7fb8d1;
  border-radius: 15px;
  background: #f8fbfd;
  color: #071528;
  box-shadow: 0 28px 80px rgba(0,0,0,.72);
}

.icing-penalty-dialog::backdrop { background: rgba(1,6,12,.82); backdrop-filter: blur(5px); }
.icing-penalty-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .72rem;
  padding: 1rem 1.1rem 1.1rem;
  text-align: center;
}
.icing-penalty-logo { width: min(230px, 65vw); height: auto; }
.icing-penalty-title {
  color: #c8102e;
  font: 900 2rem/.9 var(--font-head);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.icing-penalty-copy { max-width: 34ch; color: #52667a; font-size: .82rem; line-height: 1.45; }
.icing-penalty-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  width: 100%;
  min-height: 88px;
  align-items: center;
  gap: .9rem;
  padding: .88rem .9rem;
  border: 1px solid #bfd7e4;
  border-left: 5px solid #c8102e;
  border-radius: 7px;
  background: #fff;
  text-align: left;
}
.icing-penalty-pos {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 4px;
  background: #071528;
  color: #fff;
  font: 900 1.4rem/1 var(--font-head);
}
.icing-penalty-player { display: flex; min-width: 0; flex-direction: column; gap: .28rem; }
.icing-penalty-player strong { overflow: hidden; color: #071528; font: 800 1.45rem/1.05 var(--font-card); text-overflow: ellipsis; white-space: nowrap; }
.icing-penalty-player small { overflow: hidden; color: #52667a; font: 700 .9rem/1.1 var(--font-body); text-overflow: ellipsis; white-space: nowrap; }
.icing-penalty-slot { color: #c8102e; font: 900 1.45rem/1 var(--font-head); letter-spacing: .015em; white-space: nowrap; }
.icing-penalty-continue {
  width: 100%;
  min-height: 46px;
  border-radius: 7px;
  background: #c8102e;
  color: #fff;
  font: 900 .9rem/1 var(--font-head);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.icing-penalty-continue:hover { filter: brightness(1.1); }

@media (max-width: 900px) and (min-width: 701px) {
  .draft-nav-right .nav-logo-btn img { width: 62px; height: 62px; }
  .draft-nav .pos-filter-chip { min-height: 42px; padding-inline: .34rem; font-size: .66rem; }
}

@media (max-width: 700px) {
  .hockey-utility-stack {
    width: 100%;
    align-items: flex-end;
    gap: 0;
  }
  .draft-nav { min-height: 70px; }
  .draft-nav-right { gap: .28rem; }
  .draft-nav-right .nav-logo-btn img { width: 54px; height: 54px; }
  body.game-active .player-row-pos { width: 48px; height: 48px; font-size: 1.26rem; }
  body.game-active .player-row-name { font-size: 1.02rem; }
  body.game-active .player-row-stats { font-size: .82rem; }
  body.game-active .player-row-awards { gap: .16rem; padding-left: .12rem; }
  body.game-active .team-card-content { flex: 0 0 auto; }
  body.game-active .player-list { flex: 0 0 auto; height: auto; }
  .hockey-reroll-btn {
    position: fixed;
    right: 10px;
    bottom: 14px;
    width: 112px;
    min-height: 78px;
    margin: 0;
  }
  .hockey-reroll-btn img { width: 112px; height: 84px; }
  .icing-clock-stack {
    position: static;
    align-self: flex-end;
    margin: .25rem 0 0 auto;
  }
  .icing-clock-panel {
    width: 108px;
    gap: .25rem;
    padding: .46rem .55rem .42rem;
  }
  .icing-clock-screen { min-height: 48px; }
  .icing-clock-digits { font-size: 2.2rem; }
  .icing-clock-label { font-size: .56rem; }
  .icing-clock-track { height: 4px; }
  .icing-penalty-card {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    min-height: 78px;
    gap: .58rem;
    padding: .7rem;
  }
  .icing-penalty-pos { width: 56px; height: 56px; font-size: 1.22rem; }
  .icing-penalty-player strong { font-size: 1.22rem; }
  .icing-penalty-player small { font-size: .8rem; }
  .icing-penalty-slot { font-size: 1.24rem; }
}

/* -- Phone home balance and single-panel game navigation ---------------- */
@media (max-width: 700px) {
  body:not(.game-active) { overflow: hidden; }
  body:not(.game-active) .game-shell {
    min-height: 0;
    overflow: hidden;
  }
  body:not(.game-active) .roll-panel {
    min-height: 0;
    padding: .35rem .75rem .7rem;
    overflow: hidden;
  }
  body:not(.game-active) .mode-hero {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    flex: 1;
    width: 100%;
    min-height: 0;
    gap: 0;
    padding: .15rem 0 .3rem;
  }
  body:not(.game-active) .mode-main-logo {
    align-self: start;
    justify-self: center;
    width: clamp(160px, 48vw, 205px);
  }
  body:not(.game-active) .mode-logo-group {
    align-self: center;
    margin-top: clamp(.4rem, 3svh, 1.35rem);
  }
  body:not(.game-active) .home-footer-area {
    align-self: end;
    margin: 0 0 .15rem;
  }

  body:not(.game-active) .home-footer-links { margin: 0; }

  body:not(.game-active) .draft-strip {
    min-height: 36px;
    padding: .32rem .7rem;
  }

  body.game-active {
    overflow: hidden;
  }
  body.game-active .sport-data-footer { display: none; }
  body.game-active .game-shell {
    display: block;
    flex: 1;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0 0 calc(76px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
  }
  body.game-active .roll-panel,
  body.game-active .depth-chart-panel {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    border-width: 0;
    border-radius: 0;
  }
  body.game-active .roll-panel {
    display: flex;
    padding: .38rem;
    overflow: hidden;
  }
  body.game-active .depth-chart-panel { display: none; }
  body.game-active.hockey-tab-lineup .roll-panel { display: none !important; }
  body.game-active.hockey-tab-lineup .depth-chart-panel {
    display: flex !important;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.game-active .team-card {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  body.game-active .team-card-content {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  body.game-active .player-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  body.game-active .draft-nav #gameNewBtn,
  body.game-active .draft-nav-right { display: none !important; }

  body.game-active.hockey-tab-lineup .dc-header {
    min-height: clamp(76px, 11svh, 92px);
    padding: .55rem .8rem .42rem;
  }
  body.game-active.hockey-tab-lineup .dc-header-logo {
    width: min(92%, 320px);
    max-height: clamp(52px, 7.5svh, 66px);
  }
  body.game-active.hockey-tab-lineup .dc-slots {
    flex: 1 1 auto;
    min-height: 0;
    justify-content: space-between;
    gap: clamp(.18rem, .45svh, .34rem);
    padding: .45rem .62rem .4rem;
  }
  body.game-active.hockey-tab-lineup .dc-group-label {
    min-height: clamp(24px, 3.4svh, 30px);
    padding: .34rem .52rem;
    font-size: clamp(.7rem, 2.5vw, .82rem);
  }
  body.game-active.hockey-tab-lineup .dc-row {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    min-height: clamp(35px, 5.1svh, 43px);
    padding: .34rem .48rem;
    border-left-width: 5px;
  }
  body.game-active.hockey-tab-lineup .dc-slot-label {
    font-size: clamp(.78rem, 2.8vw, .9rem);
  }
  body.game-active.hockey-tab-lineup .dc-player-main {
    font-size: clamp(.86rem, 3.1vw, 1rem);
    line-height: 1.05;
  }
  body.game-active.hockey-tab-lineup .dc-player-team {
    margin-top: .14rem;
    font-size: clamp(.62rem, 2.2vw, .72rem);
  }
  body.game-active.hockey-tab-lineup .dc-player-meta {
    gap: .35rem;
    margin-top: .18rem;
  }
  body.game-active.hockey-tab-lineup .dc-player-stats {
    gap: .24rem;
    font-size: clamp(.62rem, 2.2vw, .72rem);
  }
  body.game-active.hockey-tab-lineup .dc-player-awards {
    max-width: 98px;
  }
  body.game-active.hockey-tab-lineup .dc-player-awards .player-award-badge {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
  body.game-active.hockey-tab-lineup .dc-player-awards .player-award-badge + .player-award-badge {
    margin-left: -6px;
  }
  body.game-active.hockey-tab-lineup .dc-player-awards .player-award-badge > .award-code {
    font-size: .76rem;
  }
  body.game-active.hockey-tab-lineup .dc-progress-row {
    flex: 0 0 auto;
    min-height: 48px;
    margin: 0 .62rem .5rem;
    padding: .58rem .68rem;
  }
  body.game-active.hockey-tab-lineup .dc-progress-label { font-size: .88rem; }
  body.game-active.hockey-tab-lineup .dc-progress { font-size: .82rem; }
  body.game-active.hockey-tab-lineup .hockey-utility-stack {
    display: none;
  }

  body.game-active .hockey-mobile-nav {
    position: fixed;
    z-index: 900;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    height: calc(76px + env(safe-area-inset-bottom, 0px));
    padding: .2rem .2rem calc(.15rem + env(safe-area-inset-bottom, 0px));
    border-top: 2px solid var(--ice);
    background:
      linear-gradient(90deg, rgba(14,165,233,.16), transparent 28%, transparent 72%, rgba(200,16,46,.14)),
      linear-gradient(180deg, #071a2e, #020c16);
    box-shadow: 0 -8px 24px rgba(0,0,0,.32);
  }
  .hmb-tab {
    display: flex;
    flex: 1 1 20%;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(226,232,240,.62);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .hmb-tab img {
    width: min(70px, 20vw);
    height: min(70px, 20vw);
    object-fit: contain;
    opacity: .62;
    transition: opacity .15s, transform .15s;
  }
  .hmb-tab-active {
    background: rgba(14,165,233,.12);
    color: #fff;
  }
  .hmb-tab-active img { opacity: 1; transform: translateY(-1px); }
  .hmb-action img { opacity: .9; }

  .hockey-reroll-btn {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
}

/* Keep timed draft utilities outside the clipped phone panels. */
@media (max-width: 700px) {
  body.game-active .hockey-utility-stack {
    position: fixed;
    z-index: 850;
    right: 8px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    display: flex;
    width: auto;
    max-width: calc(100vw - 16px);
    flex-direction: column;
    align-items: flex-end;
    gap: .18rem;
    margin: 0;
    transform: none;
    pointer-events: none;
  }
  body.game-active .hockey-reroll-btn {
    position: static;
    width: 100px;
    min-height: 72px;
    margin: 0;
    pointer-events: auto;
  }
  body.game-active .hockey-reroll-btn img {
    width: 100px;
    height: 76px;
  }
  body.game-active .icing-clock-stack {
    position: static;
    display: block;
    align-self: auto;
    margin: 0;
    pointer-events: none;
  }
  body.game-active .icing-clock-panel {
    width: 102px;
    padding: .42rem .48rem .38rem;
  }

  /* Let the final draftable player clear the fixed utility rail. */
  body.game-active.hockey-mode-classic .player-list,
  body.game-active.hockey-mode-face-off .player-list {
    padding-bottom: 190px;
    scroll-padding-bottom: 190px;
  }
  body.game-active.hockey-mode-daily .player-list {
    padding-bottom: 116px;
    scroll-padding-bottom: 116px;
  }
}
