@font-face { font-family: "EndZone"; src: url("/fonts/endzone.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "EndZone"; font-style: italic; src: url("/fonts/endzone-italic.otf") format("opentype"); font-display: swap; }

/* Night game under the northern lights. Square blocks, no slants. Spacing runs on one scale. */
:root {
  --night: #030b0f;
  --glass: rgba(9, 30, 38, .86);
  --glass-2: rgba(16, 48, 59, .9);
  --field: rgba(2, 12, 16, .9);
  --line: rgba(105, 189, 199, .22);
  --deep: #0e4752;
  --teal: #158fa3;
  --ice: #69bdc7;
  --frost: #dddedf;
  --aurora: #2bb66f;
  --aurora-hi: #5fe3a0;
  --gold: #e9b949;
  --loss: #e0705f;
  --text: #e8eff1;
  --dim: #8fb0b8;
  --display: "EndZone", "Barlow Condensed", Impact, sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --s1: 6px; --s2: 10px; --s3: 14px; --s4: 20px; --s5: 28px; --s6: 40px;
  --tap: 50px;
  --r: 4px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--night); color: var(--text); font: 500 16px/1.45 var(--body); }
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--ice); text-decoration: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font: italic 400 44px/.95 var(--display); text-transform: uppercase; text-shadow: 3px 3px 0 var(--deep); }
h2 { width: fit-content; margin-bottom: var(--s3); padding: 7px 12px 6px; background: var(--teal); color: #fff; border-radius: var(--r);
  font: italic 400 14px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; }
small { display: block; margin-top: 2px; color: var(--dim); font-size: 13px; font-weight: 500; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--aurora-hi); outline-offset: 2px; }

/* sky */
#sky { position: fixed; inset: 0 0 auto 0; width: 100%; height: 82vh; z-index: -4; filter: blur(9px) saturate(1.3); opacity: .85; pointer-events: none; transform: scale(1.12); }
body::before { content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none; background: linear-gradient(180deg, rgba(3, 11, 15, .1) 0%, rgba(3, 11, 15, .5) 45%, var(--night) 80%); }
body::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 46vh; z-index: -3; pointer-events: none; background: linear-gradient(180deg, #06181f, var(--night) 60%);
  clip-path: polygon(0 38%, 7% 26%, 13% 34%, 21% 12%, 28% 30%, 34% 22%, 41% 36%, 49% 8%, 56% 28%, 63% 18%, 70% 34%, 78% 14%, 85% 30%, 92% 20%, 100% 32%, 100% 100%, 0 100%); }
#snow { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
#snow i { position: absolute; top: -12px; border-radius: 50%; background: #fff; animation: fall linear infinite; }
@keyframes fall { to { transform: translate(var(--drift), 106vh); } }

/* frame */
#top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: calc(var(--s2) + env(safe-area-inset-top)) var(--s4) var(--s2); background: rgba(3, 11, 15, .84); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.brand-fox { height: 40px; }
.brand-word { height: 22px; min-width: 0; object-fit: contain; object-position: left; }
#sound-btn { flex: none; padding: 9px 14px 8px; background: var(--deep); color: #fff; border-radius: var(--r); font: italic 400 13px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; }
#sound-btn.live { background: var(--aurora); color: #03130b; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .7; } }
#main { max-width: 640px; margin: 0 auto; padding: var(--s5) var(--s4) calc(120px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--s6); }
#main > section, #main > form { display: flex; flex-direction: column; }
#nav { position: fixed; left: var(--s3); right: var(--s3); bottom: calc(var(--s3) + env(safe-area-inset-bottom)); z-index: 20; display: flex; gap: 4px; max-width: 600px; margin: 0 auto; padding: 5px;
  background: rgba(6, 24, 31, .94); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 8px; }
#nav a { flex: 1; display: grid; place-items: center; height: 46px; border-radius: var(--r); color: var(--dim); font: italic 400 12.5px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; transition: color .2s, background .2s; }
#nav a.on { background: var(--aurora); color: #03130b; animation: tab .3s cubic-bezier(.2, 1.4, .3, 1); }
@keyframes tab { from { transform: scale(.85); } }
.signed-out #nav, .signed-out #top { display: none; }

/* pages ease in once per visit to a screen */
#main.fresh > * { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
#main.fresh > *:nth-child(2) { animation-delay: .06s; }
#main.fresh > *:nth-child(3) { animation-delay: .12s; }
#main.fresh > *:nth-child(n + 4) { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.back { width: 100%; margin-bottom: var(--s1); font: 700 13px/1 var(--cond); letter-spacing: .1em; text-transform: uppercase; }
.back::before { content: "‹ "; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s3); }
.sec-head h2 { margin: 0; }
.muted { color: var(--dim); font-size: 14px; }
.center { text-align: center; }
.empty { color: var(--dim); text-align: center; padding: var(--s4) var(--s3); font-size: 15px; }
.gold { color: var(--gold); letter-spacing: 1px; }
.row { display: flex; align-items: center; gap: var(--s2); }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
section > .list + form, section > form + .list, section > .list + .list { margin-top: var(--s3); }
section > .muted { margin: var(--s3) 0 0; }
section > h2 + .muted { margin: 0 0 var(--s3); }

/* home */
.hero { position: relative; display: grid; gap: var(--s4); padding-top: var(--s2); }
.hero-fox { position: absolute; right: -70px; top: 0; height: 290px; z-index: 0; pointer-events: none; animation: prowl 7s ease-in-out infinite;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .7)) drop-shadow(0 0 30px rgba(21, 143, 163, .45)); }
@keyframes prowl { 50% { transform: translate(-8px, 10px) rotate(-2deg); } }
.record { position: relative; z-index: 1; display: flex; align-items: center; margin-left: -6px; font: italic 400 clamp(128px, 46vw, 230px)/.82 var(--display); letter-spacing: -.03em; color: #fff;
  text-shadow: 5px 5px 0 var(--deep), 10px 10px 0 rgba(21, 143, 163, .4), 0 0 60px rgba(43, 182, 111, .35); }
.record b { font-weight: 400; animation: slam .6s cubic-bezier(.2, 1.5, .3, 1) both; }
.record b:last-child { animation-delay: .12s; color: var(--ice); }
.record i { width: .18em; height: .09em; margin: 0 .06em; background: var(--aurora); box-shadow: 0 0 20px var(--aurora); }
@keyframes slam { from { transform: scale(2.4) translateY(-20px); opacity: 0; } }
.hero-facts { position: relative; z-index: 1; display: flex; gap: var(--s5); margin-top: var(--s2); }
.hero-facts dt { font: 700 11px/1 var(--cond); letter-spacing: .14em; text-transform: uppercase; color: var(--ice); margin-bottom: 4px; }
.hero-facts dd { font: italic 400 30px/1 var(--display); }
.marks { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.spark { width: 16px; height: 16px; fill: var(--gold); flex: none; vertical-align: -2px; }
.sparks { display: inline-flex; gap: 1px; margin-left: 4px; vertical-align: -2px; }
.mark { width: 26px; height: 26px; animation: pop .45s cubic-bezier(.2, 1.8, .4, 1) both; }
.mark:nth-child(2) { animation-delay: .06s; } .mark:nth-child(3) { animation-delay: .12s; } .mark:nth-child(4) { animation-delay: .18s; } .mark:nth-child(n + 5) { animation-delay: .24s; }
.mark.w { fill: var(--aurora-hi); filter: drop-shadow(0 0 6px rgba(95, 227, 160, .7)); }
.mark.l { fill: none; stroke: var(--loss); stroke-width: 1.5; }
i.mark { width: 8px; height: 8px; margin: 0 9px; background: var(--line); border-radius: 50%; }
@keyframes pop { from { transform: scale(0) rotate(-60deg); } }
.next-opp { font: italic 400 clamp(34px, 11vw, 56px)/.95 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.next-opp.long { font-size: clamp(24px, 7.4vw, 44px); }
.next-opp em, .game em, .sheet-body h2 em { font: 700 .42em/1 var(--cond); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); vertical-align: middle; margin-right: 4px; }
.game em { font-size: 12px; }

/* blocks */
.card, .panel { background: var(--glass); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: var(--r); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.card h2, .panel h2 { margin: 0 0 2px; }
.next, .finish { border-left-color: var(--aurora); }
.list { display: flex; flex-direction: column; gap: var(--s1); }
.game, .line, .player, .prospect, .off, .alert { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); }
.game { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 64px; padding: var(--s3) var(--s4) var(--s3) var(--s3); text-align: left; border-left: 5px solid var(--line); transition: transform .15s; }
.game.W { border-left-color: var(--aurora); background: linear-gradient(90deg, rgba(43, 182, 111, .2), var(--glass) 55%); }
.game.L { border-left-color: var(--loss); background: linear-gradient(90deg, rgba(224, 112, 95, .16), var(--glass) 55%); }
.game:active, .player a:active, a.line:active { transform: translateX(5px); }
.wk { font: 700 13px/1 var(--cond); letter-spacing: .08em; color: var(--dim); width: 30px; flex: none; }
.who { flex: 1; min-width: 0; font-weight: 600; }
.score { font: italic 400 23px/1 var(--display); white-space: nowrap; }
.score b { font-weight: 400; margin-right: 5px; }
.game.W .score b { color: var(--aurora-hi); }
.game.L .score b { color: var(--loss); }
.enter { padding: 9px 13px; border-radius: var(--r); background: var(--aurora); color: #03130b; font: 700 13px/1 var(--cond); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.rk { color: var(--gold); font-weight: 700; }
.tag { display: inline-block; margin-left: 6px; padding: 3px 6px; border-radius: 3px; background: var(--glass-2); color: var(--ice); font: 700 11px/1 var(--cond); font-style: normal; letter-spacing: .1em; text-transform: uppercase; vertical-align: 2px; }
.tag.rival { background: rgba(224, 112, 95, .2); color: #f3a092; }
.line { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 58px; padding: var(--s3) var(--s4); }
.line .val { font: italic 400 21px/1 var(--display); white-space: nowrap; color: #fff; }
.line .x { margin-right: -10px; }
.alert { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-left: 4px solid var(--ice); margin-bottom: var(--s1); }
.alert.warn { border-left-color: var(--gold); }
.log { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--dim); }
.log li { padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.log b { color: var(--text); }
.log time { float: right; font-size: 12px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: var(--s1); }
.stats div { padding: var(--s3) var(--s1); background: var(--glass); border: 1px solid var(--line); border-bottom: 3px solid var(--teal); border-radius: var(--r); text-align: center; }
.stats b { display: block; font: italic 400 28px/1 var(--display); color: #fff; }
.stats span { display: block; margin-top: 6px; font: 700 11px/1.2 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.stats.tight { grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); }
.stats.tight b { font-size: 22px; }
.stats.tight div { background: var(--field); padding: var(--s2) 2px; }

/* controls */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
  width: 100%; min-height: var(--tap); padding: 12px 14px; background: var(--field); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--aurora); box-shadow: 0 0 0 3px rgba(43, 182, 111, .25); }
input[type="file"] { font-size: 14px; color: var(--dim); }
textarea { resize: vertical; font-size: 15px; }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--ice) 50%), linear-gradient(135deg, var(--ice) 50%, transparent 50%);
  background-position: calc(100% - 19px) 22px, calc(100% - 14px) 22px; background-size: 5px 5px; background-repeat: no-repeat; }
input::placeholder, textarea::placeholder { color: #5f8189; }
.field { display: flex; flex-direction: column; gap: var(--s1); }
.field > span { font: 700 12px/1 var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.grid3 { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: var(--s2); }
.picker { width: auto !important; min-height: 42px !important; padding-top: 8px !important; padding-bottom: 8px !important; font-weight: 600; background-position: calc(100% - 19px) 18px, calc(100% - 14px) 18px !important; }
.inline { display: flex; gap: var(--s2); }
.inline input { flex: 1; min-width: 0; width: auto !important; }

.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 var(--s4); border: 0; border-radius: var(--r);
  background: #1c4755; color: var(--text); font: 700 15px/1 var(--cond); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; transition: transform .12s; }
.btn:active { transform: scale(.96); }
.btn.primary { background: linear-gradient(100deg, #1f9659, var(--aurora) 45%, var(--aurora-hi)); color: #03130b; }
.btn.primary::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); animation: shine 3.6s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn.small { min-height: 38px; padding: 0 var(--s3); font-size: 13px; }
.btn.wide { width: 100%; }
.btn.danger { background: rgba(224, 112, 95, .16); color: var(--loss); }
.btn.on { background: var(--aurora); color: #03130b; }
.btn.file { cursor: pointer; }
.btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.link { background: none; border: 0; padding: var(--s2) 0; color: var(--ice); font-size: 14px; text-align: center; }
.link.danger { color: var(--loss); }
.x { background: none; border: 0; color: var(--dim); width: 40px; height: 40px; font-size: 14px; flex: none; }

.seg { display: flex; gap: var(--s1); }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .seg.mini button { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 4px; border: 1px solid var(--line); border-radius: var(--r); background: var(--field);
  font: 700 14px/1 var(--cond); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); cursor: pointer; text-align: center; transition: background .15s, color .15s; }
.seg input:checked + span, .seg.mini button.on { background: var(--aurora); border-color: var(--aurora); color: #03130b; }
.seg input:focus-visible + span { outline: 2px solid var(--aurora-hi); outline-offset: 2px; }
.seg.mini button { flex: 1; min-height: 40px; font-size: 13px; }
.depart .seg { flex-wrap: wrap; }
.depart .seg label { flex: 1 1 22%; }
.check { display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); cursor: pointer; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--aurora); flex: none; }
details summary { color: var(--ice); cursor: pointer; padding: var(--s2) 0; font-size: 14px; }
details[open] { display: flex; flex-direction: column; gap: var(--s3); }

.add { gap: var(--s3); }
.add-top { display: flex; gap: var(--s2); }
.add-top input:not(.wk-in) { flex: 1; min-width: 0; width: auto !important; }
.add-top .wk-in { width: 66px !important; text-align: center; flex: none; padding-left: 4px !important; padding-right: 4px !important; }
.add-top select { width: 112px !important; flex: none; }
.add-row { display: flex; gap: var(--s3); align-items: center; }
.add-row > * { flex: 1; }
.add-row > input, .add-row > select { width: auto !important; min-width: 0; }
.add-row .check { flex: none; }
form:has(select[name="type"] option[value="regular"]:checked) .post-label { display: none; }
form:has(select[name="kind"] option:not([value="player"]):checked) .award-player { display: none; }
.if-pro, .if-transfer { display: none; }
.depart:has(input[value="pro"]:checked) .if-pro, .depart:has(input[value="transferred"]:checked) .if-transfer { display: flex; flex-direction: column; gap: var(--s2); }

.scoreline { display: flex; gap: var(--s2); align-items: flex-end; }
.scoreline label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--s1); }
.scoreline label span { font: 700 12px/1 var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scoreline input { font: italic 400 30px/1 var(--display) !important; text-align: center; min-height: 62px !important; padding: 4px !important; }
.scoreline .btn { min-height: 62px; }
.scoreline.tall input { min-height: 80px !important; font-size: 42px !important; }

/* protected numbers: just the numbers. Dim outline while open, lit once earned. */
.nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: var(--s2); }
.num { display: grid; justify-items: center; gap: var(--s2); padding: var(--s4) var(--s1) var(--s3); background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); text-align: center; color: var(--dim); transition: transform .15s; }
.num:active { transform: scale(.96); }
.num b { font: italic 400 clamp(54px, 17vw, 76px)/.9 var(--display); color: transparent; -webkit-text-stroke: 1.5px rgba(105, 189, 199, .45); }
.num span { font: 700 12px/1.2 var(--cond); letter-spacing: .08em; text-transform: uppercase; }
.num.held { border-color: var(--aurora); background: linear-gradient(180deg, rgba(14, 71, 82, .95), rgba(8, 36, 44, .95)); color: var(--text); }
.num.held b, .big-no, .sacred-n { -webkit-text-stroke: 0; color: transparent !important; text-shadow: none !important;
  background: linear-gradient(110deg, #5fe3a0, #69bdc7 30%, #ffffff 50%, #2bb66f 70%, #5fe3a0) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; animation: aurora-text 5s linear infinite; }
@keyframes aurora-text { to { background-position: 300% 0; } }
.lineage-head { display: grid; justify-items: center; gap: var(--s2); text-align: center; }
.big-no { font: italic 400 clamp(170px, 58vw, 300px)/.85 var(--display); padding-right: .08em; }

/* roster */
.row.gap .search { flex: 1; width: auto !important; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--s4) * -1); padding: 0 var(--s4) 4px; scrollbar-width: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 38px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r); background: var(--field); color: var(--dim);
  font: 700 13px/1 var(--cond); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; transition: background .15s, color .15s; }
.chip.on { background: var(--aurora); border-color: var(--aurora); color: #03130b; }
.chip .x { width: 26px; height: 26px; margin-right: -8px; color: inherit; }
.player { display: flex; align-items: stretch; }
.player a { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: var(--s2) var(--s2) var(--s2) var(--s3); color: var(--text); transition: transform .15s; }
.player.gone { opacity: .5; }
.no { font: italic 400 28px/1 var(--display); width: 46px; text-align: center; flex: none; color: var(--frost); }
.ovr { font: italic 400 20px/1 var(--display); color: var(--ice); }
.star-btn { width: 56px; background: none; border: 0; border-left: 1px solid var(--line); display: grid; place-items: center; }
.star-btn .spark { width: 24px; height: 24px; fill: none; stroke: #3d6474; stroke-width: 1.5; transition: transform .2s; }
.star-btn.on .spark { fill: var(--gold); stroke: var(--gold); filter: drop-shadow(0 0 8px rgba(233, 185, 73, .7)); animation: pop .4s cubic-bezier(.2, 2, .4, 1); }

/* player card */
.pcard { position: relative; overflow: hidden; min-height: 230px; padding: var(--s4); display: flex; align-items: flex-end; border: 1px solid var(--line); border-left: 6px solid var(--teal); border-radius: var(--r);
  background: linear-gradient(155deg, #17414e, #071c23 75%); }
.pcard.star { border-left-color: var(--gold); background: linear-gradient(155deg, #4a4420, #071c23 70%); }
.pcard.legend { border-left-color: var(--aurora); background: linear-gradient(155deg, #0f6b4a, #071c23 70%); }
.pcard.star::before, .pcard.legend::before, .trophy.ours::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(104deg, transparent 40%, rgba(255, 255, 255, .2) 50%, transparent 60%) 0 0 / 300% 100%; animation: sweep 4.5s ease-in-out infinite; }
@keyframes sweep { 0%, 55% { background-position: 130% 0; } 100% { background-position: -60% 0; } }
.pcard-fox { position: absolute; right: -30px; bottom: -40px; height: 240px; opacity: .1; animation: prowl 8s ease-in-out infinite; }
.pcard-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .4; }
.pcard-no { position: absolute; right: var(--s3); top: -10px; font: italic 400 160px/1 var(--display); color: transparent; -webkit-text-stroke: 2px rgba(221, 222, 223, .28); padding-right: .08em; }
.pcard-info { position: relative; z-index: 2; display: flex; flex-direction: column; gap: var(--s1); }
.pcard h1 { font-size: clamp(34px, 10vw, 54px); }
.pcard-tier { font: 700 13px/1 var(--cond); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.pcard.legend .pcard-tier { color: var(--aurora-hi); }
.pcard .left { color: #f3a092; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: calc(var(--s4) * -1); }
.actions .btn { flex: 1 1 auto; }

.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { font: 700 12px/1 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); text-align: left; padding: var(--s2) var(--s3); }
.table td { padding: var(--s3); border-top: 1px solid var(--line); }
.table-wrap, section > .table { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); }
.table-wrap { overflow-x: auto; }
.compare th:first-child { position: sticky; left: 0; background: #0b242d; text-transform: none; letter-spacing: 0; font: 500 14px/1.2 var(--body); color: var(--text); white-space: nowrap; }
.compare td, .compare thead th:not(:first-child) { text-align: center; white-space: nowrap; }
.compare td { font: italic 400 18px/1 var(--display); }
.compare thead th:not(:first-child) { color: var(--ice); }
.compare td:last-child { color: var(--aurora-hi); }

.tabs { display: flex; gap: var(--s1); }
.tabs button { flex: 1; min-height: 46px; border: 1px solid var(--line); border-radius: var(--r); background: var(--field); color: var(--dim); font: 700 14px/1 var(--cond); letter-spacing: .06em; text-transform: uppercase; }
.tabs button.on { background: var(--aurora); border-color: var(--aurora); color: #03130b; }
.prospect { padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.prospect.lost { opacity: .5; }
.prospect.signed { border-left: 4px solid var(--aurora); }
.p-top { display: flex; justify-content: space-between; align-items: flex-start; }
.p-top .x { margin: -8px -10px 0 0; }
.off { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); }
.off .who { flex: 1 1 45%; }
.off select { width: 150px !important; flex: none; }
.off input { width: 100% !important; }
.off.leaving { border-left: 4px solid var(--gold); }

/* trophy case */
.case { display: grid; gap: var(--s3); }
.trophy { position: relative; overflow: hidden; display: flex; gap: var(--s4); align-items: center; padding-right: var(--s4); background: #0a0a0a; border: 1px solid #3a3320; border-radius: var(--r); color: var(--text); }
.trophy img, .trophy-blank { width: 120px; height: 170px; object-fit: cover; flex: none; filter: grayscale(.9) brightness(.55); }
.trophy-blank { display: grid; place-items: center; background: #151515; color: #444; font: 400 60px var(--display); }
.trophy.ours { border-color: var(--gold); box-shadow: 0 0 34px rgba(233, 185, 73, .2); }
.trophy.ours img { filter: none; animation: glint 3.5s ease-in-out infinite; }
@keyframes glint { 50% { filter: brightness(1.25) saturate(1.2); } }
.trophy h3 { font: italic 400 24px/1.05 var(--display); text-transform: uppercase; color: var(--gold); margin-bottom: var(--s1); }
.trophy .holder { font: 700 13px/1.2 var(--cond); letter-spacing: .1em; text-transform: uppercase; margin: var(--s1) 0 2px; color: var(--dim); }
.trophy.ours .holder { color: var(--aurora-hi); }
.photo { width: 100%; border-radius: var(--r); border: 1px solid var(--line); }
.photo.trophy { max-width: 220px; margin: 0 auto; padding: 0; display: block; }

/* sounds */
.td-btn { position: relative; overflow: hidden; width: 100%; min-height: 116px; border: 0; border-radius: var(--r); color: #03130b; font: italic 400 clamp(38px, 12vw, 68px)/1 var(--display); text-transform: uppercase;
  background: linear-gradient(100deg, #1f9659, var(--aurora) 40%, #b9ffd9 50%, var(--aurora) 60%, #1f9659) 0 0 / 250% 100%; animation: aurora-text 3s linear infinite, throb 1.8s ease-in-out infinite; }
@keyframes throb { 50% { transform: scale(1.02); } }
.td-btn:active { transform: scale(.95); animation: none; }
.pads { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.pad { min-height: 96px; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-bottom: 4px solid var(--teal); border-radius: var(--r); background: var(--glass); color: var(--text); text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; transition: transform .12s; }
.pad:active { transform: scale(.95); }
.pad b { font: italic 400 20px/1 var(--display); text-transform: uppercase; }
.pad span { font: 700 12px/1 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.pad.live { background: var(--aurora); border-color: var(--aurora); border-bottom-color: #0b5a34; color: #03130b; animation: pulse 1s ease-in-out infinite; }
.pad.live span { color: #03130b; }
.pad.stop { border-bottom-color: var(--loss); }

/* sign in */
.auth { min-height: calc(100dvh - 80px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s4); }
.auth-crest { width: 190px; filter: drop-shadow(0 14px 40px rgba(21, 143, 163, .5)); animation: prowl 6s ease-in-out infinite; }
.auth-ftf { width: 190px; }
.auth .card { width: 100%; max-width: 380px; }

/* entry */
#gate { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: var(--s5); text-align: center; transition: opacity .7s, transform .7s; overflow: hidden;
  background: radial-gradient(90% 55% at 50% -5%, rgba(43, 182, 111, .5), transparent 70%), radial-gradient(70% 45% at 10% 5%, rgba(21, 143, 163, .55), transparent 70%),
    radial-gradient(70% 45% at 95% 0%, rgba(105, 189, 199, .3), transparent 70%), #020809; background-size: 160% 160%; animation: drift 9s ease-in-out infinite alternate; }
@keyframes drift { from { background-position: 0% 0%; } to { background-position: 100% 30%; } }
#gate.on { display: grid; }
#gate.out { opacity: 0; transform: scale(1.12); pointer-events: none; }
.gate-in { display: grid; justify-items: center; gap: var(--s3); width: 100%; max-width: 360px; margin-top: -6vh; }
.gate-fox { width: min(62vw, 250px); filter: drop-shadow(0 0 50px rgba(95, 227, 160, .55)) drop-shadow(0 20px 40px rgba(0, 0, 0, .7)); animation: emerge 1.4s cubic-bezier(.2, 1.2, .3, 1) both, prowl 6s 1.4s ease-in-out infinite; }
@keyframes emerge { from { transform: scale(.4) translateY(40px); opacity: 0; filter: blur(14px) brightness(2); } }
.gate-ftf { width: min(74vw, 310px); margin-top: var(--s2); animation: rise .8s .7s both; }
.gate-in p { font: italic 400 15px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--frost); animation: rise .8s .95s both; }
.gate-in .btn { width: 100%; min-height: 60px; margin-top: var(--s4); font-size: 18px; animation: rise .8s 1.2s both; }
.gate-in .link { animation: rise .8s 1.4s both; }
#gate.playing { padding: 0; background: #dfe6e8; animation: none; }
#gate video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#gate .skip { position: absolute; right: var(--s4); bottom: calc(var(--s4) + env(safe-area-inset-bottom)); color: #0e4752; font-weight: 700; }

/* sheet and toast */
#sheet { position: fixed; inset: 0; z-index: 40; display: none; }
#sheet.open { display: block; }
.sheet-back { position: absolute; inset: 0; background: rgba(2, 9, 12, .74); backdrop-filter: blur(3px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet-body { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow-y: auto; margin: 0 auto; max-width: 640px; background: #0a242d; border-top: 5px solid var(--aurora); border-radius: 10px 10px 0 0;
  padding: var(--s5) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom)); animation: up .26s cubic-bezier(.2, .9, .2, 1); }
.sheet-body, .sheet-body form { display: flex; flex-direction: column; gap: var(--s3); }
.sheet-body h2 { width: auto; margin: 0; padding: 0 48px 0 0; background: none; font: italic 400 26px/1.05 var(--display); letter-spacing: 0; }
.sheet-x { position: absolute; right: var(--s2); top: var(--s3); width: 44px; height: 44px; background: none; border: 0; color: var(--dim); font-size: 18px; }
.review { max-height: 46dvh; overflow-y: auto; }
@keyframes up { from { transform: translateY(60px); opacity: 0; } }
#toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 95; opacity: 0; pointer-events: none; max-width: 90vw; text-align: center;
  padding: 12px 20px; border-radius: var(--r); background: var(--aurora); color: #03130b; font-weight: 700; transition: .22s cubic-bezier(.2, 1.4, .3, 1); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--loss); color: #200905; }

/* big moments */
#fx { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; text-align: center; overflow: hidden; cursor: pointer;
  background: radial-gradient(90% 60% at 50% 40%, rgba(43, 182, 111, .42), transparent 70%), rgba(2, 9, 12, .92); }
#fx.on { display: grid; animation: fade .25s; }
#fx.out { opacity: 0; transition: opacity .35s; }
#fx.win::before { content: ""; position: absolute; inset: 0; background: #eafff4; animation: flash .7s ease-out forwards; pointer-events: none; }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }
.fx-card { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: var(--s1); padding: 0 var(--s3); }
#fx.win .fx-card { animation: shake .5s .28s; }
@keyframes shake { 20% { transform: translate(-9px, 5px) rotate(-1deg); } 40% { transform: translate(8px, -6px) rotate(1deg); } 60% { transform: translate(-5px, 3px); } 80% { transform: translate(4px, -2px); } }
.fx-fox { width: min(44vw, 220px); margin-bottom: -10px; filter: drop-shadow(0 0 40px rgba(95, 227, 160, .8)); animation: slam .55s cubic-bezier(.2, 1.4, .3, 1) both, prowl 3s .6s ease-in-out infinite; }
.fx-big { display: block; font: italic 400 clamp(62px, 20.5vw, 180px)/.82 var(--display); text-transform: uppercase; letter-spacing: -.02em; color: #fff;
  text-shadow: 5px 5px 0 var(--deep), 10px 10px 0 rgba(21, 143, 163, .5), 0 0 80px rgba(95, 227, 160, .7); animation: slam .5s cubic-bezier(.2, 1.6, .3, 1) both; }
.fx-big.s2 { animation-delay: .16s; color: var(--aurora-hi); }
.fx-score { margin-top: var(--s3); font: italic 400 clamp(60px, 18vw, 120px)/1 var(--display); color: #fff; animation: slam .5s .4s cubic-bezier(.2, 1.6, .3, 1) both; }
.fx-score i { font-style: normal; color: var(--aurora); margin: 0 6px; }
.fx-card small { margin-top: var(--s2); font: italic 400 17px/1.3 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--frost); animation: rise .5s .6s both; }
.fx-card em { margin-top: var(--s3); padding: 9px 16px 8px; border-radius: var(--r); background: var(--gold); color: #1c1400; font: italic 400 15px/1 var(--display); text-transform: uppercase; animation: rise .5s .8s both; }
#fx.loss { background: rgba(4, 12, 18, .95); }
#fx.loss .fx-score { color: transparent; -webkit-text-stroke: 2px #9fc6d6; animation: rise .8s both; }
.fx-name { font: italic 400 clamp(44px, 13vw, 100px)/.9 var(--display); text-transform: uppercase; color: #fff; text-shadow: 4px 4px 0 var(--deep); animation: slam .5s .25s cubic-bezier(.2, 1.6, .3, 1) both; }
.fx-spark { width: 130px; height: 130px; fill: var(--aurora-hi); filter: drop-shadow(0 0 40px rgba(95, 227, 160, .9)); animation: spin-in .7s cubic-bezier(.2, 1.4, .3, 1) both; }
#fx.gold { background: radial-gradient(90% 60% at 50% 40%, rgba(233, 185, 73, .38), transparent 70%), rgba(2, 9, 12, .92); }
#fx.gold .fx-spark { fill: var(--gold); filter: drop-shadow(0 0 40px rgba(233, 185, 73, .9)); }
#fx.gold .fx-name { text-shadow: 4px 4px 0 #5b430a; }
.fx-sparks { display: flex; align-items: center; gap: 4px; }
.fx-sparks .spark { width: 64px; height: 64px; fill: var(--aurora-hi); animation: spin-in .7s .2s cubic-bezier(.2, 1.4, .3, 1) both; }
.fx-sparks .fx-spark { width: 130px; height: 130px; animation-delay: 0s; }
@keyframes spin-in { from { transform: scale(0) rotate(-200deg); } }
.fx-number b { display: block; padding-right: .08em; font: italic 400 clamp(170px, 56vw, 280px)/.85 var(--display); color: transparent;
  background: linear-gradient(110deg, #5fe3a0, #69bdc7 30%, #ffffff 50%, #2bb66f 70%, #5fe3a0) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text;
  animation: drop .7s cubic-bezier(.3, 1.4, .4, 1) both, aurora-text 3s linear infinite; }
@keyframes drop { from { transform: translateY(-100vh); } }
#fx-burst { position: absolute; left: 50%; top: 42%; z-index: 1; }
#fx-burst i { position: absolute; border-radius: 50%; }
#fx-burst i:nth-child(3n) { border-radius: 0; }

@media (min-width: 700px) { .hero-fox { right: -10px; height: 340px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
#main > .hero, #main > .lineage-head { display: grid; }
#main > .pcard { flex-direction: row; }
#gate { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.gate-in p { font-size: 13px; letter-spacing: .06em; }
#nav a { font: 700 13px/1 var(--cond); letter-spacing: .07em; }
.num b { font-size: clamp(46px, 14vw, 68px); padding-right: .12em; }
#main { gap: 32px; }
.row.gap + .chips { margin-top: -16px; }
.chips + .list { margin-top: -14px; }
.stats + section, .page-head + .stats { margin-top: -8px; }
.fx-big { font-size: clamp(58px, 19vw, 180px); padding-right: .06em; }

/* phone fixes */
html, body { overflow-x: clip; }
* { -webkit-tap-highlight-color: transparent; }
textarea, input, select { font-size: 16px !important; }
.scoreline input { font-size: 30px !important; }
.scoreline.tall input { font-size: 42px !important; }
.pcard-info { min-width: 0; max-width: 100%; }
.pcard h1, .fx-name, h1 { overflow-wrap: anywhere; }
.pcard h1.long { font-size: clamp(26px, 7.4vw, 40px); }
.who { overflow-wrap: anywhere; }
.chip .x { width: 38px; height: 38px; margin-right: -12px; }
#top { padding-left: max(var(--s4), env(safe-area-inset-left)); padding-right: max(var(--s4), env(safe-area-inset-right)); }

/* gem or bust */
.gem { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; font: 700 11px/1 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--aurora-hi); vertical-align: 1px; }
.gem svg { width: 15px; height: 12px; fill: var(--aurora); stroke: var(--frost); stroke-width: 7; stroke-linejoin: round; }
.gem .facet { fill: none; stroke-width: 5; }
.gem.bust { color: var(--loss); }
.gem.bust svg { fill: #3a2a28; stroke: var(--loss); }
.scout { display: flex; align-items: center; gap: var(--s1); }
.scout span { flex: 1; font: 700 12px/1 var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.scout button { min-width: 84px; min-height: 40px; border: 1px solid var(--line); border-radius: var(--r); background: var(--field); color: var(--dim); font: 700 13px/1 var(--cond); letter-spacing: .06em; text-transform: uppercase; }
.scout button.on.gem { margin: 0; background: var(--aurora); border-color: var(--aurora); color: #03130b; }
.scout button.on.bust { margin: 0; background: var(--loss); border-color: var(--loss); color: #200905; }
.stats.tight { grid-template-columns: repeat(3, 1fr); }
