@font-face{font-family:Lantern;src:url('assets/ftb-lantern.ttf') format('truetype');font-display:swap}
:root{color-scheme:dark;--ink:#090f1b;--night:#14283b;--forest:#234435;--wood:#513b32;--gold:#dba655;--cream:#eee0ba;--muted:#bac6b3;--red:#a75247;--suit-spades:#11181b;--suit-hearts:#a52832;--suit-clubs:#176b3b;--suit-diamonds:#b9551d;--pixel:Lantern,monospace;--body:ui-monospace,'Courier New',monospace}
*{box-sizing:border-box}body{margin:0;background:var(--ink);color:var(--cream);font:16px/1.5 var(--body);min-height:100svh}button{font:14px/1.3 var(--body);font-weight:bold;color:var(--cream);background:#23372e;border:2px solid #71826a;border-right-color:#101e20;border-bottom-color:#101e20;border-radius:0;padding:10px 14px;min-height:44px;cursor:pointer;box-shadow:2px 2px 0 #050a11;transition:none}button:hover:not(:disabled){background:#3b5541;border-top-color:#d9c49a}button:active:not(:disabled){transform:translate(2px,2px);box-shadow:none}button:focus-visible{outline:3px solid #c8ddd2;outline-offset:3px}button:disabled{color:#849184;border-color:#4e5a50;background:#1b2925;cursor:not-allowed;box-shadow:none}button[hidden],[hidden]{display:none!important}
#world{position:fixed;inset:0;background:url('assets/beast.png') center 27%/cover no-repeat;image-rendering:pixelated;z-index:-3}.vignette{position:fixed;inset:0;background:#090f1b45;z-index:-2}
header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 30px;background:#090f1bcf;border-bottom:2px solid #35483d}.brand{flex-shrink:0}.eyebrow{font:12px/1.7 var(--pixel);letter-spacing:1px;color:var(--gold)}h1{font:clamp(20px,2.3vw,32px)/1.3 var(--pixel);text-transform:uppercase;letter-spacing:-1px;margin:8px 0 0;text-shadow:3px 3px 0 #090f1b}nav{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px;max-width:650px}nav button{font-size:12px;background:#142820;padding:8px 11px}main{max-width:1100px;margin:auto;padding:0 24px 24px}.dealer{text-align:center;min-height:164px;padding:24px 10px 14px;text-shadow:2px 2px #090f1b}.dealer p{font-size:clamp(16px,1.8vw,21px);line-height:1.45;font-weight:bold;margin:8px auto;max-width:710px}.mood{font-size:12px;color:#c8ddd2}
.table{padding:18px 28px 22px;background:#18261ff5;border:4px solid #8d6546;outline:2px solid #090f1b;box-shadow:inset 0 0 0 3px #384637,6px 6px 0 #090f1b;position:relative}.scoreboard{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:0 0 16px;margin-bottom:8px;border-bottom:2px solid #48513e}.score{display:grid;grid-template-columns:30px auto auto;gap:3px 10px;align-items:center}.pile-art{grid-column:1;grid-row:1/3;width:26px;height:38px;background-image:url('assets/cards-atlas.png');background-size:300% 200%;background-position:50% 100%;image-rendering:pixelated;border:2px solid #8d6546;box-shadow:2px 2px #090f1b,4px 4px #8d6546}.score span{font:12px/1.5 var(--pixel);color:var(--gold)}.score strong{font:32px/1 var(--pixel);grid-column:3;grid-row:1/3;color:#e8c384;min-width:2ch;text-align:right}.beast strong{color:#d99173}.score small{font-size:11px;color:var(--muted);grid-column:2}.round{text-align:center;display:grid;gap:4px}.round span{font:12px/1.7 var(--pixel);color:var(--gold)}.round small{font-size:12px;color:var(--muted)}#huntLabel{font-size:10px}.draw-stack{width:28px;height:36px;margin:3px auto;background:url('assets/cards-atlas.png') 50% 100%/300% 200%;image-rendering:pixelated;border:2px solid #d9c49a;box-shadow:2px 2px #090f1b,4px 4px #8d6546}
.zone-title,.hand-title{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:12px;margin:12px 0;color:var(--gold);font:12px/1.5 var(--pixel)}.zone-title span+span,.hand-title span+span{font:12px/1.5 var(--body);color:var(--muted)}.sort-button{padding:6px 10px;font-size:12px;min-height:44px}.cards{display:flex;justify-content:center;gap:12px;min-height:146px;padding-top:8px}.card{width:104px;height:146px;flex:0 0 auto;position:relative;overflow:hidden;padding:0;background:#d9c49a;color:#182b31;border:3px solid #f0dfb4;border-right-color:#9c8057;border-bottom-color:#9c8057;box-shadow:3px 4px 0 #080f16;image-rendering:pixelated;isolation:isolate}.card:hover:not(:disabled){background:#e6d3a9;transform:translateY(-4px);border-top-color:#fff0c7}.card.selected{transform:translateY(-8px);outline:3px solid #e8b55b;outline-offset:2px;box-shadow:3px 6px 0 #080f16}.card.selected:after{content:'✓';position:absolute;bottom:4px;left:5px;font-size:14px;color:#283526;background:#efca78;padding:0 2px;z-index:3}.card:disabled{background:#c7b78f;color:#253239;border-color:#a89772;opacity:.78}.suit-spades{color:var(--suit-spades)!important}.suit-hearts{color:var(--suit-hearts)!important}.suit-clubs{color:var(--suit-clubs)!important}.suit-diamonds{color:var(--suit-diamonds)!important}.corner{position:absolute;top:7px;left:6px;font:24px/1 var(--pixel);z-index:3;display:grid;gap:2px;background:#dfcea5;padding:1px}.corner small{font:20px/1 var(--pixel)}.corner.bottom{top:auto;left:auto;bottom:6px;right:6px;transform:rotate(180deg)}.pip{font:48px/1 var(--pixel);display:block}.ornament{position:absolute;bottom:22px;left:0;right:0;font:10px var(--body);color:#68533b}.court-art,.joker-art{position:absolute;inset:8px 5px;background-image:url('assets/cards-atlas.png');background-size:300% 200%;background-position:0 0;image-rendering:pixelated;z-index:-1}.court-q{background-position:50% 0}.court-k{background-position:100% 0}.face .pip,.face .ornament{display:none}.card.face,.card.face:hover:not(:disabled){background:#d9c49a}.joker-art{background-position:0 100%;inset:20px 6px 28px}.card.joker{background:#d9c49a}.joker .pip{display:none}.joker .corner{font-size:18px}.joker .corner small{font-size:17px}.joker .corner.bottom{display:none}.joker .ornament{font:10px var(--pixel);bottom:6px;background:#d9c49a;color:#263a37;padding:3px 0}.joker-identity{position:absolute;left:6px;right:6px;bottom:26px;padding:5px 0;background:#efdfb5;font:24px/1 var(--pixel);z-index:2}.hand-title{margin-top:18px}.hand .card{border-top-color:#f5cc79}
#status{text-align:center;min-height:42px;margin:18px 0 10px;font:14px/1.5 var(--body);color:#eed7a3}.actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}.actions button{font:14px/1.5 var(--pixel);min-height:48px;padding:12px 16px}.primary{background:#dba655;color:#172622;border-color:#f0cf88;border-right-color:#896539;border-bottom-color:#896539}.primary:hover:not(:disabled){background:#e9bc71}.danger{background:#51312c;color:#f3c2a4;border-color:#a76e50;border-right-color:#352021;border-bottom-color:#352021}.danger:hover:not(:disabled){background:#674038}.footer-note{text-align:center;font:11px/1.6 var(--body);color:var(--muted);margin:14px 0 0}
dialog{width:calc(100% - 32px);max-width:650px;max-height:90svh;overflow:auto;padding:28px;background:#172b25;color:var(--cream);border:4px solid #8d6546;outline:2px solid #090f1b;box-shadow:inset 0 0 0 2px #40523f,8px 8px 0 #050b13;border-radius:0}dialog::backdrop{background:#060d19db}dialog h2{font:24px/1.5 var(--pixel);text-transform:uppercase;color:var(--gold);margin:12px 0 18px}dialog h3{font:16px/1.6 var(--pixel);color:var(--gold)}dialog p,dialog li{font:15px/1.7 var(--body)}dialog li{margin:10px 0}dialog .close{float:right;font-size:24px;width:44px;padding:0}.close-rules{margin-top:12px}#jokerOptions{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}#jokerOptions button{font:18px var(--pixel);min-width:48px}#jokerStep{color:#eac681}#ending{text-align:center;max-width:680px;padding:36px 28px}#endTitle{font-size:32px}#endScore{font:20px/1.6 var(--pixel);color:var(--gold)}#endDetails{font-size:12px;color:var(--muted)}.survived #ending{border-color:#bcad73}.lost #ending{border-color:#a75247;background:#171d24}.lost #world{animation:loss-cut .55s steps(4) both}.survived #world{background-image:url('assets/forest-knight.png');background-position:center}.flying{position:fixed;z-index:20;pointer-events:none;transition:transform .35s steps(9),opacity .35s steps(3)}.angry #world{animation:impact .24s steps(4)}.eating #world{animation:impact .4s steps(6)}#slash{display:none}.score-pop{animation:score-pop .35s steps(4)}
.audio-row{display:grid;grid-template-columns:1fr auto;gap:12px;margin:25px 0;font:14px var(--body)}.audio-row input{grid-column:1/-1;width:100%;min-height:44px;appearance:none;background:transparent}.audio-row input::-webkit-slider-runnable-track{height:10px;background:#0b181f;border:2px solid #58614a}.audio-row input::-webkit-slider-thumb{appearance:none;width:20px;height:24px;background:#dba655;border:3px solid #eed39b;margin-top:-9px;box-shadow:3px 3px #090f1b}.audio-row input::-moz-range-track{height:8px;background:#0b181f;border:2px solid #58614a}.audio-row input::-moz-range-thumb{width:16px;height:20px;background:#dba655;border:3px solid #eed39b;border-radius:0}.audio-row output{color:var(--gold)}#audioStatus{font-size:13px;color:var(--muted)}
#handsDialog{max-width:850px}.guide-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.guide-heading h2{margin-bottom:0}#closeHands{font-size:24px;width:44px;flex-shrink:0;padding:0}.guide-key{font-size:13px!important;color:var(--gold)}.guide-key>span{display:inline-block;width:14px;height:19px;border:3px solid var(--gold);vertical-align:middle;margin-right:6px}.hands-chart{width:100%;border-collapse:collapse;margin:20px 0}.hands-chart caption{text-align:left;font-size:12px;color:var(--muted);margin-bottom:12px}.hands-chart thead{text-align:left;font:12px var(--pixel);color:var(--gold)}.hands-chart td,.hands-chart th{padding:16px 7px;border-bottom:2px solid #384b3b}.hands-chart tbody th{text-align:left;font:14px var(--pixel);width:40%}.hands-chart tbody th>span{display:block;font:13px/1.5 var(--body);color:var(--muted);margin-top:7px}.hands-chart tbody th>.guide-bonus{color:var(--gold)}.guide-cards{display:flex;gap:6px}.guide-card{width:42px;height:60px;background:#d9c49a;color:#182b31;border:2px solid #f0dfb4;border-bottom-color:#9c8057;border-right-color:#9c8057;display:flex;flex-direction:column;justify-content:center;align-items:center;font:20px/1.2 var(--pixel);flex:0 0 auto;box-shadow:2px 2px #090f1b}.guide-red{color:#8b3037}.guide-card.from-hand{outline:3px solid #e8b55b;outline-offset:1px}.guide-count{text-align:center}.guide-count strong{font:24px var(--pixel);display:block;color:var(--gold)}.guide-count span{font-size:12px;color:var(--muted)}.guide-notes p{font-size:13px}.guide-notes{margin-bottom:22px}

#introDialog{width:min(1152px,100vw);height:min(768px,100svh);max-width:100vw;max-height:100svh;padding:0;overflow:hidden;background:#090f1b}#introArt,.intro-shade{position:absolute;inset:0}#introArt{background:center/cover;image-rendering:pixelated;animation:pixel-pan 10s steps(24) both}.intro-shade{background:#090f1b18}.intro-top{position:relative;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:18px;font:12px/1.6 var(--pixel);text-shadow:2px 2px #090f1b}.intro-top>div{display:flex;gap:8px}.intro-top button{font:12px var(--body);background:#142820}.intro-caption{position:absolute;bottom:0;left:0;right:0;padding:22px 32px;background:#0a1723eb;border-top:3px solid #48533f}.intro-caption h2{font-size:28px;line-height:1.3;margin:0 0 14px;text-shadow:3px 3px #090f1b}.intro-caption p{font:16px/1.5 var(--body);margin:7px 0;max-width:900px}.intro-controls{display:flex;align-items:center;justify-content:flex-end;gap:16px;margin-top:16px}.intro-controls>span{margin-right:auto;font:12px var(--pixel);color:var(--muted)}#introLocation{font:12px/1.6 var(--pixel);color:#c8ddd2;letter-spacing:2px;margin:0 0 12px;min-height:0}#introLocation:empty{display:none}.scene-hunt #introArt{animation-name:pixel-hunt;animation-timing-function:steps(18)}.scene-howl #introArt{animation-name:pixel-still;animation-timing-function:steps(2)}.scene-beast #introArt{animation-name:pixel-reveal}.scene-deal #introArt{animation-name:pixel-deal}.title-ready .intro-caption h2{font-size:clamp(28px,4vw,48px);color:#eac27b;text-shadow:4px 4px #513b32,7px 7px #090f1b}
@keyframes pixel-pan{from{transform:translateX(-8px) scale(1.025)}to{transform:translateX(8px) scale(1.025)}}@keyframes pixel-hunt{0%{transform:translateX(10px) scale(1.04)}35%{transform:translateX(-10px) scale(1.04)}70%{transform:translateX(8px) scale(1.04)}100%{transform:translateX(0) scale(1.04)}}@keyframes pixel-still{0%{opacity:1}35%{opacity:.75}100%{opacity:.75}}@keyframes pixel-reveal{0%{opacity:.55}40%,100%{opacity:1}}@keyframes pixel-deal{0%{transform:translateY(-6px) scale(1.025)}45%,100%{transform:translateY(6px) scale(1.025)}}@keyframes impact{25%{transform:translateX(-4px)}50%{transform:translateX(4px)}75%{transform:translateY(2px)}}@keyframes score-pop{50%{transform:translateY(-4px);color:#f9e5ae}}@keyframes loss-cut{0%{transform:translateX(-4px)}30%{transform:translateX(4px)}100%{opacity:.15}}
body.page-hidden *,body.page-hidden *:before,body.page-hidden *:after{animation-play-state:paused!important}
@media(min-height:950px) and (min-width:1000px){.dealer{min-height:230px}.card{width:116px;height:162px}.cards{min-height:162px}}
@media(max-width:1000px){header{padding:18px 20px;align-items:flex-start}.brand{flex-shrink:1}nav{max-width:490px}.score{grid-template-columns:auto auto}.pile-art{display:none}.score span,.score small{grid-column:1}.score strong{grid-column:2}.dealer{min-height:145px}}
@media(max-width:700px){header{display:block;padding:14px 16px}.brand{display:flex;justify-content:space-between;align-items:center;gap:16px}.brand .eyebrow{font-size:10px;max-width:100px}.brand h1{font-size:22px;margin:0}nav{max-width:none;justify-content:center;margin-top:14px;gap:6px}nav button{font-size:12px;min-height:44px;padding:7px 9px}main{padding:0 10px 18px}.table{padding:14px 10px 18px}.scoreboard{gap:7px;padding-bottom:12px}.score{grid-template-columns:1fr;text-align:center;gap:5px}.score span{font-size:10px}.score strong{grid-column:1;grid-row:2;font-size:28px;text-align:center}.score small{grid-row:3;font-size:10px}.round{max-width:116px}.round small{font-size:10px}.round span{font-size:10px}.draw-stack{display:none}.dealer{min-height:128px;padding-top:18px}.dealer p{font-size:16px}.cards{gap:6px;min-height:120px}.arena .card{width:calc((100vw - 86px)/5);height:clamp(108px,27vw,146px);max-width:102px}.hand .card{width:94px;height:134px}.corner{font-size:20px;top:5px;left:3px;padding:0}.corner small{font-size:17px}.corner.bottom{bottom:4px;right:3px}.pip{font-size:36px}.card{border-width:2px}.joker .corner{font-size:15px}.joker .corner small{font-size:14px}.joker .ornament{font-size:9px;bottom:4px}.joker-identity{font-size:19px;bottom:24px;left:3px;right:3px}.zone-title,.hand-title{font-size:11px;gap:9px}.zone-title span+span,.hand-title span+span{font-size:11px}.actions button{font:12px/1.5 var(--pixel);padding:10px 12px}#status{font-size:13px;margin-top:14px}dialog{padding:22px 18px}dialog h2{font-size:22px}.intro-top{padding:12px}.intro-top>span{font-size:10px;max-width:80px}.intro-caption{padding:16px 18px}.intro-caption h2{font-size:24px}.intro-caption p{font-size:15px}#introLocation{font-size:10px}.intro-controls{gap:10px}.footer-note{font-size:10px}}
@media(max-width:620px){#handsDialog{padding:20px 14px}.hands-chart thead{display:none}.hands-chart tbody{display:block}.hands-chart tr{display:grid;grid-template-columns:1fr 48px;border-bottom:2px solid #384b3b;padding:15px 0;gap:12px}.hands-chart tbody th{grid-column:1/-1;width:auto}.hands-chart td,.hands-chart th{border:0;padding:0}.guide-card{width:38px;height:56px}.guide-cards{gap:6px}.guide-count{align-self:center}}
@media(max-width:380px){.brand h1{font-size:18px}.brand .eyebrow{font-size:9px}.zone-title span+span{display:none}.corner{font-size:17px}.corner small{font-size:15px}.pip{font-size:30px}.joker .corner{font-size:13px}.joker-identity{font-size:17px}.joker .ornament{font-size:8px}.guide-card{width:32px;height:50px;font-size:18px}.guide-cards{gap:5px}.actions{gap:6px}.actions button{font-size:11px;padding:10px}}
@media(max-height:560px) and (orientation:landscape){header{padding:10px 18px}.dealer{min-height:95px;padding:8px}.dealer p{margin:5px}.intro-top{padding:10px 16px}.intro-caption{padding:12px 20px;max-height:calc(100% - 66px);overflow:auto}.intro-caption h2{font-size:22px;margin-bottom:6px}.intro-caption p{font-size:14px;margin:4px 0}.intro-controls{margin-top:10px}#introLocation{margin-bottom:6px}.title-ready .intro-caption h2{font-size:30px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
.table{isolation:isolate}.table:before{content:'';position:absolute;inset:6px;z-index:-1;background:url('assets/cards-atlas.png') 100% 100%/300% 200%;image-rendering:pixelated;opacity:.13;pointer-events:none}
/* Evergreen deck: generated illustrations, deterministic mechanical indices. */
.card{background-color:#dfcea5;background-image:linear-gradient(135deg,#92774c22 25%,transparent 25%,transparent 75%,#92774c22 75%);background-size:6px 6px}
.number-pips{position:absolute;inset:20% 29%;pointer-events:none}.number-pip{position:absolute;transform:translate(-50%,-50%);font:22px/1 var(--pixel);font-style:normal}.number-pip.inverted{transform:translate(-50%,-50%) rotate(180deg)}
.evergreen-art,.jester-art{position:absolute;inset:3px;background:url('assets/evergreen-atlas.png') 0 0/400% 200%;image-rendering:pixelated;z-index:-1}.art-1{background-position:33.333% 0}.art-2{background-position:66.667% 0}.art-3{background-position:100% 0}.art-4{background-position:0 100%}.art-5{background-position:33.333% 100%}.art-6{background-position:66.667% 100%}.jester-art{background-image:url('assets/jesters.png');background-size:200% 200%;inset:2px}.jester-1{background-position:100% 0}.jester-2{background-position:0 100%}.jester-3{background-position:100% 100%}.joker .corner.bottom{display:grid}.joker .ornament{bottom:2px;left:23px;right:23px;font-size:8px}.joker-identity{bottom:29px}.corner{background:#e4d2a7ed}

#world{z-index:-4}#ambientLayer{position:fixed;inset:0;z-index:-3;pointer-events:none;overflow:hidden}.wildlife{position:absolute;width:125px;height:110px;background:url('assets/wildlife.png') 0 0/300% 200%;image-rendering:pixelated;mask-image:radial-gradient(ellipse,#000 30%,transparent 72%);animation:woodland-pass 9.5s steps(18) both}.wildlife.deer{animation-name:deer-pass}.wildlife.rabbit{width:70px;height:65px;background-position:100% 0;animation-name:rabbit-pass}.wildlife.owl{width:75px;height:60px;background-position:50% 100%}.wildlife.lanterns{width:110px;height:80px;background-position:100% 100%;animation-name:lantern-pass;opacity:.55}.wildlife.still{animation:none}
@keyframes woodland-pass{0%{opacity:0;transform:translateX(0)}20%,80%{opacity:.8}100%{opacity:0;transform:translateX(var(--travel))}}@keyframes deer-pass{0%{opacity:0;transform:translateX(0)}25%{opacity:.8;transform:translateX(calc(var(--travel)*.4));background-position:0 0}35%,75%{opacity:.8;transform:translateX(calc(var(--travel)*.4));background-position:50% 0}100%{opacity:0;transform:translateX(var(--travel));background-position:0 0}}@keyframes rabbit-pass{0%{opacity:0;transform:translateX(0);background-position:0 100%}25%{opacity:.8}50%{transform:translate(calc(var(--travel)*.5),-10px);background-position:100% 0}80%{opacity:.8;background-position:0 100%}100%{opacity:0;transform:translateX(var(--travel))}}@keyframes lantern-pass{0%,100%{opacity:0}25%,75%{opacity:.5}}
.dealing-card{visibility:hidden;pointer-events:none}#dealClaw{position:fixed;top:20%;left:calc(50% - 140px);width:280px;height:220px;background:url('assets/claw.png') 0 0/200% 200%;image-rendering:pixelated;mask-image:radial-gradient(ellipse,#000 25%,transparent 72%);z-index:15;pointer-events:none}#skipDeal{position:fixed;bottom:15px;right:20px;z-index:16}
#storyDialog{max-width:1050px;width:95vw;height:min(680px,90svh);padding:0;overflow:hidden;background:#060b13}#storyArt{position:absolute;inset:0;background:url('assets/endings.png') 0 0/300% 200%;image-rendering:pixelated}.story-caption{position:absolute;bottom:0;left:0;right:0;background:#060b13ed;padding:20px 28px;display:flex;align-items:center;gap:20px;justify-content:space-between}.story-caption p{max-width:650px}.defeat-story[data-frame="2"] #storyArt{animation:story-black 1s steps(6) forwards}@keyframes story-black{to{opacity:0}}
#talesDialog{max-width:900px}#taleList{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:22px 0}.tale{border:2px solid #415447;padding:14px;background:#10211e}.tale h3{font-size:14px;margin:0 0 8px}.tale p{font-size:13px;margin:0 0 10px}.tale small{color:var(--muted);font-size:10px}.tale.recorded{border-color:#c0a064;background:#273a2b}.tale.recorded small{color:var(--gold)}#lifetimeStats{white-space:pre-wrap;font:13px/1.8 var(--body)}#talesDialog label{display:block;margin-top:20px}#saveText{width:100%;background:#0b191a;color:var(--cream);padding:12px}#saveFile{max-width:100%;padding:12px 0}.menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}select{font:16px var(--body);background:#dfcea5;color:#172622;padding:10px;margin:10px}#taleToast{position:fixed;right:20px;bottom:20px;max-width:320px;white-space:pre-line;padding:18px;background:#172b25;border:3px solid var(--gold);z-index:30;pointer-events:none;font:13px/1.7 var(--pixel)}#saveWarning,#controllerPrompts{margin:8px auto;text-align:center;font-size:12px;color:var(--gold)}.controller-focus{outline:3px solid #97e5ef!important;outline-offset:4px!important;box-shadow:0 0 0 6px #102d37!important}
@media(max-width:700px){.number-pip{font-size:clamp(12px,3vw,20px)}.number-pips{inset:22% 31%}.corner{font-size:18px}.corner small{font-size:15px}.story-caption{padding:12px;display:block}.story-caption p{font-size:14px}#taleList{grid-template-columns:1fr}#taleToast{right:10px;bottom:10px;max-width:280px}.wildlife{width:80px;height:70px}.wildlife.lanterns{width:70px;height:55px}}
@media(prefers-reduced-motion:reduce){.wildlife,#storyArt{animation:none!important}}

.deal-enter{animation:deal-slide .25s steps(6) both}@keyframes deal-slide{from{transform:translate(30px,-90px) rotate(-12deg);opacity:0}to{transform:translate(0,0);opacity:1}}@media(prefers-reduced-motion:reduce){.deal-enter{animation:none}}
/* Hunt surfaces extend the existing clearing, with persistent readable effects. */
#huntHud{padding:14px;border:2px solid #936144;background:#10221e;display:flex;gap:8px 20px;flex-wrap:wrap;align-items:center;margin:6px 0 16px;font:14px/1.5 var(--body)}#wagerNumber{color:var(--gold)}#purgeStock{margin-left:auto;color:#e0ceb0}#buffCount{color:#b1b9a2}#huntHud p{width:100%;margin:0;white-space:pre-line}#buffCounters{color:#efc587}#jokerAvailability{color:#c9afdf}#purgeStock.last-purge{color:#f8a488;text-decoration:underline}#buffsDialog{max-width:800px}#buffList{display:grid;gap:12px}.unavailable-identity{text-decoration:line-through;text-decoration-thickness:3px;opacity:.55}.seat-label{position:absolute;bottom:2px;left:2px;color:#23362e;background:#dfcea5ed;font:8px/1.2 var(--body);padding:1px;z-index:4}.gold-card{border-color:#ffdc4d!important;box-shadow:0 0 0 2px #805921,0 0 15px #ffca5570!important}.gold-value{position:absolute;top:3px;left:27%;right:3px;background:#eed06c;color:#30251b;font:bold 10px/1.4 var(--body);z-index:5}.card-scar{position:absolute;inset:35% 0 20%;font:bold 35px/1 monospace;letter-spacing:-10px;text-align:center;color:#992e24;text-shadow:1px 1px #ffb299,-2px -1px #310e15;z-index:6;pointer-events:none;transform:rotate(-10deg)}.marked-card{outline:2px solid #d55b50;outline-offset:1px;box-shadow:0 0 14px #b92b3577}.marked-card.selected{outline:3px solid #e8b55b;outline-offset:4px}.card-lock{position:absolute;right:5px;bottom:5px;width:34px;height:34px;color:#c64a3d;z-index:8;pointer-events:none;filter:drop-shadow(1px 1px 0 #2b080d) drop-shadow(0 0 3px #ff9b6d55)}.card-lock svg{display:block;width:100%;height:100%;overflow:visible}.card-lock .talon-scratches{fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:square;stroke-linejoin:miter}.buff-hit{animation:buff-card-hit .65s steps(3)}.buff-ghost{transition:transform .4s steps(8),opacity .4s steps(4)}#buffReaction{position:fixed;top:12px;left:50%;transform:translateX(-50%);width:min(550px,94vw);background:#0b181cf5;border:3px solid #ac794f;padding:14px 18px 14px 78px;z-index:40;pointer-events:none;min-height:92px}#buffReaction strong{font:15px/1.4 var(--pixel);color:#efc587}#buffReaction p{margin:6px 0 0;font:14px/1.5 var(--body)}.buff-claw{position:absolute;left:-15px;top:-8px;width:110px;height:110px;background:url('assets/claw.png') 0 0/200% 200%;image-rendering:pixelated;mask-image:radial-gradient(ellipse,#000 25%,transparent 72%)}.buff-strike .buff-claw{animation:buff-claw-strike .55s steps(5) both}.buff-strike #world{animation:impact .25s steps(3)}@keyframes buff-claw-strike{0%{transform:translate(-15px,-20px);background-position:0 0}50%{transform:translate(8px,10px);background-position:100% 0}100%{transform:translate(0,0);background-position:100% 100%}}@keyframes buff-card-hit{50%{filter:brightness(1.5);transform:translateY(-5px)}}
/* Slightly more visible wildlife, still behind all play surfaces. */
.wildlife{width:155px;height:136px}.wildlife.rabbit{width:90px;height:84px}.wildlife.owl{width:95px;height:76px}.wildlife.lanterns{width:145px;height:105px;filter:brightness(1.22)}
@media(max-width:700px){#huntHud{padding:10px;font-size:12px;gap:6px}#purgeStock{margin-left:0}#buffCount{margin-left:auto}#buffReaction{padding:12px 14px 12px 66px;top:5px}#buffReaction strong{font-size:13px}#buffReaction p{font-size:12px}.buff-claw{width:90px;height:90px}.arena:has(.card:nth-child(6)){gap:4px}.arena:has(.card:nth-child(6)) .card{width:calc((100vw - 80px)/6);min-width:40px}.arena:has(.card:nth-child(7)) .card{width:calc((100vw - 84px)/7);min-width:36px}.gold-value{font-size:8px;top:45%;left:2px;right:2px}.card-scar{font-size:28px}.seat-label{font-size:7px}.wildlife{width:105px;height:92px}.wildlife.rabbit{width:65px;height:60px}.wildlife.owl{width:65px;height:52px}.wildlife.lanterns{width:95px;height:72px}}
@media(prefers-reduced-motion:reduce){.buff-hit,.buff-strike .buff-claw,.buff-strike #world{animation:none!important}.buff-ghost{transition:none}}
#purgeMarks{display:flex;gap:6px}#purgeMarks span{display:inline-grid;place-items:center;width:22px;height:26px;border:2px solid #a99169;color:#ead19b;background:#304030;font:12px var(--pixel)}#purgeMarks .purge-crossed,#purgeMarks .purge-spent{color:#ab695d;text-decoration:line-through;text-decoration-thickness:3px;border-color:#6f5145;background:#201f1b}.withheld-card{position:fixed;top:30%;left:65%;width:90px;height:126px;background:url('assets/cards-atlas.png') 50% 100%/300% 200%;border:3px solid #a88c5a;image-rendering:pixelated;z-index:36;pointer-events:none;animation:withheld-deal 1s steps(8) both}@keyframes withheld-deal{0%{transform:translateY(-100px);opacity:0}35%,60%{transform:translateY(0);opacity:1}100%{transform:translate(-100px,-150px);opacity:0}}@media(prefers-reduced-motion:reduce){.withheld-card{animation:none;opacity:.6}}
/* Phase 1E: a centered title, immediate field guide, and one Menu entry. */
header{display:grid;grid-template-columns:minmax(120px,1fr) auto minmax(120px,1fr);align-items:center;padding:16px 24px;gap:16px}header>#handsGuide{justify-self:start}header .brand{text-align:center;display:block}header nav{justify-self:end;margin:0;max-width:none}header .brand h1{margin:5px 0 0}header .brand .eyebrow{max-width:none}header #handsGuide{font-size:14px}#menuDialog{max-width:720px}#menuDialog .menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#menuDialog .menu-grid button{text-align:left;font-size:15px}#controllerDialog{max-width:780px}#mappingList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#mappingList label{display:flex;flex-direction:column;border-bottom:1px solid #455443;padding:8px;font-size:14px}#mappingList select{margin:8px 0}#cycleStatus{text-align:center;font:14px/1.6 var(--pixel);color:#b4dcd5;margin:14px 0}#cycleButton{background:#27483f;border-color:#9cbcb0}#purgeSelection{color:#dfb991}#deckDialog{max-width:1040px}#deckGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:12px;margin:20px 0}.deck-entry{min-width:0;text-align:center;padding:4px}.deck-entry .card{width:82px;height:116px;max-width:100%;margin:auto;display:block}.deck-entry small{font:11px/1.5 var(--body);display:block;margin-top:8px}.used-card .card{filter:grayscale(1);opacity:.35}.used-card small{color:#a7aba2}.deck-entry .corner{font-size:18px}.deck-entry .corner small{font-size:16px}.deck-entry .number-pip{font-size:17px}.deck-entry:focus{outline:3px solid #97e5ef}#deckCount{font-size:16px;color:var(--gold)}
.pad-glyph{display:inline-grid;place-items:center;vertical-align:middle;margin-right:8px;min-width:26px;min-height:26px;padding:2px 5px;border:2px solid currentColor;background:#102023;color:#e5ded0;font:bold 13px/1.1 Arial,sans-serif;box-shadow:1px 2px #050b10;flex-shrink:0;text-decoration:none;letter-spacing:0}.face-button{border-radius:50%;width:27px;height:27px;padding:1px}.xbox.pad-0{color:#8dd58f}.xbox.pad-1{color:#ef9290}.xbox.pad-2{color:#88b9f1}.xbox.pad-3{color:#ead36e}.playstation.face-button{font-size:19px}.playstation.pad-0{color:#99b8f3}.playstation.pad-1{color:#ee9c9c}.playstation.pad-2{color:#d7abe4}.playstation.pad-3{color:#a7dccb}.shoulder-button{border-radius:5px 5px 2px 2px;font-size:11px}.pad-10,.pad-11{border-radius:50%}button:disabled .pad-glyph{opacity:.55}#controllerPrompts{font-size:12px;margin:6px}.actions button{display:inline-flex;align-items:center;justify-content:center;gap:0;flex-wrap:wrap}#cycleChoices .card{width:104px;height:146px}#cycleChoices{margin:25px 0}
:fullscreen header{background:#0b1720bb;padding:10px 18px}:fullscreen .dealer{min-height:105px;padding:14px 10px}:fullscreen header h1{font-size:24px}:fullscreen header .eyebrow{font-size:10px}
@media(max-width:700px){header{grid-template-columns:minmax(75px,1fr) minmax(120px,2fr) minmax(64px,1fr);gap:8px;padding:12px 10px}header .brand h1{font-size:18px;letter-spacing:-1px}header .brand .eyebrow{font-size:9px}header #handsGuide,header #menuButton{font-size:12px;padding:8px 6px}header nav{display:block}#mappingList{grid-template-columns:1fr}#menuDialog .menu-grid{gap:8px}#menuDialog .menu-grid button{font-size:13px}#cycleStatus{font-size:12px}.actions{gap:6px}.actions button{font-size:11px;padding:8px}.pad-glyph{min-width:22px;min-height:22px;margin-right:5px}.face-button{width:23px;height:23px}#deckGrid{grid-template-columns:repeat(auto-fill,minmax(70px,1fr));gap:8px}.deck-entry .card{width:70px;height:104px}.draw-stack{display:block;width:22px;height:28px}.scoreboard .round{gap:2px}.deck-entry .number-pips{inset:22% 31%}.deck-entry .number-pip{font-size:14px}}
@media(max-width:380px){header .brand h1{font-size:16px}header #handsGuide{font-size:11px}#menuButton .pad-glyph{display:none}#deckGrid{grid-template-columns:repeat(3,minmax(0,1fr))}}
#buffReaction.scout-reaction{padding-left:18px;border-color:#91bcb1}#buffReaction.scout-reaction .buff-claw{display:none}
/* Roguelike application viewport. Short/mobile fallbacks scroll the table, never shrink cards below a readable minimum. */
html,body{height:100%;min-height:0}body{height:100dvh;display:flex;flex-direction:column;overflow:hidden}header{flex:0 0 auto;padding:8px 16px}header h1{font-size:clamp(16px,2vw,25px)}header .eyebrow{font-size:9px}main{width:min(1180px,100%);max-width:1180px;flex:1;min-height:0;margin:0 auto;padding:0 12px 8px;display:flex;flex-direction:column}.dealer,:fullscreen .dealer{min-height:0;padding:6px}.dealer>.eyebrow{display:none}.dealer p{margin:2px auto;font-size:15px}.mood{font-size:11px}.table{flex:1;min-height:0;overflow:auto;padding:10px 18px;display:flex;flex-direction:column}.scoreboard{padding-bottom:5px;margin-bottom:3px}.score strong{font-size:25px}.draw-stack{width:18px;height:24px}.round{gap:0}#huntHud{padding:5px 8px;margin:3px 0;gap:4px 12px;font-size:11px}#huntHud p{margin:2px 0;font-size:11px}#huntRule{display:none}.table-tools{display:flex;gap:5px;justify-content:space-between;flex-wrap:wrap}.table-tools button{padding:5px 8px;min-height:34px;font-size:11px}.zone-title,.hand-title{margin:3px 0;gap:8px;font-size:11px}.sort-button{min-height:32px;padding:4px 8px}.cards{min-height:112px;flex:1;align-items:center;gap:10px;padding:7px 4px;overflow-x:auto;overflow-y:visible}.cards .card{width:clamp(76px,10vh,104px);height:clamp(108px,14vh,146px)}.cards .corner{font-size:19px}.cards .corner small{font-size:16px}.cards .number-pip{font-size:18px}#status{font-size:12px;margin:5px 0;min-height:18px}#cycleStatus{margin:3px;font-size:11px}.actions{position:sticky;bottom:0;flex:0 0 auto;margin:3px 0;background:#18261f;padding:3px;gap:7px}.actions button{min-height:40px;padding:7px 10px;font-size:12px}.footer-note{font-size:10px;margin:4px 0}#cardDetails{min-height:14px;font-size:11px;margin:2px 0;color:#d4ddc9}#tallyStatus,#clockStatus{font-size:11px;margin:2px 0}#clockStatus{color:#f0ac79}#controllerPrompts{margin:0 8px;font-size:10px}#buffReaction{max-width:min(600px,90vw)}
.enchant-badge{position:absolute;right:4px;top:4px;z-index:5;font-size:18px;text-shadow:1px 1px #111;background:#18261f;padding:1px 4px}.blessing .enchant-badge{color:#bce2a3}.curse .enchant-badge{color:#f19fa3}.twisted .enchant-badge{color:#d0acf1}.wild-badge{position:absolute;bottom:4px;left:4px;z-index:6;font:bold 11px Arial;background:#294844;color:#fff1c6;padding:3px}.chalk-card{border-left-color:#eff4e2!important;box-shadow:-3px 0 #eff4e2}.temporary-wild{outline:1px dashed #d9b6ed}.enchant-badge~.gold-value{bottom:18px}
#runDialog{width:min(880px,94vw);max-width:880px;max-height:92dvh;background:linear-gradient(#10231fdf,#111d1ef5),url('assets/forest-knight.png') center/cover;border:3px solid #a48354;position:relative;isolation:isolate}#runChoices{display:flex;flex-direction:column;gap:10px}#runChoices>button{text-align:left;white-space:pre-line;font-size:14px;line-height:1.55;padding:12px 16px}.run-top{display:flex;justify-content:space-between;gap:10px;align-items:center}.watching-eyes{position:absolute;right:18%;top:85px;width:7px;height:4px;background:#c64037;box-shadow:15px 0 #c64037,0 0 9px #df3b2b,15px 0 9px #df3b2b;opacity:.85;z-index:-1}.run-card-choices{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:7px;max-height:52dvh;overflow:auto;padding:6px}.run-card-choices button{font-size:13px;min-height:48px}.run-card-choices .selected{outline:3px solid #e8b55b}#bagDialog{max-width:820px}#bagList{display:grid;gap:12px}#bagList article{border:1px solid #7c714e;padding:12px;background:#18332b}#bagList h3{margin:0 0 8px;font-size:15px}#bagList p{font-size:13px}#deckGrid{display:block;overflow-x:auto}#deckDialog{width:min(1100px,96vw);max-width:1100px}.suit-row{display:grid;grid-template-columns:25px repeat(13,minmax(42px,1fr));min-width:670px;gap:4px;margin:10px 0;align-items:start}.identity-group{display:flex;flex-direction:column;text-align:center;gap:3px}.reference-copy{font-size:15px;padding:5px 2px;min-height:35px}.used-card{filter:grayscale(1);opacity:.38}.special-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}#deckDetail{min-height:40px;font-size:13px}button:focus-visible{outline:3px solid #97e5ef;outline-offset:2px}
@media(max-height:760px){.dealer .mood{display:none}.cards .card{width:76px;height:108px}.cards{min-height:115px}.score small,#huntLabel{display:none}#buffCounters,#jokerAvailability{max-height:28px;overflow:auto}.table{padding:6px 12px}.actions button{font-size:11px}#note{font-size:9px}}
@media(max-width:640px){header{padding:6px;gap:4px}main{padding:0 4px 4px}.table{padding:5px 7px}.dealer p{font-size:12px}.cards{gap:6px;justify-content:flex-start}.cards.hand{justify-content:center}.cards .card{width:72px;height:104px}.zone-title span+span,.hand-title span+span{display:none}.table-tools button{font-size:10px;padding:5px;min-height:38px}.actions{flex-wrap:wrap}.actions button{min-height:40px;padding:6px;font-size:10px}#huntHud{grid-template-columns:1fr 1fr}#cardDetails{max-height:32px;overflow:auto}.score span{font-size:9px}.score strong{font-size:21px}.score{gap:3px}.pile-art{display:none}.score{grid-template-columns:auto auto}.run-top button{font-size:12px}}

#mapWagers{display:flex;justify-content:space-between;gap:12px;margin:12px 0}.wager-node{border:2px solid #8d6546;background:#14231f;padding:12px;font-size:12px;color:#e8c384}[hidden]{display:none!important}
/* v2.2a Alpha: forest navigation, action clarity and inspectable physical cards. */
#runDialog[data-scene="map"]{width:min(1120px,96vw);max-width:1120px;position:relative;overflow:auto;background:#0c1c1e}#runDialog[data-scene="map"] #mapWagers{display:block;position:relative;height:420px;margin:20px 0;background:linear-gradient(#071b2633,#071b2633),url('assets/evergreen-map.png') center/cover;border:2px solid #736344;isolation:isolate;overflow:hidden}#runDialog[data-scene="map"] #runChoices{position:static;height:auto;display:flex;flex-direction:row;gap:10px;pointer-events:auto;margin-top:10px}#runDialog[data-scene="map"] #runChoices:empty{display:none}.trail-node,.trail-route{position:absolute;transform:translate(-50%,-50%);font:11px/1.5 var(--body);max-width:130px;text-align:center;z-index:3}.trail-node{display:grid;justify-items:center;color:#f5d295;text-shadow:1px 2px #000;background:#071b25f2;padding:7px;border:1px solid #8f7446;pointer-events:none}.trail-node.current{outline:2px solid #e9d08a}.trail-node img{width:52px;height:52px;object-fit:contain;image-rendering:pixelated}.trail-node.unknown{font-size:25px;color:#c1c8bc;border-style:dashed}.trail-connection{position:absolute;height:5px;background:#bd9a60b0;border-bottom:2px solid #33271b;transform-origin:left center;z-index:1;pointer-events:none}.trail-route{pointer-events:auto;min-width:96px;min-height:48px;border:2px solid #d5b776;background:#172c22f2;color:#f5dfaf;box-shadow:0 0 15px #e1c38833;padding:10px;cursor:pointer;touch-action:manipulation;user-select:none}.trail-route:before{content:'';position:absolute;inset:-7px}.trail-route:hover,.trail-route:focus-visible{background:#435c37;outline:3px solid #efd991;transform:translate(-50%,-50%)}.trail-route:active{background:#526b45}.trail-route:disabled{opacity:.8;cursor:default}.trail-reroll{pointer-events:auto;position:static;min-height:44px}
#runDialog[data-scene="grandmother"]{padding-top:clamp(250px,40vw,430px);background:linear-gradient(transparent 18%,#0b181cf2 72%),url('assets/grandmother.png?v=232') center top/100% auto no-repeat,#0b181c;max-width:850px}#runDialog[data-scene="grandmother"] .run-top{background:#09141adc;padding:8px}#runDialog[data-scene="grandmother"] .watching-eyes{display:none}.enchant-badge{top:3px;right:3px;left:auto;bottom:auto;min-width:18px;height:19px;font:bold 15px/19px monospace;text-align:center;background:#17372c;color:#f9da86;border:1px solid #b9944e;z-index:7}.pinned-card{box-shadow:0 0 0 2px #9bcad1,0 0 18px #9bcad166}.pinned-card:before{content:'PIN';position:absolute;bottom:43%;right:1px;font:bold 9px/1.5 monospace;background:#183b44;color:#d6fcff;z-index:9}#cyclePreview,#purgePreview{padding:12px;border:1px solid #ac8757;color:#f3d694;background:#14241f}#returnScry{position:sticky;top:8px;z-index:25;background:#d7bf81;color:#132624;border:3px solid #f1d6a0}#inspectChoices{display:grid;gap:8px}#inspectCards,#unpinCard{font-size:12px;min-height:44px;margin:5px}#cardDetails{min-height:1.6em}#cycleChoices{flex-wrap:wrap}
@media(max-width:650px){#runDialog[data-scene="map"]{padding:18px 10px}#runDialog[data-scene="map"] #mapWagers{height:350px}#runDialog[data-scene="map"] #runChoices{margin-top:8px}.trail-route{min-width:68px;max-width:88px;min-height:46px;font-size:10px;padding:8px 4px}.trail-node{max-width:70px;font-size:9px}.trail-node img{width:34px;height:34px}}
.enchant-badge svg{display:block;width:19px;height:19px}.grandmother-gift{display:flex;gap:16px;justify-content:center;margin:16px 0}.grandmother-gift article{display:grid;justify-items:center;width:30%;min-width:0}.grandmother-gift p{font-size:12px}.trail-node.traveled{border-style:dashed;color:#b3bd9c;font-size:10px}
.inspection-controls{display:flex;gap:6px;justify-content:center}.alpha-version{font:9px/1.5 var(--body);color:#c5b086;white-space:nowrap}#runDescription{line-height:1.65;margin:12px 0}

/* QA3: original event panels and committed, presentation-only shuffle. */
#runDialog[data-scene="runner-flee"],#runDialog[data-scene="runner-dead"]{padding-top:clamp(210px,35vw,380px);background-position:center top;background-size:100% auto;background-repeat:no-repeat;background-color:#0b181c}
#runDialog[data-scene="runner-flee"]{background-image:linear-gradient(transparent 18%,#0b181cf5 75%),url('assets/last-runner-flight.png')}
#runDialog[data-scene="runner-dead"]{background-image:linear-gradient(transparent 18%,#0b181cf5 75%),url('assets/last-runner-aftermath.png')}
.grandmother-gift{flex-wrap:wrap;align-items:stretch;gap:18px}.grandmother-gift article{display:grid;justify-items:center;width:min(31%,180px);min-width:150px;padding:10px 8px;border:1px solid #776443;background:#09161a;align-content:start;gap:7px}.grandmother-gift .card{width:118px;height:166px;container-type:inline-size;pointer-events:none;box-shadow:3px 4px 0 #050b13}.grandmother-gift .card:hover{transform:none;background:#d9c49a}.grandmother-gift .corner{font-size:23cqw;top:5cqw;left:4cqw}.grandmother-gift .corner small{font-size:19cqw}.grandmother-gift .corner.bottom{top:auto;left:auto;bottom:5cqw;right:4cqw}.grandmother-gift .number-pips{inset:23% 31%}.grandmother-gift .number-pip{font-size:21cqw}.grandmother-gift .evergreen-art,.grandmother-gift .jester-art{inset:3cqw}.grandmother-gift .enchant-badge{top:3cqw;right:3cqw;min-width:0;width:23cqw;height:23cqw;padding:1cqw;font-size:18cqw;line-height:19cqw}.grandmother-gift .enchant-badge svg{width:100%;height:100%}.gift-card-name{font:17px/1.2 var(--pixel);background:#dfcea5;padding:2px 6px}.gift-enchantment{font:11px/1.35 var(--pixel);text-align:center;color:#f1d191}.gift-enchantment.curse{color:#e68a7b}.gift-enchantment.twisted{color:#c9a8df}.gift-enchantment.blessing{color:#99dfae}.gift-enchantment.plain{color:var(--muted)}.gift-effect{font:12px/1.45 var(--body)!important;margin:0;text-align:center;color:#e9dfc2}
#bagList{grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr))}#bagList p{font-size:14px;line-height:1.55}
.mark-awaiting .card-scar{visibility:hidden}.mark-awaiting{filter:none;box-shadow:none}
.beast-shuffling .draw-stack{animation:beast-shuffle .8s steps(6) both;box-shadow:0 0 30px 15px #020608,4px 4px #a47d51}
.beast-shuffling #buffReaction{padding-top:105px;background:linear-gradient(#07111044,#071110ef),url('assets/wager-icon.png') center top/150px auto no-repeat,#071110}
@keyframes beast-shuffle{0%,100%{transform:translate(0,0) rotate(0)}25%{transform:translate(-16px,-5px) rotate(-18deg)}50%{transform:translate(14px,-12px) rotate(13deg)}75%{transform:translate(-7px,3px) rotate(-9deg)}}
@media(prefers-reduced-motion:reduce){.beast-shuffling .draw-stack{animation:none}}

/* Release candidate: grouped choices, compact local summaries and accessible panels. */
.cycle-zones{display:flex;flex-direction:column;gap:1rem}.cycle-zones section{width:100%}.cycle-zones h3{font-size:1rem;text-align:left}.cycle-zones .cards{flex-wrap:wrap;justify-content:flex-start}
.intro-title-row{display:flex;align-items:center;gap:1.5rem;flex-wrap:wrap}.intro-title-row h2{margin-right:0}#creatorCredit{display:none;font-size:clamp(.875rem,1.25vw,1.125rem);color:#d9cba0;white-space:nowrap}.title-ready #creatorCredit{display:inline}
.hunt-chronicle{border:1px solid #8e7949;background:#0b1419;padding:1rem;margin-top:1rem;text-align:left}.hunt-chronicle pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:1rem;line-height:1.55;margin:0 0 1rem}
#copyText{width:100%;box-sizing:border-box;font-size:1rem;white-space:pre-wrap}#patchDialog,#copyDialog,#guidanceDialog{max-height:85dvh;overflow:auto;width:min(42rem,90vw)}#patchList{padding-left:1.5rem}#patchList li{margin-bottom:.8rem;line-height:1.5}#guidanceText{font-size:1.125rem;line-height:1.65}
@media(max-width:800px){.intro-title-row{gap:.5rem}#creatorCredit{font-size:.875rem}.hunt-chronicle{padding:.75rem}}

@media(max-width:560px){#runDialog[data-scene="grandmother"]{padding-top:clamp(180px,58vw,270px)}.grandmother-gift{gap:10px}.grandmother-gift article{width:100%;min-width:0;grid-template-columns:auto 1fr;grid-template-rows:auto auto 1fr;justify-items:start;text-align:left}.grandmother-gift .card{grid-row:1/4;width:86px;height:121px;margin-right:8px}.gift-card-name,.gift-enchantment,.gift-effect{text-align:left}.gift-effect{font-size:11px!important}}
/* Public Alpha hotfix: presentation only; desktop keeps the existing cascade. */
@media (max-width:700px), (max-width:1400px) and (pointer:coarse) {
 #arena,#hand{min-width:0;overflow:visible;padding:13px 7px 7px;gap:8px;align-items:center;justify-content:center}
 #arena .card,#hand .card{aspect-ratio:104/146;height:auto;min-height:0;max-width:none;container-type:inline-size;flex-shrink:0}
 /* All face details scale with the actual card interior, rather than viewport pixels. */
 #arena .corner,#hand .corner{font-size:23cqw;top:5cqw;left:4cqw;padding:0;gap:2cqw;line-height:1}
 #arena .corner small,#hand .corner small{font-size:19cqw;line-height:1}
 #arena .corner.bottom,#hand .corner.bottom{top:auto;left:auto;bottom:5cqw;right:4cqw}
 #arena .number-pips,#hand .number-pips{inset:23% 31%}
 #arena .number-pip,#hand .number-pip{font-size:21cqw}
 #arena .evergreen-art,#hand .evergreen-art,#arena .jester-art,#hand .jester-art{inset:3cqw}
 #arena .joker .corner,#hand .joker .corner{font-size:20cqw}
 #arena .joker-identity,#hand .joker-identity{left:4cqw;right:4cqw;bottom:28%;font-size:22cqw;padding:4cqw 0;line-height:1}
 #arena .joker .ornament,#hand .joker .ornament{left:24%;right:24%;bottom:2cqw;font-size:9cqw;padding:2cqw 0}
 #arena .enchant-badge,#hand .enchant-badge{top:3cqw;right:3cqw;min-width:0;width:23cqw;height:23cqw;padding:1cqw;font-size:18cqw;line-height:19cqw}
 #arena .enchant-badge svg,#hand .enchant-badge svg{width:100%;height:100%}
 #arena .wild-badge,#hand .wild-badge{font-size:12cqw;left:3cqw;bottom:3cqw;padding:2cqw}
 #arena .gold-value,#hand .gold-value{font-size:11cqw;line-height:1.25;left:3cqw;right:3cqw;top:45%;bottom:auto}
 #arena .seat-label,#hand .seat-label{font-size:9cqw;padding:1cqw;bottom:2cqw;left:2cqw}
 #arena .card-lock,#hand .card-lock{width:34cqw;height:34cqw;right:3cqw;bottom:3cqw}
 #arena .card-scar,#hand .card-scar{font-size:36cqw;letter-spacing:-10cqw}
 #arena .pinned-card:before,#hand .pinned-card:before{font-size:10cqw}
 #arena .card.selected:after,#hand .card.selected:after{font-size:15cqw;bottom:4cqw;left:5cqw}
}
@media(max-width:540px){
 #guidanceDialog #nextGuidance,#guidanceDialog #skipGuidance{display:block;width:100%;min-height:44px;margin:0;padding:12px 8px;font:700 14px/1.4 var(--body);white-space:normal;overflow-wrap:normal}
 #guidanceDialog #skipGuidance{margin-top:12px}
}
@media(max-width:700px){
 body{height:100svh;height:100dvh;max-width:100%;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
 header{padding:2px 6px;gap:4px;grid-template-columns:76px minmax(0,1fr) 58px;min-height:40px}
 header .brand{min-width:0}header .brand .eyebrow{display:none}header .brand h1{font:14px/1.25 var(--pixel);letter-spacing:-1px;margin:0}header .alpha-version{display:block;font-size:9px}
 header #handsGuide,header #menuButton{min-height:36px;padding:4px;font-size:11px}
 main{padding:0 4px 4px;min-width:0}
 .dealer,:fullscreen .dealer{padding:1px 4px;flex:none}.dealer p{font:11px/1.2 var(--body);margin:1px auto}.dealer .mood{display:none}
 .table{padding:3px 6px;gap:0;overflow:visible;min-width:0;border-width:2px;box-shadow:inset 0 0 0 2px #384637}
 .table>*{flex-shrink:0;min-width:0}
 .scoreboard{padding:0 0 2px;margin:0;gap:4px;min-height:30px}.scoreboard .draw-stack,.score small,#huntLabel{display:none}.score{display:flex;align-items:center;gap:5px}.score span{font:10px/1.2 var(--body)}.score strong{font-size:22px;min-width:2ch}.round{max-width:none}.round span,.round small{font:10px/1.2 var(--body)}
 #huntHud{padding:2px 4px;margin:2px 0;gap:0 7px;font:11px/1.25 var(--body);border-width:1px}#huntHud p{font:10px/1.2 var(--body);margin:0}#huntHud p:empty,#purgeMarks{display:none}#buffCounters,#jokerAvailability{max-height:24px;overflow:auto}
 .table-tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}.table-tools button{min-height:32px;padding:2px;font:10px/1.15 var(--body)}
 .zone-title,.hand-title{margin:1px 0;min-height:26px;gap:6px;font:11px/1.2 var(--body)}.zone-title .sort-button,.hand-title .sort-button{min-height:26px;padding:2px 5px;font-size:10px}
 #arena,#hand{flex:1 1 0;min-height:0;padding:12px 6px 6px;gap:6px}
 #arena .card{width:min(72px,calc((100vw - 72px)/5),calc((100dvh - 420px)*.356));min-width:0;border-width:2px}
 #hand .card{width:min(72px,calc((100vw - 66px)/5),calc((100dvh - 420px)*.356));min-width:0;border-width:2px}#arena:has(.card:nth-child(6)) .card{width:min(72px,calc((100vw - 76px)/6),calc((100dvh - 420px)*.356))}
 /* Unusually enlarged Hands retain readable cards and scroll only within their own row. */
 #hand:has(.card:nth-child(6)){justify-content:flex-start;overflow-x:auto;overflow-y:hidden}
 .inspection-controls{gap:4px}.inspection-controls #inspectCards,.inspection-controls #unpinCard{margin:1px;min-height:30px;padding:3px 6px;font:11px/1.2 var(--body)}
 #cardDetails{min-height:0;max-height:26px;overflow:auto;margin:1px 0;font:10px/1.2 var(--body)}#cardDetails:empty,#tallyStatus:empty{display:none}
 #tallyStatus,#clockStatus{margin:0;font:10px/1.2 var(--body);max-height:24px;overflow:auto}
 #status{min-height:0;margin:2px 0;font:11px/1.2 var(--body)}#cycleStatus{margin:1px 0;font:11px/1.2 var(--body)}
 .actions{position:static;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;padding:0;margin:2px 0}
 .actions button{grid-column:span 2;min-height:40px;padding:3px 4px;font:700 12px/1.2 var(--body);overflow-wrap:anywhere}.actions #purge,.actions #surrender{grid-column:span 3}
 #note{font:10px/1.2 var(--body);margin:2px 0;overflow-wrap:anywhere}
 #controllerPrompts{font-size:10px;line-height:1.2;margin:0 4px}.actions .pad-glyph{min-width:18px;min-height:18px;width:auto;height:auto;font-size:10px;margin-right:3px}
 dialog{max-height:calc(100dvh - 24px);overscroll-behavior:contain}
}
@media(max-width:700px) and (max-height:640px){
 .dealer{display:none}header{min-height:36px}.zone-title,.hand-title{min-height:24px}.actions button{min-height:36px}
 #arena .card{width:min(66px,calc((100vw - 72px)/5),calc((100dvh - 360px)*.356))}#hand .card{width:min(66px,calc((100vw - 66px)/5),calc((100dvh - 360px)*.356))}
 #arena:has(.card:nth-child(6)) .card{width:min(66px,calc((100vw - 76px)/6),calc((100dvh - 360px)*.356))}
}
@media(max-width:700px){
 /* Put inspection beside the Hand label instead of charging another full row. */
 .table{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto auto auto minmax(0,1fr) auto minmax(0,1fr) auto auto auto auto auto auto auto auto;align-content:stretch}
 .table>*{grid-column:1/-1}.scoreboard{grid-row:1}#huntHud{grid-row:2}.table-tools{grid-row:3}.zone-title{grid-row:4}#arena{grid-row:5}.hand-title{grid-row:6;grid-column:1;justify-content:flex-start}.inspection-controls{grid-row:6;grid-column:2;align-items:center}#hand{grid-row:7}#returnScry{grid-row:8}#cardDetails{grid-row:9}#tallyStatus{grid-row:10}#clockStatus{grid-row:11}#status{grid-row:12}#cycleStatus{grid-row:13}.actions{grid-row:14}#note{grid-row:15}
}

/* Preserve the documented interim Trail hitbox fix during active press. */
#runDialog[data-scene="map"] .trail-route:active:not(:disabled){transform:translate(-50%,-50%)}
