/* ER-1215: the tower view is the fullscreen scene (tower-scene.js, tower-scene.css). This file is kept so the old link and help mapping stay valid;
   all tower tile, tab, review and picker rules now live in tower-scene.css. */

/* ER-1505: a card chosen in the picker is staged into the slot (Worksite look: confirm ring, Staged badge). */
.tower-scene .tw-badges .tw-badge--stage { border-color: var(--menu-confirm-border); background: var(--menu-confirm-bg); color: var(--menu-confirm-ink); }
.tower-scene .tw-tile.is-staged { border-color: var(--menu-confirm-border); box-shadow: 0 0 0 2px color-mix(in srgb, var(--menu-confirm) 55%, transparent); }

/* ER-1502 wave 3: the replacement flow (choose, compare, review). Tokens and families of the Tower tab sheets (.tt-sheet, .th-chip, .th-bar in tower-scene.css); nothing is an image. */
.tower-scene .tr-steps { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 0 0 6px; padding: 2px 4px 0; font-size: 12px; color: var(--menu-muted); }
.tower-scene .tr-steps li + li::before { content: "›"; margin-right: 16px; color: var(--menu-brass); }
.tower-scene .tr-steps li.on { color: var(--menu-focus); font-weight: 700; }
.tower-scene .tr-banner { margin: 0 0 8px; }
.tower-scene .tr-choose { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.tower-scene .tr-pick { min-width: 0; }
.tower-scene .tr-pick .lp-picker.is-inline { position: relative; }
.tower-scene .tr-current h3, .tower-scene .tr-sheet h3 { gap: 10px; }
.tower-scene .tr-cur { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 8px 12px; align-items: center; }
.tower-scene .tr-art { height: 128px; display: grid; place-items: center; border: 1.5px solid color-mix(in srgb, var(--menu-brass) 62%, transparent); border-radius: 5px; background: color-mix(in srgb, var(--menu-inset) 50%, transparent); overflow: hidden; }
.tower-scene .tr-art img { max-height: 92%; max-width: 92%; object-fit: contain; filter: drop-shadow(0 5px 7px var(--menu-shadow)); }
.tower-scene .tr-nm { font: 700 20px/1.1 var(--font-display); color: var(--menu-title); }
.tower-scene .tr-sub { font-size: 12px; color: var(--menu-muted); }
.tower-scene .tr-big { margin-top: 4px; font-size: 13px; color: var(--menu-ink); }
.tower-scene .tr-big b { font: 700 24px/1 var(--font-display); color: var(--menu-focus); font-variant-numeric: tabular-nums; }
.tower-scene .tr-big b.mute { color: var(--menu-muted); }
.tower-scene .tr-cmp { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 14px; }
.tower-scene .tr-col { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; align-items: center; }
.tower-scene .tr-who { font: 600 11px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--menu-muted); }
.tower-scene .tr-vs { display: grid; place-items: center; }
.tower-scene .tr-big2 { font: 700 40px/1 var(--font-display); color: var(--menu-muted); }
.tower-scene .tr-vchip { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border: 1px solid var(--menu-brass); border-radius: 3px; font: 600 12px/1.2 var(--font-body); white-space: nowrap; color: var(--menu-title); background: color-mix(in srgb, var(--menu-inset) 85%, transparent); }
.tower-scene .tr-vchip.ok { border-color: var(--menu-confirm-border); background: var(--menu-confirm-bg); color: var(--menu-confirm-ink); }
.tower-scene .tr-vchip.warn { border-color: var(--menu-warn-border); background: var(--menu-warn-bg); color: var(--menu-warn-ink); }
.tower-scene .tr-vchip.bad { border-color: var(--menu-attention-border); background: var(--menu-attention-bg); color: var(--menu-attention-ink); }
.tower-scene .tr-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.tower-scene .tr-rule { margin: 2px 12px; font-size: 12.5px; line-height: 1.4; color: var(--menu-ink); }
.tower-scene .tr-ops { margin: 4px 12px 0 30px; padding: 0; font-size: 13px; color: var(--menu-ink); display: grid; gap: 4px; }
.tower-scene .tr-act { padding: 10px 12px 0; }
.tower-scene .tr-nothing { padding: 4px 12px 8px; }
.tower-scene .tr-wait { min-height: 120px; }
.tower-scene .tr-replace-picker .cg-face, .tower-scene .tr-replace-picker .cr-id { position: relative; }
.tower-scene .tr-verdict { position: absolute; left: 6px; top: 6px; z-index: 3; display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border: 1px solid var(--menu-brass); border-radius: 3px; background: color-mix(in srgb, var(--menu-inset) 90%, transparent); color: var(--menu-title); font: 600 12px/1.2 var(--font-body); white-space: nowrap; pointer-events: none; }
.tower-scene .tr-v-ready { border-color: var(--menu-confirm-border); background: var(--menu-confirm-bg); color: var(--menu-confirm-ink); }
.tower-scene .tr-v-cooling, .tower-scene .tr-v-unknown { border-color: var(--menu-warn-border); background: var(--menu-warn-bg); color: var(--menu-warn-ink); }
.tower-scene .tr-v-na { border-color: var(--menu-attention-border); background: var(--menu-attention-bg); color: var(--menu-attention-ink); }
.tower-scene .tr-replace-picker .cr-id .tr-verdict { position: static; margin-top: 4px; width: max-content; }
.tower-scene .tr-fx { font-size: 11px; }
/* states strip (provisional, building, ready, refused, displaced) */
.tower-scene .tr-states { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; }
.tower-scene .tr-state { display: grid; gap: 4px; max-width: 320px; }
.tower-scene .th-bar.ok i { background: var(--menu-confirm-ink); }
/* Q-212: review warning stays inside the existing glass changes row. */
.tower-scene .tw-chg .tw-weak-warning { color: var(--menu-warn-ink); font-weight: 700; line-height: 1.35; }
@media (max-width: 1500px) { .tower-scene .tr-choose { grid-template-columns: minmax(0, 1fr) 300px; } .tower-scene .tr-cmp { gap: 8px; } }
/* compact bar: one filter row (towers share one edition, so the edition dropdown is left out) */
.tower-scene .tr-replace-picker .pb-filters { flex-wrap: nowrap; gap: 6px; }
.tower-scene .tr-replace-picker .pb-filters > .pk-dd + .pk-dd { display: none; }
.tower-scene .tr-replace-picker .pb-filters .cf-search { flex: 1 1 140px; min-width: 120px; }
.tower-scene .tr-replace-picker .pb-filters .cf-s-w { flex: 0 1 112px; min-width: 96px; }

/* ER-2259: Add Reaper uses the same .btn / .tc-pp--add recipe as Add worker
   in menu-base.css. Keep the box four pixels below the tile in both views. */
html body .tower-scene[data-view="slots"] .tw-li.tm-tile { gap: 4px; }

/* ER-2393: the art switch shares the row's positioning context, outside all slot hover/focus subtrees. */
.tower-scene .tm-slots { position: relative; }
html body .tower-scene .tm-slots > .sp-switch {
  position: absolute !important; left: auto !important; right: 0 !important; top: 0 !important;
  transform: translateY(calc(-100% - 8px)) !important; translate: none !important;
  z-index: 1; margin: 0 !important; opacity: 1 !important; visibility: visible !important;
  pointer-events: auto !important; transition: none !important;
}

/* ER-2405: the pending tile explains why replacement waits for the next hour. */
.tower-scene .tw-pending-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--menu-warn-border); border-radius: var(--radius-control); background: var(--menu-warn-bg); color: var(--menu-warn-ink); font: 600 16px/1.35 var(--font-body); }
.tower-scene .tw-pending-note span { flex: 1; overflow-wrap: anywhere; }
.tower-scene .tw-pending-note button { flex: none; border: 0; background: transparent; color: inherit; font: 700 24px/1 var(--font-body); cursor: pointer; }
.tower-scene .lp-picker .tm-staked-picker { display: block; margin: 4px 0 0; padding: 5px 8px; border: 1px solid var(--menu-warn-border); border-radius: var(--radius-control); background: var(--menu-warn-bg); color: var(--menu-warn-ink); font: 600 14px/1.25 var(--font-body); text-align: center; }

/* ER-1999: the Amber/day box. The number and its label are centred in the WHOLE box, ignoring the icon; the Amber icon (ER-1262) sits at the left edge (inner padding), vertically centred over the
   full box height, and is as tall as the box allows with an equal 6 px margin top, bottom and left (ER-2005 note). The number is a little smaller than the Power figure so the two never meet at 1366. */
.tower-scene .tw-pp.tw-amber { position: relative; }
.tower-scene .tw-pp.tw-amber > b { font-size: max(16px, 11cqi); }
.tower-scene .tw-amber-ico { position: absolute; left: 5px; top: 5px; bottom: 5px; aspect-ratio: 1; display: block; pointer-events: none; }   /* equal margin to top, bottom and left (5 px inside the 1 px rim = 6 px from the outer edge); the icon is as tall as the box allows */
.tower-scene .tw-amber-ico > * { display: block; width: 100%; height: 100%; object-fit: contain; }

/* ER-2033: a second Amber icon of the same size on the right edge, equal margins; the number and label stay centred between them. */
.tower-scene .tw-amber-ico--r { left: auto; right: 5px; }

/* ER-2033 (art-out/tile-badges/STYLE-PROPOSAL.md, zone A): the ONE state pill of a tower tile (Fallen, Inactive, Waiting / Joins, Staged, Unstaking) sits top left inside the art, 12 px body, 1 px rim, glass fill,
   20 px minimum height; the top right stays for the remove x (the badge row leaves 45 px free there). It no longer sits above the name plate (where it was hidden behind art and abilities). */
.tower-scene .tw-pp.tw-amber { --tw-amber-size:calc((var(--tile-pp-h) - 10px) * .9); min-height:max(32px, calc(var(--tw-amber-size) - 4px)); height:max(32px, calc(var(--tw-amber-size) - 4px)); display:flex; flex-direction:row; align-items:center; justify-content:center; gap:5px; padding:1px 5px 1px calc(var(--tw-amber-size) + 7px); white-space:nowrap; }
.tower-scene .tw-pp.tw-amber > b { font-size:clamp(17px, 1.35vw, 23px); line-height:1; overflow:visible; }
.tower-scene .tw-pp.tw-amber > small { font-size:12px; line-height:1; white-space:nowrap; }
.tower-scene .tw-amber-ico { left:5px; top:50%; bottom:auto; width:var(--tw-amber-size); height:var(--tw-amber-size); transform:translateY(-50%); }
.tower-scene .tw-amber-ico--r { display:none; }
@media (max-width:1300px) and (max-height:740px) {
  .tower-scene[data-view="slots"] .tw-li.tm-tile { gap:1px; }
  .tower-scene .tw-pp.tw-amber { min-height:28px; height:28px; }
}

/* ER-2402: shared assignment presenter on the existing tower slot geometry. */
/* Confirm actions share the MENU-BASE button recipe across account and signing sheets. */
html body :is(.panel-layer .panel, .land-panel, .tower-scene) .btn.primary.is-confirm,
html body .btn.primary.is-confirm { --btn-tint:var(--menu-confirm); --btn-rim:var(--menu-confirm); color:var(--menu-title); }
.tower-scene .tw-tile.is-staged { border-color:var(--glass-rim); box-shadow:inset 0 0 0 2px var(--menu-brass); }
.tower-scene .tw-tile.is-pending-removal { box-shadow:inset 0 0 0 2px var(--menu-attention); }
.tower-scene .tm-assignment-review-host { position:relative; z-index:3; width:min(1070px,100%); margin:0 auto; }
.tower-scene .tm-assignment-review-host.assignment-review-band { width:min(1070px,100%); margin:0 auto 12px; }
.tower-scene .tw-li.assignment-tile { box-shadow:none; overflow:visible; }
.tower-scene .tw-li.assignment-tile .assignment-tile-status { position:relative; inset:auto; bottom:auto; order:8; width:100%; min-height:38px; }
.tower-scene .tw-li.assignment-tile .assignment-undo-badge { position:relative; inset:auto; order:9; width:100%; justify-content:center; min-height:38px; }
.tower-scene .tw-li.assignment-tile .assignment-signed-badge { top:5px; left:5px; }
.tower-scene .tw-li .tw-pp:not(.tw-amber):not(.assignment-power-box):not(.tw-pp--add) { row-gap:4px; }
.tower-scene[data-view="slots"]:has(.assignment-tile) .tm-slots { margin-top:calc(var(--tile-row-top) - 436px) !important; }
.tower-scene[data-view="changes"] .tm-slots { margin-top:0; }
.tower-scene[data-view="changes"] .ts-body { top:0; bottom:0; left:0; right:0; overflow-y:auto; }
.tower-scene[data-view="changes"] .tm-assignment-review-host { position:absolute; top:calc(var(--tile-row-top) - 296px); left:0; right:0; }
.tower-scene[data-view="changes"] .tm-assignment-review-host.assignment-review-band { max-height:220px; }
.tower-scene[data-view="changes"] .tm-assignment-review-host { top:calc(var(--tile-row-top) - 308px); }
.tower-scene[data-view="changes"] .tm-slots { position:absolute; top:calc(var(--tile-row-top) - 44px); left:50%; transform:translateX(-50%); margin:0 !important; }
.tower-scene[data-view="changes"] .tm-draft-status { position:absolute; top:calc(var(--tile-row-top) - 78px); right:max(16px,calc((100% - 1070px)/2)); z-index:3; margin:0; padding:3px 8px; border:1px solid var(--glass-rim); border-radius:var(--radius-frame); background:linear-gradient(var(--lp-glass),var(--lp-glass)),var(--menu-surface-bottom); color:var(--menu-ink); font-size:17px; }
.tower-scene[data-view="slots"] .tm-draft-warning { position:absolute; top:calc(var(--tile-row-top) - 78px); left:50%; transform:translateX(-50%); z-index:3; width:min(800px,calc(100% - 24px)); margin:0; padding:8px 12px; border:1px solid var(--menu-warn); border-radius:var(--radius-frame); background:linear-gradient(var(--lp-glass),var(--lp-glass)),var(--menu-surface-bottom); color:var(--menu-warn-ink); font-size:18px; text-align:center; }
/* Restore remains the owner of the health plate and heart button. Its transient
   status gets a short reserved label so it cannot paint over Health. */
.tower-scene .restore-badge--reaper:not(.restore-plate--confirm):not(:has(.trp-btn)) .progress-bar__headcopy { padding-right:58px; }
.tower-scene .restore-badge--reaper:not(.restore-plate--confirm) .trp-action:not(:has(.trp-btn)) { position:absolute; right:3px; top:6px; width:53px; overflow:hidden; white-space:nowrap; font-size:0; text-align:right; }
.tower-scene .restore-badge--reaper:not(.restore-plate--confirm) .trp-action:not(:has(.trp-btn))::after { content:'Price…'; font-size:11px; color:var(--menu-warn-ink); }
.tower-scene .restore-badge--reaper:not(.restore-plate--confirm) .trp-action:has([role="alert"]) [role="alert"] { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
.tower-scene .tw-li.tm-tile .restore-badge--reaper:not(.restore-plate--confirm):has([data-restore-action="retry"]) { width:100%; max-width:100%; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:5px; }
.tower-scene .restore-badge--reaper:not(.restore-plate--confirm):has([data-restore-action="retry"]) .trp-copy { grid-column:1; min-width:0; width:auto; }
.tower-scene .restore-badge--reaper:not(.restore-plate--confirm):has([data-restore-action="retry"]) .progress-bar__headcopy { padding-right:0; gap:2px; }
.tower-scene .tw-li.tm-tile .restore-badge--reaper:not(.restore-plate--confirm) .trp-action:has([data-restore-action="retry"]) { position:static; inset:auto; grid-column:2; width:max-content; display:flex; justify-content:flex-end; margin:0; }
.tower-scene .restore-badge--reaper:not(.restore-plate--confirm) .trp-action:has([data-restore-action="retry"])::before { content:none; }
.tower-scene .tw-li.tm-tile .restore-badge--reaper:not(.restore-plate--confirm) .trp-btn.btn[data-restore-action="retry"] { width:54px; min-width:54px; height:30px; white-space:normal; font-size:14px; line-height:1; padding:1px 2px; text-align:center; }
@media(max-width:1450px){ .tower-scene .tw-li.tm-tile .restore-badge--reaper:not(.restore-plate--confirm) .trp-btn.btn[data-restore-action="retry"] { width:52px; min-width:52px; } }
/* The joined Health/Heal bar keeps its shared rim. Reserve retry its own
   segment so the two-line label never takes space from Health. */
.tower-scene .tw-li.tm-tile .restore-badge--reaper.restore-badge--reaper:not(.restore-plate--confirm):has([data-restore-action="retry"]) { display:flex; flex-direction:row; align-items:stretch; gap:0; }
.tower-scene .tw-li.tm-tile .restore-badge--reaper.restore-badge--reaper:not(.restore-plate--confirm):has([data-restore-action="retry"]) .trp-copy { flex:1 1 0; min-width:0; }
.tower-scene .tw-li.tm-tile .restore-badge--reaper.restore-badge--reaper:not(.restore-plate--confirm) .trp-action:has([data-restore-action="retry"]) { flex:0 0 58px; width:58px; min-width:58px; margin-left:-1px; padding:2px; display:grid; place-items:center; }
.tower-scene .tw-li.tm-tile .restore-badge--reaper.restore-badge--reaper:not(.restore-plate--confirm) .trp-btn.btn[data-restore-action="retry"] { width:54px; min-width:54px; height:30px; min-height:30px; margin:0; }
