:root {
  color-scheme: dark;
  --ink: #030a13;
  --navy: #071322;
  --panel: #0d1b2d;
  --panel-2: #12233a;
  --line: #243b59;
  --muted: #8da1ba;
  --ice: #eef9ff;
  --blue: #46c7ff;
  --blue-2: #1479ff;
  --red: #ff405f;
  --gold: #ffb938;
  --green: #49e0aa;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.48);
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -15%, rgba(43, 130, 220, 0.2), transparent 38%),
    linear-gradient(180deg, #07121f 0%, #030a13 50%, #02060d 100%);
  color: var(--ice);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(70, 199, 255, 0.9);
  outline-offset: 3px;
}

.ice-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

.app-shell {
  position: relative;
  width: min(100%, 980px);
  min-height: 100dvh;
  margin: 0 auto;
  border-inline: 1px solid rgba(120, 180, 235, 0.08);
  background: rgba(3, 10, 19, 0.52);
  box-shadow: 0 0 110px rgba(0, 0, 0, 0.45);
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
  padding: max(18px, env(safe-area-inset-top)) 24px 12px;
}

.brand-button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 1.12rem;
  font-weight: 950;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.brand-button small {
  display: block;
  margin-top: -1px;
  color: var(--blue);
  font-size: 0.52rem;
  letter-spacing: 0.19em;
}

.mini-puck {
  display: grid;
  width: 43px;
  height: 31px;
  place-items: center;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: linear-gradient(#1a2b41, #07101c);
  box-shadow: inset 0 -7px 0 rgba(0, 0, 0, 0.25), 0 0 18px rgba(70, 199, 255, 0.18);
  font-size: 0.82rem;
  font-weight: 1000;
  transform: rotate(-5deg);
}

.icon-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(182, 206, 231, 0.34);
  border-radius: 12px;
  background: rgba(10, 22, 38, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.menu-button { gap: 5px; align-content: center; }
.menu-button span { width: 22px; height: 3px; border-radius: 4px; background: #fff; }

.screen {
  display: none;
  min-height: 100dvh;
  padding: 104px 24px 118px;
}
.screen.is-active { display: block; }

.home-screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.home-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -4;
  background:
    radial-gradient(ellipse at 50% 33%, rgba(35, 113, 174, 0.19), transparent 32%),
    radial-gradient(ellipse at 15% 55%, rgba(70, 199, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(2, 7, 13, 0.04), rgba(2, 7, 13, 0.84));
}

.arena-lights {
  position: absolute;
  z-index: -3;
  top: 2%;
  left: -10%;
  right: -10%;
  height: 250px;
  opacity: 0.7;
  background:
    radial-gradient(circle at 8% 60%, white 0 2px, rgba(99, 185, 255, .55) 3px, transparent 10px),
    radial-gradient(circle at 21% 39%, white 0 2px, rgba(99, 185, 255, .48) 3px, transparent 10px),
    radial-gradient(circle at 35% 26%, white 0 2px, rgba(99, 185, 255, .46) 3px, transparent 11px),
    radial-gradient(circle at 50% 20%, white 0 2px, rgba(99, 185, 255, .46) 3px, transparent 11px),
    radial-gradient(circle at 65% 26%, white 0 2px, rgba(99, 185, 255, .46) 3px, transparent 11px),
    radial-gradient(circle at 79% 39%, white 0 2px, rgba(99, 185, 255, .48) 3px, transparent 10px),
    radial-gradient(circle at 92% 60%, white 0 2px, rgba(99, 185, 255, .55) 3px, transparent 10px);
  filter: blur(0.4px);
}

.hero-rink {
  position: absolute;
  z-index: -2;
  left: 50%;
  bottom: 88px;
  width: min(1200px, 150vw);
  height: 46%;
  border: 2px solid rgba(183, 221, 248, 0.22);
  border-radius: 48% 48% 8% 8%;
  background:
    linear-gradient(105deg, transparent 0 46%, rgba(255,255,255,.05) 47%, transparent 50%),
    linear-gradient(75deg, transparent 0 48%, rgba(255,255,255,.03) 49%, transparent 52%),
    rgba(119, 180, 219, 0.08);
  transform: translateX(-50%) perspective(700px) rotateX(61deg);
  box-shadow: inset 0 0 90px rgba(1, 10, 19, 0.82);
}
.hero-line { position: absolute; top: 0; bottom: 0; width: 2px; opacity: .33; }
.hero-line.red { left: 50%; background: var(--red); }
.hero-line.blue { background: var(--blue-2); }
.hero-line.one { left: 31%; }.hero-line.two { right: 31%; }
.hero-circle { position: absolute; left: 50%; top: 50%; width: 140px; height: 140px; border: 2px solid rgba(255,64,95,.35); border-radius: 50%; transform: translate(-50%, -50%); }
.hero-net { position: absolute; left: 50%; top: 5%; width: 100px; height: 50px; border: 3px solid rgba(255,255,255,.22); border-radius: 8px 8px 45% 45%; transform: translateX(-50%); }

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, 870px);
  margin: 12vh auto 0;
  text-align: center;
}

.main-mark { display: grid; place-items: center; margin-bottom: 28px; }
.mark-puck {
  display: grid;
  width: 110px;
  height: 74px;
  place-items: center;
  border: 4px solid var(--blue);
  border-radius: 50%;
  background: linear-gradient(180deg, #1c314b 0%, #08111e 65%, #02070e 100%);
  box-shadow: inset 0 -14px 0 #02070e, 0 0 30px rgba(70,199,255,.22), 0 10px 22px rgba(0,0,0,.45);
  transform: rotate(-4deg);
}
.mark-puck b { font-size: 1.55rem; line-height: .8; letter-spacing: -.05em; }
.mark-puck span { margin-top: -19px; color: var(--blue); font-size: .63rem; font-weight: 1000; letter-spacing: .2em; }

.hero-content h1 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(2.55rem, 8vw, 5.15rem);
  font-style: italic;
  letter-spacing: .01em;
  line-height: .95;
  text-shadow: 0 6px 18px rgba(0,0,0,.45);
}
.hero-content h1 em { color: var(--blue); font-style: inherit; }
.hero-content > p { margin: 22px auto 0; max-width: 550px; color: #b7c5d6; font-size: clamp(1rem, 2vw, 1.15rem); line-height: 1.6; }
.eyebrow { display: flex; align-items: center; gap: 12px; max-width: 330px; margin: 37px auto 24px; color: var(--blue); font-size: .76rem; font-weight: 900; letter-spacing: .18em; }
.eyebrow::before, .eyebrow::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(70,199,255,.65)); }
.eyebrow::after { background: linear-gradient(90deg, rgba(70,199,255,.65), transparent); }

.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mode-card {
  position: relative;
  display: flex;
  min-height: 292px;
  padding: 25px 18px 18px;
  overflow: hidden;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(170, 201, 231, 0.35);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(25, 46, 70, .8), rgba(7, 16, 28, .92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 22px 45px rgba(0,0,0,.2);
}
.mode-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--card-accent, var(--blue)); box-shadow: 0 0 25px var(--card-accent, var(--blue)); }
.iq-card { --card-accent: #a56dff; }.duel-card { --card-accent: #ff526c; }
.mode-icon { display: grid; height: 76px; place-items: center; margin-bottom: 10px; }
.puck-stack { position: relative; width: 85px; }
.puck-stack i { position: absolute; width: 71px; height: 27px; border: 3px solid #78d8ff; border-radius: 50%; background: #07111e; box-shadow: inset 0 -9px 0 #02070d; }
.puck-stack i:nth-child(1){ top: 9px; transform: rotate(-7deg); }.puck-stack i:nth-child(2){ top: 24px; transform: rotate(4deg); }.puck-stack i:nth-child(3){ top: 39px; transform: rotate(-2deg); }
.brain-puck { width: 76px; height: 58px; border: 4px solid #b88cff; border-radius: 50%; color: #d8c6ff; background: #24143c; box-shadow: 0 0 25px rgba(165,109,255,.28); font-size: 1.4rem; font-weight: 1000; transform: rotate(3deg); }
.crossed-sticks { position: relative; width: 90px; }
.crossed-sticks i { position: absolute; width: 76px; height: 5px; border-radius: 4px; background: linear-gradient(90deg, #8e5b2d, #e6b676 70%, #e4edf4); }
.crossed-sticks i:first-child { transform: rotate(38deg); }.crossed-sticks i:nth-child(2) { transform: rotate(-38deg); }
.crossed-sticks b { position: relative; z-index: 2; margin-top: 42px; padding: 2px 7px; border-radius: 5px; background: #081321; color: #ff7288; font-style: italic; }
.mode-copy { flex: 1; }
.mode-copy span { color: var(--muted); font-size: .62rem; font-weight: 900; letter-spacing: .14em; }
.mode-copy h2 { margin: 6px 0; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(1.35rem, 3vw, 2.05rem); letter-spacing: .04em; }
.mode-copy p { margin: 0; color: #a9b8ca; font-size: .82rem; line-height: 1.35; }

.primary-button, .secondary-button, .spin-button {
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 1000;
  letter-spacing: .04em;
}
.primary-button {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  background: linear-gradient(180deg, #5bd0ff, #128bee 76%);
  color: #00101b;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.58), 0 5px 0 #07528e, 0 10px 22px rgba(4,95,157,.25);
}
.primary-button:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255,255,255,.35), 0 2px 0 #07528e; }
.secondary-button { min-height: 48px; padding: 12px 18px; border: 1px solid var(--line); background: #0d1b2c; color: white; }

.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 0;
  display: grid;
  width: min(100%, 980px);
  min-height: calc(83px + var(--safe-bottom));
  padding: 8px 10px var(--safe-bottom);
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid rgba(126, 162, 202, 0.22);
  background: rgba(4, 10, 22, 0.95);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}
.bottom-nav button { display: grid; place-items: center; gap: 4px; padding: 7px 2px; border: 0; border-radius: 14px; background: transparent; color: #71839b; cursor: pointer; }
.bottom-nav button i { font-size: 1.32rem; font-style: normal; line-height: 1; }
.bottom-nav button span { font-size: .58rem; font-weight: 900; letter-spacing: .03em; }
.bottom-nav .play-tab { margin-top: -24px; border: 1px solid rgba(142,219,255,.65); background: linear-gradient(180deg, #45c8ff, #126fce); color: #001421; box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 8px 25px rgba(24,128,210,.38); }
.bottom-nav .play-tab i { font-size: 1.55rem; color: #fff; }

/* Classic game */
.game-screen { padding-top: max(28px, env(safe-area-inset-top)); background: radial-gradient(circle at 50% 13%, rgba(30, 116, 182, .14), transparent 27%); }
.game-heading { display: grid; grid-template-columns: 52px 1fr 70px; align-items: center; gap: 17px; width: min(100%, 680px); margin: 0 auto 26px; }
.game-heading.compact { width: min(100%, 760px); margin-bottom: 40px; }
.back-button { font-size: 2.25rem; font-weight: 500; line-height: 1; }
.round-label { margin: 0 0 10px; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 1.1rem; letter-spacing: .04em; }
.progress-track { display: grid; grid-auto-flow: column; gap: 6px; }
.progress-track i { height: 6px; border-radius: 8px; background: #172538; transition: background .25s, box-shadow .25s; }
.progress-track i.done { background: var(--blue); box-shadow: 0 0 10px rgba(70,199,255,.44); }
.sound-button { justify-self: end; padding: 7px 5px; border: 0; background: transparent; color: #71869d; font-size: .58rem; font-weight: 900; cursor: pointer; }
.score-chip { justify-self: end; padding: 8px 10px; border: 1px solid #2b4565; border-radius: 10px; color: var(--blue); background: #0b1828; font-size: .76rem; }

.reel-zone { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: min(100%, 650px); margin: 0 auto 28px; }
.reel-card { position: relative; padding-top: 30px; border: 2px solid var(--accent); border-radius: 20px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, white 8%) 0 30px, #07111d 30px); box-shadow: 0 12px 26px rgba(0,0,0,.25), 0 0 22px color-mix(in srgb, var(--accent) 18%, transparent); overflow: hidden; }
.reel-card > span { position: absolute; top: 5px; left: 0; right: 0; color: #03121c; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: .96rem; letter-spacing: .05em; text-align: center; }
.team-reel { --accent: #43c8ff; }.era-reel { --accent: #a874ff; }
.reel-window { position: relative; display: grid; min-height: 108px; padding: 17px 9px 11px; place-content: center; border: 5px solid #263c57; border-radius: 14px; background: radial-gradient(ellipse at center, #263a55, #0b1523 68%); box-shadow: inset 0 0 0 3px #050b12, inset 0 0 30px rgba(0,0,0,.7); text-align: center; overflow: hidden; }
.reel-window::before, .reel-window::after { content: ""; position: absolute; top: 0; bottom: 0; width: 13px; background: linear-gradient(90deg, #06101c, var(--accent), #06101c); opacity: .85; }
.reel-window::before { left: 8px; }.reel-window::after { right: 8px; }
.reel-window strong { font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(2rem, 8vw, 3.35rem); line-height: 1; letter-spacing: .04em; text-shadow: 0 4px 1px #02060b, 0 0 22px rgba(255,255,255,.12); }
.era-reel .reel-window strong { font-size: clamp(1.35rem, 5.2vw, 2.25rem); letter-spacing: 0; white-space: nowrap; }
.reel-window small { margin-top: 7px; color: #92a6bd; font-size: .58rem; font-weight: 900; letter-spacing: .12em; }
.reel-window.is-spinning strong { animation: reelBlur .12s linear infinite; }
.reroll-button { display: flex; width: 100%; min-height: 46px; align-items: center; justify-content: space-between; padding: 8px 12px; border: 0; border-top: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 45%, #0b1420); cursor: pointer; }
.reroll-button b { font-size: .78rem; }.reroll-button span { padding: 4px 6px; border-radius: 6px; background: rgba(0,0,0,.2); font-size: .62rem; font-weight: 900; }
.reroll-button:disabled { color: rgba(255,255,255,.38); cursor: default; filter: saturate(.2); }

.lineup-panel { width: min(100%, 650px); margin: 0 auto; }
.lineup-title { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 9px; color: #8fa4bb; font-size: .65rem; font-weight: 950; letter-spacing: .13em; }
.lineup-title b { color: var(--blue); }
.hockey-rink { position: relative; height: 415px; overflow: hidden; border: 2px solid rgba(212, 236, 250, .25); border-radius: 42% 42% 24px 24px / 18% 18% 24px 24px; background: linear-gradient(105deg, transparent 0 38%, rgba(255,255,255,.035) 39%, transparent 41% 60%, rgba(255,255,255,.028) 61%, transparent 63%), radial-gradient(ellipse at 50% 30%, rgba(89, 180, 224, .16), transparent 58%), #0b1828; box-shadow: inset 0 0 65px rgba(0,0,0,.55); }
.rink-line { position: absolute; left: 0; right: 0; height: 2px; opacity: .55; }
.rink-line.center { top: 52%; background: var(--red); }.rink-line.blue { background: var(--blue-2); }.rink-line.blue.top { top: 27%; }.rink-line.blue.bottom { top: 76%; }
.faceoff-circle { position: absolute; width: 82px; height: 82px; border: 2px solid rgba(255,64,95,.28); border-radius: 50%; top: 40%; }.faceoff-circle.c1 { left: 8%; }.faceoff-circle.c2 { right: 8%; }
.goal-crease { position: absolute; left: 50%; bottom: 9px; width: 96px; height: 47px; border: 2px solid rgba(70,199,255,.45); border-radius: 80px 80px 8px 8px; background: rgba(33,143,203,.1); transform: translateX(-50%); }
.rink-goal { position: absolute; left: 50%; bottom: -2px; width: 68px; height: 26px; border: 3px solid rgba(255,64,95,.65); border-radius: 8px 8px 50% 50%; transform: translateX(-50%); }
.roster-slot { position: absolute; display: grid; width: 28%; max-width: 150px; min-height: 82px; place-items: center; padding: 8px 5px; border: 1px dashed rgba(177,215,241,.42); border-radius: 16px 16px 22px 22px; background: linear-gradient(180deg, rgba(29,50,75,.88), rgba(7,15,25,.9)); box-shadow: 0 9px 18px rgba(0,0,0,.25); color: white; cursor: pointer; transform: translate(-50%, -50%); }
.roster-slot::before { content: ""; position: absolute; top: -5px; width: 45%; height: 11px; border-radius: 50%; background: #334a63; }
.roster-slot .slot-position { position: absolute; z-index: 2; top: 6px; left: 8px; color: #9fdfff; font-size: .58rem; font-weight: 1000; letter-spacing: .1em; }
.roster-slot .slot-empty { font-size: 1.45rem; line-height: 1; }
.roster-slot.filled { min-height: 116px; padding: 6px 5px 7px; border-style: solid; border-color: rgba(70,199,255,.55); background: linear-gradient(180deg, #1b4160, #091727); }
.slot-copy { display: grid; width: 100%; min-width: 0; place-items: center; gap: 2px; }
.slot-copy b { display: -webkit-box; max-width: 100%; overflow: hidden; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(.67rem, 2.35vw, .9rem); letter-spacing: .02em; line-height: .98; text-align: center; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.slot-copy small { display: block; max-width: 100%; overflow: hidden; color: #9fb3c9; font-size: clamp(.43rem, 1.5vw, .54rem); font-weight: 850; line-height: 1.15; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.pos-lw { left: 21%; top: 22%; }.pos-c { left: 50%; top: 15%; }.pos-rw { left: 79%; top: 22%; }.pos-ld { left: 33%; top: 56%; }.pos-rd { left: 67%; top: 56%; }.pos-g { left: 50%; top: 84%; }

.spin-button { display: grid; width: min(100%, 650px); min-height: 90px; margin: 22px auto 0; place-content: center; border: 1px solid #7cddff; background: linear-gradient(180deg, #5cd4ff, #128bec 73%); color: #00131f; box-shadow: inset 0 3px 0 rgba(255,255,255,.5), 0 7px 0 #07588f, 0 16px 32px rgba(0,105,175,.28); }
.spin-button span { font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 2.4rem; font-style: italic; letter-spacing: .03em; line-height: 1; }
.spin-button small { margin-top: 7px; font-size: .58rem; font-weight: 950; letter-spacing: .15em; }
.spin-button:disabled { filter: grayscale(.75) brightness(.7); cursor: wait; }

.picker-panel { position: fixed; z-index: 42; left: 50%; bottom: 0; width: min(100%, 980px); max-height: 73dvh; padding: 12px 20px calc(22px + env(safe-area-inset-bottom)); overflow-y: auto; border-top: 2px solid var(--blue); border-radius: 25px 25px 0 0; background: #071221; box-shadow: 0 -28px 70px rgba(0,0,0,.62); transform: translateX(-50%); animation: sheetUp .3s ease-out; }
.picker-handle { width: 52px; height: 5px; margin: 0 auto 10px; border-radius: 8px; background: #30465f; }
.picker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.picker-head span { color: var(--blue); font-size: .64rem; font-weight: 950; letter-spacing: .14em; }.picker-head h2 { margin: 3px 0 0; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 1.5rem; letter-spacing: .05em; }.close-picker { font-size: 1.8rem; }
.picker-reroll-bar { position: sticky; z-index: 5; top: -12px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 0 -20px 14px; padding: 10px 20px 11px; border-top: 1px solid rgba(88,146,194,.16); border-bottom: 1px solid #203650; background: rgba(7,18,33,.97); box-shadow: 0 12px 20px rgba(1,7,14,.35); backdrop-filter: blur(14px); }
.picker-reroll { --reroll-accent: var(--blue); display: flex; min-height: 50px; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px 7px 12px; border: 1px solid color-mix(in srgb, var(--reroll-accent) 55%, #23364d); border-radius: 12px; background: linear-gradient(110deg, color-mix(in srgb, var(--reroll-accent) 18%, #0b1829), #0b1829); color: white; cursor: pointer; text-align: left; }
.picker-reroll.season { --reroll-accent: #a874ff; }
.picker-reroll span { display: grid; gap: 2px; }
.picker-reroll small { color: color-mix(in srgb, var(--reroll-accent) 78%, white); font-size: .5rem; font-weight: 950; letter-spacing: .12em; }
.picker-reroll b { font-size: .73rem; letter-spacing: .02em; }
.picker-reroll em { flex: 0 0 auto; padding: 5px 6px; border-radius: 7px; background: color-mix(in srgb, var(--reroll-accent) 22%, rgba(0,0,0,.35)); color: color-mix(in srgb, var(--reroll-accent) 82%, white); font-size: .58rem; font-style: normal; font-weight: 1000; }
.picker-reroll:disabled { cursor: default; filter: grayscale(.75); opacity: .42; }
.picker-tools { display: grid; grid-template-columns: minmax(150px, 1fr) auto auto; gap: 10px; margin-bottom: 14px; }
.search-box { display: flex; min-height: 47px; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid #253b57; border-radius: 12px; background: #0c192a; color: #7f93aa; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: white; font-size: 1rem; }.search-box input::placeholder { color: #64778f; }
.position-filters { display: flex; gap: 6px; }
.position-filters button { min-width: 45px; border: 1px solid #253b57; border-radius: 10px; background: #0c192a; color: #8499b1; font-size: .74rem; font-weight: 900; cursor: pointer; }
.position-filters button.active { border-color: var(--blue); background: #153659; color: #9bdeff; }
.picker-tools select { min-width: 76px; border: 1px solid #253b57; border-radius: 10px; padding: 0 8px; background: #0c192a; color: #cbd8e6; font-size: .76rem; font-weight: 900; }
.player-list { display: grid; gap: 10px; }
.player-card { display: grid; min-height: 86px; grid-template-columns: 58px minmax(126px, 1fr) auto; align-items: center; gap: 13px; padding: 9px 13px 9px 10px; border: 1px solid #263a56; border-radius: 17px; background: linear-gradient(110deg, #102039, #0c182a); color: white; cursor: pointer; text-align: left; transition: border-color .16s, transform .16s, background .16s; }
.player-card:hover { border-color: #4dbfe9; background: linear-gradient(110deg, #153052, #0d1b2e); transform: translateY(-1px); }
.player-ident { min-width: 0; }.player-ident b { display: block; overflow: hidden; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 1.12rem; letter-spacing: .025em; text-overflow: ellipsis; white-space: nowrap; }.player-ident span { color: #8ba1b9; font-size: .72rem; }.stat-row { display: grid; grid-auto-flow: column; gap: 14px; }.stat { text-align: center; }.stat span { display: block; margin-bottom: 3px; color: #7890a9; font-size: .59rem; font-weight: 950; letter-spacing: .05em; }.stat b { font-size: .94rem; }
.player-photo { position: relative; display: grid; flex: 0 0 auto; width: 58px; height: 58px; overflow: hidden; place-items: center; border: 1px solid rgba(104,190,232,.44); border-radius: 50%; background: radial-gradient(circle at 50% 28%, #274967, #0b1828 72%); box-shadow: inset 0 0 18px rgba(0,0,0,.28); }
.photo-fallback { color: #a8dfff !important; font-size: .78rem !important; font-weight: 1000 !important; letter-spacing: .04em !important; }
.player-headshot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; opacity: 0; transition: opacity .18s ease; }
.player-headshot.is-loaded { opacity: 1; }
.slot-photo { width: 54px; height: 54px; margin-top: 5px; border-color: rgba(135,215,249,.58); }
.detail-player-photo { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 12px; border: 1px solid #263b56; border-radius: 15px; background: #0d1c2e; }.detail-player-photo .detail-photo { width: 76px; height: 76px; }.detail-player-photo b { display: block; color: white; font-size: 1.15rem; }.detail-player-photo span:not(.player-photo):not(.photo-fallback) { display: block; margin-top: 4px; color: #8aa0b7; font-size: .74rem; }
.empty-list { padding: 32px; color: #8296ad; text-align: center; }

/* Quiz */
.iq-screen, .duel-screen { padding-top: max(28px, env(safe-area-inset-top)); background: radial-gradient(circle at 50% 22%, rgba(142,89,255,.16), transparent 32%); }
.quiz-stage { width: min(100%, 720px); margin: 3vh auto 0; text-align: center; }
.quiz-emblem { display: grid; width: 94px; height: 70px; margin: 0 auto 25px; place-items: center; border: 4px solid #ad7dff; border-radius: 50%; background: #22143a; color: #d9c6ff; box-shadow: 0 0 36px rgba(167,109,255,.26); font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 2rem; transform: rotate(-3deg); }
.quiz-kicker { color: #a67aff; font-size: .67rem; font-weight: 1000; letter-spacing: .18em; }
.quiz-stage h2 { margin: 12px auto 9px; max-width: 570px; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(2rem, 6vw, 3.45rem); line-height: 1.04; letter-spacing: .02em; }.quiz-stage > p { margin: 0; color: #91a4b9; }
.answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 32px; }
.answer-card { min-height: 134px; padding: 17px; border: 1px solid #2b3e59; border-radius: 18px; background: linear-gradient(145deg, #14243b, #091522); cursor: pointer; text-align: left; }
.answer-card span { color: #879bb1; font-size: .68rem; font-weight: 900; letter-spacing: .09em; }.answer-card strong { display: block; margin: 7px 0 14px; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 1.35rem; letter-spacing: .03em; }.answer-card b { color: var(--blue); font-size: 1.05rem; }.answer-card.correct { border-color: var(--green); background: linear-gradient(145deg, rgba(33,106,85,.8), #091b19); }.answer-card.wrong { border-color: var(--red); opacity: .66; }.answer-card:disabled { cursor: default; }.next-question { max-width: 330px; margin-top: 26px; }

/* Duel */
.duel-screen { background: radial-gradient(circle at 50% 24%, rgba(255,64,95,.12), transparent 34%); }
.duel-scoreboard { display: grid; grid-template-columns: 1fr 46px 1fr; align-items: center; gap: 12px; width: min(100%, 720px); margin: 0 auto 31px; }
.duel-team { min-height: 108px; padding: 16px; border: 1px solid #2a3d57; border-radius: 18px; background: #0c192a; text-align: center; }.duel-team.active { border-color: var(--blue); box-shadow: 0 0 25px rgba(70,199,255,.15); }.duel-team span { display: block; color: #8296ad; font-size: .63rem; font-weight: 950; letter-spacing: .14em; }.duel-team strong { display: block; margin: 3px 0; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 2.1rem; }.duel-team small { display: block; overflow: hidden; color: #91a4b9; font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }.versus { color: var(--red); font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 1.2rem; font-style: italic; text-align: center; }
.duel-draw { width: min(100%, 760px); margin: auto; text-align: center; }.duel-draw > span { color: #ff7085; font-size: .66rem; font-weight: 1000; letter-spacing: .14em; }.duel-draw h2 { margin: 8px 0 22px; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(1.8rem, 5vw, 2.8rem); }.duel-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }.duel-choice { min-height: 148px; padding: 16px; border: 1px solid #2b415e; border-radius: 18px; background: linear-gradient(145deg, #16263d, #0a1523); cursor: pointer; }.duel-choice:hover { border-color: var(--red); }.duel-choice b { display: block; color: #ff8b9c; font-size: .68rem; letter-spacing: .1em; }.duel-choice strong { display: block; margin: 8px 0; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 1.25rem; }.duel-choice span { color: #91a4b9; font-size: .76rem; }

/* Results */
.result-screen { position: relative; min-height: 100dvh; overflow: hidden; padding-top: max(46px, env(safe-area-inset-top)); background: radial-gradient(circle at 50% 23%, rgba(70,199,255,.22), transparent 38%), #040b14; text-align: center; }
.result-home { position: absolute; z-index: 3; top: max(22px, env(safe-area-inset-top)); right: 22px; font-size: 1.5rem; }
.result-burst { position: absolute; top: -15%; left: 50%; width: 620px; height: 620px; border-radius: 50%; background: repeating-conic-gradient(from 5deg, rgba(70,199,255,.12) 0 3deg, transparent 3deg 10deg); transform: translateX(-50%); mask-image: radial-gradient(circle, #000 0, transparent 68%); }
.result-content { position: relative; z-index: 1; width: min(100%, 690px); margin: 7vh auto 0; }
.result-kicker { color: var(--blue); font-size: .72rem; font-weight: 1000; letter-spacing: .2em; }.result-content h2 { margin: 7px 0 0; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(4.7rem, 16vw, 8rem); line-height: .92; letter-spacing: -.03em; text-shadow: 0 8px 35px rgba(0,0,0,.55); }.result-content h3 { margin: 15px 0 8px; color: #dff6ff; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(1.45rem, 5vw, 2.3rem); letter-spacing: .04em; }.result-content > p { margin: 0 auto; color: #9eb0c4; line-height: 1.5; }
.result-rating { display: inline-grid; min-width: 190px; margin: 27px auto 22px; padding: 14px 24px; border: 1px solid rgba(70,199,255,.45); border-radius: 18px; background: rgba(12,29,48,.86); box-shadow: 0 0 28px rgba(70,199,255,.12); }.result-rating span, .result-rating small { color: #849ab2; font-size: .58rem; font-weight: 950; letter-spacing: .14em; }.result-rating strong { color: var(--blue); font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 3.1rem; line-height: 1.05; }
.result-roster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }.result-player { display: grid; place-items: center; padding: 10px 7px; border: 1px solid #223750; border-radius: 12px; background: #0b1727; }.result-player > span:not(.player-photo) { display: block; margin-top: 4px; color: var(--blue); font-size: .55rem; font-weight: 1000; }.result-player b { display: block; max-width: 100%; overflow: hidden; margin: 3px 0; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }.result-player small { max-width: 100%; overflow: hidden; color: #7f95ad; font-size: .52rem; text-overflow: ellipsis; white-space: nowrap; }.result-photo { width: 48px; height: 48px; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }

/* Dialog and toast */
.app-dialog { width: min(calc(100% - 30px), 560px); max-height: 82dvh; padding: 0; border: 1px solid #2d4562; border-radius: 24px; background: #081523; color: white; box-shadow: var(--shadow); }.app-dialog::backdrop { background: rgba(0,5,12,.78); backdrop-filter: blur(6px); }.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 15px; border-bottom: 1px solid #1d3048; }.dialog-head span { color: var(--blue); font-size: .58rem; font-weight: 950; letter-spacing: .16em; }.dialog-head h2 { margin: 3px 0 0; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 1.8rem; letter-spacing: .04em; }.dialog-body { max-height: calc(82dvh - 90px); padding: 18px 20px 24px; overflow-y: auto; color: #b0c0d1; line-height: 1.55; }.dialog-body p:first-child { margin-top: 0; }.dialog-body h3 { margin: 24px 0 8px; color: white; font-size: .88rem; letter-spacing: .08em; }.dialog-body ol { padding-left: 21px; }.dialog-body li { margin-bottom: 9px; }.menu-list { display: grid; gap: 8px; }.menu-list button { display: flex; min-height: 52px; align-items: center; justify-content: space-between; padding: 0 15px; border: 1px solid #263b56; border-radius: 12px; background: #0d1c2e; color: white; cursor: pointer; text-align: left; }.menu-list button span { color: #8197ae; font-size: .75rem; }.stat-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 15px 0; }.stat-summary div { padding: 14px 9px; border: 1px solid #263b56; border-radius: 13px; background: #0d1c2e; text-align: center; }.stat-summary b { display: block; color: white; font-size: 1.3rem; }.stat-summary span { color: #8197ae; font-size: .61rem; font-weight: 900; letter-spacing: .08em; }.history-list { display: grid; gap: 8px; }.history-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 13px; border: 1px solid #243951; border-radius: 12px; background: #0c192a; }.history-row b { color: white; }.history-row span { color: var(--blue); font-weight: 950; }.danger-button { border-color: rgba(255,64,95,.55) !important; color: #ff8194 !important; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: 112px; max-width: calc(100% - 32px); padding: 12px 17px; border: 1px solid #3e5a78; border-radius: 12px; background: #102139; color: white; box-shadow: var(--shadow); font-size: .85rem; font-weight: 800; opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .2s, transform .2s; }.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes reelBlur { 0% { transform: translateY(-12px); filter: blur(2px); } 50% { transform: translateY(12px); filter: blur(4px); } 100% { transform: translateY(-12px); filter: blur(2px); } }
@keyframes sheetUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }

@media (min-width: 760px) {
  .screen { padding-inline: 42px; }
  .hero-content { margin-top: 10vh; }
  .mode-grid { gap: 22px; }
  .picker-panel { padding-inline: 40px; }
  .hockey-rink { height: 455px; }
  .game-screen { padding-bottom: 140px; }
}

@media (max-width: 620px) {
  .topbar { height: 82px; padding-inline: 18px; }
  .screen { padding: 88px 16px 110px; }
  .hero-content { margin-top: 8vh; }
  .main-mark { margin-bottom: 20px; }
  .mode-grid { gap: 8px; }
  .mode-card { min-height: 260px; padding: 20px 8px 13px; border-radius: 16px; }
  .mode-icon { transform: scale(.78); margin-bottom: 2px; }
  .mode-copy h2 { font-size: clamp(1.05rem, 5vw, 1.45rem); }
  .mode-copy p { display: none; }
  .mode-copy span { font-size: .49rem; }
  .mode-card .primary-button { min-height: 44px; padding-inline: 4px; font-size: .75rem; }
  .hero-content > p { font-size: .93rem; }
  .eyebrow { margin-top: 27px; }
  .game-screen, .iq-screen, .duel-screen { padding-top: max(19px, env(safe-area-inset-top)); }
  .game-heading { grid-template-columns: 45px 1fr 48px; gap: 10px; margin-bottom: 20px; }.game-heading .icon-button { width: 43px; height: 43px; }.round-label { font-size: .91rem; }.sound-button { font-size: .48rem; }
  .reel-zone { gap: 9px; }.reel-card { border-radius: 15px; }.reel-window { min-height: 92px; padding-inline: 4px; }.reel-window strong { font-size: clamp(1.8rem, 9vw, 2.6rem); }.reroll-button { padding-inline: 8px; }.reroll-button b { font-size: .68rem; }.reroll-button span { font-size: .5rem; }
  .hockey-rink { height: 390px; }.roster-slot { min-height: 73px; }.roster-slot.filled { min-height: 108px; }.slot-photo { width: 46px; height: 46px; }.spin-button { min-height: 79px; }.spin-button span { font-size: 2rem; }
  .picker-panel { padding-inline: 12px; max-height: 78dvh; }.picker-reroll-bar { margin-inline: -12px; padding-inline: 12px; }.picker-reroll { min-height: 47px; padding-inline: 8px; }.picker-reroll small { display: none; }.picker-reroll b { font-size: .63rem; }.picker-reroll em { font-size: .51rem; }.picker-tools { grid-template-columns: 1fr auto; }.search-box { grid-column: 1 / -1; }.position-filters button { min-width: 39px; }.player-card { grid-template-columns: 48px minmax(92px, 1fr) auto; gap: 7px; padding-left: 8px; }.list-photo { width: 48px; height: 48px; }.stat-row { gap: 7px; }.stat:nth-child(n+4) { display: none; }.stat b { font-size: .82rem; }.player-ident b { font-size: .98rem; }
  .answer-grid, .duel-options { grid-template-columns: 1fr; }.answer-card, .duel-choice { min-height: 105px; }.quiz-stage { margin-top: 1vh; }.quiz-emblem { margin-bottom: 17px; }.duel-scoreboard { grid-template-columns: 1fr 32px 1fr; }.duel-team { padding-inline: 8px; }
  .result-content { margin-top: 5vh; }.result-actions { grid-template-columns: 1fr; }.result-roster { gap: 6px; }.result-player { padding-inline: 5px; }
}

@media (max-width: 370px) {
  .screen { padding-inline: 11px; }
  .brand-button { font-size: .98rem; }.mini-puck { width: 38px; height: 28px; }
  .mode-grid { gap: 5px; }.mode-card { padding-inline: 5px; }.mode-copy h2 { font-size: 1rem; }.mode-card .primary-button { font-size: .68rem; }
  .hockey-rink { height: 370px; }.roster-slot { width: 29%; min-height: 68px; }.roster-slot.filled { min-height: 102px; }.slot-photo { width: 42px; height: 42px; }.picker-reroll b { font-size: .57rem; }.picker-reroll em { padding-inline: 4px; }.reel-window small { display: none; }
  .bottom-nav button span { font-size: .49rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
