:root{--ink:#243c32;--paper:#f7f4e9;--line:#d1d7c3;--muted:#73806b;--green:#2c4c3b;--gold:#b39951;--pc:#c17840}*{box-sizing:border-box}html,body{height:100%;margin:0;overflow:hidden}body{font:14px/1.4 system-ui,-apple-system,sans-serif;color:var(--ink);background:#86b9b9}button,input,select{font:inherit;color:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.38;cursor:default}button:focus-visible{outline:3px solid #a17c2b;outline-offset:3px}[hidden]{display:none!important}#game{position:fixed;inset:0;overflow:hidden}#world{position:absolute;inset:0;width:100%;height:100%;touch-action:none;user-select:none}.map-vignette{pointer-events:none;position:absolute;inset:0;box-shadow:inset 0 0 110px #30523d30}.hex{cursor:pointer}.hex polygon{transition:stroke-width .1s}.hex:hover polygon{stroke:#fff7c4;stroke-width:3}.hex.selected polygon{stroke:#fff0a5;stroke-width:4}.hex.reachable polygon{stroke:#fff6b5;stroke-width:3}.hex text{pointer-events:none;user-select:none}.hud{position:absolute;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));display:flex;gap:8px;align-items:center;max-width:660px;margin:auto}.iconbutton{display:grid;place-items:center;min-width:44px;min-height:44px;border:1px solid #b9c6aa;background:#f7f4e9f5;border-radius:12px;box-shadow:0 3px 12px #234b3a17;font-size:19px}.playerpill{display:flex;align-items:center;gap:9px;flex:1;min-height:44px;background:#f7f4e9f5;border:1px solid #b9c6aa;border-radius:12px;padding:9px 13px;text-align:left}.playerpill i{width:10px;height:17px;border-radius:3px;background:var(--pc)}.playerpill span{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.playerpill small{margin-left:auto;font-size:10px;white-space:nowrap;color:var(--muted)}.stock{position:absolute;top:68px;left:50%;transform:translateX(-50%);display:flex;gap:6px;background:#f7f4e9ed;border:1px solid #b9c6aa;border-radius:11px;padding:7px 12px;box-shadow:0 2px 10px #234b3a17}.stock button{border:0;background:transparent;font-size:11px;padding:3px 7px;min-height:28px;white-space:nowrap}.stock strong{font-size:15px;margin-right:3px}.stock .more{border-left:1px solid var(--line);font-size:15px}.maptools{position:absolute;right:14px;top:45%;display:grid;gap:7px}.maptools .iconbutton{width:38px;min-width:38px;height:38px;min-height:38px;font-size:17px;background:#f7f4e9df}.dock{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));left:12px;right:12px;max-width:660px;margin:auto;background:#f8f5eaf5;border:1px solid #c1cbb0;border-radius:17px;padding:14px 16px;box-shadow:0 8px 30px #173e3b35;backdrop-filter:blur(9px)}.dock-top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:9px}.eyebrow{font-size:9px;font-weight:700;letter-spacing:1.5px;color:var(--muted)}.dock h2{font:23px/1.1 Georgia,serif;margin:3px 0}.dock p{font-size:11px;margin:6px 0 11px;color:var(--muted)}.dock .context{margin:0 0 10px;font-size:11px;color:var(--muted)}.actions{display:flex;gap:7px;flex-wrap:wrap}.actions button,.button{border:1px solid #c5cfb3;background:#eeefdf;border-radius:9px;padding:10px 12px;min-height:44px;text-decoration:none;display:inline-block;font-size:12px}.actions .primary,.primary{background:var(--green)!important;color:#fff;border-color:var(--green)!important}.actions .secondary{margin-left:auto}.linkbutton{background:transparent;border:0;padding:7px;min-height:36px;font-size:11px;text-decoration:underline;text-underline-offset:3px}.smallhelp{width:28px;height:28px;min-height:28px;border-radius:50%;border:1px solid var(--line);background:#edf0df;font-size:13px}.queuebadge{background:#e0e7cc;padding:4px 7px;border-radius:5px;font-size:9px}.choicegrid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.choicegrid button{border:1px solid #c4cdb4;border-radius:10px;min-height:60px;background:#edefdf;padding:8px;font-size:12px}.choicegrid strong{display:block;font:23px Georgia}.shopgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.shopgrid button{position:relative;border:1px solid #c6ceb7;background:#f0f0e1;border-radius:9px;padding:9px 5px;min-height:78px;font-size:12px}.shopgrid b{font-size:21px;display:block;margin-bottom:2px}.price{display:block;font-size:10px;color:var(--muted);margin-top:4px}.shopgrid .help{position:absolute;top:3px;right:5px;font-size:11px}.warning{font-size:10px;background:#eee6cd;color:#7a6948;padding:6px 9px;border-radius:6px;margin:8px 0}.hand{position:absolute;left:12px;right:12px;bottom:var(--hand-bottom,165px);max-width:660px;margin:auto;display:flex;gap:7px;pointer-events:none;overflow:auto;padding:3px 0}.hand button{pointer-events:auto;border:1px solid #b4c29e;border-radius:9px;background:#fbf4dc;padding:7px 10px;font-size:10px;white-space:nowrap;min-height:38px;box-shadow:0 2px 8px #254b3420}.hand button span{font-size:15px;margin-right:4px}.last-event{position:absolute;left:12px;top:118px;background:#f7f4e9d9;border:1px solid #c1cbb0;border-radius:9px;padding:8px 11px;max-width:235px;text-align:left;font-size:10px;box-shadow:0 2px 8px #234b3a10}.last-event b{display:block;font-size:11px}.last-event small{font-size:9px;color:var(--muted)}.toast{position:absolute;left:50%;top:38%;transform:translateX(-50%);z-index:20;background:#223c32f5;color:#fff;padding:14px 20px;border-radius:10px;max-width:90%;font-size:12px;box-shadow:0 3px 20px #173e3b35}.guide{position:absolute;left:12px;right:12px;top:115px;max-width:530px;margin:auto;background:#f7e8b9f5;border:1px solid #b6a565;border-radius:11px;padding:11px 14px;font-size:12px;z-index:2}.guide strong{display:block}.guide button{float:right;border:0;background:transparent;text-decoration:underline;font-size:10px}.guide-active .last-event{display:none}dialog{width:min(590px,calc(100% - 24px));max-height:85dvh;overflow:auto;border:1px solid #b9c6a9;border-radius:18px;padding:22px;background:var(--paper);color:var(--ink);box-shadow:0 15px 90px #12382b55}dialog::backdrop{background:#173a3290;backdrop-filter:blur(3px)}dialog h2{font:30px Georgia;margin:8px 0 16px}dialog h3{font:19px Georgia;margin:20px 0 10px}dialog p,dialog li{font-size:12px;line-height:1.6;color:#5a6e5c}.modalhead{display:flex;justify-content:space-between;align-items:center;gap:10px}.modalhead button{min-width:40px;min-height:40px;border:1px solid var(--line);border-radius:10px;background:transparent;font-size:18px}.modalgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.modalgrid button{min-height:65px;padding:13px;border:1px solid var(--line);border-radius:10px;background:#ecefdf;text-align:left;font-size:12px}.modalgrid button strong{display:block;margin:3px 0}.rulesrow{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.rulesrow>span{font-size:25px;min-width:35px}.rulesrow b{font-size:13px}.rulesrow p{margin:4px 0 0;font-size:11px}.tag{display:inline-block;font-size:9px;letter-spacing:.5px;padding:4px 7px;border:1px solid #c4cbb5;border-radius:5px;background:#e9eddb}.event{display:flex;gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}.eventicon{font-size:23px;width:32px;flex-shrink:0}.event b{font-size:12px}.event small{font-size:9px;color:var(--muted)}.event p{font-size:11px;margin:4px 0 0}.dice{display:flex;gap:4px;flex-wrap:wrap}.die{display:inline-grid;place-items:center;border-radius:4px;border:1px solid var(--line);background:#fff;width:22px;height:22px;font-size:12px}.die.hit{background:#dce6c1;border-color:#93aa70}.card-reveal{text-align:center}.cardface{border:1px solid #c6b37e;border-radius:14px;padding:20px 22px;background:linear-gradient(145deg,#fbf3d8,#e3dfbd);margin:18px auto;max-width:300px;box-shadow:0 8px 0 #ccd0af}.cardface>.art{font-size:56px;height:100px;display:grid;place-items:center;border:1px dashed #b8b78e;border-radius:8px;background:#edf0d0}.cardface h2{font-size:26px;margin:16px 0 9px}.cardface p{font-size:13px}.cardface small{font-size:9px;color:#867a55}.cardresult{font-size:13px;font-weight:700;margin:14px 0}.unitlist{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.unitlist button{min-height:40px;border:1px solid var(--line);background:#eeefdf;border-radius:8px;padding:8px;font-size:11px}.unitlist button.active{border-color:var(--green);background:#dce7ca}.progress{height:5px;border-radius:5px;background:#d8dfc9;overflow:hidden;margin:7px 0}.progress i{display:block;height:100%;background:#6f8e53}label{display:block;font-size:11px;margin:12px 0}input,select{display:block;width:100%;padding:11px;border:1px solid var(--line);border-radius:8px;background:#fffef4;margin-top:5px}input[type=checkbox]{display:inline;width:auto}.settingsgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.settingsgrid input{padding:8px}.costgrid{display:grid;grid-template-columns:1.5fr repeat(3,1fr);gap:6px;align-items:center;font-size:10px}.costgrid input{padding:7px;margin:0}.testtable{width:100%;border-collapse:collapse;font-size:12px}.testtable td,.testtable th{border-bottom:1px solid var(--line);text-align:left;padding:9px}.quiet{font-size:10px!important;color:var(--muted)!important}.menuactions{display:grid;gap:8px}.menuactions>button,.menuactions>label{display:block;width:100%;min-height:46px;border:1px solid var(--line);border-radius:10px;text-align:left;padding:11px 13px;background:#edf0e0;font-size:12px;margin:0}.victorytitle{font:33px Georgia;text-align:center}.victoryicon{font-size:64px;text-align:center}.dock.folded{padding:9px 15px}.dock.folded .actions,.dock.folded .context,.dock.folded .choicegrid,.dock.folded .shopgrid,.dock.folded p,.dock.folded .unitlist,.dock.folded .warning{display:none}.dock.folded .dock-top{margin:0}.maplabel{font-size:8px;fill:#344f3e}.no-click{pointer-events:none}.targetpulse{animation:pulse 1.3s ease-in-out infinite}@keyframes pulse{50%{stroke-width:6;stroke-opacity:.65}}
@media(min-width:800px){.hud{max-width:660px;left:20px;right:20px}.dock{bottom:18px}.last-event{left:20px;top:125px}.maptools{right:22px}.hand{bottom:var(--hand-bottom,165px)}}@media(max-width:480px){.dock{padding:11px 12px;bottom:max(8px,env(safe-area-inset-bottom));left:8px;right:8px;border-radius:14px}.dock h2{font-size:21px}.dock .actions button{font-size:11px;padding:9px 11px;min-height:44px}.stock{top:64px;padding:4px 8px}.stock button{font-size:10px;padding:3px 5px}.stock strong{font-size:14px}.hud{top:max(8px,env(safe-area-inset-top));left:8px;right:8px;gap:6px}.playerpill{padding:8px 10px;font-size:12px}.playerpill small{font-size:9px}.playerpill span{max-width:148px}.iconbutton{min-width:42px;min-height:44px}.last-event{top:107px;left:8px;max-width:200px;padding:7px 9px}.last-event small{display:none}.maptools{right:8px;top:34%}.shopgrid{gap:5px}.shopgrid button{font-size:11px;min-height:72px;padding:8px 3px}.price{font-size:9px}.hand{left:8px;right:8px}.hand button{font-size:9px;padding:6px 9px}.guide{top:107px;left:8px;right:8px;font-size:11px;padding:9px 12px}.choicegrid button{min-height:58px}.settingsgrid{grid-template-columns:repeat(2,1fr)}dialog{padding:18px}.modalgrid{gap:8px}.dock .secondary{margin-left:0}.toast{top:31%}.dock-top{margin-bottom:7px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important}}
.shopgrid button[aria-disabled="true"]{opacity:.42}
.dock{padding-bottom:68px;min-height:106px}.turn-controls{position:absolute;bottom:11px;left:14px;right:14px;display:flex;align-items:center;justify-content:space-between;gap:8px;height:44px}.skip-fixed{flex:0 0 128px;min-width:128px;max-width:128px;height:44px;border:1px solid var(--green);border-radius:9px;background:var(--green);color:white;font-size:12px;font-weight:600}.pending-link{max-width:calc(100% - 136px);border:0;background:transparent;padding:5px 0;min-height:40px;text-align:left;color:#597149;font-size:10px}.terrain-tray{display:flex;gap:6px;overflow:auto;max-width:100%;padding:3px 0 5px}.terrain-tray button{flex:0 0 auto;background:#edefdf;border:1px solid var(--line);border-radius:9px;padding:7px;min-height:54px;min-width:58px;font-size:10px}.terrain-tray button i{display:block;margin:auto auto 3px;width:23px;height:21px;font-style:normal;clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%);font-size:15px}.terrain-tray button small{font-size:9px}.terrain-tray button.active{border:2px solid #567948;background:#dce5c6}.dock.folded{padding-bottom:66px}.dock.folded .terrain-tray{display:none}.dock.folded .turn-controls{display:flex}.simulation-result{font-size:12px;line-height:1.7}.metricgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:16px 0}.metricgrid>div{border:1px solid var(--line);border-radius:8px;padding:10px;text-align:center}.metricgrid b{display:block;font:24px Georgia}.metricgrid small{font-size:9px;color:var(--muted)}@media(max-width:480px){.dock{padding-bottom:65px}.turn-controls{left:12px;right:12px;bottom:10px}.skip-fixed{flex-basis:126px;min-width:126px;max-width:126px;font-size:11px}.dock.folded{padding-bottom:64px}.terrain-tray{margin:0 -2px}.terrain-tray button{min-height:51px;min-width:56px;padding:6px}.dock p{margin-bottom:5px}}
.dock.no-fixed-controls{padding-bottom:14px;min-height:0}

.city-access{display:flex;gap:8px;align-items:center;margin-bottom:8px;flex-wrap:wrap}.city-access button{padding:9px 12px;min-height:40px;font-size:14px}.city-counts{display:grid;gap:12px;padding:14px;background:#e7ead9;border-radius:12px}.dock.folded .city-access{display:flex}
/* Mobile board: compact action tray, horizontal rosters, explicit movement. */
.dock{max-height:42dvh;overflow:visible}.dock-scroll{max-height:calc(42dvh - 92px);overflow-y:auto;overscroll-behavior:contain;padding:1px 0 5px}.dock .unitlist{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;max-height:49px}.dock .unitlist button{flex:0 0 auto;min-height:40px;white-space:nowrap;padding:8px 10px}.dock .actions{flex-wrap:nowrap;overflow-x:auto;gap:6px}.dock .actions button{flex:0 0 auto;white-space:nowrap;min-height:44px}.dock .context{font-size:12px;line-height:1.5;margin-bottom:7px}.dock h2{font-size:22px}.unit-name{border:0;background:transparent;padding:0;color:inherit;font:inherit;text-align:left;min-height:36px;cursor:pointer}.dock.folded .dock-scroll{max-height:64px}.dock.folded .city-access{display:none}.hex:focus{outline:none}.hex:focus-visible>polygon:first-child{stroke:#fff4b0;stroke-width:4}.hex.reachable>polygon:first-child{stroke:#fdf3b4;stroke-width:2}.hex.selected>polygon:first-child{stroke:#ffe188;stroke-width:3}.move-target{pointer-events:none}.piece{cursor:pointer}.piece.chosen{filter:drop-shadow(0 1px 2px #284431)}.dock .queuebadge{font-size:9px}.dock .city-access{margin-bottom:3px}.dock .city-access button{font-size:12px;padding:6px 9px}.dock .shopgrid button{min-height:66px}.dock .dock-top{margin-bottom:4px}@media(min-width:800px){.dock{max-height:38dvh}.dock-scroll{max-height:calc(38dvh - 92px)}}
.dock:has(.unit-name) .eyebrow{display:none}.dock .city-access button{min-height:32px;border:1px solid #bac5a7;border-radius:8px;background:#edf0dd;color:#2e4b3c}.unit-name{min-height:30px}.dock .dock-top h2{margin:0}.dock-scroll::-webkit-scrollbar{width:4px;height:4px}.dock-scroll::-webkit-scrollbar-thumb{background:#aab69b;border-radius:4px}

/* Readability fixes reproduced from Pau's Android screenshots. */
.dock .city-access button.primary{color:#fff!important;background:var(--green)!important}
.dock .actions{padding-bottom:5px;scrollbar-width:thin;scrollbar-color:#aab69b transparent}
.dock .actions button{white-space:normal;line-height:1.35}
#modal{max-height:calc(100dvh - 32px);scrollbar-gutter:stable;overscroll-behavior:contain}
.modalhead{position:sticky;top:-18px;z-index:3;background:var(--paper);padding:6px 0}
.modal-footer{position:sticky;bottom:-18px;z-index:2;background:var(--paper);padding:12px 0 4px;border-top:1px solid var(--line)}
.cardface{padding:14px 16px;margin:12px auto;max-width:280px}
.cardface>.art{height:72px;font-size:42px}.cardface h2{font-size:24px;margin:12px 0 8px}
.cardface p{margin:8px 0;line-height:1.5}.cardresult{margin:12px 0}
@media(max-width:480px){#modal h2{font-size:27px;line-height:1.15;overflow-wrap:anywhere}.cardface h2{font-size:23px!important}.victorytitle{font-size:27px!important;line-height:1.3}.rulesrow{gap:10px;padding:12px 0}.rulesrow>div{min-width:0}.rulesrow b{font-size:13px;line-height:1.4}.rulesrow p{line-height:1.5}.city-access button{flex:1 1 120px;line-height:1.3}.dock .city-access{gap:6px}.dock-scroll{padding-right:5px}.testtable{font-size:11px}.testtable td,.testtable th{padding:8px 5px}}
.crew-line{display:flex;align-items:center;gap:10px;margin-top:7px}.crew-line button{font-size:12px;border:1px solid var(--line);background:#edf0dd;border-radius:8px;padding:8px}.crew-cubes{display:inline-flex;gap:5px;align-items:center}.crew-cubes i{display:inline-block;width:13px;height:13px;border:1px solid #fff1d2;box-shadow:2px 2px 0 #243c3240}.crew-cubes small{color:var(--muted)}
#start-screen{position:fixed;inset:0;z-index:30;overflow-y:auto;background:#f7f3e7;color:#243c32;overscroll-behavior:contain}.home-wrap{max-width:640px;margin:auto;padding:22px 24px 30px}.home-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:40px}.home-head button{border:0;background:transparent;color:#294735;min-height:44px;padding:5px;font-size:13px}.home-head b{letter-spacing:3px}.home-kicker{font-size:10px;letter-spacing:2px;color:#92784e}.home-wrap h1{font:44px/1.06 Georgia;margin:14px 0 20px;letter-spacing:-1px}.home-wrap h2{font:25px Georgia}.home-lead{font-size:16px;line-height:1.6;max-width:400px;color:#61715b}.home-main{display:grid;gap:10px;margin-top:26px}.home-wrap button{cursor:pointer}.home-resume{width:100%;min-height:58px;background:#2c4c3b;color:#fff;border:0;border-radius:12px;padding:17px;text-align:left;font-weight:650;font-size:15px;display:flex;justify-content:space-between;gap:10px;align-items:center}.home-resume span{font-size:12px;font-weight:400}.home-tile{display:block;width:100%;border:1px solid #c8ceb9;border-radius:12px;padding:17px;background:#eeedde;text-align:left;color:#294533;min-height:74px}.home-tile b{font-size:16px;display:block}.home-tile>span{display:block;font-size:12px;color:#6b775f;margin-top:6px}.home-tile small,.home-badge{font:10px system-ui;background:#e2e4cf;border-radius:5px;padding:5px 7px;color:#6c7559}.home-board{background:#efe2c7;border-color:#d5c49e}.home-board b>span{float:right;color:#946338}.home-note{font-size:12px!important;line-height:1.65;color:#6c755e}.home-wrap label{font-size:14px;margin:18px 0}.home-wrap input,.home-wrap select{font-size:16px}.home-tutorial{margin:20px 0;width:100%;border:0;background:transparent;min-height:44px;text-align:left;color:#566b4b}.home-foot{border-top:1px solid #cbd0bc;margin-top:30px;padding-top:20px;font-size:12px;color:#79806c}.home-foot button{border:0;background:transparent;min-height:44px;color:#45613e;padding:5px 14px 5px 0}.home-disabled{opacity:.5;border:1px solid #aaa;background:#ddd;padding:15px;border-radius:10px;width:100%}.home-preview{border:1px dashed #b7bda9;border-radius:12px;padding:4px 18px 18px;margin:20px 0}.board-price{font:38px Georgia;margin:28px 0;color:#936239}.board-price small{display:block;font:12px system-ui;color:#75816a;margin-top:8px}.home-art{position:relative;float:right;width:126px;height:132px;background:#e1e4c8;clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);display:grid;place-items:center;margin:-10px 0 10px 14px}.home-art>span{font:90px Georgia;color:#ac6c41;line-height:1}.home-art i{position:absolute;width:14px;height:14px;background:#c17d47;bottom:17px;left:31px;box-shadow:2px 2px 0 #805739}.home-art i:nth-child(3){left:51px}.home-art i:nth-child(4){left:71px}.home-art b{position:absolute;right:15px;top:17px;color:#8e9767}@media(min-width:700px){.home-wrap{padding-top:35px}.home-wrap h1{font-size:64px}.home-art{width:170px;height:180px}.home-art>span{font-size:130px}.home-main{grid-template-columns:1fr 1fr}.home-resume,.home-board{grid-column:1/-1}}@media(max-width:370px){.home-wrap{padding:16px}.home-wrap h1{font-size:38px}.home-art{width:100px;height:110px}}

.home-art img{width:100%;height:100%;object-fit:contain}.dock.folded .crew-line{display:none}
.home-main{clear:both}.home-head{margin-bottom:24px}.home-wrap h1{margin-bottom:14px}@media(max-width:480px){.home-art{width:110px;height:116px}.home-main{margin-top:18px}.home-tile{min-height:68px;padding:14px 16px}.home-lead{font-size:15px}.home-resume span{white-space:nowrap}}
.home-wordmark{display:block;width:126px;height:49px;object-fit:contain}.home-head{margin-bottom:16px}.home-head button:first-child{padding:0}.project-banner img{flex:0 0 100px}.monastery-access{margin:4px 0 7px}.monastery-access button{border:1px solid #c5cbb5;border-radius:8px;background:#e9ecd9;min-height:38px;padding:7px 12px;font-size:12px}
