@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800;900&family=Noto+Sans+SC:wght@400;500;600;700;900&display=swap');

:root {
  --ink: #07100d;
  --panel: #0c1a15;
  --panel-2: #11241c;
  --line: rgba(220, 238, 216, .14);
  --line-strong: rgba(220, 238, 216, .28);
  --text: #ecf2e8;
  --muted: #91a197;
  --acid: #d7ff45;
  --orange: #ff7849;
  --pitch: #1c6b45;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Noto Sans SC', sans-serif;
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); color-scheme: dark; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 72% 8%, rgba(42, 121, 78, .24), transparent 31rem), var(--ink); color: var(--text); font-family: var(--body); }
button, select, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.grain { position: fixed; inset: 0; pointer-events: none; opacity: .18; z-index: 10; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E"); mix-blend-mode: soft-light; }
.app-shell { min-height: calc(100vh - 42px); display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.rail { position: sticky; top: 0; height: 100vh; padding: 32px 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: rgba(5, 14, 11, .72); backdrop-filter: blur(18px); z-index: 5; }
.brand { display: flex; align-items: center; gap: 15px; text-decoration: none; }
.brand-mark { font: 900 44px/.78 var(--display); letter-spacing: -3px; color: var(--acid); }
.brand-mark span { color: var(--text); font-weight: 500; }
.brand-copy { font: 700 10px/1.25 var(--display); letter-spacing: 2px; color: var(--muted); }
.rail-status { margin: 56px 0 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.status-number { display: block; font: 800 62px/.8 var(--display); letter-spacing: -3px; }
.status-number small { font-size: 20px; letter-spacing: 0; color: var(--muted); }
.status-label { margin-top: 12px; display: block; color: var(--muted); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; }
.rail-nav { display: grid; gap: 3px; }
.rail-step { padding: 11px 0; display: flex; gap: 11px; align-items: center; color: #627168; font: 600 12px var(--body); }
.rail-step i { width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%; }
.rail-step.done { color: var(--muted); }
.rail-step.done i { background: currentColor; }
.rail-step.active { color: var(--acid); }
.rail-step.active i { background: var(--acid); box-shadow: 0 0 16px rgba(215,255,69,.7); }
.rail-foot { margin-top: auto; color: #627168; font: 700 10px/1.5 var(--display); letter-spacing: 1.6px; }
.rail-foot span { font-weight: 500; }
main { min-width: 0; padding: 44px clamp(28px, 5vw, 78px) 80px; outline: none; }
.page { max-width: 1260px; margin: 0 auto; animation: enter .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--acid); font: 700 11px var(--body); letter-spacing: 2px; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 26px; height: 2px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 12px 0 14px; max-width: 960px; font: 800 clamp(54px, 8vw, 116px)/.82 var(--display); letter-spacing: -4px; text-transform: uppercase; }
h1 .outline { color: transparent; -webkit-text-stroke: 1px rgba(236,242,232,.58); }
h2 { font: 800 clamp(34px, 4.5vw, 64px)/.9 var(--display); letter-spacing: -1.5px; }
h3 { font: 700 23px/1.05 var(--display); letter-spacing: -.3px; }
.lede { max-width: 660px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.hero { min-height: 34vh; display: flex; flex-direction: column; justify-content: flex-end; padding: 44px 0 36px; position: relative; }
.hero-ball { position: absolute; right: 3%; top: 0; width: min(24vw, 250px); aspect-ratio: 1; border: 1px solid var(--line-strong); border-radius: 50%; opacity: .5; }
.hero-ball::before, .hero-ball::after { content: ''; position: absolute; inset: 14%; border: 1px solid var(--line); border-radius: 50%; }
.hero-ball::after { inset: 35%; background: var(--acid); border: 0; border-radius: 4px; transform: rotate(45deg); box-shadow: 0 0 70px rgba(215,255,69,.3); }
.quick-grid, .choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quick-card, .choice-card, .panel { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(18,41,31,.82), rgba(9,21,17,.9)); box-shadow: var(--shadow); }
.quick-card { min-height: 216px; padding: 25px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.quick-card::after { content: attr(data-index); position: absolute; right: -8px; bottom: -28px; color: rgba(236,242,232,.035); font: 900 128px var(--display); }
.quick-card.accent { background: var(--acid); color: #10170d; }
.quick-card.accent .meta, .quick-card.accent p { color: #42501d; }
.shared-run { margin-bottom: 12px; padding: 24px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px 20px; border-color: rgba(215,255,69,.45); }
.shared-run h3, .shared-run p { margin: 0; }
.shared-run p { color: var(--muted); font-size: 11px; }
.shared-run .primary { grid-row: 1 / span 3; grid-column: 2; }
.meta { color: var(--muted); font: 700 10px var(--body); letter-spacing: 1.4px; text-transform: uppercase; }
.quick-card h3 { margin: auto 0 9px; font-size: 34px; }
.quick-card p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.text-button, .primary, .ghost, .chip, .candidate, .slot, .choice-card { border: 0; cursor: pointer; transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease; }
.text-button { align-self: flex-start; padding: 0; background: transparent; color: inherit; font: 800 12px var(--body); letter-spacing: .8px; }
.text-button::after { content: ' →'; color: var(--acid); }
.accent .text-button::after { color: #10170d; }
.primary, .ghost { min-height: 52px; padding: 0 22px; border: 1px solid var(--acid); background: var(--acid); color: #10170d; font-weight: 800; }
.ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.primary:hover, .ghost:hover, .choice-card:hover, .candidate:hover, .slot:hover { transform: translateY(-2px); }
.section-head { margin: 70px 0 22px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-head h2 { margin: 0; }
.setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.field { padding: 22px; background: var(--panel); }
.field.wide { grid-column: 1 / -1; }
.field-label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { min-height: 38px; padding: 8px 13px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 12px; }
.chip.active { border-color: var(--acid); background: rgba(215,255,69,.08); color: var(--acid); }
.toggle { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 8px 0; }
.toggle input { width: 44px; height: 24px; accent-color: var(--acid); }
.action-row { margin-top: 16px; display: flex; gap: 10px; justify-content: flex-end; }
.topbar { margin-bottom: 34px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.topbar h2 { margin: 8px 0 0; }
.progress-ring { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--acid) var(--progress), var(--line) 0); position: relative; }
.progress-ring::before { content: ''; position: absolute; inset: 7px; background: var(--ink); border-radius: 50%; }
.progress-ring span { z-index: 1; font: 800 29px var(--display); }
.draft-grid { display: grid; grid-template-columns: minmax(270px, .9fr) minmax(360px, 1.5fr) minmax(300px, 1fr); gap: 12px; align-items: start; }
.candidate-panel, .lineup-panel { scroll-margin-top: 16px; }
.panel { padding: 22px; }
.condition { min-height: 210px; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(165deg, rgba(37,112,71,.45), rgba(9,21,17,.95)); position: relative; overflow: hidden; }
.condition::before { content: ''; position: absolute; width: 250px; height: 250px; right: -100px; top: -90px; border: 1px solid rgba(236,242,232,.12); border-radius: 50%; box-shadow: inset 0 0 0 35px rgba(236,242,232,.025), inset 0 0 0 70px rgba(236,242,232,.025); }
.condition h3 { margin: 7px 0; font-size: 39px; max-width: 240px; }
.condition .season { color: var(--acid); font: 800 30px var(--display); }
.candidate-list { display: grid; gap: 7px; }
.candidate { width: 100%; padding: 14px; display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--line); background: rgba(7,16,13,.65); }
.candidate.active { border-color: var(--acid); background: rgba(215,255,69,.08); }
.candidate-pos { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); color: var(--acid); font: 800 13px var(--display); }
.candidate strong { display: block; font-size: 14px; }
.candidate small { color: var(--muted); font-size: 10px; }
.rating { font: 800 28px var(--display); }
.pitch { padding: 17px; border: 1px solid rgba(236,242,232,.17); background-color: #123c29; background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px); background-size: 25% 25%; box-shadow: inset 0 0 50px rgba(0,0,0,.25); }
.pitch-row { min-height: 78px; display: flex; justify-content: space-around; align-items: center; gap: 6px; }
.slot { width: 70px; min-height: 58px; padding: 7px 4px; border: 1px solid rgba(255,255,255,.18); background: rgba(6,20,13,.75); color: var(--text); }
.slot.empty { border-style: dashed; color: rgba(236,242,232,.72); }
.slot.active { border-color: var(--acid); color: var(--acid); box-shadow: 0 0 0 2px rgba(215,255,69,.12); }
.slot strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }
.slot small { color: inherit; opacity: .7; font: 700 9px var(--display); }
.pick-actions { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick-actions .primary { grid-column: 1 / -1; }
.choice-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choice-card { min-height: 270px; padding: 24px; text-align: left; color: var(--text); display: flex; flex-direction: column; }
.choice-card .number { color: var(--acid); font: 800 58px/.8 var(--display); }
.choice-card h3 { margin-top: auto; font-size: 30px; }
.choice-card p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.half-score { margin: 30px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.stat { padding: 24px; background: var(--panel); }
.stat b { display: block; font: 800 clamp(34px, 5vw, 64px)/1 var(--display); }
.stat span { color: var(--muted); font-size: 11px; }
.result-hero { padding: 42px; border: 1px solid var(--line); background: radial-gradient(circle at 80% 20%, rgba(215,255,69,.18), transparent 34%), var(--panel); }
.record { font: 900 clamp(84px, 15vw, 190px)/.75 var(--display); letter-spacing: -8px; color: var(--acid); }
.result-sub { display: flex; gap: 26px; flex-wrap: wrap; color: var(--muted); }
.result-sub b { color: var(--text); }
.result-grid { margin-top: 12px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 12px; }
.performance-panel { margin-top: 12px; padding: 30px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.performance-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 22px; }
.performance-head h2 { margin: 8px 0 0; }
.performance-head p { max-width: 420px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; text-align: right; }
.performance-awards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: 18px; background: var(--line); border: 1px solid var(--line); }
.performance-award { min-width: 0; padding: 18px; background: #0f211a; }
.performance-award span { display: block; color: var(--acid); font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.performance-award strong { display: block; margin: 9px 0 3px; overflow: hidden; color: var(--text); font: 700 23px/1 var(--display); white-space: nowrap; text-overflow: ellipsis; }
.performance-award b { color: var(--muted); font-size: 11px; }
.performance-table { border-top: 1px solid var(--line); }
.performance-table-head, .performance-row { display: grid; grid-template-columns: 36px minmax(180px, 1.3fr) minmax(145px, .9fr) 72px 72px 90px; gap: 12px; align-items: center; }
.performance-table-head { min-height: 40px; color: #637168; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; }
.performance-row { min-height: 64px; border-top: 1px solid var(--line); }
.performance-rank { color: #536159; font: 700 15px var(--display); }
.performance-player { min-width: 0; }
.performance-player strong { display: block; overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.performance-player small { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.performance-production { color: var(--muted); font-size: 11px; }
.performance-score small { display: none; }
.performance-score b { font: 800 23px var(--display); }
.performance-score.contribution b { color: var(--acid); }
.performance-status { justify-self: start; padding: 5px 8px; border: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 700; white-space: nowrap; }
.performance-row.mvp .performance-rank, .performance-row.mvp .performance-status { color: #10170d; background: var(--acid); border-color: var(--acid); }
.performance-row.bright .performance-status { color: var(--acid); border-color: rgba(215,255,69,.4); }
.performance-row.low .performance-status { color: var(--orange); border-color: rgba(255,120,73,.4); }
.matches { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 4px; }
.match { padding: 10px 12px; background: rgba(255,255,255,.03); display: flex; justify-content: space-between; font-size: 11px; }
.match.win b { color: var(--acid); }
.match.loss b { color: var(--orange); }
.share-card { margin-top: 12px; min-height: 430px; padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: center; overflow: hidden; border: 1px solid rgba(215,255,69,.5); background: radial-gradient(circle at 82% 38%, rgba(215,255,69,.18), transparent 28%), #0a1712; position: relative; box-shadow: var(--shadow); }
.share-card::before { content: '38—0'; position: absolute; left: -16px; bottom: -80px; color: rgba(215,255,69,.035); font: 900 250px/.8 var(--display); letter-spacing: -18px; pointer-events: none; }
.share-copy { position: relative; z-index: 1; }
.share-copy h2 { margin: 14px 0 22px; font-size: clamp(48px, 7vw, 92px); }
.share-record { color: var(--acid); font: 900 clamp(70px, 10vw, 140px)/.72 var(--display); letter-spacing: -6px; }
.share-copy p { margin: 20px 0 0; color: var(--muted); font: 600 12px/1.8 var(--body); }
.share-actions { margin-top: 25px; display: flex; gap: 8px; flex-wrap: wrap; }
.share-qr { justify-self: end; width: min(100%, 330px); padding: 18px; background: var(--acid); color: #0a1712; transform: rotate(1.5deg); box-shadow: 18px 18px 0 rgba(0,0,0,.22); }
.share-qr-image { width: 100%; aspect-ratio: 1; background: #fff; }
.share-qr-image svg { display: block; width: 100%; height: 100%; }
.share-qr strong { display: block; margin-top: 12px; font: 900 54px/.8 var(--display); letter-spacing: -3px; }
.share-qr span { display: block; margin-top: 8px; font: 800 9px var(--body); letter-spacing: 1.4px; }
.history-list { display: grid; gap: 8px; }
.history-row { padding: 18px 20px; border: 1px solid var(--line); display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 16px; background: var(--panel); }
.history-rank { color: var(--acid); font: 800 24px var(--display); }
.history-row b { font: 800 26px var(--display); }
.empty-state { padding: 80px 24px; text-align: center; border: 1px dashed var(--line-strong); color: var(--muted); }
.toast { position: fixed; right: 24px; bottom: 54px; z-index: 20; max-width: 360px; padding: 14px 18px; background: var(--acid); color: #10170d; font-weight: 700; transform: translateY(100px); opacity: 0; transition: .25s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.legal { min-height: 42px; padding: 12px 24px; border-top: 1px solid var(--line); text-align: center; color: #5f6d64; font-size: 9px; letter-spacing: .5px; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .42; transform: none !important; }

@media (max-width: 1040px) {
  .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .rail { padding: 25px 20px; }
  .draft-grid { grid-template-columns: minmax(260px, .9fr) minmax(360px, 1.2fr); }
  .draft-grid > :last-child { grid-column: 1 / -1; }
  .choice-grid.four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .rail { position: relative; width: 100%; height: auto; padding: 18px 18px 12px; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: center; gap: 18px; }
  .brand-mark { font-size: 35px; }
  .brand-copy, .rail-foot, .rail-nav { display: none; }
  .rail-status { margin: 0 0 0 auto; padding: 0; border: 0; text-align: right; }
  .status-number { font-size: 28px; letter-spacing: -1px; }
  .status-number small { font-size: 12px; }
  .status-label { margin-top: 2px; font-size: 8px; }
  main { padding: 24px 16px 60px; }
  h1 { font-size: clamp(54px, 20vw, 82px); letter-spacing: -2.5px; }
  .hero { min-height: 30vh; padding-top: 70px; }
  .hero-ball { width: 140px; right: 0; }
  .quick-grid, .setup-grid, .draft-grid, .result-grid { grid-template-columns: 1fr; }
  .shared-run { display: block; }
  .shared-run h3 { margin: 8px 0; }
  .shared-run .primary { margin-top: 14px; }
  .quick-card { min-height: 180px; }
  .field.wide { grid-column: auto; }
  .section-head, .topbar { align-items: flex-start; }
  .progress-ring { width: 72px; height: 72px; }
  .draft-grid > :last-child { grid-column: auto; }
  .condition { min-height: 170px; }
  .choice-grid, .choice-grid.four { grid-template-columns: 1fr; }
  .choice-card { min-height: 210px; }
  .half-score { grid-template-columns: repeat(2, 1fr); }
  .result-hero { padding: 28px 20px; }
  .record { letter-spacing: -4px; }
  .performance-panel { padding: 22px 14px; }
  .performance-head { display: block; }
  .performance-head p { margin-top: 12px; text-align: left; }
  .performance-awards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .performance-table-head { display: none; }
  .performance-row { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 13px 0; }
  .performance-production { grid-column: 2; }
  .performance-score { grid-row: 1 / span 2; grid-column: 3; text-align: right; }
  .performance-score.contribution { grid-row: 3; grid-column: 3; }
  .performance-score small { display: block; color: var(--muted); font-size: 7px; }
  .performance-score b { font-size: 20px; }
  .performance-status { grid-column: 2; }
  .matches { grid-template-columns: 1fr; }
  .history-row { grid-template-columns: 36px 1fr; }
  .history-row > :last-child { grid-column: 2; }
  .share-card { grid-template-columns: 1fr; gap: 30px; padding: 30px 20px; }
  .share-record { letter-spacing: -3px; }
  .share-qr { justify-self: center; width: min(86vw, 310px); }
  .legal { padding-inline: 14px; }
}

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