:root{font-family:Inter,system-ui,-apple-system,'Segoe UI',sans-serif;color:#f4eddc;background:#111b1a;color-scheme:dark;--gold:#e2bc72;--ink:#111d1c;--pale:#f0e4cf;--edge:#53635b;--panel:#1c2d29;--secondary:#9fb0a7;--mint:#8dc6ad}*{box-sizing:border-box}body{margin:0;min-width:320px;background:radial-gradient(ellipse at 25% -30%,#355449 0,transparent 65%),#101917}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.42;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #e7c886;outline-offset:3px}h1,h2,h3,h4,p{margin:0}h1,h2,.serif,.brand{font-family:Georgia,'Times New Roman',serif}h1{font-size:clamp(2.2rem,6vw,4.9rem);font-weight:500;line-height:1.04}h2{font-size:1.25rem;font-weight:500}h3{font-size:1rem;font-weight:650}small,.muted{color:var(--secondary)}.mini{font-size:.78rem;color:#bdc9bc}.mono{font-variant-numeric:tabular-nums}.top{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.85rem max(1rem,calc((100vw - 1500px)/2));background:#111b1bbf;border-bottom:1px solid #ffffff16;backdrop-filter:blur(12px)}.brand{display:flex;align-items:center;gap:.7rem;color:var(--gold);font-size:1.3rem;white-space:nowrap}.brand img{width:35px;height:40px;object-fit:cover;border-radius:4px}.tag{padding:.35rem .64rem;border:1px solid #d3b87b61;border-radius:20px;color:#e5cfac;font-size:.76rem}.top-right{display:flex;flex-wrap:wrap;align-items:center;justify-content:end;gap:.45rem}.btn{background:#35493e;color:#f3efe3;border:1px solid #7c927d70;padding:.67rem 1rem;border-radius:10px;font-weight:600;transition:filter .15s,transform .15s}.btn:not(:disabled):hover{filter:brightness(1.22);transform:translateY(-1px)}.btn.primary{background:linear-gradient(145deg,#e1bf80,#ad8544);color:#18241e;border-color:#ffe0a9}.btn.ghost{background:transparent}.btn.red{border-color:#bf7e66;color:#ffc3ae}.btn.tiny{padding:.34rem .57rem;font-size:.78rem}.btn.green{border-color:#83c5aa;color:#b5efd4}.shell{max-width:1535px;margin:0 auto;padding:16px;display:grid;gap:16px}.landing{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr;align-items:stretch;overflow:hidden}.art-cover{background:linear-gradient(90deg,#101917bb,#10191720),url('/assets/card-back.webp') center/cover;position:relative;display:flex;align-items:end;padding:4.5rem}.art-cover .pitch{max-width:580px;text-shadow:0 3px 20px #000}.eyebrow{color:#e5c37f;text-transform:uppercase;letter-spacing:.21em;font-size:.76rem;font-weight:750;margin-bottom:15px}.pitch p{max-width:470px;font-size:1.13rem;line-height:1.65;margin-top:18px;color:#f4ead7}.welcome{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3rem 2rem;gap:1rem}.welcome-card{width:min(460px,100%);background:#1e2c28;border:1px solid #69725b60;border-radius:20px;padding:30px;box-shadow:0 24px 70px #0005}.welcome-card h2{font-size:2rem;margin-bottom:.7rem}.form-row{display:flex;gap:9px;margin:14px 0}.form-col{display:grid;gap:10px;margin-top:1.1rem}.field{width:100%;min-width:0;padding:.78rem .85rem;border-radius:10px;border:1px solid #68786f66;color:var(--pale);background:#14211f}.divider-label{display:flex;align-items:center;gap:12px;margin:19px 0;color:#9fb5a8;font-size:.84rem}.divider-label:before,.divider-label:after{content:'';flex:1;height:1px;background:#ffffff2b}.rule-note{line-height:1.5;color:#b2bdb5;font-size:.85rem}.lobby{max-width:1050px;padding:32px 15px;margin:auto;display:grid;gap:20px}.center-head{text-align:center;margin:18px auto}.center-head h1{font-size:clamp(2.4rem,5vw,3.6rem);margin-bottom:9px}.panel{background:linear-gradient(150deg,#21342f,#182723);border:1px solid #81947c40;border-radius:16px;padding:18px;box-shadow:0 9px 32px #0002}.panel.highlight{border-color:#bd9959}.lobby-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:18px}.players{display:grid;gap:10px;margin-top:15px}.player-row{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:12px 14px;border-radius:11px;background:#ffffff0c}.player-row .you{color:var(--gold)}.dot{width:8px;height:8px;display:inline-block;border-radius:50%;background:#7fd0a3;margin-right:6px}.dot.off{background:#7b8782}.big-code{font-size:2.5rem;letter-spacing:.14em;color:var(--gold);font-weight:750;margin:14px 0}.board{display:grid;grid-template-columns:minmax(225px,1fr) minmax(430px,2.4fr) minmax(240px,1.12fr);gap:14px;align-items:start}.stack{display:grid;gap:14px}.sectionhead{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-bottom:12px;flex-wrap:wrap}.stat{display:inline-block;font-size:.76rem;color:#e6cc96;border:1px solid #b69b655a;border-radius:30px;padding:.22rem .55rem}.score-list{display:grid;gap:10px}.score{border-left:3px solid #607d70;background:#ffffff0a;padding:9px;border-radius:6px;display:grid;grid-template-columns:1fr auto;gap:6px}.score.mine{border-left-color:var(--gold);background:#e6bc6a0c}.score strong{font-size:1.55rem;color:#f7e7c8}.score .names{font-size:.8rem;color:#b8cabc}.turn-banner{background:linear-gradient(95deg,#415943,#2a4239);border:1px solid #94b49a59;border-radius:13px;padding:12px 15px;display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.turn-banner.mine{background:linear-gradient(95deg,#a87e39,#66542f);border-color:#e5bf70}.table-team{margin:10px 0;padding:12px 11px;border:1px solid #8aa29430;border-radius:12px;background:#101a1875}.table-team.mine{border-color:#cfaf6957}.team-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:11px;gap:8px}.meld-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:9px}.meld{padding:8px;border-radius:9px;background:#f3f0e40b;border:1px solid #b9bea424;min-width:0}.meld .title{font-weight:700;font-size:.77rem}.meld .sub{font-size:.7rem;color:#c3b18c}.meld .fan{height:95px;display:flex;position:relative;overflow:hidden;margin-top:7px}.meld .fan img{width:59px;height:87px;object-fit:contain;border-radius:4px;position:relative;flex:none;margin-right:-38px;box-shadow:1px 2px 5px #0009}.meld .fan img:last-child{margin-right:0}.meld.empty{background:transparent;color:#8caaa0;border-style:dashed;text-align:center;padding:19px}.piles{display:flex;align-items:center;justify-content:center;gap:16px;padding:10px 0 14px}.pile{text-align:center}.pile img{height:147px;width:104px;object-fit:contain;border-radius:7px;box-shadow:0 10px 24px #0008}.pile strong{display:block;font-size:.78rem;margin:8px}.pile .count{font-size:.75rem;color:#bcd0c5}.pile .empty-card{width:104px;height:147px;border:2px dashed #7b8c7a;display:grid;place-items:center;border-radius:9px;color:#889e93}.piles .arrow{font-size:1.6rem;color:#beab7b}.mistrust{background:#824f34;display:inline-block;padding:3px 8px;border-radius:20px;font-size:.75rem;color:#ffe3c0}.hand-area{position:sticky;bottom:0;background:linear-gradient(180deg,#16241ef1,#12201dfc);border-top:2px solid #e0bd7850;padding:11px 16px 16px;backdrop-filter:blur(15px);z-index:8;box-shadow:0 -10px 38px #0005}.hand-head{max-width:1500px;margin:auto;display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.hand-wrap{max-width:1520px;overflow-x:auto;margin:10px auto 0;display:flex;gap:7px;padding:7px 2px 16px;scroll-snap-type:x proximity}.hand-card{flex:none;position:relative;border:2px solid transparent;border-radius:10px;padding:0;background:transparent;transition:transform .15s,border-color .15s;scroll-snap-align:start}.hand-card img{width:clamp(78px,9vw,124px);height:clamp(116px,13.5vw,183px);object-fit:contain;display:block;border-radius:7px;box-shadow:0 5px 13px #000b}.hand-card.selected{transform:translateY(-10px);border-color:#f5c96c;box-shadow:0 0 0 3px #f6ce7866}.hand-card .hint{position:absolute;bottom:-13px;left:0;right:0;text-align:center;color:#f4cc7c;font-size:.72rem;font-weight:750}.actions{max-width:1520px;margin:0 auto;display:flex;gap:7px;flex-wrap:wrap;align-items:center}.actions .field{width:190px;padding:.55rem}.actions .btn{padding:.52rem .79rem;font-size:.86rem}.event{display:flex;gap:8px;border-bottom:1px solid #ffffff0f;padding:7px 0;color:#bacbbf;font-size:.78rem;line-height:1.35}.event:before{content:'◆';color:#b8985c;font-size:.55rem;margin-top:.18rem}.objective-card{width:100%;max-height:245px;object-fit:contain;border-radius:12px;margin:8px 0}.objectives-choice{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.objective-choice{background:#151e1a;border:1px solid #ad996b45;padding:12px;border-radius:13px;text-align:center}.objective-choice img{width:100%;object-fit:contain;border-radius:8px}.objective-choice h3{margin:10px 0}.objective-choice p{font-size:.8rem;margin:5px 0 12px;color:#c5d1c4}.center{max-width:1050px;margin:3.5vh auto;padding:15px}.center h1{font-size:clamp(1.7rem,4vw,2.8rem);margin-bottom:9px}.round-table{width:100%;border-collapse:collapse;margin:15px 0;overflow:auto;display:block}.round-table th,.round-table td{padding:10px;border-bottom:1px solid #ffffff1b;text-align:right;font-size:.84rem;white-space:nowrap}.round-table th:first-child,.round-table td:first-child{text-align:left}.round-table td:last-child{font-weight:800;color:#eec982}.round-table thead{color:#b9c9bc}.help{line-height:1.5}.help li{margin:7px 0}.help-summary{font-size:.85rem}.help-summary summary{cursor:pointer;color:#e6c78c;font-weight:600}.help-summary p{margin:10px 0}.mini-gallery{display:flex;gap:6px;flex-wrap:wrap}.mini-gallery img{height:77px;width:53px;object-fit:contain}.overlay{position:fixed;inset:0;background:#060d0bcc;display:grid;place-items:center;z-index:40;padding:12px}.modal{width:min(640px,100%);max-height:94dvh;overflow:auto;background:#22332c;border:1px solid #bdab7c;border-radius:18px;padding:22px;box-shadow:0 25px 70px #000b}.modal h2{margin-bottom:9px}.modal p{color:#c6d5c8;line-height:1.45;margin:8px 0}.modal .option-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:15px 0}.target{border:1px solid #647f70;padding:9px;border-radius:10px;background:#182821;color:#fff;text-align:left}.target:hover{border-color:#e7ba78}.target:disabled{opacity:.45}.target img{height:92px;width:65px;object-fit:contain;float:left;margin-right:9px}.target .caption{font-size:.75rem;color:#c7d1c3}.toast{position:fixed;right:14px;top:15px;background:#8a4e3d;color:white;max-width:460px;padding:13px 19px;border-radius:12px;z-index:80;box-shadow:0 12px 40px #0008;display:none}.toast.show{display:block}.badge{display:inline-block;border-radius:20px;padding:.2rem .5rem;background:#527464;color:#f3f6ee;font-size:.71rem}.badge.gold{background:#a27c3d}.badge.warn{background:#7e4d44}.spacer{flex:1}.scrollable{overflow:auto}.notice{border:1px solid #c4a66488;border-radius:10px;background:#886d312a;padding:12px;font-size:.88rem;line-height:1.45;margin:8px 0}.endgame{font-size:1.35rem;color:#ffe1a7}.tiny-image{width:45px;height:60px;object-fit:contain;border-radius:3px}.visually-hidden{position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);overflow:hidden}#app:has(.board){padding-bottom:275px}@media(max-width:1200px){.board{grid-template-columns:240px minmax(350px,1fr)}.rightcol{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:14px}.rightcol>.panel{height:100%}}@media(max-width:770px){.landing{grid-template-columns:1fr}.art-cover{min-height:220px;padding:1.6rem}.pitch p{font-size:.89rem}.welcome{padding:20px}.welcome-card{padding:22px}.lobby-grid{grid-template-columns:1fr}.board{grid-template-columns:1fr}.rightcol{grid-column:auto;display:grid;grid-template-columns:1fr}.board>.stack:first-child{display:grid;grid-template-columns:1fr 1fr;align-items:start}.board>.stack:first-child .panel{height:100%}.board>.stack:first-child .panel:nth-child(3){grid-column:1/-1}.hand-card img{width:90px;height:136px}.hand-area{padding:9px 10px 13px}.objectives-choice{grid-template-columns:1fr}.objective-choice img{height:170px}.top{padding:9px}.tag{font-size:.67rem}.brand{font-size:1.06rem}.pile img{height:120px;width:84px}.pile .empty-card{height:120px;width:84px}#app:has(.board){padding-bottom:258px}}@media(max-width:430px){.board>.stack:first-child{grid-template-columns:1fr}.board>.stack:first-child .panel:nth-child(3){grid-column:auto}.actions .field{width:150px}.btn{padding:.56rem .7rem}.meld-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.top-right .tag:last-child{display:none}.top-right .btn{padding:.36rem .48rem}.hand-card img{width:79px;height:119px}#app:has(.board){padding-bottom:252px}} 

/* v0.2: keep the hand readable before objective selection and during play. */
.hand-group{display:flex;flex-direction:column;flex:none;gap:6px;padding-right:13px;border-right:1px solid #a38f5f44;min-width:0}
.hand-group:last-child{border-right:0;padding-right:0}
.hand-group-title{font-size:.74rem;color:#f0ca80;font-weight:700;letter-spacing:.04em}
.hand-group-cards{display:flex;gap:7px;align-items:flex-start}
.hand-preview-wrap{max-width:100%;margin-top:14px;padding:6px 2px 14px;scrollbar-color:#ae965f #20302b}
.hand-card-preview{cursor:default;margin:0}
.hand-card-preview figcaption{font-size:.74rem;color:#e7c992;text-align:center;padding-top:4px}
.pregame{max-width:1270px;margin:18px auto 35px;display:grid;gap:20px}
.pregame>h1{margin-bottom:0}
.pregame-hand{border-color:#bda267}
.pregame-hand>.mini{margin-bottom:3px}
.objective-step{display:grid;gap:7px}
.objective-step .eyebrow{margin:0}
.objective-wait{max-width:670px}
.objective-wait p{margin:12px 0}
.objective-wait .objective-card{max-width:220px}
@media(max-width:770px){.pregame{gap:16px;margin:9px auto}.pregame-hand{padding:12px}.hand-group{padding-right:9px}.hand-group-cards{gap:5px}}

/* v0.3: distinguish cards obtained this round and stage large draw previews. */
.hand-card.newly-acquired{border-color:#e7ba66;background:#80601c3d;box-shadow:0 0 0 2px #ffe29d77,0 0 22px #cda14e6a;}
.hand-card.newly-acquired img{filter:brightness(1.08)}
.hand-card.newly-acquired.selected{border-color:#fff2bb;box-shadow:0 0 0 3px #ffde89,0 0 26px #f3c361b7;}
.new-card-tag{position:absolute;top:4px;left:4px;z-index:2;color:#261e0d;background:#ffe0a0;border-radius:4px;padding:2px 5px;font-size:.68rem;font-weight:900;box-shadow:0 2px 6px #0007}
.draw-reveal-overlay{position:fixed;inset:0;z-index:70;display:grid;place-items:center;background:#06110dec;backdrop-filter:blur(8px);padding:12px}
.draw-reveal-panel{max-height:98dvh;overflow-y:auto;width:min(480px,100%);text-align:center;padding:16px 20px 21px;border:2px solid #e5c382;border-radius:19px;background:linear-gradient(150deg,#2b402f,#162720);box-shadow:0 22px 75px #000d,0 0 36px #d8b26b4d}
.draw-reveal-panel .eyebrow{color:#f5cf85}.draw-reveal-panel h2{font-size:clamp(1.1rem,2.8vw,1.55rem);margin:4px 0 12px}
.draw-reveal-image{width:auto;max-width:min(83vw,330px);height:auto;max-height:49dvh;object-fit:contain;border-radius:11px;box-shadow:0 10px 30px #000a}
.draw-reveal-value{color:#ffe5b1;font-weight:900;font-size:1.15rem;margin:10px 0 4px}
.draw-reveal-explain{font-size:.9rem;line-height:1.4;color:#e5eee5;max-width:380px;margin:7px auto}
.draw-reveal-panel .mini{display:block;margin:8px 0 15px}.reveal-confirm{width:100%;max-width:260px;min-height:44px}
@media(max-height:640px){.draw-reveal-image{max-height:40dvh}.draw-reveal-panel{padding:9px 12px}.draw-reveal-panel h2{margin:2px 0 6px}}

.meld .fan img.newly-acquired-table{outline:3px solid #e9c06c;outline-offset:-3px;filter:brightness(1.16);box-shadow:0 0 14px #ecc87888;z-index:3}

/* v0.4 — explicit MPR tracker and per-card wild allocation. */
.association-planner{max-width:1520px;margin:10px auto 7px;display:grid;grid-template-columns:minmax(260px,1.2fr) minmax(245px,1fr);align-items:start;gap:10px;max-height:215px;overflow-y:auto;scrollbar-color:#b89b61 #1b2a24}
.association-tracker,.wild-allocation{min-width:0;background:#0c1916;border:1px solid #ab956064;border-radius:12px;padding:10px 13px}
.association-tracker{border-color:#bd9867;background:linear-gradient(110deg,#2c3224,#17291f)}
.association-tracker.ready{border-color:#92cca0}
.tracker-heading,.tracker-numbers,.wild-allocation-heading{display:flex;justify-content:space-between;align-items:center;gap:9px;flex-wrap:wrap}
.tracker-heading>strong{font-size:.94rem;color:#fbe2ad}.tracker-mpr{font-size:.72rem;color:#e7c891;font-weight:700}
.tracker-numbers{margin-top:4px}.tracker-total{font-weight:900;font-size:clamp(1.12rem,2vw,1.48rem);color:#ffdd94}.tracker-state{font-size:.8rem;color:#f4d7a3}
.tracker-bar{height:9px;overflow:hidden;border-radius:12px;background:#0b1813;margin:6px 0 7px;border:1px solid #a58d5b5c}
.tracker-fill{height:100%;background:linear-gradient(90deg,#9c833f,#f0c875);transition:width .2s}
.association-tracker.ready .tracker-fill{background:linear-gradient(90deg,#76a98b,#afe5ad)}
.association-chips{display:flex;gap:5px;flex-wrap:wrap}.association-chip{background:#2c4939;color:#e9eedc;border:1px solid #b6caa044;border-radius:7px;font-size:.73rem;padding:4px 7px}.association-chip.invalid{border-color:#d79e73;color:#ffd0a2;background:#65392366}
.association-errors{margin:6px 0 0;padding-left:18px;color:#ffd0ae;font-size:.74rem;line-height:1.4}
.tracker-ready,.tracker-tip{font-size:.74rem;line-height:1.3;margin:5px 0 0;color:#bfe4bc}
.tracker-tip{color:#d4c6a9}
.wild-allocation-heading b{font-size:.89rem;color:#ffe2ae}
.wild-allocation-rows{display:grid;gap:7px;margin-top:8px}
.wild-allocation-row{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:5px 7px;border:1px solid #b49b6344;border-radius:8px;background:#ffffff08;min-width:0}
.wild-allocation-row>span{display:flex;align-items:center;gap:8px;min-width:0}
.wild-allocation-row b{display:block;font-size:.73rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wild-allocation-row small{display:block;font-size:.67rem;color:#d8c99f}
.wild-allocation-row .wild-icon{height:48px;width:33px;object-fit:contain;border-radius:3px;flex:none}
.wild-allocation-row select{width:175px;min-width:120px;padding:.5rem;font-size:.77rem;flex:none}
@media(max-width:770px){.association-planner{grid-template-columns:minmax(0,1fr);max-height:178px;gap:7px;margin:8px auto}.association-tracker,.wild-allocation{padding:8px 10px}.tracker-total{font-size:1.12rem}.tracker-heading>strong{font-size:.84rem}.hand-area{max-height:min(75dvh,520px);overflow-y:auto}#app:has(.board){padding-bottom:510px}}
@media(min-width:771px){#app:has(.board){padding-bottom:500px}}
@media(max-width:430px){.association-planner{max-height:175px}.wild-allocation-row select{width:144px;min-width:95px}.wild-allocation-row b{max-width:125px}.hand-area{max-height:70dvh}}
.quick-mpr{padding:5px 9px;border:1px solid #d4b875;border-radius:7px;background:#493e2166;color:#ffe3a3;font-size:.76rem;font-weight:800;white-space:nowrap}
.quick-mpr.ready{border-color:#9dcb9f;color:#dcf4cb;background:#315b3870}
@media(max-width:430px){.quick-mpr{font-size:.72rem;padding:4px 6px}}

/* v0.5: automatic special cards use the original card art as a clear animated notice. */
.auto-effect-overlay{background:#06110df2}
.auto-effect-panel{width:min(570px,100%);border-color:#f2d391;animation:effect-arrive .38s ease-out both}
.auto-effect-panel .eyebrow{color:#b5edc7}
.auto-visual{display:flex;align-items:center;justify-content:center;gap:clamp(8px,3vw,30px);margin:14px auto}
.auto-visual>.draw-reveal-image{max-width:min(52vw,260px);max-height:42dvh}
.automatic-card{animation:automatic-play .9s cubic-bezier(.2,.8,.2,1) both;box-shadow:0 13px 40px #000d,0 0 26px #e7c780aa}
.auto-visual-steps{display:grid;justify-items:center;gap:9px;min-width:132px;color:#ffe2a4}
.auto-visual-steps strong{font-size:clamp(.86rem,2vw,1.05rem);line-height:1.3}
.auto-visual-steps small{font-size:.77rem;color:#c7dbc9}
.auto-burst{font-size:2.2rem;animation:spark-pulse 1.2s ease-in-out infinite alternate}
.auto-direction{font-size:1.6rem;opacity:.8}
.auto-draw-count{background:#e8c985;color:#1b2c25;font-size:1.25rem;font-weight:900;border-radius:12px;padding:9px 15px;box-shadow:0 0 21px #e8be6a6a}
.auto-mini{display:flex;gap:12px;align-items:center;margin-top:8px}
.auto-mini img{width:65px;height:92px;object-fit:contain;border-radius:5px;flex:none}
.auto-mini b{color:#ffe1aa;font-size:.9rem}.auto-mini p{line-height:1.4;margin-top:5px}
.magistrate-mini{width:29px;height:42px;object-fit:contain;vertical-align:middle;margin-left:4px;border:1px solid #e5bc75;border-radius:4px}
@keyframes effect-arrive{from{transform:translateY(15px) scale(.96);opacity:.2}to{transform:translateY(0) scale(1);opacity:1}}
@keyframes automatic-play{from{transform:rotate(-9deg) scale(.8);filter:brightness(1.45)}to{transform:rotate(0) scale(1);filter:brightness(1)}}
@keyframes spark-pulse{from{transform:scale(.9);opacity:.65}to{transform:scale(1.25);opacity:1}}
@media(max-width:430px){.auto-visual{gap:6px}.auto-visual>.draw-reveal-image{max-width:48vw;max-height:38dvh}.auto-visual-steps{min-width:105px}.auto-visual-steps strong{font-size:.78rem}.auto-draw-count{font-size:1rem;padding:7px 9px}}
@media(prefers-reduced-motion:reduce){.automatic-card,.auto-effect-panel,.auto-burst{animation:none}}

.magistrate-mini.newly-acquired-table{border:2px solid #f4d188;box-shadow:0 0 15px #eac77eaa;filter:brightness(1.1)}


/* v0.5 multiplayer visuals — real-time public announcements and table-activity gallery. */
.public-action-notice{position:fixed;z-index:60;top:clamp(8px,7vh,80px);left:50%;transform:translateX(-50%);width:min(620px,calc(100vw - 20px));max-height:76dvh;overflow:auto;padding:12px 15px 13px;border:2px solid #e6c88b;border-radius:16px;color:#f7edce;background:linear-gradient(142deg,#243c32 0%,#15251f 96%);box-shadow:0 18px 65px #000c,0 0 22px #e9c77c65;animation:public-action-arrive .32s ease-out both;pointer-events:auto}
.public-action-notice.is-guild{border-color:#f6df91;box-shadow:0 18px 65px #000d,0 0 36px #f7c26eac}
.public-action-top,.public-action-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}
.public-action-type{color:#ffdfa3;font-size:.74rem;text-transform:uppercase;letter-spacing:.1em;font-weight:850}
.public-action-close,.public-action-next{cursor:pointer;background:#a48c5c22;border:1px solid #dfc38577;border-radius:7px;color:#ffe6ac;padding:5px 10px;font:inherit}
.public-action-close{font-size:1rem;line-height:1}
.public-action-body{display:flex;align-items:center;gap:14px;margin:8px 0 12px}
.public-action-art{display:flex;align-items:center;min-height:136px;min-width:95px;flex:none}
.public-action-art img{height:135px;width:auto;max-width:100px;object-fit:contain;border-radius:6px;box-shadow:0 4px 14px #0009;animation:automatic-play .52s ease-out both}
.public-action-art img+img{margin-left:-60px;transform-origin:center}
.public-action-more{padding:4px 8px;background:#1a3027;border-radius:7px;border:1px solid #dbc07b;white-space:nowrap;margin-left:6px;font-size:.75rem}
.public-action-copy{min-width:0}.public-action-copy h3{font-size:clamp(1.08rem,2vw,1.4rem);color:#f5dc9f;margin:4px 0 9px;line-height:1.2}.public-action-copy p{color:#d8e4d4;line-height:1.4;font-size:.88rem;margin:0}
.public-action-copy .public-action-actor{color:#b9e1b3;font-weight:800;font-size:.78rem}
.public-action-footer{border-top:1px solid #8e9b8066;padding-top:9px;color:#d3c9a4;font-size:.72rem}
.public-activity-item{display:flex;gap:10px;align-items:center;border-top:1px solid #d3b98025;padding:8px 0}
.public-activity-item img{height:61px;width:42px;object-fit:contain;flex:none;border-radius:4px}
.public-activity-item strong{font-size:.79rem;color:#ffe4ae;line-height:1.35;display:block}
.public-activity-item p{font-size:.72rem;margin:4px 0 0;line-height:1.4}
@media(max-width:430px){.public-action-notice{top:8px;padding:9px 11px}.public-action-body{gap:9px}.public-action-art{min-height:98px;min-width:64px}.public-action-art img{height:100px;max-width:70px}.public-action-art img+img{margin-left:-48px}.public-action-copy h3{font-size:1.02rem}.public-action-copy p{font-size:.76rem}.public-action-footer{font-size:.65rem}}
@media(prefers-reduced-motion:reduce){.public-action-notice,.public-action-art img{animation:none}}

@keyframes public-action-arrive{from{transform:translate(-50%,12px) scale(.97);opacity:0}to{transform:translate(-50%,0) scale(1);opacity:1}}


/* v0.6 — per-player hand counts, wild composition and completed Guildhall covers */
.player-row{gap:9px;min-width:0;flex-wrap:wrap}
.player-ident{min-width:0;overflow-wrap:anywhere;font-weight:650;font-size:.85rem}
.player-stats{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.hand-count{display:inline-flex;gap:4px;align-items:center;border:1px solid #ebc98089;border-radius:7px;padding:4px 8px;color:#ffe3aa;background:#a8843d24;white-space:nowrap;font-size:.76rem}
.hand-count strong{font-size:1.05rem}
.meld.is-guild{grid-column:1 / -1;border-color:#d8b87589;background:#e0bf7340;box-shadow:inset 0 1px 9px #e8c7791a}
.meld .wild-status{display:inline-block;font-size:.69rem;line-height:1.15;margin-top:5px;padding:3px 7px;border:1px solid #95c7ac8a;border-radius:12px;color:#c0ebca;background:#4274533d;font-weight:700}
.meld .wild-status.has-wilds{border-color:#dcad6c9a;color:#ffda9f;background:#8160354d}
.meld.is-guild .fan{height:129px;margin-top:7px;align-items:flex-start;padding:2px 5px;overflow:hidden}
.meld.is-guild .fan>img{width:77px;height:117px;margin-right:-39px}
.meld.is-guild .fan>img:last-of-type{margin-right:0}
/* The original artwork has been rotated clockwise into its intended horizontal orientation. */
.guildhall-ribbon{position:absolute;left:50%;top:51%;transform:translate(-50%,-50%);width:min(255px,80%);height:91px;z-index:5;pointer-events:none;overflow:hidden;border:2px solid #e8cb87;border-radius:8px;box-shadow:0 5px 18px #000d,0 0 14px #e5b85d8f;background:#19271e}
.guildhall-ribbon>img{display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:fill!important;opacity:.93;filter:saturate(.91);margin:0!important;border-radius:0!important;box-shadow:none!important}
.guildhall-caption{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,#0a1212e9);padding:12px 5px 4px;text-align:center;white-space:nowrap;color:#ffe6aa;font-size:.71rem;font-weight:750;text-shadow:0 2px 3px #000}
/* A draw always appears as a face-down card, never its private identity. */
.public-action-notice.is-turn-choice{border-color:#8bd2b7}
.public-action-art.is-turn-choice{position:relative}
.public-choice-symbol{position:absolute;right:-5px;bottom:2px;min-width:35px;min-height:35px;display:grid;place-items:center;font-size:1.5rem;background:#e8c887;color:#18241e;border-radius:50%;border:2px solid #3f5848;box-shadow:0 3px 12px #000b}
@media(max-width:430px){.player-row{gap:5px}.hand-count{font-size:.7rem;padding:3px 5px}.guildhall-ribbon{width:min(235px,85%);height:86px}.meld.is-guild .fan{height:119px}.meld.is-guild .fan>img{height:107px;width:73px}}

.top-card-counts{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:0 2px}
.top-card-count{display:inline-flex;align-items:center;gap:7px;padding:5px 10px;border-radius:9px;background:#1f3430;border:1px solid #617c70;color:#e1efe0;font-size:.78rem}
.top-card-count b{color:#ffe1a3}
.top-card-count.own{background:#5e4a2785;border-color:#c4a463}
@media(max-width:430px){.top-card-counts{gap:5px}.top-card-count{font-size:.69rem;padding:4px 7px;gap:4px}}

/* Bag of Silver: two-stage, explicit wild destination selection. */
.silver-stolen-card{display:flex;align-items:center;gap:16px;padding:12px;border:1px solid #d5b87570;border-radius:12px;background:#b68d4221;margin:12px 0}
.silver-stolen-card>img{width:108px;height:151px;object-fit:contain;border-radius:7px;flex:none}
.silver-stolen-card strong{color:#f5d596}
.silver-destinations{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:9px;margin:14px 0}
.silver-destination{min-height:90px;display:flex;flex-direction:column;gap:5px;border-color:#c19c5e;cursor:pointer}
.silver-destination strong{font-size:1.03rem;color:#ffe2a5}
.silver-destination span{font-size:.81rem;color:#d5e1d3}
.silver-destination small{font-size:.73rem;color:#ecc887}
.silver-destination:focus-visible{outline:3px solid #ffdfa0;outline-offset:3px}
@media(max-width:430px){.silver-stolen-card>img{width:75px;height:106px}.silver-destinations{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v0.7: click/tap any public association or guild for a larger read-only inspection. */
.meld-inspect{display:block;width:100%;font:inherit;color:inherit;text-align:left;cursor:zoom-in;transition:border-color .16s,box-shadow .16s,background .16s}
.meld-inspect>.title,.meld-inspect>.sub,.meld-inspect>.fan{display:block}
.meld-inspect>.fan{display:flex}
.meld-inspect>.guildhall-ribbon{pointer-events:none}
.meld-inspect:hover{border-color:#e2c179;background:#e2c17920;box-shadow:0 0 0 1px #e2c17955}
.meld-inspect:focus-visible{outline:3px solid #f5df9f;outline-offset:3px}
.meld-view-hint{display:block;margin-top:8px;color:#eac780;font-size:.67rem;font-weight:800;letter-spacing:.015em}
.meld-inspection-overlay{z-index:65}
.meld-inspection-dialog{width:min(1030px,100%);max-height:min(95dvh,950px);padding:clamp(15px,2.4vw,28px);background:linear-gradient(155deg,#294137,#182b26);border:2px solid #dcbd7b;overscroll-behavior:contain}
.meld-inspection-top{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:18px}
.meld-inspection-top h2{font-size:clamp(1.75rem,4vw,2.7rem);color:#ffe3a7;margin-bottom:5px}
.meld-inspection-top .eyebrow{margin-bottom:6px}
.meld-inspection-top .meld-inspection-subtitle{font-size:.86rem;color:#d2decf;margin:6px 0 0}
.meld-inspection-close{flex:none;border:1px solid #dfc182;color:#ffe6ae;background:#3c4a37;border-radius:10px;font:inherit;font-size:1.2rem;line-height:1;padding:10px 14px;cursor:pointer}
.meld-inspection-close:hover{background:#5a5940}
.meld-inspection-guildhall{position:relative;margin:7px auto 18px;width:100%;min-height:155px;max-height:210px;overflow:hidden;border:2px solid #d6b66d;border-radius:12px;box-shadow:0 5px 24px #0008}
.meld-inspection-guildhall img{display:block;width:100%;height:clamp(150px,22vw,210px);object-fit:fill}
.meld-inspection-guildhall span{position:absolute;bottom:0;left:0;right:0;text-align:center;font-size:clamp(.79rem,2vw,1.02rem);font-weight:800;color:#fff0be;padding:26px 10px 12px;background:linear-gradient(transparent,#091716ed);text-shadow:0 2px 5px #000}
.meld-inspection-stats{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}
.meld-inspection-stats>span{display:inline-flex;align-items:baseline;gap:5px;padding:7px 12px;border:1px solid #cbba7d75;border-radius:24px;background:#e6c57f15;color:#dfebdc;font-size:.84rem}
.meld-inspection-stats strong{font-size:1.05rem;color:#ffe2a4}
.meld-inspection-stats .inspection-challenged{border-color:#e4a38a;color:#ffcab5}
.meld-inspection-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(128px,1fr));gap:15px;margin:8px 0 20px}
.meld-inspection-card{min-width:0;margin:0;padding:11px 8px 9px;border:1px solid #a8a48b40;background:#07181050;border-radius:12px;text-align:center}
.meld-inspection-card img{display:block;width:100%;height:clamp(170px,24vw,242px);object-fit:contain;border-radius:8px;filter:drop-shadow(0 7px 9px #0008)}
.meld-inspection-card figcaption{display:flex;flex-direction:column;gap:4px;margin-top:7px;font-size:.78rem;line-height:1.3;overflow-wrap:anywhere}
.meld-inspection-card figcaption strong{color:#ffe5b1}
.meld-inspection-card figcaption span{color:#c9d9cc;font-variant-numeric:tabular-nums}
.meld-inspection-bottom{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap;padding-top:13px;border-top:1px solid #ffffff25;color:#cad8c8;font-size:.77rem}
@media(max-width:540px){.meld-inspection-dialog{max-height:96dvh;padding:14px}.meld-inspection-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.meld-inspection-card{padding:7px 4px}.meld-inspection-card img{height:clamp(140px,53vw,220px)}.meld-inspection-guildhall{min-height:100px;max-height:130px}.meld-inspection-guildhall img{height:130px}.meld-inspection-stats{gap:5px}.meld-inspection-stats>span{padding:5px 8px;font-size:.73rem}.meld-inspection-top .eyebrow{font-size:.66rem}.meld-inspection-top h2{font-size:1.7rem}.meld-inspection-close{padding:7px 10px}}
@media(prefers-reduced-motion:reduce){.meld-inspect{transition:none}}
/* Preserve the original Guildhall illustration's proportions in the enlarged view. */
.meld-inspection-guildhall{width:min(395px,100%);min-height:0;max-height:none}
.meld-inspection-guildhall img{height:auto;max-height:none;object-fit:contain}
@media(max-width:540px){.meld-inspection-guildhall{width:min(330px,100%);min-height:0;max-height:none}.meld-inspection-guildhall img{height:auto;max-height:none}}

/* v0.9 — local AI opponents */
.bot-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:18px;padding-top:15px;border-top:1px solid #b6b49b3d}
.bot-controls .mini{flex:1;min-width:170px;line-height:1.45}
.ai-icon{font-size:1rem;margin-right:5px;color:#eed08d}
.ai-label{display:inline-flex;align-items:center;font-size:.67rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#162e25;background:#dbbd81;padding:2px 6px;border-radius:5px;margin-left:6px}
.bot-remove{color:#f3c9bc;border-color:#ca857d66!important}

.ai-turn-marker{display:inline-flex;margin-left:7px;color:#142a20;background:#d9c086;padding:3px 9px;border-radius:18px;font-size:.72rem;font-weight:800;white-space:nowrap}

/* v1.0: original Guildhall graphic proportions, no redundant overprint. */
.guildhall-ribbon{width:min(164px,68%);height:auto;aspect-ratio:1122 / 822;top:50%;border-radius:6px}
.guildhall-ribbon>img{width:100%!important;height:100%!important;object-fit:contain!important;opacity:1}
.guildhall-caption{display:none!important}
.meld-inspection-guildhall{width:min(395px,100%);height:auto;min-height:0;max-height:none;aspect-ratio:1122 / 822;overflow:visible}
.meld-inspection-guildhall img{display:block;width:100%;height:100%;max-height:none;object-fit:contain}
.meld-inspection-guildhall span{display:none}
@media(max-width:430px){.guildhall-ribbon{width:min(150px,68%)}.meld-inspection-guildhall{width:min(330px,100%);height:auto;min-height:0;max-height:none}.meld-inspection-guildhall img{height:100%}}
/* Only outline the face-up card, never the entire discard-pile panel. */
/* The card inspector nests the face-up card inside .discard-image-wrap.
   Keep the eligibility glow on the IMAGE only, not the pile panel or magnifier. */
.discard-pile.pickup-available .discard-image-wrap > .discard-inspect-card > img{
  outline:3px solid #7fee9e;
  outline-offset:2px;
  box-shadow:0 0 12px 4px #48cb7299,0 10px 24px #0008;
}
@media (prefers-reduced-motion:no-preference){
  .discard-pile.pickup-available .discard-image-wrap > .discard-inspect-card > img{animation:pickup-card-glow 2.4s ease-in-out infinite}
}
@keyframes pickup-card-glow{
  50%{box-shadow:0 0 18px 5px #67e68bde,0 10px 24px #0008}
}

/* v0.11 expanded Help dropdown: legible at narrow sidebar widths. */
.help-reference{font-size:.81rem;line-height:1.5}
.help-reference>summary{list-style-position:outside;cursor:pointer;font-size:.98rem;font-weight:800;color:#f4d593;line-height:1.4}
.help-reference>summary:focus-visible,.help-topic>summary:focus-visible{outline:2px solid #ffdfa0;outline-offset:4px;border-radius:4px}
.help-summary-sub{display:block;font-size:.70rem;color:#c1cfc1;font-weight:500;padding-left:3px}
.help-reference .help-body{display:grid;gap:9px;padding-top:10px}
.help-intro{margin:0 0 1px;color:#d6e0d4}
.help-current-mpr{display:flex;gap:4px 8px;align-items:center;justify-content:space-between;flex-wrap:wrap;background:#ad8c3c20;border:1px solid #e6c77960;border-radius:9px;padding:10px}
.help-current-mpr>span{font-size:.79rem;font-weight:600;max-width:60%}
.help-current-mpr>strong{font-variant-numeric:tabular-nums;font-size:1.12rem;white-space:nowrap;color:#ffdf9b}
.help-current-mpr small{flex-basis:100%;color:#b9caba;font-size:.72rem}
.help-topic{min-width:0;border:1px solid #a3b3a241;border-radius:8px;background:#111f1aaa;overflow:hidden}
.help-topic>summary{padding:10px 9px;cursor:pointer;color:#f0d59c;font-weight:750;font-size:.80rem;line-height:1.32}
.help-topic[open]>summary{border-bottom:1px solid #a3b3a241;background:#ffffff09}
.help-topic-body{min-width:0;padding:3px 10px 10px;color:#cddbcf;overflow-wrap:anywhere}
.help-topic-body p{margin:9px 0;line-height:1.55}
.help-topic-body ol{padding-left:17px;margin:8px 0}
.help-topic-body li{margin:7px 0}
.help-mpr-list{margin:10px 0;border:1px solid #d8c38b44;border-radius:7px;overflow:hidden}
.help-mpr-row{display:flex;gap:8px;align-items:center;padding:7px 8px;border-bottom:1px solid #d8c38b2c;background:#e4d3a508}
.help-mpr-row:last-child{border-bottom:0}
.help-mpr-row strong{flex:none;width:50px;color:#ffe09e;font-variant-numeric:tabular-nums}
.help-mpr-row span{min-width:0;font-size:.72rem;line-height:1.55}
.help-glossary{margin:7px 0}
.help-glossary dt{color:#ffdda0;font-weight:750;margin:11px 0 3px}
.help-glossary dd{margin:0 0 8px;line-height:1.55}
.help-reference .help-footnote{color:#b1c2b3;font-size:.72rem;line-height:1.45;margin:6px 1px}
@media(max-width:770px){.help-reference{font-size:.86rem}.help-topic>summary{font-size:.88rem}}

/* v0.12: the initial hand and secret objectives share the board's content grid. */
.pregame.shell{width:100%;max-width:1535px;margin:0 auto;padding:16px;display:grid;gap:16px;align-content:start;min-width:0}
.pregame.shell>.pregame-hand,.pregame.shell>.objective-step,.pregame.shell>.objectives-choice,.pregame.shell>.objective-wait{width:100%;max-width:none;min-width:0}
.pregame.shell .hand-preview-wrap{width:100%;max-width:100%;min-width:0;overflow-x:auto}
.pregame.shell .objectives-choice{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
.pregame.shell .objective-choice{min-width:0;display:flex;flex-direction:column;align-items:center}
.pregame.shell .objective-choice img{width:min(100%,260px);height:auto;max-height:330px;object-fit:contain}
.pregame.shell .objective-choice .btn{margin-top:auto}
@media(max-width:770px){.pregame.shell{padding:12px 10px;gap:13px}.pregame.shell .objectives-choice{grid-template-columns:1fr}.pregame.shell .objective-choice img{max-height:220px;width:auto;max-width:100%}}

/* Turn-only legal extension cue. The outer green line remains distinct from
   the INNER gold border/badge on newly acquired or selected cards. */
.hand-card.can-extend{outline:3px solid #67e6a1;outline-offset:2px;box-shadow:0 0 0 1px #083f26,0 0 17px #36c8808c}
.hand-card.can-extend.newly-acquired{border-color:#e7ba66;outline-color:#67e6a1;box-shadow:0 0 0 2px #ffe29d77,0 0 20px #37d48b93}
.hand-card.can-extend.selected{border-color:#f5c96c;outline-color:#67e6a1;box-shadow:0 0 0 2px #f6ce7866,0 0 22px #40d38f94}
.hand-card.can-extend:focus-visible{outline-color:#bbffce;outline-offset:3px}


/* v0.16 · Guildhall visual refresh. The original cards retain their own artwork. */
.landing-v016{--parchment:#fbefd1;--sepia:#b58745;--wine:#7d2830;--forest:#182c25;position:relative;isolation:isolate;display:block;min-height:100dvh;color:#fdf4df;background:#12231c;overflow:hidden}
.landing-v016 .landing-backdrop{position:absolute;inset:0;z-index:-2;background:url('/assets/village-home-hero.webp') center center/cover no-repeat;filter:saturate(.94)}
.landing-v016:before{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#0c1b17e8 0%,#14231bb8 36%,#0e1c17ad 66%,#0c1917e1 100%),linear-gradient(0deg,#0b1816ee 0%,transparent 20%,transparent 75%,#12201965 100%)}
.landing-v016 .landing-page{max-width:1460px;min-height:100dvh;display:flex;flex-direction:column;margin:auto;padding:clamp(16px,3vw,38px)}
.landing-topline{display:flex;gap:12px;align-items:center;font-size:.75rem;font-weight:800;letter-spacing:.2em;color:#ffebbb;text-shadow:0 2px 12px #000a}
.landing-seal{display:grid;place-items:center;width:34px;height:34px;border:1px solid #efd69e;border-radius:50%;background:#69352cbd;color:#ffd778;font-size:1.2rem;box-shadow:0 0 0 4px #e6c67a19}
.landing-edition{margin-left:auto;color:#f2d7a0;letter-spacing:.13em;font-size:.66rem;border:1px solid #c7a66e88;background:#0a1a15aa;border-radius:30px;padding:8px 12px;white-space:nowrap}
.landing-content{display:grid;grid-template-columns:minmax(0,1.23fr) minmax(370px,.77fr);gap:clamp(22px,5vw,75px);align-items:center;flex:1;padding:clamp(35px,6vh,90px) 0}
.landing-v016 .art-cover{display:block;min-width:0;background:none;padding:0}
.landing-v016 .pitch{max-width:700px;text-shadow:0 4px 26px #020c09}
.landing-v016 .eyebrow{color:#f3ce82;margin-bottom:20px;font-size:.78rem;letter-spacing:.18em}
.landing-v016 .pitch h1{font-family:Georgia,'Palatino Linotype',serif;font-size:clamp(4.2rem,7.1vw,8rem);line-height:.92;font-weight:500;letter-spacing:-.035em;color:#ffedc7;text-shadow:0 4px 0 #472c20,0 14px 40px #000d}
.landing-v016 .pitch h1 em{font-size:.5em;font-weight:normal;color:#eab76c;letter-spacing:-.02em}
.pitch-rule{display:flex;align-items:center;gap:12px;color:#f4ce7c;margin:23px 0 15px;max-width:380px}.pitch-rule:before,.pitch-rule:after{content:'';height:1px;flex:1;background:linear-gradient(90deg,transparent,#e4bc70)}.pitch-rule:after{transform:rotate(180deg)}
.landing-v016 .pitch p{font-size:clamp(1rem,1.45vw,1.2rem);color:#f8ecd3;max-width:550px;line-height:1.72;margin:0}
.landing-highlights{display:flex;flex-wrap:wrap;gap:9px;margin-top:26px}
.landing-highlights span{border:1px solid #d3ae696c;background:#121e17a9;backdrop-filter:blur(7px);padding:9px 13px;border-radius:25px;color:#f7dc9d;font-size:.76rem;font-weight:750;white-space:nowrap}
.landing-v016 .welcome{min-width:0;display:block;padding:0}
.landing-v016 .welcome-card{position:relative;width:100%;max-width:475px;margin-left:auto;background:linear-gradient(156deg,#23382fef,#11261fef);border:1px solid #d6b376b3;border-radius:21px;padding:clamp(23px,3.5vw,42px);box-shadow:0 25px 90px #000b,inset 0 0 0 1px #fff4b71a;backdrop-filter:blur(14px)}
.landing-v016 .welcome-card:before{content:'';position:absolute;inset:9px;border:1px solid #ecd7a524;border-radius:14px;pointer-events:none}
.welcome-crest{display:grid;place-items:center;margin:0 0 18px;width:56px;height:56px;border:2px solid #c99f55;background:radial-gradient(circle at 35% 20%,#8a492e,#482b22);color:#ffe2a0;border-radius:13px;font-size:2rem;box-shadow:0 4px 19px #0007}
.landing-v016 .welcome-card h2{font-size:clamp(1.9rem,3vw,2.6rem);color:#ffe6b1;margin:0 0 10px;letter-spacing:-.02em}
.landing-v016 .welcome-card .eyebrow{margin-bottom:9px;font-size:.67rem}
.landing-v016 .welcome-card .rule-note{font-size:.88rem;color:#d7dfd3;line-height:1.62}
.landing-v016 .form-col{margin-top:23px;gap:10px}
.landing-v016 .form-col label,.landing-v016 .room-label{font-size:.78rem;font-weight:800;color:#f3dfb4;letter-spacing:.035em}
.landing-v016 .field{background:#0e1d1af0;border:1px solid #a5a9957d;color:#fff6e4;min-height:48px;border-radius:9px;transition:border-color .15s,box-shadow .15s}
.landing-v016 .field:focus{border-color:#e7c37e;box-shadow:0 0 0 3px #edc7752a;outline:none}
.landing-v016 .field::placeholder{color:#9eaaa1}
.landing-v016 .btn{min-height:48px;border-radius:9px;font-weight:800;letter-spacing:.015em}
.landing-v016 .btn.primary{background:linear-gradient(140deg,#f4d797,#c6984d);border-color:#fff0bf;color:#1e291d;box-shadow:0 6px 21px #060d0980, inset 0 1px 0 #fff4d4}
.landing-v016 .btn.primary:hover{filter:brightness(1.07);box-shadow:0 9px 26px #000a,0 0 18px #efca7675}
.landing-v016 .divider-label{margin:22px 0 16px;color:#dfd3b6;font-size:.75rem;gap:10px}
.landing-v016 .form-row{margin:9px 0 0;align-items:stretch}
.landing-v016 .form-row .field{flex:1;min-width:0;max-width:none;letter-spacing:.12em;text-transform:uppercase}
.landing-v016 .form-row .btn{background:#324a3e;border:1px solid #c9b47d;color:#f7e2ab;white-space:nowrap;padding:10px 16px}
.welcome-footnote{font-size:.74rem;color:#b7c9b8;line-height:1.5;margin-top:17px}
.landing-footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;border-top:1px solid #e7cc8869;padding-top:17px;color:#e8d3a7;font-size:.75rem;letter-spacing:.02em;text-shadow:0 2px 9px #000}
/* Give the lobby some of the same world and panel language without obscuring table functionality. */
body:has(.lobby){background:linear-gradient(180deg,#0b1916c2,#11221d 440px),url('/assets/village-home-hero.webp') center top / cover fixed no-repeat}
.lobby .center-head{padding:22px 20px 12px}.lobby .center-head h1{color:#ffebbe;text-shadow:0 3px 16px #000c}
.lobby .center-head p{max-width:630px;margin:auto;line-height:1.65;color:#dfebde}
.lobby .panel{background:linear-gradient(145deg,#253e34f4,#162a22f5);border:1px solid #c4a5738f;box-shadow:0 17px 45px #0008,inset 0 1px 0 #ffffff0c}
.lobby .panel.highlight{background:linear-gradient(155deg,#574026f3,#2b3026f3);border-color:#e1bd77}
.lobby .big-code{color:#ffe4a9;text-shadow:0 2px 15px #0009}
.lobby .player-row{border:1px solid #b9a77c2e;background:#091b1461}
@media(max-width:1000px){.landing-content{grid-template-columns:minmax(0,1fr) minmax(340px,.86fr);gap:26px}.landing-v016 .pitch h1{font-size:clamp(3.7rem,7.2vw,6.5rem)}}
@media(max-width:740px){.landing-v016 .landing-backdrop{background-position:57% top}.landing-v016:before{background:linear-gradient(180deg,#0b1b15af 0%,#0e1d16e5 40%,#0b1714ee 100%)}.landing-v016 .landing-page{padding:17px 15px 20px}.landing-content{display:flex;flex-direction:column;align-items:stretch;gap:32px;padding:40px 0 24px}.landing-v016 .pitch h1{font-size:clamp(3.6rem,12vw,6.1rem)}.landing-v016 .pitch p{font-size:1rem}.landing-v016 .welcome-card{margin:0 auto;max-width:540px;padding:26px}.landing-highlights{margin-top:20px}.landing-footer{font-size:.69rem}.landing-edition{display:none}}
@media(max-width:400px){.landing-v016 .pitch h1{font-size:3.5rem}.landing-highlights span{font-size:.67rem;padding:8px 10px}.landing-v016 .form-row{flex-wrap:wrap}.landing-v016 .form-row .btn{flex:1}.landing-v016 .welcome-card{padding:22px}}

/* v0.17 — read-only, zoomable inspection of original card artwork.
   The magnifier is separate from the hand-selection / objective-choice action. */
.hand-card-holder{position:relative;flex:none;align-self:flex-start;min-width:0}
.hand-card-holder>.hand-card{display:block}
.card-inspect-trigger{display:inline-flex;align-items:center;justify-content:center;gap:3px;font:inherit;font-size:.85rem;font-weight:850;cursor:zoom-in;border:1px solid #f7dd9c;border-radius:8px;padding:5px 8px;color:#1d2d20;background:linear-gradient(140deg,#ffe9aa,#caad6d);box-shadow:0 2px 9px #0009}
.card-inspect-trigger:hover{filter:brightness(1.12)}
.card-inspect-trigger:focus-visible,.objective-image-button:focus-visible,.meld-inspection-image-button:focus-visible,.spy-inspect-card:focus-visible{outline:3px solid #fff0a4;outline-offset:3px}
.hand-card-holder>.card-inspect-trigger{position:absolute;top:5px;right:5px;z-index:4;min-width:34px;min-height:31px;padding:3px 6px;font-size:1.12rem}
.hand-card-holder>.card-inspect-trigger span{display:none}
.hand-card-holder .hand-card.selected+.card-inspect-trigger{top:0}
.hand-card-holder .hand-card-preview{padding:0 0 21px;border:0}
.hand-card-holder .hand-card-preview+.card-inspect-trigger{top:4px}
.hand-card-holder .hand-card-preview img{display:block}
.objective-choice .objective-image-button{display:block;position:relative;width:100%;border:1px solid #bfa46d;cursor:zoom-in;padding:5px 5px 31px;background:#1b3027;border-radius:11px;color:#f8d8a1;box-shadow:inset 0 0 0 1px #edca8045}
.objective-choice .objective-image-button img{display:block;width:100%;max-width:100%;height:auto;object-fit:contain}
.objective-choice .objective-image-button:hover{border-color:#ffe4a0;background:#233e31}
.objective-zoom-cue{position:absolute;bottom:7px;left:5px;right:5px;text-align:center;letter-spacing:.03em;color:#ffdb91;font-size:.78rem;font-weight:800}
.objective-owned{display:grid;justify-items:center;gap:8px;margin:4px auto 10px}
.objective-owned .objective-card{margin:0}
.objective-owned .card-inspect-trigger{min-height:35px}
.discard-image-wrap{position:relative;display:inline-block;line-height:0}
.discard-image-wrap>.card-inspect-trigger{position:absolute;top:5px;right:5px;min-width:30px;min-height:30px;padding:2px 5px;font-size:1.08rem;line-height:1.1;z-index:2}
.discard-image-wrap>.card-inspect-trigger span{display:none}
.meld-inspection-image-button{position:relative;display:block;width:100%;padding:0 0 22px;cursor:zoom-in;background:transparent;border:0;color:#f6d894;border-radius:8px}
.meld-inspection-image-button span{position:absolute;bottom:0;left:0;right:0;text-align:center;font-weight:800;font-size:.7rem}
.meld-inspection-image-button:hover img{filter:drop-shadow(0 5px 12px #efca7b8c)}
.spy-inspect-card{position:relative;border:1px solid #d4b87b;border-radius:6px;padding:3px;background:#193129;color:#ffdd9e;cursor:zoom-in}
.spy-inspect-card span{position:absolute;right:2px;top:2px;padding:2px 4px;background:#2c432e;border-radius:4px;font-weight:850}
.card-inspector-overlay{position:fixed;inset:0;z-index:105;padding:clamp(7px,2vw,16px);display:flex;align-items:center;justify-content:center;background:#030b09ef;backdrop-filter:blur(11px)}
.card-inspector{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:11px;width:min(1060px,100%);height:min(97dvh,990px);min-height:0;border:2px solid #e3bf76;border-radius:17px;padding:clamp(10px,1.8vw,20px);color:#f8eed5;background:linear-gradient(155deg,#294239,#0f201c);box-shadow:0 25px 85px #000e}
.card-inspector-header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;min-width:0}
.card-inspector-header h2{font-family:Georgia,serif;font-size:clamp(1.25rem,3vw,2rem);color:#ffe4a8;margin:3px 0;line-height:1.13}
.card-inspector-kicker{text-transform:uppercase;letter-spacing:.12em;font-size:.67rem;font-weight:850;color:#e0bd76}
.card-inspector-details{font-size:clamp(.73rem,1.5vw,.89rem);line-height:1.4;color:#d9e0ce}
.card-inspector-x{border:1px solid #e9cb8e;color:#fff3d6;background:#394d3b;border-radius:10px;font-size:1.05rem;font-weight:900;padding:6px 11px;cursor:pointer;flex:none}
.card-inspector-viewport{position:relative;overflow:auto;min-height:0;min-width:0;overscroll-behavior:contain;touch-action:pan-x pan-y;scrollbar-color:#caa768 #1a3329;border:1px solid #c0aa7454;border-radius:10px;background:radial-gradient(ellipse,#3b4236,#0b1815);display:block;text-align:center}
.card-inspector-image{display:block;margin:0 auto;max-width:none;max-height:none;height:auto;object-fit:contain;border-radius:7px;user-select:none;-webkit-user-drag:none;box-shadow:0 8px 25px #0009}
.card-inspector-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.card-inspector-counter{font-size:.75rem;color:#e1c58e;white-space:nowrap}
.card-inspector-control-buttons{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.card-inspector-control-buttons .btn{min-height:37px;padding:5px 11px;font-size:.85rem}
.card-inspector-zoom-label{min-width:37px;text-align:center;color:#ffe4ac;font-size:.8rem;font-weight:850}
.card-inspector-hint{font-size:.73rem;line-height:1.35;color:#c2d2c4}
@media(max-width:570px){.card-inspector{height:calc(100dvh - 12px);border-radius:12px;gap:7px;padding:10px}.card-inspector-control-buttons{justify-content:center;width:100%;gap:5px}.card-inspector-control-buttons .btn{padding:6px 9px;min-height:37px;font-size:.74rem}.card-inspector-controls{justify-content:center;gap:5px}.card-inspector-counter{width:100%;text-align:center;font-size:.7rem}.card-inspector-hint{font-size:.67rem}.objective-zoom-cue{font-size:.74rem}}
@media(prefers-reduced-motion:reduce){.card-inspect-trigger,.card-inspector-image{transition:none}}

/* Centre a fitted image; return to top/left alignment when zoom makes it overflow. */
.card-inspector-viewport{display:flex;align-items:safe center;justify-content:safe center}
.card-inspector-viewport.is-zoomed{cursor:grab}
.card-inspector-viewport.is-zoomed:active{cursor:grabbing}

/* v0.18 — Landscape-first secret-objective selection. The actual printed
   design is the focal point; inspect and choose are deliberately separate. */
.pregame.shell .objective-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(12px,1.6vw,22px);align-items:stretch}
.pregame.shell .objective-option{min-width:0;display:flex;flex-direction:column;gap:10px;padding:clamp(10px,1.1vw,17px);border:1px solid #9e8e6780;border-radius:18px;background:linear-gradient(170deg,#21362d 0%,#14241e 100%);box-shadow:0 8px 27px #0005}
.objective-option-top{display:flex;justify-content:space-between;align-items:center;gap:8px;color:#e4c783;font-size:.74rem;letter-spacing:.09em;font-weight:750}
.objective-private-mark{border:1px solid #9b9c7f63;color:#b8cbb2;border-radius:5px;padding:3px 6px;font-size:.65rem}
.objective-art-button{position:relative;display:block;width:100%;padding:0;border:1px solid #e2c58e50;border-radius:12px;overflow:hidden;background:#000;color:#fbe4b8;cursor:zoom-in;box-shadow:0 5px 18px #0008;transition:transform .16s,border-color .16s}
.pregame.shell .objective-option .objective-art-button img{display:block;width:100%;max-width:none;max-height:none;height:auto;object-fit:contain;aspect-ratio:99/70;border-radius:0}
.objective-art-button:hover{transform:translateY(-2px);border-color:#f4d99c}
.objective-art-button:focus-visible,.objective-pick:focus-visible{outline:3px solid #fff2ab;outline-offset:3px}
.objective-art-hint{position:absolute;right:10px;bottom:10px;padding:5px 10px;border-radius:7px;font-size:.76rem;line-height:1.2;font-weight:750;letter-spacing:.01em;background:#15261dea;color:#ffe6ad;border:1px solid #f1d5a68a;box-shadow:0 2px 10px #0009}
.objective-info{display:grid;gap:6px;padding:2px 3px 0;flex:1}
.objective-info h3{font-family:Georgia,'Times New Roman',serif;font-size:clamp(1.08rem,1.55vw,1.5rem);font-weight:500;color:#f4e3bb;line-height:1.12;text-wrap:balance}
.objective-trades{font-size:.9rem;color:#dbe3d4;line-height:1.4;font-weight:600}
.objective-plus{color:#e3bd78;font-weight:900;padding:0 .16rem}
.objective-rewards{display:flex;gap:6px;flex-wrap:wrap;align-self:end;margin-top:3px}
.objective-rewards span{display:inline-flex;gap:6px;align-items:center;padding:6px 8px;border:1px solid #6b806b75;border-radius:8px;color:#cad8c9;font-size:.77rem;background:#0d201993}
.objective-rewards b{color:#f2d38f}
.pregame.shell .objective-pick{display:block;width:100%;margin:2px 0 0;min-height:48px;white-space:normal;flex-shrink:0}
@media(max-width:1000px){.pregame.shell .objective-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.objective-info h3{font-size:1.26rem}}
@media(max-width:670px){.pregame.shell .objective-gallery{grid-template-columns:1fr;gap:14px}.pregame.shell .objective-option{max-width:600px;width:100%;margin:auto;padding:12px;gap:8px}.pregame.shell .objective-option .objective-art-button img{height:auto;width:100%;max-height:none}.objective-info h3{font-size:1.35rem}.objective-rewards span{font-size:.8rem}.objective-art-hint{padding:7px 10px}.pregame.shell .objective-pick{min-height:48px}}

/* v0.18: refined guildhall wordmark. Live text stays accessible and crisp. */
.landing-v016 .guild-wordmark{display:flex;flex-direction:column;align-items:flex-start;gap:0;width:min(100%,620px);margin:0;padding:0 0 5px;font-family:Georgia,'Palatino Linotype',serif;font-style:normal;font-weight:700;text-transform:none;text-align:left;color:#f6e3b5;letter-spacing:0;line-height:1;text-shadow:none;filter:drop-shadow(0 12px 18px #07150cde)}
.guild-wordmark .wordmark-village{display:block;white-space:nowrap;margin-left:2px;font-size:clamp(2.55rem,4.65vw,4.65rem);font-weight:500;letter-spacing:.004em;line-height:1.1;color:#fff2d5;text-shadow:0 2px 0 #3b2416,0 5px 0 #6d4d2b,0 9px 15px #000a}
.guild-wordmark .wordmark-a{font-size:.66em;font-style:italic;font-weight:400;margin-right:.11em;color:#efd194}
.guild-wordmark .wordmark-bridge{display:flex;align-items:center;gap:13px;width:100%;max-width:480px;margin:1px 0 -3px;padding-left:8px;color:#d7a34f}
.guild-wordmark .wordmark-bridge em{display:block;font-size:clamp(1.18rem,2vw,1.9rem);font-weight:400;font-style:italic;letter-spacing:0;color:#f4d99d;line-height:1.2;text-shadow:0 3px 8px #000b}
.guild-wordmark .wordmark-line{display:block;height:2px;flex:1;background:linear-gradient(90deg,transparent,#d2a45b 24%,#f7de9c 50%,#d2a45b 76%,transparent);box-shadow:0 2px 8px #0009}
.guild-wordmark .wordmark-guilds{display:block;font-size:clamp(4.3rem,8.5vw,8rem);line-height:.94;text-transform:uppercase;letter-spacing:.005em;font-weight:750;color:#f1d394;background:linear-gradient(180deg,#fff5d5 7%,#f5d99c 46%,#ba8342 96%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;-webkit-text-stroke:1.05px #794e22;filter:drop-shadow(0 2px 0 #321e11) drop-shadow(0 4px 0 #543921) drop-shadow(0 9px 10px #000d)}
.guild-wordmark-footer{display:flex;align-items:center;gap:15px;max-width:520px;margin:15px 0 20px;color:#e7c184;font-size:1.2rem}
.guild-wordmark-footer:before,.guild-wordmark-footer:after{content:'';display:block;width:clamp(60px,14vw,210px);height:1px;background:linear-gradient(90deg,transparent,#edc983 100%)}
.guild-wordmark-footer:after{transform:rotate(180deg)}
@media(max-width:740px){.landing-v016 .guild-wordmark{max-width:590px}.guild-wordmark .wordmark-village{font-size:clamp(2.5rem,8.2vw,4.35rem)}.guild-wordmark .wordmark-guilds{font-size:clamp(4.15rem,14.8vw,7.4rem)}.guild-wordmark .wordmark-bridge{max-width:440px}}
@media(max-width:410px){.guild-wordmark .wordmark-village{font-size:clamp(2rem,9.3vw,2.65rem)}.guild-wordmark .wordmark-guilds{font-size:clamp(3.45rem,16vw,4.6rem)}.guild-wordmark .wordmark-bridge{max-width:300px}.guild-wordmark-footer{margin:13px 0 15px}}
@media(prefers-reduced-motion:reduce){.guild-wordmark *{animation:none!important;transition:none!important}}
/* Ensure the original oversized hero-heading shadow does not darken this wordmark. */
.landing-v016 .pitch .guild-wordmark{font-weight:500;text-shadow:none;line-height:1}
.landing-v016 .pitch .guild-wordmark .wordmark-guilds{color:#ffe4a6;background:linear-gradient(180deg,#fffbea 0%,#f7e2b1 44%,#d8ad62 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;-webkit-text-stroke:.65px #805b32;text-shadow:none;filter:drop-shadow(0 2px 0 #5e4424) drop-shadow(0 7px 10px #000c)}

/* v0.19: no in-card magnifier overlays. Card art is fully visible and clickable. */
.hand-head-side{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;text-align:right}
.hand-head-side .mini{max-width:480px;line-height:1.45}
.inspect-hand-toggle{flex:none;border-color:#d5b77c!important;background:#263e34!important;color:#ffdf9c!important}
.inspect-hand-toggle.is-active{background:linear-gradient(145deg,#f3d995,#ad8647)!important;color:#14241b!important;box-shadow:0 0 0 2px #fff5ca6b}
.hand-card.is-inspecting{cursor:zoom-in}
.hand-card.is-inspecting:hover,.hand-card-preview:hover{filter:brightness(1.1)}
.hand-card-preview{padding:0;border:0;background:transparent;cursor:zoom-in}
.hand-card-preview img{display:block}
.preview-points{text-align:center;color:#e8cb93;font-weight:750;font-size:.74rem;margin-top:5px}
.objective-owned-button{display:block;width:100%;padding:0;background:transparent;border:0;border-radius:10px;cursor:zoom-in}
.objective-owned-button img{display:block;max-width:100%;margin:0 auto}
.objective-owned-button:focus-visible,.discard-inspect-card:focus-visible,.hand-card-preview:focus-visible{outline:3px solid #ffefaf;outline-offset:3px}
.discard-inspect-card{display:block;width:max-content;margin:auto;padding:0;border:0;background:transparent;border-radius:8px;cursor:zoom-in;line-height:0}
.discard-inspect-card:hover img{filter:brightness(1.06)}
.meld-inspection-image-button{padding:0;overflow:hidden}
.spy-inspect-card{padding:2px}
.objective-art-hint{display:none}
@media(max-width:720px){.hand-head-side{justify-content:flex-start;text-align:left;width:100%}.hand-head-side .mini{font-size:.72rem}}

/* v0.19: hold a card to inspect it, tap to select; no floating controls. */
.hand-card[data-inspect-hold]{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;cursor:pointer}
.hand-card[data-inspect-hold]:active{filter:brightness(1.08)}

/* v0.19 minimal image-only card lightbox; no frame, captions or magnifier icons. */
.card-lightbox-overlay{position:fixed;inset:0;z-index:110;background:rgba(3,9,8,.92);backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:0;overscroll-behavior:contain}
.card-lightbox{position:relative;display:flex;align-items:center;justify-content:center;width:100vw;height:100dvh;min-height:0;background:transparent;border:0;box-shadow:none}
.card-lightbox-close{position:fixed;z-index:120;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));width:60px;height:60px;min-width:60px;min-height:60px;border:2px solid #f6e0b6;border-radius:999px;background:#17251fe8;color:#fff3d8;font-size:2rem;font-weight:750;line-height:1;cursor:pointer;box-shadow:0 5px 20px #000c;display:grid;place-items:center}
.card-lightbox-close:hover{background:#5d3527;color:#fff}
.card-lightbox-close:focus-visible{outline:4px solid #8bffb9;outline-offset:3px}
.card-lightbox-stage{width:min(96vw,1240px);height:min(91dvh,1060px);min-height:0;min-width:0;overflow:auto;display:flex;align-items:safe center;justify-content:safe center;touch-action:pan-x pan-y;scrollbar-color:#ad9468 #26312b;overscroll-behavior:contain}
.card-lightbox-stage.is-enlarged{cursor:grab}
.card-lightbox-image{display:block;flex:none;height:auto;max-width:none;max-height:none;margin:auto;border-radius:5px;object-fit:contain;user-select:none;-webkit-user-drag:none;box-shadow:0 12px 50px #000e;cursor:zoom-in}
.card-lightbox-stage.is-enlarged .card-lightbox-image{cursor:zoom-out}
[data-inspect-card]{-webkit-touch-callout:none}
[data-inspect-card] img{-webkit-user-drag:none;user-select:none}
@media(max-width:640px){.card-lightbox-close{width:56px;height:56px;min-width:56px;min-height:56px;font-size:1.75rem;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right))}.card-lightbox-stage{width:97vw;height:91dvh}}
@media(prefers-reduced-motion:reduce){.card-lightbox-image{transition:none}}


/* v0.20: balanced, calligraphic title inspired by the printed card-back lettering.
   Rendered as artwork, so no special font installation or network request is needed. */
.landing-v016 .pitch .guild-wordmark{display:block;width:min(100%,670px);max-width:670px;height:auto;max-height:none;margin:0 0 8px;line-height:0;text-align:center;filter:none;padding:0}
.landing-v016 .pitch .guild-wordmark .guild-wordmark-art{display:block;width:100%;height:auto;max-height:none;object-fit:contain;filter:drop-shadow(0 8px 16px rgba(8,18,15,.62))}
@media(max-width:740px){.landing-v016 .pitch .guild-wordmark{width:min(100%,560px);margin:0 auto 8px}}
@media(max-width:410px){.landing-v016 .pitch .guild-wordmark{width:100%;margin:0 auto 6px}}
/* v0.20: on-page legend for game-state colour cues. */
.help-legend{display:flex;flex-direction:column;gap:11px;margin:9px 0 15px}
.help-legend-item{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:start;gap:12px;line-height:1.6}
.help-swatch{width:26px;height:36px;border-radius:5px;background:#26382c;margin-top:4px;display:block;box-shadow:inset 0 0 0 2px #304238}
.help-swatch.green{border:3px solid #68ec97;box-shadow:0 0 0 1px #1d6843,0 0 12px #5df68a80}
.help-swatch.gold{border:3px solid #edc76b;box-shadow:0 0 9px #e9ba5980}
.help-swatch.both{border:3px solid #6dffa2;box-shadow:inset 0 0 0 3px #293f32,inset 0 0 0 6px #edc76b,0 0 10px #56fa8880}
.help-swatch.pickup{border:3px solid #68ec97;background:#1e2d25;box-shadow:0 0 0 1px #295038,0 0 12px #5df68a80}
@media(max-width:440px){.help-legend-item{grid-template-columns:29px minmax(0,1fr);gap:9px}.help-swatch{width:25px;height:33px}}


/* v0.23 · larger, naturally proportioned, overlapping physical cards.
   Each preceding card's TOP-LEFT index stays visible. The last is fully visible.
   Overlaps are purely visual: original cards, sorting, selection, security and
   server-backed legal-move hints all continue unchanged. */
:root {
  --hand-card-width: clamp(118px, 11vw, 148px);
  --table-card-width: clamp(108px, 9.2vw, 136px);
  --card-shape: 1311 / 1853;
}
/* Main hand and the read-only dealt-hand preview share exactly the same fan. */
.hand-wrap {
  gap: 22px;
  align-items: flex-start;
  scroll-snap-type: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 17px 7px 22px;
  scrollbar-color: #c1a16a #192b24;
}
.hand-group { padding-right: 22px; gap: 11px; }
.hand-group-cards { gap: 0; padding: 11px 4px 7px; align-items: flex-start; }
.hand-card-holder { width: var(--hand-card-width); margin-right: calc(var(--hand-card-width) * -.66); z-index: auto; }
.hand-card-holder:last-child { margin-right: 0; }
/* Keep later cards above earlier cards in the natural overlapping hand order.
   Selection/focus/hover may LIFT a card, but must never raise its stack layer:
   doing so covers the clickable corner of the next card in the hand. */
.hand-card-holder:has(>.hand-card.selected),
.hand-card-holder:focus-within,
.hand-card-holder:hover { z-index: auto; }
.hand-card {
  display: block;
  width: var(--hand-card-width);
  border-radius: 8px;
  transform-origin: bottom center;
  transition: transform .16s ease, box-shadow .16s ease;
}
.hand-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--card-shape);
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 5px 14px #000b;
}
.hand-card-holder:hover .hand-card:not(.selected) { transform: translateY(-5px); }
.hand-card.selected { transform: translateY(-13px); }
.hand-card-holder:hover .hand-card.selected { transform: translateY(-15px); }
/* The printed points/symbol in the upper-left are never obscured by status tags. */
.hand-card .new-card-tag {
  top: auto; left: 4px; bottom: 7px; right: auto;
  max-width: 43px; font-size: .58rem; padding: 2px 3px;
  text-align: center; line-height: 1.15;
}
.hand-card .hint { bottom: -16px; left: 0; right: 0; }
.hand-card-preview { padding: 0 !important; border: 2px solid transparent; }
.hand-card-preview img { display:block; width: 100%; height:auto; aspect-ratio:var(--card-shape); }
/* Visual, read-only stacks on the shared table. An overflow strip preserves
   at least a legible corner per card on narrow/mobile team columns. */
.meld-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.meld-inspect > .fan, .meld .fan, .meld.is-guild .fan {
  --corner-exposure: clamp(33px, calc((100% - var(--table-card-width) - 8px) / var(--card-gaps)), 49px);
  height: auto;
  min-height: calc(var(--table-card-width) * 1853 / 1311 + 10px);
  display: flex;
  position: relative;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  padding: 4px 3px 9px;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: #b6a078 #23392f;
}
.meld .fan > img, .meld.is-guild .fan > img {
  width: var(--table-card-width);
  height: auto;
  aspect-ratio: var(--card-shape);
  object-fit: cover;
  border-radius: 6px;
  flex: none;
  min-width: 0;
  margin: 0;
  margin-right: calc(var(--corner-exposure) - var(--table-card-width));
  box-shadow: 0 5px 14px #000b;
}
.meld .fan > img:last-of-type, .meld.is-guild .fan > img:last-of-type { margin-right: 0; }
.meld .fan > img.newly-acquired-table {
  outline: 3px solid #f0cd7f;
  outline-offset: -3px;
  position:relative;
  z-index: 2;
}
/* The original Guildhall image has its native aspect ratio, and sits lower
   than the score/suit symbols along the row of exposed top-left card corners. */
.meld .fan .guildhall-ribbon {
  position: sticky;
  left: 50%;
  top: auto;
  bottom: 4px;
  margin-left: calc(-1 * min(160px, 48%));
  flex: none;
  width: min(160px, 48%);
  aspect-ratio: 1122 / 822;
  height: auto;
  transform: none;
  align-self: flex-end;
  z-index: 5;
  pointer-events: none;
  border-width: 1px;
}
.meld .fan .guildhall-ribbon > img {
  width: 100% !important; height: 100% !important;
  object-fit: contain !important; position: static !important;
}
/* Draw/discard cards use the same full-sized card shape as the player's hand. */
.piles { gap: clamp(11px, 3vw, 27px); padding: 12px 0 16px; }
.pile { min-width: 0; }
.pile img, .pile .empty-card {
  display: block;
  width: var(--hand-card-width);
  height: auto;
  aspect-ratio: var(--card-shape);
  object-fit: contain;
  border-radius: 8px;
}
.pile .empty-card { display: grid; }
.piles .arrow { font-size: clamp(1.1rem, 2.8vw, 1.8rem); flex: none; }
.discard-inspect-card { border-radius: 8px; }
/* Preserve the exact-image-only green eligible-pickup outline from v0.19. */
.discard-pile.pickup-available .discard-image-wrap > .discard-inspect-card > img {
  outline: 3px solid #7fee9e; outline-offset: 2px;
}
@media(max-width: 770px) {
  :root { --hand-card-width: clamp(102px, 31vw, 135px); --table-card-width: clamp(105px, 30vw, 130px); }
  .hand-wrap { gap: 13px; padding: 14px 6px 22px; }
  .hand-group { padding-right: 13px; }
  .hand-group-cards { gap: 0; }
  .hand-card-holder { margin-right: calc(var(--hand-card-width) * -.64); }
  .piles { gap: clamp(5px, 2vw, 18px); }
  .pile strong { font-size: .75rem; }
  .meld-grid { grid-template-columns: minmax(0, 1fr); }
  .meld .fan .guildhall-ribbon { width: min(160px, 49%); margin-left: calc(-1 * min(160px, 49%)); }
}
@media(max-width: 365px) {
  :root { --hand-card-width: 101px; --table-card-width: 106px; }
  .piles { gap: 4px; }
  .piles .arrow { font-size: 1rem; }
}
@media(prefers-reduced-motion: reduce) {
  .hand-card, .hand-card-holder:hover .hand-card { transition: none; }
}


/* v0.23 refinement — gently rounded, physically plausible card corners.
   Clip the rendered artwork itself, not its readable top-left point symbol.
   Keeping the radius consistent across hand, table, deck and special notices
   also ensures the tight discard eligibility outline follows the card shape. */
:root { --card-corner-radius: 12px; }
.hand-card, .hand-card img, .hand-card-preview, .hand-card-preview img,
.meld .fan > img, .meld.is-guild .fan > img,
.pile img, .pile .empty-card, .discard-inspect-card,
.draw-reveal-image, .automatic-card,
.public-action-art img, .public-activity-item img,
.mini-gallery img, .spy-inspect-card img,
.meld-inspection-card img, .card-lightbox-image,
.target > img, .silver-stolen-card > img,
.wild-allocation-row img, .auto-mini img {
  border-radius: var(--card-corner-radius);
}
/* The original landscape Secret Objectives also retain their full artwork. */
.objective-option img, .objective-art-button img, .objective-owned img,
.objective-card { border-radius: 12px; }
/* No enclosing rectangle or highlight should extend across neighbouring cards. */
.hand-card { background:transparent; }
.hand-card img, .pile img, .meld .fan > img { overflow: hidden; }
@media(max-width: 430px) {
  :root { --card-corner-radius: 10px; }
}

/* Keep the Guildhall plaque centred across the visible, overlapping stack;
   unlike a flex item it must not add a fake 'eighth card' to the scroll width. */
.meld .fan .guildhall-ribbon,
.meld.is-guild .fan .guildhall-ribbon {
  position: absolute;
  left: 50%;
  top: 48%;
  bottom: auto;
  margin: 0;
  transform: translate(-50%, -25%);
  align-self: auto;
  width: min(160px, 48%);
  aspect-ratio: 1122 / 822;
  z-index: 5;
}
@media(max-width:770px) {
  .meld .fan .guildhall-ribbon,
  .meld.is-guild .fan .guildhall-ribbon {
    width:min(160px, 49%);
    margin:0;
  }
}

/* v0.24 · desktop readability / mobile board visibility.
   Layout only: card identities, sorting and server move eligibility stay intact. */
.hand-shelf-content { min-width: 0; }
.hand-shelf-toggle { display: none; }
@media (min-width: 1100px) {
  :root {
    --hand-card-width: clamp(186px, 14.7vw, 218px);
    --table-card-width: clamp(158px, 12vw, 184px);
  }
  /* Expose nearly half of each hand card, rather than only one-third. */
  .hand-card-holder { margin-right: calc(var(--hand-card-width) * -.51); }
  .hand-wrap { gap: 24px; }
  .hand-group { padding-right: 28px; }
  .meld-inspect > .fan, .meld .fan, .meld.is-guild .fan {
    --corner-exposure: clamp(55px, calc((100% - var(--table-card-width) - 8px) / var(--card-gaps)), 76px);
  }
  /* Give the shared-table cards more room to be read. */
  .meld-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr)); }
}
@media (min-width: 771px) and (max-width: 1099px) {
  :root {
    --hand-card-width: clamp(159px, 17.1vw, 188px);
    --table-card-width: clamp(138px, 15vw, 158px);
  }
  .hand-card-holder { margin-right: calc(var(--hand-card-width) * -.54); }
  .meld-inspect > .fan, .meld .fan, .meld.is-guild .fan {
    --corner-exposure: clamp(47px, calc((100% - var(--table-card-width) - 8px) / var(--card-gaps)), 68px);
  }
}
/* The mobile cards keep their v0.23 dimensions, which already worked well.
   Instead, compress padding / tracker chrome and allow hiding the whole shelf. */
@media (max-width: 770px) {
  .hand-area {
    padding: 6px 9px max(7px, env(safe-area-inset-bottom));
    max-height: min(47dvh, 395px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .hand-head { flex-wrap: nowrap; gap: 6px; min-height: 35px; }
  .hand-head h2 { font-size: 1rem; display:flex; align-items:center; gap:5px; white-space:nowrap; }
  .hand-head h2 .stat { font-family: Inter, system-ui, sans-serif; font-size: .67rem; padding: 2px 5px; }
  .hand-head-side { width:auto; flex:none; gap:0; }
  .hand-head-side .mini { display:none; }
  .hand-shelf-toggle { display:inline-flex; align-items:center; min-height:34px; white-space:nowrap; padding: 4px 9px; font-size:.78rem; }
  .hand-wrap { margin: 0 auto; padding: 5px 4px 7px; gap: 10px; }
  .hand-group { padding-right: 9px; gap: 3px; }
  .hand-group-title { font-size:.7rem; line-height:1.2; }
  .hand-group-cards { padding: 5px 3px 4px; }
  .association-planner {
    margin: 4px auto 3px; gap: 5px; max-height: 90px;
    overflow-y: auto;
  }
  .association-planner:has(.wild-allocation) { max-height: 170px; }
  .association-tracker, .wild-allocation { padding: 6px 9px; border-radius: 9px; }
  .tracker-heading { gap:4px; flex-wrap:nowrap; }
  .tracker-numbers { gap:4px; flex-wrap:nowrap; }
  .tracker-heading > strong { font-size: .78rem; }
  .tracker-mpr { font-size: .65rem; white-space:nowrap; }
  .tracker-total { font-size: 1rem; white-space:nowrap; }
  .tracker-state { font-size:.67rem; text-align:right; }
  .tracker-bar { height:5px; margin:4px 0 2px; }
  .tracker-tip, .tracker-ready { display:none; }
  .association-chips { flex-wrap:nowrap; overflow-x:auto; padding:1px 0 3px; }
  .association-chip { flex:none; font-size:.64rem; padding:2px 5px; }
  .association-errors { font-size:.67rem; margin-top:2px; }
  .actions {
    flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden;
    gap: 6px; padding:5px 1px 7px; scrollbar-width:thin;
    position: sticky; bottom:0; z-index:2;
    background:linear-gradient(0deg,#12201dfc,#16241ef5);
  }
  .actions .btn { white-space:nowrap; flex:none; min-height:37px; padding:6px 9px; font-size:.74rem; }
  .actions .quick-mpr, .actions .stat { flex:none; font-size:.68rem; }
  .actions .spacer { display:none; }
  .hand-area.is-collapsed { max-height:none; overflow:visible; }
  .hand-area.is-collapsed .hand-shelf-content { display:none; }
  /* The board no longer needs a half-screen blank padding below it. */
  #app:has(.board) { padding-bottom: 10px; }
}
@media (max-width: 400px) {
  .hand-area { max-height: min(46dvh, 370px); }
  .hand-head h2 { font-size:.94rem; }
  .hand-shelf-toggle { font-size:.73rem; padding: 4px 7px; }
  .association-chip { font-size:.62rem; }
}
/* Desktop card readability should not permanently cover the shared table.
   The same Hide/Show affordance is available here for longer card inspections. */
@media (min-width: 771px) {
  .hand-shelf-toggle { display:inline-flex; align-items:center; white-space:nowrap; }
  .hand-area { max-height:min(57dvh,540px); overflow-y:auto; overscroll-behavior:contain; }
  .hand-area.is-collapsed { max-height:none; overflow:visible; }
  .hand-area.is-collapsed .hand-shelf-content { display:none; }
  .actions { position:sticky;bottom:0;z-index:2;background:linear-gradient(0deg,#12201dfc,#16241ef5);padding:7px 2px 5px; }
  #app:has(.board) { padding-bottom: 12px; }
}
@media (max-width: 770px) { .hand-area { max-height:min(49dvh,410px); } }
@media (max-width: 400px) { .hand-area { max-height:min(49dvh,390px); } }
/* Keep the full, readable desktop cards visible rather than cutting their
   lower instructions behind a sticky action bar. Hide hand is the space-saving control. */
@media (min-width: 771px) {
  .hand-area { max-height: none; overflow: visible; }
  .actions { position:static; }
}
/* v0.25 · one-screen desktop table overview and side-mounted MPR.
   This layout displays every team's named association/guild tile; the full
   original card art remains one click away in the public meld inspector. */
@media (min-width: 960px) and (min-height: 640px) {
  html,body { height: 100%; }
  body:has(.game-shell) { overflow:hidden; }
  #app:has(.game-shell) {
    display:flex; flex-direction:column; height:100dvh; min-height:0;
    overflow:hidden; padding:0;
  }
  #app:has(.game-shell)>.top { flex: none; padding-top:7px; padding-bottom:7px; }
  .game-shell {
    max-width:none; margin:0; width:100%; padding:8px clamp(10px,1.3vw,24px) 6px;
    flex:1 1 auto; min-height:0; gap:6px; display:flex; flex-direction:column;
    overflow:hidden;
  }
  .game-shell>.turn-banner { flex:none; padding:7px 12px; min-height:38px; font-size:.89rem; }
  .game-shell>.top-card-counts { flex:none; flex-wrap:nowrap; gap:5px; min-height:25px; overflow:hidden; }
  .game-shell .top-card-count { padding:3px 8px; font-size:.72rem; min-width:0; white-space:nowrap; }
  .game-shell .top-card-count>span { max-width:105px; overflow:hidden; text-overflow:ellipsis; }
  .game-shell>.notice { flex:none; padding:5px 10px; margin:0; }
  .game-shell>.legacy-board { display:none; }
  .desktop-arena {
    flex:1 1 auto; min-height:0; display:flex; flex-direction:column; gap:6px;
    border:1px solid #9f99785c; border-radius:14px;
    background:linear-gradient(170deg,#24372c,#152621 67%,#15231d);
    padding:8px; box-shadow:0 8px 30px #0005; overflow:hidden;
  }
  .arena-toolbar {display:flex; gap:12px; align-items:center; min-height:31px; flex:none; border-bottom:1px solid #c7b78b32; padding:0 3px 5px;}
  .arena-title {display:flex; align-items:baseline; gap:8px; flex:none; }
  .arena-title strong {font:600 1.08rem Georgia,serif; color:#f3d18d;}
  .arena-title span {font-size:.71rem; color:#acbdb1; white-space:nowrap;}
  /* Keep all team scores and MPRs in a single, horizontally scrollable top row. */
  .arena-scores {display:flex;flex:1;justify-content:safe center;flex-wrap:nowrap;gap:4px;min-width:0;min-height:25px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;}
  .arena-score {border:1px solid #7891805c;background:#ffffff08;border-radius:20px;padding:3px 7px;font-size:.67rem;color:#e2ead9;white-space:nowrap;}
  .arena-score.mine {border-color:#ecc77c;color:#f8d799;}
  .arena-score {flex:none;}
  .arena-score b {font-variant-numeric:tabular-nums;}
  .arena-score-mpr {display:inline-block;margin-left:5px;padding-left:5px;border-left:1px solid #b6c6a24a;color:#b7d6c1;}
  .arena-score.mine .arena-score-mpr {color:#f5dba8;}
  .arena-info {white-space:nowrap;flex:none;min-height:29px;}
  .arena-basin {display:grid;grid-template-columns:clamp(188px,17.5vw,252px) minmax(0,1fr);gap:8px;flex:1;min-height:0;overflow:hidden;}
  .arena-decks {min-width:0; border:1px solid #ad9a7442;border-radius:12px;background:#0a1513a6;padding:10px 6px;display:flex; flex-direction:column; justify-content:center; align-items:center; gap:4px; }
  .arena-decks h3 {font-size:.9rem;color:#f0d39e; text-align:center;}
  .arena-decks .piles {display:flex;justify-content:center;gap:5px;padding:5px 0;flex:none; width:100%;}
  .arena-decks .pile img,.arena-decks .pile .empty-card {width:clamp(75px,7vw,110px);height:auto;aspect-ratio:var(--card-shape);}
  .arena-decks .pile strong {font-size:.66rem;margin:5px 0 1px;}
  .arena-decks .pile .count {font-size:.66rem;}
  .arena-decks .piles .arrow {font-size:1.1rem;}
  .arena-pile-hint {font-size:.69rem;text-align:center;margin-top:2px;}
  .arena-teams {display:grid;grid-template-columns:repeat(var(--team-columns,2),minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:7px;min-height:0;overflow:hidden;}
  .arena-team {min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:5px;padding:7px;border:1px solid #8ba38c70;border-radius:10px;background:#0a1713b0;}
  .arena-team.mine {border-color:#e6bf72;background:#3a38253d;}
  .arena-team-head {display:flex;justify-content:space-between;align-items:baseline;gap:6px;white-space:nowrap;min-width:0; flex:none;}
  .arena-team-head strong {font-size:clamp(.68rem,.83vw,.88rem);overflow:hidden;text-overflow:ellipsis;color:#f8ddb1;}
  .arena-team-head>span {font-size:.67rem;color:#c0cdbb;flex:none;}
  .arena-melds {display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));grid-auto-rows:minmax(0,1fr);align-content:start;gap:5px;min-height:0;flex:1;overflow:hidden;}
  .overview-meld {position:relative;min-width:0;min-height:42px;max-height:70px;overflow:hidden;display:flex;align-items:center;gap:5px;text-align:left;border:1px solid #839b8069;border-radius:7px;background:#283b31;color:#f2ecd9;padding:4px 6px;}
  .overview-meld:hover {border-color:#e4ca92;background:#394b3a;}
  .overview-meld:focus-visible {outline:2px solid #ecc97f;outline-offset:-2px;}
  .overview-meld.master {border-color:#e6c97b9a;background:#70592f70;}
  .overview-meld.journeyman {border-color:#baaa91a6;background:#514a3969;}
  .overview-meld.challenged {border-color:#f0aa8a;}
  .overview-meld-art {flex:none;width:28px;height:39px;position:relative;}
  .overview-meld-art img {display:block;width:28px;height:39px;object-fit:cover;border-radius:3px;}
  .overview-meld-label {display:flex;flex-direction:column;justify-content:center;min-width:0;gap:2px;}
  .overview-meld-label strong {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:clamp(.65rem,.76vw,.85rem);}
  .overview-meld-label>span {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:clamp(.56rem,.62vw,.71rem);color:#d0d4bc;}
  .overview-guild-seal {position:absolute;top:0;right:0;opacity:.3;width:25px;height:auto;pointer-events:none;}
  .overview-challenge {position:absolute;top:1px;right:1px;color:#ffc6a6;font-size:.8rem;}
  .arena-empty {font-size:.73rem;color:#8fa399;padding:5px;}
  .arena-idiots {font-size:.65rem;color:#e5c98d;flex:none;}
  .arena-teams.is-dense .arena-melds,.arena-team.many-melds .arena-melds {grid-template-columns:repeat(auto-fill,minmax(95px,1fr));gap:3px;}
  .arena-teams.is-dense .overview-meld,.arena-team.many-melds .overview-meld {padding:2px 4px;min-height:24px;max-height:38px;}
  .arena-teams.is-dense .overview-meld-art,.arena-team.many-melds .overview-meld-art {width:17px;height:26px;}
  .arena-teams.is-dense .overview-meld-art img,.arena-team.many-melds .overview-meld-art img {width:17px;height:26px;}
  .arena-teams.is-dense .overview-meld-label>span,.arena-team.many-melds .overview-meld-label>span {font-size:.57rem;}
  /* Compact horizontal hand with the live MPR/allocations to the right. */
  :root {--hand-card-width:clamp(122px,10.4vw,153px);}
  #app:has(.game-shell)>.hand-area {flex:none;position:relative;bottom:auto;z-index:8;padding:5px 13px 6px;max-height:none;overflow:visible;box-shadow:0 -4px 18px #0006;}
  .hand-head {min-height:23px;gap:7px;flex-wrap:nowrap;}
  .hand-head h2 {font-size:1.05rem;}
  .hand-head h2 .stat {font:600 .7rem Inter,system-ui,sans-serif;}
  .hand-head-side .mini {display:none;}
  .hand-head-side {gap:4px;}
  .hand-shelf-toggle {min-height:26px;padding:2px 8px;font-size:.72rem;}
  .hand-workbench {display:grid;grid-template-columns:minmax(0,1fr) clamp(240px,24vw,330px);align-items:stretch;gap:12px;min-height:0;}
  .hand-workbench:not(.has-tracker) {grid-template-columns:minmax(0,1fr);}
  .hand-deck {min-width:0;min-height:0;}
  .hand-wrap {width:100%;max-width:none;margin:0; padding:9px 4px 7px;gap:12px;min-height:0;}
  .hand-group {padding-right:11px;gap:3px;}
  .hand-group-title {font-size:.7rem;}
  .hand-group-cards {padding:4px 3px 7px;}
  .hand-card-holder {margin-right:calc(var(--hand-card-width)*-.56);}
  .hand-mpr-rail {display:flex;flex-direction:column;gap:4px;margin:0;padding:0;max-height:calc(var(--hand-card-width)*1.415 + 20px);overflow-y:auto;scrollbar-width:thin;}
  .hand-mpr-rail .association-tracker,.hand-mpr-rail .wild-allocation {padding:6px 9px;}
  .hand-mpr-rail .tracker-heading {flex-wrap:nowrap;gap:5px;}
  .hand-mpr-rail .tracker-heading strong {font-size:.75rem;}
  .hand-mpr-rail .tracker-mpr {font-size:.67rem;}
  .hand-mpr-rail .tracker-numbers {gap:4px;flex-wrap:nowrap;}
  .hand-mpr-rail .tracker-total {font-size:1.04rem;white-space:nowrap;}
  .hand-mpr-rail .tracker-state {font-size:.68rem;text-align:right;}
  .hand-mpr-rail .tracker-bar {margin:4px 0;height:5px;}
  .hand-mpr-rail .tracker-tip,.hand-mpr-rail .tracker-ready {display:none;}
  .hand-mpr-rail .association-chips {flex-wrap:nowrap;overflow-x:auto;}
  .hand-mpr-rail .association-chip {flex:none;padding:3px 6px;font-size:.66rem;}
  .hand-area .actions {flex-wrap:nowrap;overflow-x:auto;gap:6px;margin-top:1px;padding:3px 0 1px;position:relative;background:transparent;min-height:38px;scrollbar-width:thin;}
  .hand-area .actions .btn {white-space:nowrap;flex:none;padding:5px 8px;font-size:.76rem;min-height:32px;}
  .hand-area .actions .quick-mpr,.hand-area .actions .stat {font-size:.7rem;white-space:nowrap;flex:none;}
  .hand-area .actions .spacer {display:none;}
  .hand-area.is-collapsed .hand-shelf-content {display:none;}
  /* Details are optional: they do not shrink or obscure the default board. */
  .desktop-details-backdrop {position:fixed;inset:0;background:#040806a8;z-index:30;display:flex;justify-content:flex-end;}
  .desktop-details-drawer {display:block;width:min(435px,92vw);max-height:100dvh;overflow-y:auto;overscroll-behavior:contain;padding:15px;background:#192c26;border-left:2px solid #cfb475;box-shadow:-10px 0 30px #0009;}
  .desktop-details-head {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;color:#efcf91;}
  .desktop-details-drawer .rightcol,.desktop-details-drawer .stack {display:grid;gap:9px;}
  .desktop-details-drawer .panel {padding:11px;}
  .desktop-details-drawer .objective-card {max-height:145px;}
  .desktop-details-drawer .rightcol {margin-top:9px;}
}
@media (min-width:960px) and (max-height:780px) {
  #app:has(.game-shell)>.top {padding-top:4px;padding-bottom:4px;}
  .game-shell {padding-top:4px;padding-bottom:3px;gap:4px;}
  .game-shell>.turn-banner {padding:4px 9px;min-height:31px;font-size:.78rem;}
  .game-shell>.top-card-counts {min-height:23px;}
  :root {--hand-card-width:clamp(112px,9.2vw,131px);}
  .arena-toolbar {padding-bottom:3px;min-height:28px;}
  .arena-team {gap:3px;padding:5px;}
  .arena-melds {gap:3px;}
  .overview-meld {min-height:32px;max-height:57px;}
  .overview-meld-art,.overview-meld-art img {width:22px;height:31px;}
  #app:has(.game-shell)>.hand-area {padding:3px 10px 4px;}
  .hand-area .actions {min-height:32px;}
  .hand-area .actions .btn {min-height:28px;padding:4px 7px;}
}
/* Keep original full-size, scrollable layout on phones and small windows. */
@media (max-width:959px), (max-height:639px) {
  .desktop-arena,.desktop-details-backdrop {display:none!important;}
}
/* v0.25 finishing touch: give each public set a recognizable, larger card
   thumbnail without sacrificing the overview's no-page-scroll guarantee. */
@media (min-width:960px) and (min-height:640px) {
  .arena-melds {grid-template-columns:repeat(auto-fill,minmax(145px,1fr));}
  .overview-meld {max-height:84px;}
  .overview-meld-art,.overview-meld-art img {width:42px;height:58px;}
  .overview-meld-label strong {font-size:clamp(.75rem,.85vw,.9rem);}
  .overview-meld-label>span {font-size:clamp(.63rem,.69vw,.76rem);}
  .arena-teams[data-team-count="5"] .arena-melds {grid-template-columns:repeat(auto-fill,minmax(107px,1fr));}
  .arena-teams[data-team-count="5"] .overview-meld-art,
  .arena-teams[data-team-count="5"] .overview-meld-art img {width:24px;height:35px;}
  .arena-teams[data-team-count="5"] .overview-meld {max-height:48px;}
  .arena-teams.is-dense .arena-melds,
  .arena-team.many-melds .arena-melds {grid-template-columns:repeat(auto-fill,minmax(95px,1fr));gap:3px;}
  .arena-teams.is-dense .overview-meld-art,
  .arena-team.many-melds .overview-meld-art {width:17px;height:26px;}
  .arena-teams.is-dense .overview-meld-art img,
  .arena-team.many-melds .overview-meld-art img {width:17px;height:26px;}
}
@media (min-width:960px) and (max-height:780px) {
  .overview-meld {max-height:73px;}
  .overview-meld-art,.overview-meld-art img {width:34px;height:49px;}
}
/* Match the familiar pre-v0.25 order on phones/tablets: planner above hand. */
@media (max-width:959px), (max-height:639px) {
  .hand-workbench {display:flex;flex-direction:column;}
  .hand-mpr-rail {order:-1;}
}

/* v0.26: no redundant "Your hand — N cards" heading. The card counts are
   already shown in the player status strip above the table. The fold control
   lives inside the action bar when expanded; only a small tab remains when
   collapsed. No separate hand-heading row consumes board height. */
.hand-area .hand-head { display:none !important; }
.hand-area .hand-shelf-toggle { display:inline-flex;align-items:center;justify-content:center;flex:none;white-space:nowrap; }
.hand-closed-control { display:flex;justify-content:flex-end;align-items:center;min-height:24px; }
.hand-area.is-collapsed .hand-closed-control .hand-shelf-toggle { min-height:24px; }
@media(min-width:960px) and (min-height:640px) {
 #app:has(.game-shell)>.hand-area { padding-top:3px; }
 .hand-area .actions { min-height:34px; }
 .hand-area .actions .hand-shelf-toggle { min-height:28px; }
 .hand-area.is-collapsed .hand-closed-control { min-height:24px; }
}
@media(max-width:770px) {
 .hand-area .actions .hand-shelf-toggle { min-height:34px; }
 .hand-area.is-collapsed { padding-block:4px; }
}


/* v0.26: the draw pile sits directly ABOVE the discard pile.
   Keep this station compact on desktop so every team's sets remain in view.
   The original face-up card and its tightly fitted pickup outline are unchanged. */
.piles { flex-direction:column; align-items:center; }
.piles .arrow { display:block; flex:none; line-height:1; transform:none; }
@media (min-width:960px) and (min-height:640px) {
  .arena-basin { grid-template-columns:clamp(130px,12.2vw,177px) minmax(0,1fr); }
  .arena-decks { padding:7px 5px; gap:3px; min-height:0; }
  .arena-decks h3 { font-size:.83rem; }
  .arena-decks .piles { display:flex; flex-direction:column; justify-content:space-evenly; align-items:center; flex:1 1 auto; min-height:0; padding:3px 0; gap:2px; }
  .arena-decks .pile { display:flex;flex-direction:column;align-items:center;gap:2px;min-height:0;flex:0 1 auto; }
  .arena-decks .pile img,
  .arena-decks .pile .empty-card {
    width:auto; height:clamp(70px,12.9dvh,145px); aspect-ratio:var(--card-shape); max-width:100%;
  }
  .arena-decks .pile strong {font-size:.69rem; margin:1px 0 0;}
  .arena-decks .pile .count {font-size:.68rem;}
  .arena-decks .piles .arrow {font-size:.95rem;line-height:.9;}
}
@media (max-width:959px), (max-height:639px) {
  .piles {gap:4px;padding:4px 0 9px;}
  .piles .arrow {font-size:1.05rem;}
}

/* v0.27: Full-card association tiles, vertically flush, with a separate
   accessible scrolling region for each team. Draw/discard and other teams
   do not move when this region scrolls. */
@media (min-width:960px) and (min-height:640px) {
 .arena-team {min-height:0;}
 .arena-melds, .arena-teams.is-dense .arena-melds,
 .arena-team.many-melds .arena-melds,
 .arena-teams[data-team-count="5"] .arena-melds {
   display:grid;
   grid-template-columns:repeat(auto-fill,minmax(min(100%,155px),1fr));
   grid-auto-rows:max-content;
   align-content:start;
   column-gap:5px;
   row-gap:0;
   flex:1 1 auto;
   min-height:0;
   overflow-x:hidden;
   overflow-y:auto;
   overscroll-behavior-y:contain;
   scrollbar-gutter:stable;
   scrollbar-width:thin;
   scrollbar-color:#d5b477 #1a2923;
   padding:0 1px 0 0;
 }
 .arena-melds::-webkit-scrollbar {width:7px;}
 .arena-melds::-webkit-scrollbar-thumb {background:#caa96b;border-radius:5px;}
 .arena-melds::-webkit-scrollbar-track {background:#182b24;}
 .overview-meld, .arena-teams.is-dense .overview-meld,
 .arena-team.many-melds .overview-meld,
 .arena-teams[data-team-count="5"] .overview-meld {
   display:flex;
   flex-direction:column;
   align-items:stretch;
   justify-content:flex-start;
   gap:4px;
   min-width:0;
   min-height:130px;
   max-height:none;
   height:auto;
   padding:5px;
   text-align:left;
   border-radius:4px;
   border-color:#a7b49b57;
   overflow:hidden;
   background:#1f352d;
   flex:none;
 }
 .overview-meld.master {background:#54482a;border-color:#d6b765a0;}
 .overview-meld.journeyman {background:#3a4036;border-color:#acb4a6a1;}
 .overview-meld:hover {background:#365140;z-index:1;}
 .overview-meld-head {display:flex;align-items:baseline;justify-content:space-between;gap:4px;min-width:0;flex:none;border-bottom:1px solid #ffffff24;padding-bottom:3px;}
 .overview-meld-head strong {font-size:clamp(.75rem,.81vw,.92rem);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#f5dfad;}
 .overview-meld-count {font-size:.63rem;white-space:nowrap;color:#ced3c6;}
 .overview-meld-cards {display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;min-height:72px;min-width:0;flex:none;padding:1px 0;}
 .overview-meld-card-row {display:flex;align-items:flex-start;justify-content:flex-start;min-width:0;max-width:100%;height:66px;flex:none;overflow:hidden;padding:1px 1px 2px 0;}
 .overview-meld-card-row .overview-card-image,
 .arena-teams.is-dense .overview-meld-card-row .overview-card-image {
   display:block;flex:none;position:relative;
   width:46px;height:64px;object-fit:fill;border:1px solid #eedbb6a9;
   border-radius:5px;margin-right:-24px;box-shadow:1px 1px 4px #0009;
 }
 .overview-meld-card-row .overview-card-image:last-child {margin-right:0;}
 .overview-meld-foot {display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:3px;min-width:0;font-size:.64rem;color:#d2d6c6;line-height:1.1;}
 .overview-challenge-badge {color:#ffcbb4;white-space:nowrap;}
 .overview-meld .overview-meld-art,.overview-meld .overview-meld-label,.overview-meld .overview-guild-seal,.overview-meld .overview-challenge {display:none;}
}
@media (min-width:960px) and (max-height:780px) {
 .overview-meld, .arena-team.many-melds .overview-meld {min-height:119px;gap:3px;padding:4px;}
 .overview-meld-card-row {height:61px;}
 .overview-meld-card-row .overview-card-image {height:59px;width:43px;margin-right:-22px;}
 .overview-meld-cards {min-height:64px;}
}

/* v0.28: readable enlarged draw and discard cards in a stripped-back pile
   station. The title is ABOVE each card, and only the count sits BELOW it.
   Retain the exact card-only green eligibility outline. */
.piles .arrow, .arena-decks > h3 {display:none !important;}
.pile {display:flex;flex-direction:column;align-items:center;gap:5px;}
.pile strong {display:block;order:0;margin:0;font-weight:700;color:#f2dbac;font-size:.9rem;line-height:1.25;}
.pile .count {order:2;margin:0;color:#c9d1c8;line-height:1.2;}
.pile > img, .pile > .empty-card, .pile > .discard-image-wrap {order:1;}
.discard-image-wrap {position:relative;display:block;}
.pile-mistrust-badge {position:absolute;z-index:2;right:5px;bottom:7px;pointer-events:none;
  font-size:.62rem;font-weight:750;line-height:1;padding:4px 6px;
  background:#6b3c2ced;border:1px solid #f8c3a8;border-radius:6px;color:#fff1da;
  box-shadow:0 2px 7px #0009;}
@media (min-width:960px) and (min-height:640px) {
 .arena-basin {grid-template-columns:clamp(164px,14.25vw,226px) minmax(0,1fr);}
 .arena-decks {padding:5px 6px;gap:0;justify-content:center;}
 .arena-decks .piles {flex:1 1 auto;min-height:0;display:flex;flex-direction:column;
   justify-content:space-evenly;align-items:center;gap:7px;padding:0;width:100%;}
 .arena-decks .pile {display:flex;flex-direction:column;align-items:center;gap:3px;flex:0 1 auto;min-height:0;}
 .arena-decks .pile img,.arena-decks .pile .empty-card {height:clamp(108px,16.8dvh,179px);
   width:auto;max-width:100%;aspect-ratio:var(--card-shape);object-fit:contain;}
 .arena-decks .pile strong {font-size:clamp(.78rem,.9vw,.99rem);margin:0;line-height:1.17;}
 .arena-decks .pile .count {font-size:.76rem;margin:0;}
 /* Full artwork, but more overlap: individual cards are larger while the
    top-left point value of each card is left visible in a compact stack. */
 .arena-melds,.arena-teams.is-dense .arena-melds,
 .arena-team.many-melds .arena-melds,.arena-teams[data-team-count="5"] .arena-melds {
   grid-template-columns:repeat(auto-fill,minmax(min(100%,181px),1fr));
 }
 .overview-meld-card-row {height:100px;padding:2px 0 3px;}
 .overview-meld-card-row .overview-card-image,
 .arena-teams.is-dense .overview-meld-card-row .overview-card-image {
   width:68px;height:96px;aspect-ratio:1311 / 1853;object-fit:contain;
   margin-right:-49px;border-radius:7px;
 }
 .overview-meld-card-row .overview-card-image:last-child,
 .arena-teams.is-dense .overview-meld-card-row .overview-card-image:last-child {margin-right:0;}
 .overview-meld-cards {min-height:103px;}
 .overview-meld,.arena-teams.is-dense .overview-meld,
 .arena-team.many-melds .overview-meld,
 .arena-teams[data-team-count="5"] .overview-meld {min-height:155px;}
}
@media (min-width:960px) and (min-height:640px) and (max-height:780px) {
 .arena-decks .pile img,.arena-decks .pile .empty-card {height:clamp(105px,16.1dvh,130px);}
 .arena-decks .piles {gap:3px;}
 .overview-meld-card-row {height:89px;}
 .overview-meld-card-row .overview-card-image,
 .arena-teams.is-dense .overview-meld-card-row .overview-card-image {width:61px;height:86px;margin-right:-44px;}
 .overview-meld-cards {min-height:92px;}
 .overview-meld,.arena-team.many-melds .overview-meld {min-height:140px;}
}
@media (max-width:959px), (max-height:639px) {
 .piles {gap:12px;}
 .pile strong {font-size:.9rem;}
}

/* v0.29 — Put Corrupt Magistrates on equal visual footing with associations.
   The full cards live in the same tile grid and use its native card scale. */
.overview-magistrates {background:#41352a !important;border-color:#d2a777b3 !important;}
.overview-magistrates:hover {background:#54432f !important;border-color:#edcf92 !important;}
.overview-magistrates .overview-meld-head strong {color:#ffddaa;}
.overview-magistrates .overview-meld-foot {color:#f3d6b5;}
.magistrate-score {font-weight:800;color:#ffdfa0;white-space:nowrap;}
.magistrate-score.negative {color:#ffbba5;}
.magistrate-association-tile {border-color:#d2a777 !important;background:#41352a !important;}
.magistrate-association-tile .title {color:#ffe2a8;}
.team-table-idiots {margin-top:4px;}

/* v0.30 · physical-card layout for all public associations and guilds.
   Seven enlarged, heavily overlapped cards occupy one row. Extra cards
   scroll HORIZONTALLY inside that set, without moving adjacent team panels.
   Natural proportions are preserved for both Guildhall covers. */
.overview-meld-head {
  font-size:clamp(.73rem,.83vw,.93rem);
  color:#f5dfad;
  font-weight:700;
}
.overview-meld-head strong,
.overview-meld-head .overview-meld-count {
  font:inherit;
  font-size:inherit;
  line-height:1.28;
  font-weight:700;
  color:inherit;
  flex:none;
}
.overview-meld-head strong {min-width:0;flex:1 1 auto;}
.overview-meld-cards {position:relative;min-width:0;width:100%;}
.overview-meld-card-row {
  display:block;
  position:relative;
  width:100%;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  height:auto;
  padding:1px 1px 4px 0;
  overscroll-behavior-x:contain;
  touch-action:pan-x;
}
.overview-meld-card-row.is-scrollable {
  overflow-x:auto;
  scrollbar-width:thin;
  scrollbar-color:#e9c381 #1a2923;
  padding-bottom:7px;
}
.overview-meld-card-row.is-scrollable::-webkit-scrollbar {height:5px;}
.overview-meld-card-row.is-scrollable::-webkit-scrollbar-thumb {background:#d4b273;border-radius:6px;}
.overview-card-track {display:flex;align-items:flex-start;width:max-content;min-width:0;padding:1px 1px 1px 0;}
.overview-meld-card-row .overview-card-track > .overview-card-image,
.arena-teams.is-dense .overview-meld-card-row .overview-card-track > .overview-card-image {
  display:block;
  flex:none;
  position:relative;
  width:var(--association-card-width,68px);
  height:auto;
  aspect-ratio:1311/1853;
  object-fit:contain;
  margin:0;
  margin-right:calc(var(--association-card-step,14px) - var(--association-card-width,68px));
  border-radius:6px;
  border:1px solid #eedbb6a9;
  box-shadow:1px 2px 6px #000a;
}
.overview-meld-card-row .overview-card-track > .overview-card-image:last-child,
.arena-teams.is-dense .overview-meld-card-row .overview-card-track > .overview-card-image:last-child {margin-right:0;}
.overview-guildhall-cover,
.overview-challenge-card {
  position:absolute;
  display:block;
  pointer-events:none;
  z-index:3;
  filter:drop-shadow(0 3px 5px #000e);
}
.overview-guildhall-cover {
  width:min(98px,65%);
  height:auto;
  aspect-ratio:1122/822;
  object-fit:contain;
  left:50%;top:37%;
  transform:translateX(-50%);
}
.overview-challenge-card {
  width:min(49px,34%);
  height:auto;
  aspect-ratio:1311/1853;
  object-fit:contain;
  right:7px;top:31%;
  transform:rotate(6deg);
  border-radius:4px;
  border:1px solid #f0b39c;
}
@media(min-width:960px) and (min-height:640px) {
  .overview-meld-cards {min-height:0;align-items:stretch;}
  .overview-meld-card-row {height:auto;flex:none;}
  .overview-meld,
  .arena-teams.is-dense .overview-meld,
  .arena-team.many-melds .overview-meld,
  .arena-teams[data-team-count="5"] .overview-meld {min-height:0;}
  .overview-meld-card-row {
    --association-card-width:clamp(64px,5.15vw,76px);
    --association-card-step:clamp(13px,1vw,15px);
  }
}
@media (min-width:960px) and (min-height:640px) and (max-height:780px) {
  .overview-meld-card-row {
    --association-card-width:clamp(60px,4.75vw,68px);
    --association-card-step:clamp(12px,.94vw,14px);
  }
  .overview-guildhall-cover {width:min(85px,62%);}
}
/* The mobile table uses the same seven-card row, with its own inner horizontal
   scroll. Covers remain pinned over the visible cards rather than scrolling. */
.meld-inspect > .fan,
.meld .fan,
.meld.is-guild .fan {
  display:block;
  position:relative;
  overflow:visible;
  height:auto;
  min-height:0;
  width:100%;
  padding:3px 2px 7px;
}
.meld .fan .mobile-meld-track,
.meld.is-guild .fan .mobile-meld-track {
  display:flex;
  align-items:flex-start;
  width:100%;
  min-width:0;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  touch-action:pan-x;
  scrollbar-width:thin;
  scrollbar-color:#cfaf70 #21352b;
  padding:2px 1px 9px;
}
.meld .fan .mobile-meld-track > img,
.meld.is-guild .fan .mobile-meld-track > img {
  display:block;
  flex:none;
  width:var(--table-card-width);
  height:auto;
  aspect-ratio:1311/1853;
  object-fit:contain;
  margin:0;
  margin-right:calc(var(--mobile-association-step) - var(--table-card-width));
  border-radius:7px;
  box-shadow:0 3px 8px #0009;
}
.meld .fan .mobile-meld-track > img:last-child,
.meld.is-guild .fan .mobile-meld-track > img:last-child {margin-right:0;}
.meld .fan {--mobile-association-step:clamp(19px,6vw,27px);}
.meld .fan .guildhall-ribbon,
.meld.is-guild .fan .guildhall-ribbon {
  position:absolute;
  z-index:3;
  top:auto;
  bottom:15px;
  left:50%;
  width:min(175px,67%);
  height:auto;
  aspect-ratio:1122/822;
  max-height:none;
  margin:0;
  transform:translateX(-50%);
  border:1px solid #edcf91;
  pointer-events:none;
}
.meld .fan .guildhall-ribbon > img,
.meld.is-guild .fan .guildhall-ribbon > img {
  position:static!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
}
.mobile-challenge-overlay {
  position:absolute;
  z-index:4;
  top:36%;right:12px;
  width:clamp(45px,17%,70px);
  height:auto;
  aspect-ratio:1311/1853;
  border:1px solid #f0bcad;
  border-radius:5px;
  object-fit:contain;
  transform:rotate(7deg);
  box-shadow:0 4px 10px #000b;
  pointer-events:none;
}
.meld-inspect .title {display:flex;align-items:baseline;justify-content:space-between;gap:5px;font-size:.8rem;}
.meld-inspect .title .mini {font:inherit;font-size:inherit;color:inherit;font-weight:inherit;}

/* Limit the mobile card window to exactly one seven-card fan. The ninth card
   cannot silently squeeze into that window: swipe to see cards 8 onward. */
.meld .fan .mobile-meld-track,
.meld.is-guild .fan .mobile-meld-track {
  width:min(100%,calc(var(--table-card-width) + var(--mobile-association-step) * 6 + 4px));
  max-width:100%;
  flex:none;
}
/* Base card selectors apply `position:relative` to all images. This overlay
   must override them to genuinely sit ON the challenged association. */
.meld .fan > .mobile-challenge-overlay,
.meld.is-guild .fan > .mobile-challenge-overlay {
  display:block;
  position:absolute;
  z-index:6;
  top:auto;
  bottom:17px;
  right:clamp(6px,5%,20px);
  width:clamp(45px,17%,70px);
  height:auto;
  aspect-ratio:1311/1853;
  object-fit:contain;
  margin:0;
  border-radius:5px;
  transform:rotate(7deg);
  pointer-events:none;
}
/* Keep the Legal Challenge physically over the card stack, not alongside it. */
.meld .fan > .mobile-challenge-overlay,
.meld.is-guild .fan > .mobile-challenge-overlay {
  left:min(57%,190px);
  right:auto;
}
/* Even on a wide team tile, the viewing slot spans seven cards, never nine. */
@media (min-width:960px) and (min-height:640px) {
  .overview-meld-card-row {
    width:min(100%,calc(var(--association-card-width) + var(--association-card-step) * 6 + 4px));
  }
}

/* v0.32 — Magistrate stacks use precisely the same horizontal, overlapped
   card track as associations, on both desktop and smaller screens. */
.overview-magistrates .magistrate-card-row {display:block;white-space:nowrap;}
.overview-magistrates .magistrate-card-row > .overview-card-track {display:flex;flex-wrap:nowrap;align-items:flex-start;}
.magistrate-association-tile .magistrate-mobile-track {display:flex;flex-wrap:nowrap;}
.magistrate-association-tile .magistrate-mobile-track > img {display:block;flex-shrink:0;}


/* v0.33: Round-end table review is the default, with no score ledger or
   hand obscuring the public table. Preserve the same team-specific scrolling. */
.round-review-shell {max-width:1535px;margin:0 auto;padding:12px 16px 22px;display:flex;flex-direction:column;gap:12px;}
.round-review-banner {display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;padding:13px 18px;border:1px solid #c6a86b77;border-radius:13px;background:linear-gradient(110deg,#40503a,#24392f);}
.round-review-banner .eyebrow {margin:0 0 4px;font-size:.66rem;}
.round-review-banner h1 {font-size:clamp(1.05rem,2.1vw,1.7rem);line-height:1.2;color:#ffe1a6;}
.round-review-banner p {color:#d7e3d6;font-size:.8rem;line-height:1.35;margin-top:5px;max-width:850px;}
.round-review-banner>.btn {flex:none;font-size:1rem;min-width:155px;}
.round-review-table-hint {margin-left:auto;font-size:.75rem;color:#d7c9a7;}
.round-review-mobile {display:grid;gap:12px;}
.round-scores-back {display:flex;align-items:center;gap:13px;flex-wrap:wrap;margin:13px 0;}
.round-scores-back .btn {border-color:#d8bc7a;}
@media (min-width:960px) and (min-height:640px) {
 body:has(.round-review-shell){overflow:hidden;}
 #app:has(.round-review-shell){display:flex;flex-direction:column;height:100dvh;min-height:0;overflow:hidden;}
 #app:has(.round-review-shell)>.top{flex:none;padding-top:5px;padding-bottom:5px;}
 .round-review-shell{max-width:none;width:100%;flex:1;min-height:0;overflow:hidden;padding:8px clamp(10px,1.3vw,24px) 10px;gap:7px;}
 .round-review-shell>.desktop-arena{flex:1;min-height:0;}
 .round-review-shell>.round-review-mobile{display:none;}
}
@media (max-width:959px), (max-height:639px) {
 .round-review-shell{padding:10px;}
 .round-review-shell>.round-review-mobile{display:grid;}
 .round-review-banner>.btn{width:100%;}
 .round-review-mobile .panel{padding:11px;}
 .round-review-mobile .meld-grid{align-items:start;}
}

/* v0.35 · Show the server-provided MPR next to every score in the details drawer
   (including the mobile view) as well as in the desktop top score strip. */
.score-values {display:inline-flex;align-items:baseline;justify-content:flex-end;gap:8px;white-space:nowrap;}
.score-mpr {font-size:.75rem;color:#a7d0ba;}
.score-mpr b {font-weight:650;font-variant-numeric:tabular-nums;}
@media(max-width:430px){.score-values{gap:5px}.score-mpr{font-size:.69rem}}

/* v0.36: personal, persistent notification preference in the game header. */
.opponent-notices-toggle{display:inline-flex;align-items:center;gap:7px;padding:5px 9px;border:1px solid #8aa18b7a;border-radius:11px;background:#1f352f;color:#f0e3c5;font-size:.75rem;font-weight:600;white-space:nowrap;cursor:pointer;user-select:none;min-height:33px}
.opponent-notices-toggle:hover{border-color:#dabd85;background:#29443a}
.opponent-notices-toggle input{position:absolute;width:1px;height:1px;opacity:0}
.opponent-notices-toggle:has(input:focus-visible){outline:3px solid #e7c886;outline-offset:3px}
.opponent-toggle-track{position:relative;display:block;flex:none;width:31px;height:17px;border-radius:20px;background:#bb9554;border:1px solid #ecd297;transition:background .12s}
.opponent-toggle-track:after{content:'';position:absolute;left:2px;top:2px;width:11px;height:11px;border-radius:50%;background:#17251f;transform:translateX(14px);transition:transform .12s}
.opponent-notices-toggle input:checked+.opponent-toggle-track{background:#50635b;border-color:#97a99b}
.opponent-notices-toggle input:checked+.opponent-toggle-track:after{transform:translateX(0);background:#f2e8d4}
.opponent-notices-toggle input:not(:checked)~.opponent-toggle-label{color:#f2c985}
@media(max-width:740px){.top{flex-wrap:wrap;gap:6px;padding:7px 10px}.brand{font-size:1.07rem}.brand img{width:27px;height:31px}.top-right{width:100%;justify-content:flex-start;gap:5px}.opponent-notices-toggle{font-size:.72rem;padding:4px 7px;min-height:29px}.top-right .tag{font-size:.69rem;padding:4px 7px}}
@media(max-width:430px){.top-right{row-gap:5px}}

/* v0.37 — Clickable physical piles and a truly sideways Mistrust card.
   The card art rotates, rather than a decorative "Mistrust" badge. */
.pile-deck-button{border:0;padding:0;background:transparent;display:block;line-height:0;border-radius:var(--card-corner-radius);}
.pile-deck-button:disabled{opacity:1;cursor:default;}
.pile-clickable{cursor:pointer;}
.pile-clickable:focus-visible{outline:3px solid #ffedab;outline-offset:4px;}
.pile-deck-button.pile-clickable:hover img{filter:brightness(1.1);}
.pile .discard-image-wrap{width:min(100%,208px);overflow:visible;}
.pile .discard-image-wrap .discard-stack{
 display:block;position:relative;margin:0 auto;
 width:100%;height:var(--discard-face-height,148px);
 padding:0;border:0;overflow:visible;background:transparent;line-height:0;
}
.pile .discard-image-wrap .discard-stack > img,
.arena-decks .pile .discard-image-wrap .discard-stack > img{
 position:absolute!important;display:block!important;
 top:50%;left:50%;height:100%!important;width:auto!important;
 max-width:none!important;object-fit:contain;aspect-ratio:var(--card-shape);
 border-radius:var(--card-corner-radius);
 transform:translate(-50%,-50%);box-shadow:0 4px 16px #000b;
}
.pile .discard-image-wrap .discard-stack > .discard-main-art{z-index:2;left:56%;}
.pile .discard-image-wrap .discard-stack > .discard-mistrust-art{
 z-index:1;left:43%;transform:translate(-50%,-50%) rotate(-90deg);
}
.pile .discard-image-wrap .discard-stack > .discard-mistrust-art.mistrust-on-top{
 z-index:3;left:49%;
}
.pile.discard-pile.pickup-available .discard-stack > .discard-main-art{
 outline:3px solid #7fee9e;outline-offset:2px;
 box-shadow:0 0 12px 4px #48cb7299,0 10px 24px #0008;
}
.pile.discard-pile.pickup-available .discard-stack > .discard-mistrust-art.mistrust-on-top{
 outline:3px solid #7fee9e;outline-offset:2px;
 box-shadow:0 0 12px 4px #48cb7299,0 10px 24px #0008;
}
.pile.discard-pile.pickup-available .discard-stack > .discard-main-art:has(+ .mistrust-on-top){outline:none;box-shadow:0 4px 16px #000b;}
.pile.discard-pile.discard-available .discard-stack > .discard-main-art,
.pile.discard-pile.discard-available .discard-stack > .discard-mistrust-art.mistrust-on-top{
 filter:drop-shadow(0 0 5px #f4cf7b);
}
.overview-meld.can-click-place,.meld.can-click-place{border-color:#a4df9e;cursor:pointer;}
.overview-meld.can-click-place:focus-visible,.meld.can-click-place:focus-visible{outline:3px solid #bdf5a9;}
@media(min-width:960px) and (min-height:640px){
 .arena-decks .pile .discard-image-wrap .discard-stack{--discard-face-height:clamp(108px,16.8dvh,179px);}
}
@media(min-width:960px) and (min-height:640px) and (max-height:780px){
 .arena-decks .pile .discard-image-wrap .discard-stack{--discard-face-height:clamp(105px,16.1dvh,130px);}
}
@media(max-width:959px), (max-height:639px){
 .pile .discard-image-wrap .discard-stack{--discard-face-height:120px;}
}
@media(max-width:430px){
 .pile .discard-image-wrap{max-width:168px;}
 .pile .discard-image-wrap .discard-stack{--discard-face-height:116px;}
}
/* Give the absolutely positioned discard layers a real, responsive frame. */
.piles .pile {width:100%;}
.pile .discard-image-wrap {width:clamp(130px,13vw,184px);max-width:100%;}
@media(max-width:959px), (max-height:639px){
 .pile .discard-image-wrap{width:160px;max-width:100%;}
}
/* The desktop arena selector above has greater specificity than the shared
   per-card rule: explicitly preserve the physical sideways rotation here. */
.pile .discard-image-wrap .discard-stack > .discard-main-art {left:58%!important;}
.pile .discard-image-wrap .discard-stack > .discard-mistrust-art {
 left:43%!important;transform:translate(-50%,-50%) rotate(-90deg)!important;
}
.pile .discard-image-wrap .discard-stack > .discard-mistrust-art.mistrust-on-top {left:49%!important;}

/* v0.38: show team letters plus a player-aware roster in every table header. */
.team-heading .team-roster-heading{min-width:0;overflow-wrap:anywhere;line-height:1.24;}
.arena-team-head{align-items:start;white-space:normal;}
.arena-team-head .team-roster-heading{
 min-width:0;flex:1 1 auto;white-space:normal;overflow-wrap:anywhere;
 line-height:1.2;font-size:clamp(.64rem,.76vw,.86rem);
 max-height:4.8em;overflow-y:auto;overscroll-behavior-y:contain;
 scrollbar-width:thin;
}
.arena-team-head>span{padding-top:1px;}
@media (min-width:960px) and (max-height:780px){
 .arena-team-head .team-roster-heading{max-height:3.6em;}
}

/* v0.39: concise, server-authoritative draw-pile explanation */
.discard-pickup-hint{font-size:.86rem;line-height:1.35;margin:.4rem .4rem .6rem;max-width:80ch;color:var(--muted,#615d52)}

/* v0.40 - auditable end-of-round Guildhall ledger */
.score-moments{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}
.score-moments>div{background:#213830;border:1px solid #dab8784b;border-radius:12px;padding:16px 12px;text-align:center;display:grid;gap:4px}
.score-moments strong{font-family:Georgia,serif;font-size:1.9rem;color:#f3d58c}
.score-moments span{font-size:.81rem;color:#ced9d0}
.score-moments p{grid-column:1/-1;color:#ead8b4;text-align:center;font-size:.85rem}
.round-scores .history-scroll{max-width:100%;overflow-x:auto}
.round-scores .round-table{width:100%;min-width:650px;display:table}
.ledger-details{display:grid;gap:10px;margin:14px 0}
.score-detail{border:1px solid #849a8566;border-radius:12px;background:#ffffff08;padding:10px 14px}
.score-detail>summary{cursor:pointer;color:#f1d291;font-weight:650;padding:6px 0}
.score-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:12px}
.score-detail-grid>div{border-top:1px solid #c0ac7e3e;padding-top:10px;min-width:0}
.score-detail-grid h3{margin-bottom:9px;color:#e7d1a3}
.ledger-line{display:flex;gap:12px;align-items:baseline;justify-content:space-between;border-bottom:1px solid #ffffff13;font-size:.82rem;padding:5px 0}
.ledger-line span{color:#ced6ce}
.ledger-line b{white-space:nowrap}
.objective-ledger-row{border-bottom:1px solid #ffffff22;padding:8px 0;display:grid;gap:5px;font-size:.82rem}
.objective-progress{display:inline-block;padding:3px 6px;margin:2px 5px 2px 0;border-radius:6px}
.objective-progress.achieved{color:#c5f5d4;background:#3975544d}
.objective-progress.missing{color:#d1c5ad;background:#947a5540}
.round-history{margin-top:20px}
@media(max-width:600px){.score-detail-grid{grid-template-columns:1fr}.score-moments{gap:5px}.score-moments strong{font-size:1.5rem}.score-moments span{font-size:.72rem}}

/* v0.42 optional, non-destructive guided practice and authoritative previews */
.tutorial-landing-action{margin:12px 0;text-align:center}
.server-move-preview{margin:8px 0 0;padding:10px 13px;border:1px solid rgba(214,184,118,.4);border-radius:10px;background:rgba(23,35,32,.65);font-size:.92rem;line-height:1.45}
.server-move-preview.valid{border-color:#b3ce83;color:#e3efcb}
.server-move-preview.invalid{border-color:#d6a17d;color:#ffe1ca}
.tutorial-overlay{position:fixed;z-index:100000;inset:0;background:rgba(6,13,11,.88);display:flex;align-items:center;justify-content:center;padding:16px;overflow-y:auto}
.tutorial-window{background:linear-gradient(150deg,#223d33,#142821);border:2px solid #c9a764;color:#fff6df;border-radius:18px;box-shadow:0 18px 80px #050b08;width:min(850px,100%);max-height:96vh;overflow-y:auto;padding:clamp(18px,4vw,36px)}
.tutorial-top,.tutorial-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.tutorial-top{color:#e4cf9e;letter-spacing:.11em;font-size:.8rem}
.tutorial-progress{height:7px;background:#425447;border-radius:15px;margin:16px 0 20px;overflow:hidden}
.tutorial-progress>div{height:100%;background:#e3bd72;transition:width .2s}
.tutorial-window h2{font-size:clamp(1.45rem,3.5vw,2.15rem);margin:0 0 10px;color:#ffe7a8}
.tutorial-summary{line-height:1.55;color:#f4ecd5}
.tutorial-prompt{background:#314e42;border-left:4px solid #e3bd72;border-radius:6px;padding:12px;line-height:1.5}
.tutorial-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:12px;margin:20px 0}
.tutorial-card{background:#1e352d;border:2px solid #6b7967;border-radius:12px;color:#fff8e7;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:7px;justify-content:space-between;padding:10px;min-width:0}
.tutorial-card:hover,.tutorial-card:focus-visible{border-color:#efcc8d;outline:2px solid #efcc8d;outline-offset:1px}
.tutorial-card.selected{background:#345942;border-color:#f7d47a;box-shadow:inset 0 0 0 1px #f7d47a}
.tutorial-card img{width:min(100%,115px);height:144px;object-fit:contain;border-radius:6px}
.tutorial-card span{font-size:.86rem;text-align:center;overflow-wrap:anywhere}
.tutorial-pile{display:flex;align-items:center;gap:12px;color:#ffe7ac;font-weight:600}
.tutorial-pile img{width:40px;height:56px;object-fit:contain}
.tutorial-feedback{min-height:48px;line-height:1.45;color:#ffd5a4}
.tutorial-feedback.correct{color:#d8ebba}
.tutorial-selection-total{font-weight:600;color:#ffe7a8}
.tutorial-footer{border-top:1px solid #53624f;padding-top:16px}
.tutorial-footer span{font-size:.78rem;color:#c8d2c8}
@media (max-width:550px){.tutorial-window{max-height:98vh;padding:14px}.tutorial-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tutorial-card img{height:100px}.tutorial-footer span{width:100%}}

/* v0.42.1 — tap an opponent association to play the selected Legal Challenge. */
.meld-inspect.can-click-challenge,.overview-meld.can-click-challenge{
 border-color:#f0c777!important;box-shadow:inset 0 0 0 2px #f0c777,0 0 0 2px #f0c77765;
 cursor:pointer;background-color:#574728!important;
}
.meld-inspect.can-click-challenge:hover,.overview-meld.can-click-challenge:hover{
 outline:2px solid #ffe9af;outline-offset:2px;
}
.challenge-tap-hint{margin:8px 0 0;padding:9px 12px;border-left:3px solid #e9bf71;
 border-radius:5px;background:#e9bf711a;color:#f5dfa6;font-size:.84rem}

/* v0.43.1: End-of-round public hand reveal, inside each team's own table.
   Keep card strips scrollable instead of stretching the village layout. */
.round-end-hands {margin-top:8px;padding:9px;border:1px solid #c6ae764d;border-radius:9px;background:#11221ecf;min-width:0;display:grid;gap:8px;}
.round-end-hands h4 {font-size:.84rem;line-height:1.3;color:#efd7a4;display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;}
.round-end-hands h4 .mini {font-weight:400;color:#cbcab8;}
.round-end-hand-player {min-width:0;display:grid;gap:4px;}
.round-end-hand-heading {display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 9px;font-size:.8rem;}
.round-end-hand-heading strong {font-weight:700;color:#f5f1dd;overflow-wrap:anywhere;}
.round-end-hand-cards {display:flex;gap:4px;overflow-x:auto;overscroll-behavior-x:contain;padding:3px 2px 7px;scrollbar-width:thin;scrollbar-color:#c4a46e #26382e;min-height:48px;align-items:center;}
.round-end-hand-card {flex:none;display:block;padding:0;border:1px solid #b2a47c6c;border-radius:4px;background:#263529;cursor:zoom-in;line-height:0;}
.round-end-hand-card img {width:39px;height:56px;object-fit:contain;border-radius:3px;}
.round-end-hand-card:hover,.round-end-hand-card:focus-visible {border-color:#ffd790;filter:brightness(1.12);}
.no-cards-left {padding:6px 4px;color:#b6cfbe;}
@media (min-width:960px) and (min-height:640px) {
 .round-review-shell .arena-team>.round-end-hands {flex:none;max-height:clamp(110px,22dvh,215px);overflow-y:auto;scrollbar-width:thin;}
 .round-review-shell .arena-team>.round-end-hands h4 {font-size:.75rem;}
 .round-review-shell .arena-team>.round-end-hands .round-end-hand-heading {font-size:.74rem;}
 .round-review-shell .arena-team>.round-end-hands .round-end-hand-card img {width:32px;height:46px;}
 .round-review-shell .arena-team>.arena-melds {min-height:0;flex:1 1 auto;}
}
@media (max-width:959px), (max-height:639px) {
 .round-review-mobile .round-end-hands {margin-top:12px;}
 .round-review-mobile .round-end-hand-card img {width:60px;height:86px;}
}

/* v0.46 — accessible persistent turn, vote and team-impact guidance. */
.flow-guidance{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));gap:9px;margin:9px 0 12px;padding:12px 14px;background:#122821;border:1px solid #93b19b77;border-radius:12px;color:#eef2e4}
.flow-guidance.flow-own{border-color:#eac779;background:#38402a}
.flow-guidance.flow-next{border-color:#95d8bc;background:#1d4039}
.flow-guidance.flow-vote{border-color:#f4c57a;background:#493f28}
.flow-main,.flow-impact{display:grid;gap:4px;align-content:start;line-height:1.42;font-size:.84rem}
.flow-main strong{color:#ffe6a9;font-size:.95rem}.flow-impact{border-left:3px solid #e3b477;padding:4px 0 4px 11px;background:#ffffff06;border-radius:4px}
.flow-impact strong{color:#ffdb9b}.flow-impact.cleared{border-left-color:#9ad7a9}.flow-impact.guild{border-left-color:#e5bf6a}
.vote-guidance{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:10px 0;border-color:#e5c37b}
.vote-guidance.vote-required{border-width:2px;background:#65522e76}
.vote-guidance p{margin:4px 0}.vote-guidance .form-row{margin:0;flex-wrap:wrap}
.player-row.is-taking-turn{border:1px solid #ddbb74;background:#b39a452b}
.turn-seat-marker{display:inline-block;padding:2px 6px;border:1px solid #d0b980;border-radius:5px;color:#ffdda0;background:#92763633;font-size:.68rem;font-weight:800;margin-left:5px}
.top-card-count.active-turn{outline:2px solid #e4c17d;outline-offset:2px}
@media(max-width:550px){.flow-guidance{padding:10px}.flow-main,.flow-impact{font-size:.77rem}.vote-guidance .form-row{width:100%}.vote-guidance .form-row .btn{flex:1}}

/* v0.47: persistent reconnect status above the table, unaffected by game rerenders. */
.connection-status{position:fixed;z-index:99990;top:max(9px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(650px,calc(100vw - 22px));display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:11px 14px;border:2px solid #e3b775;border-radius:12px;background:#483720;color:#fff2d6;box-shadow:0 12px 35px #000b;line-height:1.4}
.connection-status>div{display:grid;gap:3px;flex:1 1 240px;min-width:0}
.connection-status strong{font-size:.91rem}.connection-status span{font-size:.79rem}
.connection-status .btn{min-height:42px;white-space:normal}
.connection-displaced,.connection-unavailable{border-color:#f0a88c;background:#54332e}
@media(max-width:550px){.connection-status{top:max(5px,env(safe-area-inset-top));padding:9px 11px;gap:7px}.connection-status .btn{width:100%}}
/* Keyboard focus and non-mouse input are essential for responsive play. */
:where(button,select,input,textarea,[role="button"]):focus-visible{outline:3px solid #ffdf8c;outline-offset:3px}
@media(pointer:coarse){.top .btn,.vote-guidance .btn,.public-action-close,.public-action-next,.round-review-banner .btn{min-height:44px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

/* v0.47.1 — the end-of-round vote stays above hand toggles, drawers, and
   muted opponent notices. The overlay is NOT a dismissible notification. */
.round-vote-overlay{position:fixed;inset:0;z-index:200100;display:flex;align-items:center;justify-content:center;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:rgba(4,11,9,.88);backdrop-filter:blur(7px);overscroll-behavior:contain}
.round-vote-dialog{width:min(560px,100%);max-height:min(90dvh,760px);overflow-y:auto;border:2px solid #e6ca8f;border-radius:19px;background:linear-gradient(140deg,#273d32,#14251e);padding:clamp(16px,3vw,26px);box-shadow:0 24px 80px #000f,0 0 28px #deb76844;color:#f5ebd4}
.round-vote-dialog h2{font-size:clamp(1.4rem,4vw,2rem);margin:7px 0 10px;color:#ffe2aa}
.round-vote-kicker{font-size:.79rem;letter-spacing:.12em;text-transform:uppercase;font-weight:800;color:#c0dfc9}
.round-vote-request,.round-vote-detail{line-height:1.45;margin:6px 0;font-size:.91rem}.round-vote-detail{color:#cbdfce}
.round-vote-progress{margin:15px 0 10px;border:1px solid #e6c88b9e;border-radius:10px;padding:10px 12px;color:#ffdda2;background:#6a522b57;font-size:.87rem;font-weight:800;font-variant-numeric:tabular-nums}
.round-vote-ballots{display:grid;gap:7px;max-height:min(37dvh,250px);overflow-y:auto;margin-bottom:17px}
.round-vote-ballot{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 12px;border:1px solid #c8c99e36;background:#eef2d009;border-radius:9px;min-width:0;font-size:.87rem}
.round-vote-player{font-weight:700;overflow-wrap:anywhere}.round-vote-state{font-weight:850;white-space:nowrap;color:#dacb9e;border:1px solid #acb6a357;border-radius:18px;padding:4px 8px}
.round-vote-ballot.status-yes .round-vote-state{color:#c7f3d5;border-color:#83b99c;background:#2e60486e}.round-vote-ballot.status-no .round-vote-state{color:#ffcbc2;border-color:#df8e7c;background:#743c376e}
.round-vote-actions{display:flex;gap:9px;justify-content:flex-end;flex-wrap:wrap}.round-vote-actions .btn{min-height:46px;flex:1 1 150px}
.round-vote-footnote{font-size:.72rem;color:#aebdae;margin-top:13px;line-height:1.45}
/* Connection loss is more important than voting: its retry control remains accessible. */
.connection-status{z-index:200200}
@media(max-width:480px){.round-vote-dialog{max-height:90dvh;padding:14px}.round-vote-ballot{padding:8px 9px;font-size:.79rem}.round-vote-actions{flex-direction:column}.round-vote-actions .btn{width:100%;flex:auto}.round-vote-ballots{max-height:32dvh}}
/* Rejected vote commands must remain visible above the voting modal. */
.toast{z-index:200300}

/* v0.48: Update reminders are below voting and blocking modals; they never force a mid-turn refresh. */
.avog-update-banner{position:fixed;bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:200050;max-width:calc(100vw - 22px);width:min(750px,calc(100vw - 22px));padding:13px 15px;background:#22382e;border:2px solid #dfb977;border-radius:14px;box-shadow:0 12px 35px #000c;color:#f8ecd5;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;line-height:1.5}
.avog-update-banner strong,.avog-update-banner span{display:block}.avog-update-banner span{font-size:.87rem;color:#cbdad0}.avog-update-actions{display:flex;gap:8px;flex-wrap:wrap}.avog-update-actions .btn{min-height:42px}
@media(max-width:540px){.avog-update-banner{bottom:max(7px,env(safe-area-inset-bottom));padding:10px}.avog-update-banner>div{width:100%}.avog-update-actions{display:grid;grid-template-columns:1fr 1fr}}

/* v0.48.1 — Optional transient gameplay hints. No persistent guidance rows. */
.hints-toggle{display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:5px 9px;border-radius:11px;border:1px solid #dabb7d;background:#233c32;color:#f4dfb7;font-size:.76rem;font-weight:750;cursor:pointer;user-select:none;white-space:nowrap}
.hints-toggle input{position:absolute;opacity:0;width:1px;height:1px}
.hints-toggle:has(input:focus-visible){outline:3px solid #f8d58c;outline-offset:3px}
.hints-toggle-track{position:relative;display:inline-block;flex:none;width:31px;height:18px;background:#52625b;border:1px solid #8a9a8e;border-radius:12px;transition:background .15s}
.hints-toggle-track:after{position:absolute;content:'';width:12px;height:12px;top:2px;left:2px;background:#f5f0df;border-radius:50%;transition:transform .15s}
.hints-toggle input:checked + .hints-toggle-track{background:#a07b36;border-color:#e1c47b}
.hints-toggle input:checked + .hints-toggle-track:after{transform:translateX(13px)}
.gameplay-hint-popup{position:fixed;top:clamp(66px,10dvh,104px);right:max(12px,env(safe-area-inset-right));z-index:55;width:min(365px,calc(100vw - 24px));padding:11px 13px;border:1px solid #ddbc80;border-left:4px solid #dcb875;border-radius:13px;background:#1c3029;color:#f1eade;box-shadow:0 12px 28px #000b;line-height:1.4;animation:gameplay-hint-in .17s ease-out}
.gameplay-hint-popup.hint-caution,.gameplay-hint-popup.hint-challenge{border-left-color:#e6a986}
.gameplay-hint-popup.hint-valid,.gameplay-hint-popup.hint-cleared{border-left-color:#91cdad}
.gameplay-hint-popup .gameplay-hint-title{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.87rem;color:#f9dca5}
.gameplay-hint-popup p{font-size:.8rem;margin-top:5px;color:#d2dfd4;overflow-wrap:anywhere}
.gameplay-hint-close{color:#f8ddac;background:transparent;border:0;border-radius:8px;min-width:32px;min-height:32px;cursor:pointer}
.gameplay-hint-close:hover{background:#fff2}
@keyframes gameplay-hint-in{from{opacity:0;transform:translateY(-9px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:740px){.hints-toggle{padding:4px 8px;min-height:32px}.gameplay-hint-popup{top:max(112px,calc(env(safe-area-inset-top) + 74px));right:10px;left:10px;width:auto;max-width:420px;margin-left:auto}}
@media(prefers-reduced-motion:reduce){.gameplay-hint-popup{animation:none}}

/* v0.48.5: enlarged secret objectives can be chosen above the full card.
   Other card inspections retain the original image-only view. */
.card-lightbox.has-objective-choice{flex-direction:column;gap:12px;padding:calc(14px + env(safe-area-inset-top)) 8px calc(12px + env(safe-area-inset-bottom))}
.card-lightbox-choose{flex:0 0 auto;z-index:2;min-height:48px;width:min(430px,calc(100vw - 110px));white-space:normal;box-shadow:0 6px 25px #000b}
.card-lightbox.has-objective-choice .card-lightbox-stage{height:min(79dvh,900px);flex:1 1 auto}
.card-lightbox-choose:focus-visible{outline:3px solid #baffbd;outline-offset:3px}
@media(max-width:640px){.card-lightbox.has-objective-choice{gap:8px;padding-top:calc(10px + env(safe-area-inset-top));padding-bottom:calc(8px + env(safe-area-inset-bottom))}.card-lightbox-choose{width:min(85vw,390px);min-height:48px}.card-lightbox.has-objective-choice .card-lightbox-stage{height:76dvh}}

/* v0.48.6: discreet version stamp, and independent card inspection during guided practice. */
.app-version{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;font-size:.68rem;font-weight:650;letter-spacing:.025em;color:#cabd9a;opacity:.82;white-space:nowrap}
.brand .app-version{align-self:center;margin-left:.12rem;border:1px solid #c9ac7247;border-radius:7px;padding:3px 5px}
.landing-footer .app-version{margin-left:auto}
.tutorial-card-wrap{display:flex;flex-direction:column;min-width:0;gap:5px}
.tutorial-card-wrap>.tutorial-card{flex:1;width:100%}
.tutorial-card-enlarge{background:#314a3e;border:1px solid #c3a66b;color:#ffedc5;min-height:33px;border-radius:8px;font-size:.8rem;font-weight:700;cursor:pointer}
.tutorial-card-enlarge:focus-visible,.tutorial-zoom-actions button:focus-visible{outline:3px solid #f1cf87;outline-offset:2px}
.tutorial-zoom-layer{position:fixed;z-index:100001;inset:0;background:rgba(2,9,6,.92);display:flex;align-items:center;justify-content:center;padding:clamp(8px,3vw,20px)}
.tutorial-zoom-dialog{display:flex;flex-direction:column;gap:10px;width:min(780px,100%);max-height:96dvh;min-height:0;border:2px solid #daba80;border-radius:15px;padding:clamp(10px,2vw,18px);color:#fff4d7;background:linear-gradient(150deg,#244334,#14231e);box-shadow:0 12px 55px #000d}
.tutorial-zoom-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px}
.tutorial-zoom-toolbar strong{font-size:clamp(1rem,2.5vw,1.4rem);font-family:Georgia,serif}
.tutorial-zoom-actions{display:flex;flex-wrap:wrap;gap:8px}
.tutorial-zoom-stage{overflow:auto;min-height:0;max-height:75dvh;display:flex;align-items:safe center;justify-content:safe center;border-radius:8px;border:1px solid #c3ac7755;background:#0d1915;padding:8px;overscroll-behavior:contain}
.tutorial-zoom-image{display:block;max-width:100%;max-height:68dvh;min-width:0;width:auto;height:auto;object-fit:contain;border-radius:6px;box-shadow:0 8px 20px #000a}
.tutorial-zoom-layer.is-enlarged .tutorial-zoom-stage{display:block;text-align:center}
.tutorial-zoom-layer.is-enlarged .tutorial-zoom-image{max-width:none;max-height:none;width:min(160vw,850px);margin:0 auto}
.tutorial-zoom-note{font-size:.78rem;color:#b8d3c0;text-align:center}
@media(max-width:550px){.tutorial-zoom-dialog{max-height:98dvh}.tutorial-zoom-stage{max-height:72dvh}.tutorial-zoom-image{max-height:64dvh}.tutorial-card-enlarge{min-height:39px}}

/* v0.48.6: the scripted tutorial uses the same table/hand/turn-control layout as the live game. */
.tutorial-on-game-screen{padding:0;display:block;overflow:auto;background:#111b1a;overscroll-behavior:contain}
.tutorial-game-screen{min-height:100dvh;width:100%;display:flex;flex-direction:column;background:radial-gradient(ellipse at 25% -30%,#355449 0,transparent 65%),#101917}
.tutorial-game-screen .tutorial-practice-shell{width:100%;padding-bottom:24px;flex:1}
.tutorial-coach{border-color:#c49d5e;padding:14px 18px;display:grid;gap:9px}
.tutorial-coach h2{font-size:clamp(1.25rem,3vw,1.65rem);color:#ffe1a3}
.tutorial-coach .tutorial-progress{margin:0;height:5px}
.tutorial-coach .tutorial-summary{font-size:.89rem}
.tutorial-coach .tutorial-prompt{font-size:.86rem;padding:10px;background:#314e4266}
.tutorial-coach .tutorial-feedback{min-height:0;font-size:.85rem}
.tutorial-coach-nav{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.tutorial-coach-nav .mini{margin-left:auto;max-width:450px}
.tutorial-practice-piles{display:flex;justify-content:center;align-items:start;gap:clamp(14px,5vw,50px);padding:10px 0;flex-wrap:wrap}
.tutorial-practice-piles>div{display:flex;flex-direction:column;align-items:center;gap:7px}
.tutorial-practice-piles strong{font-size:.85rem;color:#efdcaa}
.tutorial-large-card{display:grid;place-items:center;min-height:135px;min-width:97px;border:2px solid transparent;border-radius:7px;background:transparent;padding:3px}
button.tutorial-large-card{border-color:#dcb873;cursor:pointer}
.tutorial-large-card img{width:89px;height:128px;object-fit:contain}
.tutorial-pile-warning{color:#ffd7a5;font-size:.85rem}
.tutorial-table-melds{display:flex;gap:9px;flex-wrap:wrap}
.tutorial-table-melds .meld{flex:1;min-width:130px;max-width:330px}
.tutorial-practice-card{display:flex;flex-direction:column;align-items:center;gap:5px;flex:none;width:clamp(88px,10vw,112px)}
.tutorial-practice-cards{display:flex;justify-content:flex-start;gap:10px;align-items:start;overflow-x:auto;padding:7px 0 15px;min-height:144px}
.tutorial-practice-card-button,.tutorial-objective-card,.tutorial-practice-target{background:transparent;border:2px solid #65786f;color:#f8edce;border-radius:8px;padding:5px;display:flex;flex-direction:column;align-items:center;gap:6px;cursor:pointer;width:100%}
.tutorial-practice-card-button:hover,.tutorial-objective-card:hover,.tutorial-practice-target:hover{border-color:#edc57c}
.tutorial-practice-card-button.selected{border-color:#f8d57c;box-shadow:0 0 0 3px #e5c87b88;background:#324b37}
.tutorial-practice-card-button img,.tutorial-practice-card>span img{max-width:100%;width:90px;height:122px;object-fit:contain}
.tutorial-practice-card-button span{font-size:.74rem;text-align:center}
.tutorial-practice-hand{position:relative;bottom:auto;left:auto;right:auto;margin-top:auto;background:#192720;border-top:2px solid #c2a36c;z-index:auto}
.tutorial-practice-hand .hand-workbench{padding:5px 14px}
.tutorial-practice-hand .hand-wrap{overflow:visible}
.tutorial-practice-hand .actions{display:flex;flex-wrap:wrap;align-items:center;gap:9px;justify-content:flex-start;padding:10px 16px}
.tutorial-practice-target{text-align:left;display:block;min-width:150px}
.tutorial-target{max-width:290px;flex:1;min-width:145px}
.tutorial-practice-target .fan{height:83px;display:flex;overflow:hidden;margin-top:6px}
.tutorial-practice-target .fan img{width:57px;height:76px;object-fit:contain;flex:none;margin-right:-34px}
.tutorial-practice-target .title,.tutorial-practice-target .sub{display:block}
.tutorial-practice-target .sub{font-size:.77rem;color:#c1cfc1}
.tutorial-table-result{font-size:.85rem;color:#b5e0b3;margin-top:10px}
.tutorial-choices{display:flex;gap:13px;flex-wrap:wrap;margin-top:12px}
.tutorial-objective{width:min(30%,155px);min-width:105px;display:flex;flex-direction:column;gap:5px}
.tutorial-objective-card img{width:100%;max-height:175px;object-fit:contain}
.tutorial-objective-card span{font-size:.8rem}
.tutorial-vote-sample,.tutorial-score{display:grid;gap:8px;margin-top:10px}
.tutorial-vote-sample>div,.tutorial-score>div{display:flex;justify-content:space-between;border-bottom:1px solid #fff2;padding:5px 0;gap:10px}
.tutorial-score b,.tutorial-score strong{color:#f1d28c}
.tutorial-practice-shell .you{color:#e8c379}
@media(max-width:900px){.tutorial-game-board{grid-template-columns:1fr 1fr!important}.tutorial-game-board>aside:first-child{grid-column:1/-1}.tutorial-game-board>aside:last-child{grid-column:1/-1}.tutorial-game-board>.stack{grid-column:1/-1}}
@media(max-width:550px){.tutorial-practice-shell{padding:9px!important;gap:9px!important}.tutorial-practice-hand .hand-workbench{padding:8px}.tutorial-practice-card{width:92px}.tutorial-coach{padding:12px}.tutorial-coach-nav .mini{margin-left:0}.tutorial-practice-cards{padding:9px 0}.tutorial-game-board{display:block!important}.tutorial-game-board>*{margin:0 0 10px}.tutorial-on-game-screen .brand{font-size:.95rem}.tutorial-on-game-screen .brand img{height:30px;width:25px}.tutorial-practice-piles{gap:13px}}

/* v0.48.6: make the guided-practice invitation as prominent as the other gold primary actions. */
.tutorial-landing-action .btn.primary{min-height:46px;max-width:100%;padding:12px 22px;font-weight:800;box-shadow:0 6px 20px #0008,0 0 0 1px #fff2c566}
.tutorial-landing-action .btn.primary:focus-visible,.top-right [data-action="tutorial"]:focus-visible{outline:3px solid #fff4c3;outline-offset:3px}
@media(max-width:550px){.tutorial-landing-action .btn.primary{width:100%}}

/* v0.48.7 — Repair the scripted practice board and keep cards/actions in view.
   The live game's desktop rules hide .game-shell > .legacy-board. The tutorial
   intentionally uses its own game-board selector to avoid that hide rule. */
.tutorial-on-game-screen{overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable}
.tutorial-game-screen .tutorial-practice-shell{display:flex;flex-direction:column;gap:12px;flex:initial;overflow:visible;max-width:1500px;width:100%;padding:12px clamp(10px,2vw,24px) 22px;margin:0 auto}
.tutorial-game-screen .tutorial-game-board{display:grid!important;grid-template-columns:minmax(0,1.3fr) minmax(320px,.8fr);gap:14px;align-items:start;width:100%;min-height:0}
.tutorial-work-table{min-width:0;display:grid;gap:10px;align-content:start}
.tutorial-work-table>.panel{margin:0}
.tutorial-work-hand{min-width:0;position:sticky;top:12px;align-self:start}
.tutorial-practice-hand{margin:0;border:1px solid #c6a369;border-radius:14px;box-shadow:0 10px 30px #0005;padding:14px;background:#192b23}
.tutorial-practice-hand h2{font-size:1.22rem;color:#ffde9a}
.tutorial-hand-prompt{font-size:.83rem;line-height:1.45;margin:9px 0 2px;color:#efddbd}
.tutorial-practice-hand .hand-workbench{padding:0;display:block}
.tutorial-practice-hand .hand-wrap{margin:0;display:block;overflow:visible;padding:0}
.tutorial-practice-cards{padding:10px 0;gap:8px;flex-wrap:wrap;min-height:0;overflow:visible}
.tutorial-practice-card{width:clamp(83px,8.5vw,115px)}
.tutorial-practice-hand .actions{padding:8px 0 6px;margin:0}
.tutorial-practice-hand .actions .btn{min-height:42px}
.tutorial-inline-feedback{font-size:.82rem;color:#ffe0ad;line-height:1.4;margin:7px 0 0}
.tutorial-inline-feedback.correct{color:#c9edb3}
.tutorial-next-hand{width:100%;min-height:46px;margin-top:10px}
.tutorial-context{display:flex;gap:6px;flex-wrap:wrap;color:#c8d8c6;font-size:.73rem}
.tutorial-context span{border:1px solid #867d5d60;border-radius:8px;padding:5px 8px;background:#1f312a}
.tutorial-coach{gap:7px;padding:12px 15px}
.tutorial-coach h2{font-size:clamp(1.2rem,2vw,1.5rem)}
.tutorial-coach .tutorial-prompt{padding:9px 11px;font-size:.9rem}
.tutorial-coach .tutorial-progress{margin:3px 0;height:5px}
.tutorial-coach-nav .mini{max-width:350px}
.tutorial-why summary{cursor:pointer;color:#e7c88a;font-size:.82rem}
.tutorial-why .tutorial-summary{padding:7px 0 2px;font-size:.83rem;color:#d8e0d7}
.tutorial-practice-piles{padding:4px 0}
.tutorial-objective{width:clamp(115px,30%,170px);min-width:0}
.tutorial-objective-choose{min-height:42px;font-size:.78rem;padding:5px 7px}
.tutorial-objective-art{border:1px solid #877d5f6b;border-radius:8px;padding:5px}
.tutorial-objective-art img{width:100%;max-height:172px;object-fit:contain;display:block}
.tutorial-practice-target:focus-visible,.tutorial-practice-card-button:focus-visible,.tutorial-objective-choose:focus-visible{outline:3px solid #f3d087;outline-offset:2px}
@media(max-width:900px){.tutorial-game-screen .tutorial-game-board{grid-template-columns:minmax(0,1fr)!important}.tutorial-work-hand{position:static;grid-row:1}.tutorial-work-table{grid-row:2}.tutorial-practice-hand{padding:12px}.tutorial-coach-nav .mini{display:none}}
@media(max-width:550px){.tutorial-game-screen .tutorial-practice-shell{padding:8px 9px 25px;gap:8px}.tutorial-practice-header{gap:7px}.tutorial-game-screen .brand{white-space:normal}.tutorial-practice-cards{gap:7px}.tutorial-practice-hand .hand-wrap{overflow:visible}.tutorial-practice-card{width:clamp(77px,27vw,108px)}.tutorial-choices{gap:7px}.tutorial-objective{width:calc(33.333% - 5px)}.tutorial-objective-choose{font-size:.7rem;min-height:44px}.tutorial-coach .tutorial-feedback{font-size:.78rem}.tutorial-context{display:none}}

/* Highlight the one useful table target during the Legal Challenge practice. */
.tutorial-practice-target.tutorial-focus,.tutorial-large-card.tutorial-focus{border-color:#f8d37f;box-shadow:0 0 0 3px #e2bf7270,0 0 25px #dbb87342}
/* The live game's mobile hand max-height was clipping practice cards and buttons. */
.tutorial-game-screen .tutorial-practice-hand{max-height:none!important;overflow:visible!important}
.tutorial-game-screen .tutorial-practice-hand .actions{position:static!important;overflow:visible!important}

/* v0.49.0 — Phone/tablet layout: keep the desktop village overview instead
   of falling back to the tall legacy board. Independent of :has() so older
   mobile Safari releases still receive a usable board and hand layout. */
@media (max-width:959px) {
  html, body { min-height:100%; overflow-x:hidden; }
  body { -webkit-text-size-adjust:100%; }
  #app.live-game-app {
    display:flex; flex-direction:column; width:100%; height:100vh; height:100dvh;
    min-height:0; overflow:hidden; padding:0;
  }
  .live-game-app > .top { flex:none; padding:5px max(7px,env(safe-area-inset-right)) 5px max(7px,env(safe-area-inset-left)); gap:5px; }
  .live-game-app .top-right { gap:4px; justify-content:flex-start; }
  .live-game-app .brand {font-size:.91rem; gap:5px;}
  .live-game-app .brand img {height:27px;width:23px;}
  .live-game-app .top .btn {min-height:30px;padding:4px 7px;font-size:.70rem;}
  .live-game-app .top-right .tag {padding:3px 6px;}
  /* Secondary actions stay outside the village table, in the annotated header row. */
  .live-game-app .top-right .mobile-header-rowbreak {display:block;flex-basis:100%;height:0;order:1;}
  .live-game-app .top-right [data-action="copy"] {order:2;}
  .live-game-app .top-right [data-action="leave"] {order:3;}
  .live-game-app .top-right .opponent-notices-toggle {display:inline-flex;order:4;padding:4px 5px;min-height:30px;gap:4px;font-size:.62rem;}
  .live-game-app .top-right .opponent-toggle-track {width:27px;height:15px;}
  .live-game-app .top-right .opponent-toggle-track:after {width:9px;height:9px;}
  .live-game-app .top-right .opponent-notices-toggle input:not(:checked)+.opponent-toggle-track:after {transform:translateX(12px);}
  .live-game-app .top-right .header-info {display:inline-flex;align-items:center;justify-content:center;order:5;margin-left:auto;padding:4px 6px;font-size:.60rem;white-space:nowrap;min-height:30px;}
  .live-game-app .top-right .hints-toggle {padding:3px 6px; min-height:28px; font-size:.67rem;}
  .live-game-app .game-shell {display:flex; flex-direction:column; flex:1 1 auto; min-height:0; min-width:0; width:100%; margin:0; padding:5px 6px 4px; gap:4px; overflow:hidden; }
  .live-game-app .game-shell > .legacy-board {display:none !important;}
  .live-game-app .game-shell > .turn-banner {flex:none; padding:5px 7px; min-height:31px; font-size:.74rem; gap:5px;}
  .live-game-app .game-shell > .top-card-counts {flex:none; flex-wrap:nowrap; overflow-x:auto; padding:0; gap:3px; scrollbar-width:none;}
  .live-game-app .top-card-count {flex:none;font-size:.65rem;padding:3px 5px;gap:4px;}
  .live-game-app .game-shell > .desktop-arena {
    display:flex !important; flex:1 1 auto; flex-direction:column; min-height:0;
    padding:5px; gap:4px; overflow:hidden;
    border:1px solid #9f99785c;border-radius:9px;background:#182920;
  }
  .live-game-app .arena-toolbar {display:flex;flex:none;gap:5px;align-items:center;flex-wrap:wrap;min-width:0;padding:0 1px 4px;border-bottom:1px solid #c7b78b32;}
  .live-game-app .arena-title {display:flex;align-items:baseline;gap:5px;white-space:nowrap;}
  .live-game-app .arena-title strong {font:600 .79rem Georgia,serif;color:#f4d18d;}
  .live-game-app .arena-title span {font-size:.58rem;color:#b3c5b8;}
  .live-game-app .arena-scores {display:flex;gap:3px;flex:1 1 auto;min-width:90px;max-width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;}
  .live-game-app .arena-score {font-size:.61rem; padding:3px 5px;white-space:nowrap;flex:none;border-radius:11px;background:#2b4135;border:1px solid #a7987060;}
  .live-game-app .arena-score-mpr {font-size:.58rem;margin-left:3px;padding-left:3px;}
  .live-game-app .arena-info {display:none;} /* Moved into mobile header. */
  .live-game-app .arena-basin {display:grid;flex:1 1 auto;min-width:0;min-height:0;overflow:hidden;grid-template-columns:80px minmax(0,1fr);gap:5px;}
  .live-game-app .arena-decks {display:flex; flex-direction:column;justify-content:flex-start;align-items:center;gap:3px;min-width:0;min-height:0;overflow-y:auto;padding:4px 2px;border:1px solid #7f94745b;border-radius:7px;background:#0a1712ad;}
  .live-game-app .arena-decks h3 {font-size:.63rem;line-height:1.2;text-align:center;color:#edcd90;}
  .live-game-app .arena-decks .piles {display:flex;flex-direction:column;align-items:center;gap:5px;margin:0;padding:2px 0;min-width:0;width:100%;}
  .live-game-app .arena-decks .pile {display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0;width:100%;}
  .live-game-app .arena-decks .pile strong,.live-game-app .arena-decks .pile .count {font-size:.59rem;margin:0;text-align:center;}
  .live-game-app .arena-decks .pile img,.live-game-app .arena-decks .pile .empty-card {width:58px;max-width:100%;height:auto;aspect-ratio:var(--card-shape);}
  .live-game-app .arena-decks .pile .discard-image-wrap {width:73px;max-width:100%;}
  .live-game-app .arena-decks .pile .discard-image-wrap .discard-stack {--discard-face-height:82px;}
  .live-game-app .arena-decks .piles .arrow {line-height:1;font-size:.8rem;}
  .live-game-app .arena-pile-hint {display:none;}
  .live-game-app .arena-teams {display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) !important;grid-auto-rows:minmax(111px,1fr);gap:4px;min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;align-content:start;}
  .live-game-app .arena-team {display:flex;min-width:0;min-height:107px;max-height:none;flex-direction:column;gap:3px;padding:4px 3px;border:1px solid #839a806b;border-radius:7px;background:#0d1f18;overflow:hidden;}
  .live-game-app .arena-team.mine {border-color:#e6bf72;background:#392f1b77;}
  .live-game-app .arena-team-head {display:flex;min-width:0;align-items:start;gap:3px;justify-content:space-between;}
  .live-game-app .arena-team-head .team-roster-heading {font-size:.64rem;line-height:1.15;max-height:2.4em;overflow:hidden;}
  .live-game-app .arena-team-head>span {font-size:.58rem;white-space:nowrap;}
  .live-game-app .arena-melds,.live-game-app .arena-teams.is-dense .arena-melds,.live-game-app .arena-team.many-melds .arena-melds {display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:max-content;gap:4px;overflow-x:hidden;overflow-y:auto;min-height:0;flex:1;align-content:start;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
  .live-game-app .overview-meld,.live-game-app .arena-teams.is-dense .overview-meld,.live-game-app .arena-team.many-melds .overview-meld {display:flex;flex-direction:column;align-items:stretch;gap:2px;min-width:0;min-height:0;max-height:none;padding:3px;border-radius:6px;overflow:hidden;}
  .live-game-app .overview-meld-head {display:flex;justify-content:space-between;align-items:center;gap:3px;font-size:.62rem;line-height:1.2;}
  .live-game-app .overview-meld-head strong {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .live-game-app .overview-meld-cards {display:block;position:relative;min-height:0;width:100%;}
  .live-game-app .overview-meld-card-row {--association-card-width:35px;--association-card-step:10px;height:auto;min-height:0;max-width:100%;overflow-x:auto;overflow-y:hidden;touch-action:auto;-webkit-overflow-scrolling:touch;}
  .live-game-app .overview-meld-card-row .overview-card-track > .overview-card-image {width:var(--association-card-width);margin-right:calc(var(--association-card-step) - var(--association-card-width));}
  .live-game-app .overview-meld-card-row .overview-card-track > .overview-card-image:last-child {margin-right:0;}
  .live-game-app .overview-meld-foot {display:flex;justify-content:space-between;gap:2px;font-size:.57rem;line-height:1.25;}
  .live-game-app .overview-guildhall-cover {width:min(54px,65%);top:34%;}
  .live-game-app .overview-challenge-card {width:min(28px,34%);top:24%;}
  .live-game-app .overview-magistrates .overview-meld-head {font-size:.61rem;}
  .live-game-app .overview-meld-count {flex:none;}
  .live-game-app .arena-empty {font-size:.65rem;}
  /* Compact, always-visible half-card hand strip; the visible upper corners
     remain the selectable targets. Cards can still be enlarged by long press. */
  .live-game-app > .hand-area {flex:none;position:relative;bottom:auto;min-height:0;max-height:none;overflow:visible;padding:3px 6px max(5px,env(safe-area-inset-bottom));box-shadow:0 -3px 12px #0007;background:#14231d;}
  .live-game-app .hand-shelf-content {min-width:0;}
  .live-game-app .hand-workbench {display:flex;flex-direction:column;gap:0;min-height:0;}
  .live-game-app .hand-deck {min-width:0;min-height:0;}
  .live-game-app .hand-wrap {display:flex;width:100%;height:101px;max-height:101px;min-height:0;overflow-x:auto;overflow-y:hidden;margin:0;padding:1px 3px 0;gap:10px;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;touch-action:pan-x;}
  .live-game-app .hand-group {gap:1px;padding-right:8px;}
  .live-game-app .hand-group-title {font-size:.63rem;line-height:1.15;}
  .live-game-app .hand-group-cards {padding:4px 2px 0;gap:0;}
  .live-game-app .hand-card-holder {width:var(--hand-card-width);margin-right:calc(var(--hand-card-width) * -.65);}
  .live-game-app .hand-card img {width:100%;height:auto;aspect-ratio:var(--card-shape);}
  .live-game-app .hand-card {touch-action:manipulation;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;}
  .live-game-app .hand-card.selected {transform:translateY(-5px);outline:2px solid #f5cc7f;outline-offset:-1px;}
  .live-game-app .hand-card .hint {display:none;}
  .live-game-app .hand-mobile-controls {display:flex;position:absolute;top:-24px;right:8px;z-index:9;align-items:center;justify-content:end;}
  .live-game-app .hand-mobile-toggle {display:flex;align-items:center;gap:3px;min-height:25px;padding:3px 8px;border:1px solid #bca16c99;border-radius:7px 7px 0 0;color:#e6d3a9;background:#17291f;font-size:.62rem;line-height:1;}
  .live-game-app .desktop-hand-toggle {display:none;}
  .live-game-app .hand-closed-control {justify-content:flex-end;min-height:20px;}
  .live-game-app .hand-closed-control .hand-shelf-toggle {min-height:25px;font-size:.65rem;padding:3px 8px;}
  .live-game-app .hand-mpr-rail {order:1;display:block;max-height:94px;overflow-y:auto;margin:0;padding:0;}
  .live-game-app .hand-mpr-rail .association-tracker {display:none;}
  .live-game-app .hand-mpr-rail[data-has-wild-allocation="no"] {display:none;}
  .live-game-app .wild-allocation {padding:5px 7px;}
  .live-game-app .wild-allocation-row select {font-size:16px;}
  .live-game-app .actions {display:flex;flex-wrap:nowrap;gap:5px;overflow-x:auto;overflow-y:hidden;position:relative;bottom:auto;margin:0;padding:3px 0 2px;min-height:38px;z-index:2;background:transparent;scrollbar-width:thin;touch-action:pan-x;}
  .live-game-app .actions .btn {flex:none;white-space:nowrap;min-height:34px;padding:5px 9px;font-size:.73rem;}
  .live-game-app .actions .quick-mpr {font-size:.65rem;flex:none;margin-right:2px;}
  .live-game-app .actions .stat {font-size:.65rem;flex:none;}
  .live-game-app .actions .spacer {display:none;}
  .live-game-app .hand-area.is-collapsed {padding:5px 7px max(5px,env(safe-area-inset-bottom));}
  .live-game-app .hand-area.is-collapsed .hand-shelf-content {display:none;}
  .live-game-app .desktop-details-backdrop {display:flex !important;position:fixed;inset:0;z-index:45;justify-content:flex-end;background:#040806bb;}
  .live-game-app .desktop-details-drawer {display:block;width:min(400px,93vw);max-height:100vh;max-height:100dvh;overflow-y:auto;overscroll-behavior:contain;background:#192b23;padding:12px max(12px,env(safe-area-inset-right)) max(15px,env(safe-area-inset-bottom));border-left:2px solid #d3b477;box-shadow:-12px 0 24px #000a;}
  .live-game-app .desktop-details-head {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;color:#f5d99a;}
  .live-game-app .desktop-details-drawer .stack,.live-game-app .desktop-details-drawer .rightcol {display:grid;gap:8px;}
  .live-game-app .desktop-details-drawer .panel {padding:10px;}
  .live-game-app .desktop-details-drawer .rightcol {margin-top:8px;}
  .live-game-app .desktop-details-drawer .objective-panel {display:grid;grid-template-columns:minmax(0,1fr) 88px;gap:5px 8px;align-items:start;}
  .live-game-app .desktop-details-drawer .objective-panel .sectionhead {grid-column:1/-1;}
  .live-game-app .desktop-details-drawer .objective-panel .objective-owned {grid-column:2;grid-row:2;max-width:88px;align-items:start;margin:0;}
  .live-game-app .desktop-details-drawer .objective-panel .objective-owned-button {max-width:88px;}
  .live-game-app .desktop-details-drawer .objective-panel .objective-card {max-height:70px;width:100%;object-fit:contain;margin:0;}
  .live-game-app .desktop-details-drawer .objective-panel .mini {grid-column:1;grid-row:2;align-self:start;}
  .live-game-app .desktop-details-drawer .field,.live-game-app input.field {font-size:16px;}
}
@media (max-width:420px) {
  .live-game-app .arena-basin {grid-template-columns:70px minmax(0,1fr);gap:4px;}
  .live-game-app .arena-decks .pile img,.live-game-app .arena-decks .pile .empty-card {width:51px;}
  .live-game-app .arena-decks .pile .discard-image-wrap {width:64px;}
  .live-game-app .arena-decks .pile .discard-image-wrap .discard-stack {--discard-face-height:72px;}
  .live-game-app .overview-meld-card-row {--association-card-width:31px;--association-card-step:9px;}
  .live-game-app .overview-meld-foot {font-size:.54rem;}
  .live-game-app .arena-title span {display:none;}
  .live-game-app .hand-wrap {height:95px;max-height:95px;}
}
@media (max-width:959px) and (max-height:560px) {
  .live-game-app .top-right .tag, .live-game-app .top-right .hints-toggle {display:none;}
  .live-game-app .hand-wrap {height:65px;max-height:65px;}
  .live-game-app .hand-group-title {display:none;}
  .live-game-app .game-shell > .top-card-counts {display:none;}
  .live-game-app .game-shell > .turn-banner {min-height:26px;padding:3px 5px;}
}
@media (max-width:959px) and (orientation:landscape) {
  .live-game-app .arena-teams {grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  .live-game-app .arena-basin {grid-template-columns:82px minmax(0,1fr);}
}
@media (min-width:960px) {
 .hand-mobile-controls {display:none;}
}

@media (max-width:959px) {
 .live-game-app .actions .btn {order:0;}
 .live-game-app .actions [data-action="clear"] {order:1;}
 .live-game-app .actions .stat,.live-game-app .actions .quick-mpr {order:2;}
}

/* Short action labels make all frequent phone actions visible without moving
   the important buttons behind the optional hide-hand control. */
.btn-label-mobile {display:none;}
@media (max-width:959px) {
 .live-game-app .hand-area .actions .btn-label-full {display:none;}
 .live-game-app .hand-area .actions .btn-label-mobile {display:inline;}
 .live-game-app .hand-area .actions .btn {padding:5px 8px;}
 .live-game-app .hand-area .actions .btn[data-action="meld"],
 .live-game-app .hand-area .actions .btn[data-action="discard"],
 .live-game-app .hand-area .actions .btn[data-action="draw"] {font-weight:750;}
 .live-game-app .hand-area .actions .btn-label-mobile {white-space:nowrap;}
 input.field,select.field,textarea.field {font-size:16px;}
}

/* The end-of-round review uses the SAME compact table on phones. Keep the
   existing full score ledger as a separate screen, reached by View Scores. */
@media (max-width:959px) {
 .live-game-app.mobile-review-app .round-review-shell {display:flex;flex:1 1 auto;flex-direction:column;width:100%;max-width:none;min-height:0;min-width:0;overflow:hidden;margin:0;padding:5px 6px 6px;gap:5px;}
 .live-game-app.mobile-review-app .round-review-shell > .desktop-arena {display:flex !important;flex:1 1 auto;flex-direction:column;min-height:0;overflow:hidden;padding:5px;gap:4px;border:1px solid #9f99785c;border-radius:9px;background:#182920;}
 .live-game-app.mobile-review-app .round-review-shell > .round-review-mobile {display:none !important;}
 .live-game-app.mobile-review-app .round-review-banner {flex:none;display:flex;flex-wrap:nowrap;gap:8px;padding:7px 8px;align-items:center;}
 .live-game-app.mobile-review-app .round-review-banner h1 {font-size:.92rem;}
 .live-game-app.mobile-review-app .round-review-banner p {font-size:.63rem;max-height:2.7em;overflow:hidden;}
 .live-game-app.mobile-review-app .round-review-banner .eyebrow {font-size:.57rem;}
 .live-game-app.mobile-review-app .round-review-banner>.btn {width:auto;min-width:95px;min-height:37px;font-size:.72rem;padding:5px 7px;}
 .live-game-app.mobile-review-app .arena-team>.round-end-hands {flex:0 0 auto;max-height:95px;overflow-y:auto;}
 .live-game-app.mobile-review-app .round-review-table-hint {font-size:.60rem;}
}

/* v0.49.1 — Two requested header controls; keep desktop table toolbar intact. */
.mobile-header-rowbreak,.header-info,.header-info-compact {display:none;}
@media (max-width:959px) {
 .live-game-app.mobile-review-app .header-info {display:none;}
 .live-game-app .top-right .opponent-notices-toggle {white-space:nowrap;touch-action:manipulation;}
 .live-game-app .top-right .header-info {touch-action:manipulation;}
}
@media (max-width:359px) {
 .live-game-app .top-right [data-action="copy"] .btn-label-full {display:none;}
 .live-game-app .top-right [data-action="copy"]:after {content:"Invite";}
 .live-game-app .header-info-full {display:none;}
 .live-game-app .header-info-compact {display:inline;}
 .live-game-app .top-right .opponent-notices-toggle {font-size:.59rem;}
}

/* v0.49.2 — Examine Hand: a separate, touch-friendly full-card screen.
   The existing compact table hand remains the default on phones. */
.hand-examine-launch {display:none;}
@media (max-width:959px) {
 .live-game-app .hand-examine-launch {
  display:inline-flex;align-items:center;justify-content:center;flex:none;
  min-height:26px;padding:4px 9px;background:#d8b676;color:#13231d;
  border:1px solid #f7d996;border-radius:8px 8px 0 0;
  font-size:.68rem;font-weight:800;line-height:1;white-space:nowrap;
  touch-action:manipulation;
 }
 .live-game-app .hand-examine-launch:focus-visible {outline:3px solid #fff5ba;outline-offset:2px;}
 .live-game-app .hand-mobile-controls {gap:5px;}
 .live-game-app .hand-closed-control {gap:6px;}
}
#app.examine-hand-app {
 width:100%;height:100vh;height:100dvh;min-height:0;overflow:hidden;
 background:linear-gradient(145deg,#22392e,#101c18 73%);
}
.examine-hand-screen {
 display:flex;flex-direction:column;flex:1 1 auto;width:100%;min-width:0;min-height:0;
 height:100%;overflow:hidden;
}
.examine-hand-head {
 flex:none;display:flex;align-items:center;gap:12px;
 padding:max(11px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 11px max(12px,env(safe-area-inset-left));
 background:#14251e;border-bottom:1px solid #e1bb7780;box-shadow:0 4px 18px #0006;
}
.examine-hand-back,.examine-back {
 flex:none;min-height:43px;padding:9px 12px;background:#364b3f;
 border:1px solid #d0b479;border-radius:9px;font-size:.84rem;white-space:nowrap;
}
.examine-hand-heading {display:flex;flex-direction:column;gap:3px;min-width:0;}
.examine-hand-heading h1 {font-size:clamp(1.05rem,4.1vw,1.55rem);line-height:1.15;color:#f4d593;white-space:nowrap;}
.examine-hand-meta {color:#c9d5c5;font-size:.69rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.examine-hand-scroll {
 flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;
 overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
 padding:14px max(12px,env(safe-area-inset-right)) 20px max(12px,env(safe-area-inset-left));
}
.examine-hand-instructions {
 max-width:650px;margin:0 auto 15px;color:#d6e0d0;
 line-height:1.45;font-size:.83rem;
}
.examine-hand-instructions strong {color:#efce89;}
.examine-hand-group {max-width:850px;margin:0 auto 20px;}
.examine-hand-group-heading {
 display:flex;align-items:baseline;justify-content:space-between;
 gap:10px;margin:0 1px 10px;padding-bottom:7px;
 border-bottom:1px solid #c9b07770;
}
.examine-hand-group-heading h2 {font:600 1.04rem Georgia,serif;color:#f2d394;}
.examine-hand-group-count {font-size:.76rem;color:#d3dfcf;white-space:nowrap;}
.examine-hand-grid {
 display:grid;grid-template-columns:repeat(auto-fill,minmax(min(41vw,158px),1fr));
 gap:15px 12px;align-items:start;
}
.examine-hand-tile {
 display:flex;flex-direction:column;gap:7px;min-width:0;max-width:204px;width:100%;
 justify-self:center;padding:7px 7px 8px;border:1px solid #82938075;
 border-radius:11px;background:#273a309c;
}
.examine-hand-card {
 display:block;width:100%;padding:0;border:2px solid transparent;
 border-radius:8px;overflow:hidden;position:relative;
 background:#0f1d18;touch-action:manipulation;
}
.examine-hand-card img {
 width:100%;height:auto;aspect-ratio:var(--card-shape);object-fit:contain;
 display:block;border-radius:5px;box-shadow:0 3px 8px #0005;
 -webkit-user-select:none;user-select:none;-webkit-user-drag:none;
}
.examine-hand-card.selected {border-color:#ffd77e;box-shadow:0 0 0 2px #f2c66d90;}
.examine-hand-selected {
 display:none;position:absolute;left:0;right:0;bottom:0;
 padding:5px 3px;color:#16241c;font-size:.73rem;font-weight:800;
 text-align:center;background:#f0ca7fef;
}
.examine-hand-card.selected .examine-hand-selected {display:block;}
.examine-hand-card-foot {display:flex;align-items:center;justify-content:space-between;gap:4px;min-width:0;}
.examine-hand-card-name {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.68rem;color:#ead9b3;}
.examine-hand-zoom {
 flex:none;min-height:35px;padding:5px 8px;border:1px solid #b7a177;
 border-radius:7px;color:#f3dfb4;background:#263e33;font-size:.73rem;font-weight:700;
 touch-action:manipulation;
}
.examine-hand-footer {
 flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;
 padding:9px max(12px,env(safe-area-inset-right)) max(11px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
 background:#13231b;border-top:1px solid #d0ad6d8c;
 box-shadow:0 -4px 18px #0007;
}
.examine-hand-selection-count {color:#f5d99c;font-size:.88rem;font-weight:700;white-space:nowrap;}
.examine-hand-footer .btn {min-height:43px;padding:9px 13px;}
.examine-hand-empty {color:#e2d1b5;text-align:center;padding:30px 10px;}
@media (min-width:960px) {
 .examine-hand-screen {max-width:1050px;margin:auto;}
}
@media (max-width:359px) {
 .examine-hand-head {gap:8px;}
 .examine-back {padding:8px 9px;font-size:.75rem;}
 .examine-hand-grid {gap:11px 8px;}
 .examine-hand-tile {padding:5px;}
 .examine-hand-card-name {font-size:.63rem;}
 .examine-hand-zoom {padding:5px 6px;font-size:.68rem;}
}

/* v0.49.3 — MacLellan Games publisher mark on the landing page. */
.landing-v016 .landing-publisher{display:flex;align-items:center;gap:18px;margin-top:22px;width:max-content;max-width:100%;}
.landing-v016 .landing-publisher-caption{font-size:.68rem;letter-spacing:.19em;font-weight:800;color:#eacb83;text-shadow:0 2px 6px #000;white-space:nowrap;}
.landing-v016 .landing-publisher-logo{display:block;width:clamp(110px,11vw,148px);height:auto;aspect-ratio:1;object-fit:contain;filter:drop-shadow(0 10px 22px #0009);}
@media(max-width:740px){.landing-v016 .landing-publisher{gap:13px;margin-top:16px;}.landing-v016 .landing-publisher-logo{width:100px;}}
@media(max-width:359px){.landing-v016 .landing-publisher-logo{width:86px;}}

/* v0.49.4 — Landing arrangement follows the supplied reference ONLY.
   The existing /assets/village-home-hero.webp background is not altered. */
@media(min-width:741px){
 .landing-v016 .landing-content{grid-template-columns:minmax(0,1.32fr) minmax(360px,.87fr);gap:clamp(20px,3.8vw,60px);padding:clamp(20px,4vh,52px) 0;}
 .landing-v016 .pitch{width:100%;max-width:760px;display:flex;flex-direction:column;align-items:center;}
 .landing-v016 .pitch>.eyebrow{align-self:stretch;margin:0 0 21px;text-align:center;background:none;padding:0;color:#ffe0a0;font:800 clamp(1.5rem,2.6vw,2.55rem)/1.22 system-ui,-apple-system,'Segoe UI',sans-serif;letter-spacing:.17em;text-transform:uppercase;}
 .landing-v016 .pitch .guild-wordmark{width:min(100%,550px);margin:0 auto 19px;}
 .landing-v016 .pitch p{align-self:center;max-width:640px;width:100%;padding:0;background:none;font-size:clamp(1rem,1.4vw,1.18rem);line-height:1.65;}
 .landing-v016 .landing-highlights{justify-content:center;margin-top:21px;}
 .landing-v016 .landing-publisher{margin:20px auto 0;justify-content:center;}
 .landing-v016 .landing-publisher-logo{width:clamp(132px,13.1vw,198px);}
 .landing-v016 .welcome-card{max-width:500px;}
}
.landing-connect-status{font-size:.78rem;color:#f6d59a;margin:9px 0 0;text-align:center;}
.landing-connect-status:empty{display:none;}
/* Each public Mistrust-triggering card stays perpendicular, including when
   buried below a later ordinary discard or another sideways card. */
.pile .discard-image-wrap .discard-stack > .discard-mistrust-art{
 left:calc(49% - var(--mistrust-backshift,0px))!important;
 top:calc(50% + var(--mistrust-vshift,0px));
 transform:translate(-50%,-50%) rotate(-90deg)!important;
}
.pile .discard-image-wrap .discard-stack > .discard-main-art.under-mistrust{
 z-index:0;left:58%!important;
}
@media(max-width:740px){
 .landing-v016 .pitch>.eyebrow{font-size:clamp(1.16rem,5vw,1.8rem);text-align:center;letter-spacing:.12em;line-height:1.3;margin-bottom:12px;background:none;padding:0;}
 .landing-v016 .pitch{display:flex;flex-direction:column;align-items:center;}
 .landing-v016 .pitch p{padding:0;background:none;}
 .landing-v016 .landing-highlights{justify-content:center;}
 .landing-v016 .landing-publisher{justify-content:center;margin:16px auto 0;}
 .landing-v016 .landing-publisher-logo{width:clamp(90px,25vw,134px);}
}

/* v0.49.4: make opening-declaration guild bonus credit explicit. */
.tracker-guild-credit{font-size:.77rem;color:#f7d58c;margin:3px 0 5px;}
