/* THE YARD — full-viewport, independent camp scene; no battlefield resize. */
.camp-location{display:none}
.app.camp-mode .battle-location{display:none!important}
.app.camp-mode{height:100dvh;overflow:hidden}
body:has(.app.camp-mode){overflow:hidden}
.app.camp-mode .layout{grid-template-columns:minmax(0,1fr);min-height:0}
.app.camp-mode .sidebar{display:none}
.app.camp-mode main{padding:0!important;margin:0;max-width:none;min-width:0;width:100%}
.app.camp-mode #page-camp{height:calc(100dvh - var(--topbar-height));min-height:0;position:relative;overflow:hidden}
.app.camp-mode .topbar{position:relative;z-index:9;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr) minmax(0,1fr)}
.app.camp-mode .topbar>.brand-lockup{grid-column:1;grid-row:1}
.app.camp-mode .topbar>.profile-shortcut{grid-column:3;grid-row:1;min-width:0;justify-content:flex-end}
.app.camp-mode .camp-location{display:block;grid-column:2;grid-row:1;min-width:0;text-align:center;pointer-events:none}
.app.camp-mode .camp-location .eyebrow{font-size:.56rem;letter-spacing:.13em}
.app.camp-mode .camp-location strong{display:block;font-size:1.12rem;line-height:1.2;margin-top:4px}
#page-camp .camp-layout,#page-camp .camp-map-panel,#page-camp .camp-canvas-shell{position:absolute;inset:0;min-width:0;min-height:0}
#page-camp .camp-map-panel{background:#263025;overflow:hidden}
#page-camp .camp-canvas-shell canvas{display:block;width:100%;height:100%;touch-action:none;user-select:none;cursor:grab}
#page-camp .camp-canvas-shell canvas:active{cursor:grabbing}
#page-camp .camp-resource-strip{position:absolute;top:10px;left:14px;z-index:3;display:flex;flex-wrap:wrap;gap:5px;max-width:calc(100% - 375px);pointer-events:none}
#page-camp .camp-counter{display:flex;align-items:center;gap:5px;background:#07170fd9;border:1px solid #2761437a;padding:5px 7px;min-height:25px;white-space:nowrap;font-variant-numeric:tabular-nums}
#page-camp .camp-counter small{font-size:.61rem;font-weight:750;color:#afcebb;letter-spacing:.025em}
#page-camp .camp-counter strong{font-size:.72rem;color:var(--green)}
#page-camp .camp-counter em{font-style:normal;font-size:.58rem;color:#a0bba8}
#page-camp .camp-map-toolbar{position:absolute;z-index:5;top:10px;right:12px;pointer-events:none}
#page-camp .camp-map-buttons{display:flex;align-items:center;gap:4px;pointer-events:auto}
#page-camp .camp-map-buttons button{min-height:25px;padding:4px 7px;font-size:.63rem;line-height:1.15;background:#071c12e8;border:1px solid #276047b8}
#page-camp .camp-map-buttons button:hover,#page-camp .camp-map-buttons button.active{color:var(--green);border-color:var(--green)}
#page-camp .camp-mode-hint{position:absolute;z-index:6;top:43px;left:14px;max-width:calc(100% - 300px);padding:5px 9px;background:#061b11e8;border:1px solid #35724e;color:var(--gold);font-size:.64rem;font-weight:750;pointer-events:none}
#page-camp .camp-panel-column{position:absolute;right:12px;top:43px;bottom:12px;width:250px;z-index:4;display:flex;flex-direction:column;align-items:stretch;gap:7px;pointer-events:none}
#page-camp .camp-box{min-height:0;min-width:0;background:#071a12ed;border:1px solid #30624795;padding:9px;pointer-events:auto}
#page-camp .camp-panel-title{display:flex;align-items:center;justify-content:space-between;margin:0 0 7px;color:var(--green);font-size:.69rem;font-weight:800;letter-spacing:.045em}
#page-camp .camp-panel-title span{color:var(--muted);font-size:.56rem;font-weight:500}
#page-camp .camp-build-list{display:grid;gap:0;max-height:min(49vh,490px);overflow:auto;scrollbar-width:thin;scrollbar-color:#357250 transparent}
#page-camp .camp-build-entry{display:grid;grid-template-columns:32px minmax(0,1fr);grid-template-rows:auto auto;gap:3px 6px;padding:7px 2px;border:0;border-bottom:1px solid #23503a65;background:transparent;align-items:start}
#page-camp .camp-build-entry:last-child{border-bottom:0}
#page-camp .camp-build-entry.selected{background:#153b278a}
#page-camp .camp-build-symbol{display:grid;place-items:center;width:32px;height:32px;background:var(--camp-symbol,#527e68);border:1px solid #173421;font-size:.50rem;font-weight:900;color:#fff}
#page-camp .camp-build-copy{min-width:0;display:grid;gap:2px}
#page-camp .camp-build-copy strong{font-size:.65rem;line-height:1.25}
#page-camp .camp-build-copy small{font-size:.59rem;color:var(--muted);line-height:1.25}
#page-camp .camp-build-copy span{font-size:.54rem;color:var(--gold);line-height:1.4}
#page-camp .camp-build-entry button{grid-column:2;justify-self:start;font-size:.57rem;min-height:22px;padding:3px 8px}
#page-camp.camp-build-collapsed #camp-build-panel{display:none}
#page-camp .camp-detail-content{font-size:.69rem;line-height:1.4;color:var(--muted)}
#page-camp .camp-detail-content>strong{display:block;font-size:.79rem;color:var(--text);margin-bottom:5px}
#page-camp .camp-detail-content>small{display:block;line-height:1.4}
#page-camp .camp-detail-content p{margin:7px 0}
#page-camp .camp-detail-content .camp-status{color:var(--gold);font-weight:700;font-size:.67rem}
#page-camp .camp-detail-content .camp-status.positive{color:var(--green)}
#page-camp .camp-detail-content button{font-size:.63rem;padding:6px 8px;margin-top:5px}
#page-camp .camp-detail-actions{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}
#page-camp .camp-detail-content .camp-danger{color:#ffb1a3;border-color:#75473c;background:#311b18}
#page-camp.camp-detail-empty #camp-detail-panel{display:none}
@media(min-width:751px) and (max-width:1150px){
  .app.camp-mode{--topbar-height:120px}
  .app.camp-mode .topbar{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr) auto;gap:4px 8px}
  .app.camp-mode .topbar>.profile-shortcut{grid-column:2;grid-row:1}
  .app.camp-mode .camp-location{grid-column:1/-1;grid-row:2}
}
@media(max-width:750px){
  .app.camp-mode{--topbar-height:126px}
  .app.camp-mode .topbar{grid-template-columns:minmax(0,1fr) auto auto;grid-template-rows:minmax(0,1fr) auto auto;gap:4px 7px;padding:8px 12px}
  .app.camp-mode .topbar>.brand-lockup{grid-column:1;grid-row:1}
  .app.camp-mode .topbar>.profile-shortcut{display:contents}
  .app.camp-mode .topbar .identity-copy{grid-column:2;grid-row:1}
  .app.camp-mode .topbar .account-menu-wrap{grid-column:3;grid-row:1}
  .app.camp-mode .topbar .profile-shortcut>.wallet{grid-column:1/-1;grid-row:2;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;width:100%;min-width:0;max-width:none;gap:4px;font-size:.53rem}
  .app.camp-mode .topbar .wallet img{width:12px;height:12px}
  .app.camp-mode .camp-location{grid-column:1/-1;grid-row:3}
  .app.camp-mode .camp-location .eyebrow{font-size:.46rem}
  .app.camp-mode .camp-location strong{font-size:.83rem;margin-top:2px}
  #page-camp .camp-resource-strip{top:7px;left:7px;right:7px;max-width:none;gap:3px}
  #page-camp .camp-counter{padding:3px 5px;min-height:21px;gap:3px}
  #page-camp .camp-counter small{font-size:.51rem}
  #page-camp .camp-counter strong{font-size:.58rem}
  #page-camp .camp-counter em{font-size:.48rem}
  #page-camp .camp-map-toolbar{top:37px;right:7px}
  #page-camp .camp-map-buttons button{font-size:.58rem;min-height:23px;padding:4px 6px}
  #page-camp .camp-mode-hint{top:67px;max-width:calc(100% - 14px);left:7px}
  #page-camp .camp-panel-column{top:68px;right:7px;bottom:7px;width:min(258px,calc(100% - 14px));overflow-y:auto;scrollbar-width:thin}
  #page-camp .camp-build-list{max-height:43dvh}
}
/* CAMP tents modify stats server-side; these lines are display only. */
#unit-cards .camp-unit-bonus{font-size:.7rem;font-weight:750;color:#8df7b0;margin:5px 0 10px}
#unit-cards.army-simple .camp-unit-bonus{display:none}
#inspector-camp-bonus{font-size:.71rem;color:#8df7b0;line-height:1.5;margin:6px 0}

/* CAMP V3: battle-style bottom building deck, not another map sidebar. */
#page-camp .camp-canvas-shell canvas {cursor:default}
#page-camp .camp-canvas-shell canvas.camp-over-building {cursor:pointer}
#page-camp .camp-canvas-shell canvas.camp-placing {cursor:crosshair}
#page-camp .camp-canvas-shell canvas.camp-pan-drag {cursor:grabbing!important}
#page-camp .camp-build-deck {
  position:absolute;bottom:8px;left:8px;right:8px;height:194px;z-index:5;
  pointer-events:none;min-width:0;min-height:0;
}
#page-camp.camp-build-collapsed .camp-build-deck {display:none}
#page-camp .camp-build-deck .camp-build-list {
  display:flex;align-items:stretch;gap:6px;
  overflow-x:auto;overflow-y:hidden;white-space:normal;
  width:100%;height:100%;max-height:none;
  padding:0 0 5px;scrollbar-width:thin;scrollbar-color:#3b7959 #091911;
  pointer-events:auto;overscroll-behavior-x:contain;
}
#page-camp .camp-build-deck .camp-build-entry {
  box-sizing:border-box;display:flex;flex:0 0 155px;flex-direction:column;
  align-items:stretch;gap:4px;width:155px;height:181px;min-height:181px;
  padding:6px 7px;border:1px solid #31634cbf;background:#061a12ed;
  grid-template-columns:none;grid-template-rows:none;transition:border-color .15s,background .15s;
}
#page-camp .camp-build-deck .camp-build-entry:last-child {border-bottom:1px solid #31634cbf}
#page-camp .camp-build-deck .camp-build-entry:hover {border-color:#58a477;background:#0b2a1bec}
#page-camp .camp-build-deck .camp-build-entry.selected {border-color:var(--green);background:#163c2be9}
#page-camp .camp-build-deck .camp-build-symbol {
  display:grid;place-items:center;flex:0 0 49px;
  height:49px;width:59px;max-width:100%;margin:0 auto 1px;
  font-size:.73rem;letter-spacing:.02em;
}
#page-camp .camp-build-deck .camp-build-copy {display:flex;flex:1;min-height:0;flex-direction:column;gap:3px;text-align:center}
#page-camp .camp-build-deck .camp-build-copy strong {font-size:.64rem;line-height:1.15;min-height:13px}
#page-camp .camp-build-deck .camp-build-copy small {
  font-size:.55rem;line-height:1.25;min-height:26px;max-height:26px;overflow:hidden;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
}
#page-camp .camp-build-deck .camp-build-copy span {
  font-size:.50rem;line-height:1.25;margin-top:auto;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  overflow:hidden;max-height:26px;
}
#page-camp .camp-build-deck .camp-build-entry button {
  grid-column:auto;align-self:stretch;justify-self:stretch;
  width:100%;min-height:22px;padding:3px 6px;font-size:.60rem;
}
#page-camp .camp-panel-column {top:43px;bottom:auto;max-height:calc(100% - 250px);overflow:auto;width:250px}
#page-camp .camp-resource-strip{max-width:calc(100% - 240px)}
@media(max-width:750px){
  #page-camp .camp-build-deck {left:6px;right:6px;bottom:6px;height:180px}
  #page-camp .camp-build-deck .camp-build-entry {flex-basis:138px;width:138px;height:167px;min-height:167px;padding:5px}
  #page-camp .camp-build-deck .camp-build-symbol {flex-basis:43px;height:43px;width:54px}
  #page-camp .camp-build-deck .camp-build-copy small {font-size:.51rem}
  #page-camp .camp-panel-column {top:68px;bottom:auto;max-height:calc(100% - 250px);width:min(250px,calc(100% - 14px))}
  #page-camp .camp-resource-strip{max-width:calc(100% - 14px)}
}

/* V4 sprites & tactile collection. Existing resource accounting is server-side. */
#page-camp .camp-build-deck .camp-build-symbol.camp-build-art{
  width:76px;height:57px;flex:0 0 57px;border:0;background:transparent;
}
#page-camp .camp-build-symbol.camp-build-art img{
  width:100%;height:100%;object-fit:contain;display:block;image-rendering:auto;
}
#page-camp .camp-build-symbol.camp-build-scrapmule,
body .camp-card-modal-art.camp-build-scrapmule{
  position:relative;overflow:visible;border:0;background:transparent;
}
#page-camp .camp-build-symbol.camp-build-scrapmule img,
body .camp-card-modal-art.camp-build-scrapmule img{
  position:absolute;left:50%;display:block;max-width:none;height:auto;object-fit:contain;transform:translateX(-50%);
}
#page-camp .camp-build-symbol.camp-build-scrapmule .scrapmule-pad{width:100%;bottom:0}
#page-camp .camp-build-symbol.camp-build-scrapmule .scrapmule-ship{width:74%;bottom:8px}
body .camp-card-modal-art.camp-build-scrapmule{
  width:min(250px,100%);min-height:146px;margin:0 auto;
}
body .camp-card-modal-art.camp-build-scrapmule .scrapmule-pad{width:100%;bottom:0}
body .camp-card-modal-art.camp-build-scrapmule .scrapmule-ship{width:76%;bottom:18px}
#page-camp .camp-counter-icon{width:18px;height:18px;object-fit:contain;flex:none}
#page-camp .camp-claim-flight{position:absolute;z-index:12;width:46px;height:46px;object-fit:contain;
  pointer-events:none;will-change:transform,opacity;filter:drop-shadow(0 0 6px #f4db8a)}
#page-camp .camp-claim-spark{position:absolute;z-index:12;width:4px;height:4px;border-radius:50%;
  background:#ffdf9e;pointer-events:none;will-change:transform,opacity}
@media(max-width:750px){
  #page-camp .camp-build-deck .camp-build-symbol.camp-build-art{width:64px;height:48px;flex-basis:48px}
  #page-camp .camp-counter-icon{width:15px;height:15px}
}

/* V5: compact build cards — full descriptions live in selected building info. */
#page-camp .camp-build-deck{height:174px}
#page-camp .camp-build-deck .camp-build-entry{gap:6px;height:158px;min-height:158px}
#page-camp .camp-build-deck .camp-build-copy{justify-content:flex-end}
#page-camp .camp-build-deck .camp-build-copy span{margin-top:auto;max-height:34px;-webkit-line-clamp:2}
#page-camp .camp-build-deck .camp-build-copy strong{font-size:.68rem;min-height:15px}
@media(max-width:750px){#page-camp .camp-build-deck{height:160px}#page-camp .camp-build-deck .camp-build-entry{height:144px;min-height:144px}}
/* Gold flies to the topbar without clipping at the CAMP viewport edge. */
body>.camp-claim-gold{position:fixed!important;z-index:1001;pointer-events:none}
body>span.camp-claim-gold{background:#ffe6a1;box-shadow:0 0 5px #ffd15b}
body>img.camp-claim-gold{width:46px;height:46px;object-fit:contain;will-change:transform,opacity;filter:drop-shadow(0 0 6px #f4db8a)}
body>span.camp-claim-gold{width:4px;height:4px;border-radius:50%;will-change:transform,opacity}


/* V6: card preview modal + title spacing polish */
#page-camp .camp-build-deck{height:176px}
#page-camp .camp-build-deck .camp-build-entry{gap:7px;height:160px;min-height:160px;cursor:pointer}
#page-camp .camp-build-deck .camp-build-symbol.camp-build-art{width:78px;height:60px;flex:0 0 60px;margin:0 auto 2px}
#page-camp .camp-build-deck .camp-build-copy{justify-content:flex-start;gap:4px}
#page-camp .camp-build-deck .camp-build-copy strong{font-size:.68rem;line-height:1.18;min-height:16px;margin-top:2px}
#page-camp .camp-build-deck .camp-build-copy span{margin-top:auto;max-height:34px;-webkit-line-clamp:2}
#page-camp .camp-card-modal.hidden{display:none}
#page-camp .camp-card-modal{position:absolute;inset:0;z-index:20;display:grid;place-items:center}
#page-camp .camp-card-backdrop{position:absolute;inset:0;background:rgba(2,10,7,.72)}
#page-camp .camp-card-dialog{position:relative;z-index:1;width:min(420px,calc(100% - 26px));background:#071b13f5;border:1px solid #3a7758;border-radius:10px;box-shadow:0 14px 42px rgba(0,0,0,.48);padding:16px 16px 14px}
#page-camp .camp-card-close{position:absolute;top:9px;right:9px;min-width:28px;min-height:28px;padding:0;font-size:1.1rem;line-height:1}
#page-camp .camp-card-modal-content{display:grid;gap:12px;text-align:center}
#page-camp .camp-card-modal-art{display:grid;place-items:center;min-height:122px}
#page-camp .camp-card-modal-art img{width:min(218px,100%);max-height:152px;object-fit:contain;display:block}
#page-camp .camp-card-modal-content strong{display:block;font-size:.98rem;letter-spacing:.02em;color:var(--text)}
#page-camp .camp-card-modal-content p{margin:0;font-size:.76rem;line-height:1.45;color:var(--muted)}
#page-camp .camp-card-modal-meta{font-size:.67rem;line-height:1.4;color:var(--gold)}
#page-camp .camp-card-modal-note{color:var(--green)!important;font-size:.68rem!important;font-weight:700}
@media(max-width:750px){
  #page-camp .camp-build-deck{height:162px}
  #page-camp .camp-build-deck .camp-build-entry{height:146px;min-height:146px}
  #page-camp .camp-build-deck .camp-build-symbol.camp-build-art{width:68px;height:52px;flex-basis:52px}
  #page-camp .camp-card-dialog{width:min(350px,calc(100% - 18px));padding:14px 14px 12px}
  #page-camp .camp-card-modal-art{min-height:104px}
}


/* V7: detached BUILD-card inspector, independent of the map and deck stacking layers. */
body>.camp-card-modal.hidden { display:none!important; }
body>.camp-card-modal { position:fixed; inset:0; z-index:2147483645; display:grid; place-items:center; padding:12px; box-sizing:border-box; }
body>.camp-card-modal .camp-card-backdrop { position:absolute; inset:0; background:rgba(0,9,6,.78); cursor:pointer; }
body>.camp-card-modal .camp-card-dialog { position:relative; z-index:1; width:min(440px,96vw); box-sizing:border-box; padding:19px 20px 18px; background:#071c14; border:1px solid #397e5d; border-radius:8px; box-shadow:0 16px 55px #000b; color:#e8f6e9; }
body>.camp-card-modal .camp-card-close { position:absolute; top:8px; right:9px; padding:3px 8px; background:#0a251a; border:1px solid #356a4d; color:#e8f6e9; font-size:21px; line-height:1.1; cursor:pointer; }
body>.camp-card-modal .camp-card-modal-content { display:grid; gap:10px; padding-top:5px; justify-items:center; text-align:center; }
body>.camp-card-modal .camp-card-modal-art { display:grid; place-items:center; width:100%; height:195px; }
body>.camp-card-modal .camp-card-modal-art img { display:block; width:100%; height:100%; object-fit:contain; }
body>.camp-card-modal .camp-card-modal-content strong { display:block; font-size:1.02rem; color:#f0f6eb; letter-spacing:.025em; }
body>.camp-card-modal .camp-card-modal-content p { margin:0; font-size:.77rem; color:#b4c9bd; line-height:1.48; }
body>.camp-card-modal .camp-card-modal-content .camp-card-modal-meta { color:#eac66d; font-size:.71rem; }
body>.camp-card-modal .camp-card-modal-content .camp-card-modal-note { color:#37f08b; font-size:.71rem; font-weight:750; }
#page-camp .camp-build-deck [data-card-id] { cursor:pointer; }
#page-camp .camp-build-deck [data-card-id]:focus-visible { outline:2px solid #3af18b; outline-offset:-2px; }
@media(max-width:500px){body>.camp-card-modal .camp-card-dialog{padding:16px 12px;}body>.camp-card-modal .camp-card-modal-art{height:155px;}}


/* V8: prevent art from leaking over the text in the detached building inspector. */
body > #camp-card-modal { isolation:isolate; }
body > #camp-card-modal .camp-card-dialog {
  width:min(390px,calc(100vw - 24px)); max-height:calc(100dvh - 24px);
  padding:18px 18px 16px; overflow-y:auto; overflow-x:hidden;
}
body > #camp-card-modal #camp-card-modal-content {
  display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start;
  gap:10px; min-width:0; min-height:0; padding-top:4px; text-align:center;
}
body > #camp-card-modal .camp-card-modal-art {
  box-sizing:border-box; display:flex; align-items:center; justify-content:center;
  flex:0 0 166px; width:100%; height:166px; min-height:0; max-height:166px;
  overflow:hidden; position:relative; margin:0;
}
body > #camp-card-modal .camp-card-modal-art img {
  display:block!important; position:static!important;
  flex:0 1 auto; width:160px!important; height:160px!important;
  max-width:100%!important; max-height:160px!important;
  min-width:0!important; min-height:0!important;
  object-fit:contain!important; transform:none!important;
  margin:0!important; padding:0!important;
}
body > #camp-card-modal #camp-card-title {
  display:block; position:static; margin:0; line-height:1.3; font-size:1.0rem;
}
body > #camp-card-modal .camp-card-modal-description,
body > #camp-card-modal .camp-card-modal-meta,
body > #camp-card-modal .camp-card-modal-note {
  position:static; display:block; margin:0; line-height:1.45;
}
@media(max-width:500px){
  body > #camp-card-modal .camp-card-dialog{width:calc(100vw - 20px);padding:16px 12px;}
  body > #camp-card-modal .camp-card-modal-art{flex-basis:142px;height:142px;max-height:142px;}
  body > #camp-card-modal .camp-card-modal-art img{width:136px!important;height:136px!important;max-height:136px!important;}
}
body > #camp-card-modal .camp-card-close {
  z-index:5; pointer-events:auto;
}
body > #camp-card-modal .camp-card-modal-art {pointer-events:none;}

/* CAMP V12 — usable floating start controls over available refineries. */
#page-camp .camp-refinery-actions{position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden}
#page-camp .camp-refinery-start{
  position:absolute;display:block;min-width:51px;min-height:25px;
  padding:4px 9px;border:1px solid #50ce86;border-radius:3px;
  background:#08291b;color:#a6ffbc;font:800 .69rem/1.2 system-ui,sans-serif;
  letter-spacing:.06em;text-shadow:0 1px 1px #05140a;
  box-shadow:0 2px 8px #010b05a8;
  pointer-events:auto;cursor:pointer;transform-origin:center;
}
#page-camp .camp-refinery-start:hover{background:#175337;border-color:#83ffb2;color:#fff}
#page-camp .camp-refinery-start:disabled{opacity:.45;cursor:default}
#page-camp .camp-refinery-start[hidden]{display:none}
#page-camp #camp-exit-menu{border-color:#4a6751;color:#d8eadd}
#page-camp #camp-exit-menu:hover{border-color:#b5d5bf;color:white}

/* V13: compact counters and intuitive harvesting cursor; native crop images have no soil layer. */
#page-camp .camp-resource-strip {gap:4px;}
#page-camp .camp-counter {padding:4px 6px;gap:4px;}
#page-camp .camp-counter small {font-size:.56rem;}
#page-camp .camp-counter strong {font-size:.67rem;}
#page-camp .camp-counter-icon {width:19px;height:19px;}
@media(max-width:750px){
  #page-camp .camp-resource-strip{max-width:calc(100% - 14px);gap:3px;}
  #page-camp .camp-counter{min-height:21px;padding:3px 4px;}
  #page-camp .camp-counter-icon{width:15px;height:15px;}
}

/* CAMP V14: make construction rejection visible instead of leaving a misleading green preview. */
#page-camp .camp-mode-hint.camp-placement-invalid{border-color:#c56b4a;color:#ffb99c;background:#271710ef}

/* CAMP V15: small inspection dialog for ambient pawns. No extra menus or stats. */
body > #camp-card-modal .camp-npc-modal-art{
  position:relative;display:flex;align-items:center;justify-content:center;
  width:100%;height:155px;max-height:155px;overflow:hidden;pointer-events:none;
}
body > #camp-card-modal .camp-npc-modal-body{
  position:relative;z-index:2;width:144px;height:144px;object-fit:contain;
}
body > #camp-card-modal .camp-npc-wing{
  position:absolute;z-index:1;top:25px;width:83px;height:83px;object-fit:contain;
}
body > #camp-card-modal .camp-npc-wing.left{left:calc(50% - 113px);transform:rotate(-8deg)}
body > #camp-card-modal .camp-npc-wing.right{right:calc(50% - 113px);transform:rotate(8deg)}
body > #camp-card-modal .camp-npc-modal-description{
  font-size:.79rem;line-height:1.5;color:#c2d4c5;max-width:310px;align-self:center;
}
body > #camp-card-modal[data-camp-npc="1"] .camp-card-dialog{width:min(350px,calc(100vw - 24px));cursor:pointer;}
@media(max-width:500px){body > #camp-card-modal .camp-npc-modal-art{height:139px;max-height:139px}body > #camp-card-modal .camp-npc-modal-body{height:131px;width:131px}}

/* COMMAND CAMP: predictable rows of equally sized resource tiles. The Scrapmule
   occupies a 2-column by 2-row feature tile without breaking the resource grid. */
#page-menu .command-camp-panel{margin-top:15px}
#page-menu .command-camp-panel .panel-heading{margin-bottom:10px}
#page-menu .command-camp-ready{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(170px,1fr));
  grid-auto-rows:70px;
  align-content:start;
  gap:8px;
}
#page-menu .command-camp-ready-item{
  display:flex;align-items:center;gap:9px;box-sizing:border-box;
  width:100%;height:70px;min-width:0;padding:7px 9px;
  border:1px solid #31624775;background:#06191080;
}
#page-menu .command-camp-ready-item img{display:block;width:50px;height:50px;flex:none;object-fit:contain;image-rendering:auto}
#page-menu .command-camp-ready-item div{display:grid;gap:4px;min-width:0}
#page-menu .command-camp-ready-item strong{color:#d7f4e4;font-size:.72rem;line-height:1.25;overflow-wrap:anywhere}
#page-menu .command-camp-ready-item span{color:var(--green);font-size:.72rem;font-weight:750;font-variant-numeric:tabular-nums}
#page-menu .command-camp-empty{color:var(--muted);font-size:.83rem;margin:5px 0;grid-column:1/-1}
@media(max-width:570px){
  #page-menu .command-camp-ready{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:72px}
  #page-menu .command-camp-ready-item{height:72px;gap:6px;padding:6px}
  #page-menu .command-camp-ready-item img{width:40px;height:40px}
  #page-menu .command-camp-ready-item strong{font-size:.67rem}
  #page-menu .command-camp-ready-item span{font-size:.67rem}
}
@media(max-width:365px){
  #page-menu .command-camp-ready-item img{width:35px;height:35px}
  #page-menu .command-camp-ready-item{gap:5px}
}

/* V36.1: Scrapmule's original two sprites form ONE docked composition in
   the BUILD card and card inspector. No combined bitmap or stretched art. */
#page-camp .camp-build-deck .camp-build-symbol.camp-build-scrapmule {
  display:block;position:relative;width:78px;height:60px;flex:0 0 60px;
  overflow:hidden;border:0;background:none;margin:0 auto 2px;
}
#page-camp .camp-build-deck .camp-build-symbol.camp-build-scrapmule img {
  position:absolute!important;left:50%!important;top:auto!important;
  height:auto!important;max-width:none!important;max-height:none!important;
  display:block;object-fit:contain;transform:translateX(-50%)!important;
}
#page-camp .camp-build-deck .camp-build-symbol.camp-build-scrapmule img.scrapmule-pad {
  width:90%!important;bottom:0!important;
}
#page-camp .camp-build-deck .camp-build-symbol.camp-build-scrapmule img.scrapmule-ship {
  width:70%!important;bottom:10px!important;
}
body > #camp-card-modal .camp-card-modal-art.camp-card-scrapmule {
  display:block!important;position:relative!important;overflow:hidden!important;
  width:100%!important;height:166px!important;max-height:166px!important;
  flex:0 0 166px!important;
}
body > #camp-card-modal .camp-card-modal-art.camp-card-scrapmule img {
  position:absolute!important;left:50%!important;top:auto!important;
  height:auto!important;max-height:none!important;max-width:none!important;
  object-fit:contain!important;flex:none!important;transform:translateX(-50%)!important;
}
body > #camp-card-modal .camp-card-modal-art.camp-card-scrapmule img.scrapmule-pad{
  width:180px!important;bottom:2px!important;
}
body > #camp-card-modal .camp-card-modal-art.camp-card-scrapmule img.scrapmule-ship{
  width:140px!important;bottom:24px!important;
}
@media(max-width:750px){
  #page-camp .camp-build-deck .camp-build-symbol.camp-build-scrapmule {
    width:68px;height:52px;flex-basis:52px;
  }
  #page-camp .camp-build-deck .camp-build-symbol.camp-build-scrapmule img.scrapmule-ship{bottom:9px!important;}
}
@media(max-width:500px){
  body > #camp-card-modal .camp-card-modal-art.camp-card-scrapmule{
    height:142px!important;max-height:142px!important;flex-basis:142px!important;
  }
  body > #camp-card-modal .camp-card-modal-art.camp-card-scrapmule img.scrapmule-pad{width:153px!important;}
  body > #camp-card-modal .camp-card-modal-art.camp-card-scrapmule img.scrapmule-ship{width:119px!important;bottom:20px!important;}
}

/* V36.3: Slightly more landing pad showing around the docked saucer. */
#page-camp .camp-build-deck .camp-build-symbol.camp-build-scrapmule img.scrapmule-ship{width:67%!important}
body > #camp-card-modal .camp-card-modal-art.camp-card-scrapmule img.scrapmule-ship{width:133px!important}
@media(max-width:500px){body > #camp-card-modal .camp-card-modal-art.camp-card-scrapmule img.scrapmule-ship{width:113px!important}}

/* COMMAND: larger docked Scrapmule, the same framed style as the resources.
   Two columns wide and two resource rows tall. Only visual styling changes. */
#page-menu .command-camp-ready .command-scrapmule{
  display:grid;
  grid-column:span 2;
  grid-row:span 2;
  grid-template-columns:minmax(0,46%) minmax(0,1fr);
  grid-template-rows:repeat(3,min-content);
  align-content:center;
  align-items:center;
  column-gap:10px;
  row-gap:8px;
  box-sizing:border-box;
  width:100%;height:100%;min-width:0;
  padding:6px 13px;
  border:1px solid #3a795779;
  background:#06191080;
  text-align:left;
}
#page-menu .command-scrapmule img{
  display:block;grid-column:1;grid-row:1/4;
  width:133px;height:133px;max-width:100%;
  object-fit:contain;justify-self:center;
}
#page-menu .command-scrapmule strong{
  grid-column:2;grid-row:1;
  font-size:.85rem;line-height:1.2;color:var(--green);letter-spacing:.035em;
}
#page-menu .command-scrapmule span{
  grid-column:2;grid-row:2;
  font-size:.73rem;font-weight:800;color:#ffdc88;
}
#page-menu .command-scrapmule small{
  grid-column:2;grid-row:3;
  font-size:.7rem;line-height:1.35;color:var(--muted);
  font-variant-numeric:tabular-nums;
}
@media(max-width:570px){
  #page-menu .command-camp-ready .command-scrapmule{column-gap:5px;padding:5px 9px}
  #page-menu .command-scrapmule img{width:121px;height:121px}
  #page-menu .command-scrapmule strong{font-size:.76rem}
  #page-menu .command-scrapmule span{font-size:.69rem}
  #page-menu .command-scrapmule small{font-size:.66rem}
}

/* THE SWAMP: fixed category controls beside the scrolling BUILD catalogue. */
#page-camp .camp-build-deck{display:flex;align-items:stretch;gap:8px}
#page-camp .camp-build-deck .camp-build-filters{
  display:flex;flex:0 0 116px;box-sizing:border-box;
  flex-direction:column;justify-content:center;gap:5px;
  height:100%;min-width:0;padding:5px 0;
  background:transparent;border:0;pointer-events:auto;
}
#page-camp .camp-build-deck .camp-build-filters button{
  box-sizing:border-box;width:100%;min-height:27px;padding:5px 4px;
  font-size:.61rem;font-weight:750;line-height:1.15;letter-spacing:.015em;
  color:#bcd6c5;background:#071b13e8;border:1px solid #315a44;
  cursor:pointer;white-space:nowrap;
}
#page-camp .camp-build-deck .camp-build-filters button:hover{
  color:#d8f6df;border-color:#539773;background:#123726ed;
}
#page-camp .camp-build-deck .camp-build-filters button.active,
#page-camp .camp-build-deck .camp-build-filters button[aria-pressed="true"]{
  color:#38f28b;border-color:#38845b;background:#103926f0;
}
#page-camp .camp-build-deck .camp-build-list{
  flex:1 1 auto;width:auto;min-width:0;
}
@media(max-width:750px){
  #page-camp .camp-build-deck{gap:5px}
  #page-camp .camp-build-deck .camp-build-filters{flex-basis:92px;gap:4px;padding:2px 0}
  #page-camp .camp-build-deck .camp-build-filters button{min-height:24px;font-size:.54rem;padding:4px 2px}
}
@media(max-width:400px){
  #page-camp .camp-build-deck .camp-build-filters{flex-basis:78px}
  #page-camp .camp-build-deck .camp-build-filters button{font-size:.5rem}
}

/* CAMP shares the game's green pointer (including the map and building controls).
   Preserve existing hover/drag logic: this changes only the mouse icon. */
#page-camp,
#page-camp *,
body > .camp-card-modal,
body > .camp-card-modal * {
  cursor:url('./assets/ui/greencur.png') 1 1, auto !important;
}

/* COMMAND: direct Camp Ledger access, aligned with the production header. */
#page-menu .command-camp-heading{flex-wrap:wrap;align-items:center}
#page-menu .command-camp-heading h2{margin:0}
#page-menu .command-camp-heading button{flex:0 0 auto;white-space:nowrap}
