@font-face { font-family: Baloo; src: url('/assets/baloo-medium.ttf'); font-display: swap }
@font-face { font-family: Baloo; src: url('/assets/baloo-bold.ttf'); font-weight: 700; font-display: swap }
:root {
  --ink: #352056; --purple: #523179; --muted: #71627f; --cream: #fff8e9;
  --paper: #fffdf7; --line: #e0d5c7; --lime: #d9f645; --coral: #ff9279;
  --lilac: #c8abf1; --shadow: #e7ddcd; --tint: #f3ecf9;
}
* { box-sizing: border-box }
html { scroll-padding-top: 18px }
body { margin: 0; color: var(--ink); background: var(--cream); font: 500 1rem/1.55 Baloo, system-ui, sans-serif }
h1,h2,h3,p { margin: 0 }
h1,h2,h3,b,strong { font-weight: 700 }
p { color: var(--muted); line-height: 1.7 }
button,input,a { -webkit-tap-highlight-color: transparent; color: inherit; font: inherit }
button { cursor: pointer }
button:disabled { cursor: default }
a { text-decoration: none }
[hidden] { display: none !important }
:focus-visible { outline: 3px solid #8154b6; outline-offset: 4px }
.team0 { --team: var(--coral); --team-wash: #fff1e6 }
.team1 { --team: var(--lilac); --team-wash: #f4edff }
.dot { display: inline-block; width: 12px; height: 12px; border: 1.5px solid var(--ink); border-radius: 50%; flex: none; vertical-align: middle }
.t0 { background: var(--coral) } .t1 { background: var(--lilac) }
.header { border-bottom: 1px solid var(--line); background: var(--paper) }
.header-inner { max-width: 1280px; padding: 15px 42px; min-height: 74px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px }
.brand,.header-actions { display: flex; align-items: center; gap: 18px }
.brand img { width: 86px; height: 41px; object-fit: contain }
.brand span { font-size: 1.17rem; font-weight: 700; border-inline-start: 1px solid var(--line); padding-inline-start: 16px }
.nav-catalog { font-weight: 700; padding: 8px 4px }
.nav-catalog:hover { text-decoration: underline }
.help-button,.dialog-close { width: 42px; height: 42px; border: 1.5px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); font-weight: 700; font-size: 1.35rem }
.connection { color: var(--muted); font-size: .9rem }
.connection::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #a197aa; margin-inline-end: 6px }
.connection.online::before { background: #4c842f }
main { max-width: 1280px; margin: auto; padding: 32px 42px 72px }
.button { background: var(--paper); border: 2px solid var(--ink); border-radius: 13px; font-weight: 700; padding: 10px 22px; min-height: 45px; transition: transform .16s,box-shadow .16s,background .16s }
.button.primary { background: var(--lime); box-shadow: 0 4px 0 var(--ink) }
.button.coral { background: var(--coral); box-shadow: 0 4px 0 var(--ink) }
.button.quiet { border: 1.5px solid var(--line); background: var(--paper) }
.button.wide { width: 100%; margin-top: 20px }
@media (hover:hover) { .button:hover:not(:disabled),.help-button:hover { transform: translateY(-2px) } }
.button:active:not(:disabled) { transform: translateY(2px); box-shadow: none }
.button:disabled { opacity: .6 }
.overline,.eyebrow { display: block; color: var(--muted); font-weight: 700; font-size: .93rem }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: stretch; overflow: hidden; isolation: isolate; background: #372057; color: var(--paper); border-radius: 32px; border: 2px solid #33204f; position: relative; min-height: 342px }
.hero-copy { padding: clamp(28px,3.8vw,59px); max-width: 660px; align-self: center; z-index: 1 }
.hero-copy .overline { color: var(--lime); font-size: 1.03rem }
.hero h1 { font-size: clamp(4.2rem,7.7vw,6.9rem); line-height: 1.06; margin: 3px 0 12px }
.hero-copy > p:not(.overline) { color: #f5eafc; font-size: 1.17rem; max-width: 425px }
.hero-actions,.pair-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 23px }
.hero-actions .button { min-width: 128px }
.hero-actions .primary { color: var(--ink); box-shadow: 0 4px 0 #1c102a }
.hero-actions .light { background: transparent; color: var(--paper); border: 1.5px solid #a893c2 }
.hero-scene { position: relative; min-height: 320px; direction: ltr; display: grid; place-items: center; isolation: isolate; background: radial-gradient(ellipse at 48% 62%,#674393 0%,transparent 70%) }
.hero-scene::before { content: ''; position: absolute; inset: 0; z-index:-1; opacity: .26; background-image: radial-gradient(#dbc3f4 1px,transparent 1.2px); background-size: 15px 15px; mask-image: radial-gradient(ellipse,#000 5%,transparent 72%) }
.orbit { position: absolute; width: 83%; height: 60%; border: 1px dashed #aa87c97d; border-radius: 50%; transform: rotate(-20deg) }
.orbit::before { content:''; position:absolute; inset: -19px 14px; border-radius: 50%; border: 1px solid #9b79ba45 }
.pedestal { position:absolute; bottom: 12%; width: 46%; height: 12%; border: 2px solid #211232; border-radius: 50%; background: #ac8ed6; box-shadow: 0 9px 0 #775499,0 11px 0 #241235,0 20px 16px #29133f77 }
.hero-mascot { width: 55%; height: 74%; object-fit: contain; margin-top: -2%; filter: drop-shadow(0 5px 4px #28123a55); z-index: 1 }
.orbit-card { position: absolute; width: clamp(52px,6.6vw,92px); aspect-ratio: 1; display:grid; place-items:center; overflow:hidden; border:2px solid var(--ink); border-radius: 22%; background: #fff7ea; box-shadow: 0 5px 0 #1d102c }
.orbit-card img { width: 91%; height: 91%; object-fit: contain; mix-blend-mode: multiply }
.orbit-0 { left: 10%; top: 19%; transform: rotate(-13deg) }.orbit-1 { right: 9%; top: 30%; transform: rotate(13deg) }.orbit-2 { left: 12%; bottom: 12%; transform: rotate(9deg); width: clamp(50px,5.6vw,75px) }
.game-facts { display: grid; grid-template-columns: repeat(3,1fr); align-items:center; gap: 8px; margin: 16px 0 38px; padding: 14px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); text-align:center; color: var(--muted) }
.game-facts span + span { border-inline-start:1px solid var(--line) }
.game-facts b { color:var(--ink); margin-inline-end:3px }
.library { scroll-margin-top: 20px }
.library-heading { display:flex; align-items:center; justify-content:space-between; gap:20px }
.library h2,.stage-heading h1,.section-top h1 { font-size:clamp(1.9rem,3.4vw,3rem); line-height:1.25; margin-bottom:4px }
.library-heading p,.stage-heading > p { font-size:1.02rem }
.search { display:flex; align-items:center; background:var(--paper); border:1.5px solid var(--line); border-radius:13px; padding:0 12px; gap:8px; width:min(240px,100%); min-height:44px }
.search:focus-within { border-color:var(--purple) }
.search span { font:700 28px/1 system-ui; transform:rotate(-15deg) }
.search input { border:0; background:transparent; min-width:0; width:100%; outline:0; padding:8px 0 }
.filter-strip { display:flex; flex-wrap:wrap; gap:8px; margin:20px 0 9px }
.filter-strip button { flex:none; padding:7px 15px; min-height:42px; border-radius:40px; background:var(--paper); border:1.5px solid var(--line); font-size:.95rem }
.filter-strip button[aria-pressed=true] { color:white; background:var(--ink); border-color:var(--ink); font-weight:700 }
.filter-strip button:hover:not([aria-pressed=true]) { border-color:#a993bb }
.catalog-status { color:var(--muted); font-size:.875rem; margin:8px 2px }
.category-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:15px }
.category { position:relative; display:flex; flex-direction:column; width:100%; min-width:0; text-align:start; padding:0; border:1.5px solid #d9cfc0; border-radius:19px; overflow:hidden; background:var(--paper); box-shadow:0 3px 0 var(--shadow); transition:transform .17s,box-shadow .17s,border-color .17s }
.cover { display:grid; width:100%; height:clamp(94px,9vw,134px); place-items:center; background:radial-gradient(ellipse at 52% 62%,#f0e6ed 0%,#faf4e9 61%); border-bottom:1px solid #e8dece; overflow:hidden }
.cover img { width:84%; height:90%; object-fit:contain; mix-blend-mode:multiply; transition:transform .18s }
.card-body { display:block; padding:10px 12px 11px; width:100%; padding-inline-end:32px }
.card-body strong { display:block; font-size:1.06rem; line-height:1.35 }
.card-detail { display:block; margin-top:3px; font-size:.86rem; color:var(--muted) }
.card-action { position:absolute; inset-inline-end:9px; bottom:13px; width:23px; height:23px; border:1px solid var(--line); border-radius:50%; display:grid; place-content:center; color:var(--purple); font-family:system-ui; line-height:1 }
@media(hover:hover) { .category:hover:not(:disabled) { transform:translateY(-3px); border-color:#8b6ca1; box-shadow:0 5px 0 #e2d5e7 }.category:hover:not(:disabled) .cover img { transform:scale(1.06) rotate(-2deg) } }
.category:active:not(:disabled) { transform:translateY(1px) }
.category.picked { border:2px solid var(--ink); background:var(--team-wash); box-shadow:0 3px 0 var(--team) }
.category.picked .card-detail { color:var(--ink) }
.category.picked .card-action { background:var(--team); border-color:var(--ink) }
.category.unready .card-detail { color:#735331 }
.empty-search { grid-column:1/-1; min-height:150px; display:grid; justify-items:center; align-content:center; gap:10px; border:1px dashed var(--line); border-radius:15px }
dialog { color:var(--ink); width:min(470px,calc(100% - 28px)); max-height:88svh; padding:0; border:2px solid var(--ink); border-radius:25px; background:var(--paper); box-shadow:0 8px 0 #35205655 }
dialog::backdrop { background:#2615338a }
.dialog-inner { padding:30px; text-align:start }
.dialog-close { float:inline-end; margin-inline-start:8px }
.dialog-inner h2 { font-size:1.8rem; line-height:1.4; margin:2px 0 10px }
.dialog-inner > p { margin-bottom:12px }
.names { display:grid; gap:13px; margin-top:20px }
.names label { font-weight:700 }
.names .dot { margin-inline-end:6px }
.names input,.pair-actions + input { display:block; width:100%; border:1.5px solid var(--line); background:var(--cream); border-radius:12px; padding:11px; margin-top:5px }
.steps { padding-inline-start:25px }
.steps li { padding:8px 4px }
.steps li::marker { font-weight:700; color:var(--purple) }
.steps p { font-size:.96rem }
.pair-code { display:grid; place-content:center; padding:10px }
.pair-code img { border-radius:12px }.pair-actions { justify-content:center }
.cover-detail { width:128px; height:120px; margin:0 auto 8px; display:grid; place-items:center }
.cover-detail img { width:100%; height:100%; object-fit:contain; mix-blend-mode:multiply }
.stage-heading .overline,.section-top .eyebrow { color:var(--purple); margin-bottom:4px }
.rosters { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:20px 0 11px }
.roster { min-width:0; background:var(--paper); border:1.5px solid var(--line); border-block-start:5px solid var(--team); border-radius:17px; padding:13px 17px }
.roster.current { background:var(--team-wash); border-inline-color:#a88db5; border-block-end-color:#a88db5 }
.roster-top,.draft-turn,.turn,.section-top,.score { display:flex; align-items:center; gap:10px }
.roster-top h2 { font-size:1.2rem; overflow-wrap:anywhere }.roster-top>span,.turn>span:last-child { margin-inline-start:auto; font-size:.92rem }
.pick-slots { display:flex; gap:7px; margin-top:9px }
.slot { width:38px; height:36px; display:grid; place-items:center; border:1px dashed #b6a7bb; border-radius:8px; color:#a695a9 }
.slot.filled { background:var(--paper); border:1px solid var(--line) }
.slot img { width:100%; height:100%; object-fit:contain; mix-blend-mode:multiply }
.draft-turn { justify-content:space-between; margin:10px 0 25px; min-height:46px; padding:4px 12px; border-inline-start:4px solid var(--team); background:var(--paper); border-radius:8px }
.draft-turn .dot { margin-inline-end:6px }.text-button { border:0; background:transparent; color:var(--purple); text-decoration:underline; font-size:.91rem; padding:5px 8px; min-height:38px }
.section-top { justify-content:space-between; margin-bottom:18px }
.turn { background:var(--paper); border:1px solid var(--line); border-inline-start:6px solid var(--team); border-radius:12px; padding:10px 16px; margin:14px 0 }
.scores,.clocks { display:grid; grid-template-columns:1fr 1fr; gap:14px }
.scores { margin:15px 0 }
.score { background:var(--team-wash); border:1.5px solid var(--line); border-bottom:4px solid var(--team); border-radius:13px; padding:10px 18px }
.score span { overflow-wrap:anywhere }.score strong { margin-inline-start:auto; white-space:nowrap; font-size:1.6rem; line-height:1.2 }.score small { color:var(--muted); font-size:.9rem }
.board { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:3px solid var(--ink); border-radius:20px; overflow:hidden; background:var(--ink) }
.territory { position:relative; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:clamp(98px,15vh,155px); padding:8px; background:var(--team); border:1px solid transparent; transition:box-shadow .16s }
.territory img { width:clamp(46px,5.8vw,75px); height:clamp(46px,5.8vw,75px); object-fit:contain; mix-blend-mode:multiply }
.territory strong { font-size:1.1rem; line-height:1.25 }.territory:disabled { color:var(--ink); opacity:1 }
.territory.edge-top { border-top-color:var(--ink) }.territory.edge-left { border-left-color:var(--ink) }.territory.edge-right { border-right-color:var(--ink) }.territory.edge-bottom { border-bottom-color:var(--ink) }
.territory.selected { box-shadow:inset 0 0 0 4px var(--ink) }.territory.target { box-shadow:inset 0 0 0 4px var(--lime) }.territory:focus-visible { outline-offset:-7px }
.attack-label { position:absolute; inset-block-start:5px; inset-inline-end:5px; background:var(--ink); color:white; border-radius:8px; padding:1px 7px; font-size:.8rem }.joined { font-size:1.1rem; opacity:.28 }
.footnote,.picture-note { margin-top:13px; font-size:.96rem }
.duel-layout { display:grid; grid-template-columns:1.45fr 1fr; gap:24px; align-items:start }
.picture-card { background:var(--paper); border:2px solid var(--ink); border-radius:22px; overflow:hidden; box-shadow:0 5px 0 var(--shadow) }
.picture-top { display:flex; align-items:center; gap:8px; padding:10px 20px; background:var(--ink); color:white }.picture-top b { color:var(--lime) }.picture-top span { margin-inline-start:auto }
.image-stage { position:relative; display:grid; place-items:center; height:clamp(280px,53vh,580px); padding:12px; isolation:isolate }
.image-stage img { width:100%; height:100%; min-height:0; object-fit:contain }
.load-mask { display:none }.image-stage.loading .load-mask,.countdown { position:absolute; inset:0; display:grid; place-items:center; z-index:1; background:var(--paper); font-size:1.45rem; font-weight:700 }
.picture-note { margin:0; padding:10px 17px; border-top:1px solid var(--line) }
.live-label { padding:5px 13px; border:1px solid var(--line); border-radius:20px; background:var(--paper) }
.clock { border:1.5px solid var(--line); padding:16px; border-radius:17px; background:var(--paper) }
.clock.active { border:2px solid var(--ink); background:var(--team-wash); box-shadow:0 4px 0 var(--team) }
.clock > span,.clock small { display:block }.clock small { font-size:.9rem; color:var(--muted) }
.clock strong { display:block; direction:ltr; text-align:right; font:700 clamp(2.7rem,5vw,4.4rem)/1.07 Baloo; font-variant-numeric:tabular-nums }
.time-track { height:7px; border-radius:7px; background:#35205622; margin-top:8px; overflow:hidden; direction:ltr }.time-track div { height:100%; background:var(--ink) }
.answer,.decision { background:var(--tint); border:1px solid #d9c8e7; border-radius:15px; padding:14px 17px; margin:16px 0 }
.answer h2,.decision h3 { font-size:1.6rem }.answer>span,.answer small { font-size:.9rem; color:var(--muted) }
.judge-buttons { display:grid; grid-template-columns:1fr 1fr; gap:10px }.judge-buttons .button { font-size:1.35rem }.judge-buttons .quiet { grid-column:1/-1; font-size:1rem }
.decision { background:#fff0cf }.decision .button { width:100%; margin-top:8px }.display-status { margin-top:18px; color:var(--muted) }
.result { text-align:center; max-width:760px; padding-top:45px }.result h1 { font-size:clamp(2.3rem,5vw,4.3rem) }.result h2 { font-size:1.7rem }
.victory { width:100px; height:100px; display:grid; place-items:center; background:var(--team); color:var(--ink); border:3px solid var(--ink); border-radius:35%; font-size:3.5rem; margin:16px auto; transform:rotate(-5deg); box-shadow:0 5px 0 var(--ink) }
.stale { padding:8px; background:#ffe0ce; text-align:center; position:sticky; top:0; z-index:3 }
#message { position:fixed; z-index:20; bottom:max(24px,env(safe-area-inset-bottom)); left:50%; transform:translate(-50%,12px); color:white; background:var(--ink); border-radius:13px; padding:8px 20px; max-width:94vw; width:max-content; opacity:0; pointer-events:none; transition:.16s }
#message.shown { transform:translate(-50%,0); opacity:1 }.boot { text-align:center; margin-top:35vh }
@media(max-width:1000px) {
  .category-grid { grid-template-columns:repeat(4,minmax(0,1fr)) }
  .cover { height:115px }.header-inner { padding-inline:25px }main { padding-inline:25px }
}
@media(max-width:700px) {
  .header-inner { min-height:60px; padding:8px 16px }.brand,.header-actions { gap:8px }.brand img { width:67px; height:36px }.brand span { font-size:1rem; padding-inline-start:8px }.header .quiet { font-size:.88rem; padding:6px 10px; min-height:38px }.connection { font-size:.78rem }.help-button { width:38px; height:38px }
  main { padding:18px 15px 48px }.hero { grid-template-columns:1.05fr .85fr; min-height:240px; border-radius:23px }.hero-copy { padding:20px 15px 23px 0 }.hero h1 { font-size:3.8rem }.hero-copy .overline { font-size:.83rem }.hero-copy>p:not(.overline) { font-size:.95rem; line-height:1.55 }.hero-actions { gap:6px; margin-top:14px }.hero-actions .button { min-width:0; min-height:37px; padding:5px 10px; font-size:.87rem; border-radius:10px }
  .hero-scene { min-height:210px }.hero-mascot { width:86%; height:68%; margin-top:1% }.pedestal { width:72%; height:7%; bottom:21% }.orbit-card { width:40px }.orbit-0 { left:6%; top:12% }.orbit-1 { right:0; top:19% }.orbit-2 { bottom:12%; left:10%; width:34px }
  .game-facts { gap:2px; padding:9px 4px; margin:10px 0 24px; border-radius:12px; font-size:.78rem }.game-facts b { display:block; margin:0; font-size:.96rem }
  .library-heading { flex-wrap:wrap; gap:9px }.library-heading p,.stage-heading>p { font-size:.94rem }.search { width:100% }
  .filter-strip { margin-top:12px; overflow-x:auto; flex-wrap:nowrap; gap:6px; padding:3px 0 5px; scrollbar-width:thin }.filter-strip button { padding:6px 13px }
  .category-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px }.category { border-radius:13px }.cover { height:91px }.card-body { padding:7px 8px 10px }.card-body strong { font-size:.97rem }.card-detail { font-size:.8rem }.card-action { display:none }
  .rosters { gap:8px; margin:13px 0 7px }.roster { padding:8px; border-radius:12px }.roster-top { gap:5px }.roster-top h2 { font-size:.96rem }.roster-top>span { font-size:.78rem; white-space:nowrap }.pick-slots { gap:3px }.slot { min-width:0; height:23px; width:calc((100% - 15px) / 6); border-radius:5px }.draft-turn { margin:7px 0 14px }
  .turn { flex-wrap:wrap; gap:5px; padding:8px 10px }.turn>span:last-child { font-size:.85rem }.scores,.clocks { gap:8px }.score { padding:8px; gap:5px }.score strong { font-size:1.25rem }
  .territory { min-height:100px; padding:5px }.territory strong { font-size:.86rem }.territory img { width:41px; height:41px }.attack-label { font-size:.72rem; padding:0 4px }.board { border-radius:12px }
  .duel-layout { grid-template-columns:1fr; gap:12px }.duel-main .section-top { margin-bottom:9px }.section-top h1 { font-size:1.65rem }.live-label { font-size:.82rem; padding:3px 8px }.image-stage { height:36svh; min-height:175px; max-height:330px }.clock { padding:10px }.clock strong { font-size:2.5rem }.answer,.decision { padding:9px 12px; margin:10px 0 }.answer h2 { line-height:1.3 }.judge-buttons { position:sticky; bottom:8px; padding:3px 0 }.judge-buttons .button { min-height:40px; padding:6px }.picture-top { padding:7px 12px }
  body[data-role=judge] .image-stage { height:25svh; min-height:120px }.dialog-inner { padding:23px }.game-facts span+span { padding-inline-start:3px }
}
@media(max-width:410px) {
 .category-grid { grid-template-columns:repeat(2,minmax(0,1fr)) }.hero-copy { padding-inline-start:12px }.header-inner:has(.connection) .brand span { display:none }
}
@media(prefers-reduced-motion:no-preference) {
 .dialog-inner { animation:enter .18s ease-out }.slot.filled img { animation:enter .15s ease-out }
 @keyframes enter { from { opacity:.6; transform:translateY(4px) } to { opacity:1; transform:translateY(0) } }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; animation:none!important; scroll-behavior:auto!important } }
button.nav-catalog { color:var(--ink); background:transparent; border:0; min-height:40px }
@media(max-width:600px) {
 .header-inner:has(.connection) .brand span { display:none }
 .header-inner:has(.connection) .connection { max-width:72px; line-height:1.15 }
 .header-inner:has(.connection) { padding-inline:10px; gap:6px }
 .header-inner:has(.connection) .header-actions { gap:6px }
}
.cover { background:#fdf8ea }
.cover img { mix-blend-mode:normal; mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent) }
.search > span { font-size:0; display:inline-block; position:relative; width:15px; height:15px; border:2px solid var(--purple); border-radius:50%; transform:none; margin:0 1px 3px 4px }
.search > span::after { content:''; position:absolute; width:7px; height:2px; background:var(--purple); bottom:-3px; left:-4px; transform:rotate(-45deg) }
.draft-turn { position:sticky; top:6px; z-index:2; box-shadow:0 2px 6px #35205612 }
.cover { display:flex; align-items:center; justify-content:center }
.cover img { display:block; height:88%; width:auto; max-width:88%; min-height:0 }
