@font-face { font-family:Inter; src:url(assets/inter-latin.woff2) format("woff2"); font-weight:100 900; font-display:swap }
@font-face { font-family:"Barlow Condensed"; src:url(assets/barlow-condensed-600.woff2) format("woff2"); font-weight:600; font-display:swap }
@font-face { font-family:"Barlow Condensed"; src:url(assets/barlow-condensed-700.woff2) format("woff2"); font-weight:700; font-display:swap }
:root {
  color-scheme:light;
  --paper:#f4efe2; --paper-light:#fcf8ed; --ground:#e5dfcd; --hair:#c5bdab;
  --ink:#283234; --soft:#565c56; --oxide:#934332; --river:#3f6277;
  --sans:Inter,"Segoe UI",sans-serif; --narrow:"Barlow Condensed",Inter,sans-serif;
  --display:var(--narrow); --header:65px; --footer:64px;
}
* { box-sizing:border-box }
html,body { height:100%; margin:0; overscroll-behavior:none }
body { color:var(--ink); background:var(--paper); font:400 16px/1.35 var(--sans); -webkit-tap-highlight-color:transparent }
button,input,select { font:inherit }
button { border:0; color:inherit; background:none; cursor:pointer; padding:0; touch-action:manipulation }
button:disabled { opacity:.5; cursor:default }
button:focus-visible,a:focus-visible,input:focus-visible,canvas:focus-visible,summary:focus-visible { outline:3px solid #2d6384; outline-offset:2px }
button:active:enabled { filter:brightness(.93) }
[hidden] { display:none!important }
.sr { position:absolute!important; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; clip-path:inset(50%) }
i[data-i] { display:inline-flex; font-style:normal; flex:none }
.icon,.standard,.emblem { display:inline-block; flex:none; vertical-align:middle }
.icon { width:23px; height:23px }
.standard,.emblem { width:26px; height:29px }
#shell { height:100vh; height:100dvh; display:grid; grid-template-rows:calc(var(--header) + env(safe-area-inset-top)) minmax(0,1fr) calc(var(--footer) + env(safe-area-inset-bottom)); overflow:hidden }
.topbar,.dock { position:relative; z-index:5; display:flex; align-items:center; background:var(--paper-light) }
.topbar { padding:env(safe-area-inset-top) max(25px,env(safe-area-inset-right)) 0 max(26px,env(safe-area-inset-left)); gap:22px; border-bottom:2px solid #353d37 }
.brand { display:inline-flex; align-items:center; gap:9px; color:var(--ink); text-decoration:none; white-space:nowrap }
.brand img { width:33px; height:37px }
.brand span { font:700 33px/.9 var(--narrow); letter-spacing:.075em; text-transform:uppercase }
.top-wallet,.currency,.profile-button { display:flex; align-items:center }
.top-wallet { margin-left:auto; font-variant-numeric:tabular-nums }
.currency { gap:7px; padding:0 15px; border-right:1px solid var(--hair); white-space:nowrap }
.currency:last-child { padding-right:0; border:0 }
.currency .icon { width:26px; height:26px }
.currency b { font:600 19px/1 var(--narrow) }
.currency em { font:400 13px var(--sans); color:var(--soft) }
.profile-button { gap:9px; min-height:40px; padding-left:19px; border-left:1px solid var(--hair); font-size:15px; font-weight:600 }
.profile-seal { display:grid; place-items:center; width:30px }
.profile-seal .icon,.profile-seal .standard { width:30px; height:32px }
.tiny .icon { width:11px; height:11px }
#stage { position:relative; isolation:isolate; overflow:hidden; background:#777762  }
#basemap,#flat-map,#annotations,.map-shading { position:absolute; inset:0; width:100%; height:100% }
#basemap { z-index:0 }
#flat-map { z-index:1; touch-action:none; cursor:grab }
#flat-map:active { cursor:grabbing }
.map-shading { z-index:2; pointer-events:none; box-shadow:inset 0 0 1px 1px #343b3335 }
#annotations { z-index:3; overflow:hidden; pointer-events:none }
.maplibregl-canvas { outline:none }
.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right { display:none }
.sector-heading { position:absolute; z-index:4; left:max(25px,env(safe-area-inset-left)); top:22px; padding:10px 15px 8px; background:var(--paper-light); border-left:4px solid var(--oxide); box-shadow:1px 2px 0 #292e2959; pointer-events:none }
.sector-heading h1 { font:700 35px/1.05 var(--display); letter-spacing:0; margin:0 }
.region-line { display:flex; align-items:center; gap:4px; font-size:13px; color:var(--soft); margin:3px 0 0 }
.region-line .icon { width:13px; height:13px }
.mode-button { display:flex; align-items:center; gap:5px; pointer-events:auto; margin:5px -5px -4px; padding:2px 5px; min-height:31px; color:var(--ink) }
.mode-button b { font:600 13px var(--sans) }
.mode-button .icon { width:19px; height:19px }
.mode-button i:last-child .icon { width:10px; height:10px; margin-left:2px }
.mode-button.live { color:#2b5872 }
.compass { position:absolute; right:max(23px,env(safe-area-inset-right)); top:18px; width:56px; height:56px; z-index:4; color:var(--ink); pointer-events:none }
.compass-ring { position:absolute; inset:0; border:1.5px solid var(--ink); border-radius:50%; background:var(--paper); box-shadow:0 1px 2px #20272255 }
.compass-ring::after,.compass-ring::before { content:""; position:absolute; inset:50% 4px auto; height:1px; border-width:0 3px; border-color:#555a52; border-style:solid }
.compass-ring::after { transform:rotate(90deg) }
.compass>span { position:absolute; top:2px; left:0; right:0; text-align:center; font:700 10px/1 var(--narrow) }
.compass svg { position:absolute; width:37px; height:37px; left:9px; top:12px }
.instruments { position:absolute; top:90px; right:max(27px,env(safe-area-inset-right)); z-index:4; display:flex; width:46px; flex-direction:column; align-items:center; background:var(--paper-light); border:1px solid #485046; box-shadow:1px 2px 0 #252e284d }
.instruments button { position:relative; width:44px; height:44px; display:grid; place-items:center }
.instruments .icon { width:24px; height:24px }
.instruments button.on::after,.instruments button[aria-expanded=true]::after { content:""; position:absolute; left:2px; top:12px; bottom:12px; border-left:2px solid var(--oxide) }
.tool-divider { width:29px; height:1px; background:var(--hair) }
.map-menu { position:absolute; z-index:7; top:90px; right:82px; width:224px; background:var(--paper-light); border:1px solid var(--ink); padding:14px; box-shadow:2px 3px 0 #20282159 }
.map-menu strong { display:block; font:600 19px var(--narrow); margin-bottom:5px }
.map-menu label { display:flex; align-items:center; justify-content:space-between; border-top:1px solid var(--hair); padding:9px 0; font-size:15px }
.map-menu input { accent-color:var(--oxide); width:18px; height:18px }
.map-label,.map-piece,.map-player { position:absolute; top:0; left:0; will-change:transform }
.map-label { z-index:1 }
.map-label>span { display:block; transform:translate(-50%,-50%); white-space:nowrap; font:700 21px/1 var(--display); color:#fff9e8; text-shadow:0 1px 2px #131c19,0 0 3px #162018,0 1px 5px #1a251c }
.map-label.ville>span { font-size:26px; letter-spacing:.02em }
.map-label.sommet>span,.map-label.lieu>span { font:600 14px/1 var(--sans) }
.map-label.massif>span { font:600 17px/1 var(--narrow); text-transform:uppercase; letter-spacing:.115em }
.map-label.eau>span { font:italic 20px/1 Georgia,serif; color:#e4f2f2; transform:translate(-50%,-50%) rotate(-12deg) }
.map-piece { z-index:2 }
.map-piece.holding { z-index:3 }
.map-piece.has-building { z-index:4 }
.piece-hit { position:absolute; display:block; transform:translate(-15%,-93%); width:39px; height:45px; pointer-events:auto; border:0 }
.piece-hit::before { content:""; position:absolute; bottom:1px; left:-2px; width:15px; height:5px; border-radius:50%; background:#25313363; transform:rotate(-9deg) }
.piece-drawing { display:block; width:100%; height:100%; position:relative; filter:drop-shadow(.6px 1px .5px #12201ccb) }
.piece-drawing>.standard,.building-piece { display:block; width:100%; height:100%; object-fit:contain }
.holding .piece-hit { width:47px; height:54px }
.map-piece.has-building:not(.grouped) .piece-hit { width:var(--building-width,60px); height:auto; aspect-ratio:100/92; transform:translate(-48%,-69%) }
.has-building .piece-hit::before { display:none }
.piece-ensign { position:absolute; width:29%; height:45%; bottom:11%; right:-7% }
.piece-ensign .standard { width:100%; height:100% }
.map-player { z-index:5 }
.pawn-foot { display:block; position:absolute; width:14px; height:6px; left:-7px; top:-2px; border-radius:50%; background:#dfebec; border:1px solid #325668 }
.pawn-drawing { display:block; position:absolute; width:32px; height:37px; transform:translate(-50%,-93%); filter:drop-shadow(1px 1px 1px #253330ae) }
.pawn-drawing .icon { width:100%; height:100% }
.territory { position:absolute; z-index:4; left:max(25px,env(safe-area-inset-left)); bottom:22px; width:325px; background:var(--paper-light); border:1px solid #454c42; box-shadow:2px 3px 0 #29332d68 }
.territory-inner { padding:13px }
.land-name-line { display:flex; align-items:center; gap:11px; min-height:51px; margin-bottom:10px }
.land-title { min-width:0; flex:1 }
.land-name-line h2 { margin:0 0 4px; font:700 25px/1.02 var(--display); letter-spacing:0 }
.owner { display:flex; align-items:center; gap:4px; color:var(--soft); font-size:14px; line-height:1.1 }
.owner .standard,.owner .icon { width:17px; height:18px }
.fold { width:34px; min-height:39px; flex:none; color:var(--ink) }
.fold .icon { width:16px; height:16px }
.parcel-photo,.parcel-model { width:56px; height:52px; flex:none; display:grid; place-items:center }
.parcel-photo { clip-path:polygon(25% 1%,75% 1%,100% 50%,75% 99%,25% 99%,0 50%); background-color:var(--ground) }
.parcel-model .miniature { width:100%; height:100%; object-fit:contain }
.land-numbers { display:flex; gap:20px; border-top:1px solid var(--hair); padding-top:8px; margin:0 0 10px; font-size:14px; color:var(--soft) }
.land-numbers span { display:inline-flex; align-items:center; gap:5px }
.land-numbers .icon { width:18px; height:18px }
.land-numbers b { color:var(--ink); font-weight:600 }
.land-extra,.inline-help { margin:8px 0 10px; color:var(--soft); font-size:14px; line-height:1.38 }
.action,.button-secondary,.button-plain { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:8px 13px; font-weight:600; border:1px solid transparent; border-radius:2px; line-height:1.2 }
.action { background:var(--oxide); color:#fff9eb; border-color:#71372a }
.action .icon { color:#fff7e2 }
.action .icon,.button-secondary .icon,.button-plain .icon { width:23px; height:23px }
.button-secondary { background:var(--paper-light); border-color:#a09889 }
.button-plain { color:var(--oxide); padding:6px; font-size:14px }
.full,.territory .action { width:100% }
.territory .action { justify-content:flex-start }
.action-price { display:flex; align-items:center; gap:4px; margin-left:auto; padding-left:10px; border-left:1px solid #cf9685 }
.action-price .icon { width:18px; height:18px }
.terr-mini { display:flex; align-items:center; width:100%; gap:9px; padding:11px 14px; font-weight:600 }
.terr-mini .icon:last-child { margin-left:auto; width:16px }
.callout-actions { display:flex; justify-content:space-between; gap:6px }
.carto-foot { position:absolute; right:max(22px,env(safe-area-inset-right)); bottom:8px; z-index:4; display:flex; align-items:flex-end; gap:10px; color:white; font-size:12px; font-weight:500; text-shadow:0 1px 3px #17211d,0 1px 5px #17211d }
.carto-foot button { display:flex; gap:4px; align-items:center; min-height:24px; background:#222d28bb; padding:3px 6px; font:inherit }
.carto-foot .icon { width:12px; height:12px }
#scale { display:flex; gap:2px; align-items:center; flex-direction:column; padding:2px }
#scale i { height:4px; width:40px; border:1px solid white; border-top:0; filter:drop-shadow(0 1px 1px #222) }
.dock { justify-content:center; padding-bottom:env(safe-area-inset-bottom); border-top:1px solid #4f584d }
.dock-items { display:flex; align-items:stretch; height:100% }
.dock-items>button { display:flex; align-items:center; justify-content:center; gap:9px; min-width:125px; position:relative; padding:0 16px; font-weight:600 }
.dock-items .icon { width:32px; height:32px }
.dock-items>button.active { color:var(--oxide) }
.dock-items>button.active::after { content:""; position:absolute; left:17%; right:17%; bottom:3px; border-bottom:2px solid var(--oxide) }
#help-button { position:absolute; right:24px; display:flex; align-items:center; gap:7px; font-size:14px; padding:7px }
#help-button .icon { width:23px; height:23px }
.toast { z-index:9; position:absolute; left:50%; bottom:20px; max-width:min(400px,90%); padding:9px 13px; transform:translate(-50%,7px); pointer-events:none; opacity:0; color:var(--paper-light); background:var(--ink); border-left:3px solid #cc9872; transition:transform .16s,opacity .16s; text-align:center; font-size:15px }
.toast.visible { opacity:1; transform:translate(-50%,0) }
dialog { position:fixed; inset:0 0 0 auto; margin:auto 22px auto auto; padding:0; width:442px; max-width:calc(100vw - 32px); max-height:calc(100dvh - 45px); overflow:auto; overscroll-behavior:contain; border:1px solid #444c43; border-radius:2px; color:var(--ink); background:var(--paper-light); box-shadow:3px 5px 0 #2730295c; scrollbar-color:#a79c87 var(--paper-light) }
dialog::backdrop { background:#151c1c6b }
.sheet-inner { padding:21px }
.sheet-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:15px }
.sheet-head h2 { font:700 34px/1.03 var(--display); letter-spacing:0; margin:0; outline:none }
.icon-button { display:grid; place-items:center; width:40px; height:40px; flex:none }
.icon-button .icon { width:20px; height:20px }
.lede,.credits-list { font-size:16px; line-height:1.45; color:var(--soft); margin:0 0 15px }
.form-label { display:block; margin-bottom:5px; color:var(--ink); font-size:15px; font-weight:600 }
input[type=text] { min-height:44px; width:100%; padding:8px 10px; margin-bottom:13px; border:1px solid #8a8b7b; background:#fffdf6; border-radius:2px; color:var(--ink); font-size:16px }
details summary { cursor:pointer }
.rulenote,.guide-item { border-top:1px solid var(--hair); font-size:14px; line-height:1.45 }
.rulenote { padding:11px 1px 1px; margin-top:14px; color:var(--soft) }
.rulenote p,.guide-item p { margin:7px 0 1px }
.guide-item { padding:11px 2px 5px }
.guide-item summary { font-weight:600; color:var(--ink) }
.guide-item p { color:var(--soft) }
.stack { display:grid; gap:5px }
.row-action { display:flex; align-items:center; gap:11px; width:100%; text-align:left; border-block-end:1px solid var(--hair); min-height:53px; padding:7px 2px }
.row-action>span:nth-child(2) { flex:1 }
.row-action small,.civ-banner small { display:block; color:var(--soft); font-size:14px; line-height:1.3; margin-top:2px }
.right .icon { width:15px }
.item-icon,.herald-tile { flex:none; width:39px; height:41px; display:grid; place-items:center }
.item-icon .icon { width:31px; height:31px }
.herald-tile .standard { width:33px; height:38px }
.box-line { border-top:1px solid var(--hair); padding-top:6px; margin-top:15px }
.panel-section { margin:17px 0 7px; font:600 17px var(--narrow); text-transform:uppercase; letter-spacing:.07em }
.panel-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:15px }
.panel-actions>button { flex:1 }
.info-band,.inline-error { border-left:3px solid var(--oxide); padding:8px 11px; margin:12px 0 3px; background:#eee2d0; font-size:14px }
.inline-error { color:#6a3025 }
.muted { color:var(--soft) }
.details-link { color:var(--river); text-underline-offset:2px }
.charter-row { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:3px 0 17px; border-block:1px solid var(--hair) }
.charter-choice { position:relative; text-align:center; display:flex; flex-direction:column; align-items:center; padding:10px 2px 9px; border-right:1px solid var(--hair); border-bottom:3px solid transparent }
.charter-choice:last-child { border-right:0 }
.charter-choice .standard { width:64px; height:76px; margin-left:5px }
.charter-choice b { font:600 21px/1.15 var(--narrow) }
.charter-choice small { font-size:12px; color:var(--soft) }
.charter-choice.selected { background:#ede4cf; border-bottom-color:var(--oxide) }
.charter-check { position:absolute; right:6px; top:5px; display:none; color:var(--oxide) }
.charter-check .icon { width:15px }
.charter-choice.selected .charter-check { display:block }
.claim-scene { position:relative; display:grid; place-items:center; height:148px; overflow:hidden; background:#e9e3ce; border-block:1px solid #c8c0aa }
.claim-map { position:absolute; inset:0; display:grid; align-items:end }
.claim-map svg { width:100%; height:82%; opacity:.8 }
.claim-scene>.standard { position:relative; width:83px; height:96px; margin:-11px 0 0 40px; filter:drop-shadow(1px 2px 0 #4b463d31) }
.claim-scene>span:last-child { position:absolute; bottom:5px; right:10px; color:#4c554d; font:600 14px var(--narrow) }
.fact-strip,.statgrid { display:flex; border-block:1px solid var(--hair); margin:13px 0 }
.fact-strip>div,.statgrid>div { flex:1; display:grid; grid-template-columns:auto auto; justify-content:center; align-items:center; column-gap:5px; text-align:center; padding:9px 3px; border-right:1px solid var(--hair) }
.fact-strip>div:last-child,.statgrid>div:last-child { border:0 }
.fact-strip .icon { width:24px; height:24px }
.fact-strip b,.statgrid b { font:600 23px/1 var(--narrow) }
.fact-strip>div>span { grid-column:1/-1; font-size:12px; color:var(--soft); margin-top:3px }
.statgrid>div { display:flex; flex-direction:column; color:var(--soft); font-size:13px; gap:3px }
.statgrid b { color:var(--ink) }
.civ-banner { display:flex; align-items:center; gap:10px; border-block:1px solid var(--hair); padding:9px 2px }
.civ-banner b { font-size:19px }
.range-box { border-block:1px solid var(--hair); padding:12px 0 }
.range-box label { display:flex; justify-content:space-between; font-weight:600 }
.range-box input { width:100%; margin:11px 0 0; accent-color:var(--oxide) }
.model-stage { position:relative; display:grid; place-items:center; isolation:isolate; height:192px; background:#e7e1cf; border-block:1px solid #bcb59f; overflow:hidden }
.model-ground { position:absolute; width:170px; height:28px; bottom:10%; border:1px solid #bab29d; border-radius:50%; transform:rotate(-6deg); z-index:-1 }
.hero-piece { position:absolute; inset:1.5% 5%; display:block; width:90%; height:97%; object-fit:contain }
.model-shelf { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-bottom:1px solid var(--hair); margin-top:4px }
.model-shelf button { min-width:0; display:flex; flex-direction:column; align-items:center; color:var(--soft); padding:5px 0 6px; border-bottom:3px solid transparent; font:600 14px/1.15 var(--narrow) }
.model-shelf button[aria-pressed=true] { border-color:var(--oxide); color:#742f20; background:#ebe3cf }
.model-shelf img { width:94%; height:51px; object-fit:contain }
.piece-spec { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:15px 0 }
.piece-spec h3 { font:700 25px/1.03 var(--display); letter-spacing:0; margin:0 0 4px }
.piece-effect,.placed-label { display:flex; gap:3px; align-items:center; color:var(--soft); font-size:14px }
.piece-effect .icon,.placed-label .icon { width:20px; height:20px }
.price-side { flex:none; text-align:right }
.price-side small,.palace-cost>span:first-child { color:var(--soft); font:600 13px var(--narrow) }
.cost-tokens { display:flex; flex-wrap:wrap; align-items:center; gap:3px 7px }
.cost-token { display:inline-flex; align-items:center; gap:2px }
.cost-token .icon,.resource-line .icon { width:20px; height:20px }
.cost-token b { font:600 16px var(--narrow); font-variant-numeric:tabular-nums }
.resource-line { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; margin:8px 0 14px }
.resource-line span { display:inline-flex; align-items:center; gap:2px; font-size:14px }
.resource-line b { margin-right:1px }
.palace-print { display:flex; width:100%; align-items:center; text-align:left; min-height:138px; overflow:hidden; padding:8px 12px 8px 15px; border-block:1px solid var(--hair); background:#e8e1cf }
.palace-print .miniature { width:55%; height:126px; object-fit:contain }
.palace-titles { flex:1 }
.palace-titles strong { display:block; font:700 27px/1.1 var(--display); letter-spacing:0 }
.palace-titles small { display:block; font-size:13px; color:var(--soft); margin-top:5px }
.palace-print+.action,.palace-print+.button-secondary { margin-top:13px }
.palace-cost,.harvest-pile { margin:11px 0; display:flex; align-items:center; justify-content:space-between }
.history-list { padding:0; list-style:none; margin:8px 0 }
.history-list li { padding:5px 0; border-bottom:1px solid var(--hair) }
.history-list small { color:var(--soft); margin-right:8px }
.segmented { display:flex; border-bottom:1px solid var(--hair); gap:8px; margin-bottom:7px }
.segmented button { padding:5px 9px 7px; min-height:36px; border-bottom:2px solid transparent }
.segmented button[aria-pressed=true] { border-color:var(--oxide); color:var(--oxide); font-weight:600 }
.rank-row { display:flex; align-items:center; gap:9px; min-height:42px; border-bottom:1px solid #d5cdba; padding:2px 4px }
.rank-row.me { background:#eae2cd }
.rank-row .herald-tile { width:30px; height:33px }
.rank-row .standard { width:26px; height:32px }
.rank-no { color:var(--soft); width:16px; text-align:center; font:600 15px var(--narrow) }
.rank-series { flex:1; min-width:0 }
.rank-series>b { font-size:15px; font-weight:600 }
.rank-series small { color:var(--soft); font-weight:400 }
.rank-track { display:block; height:4px; margin-top:3px; background:#e1dbcb }
.rank-track i { display:block; height:100%; border-right:1px solid #474b436b }
.rank-score { min-width:36px; text-align:right; font:600 18px var(--narrow); font-variant-numeric:tabular-nums }
.shop-balance { border-bottom:1px solid var(--hair); margin-bottom:3px }
.shop-balance .resource-line { margin-bottom:10px }
.shop-lot { display:flex; align-items:center; gap:10px; padding:13px 0; border-bottom:1px solid var(--hair) }
.lot-art { flex:none; display:grid; place-items:center; width:58px; height:62px }
.lot-art .icon { width:55px; height:55px }
.lot-info { flex:1; min-width:0 }
.lot-info>b,.lot-info>small { display:block }
.lot-info>b { font:600 19px/1.05 var(--narrow) }
.lot-info small { color:var(--soft); font-size:13px; margin:3px 0 }
.shop-lot .button-secondary { padding:7px; min-width:59px; font-size:14px }
@media(hover:hover) {
  .button-secondary:hover:enabled,.charter-choice:hover,.row-action:hover,.instruments button:hover,.fold:hover,.dock-items button:hover { background:#e8e1ce }
  .action:hover:enabled { background:#7e372a }
  .piece-hit:hover .piece-drawing { filter:drop-shadow(0 0 2px #faf3d1) }
}
@media(max-width:850px) {
  #help-button span { display:none }
  #help-button { right:10px }
  .topbar { gap:14px }
  .dock-items>button { min-width:105px }
}
@media(max-width:620px) {
  :root { --header:53px; --footer:60px }
  .topbar { gap:5px; padding-right:max(8px,env(safe-area-inset-right)); padding-left:max(11px,env(safe-area-inset-left)) }
  .brand { gap:5px }
  .brand img { width:25px; height:29px }
  .brand span { font-size:23px; letter-spacing:.035em }
  .currency { padding:0 6px; gap:3px }
  .currency .icon { width:19px; height:19px }
  .currency b { font-size:16px }
  .currency em { font-size:10px }
  .profile-button { border:0; padding:0; min-height:40px; min-width:28px; justify-content:center }
  .profile-button>span:nth-child(2),.profile-button>.tiny { display:none }
  .profile-seal,.profile-seal .icon,.profile-seal .standard { width:23px; height:26px }
  .sector-heading { top:13px; left:11px; padding:7px 10px 4px; border-left-width:3px }
  .sector-heading h1 { font-size:26px }
  .region-line { font-size:12px; margin-top:2px }
  .region-line .icon { width:12px; height:12px }
  .mode-button { min-height:29px; margin-top:0; margin-bottom:-1px }
  .mode-button b { font-size:12px }
  .mode-button .icon { width:16px; height:16px }
  .compass { right:10px; top:10px; transform:scale(.84); transform-origin:top right }
  .instruments { top:70px; right:11px; width:43px }
  .instruments button { width:41px; height:40px }
  .instruments .icon { width:22px; height:22px }
  .map-menu { top:70px; right:60px; width:207px }
  .map-label>span { font-size:16px }
  .map-label.ville>span { font-size:20px }
  .map-label.massif>span { font-size:13px }
  .map-label.lieu>span,.map-label.sommet>span { font-size:12px }
  .piece-hit { width:34px; height:40px }
  .holding .piece-hit { width:39px; height:46px }
  .pawn-drawing { width:27px; height:32px }
  .territory { left:10px; right:10px; bottom:21px; width:auto }
  .territory-inner { padding:9px 11px 10px }
  .land-name-line { min-height:47px; gap:9px; margin-bottom:7px }
  .land-name-line h2 { font-size:23px }
  .parcel-photo,.parcel-model { width:50px; height:45px }
  .owner { font-size:13px }
  .land-numbers { display:none }
  .territory.expanded .land-numbers { display:flex }
  .territory .action { min-height:40px; padding:6px 10px }
  .carto-foot { right:10px; bottom:1px; align-items:center; font-size:10px; gap:6px }
  .carto-foot button { min-height:16px; padding:0 4px }
  #scale { flex-direction:row; gap:4px }
  #scale i { height:3px }
  .dock-items { width:100% }
  .dock-items>button { flex:1; flex-direction:column; min-width:0; gap:0; padding:3px 1px 4px; font:600 14px/1.05 var(--narrow) }
  .dock-items .icon { width:29px; height:29px }
  .dock-items>button.active::after { left:25%; right:25%; bottom:2px }
  #help-button { display:none }
  .toast { width:max-content; max-width:88%; bottom:150px; font-size:14px }
  dialog { inset:auto 0 0 0; width:100%; max-width:100%; max-height:90dvh; margin:0 auto; border:0; border-top:2px solid var(--ink); border-radius:0 }
  .sheet-inner { padding:16px 16px calc(17px + env(safe-area-inset-bottom)) }
  .sheet-head { margin-bottom:12px }
  .sheet-head h2 { font-size:31px }
  .model-stage { height:clamp(128px,21dvh,185px) }
  .model-shelf img { height:44px }
  .piece-spec h3 { font-size:23px }
  .piece-spec { margin:13px 0 }
  .model-shelf button { font-size:14px }
}
@media(max-width:359px) {
  .brand span { font-size:20px }
  .brand img { width:22px }
  .currency { padding:0 4px }
  .currency .icon { width:17px; height:17px }
  .currency em { display:none }
  .sheet-inner { padding-inline:12px }
  .cost-tokens { gap:3px }
  .charter-choice .standard { width:54px; height:64px }
}
@media(max-height:550px) and (min-width:621px) {
  :root { --header:43px; --footer:42px }
  .brand span { font-size:24px }
  .brand img { height:29px }
  .sector-heading { top:8px; padding:5px 9px }
  .sector-heading h1 { font-size:25px }
  .region-line { display:none }
  .instruments { top:58px }
  .instruments button { height:30px }
  .compass { top:4px; transform:scale(.75); transform-origin:top right }
  .territory { bottom:7px }
  .territory-inner { padding:7px 9px }
  .land-numbers { display:none }
  .land-name-line { min-height:35px; margin-bottom:4px }
  .parcel-photo,.parcel-model { height:38px }
  .dock-items .icon { width:25px; height:25px }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important }
}
.map-piece { transform-origin:0 0 }
.map-piece.grouped .piece-hit { width:28px; height:28px; transform:translate(-50%,-50%); }
.map-piece.grouped .piece-hit::before,.map-piece.grouped .piece-drawing { display:none }
.piece-count { display:grid; place-items:center; width:100%; height:100%; border:1.5px solid var(--ink); border-radius:50%; background:var(--paper-light); color:var(--ink); font:700 16px/1 var(--narrow); box-shadow:0 1px 2px #20272255 }

.charter-row{grid-template-columns:repeat(3,minmax(0,1fr))}

#gps-gate { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:24px; background:var(--paper); overflow:auto }
.gate-card { width:min(340px,100%); text-align:center }
.gate-card h1 { font:700 36px/1.05 var(--display); margin:16px 0 8px }
.gate-card p { color:var(--soft); margin:10px 0 23px }
.gate-card button { min-width:190px }
:root { --oxide:#a7442e; --river:#306781 }
#gps-gate { background:#0b2433; color:#fbefd9 }
.gate-card { width:min(580px,100%) }
.gate-card .gate-logo { display:block; width:100%; height:auto; margin:0 auto 30px }
.gate-card p { color:#cedee3 }
.gate-card .action { background:#e6b866; color:#172a36; border:1px solid #f3d9a1 }
.gate-card .action:hover:enabled { background:#f2ca80 }
.topbar { background:#0c2331; color:#fff1d9; border-bottom-color:#b98847 }
.brand img { width:155px; height:auto }
.currency em,.topbar .tiny { color:#bfd5df }
.currency,.profile-button { border-color:#58656a }
.dock-items>button.active { color:#204d68; background:#e2edf0 }
.dock-items>button.active::after { border-color:#b6792c }
.territory { border-top:3px solid #36728c }
.model-stage,.palace-print { background:#dce7e7; border-color:#9bafb2 }
.model-shelf button[aria-pressed=true] { background:#f2dbac; color:#5f3720; border-color:#aa552f }
@media(max-width:620px){.brand img{width:103px;height:auto}.gate-card .gate-logo{margin-bottom:26px}}
@media(max-width:359px){.brand img{width:85px}}
@media(max-height:550px) and (min-width:621px){.brand img{width:106px}}

#shell[inert] #stage, #shell[inert] .parcel-photo { background-image:none }

.claim-scene>svg {position:absolute;inset:0}.claim-scene>span:last-child,.claim-credit {background:#fff4dbed;padding:2px 6px;border-radius:3px}.claim-credit {position:absolute;left:6px;bottom:5px;font-size:11px}

.location-readout { margin:8px 0 12px; font-size:.94rem; line-height:1.35 }

.contract-pin {position:absolute;left:0;top:0;pointer-events:auto;background:#794422;color:white;border:2px solid #ffdc84;border-radius:50%;width:30px;height:30px;z-index:6;font-size:18px}.contract-pin[hidden],#contract-button[hidden]{display:none}

.parcel-model {position:relative}.parcel-model .parcel-building {position:absolute;bottom:0;right:0;width:46%;height:46%;pointer-events:none}.parcel-model .parcel-building img {width:100%;height:100%;object-fit:contain}

#clan-feed {max-height:34dvh;overflow:auto;overflow-wrap:anywhere;padding:10px 0}
#clan-feed article {padding:8px 0;border-bottom:1px solid var(--hair)}
#clan-feed p {margin:3px 0;white-space:pre-wrap}
#clan-form {display:grid;gap:8px;margin-top:12px}
#clan-form label {display:grid;grid-template-columns:1fr 1fr;gap:5px}
#clan-form select,#clan-form textarea,#clan-form input {min-width:0;padding:7px;font:inherit}
#clan-form textarea {grid-column:1/-1}

.trade-picker {margin:0;padding:8px;border:1px solid var(--hair);min-width:0}
.trade-picker legend {font-weight:600;padding:0 5px}
.trade-choices {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
#clan-form .trade-choice {position:relative;display:block;cursor:pointer}
.trade-choice input {position:absolute;width:1px;height:1px;opacity:0}
.trade-choice span {display:grid;justify-items:center;gap:2px;border:2px solid transparent;border-radius:6px;padding:4px 0}
.trade-choice input:checked+span {border-color:#9c6528;background:#f3dda2;color:#30251c}
.trade-choice input:focus-visible+span {outline:2px solid currentColor}
.trade-choice .icon,.trade-stack .icon {width:30px;height:30px}
#clan-form .trade-quantity {display:flex;align-items:center;gap:8px;margin-top:8px}
.trade-quantity input {width:6em}
.trade-pair {display:flex;align-items:center;gap:12px;margin:6px 0}
.trade-stack {display:grid;justify-items:center;min-width:70px}
.trade-stack strong {display:flex;align-items:center;gap:5px}

.daily-calendar ol {list-style:none;padding:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.daily-calendar li {min-width:0;display:grid;justify-items:center;align-content:start;gap:4px;padding:8px 2px;background:#f4ead7;border:1px solid #cbbca0;border-radius:6px;color:#47382b}
.daily-calendar .icon {width:32px;height:32px}
.daily-calendar li.received {background:#f3dfac;border-color:#ad8039}
.daily-calendar li.upcoming {border:2px dashed #846138}
.daily-calendar li small {font:600 13px var(--narrow);text-align:center}
@media(max-width:620px){.daily-calendar ol{grid-template-columns:repeat(4,minmax(0,1fr))}}

.daily-gems {display:inline-flex;align-items:center;gap:3px;font-weight:600}.daily-calendar .daily-gems .icon {width:18px;height:18px}

.row-action[data-act="plan-hall"] .miniature { width:48px; height:48px; object-fit:contain; }

.monument-choice .miniature { width:48px; height:48px; object-fit:contain }
.monument-stage { position:relative }
.monument-standard { position:absolute; left:63%; bottom:22%; width:12%; height:43% }
.monument-standard .standard { height:100%; width:100% }
.monument-honors { position:absolute; bottom:.5rem; right:.75rem; display:flex; gap:.3rem; color:#614421 }
.monument-honors span { background:#e9c779; border:1px solid currentColor; border-radius:50%; padding:.2rem; display:flex }

.map-player { pointer-events:none }
.clan-pawn { position:absolute; width:48px; height:48px; transform:translate(-50%,-92%); filter:drop-shadow(0 1px 1px #26231dcc) }
.map-player:has(.clan-pawn) .pawn-drawing,.map-player:has(.clan-pawn) .pawn-foot { display:none }
.outpost-tent { display:grid;place-items:center;width:100%;height:100%;font-size:28px }
.admin-tabs,.admin-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;margin-bottom:1rem}
.admin-tabs [aria-pressed="true"] {background:#edbd57;color:#302a22}
.admin-fields input {display:block;width:100%;min-width:0}
#admin-list .row-action {width:100%}
.parcel-benefit {display:flex;align-items:center;gap:.3em;flex-wrap:wrap;color:var(--land-ink,var(--ink));font-size:.95rem;margin:.35em 0}.parcel-benefit .icon{width:1.15em;height:1.15em}
.parcel-deposit:not(:empty){font-size:.9rem;color:var(--land-fine,var(--ink));margin:.25rem 0}.parcel-deposit .icon,.map-piece.deposit .icon{width:1.35em;height:1.35em;vertical-align:middle}

#bug-form textarea {display:block;width:100%;margin:8px 0 14px;padding:10px;font:inherit;resize:vertical}
.bug-entry p {white-space:pre-wrap;overflow-wrap:anywhere}
.parcel-gain {display:inline-flex;align-items:center;gap:.22em;white-space:nowrap;vertical-align:middle}.parcel-gain .icon{width:1.35em;height:1.35em}
.top-wallet {display:grid;grid-template-columns:repeat(3,auto);row-gap:2px}
.top-wallet .stamina {border:0;padding-right:0}
.hud-stocks {grid-column:1/-1;display:flex;align-items:center;gap:8px;padding-left:15px;font:600 12px/1 var(--narrow)}
.hud-stocks>span {display:inline-flex;align-items:center;gap:2px;white-space:nowrap}
.hud-stocks .icon {display:block;width:14px;height:14px}
@media(max-width:620px){.hud-stocks{padding-left:6px;gap:4px;font-size:10px}.hud-stocks .icon{width:12px;height:12px}}
.wall-overlay {position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none}
.shop-lot .recruit-button {display:grid;justify-items:center;gap:3px}.recruit-button .cost-token .icon{width:16px;height:16px}

.build-shortage { display:flex; flex-wrap:wrap; align-items:center; gap:0.4em }

[data-page="build"] #sheet-title { white-space: pre-line }

.clan-banner {display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:110px;padding:12px 20px;margin-bottom:14px;border:1px solid #96753d;border-radius:4px;color:#fff4d8;background:linear-gradient(100deg,#152125fa,#15212598),url(assets/alpes.webp) center 52%/cover}
.clan-banner h3 {margin:0 0 8px;font-size:clamp(1.7rem,6vw,2.3rem);color:inherit}
.clan-banner img {width:86px;height:86px;object-fit:contain;filter:drop-shadow(0 4px 4px #1119)}
.clan-banner button {min-height:36px;padding:5px 12px;border:1px solid #bd9a60;border-radius:3px;background:#1a2629;color:#ffe9b5;font:inherit;cursor:pointer}
#clan-feed {display:grid;gap:6px;padding:12px 0}
#clan-feed article {padding:10px 12px;border:1px solid var(--hair);border-radius:4px;background:#ffffff45}
#clan-feed article>small {display:inline-block;margin-left:6px;color:#625744}
#clan-form textarea {border:1px solid var(--hair);border-radius:4px;background:#fffaf0;color:#28231b}

#sheet[data-page="season"] {position:fixed;inset:0;margin:auto;height:82dvh;max-height:90dvh}
#sheet[data-page="season"] .sheet-inner {height:100%;display:flex;flex-direction:column;box-sizing:border-box}
#sheet[data-page="season"] #sheet-body {display:flex;flex-direction:column;min-height:0;flex:1}
.season-list {flex:1;min-height:0;overflow:auto;box-sizing:border-box;border-block:1px solid var(--hair);overflow-anchor:none}
.season-row {display:grid;grid-template-columns:2em 2em minmax(0,1fr) auto;align-items:center;gap:6px;min-height:44px;padding:4px 8px;border-bottom:1px solid var(--hair)}
.season-row.mine {background:#f1d395;box-shadow:inset 3px 0 #976323}
.season-row strong {overflow-wrap:anywhere}

.parcel-defense { display:inline-flex; align-items:center; gap:4px; font:600 14px/1.2 var(--sans); color:var(--land-ink); margin-top:3px }
.parcel-defense .icon { width:16px; height:16px }
#mail-button {position:relative}
#mail-count {position:absolute;right:-3px;top:-3px;padding:1px 4px;min-width:16px;border-radius:10px;background:#993e26;color:white;font:700 12px/16px sans-serif}
.battle-letter {margin:8px 0;padding:10px 12px;border:1px solid var(--hair);border-radius:4px}
.battle-letter.unread {border-left:4px solid #a3691b;background:#ffedc8}
.battle-letter summary {cursor:pointer}
.battle-letter summary span,.battle-letter summary small {display:block}

.piece-spec {flex-wrap:wrap}
.piece-effect {flex-wrap:wrap;column-gap:5px}
.piece-rate {display:inline-flex;align-items:center;white-space:nowrap}
.piece-rate .icon {width:1.15em;height:1.15em}

.truce-marker { position:absolute; left:-5%; top:1%; width:24px; height:26px; pointer-events:none; filter:drop-shadow(0 1px 1px #21170d) }
.truce-marker .icon { width:100%; height:100%; object-fit:contain }
.truce-marker .icon,.lot-art .truce-icon,.land-truce .truce-icon,[data-act="activate-truce"] .icon { filter:sepia(1) saturate(5) hue-rotate(320deg) }

#direct-access label,#direct-access input {display:block;margin:10px 0;width:100%} #direct-access input {font-size:16px;padding:8px} #direct-access button {width:100%}

.gps-objectives {position:absolute;top:calc(100% + 6px);left:-3px;display:grid;justify-items:start;gap:4px;pointer-events:none}
#campaign-quest {pointer-events:auto;display:flex;align-items:center;gap:5px;background:#fff2dc;color:#39291d;border:1px solid #aa936d;padding:6px 8px;white-space:nowrap;font-size:clamp(12px,3.3vw,15px);min-height:34px}
#campaign-quest .icon {width:1em;height:1em}
#campaign-quest[hidden]{display:none}
#collect-button {pointer-events:auto;min-height:38px;white-space:nowrap}
#collect-button[hidden] {display:none}

.tutorial-art { display:grid;place-items:center;padding:12px }
.tutorial-art img,.tutorial-art svg { width:92px;height:92px;object-fit:contain }
.tutorial-progress { text-align:center;margin:14px 0 8px;font-variant-numeric:tabular-nums }

.referral-list {list-style:none;padding:0;margin:0}
.referral-list li {display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 12px;padding:8px 0;border-bottom:1px solid #cbbca0}
.referral-list strong {overflow-wrap:anywhere}

.caravan-goal {margin:12px 0;padding:12px;border:1px solid #cbbca0;border-radius:6px}
.caravan-goal h3,.caravan-goal p {margin:0 0 6px}
.caravan-goal progress {display:block;width:100%;margin:5px 0;accent-color:#95631f}

/* Chantiers collectifs */
#wonder-button {border-top:1px solid #bfa985}
#wonder-button img {width:83%;height:90%;object-fit:contain;mix-blend-mode:multiply}
#wonder-button small {position:absolute;right:0;bottom:0;font-size:12px;background:var(--paper-light);border-radius:50%}
.wonder {font-size:15px;font-variant-numeric:tabular-nums}
.wonder p {margin:9px 0;line-height:1.35}
.w-overview {display:grid;grid-template-columns:50% 1fr;gap:9px;align-items:center;background:#edddbd;padding:6px 12px 6px 4px}
.w-overview strong {display:block;font:700 32px 'Barlow Condensed',sans-serif}
.w-art {position:relative;aspect-ratio:1;max-height:185px;margin:auto;mix-blend-mode:multiply;width:100%}
.w-art img {position:absolute;width:100%;height:100%;object-fit:contain;inset:0}
.w-art img:first-child {opacity:.32;filter:grayscale(1)}
.w-art img+img {clip-path:inset(var(--cut) 0 0)}
.w-art i {position:absolute;left:12%;right:12%;bottom:10%;top:clamp(15%,calc(var(--cut) - 13%),74%);background:repeating-linear-gradient(90deg,#704321 0 2px,transparent 2px 23px),repeating-linear-gradient(0deg,#754325 0 2px,transparent 2px 18px),repeating-linear-gradient(40deg,transparent 0 13px,#8f6339 13px 15px,transparent 15px 29px);opacity:.8}
.wonder progress {display:block;width:100%;height:7px;margin:5px 0;appearance:none;border:none;background:#d5c5a8;accent-color:#864029}
.wonder progress::-webkit-progress-bar {background:#d5c5a8}
.wonder progress::-webkit-progress-value {background:#894327}
.wonder progress::-moz-progress-bar {background:#894327}
.w-note:empty {display:none}
.w-note,.w-clock {font-weight:600;color:#753b22}
.w-stock button {display:grid;grid-template-columns:27px minmax(0,1fr) auto;align-items:center;gap:8px;padding:5px 8px;width:100%;text-align:left;border-top:1px solid #cdb896;font-size:14px}
.w-stock button:disabled {opacity:1;cursor:default}
.w-stock button[aria-pressed=true] {box-shadow:inset 4px 0 var(--oxide);background:#eddbb8}
.w-stock .icon,.w-line .icon,.w-line svg {width:25px;height:25px}
.w-stock button span:last-child {display:flex;gap:3px;align-items:center;font-weight:600}
.w-stock button span:last-child .icon {width:17px}
.w-gift div,.w-line {display:flex;gap:7px;align-items:center}
.w-gift div {margin:8px 0}
.w-gift button[data-pct] {flex:1;border:1px solid #ac9775;min-height:36px;font-weight:600}
.w-gift input,.wonder-admin input {background:#fffaf0;min-width:0;flex:1;border:1px solid #ae9770;border-radius:2px;font:inherit;font-size:16px;padding:9px;height:44px}
.w-gift label {font-size:14px}
.wonder-admin input {display:block;width:100%;margin:6px 0 14px}
.wonder details {border-top:1px solid #cdb896}
.wonder summary {cursor:pointer;font-size:16px;font-weight:600;padding:12px 0}
.w-line {min-height:40px;padding:5px 0}
.w-line span {flex:1;overflow-wrap:anywhere}
.w-line small {display:block}
.w-line img {object-fit:contain;mix-blend-mode:multiply}
@media(max-height:740px){.instruments button {height:clamp(26px,4.6dvh,34px)}}
@media(max-height:520px){.instruments {max-height:calc(100% - 70px);overflow-y:auto}.instruments button {flex-shrink:0}}

.general-row .general-portrait,.general-assault .general-portrait {width:56px;height:58px;object-fit:cover;object-position:center top;border:1px solid #956b3d;border-radius:3px}
.general-assault {display:flex;align-items:center;gap:8px;margin:10px 0;font-size:14px}
.general-assault span {margin-left:auto;color:#386035;font-weight:600}
.general-assault .general-portrait {width:41px;height:41px}
.general-card {text-align:center}
.general-card>.general-portrait {display:block;width:100%;max-height:32dvh;object-fit:cover;object-position:50% 12%;mask-image:linear-gradient(#000 84%,transparent)}
.general-card h3 {position:relative;margin:-10px 0 0;font:700 clamp(32px,9vw,46px)/1.12 var(--narrow)}
.general-stars {font-size:21px;letter-spacing:3px;color:#deb13a;text-shadow:0 1px 1px #8a491a;margin:2px 0 10px}
.general-effect {display:grid;grid-template-columns:15% 1fr;text-align:left;align-items:center;gap:12px;border-top:1px solid #b89154;padding:11px 0}
.general-effect>div {border-left:1px solid #b89154;padding-left:12px}
.general-effect>.icon,.general-effect>svg,.general-effect>img {width:100%;height:auto;max-height:56px}
.general-effect b,.general-active {font:700 clamp(18px,5vw,24px)/1.1 var(--narrow)}
.general-card small {display:block;font:500 14px/1.25 var(--sans);margin-top:4px}
.general-compare {display:flex;gap:10px;align-items:baseline;font:700 29px/1 var(--narrow);margin-top:6px}
.general-compare span:last-child,.general-active {color:#386035}
.general-card .action {font-size:20px;margin:5px 0}
.general-card .cost-token {color:inherit}
.general-card .cost-token .icon {width:26px;height:26px}

.parcel-post {display:inline-flex;align-items:center;gap:4px;margin-left:9px;padding:2px 6px;border:1px solid var(--hair);border-radius:3px;color:var(--land-ink);font-size:14px;font-weight:600;vertical-align:middle}
.parcel-post .icon {width:18px;height:18px}
.garrison-values {display:grid;grid-template-columns:19px auto;align-items:center;gap:3px 5px;font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}
.garrison-values .icon,.impact .icon,.garrison-repair .icon {width:19px;height:19px;vertical-align:middle}
.garrison-values .needs-repair {color:#973721}
.garrison-heading,.post-controls {display:flex;align-items:center;justify-content:space-between;gap:8px}
.garrison-heading {margin-bottom:10px;font-weight:600}
.post-controls {margin:9px 0}
.post-controls input {margin:0;min-width:0;flex:1;height:38px}
.post-controls button {flex:none;width:42px;height:42px;font-size:23px;border:1px solid var(--hair);background:var(--paper-light);border-radius:3px}
.garrison-repair {padding-bottom:12px}
.garrison-repair p {font-weight:600;color:var(--ink)}
.garrison-row>span:nth-child(2) {min-width:0;overflow-wrap:anywhere}

/* Profils de commandants */
button.rank-row {width:100%;text-align:left}
button.rank-row:after {content:'›';color:var(--oxide);font-size:22px}
.cmd-author {font-weight:700;color:var(--oxide);text-decoration:underline;text-underline-offset:3px}
dialog.commander-dialog {margin:auto;width:min(100%,460px);max-width:100%;max-height:96dvh;background:#fff2dc;padding-bottom:env(safe-area-inset-bottom)}
.commander-dialog .sheet-head {margin:0;padding:8px 12px;align-items:center}
.commander-dialog h2,#sheet[data-page="profile"] h2 {font-size:clamp(24px,7.6vw,32px)}
.commander-card {container-type:inline-size;color:#392719;background:#fff2dc;text-align:center;font:600 18px/1.12 var(--display);padding-bottom:12px}
.cmd-cover {display:grid;grid-template-columns:42% 58%;align-items:center;min-height:47cqw;background:linear-gradient(90deg,#21100400 5%,#211004aa 46%,#211004ad),url(assets/commandants.webp) var(--x) var(--y)/304% 425%;border-block:2px solid #bb843c;color:#fff4d8;text-shadow:0 2px 4px #201004;text-align:left;font-size:clamp(15px,4.7cqw,21px)}
.cmd-cover>img {width:100%;height:46cqw;object-fit:contain;filter:drop-shadow(0 4px 3px #24170699)}
.cmd-cover>div {padding:10px 6% 10px 0;overflow-wrap:anywhere}
.cmd-cover strong {font:700 clamp(26px,10cqw,46px)/1 var(--display)}
.cmd-cover b {display:flex;align-items:center;font-size:6cqw;margin:4px 0;gap:5px}
.cmd-cover .standard {width:6cqw;height:8cqw}
.cmd-cover progress {display:block;width:100%;height:10px;margin-top:7px;appearance:none;border:1px solid #fbd079;background:#2e180a;border-radius:8px;overflow:hidden}
.cmd-cover progress::-webkit-progress-bar {background:#2e180a}
.cmd-cover progress::-webkit-progress-value {background:linear-gradient(#ffe687,#df840a)}
.cmd-cover progress::-moz-progress-bar {background:#eaaa36}
.cmd-grid,.cmd-pair {display:grid;grid-template-columns:repeat(3,1fr);margin:0 4%;padding:12px 0;border-bottom:1px solid #bb985c;font-size:clamp(15px,4.6cqw,20px)}
.cmd-grid>div+div,.cmd-pair>div+div {border-left:1px solid #ceb68a}
.cmd-grid .icon {width:14cqw;height:11cqw;object-fit:contain;display:block;margin:auto}
.cmd-grid strong {display:block;font-size:8cqw}
.cmd-pair {grid-template-columns:1fr 1fr;font-weight:700}
.commander-card h3 {margin:10px 4% 0;text-align:left;font:700 6.2cqw/1 var(--display)}
.cmd-pair h3 {margin:0 0 2px 7%}
.cmd-pair img {display:block;width:100%;height:31cqw;object-fit:contain;margin:auto auto 4px}
.cmd-pair img.vacant {width:50%;opacity:.55}
.cmd-grid.medals {border:none;padding-bottom:2px}
.medals i {display:grid;place-content:center;margin:0 auto 6px;width:17cqw;height:17cqw;background:radial-gradient(#ca6133,#801e12);border:4px double #fcce63;border-radius:50%;box-shadow:0 1px 2px #65380f}
.medals .icon {width:11cqw;height:11cqw}
.medals .locked i {filter:grayscale(1);opacity:.5}
.medals small {display:block;font:500 clamp(10px,3.2cqw,14px) var(--sans);color:#675039;margin-top:3px}

.discovery-pin{position:absolute;top:0;left:0;pointer-events:auto;z-index:7;border:2px solid #ffe3a1;border-radius:50%;background:radial-gradient(#ffedb8,#c28a38);width:38px;height:38px;padding:3px;box-shadow:0 0 0 2px #533619,0 3px 7px #24150699}
.discovery-pin img{width:100%;height:100%;object-fit:contain}
.discovery-pin:after{content:'!';position:absolute;right:-5px;top:-6px;background:#912f22;color:#fff3c9;font:bold 13px/16px Georgia;width:16px;border-radius:50%;border:1px solid #ffdf90}

#collection-summary{position:absolute;z-index:9;bottom:22px;left:50%;transform:translateX(-50%);pointer-events:none;width:max-content;max-width:calc(100% - 16px);background:#29231af5;color:#fff4da;border:1px solid #c3a16a;border-radius:5px;box-shadow:0 2px 6px #21170e50;display:flex;justify-content:center}
#collection-summary>div{display:flex;flex:none;align-items:center;gap:clamp(6px,2.4vw,12px);padding:5px 9px;white-space:nowrap}
#collection-summary span{display:inline-flex;align-items:center;gap:3px}
#collection-summary b{font-size:14px;line-height:18px;font-variant-numeric:tabular-nums}
#collection-summary .icon{width:18px;height:18px;flex:none}

.territory.expanded { max-height: min(65dvh, 100%); overflow-y:auto; overscroll-behavior:contain }
.territory .land-truce { display:flex; width:100%; justify-content:flex-start; margin-top:7px; font-size:14px; padding:7px 10px; text-align:left }
.land-truce-cost { margin-left:auto; display:inline-flex; align-items:center; gap:4px }
.land-truce .icon { flex-shrink:0 }

#sheet:is([data-page="shop"],[data-page="diamonds"]) {
  inset:0; margin:0; width:100%; max-width:none; height:100vh; height:100dvh;
  max-height:none; border:0; border-radius:0; box-shadow:none;
}
#sheet:is([data-page="shop"],[data-page="diamonds"]) .sheet-inner {
  max-width:760px; margin-inline:auto; padding-top:0;
  padding-left:max(16px,env(safe-area-inset-left)); padding-right:max(16px,env(safe-area-inset-right));
  padding-bottom:calc(22px + env(safe-area-inset-bottom));
}
#sheet:is([data-page="shop"],[data-page="diamonds"]) .sheet-head {
  position:sticky; top:0; z-index:2; align-items:center; margin-bottom:0;
  padding:calc(12px + env(safe-area-inset-top)) 0 12px;
  border-bottom:2px solid var(--hair); background:var(--paper-light);
}
