:root {
  --ink: #10251a; --paper: #fbf8ea; --paper-2: #f1edd8; --gold: #f0b93a; --gold-hi: #ffe17a;
  --green: #1d5a33; --green-2: #0d2b17; --grass: #3c8a37; --night: #0b1a3a; --night-2: #07112a;
  --head: 'Tiny5', system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--body); color: var(--ink); line-height: 1.55; overflow-x: hidden;
  background-color: #e9f0d8;
  background-image:
    linear-gradient(45deg, rgba(16,37,26,.035) 25%, transparent 25%, transparent 75%, rgba(16,37,26,.035) 75%),
    linear-gradient(45deg, rgba(16,37,26,.035) 25%, transparent 25%, transparent 75%, rgba(16,37,26,.035) 75%);
  background-size: 16px 16px; background-position: 0 0, 8px 8px;
}
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 400; line-height: 1.15; letter-spacing: .5px; }

.site-header {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: linear-gradient(180deg, #1d5a33, #123d22); border-bottom: 3px solid var(--ink); box-shadow: 0 3px 0 var(--gold);
}
.site-header--float { background: linear-gradient(180deg, rgba(7,17,42,.92), rgba(11,26,58,.86)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; }
.brand img { width: 40px; height: 40px; }
.brand b { font-family: var(--head); font-size: 20px; font-weight: 400; text-shadow: 0 2px 0 var(--ink); }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a { padding: 6px 10px; font-family: var(--head); font-size: 13px; color: #e3f7e6; text-decoration: none; border-radius: 6px; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--gold-hi); background: rgba(0,0,0,.2); }
.site-nav a.btn { color: var(--ink); }
@media (max-width: 640px) { .site-nav a.hide-sm { display: none; } }

.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; text-decoration: none; cursor: pointer;
  font-family: var(--head); font-size: 17px; letter-spacing: 1px; color: var(--ink);
  background: linear-gradient(180deg, #ffe98f 0%, #f0b93a 60%, #d99a12 100%); border: 3px solid var(--ink); border-radius: 10px;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.55), inset 0 -4px 0 #c98a0a, 0 4px 0 var(--ink);
  transition: transform .08s, filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 3px 0 rgba(255,255,255,.55), 0 1px 0 var(--ink); }
.btn--ghost { background: var(--paper); box-shadow: 0 4px 0 var(--ink); }
.btn--sm { padding: 7px 12px; font-size: 13px; }
.btn--big { padding: 15px 30px; font-size: 21px; }
.btn--shine::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent); animation: shine 3.2s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }

.kicker { position: relative; display: inline-block; margin-bottom: 6px; padding: 4px 10px; font-family: var(--head); font-size: 12px; letter-spacing: 1px; color: var(--ink); background: var(--gold-hi); border: 2px solid var(--ink); border-radius: 6px; }

.hero {
  position: relative; overflow: hidden; padding: 56px 16px 0; text-align: center; color: #fff;
  background: radial-gradient(ellipse at 50% 0%, #2c7a45 0%, #164a2c 55%, #0d2b17 100%); border-bottom: 3px solid var(--ink);
}
.hero-logo { position: relative; width: min(260px, 64vw); filter: drop-shadow(0 10px 20px rgba(0,0,0,.45)); }
.hero h1 { position: relative; margin: 14px auto 8px; max-width: 760px; font-size: clamp(30px, 6vw, 52px); text-shadow: 0 3px 0 var(--ink); }
.hero h1 em { display: block; font-style: normal; color: var(--gold-hi); }
.hero p { position: relative; max-width: 560px; margin: 0 auto 22px; font-size: 17px; opacity: .92; }
.hero-actions { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 26px; }

.stage { position: relative; overflow: hidden; color: #fff; text-align: center; background: var(--night-2); border-bottom: 3px solid var(--ink); }
.stage-sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,17,42,.35) 0%, rgba(7,17,42,.15) 45%, rgba(7,17,42,.75) 100%), url('../css/images/ui/hub_league_bg.webp') 50% 100% / cover no-repeat;
  image-rendering: pixelated;
}
.stage-beams { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.stage-beams i {
  position: absolute; top: -10%; width: 34%; height: 120%; opacity: .16;
  background: linear-gradient(180deg, #fff6c8, transparent 75%); clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%);
  animation: sweep 7s ease-in-out infinite alternate;
}
.stage-beams i:first-child { left: 2%; transform-origin: 50% 0; transform: rotate(-12deg); }
.stage-beams i:last-child { right: 2%; transform-origin: 50% 0; transform: rotate(12deg); animation-delay: -3.5s; }
@keyframes sweep { from { opacity: .08; } to { opacity: .22; } }
.stage-inner { position: relative; padding: 48px 16px 8px; }
.stage .kicker { display: table; margin: 0 auto 12px; }
.stage-logo { display: block; margin: 0 auto; width: min(240px, 58vw); height: auto; filter: drop-shadow(0 0 28px rgba(255,204,51,.45)) drop-shadow(0 12px 18px rgba(0,0,0,.55)); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.stage h1 { margin: 12px auto 8px; max-width: 780px; font-size: clamp(32px, 6.4vw, 60px); text-shadow: 0 4px 0 var(--ink), 0 0 24px rgba(0,0,0,.5); }
.stage h1 em { display: block; font-style: normal; color: var(--gold-hi); }
.stage p { max-width: 580px; margin: 0 auto 22px; font-size: 17px; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 560px; margin: 0 auto 26px; padding: 0; list-style: none; }
@media (max-width: 480px) { .stats { grid-template-columns: repeat(2, 1fr); max-width: 300px; } }
.stats li { padding: 8px 6px; background: rgba(7,17,42,.62); border: 2px solid rgba(255,225,122,.55); border-radius: 10px; box-shadow: 0 3px 0 rgba(0,0,0,.4); }
.stats b { display: block; font-family: var(--head); font-weight: 400; font-size: 24px; color: var(--gold-hi); line-height: 1.1; }
.stats span { font-size: 12px; opacity: .85; text-transform: uppercase; letter-spacing: .5px; }

.hero-pitch {
  position: relative; height: 170px; overflow: hidden; border-top: 3px solid var(--ink);
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 60px, rgba(0,0,0,.04) 60px 120px), url('../css/images/field/pitch-turf-1.png') 0 0 / 90px 43px repeat, var(--grass);
  image-rendering: pixelated;
}
.hero .hero-pitch { margin: 0 -16px; }
.hero-pitch::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: rgba(255,255,255,.5); }
.hero-squad { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-end; gap: clamp(0px, 2vw, 24px); padding-bottom: 6px; }
.px-player { position: relative; width: 96px; aspect-ratio: 1 / 1; overflow: hidden; image-rendering: pixelated; }
.px-player-inner { position: absolute; top: -40%; left: -130%; width: 360%; height: 180%; }
.px-player .l { position: absolute; inset: 0; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: 500% 100%; mask-size: 500% 100%; animation: pxIdle .85s steps(5) infinite; }
.px-player .l--img { -webkit-mask-image: none !important; mask-image: none !important; background-repeat: no-repeat; background-size: 500% 100%; animation: pxIdleBg .85s steps(5) infinite; }
@keyframes pxIdle { to { -webkit-mask-position: 125% 0; mask-position: 125% 0; } }
@keyframes pxIdleBg { to { background-position: 125% 0; } }
.px-player.flip .px-player-inner { transform: scaleX(-1); }
@media (max-width: 520px) { .px-player { width: 64px; } .hero-pitch { height: 120px; } }

.section { max-width: 1040px; margin: 0 auto; padding: 64px 16px 0; text-align: center; }
.section h2 { margin: 0 0 6px; font-size: clamp(26px, 4.4vw, 38px); }
.section .lead { max-width: 640px; margin: 0 auto 28px; opacity: .8; }
.eyebrow { display: inline-block; margin-bottom: 8px; padding: 3px 10px; font-family: var(--head); font-size: 12px; letter-spacing: 1.5px; color: #e3f7e6; background: var(--green); border: 2px solid var(--ink); border-radius: 6px; }
.eyebrow--gold { color: var(--ink); background: var(--gold-hi); }

.feature { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 22px; margin: 0 0 18px; padding: 18px 22px; text-align: left; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); }
.feature--flip { grid-template-columns: 1fr 220px; }
.feature--flip .feature-art { order: 2; }
.feature-art { position: relative; display: flex; align-items: center; justify-content: center; height: 190px; border: 3px solid var(--ink); border-radius: 14px; background: radial-gradient(circle at 50% 40%, #fff3b8 0%, #f0b93a 55%, #c98a0a 100%); box-shadow: inset 0 -6px 0 rgba(0,0,0,.15); }
.feature-art img { width: 160px; height: 160px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 6px 0 rgba(16,37,26,.35)); animation: bob 5s ease-in-out infinite; }
.feature-art--live { background: radial-gradient(circle at 50% 40%, #6a8bd6 0%, #1d3a6e 60%, #0b1a3a 100%); }
.live-pill { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; font-family: var(--head); font-size: 12px; letter-spacing: 1px; color: #fff; background: #d92b2b; border: 2px solid var(--ink); border-radius: 999px; }
.live-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.feature-text h3 { margin: 0 0 6px; font-size: 22px; }
.feature-text p { margin: 0; font-size: 15px; opacity: .88; }
.staff-row { display: flex; gap: 8px; margin-top: 12px; }
.staff-row img { width: 48px; height: 48px; padding: 4px; background: var(--paper-2); border: 2px solid var(--ink); border-radius: 10px; image-rendering: pixelated; }
@media (max-width: 720px) {
  .feature, .feature--flip { grid-template-columns: 1fr; text-align: center; }
  .feature--flip .feature-art { order: 0; }
  .feature-art { height: 160px; }
  .feature-art img { width: 128px; height: 128px; }
  .staff-row { justify-content: center; }
}

.pyramid-wrap { margin-top: 64px; padding-bottom: 56px; color: #fff; background: radial-gradient(ellipse at 50% 0%, #1d3a6e 0%, #0b1a3a 60%, #07112a 100%); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.pyramid-wrap .section { padding-top: 56px; }
.pyramid-wrap .lead { opacity: .85; }
.pyramid { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tier { display: flex; align-items: center; gap: 14px; padding: 10px 16px; text-align: left; background: rgba(255,255,255,.06); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 rgba(0,0,0,.45); }
.tier img { width: 64px; height: 64px; flex: none; image-rendering: pixelated; }
.tier b { display: block; font-family: var(--head); font-weight: 400; font-size: 19px; }
.tier span { font-size: 14px; opacity: .85; }
.tier--1 { width: min(100%, 460px); background: linear-gradient(180deg, rgba(255,225,122,.28), rgba(240,185,58,.12)); border-color: var(--gold); box-shadow: 0 0 26px rgba(255,204,51,.35), 0 4px 0 rgba(0,0,0,.45); }
.tier--1 b { color: var(--gold-hi); }
.tier--2 { width: min(100%, 560px); }
.tier--3 { width: min(100%, 660px); }
.tier--4 { width: min(100%, 760px); background: rgba(60,138,55,.22); }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
@media (max-width: 860px) { .modes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .modes { grid-template-columns: 1fr; } }
.mode { padding: 18px 16px; background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 5px 0 var(--ink); transition: transform .15s; }
.mode:hover { transform: translateY(-4px); }
.mode img { width: 88px; height: 88px; image-rendering: pixelated; filter: drop-shadow(0 4px 0 rgba(16,37,26,.25)); }
.mode h3 { margin: 6px 0 4px; font-size: 19px; }
.mode p { margin: 0; font-size: 14px; opacity: .85; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.card { padding: 16px; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink); }
.card .ico { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; background: radial-gradient(circle at 50% 35%, #fff1b0, var(--gold)); border: 2px solid var(--ink); border-radius: 12px; }
.card .ico img { width: 42px; height: 42px; object-fit: contain; }
.card h3 { margin: 0 0 4px; font-size: 18px; }
.card p { margin: 0; font-size: 14px; opacity: .85; }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; text-align: left; }
.step { position: relative; padding: 16px 16px 16px 64px; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink); }
.step::before { counter-increment: s; content: counter(s); position: absolute; left: 14px; top: 14px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-size: 20px; background: var(--gold); border: 2px solid var(--ink); border-radius: 8px; }
.step b { font-family: var(--head); font-weight: 400; font-size: 16px; }
.step p { margin: 2px 0 0; font-size: 14px; opacity: .85; }

.faq { max-width: 760px; margin: 22px auto 0; text-align: left; }
.faq details { margin-bottom: 10px; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; font-family: var(--head); font-size: 16px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: var(--gold); border: 2px solid var(--ink); border-radius: 7px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 16px 14px; font-size: 15px; opacity: .88; }

.finale { position: relative; margin-top: 64px; overflow: hidden; color: #fff; text-align: center; border-top: 3px solid var(--ink); background: linear-gradient(180deg, rgba(7,17,42,.55), rgba(7,17,42,.85)), url('../css/images/ui/hub_league_bg.webp') 50% 30% / cover no-repeat; image-rendering: pixelated; }
.finale-inner { position: relative; padding: 48px 16px 40px; }
.finale img { width: 120px; height: 120px; filter: drop-shadow(0 0 22px rgba(255,204,51,.55)); animation: bob 4s ease-in-out infinite; }
.finale h2 { margin: 8px 0 18px; font-size: clamp(26px, 4.6vw, 40px); text-shadow: 0 4px 0 var(--ink); }

.cta {
  margin: 56px auto 0; max-width: 1040px; padding: 32px 16px; text-align: center; color: #fff;
  background: radial-gradient(ellipse at 50% 0%, #3a64a8 0%, #1d3a6e 60%, #142a52 100%); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink);
}
.cta h2 { margin: 0 0 14px; font-size: clamp(22px, 4vw, 32px); text-shadow: 0 3px 0 var(--ink); }
.disclaimer { margin: 16px auto 0; max-width: 560px; font-size: 12px; opacity: .8; }

.doc { max-width: 820px; margin: 0 auto; padding: 32px 16px 0; }
.doc-head { padding: 22px 18px; margin-bottom: 18px; text-align: center; color: #fff; background: radial-gradient(ellipse at 50% 0%, #2c7a45, #0d2b17); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); }
.doc-head h1 { margin: 0 0 4px; font-size: clamp(26px, 5vw, 38px); text-shadow: 0 3px 0 var(--ink); }
.doc-head p { margin: 0; opacity: .85; font-size: 14px; }
.doc-head a { color: var(--gold-hi); }
.lang-switch { display: inline-flex; gap: 4px; margin-top: 10px; }
.lang-switch a { padding: 3px 10px; font-family: var(--head); font-size: 12px; color: #fff; text-decoration: none; border: 2px solid rgba(255,255,255,.5); border-radius: 6px; }
.lang-switch a[aria-current] { color: var(--ink); background: var(--gold-hi); border-color: var(--ink); }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.toc a { padding: 5px 10px; font-family: var(--head); font-size: 12px; text-decoration: none; background: var(--paper); border: 2px solid var(--ink); border-radius: 7px; box-shadow: 0 2px 0 var(--ink); }
.doc section { margin-bottom: 14px; padding: 18px; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink); scroll-margin-top: 80px; }
.doc section h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 22px; }
.doc section h2 img { width: 36px; height: 36px; object-fit: contain; }
.doc section h3 { margin: 14px 0 4px; font-size: 16px; }
.doc p, .doc li { font-size: 15px; }
.doc ul { padding-left: 20px; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 14px; }
.doc th, .doc td { padding: 7px 8px; text-align: left; vertical-align: top; border-bottom: 2px solid var(--paper-2); }
.doc th { font-family: var(--head); font-weight: 400; background: var(--paper-2); }
.table-wrap { overflow-x: auto; }
.note { padding: 10px 12px; font-size: 14px; background: #fff3c4; border: 2px solid var(--ink); border-radius: 8px; }

.footer { margin-top: 0; padding: 24px 16px; text-align: center; color: #e3f7e6; background: var(--green-2); border-top: 3px solid var(--ink); box-shadow: 0 -3px 0 var(--gold); }
main.doc + .footer, .doc ~ .footer { margin-top: 56px; }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 10px; }
.footer a { font-family: var(--head); font-size: 13px; color: var(--gold-hi); text-decoration: none; }
.footer small { opacity: .7; }

@media (prefers-reduced-motion: reduce) {
  .px-player .l, .px-player .l--img, .stage-logo, .feature-art img, .finale img, .btn--shine::after, .stage-beams i, .live-pill::before { animation: none; }
  html { scroll-behavior: auto; }
}

.guide-hero { position: relative; overflow: hidden; color: #fff; text-align: center; border-bottom: 3px solid var(--ink); background: linear-gradient(180deg, rgba(7,17,42,.45), rgba(7,17,42,.85)), url('../css/images/ui/hub_league_bg.webp') 50% 35% / cover no-repeat; image-rendering: pixelated; }
.guide-hero-inner { padding: 40px 16px 34px; }
.guide-hero .kicker { display: table; margin: 0 auto 10px; }
.guide-hero h1 { margin: 0 0 8px; font-size: clamp(34px, 7vw, 56px); text-shadow: 0 4px 0 var(--ink); }
.guide-hero p { max-width: 560px; margin: 0 auto; font-size: 16px; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.toc--sticky { position: sticky; top: 64px; z-index: 20; padding: 8px; margin: 0 -8px 18px; background: rgba(233,240,216,.92); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); border-radius: 10px; }
.guide section h2 img { image-rendering: pixelated; }
.guide .steps { margin-top: 4px; }
.ages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 12px; }
.age { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 2px solid var(--ink); border-radius: 10px; box-shadow: 0 3px 0 var(--ink); }
.age b { font-family: var(--head); font-weight: 400; font-size: 20px; }
.age span { font-size: 13px; line-height: 1.35; }
.age--up { background: #d9f5dc; } .age--peak { background: #fff1b8; } .age--down { background: #ffe1db; } .age--out { background: #e7e7e7; }
@media (max-width: 640px) { .ages { grid-template-columns: repeat(2, minmax(0, 1fr)); } .toc--sticky { top: 60px; } }
@media (max-width: 640px) { .toc--sticky { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; } .toc--sticky::-webkit-scrollbar { display: none; } .toc--sticky a { flex: none; } }
