@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');
/* Game panels scroll normally; only board cameras handle a two-finger pinch. */
body:not(.at-title){touch-action:pan-x pan-y}
:root{color-scheme:dark;--ink:#102a27;--ink-deep:#071714;--green:#134a3e;--gold:#d7b06b;--gold-light:#f5dd9f;--paper:#ead8b1;--paper-ink:#352d20;--muted:#b9c5b8;--line:rgba(207,170,104,.42);--red:#8f3835;--space:8px;--nav-height:70px;--head-height:132px;--serif:'Cormorant Garamond',Georgia,serif;--sans:'Inter',system-ui,sans-serif}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--ink-deep);color:#f1e5cc;font-family:var(--sans);font-size:16px}button,input,select{font:inherit}button{cursor:pointer;color:inherit;border:0;background:none;min-height:44px;touch-action:manipulation}button:disabled{cursor:not-allowed;opacity:.48}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #ffdc85;outline-offset:3px}button svg{pointer-events:none}svg.icon{width:24px;height:24px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}h1,h2,h3,p{margin:0}h1,h2,h3{font-family:var(--serif)}h1{font-size:22px;font-weight:700;line-height:1}h2{font-size:30px;line-height:1.05}h3{font-size:23px;line-height:1.15}p{line-height:1.6}small{font-size:12px}button,a,input,select{-webkit-tap-highlight-color:transparent}[hidden]{display:none!important}.eyebrow{display:block;font-size:9px;letter-spacing:2px;font-weight:700;line-height:1.6;color:var(--gold)}
.game-shell{height:100dvh;height:100svh;display:flex;flex-direction:column;position:relative;padding-top:env(safe-area-inset-top);background:var(--ink-deep)}.game-header{display:flex;align-items:center;gap:6px;height:62px;flex:none;padding:6px 8px 5px 6px;background:radial-gradient(ellipse at 40% 0,#234237,transparent 70%),linear-gradient(100deg,#112e29,#081713);border-bottom:1px solid var(--line);position:relative;z-index:20}.house-mark{color:var(--gold-light);width:44px;height:49px;display:grid;place-items:center;clip-path:polygon(0 0,100% 0,100% 78%,50% 100%,0 78%);background:linear-gradient(135deg,#205a49,#0b302b);border:1px solid var(--gold);flex-shrink:0}.house-mark .icon{width:32px;height:36px}.house-title{min-width:0;flex:1}.house-title h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.day-badge{text-align:center;display:flex;flex-direction:column;justify-content:center;gap:2px;padding:0 4px;color:var(--gold-light);font-family:var(--serif);font-size:19px}.day-badge small{font:10px var(--sans);color:var(--muted)}.icon-button{display:grid;place-items:center;min-width:44px;padding:8px;color:var(--gold)}.resource-bar{height:49px;display:grid;grid-template-columns:repeat(4,1fr);padding:4px 6px;background:linear-gradient(#18322c,#0b211d);border-bottom:1px solid var(--line);flex:none;z-index:20}.resource-item{display:grid;grid-template-columns:26px 1fr;grid-template-rows:21px 14px;align-items:center;column-gap:5px;padding:1px 4px;border-right:1px solid rgba(216,176,104,.17)}.resource-item:last-child{border:0}.resource-item .icon{grid-row:1/3;width:25px;height:28px}.resource-item strong{font-family:var(--serif);font-size:21px;line-height:1}.resource-item small{font-size:9px;color:#acc2a8;white-space:nowrap}.food{color:#e6b665}.wood{color:#cc9b60}.stone{color:#c6cec8}.iron{color:#a7bbbc}.realm-status{height:29px;flex:none;display:flex;align-items:center;gap:8px;padding:0 12px;background:#132b23e8;border-bottom:1px solid var(--line);z-index:20;font-size:10px;color:#d1d2ba}.realm-status button{min-height:27px;padding:0;display:flex;align-items:center;gap:5px;font-size:10px}.realm-status .icon{width:15px;height:15px}.realm-status #era-button{margin-left:auto;color:var(--gold-light)}#save-state{display:none}
#play-area{position:relative;min-height:0;flex:1;overflow:hidden;background:#172a22}.scene{position:absolute;inset:0;overflow:hidden}.kingdom-scene{background:#3d533c url('./art-web/kingdom-f2c6e5428d.webp') center 46%/cover no-repeat}.scene-vignette{position:absolute;inset:0;pointer-events:none;background:linear-gradient(#04191470,transparent 28%,transparent 75%,#051c2170)}.scene-heading{position:absolute;top:18px;left:18px;text-shadow:0 2px 6px #000;pointer-events:none}.scene-heading h2{font-size:31px;color:#fff4d5}.scene-heading p{font-size:10px;color:#f0dfb9;margin-top:3px}.building-markers{position:absolute;inset:0}.building-marker{position:absolute;transform:translate(-50%,-50%);display:flex;align-items:center;gap:5px;background:linear-gradient(#173e32f0,#071b17ed);border:1px solid #d5b573;border-radius:4px;box-shadow:0 3px 12px #071008b3;min-height:40px;padding:4px 7px;font-size:10px;max-width:145px;color:#fff1d1}.building-marker .icon{width:19px;height:22px;color:var(--gold)}.building-marker strong{font-weight:600;display:block;font-size:10px}.building-marker small{display:block;color:#cdd8bd;font-size:9px;margin-top:2px}.building-marker.empty{border-style:dashed;background:#101f15c4;min-width:44px;opacity:.84}.building-marker.empty strong{font-size:9px}.building-marker.selected{box-shadow:0 0 0 2px #ffe092,0 0 25px #e4b74299}.building-marker.building{border-color:#9dcec1}.building-marker.evolved::before{content:'';position:absolute;inset:-12px;background:radial-gradient(ellipse,#f4e8c3b3,transparent 68%);animation:evolve 950ms ease-out forwards;pointer-events:none}.floating-action{position:absolute;bottom:16px;left:14px;display:flex;align-items:center;gap:8px;background:linear-gradient(#174436,#0a251f);border:1px solid var(--gold);color:#fae7c1;padding:0 14px;min-height:46px;box-shadow:0 3px 8px #0008;border-radius:4px;font-family:var(--serif);font-size:20px}.activity-dock{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);max-width:calc(100% - 32px);z-index:4;display:flex;gap:6px}.activity-pill{background:#0b241ef0;border:1px solid var(--gold);border-radius:24px;display:flex;align-items:center;gap:8px;padding:7px 14px;box-shadow:0 2px 8px #0008;max-width:220px;min-height:45px}.activity-pill .icon{width:18px;color:var(--gold)}.activity-pill span{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.activity-pill small{display:block;color:#c7d6bf;font-size:10px}.kingdom-scene:has(~.activity-dock:not(:empty)) .floating-action{bottom:76px}
.main-nav{height:calc(var(--nav-height) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);display:grid;grid-template-columns:repeat(5,1fr);position:relative;z-index:30;flex:none;border-top:2px solid #bd9656;background:linear-gradient(#19382f,#081c18);box-shadow:0 -4px 12px #0006}.nav-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-family:var(--serif);font-size:15px;position:relative;border-right:1px solid var(--line);color:#d9d3bb}.nav-button:last-child{border-right:0}.nav-button .icon{width:25px;height:25px;color:#c7b997}.nav-button.active{color:#ffe2a5;background:radial-gradient(ellipse at bottom,#ad74243b,transparent 85%)}.nav-button.active:after{content:'';position:absolute;bottom:3px;left:22%;right:22%;height:2px;background:#ecc775;box-shadow:0 0 9px #f1c163}.nav-button.active .icon{color:#fbd587}.nav-dot{position:absolute;right:20%;top:8px;background:#bf7138;color:#fff;border-radius:9px;font:9px var(--sans);padding:2px 4px}
.action-sheet{position:absolute;bottom:0;left:0;right:0;max-height:79%;z-index:10;color:var(--paper-ink);background:radial-gradient(ellipse at 15% 22%,#fff2cd6b,transparent 35%),radial-gradient(ellipse at 85% 80%,#b681362e,transparent 65%),repeating-linear-gradient(33deg,#fff2 0px,#fff2 1px,transparent 1px,transparent 4px),#e7d1a4;border:2px solid #a4814a;border-bottom:0;border-radius:18px 18px 0 0;box-shadow:0 -6px 30px #0915108c;display:flex;flex-direction:column;animation:sheet-in 180ms ease-out}.action-sheet:before{content:'';position:absolute;inset:5px 5px 0;border:1px solid #9a783955;border-radius:12px 12px 0 0;pointer-events:none}.sheet-handle{width:44px;height:4px;border-radius:3px;background:#9e7d48;margin:7px auto 0;flex:none}.sheet-heading{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:10px 19px 12px;flex:none;border-bottom:1px solid #90734855}.sheet-heading .eyebrow{color:#7e663f;font-size:9px}.sheet-heading h2{font-size:29px}.sheet-heading .icon-button{color:#6b532c;background:#94712d13;border:1px solid #997d4340;border-radius:50%;height:44px}.sheet-content{padding:16px 19px 26px;overflow-y:auto;overscroll-behavior:contain;position:relative;font-size:15px;scrollbar-color:#9c8257 transparent;scrollbar-width:thin}.sheet-content p{font-size:14px;line-height:1.55}.panel-intro{color:#685b45;margin-bottom:16px!important}.ornament{display:flex;align-items:center;gap:10px;margin:20px 0 12px;color:#7e6337;font-family:var(--serif);font-size:23px;font-weight:700}.ornament:before,.ornament:after{content:'';height:1px;background:#9b7b455c;flex:1}.primary-button,.secondary-button,.danger-button{display:flex;justify-content:center;align-items:center;gap:8px;width:100%;min-height:48px;padding:11px 14px;font-family:var(--serif);font-size:21px;font-weight:700;border-radius:3px;border:1px solid #a88a52;box-shadow:inset 0 0 0 2px #ebd39830,0 2px 3px #35271418}.primary-button{background:linear-gradient(110deg,#165442,#0c392e);color:#fff0cb}.secondary-button{background:#bd985626;color:#574322}.danger-button{background:linear-gradient(#823f34,#57291f);color:#ffe9c4}.small-button{padding:7px 12px;min-height:44px;font-size:16px;width:auto}.button-row{display:flex;gap:8px;align-items:center;margin-top:12px}.button-row>*{flex:1}.reason{display:block;font-size:12px;line-height:1.5;margin:8px 0;color:#876036}.notice{padding:12px;border:1px solid #a57b3e6b;background:#b89b4c13;color:#66512c;border-radius:3px;font-size:13px;line-height:1.6;margin:12px 0}.notice.warning{background:#a9432910;color:#8d432b;border-color:#b6745766}.notice.good{background:#34794b12;border-color:#6b996844;color:#375b36}.cost-row{display:flex;gap:11px;flex-wrap:wrap;margin:10px 0}.cost-item{display:flex;align-items:center;gap:4px;color:#675335;font-size:13px;font-weight:600}.cost-item .icon{width:18px;height:18px}.cost-item.short{color:#a64931}.metric-line{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;padding:9px 0;border-bottom:1px solid #8d6c3930}.metric-line strong{font-size:15px}.metric-line:last-child{border-bottom:0}.metric-line .icon{width:18px;height:18px}.muted{color:#827252;font-size:12px}.sheet-content .eyebrow{color:#877041}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:13px 0}.stat-cell{text-align:center;background:#9e783b12;border:1px solid #98784630;padding:8px 4px}.stat-cell strong{display:block;font-family:var(--serif);font-size:25px;line-height:1.2}.stat-cell small{font-size:10px;color:#756342}.stepper{display:flex;align-items:center;gap:10px}.stepper button{width:44px;min-width:44px;height:44px;border:1px solid #937343;border-radius:50%;background:#113f33;color:#ffe5ac;font-size:25px;display:grid;place-items:center}.stepper input{min-width:0;width:54px;height:44px;text-align:center;color:#3f341e;background:#fff5d73d;border:1px solid #9b7a4155;border-radius:3px;font-weight:700;font-size:19px;padding:0;-moz-appearance:textfield}.stepper input::-webkit-inner-spin-button{appearance:none}.worker-controls{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:13px 0}.worker-controls label{font-size:13px}.worker-controls small{display:block;font-size:11px;color:#716143;margin-top:3px}.list-row{border-bottom:1px solid #9b7c4247;padding:14px 0}.list-row:first-child{padding-top:0}.list-row:last-child{border:0}.list-row-heading{display:flex;gap:12px;align-items:center}.list-row-heading>.icon{width:35px;height:35px;color:#745b31;flex-shrink:0}.list-row-heading>div{flex:1}.list-row-heading h3{font-size:23px}.list-row-heading .level-tag{font-size:10px;border:1px solid #98764566;padding:4px 6px;border-radius:2px;white-space:nowrap}.list-row p{margin-top:5px;color:#6c5b3e;font-size:12px}.catalog-list .list-row{cursor:pointer}.list-row-as-button{width:100%;text-align:left;padding:14px 0;color:#3e341f;border-bottom:1px solid #9b7c4247}.chevron{font-size:25px;color:#907440}.tabs{display:flex;gap:5px;margin-bottom:17px}.tabs button{flex:1;border:1px solid #a2854c66;padding:8px 7px;font-family:var(--serif);font-size:17px;color:#79613b;background:#bca47218;line-height:1.2}.tabs button.active{background:#124437;color:#f6e5bb;border-color:#ac8a4c}.queue-item{padding:12px 0;border-bottom:1px solid #8d6b3938}.queue-title{display:flex;justify-content:space-between;align-items:center;gap:8px}.queue-title strong{font-size:14px}.queue-title span{font-size:12px}.progress-track{height:6px;background:#604e2c24;border-radius:4px;margin:8px 0;overflow:hidden}.progress-track i{display:block;height:100%;background:linear-gradient(90deg,#245c40,#74a25c);border-radius:4px}.queue-item small{font-size:11px;color:#766344}.empty-state{text-align:center;padding:24px 8px;color:#746445}.empty-state>.icon{width:42px;height:42px;color:#937b4e;margin-bottom:10px}.empty-state h3{font-size:25px;color:#4c3c21}.empty-state p{margin:8px 0 16px}.equipment-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.equipment-card{border:1px solid #97794666;background:linear-gradient(135deg,#f2e6c377,#b6a0681a);padding:13px;text-align:center;position:relative}.equipment-card>.icon{width:45px;height:45px;color:#927a47;margin:4px auto 8px}.equipment-card[data-level="3"]>.icon{color:#467566}.equipment-card[data-level="4"]>.icon{color:#597892}.equipment-card[data-level="5"]>.icon{color:#ad752b;filter:drop-shadow(0 0 4px #b68e4077)}.equipment-card h3{font-size:23px}.equipment-card p{font-size:11px;margin:6px 0}.equipment-card .primary-button{font-size:17px;padding:8px;min-height:44px}.governor-portrait{width:76px;height:92px;margin:0 auto 12px;display:grid;place-items:center;background:linear-gradient(140deg,#254c3f,#091f18);border:2px solid #a18752;clip-path:polygon(0 0,100% 0,100% 80%,50% 100%,0 80%);color:#e4c280}.governor-portrait .icon{width:55px;height:55px}.center{text-align:center}.inventory-row{display:flex;justify-content:center;gap:28px;padding:14px 0}.inventory-row>div{text-align:center}.inventory-row strong{font-family:var(--serif);font-size:28px;display:block}.inventory-row small{font-size:11px}.inventory-row .icon{width:22px;height:22px}
.world-scene{background:#253e2d}#map-viewport{position:absolute;inset:0;overflow:hidden;touch-action:none;cursor:grab}#map-viewport.dragging{cursor:grabbing}#map-plane{position:absolute;left:0;top:0;width:4608px;height:4096px;transform-origin:0 0;will-change:transform;background:#3e583c url('./art-web/world-14bd57f1bb.webp') center/100% 100% no-repeat}#map-grid,#map-routes,#map-pieces{position:absolute;inset:0;pointer-events:none}.map-piece{position:absolute;transform:translate(-50%,-50%);pointer-events:auto;display:flex;align-items:center;flex-direction:column;min-width:86px;min-height:84px;color:#f7e6bc;text-shadow:0 2px 4px #000}.map-piece>.piece-emblem{display:grid;place-items:center;width:58px;height:59px;clip-path:polygon(5% 0,95% 0,100% 80%,50% 100%,0 80%);background:#122e20e8;border:2px solid #d2b476;color:#f1cd79;box-shadow:0 3px 10px #000}.map-piece .icon{width:35px;height:35px}.map-piece.castle>.piece-emblem{width:76px;height:82px;background:#13513b}.map-piece.enemy>.piece-emblem{background:#7c2729;color:#ffd4aa}.map-piece.resource>.piece-emblem{background:#384942}.map-piece.hunt>.piece-emblem{background:#554725}.map-piece.selected>.piece-emblem{filter:drop-shadow(0 0 12px #ffdf62)}.map-piece .piece-label{font:700 19px var(--serif);background:#102417da;border:1px solid #a99961;padding:3px 9px;white-space:nowrap;margin-top:1px}.map-piece .difficulty{position:absolute;top:-6px;right:2px;width:28px;height:29px;background:#16281d;border:1px solid #d4b46b;display:grid;place-items:center;font-size:17px}.map-piece.cooldown{opacity:.6}.map-piece .cooldown-label{font-size:13px;color:#e1daba}.world-caption{position:absolute;top:14px;left:14px;pointer-events:none;text-shadow:0 2px 6px #000;display:flex;flex-direction:column;font-size:9px;color:#e0d5b3}.world-caption .eyebrow{font-size:10px}.map-controls{position:absolute;right:12px;bottom:78px;display:flex;flex-direction:column;gap:8px}.round-button{width:45px;height:45px;min-height:45px;border-radius:50%;background:linear-gradient(#16392e,#0a2019);border:1px solid var(--gold);box-shadow:0 2px 5px #0007;display:grid;place-items:center;color:#f1ce88;font-size:29px}.round-button .icon{width:23px;height:23px}#minimap{position:absolute;top:56px;left:13px;width:113px;height:101px;padding:2px;border:1px solid var(--gold);background:#183826 url('./art-web/world-14bd57f1bb.webp') center/cover;box-shadow:0 2px 10px #0006;overflow:hidden}#minimap svg{width:100%;height:100%;display:block}.nearby-button{position:absolute;bottom:16px;left:13px;background:#0d2d24eb;border:1px solid var(--gold);border-radius:3px;padding:0 12px;font-size:12px;color:#f2dfb4;min-height:44px}.expedition-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 0;border-bottom:1px solid #91724138}.expedition-row .unit-label{display:flex;gap:7px;align-items:center;font-size:13px}.expedition-row .unit-label .icon{width:23px}.expedition-row .unit-label small{display:block;color:#7c6848;font-size:10px}.expedition-row .stepper{gap:6px}.expedition-row .stepper button{width:40px;min-width:40px;height:40px}.expedition-row .stepper input{width:42px}.checkbox-row{display:flex;gap:10px;align-items:center;font-size:14px;padding:13px 0;min-height:48px}.checkbox-row input{width:20px;height:20px;accent-color:#245840}.mode-select{width:100%;height:46px;border:1px solid #a58755;background:#efe1bf;color:#493a20;padding:7px 10px;border-radius:3px}.chance-row{display:flex;gap:10px;margin:12px 0}.chance-row>div{padding:10px;border:1px solid #9c7c4250;flex:1;background:#9c7c4209}.chance-row strong{display:block;font-size:19px;font-family:var(--serif)}.chance-row small{font-size:11px;color:#716140}.report-card{width:100%;text-align:left;display:block;border-bottom:1px solid #9c7b3c50;padding:14px 0;color:#42371f}.report-card h3{font-size:25px}.report-card p{font-size:12px;margin:4px 0;color:#827044}.report-card .report-result{font-size:11px;letter-spacing:1px;text-transform:uppercase;color:#486b40}.report-header{text-align:center;padding-bottom:15px;border-bottom:1px solid #96703960}.report-header h3{font-size:32px}.seal{display:inline-flex;align-items:center;justify-content:center;padding:7px 15px;background:#1c5841;color:#ebd396;border:2px double #b79a54;border-radius:50%;min-width:65px;height:65px;font-family:var(--serif);font-size:18px;margin-bottom:12px;box-shadow:0 2px 5px #68462140}.seal.defeat{background:#8b4536}.report-unit{padding:13px 0;border-bottom:1px solid #8c6d3c55}.report-unit .list-row-heading>.icon{width:35px}.report-unit h3{font-size:24px}.casualty-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:10px 0}.casualty-grid strong{font-size:23px;font-family:var(--serif);display:block}.casualty-grid small{font-size:11px;color:#6e5b3b}.kill-line{background:#8e6e3010;padding:9px;font-size:14px;line-height:1.5;border-left:2px solid #93733a}.timeline{padding-left:12px;border-left:1px solid #99753b;margin:15px 0 0 5px}.timeline-entry{position:relative;padding:0 0 15px 9px;font-size:14px;line-height:1.5}.timeline-entry:before{content:'';position:absolute;left:-17px;top:5px;width:7px;height:7px;background:#9d7b40;border-radius:50%;border:1px solid #73572c}.timeline-entry time{display:block;font-size:11px;color:#8a724d}.report-details{border-top:1px solid #91724155;padding-top:10px;margin-top:14px}.report-details summary{font-family:var(--serif);font-size:22px;cursor:pointer;min-height:44px;padding:8px 0}.report-details p,.report-details li{font-size:16px;line-height:1.6}.report-table{width:100%;border-collapse:collapse;font-size:13px}.report-table th,.report-table td{padding:8px 4px;border-bottom:1px solid #95754233;text-align:left}.report-table th{font-size:11px;color:#775e39}
.toast{position:fixed;z-index:80;top:calc(env(safe-area-inset-top) + 148px);left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 26px);padding:13px 17px;border:1px solid #c1a268;background:#123a2ff5;color:#f8e8c4;border-radius:5px;box-shadow:0 5px 25px #0007;font-size:13px;line-height:1.5}.toast.error{background:#673729f5}.game-modal{padding:0;border:2px solid #b09159;background:#e6d3aa;color:#3d321f;width:min(92vw,470px);max-height:87dvh;overflow-y:auto;border-radius:8px;box-shadow:0 20px 90px #0008}.game-modal::backdrop{background:#001810b3;backdrop-filter:blur(4px)}#modal-content{padding:25px}.modal-close{float:right;color:#766039}.modal-title{text-align:center;margin:7px 0 12px;font-size:38px}.modal-subtitle{text-align:center;color:#776242;font-size:13px;margin-bottom:18px!important}.modal-list{margin:18px 0;padding:0;list-style:none;counter-reset:steps}.modal-list li{position:relative;padding:10px 0 10px 38px;font-size:14px;line-height:1.6;counter-increment:steps;border-bottom:1px solid #9073432f}.modal-list li:before{content:counter(steps);position:absolute;left:0;top:11px;background:#174735;color:#efda9e;border:1px solid #ac8c51;border-radius:50%;width:25px;height:25px;display:grid;place-items:center;font:18px var(--serif)}.settings-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:15px 0;border-bottom:1px solid #8e713340;font-size:14px}.settings-row input[type=checkbox]{width:23px;height:23px;accent-color:#285940}.settings-row select{max-width:180px;background:#d9c499;color:#503f22;border:1px solid #957844;padding:8px;min-height:44px}.test-badge{background:#894b24;color:#ffe3ab;font:700 8px var(--sans);padding:2px 4px;border-radius:2px;letter-spacing:.5px}.test-controls{padding-top:12px}.test-controls .button-row{flex-wrap:wrap}.test-controls .button-row button{font-size:16px;flex:1;white-space:nowrap}.outcome-hero{text-align:center;color:#855f2a}.outcome-hero>.icon{width:80px;height:80px}.outcome-hero h2{font-size:43px;margin-top:12px}.outcome-hero p{margin-top:10px;color:#796240;font-size:14px}.castle-switch{width:100%;margin-bottom:16px;background:#ebdbb6;color:#534020;border:1px solid #a88753;padding:10px;min-height:44px}.screenreader-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@keyframes sheet-in{from{transform:translateY(24px);opacity:.4}to{transform:translateY(0);opacity:1}}@keyframes evolve{0%{opacity:0;transform:scale(.65)}35%{opacity:1}100%{opacity:0;transform:scale(1.8)}}.reduce-motion *{animation:none!important;transition:none!important;scroll-behavior:auto!important}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media(min-width:700px){:root{--nav-height:76px}.game-header{height:69px;padding:7px 24px;gap:14px}.house-title h1{font-size:29px}.house-title .eyebrow{font-size:10px}.resource-bar{height:56px;padding:5px 25px;grid-template-columns:repeat(4,minmax(90px,160px));justify-content:center;gap:24px}.resource-item{grid-template-columns:32px 1fr}.resource-item .icon{width:28px;height:31px}.resource-item strong{font-size:25px}.resource-item small{font-size:10px}.realm-status{height:31px;padding:0 25px;font-size:12px}.realm-status button{font-size:12px}.realm-status #era-button{margin-left:20px}#save-state{display:block;margin-left:auto}.action-sheet{width:410px;left:auto;right:18px;bottom:18px;max-height:calc(100% - 36px);border:2px solid #a4814a;border-radius:8px}.sheet-handle{display:none}.sheet-heading{padding-top:17px}.sheet-content{padding:17px 22px 24px}.scene-heading{top:25px;left:30px}.scene-heading h2{font-size:42px}.scene-heading p{font-size:13px}.building-marker{min-height:49px;padding:7px 11px;gap:8px;max-width:190px}.building-marker strong{font-size:13px}.building-marker small{font-size:10px}.building-marker .icon{width:26px;height:26px}.building-marker.empty strong{font-size:11px}.main-nav{padding-left:calc((100vw - 700px)/2);padding-right:calc((100vw - 700px)/2)}.nav-button{font-size:19px;gap:5px}.nav-button .icon{width:29px;height:29px}.world-caption{top:22px;left:24px}.world-caption .eyebrow{font-size:12px}.world-caption>span:last-child{font-size:11px}#minimap{left:24px;top:70px;width:160px;height:143px}.map-controls{left:26px;right:auto;bottom:83px}.nearby-button{left:25px;bottom:20px;font-size:14px}.floating-action{left:25px;bottom:20px}.activity-dock{bottom:22px;left:26px;transform:none}.kingdom-scene:has(~.activity-dock:not(:empty)) .floating-action{bottom:82px}.activity-pill{max-width:260px}.activity-pill span{font-size:13px}.activity-pill small{font-size:11px}}
@media(min-width:1150px){.kingdom-scene{background-position:center 52%}.action-sheet{width:430px;right:26px;bottom:24px;max-height:calc(100% - 48px)}.game-header{padding-left:28px}.building-markers{right:15%}.scene-heading h2{font-size:47px}.sheet-heading h2{font-size:33px}.resource-bar{gap:40px}.main-nav{padding-left:calc((100vw - 810px)/2);padding-right:calc((100vw - 810px)/2)}}
@media(max-width:360px){h1{font-size:20px}.game-header{gap:5px}.resource-item{column-gap:2px;padding-left:2px;padding-right:2px;grid-template-columns:22px 1fr}.resource-item strong{font-size:19px}.resource-item .icon{width:21px}.sheet-content{padding-left:14px;padding-right:14px}.sheet-heading{padding-left:14px;padding-right:14px}.scene-heading h2{font-size:26px}.building-marker strong{font-size:9px}.main-nav{font-size:13px}.nav-button{font-size:14px}}
.realm-status{height:44px}.realm-status button{min-height:44px}.expedition-row .stepper button{width:44px;min-width:44px;height:44px}.timeline-entry,.kill-line,.report-unit p{font-size:16px}.report-table{font-size:14px}
/* Madeira envernizada nas faixas de comando: a cena e o pergaminho mantêm sua identidade. */
.game-header,.resource-bar,.realm-status,.main-nav{background-color:#382215;background-image:linear-gradient(180deg,#3b211844,#140b0999),url('./art-web/wood-varnished-ba8ef89fac.webp');background-size:auto,cover;border-color:#aa7845;box-shadow:inset 0 1px 0 #d5af7270,inset 0 -1px 0 #140905cc}.game-header{background-position:center,center 22%;box-shadow:inset 0 2px 0 #dfbc7773,inset 0 -2px 0 #1c0a0bcc}.resource-bar{background-position:center,center 42%;border-bottom-color:#a47244}.realm-status{background-position:center,center 64%;color:#ebd7b3}.main-nav{background-position:center,center 78%;border-top:2px solid #bf8c50;box-shadow:0 -4px 12px #10090477,inset 0 1px 0 #edcd9273,inset 0 -3px 0 #170b08}.resource-item{border-right-color:#b2834e61}.resource-item small{color:#dec59d}.day-badge small{color:#dac49f}.realm-status #era-button{color:#f6d89b}.nav-button{border-right-color:#a373445c;color:#e9d6b7}.nav-button .icon{color:#d7b685}.nav-button.active{background:radial-gradient(ellipse at 50% 100%,#e4a53761,transparent 86%);color:#ffe3a2;box-shadow:inset 0 0 0 1px #e7b66421}.nav-button.active .icon{color:#ffdb83;filter:drop-shadow(0 0 5px #e3a44640)}.nav-button.active:after{background:#ffd583;box-shadow:0 0 9px #efae46}.offline .realm-status{background-color:#634126;background-image:linear-gradient(#5c361455,#25130f77),url('./art-web/wood-varnished-ba8ef89fac.webp');color:#ffe0ad}

.building-sprite{display:block;width:110px;height:110px;background-image:url('./art-web/buildings-2377b39525.webp');background-size:400% 400%;background-repeat:no-repeat;filter:drop-shadow(0 5px 4px #0b180f66);pointer-events:none}.building-marker.built{width:112px;height:120px;display:block;background:none;border:none;box-shadow:none;padding:0;max-width:none}.building-marker.built .building-sprite{position:absolute;bottom:12px;left:50%;transform:translateX(-50%)}.building-marker.built .building-label{position:absolute;bottom:0;left:50%;transform:translateX(-50%);display:block;white-space:nowrap;padding:4px 8px;background:linear-gradient(#e6d5ad,#c1a874);color:#382a15;border:1px solid #6c542e;border-radius:3px;box-shadow:0 2px 4px #0006}.building-marker.built small{color:#5d492c}.building-marker.castle-marker{width:145px;height:160px}.castle-marker .building-sprite{width:160px;height:160px}.building-marker.built.selected .building-label{box-shadow:0 0 0 2px #ffe092,0 0 20px #e4b74299}.building-marker.built.building .building-label{background:#c8d4b3}.building-marker.empty{opacity:.77;max-width:120px;min-height:44px}.chat-messages{max-height:42dvh;overflow-y:auto;overscroll-behavior:contain;margin:14px 0}.chat-empty{color:#8d7752;font-size:14px!important;line-height:1.6}.chat-message{padding:12px;background:#94733d0a;border-bottom:1px solid #a5865350}.chat-message header{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:7px}.chat-message header strong{font-size:13px;color:#315341}.chat-message time{font-size:11px;color:#8d7959}.chat-message p{font-size:16px;white-space:pre-wrap;overflow-wrap:anywhere}.chat-form{display:block;border-top:1px solid #a5865350;padding-top:13px}.chat-form label{display:block;font-size:13px;margin-bottom:7px}.chat-form textarea{display:block;width:100%;font:16px/1.5 var(--sans);resize:vertical;min-height:88px;max-height:180px;background:#fff4d83b;color:#3f321d;border:1px solid #aa8e5955;border-radius:3px;padding:10px}.chat-form-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:8px}.chat-form-footer small{color:#8d7650}.offline .realm-status{background:#58412d}.offline #save-state{display:inline;font-size:9px}.offline .realm-status #era-button{display:none}@media(min-width:700px){.building-sprite{width:155px;height:155px}.building-marker.built{width:150px;height:160px}.building-marker.castle-marker{width:200px;height:210px}.castle-marker .building-sprite{width:220px;height:220px}.building-marker.built .building-label{padding:5px 12px}.chat-messages{max-height:43dvh}}@media(min-width:1150px){.building-sprite{width:190px;height:190px}.building-marker.built{width:185px;height:190px}.building-marker.castle-marker{width:235px;height:245px}.castle-marker .building-sprite{width:255px;height:255px}}

@media(max-width:699px){.building-marker.built{width:94px;height:102px}.building-marker.built .building-sprite{width:102px;height:102px}.building-marker.castle-marker{width:132px;height:142px}.building-marker.castle-marker .building-sprite{width:150px;height:150px}.building-marker.built .building-label{padding:4px 6px}.building-marker.empty{min-height:44px}}
/* Revisão de material: escala física constante, poros e chanfros preservados. */
.game-header,.resource-bar,.realm-status,.main-nav,.offline .realm-status{background-color:#241710;background-image:linear-gradient(180deg,#cda46b08 0%,transparent 38%,#09060426 100%),url('./art-web/wood-dark-v3-331b77e862.webp');background-size:auto,768px auto;background-repeat:no-repeat,repeat;border-top-color:#bfa27440;border-bottom-color:#1b100a;box-shadow:inset 0 2px 1px #c9b18433,inset 0 -3px 3px #12090480,0 1px 0 #79604450}.game-header{border-bottom-width:2px}.resource-bar{border-bottom-width:2px}.main-nav{border-top:3px solid #896d47;box-shadow:inset 0 2px 1px #c5a9783d,inset 0 -5px 5px #12090480,0 -3px 8px #160b0799}.nav-button{box-shadow:inset 1px 0 0 #dcaa6233,inset -1px 0 0 #21100788}.nav-button.active{background:radial-gradient(ellipse at bottom,#c297432e,transparent 88%);box-shadow:inset 1px 0 0 #d0b5823b,inset -1px 0 0 #21100799,inset 0 2px 12px #c3974f12}.resource-item{box-shadow:inset -1px 0 0 #28140977}.resource-item:last-child{box-shadow:none}
#map-plane{background-image:url('./art-web/world-v4-ec8c1c8e58.webp');background-size:cover;background-position:center}#minimap{background-image:url('./art-web/world-v4-ec8c1c8e58.webp')}.map-piece.castle{width:270px;min-height:274px;justify-content:flex-end;z-index:2}.map-piece.castle .world-castle-sprite{width:265px;height:265px;position:absolute;left:50%;bottom:18px;transform:translateX(-50%);filter:drop-shadow(0 8px 7px #09140980)}.map-piece.castle>.piece-emblem{width:46px;height:53px;position:absolute;right:23px;top:43px;box-shadow:0 2px 5px #0006;z-index:2}.map-piece.castle .piece-emblem .icon{width:29px;height:33px}.map-piece .piece-label{font-size:23px}.map-piece.castle .piece-label{position:relative;z-index:3;background:linear-gradient(#e9d9b4,#c7ae7c);border-color:#806633;color:#3c2b13;text-shadow:none;font-size:24px;box-shadow:0 3px 6px #07130a88}.overview .map-piece:not(.castle) .piece-label{display:none}.overview .map-piece.castle .world-castle-sprite{width:220px;height:220px}.overview .map-piece.castle{min-height:230px}.map-piece.castle.selected .world-castle-sprite{filter:drop-shadow(0 0 12px #f1c76099)}
.building-sprite{background-image:var(--building-atlas,url('./art-web/buildings-2377b39525.webp'));filter:drop-shadow(0 2px 2px #13251424)}.map-piece.castle .world-castle-sprite,.map-piece.castle.selected .world-castle-sprite{filter:drop-shadow(0 2px 3px #14251124)}.map-piece.castle.selected .piece-label{box-shadow:0 0 0 2px #e9c46a,0 3px 5px #12201544}.map-piece .piece-label{font-size:max(23px,calc(12px / var(--map-zoom,.35)))}.map-piece.castle .piece-label{font-size:max(24px,calc(13px / var(--map-zoom,.35)))}.map-piece:not(.castle){min-width:calc(44px / var(--map-zoom,.35));min-height:calc(48px / var(--map-zoom,.35))}.map-piece:not(.castle)>.piece-emblem{width:max(58px,calc(30px / var(--map-zoom,.35)));height:max(59px,calc(34px / var(--map-zoom,.35)))}.map-piece:not(.castle) .piece-emblem .icon{width:max(35px,calc(21px / var(--map-zoom,.35)));height:max(35px,calc(21px / var(--map-zoom,.35)))}.map-piece .difficulty{width:max(28px,calc(17px / var(--map-zoom,.35)));height:max(29px,calc(18px / var(--map-zoom,.35)));font-size:max(17px,calc(12px / var(--map-zoom,.35)))}.map-piece:not(.castle) .piece-label{display:none}.map-piece.selected:not(.castle) .piece-label{display:block}.overview .map-piece:not(.castle)>.piece-emblem{width:82px;height:86px}.overview .map-piece:not(.castle) .piece-emblem .icon{width:54px;height:54px}.overview .map-piece:not(.castle) .difficulty{width:45px;height:47px;font-size:31px}.building-marker.evolved::before{z-index:5;opacity:0;background:radial-gradient(ellipse at 32% 52%,#d2c1a4d9 0 18%,transparent 58%),radial-gradient(ellipse at 67% 48%,#cabb9fd9 0 20%,transparent 62%);animation:evolve 950ms ease-out forwards}
.world-site-sprite{display:none;position:absolute;left:50%;bottom:12px;transform:translateX(-50%);width:240px;height:160px;background-image:url('./art-web/world-sites-e6e667fc2b.webp');background-size:400% 400%;background-repeat:no-repeat;filter:drop-shadow(0 2px 2px #18221426);pointer-events:none}.site-art-ready .world-site-sprite{display:block}.site-art-ready .map-piece:not(.castle){width:max(180px,calc(44px / var(--map-zoom,.35)));height:max(190px,calc(48px / var(--map-zoom,.35)));justify-content:flex-end}.site-art-ready .map-piece.camp .world-site-sprite{width:255px;height:170px}.site-art-ready .map-piece.resource .world-site-sprite{width:225px;height:150px}.site-art-ready .map-piece:not(.castle)>.piece-emblem{position:absolute;left:0;bottom:10px;width:calc(17px / var(--map-zoom,.35));height:calc(20px / var(--map-zoom,.35));border-width:1px;z-index:2;box-shadow:none}.site-art-ready .map-piece:not(.castle) .piece-emblem .icon{width:calc(12px / var(--map-zoom,.35));height:calc(12px / var(--map-zoom,.35))}.site-art-ready .map-piece:not(.castle) .difficulty{top:auto;bottom:10px;right:0;width:calc(16px / var(--map-zoom,.35));height:calc(18px / var(--map-zoom,.35));font-size:calc(11px / var(--map-zoom,.35));z-index:2}.site-art-ready .map-piece:not(.castle) .piece-label{position:absolute;bottom:-32px;z-index:4;box-shadow:0 2px 4px #10201333}.site-art-ready .map-piece.selected:not(.castle)::before{content:'';position:absolute;width:170px;height:74px;left:50%;bottom:4px;transform:translateX(-50%);border:3px solid #f3d187;border-radius:50%;box-shadow:0 0 0 2px #4c532a88,0 0 20px #ffe6a34a;pointer-events:none}.site-art-ready .map-piece.selected:not(.castle)>.piece-emblem{filter:none}.site-art-ready .map-piece.cooldown .world-site-sprite{filter:saturate(.5) drop-shadow(0 2px 2px #18221426)}.site-art-ready .overview .map-piece:not(.castle)>.piece-emblem{width:75px;height:85px}.site-art-ready .overview .map-piece:not(.castle) .piece-emblem .icon{width:52px;height:52px}.site-art-ready .overview .map-piece:not(.castle) .difficulty{width:72px;height:82px;font-size:49px}

/* A câmera do domínio transforma arte e construções juntas; controles permanecem fixos. */
.kingdom-scene{background:#3d533c}#kingdom-viewport{position:absolute;inset:0;overflow:hidden;touch-action:none;cursor:grab}#kingdom-viewport.dragging{cursor:grabbing}#kingdom-plane{position:absolute;inset:0;transform-origin:0 0;background:#3d533c url('./art-web/kingdom-f2c6e5428d.webp') center 46%/cover no-repeat;will-change:transform}.kingdom-controls{position:absolute;right:12px;bottom:18px;display:flex;flex-direction:column;gap:7px;z-index:5}.kingdom-controls .round-button{width:44px;height:44px;min-height:44px}.kingdom-scene:has(~.activity-dock:not(:empty)) .kingdom-controls{bottom:75px}@media(max-width:699px){.kingdom-controls{right:9px;gap:5px}.kingdom-controls .round-button{width:44px;height:44px}}

#clock-label{display:flex;flex-direction:column;align-items:center;gap:1px}.metric-line>strong[data-duration],.metric-line>strong[data-countdown]{max-width:62%;text-align:right;line-height:1.4;font-size:13px}.queue-title>[data-countdown]{text-align:right;line-height:1.5;max-width:52%}.activity-pill [data-countdown]{white-space:normal;line-height:1.3}

/* Densidade aprovada para manuscritos e menus; HUD, mapa e alvos de toque permanecem. */
.sheet-heading{padding:8px 16px 9px}.sheet-heading h2{font-size:25px;line-height:1.1}.sheet-content{padding:12px 16px 20px;font-size:14px;line-height:1.4}.sheet-content p{font-size:14px;line-height:1.4}.sheet-content h3{font-size:20px;line-height:1.2}.sheet-content .panel-intro{margin-bottom:12px!important}.sheet-content .ornament{font-size:20px;margin:14px 0 8px}.sheet-content .primary-button,.sheet-content .secondary-button,.sheet-content .danger-button{font-size:18px;min-height:44px;padding:8px 11px}.sheet-content .small-button{font-size:16px;min-height:44px}.sheet-content .tabs{margin-bottom:12px}.sheet-content .tabs button{font-size:16px;min-height:44px;padding:7px 6px}.sheet-content .list-row,.sheet-content .list-row-as-button{padding:10px 0}.sheet-content .list-row-heading{gap:9px}.sheet-content .list-row-heading>.icon{width:29px;height:29px}.sheet-content .worker-controls{padding:10px 0}.sheet-content .metric-line{padding:7px 0;font-size:13px}.sheet-content .metric-line strong{font-size:14px}.sheet-content .stat-grid{gap:5px;margin:10px 0}.sheet-content .stat-cell{padding:7px 3px}.sheet-content .stat-cell strong{font-size:22px}.sheet-content .stat-cell small{font-size:10px}.sheet-content .notice{padding:9px 10px;margin:10px 0;font-size:13px;line-height:1.4}.sheet-content .queue-item{padding:10px 0}.sheet-content .report-card{padding:11px 0}.sheet-content .report-card h3{font-size:21px}.sheet-content .report-card p{font-size:12px}.sheet-content .report-header{padding-bottom:10px}.sheet-content .report-header h3{font-size:26px}.sheet-content .report-header p{font-size:13px}.sheet-content .seal{min-width:50px;height:50px;margin-bottom:8px;font-size:16px}.report-summary{grid-template-columns:repeat(4,1fr)}.sheet-content .report-unit{padding:10px 0}.sheet-content .casualty-grid{gap:5px;margin:7px 0}.sheet-content .casualty-grid strong{font-size:21px;line-height:1.15}.sheet-content .casualty-grid small{font-size:10px}.sheet-content .kill-line{padding:7px 9px;font-size:13px;line-height:1.4}.sheet-content .report-details{padding-top:7px;margin-top:10px}.sheet-content .report-details summary{font-size:20px;min-height:44px;padding:8px 0}.sheet-content .report-details p,.sheet-content .report-details li{font-size:14px;line-height:1.4}.sheet-content .timeline{margin-top:10px}.sheet-content .timeline-entry{font-size:14px;line-height:1.4;padding-bottom:11px}.sheet-content .report-table{font-size:13px}.sheet-content .report-table th,.sheet-content .report-table td{padding:6px 4px}.sheet-content .inventory-row{gap:20px;padding:10px 0}.sheet-content .inventory-row strong{font-size:23px}.sheet-content .equipment-card{padding:10px}.sheet-content .equipment-card h3{font-size:20px}.sheet-content .empty-state{padding:17px 7px}.sheet-content .empty-state h3{font-size:23px}.sheet-content input,.sheet-content select,.sheet-content textarea{font-size:max(16px,1em)}#modal-content{padding:20px}.game-modal .modal-title{font-size:29px;line-height:1.15;margin:5px 0 10px}.game-modal .modal-subtitle{font-size:13px;line-height:1.4;margin-bottom:12px!important}.game-modal p,.game-modal .modal-list li{font-size:14px;line-height:1.4}.game-modal .modal-list{margin:12px 0}.game-modal .modal-list li{padding-top:8px;padding-bottom:8px}.game-modal .primary-button,.game-modal .secondary-button{font-size:18px;min-height:44px;padding:8px 11px}.game-modal .settings-row{padding:11px 0;font-size:14px}.game-modal .notice{padding:10px;font-size:13px;line-height:1.4;margin:10px 0}.game-modal .stat-cell strong{font-size:23px}.game-modal .outcome-hero h2{font-size:32px}.game-modal .outcome-hero>.icon{width:60px;height:60px}.game-modal .report-details summary{font-size:21px}.game-modal input,.game-modal select,.game-modal textarea{font-size:16px}

.map-piece .map-owner-name{position:absolute;bottom:280px;left:50%;transform:translateX(-50%);font:600 max(24px,calc(13px / var(--map-zoom,.35))) var(--serif);line-height:1.25;color:#fff0c7;text-shadow:0 2px 3px #102015;background:#11291edb;border:1px solid #dfc17b99;padding:4px 12px;border-radius:3px;white-space:nowrap;max-width:calc(180px / var(--map-zoom,.35));overflow:hidden;text-overflow:ellipsis;pointer-events:none}.map-piece.enemy .map-owner-name{background:#4b2827e6;border-color:#c59271aa}.overview .map-piece.castle .map-owner-name{bottom:238px}.expedition-presets{margin-bottom:12px!important}.preset-fields{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:10px}.preset-fields label{display:block;min-width:0;font-size:12px;color:#745c36}.preset-fields input,.preset-fields select{display:block;width:100%;min-height:44px;margin-top:5px;background:#efe1bf;color:#493a20;border:1px solid #a58755;border-radius:3px;padding:7px 9px;font-size:16px}.expedition-presets .muted{font-size:12px;line-height:1.4}


/* Relato compacto: título no painel e totais apenas para exércitos de vários tipos. */
#map-viewport,#kingdom-viewport{-webkit-user-select:none;user-select:none}.sheet-content:has(.report-header-compact){padding:10px 14px 16px}.sheet-content .report-header-compact{display:flex;align-items:center;gap:9px;text-align:left;padding:0 0 8px;margin:0}.sheet-content .report-header-compact .seal{flex:none;width:30px;min-width:30px;height:30px;padding:3px;margin:0;border-width:1px;box-shadow:0 1px 2px #68462126}.sheet-content .report-header-compact .seal .icon{width:19px;height:19px}.sheet-content .report-header-compact strong{font-size:14px;line-height:1.3}.sheet-content .report-header-compact p{margin:2px 0 0;font-size:12px;line-height:1.3}.sheet-content .report-header-compact~.report-unit{padding:8px 0}.sheet-content .report-header-compact~.report-summary{margin:8px 0}.sheet-content:has(.report-header-compact) .ornament{margin:11px 0 7px}

/* Contexto explícito para ordens locais em reinos com mais de um castelo. */
.castle-context{display:flex;align-items:center;gap:10px;margin:0 0 8px;padding-bottom:7px;border-bottom:1px solid #98784645}.castle-context>span{font-size:11px;flex:none;color:#745c36}.castle-context .castle-switch{margin:0;min-width:0;flex:1;min-height:44px;padding:6px;border:1px solid #a58755;border-radius:3px;color:#493a20;background:#efe1bf;font-size:16px}
.world-scene:not([hidden])~.activity-dock{left:auto;right:14px;bottom:16px;transform:none;max-width:calc(100% - 185px)}.activity-dock .activity-pill{max-width:100%}.activity-dock .activity-pill>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Fixed terrain coordinates, with woodland around the board for a wider camera. */
#kingdom-plane{width:1560px;height:1005px;right:auto;bottom:auto;--terrain-left:240px;--terrain-top:210px;--terrain-width:1080px;--terrain-height:675px;--city-label-scale:1;background:#3d533c url('./art-web/kingdom-woodland-v2-9e0fec5ce6.webp') center/100% 100% no-repeat}
#kingdom-terrain{position:absolute;left:var(--terrain-left);top:var(--terrain-top);width:var(--terrain-width);height:var(--terrain-height)}
#kingdom-terrain::before{content:'';position:absolute;inset:0;background:url('./art-web/kingdom-housing-v1-aad4095cdc.webp') center/100% 100% no-repeat;mask-image:linear-gradient(to right,transparent,#000 25px,#000 calc(100% - 25px),transparent),linear-gradient(transparent,#000 24px,#000 calc(100% - 24px),transparent);mask-composite:intersect;pointer-events:none}
#kingdom-plane .building-markers{inset:0}
.progression-mode #kingdom-plane .building-markers{left:120px;right:auto;width:1080px;height:675px;bottom:auto}
.progression-mode #kingdom-terrain::before{background-image:var(--embassy-terrain-art,url('./art-web/kingdom-housing-v1-aad4095cdc.webp'))}
#kingdom-plane .building-marker{transform:translate(-50%,-100%)}
#kingdom-plane{--city-size:112px;--city-scale:1}#kingdom-plane .building-marker.built{width:calc(var(--city-size)*var(--city-scale));height:calc(var(--city-size)*var(--city-scale));min-width:calc(44px * var(--city-label-scale));min-height:calc(44px * var(--city-label-scale))}
#kingdom-plane .building-marker.castle-marker{--city-size:360px}
#kingdom-plane [data-building='farm']{--city-size:140px}
#kingdom-plane [data-building='mine']{--city-size:126px}
#kingdom-plane [data-building='stable']{--city-size:110px}
#kingdom-plane [data-building='workshop']{--city-size:124px}
#kingdom-plane [data-building='wall']{--city-size:104px}
#kingdom-plane [data-building='tower']{--city-size:92px}
#kingdom-plane [data-building='hospital']{--city-size:108px}
.progression-mode #kingdom-plane [data-building='embassy']{--city-size:134.4px}
#kingdom-plane .building-marker.built .building-sprite{width:100%;height:100%;bottom:0}
#kingdom-plane .building-marker.built .library-sprite{width:var(--library-map-size);height:var(--library-map-size);left:var(--library-map-left);bottom:var(--library-map-bottom)}
#kingdom-plane .building-marker.built .building-label{top:calc(100% - 4px);bottom:auto;padding:3px 6px;max-width:150px;white-space:normal;min-width:62px;text-align:center;line-height:1.2}
#kingdom-plane .building-marker strong{font-size:11px;white-space:nowrap}
#kingdom-plane .building-marker small{font-size:10px;white-space:nowrap}
#kingdom-plane .building-marker.empty{min-width:90px;max-width:126px;background:#15281ee8}
#kingdom-plane .building-marker.empty .building-label{min-width:0}
#kingdom-plane .building-marker.built .building-label{transform:translateX(-50%) scale(var(--city-label-scale));transform-origin:center top;left:50%;width:max-content}
#kingdom-plane .building-marker.empty{transform:translate(-50%,-100%) scale(var(--city-label-scale));transform-origin:center bottom;min-height:44px}
.progression-mode #kingdom-plane .building-marker.built{min-width:0;min-height:0}
.progression-mode #kingdom-plane .building-marker.built .building-label{top:calc(100% - 16px)}
.progression-mode #kingdom-plane .building-marker.built[data-building='library'] .building-label{left:calc(50% - 16px)}
.progression-mode #kingdom-plane .building-marker::after{content:'';position:absolute;left:50%;top:50%;width:calc(44px * var(--city-hit-scale,1));height:calc(44px * var(--city-hit-scale,1));transform:translate(-50%,-50%);pointer-events:auto}
.progression-mode #kingdom-plane .building-marker.built[data-building='stable']::after{top:0;transform:translateX(-50%)}
.progression-mode #kingdom-plane .building-marker.fortification-control[data-building='tower']::after{top:auto;bottom:0;transform:translateX(-50%)}
/* Keep the embassy's hit area inside its plot, below the library label. */
.progression-mode #kingdom-plane .building-marker.built[data-building='embassy']{pointer-events:none}
.progression-mode #kingdom-plane .building-marker.built[data-building='embassy'] .embassy-sprite{pointer-events:none}
.progression-mode #kingdom-plane .building-marker.built[data-building='embassy']::after{top:25%;width:max(100%,calc(44px * var(--city-hit-scale,1)));height:max(75%,calc(44px * var(--city-hit-scale,1)));transform:translateX(-50%)}
.progression-mode #kingdom-plane .building-marker.built[data-building='embassy'] .building-label{pointer-events:auto}
.progression-mode #kingdom-plane .building-label .city-build-clock{color:#173d2b;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.progression-mode #kingdom-plane .city-training-tag{position:absolute;left:50%;top:0;transform:translate(-50%,-100%) scale(var(--city-label-scale));transform-origin:center bottom;display:flex;align-items:center;gap:calc(var(--space)/2);width:max-content;padding:2px 6px 2px 2px;border:1px solid var(--gold);border-radius:4px;background:linear-gradient(#352d20f5,#201b15f5);box-shadow:0 2px 4px #0008;color:var(--gold-light);pointer-events:auto;z-index:2}
.progression-mode #kingdom-plane .city-training-tag>.progression-troop-art{width:28px;height:28px;flex:none;filter:drop-shadow(0 1px 1px #000)}
.progression-mode #kingdom-plane .city-training-clock{font:700 14px/1.2 var(--sans);font-variant-numeric:tabular-nums;white-space:nowrap}
.city-training-description{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.progression-mode #kingdom-plane .city-hospital-tag{padding:5px 8px;gap:5px;min-height:28px}
.city-hospital-tag svg{width:20px;height:20px}.city-hospital-tag.has-wounded{color:#ffe3a6;border-color:#bd8c45;background:linear-gradient(#694020f5,#3c2919f5)}
.progression-waiting-order{display:grid;gap:8px;margin-top:12px}.progression-waiting-order .queue-title{flex-wrap:wrap;gap:4px 10px}.progression-waiting-order .secondary-button{min-height:44px;max-width:100%;white-space:normal}.progression-troop-unlocks p{margin:5px 0}.progression-troop-unlocks{overflow-wrap:anywhere}
.hud-player-identity{min-width:0}.hud-player-power[hidden]{display:none}
.progression-mode .hud-player-identity{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:6px;row-gap:0}
.progression-mode .hud-player-identity h1{min-width:0;max-width:100%;line-height:1.05}
.progression-mode .hud-player-power{display:inline-flex;align-items:center;gap:3px;min-width:0;font:700 10px/1.2 var(--sans);color:var(--gold-light);white-space:nowrap;font-variant-numeric:tabular-nums}
.progression-mode .hud-player-power .icon{width:12px;height:12px}
.progression-mode #kingdom-scene .scene-heading{display:none}
@media(min-width:700px){.progression-mode .hud-player-power{font-size:12px}.progression-mode .hud-player-power .icon{width:14px;height:14px}}
.building-sprite.castle-sprite{background-image:url('./art-web/castles-hd-v1-f5b7fecc3f.webp');background-size:300% 200%}
.building-sprite.storage-sprite{background-image:url('./art-web/warehouse-v1-356548f4a9.webp');background-size:contain;background-position:center;background-repeat:no-repeat}
.resource-bar{height:67px}
button.resource-item{min-width:0;min-height:0;text-align:left;border:0;background:none;color:inherit;border-radius:0;padding:0 4px;grid-template-rows:22px 15px 15px;cursor:pointer}
.resource-item .resource-capacity,.resource-item .resource-income{grid-column:2;white-space:nowrap;font-size:10px;line-height:1.2}
.resource-item .resource-capacity{grid-row:2;color:#e6d2a8}
.resource-item .resource-income{grid-row:3}
.resource-item .resource-paused .icon{display:block;width:11px;height:11px;color:#e6d2a8}
.resource-item.is-full .resource-capacity{color:#ffd691}
.resource-item strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:450px){button.resource-item{grid-template-columns:22px minmax(0,1fr);padding:0 2px}.resource-item strong{font-size:17px}.resource-item .resource-capacity,.resource-item .resource-income{font-size:9px}.resource-item .resource-emblem{width:22px}}
#kingdom-plane .building-marker.empty strong{white-space:normal}
#kingdom-plane .building-marker:focus-visible{outline:2px solid #f4d995;outline-offset:4px}
.kingdom-scene .scene-heading{top:14px;left:auto;right:16px;max-width:min(260px,calc(100% - 84px));z-index:1;padding:6px 10px;background:linear-gradient(90deg,#0b211cb3,#0b211c55,transparent);border-left:2px solid #c5a16a99;border-radius:0}
.kingdom-scene .scene-heading h2{font-size:24px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kingdom-scene .scene-heading .eyebrow{font-size:8px;letter-spacing:1.5px}
.kingdom-scene .scene-heading p{font-size:11px;margin-top:4px}
@media(max-width:699px){#build-catalog-button{top:8px;right:10px;left:auto;bottom:auto}.kingdom-scene .scene-heading{left:10px;right:auto;top:10px;padding:5px 8px;max-width:calc(100% - 158px)}.kingdom-scene .scene-heading h2{font-size:20px}.kingdom-scene .scene-heading p,.kingdom-scene .scene-heading .eyebrow{display:none}}

/* Keep terrain rasterization within the visible screen on mobile GPUs. */
#map-terrain{position:absolute;inset:0;width:100%;height:100%;display:block;visibility:hidden;pointer-events:none}
#map-viewport.terrain-ready>#map-terrain{visibility:visible}
#map-viewport.terrain-ready>#map-plane{background:none}
#map-plane{will-change:auto}
/* Simplify only while the camera moves; retain separate, legible UI artwork. */
#map-viewport.map-moving .map-piece :is(.world-site-sprite,.world-castle-sprite,.piece-emblem),
#map-viewport.map-moving .map-march .march-party{filter:none}
#map-viewport.map-moving .map-piece.cooldown .world-site-sprite{filter:saturate(.5)}
#map-viewport.map-moving .map-piece.selected::before{box-shadow:none}
#map-viewport,#kingdom-viewport{overflow:clip}
#world-scene,#map-viewport,.map-piece,#minimap{touch-action:none}
#world-scene.dragging #map-viewport{cursor:grabbing}

/* Expedições e menus compactos, preservando controles de toque com 44 px. */
.sheet-heading{padding:5px 14px 6px;gap:8px}.sheet-heading h2{font-size:20px;line-height:1.15}.sheet-heading .eyebrow{font-size:8px;letter-spacing:1.4px}.sheet-content{padding:9px 14px 16px;font-size:13px}.sheet-content p{font-size:13px;line-height:1.4}.sheet-content h3{font-size:18px}.sheet-content .panel-intro{font-size:13px;line-height:1.4;margin-bottom:7px!important}.sheet-content .ornament{font-size:18px;margin:11px 0 7px}.sheet-content .primary-button,.sheet-content .danger-button{font-size:16px;min-height:44px;padding:7px 10px}.sheet-content .secondary-button{font-size:15px;min-height:44px;padding:7px 10px}.sheet-content .tabs button{font-size:15px}.sheet-content .metric-line{font-size:12px;padding:6px 0}.sheet-content .metric-line strong{font-size:13px}.sheet-content .stat-grid{margin:8px 0;gap:4px}.sheet-content .stat-cell{padding:5px 3px}.sheet-content .stat-cell strong{font-size:20px}.sheet-content .notice{padding:8px 9px;font-size:12px;margin:8px 0}.sheet-content .button-row{gap:7px;margin-top:7px}.sheet-content .stepper{gap:3px}.sheet-content .stepper button{position:relative;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:0;background:radial-gradient(circle closest-side,#154934 0 93%,#a78a53 95% 100%,transparent 101%) center/32px 32px no-repeat;box-shadow:none;font-size:22px;line-height:1;color:#ffe7b8}.sheet-content .stepper input{font-size:16px;height:44px;min-height:44px}.sheet-content .expedition-row{min-height:50px;padding:2px 0;gap:7px}.sheet-content .expedition-row .unit-label{font-size:13px;line-height:1.3;gap:6px;min-width:0}.sheet-content .expedition-row .unit-label .icon{width:19px;height:21px}.sheet-content .expedition-row .unit-label small{font-size:11px;line-height:1.3}.sheet-content .expedition-row .stepper{gap:2px;flex-shrink:0}.sheet-content .expedition-row .stepper input{width:40px;min-width:40px;padding:0}.sheet-content .checkbox-row{font-size:13px;line-height:1.3;padding:7px 0;min-height:44px;gap:8px}.sheet-content .checkbox-row input{flex-shrink:0;width:19px;height:19px}.sheet-content .expedition-presets{margin:5px 0 8px!important;padding-top:4px}.sheet-content .expedition-presets summary{font-size:16px;line-height:1.25;min-height:44px;padding:10px 0}.sheet-content .expedition-presets .muted{font-size:11.5px;line-height:1.35}.sheet-content .preset-fields{gap:7px;margin-top:7px}.sheet-content .preset-fields label{font-size:11px}.sheet-content .preset-fields input,.sheet-content .preset-fields select{font-size:16px;height:44px;min-height:44px;margin-top:3px;padding:6px 8px}.sheet-content .expedition-presets .button-row{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:7px}.sheet-content .expedition-presets .secondary-button{font-size:14px;min-height:44px;padding:6px 8px}.sheet-content .chance-row{gap:7px;margin:9px 0}.sheet-content .chance-row>div{padding:7px 8px}.sheet-content .chance-row strong{font-size:18px}.sheet-content .chance-row small{font-size:10px}.game-modal .modal-title{font-size:26px}.game-modal .primary-button,.game-modal .secondary-button{font-size:16px;min-height:44px}

/* Map art shares the march clock; gathering workers use prepared walking frames. */
#map-routes{z-index:1}#map-pieces{z-index:2}
#map-marches{position:absolute;inset:0;pointer-events:none;z-index:3}
.march-route{fill:none;stroke:#edc476;stroke-width:2.5;stroke-dasharray:2 8;stroke-linecap:round;opacity:.78;pointer-events:none}
.march-route.enemy{stroke:var(--red)}.march-route.returning{opacity:.6}.march-route.selected{stroke-width:3.5;opacity:1}
.map-march{position:absolute;width:96px;height:86px;min-height:44px;padding:0;margin:-70px 0 0 -48px;transform:scale(calc(1 / var(--map-zoom,.44)));transform-origin:48px 70px;pointer-events:auto;display:flex;align-items:center;flex-direction:column;justify-content:flex-end;gap:0;color:#ffe4a7;text-shadow:0 1px 2px #120e0a;isolation:isolate;touch-action:none}
.map-march:is(.civilian,.spy){--march-art-scale:.6}
.map-march.worker-walk{--march-art-scale:1.2}
.map-march::before{content:'';position:absolute;left:50%;bottom:14px;width:calc(90px * var(--march-art-scale,1));height:calc(22px * var(--march-art-scale,1));transform:translateX(-50%);z-index:-1;pointer-events:none;background:radial-gradient(ellipse,#deca9138 0%,#cdb47b1c 43%,transparent 73%);border-radius:50%}
.map-march .march-party{display:none;flex:none;width:calc(110px * var(--march-art-scale,1));height:calc(73px * var(--march-art-scale,1));object-fit:contain;transform:scaleX(var(--march-facing,1));filter:brightness(1.1) drop-shadow(0 2px 2px #11190d88);pointer-events:none;user-select:none;-webkit-user-drag:none}
.map-march.art-ready .march-party{display:block}.map-march.art-ready .march-party-fallback{display:none}
.map-march .march-party-fallback{height:calc(58px * var(--march-art-scale,1));min-width:calc(48px * var(--march-art-scale,1));display:grid;place-items:center;font:calc(42px * var(--march-art-scale,1)) Georgia,serif;color:#f1d38e;text-shadow:0 2px 3px #0b190d}
.map-march.depleted .march-party{display:none}
.map-march.depleted .march-party-fallback{display:grid}
.map-march .march-workers{display:none;width:calc(40px * var(--march-art-scale,1));height:calc(46px * var(--march-art-scale,1));fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.map-march.civilian .march-workers{display:block}.map-march.civilian .march-flag{display:none}
/* Reserve the marker footprint while keeping the animation clear; ETA stays in its details. */
.map-march .march-label{visibility:hidden;display:block;white-space:nowrap;font:600 11px/1.25 var(--sans);padding:3px 7px;border:1px solid #c49a58;border-radius:3px;background:linear-gradient(#45351eee,#261c13f2);box-shadow:0 2px 3px #0c130d77;pointer-events:none}
.map-march.enemy .march-label{color:#ffe1cf;border-color:#dc9277;background:linear-gradient(#6a352eee,#391917f2)}
.map-march.returning .march-label{border-style:dashed}.map-march.selected{z-index:2}
.map-march.selected .march-label{box-shadow:0 0 0 2px #f9d383,0 2px 5px #1118}
.map-march:focus-visible{outline:2px solid #ffe19a;outline-offset:3px;border-radius:4px}
.march-popover{--march-serif:'Times New Roman',Georgia,serif;position:absolute;z-index:15;width:370px;max-width:calc(100% - 16px);max-height:calc(100% - var(--realm-chat-height,0px) - 16px);overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding:6px 10px;color:#382612;font-family:var(--march-serif);background:radial-gradient(ellipse at 15% 22%,#fff2cd6b,transparent 35%),radial-gradient(ellipse at 85% 80%,#b681362e,transparent 65%),repeating-linear-gradient(33deg,#fff2 0,#fff2 1px,transparent 1px,transparent 4px),#efe0bf;border:10px solid transparent;border-image:url('./assets/march-details-frame-v1.svg') 24 / 14px / 0 stretch;border-radius:5px;box-shadow:0 5px 18px #10190f88;text-shadow:none;scrollbar-color:#a08350 transparent;scrollbar-width:thin}
.march-popover-heading{position:relative;display:flex;align-items:center;gap:8px;margin:0 0 8px;padding:0 0 8px;border-bottom:1px solid #a58143}
.march-popover-heading:after{content:'';position:absolute;width:7px;height:7px;bottom:-5px;left:50%;background:#9b773d;border:2px solid #efe0bf;transform:translateX(-50%) rotate(45deg)}
.march-popover h3{font:700 28px/1 var(--march-serif);flex:1;min-width:0;overflow-wrap:anywhere}
.march-popover-emblem{display:grid;place-items:center;flex:none;order:-1;width:48px;height:50px;color:#82602e}.march-popover-emblem>.icon{width:36px;height:36px;filter:drop-shadow(0 1px #fff2cf)}
.march-popover-emblem[data-march-emblem="swords"]{background:url('./art-web/battle-role-attack-v1-2776d417e4.webp') center/48px 48px no-repeat}.march-popover-emblem[data-march-emblem="swords"]>.icon{visibility:hidden}
.march-popover-close{flex:none;width:44px;height:44px;min-height:44px;padding:0;font:34px/1 var(--sans);color:#76501d;border:1px solid transparent;border-radius:3px}
.march-popover dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:0}
.march-popover dl>div{grid-column:1/-1;display:grid;grid-template-columns:72px minmax(0,1fr);gap:8px;padding:7px 0;border-bottom:1px solid #9d793f33;font-size:12px;line-height:1.35}
.march-popover dl>.march-popover-location{display:grid;grid-template-columns:40px 66px minmax(0,1fr);grid-template-rows:1fr;column-gap:6px;row-gap:0;position:relative;min-height:90px;margin:0 0 12px;padding:0 8px;border:1px solid #b3945d77;border-radius:6px;background:linear-gradient(110deg,#d9bd811c,#fff5d52e);box-shadow:inset 0 1px 2px #94723a12}
.march-popover .march-popover-location>dt{grid-column:1;grid-row:1;align-self:start;font:400 14px/1.15 var(--march-serif);color:#48311d;white-space:nowrap;margin:8px 0 0}
.march-popover .march-popover-location>dd{display:contents}
.march-popover-location-art{display:grid;grid-column:2;grid-row:1;align-self:center;place-items:center;width:66px;height:70px;pointer-events:none}
.march-popover-location-art>:is(img,.building-sprite,.site-sprite,.map-location-object-art){position:relative;inset:auto;transform:none;display:block;width:66px;height:66px;max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 2px 1px #42331326)}
.march-popover-from:before{content:'';position:absolute;left:24px;top:36px;width:7px;height:7px;border-radius:50%;background:#967642;pointer-events:none}
.march-popover-from:after{content:'';position:absolute;left:27px;top:45px;bottom:-10px;border-left:2px dotted #a78a53;pointer-events:none}
.march-popover-to:before{content:'';position:absolute;left:25px;top:-5px;width:5px;height:5px;border:1px solid #967642;background:var(--paper,#ead8b1);transform:rotate(45deg);pointer-events:none}
.march-popover-location-art>.world-site-sprite{position:relative;inset:auto;transform:none;display:block;width:100%;height:auto;aspect-ratio:3/2}
.march-popover-location-art>.objective-world-art{position:relative;inset:auto;transform:none;display:grid;place-items:center;width:100%;height:100%;pointer-events:none}.march-popover-location-art>.objective-world-art>:is(img,.building-sprite){display:block;width:100%;height:100%;object-fit:contain}
.march-popover-location-art>.icon{width:34px;height:34px;color:#977643}
.march-popover-location-copy{grid-column:3;grid-row:1;display:flex;flex-direction:column;align-items:flex-start;align-self:center;min-width:0;gap:0}
.march-popover-location-name{display:flex;align-items:flex-end;max-width:100%;min-height:44px;padding:2px 0;color:var(--green,#134a3e);font:700 20px/22px var(--march-serif);text-align:left;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}
.march-popover-map-link{display:flex;align-items:center;justify-content:flex-start;min-height:44px;max-width:100%;padding:0;color:#21473d;border:0;background:none;font:700 14px/1.15 var(--march-serif);text-align:left}
.march-popover-map-caption{display:flex;align-items:center;gap:6px;min-height:28px;padding:3px 8px;border:1px solid #b195615c;border-radius:4px;background:#fff0cb30}
.march-popover-map-pin{display:block;width:15px;height:18px;flex:none;color:#8a6d38}.march-popover-map-pin svg{display:block;width:100%;height:100%;fill:currentColor}
.march-popover dl>:is(.march-popover-arrival,.march-popover-remaining){grid-column:auto;grid-template-columns:minmax(0,1fr);align-content:start;gap:2px;padding:6px 8px 6px 0;border-top:1px solid #a1814777;border-bottom:1px solid #a1814777}
.march-popover dl>.march-popover-remaining{padding-left:18px;position:relative}.march-popover-remaining:before{content:'';position:absolute;left:0;top:12px;bottom:10px;border-left:1px solid #a1814788}.march-popover-remaining:after{content:'';position:absolute;left:-3px;top:-4px;width:5px;height:5px;background:#aa8345;border:2px solid #f5ead0;transform:rotate(45deg)}
.march-popover :is(.march-popover-arrival,.march-popover-remaining)>dt{font:400 14px/1.2 var(--march-serif);color:#5e472c}
.march-popover :is(.march-popover-arrival,.march-popover-remaining)>dd{font:700 18px/1.2 var(--march-serif);font-variant-numeric:lining-nums tabular-nums;color:#3d2a19}
:where(#app,#title-screen,.game-modal,#toast){-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
:where(input,textarea,[contenteditable]:not([contenteditable="false"])){-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
:where(#app,#title-screen,.game-modal) :is(img,svg){-webkit-user-drag:none}
.march-popover dt{color:#79613b}.march-popover dd{margin:0;font-weight:400;overflow-wrap:anywhere}
.march-popover dl>.march-popover-attacker{grid-template-columns:minmax(0,1fr);gap:2px;margin-bottom:10px}
.march-popover .march-popover-units{display:flex;align-items:center;gap:10px;min-height:36px;font:400 15px/1.2 var(--march-serif);margin:4px 0;color:#4c361d}
.march-popover-units:before{content:'';display:block;flex:none;width:38px;height:42px;background:url('./assets/march-details-troops-v1.svg') center/contain no-repeat}
.march-popover .march-popover-note{font-size:11px;line-height:1.4;margin:8px 0;color:#695334;font-style:italic}
.march-popover-movements{position:relative;display:block;width:100%;min-height:46px;margin-top:4px;padding:4px 8px;border:7px solid transparent;border-image:url('./assets/march-details-button-v1.svg') 16 / 9px / 0 stretch;background:linear-gradient(110deg,#f7e7bc99,#dfc99a66),var(--ornate-paper);background-size:100% 100%,180% 400%;background-position:center;box-shadow:0 2px 3px #4a351a1c;color:#4b3019;font:700 18px/1.2 var(--march-serif);border-radius:4px}
.march-popover :is(.march-popover-close,.march-popover-map-link,.march-popover-movements):not(:disabled):hover{background-color:#c7a76533}.march-popover .march-popover-location-name:not(:disabled):hover{color:#087150}
.march-popover button:focus-visible{outline:2px solid #1b6650;outline-offset:2px}.march-popover button:disabled{opacity:.58;cursor:default}
@media(max-width:699px){.map-march{width:86px;margin-left:-43px;transform-origin:43px 70px}.map-march::before{width:calc(80px * var(--march-art-scale,1))}.map-march .march-party{width:calc(100px * var(--march-art-scale,1));height:calc(67px * var(--march-art-scale,1))}.map-march .march-label{font-size:10px;padding:3px 6px}}
/* Keep the former 222px mobile footprint with the approved ornamental art. */
@media(max-width:699px){
 .march-popover{width:222px;padding:4px;border-width:8px;border-image-width:11px}
 .march-popover-heading{gap:4px;margin-bottom:6px;padding-bottom:5px}
 .march-popover h3{font-size:19px;line-height:1.05}
 .march-popover-emblem{width:26px;height:32px}.march-popover-emblem>.icon{width:26px;height:26px}
 .march-popover-emblem[data-march-emblem="swords"]{background-size:30px 30px}
 .march-popover-close{width:30px;height:40px;min-height:40px;font-size:27px}
 .march-popover dl>.march-popover-location{grid-template-columns:22px 34px minmax(0,1fr);column-gap:4px;min-height:62px;margin-bottom:8px;padding:2px 5px;border-radius:4px}
 .march-popover .march-popover-location>dt{font-size:11px;margin-top:4px}
 .march-popover-location-art,.march-popover-location-art>:is(img,.building-sprite,.site-sprite,.map-location-object-art){width:34px;height:38px}
 .march-popover-location-name{font-size:14px;line-height:16px;min-height:24px;padding:0}
 .march-popover-map-link{min-height:32px;font-size:12px}
 .march-popover-map-caption{gap:4px;min-height:24px;padding:2px 4px;border-radius:3px}
 .march-popover-map-pin{width:11px;height:14px}
 .march-popover-from:before{left:14px;top:25px;width:5px;height:5px}
 .march-popover-from:after{left:16px;top:33px;bottom:-7px;border-left-width:1px}
 .march-popover-to:before{left:14px;width:4px;height:4px}
 .march-popover dl>:is(.march-popover-arrival,.march-popover-remaining){gap:2px;padding:5px 2px}
 .march-popover dl>.march-popover-remaining{padding-left:10px}
 .march-popover :is(.march-popover-arrival,.march-popover-remaining)>dt{font-size:11px}
 .march-popover :is(.march-popover-arrival,.march-popover-remaining)>dd{font-size:14px}
 .march-popover .march-popover-units{min-height:26px;gap:6px;font-size:12px;margin:3px 0}
 .march-popover-units:before{width:24px;height:28px}
 .march-popover-movements{min-height:40px;margin-top:3px;padding:3px 5px;font-size:15px;border-width:6px;border-image-width:8px}
 .march-popover .march-popover-note{font-size:10px;margin:5px 0}
}
@media(forced-colors:active){.march-route{stroke:LinkText}.march-route.enemy{stroke:Mark}.map-march .march-label,.march-popover{color:CanvasText;background:Canvas;border-color:CanvasText;text-shadow:none}.map-march .march-party{filter:none}.march-popover button{color:LinkText;border-color:ButtonText}.march-popover .march-popover-location{background:Canvas;border-color:CanvasText}}

/* Postos compartilham o pergaminho, recursos ilustrados e métricas das expedições. */
.gathering-site{margin:8px 0;padding:8px 0;border-top:1px solid #8d6d3a66;border-bottom:1px solid #8d6d3a66}
.gathering-heading{display:flex;align-items:center;gap:9px;min-width:0}
.gathering-heading>.report-resource{display:grid;place-items:center;flex:none;width:40px;height:40px}
.gathering-heading>div{min-width:0}.gathering-heading strong{display:block;font-size:13px;line-height:1.35;overflow-wrap:anywhere}.gathering-heading small{display:block;font-size:11px;line-height:1.4;margin-top:2px}
.gathering-heading .icon{width:26px;height:26px}.gathering-progress{margin:3px 0 5px}.gathering-progress>i{transition:none}
.sheet-content .gathering-estimate .muted{font-size:11px;line-height:1.4}
.sheet-content .gathering-worker-art{width:64px;height:72px;flex:none;object-fit:contain}
.sheet-content .gathering-worker-art+div{flex:1;min-width:0}
.destination-copy .destination-occupation{color:#594329;overflow-wrap:anywhere}
.map-piece .site-occupant{position:absolute;left:50%;top:0;transform:translateX(-50%);display:flex;align-items:center;gap:calc(3px / var(--map-zoom,.44));max-width:calc(132px / var(--map-zoom,.44));padding:calc(2px / var(--map-zoom,.44)) calc(5px / var(--map-zoom,.44));font:600 calc(10px / var(--map-zoom,.44))/1.25 var(--sans);white-space:nowrap;color:#fff0c7;background:#163629ed;border:1px solid #d4b46b;z-index:4;pointer-events:none;text-shadow:0 1px 2px #102015}
.map-piece .site-occupant>span{overflow:hidden;text-overflow:ellipsis}.map-piece .site-occupant>.icon{width:calc(12px / var(--map-zoom,.44));height:calc(12px / var(--map-zoom,.44));flex:none}
.map-piece.occupied-rival .site-occupant{background:#602e29ed;border-color:#e5a37e}
.march-popover dl>div[hidden]{display:none}
.map-march .march-spy-symbol{display:none;width:calc(38px * var(--march-art-scale,1));height:calc(38px * var(--march-art-scale,1));fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.map-march.spy .march-spy-symbol{display:block}.map-march.spy .march-flag,.map-march.spy .march-workers{display:none}

/* Labels describe markers without enlarging their hit areas or intercepting
   clicks on neighbouring destinations, including before the art loads. */
#map-pieces .map-piece .piece-label{position:absolute;left:50%;bottom:calc(-28px / var(--map-zoom,.44));transform:translateX(-50%);width:max-content;max-width:calc(180px / var(--map-zoom,.44));white-space:normal;overflow-wrap:anywhere;line-height:1.2;text-align:center;pointer-events:none}
#map-pieces .map-piece.castle .piece-label{bottom:0}

/* Campaign rooms keep the parchment controls and touch target rhythm. */
.room-form{display:grid;gap:14px;margin:18px 0}.room-form label{display:grid;gap:7px;font-size:13px;font-weight:600}.room-form input,.room-form select,.room-participant select{width:100%;min-width:0;min-height:44px;padding:9px 11px;border:1px solid #a58755;border-radius:3px;background:#f1e2bfc9;color:#493a20;font:16px var(--sans)}
.room-invite{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;padding:15px;border:1px solid #9d7845;background:#a2804212;margin:16px 0}.room-invite>span{width:100%;text-align:center;font-size:12px}.room-invite>strong{letter-spacing:2px;font:700 23px var(--serif)}.room-participants{display:grid;gap:10px;margin:18px 0}.room-participant{padding:13px;border:1px solid #ad8f5866;background:#b4955610;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;align-items:center}.room-participant>div{display:flex;align-items:center;flex-wrap:wrap;gap:7px}.room-participant .icon{width:22px;height:22px;flex:none}.room-participant small{font-size:11px;color:#6d5a3b}.room-participant>span,.room-participant>small{grid-column:1;font-size:12px}.room-participant>label{grid-column:2;grid-row:1/4;font-size:11px;display:grid;gap:5px}.room-participant select{font-size:13px;max-width:125px}.recovery-code{display:block;overflow-wrap:anywhere;padding:14px;border:1px solid #a78a52;background:#fbf1d6;user-select:text;-webkit-user-select:text;font-size:16px;line-height:1.6;margin-top:12px}.title-access{display:flex;justify-content:center;gap:16px;flex-wrap:wrap}.title-access .title-retry{min-height:44px;margin:0;padding:0 3px}
.objective-summary{padding:10px 0 18px;border-bottom:1px solid #95723d66;margin-bottom:16px}.objective-illustration{float:right;width:130px;height:130px;margin:0 0 10px 12px}.objective-illustration .building-sprite{width:100%;height:100%}.objective-summary h3{font:700 27px var(--serif);margin:7px 0}.objective-summary p{font-size:14px;line-height:1.6}.objective-bonus{clear:both;padding:13px;border:1px solid #b99a58;background:#59714814;margin:15px 0}.objective-bonus h4{display:flex;gap:8px;align-items:center;font:700 21px var(--serif)}.objective-bonus h4 .icon{width:24px;height:24px}.objective-bonus small{color:#6b5634;font-size:12px}.garrison-row{padding:13px 0;border-bottom:1px solid #90734344}.garrison-row small{display:block;font-size:12px;line-height:1.6;margin:5px 0}.garrison-row .button-row{margin-top:8px}.garrison-row .small-button{min-height:44px}
/* Territory art grows upward from the measured ground anchor, unlike ordinary sites. */
#map-pieces .map-piece:is(.fortress,.shrine){width:240px;height:40px;min-height:40px;min-width:0;display:block;z-index:auto;padding:0;transform:none;margin-left:-120px;margin-top:-20px}
/* Nearby destinations keep priority over the transparent edges of territorial art. */
.map-piece:is(.hunt,.camp,.resource){z-index:3}
/* The art extends above its ground anchor and must remain part of the button's hit area. */
.objective-world-art{display:block;position:absolute;z-index:2;bottom:20px;left:50%;width:var(--objective-art-width,650px);height:var(--objective-art-height,480px);transform:translateX(-50%);pointer-events:auto}.objective-world-art .building-sprite{width:100%;height:100%}.map-piece.shrine .objective-world-art{width:var(--objective-art-width,295px);height:var(--objective-art-height,230px)}
.map-piece.shrine>.map-owner-name{bottom:calc(var(--objective-art-height,230px) + 20px)}.map-piece.fortress>.map-owner-name{bottom:calc(var(--objective-art-height,480px) + 20px)}
#map-pieces .map-piece:is(.fortress,.shrine)>.piece-label{position:absolute;left:50%;top:24px;bottom:auto;transform:translateX(-50%);white-space:nowrap;margin:0;font-size:max(23px,calc(12px / var(--map-zoom,.35)))}
#map-pieces .map-piece:is(.fortress,.shrine)>.piece-emblem{position:absolute;top:0;left:50%;transform:translateX(-50%);width:42px;height:45px;z-index:3}.map-piece.allied>.piece-emblem{background:#254d67;color:#fff1be}.map-piece.allied .map-owner-name{background:#254d67e6}
#map-viewport.map-moving .objective-world-art .building-sprite{filter:none}
@media(max-width:420px){.room-participant{padding:11px;gap:5px 8px}.room-participant>div strong{font-size:14px}.room-participant select{max-width:110px}.objective-illustration{width:105px;height:105px}.objective-summary h3{font-size:24px}.room-invite>strong{font-size:21px}}

.room-participant .room-ready-state{flex-basis:100%;font:700 13px var(--sans);color:#8a3025;overflow-wrap:anywhere}.room-participant .room-ready-state[data-ready="true"]{color:#234f3c}.room-readiness{margin:18px 0}.room-readiness .primary-button,.room-readiness .secondary-button{width:100%}

/* Ownership identity must not sit underneath nearby resource/animal/renegade art.
   Keep the existing board anchors and actual sprite/hit dimensions unchanged. */
#map-pieces .map-piece.castle{z-index:auto;transform:none;margin-left:-135px;margin-top:-137px}
#map-pieces.overview .map-piece.castle,.overview #map-pieces .map-piece.castle{margin-top:-115px}
#map-pieces .map-piece.castle>.world-castle-sprite{z-index:2}
#map-pieces .map-piece>.map-owner-name,#map-pieces .map-piece.castle>.piece-label{z-index:4}
#map-pieces .map-piece:is(.selected,:focus-visible){z-index:6}
#map-pieces .map-piece:focus-visible{outline:calc(2px / var(--map-zoom,.44)) solid var(--gold);outline-offset:calc(4px / var(--map-zoom,.44))}
#map-pieces .map-piece .map-owner-name{background:#11291e;border-color:#dfc17b;pointer-events:auto;width:max-content}
#map-pieces .map-piece.enemy .map-owner-name{background:#4b2827}
#map-pieces .map-piece.allied .map-owner-name{background:#254d67}
#map-pieces .map-piece:is(.selected,:focus-visible) .map-owner-name{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
/* Only named identity/selected labels are click targets, not the empty space
   around a castle or the transparent edges of a neighbouring illustration. */
#map-pieces .map-piece.castle>.piece-label,
#map-pieces .map-piece:is(.selected,:focus-visible)>.piece-label{pointer-events:auto}

/* At overview zoom, empty button rectangles overlap before their painted sites do.
   Route input through the art/badges so one empty rectangle cannot eat a neighbour's tap. */
#map-pieces .map-piece:is(.resource,.hunt,.camp){pointer-events:none}
#map-pieces .map-piece:is(.resource,.hunt,.camp)>:is(.world-site-sprite,.piece-emblem,.difficulty){pointer-events:auto}

/* Initial protection follows the castle's art and never creates a new hit area.
   A static translucent dome keeps the board legible, including reduced motion. */
.map-piece:is(.castle,.wonder)>.map-protection-shield,.persistent-protection-shields>.map-protection-shield{position:absolute;left:50%;bottom:-4px;width:340px;height:310px;transform:translateX(-50%);border:2px solid #f5dd9fa6;border-radius:50% 50% 46% 46%;background:radial-gradient(ellipse at 30% 18%,#fff7dc45,transparent 34%),radial-gradient(ellipse at 50% 52%,transparent 38%,#d7b06b14 72%,#f5dd9f47 100%);box-shadow:inset 0 0 18px #f5dd9f33,0 0 10px #d7b06b55;z-index:3;pointer-events:none;user-select:none}
.map-protection-shield::after{content:'';position:absolute;left:8%;right:8%;bottom:3%;height:21%;border:1px solid #f5dd9f66;border-top-color:#f5dd9f26;border-radius:50%;background:radial-gradient(ellipse,transparent 55%,#d7b06b12);pointer-events:none}
.map-piece.castle:has(.fortifications-world)>.map-protection-shield{width:440px;height:328px;bottom:-8px}
.overview .map-piece:is(.castle,.wonder)>.map-protection-shield{width:290px;height:266px}
.overview .map-piece.castle:has(.fortifications-world)>.map-protection-shield{width:390px;height:292px}
.map-piece.castle:has(.map-protection-shield)>.piece-emblem{z-index:4}

/* Own lobby identity uses the existing participant card and action styling. */
.room-self-name>div{display:grid;min-width:0}.room-self-name strong{overflow-wrap:anywhere}.room-self-name>button{grid-column:2;grid-row:1;min-height:44px}

/* Waiting-room moderation shares the existing wax seal and touch target. */
.room-participant-name{display:flex;align-items:center;gap:7px;min-width:0;width:100%}.room-participant-name strong{min-width:0;overflow-wrap:anywhere}
.game-modal[data-variant='room'] .room-kick-button{flex:none;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:0;box-shadow:none;color:#f7d796;background:transparent url('./art-web/governor-regalia-v1-d5b7eac8bf.webp') right center/200% 100% no-repeat;filter:drop-shadow(0 2px 2px #28160780)}
.game-modal[data-variant='room'] .room-kick-button .icon{width:18px;height:18px}
@media(forced-colors:active){.game-modal[data-variant='room'] .room-kick-button{background:ButtonFace;color:ButtonText;border:1px solid ButtonText;filter:none}}

.game-modal[data-variant='room'] .room-kick-button::before,.game-modal[data-variant='room'] .room-kick-button::after{content:none}
.game-modal[data-variant='room'] .room-chat-button{display:flex;width:100%;align-items:center;justify-content:center;gap:10px;position:relative;margin:18px 0;min-height:48px}
.room-chat-unread{display:inline-grid;place-items:center;min-width:24px;height:24px;border:1px solid #f1d08a;border-radius:50%;background:radial-gradient(circle at 35% 28%,#bf4938,#70100c);box-shadow:0 0 0 1px #390c08;font:700 13px var(--sans);color:#fff0c7}
.room-chat-unread[hidden]{display:none}
#covert-production-status:empty{display:none}
.covert-production-notice{margin:0;padding:5px 10px;background:var(--parchment,#efdfbd);color:var(--ink,#362819);border-bottom:1px solid #987b49;font-size:12px;text-align:center}
