:root{font-family:VCR,monospace;font-synthesis:none;color:#51482f;background:#e7d9b9;--ink:#51482f;--paper:#f9f1dc;--line:#ac956d;--blue:#406f98}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:linear-gradient(#eee4ce8c,#dfcfaa65)}button,input{font:inherit;color:inherit}button{cursor:pointer;border:2px solid var(--line);background:#faf2df;border-radius:3px;padding:10px 15px;font-weight:400;box-shadow:0 3px 0 #8e78502a}button:hover:not(:disabled){background:#fff8e8;border-color:#78613d}button:disabled{cursor:default;opacity:.4}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #a66d32;outline-offset:4px}button:active:not(:disabled){transform:translateY(2px);box-shadow:none}h1,h2,p{margin-top:0}h1{font-size:32px;font-weight:400;margin-bottom:6px}h2{font-size:21px;font-weight:400}strong,b{font-weight:400}.primary{background:#496b48;color:#fff7df;border-color:#3c5c3c}.primary:hover:not(:disabled){background:#385c3e;color:white}.purple{background:#d9c7ed;border-color:#876ba8;color:#5c427a}.gold{background:#f6e5a3;border-color:#b7a05a;color:#705d26}.rose{background:#efc2bc;border-color:#ae756c;color:#713e37}.blue{background:#d4e5ec;border-color:#7f9eaf;color:#3e607e}.green{background:#d5e4c0;border-color:#7b9568;color:#3d5d3e}.earth{background:#eee1c5;border-color:#aa9472;color:#69563b}
.landscape{position:fixed;inset:0;pointer-events:none;z-index:-1;background-color:#e7d9b9;background-image:url("data:image/svg+xml,%3Csvg width='360' height='290' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23b5a276' opacity='.35'%3E%3Cpath d='M12 22h6v3h-6zM94 62h4v4h-4zM43 117h8v3h-8zM135 239h5v3h-5zM294 162h7v3h-7zM233 67h4v3h-4z'/%3E%3C/g%3E%3Cg fill='%235f963f' opacity='.62'%3E%3Cpath d='M43 66h3v-9h3v9h3v-5h3v11H40v-6zM46 54h3v3h-3zM242 219h3v-7h3v7h3v-11h3v11h3v6h-18v-6zM310 96h3v-8h3v8h3v-4h3v10h-15v-6z'/%3E%3C/g%3E%3Cg fill='%237baa52' opacity='.42'%3E%3Cpath d='M32 72h28v3H32zM234 225h28v3h-28zM302 102h27v3h-27z'/%3E%3C/g%3E%3C/svg%3E")}
header{position:relative;z-index:5;min-height:83px;padding:20px 4%;display:flex;justify-content:space-between;align-items:center;gap:20px}.header-left{display:flex;align-items:center;gap:18px;min-width:0}.brand{letter-spacing:1px;font-size:24px;white-space:nowrap;color:#3e5738}.header-controls{display:flex;align-items:center;justify-content:flex-end;gap:8px}.table-screen header{padding:12px 24px;min-height:72px;align-items:flex-start}.game-screen header{padding:8px 16px;min-height:63px}.game-screen .header-left{padding-top:10px}.game-screen .brand{font-size:13px;letter-spacing:.5px}#mode-label{font-size:10px;color:#8a7856;white-space:nowrap}.header-controls>button{flex-shrink:0}.expand-control{display:flex;align-items:center;justify-content:center;gap:0;min-width:47px;height:47px;padding:10px}.expand-control svg{width:23px;height:23px;flex-shrink:0;shape-rendering:crispEdges}.control-label{max-width:0;opacity:0;overflow:hidden;white-space:nowrap;transition:max-width .18s,opacity .18s,margin .18s;font-size:12px}.expand-control:hover .control-label,.expand-control:focus-visible .control-label{max-width:160px;opacity:1;margin-left:10px}.help-icon{font-size:24px;line-height:23px;width:23px}.icon-control{border:0;box-shadow:none;padding:5px;width:34px;height:47px;background:transparent!important;color:#526b59;display:grid;place-items:center}.icon-control svg{width:24px;height:24px}#copy{text-align:left;font-size:12px;min-height:47px;padding:7px 12px;background:#f7eed9}#copy span,#copy small{display:block}#copy small{margin-top:4px;font-size:10px;color:#8a7650}#timer-status{font-size:12px;color:#5c427a;min-width:35px;white-space:nowrap;padding:14px 0}#timer-status.urgent{color:#a4443e}
main{position:relative;max-width:1500px;margin:auto;padding:14px 32px 30px}.welcome{max-width:580px;margin:40px auto;text-align:center}.welcome h1{font-size:49px;line-height:1.1;margin-bottom:12px;color:#4b5839}.welcome .player-count{color:#7b7250;font-size:16px}.entry{max-width:330px;margin:30px auto;display:grid;gap:12px;text-align:left}label{font-size:14px;line-height:1.4}input{display:block;width:100%;margin-top:7px;border:2px solid #b29b73;padding:12px;border-radius:3px;background:#fbf4e4;color:var(--ink)}#code{text-transform:uppercase}.divider{text-align:center;font-size:12px;color:#8a7754;margin:8px}.open-tables{margin:28px auto 0;max-width:580px}.open-tables h2{font-size:18px;margin-bottom:12px}.open-tables p{font-size:12px;color:#887552}.table-list{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}.open-table{padding:18px 23px;min-width:210px;background:#eee4cd}.open-table strong,.open-table small{display:block}.open-table strong{font-size:14px}.open-table small{margin-top:8px;font-size:10px;color:#8b7654}
.table-screen main{padding:0 16px 22px}.players{display:flex;justify-content:flex-start;gap:10px;margin:0 0 9px;align-items:stretch}.player{position:relative;width:183px;flex:0 1 183px;min-width:0;padding:12px 12px 11px;border:2px solid #98a782;border-radius:3px;background:#e8efd6;color:#405b36;box-shadow:0 3px 0 #5962461a;text-align:center}.player.dark{background:#24442e;color:#e8efd6;border-color:#172f20}.player.empty{background:#e7d9bd;color:#887452;border:2px dashed #bca57d;box-shadow:none}.player.active{outline:2px solid #b8a14b;outline-offset:2px}.player.active:after{content:'';position:absolute;left:8px;top:8px;width:5px;height:5px;background:#b19d4c}.player strong{display:flex;align-items:center;justify-content:center;gap:6px;font-size:12px;line-height:1.4;overflow-wrap:anywhere}.player small{display:block;font-size:10px;line-height:1.6;margin-top:5px}.player .host-gem{width:12px;height:14px;flex-shrink:0;color:#b98e2d}.player.dark .host-gem{color:#f0ce6b}.queen-info{display:inline-block;margin-top:2px;padding:1px 3px;border:1px solid transparent;border-radius:2px}.queen-info.caution{background:#fff0b8;border:1px dashed #ba9840;color:#74571e}.queen-info.danger{background:#f2c4bc;border:1px dashed #b77365;color:#8a3832}.lobby{max-width:890px;margin:40px auto 0;text-align:center;padding:32px 24px}.lobby h1{font-size:32px}.lobby>p{font-size:12px;color:#86734e;line-height:1.6}.modes{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:28px 0 24px}.modes button{padding:20px 15px;text-align:left;min-height:123px;background:#f6edda}.modes strong{display:block;font-size:17px;margin-bottom:10px}.modes small{display:block;line-height:1.65;font-size:11px;color:#887453}.modes .chosen{background:#e0e7cc;border-color:#6b8a57;box-shadow:0 0 0 1px #6b8a57 inset}.modes .chosen strong:after{content:' ●';font-size:11px;color:#6b8a57}#second-name{display:block;max-width:300px;margin:0 auto 20px;text-align:left}#lobby-timer{margin:20px 0}#waiting-host{margin-top:20px}
.patch{height:clamp(300px,47vh,490px);position:relative;overflow:hidden;background:transparent;border:0;box-shadow:none;border-radius:0}#board{position:absolute;inset:36px 0 0;touch-action:none;cursor:grab}#board:active{cursor:grabbing}.board-controls{position:absolute;right:8px;top:0;display:flex;gap:8px;align-items:center;z-index:3}.board-controls button{padding:4px 6px;color:var(--blue);border:0;box-shadow:none;background:transparent;border-radius:0;font-size:13px}.board-controls button:hover{color:#245178;background:#c5d9df66;border:0}.board-controls #zoom-in,.board-controls #zoom-out{font-size:29px;line-height:24px;width:28px;padding:0}#first-hint{position:absolute;left:50%;top:calc(50% + 84px);transform:translateX(-50%);font-size:11px;text-align:center;color:#87784f;pointer-events:none;white-space:nowrap}
.hex{position:absolute;width:102px;height:116px;transform:translate(-50%,-50%);padding:0;background:none!important;border:0!important;box-shadow:none!important;filter:drop-shadow(0 4px 0 #5d563943);display:grid;place-items:center;isolation:isolate;cursor:pointer}.hex:before,.hex:after,.hex .inner{content:'';position:absolute;inset:0;clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);z-index:-2;background:#63784e}.hex:after{inset:3%;background:#e8efd6;z-index:-1}.hex .inner{inset:9%;background:var(--bug);z-index:0;pointer-events:none}.hex .inner:after{content:'';position:absolute;inset:3px;background:#e8efd6;clip-path:inherit}.hex.dark:before{background:#102c1d}.hex.dark:after,.hex.dark .inner:after{background:#24442e}.hex img{width:73%;height:73%;object-fit:contain;image-rendering:pixelated;z-index:1;pointer-events:none;filter:drop-shadow(0 2px 0 #0002);margin-top:7%}.hex:hover:not(:disabled),.hex.selected{transform:translate(-50%,-50%)!important;filter:drop-shadow(0 0 3px #f9ec9b) drop-shadow(0 4px 0 #5d563960)}.hex.selected:before{background:#e3a637}.hex.selected:after{inset:5%}.hex.last:before{background:#ac9649}.hex .tile-letter{position:absolute;top:5%;left:50%;transform:translateX(-50%);z-index:2;font-size:calc(var(--size,102px)*.155);line-height:1.25;font-weight:900;text-shadow:.5px 0 currentColor,-.5px 0 currentColor;min-width:23%;text-align:center;padding:0 2%;background:#e8efd6;color:#435e38;border-radius:0 0 3px 3px;pointer-events:none}.hex.dark .tile-letter{background:#24442e;color:#e8efd6}.hex .stack-count{position:absolute;bottom:10%;right:22%;z-index:2;font-size:11px;color:#fff9e3;background:#75684a;padding:2px 4px}.hex .legal-outline{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none;overflow:visible}.hex.target:not([data-hex]){filter:none}.hex.target:not([data-hex]):before,.hex.target:not([data-hex]):after{display:none}.hex.target:not([data-hex]) .legal-outline polygon{fill:#c5d4a626;stroke:#78945c;stroke-width:2.5;stroke-dasharray:6 5;stroke-linejoin:round}.hex.target[data-hex] .legal-outline polygon{fill:none;stroke:#b2ce86;stroke-width:3;stroke-dasharray:6 5}.hex:focus-visible{outline:0;filter:drop-shadow(0 0 5px #b47c24)}
.hand-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:10px 0 11px}.turn{flex:1;min-width:0}.turn h2{font-size:18px;margin:0 0 5px;color:#51653e}.turn p{font-size:11px;line-height:1.5;color:#83704c;margin:0}.actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.actions button{font-size:12px}#undo{background:#dfcef0;border:2px solid #9874b8;color:#674386;box-shadow:0 0 7px 3px #a07bc678,0 3px 0 #7c5d9e33;min-width:117px}#undo-seconds{display:inline-block;min-width:25px;font-size:10px;color:#9470ae}.hand{background:#f6eedb99;border:2px solid #fbf5e7aa;border-radius:10px;padding:12px 20px 12px}.hand-label{display:flex;align-items:baseline;gap:14px}.hand-label h2{font-size:18px;margin:0}.hand-label>span{font-size:10px;letter-spacing:.5px;color:#8d7954}.hand-cards{display:flex;justify-content:center;align-items:flex-end;gap:34px;padding:16px 4px 7px}.reserve-bug{padding:0;min-width:95px;background:transparent!important;border:0!important;box-shadow:none!important;text-align:center}.reserve-bug:hover:not(:disabled){transform:translateY(-3px)}.reserve-bug .mini{position:relative;width:86px;height:98px;margin:0 auto 7px}.mini .hex{--size:86px;width:86px;height:98px;left:50%;top:50%;pointer-events:none}.reserve-bug.selected .mini{filter:drop-shadow(0 0 5px #dba83b)}.reserve-bug .bug-name{font-size:11px;display:block}.reserve-bug .count{font-size:10px;display:block;color:#8e7c56;margin-top:5px}#bug-hint{text-align:center;font-size:10px;line-height:1.5;color:#8b7956;margin:7px 0 0;min-height:15px}
.floating-panel{position:fixed;right:24px;top:78px;z-index:20;width:min(380px,calc(100vw - 32px));max-height:calc(100vh - 100px);overflow:auto;background:#faf3e3;border:3px solid #b49e76;border-radius:6px;padding:14px 16px 6px;box-shadow:0 5px 0 #9e83514d;font-size:12px;line-height:1.55}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}.panel-head h2{font-size:15px;margin:0}.panel-head button{font-size:11px;padding:6px 10px}.floating-panel ol{list-style:none;margin:0;padding:0}.floating-panel li{padding:7px 0;border-top:2px dashed #dfd0ad}.floating-panel li:first-child{border-top:0}.log-seq{display:inline-block;color:#9a835c;width:24px}.floating-panel>p{font-size:11px;color:#8c7651;line-height:1.6}#scores li{display:flex;justify-content:space-between;gap:16px}#scores strong{color:#8a6a28;font-weight:400;white-space:nowrap}.timer-options{display:grid;gap:7px;padding:8px 0 12px}.timer-options button{text-align:left;font-size:12px;padding:9px 12px}.timer-options button.chosen{box-shadow:0 0 5px 2px #b5a17588}.timer-options button:first-child{margin-bottom:10px}dialog{border:3px solid #b09a72;border-radius:6px;max-width:590px;width:calc(100% - 32px);padding:26px;line-height:1.6;color:var(--ink);background:#faf3e2;max-height:85vh;overflow:auto}dialog::backdrop{background:#48452e88}dialog h2{font-size:23px}dialog p,dialog li{font-size:12px}dialog li{padding:5px 0}.close{float:right;padding:3px 10px;font-size:22px}#bug-guide>div{display:flex;align-items:center;gap:15px;font-size:12px;margin:10px 0}#bug-guide img{width:54px;height:54px;object-fit:contain;image-rendering:pixelated}#bug-guide strong{display:block;color:#527047}dialog a{font-size:12px;color:#526f43}#notice{position:fixed;bottom:14px;left:50%;transform:translateX(-50%);background:#4d6241;color:#fff6dd;padding:12px 20px;border:2px solid #f9f1df;border-radius:3px;font-size:12px;max-width:90%;z-index:50;line-height:1.5}#notice:empty{display:none}[hidden]{display:none!important}
@media(max-width:1050px){.table-screen header{flex-wrap:wrap;gap:8px}.header-left{padding-top:0!important}.header-controls{margin-left:auto}.game-screen .header-left{min-width:100%;gap:14px}.game-screen header{min-height:88px}.floating-panel{top:110px}.patch{height:clamp(300px,43vh,450px)}}@media(max-width:650px){header{padding:12px;gap:8px}.brand{font-size:20px}.header-controls{gap:6px}.welcome{margin:20px auto}.welcome h1{font-size:38px}.welcome .player-count{font-size:14px}main{padding:12px}.entry{max-width:330px}.table-screen header{padding:10px 12px}.table-screen main{padding:0 12px 20px}.table-screen .brand{font-size:17px}.game-screen .brand{font-size:13px}.expand-control{min-width:39px;height:40px;padding:8px}.expand-control svg{width:21px;height:21px}.header-controls{gap:5px;flex-wrap:wrap}.control-label{font-size:10px}.icon-control{height:40px;width:28px}#copy{font-size:10px;min-height:40px;padding:5px 7px}#copy small{font-size:9px}.player{width:160px;flex-basis:160px;padding:11px 8px}.player strong{font-size:11px}.player small{font-size:9px}.players{gap:8px}.lobby{margin-top:20px;padding:22px 0}.lobby h1{font-size:26px}.modes{grid-template-columns:1fr;margin:22px auto;max-width:330px;gap:8px}.modes button{min-height:0;padding:15px}.modes strong{font-size:15px;margin-bottom:7px}.modes small{font-size:10px}.patch{height:clamp(290px,40vh,390px)}#first-hint{font-size:9px}.hand-heading{margin:10px 0;gap:8px}.turn h2{font-size:16px}.turn p{font-size:10px}.actions button{font-size:10px;padding:8px}.hand{padding:12px 8px}.hand-label{gap:10px}.hand-label h2{font-size:16px}.hand-label>span{font-size:8px}.hand-cards{gap:0;justify-content:space-around;padding-top:16px}.reserve-bug{min-width:0;flex:1}.reserve-bug .mini{width:60px;height:69px}.mini .hex{--size:60px;width:60px;height:69px}.reserve-bug .bug-name{font-size:9px}.reserve-bug .count{font-size:8px}#bug-hint{font-size:9px}#undo{min-width:92px}.floating-panel{right:12px;top:110px;max-height:calc(100vh - 125px)}.board-controls{right:0}.board-controls button{font-size:11px}#timer-status{font-size:10px;padding:10px 0;min-width:25px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.host-gem{display:inline-block;width:12px;height:14px;flex:0 0 12px;vertical-align:middle;color:#b98e2d;margin-right:3px;shape-rendering:crispEdges}#scores li>span{display:flex;align-items:center;gap:5px;overflow-wrap:anywhere}.game-screen .patch{height:clamp(240px,calc(100dvh - 430px),490px)}
@media(max-width:1050px){.game-screen .patch{height:clamp(230px,calc(100dvh - 455px),450px)}}
@media(max-width:650px){.game-screen .patch{height:clamp(250px,calc(100dvh - 400px),420px)}}
@media(min-width:1051px){.game-screen .patch{height:clamp(220px,calc(100dvh - 470px),490px)}}
@media(max-width:650px){.expand-control{padding:7px}.header-controls{gap:4px}}
@media(max-width:650px){.expand-control{min-width:37px;height:38px;padding:6px}.help-icon{width:21px;line-height:21px}.icon-control{width:24px;height:38px}.header-controls{gap:3px}#copy{font-size:9px;min-height:38px}#copy small{font-size:8px}.game-screen .patch{height:clamp(230px,calc(100dvh - 470px),390px)}}
/* Third playtest: shared header controls and expansion setup. */
#code{text-transform:none}.name-input-row{display:flex;gap:8px;align-items:stretch;margin-top:-5px}.name-input-row input{margin:0;min-width:0;flex:1}.name-input-row input:disabled{opacity:1;background:#eee6d2;color:#716849}#clear-name{width:47px;flex:0 0 47px;padding:0;background:#efc2bc;border-color:#ae756c;color:#713e37;font-size:23px;line-height:1}#clear-name:hover:not(:disabled){background:#f5d4cf;border-color:#925c54}
#header{display:grid;grid-template-columns:minmax(0,max-content) minmax(0,1fr);align-items:start;gap:16px}.header-left,.game-screen .header-left{display:flex;flex-direction:column;align-items:flex-start;min-width:0;gap:5px;padding-top:2px!important}#mode-label{font-size:10px;line-height:1.2}.header-controls{min-width:0;width:100%;flex-wrap:nowrap!important;justify-content:flex-end;align-items:flex-start;margin:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;padding-bottom:3px}.header-controls::-webkit-scrollbar{display:none}.game-screen .header-left{min-width:0}.game-screen #header{min-height:64px}.header-controls>*{flex-shrink:0}
.purple{--control-bg:#d9c7ed;--control-border:#876ba8;--control-ink:#5c427a}.rose{--control-bg:#efc2bc;--control-border:#ae756c;--control-ink:#713e37}.gold{--control-bg:#f6e5a3;--control-border:#b7a05a;--control-ink:#705d26}.blue{--control-bg:#d4e5ec;--control-border:#7f9eaf;--control-ink:#3e607e}.earth{--control-bg:#eee1c5;--control-border:#aa9472;--control-ink:#69563b}
#header .expand-control:hover:not(:disabled),#header .expand-control[aria-expanded="true"]{background:var(--control-bg);border-color:var(--control-border);color:var(--control-ink)}#undo-toggle{--control-bg:#dfcef0;--control-border:#9874b8;--control-ink:#674386;background:var(--control-bg);border-color:var(--control-border);color:var(--control-ink)}
.passive-indicator,#timer-status{position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1px;width:32px;min-width:32px;height:47px;padding:0;border:0;background:none;box-shadow:none;color:#526b59}.passive-indicator svg{display:block;width:23px;height:23px;shape-rendering:crispEdges}#timer-status small{font-size:8px;line-height:1.1;white-space:nowrap}.passive-indicator.crossed{color:#806d99}.passive-indicator .cross-mark{position:absolute;top:10px;left:4px}.bot-icon{width:17px;height:17px;flex:0 0 17px;color:#6b70a2;shape-rendering:crispEdges}.player.dark .bot-icon{color:#c0b5e2}
.lobby{max-width:1010px;margin-top:23px}.lobby-options{padding:22px;background:#faf3e2aa;border:2px solid #fdf8ecaa;border-radius:8px;margin:24px auto 22px;text-align:left}.lobby-options h2{font-size:16px;margin:0 0 13px}.lobby-options .modes{margin:0 0 20px}.modes strong{display:flex;align-items:center;gap:8px}.mode-icon{display:inline-flex;align-items:center;flex:0 0 21px}.mode-icon svg{width:21px;height:21px;shape-rendering:crispEdges}.modes .chosen strong:after{display:none}.rules-options{border-top:2px dashed #c6b38b;padding-top:20px}#rules-picker{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}#rules-picker>button{padding:14px 12px;text-align:left;min-width:0;background:#f6edda}#rules-picker strong{display:block;font-size:15px;margin-bottom:9px}#rules-picker small{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:10px;line-height:1.5;min-height:54px;color:#8a7653}#rules-picker .chosen{background:#e0e7cc;border-color:#6b8a57;box-shadow:0 0 0 1px #6b8a57 inset}.rules-note{font-size:10px;line-height:1.5;color:#8a7653;margin:13px 0 0}.expansion-tile{position:relative;display:inline-block;flex:0 0 45px;width:45px;height:52px}.expansion-tile .hex{width:45px;height:52px;left:50%;top:50%;--size:45px;filter:none;pointer-events:none}.hex.neutral:before{background:#728064}.hex.neutral:after{background:#b1c19a}.hex.neutral img{margin:0;width:76%;height:76%}.hex.neutral .species-outline path{d:path('M51 12 92 35v46l-41 23-41-23V35z')}.lobby-actions{display:flex;justify-content:center;gap:10px;align-items:stretch}.lobby-actions button{display:flex;align-items:center;justify-content:center;min-height:44px;padding:12px 22px;font-size:14px;line-height:1.25}.undo-options{display:grid;gap:8px;padding:8px 0 12px}.undo-options button{text-align:left;font-size:12px}.undo-options .chosen{border-width:2px;box-shadow:0 0 6px 3px #aa997680}.undo-options .green.chosen{box-shadow:0 0 6px 3px #69b87580}.undo-options .rose.chosen{box-shadow:0 0 6px 3px #d56a5b80}
.player{padding-top:17px}.player.active{outline:0;border-color:#75976c;box-shadow:0 0 3px 1px #75976c44}.player.active:after{content:'PLAYING';top:-1px;left:50%;right:auto;width:auto;height:auto;transform:translate(-50%,-50%);padding:3px 8px;background:#c6e7bd;border:2px solid #75976c;border-radius:3px;color:#304e3b;font-size:12px;line-height:1.25;white-space:nowrap}.players{padding-top:7px}.queen-info{display:inline-flex;align-items:center;flex-direction:column;gap:2px;line-height:1.3}.queen-hexes{display:flex;gap:3px;align-items:center;justify-content:center}.surround-hex{display:block;width:10px;height:12px;overflow:visible}.surround-hex polygon{fill:none;stroke:currentColor;stroke-width:1;stroke-dasharray:2 2}.surround-hex.filled polygon{fill:var(--opponent);stroke:var(--opponent);stroke-dasharray:none}.queen-info.caution .queen-hexes{filter:drop-shadow(0 0 2px #d1a030)}.queen-info.danger .queen-hexes{filter:drop-shadow(0 0 2px #b94d3d)}
.hex .species-outline{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none}.species-outline path{fill:none;stroke:var(--bug);stroke-width:3;stroke-linejoin:miter}.hex .tile-letter,.hex.dark .tile-letter{top:11%;min-width:0;width:22%;padding:0;font-size:calc(var(--size,102px)*.15);line-height:1;background:transparent;border-radius:0}.hex img{margin-top:12%;width:70%;height:70%}.hex .inner{display:none}.hand-cards{flex-wrap:wrap;gap:14px 23px}.reserve-bug{flex:0 1 95px}.hand:has([data-bug="M"],[data-bug="L"],[data-bug="P"]) .hand-cards{gap:12px 14px}.hand:has([data-bug="M"],[data-bug="L"],[data-bug="P"]) .reserve-bug{flex:1 1 75px;max-width:105px}
#ability-controls{display:flex;align-items:center;gap:12px;margin:8px 0 12px}#carry-toggle{font-size:11px;padding:8px 12px}#carry-hint{font-size:10px;color:#7e6a47;margin:0;line-height:1.5}
/* Open tables are quiet rectangles framed by the landscape's grass tufts. */
.open-patch{width:280px;max-width:100%;position:relative}
.open-table{display:flex;align-items:center;justify-content:center;flex-direction:column;position:relative;min-width:0;min-height:160px;padding:35px 24px;background:transparent;text-decoration:none;color:#5e4d2d;border:0;border-radius:0;box-shadow:none;clip-path:none;transition:background-color .12s}
.open-table:before,.open-table:after{display:none}
.patch-grass{position:absolute;inset:0;pointer-events:none;background:url('flower.webp') center/100% 100% no-repeat;image-rendering:pixelated}
.open-table:hover{background:#eee4ce55;filter:none}
.open-table strong{font-size:14px;z-index:1}
.open-table small{font-size:10px;z-index:1;color:#816b40}
.patch-join{font-size:10px;margin-top:12px;color:#526d3e;z-index:1}
.open-table:focus-visible{outline:2px dashed #8b9861;outline-offset:4px}
@media(max-width:1050px){#header,.table-screen #header{display:grid;grid-template-columns:minmax(0,max-content) minmax(0,1fr);flex-wrap:nowrap;gap:10px}.game-screen .header-left{min-width:0}.game-screen #header{min-height:64px}.game-screen .patch{height:clamp(220px,calc(100dvh - 470px),490px)}}
@media(max-width:750px){#rules-picker{grid-template-columns:repeat(2,minmax(0,1fr))}.lobby-options{padding:18px 12px}.lobby-options .modes{grid-template-columns:1fr;max-width:none}.modes button{min-height:0}.hand:has([data-bug="M"],[data-bug="L"],[data-bug="P"]) .hand-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 4px}.hand:has([data-bug="M"],[data-bug="L"],[data-bug="P"]) .reserve-bug{width:100%;max-width:none}.game-screen .patch{height:clamp(220px,calc(100dvh - 535px),390px)}}
@media(max-width:650px){#header,.table-screen #header{gap:8px;grid-template-columns:130px minmax(0,1fr);padding:10px 12px}.table-screen .brand,.game-screen .brand{font-size:13px;white-space:normal;line-height:1.25}.entrance-screen #header{grid-template-columns:minmax(0,max-content) minmax(0,1fr)}.entrance-screen .brand{font-size:20px}.header-controls{width:100%;justify-content:safe flex-end}.passive-indicator,#timer-status{height:38px;width:27px;min-width:27px}.passive-indicator svg{width:21px;height:21px}.passive-indicator .cross-mark{top:7px;left:3px}#mode-label{font-size:9px}.player{padding-top:17px}.player strong{font-size:10px}.surround-hex{width:9px;height:11px}.queen-hexes{gap:2px}.reserve-bug{flex:1 1 50px;min-width:0}.hand-cards{gap:12px 2px}.expansion-tile{flex-basis:40px;width:40px;height:47px}.expansion-tile .hex{width:40px;height:47px}#rules-picker strong{font-size:13px}#rules-picker small{font-size:9px}.lobby-actions button{padding:10px 15px;font-size:12px}.floating-panel{top:76px}.lobby{padding-top:15px}}
.hex img{position:absolute;left:15%;top:23%;width:70%;height:68%;margin:0;z-index:2}.hex .tile-letter{z-index:4}.hex.neutral img{left:12%;top:12%;width:76%;height:76%;margin:0}
#board .bug-art{position:absolute;left:15%;top:23%;width:70%;height:68%;background-position:center;background-size:contain;background-repeat:no-repeat;image-rendering:pixelated;z-index:2;pointer-events:none}
/* Countable reserve stacks and species-coloured turn actions. */
.reserve-bug .mini{--tile-width:86px;--stack-step:12px;--stack-offset:calc(var(--stack-depth,0)*var(--stack-step));width:calc(var(--tile-width) + var(--stack-offset));isolation:isolate}
.mini .hex{width:var(--tile-width);left:calc(50% + var(--stack-offset)/2);--size:var(--tile-width)}
.mini .reserve-back{left:calc(50% + var(--stack-offset)/2 - var(--depth)*var(--stack-step));z-index:0;filter:none}
.mini .reserve-top{z-index:1}
.hand-heading .actions{justify-content:flex-end;flex:0 1 auto}
#ability-controls{margin:0;display:contents}
#carry-toggle{background:var(--action-colour);border-color:color-mix(in srgb,var(--action-colour),#263322 30%);color:#17231c;padding:10px 14px;font-size:12px;box-shadow:0 3px 0 color-mix(in srgb,var(--action-colour),transparent 65%)}
#carry-toggle:hover:not(:disabled){background:var(--action-colour);border-color:#52604a;filter:brightness(1.08)}
@media(max-width:650px){.reserve-bug .mini{--tile-width:60px;--stack-step:6px}#carry-toggle{font-size:10px;padding:8px}}
.turn #carry-hint{font-size:10px;line-height:1.5;margin:4px 0 0;color:#7e6a47}
@media(max-width:650px){.reserve-bug .mini{--tile-width:54px;--stack-step:8px;height:62px}.mini .hex{height:62px}}
.mode-icon{flex-basis:24px}.mode-icon svg{width:24px;height:24px;shape-rendering:crispEdges}

/* Keep status icons roomy while the controls scroll as one row, as in Birdcard. */
#header .header-controls{gap:8px;justify-content:safe flex-end;padding:2px 2px 6px;scroll-padding-inline:8px}
.header-indicators{display:flex;align-items:center;gap:8px;flex:0 0 auto;padding:0 8px 0 4px;margin-right:4px}
#header .header-indicators .icon-control{width:34px;min-width:34px;flex:0 0 34px;padding:5px}
#header .header-indicators .passive-indicator{width:32px;min-width:32px;flex:0 0 32px}

/* The dashed name highlight identifies your colony without adding name text. */
.player .own-name{outline:1px dashed #9abb91;outline-offset:0;border-radius:2px;padding:2px 4px;background:#e8f5e4}
.player.dark .own-name{background:#31543a;outline-color:#b3cba7}
.player{width:240px;flex:0 1 240px;padding:14px 10px 8px}
.player strong{min-height:23px}
.player small{margin-top:2px;line-height:1.5}
.queen-info{flex-direction:row;align-items:center;justify-content:center;gap:8px;white-space:nowrap;line-height:1.5}
.queen-hexes{flex:0 0 auto}

/* Clip the yellow glow to the tile interior, preserving its outside border. */
.hex:hover:not(:disabled),.hex.selected,.hex:focus-visible{filter:drop-shadow(0 4px 0 #5d563943)}
.tile-glow{position:absolute;inset:3.5%;width:93%;height:93%;z-index:3;pointer-events:none;clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);opacity:0;transition:opacity .12s}
.tile-glow polygon{fill:none;stroke:#ffe582;stroke-width:10;filter:blur(3px)}
.hex:hover:not(:disabled)>.tile-glow,.hex.selected>.tile-glow,.hex:focus-visible>.tile-glow,.reserve-bug:hover:not(:disabled) .reserve-top>.tile-glow,.reserve-bug:focus-visible .reserve-top>.tile-glow{opacity:1}

/* One continuous board beneath the floating player and reserve panels. */
.game-screen #table{position:relative}
.game-screen #players{position:absolute;top:0;left:0;right:0;z-index:4;margin:0;padding-top:9px;pointer-events:none}
.game-screen #players .player{pointer-events:auto}
.game-screen #game{position:relative;display:grid;grid-template-rows:minmax(350px,1fr) auto auto;min-height:max(620px,calc(100dvh - var(--table-top,80px) - 22px));isolation:isolate}
.game-screen #patch{position:absolute;inset:0;height:auto;z-index:0}
.game-screen #board{inset:0}
.game-screen .hand-heading{grid-row:2;position:relative;z-index:2;margin:12px 0}
.game-screen #reserve{grid-row:3;position:relative;z-index:2}
.game-screen .board-controls{right:0;top:5px}
@media(max-width:750px){
  .game-screen #game{grid-template-rows:minmax(390px,1fr) auto auto}
  .game-screen .board-controls{top:calc(var(--players-height,90px) + 14px)}
  #header .header-controls{scrollbar-width:thin;scrollbar-color:#a28d62 transparent}
}
@media(max-width:650px){
  .player{width:calc((100% - 8px)/2);flex:0 1 240px;padding:14px 7px 7px}
  .player strong{font-size:10px;min-height:22px;gap:4px}
  .player small{font-size:9px}
  .queen-info{gap:5px;font-size:9px}
  .queen-hexes{gap:2px}
  .surround-hex{width:8px;height:10px}
  .game-screen .hand-heading{flex-wrap:wrap}
  .hand-heading .actions{margin-left:auto}
}
@media(max-width:370px){
  .queen-info{font-size:8px;gap:4px}
  .queen-hexes{gap:1px}
  .surround-hex{width:7px;height:9px}
}

/* Inspection stays available while waiting, without enabling an illegal move. */
*,*::before,*::after{-webkit-user-select:none;user-select:none}
.reserve-bug[aria-disabled="true"]{opacity:.4;cursor:default}
.reserve-bug[aria-disabled="true"]:hover{transform:none}
.hover-instructions{font-size:12px;margin:4px 0 18px}
.hover-instructions.chosen{background:#d5e4c0;border-color:#6b8a57;color:#304e3b;box-shadow:inset 0 0 0 1px #6b8a57}
.hand-heading{display:grid;grid-template-columns:minmax(210px,370px) minmax(0,1fr) max-content;grid-template-rows:116px;align-items:end;justify-content:normal}
.game-screen .hand-heading{margin-bottom:6px}
.hand-heading>.turn{grid-column:1;grid-row:1;min-width:0}
.hand-heading .actions{grid-column:3;grid-row:1;margin-left:0;justify-self:end}
.turn-previews{grid-column:2;grid-row:1;display:flex;align-items:center;gap:10px;max-width:100%;width:fit-content;justify-self:start}
.turn-previews:has(>[hidden]):not(:has(>:not([hidden]))){display:none}
.turn-preview{width:max-content;max-width:100%;padding:10px 12px;border:2px solid #c6b38b;border-radius:4px;background:#f8f0dd;box-shadow:0 3px 0 #8e785020}
.guide-entry{display:flex;align-items:center;gap:12px;font-size:12px;line-height:1.5}
.guide-entry img{width:54px;height:54px;flex:0 0 54px;object-fit:contain;image-rendering:pixelated}
.guide-entry strong{display:block;color:#527047;margin-bottom:3px}
.hover-rule .guide-entry{font-size:11px;gap:10px}
.hover-rule .guide-entry>span{max-width:28ch}
.hover-rule .guide-entry img{width:44px;height:44px;flex-basis:44px}
.stack-preview{display:flex;align-items:center;gap:12px}
.stack-preview>strong{font-size:12px;font-weight:400;color:#527047}
.stack-tiles{display:flex;align-items:center;list-style:none;padding:0;margin:0;max-width:100%;overflow-x:auto;overflow-y:hidden}
.stack-piece{position:relative;flex:0 0 58px;width:58px;height:66px}
.stack-piece+.stack-piece{margin-left:-14.5px}
.stack-piece .hex{width:58px;height:66px;--size:58px;left:50%;top:50%;cursor:default;filter:none}
.stack-piece .hex:hover{filter:none}
/* Reserve an inspection row on narrow screens, even when no panel is open. */
@media(max-width:1100px){
  .hand-heading{grid-template-columns:minmax(0,1fr) max-content;grid-template-rows:116px 80px;row-gap:8px}
  .hand-heading>.turn,.hand-heading .actions{grid-row:2}
  .hand-heading .actions{grid-column:2;max-width:min(200px,50vw);flex-wrap:wrap}
  .turn-previews{grid-column:1/-1;grid-row:1}
}
@media(max-width:650px){
  .turn-preview{padding:8px 10px}
  .hover-rule .guide-entry>span{max-width:26ch}
}

/* Stack the header only when its collapsed controls no longer fit beside the title. */
.table-screen #header.compact-header{grid-template-columns:minmax(0,1fr);row-gap:8px}
.table-screen #header.compact-header .header-left{grid-column:1;flex-direction:row;align-items:baseline;gap:12px;min-width:0}
.table-screen #header.compact-header .brand{white-space:nowrap}
.table-screen #header.compact-header #mode-label{flex:0 0 auto}
.table-screen #header.compact-header .header-controls{grid-column:1;width:100%;max-width:100%;justify-content:safe flex-end}
.table-screen .floating-panel{top:calc(var(--header-height,100px) + 12px);max-height:calc(100dvh - var(--header-height,100px) - 24px)}

/* Keep header controls at one size; change rows instead of shrinking them. */
#header .expand-control{min-width:47px;height:47px;padding:10px}
#header .expand-control svg{width:23px;height:23px}
#header .control-label{font-size:12px}
#header .help-icon{font-size:24px;line-height:23px;width:23px}
#header .icon-control{width:34px;height:47px;padding:5px}
#header .icon-control svg{width:24px;height:24px}
#header #copy{font-size:12px;min-height:47px;padding:7px 12px;white-space:nowrap}
#header #copy small{font-size:10px}
#header .passive-indicator{width:32px;min-width:32px;height:47px}
#header .passive-indicator svg{width:23px;height:23px}
#header .passive-indicator .cross-mark{top:10px;left:4px}

/* Honeycourt local edition, generated creature tiles */
[data-mode="online"],#copy,#timer-toggle,.open-tables{display:none!important}.hex img,#board .bug-art,.guide-entry img{image-rendering:auto;border-radius:50%;object-fit:cover;background-size:cover}#board .bug-art{border-radius:50%}.brand{font-family:Georgia,serif!important;font-size:24px!important;letter-spacing:-.5px}.welcome h1{font-family:Georgia,serif!important;font-size:clamp(32px,5vw,62px)!important;letter-spacing:-1px!important;line-height:1.12!important}.welcome .player-count{font-size:12px}#rules a{color:#416c51}#rules p{line-height:1.6}.modes{grid-template-columns:repeat(2,minmax(0,1fr))!important}#board .bug-art{box-shadow:0 1px 4px #0004}@media(max-width:600px){.brand{font-size:19px!important}.modes{grid-template-columns:1fr!important}}
