@font-face{font-family:Cinzel;src:url('/game/fonts/cinzel-CinzelVariable.ttf') format('truetype');font-weight:100 900;font-display:swap}
@font-face{font-family:'Barlow Semi Condensed';src:url('/game/fonts/barlowsemicondensed-BarlowSemiCondensed-Regular.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:'Barlow Semi Condensed';src:url('/game/fonts/barlowsemicondensed-BarlowSemiCondensed-Medium.ttf') format('truetype');font-weight:500 700;font-display:swap}
:root{color-scheme:dark;--table:#151718;--panel:#202120;--gold:#b99a60;--ink:#eee4ce;--muted:#b7ae9b;--line:#62543a;--sand:#987344;font-family:"Barlow Semi Condensed",Arial,sans-serif;font-size:14px;color:var(--ink);background:var(--table)}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 55% 35%,#33312b 0,transparent 65%),var(--table);min-height:100vh}button,input,select{font:inherit}button,a,input,select{outline-offset:4px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #f3cc75}button{background:#20211e;border:1px solid var(--line);color:var(--ink);padding:10px 14px;border-radius:3px;cursor:pointer;transition:border-color .15s,background .15s}button:hover:not(:disabled){border-color:#e7c888;background:#363125}button:disabled{opacity:.4;cursor:not-allowed}.primary{background:#735627;border-color:#c09a53;color:#fff0ce;font-family:Cinzel,serif;font-size:17px}.primary:hover:not(:disabled){background:#876734}.subtle{background:transparent;border-color:transparent;color:var(--muted)}h1,h2,h3,p{margin:0}h1,h2,h3{font-family:Cinzel,Georgia,serif;font-weight:400}h2{font-size:19px}h3{font-size:13px;letter-spacing:1.5px}p{line-height:1.55;color:var(--muted)}small{font-size:11px;color:var(--muted)}.topbar{height:68px;display:flex;align-items:center;justify-content:space-between;padding:0 26px;border-top:1px solid var(--gold);border-bottom:1px solid var(--line);background:#111514;gap:20px}.wordmark{font:32px Cinzel,serif;letter-spacing:12px;color:#e3c68e;text-decoration:none;white-space:nowrap}.wordmark small{font:11px Cinzel,serif;letter-spacing:5px;margin-left:12px;color:#dec18c}#round-label{font-family:Cinzel,serif;letter-spacing:1px;color:#dbc99f}#identity{display:flex;align-items:center;gap:10px;font-size:13px}#notice{position:fixed;top:76px;left:50%;transform:translateX(-50%);z-index:1100;width:max-content;max-width:calc(100vw - 24px);display:flex;align-items:center;gap:16px;background:#29251ff5;border:1px solid #b89459;border-radius:6px;box-shadow:0 4px 18px #0008;padding:12px 14px 12px 18px;color:#fff2d7;white-space:pre-wrap;overflow-wrap:anywhere}#notice[hidden]{display:none}.notice-close{flex:none;padding:2px 8px;font-size:22px;border:0;background:transparent;line-height:1.2}.loading{padding:80px;text-align:center}.table{display:grid;grid-template-columns:200px minmax(650px,1fr) 245px;gap:18px;padding:20px 18px 30px;max-width:1800px;margin:auto}.players{padding-top:160px;display:flex;flex-direction:column;gap:14px}.player{border:1px solid var(--line);border-left:3px solid var(--player);padding:10px;background:linear-gradient(140deg,#262724,#151716);position:relative}.player.active{box-shadow:0 0 0 1px var(--gold);background:#343026}.player h2{font-size:14px;line-height:1.4;margin-bottom:8px}.player h2 small{display:inline-block;color:#e3c58f}.leader{display:block;width:100%;aspect-ratio:1.65;object-fit:cover;border:1px solid #383833}.player-resources{display:flex;gap:8px;justify-content:space-between;padding:9px 0}.resource{display:inline-flex;align-items:center;gap:4px;font-size:16px;white-space:nowrap}.resource i{display:inline-block;flex-shrink:0;width:12px;height:12px;background:#b4ada0;border:1px solid #ece1c9;border-radius:50%}.resource.spice i{background:#e19029;border-color:#eebb68;border-radius:1px;clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%)}.resource.water i{background:#65b4d4;border-color:#b2e3ef;border-radius:70% 20% 60% 60%;transform:rotate(-45deg)}.player-resources .resource small{display:none}.player-stats{display:grid;grid-template-columns:1fr 1fr;gap:5px;font-size:11px;margin:0 0 9px}.player-stats strong{color:#e3be6e;font:21px Cinzel,serif;grid-row:span 2}.influence{display:grid;grid-template-columns:1fr 1fr;gap:3px;margin:8px 0}.influence span{padding:4px;font-size:9px;background:#353639;border-bottom:2px solid #6b6d70}.influence .SPACING_GUILD{border-color:#b34a4a}.influence .BENE_GESSERIT{border-color:#a16ec4}.influence .FREMEN{border-color:#55a1ca}.player details{font-size:11px;margin-top:9px}.player details p{margin-top:8px;overflow-wrap:anywhere}summary{cursor:pointer;color:var(--muted)}.cube{display:inline-block;width:9px;height:9px;background:var(--player);border:1px solid #ffffff50;box-shadow:2px -2px 0 #ffffff25;margin-right:5px}.market{display:flex;align-items:center;gap:12px;min-height:151px;margin-bottom:14px}.market>h2{font-size:14px;writing-mode:vertical-rl;transform:rotate(180deg);letter-spacing:3px;text-transform:uppercase}.card-row{display:flex;gap:13px;align-items:start;min-width:0;overflow-x:auto;padding:5px 3px 9px;scrollbar-width:thin}.market .card-row{flex:1;justify-content:center}.card-wrap{width:112px;flex:0 0 112px;position:relative}.card-wrap.mini{width:100px;flex-basis:100px}.card{display:block;width:100%;padding:0;aspect-ratio:.69;background:#111;border:2px solid #090a0b;border-radius:6px;overflow:hidden;position:relative;box-shadow:0 5px 7px #0008}.card img{width:100%;height:100%;object-fit:fill;position:relative;z-index:1;display:block}.card-fallback{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:space-between;padding:10px;background:#393a32;color:#eee3cf;font:13px Cinzel,serif}.card-fallback small{background:#282e4e;font:11px "Barlow Semi Condensed",sans-serif}.card.selected{border-color:#e9c776;box-shadow:0 3px 6px #0008;transform:none}.card:hover:not(:disabled){border-color:#d4bc7e}.inspect{font-size:9px;border:0;padding:4px 0;background:transparent;color:#b8b09f;width:100%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.reserve{width:115px;flex:0 0 115px;display:flex;flex-direction:column;gap:7px}.reserve h3{font-size:11px}.reserve button{font-size:10px;padding:7px}.reserve span{font-size:10px;color:var(--muted)}.board-scroll{overflow-x:auto;scrollbar-width:thin}.board{display:grid;grid-template-columns:164px minmax(360px,1fr) 120px 28px;grid-template-rows:166px minmax(430px,1fr);border:3px double #a28a57;background:#1e2323;box-shadow:0 8px 18px #0007;padding:7px;gap:6px;min-width:690px}.factions{grid-row:1/3;display:grid;grid-template-rows:repeat(4,1fr);gap:6px}.faction{padding:7px;background:#454648;border:1px solid #8c8a7e;display:flex;flex-direction:column;gap:5px}.faction.SPACING_GUILD{background:#64282e;border-color:#965e55}.faction.BENE_GESSERIT{background:#4a2d60;border-color:#846294}.faction.FREMEN{background:#264e6d;border-color:#5d8da1}.faction h3{font-size:10px;text-align:center;text-transform:uppercase;letter-spacing:1.2px;margin-bottom:3px}.space{display:flex;flex-direction:column;gap:4px;position:relative;text-align:left;border:1px solid #b8a67c;background:#191c1dbb;min-height:57px;padding:6px 7px;border-radius:0;box-shadow:0 2px 3px #0005;width:100%}.space strong{font-size:10px;font-weight:500;text-transform:uppercase;letter-spacing:.5px;color:#f2e9d5}.space .cost{font-size:9px;color:#e7ca8d}.space small{font-size:9px;line-height:1.3;color:#d8d6cc}.space.selected{border-color:#ffe3a2;box-shadow:0 0 0 2px #d6ad58;background:#544527}.pieces{display:flex;align-items:center;gap:5px;min-height:13px;font-size:10px;color:#f5deb0}.agent{display:inline-block;width:13px;height:19px;background:var(--player);mask:url("/game/agent.svg") center/100% 100% no-repeat;filter:drop-shadow(1px 1px 1px #000)}.flag{display:inline-block;width:12px;height:14px;background:var(--player);clip-path:polygon(0 0,100% 0,100% 100%,50% 70%,0 100%)}.landsraad{grid-column:2;grid-row:1;background:#294333;padding:8px;border:1px solid #627557}.landsraad>div{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin-top:7px}.landsraad h3,.trade h3{font-size:11px;text-transform:uppercase}.landsraad .space{min-height:60px;padding:5px}.landsraad .space small{font-size:8px}.trade{grid-column:3;grid-row:1;padding:7px;background:#58442a;border:1px solid #7f6941;display:flex;flex-direction:column;gap:5px}.trade .space{min-height:60px}.arrakis{grid-column:2/4;grid-row:2;padding:18px 15px 12px;background:#99794f url('/game/arrakis.png') center/cover;border:1px solid #917545;display:flex;flex-direction:column;justify-content:space-between;gap:20px;min-height:430px}.locations{display:grid;grid-template-columns:repeat(3,1fr);gap:15px 20px}.locations .space{background:#3d3024d9;min-height:80px;border-color:#d0af76}.locations .space:nth-child(4){grid-column:1}.locations .space:last-child{grid-column:2}.conflict{background:#33271ac7;border:1px solid #bc9453;padding:12px;color:#f1dfb9;text-align:center}.conflict h3{font-size:17px;letter-spacing:0;margin:10px 0}.garrisons{display:flex;justify-content:space-around;gap:10px}.garrisons>div{border:1px solid #cfb782;border-radius:50%;width:53px;height:53px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;padding:9px;font:15px Georgia}.garrisons small{font:8px "Barlow Semi Condensed",sans-serif;color:#ecdfca}.strengths{display:flex;justify-content:space-around;font-size:11px}.rewards{display:flex;flex-direction:column;gap:3px;font-size:10px;margin-top:10px;color:#e0d1af}.score-track{grid-column:4;grid-row:1/3;display:flex;flex-direction:column;justify-content:space-around;background:#332b1f;color:#e7d1a0}.score-track>span{position:relative;text-align:center;border-bottom:1px solid #68522e;flex:1;display:flex;align-items:center;justify-content:center;font:14px Georgia}.disc{position:absolute;width:11px;height:11px;border-radius:50%;background:var(--player);box-shadow:1px 2px 3px #000;border:1px solid #eee6;right:-3px;bottom:2px}.disc+.disc{right:9px}.hand{padding:17px 0}.section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;gap:10px}.section-heading h2{font-size:15px;text-transform:uppercase;letter-spacing:2px}.section-heading h2 span{font-size:13px;color:var(--muted)}.section-heading>span{display:flex;gap:15px}.section-heading .resource{font-size:13px}.hand .card-row{justify-content:center}.turn-panel{padding-top:165px;display:flex;flex-direction:column;gap:20px;min-width:0}.turn-actions{border:1px solid var(--gold);padding:17px;background:#141817;display:flex;flex-direction:column;gap:13px}.turn-actions h2{font-size:26px;color:#e4c38b}.turn-actions p{font-size:13px}.turn-actions .card-wrap{width:150px;align-self:center}.turn-actions .hint{font-size:11px}.turn-panel section{padding:14px;border-top:1px solid var(--line)}.turn-panel section h2,.turn-panel section h3{margin-bottom:10px}.turn-panel section button{display:block;width:100%;margin:5px 0;font-size:12px}.turn-panel small{display:block;margin-top:8px}.turn-actions button{width:100%}.turn-actions label{margin-top:9px}.turn-actions form>button{margin-top:12px}.final-score{font:40px Georgia;color:#e2bd6a}.lobby{max-width:1240px;margin:7vh auto;min-height:650px;display:grid;grid-template-columns:minmax(400px,1fr) 1fr;border:1px solid var(--line);background:#1a1c1b}.lobby-intro{padding:55px 45px;display:flex;flex-direction:column;gap:23px}.lobby h1{font-size:44px;line-height:1.15;color:#e0c28c}.lobby p{font-size:15px}.lobby-art{background:#967249 url('/game/arrakis.png') center/cover;min-height:500px}.lobby-forms{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin-top:10px}.lobby-forms form{display:flex;flex-direction:column;gap:15px}.lobby-forms h2{font-size:22px;color:#d7bd8f}label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#ccc0a9}input,select{width:100%;padding:10px;border:1px solid #77664a;background:#141715;color:#f2e6cc;border-radius:2px;min-width:0}.check{display:flex;flex-direction:row;align-items:start;gap:10px;line-height:1.4}.check input{width:auto;accent-color:#bf995b;margin:2px 0}.lobby-seats{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}.lobby-seats img{width:100%;display:block;aspect-ratio:1.5;object-fit:cover}.lobby-seats h2{font-size:15px;margin-top:7px}.lobby-seats p{font-size:12px}.lobby:has(.lobby-seats){display:block;max-width:800px}.lobby details button{margin:8px}dialog{background:#171b1a;color:var(--ink);border:1px solid var(--gold);width:min(460px,94vw);padding:28px;max-height:95vh;overflow:auto}dialog::backdrop{background:#000b}.dialog-close{position:absolute;right:7px;top:7px;padding:3px 10px;font-size:24px;background:#171b1a}#card-detail h2{margin:6px 15px 18px 0}#card-detail img{width:100%;max-height:65vh;object-fit:contain}#card-detail p{font-size:12px;margin-top:12px}@media(min-width:1600px){.board{grid-template-columns:180px minmax(420px,1fr) 140px 30px}.space strong{font-size:11px}.space small,.space .cost{font-size:10px}.card-wrap.mini{width:115px;flex-basis:115px}}@media(max-width:1250px){.table{grid-template-columns:160px minmax(600px,1fr);gap:12px;padding:12px}.turn-panel{grid-column:2;padding-top:0;display:grid;grid-template-columns:1.5fr 1fr;align-items:start}.players{grid-row:1/3}.turn-panel .table-tools{grid-column:2}.board{min-width:690px}.play-area{min-width:0}.lobby{margin:30px;grid-template-columns:1.3fr 1fr}.lobby-intro{padding:35px 25px}}@media(max-width:800px){.topbar{height:auto;min-height:70px;flex-wrap:wrap;gap:8px;padding:13px 15px}.wordmark{font-size:25px;letter-spacing:8px}.wordmark small{font-size:8px;letter-spacing:3px}#round-label{font-size:12px;order:3;width:100%}#identity{font-size:11px}#identity .subtle{padding:5px}.table{display:flex;flex-direction:column;padding:10px;gap:12px}.players{padding:0;display:flex;flex-direction:row;overflow:auto}.player{flex:0 0 180px}.player .leader{display:none}.player .influence,.player details{display:none}.player h2{font-size:12px}.play-area{width:100%}.board-scroll{width:100%}.board{grid-template-columns:155px 360px 115px 25px;min-width:690px}.market{min-height:140px;gap:6px}.reserve{width:90px;flex-basis:90px}.market .card-row{justify-content:start}.card-wrap.mini{width:90px;flex-basis:90px}.card-wrap{width:100px;flex-basis:100px}.hand .card-row{justify-content:start}.section-heading{flex-wrap:wrap}.section-heading .resource small{display:none}.turn-panel{display:flex;flex-direction:column;padding:0;gap:10px}.turn-panel>*{width:100%}.turn-actions{padding:18px}.turn-actions .card-wrap{display:none}.lobby{margin:20px 12px;display:block;min-height:0}.lobby-intro{padding:28px 22px}.lobby h1{font-size:35px}.lobby-art{min-height:220px}.lobby-forms{grid-template-columns:1fr;gap:30px}.loading{padding:40px 20px}.lobby-seats{grid-template-columns:1fr 1fr}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Preserve the printed board's geometry; interactions sit over its actual spaces. */
.printed-board{position:relative;width:100%;min-width:690px;aspect-ratio:5000/4996;isolation:isolate;box-shadow:0 8px 18px #0007;background:#27221b}
.board-art{display:block;width:100%;height:100%;position:absolute;inset:0}
.board-space{position:absolute;padding:0;background:transparent;border:2px solid transparent;border-radius:2px;box-shadow:none}
.board-space:hover:not(:disabled),.board-space:focus-visible{background:#edcf7b18;border-color:#f0d49d;outline-offset:1px}
.board-space.selected{background:#f4ce7725;border-color:#ffe3a2;box-shadow:0 0 9px #f6d58b}
.board-pieces{position:absolute;left:12%;bottom:8%;display:flex;align-items:end;gap:4px;filter:drop-shadow(1px 2px 2px #000);color:#fff2ce}
.board-pieces .agent{width:20px;height:30px}.board-pieces .flag{width:20px;height:25px}.board-pieces b{font-size:12px;background:#1b1713;padding:3px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.board-score.disc{position:absolute;right:auto;bottom:auto;width:13px;height:13px}
.printed-conflict{position:absolute;left:48%;top:65%;width:42%;text-align:center;background:#281d117a;border:1px solid #bda06470;padding:12px}
.printed-conflict h3{font-size:18px;margin:12px 0;letter-spacing:0}.printed-conflict .garrisons>div{width:45px;height:45px;padding:5px}
@media(max-width:800px){.printed-conflict h3{font-size:14px}.printed-conflict{padding:8px}.printed-conflict .strengths{font-size:9px}}

.card-art{display:block;position:relative;z-index:1;width:100%;height:100%;background-repeat:no-repeat;background-color:#191715}
#card-detail>.card-art{height:auto;max-width:400px;margin:auto}.conflict-card{float:left;width:23%;padding:0;margin:0 12px 5px 0;border:1px solid #b99a60}.conflict-card .card-art{height:auto}.printed-conflict .garrisons{gap:3px}.printed-conflict .garrisons>div{width:35px;height:35px}.printed-conflict .strengths{flex-wrap:wrap;gap:5px}

/* Quiet table chrome; the printed board carries the game state. */
.topbar{height:48px;padding:0 18px}.wordmark{font-size:24px;letter-spacing:9px}.wordmark small{font-size:9px}#round-label{font:12px "Barlow Semi Condensed",sans-serif;letter-spacing:0}
.account-menu{position:relative;font-size:12px}.account-menu summary{list-style:none}.account-menu[open]{z-index:30}.account-menu[open]>span,.account-menu[open]>button{display:block;background:#171b18;padding:10px}.account-menu[open]>span{font-size:11px}
.table{grid-template-columns:175px minmax(650px,1fr) 210px;gap:14px;padding-top:12px}.players,.turn-panel{padding-top:157px}.player{padding:7px;background:transparent;border:0;border-left:2px solid var(--player)}.player.active{box-shadow:none;background:#d8b46a0b}.player h2{font:12px "Barlow Semi Condensed",sans-serif;display:flex;align-items:center;gap:3px;margin-bottom:7px}.player-vp{margin-left:auto;color:#dfc38c;font-size:12px}.turn-indicator{color:#dfc38c}.leader-button{display:block;padding:0;border:0;width:100%;background:transparent}.leader-button .leader{aspect-ratio:1.433;object-fit:contain;border:0}.player-resources{padding:8px 0}.player-summary{display:flex;justify-content:space-between;gap:5px;font-size:10px;color:var(--muted)}.player details{margin-top:7px}.leader-dialog{width:min(900px,95vw)}.leader-dialog #card-detail img{max-height:75vh}.turn-actions{padding:12px;border:0;border-left:1px solid var(--line);background:transparent}.turn-actions h2{font-size:20px}.turn-actions p{font-size:12px}.turn-panel section{padding:10px}.turn-panel section h2{font-size:15px}.turn-panel{gap:12px}.inspect{font-size:0;height:14px}.inspect::after{content:'↗';font-size:11px}.section-heading h2{font-size:12px;letter-spacing:1px}.market>h2{display:none}
.troop-stack{position:absolute;transform:translate(-50%,-50%);display:flex;align-items:center;gap:3px;font:600 clamp(12px,1.2vw,20px) "Barlow Semi Condensed",sans-serif;color:#fff4db;text-shadow:0 1px 3px #000}.troop-stack .cube{width:17px;height:17px;margin:0;box-shadow:2px -2px 0 #ffffff50,2px 2px 3px #0009}.deployed .cube{width:14px;height:14px}.combat-marker{position:absolute;transform:translate(-50%,-50%);width:17px;height:17px;display:grid;place-items:center;font:bold 11px "Barlow Semi Condensed",sans-serif;background:var(--player);border:1px solid #ffe8bcaa;color:#141414;box-shadow:1px 2px 3px #0008}.influence-marker{position:absolute;width:10px;height:10px;margin:0;transform:translate(-50%,-50%)}.board-conflict-card{position:absolute;left:29.1%;top:68%;width:9.3%;padding:0;border:0;border-radius:3px;box-shadow:0 2px 7px #0009}.board-conflict-card .card-art{height:auto}
@media(max-width:1250px){.table{grid-template-columns:155px minmax(600px,1fr)}.turn-panel{padding-top:0}.players{padding-top:157px}}
@media(max-width:800px){.topbar{height:auto;min-height:48px}.table{display:flex}.players{padding-top:0}.player{flex-basis:150px}.player .leader{display:block}.player .influence,.player details{display:revert}.player-summary{font-size:9px}.turn-panel{padding-top:0}.leader-dialog{padding:16px}.board-conflict-card{width:9.3%}}

.leader-button{position:relative}.leader-button::after{content:'↗';position:absolute;right:3px;top:3px;padding:1px 4px;background:#141715b0;color:#e6d4ae;font-size:12px}.leader-button:hover .leader{outline:1px solid var(--gold)}

/* Desktop table: opponents left, market right, private hand and actions below. */
@media(min-width:801px){
.table{height:calc(100dvh - 48px);max-width:1600px;padding:10px 14px;display:grid;grid-template-columns:155px minmax(0,1fr) 170px;grid-template-rows:minmax(0,1fr) 165px;gap:10px 16px}
.play-area{display:contents}.table>.players{grid-column:1;grid-row:1/3;padding:0;gap:12px;overflow:auto;min-height:0}.player{flex:none}.player.own-player{order:1;margin-top:auto;background:#d8b46a0b}.player h2{font-size:11px}.player-summary{font-size:9px}.leader-button .leader{max-height:104px}.player details{font-size:10px}
.board-scroll{grid-column:2;grid-row:1;min-width:0;min-height:0;overflow:hidden;display:flex;justify-content:center;align-items:center}.printed-board{min-width:0;width:auto;height:100%;max-width:100%;max-height:100%;aspect-ratio:5000/4996;flex:none;container-type:inline-size}.board-pieces .agent{width:2cqw;height:3cqw}.troop-stack{font-size:2cqw}.troop-stack .cube{width:1.6cqw;height:1.6cqw}.combat-marker{width:1.8cqw;height:1.8cqw;font-size:1.3cqw}.influence-marker{width:1.6cqw;height:1.6cqw}.board-score.disc{width:1.4cqw;height:1.4cqw}
.market{grid-column:3;grid-row:1;display:flex;flex-direction:column;min-height:0;margin:0;gap:8px;overflow:auto;align-items:stretch}.market .card-row{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:5px;padding:0;overflow:visible}.market .card-wrap.mini{width:72px;flex:0 0 auto}.market .inspect{position:absolute;right:-19px;bottom:0;width:18px;font-size:0}.reserve{width:100%;flex:none;gap:4px}.reserve h3,.reserve>span{font-size:9px}.reserve button{padding:5px;font-size:10px}.market>h2{display:block;font:10px "Barlow Semi Condensed",sans-serif;letter-spacing:2px;writing-mode:initial;transform:none;text-align:center;margin-bottom:2px}
.hand{grid-column:2;grid-row:2;padding:6px 0 0;min-width:0;overflow:hidden;border-top:1px solid #62543a70}.hand .section-heading{margin-bottom:4px}.hand .section-heading h2{font-size:10px}.hand .card-row{padding:6px 4px 8px;gap:9px;align-items:start;justify-content:center}.hand .card-wrap{width:82px;flex:0 0 82px}.hand .inspect{height:10px;padding:0}.hand .section-heading>.resource,.hand .resource{font-size:11px}
.turn-panel{grid-column:3;grid-row:2;display:flex;flex-direction:column;padding:0;gap:4px;overflow:auto;min-height:0}.turn-actions{padding:4px 0 0;border:0;gap:7px}.turn-actions h2{font-size:17px}.turn-actions p{font-size:11px;line-height:1.3}.turn-actions button{font-size:12px;padding:7px}.turn-actions>.card-wrap{display:none}.turn-panel section{padding:5px 0}.turn-panel section h2,.turn-panel section h3{font-size:12px;margin-bottom:4px}.turn-panel section button{font-size:10px;padding:4px}.turn-panel .table-tools{display:flex;gap:5px}.table-tools button{font-size:9px!important}.empty-intrigue{font-size:10px}
}
@media(min-width:801px) and (max-height:720px){.table{grid-template-rows:minmax(0,1fr) 140px}.hand .card-wrap{width:65px;flex-basis:65px}.leader-button .leader{max-height:75px}.players{gap:7px!important}.market .card-wrap.mini{width:55px}}
@media(max-width:800px){.player.own-player{order:-1}.market .card-row{flex-direction:row}.turn-actions{position:relative}}
@media(min-width:801px){.board-scroll{container-type:size}.printed-board{width:min(100cqw,100cqh);height:auto}}
@media(min-width:801px){.market .card-wrap.mini{width:clamp(42px,calc((100dvh - 400px)/7.2),72px)}.market .card-row{gap:4px}.market .reserve{margin-top:auto}.market .reserve h3{margin:0}.market .reserve button{margin:0}.market .reserve>span{line-height:1.1}}

.available-agents{display:flex;align-items:center;gap:6px;min-height:25px;margin:3px 0 6px}.available-agents .agent{width:17px;height:25px;filter:drop-shadow(1px 1px 1px #000)}.available-agents small{margin-left:auto;font-size:9px}.board-pieces .agent{filter:drop-shadow(0 0 1px #fff) drop-shadow(1px 2px 2px #000)}

.leader-button::after{display:none}.undo{border:1px solid var(--line)!important}.turn-actions:has(#choice-form){overflow:visible}.card:focus-visible{outline:none;border-color:#fff0be}.hand .card.selected{outline:none}

/* Direct placement: only legal targets invite interaction. */
.board-space[aria-disabled="true"]{cursor:default}
.board-space[aria-disabled="true"]:hover{background:transparent;border-color:transparent}
.board-space.legal{border-color:#f2d58e;background:#f2c86130;box-shadow:0 0 10px #f1c66390;cursor:pointer}
.board-space.legal:hover{background:#ffe3a65c;border-color:#fff0c8;box-shadow:0 0 16px #ffd678}
.hand .card[data-draggable="true"]{cursor:grab}.hand .card[data-draggable="true"]:active{cursor:grabbing}
.player.active{outline:2px solid #e6c477;outline-offset:-2px;box-shadow:inset 0 0 16px #dfb45418;border-radius:4px}.player.active .leader-button{outline:none;box-shadow:none}
.planning-label{font:10px "Barlow Semi Condensed",sans-serif;letter-spacing:1.4px;text-transform:uppercase;color:#ad9f83;align-self:flex-start}
.turn-actions:empty{display:none}
.card{aspect-ratio:auto}.card .card-art{height:auto}.card img{height:auto}.card-fallback{z-index:0}
.reserve-stack{position:relative}.reserve-stack>span{position:absolute;right:-3px;bottom:-3px;z-index:3;min-width:22px;padding:3px 5px;background:#191b19;border:1px solid #a18d5e;border-radius:50%;color:#eee0bd;font:11px "Barlow Semi Condensed",sans-serif;text-align:center}
@media(min-width:801px){
.table{grid-template-columns:145px minmax(0,1fr) clamp(270px,27vw,330px)}
.market{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:10px;overflow:visible;align-content:start}
.market>h2{grid-column:1/-1;margin:0}
.market .card-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;justify-items:center;gap:12px 8px;overflow:visible;padding:2px 0 8px;min-height:0}
.market .card-wrap.mini{width:min(100%,100px);flex:none}
.market .reserve{margin:0;display:flex;flex-direction:column;align-items:center;gap:12px;width:auto;min-width:0}
.market .reserve-stack{width:min(100%,100px)}.market .reserve .card-wrap{width:100%}.market .reserve button{padding:0;border:2px solid #090a0b;font-size:inherit}
.market .card{width:100%;overflow:hidden}.market .reserve-stack>span{font-size:11px}
.turn-panel{overflow:auto}.turn-actions h2{font-size:15px}
}
@media(min-width:801px) and (max-height:780px){.market .card-wrap.mini,.market .reserve-stack{width:min(100%,calc((100dvh - 285px)/4.4))}}
@media(max-width:800px){.market{align-items:flex-start}.market .reserve{width:95px;flex-basis:95px;gap:8px}.reserve .card-wrap.mini{width:80px}.market .card-row{align-items:start}.market .reserve button{padding:0}}

.hand .card{touch-action:none;user-select:none;-webkit-user-select:none}.hand .card img{-webkit-user-drag:none}.drag-ghost{position:fixed;z-index:999;pointer-events:none;transform:translate(-50%,-50%) rotate(-5deg);opacity:.85;box-shadow:0 8px 24px #0009}

/* Private Intrigue cards sit beside the hand, three per page. */
.private-zone{display:flex;gap:7px;min-width:0;min-height:0}
.private-zone>.hand{flex:1;min-width:0}
.intrigue-hand{flex:0 0 210px;min-width:0;padding:6px 0 0;border-top:1px solid #62543a70}
.intrigue-hand.empty{flex-basis:78px}
.intrigue-hand .section-heading{margin-bottom:4px;min-height:16px}
.intrigue-hand .section-heading h2{font:400 11px "Barlow Semi Condensed",sans-serif;letter-spacing:0;text-transform:none;white-space:nowrap;color:var(--muted)}.intrigue-hand .section-heading h2 span{font:inherit;color:var(--ink)}
.intrigue-hand .card-row{gap:7px;padding:3px 2px;overflow:visible;justify-content:flex-start}
.intrigue-hand .card-wrap{width:64px;flex:0 0 64px}
.intrigue-hand nav{display:flex;align-items:center;gap:6px;font:10px "Barlow Semi Condensed",sans-serif;color:var(--muted)}
.intrigue-hand nav button{padding:0 5px;font-size:17px;line-height:18px;border:0;background:transparent}
@media(min-width:801px){.private-zone{grid-column:2;grid-row:2;overflow:hidden}.private-zone .hand .card-row{justify-content:safe center}.private-zone .section-heading{flex-wrap:wrap;gap:3px}.private-zone .hand .section-heading>span{gap:7px}}
@media(min-width:801px) and (max-height:720px){.intrigue-hand{flex-basis:174px}.intrigue-hand .card-wrap{width:52px;flex-basis:52px}}
@media(max-width:800px){.private-zone{flex-wrap:wrap}.private-zone>.hand{flex-basis:100%}.intrigue-hand{flex-basis:240px;padding-bottom:12px}.intrigue-hand .card-wrap{width:72px;flex-basis:72px}}

/* Balanced navigation keeps the round at the viewport center. */
.topbar{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:16px;height:48px;position:relative;z-index:40}
.topbar .wordmark{justify-self:start;white-space:nowrap}
#round-label{grid-column:2;justify-self:center;text-align:center;white-space:nowrap;color:var(--muted)}
.topbar-actions{grid-column:3;justify-self:end;display:flex;align-items:center;gap:16px;white-space:nowrap}
#game-navigation{display:flex;align-items:center;gap:12px}
.topbar .nav-action{text-decoration:none;padding:5px 2px;border:0;background:transparent;color:var(--muted);font:12px "Barlow Semi Condensed",sans-serif}
.topbar .nav-action:hover{color:var(--ink);background:transparent}
.topbar-actions #identity{border-left:1px solid var(--line);padding-left:16px;font-size:12px}
.topbar-actions #identity:empty{display:none}
.account-menu summary{padding:5px 0;color:var(--muted)}
.account-popover{position:absolute;right:0;top:calc(100% + 10px);min-width:170px;padding:8px;background:#171b18;border:1px solid var(--line);box-shadow:0 8px 24px #0008;white-space:normal}
.account-popover>span{display:block;padding:8px;color:var(--muted);font-size:11px;overflow-wrap:anywhere}
.account-popover>button{display:block;width:100%;text-align:left;padding:8px;font-size:12px}
@media(max-width:700px){.topbar{height:auto;min-height:74px;grid-template-columns:1fr auto;gap:8px 12px;padding:10px 14px}.topbar .wordmark{font-size:20px;letter-spacing:5px}.wordmark small{font-size:8px;letter-spacing:2px}.topbar-actions{grid-column:2;gap:10px}#game-navigation{gap:10px}.topbar-actions #identity{padding-left:10px}#round-label{grid-column:1/-1;grid-row:2;width:auto;font-size:11px}}

/* Give private hand artwork more room without clipping its selection edge. */
@media(min-width:801px){.table{grid-template-rows:minmax(0,1fr) 190px}.hand .card-wrap{width:100px;flex-basis:100px}}
@media(min-width:801px) and (max-height:720px){.table{grid-template-rows:minmax(0,1fr) 165px}.hand .card-wrap{width:82px;flex-basis:82px}}
@media(max-width:800px){.hand .card-wrap{width:112px;flex-basis:112px}}

.prescience-card{display:flex;align-items:center;gap:10px;margin-top:9px}
.prescience-card>button{width:46px;flex:none;padding:0;border:1px solid #746446;border-radius:3px;overflow:hidden;box-shadow:0 2px 5px #0008}
.prescience-card .card-art{height:auto}.prescience-card>span{font:10px "Barlow Semi Condensed",sans-serif;color:var(--muted)}

.effect-actions{display:flex;flex-direction:column;gap:7px;min-width:0}.turn-actions:has(.played-card){display:grid;grid-template-columns:86px minmax(0,1fr);gap:12px;align-items:start}.played-card .card-wrap{width:86px}.played-card .card{width:100%}.turn-actions .effect-actions>p{font-size:11px}.turn-actions .effect-actions>button{white-space:normal}

.turn-actions .played-card .card{padding:0}

.player-piles{display:flex;gap:8px;margin-top:8px}.pile-button{display:flex;align-items:center;gap:4px;flex:1;min-width:0;padding:5px 0;border:0;background:transparent;font:9px "Barlow Semi Condensed",sans-serif;color:var(--muted);white-space:nowrap}.pile-button b{font-weight:400;color:var(--ink)}.pile-icon{display:block;width:11px;height:15px;border:1px solid #a18c62;border-radius:1px;box-shadow:-2px -2px 0 #242722,-3px -3px 0 #786443;margin:2px 1px 0 3px;flex:none}.pile-button:hover{color:var(--ink)}.pile-dialog{width:min(780px,94vw)}.pile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:16px;align-items:start}.pile-grid .card-wrap{width:100%;min-width:0}.pile-grid .card{padding:0}.pile-grid p{font-size:12px}

/* Compact house summaries; card art remains inspectable. */
.player-summary{justify-content:flex-start;gap:12px}
.player-summary i{font-style:normal;color:#bda66d}
.hand-count-icon{font-size:17px;line-height:10px}
.intrigue-count-icon{font-size:10px}
.player-piles{gap:14px;margin-top:5px}
.pile-button{flex:0 0 auto;gap:6px;padding:3px 0;font-size:10px}
.pile-button.discard .pile-icon{transform:rotate(90deg);margin-right:3px;opacity:.7}
@media(min-width:801px){
.table>.players{gap:8px;scrollbar-width:thin}
.player{position:relative;padding:7px}
.player{display:grid;grid-template-columns:64px minmax(0,1fr);gap:5px 8px;align-items:center}
.player>h2{grid-column:1/-1;margin-bottom:0}
.player>.leader-button{grid-column:1;grid-row:2/4}
.player .leader-button .leader{width:64px;max-height:none}
.player>.player-resources{grid-column:2;grid-row:2;display:flex;flex-wrap:wrap;gap:5px;padding:0}
.player .resource{font-size:10px;gap:3px}
.player .resource i{width:11px;height:11px}
.player>.available-agents{grid-column:2;grid-row:3;gap:4px;min-height:18px;margin:0}
.player .available-agents .agent{width:11px;height:17px}
.player>.player-summary{grid-column:1/-1;grid-row:4;font-size:10px}
.player>.player-piles{grid-column:1/-1;grid-row:5;justify-self:end;align-self:start;margin:0}
}

/* Keep market and reserve cards on the same three-column rhythm. */
.market{grid-template-columns:repeat(3,minmax(0,1fr))}
.market>.card-row{grid-column:1/3;column-gap:10px}
.market>.reserve{grid-column:3;padding:2px 0 8px}
.market .card{aspect-ratio:.69}
.market .card .card-art,.market .card img{height:100%;aspect-ratio:auto!important}

.prescience-card{grid-column:1/-1;grid-row:6;order:10}
.intrigue-count-icon{display:inline-block;width:12px;height:18px;flex:none;vertical-align:middle;background-image:url('https://steamusercontent-a.akamaihd.net/ugc/2502404390141277250/1365C1EC07538B6797E8162398CB43CD111C1C7C/');background-repeat:no-repeat;background-size:579.75px 579.28125px;background-position:-130px -383px}
.player-summary>span,.intrigue-hand .section-heading h2{display:inline-flex;align-items:center;gap:4px}
.intrigue-hand.empty{flex-basis:32px}

.resource small{display:none!important}
.player-summary{gap:6px!important;justify-content:space-between}
.pile-counter{position:relative;min-width:0}
.pile-counter .pile-button{display:flex;align-items:center;gap:3px;padding:2px 0;font:10px "Barlow Semi Condensed",sans-serif}
.pile-counter .pile-icon{width:10px;height:14px;margin:0;flex:none}
.pile-counter .hand-icon{background:repeating-linear-gradient(45deg,#857044 0 1px,#272923 1px 3px);border:1px solid #c7b17c;border-radius:2px}
.pile-counter .played-icon:after{content:'✓';position:absolute;inset:1px;color:#d6c18d;font:10px "Barlow Semi Condensed",sans-serif}
.pile-counter .discard .pile-icon{transform:rotate(90deg);margin:0 2px}
.pile-preview{display:none;position:fixed;z-index:40;width:max-content;max-width:min(680px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:12px;background:#191c1bf5;border:1px solid #8b784e;border-radius:5px;box-shadow:0 8px 30px #000b}
.pile-preview:before{content:'';position:absolute;right:100%;top:0;width:8px;height:100%}
.pile-counter:hover>.pile-preview,.pile-counter:focus-within>.pile-preview{display:block}
.pile-preview h3{font:11px "Barlow Semi Condensed",sans-serif;letter-spacing:0;margin-bottom:8px;color:var(--muted)}
.pile-preview-cards{display:flex;gap:8px;overflow:auto;padding:2px 2px 7px}
.pile-preview-cards .preview-card{width:200px;flex:0 0 200px;max-width:calc(100vw - 54px)}
.preview-card .card-art{height:auto}
.preview-card img{display:block;width:100%;height:auto}
.pile-counter .pile-button,.preview-card{cursor:default}
.pile-counter .pile-button:focus-visible{outline:1px solid var(--gold);outline-offset:3px}

.player>.player-summary{margin-top:9px;align-items:center;min-height:22px}
.pile-counter .pile-button{height:22px;align-items:center;line-height:1;gap:4px}
.pile-counter .private-count{cursor:default;color:var(--muted);background:none;border:0}
.pile-counter .pile-icon{box-sizing:border-box;position:relative;top:auto;vertical-align:middle}
.pile-counter .pile-icon:before{top:-2px}
.pile-counter .played-icon:after{inset:1px;font-size:9px;line-height:10px}
.pile-counter .discard .pile-icon{transform:none;width:15px;height:10px;margin:0}
.pile-counter .intrigue-count-icon{height:18px;margin:0}

.resource.water i,.player .resource.water i{width:11px;height:14px;flex:0 0 11px;border:0;border-radius:0;transform:none;background:transparent url('/game/water.svg') center/contain no-repeat}
.player h2,.section-heading h2,.market>h2{font-family:Cinzel,serif}
.pile-button b,.resource,.player-vp{font-variant-numeric:tabular-nums}

/* Hover for a glance; click the counter for a persistent, scrollable gallery. */
.pile-counter button.pile-button{cursor:pointer}
.pile-preview-cards{display:grid;grid-template-columns:repeat(3,200px);max-height:min(65dvh,640px);overflow:auto;scrollbar-width:thin;align-items:start}
.pile-preview-cards:has(.preview-card:only-child){grid-template-columns:200px}
.pile-preview-cards .preview-card{width:200px;min-width:0}
.pile-dialog{width:min(1100px,94vw);max-height:90dvh;overflow-y:auto;scrollbar-width:thin}
.pile-dialog #card-detail>h2{position:sticky;top:0;z-index:2;background:#191c1b;padding:8px 30px 14px 0}
.pile-grid{grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));gap:18px;max-width:100%;align-items:start}
.pile-grid .preview-card{width:100%;max-width:260px;justify-self:center}
@media(max-width:700px){.pile-preview-cards{grid-template-columns:repeat(2,minmax(0,1fr));width:calc(100vw - 54px)}.pile-preview-cards .preview-card{width:100%}}

.your-tables{margin-top:26px}.your-tables h2{margin-bottom:12px}.your-tables>button{display:flex;flex-direction:column;gap:6px;width:100%;text-align:left;margin:8px 0;padding:14px}.your-tables>button strong{font-family:Cinzel,serif}.your-tables>button small{white-space:normal}

/* Wide tables give the board the full height and group cards on the right. */
@media(min-width:1400px) and (min-aspect-ratio:8/5){
 .table{max-width:none;grid-template-columns:125px minmax(0,1fr) clamp(548px,36vw,760px);grid-template-rows:auto minmax(0,1fr) auto;gap:12px 12px}
 .table>.players,.board-scroll{grid-row:1/4}
 .board-scroll{grid-column:2}
 .market{grid-column:3;grid-row:1;display:flex;flex-direction:column;gap:8px;container-type:inline-size;overflow:visible}
 .market>.card-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;padding:2px 0 5px;width:100%}
 .market .card-wrap.mini{width:100%;max-width:120px}
 .market>.reserve{display:flex;flex-direction:row;justify-content:center;gap:8px;padding:0 0 6px}
 .market .reserve-stack{width:calc((100cqw - 32px)/5);max-width:120px}
 .private-zone{grid-column:3;grid-row:2;display:flex;flex-direction:column;gap:10px;overflow:auto;scrollbar-width:thin}
 .private-zone>.hand{flex:none;overflow:visible}
 .hand .card-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));justify-items:center;gap:8px;padding:5px 3px 8px;overflow:visible}
 .hand .card-wrap{width:100%;max-width:120px;min-width:0}
 .private-zone>.intrigue-hand{flex:none;width:100%;padding-top:8px}
 .intrigue-hand .card-wrap{width:90px;flex-basis:90px}
 .intrigue-hand.empty{display:none}
 .turn-panel{grid-column:3;grid-row:3;max-height:30dvh;overflow:auto}
 .turn-panel:has(.effect-actions:empty){display:none}
 .turn-actions{margin-top:0}
}

.hand-tools{display:flex;align-items:center;gap:12px}.hand-tools>span{display:flex;gap:7px}.reveal-hand{display:inline-flex;align-items:center;gap:5px;border:0;background:transparent;padding:3px 0;color:var(--muted);font-size:12px;white-space:nowrap}.reveal-hand svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}.reveal-hand:hover:not(:disabled){background:transparent;color:var(--ink)}

@media(min-width:1400px) and (min-aspect-ratio:8/5){
 .player{grid-template-columns:52px minmax(0,1fr);column-gap:6px;padding:6px}
 .player .leader-button .leader{width:52px}
 .player>.leader-button{grid-row:2;align-self:start}
 .player>.player-resources{grid-column:2;grid-row:2/4;flex-direction:column;align-items:flex-start;gap:4px}
 .player .resource{font-size:11px;min-width:4ch;gap:4px;line-height:14px}
 .player>.available-agents{grid-column:1;grid-row:3;align-self:end}
 .player h2{font-size:10px;gap:2px}.player-vp{font-size:11px}
 .player-summary{gap:5px!important}
 .market .card-wrap.mini,.market .reserve-stack,.hand .card-wrap{max-width:140px}
}

.effect-options{display:flex;flex-wrap:wrap;gap:6px}.effect-options:empty{display:none}
.turn-actions .effect-option{flex:1 1 120px;padding:7px 10px;border:1px solid #8d764650;background:#b99a6012;font:13px 'Barlow Semi Condensed',sans-serif;text-align:left;color:#e5d2ab}
.deploy-options{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;padding:7px 0;color:var(--muted);font-size:13px}
.deploy-options>div{display:flex;flex-wrap:wrap;gap:4px}
.turn-actions .deploy-amount{width:auto;flex:none;min-width:26px;min-height:26px;padding:3px 6px;border-color:#b99a6060;background:#b99a6010;font-size:14px;font-variant-numeric:tabular-nums}
.turn-footer{display:flex;justify-content:flex-start;align-items:center;gap:6px;border-top:1px solid #62543a50;padding-top:8px}
.turn-footer .undo,.turn-footer .confirm-turn{display:inline-flex;align-items:center;gap:5px;width:auto;flex:none;white-space:nowrap;margin:0;border:1px solid #b99a6040!important;border-radius:4px;background:#b99a6008;color:var(--muted);padding:5px 9px;font-size:13px}
.turn-footer .confirm-turn{color:#dfc38c}
.turn-footer svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.turn-footer button:hover:not(:disabled){background:#b99a6018;border-color:#b99a6080!important}
.turn-footer .confirm-turn:disabled{opacity:.3}

/* Spacious desktops scale the cards as well as the board. Compact screens keep their existing layout. */
@media(min-width:1500px) and (min-height:950px){
 .table{--large-card:clamp(130px,10vw,185px);max-width:none;grid-template-columns:clamp(210px,14vw,280px) minmax(0,1fr) clamp(390px,28vw,560px);grid-template-rows:minmax(0,1fr) calc(var(--large-card)/.69 + 48px);gap:16px}
 .table>.players{gap:16px}
 .player{grid-template-columns:minmax(0,1.8fr) minmax(0,1fr);gap:8px 10px;padding:10px}
 .player>.leader-button{grid-column:1;grid-row:2/4;align-self:center}
 .player .leader-button .leader{width:100%;max-height:none}
 .player>.player-resources{grid-column:2;grid-row:2;flex-direction:column;align-items:flex-start;gap:6px}
 .player>.available-agents{grid-column:2;grid-row:3;gap:5px}
 .player h2,.player-vp{font-size:13px}
 .player .resource{font-size:13px;line-height:18px;gap:5px}
 .player .resource i{width:14px;height:14px}
 .player .resource.water i{width:14px;height:18px;flex-basis:14px}
 .player .available-agents .agent{width:15px;height:23px}
 .player-summary .pile-button{font-size:12px;gap:6px}
 .player>.player-summary{margin-top:12px}
 .prescience-card>button{width:62px}
 .market .card-wrap.mini,.market .reserve-stack{width:100%;max-width:180px}
 .market,.market>.card-row,.market>.reserve{gap:16px}
 .hand .card-wrap{width:var(--large-card);flex-basis:var(--large-card)}
 .hand .card-row{gap:12px}
 .hand .section-heading h2,.market>h2{font-size:12px}
 .intrigue-hand:not(.empty){flex-basis:270px}
 .intrigue-hand .card-wrap{width:84px;flex-basis:84px}
}
@media(min-width:1500px) and (min-height:950px) and (min-aspect-ratio:8/5){
 .table{grid-template-columns:clamp(210px,14vw,280px) minmax(0,1fr) clamp(650px,38vw,1000px);grid-template-rows:auto minmax(0,1fr) auto}
 .market .card-wrap.mini,.market .reserve-stack,.hand .card-wrap{max-width:185px}
 .market .reserve-stack{width:calc((100cqw - 64px)/5)}
 .hand .card-wrap{width:100%;min-width:0}
 .hand .card-row{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}
 .private-zone>.intrigue-hand{flex:none}
}

.market>h2{display:none}
@media(min-width:1500px) and (min-height:950px) and (aspect-ratio < 8/5){
 .table{grid-template-columns:clamp(210px,14vw,280px) minmax(0,1fr) clamp(340px,23vw,480px)}
 .market{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:16px 12px;container-type:size;justify-items:end;align-items:start;overflow:visible}
 .market>.card-row,.market>.reserve{display:contents}
 .market>.card-row>.card-wrap:nth-child(even),.market>.reserve>.reserve-stack:nth-child(odd){justify-self:start}
 .market .card-wrap.mini,.market .reserve-stack{width:min(100%,calc((100cqh - 48px)*.69/4));max-width:200px}
 .market .reserve-stack .card-wrap.mini{width:100%}
}

/* A viewport-bound art layer avoids clipping inside scrollable card rows. */
.card-hover-zoom{position:fixed;z-index:90;pointer-events:none;transform-origin:center;border-color:#d4bc7e;box-shadow:0 10px 26px #0009;animation:card-zoom-in 130ms ease-out}
.card-hover-zoom .card-art,.card-hover-zoom img{width:100%;height:100%;aspect-ratio:auto!important}
@keyframes card-zoom-in{from{opacity:.7;transform:scale(.92)}to{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.card-hover-zoom{animation:none}}

.leader-button{cursor:default}
.leader-button:hover .leader{outline:none}
.pile-preview-cards:has(.preview-card:nth-child(2):last-child){grid-template-columns:repeat(2,200px)}
.reveal-hand{padding:6px 11px;border:1px solid #b99a6080;border-radius:4px;background:#b99a6012;color:#e4cea2}
.reveal-hand:hover:not(:disabled){background:#b99a6025;border-color:#dfc38c;color:#fff0ce}

.card-tabs{display:flex;align-items:center;gap:14px}
.card-tabs [role=tab]{padding:4px 0;border:0;border-bottom:1px solid transparent;border-radius:0;background:none;color:var(--muted);font:12px Cinzel,serif;white-space:nowrap}
.card-tabs [role=tab][aria-selected=true]{color:#ead19a;border-bottom-color:#b99a60}
.card-tabs [role=tab]:hover{background:none;color:var(--ink)}
.card-tabs span{font:12px 'Barlow Semi Condensed',sans-serif;color:var(--muted);margin-left:3px}
.intrigue-pagination{display:flex;align-items:center;justify-content:center;gap:10px;font-size:11px;color:var(--muted)}
.intrigue-pagination button{padding:0 6px;border:0;background:none;font-size:18px;line-height:18px}
 .card-tabs{flex-wrap:wrap;gap:4px 14px}

.confirmed-reveal .card{filter:grayscale(1);opacity:.65;cursor:default}
.revealed-label{padding:6px 11px;color:var(--muted);font-size:12px;white-space:nowrap}

.player .available-agents{gap:5px;font-size:10px;line-height:18px}
.player .available-agents .agent{width:11px;height:17px;flex:0 0 11px}
@media(min-width:1500px) and (min-height:950px){
 .player{grid-template-columns:minmax(0,1fr) calc(19px + 2ch);column-gap:7px;font-size:13px}
 .player .available-agents{font-size:13px;min-height:18px}
 .player .available-agents .agent{width:14px;height:20px;flex-basis:14px}
}

/* Keep the hand anchored when Reveal is replaced by status or no control. */
.hand .section-heading{min-height:31px}
.hand-tools{min-height:31px}
#app[aria-busy="true"]{pointer-events:none}

.card-tabs [role=tab].previewing{color:var(--ink);border-bottom-color:#b99a6060}

#tab-card-preview{position:fixed;z-index:95;display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;padding:8px;background:#191c1bf5;border:1px solid #b99a6070;border-radius:5px;box-shadow:0 8px 24px #0008;overflow:auto;scrollbar-width:thin}
#tab-card-preview .preview-card{min-width:0}
#tab-card-preview .card-art,#tab-card-preview img{display:block;width:100%;height:auto;border-radius:5px}

.board-agents{position:absolute;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;width:calc(var(--agent-columns)*2cqw + (var(--agent-columns) - 1)*.3cqw);gap:.3cqw;transform:translate(-50%,-50%);pointer-events:none}
.board-agents .agent{display:block;flex:0 0 2cqw;width:2cqw;height:3cqw;filter:drop-shadow(0 0 1px #fff) drop-shadow(1px 2px 2px #000)}
.troop-stack:not(.deployed){width:1.6cqw;height:1.6cqw}
.troop-stack:not(.deployed) b{position:absolute;left:calc(100% + .4cqw);top:50%;transform:translateY(-50%)}

/* Market and reserves share two columns at every viewport size. */
.market{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(4,max-content);align-content:start;gap:12px;container-type:size;justify-items:end;align-items:start}
.market>.card-row,.market>.reserve{display:contents}
.market>.card-row>.card-wrap:nth-child(even),.market>.reserve>.reserve-stack:nth-child(odd){justify-self:start}
.market .card-wrap.mini,.market .reserve-stack{width:min(100%,calc((100cqh - 36px)*.69/4));max-width:200px}
.market .reserve-stack .card-wrap.mini{width:100%}
@media(min-width:1400px) and (min-aspect-ratio:8/5){.market{height:50dvh;min-height:0}}
@media(max-width:800px){.market{height:70dvh;min-height:0;width:100%}}

.player h2 .switch-house{margin-left:auto;padding:2px 4px;border:0;background:transparent;color:var(--muted);line-height:0}
.switch-house svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.player h2 .switch-house:hover:not(:disabled){color:var(--gold);background:#b99a6012}
.player h2 .switch-house:disabled{visibility:hidden}

/* Read-only game history */
.house-activity{margin-left:auto;border:0;background:none;padding:.2rem;color:var(--muted,#b6ad99);line-height:0;flex:0 0 auto}
.house-activity svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-width:1.6}
.player h2 .house-activity+.switch-house{margin-left:.2rem}
#card-dialog.activity-dialog{width:min(52rem,94vw);max-height:88dvh;overflow:auto;padding:1.5rem;box-sizing:border-box}
.activity-dialog #card-detail{display:block;width:100%;max-width:none}
.activity-filters{display:flex;gap:.4rem;flex-wrap:wrap;margin:1rem 0; padding-right:1rem}
.activity-filters button{font-size:.9rem;padding:.35rem .65rem}
.activity-filters button[aria-pressed=true]{color:#f0ce80;border-color:#c4a35d;background:#c4a35d15}
.activity-round{font:500 .8rem "Barlow Semi Condensed",sans-serif;color:#bdb39b;margin:1rem 0 .3rem;letter-spacing:.08em;text-transform:uppercase}
.activity-entry{display:flex;gap:.6rem;align-items:flex-start;border-top:1px solid #b79b5525;padding:.45rem 0;font-family:"Barlow Semi Condensed",sans-serif;font-size:1rem}
.activity-entry details{flex:1;min-width:0}
.activity-entry summary{display:block;cursor:pointer;position:relative;padding-left:1rem;list-style:none}
.activity-entry summary::-webkit-details-marker{display:none}
.activity-entry summary:before{content:'›';position:absolute;left:0;color:#a18c62}
.activity-entry details[open]>summary:before{transform:rotate(90deg)}
.activity-line{display:flex;align-items:baseline;gap:.55rem;line-height:1.4}
.activity-actor{color:var(--player);font-weight:600;flex:none}
.activity-line time{margin-left:auto;color:#8f8d80;font-size:.8rem;flex:none}
.activity-highlights{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#bab7a8;font-size:.92rem;line-height:1.4}
.activity-separator{color:#756e5d}
.activity-extra,.activity-house{color:#a59c86}
.activity-expanded{padding:.3rem .6rem .3rem 1rem;color:#bab7a8;border-left:1px solid #8b784e55;margin:.4rem 0 0 .3rem}
.activity-expanded section{margin:.45rem 0}
.activity-expanded strong{font-weight:500;color:#dfd7c1;font-size:.95rem}
.activity-expanded p{margin:.15rem 0;line-height:1.4;font-size:.92rem}
.activity-card-link{display:inline;border:0;border-bottom:1px dotted #b79b5580;padding:0;background:none;color:#e2cb92;font:inherit;line-height:inherit;border-radius:0;cursor:zoom-in}
.activity-card-link:hover,.activity-card-link:focus-visible{color:#ffe6a7;background:#b79b5518}
.activity-board{padding:.2rem;border:0;background:none;color:#a79b80;line-height:0;flex:none;margin-top:.1rem}
.activity-board svg{width:1.1rem;height:1.1rem;fill:none;stroke:currentColor;stroke-width:1.5}
.activity-more{padding:.7rem;text-align:center;color:#9b9585;font-size:.85rem}
.activity-sentinel{height:1px}
#activity-card-preview{position:fixed;z-index:100;width:min(230px,45vw,calc((100dvh - 32px)*.7));pointer-events:none;filter:drop-shadow(0 6px 14px #000b)}
#activity-card-preview .card-art,#activity-card-preview img{display:block;width:100%;height:auto;border-radius:7px}
.replay-return{color:#f0ce80!important;border:1px solid #c4a35d!important}
.replay-note{color:#c9bd9e;font-size:.9rem}

.activity-dialog .dialog-close{position:sticky;top:0;float:right;z-index:2;background:#191d1a}

.activity-highlights:empty{display:none}

#action-toasts{position:fixed;top:76px;right:18px;z-index:900;display:flex;flex-direction:column;gap:8px;max-width:calc(100vw - 36px);max-height:calc(100dvh - 96px);overflow:auto;pointer-events:none}
.action-toast{pointer-events:auto;background:#1b201eed;border:1px solid #756440;border-radius:6px;padding:16px 20px;box-shadow:0 4px 16px #0006;font-size:15px;max-width:min(760px,calc(100vw - 36px))}
.action-toast-line{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}.action-toast button{padding:0 3px;background:transparent;border:0;font:inherit;color:inherit}.action-toast .action-cards-link,.action-toast .activity-card-link{border-bottom:1px dotted #bca975;border-radius:0}.action-toast .action-details{margin-left:auto}.action-toast .action-dismiss{font-size:20px}.action-toast-preview{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;max-height:60dvh;overflow:auto}.action-toast-preview[hidden]{display:none}.action-toast-preview .preview-card{width:min(190px,calc((100vw - 76px)/2));flex:none}.action-toast-preview .card-art{display:block;width:100%}.action-toast-preview img{width:100%;display:block}

.action-toast{animation:action-toast-in .24s cubic-bezier(.2,.8,.2,1)}.action-toast.leaving{animation:action-toast-out .16s ease-in forwards;pointer-events:none}.action-toast .action-details{font-size:12px;color:var(--muted)}@keyframes action-toast-in{from{opacity:0;transform:translateX(18px)}to{opacity:1;transform:translateX(0)}}@keyframes action-toast-out{to{opacity:0;transform:translateX(18px)}}@media(prefers-reduced-motion:reduce){.action-toast,.action-toast.leaving{animation:none}}

.player h2 .player-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}

/* Trace the printed panel edges without border-box offsets or rectangular fills at city notches. */
.printed-board .board-space{border:0;border-radius:0;overflow:visible;background:transparent;box-shadow:none}
.printed-board .board-space:hover:not(:disabled),.printed-board .board-space.selected,.printed-board .board-space.legal{background:transparent;border-color:transparent;box-shadow:none}
.space-outline{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.space-outline path{fill:transparent;stroke:transparent;stroke-width:2;stroke-linejoin:round}
.board-space.legal .space-outline path{fill:#f2c86116;stroke:#f2d58e;filter:drop-shadow(0 0 3px #f1c66390)}
.board-space.selected .space-outline path,.board-space:focus-visible .space-outline path,.board-space.legal:hover .space-outline path{fill:#ffe3a626;stroke:#fff0c8}

.hand .card.destination-match{outline:2px solid #f2d58e;outline-offset:2px;box-shadow:0 0 12px #f1c66360}

.hand .card[data-draggable="true"].destination-chosen,.hand .card[data-draggable="true"].destination-chosen:active{cursor:pointer}

.player h2 .first-player-marker{flex:0 0 24px;width:24px;height:24px;object-fit:contain;filter:brightness(1.18) drop-shadow(0 1px 2px #0008)}

/* Account identity and actions share a compact, high-contrast menu. */
.account-menu summary{color:#eee4ce;font-size:15px;cursor:pointer}
.account-popover{width:220px;max-width:calc(100vw - 24px);min-width:0;box-sizing:border-box;padding:8px;background:#20251f;border:1px solid #766748;border-radius:10px;box-shadow:0 12px 32px #0008}
.account-identity{display:flex;align-items:center;gap:11px;padding:8px 8px 14px;margin-bottom:5px;border-bottom:1px solid #ffffff20}
.account-popover .profile-avatar{display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;padding:0;box-sizing:border-box;background:#403b2a;color:#ffe0a0;font:500 16px "Barlow Semi Condensed",sans-serif}
.account-identity strong{min-width:0;overflow-wrap:anywhere;color:#fff2d8;font-size:17px;font-weight:500;line-height:1.25}
#identity .account-popover>button.subtle{display:block;width:100%;min-height:38px;margin:0;padding:9px 10px;border:0;border-radius:5px;background:transparent;color:#f0e9da;font:15px "Barlow Semi Condensed",sans-serif;text-align:left;line-height:1.3}
#identity .account-popover>button.subtle:hover,#identity .account-popover>button.subtle:focus-visible{background:#ffffff12;color:#fff8e8}

.hand-resources{display:none;align-items:center;gap:10px;margin-right:10px}
.hand .hand-resources .resource{font-size:16px;gap:5px;line-height:1}
.hand .hand-resources .resource i{width:14px;height:14px;flex-basis:14px}
.hand .hand-resources .resource.water i{height:18px}
@media (min-width:1400px){.hand-resources{display:flex}}

.rules-menu{position:relative}
.rules-menu summary{list-style:none;cursor:pointer}
.rules-menu summary::-webkit-details-marker{display:none}
.rules-menu summary.nav-action{display:flex;align-items:center;gap:7px}
.rules-menu summary::after{content:'';width:5px;height:5px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:translateY(-2px) rotate(45deg)}
.rules-popover{position:absolute;right:0;top:calc(100% + 10px);z-index:1000;min-width:145px;padding:6px;background:#20251f;border:1px solid #766748;border-radius:8px;box-shadow:0 12px 32px #0008}
.rules-popover a{display:flex;justify-content:space-between;gap:24px;padding:9px 10px;border-radius:4px;color:#f0e9da;font-size:15px;text-decoration:none}
.rules-popover a span{color:var(--muted)}
.rules-popover a:hover,.rules-popover a:focus-visible{background:#ffffff12;color:#fff8e8}

.brand-navigation{display:flex;align-items:center;gap:12px;justify-self:start;min-width:0}
.topbar .wordmark{display:flex;align-items:center;gap:18px;line-height:1;letter-spacing:0}
.wordmark img{display:block;width:150px;height:auto}
.topbar .wordmark small{margin:0;font:10px "Barlow Semi Condensed",sans-serif;letter-spacing:4px}
.topbar .lobby-back{display:flex;align-items:center;justify-content:center;padding:6px}
.topbar .lobby-back[hidden]{display:none}
.lobby-back svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:700px){.brand-navigation{gap:6px}.wordmark img{width:100px}.topbar .wordmark{gap:10px}.topbar .wordmark small{font-size:8px;letter-spacing:2px}}
