/* ===== request 45: one look for the command room and the battle panel =====
   dark gunmetal steel (bevels, screws, scratches, a cold sheen) around phosphor-green CRT glass
   (scanlines, glass reflection, a soft glow) — the same as the big command screen */
:root { --steel-hi: #c9d0c6; --steel: #7d847b; --steel-lo: #2b302c; --phos: #9fe6bd; --phos-glow: rgba(120, 230, 170, 0.6); }

/* ---------- 1. command room fan console: steel frames, CRT faces ---------- */
.cr .fanbtn { background: linear-gradient(180deg, #e3e8df, #a3aaa0 20%, #5b625b 60%, #262a27); color: var(--phos); }
.cr .fanbtn::before { background: linear-gradient(180deg, #030403, #141816 55%, #4a514b); }
.cr .fanbtn::after {
  --face-c: radial-gradient(ellipse 85% 70% at 50% 42%, #23402f, #102017 58%, #060c08);
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 26%, transparent 27%, transparent 72%, rgba(255, 255, 255, 0.04) 73%, transparent 86%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.3) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 58%, rgba(0, 0, 0, 0.55) 100%),
    var(--face-c); }
.cr .fanbtn.sel::after { --face-c: radial-gradient(ellipse 85% 70% at 50% 42%, #3f7553, #1b3a27 58%, #08130c); }
.cr .fanbtn .fl b { color: #d4ffe6; text-shadow: 0 0 8px var(--phos-glow), 0 0 2px rgba(200, 255, 220, 0.8), var(--ol); }
.cr .fanbtn .fl small { color: var(--phos); text-shadow: 0 0 6px rgba(120, 230, 170, 0.45), var(--ol); }
.cr .fanbtn.sel .fl b { color: #f2fff6; }
.cr .fanbtn.key::after { --face-c: radial-gradient(ellipse 85% 70% at 50% 40%, #6a4414, #2c1c08 60%, #120b03); }
.cr .fanbtn.key.sel::after { --face-c: radial-gradient(ellipse 85% 70% at 50% 40%, #8e5c1a, #3e270a 60%, #170e04); }
.cr .fanbtn.key .fl b { color: #ffe2a0; text-shadow: 0 0 8px rgba(255, 190, 80, 0.7), var(--ol); }
.cr .fanbtn.key.small::after, .cr .fanbtn.arrowk::after { --face-c: radial-gradient(ellipse 85% 70% at 50% 42%, #1d3426, #0d1a12 58%, #050a07); }
.cr .fanbtn.arrowk .fl b { color: #c8ffdc; text-shadow: 0 0 9px var(--phos-glow), var(--ol); }
.cr .fanbtn.mis.lock::after { --face-c: radial-gradient(ellipse 85% 70% at 50% 42%, #1f2421, #111412 60%, #070908); }
.cr .fanbtn.nat::after { --face-c: radial-gradient(ellipse 90% 60% at 50% 110%, color-mix(in srgb, var(--nc) 30%, transparent), transparent 70%), radial-gradient(ellipse 85% 70% at 50% 42%, #23402f, #102017 58%, #060c08); }
.cr .fanbtn.nat.sel::after { --face-c: radial-gradient(ellipse 90% 60% at 50% 110%, color-mix(in srgb, var(--nc) 40%, transparent), transparent 70%), radial-gradient(ellipse 85% 70% at 50% 42%, #3f7553, #1b3a27 58%, #08130c); }
.cr .fanslot:has(.fanbtn:hover), .cr .fanslot:has(.fanbtn.focus) { filter: brightness(1.12) drop-shadow(0 0 7px rgba(120, 230, 170, 0.6)); }
.cr .fanslot:has(.fanbtn.sel) { filter: brightness(1.1) drop-shadow(0 0 10px rgba(120, 230, 170, 0.75)); }
.cr .fan .bar .core { stroke: #1d2a22; }
.cr .fan .bar.on .glow { stroke: rgba(120, 230, 170, 0.4); }
.cr .fan .bar.on .core { stroke: #b8ffd4; }
.cr .fanslot .fno { color: #0d1410; background: linear-gradient(180deg, #d2d8cf, #8c938a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.7); }
.cr .fanslot:has(.fanbtn.key) .fno { background: linear-gradient(180deg, #e8c070, #a07a30); }
.cr .fanslot .sc { background: radial-gradient(circle at 35% 30%, #f6faf2 0 12%, #a3aaa0 36%, #3c423d 100%); }
.cr .fanslot .sc::after { background: #222622; }
.cr .fandeco .scope, .cr .fandeco .osc { border-color: #9aa298; box-shadow: 0 0 0 1.5px #1f2320, 0 3px 6px rgba(0, 0, 0, 0.7), inset 0 0 10px #000; }
.cr .fandeco .gauge { border-color: #b3bab0; box-shadow: 0 0 0 1.5px #262a27, 0 3px 6px rgba(0, 0, 0, 0.7), inset 0 0 6px rgba(0, 0, 0, 0.55); }
.cr .fandeco .lamps, .cr .fandeco .bars { border-color: #6e756d; }
.cr .fandeco .lamp { border-color: #8a9288; }
.cr .fandeco .tog span { background: linear-gradient(180deg, #6a7168, #2e332f); border-color: #a9b0a6; }
/* the big screen's frame gets the same cold sheen and phosphor rim, so screen and console read as one desk */
.cr .crt { box-shadow: 0 0 calc(30px * var(--s)) rgba(120, 220, 170, 0.14), inset 0 0 0 1px rgba(160, 230, 190, 0.22), 0 12px 24px rgba(0, 0, 0, 0.55); }
.cr .crt-in::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 8;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 24%, transparent 25%); }

/* ---------- 2. map pick: an old CRT set switching channel ---------- */
.cr .crt .tvx { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 9; pointer-events: none; opacity: 0; }
.cr .crt .tvx::before, .cr .crt .tvx::after, .cr .crt .tvx i { content: ""; position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); border-radius: 50%; }
.cr .crt .tvx::before { width: 240px; height: 3px; background: radial-gradient(ellipse 50% 50%, #ffffff, rgba(190, 255, 220, 0.8) 30%, transparent 70%); }
.cr .crt .tvx::after { width: 3px; height: 120px; background: radial-gradient(ellipse 50% 50%, #ffffff, rgba(190, 255, 220, 0.8) 30%, transparent 70%); }
.cr .crt .tvx i { width: 18px; height: 18px; background: radial-gradient(circle, #fff 0 25%, rgba(200, 255, 225, 0.9) 40%, transparent 72%); box-shadow: 0 0 18px 6px rgba(160, 255, 200, 0.55); }
.cr .crt.tvoff .crt-in { animation: tvOff 0.19s cubic-bezier(.5, 0, .9, .4) forwards; }
.cr .crt.tvoff .tvx { animation: tvDotOff 0.19s ease-in forwards; }
.cr .crt.tvon.boot .crt-in, .cr .crt.tvon .crt-in { animation: tvOn 0.32s cubic-bezier(.1, .7, .3, 1) both; }
.cr .crt.tvon .tvx { animation: tvDotOn 0.32s ease-out forwards; }
.cr .crt.tvon.boot::before, .cr .crt.tvoff::before { animation: none; opacity: 0; }
@keyframes tvOff {
  0% { transform: scale(1, 1); filter: brightness(1); }
  55% { transform: scale(1, 0.012); filter: brightness(3) saturate(0.3); }
  100% { transform: scale(0.004, 0.006); filter: brightness(4) saturate(0); } }
@keyframes tvDotOff { 0%, 45% { opacity: 0; transform: scale(0.4); } 80% { opacity: 1; transform: scale(1.1); } 100% { opacity: 1; transform: scale(0.8); } }
@keyframes tvOn {
  0% { transform: scale(0.004, 0.006); filter: brightness(4) saturate(0) contrast(1.4); }
  35% { transform: scale(1, 0.012); filter: brightness(3) saturate(0.3) contrast(1.3); }
  70% { transform: scale(1, 1.03); filter: brightness(1.35) contrast(1.15); }
  82% { filter: brightness(0.8); }
  90% { filter: brightness(1.15); }
  100% { transform: scale(1, 1); filter: none; } }
@keyframes tvDotOn { 0% { opacity: 1; transform: scale(0.9); } 40% { opacity: 0.8; transform: scale(1.3, 0.5); } 100% { opacity: 0; transform: scale(2, 0.1); } }

/* ---------- 3. battle command panel: gunmetal steel and CRT glass, the same desk as the command room ---------- */
#sidebar.panel::before {
  background:
    radial-gradient(circle, #f6faf2 0 1px, #a8afa5 1.6px 2.8px, #262a27 3.4px, transparent 4px) left 4px top 4px / 10px 10px no-repeat,
    radial-gradient(circle, #f6faf2 0 1px, #a8afa5 1.6px 2.8px, #262a27 3.4px, transparent 4px) right 4px top 4px / 10px 10px no-repeat,
    radial-gradient(circle, #f6faf2 0 1px, #a8afa5 1.6px 2.8px, #262a27 3.4px, transparent 4px) left 4px bottom 4px / 10px 10px no-repeat,
    radial-gradient(circle, #f6faf2 0 1px, #a8afa5 1.6px 2.8px, #262a27 3.4px, transparent 4px) right 4px bottom 4px / 10px 10px no-repeat,
    radial-gradient(circle, #f6faf2 0 1px, #a8afa5 1.6px 2.8px, #262a27 3.4px, transparent 4px) left 4px center / 10px 10px no-repeat,
    radial-gradient(circle, #f6faf2 0 1px, #a8afa5 1.6px 2.8px, #262a27 3.4px, transparent 4px) right 4px center / 10px 10px no-repeat,
    repeating-linear-gradient(180deg, rgba(160, 230, 190, 0.5) 0 1.5px, transparent 1.5px 9px) left calc(var(--pb) / 2 - 3px) top 20% / 6px 22% no-repeat,
    repeating-linear-gradient(180deg, rgba(160, 230, 190, 0.5) 0 1.5px, transparent 1.5px 9px) right calc(var(--pb) / 2 - 3px) bottom 20% / 6px 22% no-repeat,
    repeating-linear-gradient(180deg, rgba(200, 208, 198, 0.35) 0 1.5px, transparent 1.5px 9px) left calc(var(--pb) / 2 - 3px) bottom 20% / 6px 22% no-repeat,
    repeating-linear-gradient(180deg, rgba(200, 208, 198, 0.35) 0 1.5px, transparent 1.5px 9px) right calc(var(--pb) / 2 - 3px) top 20% / 6px 22% no-repeat,
    linear-gradient(115deg, rgba(255, 255, 255, 0.06) 0%, transparent 30%) center / calc(100% - 2 * var(--pb) + 2px) calc(100% - 2 * var(--pb) + 2px) no-repeat,
    linear-gradient(180deg, rgba(20, 24, 22, 0.95), rgba(9, 11, 10, 0.97)) center / calc(100% - 2 * var(--pb) + 2px) calc(100% - 2 * var(--pb) + 2px) no-repeat,
    linear-gradient(#d4dad1, #4a504b) center / calc(100% - 2 * var(--pb) + 6px) calc(100% - 2 * var(--pb) + 6px) no-repeat,
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px),
    linear-gradient(160deg, #6c736b 0%, #3f4540 28%, #565d56 50%, #2a2e2b 76%, #474d48 100%);
  box-shadow: inset 0 0 0 1px #060706, inset 0 0 0 3px #9aa298, inset 0 0 0 4px #1c201d, inset 0 7px 9px rgba(255, 255, 255, 0.08), 0 0 14px rgba(120, 230, 170, 0.12), 0 6px 14px rgba(0, 0, 0, 0.6);
}
#sidebar.panel::after { box-shadow: 0 0 0 1.5px #7d847b, inset 0 1px 2px #000, 0 0 8px rgba(120, 230, 170, 0.25); }
#tabs .btn, #sidetools .btn {
  background: linear-gradient(180deg, #6a7169 0%, #444a45 46%, #343935 54%, #222623 100%);
  box-shadow: inset 0 0 0 1px #060706, inset 0 0 0 2px #a3aaa0, inset 0 0 0 3px rgba(10, 12, 11, 0.85), inset 0 4px 0 2px rgba(255, 255, 255, 0.1), 0 2px 0 #050605;
  color: #e8efe6; }
#tabs .btn::before { background:
    radial-gradient(circle, #f6faf2 0 0.8px, #7d847b 1.4px 2px, transparent 2.6px) left top / 6px 6px no-repeat,
    radial-gradient(circle, #f6faf2 0 0.8px, #7d847b 1.4px 2px, transparent 2.6px) right top / 6px 6px no-repeat,
    radial-gradient(circle, #f6faf2 0 0.8px, #7d847b 1.4px 2px, transparent 2.6px) left bottom / 6px 6px no-repeat,
    radial-gradient(circle, #f6faf2 0 0.8px, #7d847b 1.4px 2px, transparent 2.6px) right bottom / 6px 6px no-repeat; }
#tabs .btn.sel { color: #e6fff0; background: radial-gradient(ellipse 85% 80% at 50% 40%, #3f7553, #1b3a27 60%, #08130c); text-shadow: 0 0 7px var(--phos-glow), var(--ol);
  box-shadow: inset 0 0 0 1px #060706, inset 0 0 0 2px #b8ffd4, inset 0 0 10px rgba(120, 230, 170, 0.45), 0 0 8px rgba(120, 230, 170, 0.45); }
#tabs .tab.sel::after { background: #b8ffd4; box-shadow: 0 0 6px #5dff9a, 0 0 2px #eafff2; }
#btnRepairMode.on { background: linear-gradient(180deg, #b48a2c 0%, #8a6418 46%, #6e4e10 54%, #4a340a 100%); }
#btnSellMode.on { background: linear-gradient(180deg, #b0503a 0%, #85301e 46%, #6a2212 54%, #45150a 100%); }
#sidetools kbd { color: #b8c2b6; }
#resbox > div { background: linear-gradient(#141815, #070908); box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #7d847b, inset 0 0 0 3px rgba(0, 0, 0, 0.85), inset 0 3px 7px rgba(0, 0, 0, 0.8); }
#powerpanel.low { box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #ff6a4a, inset 0 0 10px rgba(255, 60, 30, 0.55), 0 0 8px rgba(255, 70, 40, 0.6); }
#credits { text-shadow: 0 0 8px rgba(255, 220, 120, 0.45), var(--ol); }
#cardscreen { background: radial-gradient(ellipse 110% 90% at 50% 40%, rgba(40, 80, 58, 0.32), rgba(3, 7, 5, 0.94) 78%), #040705;
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #a3aaa0, inset 0 0 0 3px #1a1e1b, inset 0 0 0 4px rgba(0, 0, 0, 0.9), inset 0 0 16px rgba(0, 0, 0, 0.95), inset 0 0 30px rgba(120, 230, 170, 0.16), 0 1px 0 rgba(255, 255, 255, 0.14), 0 -1px 0 rgba(0, 0, 0, 0.6); }

/* ---------- 4. build / production cards: the item's own drawing, full-bleed over a dark CRT backdrop ---------- */
.card, .card.sig, .card.air {
  background:
    radial-gradient(ellipse 70% 55% at 50% 55%, rgba(120, 230, 170, 0.22), transparent 70%),
    repeating-linear-gradient(0deg, rgba(120, 230, 170, 0.06) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, rgba(120, 230, 170, 0.06) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, #13261b, #07110b 70%, #040805);
  box-shadow: inset 0 0 0 1px #050605, inset 0 0 0 2px #7d847b, inset 0 0 0 3px rgba(8, 10, 9, 0.9); }
.card.air { background:
    radial-gradient(ellipse 70% 55% at 50% 55%, rgba(120, 200, 240, 0.22), transparent 70%),
    repeating-linear-gradient(0deg, rgba(120, 200, 240, 0.06) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, rgba(120, 200, 240, 0.06) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, #11222c, #070f14 70%, #040709); }
.card.sig { box-shadow: inset 0 0 0 1px #050605, inset 0 0 0 2px #e2c070, inset 0 0 0 3px rgba(8, 10, 9, 0.9), inset 0 0 10px rgba(255, 214, 120, 0.3); }
.card img.art { inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.12) translateY(2%); filter: none; }
/* glass over the picture: a dark band under the name and the price, scanlines and a sheen */
.card::before { inset: 0; z-index: 0; border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(3, 6, 4, 0.82) 0%, rgba(3, 6, 4, 0) 26%, rgba(3, 6, 4, 0) 70%, rgba(3, 6, 4, 0.85) 100%),
    linear-gradient(118deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 24%, transparent 25%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px); }
.card .name, .card .cost, .card .cnt, .card .ready, .card .prog { z-index: 1; }
/* request 49: building cards are full-bleed redrawn scenes: no zoom, the picture fills the card edge to edge; the glass
   (dark bands behind the name and the price) lies over the picture so the labels read on any scene */
.card.scene img.art.full { inset: 0; width: 100%; height: 100%; object-fit: cover; transform: none; filter: saturate(1.05) contrast(1.04); }
.card.scene::before { z-index: 1;
  background:
    linear-gradient(180deg, rgba(3, 6, 4, 0.78) 0%, rgba(3, 6, 4, 0.25) 22%, rgba(3, 6, 4, 0) 34%, rgba(3, 6, 4, 0) 66%, rgba(3, 6, 4, 0.3) 78%, rgba(3, 6, 4, 0.82) 100%),
    linear-gradient(118deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 24%, transparent 25%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.1) 0 1px, transparent 1px 3px); }
.card.scene .name, .card.scene .cost, .card.scene .cnt, .card.scene .ready, .card.scene .prog { z-index: 2; }
/* the side's colour as a thin lit strip down the left edge */
.card { --tc: #c9b67a; }

/* ---------- 5. command room back button: steel plate with phosphor text ---------- */
#screen-menu .backbtn { border-image: none; border: 2px solid var(--steel-lo, #3a403b); border-radius: 6px;
  background: linear-gradient(180deg, #5d655f 0%, #2c322e 48%, #1b201d 52%, #303732 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -2px 3px rgba(0,0,0,0.6), 0 3px 8px rgba(0,0,0,0.6);
  color: #b9f5cf; text-shadow: 0 0 6px rgba(90, 255, 160, 0.55), 0 2px 0 #000; }
#screen-menu .backbtn:hover, #screen-menu .backbtn.focus { color: #eafff1; box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 0 12px rgba(90,255,160,0.45), 0 3px 8px rgba(0,0,0,0.6); }
.card::after { left: 3px; right: auto; top: 22%; bottom: 22%; width: 3px; height: auto; background: var(--tc); box-shadow: 0 0 6px var(--tc); opacity: 0.9; z-index: 1; }
.card.act::after { background: #8ff07a; box-shadow: 0 0 6px #5dff6a; }
.card:hover::after, .card.focus::after { background: #ffd877; box-shadow: 0 0 7px #ffbf3c; }
.card.focus { box-shadow: inset 0 0 0 1px #050605, inset 0 0 0 2px #b8ffd4, inset 0 0 0 3px rgba(8, 10, 9, 0.9), 0 0 8px rgba(120, 230, 170, 0.6); }
/* request 51: the medal reward line on the results screen: the medal picture beside the words, wraps when long */
.rsub.rgold { display: flex; align-items: center; justify-content: center; gap: 0.35em; flex-wrap: wrap; color: #ffd877; }
.rsub.rgold img.rgi { width: 1.4em; height: 1.4em; object-fit: contain; flex: none; filter: drop-shadow(0 1px 1px #000); }
