:root {
  --ink: #11131c;
  --paper: #f2efe7;
  --cream: #fffaf0;
  --red: #f04444;
  --yellow: #ffd447;
  --blue: #4d8dff;
  --muted: #747785;
  --line: rgba(17, 19, 28, .14);
  --shadow: 0 18px 45px rgba(20, 22, 34, .13);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "DM Sans", sans-serif; min-height: 100vh; }
button { font: inherit; color: inherit; }
.page-noise { position: fixed; inset: 0; opacity: .12; pointer-events: none; z-index: 10; 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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E"); }
.topbar { height: 72px; padding: 0 4vw; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 9; background: rgba(242,239,231,.9); backdrop-filter: blur(18px); }
.brand { border: 0; background: transparent; display: flex; gap: 12px; align-items: center; font-family: "Archivo Black"; letter-spacing: -.04em; font-size: 18px; cursor: pointer; }
.brand b { color: var(--red); }
.pokeball-mark { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--ink); background: linear-gradient(var(--red) 0 44%, var(--ink) 44% 56%, white 56%); position: relative; display: block; }
.pokeball-mark i { position: absolute; width: 9px; height: 9px; border: 2px solid var(--ink); background: white; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%); }
.top-status { display: flex; gap: 22px; align-items: center; font-size: 11px; letter-spacing: .12em; font-weight: 700; }
.top-status span { color: var(--muted); }
.top-status strong { background: var(--ink); color: white; border-radius: 30px; padding: 8px 13px; }
.icon-button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; font-weight: 800; }
main { width: min(1440px, 100%); margin: auto; }
.screen { display: none; padding: 54px 4vw 90px; }
.screen.active { display: block; animation: enter .45s ease; }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } }
.hero { min-height: 460px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 4vw; align-items: center; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 12px; color: var(--red); font-size: 11px; letter-spacing: .17em; font-weight: 800; }
h1, h2 { font-family: "Archivo Black"; letter-spacing: -.065em; margin: 0; line-height: .94; }
.hero h1 { font-size: clamp(58px, 8vw, 116px); }
.hero h1 span { color: var(--red); }
.hero-copy > p:last-child { max-width: 600px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.hero-art { height: 360px; display: grid; place-items: center; position: relative; }
.hero-ball { width: 225px; height: 225px; border: 18px solid var(--ink); border-radius: 50%; background: linear-gradient(var(--red) 0 43%, var(--ink) 43% 57%, white 57%); box-shadow: var(--shadow); display: grid; place-items: center; position: relative; z-index: 2; }
.hero-ball::after { content: ""; position: absolute; width: 70px; height: 70px; border: 16px solid var(--ink); background: white; border-radius: 50%; }
.hero-ball span { font: 82px/1 "Archivo Black"; color: white; transform: translateY(-52px); }
.hero-ball small { transform: translateY(53px); font-weight: 800; letter-spacing: .13em; }
.hero-orbit { position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.orbit-one { width: 330px; height: 330px; }
.orbit-two { width: 430px; height: 220px; transform: rotate(-25deg); }
.spark { position: absolute; font-size: 28px; color: var(--yellow); text-shadow: 1px 1px var(--ink); }
.spark-one { top: 28px; right: 9%; }.spark-two { bottom: 28px; left: 9%; }
.selection-section { padding: 64px 0 12px; }
.section-title { display: flex; gap: 17px; align-items: center; margin-bottom: 25px; }
.section-title > span { display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid var(--ink); border-radius: 50%; font: 15px "Archivo Black"; }
.section-title p { margin-bottom: 5px; }.section-title h2 { font-size: 34px; }
.region-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.region-card, .difficulty-card { border: 1px solid var(--line); background: rgba(255,255,255,.48); cursor: pointer; text-align: left; transition: .2s ease; }
.region-card { padding: 19px; min-height: 128px; position: relative; overflow: hidden; }
.region-card:hover, .difficulty-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.region-card.selected, .difficulty-card.selected { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink), var(--shadow); background: var(--cream); }
.region-card .region-number { color: var(--red); font: 11px "Archivo Black"; }
.region-card strong { display: block; font: 23px "Archivo Black"; letter-spacing: -.05em; margin: 15px 0 3px; }
.region-card small { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.region-card::after { content: ""; width: 70px; height: 70px; border: 10px solid currentColor; border-radius: 50%; position: absolute; opacity: .07; right: -19px; bottom: -19px; }
.region-card.all-regions { background: var(--ink); color: white; grid-column: span 2; }.region-card.all-regions small { color: #aeb1bd; }
.difficulty-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 850px; }
.difficulty-card { padding: 22px; min-height: 145px; position: relative; overflow: hidden; }
.difficulty-card span { color: var(--red); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.difficulty-card strong { display: block; margin: 15px 0 5px; font: 30px "Archivo Black"; letter-spacing: -.05em; }
.difficulty-card p { margin: 0; color: var(--muted); font-size: 12px; }
.difficulty-card.hard::after { content: "HARD"; position: absolute; right: -10px; bottom: -20px; font: 70px "Archivo Black"; opacity: .035; }
.draft-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.spin-panel, .draft-roster { border: 1px solid var(--line); background: rgba(255,255,255,.48); padding: 22px; }
.spin-stage { min-height: 390px; display: grid; place-items: center; align-content: center; position: relative; overflow: hidden; text-align: center; background: radial-gradient(circle, var(--cream) 0 25%, transparent 26%), repeating-radial-gradient(circle, transparent 0 65px, var(--line) 66px 67px); margin: 22px 0; }
.spin-stage.empty img { display: none; }
.spin-stage img { width: 220px; height: 220px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 18px 8px rgba(0,0,0,.2)); position: relative; z-index: 2; }
.spin-stage p { margin: -4px 0 7px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .13em; position: relative; z-index: 2; }
.spin-stage h3 { margin: 0; font: 31px "Archivo Black"; letter-spacing: -.06em; text-transform: uppercase; position: relative; z-index: 2; }
.spin-power { margin-top: 9px; padding: 5px 9px; border-radius: 20px; background: var(--ink); color: white; font: 10px "Archivo Black"; position: relative; z-index: 2; }
.spin-stage.spinning img { animation: spin-draw .12s linear infinite; }
@keyframes spin-draw { 50% { transform: scale(.75) rotate(-8deg); filter: blur(2px); } }
.spin-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.spin-actions > :only-child { grid-column: 1 / -1; }
.spin-note { margin: 16px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.draft-slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding-top: 22px; }
.draft-slot { min-height: 150px; border: 1px dashed var(--line); display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 8px; padding: 10px; opacity: .5; }
.draft-slot.filled { opacity: 1; border-style: solid; background: var(--cream); box-shadow: 3px 3px 0 var(--ink); }
.draft-slot img { width: 82px; height: 82px; object-fit: contain; image-rendering: pixelated; }
.draft-slot small { color: var(--red); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.draft-slot strong { display: block; margin: 4px 0; font: 16px "Archivo Black"; letter-spacing: -.04em; text-transform: uppercase; }
.draft-slot span { color: var(--muted); font-size: 9px; font-weight: 700; }
.launch-bar { margin-top: 50px; padding: 20px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.launch-bar div { display: flex; flex-direction: column; gap: 4px; }.launch-bar span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.primary-button, .secondary-button { min-height: 52px; border: 0; padding: 0 22px; font-weight: 800; font-size: 11px; letter-spacing: .08em; cursor: pointer; transition: .2s; }
.primary-button { background: var(--red); color: white; box-shadow: 5px 5px 0 var(--ink); }
.primary-button:hover { transform: translate(-2px,-2px); box-shadow: 8px 8px 0 var(--ink); }
.primary-button:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
.secondary-button { background: transparent; border: 1px solid var(--line); }
.journey-head, .battle-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 35px; }
.journey-head h1, .battle-head h1 { font-size: clamp(42px, 6vw, 82px); max-width: 1000px; }
.team-rating, .battle-round { flex: 0 0 auto; display: flex; flex-direction: column; text-align: right; }
.team-rating span, .battle-round span { font-size: 10px; letter-spacing: .14em; color: var(--muted); font-weight: 800; }
.team-rating strong { font: 72px "Archivo Black"; color: var(--red); line-height: 1; }
.journey-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 22px; }
.badge-panel, .roster-panel { background: rgba(255,255,255,.5); border: 1px solid var(--line); padding: 24px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; padding-bottom: 17px; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.panel-title strong { color: var(--red); }
.badge-road { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 32px 0; }
.badge-stop { aspect-ratio: 1; border: 1px dashed var(--line); background: var(--paper); display: grid; place-items: center; position: relative; opacity: .42; transition: .35s; }
.badge-stop.earned { opacity: 1; border-style: solid; background: var(--cream); transform: rotate(-2deg); box-shadow: 4px 4px 0 var(--ink); }
.badge-icon { width: 50%; height: 50%; background: var(--badge-color); clip-path: polygon(50% 0, 90% 24%, 80% 78%, 50% 100%, 20% 78%, 10% 24%); box-shadow: inset 0 0 0 8px rgba(255,255,255,.3); }
.badge-stop span { position: absolute; bottom: 8px; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.challenge-button { width: 100%; }
.roster-list { padding: 13px 0; }
.roster-row { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.roster-row img { width: 54px; height: 54px; object-fit: contain; image-rendering: pixelated; }
.roster-row strong { display: block; font-size: 13px; text-transform: capitalize; }.roster-row span { font-size: 9px; color: var(--muted); letter-spacing: .1em; font-weight: 800; }
.roster-row b { font: 13px "Archivo Black"; color: var(--red); }
.scouting-card { background: var(--ink); color: white; padding: 17px; margin-top: 8px; }
.scouting-card span { color: var(--yellow); font-size: 9px; letter-spacing: .14em; font-weight: 800; }.scouting-card p { margin: 8px 0 0; color: #c7c9d1; font-size: 12px; line-height: 1.5; }
.result-banner { margin-top: 22px; background: var(--yellow); border: 2px solid var(--ink); padding: 26px; box-shadow: 7px 7px 0 var(--ink); display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; }
.result-banner h2, .final-result h2 { font-size: 38px; }.result-banner p:not(.eyebrow) { margin-bottom: 0; font-size: 13px; }
.hidden { display: none !important; }
.battle-head h1 i { color: var(--red); font-style: normal; }
.battle-round strong { font: 30px "Archivo Black"; color: var(--red); }
.arena { height: 540px; border: 2px solid var(--ink); background: radial-gradient(circle at center, #fff 0 9%, transparent 10%), repeating-radial-gradient(circle at center, transparent 0 95px, rgba(255,255,255,.13) 96px 97px), linear-gradient(155deg, #5aa77a, #296d57); position: relative; overflow: hidden; box-shadow: 9px 9px 0 var(--ink); }
.arena::before { content: ""; position: absolute; inset: 50% 0 auto; height: 3px; background: rgba(255,255,255,.35); }
.arena-light { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.2) 50%, transparent 80%); transform: translateX(-100%); }
.arena.clashing .arena-light { animation: sweep 1.3s infinite; }
@keyframes sweep { to { transform: translateX(100%); } }
.trainer { position: absolute; top: 20px; color: white; display: flex; flex-direction: column; z-index: 2; text-shadow: 2px 2px var(--ink); }.trainer span { font-size: 9px; letter-spacing: .16em; }.trainer strong { font: 27px "Archivo Black"; }
.trainer-player { left: 24px; }.trainer-champion { right: 24px; text-align: right; }
.team-status { position: absolute; top: 73px; z-index: 3; color: white; text-shadow: 1px 1px var(--ink); }
.team-status > span { display: block; margin-bottom: 7px; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.team-status > div { display: flex; gap: 6px; }
.player-status { left: 24px; }.champion-status { right: 24px; text-align: right; }.champion-status > div { justify-content: flex-end; }
.life-ball { width: 18px; height: 18px; border: 2px solid white; border-radius: 50%; background: linear-gradient(var(--red) 0 43%, var(--ink) 44% 56%, white 57%); box-shadow: 1px 1px 0 var(--ink); transition: .35s; }
.life-ball.out { filter: grayscale(1); opacity: .25; transform: scale(.72); }
.active-fighter { position: absolute; bottom: 42px; width: 42%; height: 68%; display: grid; place-items: center; align-content: center; transition: .4s ease; }
.player-fighter { left: 4%; }.champion-fighter { right: 4%; }
.active-fighter img { width: min(300px, 24vw); height: min(300px, 24vw); object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 25px 10px rgba(0,0,0,.3)); }
.active-fighter strong { color: white; font: 22px "Archivo Black"; text-transform: uppercase; text-shadow: 2px 2px var(--ink); }
.active-fighter span { color: white; margin-top: 3px; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-shadow: 1px 1px var(--ink); }
.active-fighter.entering { animation: fighter-enter .55s ease; }
@keyframes fighter-enter { from { opacity: 0; transform: translateY(70px) scale(.6); } }
.arena.clashing .player-fighter { animation: attack-left .55s ease-in-out infinite alternate; }
.arena.clashing .champion-fighter { animation: attack-right .55s ease-in-out infinite alternate; }
@keyframes attack-left { to { transform: translate(58px,-15px) rotate(5deg); filter: brightness(1.35); } }
@keyframes attack-right { to { transform: translate(-58px,15px) rotate(-5deg); filter: brightness(1.35); } }
.active-fighter.knocked-out { animation: knocked-out .7s ease forwards; }
@keyframes knocked-out { to { opacity: 0; transform: translateY(100px) rotate(18deg) scale(.5); filter: grayscale(1); } }
.versus { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) rotate(-8deg); font: 58px "Archivo Black"; color: var(--yellow); text-shadow: 4px 4px var(--ink); z-index: 3; }
.battle-flash { position: absolute; inset: 0; background: white; pointer-events: none; opacity: 0; }
.arena.finish .battle-flash { animation: flash .8s ease; }
@keyframes flash { 20%,60% { opacity: .85; } 40%,100% { opacity: 0; } }
.ko-burst { display: none; position: absolute; inset: 0; z-index: 8; place-items: center; align-content: center; background: radial-gradient(circle, rgba(255,212,71,.92) 0 18%, rgba(240,68,68,.88) 19% 36%, rgba(17,19,28,.86) 37% 100%); color: white; text-align: center; }
.ko-burst span { font: 22px "Archivo Black"; letter-spacing: .25em; }.ko-burst strong { font: clamp(95px, 18vw, 230px) "Archivo Black"; line-height: .8; color: var(--yellow); text-shadow: 8px 8px var(--ink); }
.arena.final-ko .ko-burst { display: grid; animation: final-ko .95s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes final-ko { 0% { opacity: 0; transform: scale(.15) rotate(-20deg); } 45% { opacity: 1; transform: scale(1.08) rotate(3deg); } 100% { opacity: 0; transform: scale(1.7) rotate(8deg); } }
.battle-controls { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 25px 0; }.battle-controls p { font-weight: 700; }
.final-result { text-align: center; border: 2px solid var(--ink); background: var(--cream); padding: 38px; box-shadow: 8px 8px 0 var(--ink); }.final-result p:not(.eyebrow) { color: var(--muted); }.final-result div { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
dialog { width: min(550px, calc(100% - 30px)); border: 2px solid var(--ink); padding: 32px; background: var(--cream); box-shadow: 10px 10px 0 var(--ink); }
dialog::backdrop { background: rgba(17,19,28,.72); backdrop-filter: blur(5px); }.dialog-close { float: right; border: 0; background: transparent; font-size: 28px; cursor: pointer; }.dialog-note { background: var(--yellow); padding: 13px; font-size: 12px; font-weight: 700; }.dialog h2 { font-size: 36px; }.dialog ol { padding-left: 20px; color: var(--muted); line-height: 1.7; }
.share-dialog { width: min(760px, calc(100% - 30px)); max-height: calc(100vh - 40px); overflow: auto; }.share-dialog canvas { display: block; width: 100%; height: auto; margin-top: 20px; border: 2px solid var(--ink); background: white; }.share-note { color: var(--muted); font-size: 13px; font-weight: 700; }.share-actions { display: flex; gap: 10px; }.share-actions button { flex: 1; }

@media (max-width: 1000px) {
  .region-grid { grid-template-columns: repeat(3, 1fr); }.draft-layout { grid-template-columns: 1fr; }
  .journey-grid { grid-template-columns: 1fr; }.hero { grid-template-columns: 1fr; }.hero-art { display: none; }
  .active-fighter img { width: 220px; height: 220px; }.result-banner { grid-template-columns: 1fr 1fr; }.result-banner > div { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
  .top-status span { display: none; }.screen { padding: 35px 16px 70px; }.hero { min-height: 400px; }.hero h1 { font-size: 52px; }
  .region-grid, .difficulty-grid { grid-template-columns: 1fr 1fr; }.region-card.all-regions { grid-column: span 2; }
  .difficulty-card { padding: 14px; min-height: 130px; }.difficulty-card strong { font-size: 22px; }
  .spin-panel, .draft-roster { padding: 13px; }.spin-stage { min-height: 330px; }.spin-stage img { width: 175px; height: 175px; }
  .draft-slots { grid-template-columns: 1fr; }.draft-slot { min-height: 100px; }
  .launch-bar, .journey-head, .battle-head, .battle-controls { align-items: stretch; flex-direction: column; }.launch-bar .primary-button { width: 100%; }
  .team-rating, .battle-round { text-align: left; }.badge-road { grid-template-columns: repeat(4, 1fr); gap: 6px; }.badge-panel { padding: 13px; }
  .badge-stop span { display: none; }.arena { height: 420px; }
  .active-fighter { width: 46%; }.player-fighter { left: 1%; }.champion-fighter { right: 1%; }.active-fighter img { width: 135px; height: 135px; }.active-fighter strong { font-size: 14px; }.versus { font-size: 35px; }.trainer strong { font-size: 18px; }.team-status { top: 68px; }.life-ball { width: 13px; height: 13px; }
  .result-banner { grid-template-columns: 1fr; }.result-banner > div { grid-column: auto; }.final-result div { flex-direction: column; }
  .share-actions { flex-direction: column; }
}
