@font-face { font-family:'DM Sans';src:url('assets/dm-sans.woff2') format('woff2');font-weight:400 700;font-display:swap; }
@font-face { font-family:'Archivo Black';src:url('assets/archivo-black.woff2') format('woff2');font-weight:400;font-display:swap; }
@font-face { font-family:'Barlow Condensed';src:url('assets/barlow-condensed.woff2') format('woff2');font-weight:800;font-display:swap; }
@font-face { font-family:'Barlow Condensed';src:url('assets/barlow-condensed-italic.woff2') format('woff2');font-style:italic;font-weight:800;font-display:swap; }
:root {
  color-scheme:dark;
  --bg:#0b0a0e;
  --panel:#18161d;
  --white:#faf7fb;
  --muted:#b9b3c0;
  --line:#39343f;
  --pink:#ff56b7;
  --lime:#d3ff57;
  --deck-ink:var(--pink);
  --deck-surface:#341c31;
  --sans:'DM Sans',Arial,sans-serif;
  --display:'Barlow Condensed','Arial Narrow',sans-serif;
  --brand:'Archivo Black','Arial Black',sans-serif;
  font:400 100%/1.45 var(--sans);
  color:var(--white);
  background:var(--bg);
}
* { box-sizing:border-box; }
[hidden] { display:none!important; }
body { margin:0; min-height:100vh; }
button, a { color:inherit; font:inherit; -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
button { cursor:pointer; }
button:disabled { cursor:default; }
button:focus-visible, a:focus-visible { outline:3px solid var(--lime); outline-offset:3px; }
h1,h2,p { margin:0; }
h1,h2 { font:800 2.2rem/.96 var(--display); text-transform:uppercase; }
.app-shell { width:min(1190px,calc(100% - 96px)); margin:0 auto; }
.masthead, .header-actions, .brand, .quiet-button, .kicker, .hero-controls, .play-button, .deck-heading, .card-count, .board-heading, .back-button, .panel-header, .resume-strip { display:flex; align-items:center; }
.masthead { min-height:69px; justify-content:space-between; }
.brand { gap:11px; text-decoration:none; font:400 1rem/.95 var(--brand); letter-spacing:-.065em; text-transform:uppercase; }
.brand-die { position:relative; display:grid; place-items:center; height:27px; width:27px; border-radius:6px; transform:rotate(-10deg); background:var(--pink); }
.brand-die i { position:absolute; width:4px; height:4px; background:var(--bg); border-radius:50%; }
.brand-die i:nth-child(1) { top:5px; left:5px; }
.brand-die i:nth-child(2) { top:5px; right:5px; }
.brand-die i:nth-child(4) { bottom:5px; left:5px; }
.brand-die i:nth-child(5) { bottom:5px; right:5px; }
.header-actions { gap:10px; }
.icon-button, .quiet-button, .secondary-button, .primary-button, .back-button, .play-button {
  background:transparent; border:1px solid var(--line); border-radius:7px; font-size:.875rem; font-weight:700;
}
.icon-button { width:42px; height:42px; display:grid; place-items:center; }
.sound-button { border-color:transparent; }
.quiet-button, .secondary-button, .primary-button { padding:9px 15px; gap:8px; justify-content:center; }
.quiet-button:hover, .icon-button:hover, .secondary-button:hover, .back-button:hover { background:#302833; }
.help-mark { display:grid; place-items:center; border:1.5px solid currentColor; border-radius:50%; width:15px; height:15px; font:700 11px/1 var(--sans); }
.speaker { display:block; width:22px; height:20px; position:relative; }
.speaker::before { content:''; position:absolute; top:3px; width:13px; height:14px; left:0; background:currentColor; clip-path:polygon(0 32%,35% 32%,90% 2%,90% 98%,35% 68%,0 68%); }
.speaker::after { content:'))'; position:absolute; font:13px/1.5 var(--sans); letter-spacing:-2px; left:13px; top:0; }
.sound-button[aria-pressed=false] .speaker::after { content:'×'; font-size:14px; }
.hero { position:relative; isolation:isolate; overflow:hidden; min-height:350px; border-radius:16px; border:1px solid #3c2843; background:#120c16; }
.hero-art { position:absolute; right:0; top:0; bottom:0; width:65%; z-index:-1; }
.hero-art img { display:block; width:100%; height:100%; object-fit:cover; object-position:55% 53%; }
.hero-art::after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,#120c16 0%,rgba(18,12,22,.76) 8%,rgba(18,12,22,.15) 30%,transparent 49%); }
.hero-copy { width:51%; padding:29px 0 31px clamp(24px,3.4vw,52px); }
.kicker, .deck-count, .card-count, .center-kicker, .task-source { font:700 .73rem/1.2 var(--sans); letter-spacing:.12em; text-transform:uppercase; }
.kicker { gap:9px; color:#e2dce5; }
.age-mark { color:var(--lime); border:1px solid #879641; border-radius:4px; padding:3px 5px; font-size:.68rem; line-height:1; letter-spacing:.04em; }
.hero h1 { margin:12px 0 13px; font:800 clamp(72px,7.4vw,110px)/.77 var(--display); letter-spacing:-.026em; }
.hero h1 span,.hero h1 em { display:block; }
.hero h1 em { color:var(--pink); margin-left:-3px; }
.hero-description { color:#e7dfeb; font-size:1rem; line-height:1.47; max-width:355px; }
.hero-controls { gap:16px; margin-top:19px; }
.play-button,.primary-button { background:var(--lime); color:#171b0b; border:1px solid var(--lime); }
.play-button { min-height:42px; gap:10px; padding:9px 16px; }
.play-button i { width:0; height:0; border-top:5px solid transparent; border-bottom:5px solid transparent; border-left:8px solid currentColor; }
.play-button:hover,.primary-button:hover { background:#e1ff88; }
.hero-controls > span { color:#c3b8c7; font-size:.8125rem; }
.deck-picker { margin-top:27px; }
.deck-heading { padding-bottom:13px; justify-content:space-between; gap:12px; }
.deck-heading h2 { font-size:clamp(32px,3.2vw,46px); letter-spacing:-.025em; }
.deck-count { color:var(--muted); font-size:.73rem; letter-spacing:.09em; }
.home-modes { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.deck-card { isolation:isolate; position:relative; overflow:hidden; display:flex; align-items:center; min-height:151px; text-align:left; border-radius:10px; padding:19px 15px 19px 20px; border:1px solid color-mix(in srgb,var(--deck-ink) 22%,#242027); background:linear-gradient(112deg,#19171c 15%,var(--deck-surface) 108%); transition:transform .18s,border-color .18s; }
.deck-card:hover { transform:translateY(-3px); border-color:var(--deck-ink); }
.deck-art { position:absolute; z-index:-1; width:38%; height:96%; right:0; top:2%; display:grid; place-items:center; mix-blend-mode:screen; opacity:.96; }
.deck-art img,.active-art img,.task-ornament img { display:block; width:100%; height:100%; object-fit:contain; }
.deck-art img { mask-image:radial-gradient(ellipse,#000 54%,transparent 77%); }
.deck-copy { display:flex; flex-direction:column; align-items:flex-start; width:68%; }
.deck-name { font:800 clamp(28px,2.35vw,35px)/.99 var(--display); letter-spacing:-.018em; text-transform:uppercase; }
.deck-description { color:#d0cad4; font-size:.875rem; line-height:1.38; margin-top:7px; }
.card-count { color:var(--deck-ink); gap:7px; font-size:.65rem; letter-spacing:.1em; margin-bottom:8px; }
.cards-icon { position:relative; display:block; width:8px; height:10px; border:1px solid currentColor; border-radius:1.4px; transform:rotate(8deg); }
.cards-icon::after { content:''; position:absolute; top:1px; left:-3px; width:4px; height:6px; border-left:1px solid; border-bottom:1px solid; transform:rotate(-12deg); }
.home-note { color:var(--muted); font-size:.8125rem; text-align:center; margin:20px 0; }
.resume-strip { border:1px solid #57503c; background:#252518; padding:10px 14px; gap:12px; justify-content:space-between; border-radius:8px; margin-bottom:12px; font-size:.9rem; }
.game-view { border-top:1px solid var(--line); padding-bottom:26px; }
.back-button { border-color:transparent; gap:8px; margin:10px 0 7px -10px; padding:8px 10px; }
.grid-icon { width:12px; height:12px; background:conic-gradient(from 90deg at 4px 4px,transparent 0 25%,currentColor 0) 0 0 / 7px 7px; }
.game-layout { max-width:960px; margin:auto; display:grid; grid-template-columns:minmax(220px,1fr) minmax(0,480px); gap:20px 7%; align-items:start; grid-template-rows:auto 1fr; }
.game-brief { grid-area:1/1; }
.active-art { width:132px; height:111px; margin:0 0 10px; mix-blend-mode:screen; }
.active-art img,.task-ornament img { mask-image:radial-gradient(ellipse,#000 53%,transparent 78%); }
.game-brief .kicker { color:var(--deck-ink); }
.game-brief h1 { font-size:clamp(46px,5vw,76px); letter-spacing:-.035em; margin:6px 0 9px; }
.game-blurb { color:var(--muted); font-size:1rem; line-height:1.45; max-width:330px; }
.game-brief .deck-count { margin-top:12px; }
.board-stage { grid-area:1/2/3; }
.board-heading { justify-content:space-between; margin-bottom:9px; }
.board-heading h2,.player-panel h2 { font-size:1.7rem; }
.board-heading .quiet-button { padding:5px 12px; }
.board-wrap { padding:10px; border:1px solid #52475b; border-radius:11px; background:#19151d; }
.board { position:relative; display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); grid-template-rows:repeat(9,minmax(0,1fr)); aspect-ratio:7/9; gap:4px; isolation:isolate; }
.board-route { position:absolute; width:100%; height:100%; z-index:-1; pointer-events:none; }
.board-route path { fill:none; stroke:#a89ab7; stroke-width:4; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:4 8; }
#route-travel { stroke:var(--deck-ink); stroke-dasharray:none; }
.tile { position:relative; display:grid; place-content:center; padding:0; min-width:0; border:1px solid #573247; border-radius:5px; background:#362331; color:#fb84cb; }
.tile:nth-of-type(4n+2) { background:#30263e; border-color:#51405e; color:#cba6ff; }
.tile:nth-of-type(4n+3) { background:#293021; border-color:#414c33; color:#d3ed87; }
.tile:nth-of-type(4n) { background:#202e34; border-color:#354a54; color:#a2daf4; }
.tile:hover { box-shadow:inset 0 0 0 1px currentColor; }
.tile-index { position:absolute; top:3px; left:4px; font-size:clamp(8px,.78vw,11px); font-weight:700; line-height:1; }
.tile-symbol { font:22px/1 var(--sans); }
.tile-direction { position:absolute; right:3px; bottom:1px; font-size:10px; opacity:.85; }
.tile-caption { font-size:.64rem; font-weight:700; line-height:1; }
.tile.start,.tile.finish { background:var(--lime); border-color:var(--lime); color:#151511; }
.tile.finish { background:var(--pink); border-color:var(--pink); }
.tile.occupied { outline:2px solid var(--pawn-color); outline-offset:-2px; }
.corner-arrow { display:grid; place-items:center; color:#a39aaa; font-size:24px; }
.board-center { grid-area:5/2/9/7; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; margin:4px; border:1px solid color-mix(in srgb,var(--deck-ink) 34%,#302736); border-radius:11px; background:radial-gradient(ellipse at 70% 20%,var(--deck-surface),#161218 90%); }
.center-kicker { color:var(--deck-ink); font-size:.68rem; }
.turn-label { font:800 clamp(22px,2.5vw,35px)/1 var(--display); text-transform:uppercase; margin:6px 0 11px; }
.dice-button { width:clamp(47px,5vw,64px); aspect-ratio:1; display:grid; place-items:center; padding:6px; transform:rotate(-7deg); border-radius:13px; border:1px solid #ffc3e7; background:linear-gradient(140deg,#ffbbe6,#ff59b6 59%,#ee3499); box-shadow:0 4px 0 #ac246e,0 5px 22px #fa48ae3b; }
.dice-button:hover:enabled { transform:rotate(-2deg); }
.dice-face { width:90%; height:90%; display:grid; grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(3,1fr); }
.pip { width:71%; aspect-ratio:1; background:#21131b; border-radius:50%; place-self:center; }
.dice-face[data-value='1'] .pip { width:93%; }
#dice-hint { font-size:.82rem; margin-top:12px; }
.rolling { animation:shake .15s linear infinite; }
@keyframes shake { 0%,100% { transform:rotate(-9deg); } 50% { transform:rotate(11deg) translateY(-3px); } }
.pawn,.avatar { display:grid; place-items:center; border-radius:50%; color:#170f18; }
.lime-token { background:var(--lime); }
.pink-token { background:var(--pink); }
.pawn { position:relative; place-self:center; width:57%; max-width:33px; aspect-ratio:1; z-index:2; pointer-events:none; border:2px solid #171119; box-shadow:0 1px 0 #eee8f1; font:700 clamp(14px,1.5vw,21px)/1 var(--sans); }
.pawn.stacked { transform:translate(-29%,25%); z-index:3; }
.pawn:has(+ .stacked) { transform:translate(26%,-22%); }
.moving span { animation:hop .18s ease-out; }
@keyframes hop { 50% { transform:translateY(-4px); } }
.player-panel { grid-area:2/1; border-top:1px solid var(--line); padding-top:13px; }
.players { display:grid; gap:8px; margin-top:9px; }
.player-card { display:flex; align-items:center; text-align:left; gap:11px; min-width:0; border:1px solid var(--line); background:var(--panel); border-radius:8px; padding:10px 13px; }
.player-card.active { border-color:var(--player); box-shadow:inset 3px 0 0 var(--player); }
#player-0 { --player:var(--lime); }
#player-1 { --player:var(--pink); }
.avatar { width:31px; height:31px; flex-shrink:0; font:700 18px/1 var(--sans); }
.player-info { flex:1; min-width:0; }
.player-name { display:flex; justify-content:space-between; align-items:baseline; font-weight:700; }
.turn-badge { visibility:hidden; color:var(--player); font-size:.7rem; }
.player-card.active .turn-badge { visibility:visible; }
.player-position,.save-status { color:var(--muted); font-size:.79rem; }
.progress-track { display:block; height:3px; background:#443b48; border-radius:6px; margin-top:6px; overflow:hidden; }
.progress-track > span { display:block; height:100%; background:var(--player); }
.last-action { margin:11px 0 4px; font-size:.875rem; }
dialog { width:min(445px,calc(100% - 30px)); max-height:88dvh; border:1px solid #64516b; border-radius:14px; color:var(--white); background:#1b171e; padding:0; box-shadow:0 28px 85px #0009; }
dialog::backdrop { background:#060407b8; backdrop-filter:blur(5px); }
.dialog-body { padding:26px; text-align:center; }
.dialog-body .kicker { justify-content:center; color:var(--deck-ink); }
.dialog-body h2,.panel-header h2 { font-size:2.6rem; margin:6px 0 14px; }
.task-dialog { background:radial-gradient(ellipse at 50% 0,var(--deck-surface),#1b171e 70%); }
.task-ornament { width:90px; height:70px; margin:0 auto 9px; mix-blend-mode:screen; }
.task-text { font-size:1.16rem; line-height:1.48; }
.task-source { color:var(--muted); margin-top:14px; }
.task-source:empty { display:none; }
.dialog-actions { display:flex; justify-content:center; gap:10px; margin-top:23px; }
.dialog-actions button { flex:1; min-height:44px; }
.panel-dialog { width:min(508px,calc(100% - 30px)); padding:23px 26px; }
.panel-header { justify-content:space-between; gap:7px; }
.panel-header h2 { margin:0; }
.close { font-size:22px; }
.rule-list { padding-left:21px; line-height:1.48; }
.rule-list li { padding-left:3px; margin:13px 0; }
.rule-list li::marker { color:var(--pink); font-weight:700; }
.rules-foot { padding-top:12px; border-top:1px solid var(--line); color:var(--muted); font-size:.875rem; }
#confirm-description { color:var(--muted); }
@media (max-width:1000px) {
  .app-shell { width:calc(100% - 48px); }
  .deck-card { padding:16px 12px 16px 15px; min-height:147px; }
  .deck-copy { width:69%; }
  .hero-copy { width:55%; }
}
@media (max-width:780px) {
  .home-modes { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .hero { min-height:315px; }
  .hero-copy { width:57%; }
  .hero-description { max-width:305px; }
  .deck-card { min-height:132px; }
  .game-layout { grid-template-columns:minmax(180px,1fr) minmax(0,1.6fr); gap:18px 4%; }
}
@media (max-width:620px) {
  .app-shell { width:calc(100% - 28px); max-width:480px; }
  .masthead { min-height:57px; }
  .brand { font-size:.83rem; gap:8px; }
  .brand-die { height:24px; width:24px; }
  .header-actions { gap:0; }
  .rules-button { padding:7px 9px; font-size:.78rem; }
  .hero { min-height:300px; border-radius:12px; }
  .hero-art { width:85%; height:83%; }
  .hero-art img { object-position:65% 50%; }
  .hero-art::after { background:linear-gradient(90deg,#120c16,rgba(18,12,22,.8) 20%,rgba(18,12,22,.15) 62%,transparent 85%),linear-gradient(0deg,#120c16 0%,rgba(18,12,22,.55) 24%,transparent 54%); }
  .hero-copy { width:100%; padding:20px 16px 19px; }
  .hero .kicker { font-size:.59rem; letter-spacing:.095em; gap:6px; }
  .age-mark { font-size:.61rem; }
  .hero h1 { margin:17px 0 13px; font-size:clamp(59px,14vw,73px); line-height:.8; text-shadow:0 2px 18px #05030666; }
  .hero-description { max-width:245px; font-size:.875rem; line-height:1.39; text-shadow:0 1px 6px #100a13; }
  .hero-controls { gap:11px; margin-top:14px; }
  .hero-controls > span { font-size:.73rem; }
  .play-button { padding:8px 11px; min-height:40px; font-size:.81rem; }
  .deck-picker { margin-top:21px; }
  .deck-heading { padding-bottom:10px; }
  .deck-heading h2 { font-size:34px; }
  .deck-count { font-size:.62rem; }
  .home-modes { gap:8px; }
  .deck-card { align-items:flex-start; min-height:157px; padding:71px 12px 13px; border-radius:8px; }
  .deck-art { width:57%; height:69px; right:1%; top:1px; }
  .deck-copy { width:100%; }
  .deck-name { font-size:clamp(24px,6.2vw,30px); }
  .deck-description { font-size:.775rem; line-height:1.34; margin-top:4px; }
  .card-count { position:absolute; left:11px; top:13px; font-size:.56rem; letter-spacing:.055em; gap:5px; }
  .home-note { margin:16px 0; }
  .back-button { margin:5px 0 3px -10px; }
  .game-layout { display:flex; flex-direction:column; gap:12px; }
  .game-layout > * { width:100%; }
  .game-brief { display:flex; align-items:center; gap:11px; }
  .active-art { flex-shrink:0; width:60px; height:60px; margin:0; }
  .game-brief h1 { font-size:36px; margin:3px 0; }
  .game-brief .kicker { font-size:.58rem; }
  .game-brief .deck-count { margin-top:4px; }
  .game-blurb { display:none; }
  .board-heading { margin-bottom:5px; }
  .board-heading h2,.player-panel h2 { font-size:1.45rem; }
  .board-heading .quiet-button { padding:4px 10px; font-size:.75rem; }
  .board-wrap { padding:7px; }
  .board { gap:3px; }
  .tile-index { top:2px; left:3px; font-size:8px; }
  .tile-symbol { font-size:clamp(16px,4.4vw,22px); }
  .tile-caption { font-size:8px; }
  .tile.start .tile-symbol,.tile.finish .tile-symbol { font-size:15px; }
  .tile-direction { font-size:8px; }
  .player-panel { padding-top:0; border:0; }
  .players { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .player-card { padding:9px; gap:7px; }
  .avatar { width:26px; height:26px; }
  .player-name { font-size:.875rem; }
  .turn-badge { font-size:.6rem; }
  .resume-strip { font-size:.8rem; }
}
@media (max-width:370px) {
  .brand { font-size:.71rem; }
  .app-shell { width:calc(100% - 20px); }
  .deck-card { min-height:162px; padding:71px 10px 12px; }
  .hero-description { max-width:218px; }
  .turn-label { margin:3px 0 6px; }
  #dice-hint { margin-top:7px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::after,*::before { animation-duration:.01ms!important; transition-duration:.01ms!important; }
}

/* Keep the original interface copy legible in the English layout. */
.screen-label,.remaining,.center-caption,.side-rules { color:var(--muted); font-size:.8rem; }
.hero { display:flex; align-items:center; }
.hero h1 { font-size:clamp(52px,5.55vw,85px); line-height:.93; }
#resume-button { margin-bottom:12px; }
.remaining { display:block; }
.remaining small { font-size:inherit; }
.center-caption { max-width:90%; margin-top:5px; line-height:1.25; }
.side-modes { margin:18px 0 0; padding-top:15px; border-top:1px solid var(--line); }
.side-modes .deck-heading h2 { font-size:1.45rem; }
#mode-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.mode-option { background:var(--panel); border:1px solid var(--line); border-radius:7px; text-align:left; padding:8px; }
.mode-option .deck-name { font-size:1.05rem; }
.mode-option .deck-copy { width:100%; }
.mode-option[aria-pressed=true] { border-color:var(--deck-ink); }
.mode-option .card-count { position:static; margin-bottom:4px; }
.side-rules { margin:11px 0; }
.library-toolbar { display:flex; gap:8px; margin:15px 0 10px; }
.library-toolbar input,.library-toolbar select { min-width:0; flex:1; color:var(--white); background:var(--panel); border:1px solid var(--line); border-radius:4px; padding:8px; font:inherit; }
.library-count { color:var(--muted); font-size:.8rem; }
.task-list { list-style:none; padding:0; }
.task-list li { display:flex; gap:10px; padding:10px 0; border-top:1px solid var(--line); }
.source-index { color:var(--pink); font-weight:700; }
@media (max-width:620px) {
  .screen-label,.center-caption,.tile:not(.start):not(.finish) .tile-caption { display:none; }
  .hero h1 { font-size:clamp(40px,10.3vw,61px); line-height:.95; }
  .hero-copy { padding-top:30px; padding-bottom:30px; max-width:85%; }
  .hero { min-height:240px; }
  .hero-description { max-width:200px; }
}
