/* Compact game status and large mobile-first input controls. */
.app-shell{grid-template-rows:auto auto minmax(270px,1fr) auto}.topbar{min-height:calc(31px + env(safe-area-inset-top));padding:calc(4px + env(safe-area-inset-top)) 10px 3px;justify-content:flex-end;background:linear-gradient(180deg,#07111e,#050c16);box-shadow:none}.topbar:after{left:0;right:0}.top-restart{width:auto;height:27px;padding:0 11px;border-color:#a54f16;border-radius:6px;color:#ffd68a;background:linear-gradient(180deg,#26160d,#120b08);font:900 8px ui-monospace,monospace;letter-spacing:.1em;box-shadow:0 0 9px rgba(255,112,24,.15)}
.status-strip{height:62px;display:grid;grid-template-columns:1fr .72fr 1.35fr;grid-template-rows:1fr;border-top:1px solid rgba(120,151,170,.28);border-bottom:1px solid rgba(120,151,170,.36);background:linear-gradient(180deg,#091725,#040b13);box-shadow:inset 0 1px rgba(255,255,255,.035),0 5px 18px rgba(0,0,0,.32)}.status-strip>div,.status-strip>div:nth-child(1),.status-strip>div:nth-child(2),.status-strip>div:nth-child(3){grid-row:1;grid-column:auto;min-width:0;border-bottom:0}.status-strip>div:nth-child(2){border-left:1px solid rgba(62,105,139,.3);border-right:1px solid rgba(62,105,139,.3)}.status-strip .score-status strong{margin:1px 0 0;max-width:100%;color:#efffff;font:900 clamp(19px,6.5vw,30px)/1 ui-monospace,monospace;letter-spacing:-.05em;text-shadow:0 0 13px rgba(49,231,255,.65)}.status-strip .combo-status strong b{color:#fff;font:1000 clamp(27px,9vw,40px)/1 ui-monospace,monospace;letter-spacing:-.08em;text-shadow:0 0 14px rgba(255,255,255,.25)}
.fortress-health{padding:9px 10px;align-items:stretch!important}.fortress-health>span{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px;font-size:7px;letter-spacing:.1em}.fortress-health>span b{color:#fff;font:900 12px ui-monospace,monospace;letter-spacing:0}.fortress-health>i{display:block;width:100%;height:13px;overflow:hidden;border:1px solid #536875;border-radius:3px;background:repeating-linear-gradient(90deg,#111c23 0 9%,#05090c 9% 10%);box-shadow:inset 0 2px 5px #000}.fortress-health>i>b{display:block;height:100%;transition:width .3s ease,background .25s ease,box-shadow .25s ease}.fortress-health.healthy>i>b{background:linear-gradient(180deg,#85ff9d,#16cf51 55%,#08752d);box-shadow:0 0 10px #28ed64}.fortress-health.warning>i>b{background:linear-gradient(180deg,#fff17b,#e9af18 55%,#8d5b04);box-shadow:0 0 10px #f3c52e}.fortress-health.critical>i>b{background:linear-gradient(180deg,#ff8b78,#ef2f26 55%,#82140f);box-shadow:0 0 12px #ff392b}
.fortress{bottom:40px}.defense-turrets{bottom:19px}
#buildControls{display:grid;grid-template-columns:minmax(0,1.42fr) minmax(120px,.9fr);grid-template-rows:auto 1fr;gap:7px 12px;padding:8px 12px calc(9px + env(safe-area-inset-bottom));background:linear-gradient(180deg,#0b1929,#050c15)}#buildControls.hidden{display:none!important}#buildControls .target-card{grid-column:1/-1;justify-self:center;min-width:78px;min-height:31px;display:grid;place-items:center;padding:4px 13px;border:1px solid #92a8b4;border-radius:6px;background:repeating-linear-gradient(180deg,rgba(126,244,255,.05) 0 1px,transparent 1px 3px),linear-gradient(180deg,#07151e,#102732);color:#fff;font:1000 23px/1 ui-monospace,monospace;letter-spacing:.12em;box-shadow:inset 0 0 10px #000,0 0 0 2px #263b46}#buildControls .target-card.answer-hidden{display:none}#buildControls .rank-panel,#buildControls .suit-panel{display:block;margin:0;min-width:0}#buildControls .rank-label,#buildControls .suit-panel>span{display:none}
#buildControls .rank-row{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:7px;height:100%}#buildControls .rank-button{grid-column:span 4;height:46px;border:1px solid #66d6ef;border-radius:7px;color:#f6fbff;background:linear-gradient(180deg,#10263a,#07131f);font:900 clamp(17px,5vw,23px) ui-monospace,monospace;text-shadow:none;box-shadow:inset 0 1px rgba(255,255,255,.08),0 0 7px rgba(49,231,255,.15)}#buildControls .rank-button:nth-child(n+10){grid-column:span 3}#buildControls .rank-button.selected{color:#06121b;background:linear-gradient(180deg,#fff,#64eaff);box-shadow:0 0 16px rgba(49,231,255,.7)}
#buildControls .suit-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;height:100%;padding:3px 5px}#buildControls .suit-button{position:relative;width:min(66px,16vw);height:min(66px,16vw);justify-self:center;align-self:center;border:1px solid #79ddf4;border-radius:16px;transform:rotate(45deg);background:radial-gradient(circle,#142d40,#07131f 70%);box-shadow:inset 0 0 12px rgba(49,231,255,.12),0 0 8px rgba(49,231,255,.25)}#buildControls .suit-button.red{border-color:#ff6135;box-shadow:inset 0 0 12px rgba(255,74,45,.12),0 0 8px rgba(255,74,45,.25)}#buildControls .suit-button span{transform:rotate(-45deg);font-size:clamp(30px,9vw,40px);color:#f4f7f9}#buildControls .suit-button.red span{color:#ff4f45}#buildControls .suit-button small{display:none}#buildControls .suit-button:disabled{opacity:.2;filter:grayscale(1);box-shadow:none}#buildControls .suit-button:not(:disabled){animation:suit-ready 1.1s ease-in-out infinite alternate}#buildControls .suit-button:not(:disabled):active{transform:rotate(45deg) scale(.94)}@keyframes suit-ready{to{filter:brightness(1.22)}}
.phase-two-controls{padding:8px 12px calc(10px + env(safe-area-inset-bottom))}.phase-two-controls .recall-heading{margin-bottom:9px}.phase-two-controls .position-grid:not(.numeric-keypad){grid-template-columns:repeat(10,minmax(0,1fr));gap:8px}.phase-two-controls .position-grid:not(.numeric-keypad) .position-button{grid-column:span 2;height:55px;color:#f7fbff;border-color:#67d8f0;border-radius:7px;font-size:clamp(17px,5vw,23px);box-shadow:inset 0 1px rgba(255,255,255,.08),0 0 7px rgba(49,231,255,.13)}.phase-two-controls .position-grid:not(.numeric-keypad) .position-button:nth-child(11){grid-column:2/span 2}.phase-two-controls .position-grid:not(.numeric-keypad) .position-button:nth-child(12){grid-column:5/span 2}.phase-two-controls .position-grid:not(.numeric-keypad) .position-button:nth-child(13){grid-column:8/span 2}
.position-grid.numeric-keypad{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.numeric-keypad .position-code{grid-column:1/-1;height:40px}.numeric-keypad .position-button{height:52px;color:#fff;border-color:#68d7ee;font-size:clamp(19px,6vw,26px)}.numeric-keypad .position-button:last-child{grid-column:1/-1}
@media(max-height:700px){.topbar{min-height:calc(27px + env(safe-area-inset-top));padding-bottom:2px}.top-restart{height:23px}.status-strip{height:52px}.fortress-health{padding:6px 8px}.fortress-health>span{margin-bottom:4px}.fortress{bottom:37px}.defense-turrets{bottom:16px}#buildControls{gap:5px 9px;padding-top:5px}#buildControls .target-card{min-height:27px;font-size:20px}#buildControls .rank-row{gap:5px}#buildControls .rank-button{height:37px}#buildControls .suit-row{gap:8px}#buildControls .suit-button{width:min(55px,14vw);height:min(55px,14vw)}.phase-two-controls .position-grid:not(.numeric-keypad) .position-button{height:43px}.numeric-keypad .position-button{height:42px}}

/* Suit cluster follows the approved top, sides, bottom reference. */
#buildControls .suit-row{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,1fr);gap:0;padding:0}
#buildControls .suit-button{width:min(51px,12.5vw);height:min(51px,12.5vw);border-radius:13px}
#buildControls .suit-button:nth-child(1){grid-column:2;grid-row:1}
#buildControls .suit-button:nth-child(2){grid-column:3;grid-row:2}
#buildControls .suit-button:nth-child(3){grid-column:2;grid-row:3}
#buildControls .suit-button:nth-child(4){grid-column:1;grid-row:2}
#buildControls .suit-button span{font-size:clamp(27px,8vw,36px)}
@media(max-height:700px){#buildControls .suit-row{gap:0}#buildControls .suit-button{width:min(45px,11.5vw);height:min(45px,11.5vw)}}

/* Keep the Training hint visually separate from the rank keyboard. */
#buildControls .target-card{
  grid-column:2;
  grid-row:1;
  justify-self:end;
  margin-right:5px;
}
#buildControls .rank-panel{grid-column:1;grid-row:2}
#buildControls .suit-panel{grid-column:2;grid-row:2}

/* Paired Phase 1 readout and a clear Raider playfield. */
#buildControls .build-hint{
  grid-column:2;
  grid-row:1;
  justify-self:end;
  display:flex;
  gap:7px;
  margin-right:5px;
}
#buildControls .build-hint .target-position,
#buildControls .build-hint .target-card{
  min-width:63px;
  min-height:31px;
  display:grid;
  place-items:center;
  margin:0;
  padding:4px 10px;
  border:1px solid #92a8b4;
  border-radius:6px;
  background:repeating-linear-gradient(180deg,rgba(126,244,255,.05) 0 1px,transparent 1px 3px),linear-gradient(180deg,#07151e,#102732);
  color:#fff;
  font:1000 23px/1 ui-monospace,monospace;
  letter-spacing:.1em;
  box-shadow:inset 0 0 10px #000,0 0 0 2px #263b46;
}
#buildControls .build-hint .target-card.answer-hidden{display:none}
.phase-two-controls .recall-heading{display:none}

/* Option A cockpit skin: one reinforced panel with integrated instruments. */
#buildControls{
  position:relative;
  overflow:hidden;
  border-top:2px solid #758995;
  border-bottom:2px solid #14242f;
  background:
    radial-gradient(circle at 8px 8px,#d7e0e5 0 2px,#536975 2px 4px,transparent 4.5px),
    radial-gradient(circle at calc(100% - 8px) 8px,#d7e0e5 0 2px,#536975 2px 4px,transparent 4.5px),
    radial-gradient(circle at 8px calc(100% - 8px),#d7e0e5 0 2px,#536975 2px 4px,transparent 4.5px),
    radial-gradient(circle at calc(100% - 8px) calc(100% - 8px),#d7e0e5 0 2px,#536975 2px 4px,transparent 4.5px),
    repeating-linear-gradient(105deg,rgba(255,255,255,.025) 0 1px,transparent 1px 7px),
    linear-gradient(180deg,#233744 0,#101f2a 16%,#07121b 55%,#142630 100%);
  box-shadow:inset 0 2px rgba(255,255,255,.16),inset 0 -5px 12px #02070b,0 -7px 20px rgba(0,0,0,.5);
}

/* Restart is a permanent physical control in the lower command panel. */
.app-shell{position:relative;grid-template-rows:0 auto minmax(270px,1fr) auto}
.topbar{
  position:static;
  min-height:0;
  height:0;
  padding:0;
  border:0;
  background:none;
  box-shadow:none;
}
.topbar:after{display:none}
.top-restart{
  position:absolute;
  z-index:28;
  right:10px;
  bottom:calc(8px + env(safe-area-inset-bottom));
  width:72px;
  height:29px;
  padding:0 8px;
  border:2px solid #9a531f;
  border-radius:6px;
  color:#ffd28a;
  background:linear-gradient(180deg,#502713 0,#1d0d08 55%,#090504 100%);
  font:900 8px ui-monospace,monospace;
  letter-spacing:.08em;
  box-shadow:inset 0 1px #e49255,inset 0 -2px #050201,0 0 0 2px #2a3940,0 0 9px rgba(255,105,24,.28);
}
.top-restart:active{transform:translateY(1px);filter:brightness(1.25)}
.status-strip{
  height:calc(62px + env(safe-area-inset-top));
  padding-top:env(safe-area-inset-top);
}
@media(max-height:700px){.topbar{min-height:0;height:0;padding:0}.status-strip{height:calc(52px + env(safe-area-inset-top))}.top-restart{height:26px;bottom:calc(6px + env(safe-area-inset-bottom))}}

/* Illustrated armored keys, preserving the approved dimensions and grid. */
#buildControls .rank-button{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  border:0;
  border-radius:0;
  clip-path:polygon(8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px),0 8px);
  background:
    linear-gradient(135deg,rgba(255,255,255,.42) 0 4%,transparent 5% 94%,rgba(0,0,0,.72) 95%),
    linear-gradient(180deg,#a8bac3 0,#405762 12%,#172832 24%,#07131d 31%,#0b1c28 72%,#263d49 84%,#80939c 100%);
  color:#dffbff;
  text-shadow:0 0 5px #fff,0 0 11px #19c9ff;
  box-shadow:inset 0 0 0 2px #111d24,inset 0 0 0 4px #617580,inset 0 0 12px 5px #020609,0 2px 4px rgba(0,0,0,.75);
}
#buildControls .rank-button:before{
  content:"";
  position:absolute;
  z-index:0;
  inset:5px;
  clip-path:polygon(5px 0,calc(100% - 5px) 0,100% 5px,100% calc(100% - 5px),calc(100% - 5px) 100%,5px 100%,0 calc(100% - 5px),0 5px);
  background:radial-gradient(circle at 50% 30%,#173749,#07131e 72%);
  box-shadow:inset 0 0 9px #000;
}
#buildControls .rank-button:after{
  content:"";
  position:absolute;
  z-index:2;
  left:15%;right:15%;bottom:3px;height:2px;
  background:#29dfff;
  box-shadow:0 0 6px #1bcfff;
  opacity:.72;
}
#buildControls .rank-button>span{position:relative;z-index:1}
#buildControls .rank-button.selected{
  color:#fff;
  background:linear-gradient(180deg,#e6f8ff 0,#6d9caa 13%,#174358 27%,#09202d 72%,#40818f 88%,#e3f8ff 100%);
  text-shadow:0 0 5px #fff,0 0 15px #24e7ff;
  box-shadow:inset 0 0 0 2px #d8f8ff,inset 0 0 0 4px #31dfff,inset 0 0 18px 5px #06364a,0 0 13px rgba(49,231,255,.72);
}

#buildControls .suit-row{transform:none}
#buildControls .suit-button{
  overflow:hidden;
  border:0;
  border-radius:0;
  transform:none;
  clip-path:polygon(25% 0,75% 0,100% 25%,100% 75%,75% 100%,25% 100%,0 75%,0 25%);
  background:
    linear-gradient(135deg,rgba(255,255,255,.4) 0 5%,transparent 6% 93%,rgba(0,0,0,.75) 94%),
    linear-gradient(180deg,#9dafb8 0,#405762 13%,#111f28 25%,#07121b 70%,#304752 87%,#81939c 100%);
  box-shadow:inset 0 0 0 2px #101a20,inset 0 0 0 4px #617681,inset 0 0 12px 5px #020609,0 3px 5px rgba(0,0,0,.75);
}
#buildControls .suit-button:before{
  content:"";
  position:absolute;
  z-index:0;
  inset:6px;
  clip-path:inherit;
  background:radial-gradient(circle,#173748,#061019 72%);
  box-shadow:inset 0 0 10px #000;
}
#buildControls .suit-button span{
  position:relative;
  z-index:1;
  transform:none;
  color:#ecfbff;
  text-shadow:0 0 4px #fff,0 0 11px #2edfff;
}
#buildControls .suit-button.red span{color:#ff5a48;text-shadow:0 0 5px #fff,0 0 12px #ff351e}
#buildControls .suit-button.red{background:linear-gradient(180deg,#aeb9bc 0,#4f5d60 13%,#211a18 25%,#110a09 70%,#553229 87%,#9a837d 100%)}
#buildControls .suit-button:disabled{opacity:.28;filter:saturate(.15) brightness(.65)}
#buildControls .suit-button:not(:disabled){animation:suit-console-ready 1.15s ease-in-out infinite alternate}
#buildControls .suit-button:not(:disabled):active{transform:scale(.94);filter:brightness(1.45)}
@keyframes suit-console-ready{to{filter:brightness(1.18);box-shadow:inset 0 0 0 2px #d8f8ff,inset 0 0 0 4px #31dfff,inset 0 0 15px 5px #042c3c,0 0 10px rgba(49,231,255,.5)}}
#buildControls:after{
  content:"";
  position:absolute;
  z-index:0;
  top:8px;
  bottom:8px;
  left:calc(59% - 1px);
  width:2px;
  background:linear-gradient(#8799a2,#1b2d37 18%,#091219 82%,#71838c);
  box-shadow:1px 0 rgba(255,255,255,.08),-1px 0 #020609;
  pointer-events:none;
}
#buildControls>*{position:relative;z-index:1}
#buildControls .build-hint{
  width:100%;
  display:grid;
  grid-template-rows:auto auto;
  gap:7px;
  padding:7px;
  border:1px solid #627783;
  border-radius:8px;
  background:linear-gradient(145deg,#172a35,#08131b 62%);
  box-shadow:inset 0 0 15px #020609,0 0 0 2px #263b45;
}
#buildControls .build-readouts{display:grid;grid-template-columns:1fr 1fr;gap:7px}
#buildControls .panel-health{
  width:100%;
  padding:0;
  display:block!important;
  border:0!important;
}
#buildControls .panel-health>span{
  display:flex;
  justify-content:space-between;
  margin-bottom:5px;
  color:#a9eaf0;
  font:900 7px ui-monospace,monospace;
  letter-spacing:.08em;
}
#buildControls .panel-health>span b{color:#f4ffff;font-size:10px}
#buildControls .panel-health>i{height:10px}
#buildControls .build-hint .target-position,
#buildControls .build-hint .target-card{
  min-width:0;
  border-color:#738b96;
  background:repeating-linear-gradient(180deg,rgba(126,244,255,.045) 0 1px,transparent 1px 3px),radial-gradient(circle at 50% 30%,#153441,#061118 72%);
  box-shadow:inset 0 0 13px #000,0 0 8px rgba(49,231,255,.12);
  text-shadow:0 0 8px rgba(159,248,255,.42);
}
#buildControls .suit-row{transform:scale(.94)}

/* Single instrument rail: health on the left, position and hint on the right. */
#buildControls .build-hint{
  grid-column:1/-1;
  grid-row:1;
  justify-self:stretch;
  width:100%;
  min-height:42px;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:1fr;
  align-items:stretch;
  gap:8px;
  margin:0;
  padding:5px 7px;
  border:2px solid #81939c;
  border-radius:7px;
  background:
    linear-gradient(90deg,rgba(255,255,255,.08),transparent 15%,transparent 85%,rgba(255,255,255,.05)),
    linear-gradient(180deg,#263b47 0,#0b1821 30%,#050c12 72%,#1a2d37 100%);
  box-shadow:inset 0 1px #c0cbd0,inset 0 -2px #020609,inset 0 0 14px #000,0 2px 7px rgba(0,0,0,.6);
}
#buildControls .panel-health{
  grid-column:1;
  grid-row:1;
  align-self:center;
  padding:2px 5px 1px!important;
}
#buildControls .panel-health>span{margin-bottom:3px;font-size:7px}
#buildControls .panel-health>i{height:9px}
#buildControls .build-readouts{
  grid-column:2;
  grid-row:1;
  display:grid;
  grid-template-columns:62px 70px;
  gap:7px;
}
#buildControls .build-hint .target-position,
#buildControls .build-hint .target-card{
  min-height:30px;
  height:100%;
  padding:3px 7px;
  font-size:20px;
}
#buildControls .rank-panel{grid-column:1;grid-row:2}
#buildControls .suit-panel{grid-column:2;grid-row:2}

/* Heavier structural hardware and brighter machined edges. */
#buildControls{
  border:2px solid #607783;
  border-left-color:#283d48;
  border-right-color:#283d48;
  background:
    radial-gradient(circle at 10px 10px,#f1f4f5 0 2px,#738793 2.5px 5px,#182832 5.5px 7px,transparent 7.5px),
    radial-gradient(circle at calc(100% - 10px) 10px,#f1f4f5 0 2px,#738793 2.5px 5px,#182832 5.5px 7px,transparent 7.5px),
    radial-gradient(circle at 10px calc(100% - 10px),#f1f4f5 0 2px,#738793 2.5px 5px,#182832 5.5px 7px,transparent 7.5px),
    radial-gradient(circle at calc(100% - 10px) calc(100% - 10px),#f1f4f5 0 2px,#738793 2.5px 5px,#182832 5.5px 7px,transparent 7.5px),
    repeating-linear-gradient(105deg,rgba(255,255,255,.035) 0 1px,transparent 1px 6px),
    linear-gradient(180deg,#344c58 0,#142732 14%,#07131c 58%,#203640 100%);
  box-shadow:inset 0 3px rgba(255,255,255,.2),inset 0 -5px 12px #02070b,0 -7px 20px rgba(0,0,0,.55);
}

/* Production illustrated key skins based on the approved armored-console mockup. */
#buildControls .rank-button{
  clip-path:polygon(8% 0,92% 0,100% 15%,100% 85%,92% 100%,8% 100%,0 85%,0 15%);
  background-color:transparent;
  background-image:url("assets/console-rank-key-v1.png");
  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 100%;
  box-shadow:none;
  filter:drop-shadow(0 2px 2px rgba(0,0,0,.8));
}
#buildControls .rank-button:before,
#buildControls .rank-button:after{display:none}
#buildControls .rank-button>span{
  color:#bff6ff;
  font-weight:1000;
  text-shadow:0 0 3px #fff,0 0 8px #009dff,0 0 14px #0075d9;
}
#buildControls .rank-button.selected{
  background-image:url("assets/console-rank-key-v1.png");
  box-shadow:none;
  filter:brightness(1.28) drop-shadow(0 0 7px rgba(36,216,255,.9));
}
#buildControls .suit-button,
#buildControls .suit-button.red{
  clip-path:none;
  background-color:transparent;
  background-image:url("assets/console-suit-key-v1.png");
  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 100%;
  box-shadow:none;
  filter:drop-shadow(0 2px 2px rgba(0,0,0,.85));
}
#buildControls .suit-button:before{display:none}
#buildControls .suit-button span{
  color:#c9f7ff;
  text-shadow:0 0 3px #fff,0 0 8px #008cff,0 0 14px #006dd0;
}
#buildControls .suit-button.red span{
  color:#ff5143;
  text-shadow:0 0 3px #fff,0 0 8px #ff2f1f,0 0 14px #d8190d;
}
#buildControls .suit-button:disabled{
  opacity:.42;
  filter:grayscale(.75) brightness(.62) drop-shadow(0 2px 2px rgba(0,0,0,.75));
}
#buildControls .suit-button:not(:disabled){animation:illustrated-suit-ready 1.15s ease-in-out infinite alternate}
@keyframes illustrated-suit-ready{to{filter:brightness(1.24) drop-shadow(0 0 7px rgba(38,216,255,.8))}}

/* Fortress-stage mothership penalties are intentionally quieter than Raider damage. */
.point-penalty.mothership-penalty{font-size:clamp(17px,5.5vw,24px)}
.point-penalty.mothership-penalty b{margin-bottom:4px;padding:3px 7px;font-size:7px}

/* Final preflight menu: choose the cockpit and its control geometry. */
.ship-chooser-card{width:min(100%,500px)}
.ship-chooser-card>p:not(.eyebrow){margin-bottom:12px}
.ship-options{display:grid;gap:9px}
.ship-options button{
  position:relative;
  min-height:112px;
  display:grid;
  grid-template-columns:105px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  overflow:hidden;
  border:2px solid #6f828c;
  clip-path:polygon(12px 0,calc(100% - 12px) 0,100% 12px,100% calc(100% - 12px),calc(100% - 12px) 100%,12px 100%,0 calc(100% - 12px),0 12px);
  background:repeating-linear-gradient(105deg,rgba(255,255,255,.035) 0 1px,transparent 1px 7px),linear-gradient(145deg,#314955,#0a1720 45%,#050c12);
  box-shadow:inset 0 2px rgba(255,255,255,.18),inset 0 -4px #020609;
  text-align:left;
}
.ship-options button:before{content:"";position:absolute;inset:5px;border:1px solid rgba(38,213,255,.28);clip-path:inherit;pointer-events:none}
.ship-options button:active{transform:scale(.985);filter:brightness(1.25)}
.ship-options span{min-width:0}
.ship-options strong{display:block;color:#e9fbff;font:1000 14px ui-monospace;letter-spacing:.05em}
.ship-options small{display:block;margin-top:5px;color:#8fb1c2;font:800 9px ui-monospace}
.ship-options b{color:#4ee7ff;font:900 8px ui-monospace;white-space:nowrap}
.ship-silhouette{position:relative;width:96px;height:68px;display:block;filter:drop-shadow(0 0 8px rgba(36,207,255,.42))}
.ship-silhouette:before,.ship-silhouette:after{content:"";position:absolute;left:50%;transform:translateX(-50%);background:linear-gradient(180deg,#9aabb3,#263b46 38%,#07121a 72%,#438397);box-shadow:inset 0 1px #dce6ea,0 0 0 2px #111e25}
.fortress-ship:before{width:88px;height:48px;bottom:7px;clip-path:polygon(12% 18%,28% 4%,72% 4%,88% 18%,100% 68%,83% 94%,17% 94%,0 68%)}
.fortress-ship:after{width:40px;height:34px;bottom:28px;clip-path:polygon(20% 0,80% 0,100% 70%,76% 100%,24% 100%,0 70%)}
.strike-ship:before{width:94px;height:45px;bottom:10px;clip-path:polygon(0 62%,37% 39%,48% 0,57% 0,65% 39%,100% 62%,66% 76%,56% 100%,45% 100%,35% 76%)}
.strike-ship:after{width:18px;height:58px;bottom:5px;clip-path:polygon(50% 0,100% 78%,72% 100%,28% 100%,0 78%)}
.interceptor-ship:before{width:91px;height:51px;bottom:7px;clip-path:polygon(0 53%,28% 34%,38% 6%,50% 25%,62% 6%,72% 34%,100% 53%,73% 78%,59% 70%,50% 100%,41% 70%,27% 78%)}
.interceptor-ship:after{width:24px;height:48px;bottom:10px;clip-path:polygon(50% 0,100% 75%,68% 100%,32% 100%,0 75%)}

/* Fortress Class: approved four-row 3,3,3,4 control layout. */
#buildControls.ship-fortress .rank-row{grid-template-columns:repeat(12,minmax(0,1fr))}
#buildControls.ship-fortress .rank-button{grid-column:span 4}
#buildControls.ship-fortress .rank-button:nth-child(n+10){grid-column:span 3}

/* Strike Class: six ranks above seven ranks with suits retained at the right. */
#buildControls.ship-strike{grid-template-columns:minmax(0,1.8fr) minmax(102px,.52fr)}
#buildControls.ship-strike .rank-row{grid-template-columns:repeat(42,minmax(0,1fr));gap:4px}
#buildControls.ship-strike .rank-button{grid-column:span 7;height:48px;font-size:clamp(14px,4vw,20px)}
#buildControls.ship-strike .rank-button:nth-child(n+7){grid-column:span 6}
#buildControls.ship-strike .suit-button{width:min(47px,11.5vw);height:min(47px,11.5vw)}

/* Interceptor Class: central rank keypad with black suits left and red suits right. */
#buildControls.ship-interceptor{grid-template-columns:72px minmax(0,1fr) 72px;column-gap:5px}
#buildControls.ship-interceptor .rank-panel{grid-column:2;grid-row:2;z-index:2}
#buildControls.ship-interceptor .rank-row{grid-template-columns:repeat(12,minmax(0,1fr));gap:5px}
#buildControls.ship-interceptor .rank-button{grid-column:span 4;height:42px}
#buildControls.ship-interceptor .rank-button:nth-child(n+10){grid-column:span 3}
#buildControls.ship-interceptor .suit-panel{grid-column:1/-1;grid-row:2;position:relative;z-index:3;pointer-events:none}
#buildControls.ship-interceptor .suit-row{position:absolute;inset:0;display:block;transform:none}
#buildControls.ship-interceptor .suit-button{position:absolute;width:59px;height:59px;pointer-events:auto}
#buildControls.ship-interceptor .suit-button:nth-child(1){left:5px;top:calc(50% + 5px)}
#buildControls.ship-interceptor .suit-button:nth-child(3){left:5px;bottom:calc(50% + 5px)}
#buildControls.ship-interceptor .suit-button:nth-child(2){right:5px;bottom:calc(50% + 5px)}
#buildControls.ship-interceptor .suit-button:nth-child(4){right:5px;top:calc(50% + 5px)}

/* Captain selection now introduces the memorized stack as part of the fleet fiction. */
#stackChooser .stack-options button[data-stack]{border-color:#566f7c;background:repeating-linear-gradient(105deg,rgba(255,255,255,.025) 0 1px,transparent 1px 7px),linear-gradient(120deg,#263d49,#091620 62%)}

@media(max-height:720px){
  .ship-chooser-card h2{margin:3px 0;font-size:24px}
  .ship-chooser-card>p:not(.eyebrow){display:none}
  .ship-options{gap:6px}
  .ship-options button{min-height:86px;grid-template-columns:82px minmax(0,1fr) auto;padding:6px 10px}
  .ship-silhouette{width:76px;height:54px;transform:scale(.82)}
  #buildControls.ship-strike .rank-button{height:39px}
  #buildControls.ship-interceptor{grid-template-columns:60px minmax(0,1fr) 60px}
  #buildControls.ship-interceptor .rank-button{height:36px}
  #buildControls.ship-interceptor .suit-button{width:51px;height:51px}
}

/* Raiders cockpit dashboards. The generated metal skins define the openings;
   live HTML remains above them so every label and touch target stays dynamic. */
.phase-two-controls.raider-training-dashboard,
.phase-two-controls.raider-keypad-dashboard{
  position:relative;
  display:block;
  flex:0 0 clamp(238px,33.333dvh,340px);
  width:100%;
  height:clamp(238px,33.333dvh,340px);
  min-height:clamp(238px,33.333dvh,340px);
  box-sizing:border-box;
  padding:0!important;
  overflow:hidden;
  background-color:#02070b!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
  background-size:100% 100%!important;
  border:0!important;
  isolation:isolate;
  clip-path:polygon(7% 0,93% 0,100% 10%,100% 90%,93% 100%,7% 100%,0 90%,0 10%);
}
.phase-two-controls.raider-training-dashboard{background-image:url("assets/dashboard-raiders-training-v1.png")!important}
.phase-two-controls.raider-keypad-dashboard{background-image:url("assets/dashboard-raiders-keypad-v1.png")!important}
.phase-two-controls.hidden{display:none!important}

.raider-training-dashboard .recall-heading{
  position:absolute;
  z-index:2;
  display:flex!important;
  align-items:center;
  justify-content:center;
  inset:7.2% 20.5% auto;
  height:10.5%;
  margin:0!important;
  padding:0 3%;
  color:#dffaff;
  background:transparent;
  border:0;
  pointer-events:none;
}
.raider-training-dashboard .recall-heading>div{display:none}
.raider-training-dashboard .recall-heading>strong{
  display:flex;
  align-items:baseline;
  justify-content:center;
  gap:clamp(8px,2vw,15px);
  width:100%;
  font-family:var(--display-font,monospace);
  font-size:clamp(11px,3vw,17px);
  letter-spacing:.09em;
  text-shadow:0 0 8px rgba(42,210,255,.55);
}
.raider-training-dashboard .recall-heading b{font-size:clamp(18px,5vw,27px);color:#fff}
.raider-training-dashboard .position-grid:not(.numeric-keypad){
  position:absolute;
  z-index:3;
  inset:20.5% 7.5% 7.6%;
  display:grid;
  grid-template-columns:repeat(10,minmax(0,1fr));
  grid-template-rows:repeat(3,minmax(0,1fr));
  column-gap:1.25%;
  row-gap:5.4%;
  padding:1.5% 1.2% 1.2%;
}
.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button{
  grid-column:span 2;
  width:auto;
  height:auto!important;
  min-height:0;
  margin:0;
  padding:0;
  color:#f5fcff;
  background:transparent!important;
  border:2px solid transparent!important;
  border-radius:14%;
  box-shadow:none!important;
  font-family:var(--display-font,monospace);
  font-size:clamp(20px,6.2vw,34px)!important;
  font-weight:900;
  text-shadow:0 0 7px rgba(50,210,255,.55);
}
.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(11){grid-column:2/span 2}
.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(12){grid-column:5/span 2}
.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(13){grid-column:8/span 2}

.raider-keypad-dashboard .recall-heading{display:none!important}
.raider-keypad-dashboard .position-grid.numeric-keypad{
  position:absolute;
  z-index:3;
  inset:9.3% 10.7% 7.5%;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-template-rows:17% repeat(3,minmax(0,1fr)) 18%;
  gap:3.2% 3.1%;
  padding:0;
}
.raider-keypad-dashboard .numeric-keypad .position-code{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(10px,3vw,22px);
  width:auto;
  height:auto!important;
  min-height:0;
  padding:0 4%;
  color:#e8fbff;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
.raider-keypad-dashboard .position-code small{font-size:clamp(9px,2.4vw,13px);letter-spacing:.08em}
.raider-keypad-dashboard .position-code strong{font-size:clamp(19px,5.5vw,31px);line-height:1}
.raider-keypad-dashboard .numeric-keypad .position-button{
  width:auto;
  height:auto!important;
  min-height:0;
  margin:0;
  padding:0;
  color:#f7fcff;
  background:transparent!important;
  border:2px solid transparent!important;
  border-radius:10%;
  box-shadow:none!important;
  font-family:var(--display-font,monospace);
  font-size:clamp(21px,6.4vw,36px)!important;
  font-weight:900;
  text-shadow:0 0 7px rgba(50,210,255,.5);
}
.raider-keypad-dashboard .numeric-keypad .position-button:last-child{grid-column:1/-1}
.raider-training-dashboard .position-button:active,
.raider-keypad-dashboard .position-button:active{
  border-color:#5ceaff!important;
  background:rgba(29,183,255,.13)!important;
  box-shadow:inset 0 0 14px rgba(44,211,255,.45),0 0 12px rgba(44,211,255,.7)!important;
  filter:brightness(1.22)!important;
}
@media(max-height:720px){
  .phase-two-controls.raider-training-dashboard,
  .phase-two-controls.raider-keypad-dashboard{
    flex-basis:33.333dvh;
    height:33.333dvh;
    min-height:33.333dvh;
  }
}

/* Final Fortress dashboard layer order. Keep this after the shared cockpit
   rules so the approved dashboard cannot be covered by the generic shell. */
#buildControls.ship-fortress{
  padding:0!important;
  background:#02080d!important;
}
#buildControls.ship-fortress::after{
  display:block!important;
  width:auto!important;
  height:auto!important;
  background-image:url("assets/dashboard-fortress-windows-v1.png")!important;
}

/* The shared cockpit artwork read as a second turret assembly above the
   mothership. The compact HUD remains, without that decorative silhouette. */
.status-strip{
  background-image:none!important;
  background:linear-gradient(180deg,#111e26 0,#050b10 24%,#03070a 100%)!important;
  box-shadow:inset 0 -1px #243c47,0 3px 10px rgba(0,0,0,.55)!important;
}

/* Strike Class: low-profile two-row console with the same live-window
   construction used by Fortress Class. */
#buildControls.ship-strike{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio:1864/634;
  min-height:0;
  padding:0!important;
  overflow:hidden;
  border:0!important;
  background:#02080d!important;
  box-shadow:0 -5px 18px rgba(0,0,0,.65)!important;
}
#buildControls.ship-strike::after{
  content:"";
  position:absolute;
  z-index:4;
  inset:0;
  width:auto!important;
  height:auto!important;
  display:block!important;
  pointer-events:none;
  background:url("assets/dashboard-strike-windows-v1.png") center/100% 100% no-repeat!important;
}
#buildControls.ship-strike .build-hint{
  position:absolute;
  z-index:2;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  margin:0;
  padding:0;
  border:0;
  background:none;
  box-shadow:none;
  pointer-events:none;
}
#buildControls.ship-strike .panel-health{
  position:absolute;
  left:6.1%;
  top:13.1%;
  width:50.1%;
  height:17.4%;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center!important;
  gap:clamp(3px,1.1vw,8px);
  padding:0 1.4%!important;
  overflow:hidden;
  border:0!important;
  border-radius:0;
  background:#020d13!important;
  box-shadow:none!important;
}
#buildControls.ship-strike .panel-health>span{display:contents!important}
#buildControls.ship-strike .panel-health>span:before{content:none!important}
#buildControls.ship-strike .panel-health>span em{
  order:1;
  color:#b7f8ff;
  font:900 clamp(5px,1.8vw,12px) ui-monospace,monospace;
  font-style:normal;
  letter-spacing:.08em;
}
#buildControls.ship-strike .panel-health>span b{
  position:static!important;
  order:3;
  color:#b7f8ff;
  font-size:clamp(6px,2vw,14px);
  text-shadow:none;
}
#buildControls.ship-strike .panel-health>i{
  order:2;
  width:100%!important;
  height:clamp(5px,1.55vw,11px);
  margin:0;
  border-color:#4f8794;
}
#buildControls.ship-strike .build-readouts{display:contents}
#buildControls.ship-strike .build-hint .target-position,
#buildControls.ship-strike .build-hint .target-card{
  position:absolute;
  top:13.1%;
  height:17.4%;
  min-width:0;
  min-height:0;
  padding:0;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:0!important;
  border-radius:0;
  background:#020d13!important;
  box-shadow:none!important;
  color:#b7f8ff;
  font:900 clamp(11px,3.3vw,24px) ui-monospace,monospace;
  line-height:1;
  text-shadow:none;
  white-space:nowrap;
}
#buildControls.ship-strike .build-hint .target-position{left:59.8%;width:13.5%}
#buildControls.ship-strike .build-hint .target-card{left:76.2%;width:17.2%}
#buildControls.ship-strike .rank-panel{
  position:absolute;
  z-index:6;
  left:4.1%;
  top:37.5%;
  width:69.8%;
  height:51.3%;
  padding:0;
  border:0;
  background:none;
  box-shadow:none;
}
#buildControls.ship-strike .rank-row{
  width:100%;
  height:100%;
  display:grid;
  grid-template-columns:repeat(42,minmax(0,1fr));
  grid-template-rows:repeat(2,minmax(0,1fr));
  column-gap:.55%;
  row-gap:4.7%;
  padding:0;
  background:none;
  box-shadow:none;
}
#buildControls.ship-strike .rank-button,
#buildControls.ship-strike .rank-button.selected{
  grid-column:span 7;
  width:100%;
  height:100%;
  min-height:0;
  padding:0;
  border:0;
  border-radius:0;
  clip-path:polygon(9% 0,91% 0,100% 17%,100% 83%,91% 100%,9% 100%,0 83%,0 17%);
  background:none!important;
  box-shadow:none;
  filter:none;
}
#buildControls.ship-strike .rank-button:nth-child(n+7){grid-column:span 6}
#buildControls.ship-strike .rank-button:before,
#buildControls.ship-strike .rank-button:after{display:none}
#buildControls.ship-strike .rank-button>span{opacity:0}
#buildControls.ship-strike .rank-button.selected{
  background:rgba(40,210,255,.2)!important;
  box-shadow:inset 0 0 0 2px #c8faff,inset 0 0 14px #21d6ff,0 0 9px #18c8ff;
}
#buildControls.ship-strike .suit-panel{
  position:absolute;
  z-index:6;
  left:75.1%;
  top:37.5%;
  width:20.6%;
  height:51.3%;
  padding:0;
  border:0;
  background:none;
  box-shadow:none;
}
#buildControls.ship-strike .suit-row{
  width:100%;
  height:100%;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(2,minmax(0,1fr));
  gap:4%;
  padding:0;
  background:none;
  box-shadow:none;
}
#buildControls.ship-strike .suit-button,
#buildControls.ship-strike .suit-button.red{
  width:100%;
  height:100%;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  clip-path:polygon(17% 0,83% 0,100% 17%,100% 83%,83% 100%,17% 100%,0 83%,0 17%);
  background:none!important;
  box-shadow:none;
  filter:none;
  animation:none;
}
#buildControls.ship-strike .suit-button span,
#buildControls.ship-strike .suit-button small{opacity:0}
#buildControls.ship-strike .suit-button:disabled{opacity:1;filter:none;background:rgba(0,0,0,.5)!important}
#buildControls.ship-strike .suit-button:not(:disabled):active{background:rgba(38,216,255,.22)!important;box-shadow:inset 0 0 12px #24dcff}

/* Global restart rail. It has its own top row and never overlaps a gameplay
   dashboard, suit control, Raider keypad, or modal content. */
.app-shell{grid-template-rows:auto auto minmax(270px,1fr) auto!important}
.topbar{
  position:relative!important;
  z-index:20;
  min-height:calc(31px + env(safe-area-inset-top))!important;
  height:calc(31px + env(safe-area-inset-top))!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:flex-end!important;
  padding:env(safe-area-inset-top) 8px 3px!important;
  border:0!important;
  background:linear-gradient(180deg,#17262e 0,#071017 56%,#03080c 100%)!important;
  box-shadow:inset 0 -1px #304b57,0 2px 8px rgba(0,0,0,.55)!important;
}
.topbar:after{display:none!important}
.top-restart{
  position:static!important;
  inset:auto!important;
  width:72px!important;
  height:25px!important;
  min-height:25px!important;
  margin:0!important;
  padding:0 9px!important;
  border:1px solid #9a531f!important;
  border-radius:5px!important;
  color:#ffd28a!important;
  background-color:#281109!important;
  background-image:url("assets/console-rank-key-v1.png")!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:100% 100%!important;
  font:900 8px ui-monospace,monospace!important;
  letter-spacing:.08em!important;
  box-shadow:0 0 7px rgba(255,105,24,.2)!important;
}
@media(max-height:700px){
  .app-shell{grid-template-rows:auto auto minmax(235px,1fr) auto!important}
  .topbar{min-height:calc(28px + env(safe-area-inset-top))!important;height:calc(28px + env(safe-area-inset-top))!important;padding-bottom:2px!important}
  .top-restart{height:23px!important;min-height:23px!important}
}

/* Content-first menu geometry. Frames expand around live copy instead of constraining it. */
.stack-chooser{align-items:start;padding-top:max(14px,env(safe-area-inset-top));padding-bottom:max(14px,env(safe-area-inset-bottom))}
.stack-chooser-card,
.modal-card,
.tutorial-card{
  width:min(100%,500px);
  min-height:0;
  box-sizing:border-box;
  padding:clamp(48px,7vh,66px) clamp(30px,7vw,48px) clamp(52px,8vh,72px);
  overflow:visible;
}
.stack-chooser-card>p:not(.eyebrow){max-width:100%;margin-bottom:clamp(10px,2vh,18px);font-size:clamp(10px,2.9vw,13px);line-height:1.35}
.stack-chooser h2{font-size:clamp(21px,7vw,34px);line-height:1.05;overflow-wrap:anywhere}
.stack-options{gap:clamp(6px,1.3vh,10px)}
.stack-options button{
  width:100%;
  min-height:clamp(76px,10vh,92px);
  box-sizing:border-box;
  padding:14px 70px 14px 21px!important;
  overflow:visible;
}
.stack-options strong{
  max-width:100%;
  font-size:clamp(10px,3.35vw,15px);
  line-height:1.15;
  white-space:normal;
  overflow-wrap:anywhere;
}
.stack-options small{
  max-width:100%;
  font-size:clamp(7px,2.35vw,10px);
  line-height:1.25;
  white-space:normal;
}
.stack-options span{right:18px;max-width:48px;line-height:1.25;text-align:right;white-space:normal}
.ship-options button{
  width:100%;
  min-height:116px;
  box-sizing:border-box;
  grid-template-columns:minmax(76px,104px) minmax(0,1fr);
  grid-template-rows:auto auto;
  gap:4px 12px;
  padding:18px 24px!important;
}
.ship-silhouette{grid-column:1;grid-row:1/3;width:100%;max-width:108px;height:76px}
.ship-options span{grid-column:2;grid-row:1;align-self:end}
.ship-options b{grid-column:2;grid-row:2;align-self:start;margin-top:4px}
.ship-options strong{font-size:clamp(10px,3.3vw,14px);line-height:1.15;white-space:normal;overflow-wrap:anywhere}
.ship-options small{font-size:clamp(7px,2.25vw,9px);line-height:1.25;white-space:normal}

.tutorial-card p,.modal-card p,.modal-card small,.performance-insights,.leaderboard{max-width:100%;overflow-wrap:anywhere}
.modal-card{max-height:calc(100dvh - 24px);overflow:auto}
.primary-button{height:auto;min-height:48px;padding:12px 18px;white-space:normal;line-height:1.2}

@media(max-width:380px){
  .stack-chooser-card,.modal-card,.tutorial-card{padding-left:25px;padding-right:25px}
  .stack-options button{padding-left:17px!important;padding-right:61px!important}
  .ship-options button{grid-template-columns:72px minmax(0,1fr);padding:14px 18px!important}
  .ship-silhouette{height:60px}
}
@media(max-height:700px){
  .stack-chooser-card,.modal-card,.tutorial-card{padding-top:38px;padding-bottom:42px}
  .chooser-orbit{width:52px;height:52px;margin-bottom:7px}.chooser-orbit b{font-size:15px}
  .stack-options button{min-height:66px;padding-top:10px!important;padding-bottom:10px!important}
  .ship-options button{min-height:80px;padding-top:8px!important;padding-bottom:8px!important}
  .ship-silhouette{height:54px}
}

/* Approved Fortress Class dashboard: rendered artwork with live control hit areas. */
#buildControls.ship-fortress{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio:1914/822;
  min-height:0;
  padding:0!important;
  overflow:hidden;
  border:0!important;
  background-color:#03070a!important;
  background-image:url("assets/dashboard-fortress-approved-v1.png")!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:100% 100%!important;
  box-shadow:0 -5px 18px rgba(0,0,0,.65)!important;
}
#buildControls.ship-fortress .build-hint{
  position:absolute;
  z-index:5;
  top:6.4%;
  left:9.1%;
  right:8.1%;
  height:9.2%;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) 23%;
  grid-template-rows:1fr;
  gap:7%;
  padding:0;
  margin:0;
  border:0;
  border-radius:0;
  background:none;
  box-shadow:none;
}
#buildControls.ship-fortress .panel-health{
  align-self:stretch;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:6px;
  padding:3px 7px!important;
  background:#041018;
  box-shadow:inset 0 0 0 2px #344f5d,inset 0 0 10px #000;
}
#buildControls.ship-fortress .panel-health>span{display:contents;font-size:7px}
#buildControls.ship-fortress .panel-health>span:before{content:"SHIELDS";color:#8fefff;font:900 7px ui-monospace,monospace;letter-spacing:.08em}
#buildControls.ship-fortress .panel-health>span{font-size:0}
#buildControls.ship-fortress .panel-health>span b{font-size:9px;order:3}
#buildControls.ship-fortress .panel-health>i{order:2;height:8px;margin:0}
#buildControls.ship-fortress .build-readouts{
  display:grid;
  grid-template-columns:1fr 1.13fr;
  gap:8%;
  min-width:0;
}
#buildControls.ship-fortress .build-hint .target-position,
#buildControls.ship-fortress .build-hint .target-card{
  width:auto;
  min-width:0;
  min-height:0;
  height:100%;
  padding:0;
  display:grid;
  place-items:center;
  border:0;
  border-radius:0;
  background:#041018;
  box-shadow:inset 0 0 0 2px #344f5d,inset 0 0 10px #000;
  color:#bff7ff;
  font:900 clamp(11px,3.2vw,22px) ui-monospace,monospace;
  text-shadow:0 0 8px #168ed9;
}
#buildControls.ship-fortress .rank-panel{
  position:absolute;
  z-index:6;
  left:7.7%;
  top:21.3%;
  width:52.6%;
  height:69.8%;
  padding:0;
  border:0;
  background:none;
  box-shadow:none;
}
#buildControls.ship-fortress .rank-row{
  width:100%;
  height:100%;
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  grid-template-rows:repeat(4,minmax(0,1fr));
  column-gap:1.4%;
  row-gap:2.1%;
  padding:0;
  background:none;
  box-shadow:none;
}
#buildControls.ship-fortress .rank-button,
#buildControls.ship-fortress .rank-button.selected{
  grid-column:span 4;
  width:100%;
  height:100%;
  min-height:0;
  padding:0;
  border:0;
  clip-path:polygon(8% 0,92% 0,100% 15%,100% 85%,92% 100%,8% 100%,0 85%,0 15%);
  background:none!important;
  box-shadow:none;
  filter:none;
}
#buildControls.ship-fortress .rank-button:nth-child(n+10){grid-column:span 3}
#buildControls.ship-fortress .rank-button:before,
#buildControls.ship-fortress .rank-button:after{display:none}
#buildControls.ship-fortress .rank-button>span{opacity:0}
#buildControls.ship-fortress .rank-button.selected{
  background:rgba(40,210,255,.2)!important;
  box-shadow:inset 0 0 0 2px #c8faff,inset 0 0 14px #21d6ff,0 0 9px #18c8ff;
}
#buildControls.ship-fortress .suit-panel{
  position:absolute;
  z-index:6;
  left:65.2%;
  top:25.7%;
  width:24.8%;
  height:55.8%;
  padding:0;
  border:0;
  background:none;
  box-shadow:none;
}
#buildControls.ship-fortress .suit-row{position:relative;width:100%;height:100%;display:block;padding:0;background:none;box-shadow:none;transform:none}
#buildControls.ship-fortress .suit-button,
#buildControls.ship-fortress .suit-button.red{
  position:absolute;
  width:36%;
  height:36%;
  margin:0;
  padding:0;
  border:0;
  background:none!important;
  box-shadow:none;
  filter:none;
  clip-path:polygon(25% 0,75% 0,100% 25%,100% 75%,75% 100%,25% 100%,0 75%,0 25%);
  animation:none;
}
#buildControls.ship-fortress .suit-button:nth-child(1){left:32%;top:0}
#buildControls.ship-fortress .suit-button:nth-child(2){right:0;top:32%}
#buildControls.ship-fortress .suit-button:nth-child(3){left:32%;bottom:0}
#buildControls.ship-fortress .suit-button:nth-child(4){left:0;top:32%}
#buildControls.ship-fortress .suit-button span{opacity:0}

@media(max-width:420px){
  #buildControls.ship-fortress .panel-health{gap:3px;padding:2px 4px!important}
  #buildControls.ship-fortress .panel-health>span:before{font-size:5px}
  #buildControls.ship-fortress .panel-health>span b{font-size:7px}
  #buildControls.ship-fortress .panel-health>i{height:5px}
}

/* Fortress dashboard v2: the artwork is a foreground bezel with three real
   transparent apertures. Every changing readout sits behind its opening. */
#buildControls.ship-fortress{
  background-image:none!important;
  background-color:#02080d!important;
}
#buildControls.ship-fortress::after{
  content:"";
  position:absolute;
  z-index:4;
  inset:0;
  pointer-events:none;
  background:url("assets/dashboard-fortress-windows-v1.png") center/100% 100% no-repeat;
}
#buildControls.ship-fortress .build-hint{
  z-index:2;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  pointer-events:none;
}
#buildControls.ship-fortress .panel-health{
  position:absolute;
  left:6.2%;
  top:8.15%;
  width:50.8%;
  height:7.1%;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:clamp(3px,1.2vw,8px);
  padding:0 1.25%!important;
  overflow:hidden;
  border:0!important;
  border-radius:0;
  background:#020d13!important;
  box-shadow:none!important;
}
#buildControls.ship-fortress .panel-health>span:before{
  content:none!important;
}
#buildControls.ship-fortress .panel-health>span{display:contents!important}
#buildControls.ship-fortress .panel-health>span em{
  order:1;
  color:#b7f8ff;
  font:900 clamp(5px,1.8vw,12px) ui-monospace,monospace;
  font-style:normal;
  letter-spacing:.08em;
  text-shadow:none;
}
#buildControls.ship-fortress .panel-health>span b{
  position:static!important;
  order:3;
  font-size:clamp(6px,2vw,14px);
  color:#b7f8ff;
  text-shadow:none;
}
#buildControls.ship-fortress .panel-health>i{
  order:2;
  width:100%!important;
  height:clamp(5px,1.55vw,11px);
  border-color:#4f8794;
}
#buildControls.ship-fortress .build-readouts{display:contents}
#buildControls.ship-fortress .build-hint .target-position,
#buildControls.ship-fortress .build-hint .target-card{
  position:absolute;
  top:7.05%;
  height:9%;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:0!important;
  border-radius:0;
  background:#020d13!important;
  box-shadow:none!important;
  color:#b7f8ff;
  font:900 clamp(10px,3.25vw,23px) ui-monospace,monospace;
  line-height:1;
  text-shadow:none;
  white-space:nowrap;
}
#buildControls.ship-fortress .build-hint .target-position{
  left:66.35%;
  width:9.95%;
}
#buildControls.ship-fortress .build-hint .target-card{
  left:77.6%;
  width:10.1%;
}
#buildControls.ship-fortress .rank-panel,
#buildControls.ship-fortress .suit-panel{z-index:6}

/* Geometry-first dashboards. The live keyboard defines every opening. */
#buildControls,
.phase-two-controls,
.custom-control-panel{
  background-image:
    radial-gradient(circle at 10px 10px,#dce7eb 0 2px,#526873 2.5px 5px,#0a141a 5.5px 7px,transparent 7.5px),
    radial-gradient(circle at calc(100% - 10px) 10px,#dce7eb 0 2px,#526873 2.5px 5px,#0a141a 5.5px 7px,transparent 7.5px),
    radial-gradient(circle at 10px calc(100% - 10px),#dce7eb 0 2px,#526873 2.5px 5px,#0a141a 5.5px 7px,transparent 7.5px),
    radial-gradient(circle at calc(100% - 10px) calc(100% - 10px),#dce7eb 0 2px,#526873 2.5px 5px,#0a141a 5.5px 7px,transparent 7.5px),
    repeating-linear-gradient(105deg,rgba(255,255,255,.035) 0 1px,transparent 1px 7px),
    linear-gradient(180deg,#71848e 0,#263b46 7%,#0b1820 19%,#050c11 78%,#263b45 93%,#71838c 100%)!important;
  background-color:#071017!important;
  border:2px solid #536b77!important;
  border-top-color:#aab9c0!important;
  border-bottom-color:#17272f!important;
  box-shadow:inset 0 2px rgba(255,255,255,.18),inset 0 -5px 10px #010407,0 -5px 16px rgba(0,0,0,.55)!important;
}
#buildControls{padding:8px 12px calc(10px + env(safe-area-inset-bottom))}
#buildControls .rank-panel,
#buildControls .suit-panel{
  min-width:0;
  padding:5px;
  border:2px solid #5f7580;
  border-top-color:#a9b8bf;
  border-bottom-color:#172830;
  background:linear-gradient(145deg,#60747e 0,#233741 11%,#071219 25%,#03080c 76%,#243942 89%,#667a84 100%);
  box-shadow:inset 0 0 0 2px #0a151b,inset 0 0 10px #000,0 2px 5px rgba(0,0,0,.75);
}
#buildControls .rank-row,
#buildControls .suit-row{
  padding:4px;
  background:linear-gradient(180deg,#020609,#0a151c 48%,#020609);
  box-shadow:inset 0 0 0 1px #243a45,inset 0 0 12px #000;
}
#buildControls .rank-button{width:100%;max-width:none}
#buildControls .suit-button{margin:0}

/* Fortress housing follows the 3,3,3,4 grid exactly. */
#buildControls.ship-fortress{grid-template-columns:minmax(0,1.42fr) minmax(120px,.9fr)}
#buildControls.ship-fortress .rank-panel{grid-column:1;grid-row:2}
#buildControls.ship-fortress .suit-panel{grid-column:2;grid-row:2}
#buildControls.ship-fortress .rank-row{grid-template-columns:repeat(12,minmax(0,1fr));gap:6px}
#buildControls.ship-fortress .rank-button{grid-column:span 4}
#buildControls.ship-fortress .rank-button:nth-child(n+10){grid-column:span 3}

/* Strike uses its illustrated, image-calibrated layout below. Shared panel
   padding and fixed key heights must never be applied to that dashboard. */

/* Interceptor housing is built around the centered keypad and two side towers. */
#buildControls.ship-interceptor{grid-template-columns:72px minmax(0,1fr) 72px;column-gap:6px}
#buildControls.ship-interceptor .rank-panel{grid-column:2;grid-row:2;padding:6px}
#buildControls.ship-interceptor .rank-row{grid-template-columns:repeat(12,minmax(0,1fr));gap:5px;padding:5px}
#buildControls.ship-interceptor .rank-button{grid-column:span 4;height:42px}
#buildControls.ship-interceptor .rank-button:nth-child(n+10){grid-column:span 3}
#buildControls.ship-interceptor .suit-panel{grid-column:1/-1;grid-row:2;padding:0;border:0;background:none;box-shadow:none;pointer-events:none}
#buildControls.ship-interceptor .suit-row{position:absolute;inset:0;display:block;padding:0;background:none;box-shadow:none}
#buildControls.ship-interceptor .suit-row:before,
#buildControls.ship-interceptor .suit-row:after{
  content:"";
  position:absolute;
  z-index:-1;
  top:0;
  bottom:0;
  width:69px;
  border:2px solid #6b808a;
  background:linear-gradient(145deg,#71848d,#243842 13%,#071118 30%,#03080c 72%,#2a414b 88%,#73858e);
  box-shadow:inset 0 0 0 2px #0b171d,inset 0 0 12px #000;
}
#buildControls.ship-interceptor .suit-row:before{left:0}
#buildControls.ship-interceptor .suit-row:after{right:0}
#buildControls.ship-interceptor .suit-button{width:58px;height:58px}
#buildControls.ship-interceptor .suit-button:nth-child(1){left:6px;top:calc(50% + 5px)}
#buildControls.ship-interceptor .suit-button:nth-child(3){left:6px;bottom:calc(50% + 5px)}
#buildControls.ship-interceptor .suit-button:nth-child(2){right:6px;bottom:calc(50% + 5px)}
#buildControls.ship-interceptor .suit-button:nth-child(4){right:6px;top:calc(50% + 5px)}

/* Raider and custom-stack dashboards are fitted around their existing grids. */
.phase-two-controls{padding:10px 14px calc(12px + env(safe-area-inset-bottom))}
.phase-two-controls .position-grid{
  padding:7px;
  border:2px solid #657a84;
  background:linear-gradient(180deg,#243943,#050c11 17%,#020609 83%,#263c46);
  box-shadow:inset 0 0 0 2px #0b171d,inset 0 0 14px #000;
}
.custom-control-panel{padding:10px!important}
.custom-rank-row,.custom-suit-row{
  padding:6px;
  border:2px solid #5e747f;
  background:linear-gradient(180deg,#20353f,#03080c 22%,#07131a 78%,#263c46);
  box-shadow:inset 0 0 10px #000;
}

@media(max-height:720px){
  #buildControls{padding:6px 9px calc(8px + env(safe-area-inset-bottom))}
  #buildControls .rank-panel,#buildControls .suit-panel{padding:3px}
  #buildControls .rank-row,#buildControls .suit-row{padding:3px}
  #buildControls.ship-interceptor{grid-template-columns:60px minmax(0,1fr) 60px}
  #buildControls.ship-interceptor .rank-button{height:35px}
  #buildControls.ship-interceptor .suit-row:before,#buildControls.ship-interceptor .suit-row:after{width:58px}
  #buildControls.ship-interceptor .suit-button{width:48px;height:48px}
}

/* Unified illustrated fleet skin for every menu and control surface. */
.stack-chooser-card,
.modal-card,
.tutorial-card{
  position:relative;
  border:0;
  border-radius:0;
  padding:clamp(54px,8vh,76px) clamp(38px,8vw,58px) clamp(58px,9vh,82px);
  background-color:transparent;
  background-image:url("assets/menu-command-frame-v1.png");
  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 100%;
  box-shadow:none;
}
.stack-chooser-card:before,
.modal-card:before,
.tutorial-card:before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:13% 12%;
  background:radial-gradient(circle at 50% 0,rgba(26,74,96,.34),#03080d 68%);
}
.stack-chooser h2,.modal-card h2,.tutorial-card h2{color:#eafcff;text-shadow:0 0 5px #fff,0 0 15px rgba(35,199,255,.7)}
.stack-chooser .eyebrow,.modal-card .eyebrow,.tutorial-card .eyebrow{color:#58e7ff;text-shadow:0 0 8px rgba(35,205,255,.65)}
.stack-options button,
.custom-builder-actions button,
.custom-review-back,
.primary-button,
.replay-option button{
  border:0!important;
  border-radius:0!important;
  background-color:transparent!important;
  background-image:url("assets/console-rank-key-v1.png")!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:100% 100%!important;
  box-shadow:none!important;
  color:#dffaff!important;
  text-shadow:0 0 5px rgba(37,209,255,.65);
}
.stack-options button{padding-left:22px;padding-right:92px}
.stack-options button:active,.primary-button:active,.custom-builder-actions button:active{filter:brightness(1.3) drop-shadow(0 0 7px rgba(39,213,255,.7))}

/* Real fleet ships replace the temporary CSS silhouettes. */
.ship-silhouette{width:110px;height:74px;background-repeat:no-repeat;background-position:center;background-size:contain;filter:drop-shadow(0 0 8px rgba(38,211,255,.5))}
.ship-silhouette:before,.ship-silhouette:after{display:none}
.fortress-ship{background-image:url("assets/ship-fortress-v1.png")}
.strike-ship{background-image:url("assets/ship-strike-v1.png")}
.interceptor-ship{background-image:url("assets/ship-interceptor-v1.png")}
.ship-options button{
  border:0;
  clip-path:none;
  background-color:transparent;
  background-image:url("assets/cockpit-shell-v1.png");
  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 100%;
  box-shadow:none;
  padding:19px 24px;
}
.ship-options button:before{display:none}

/* Every playable input deck uses the same physical cockpit shell. */
#buildControls,
.phase-two-controls,
.custom-control-panel{
  border:0!important;
  background-color:#050b0f!important;
  background-image:url("assets/cockpit-shell-v1.png")!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:100% 100%!important;
  box-shadow:none!important;
}
#buildControls{padding-left:clamp(20px,5vw,30px);padding-right:clamp(20px,5vw,30px);padding-bottom:calc(20px + env(safe-area-inset-bottom))}
#buildControls:after{display:none}
.phase-two-controls{padding:clamp(20px,4vw,28px) clamp(23px,6vw,34px) calc(24px + env(safe-area-inset-bottom))}
.custom-control-panel{padding:18px 22px}

/* Strike dashboard calibration. Keep the interactive glass exactly inside the
   illustrated bezels, regardless of the shared dashboard rules above. */
#buildControls.ship-strike .rank-panel{
  left:4.3%;
  top:37.7%;
  width:69.9%;
  height:50%;
  padding:0!important;
}
#buildControls.ship-strike .rank-row{
  grid-template-columns:repeat(42,minmax(0,1fr));
  grid-template-rows:repeat(2,minmax(0,1fr));
  column-gap:.55%;
  row-gap:6.3%;
  padding:0!important;
}
#buildControls.ship-strike .rank-button,
#buildControls.ship-strike .rank-button.selected{
  height:100%!important;
  min-height:0!important;
  background:none!important;
  box-shadow:none!important;
}
#buildControls.ship-strike .rank-button.selected{
  background:rgba(38,210,255,.24)!important;
  box-shadow:inset 0 0 0 2px #d5fbff,inset 0 0 14px #21d6ff!important;
  filter:drop-shadow(0 0 6px #18c8ff)!important;
}
#buildControls.ship-strike .rank-button.selected:after{display:none!important}
#buildControls.ship-strike .suit-panel{
  left:74.8%;
  top:37.7%;
  width:19.65%;
  height:50%;
  padding:0!important;
}
#buildControls.ship-strike .suit-row{
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(2,minmax(0,1fr));
  column-gap:4.4%;
  row-gap:6.3%;
  padding:0!important;
}
#buildControls.ship-strike .suit-button,
#buildControls.ship-strike .suit-button.red{
  position:relative;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  transform:none!important;
}
#buildControls.ship-strike .suit-button[data-suit="clubs"]{grid-column:1;grid-row:1}
#buildControls.ship-strike .suit-button[data-suit="hearts"]{grid-column:2;grid-row:1}
#buildControls.ship-strike .suit-button[data-suit="spades"]{grid-column:1;grid-row:2}
#buildControls.ship-strike .suit-button[data-suit="diamonds"]{grid-column:2;grid-row:2}
#buildControls.ship-strike .suit-button:disabled{
  opacity:1!important;
  filter:none!important;
  background:rgba(0,0,0,.72)!important;
  box-shadow:inset 0 0 10px rgba(0,0,0,.9)!important;
}
#buildControls.ship-strike .suit-button:not(:disabled){
  animation:none!important;
  background:rgba(22,185,225,.06)!important;
}

.custom-rank-row .rank-button{
  border:0!important;
  border-radius:0!important;
  background-color:transparent!important;
  background-image:url("assets/console-rank-key-v1.png")!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:100% 100%!important;
  box-shadow:none!important;
  color:#c9f8ff!important;
  text-shadow:0 0 4px #fff,0 0 9px #058dff!important;
  filter:drop-shadow(0 2px 2px rgba(0,0,0,.8));
}
.phase-two-controls .position-button:active,.numeric-keypad .position-button:active,.custom-rank-row .rank-button:active{filter:brightness(1.3) drop-shadow(0 0 7px #25d5ff)}
.custom-suit-row .suit-button{
  border:0!important;
  border-radius:0!important;
  background-color:transparent!important;
  background-image:url("assets/console-suit-key-v1.png")!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:contain!important;
  box-shadow:none!important;
}
.custom-position-display,.custom-recent,.custom-name-panel,.custom-review-sectors{
  border-color:#718894!important;
  background:linear-gradient(180deg,#1b303a,#061018 68%,#142630)!important;
  box-shadow:inset 0 0 14px #000,0 0 0 2px #1b303a!important;
}

/* The status rail and lower deck belong to the same ship. */
.status-strip{
  border:0;
  background-color:#050a0e;
  background-image:url("assets/cockpit-shell-v1.png");
  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 150%;
}
footer{
  border:0;
  background-color:#070d12;
  background-image:linear-gradient(rgba(2,7,11,.72),rgba(2,7,11,.86)),url("assets/fortress-deck-v2.png");
  background-repeat:no-repeat;
  background-position:center top;
  background-size:cover;
}
.top-restart{
  position:static!important;
  inset:auto!important;
  flex:0 0 auto;
  background-image:url("assets/console-rank-key-v1.png");
  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 100%;
}

/* Restart occupies the former duplicate health cell in the main HUD. */
.topbar{
  min-height:0!important;
  height:0!important;
  padding:0!important;
  overflow:hidden!important;
  border:0!important;
  box-shadow:none!important;
}
.restart-status{display:grid!important;place-items:center;border-right:0!important}
.restart-status .top-restart{
  position:relative!important;
  z-index:2;
  width:min(92px,24vw)!important;
  height:30px!important;
  min-height:30px!important;
  color:#ffd28a!important;
  font-size:9px!important;
  pointer-events:auto!important;
  touch-action:manipulation;
}

/* Interceptor Class: production bitmap dashboard calibrated around its exact
   center keypad and left/right suit towers. */
#buildControls.ship-interceptor{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio:1672/941;
  min-height:0;
  padding:0!important;
  overflow:hidden;
  border:0!important;
  background:#02080d!important;
  box-shadow:0 -5px 18px rgba(0,0,0,.65)!important;
}
#buildControls.ship-interceptor::after{
  content:"";
  position:absolute;
  z-index:4;
  inset:0;
  display:block!important;
  pointer-events:none;
  background:url("assets/dashboard-interceptor-windows-v1.png") center/100% 100% no-repeat!important;
}
#buildControls.ship-interceptor .build-hint{
  position:absolute;
  z-index:2;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  margin:0;
  padding:0;
  border:0;
  background:none;
  box-shadow:none;
  pointer-events:none;
}
#buildControls.ship-interceptor .panel-health{
  position:absolute;
  left:6.65%;
  top:11.5%;
  width:38.4%;
  height:12.9%;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center!important;
  gap:clamp(3px,1vw,7px);
  padding:0 1.5%!important;
  overflow:hidden;
  border:0!important;
  border-radius:0;
  background:#020d13!important;
  box-shadow:none!important;
}
#buildControls.ship-interceptor .panel-health>span{display:contents!important}
#buildControls.ship-interceptor .panel-health>span:before{content:none!important}
#buildControls.ship-interceptor .panel-health>span em{
  order:1;
  color:#b7f8ff;
  font:900 clamp(5px,1.7vw,11px) ui-monospace,monospace;
  font-style:normal;
  letter-spacing:.08em;
}
#buildControls.ship-interceptor .panel-health>span b{
  position:static!important;
  order:3;
  color:#b7f8ff;
  font-size:clamp(6px,1.9vw,13px);
  text-shadow:none;
}
#buildControls.ship-interceptor .panel-health>i{
  order:2;
  width:100%!important;
  height:clamp(5px,1.45vw,10px);
  margin:0;
  border-color:#4f8794;
}
#buildControls.ship-interceptor .build-readouts{display:contents}
#buildControls.ship-interceptor .build-hint .target-position,
#buildControls.ship-interceptor .build-hint .target-card{
  position:absolute;
  top:11.5%;
  height:12.9%;
  min-width:0;
  min-height:0;
  padding:0;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:0!important;
  border-radius:0;
  background:#020d13!important;
  box-shadow:none!important;
  color:#b7f8ff;
  font:900 clamp(10px,3.1vw,23px) ui-monospace,monospace;
  line-height:1;
  text-shadow:none;
  white-space:nowrap;
}

/* 52-sector campaign selector and rapid phase transition. */
#sectorChooser{place-items:center!important;padding:8px!important}
.sector-chooser-card{width:min(100%,500px)!important;aspect-ratio:710/938;max-height:min(94dvh,660px)!important;padding:16.5% 17% 14%!important;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden!important}
.sector-chooser-card .chooser-orbit{flex:0 0 auto;width:clamp(42px,12vw,60px);height:clamp(42px,12vw,60px);margin:0 auto 5px}.sector-chooser-card .chooser-orbit b{font-size:clamp(15px,4.5vw,20px)}
.sector-chooser-card>.eyebrow{flex:0 0 auto;margin:0 auto 3px!important;font-size:clamp(7px,2vw,9px)!important;line-height:1.15;text-align:center}
.sector-chooser-card>h2{flex:0 0 auto;max-width:100%;margin:3px auto 5px!important;font:900 clamp(15px,4.4vw,23px)/1.05 var(--display-font,ui-monospace)!important;color:#eafbff;text-align:center;overflow-wrap:anywhere}
.sector-chooser-card>p:not(.eyebrow){flex:0 0 auto;max-width:100%!important;margin:0 auto 7px!important;color:#9db2c2;font:800 clamp(8px,2.25vw,10px)/1.3 var(--display-font,ui-monospace)!important;text-align:center}
.sector-continue,.sector-grid-toggle{flex:0 0 auto;width:100%!important;max-width:100%;margin:4px 0!important;box-sizing:border-box;border:1px solid #35dfff;border-radius:7px;background:linear-gradient(180deg,#18374a,#07141f);box-shadow:inset 0 0 18px rgba(37,213,255,.12);color:#eaffff;font-family:var(--display-font,ui-monospace)}
.sector-continue{min-height:clamp(52px,14vw,66px)}.sector-continue small,.sector-continue strong{display:block}.sector-continue small{font-size:clamp(7px,2vw,9px);letter-spacing:.18em;color:#73dff1}.sector-continue strong{margin-top:2px;font-size:clamp(18px,6vw,24px);letter-spacing:.08em}
.sector-grid-toggle{height:clamp(34px,10vw,40px);font-weight:900;letter-spacing:.1em}
.sector-number-grid{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:repeat(8,1fr);gap:5px;max-height:none;margin:5px 0 0!important;padding:7px;overflow-y:auto;border:1px solid #405f70;border-radius:7px;background:rgba(2,8,14,.72)}
.sector-number-grid button{aspect-ratio:1;border:1px solid #53798e;border-radius:4px;background:linear-gradient(#172d3b,#09131d);color:#dffcff;font:900 10px var(--display-font,ui-monospace)}
.sector-number-grid button.last-sector{border-color:#39e8ff;box-shadow:inset 0 0 10px rgba(49,231,255,.2);color:#56edff}
.incoming-raiders-warning{position:absolute;z-index:40;transform:translate(-50%,-50%);min-width:min(92%,430px);padding:14px 18px;border:2px solid #ff3b45;background:rgba(34,0,5,.9);box-shadow:0 0 30px rgba(255,28,45,.7),inset 0 0 25px rgba(255,45,53,.2);color:#ff4a52;text-align:center;font-family:var(--display-font,ui-monospace);animation:incoming-warning 1.45s steps(2,end) forwards;pointer-events:none}
.incoming-raiders-warning b,.incoming-raiders-warning span{display:block}.incoming-raiders-warning b{font-size:clamp(24px,8vw,40px)}.incoming-raiders-warning span{margin-top:4px;color:#fff;font-size:clamp(12px,4vw,19px);letter-spacing:.08em}
@keyframes incoming-warning{0%,18%,38%,58%{opacity:0}8%,28%,48%,68%,92%{opacity:1}100%{opacity:0}}
.battlefield.rapid-deploy .defense-turret{animation-duration:.72s!important;animation-delay:0s!important}
@media(max-width:380px){.sector-chooser-card{padding:16% 16.5% 13.5%!important}.sector-number-grid{grid-template-columns:repeat(7,1fr)}.sector-number-grid button{font-size:9px}}
.modal-tap-hint{position:absolute;z-index:4;top:12px;left:50%;transform:translateX(-50%);color:#8defff;font:900 8px var(--display-font,ui-monospace);letter-spacing:.14em;white-space:nowrap;animation:tap-hint-pulse 1.2s ease-in-out infinite}

/* Keep an active Raider readable when its evasive path crosses the HUD. */
.battlefield{overflow:visible}
#bombLayer{position:absolute;inset:0;z-index:30;overflow:visible;pointer-events:none}
#bombLayer .bomb{pointer-events:auto}

.bomb.drone.dive-bombing{
  filter:drop-shadow(0 0 10px rgba(255,70,12,.95)) drop-shadow(0 0 20px rgba(255,180,35,.65));
}
.dive-trail{
  position:absolute;
  z-index:5;
  width:0;
  height:14px;
  transform:translateY(-50%);
  transform-origin:left center;
  clip-path:polygon(0 7%,15% 24%,0 34%,19% 50%,0 66%,15% 76%,0 93%,72% 68%,100% 57%,100% 43%,72% 32%);
  background:linear-gradient(90deg,rgba(255,52,6,.08) 0,rgba(255,68,8,.5) 34%,#ff9b18 72%,#fff 100%);
  filter:drop-shadow(0 0 5px #fff) drop-shadow(0 0 11px #ff4a08);
  pointer-events:none;
  animation:dive-tracer-rage .07s steps(2,end) infinite;
  transition:opacity .28s ease-out,filter .28s ease-out;
}
.dive-trail.spent{opacity:0;filter:blur(5px) drop-shadow(0 0 9px #ff4a08)}
.bomb.drone.dive-bombing .drone-thruster{
  top:-18px;
  height:36px;
  transform:rotate(180deg) scaleX(1.35);
  clip-path:polygon(28% 100%,72% 100%,100% 0,73% 17%,52% 0,31% 18%,0 0);
  background:linear-gradient(180deg,#fff 0,#fff5a8 18%,#ff8a12 46%,rgba(255,38,4,0) 100%);
  filter:drop-shadow(0 0 7px #fff) drop-shadow(0 0 14px #ff4b08);
  animation:dive-engine-rage .06s steps(2,end) infinite;
}
@keyframes dive-tracer-rage{50%{height:19px;filter:drop-shadow(0 0 8px #fff) drop-shadow(0 0 17px #ff3d05)}}
@keyframes dive-engine-rage{50%{height:48px;top:-30px;filter:drop-shadow(0 0 10px #fff) drop-shadow(0 0 19px #ff3203)}}
.score-tap-hint{display:block;margin-bottom:6px;color:#8defff!important;font:900 8px var(--display-font,ui-monospace)!important;letter-spacing:.14em!important;text-align:center}
.dismissible-score{cursor:pointer;touch-action:manipulation;pointer-events:auto!important}
@keyframes tap-hint-pulse{50%{opacity:.42}}
#buildControls.ship-interceptor .build-hint .target-position{left:47.45%;width:13.45%}
#buildControls.ship-interceptor .build-hint .target-card{left:64.3%;width:28.35%}
#buildControls.ship-interceptor .build-hint .target-card.answer-hidden{display:none!important}
#buildControls.ship-interceptor .rank-panel{
  position:absolute;
  z-index:6;
  left:23.8%;
  top:31.7%;
  width:52.2%;
  height:55.6%;
  padding:0!important;
  border:0;
  background:none;
  box-shadow:none;
}
#buildControls.ship-interceptor .rank-row{
  width:100%;
  height:100%;
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  grid-template-rows:repeat(4,minmax(0,1fr));
  column-gap:1%;
  row-gap:2.7%;
  padding:0!important;
  background:none;
  box-shadow:none;
}
#buildControls.ship-interceptor .rank-button,
#buildControls.ship-interceptor .rank-button.selected{
  grid-column:span 4;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  padding:0;
  border:0;
  border-radius:0;
  clip-path:polygon(9% 0,91% 0,100% 17%,100% 83%,91% 100%,9% 100%,0 83%,0 17%);
  background:none!important;
  box-shadow:none!important;
  filter:none;
}
#buildControls.ship-interceptor .rank-button:nth-child(n+10){grid-column:span 3}
#buildControls.ship-interceptor .rank-button:before,
#buildControls.ship-interceptor .rank-button:after{display:none!important}
#buildControls.ship-interceptor .rank-button>span{opacity:0}
#buildControls.ship-interceptor .rank-button.selected{
  background:rgba(38,210,255,.24)!important;
  box-shadow:inset 0 0 0 2px #d5fbff,inset 0 0 14px #21d6ff!important;
  filter:drop-shadow(0 0 6px #18c8ff)!important;
}
#buildControls.ship-interceptor .suit-panel{
  position:absolute;
  z-index:6;
  inset:0;
  width:100%;
  height:100%;
  padding:0!important;
  border:0;
  background:none;
  box-shadow:none;
  pointer-events:none;
}
#buildControls.ship-interceptor .suit-row{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  padding:0!important;
  background:none;
  box-shadow:none;
}
#buildControls.ship-interceptor .suit-row:before,
#buildControls.ship-interceptor .suit-row:after{display:none!important}
#buildControls.ship-interceptor .suit-button,
#buildControls.ship-interceptor .suit-button.red{
  position:absolute;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  clip-path:polygon(17% 0,83% 0,100% 17%,100% 83%,83% 100%,17% 100%,0 83%,0 17%);
  background:none!important;
  box-shadow:none;
  filter:none;
  transform:none!important;
  animation:none!important;
  pointer-events:auto;
}
#buildControls.ship-interceptor .suit-button[data-suit="clubs"]{left:7.4%;top:34.2%;width:12.2%;height:19.7%}
#buildControls.ship-interceptor .suit-button[data-suit="spades"]{left:7.4%;top:60.5%;width:12.2%;height:20.1%}
#buildControls.ship-interceptor .suit-button[data-suit="hearts"]{left:80.7%;top:34.2%;width:11.7%;height:19.7%}
#buildControls.ship-interceptor .suit-button[data-suit="diamonds"]{left:80.7%;top:60.7%;width:11.7%;height:20.1%}
#buildControls.ship-interceptor .suit-button span,
#buildControls.ship-interceptor .suit-button small{opacity:0}
#buildControls.ship-interceptor .suit-button:disabled{
  opacity:1!important;
  filter:none!important;
  background:rgba(0,0,0,.72)!important;
  box-shadow:inset 0 0 12px rgba(0,0,0,.92)!important;
}
#buildControls.ship-interceptor .suit-button:not(:disabled){
  animation:none!important;
  background:rgba(22,185,225,.06)!important;
}

/* Interceptor uses the same locked-grid technique as the approved Fortress
   and Strike dashboards. The outer columns are the suit glass openings and
   the middle column is reserved for the rank keypad. */
#buildControls.ship-interceptor .suit-panel{
  left:7.4%!important;
  top:34.2%!important;
  width:85%!important;
  height:46.6%!important;
}
#buildControls.ship-interceptor .suit-row{
  position:static!important;
  inset:auto!important;
  display:grid!important;
  grid-template-columns:14.35% 71.88% 13.77%!important;
  grid-template-rows:42.3% 14.1% 43.1%!important;
  gap:0!important;
}
#buildControls.ship-interceptor .suit-button,
#buildControls.ship-interceptor .suit-button.red{
  position:static!important;
  inset:auto!important;
  width:100%!important;
  height:100%!important;
  justify-self:stretch;
  align-self:stretch;
}
#buildControls.ship-interceptor .suit-button[data-suit="clubs"]{grid-column:1;grid-row:1}
#buildControls.ship-interceptor .suit-button[data-suit="spades"]{grid-column:1;grid-row:3}
#buildControls.ship-interceptor .suit-button[data-suit="hearts"]{grid-column:3;grid-row:1}
#buildControls.ship-interceptor .suit-button[data-suit="diamonds"]{grid-column:3;grid-row:3}

/* Interceptor readouts sit inside the black glass rather than covering the
   angled window bezels. Position and card use independent type scales. */
#buildControls.ship-interceptor .panel-health{
  left:7.8%!important;
  top:12.3%!important;
  width:36.9%!important;
  height:10.8%!important;
  padding:0 1.6%!important;
  clip-path:polygon(4% 0,96% 0,100% 22%,100% 78%,96% 100%,4% 100%,0 78%,0 22%);
}
#buildControls.ship-interceptor .panel-health>span em{
  font-size:clamp(7px,2vw,12px)!important;
  letter-spacing:.1em;
}

/* Fortress suit faces are live, larger glyphs laid over the existing glass.
   Rank artwork and rank hit areas remain completely unchanged. */
#buildControls.ship-fortress .suit-button,
#buildControls.ship-fortress .suit-button.red{
  background:rgba(1,8,13,.94)!important;
}
#buildControls.ship-fortress .suit-button span{
  display:block!important;
  opacity:1!important;
  transform:none!important;
  color:#bff8ff!important;
  font-size:clamp(32px,11vw,52px)!important;
  line-height:1!important;
  font-family:inherit!important;
  font-weight:inherit!important;
  text-shadow:0 0 4px #fff,0 0 11px #009dff!important;
}
#buildControls.ship-fortress .suit-button.red span{
  color:#ff5b52!important;
  text-shadow:0 0 4px #fff,0 0 11px #ff2b22!important;
}
#buildControls.ship-fortress .suit-button:disabled span{
  opacity:.22!important;
  filter:grayscale(.7);
  text-shadow:none!important;
}

/* Enlarge the complete Fortress suit keys within their four-way gusset. The
   glyph-to-key proportion stays close to the original approved layout. */
#buildControls.ship-fortress .suit-button,
#buildControls.ship-fortress .suit-button.red{
  width:42%!important;
  height:42%!important;
}
#buildControls.ship-fortress .suit-button:nth-child(1){left:29%!important;top:0!important}
#buildControls.ship-fortress .suit-button:nth-child(2){right:0!important;top:29%!important}
#buildControls.ship-fortress .suit-button:nth-child(3){left:29%!important;bottom:0!important}
#buildControls.ship-fortress .suit-button:nth-child(4){left:0!important;top:29%!important}

/* Fortress uses the Strike-style selected state: outlined suits and an edge
   glow, without flooding the complete glyph with light. */
#buildControls.ship-fortress .suit-button span,
#buildControls.ship-fortress .suit-button.red span{
  color:rgba(5,16,22,.88)!important;
  -webkit-text-stroke:1px #7597a2;
  text-shadow:none!important;
  filter:none!important;
}
#buildControls.ship-fortress .suit-button:disabled span,
#buildControls.ship-fortress .suit-button.red:disabled span{
  opacity:.34!important;
  -webkit-text-stroke-color:#53636a;
}
#buildControls.ship-fortress .suit-button:not(:disabled),
#buildControls.ship-fortress .suit-button.red:not(:disabled){
  animation:none!important;
  background:rgba(22,185,225,.055)!important;
  box-shadow:inset 0 0 0 2px #d5fbff,inset 0 0 13px rgba(33,214,255,.62),0 0 6px rgba(24,200,255,.5)!important;
}
#buildControls.ship-fortress .suit-button:not(:disabled) span{
  color:rgba(4,18,24,.72)!important;
  -webkit-text-stroke:1.15px #bff8ff;
  text-shadow:0 0 5px rgba(0,157,255,.55)!important;
}
#buildControls.ship-fortress .suit-button.red:not(:disabled) span{
  color:rgba(24,7,7,.72)!important;
  -webkit-text-stroke:1px #ff766e;
  text-shadow:0 0 5px rgba(255,43,34,.48)!important;
}
#buildControls.ship-fortress .suit-panel{top:24.4%!important}
#buildControls.ship-fortress .suit-button span,
#buildControls.ship-fortress .suit-button:disabled span,
#buildControls.ship-fortress .suit-button:not(:disabled) span,
#buildControls.ship-fortress .suit-button.red span,
#buildControls.ship-fortress .suit-button.red:disabled span,
#buildControls.ship-fortress .suit-button.red:not(:disabled) span{
  width:100%!important;
  height:100%!important;
  display:grid!important;
  place-items:center!important;
  font-size:clamp(32px,11vw,52px)!important;
  line-height:1!important;
  transform:none!important;
  scale:1!important;
  -webkit-text-stroke-width:1px!important;
}
#buildControls.ship-interceptor .panel-health>span b{
  font-size:clamp(8px,2.35vw,14px)!important;
}
#buildControls.ship-interceptor .panel-health>i{
  height:clamp(6px,1.8vw,11px)!important;
}
#buildControls.ship-interceptor .build-hint .target-position,
#buildControls.ship-interceptor .build-hint .target-card{
  top:12.3%!important;
  height:10.8%!important;
  clip-path:polygon(9% 0,91% 0,100% 22%,100% 78%,91% 100%,9% 100%,0 78%,0 22%);
}
#buildControls.ship-interceptor .build-hint .target-position{
  left:48.3%!important;
  width:12%!important;
  font-size:clamp(16px,5.2vw,28px)!important;
  letter-spacing:.06em;
}
#buildControls.ship-interceptor .build-hint .target-card{
  left:65%!important;
  width:26.3%!important;
  font-size:clamp(15px,4.8vw,26px)!important;
  letter-spacing:.1em;
}

/* Mobile control scale. Every ship dashboard itself occupies approximately
   the lower third of the screen on portrait phones. */
#buildControls.ship-fortress,
#buildControls.ship-strike,
#buildControls.ship-interceptor{
  width:100%;
  height:clamp(220px,33dvh,315px)!important;
  min-height:clamp(220px,33dvh,315px)!important;
  aspect-ratio:auto!important;
  flex:none;
}
@media(min-width:700px){
  #buildControls.ship-fortress,
  #buildControls.ship-strike,
  #buildControls.ship-interceptor{
    height:min(315px,33dvh)!important;
    min-height:min(315px,33dvh)!important;
  }
}

/* Mobile Safari fallback. Paint each approved dashboard on the control deck
   itself as well as on its foreground mask, preventing an empty dashboard if
   a generated pseudo-element layer is skipped during viewport resizing. */
#buildControls.ship-fortress{
  background-color:#02080d!important;
  background-image:url("assets/dashboard-fortress-windows-v1.png")!important;
  background-position:center!important;
  background-size:100% 100%!important;
  background-repeat:no-repeat!important;
}
#buildControls.ship-strike{
  background-color:#02080d!important;
  background-image:url("assets/dashboard-strike-windows-v1.png")!important;
  background-position:center!important;
  background-size:100% 100%!important;
  background-repeat:no-repeat!important;
}
#buildControls.ship-interceptor{
  background-color:#02080d!important;
  background-image:url("assets/dashboard-interceptor-windows-v1.png")!important;
  background-position:center!important;
  background-size:100% 100%!important;
  background-repeat:no-repeat!important;
}
#buildControls.ship-fortress::after,
#buildControls.ship-strike::after,
#buildControls.ship-interceptor::after{
  width:100%!important;
  height:100%!important;
  opacity:1!important;
  visibility:visible!important;
}

@media(max-height:720px){
  .stack-chooser-card,.modal-card,.tutorial-card{padding:42px 30px 48px}
  .ship-options button{padding:12px 18px}
  .ship-silhouette{width:84px;height:58px}
  #buildControls{padding-left:18px;padding-right:18px;padding-bottom:calc(15px + env(safe-area-inset-bottom))}
  .phase-two-controls{padding:16px 20px calc(18px + env(safe-area-inset-bottom))}
}

/* Final Raider calibration. These rules intentionally come last so legacy
   cockpit and Strike-class selectors cannot paint over the live controls. */
#phaseTwoControls.raider-training-dashboard,
#phaseTwoControls.raider-keypad-dashboard{
  padding:0!important;
  border:0!important;
  box-shadow:none!important;
  background-color:#02070b!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
  background-size:100% 100%!important;
}
#phaseTwoControls.raider-training-dashboard{background-image:url("assets/dashboard-raiders-training-v1.png")!important}
#phaseTwoControls.raider-keypad-dashboard{background-image:url("assets/dashboard-raiders-keypad-v1.png")!important}
#phaseTwoControls.raider-training-dashboard .position-grid,
#phaseTwoControls.raider-keypad-dashboard .position-grid{
  border:0!important;
  background:none!important;
  background-image:none!important;
  box-shadow:none!important;
}

/* Shared report frame for fortress-ready, defeat, leaderboard, practice, and
   full-deck popup states. The generated artwork owns every visible frame. */
#modal{
  overflow:hidden!important;
  padding:calc(8px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom))!important;
  background:rgba(1,5,8,.88)!important;
}
#modal .modal-card{
  position:relative!important;
  width:min(100%,calc((100dvh - 16px)*.6667),460px)!important;
  height:auto!important;
  max-height:calc(100dvh - 16px)!important;
  aspect-ratio:2/3!important;
  margin:auto!important;
  padding:0!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0!important;
  background:transparent url("assets/menu-report-frame-v1.png") center/100% 100% no-repeat!important;
  box-shadow:none!important;
}
#modal .modal-card::before{display:none!important}
#modal #modalTitle{
  position:absolute!important;
  z-index:3!important;
  left:19.5%!important;
  top:17.1%!important;
  width:61%!important;
  height:4.9%!important;
  margin:0!important;
  display:grid!important;
  place-items:center!important;
  color:#dffaff!important;
  font:1000 clamp(10px,3.1vw,15px)/1 ui-monospace,SFMono-Regular,Consolas,monospace!important;
  letter-spacing:.055em!important;
  text-align:center!important;
  text-shadow:0 0 6px rgba(48,210,246,.62)!important;
  white-space:nowrap!important;
}
#modal .report-content{
  position:absolute!important;
  z-index:3!important;
  left:12.2%!important;
  top:24.3%!important;
  width:75.6%!important;
  height:59.8%!important;
  padding:clamp(12px,3.5vw,20px)!important;
  overflow:auto!important;
  scrollbar-width:thin;
  scrollbar-color:#397f92 transparent;
  color:#d8edf4!important;
}
#modal #modalEyebrow{margin:0 0 clamp(7px,1.8vh,12px)!important;color:#6de8ff!important;font:900 clamp(8px,2.35vw,11px)/1.2 ui-monospace,monospace!important;letter-spacing:.11em!important;text-align:center!important;text-shadow:0 0 6px rgba(43,207,242,.45)!important}
#modal #modalText{margin:0 auto clamp(10px,2.4vh,16px)!important;color:#b7ccd5!important;font:700 clamp(9px,2.65vw,12px)/1.42 ui-monospace,monospace!important;text-align:center!important}
#modal .leaderboard{margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
#modal .run-score{margin:0!important;padding:clamp(7px,2vw,11px) 0 clamp(9px,2.3vw,13px)!important;border:0!important;border-top:1px solid rgba(67,161,185,.28)!important;border-bottom:1px solid rgba(67,161,185,.28)!important;border-radius:0!important;background:none!important;box-shadow:none!important}
#modal .run-score span,#modal .run-score small{display:block!important;color:#91aab5!important;font:850 clamp(7px,2vw,9px)/1.3 ui-monospace,monospace!important;letter-spacing:.09em!important;text-align:center!important}
#modal .run-score strong{display:block!important;margin:2px 0 4px!important;color:#eafcff!important;font:1000 clamp(28px,9vw,42px)/1 ui-monospace,monospace!important;text-align:center!important;text-shadow:0 0 10px rgba(42,211,247,.58)!important}
#modal #scoreResult{margin-top:3px!important;color:#64e7ff!important}
#modal .performance-insights{display:grid!important;gap:3px!important;margin-top:7px!important;color:#9fe8f4!important;font:800 clamp(7px,2vw,9px)/1.25 ui-monospace,monospace!important;text-align:center!important}
#modal .leaderboard>p{margin:clamp(10px,2.4vh,15px) 0 5px!important;color:#7f9ca8!important;font:900 clamp(7px,2vw,9px)/1 ui-monospace,monospace!important;letter-spacing:.12em!important;text-align:center!important}
#modal .leaderboard ol{margin:0!important;padding:0!important;display:grid!important;gap:0!important;border-top:1px solid rgba(67,161,185,.22)!important}
#modal .leaderboard li{min-height:clamp(32px,8vw,42px)!important;padding:5px 3px!important;display:grid!important;grid-template-columns:24px 1fr auto!important;align-items:center!important;border:0!important;border-bottom:1px solid rgba(67,161,185,.22)!important;border-radius:0!important;background:none!important;box-shadow:none!important;text-align:left!important}
#modal .leaderboard li.current{background:rgba(25,174,210,.075)!important}
#modal .leaderboard li b{color:#688590!important;font:900 clamp(8px,2.4vw,11px) ui-monospace,monospace!important}
#modal .leaderboard li strong{color:#e2f8ff!important;font:1000 clamp(11px,3.3vw,15px) ui-monospace,monospace!important}
#modal .leaderboard li span{color:#79949f!important;font:750 clamp(6px,1.8vw,8px)/1.25 ui-monospace,monospace!important;text-align:right!important}
#modal .report-actions{
  position:absolute!important;
  z-index:4!important;
  left:15.2%!important;
  top:86.9%!important;
  width:69.6%!important;
  height:7.1%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:clamp(4px,1.1vw,7px)!important;
  padding:clamp(4px,1vw,6px)!important;
}
#modal .report-actions>.primary-button,#modal .report-actions .replay-option,#modal .report-actions .replay-option button{min-width:0!important;min-height:0!important;height:100%!important;margin:0!important}
#modal .report-actions>.primary-button,#modal .report-actions .replay-option{flex:1 1 0!important}
#modal .report-actions button{width:100%!important;padding:3px 4px!important;color:#e5fbff!important;font:900 clamp(6px,1.85vw,9px)/1.05 ui-monospace,monospace!important;letter-spacing:.025em!important;text-align:center!important;border:1px solid #477f8d!important;border-radius:3px!important;background:linear-gradient(180deg,#3d5963,#0a2029 55%,#061116)!important;box-shadow:inset 0 1px rgba(255,255,255,.25),inset 0 -2px 3px #000,0 0 5px rgba(38,198,231,.25)!important}
#modal .report-actions button:active{border-color:#77eaff!important;filter:brightness(1.25)!important}
#modal .report-actions .replay-option small{display:none!important}

/* Larger, phone-readable menu typography. Every scale remains constrained by
   its measured glass opening instead of enlarging the surrounding artwork. */
#modeChooser .eyebrow,#stackChooser .eyebrow,#customStackChooser .eyebrow{
  font-size:clamp(10px,3vw,14px)!important;
}
#modeChooser .stack-options button strong{
  font-size:clamp(15px,4.6vw,21px)!important;
  line-height:1.03!important;
}
#modeChooser .stack-options button small{
  font-size:clamp(9px,2.8vw,13px)!important;
  line-height:1.22!important;
}
#modeChooser .tutorial-toggle span strong{
  font-size:clamp(11px,3.25vw,15px)!important;
}
#stackChooser .stack-options>button[data-stack] strong,
#customStackChooser .custom-create-option strong,
#customStackChooser .custom-stack-play strong{
  font-size:clamp(14px,4.15vw,20px)!important;
  line-height:1.03!important;
}
#stackChooser .stack-options>button[data-stack] small,
#customStackChooser .custom-create-option small,
#customStackChooser .custom-stack-play small{
  font-size:clamp(9px,2.7vw,13px)!important;
  line-height:1.2!important;
}
#stackChooser #createCustomStack strong{
  font-size:clamp(11px,3.3vw,15px)!important;
}
#customStackChooser .custom-stack-edit{
  font-size:clamp(8px,2.25vw,11px)!important;
}
#customStackChooser .custom-stack-navigation strong{
  font-size:clamp(8px,2.35vw,11px)!important;
}
#shipChooser h2{font-size:clamp(28px,8.2vw,40px)!important}
#shipChooser .ship-chooser-card>p:not(.eyebrow){font-size:clamp(12px,3.45vw,16px)!important}
#shipChooser .ship-options strong{font-size:clamp(17px,5vw,23px)!important}
#shipChooser .ship-options small{font-size:clamp(9px,2.65vw,12px)!important}
#shipChooser .ship-options span b{font-size:clamp(9px,2.65vw,12px)!important}
#modal #modalTitle{font-size:clamp(12px,3.65vw,17px)!important}
#modal #modalEyebrow{font-size:clamp(10px,2.9vw,14px)!important;line-height:1.18!important}
#modal #modalText{font-size:clamp(11px,3.15vw,15px)!important;line-height:1.38!important}
#modal .run-score span,#modal .run-score small{font-size:clamp(9px,2.55vw,12px)!important;line-height:1.25!important}
#modal .run-score strong{font-size:clamp(34px,10vw,49px)!important}
#modal .performance-insights{font-size:clamp(9px,2.5vw,12px)!important;line-height:1.22!important}
#modal .leaderboard>p{font-size:clamp(9px,2.5vw,12px)!important}
#modal .leaderboard li b{font-size:clamp(10px,2.8vw,13px)!important}
#modal .leaderboard li strong{font-size:clamp(13px,3.8vw,18px)!important}
#modal .leaderboard li span{font-size:clamp(8px,2.25vw,10px)!important;line-height:1.22!important}
#modal .report-actions button{font-size:clamp(7px,2.15vw,10px)!important;line-height:1.05!important}
#phaseTwoControls.raider-training-dashboard .position-button,
#phaseTwoControls.raider-keypad-dashboard .position-button{
  position:relative!important;
  display:grid!important;
  place-items:center!important;
  text-align:center!important;
  line-height:1!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  padding:0!important;
  margin:0!important;
  appearance:none;
  border:2px solid transparent!important;
  background:none!important;
  background-color:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  color:#55dcff!important;
  -webkit-text-fill-color:#55dcff;
  text-shadow:0 0 3px #d9fbff,0 0 8px rgba(0,157,255,.95)!important;
  filter:none!important;
  opacity:1!important;
  transform:none!important;
  z-index:5!important;
}
#phaseTwoControls.raider-training-dashboard .position-button::before,
#phaseTwoControls.raider-training-dashboard .position-button::after,
#phaseTwoControls.raider-keypad-dashboard .position-button::before,
#phaseTwoControls.raider-keypad-dashboard .position-button::after{display:none!important;content:none!important}
#phaseTwoControls.raider-training-dashboard .position-button:active,
#phaseTwoControls.raider-keypad-dashboard .position-button:active{
  color:#dffcff!important;
  -webkit-text-fill-color:#dffcff;
  border-color:#5ceaff!important;
  background:rgba(29,183,255,.14)!important;
  box-shadow:inset 0 0 15px rgba(44,211,255,.52),0 0 12px rgba(44,211,255,.75)!important;
}

/* The Raider readout carries forward fortress health from build mode. */
#phaseTwoControls.raider-training-dashboard .recall-heading{inset:7.2% 20.5% auto!important;height:10.5%!important;padding:0 2.5%!important}
#phaseTwoControls.raider-training-dashboard .recall-heading>.raider-health{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:clamp(6px,2vw,12px);width:100%;height:100%;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
#phaseTwoControls .raider-health>span{display:contents!important}
#phaseTwoControls .raider-health>span em{color:#9ff4ff;font:900 clamp(8px,2.5vw,13px) ui-monospace,monospace;font-style:normal;letter-spacing:.12em}
#phaseTwoControls .raider-health>span b{order:3;color:#eaffff;font:900 clamp(10px,3vw,16px) ui-monospace,monospace}
#phaseTwoControls .raider-health>i{order:2;display:block;width:100%;height:clamp(7px,1.8vw,11px);overflow:hidden;border:1px solid #4e7480;border-radius:2px;background:repeating-linear-gradient(90deg,#111c23 0 9%,#05090c 9% 10%);box-shadow:inset 0 2px 5px #000}
#phaseTwoControls .raider-health>i>b{display:block;height:100%;transition:width .3s ease,background .25s ease}
#phaseTwoControls .raider-health.healthy>i>b{background:linear-gradient(180deg,#85ff9d,#16cf51 55%,#08752d);box-shadow:0 0 10px #28ed64}
#phaseTwoControls .raider-health.warning>i>b{background:linear-gradient(180deg,#fff17b,#e9af18 55%,#8d5b04);box-shadow:0 0 10px #f3c52e}
#phaseTwoControls .raider-health.critical>i>b{background:linear-gradient(180deg,#ff8b78,#ef2f26 55%,#82140f);box-shadow:0 0 12px #ff392b}

/* The illustrated third row has three centered apertures. */
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(11){position:absolute!important;left:17%!important;top:67%!important;width:22%!important;height:30%!important}
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(12){position:absolute!important;left:38.6%!important;top:67%!important;width:22.8%!important;height:30%!important}
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(13){position:absolute!important;left:61.2%!important;top:67%!important;width:21.6%!important;height:30%!important}

/* Pixel-calibrated Raider training controls. The centers below come from the
   black-glass apertures in dashboard-raiders-training-v1.png, not an inferred
   equal grid. This keeps the numerals centered when the artwork scales. */
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad){
  display:block!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  padding:0!important;
}
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button{
  position:absolute!important;
  width:14.5%!important;
  height:17%!important;
  top:21.38%!important;
}
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(1),
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(6){left:8.375%!important}
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(2),
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(7){left:25.53%!important}
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(3),
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(8){left:42.72%!important}
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(4),
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(9){left:59.84%!important}
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(5),
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(10){left:77%!important}
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(n+6):nth-child(-n+10){top:44.87%!important}
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(11),
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(12),
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(13){top:69.14%!important;width:17%!important;height:17%!important}
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(11){left:21.69%!important}
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(12){left:41.37%!important}
#phaseTwoControls.raider-training-dashboard .position-grid:not(.numeric-keypad) .position-button:nth-child(13){left:61.65%!important}

/* Pixel-calibrated advanced Raider keypad. Each target uses the measured
   center of its transparent black-glass aperture in the generated artwork. */
#phaseTwoControls.raider-keypad-dashboard .position-grid.numeric-keypad{
  display:block!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  padding:0!important;
}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-code{
  position:absolute!important;
  left:13.5%!important;
  top:9.2%!important;
  width:73%!important;
  height:14.5%!important;
  padding:0 3%!important;
}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button{
  position:absolute!important;
  width:19%!important;
  height:12%!important;
}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(1),
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(4),
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(7){left:13.97%!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(2),
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(5),
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(8){left:40.47%!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(3),
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(6),
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(9){left:67.03%!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(-n+3){top:26.91%!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(n+4):nth-of-type(-n+6){top:44.44%!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(n+7):nth-of-type(-n+9){top:61.68%!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(10){left:17.5%!important;top:78.18%!important;width:65%!important;height:12%!important}

/* Keep entered digits illuminated until the two-digit answer is submitted. */
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button.digit-entered{
  color:#eaffff!important;
  -webkit-text-fill-color:#eaffff;
  border-color:#56e7ff!important;
  background:rgba(22,185,255,.18)!important;
  box-shadow:inset 0 0 0 2px rgba(217,251,255,.72),inset 0 0 18px rgba(23,202,255,.62),0 0 13px rgba(25,205,255,.88)!important;
  text-shadow:0 0 4px #fff,0 0 10px #28dfff!important;
}

/* Mode command board. Live copy is fitted to empty glass apertures in a
   purpose-built frame, with no separate pale button skins. */
#modeChooser{overflow:hidden;padding:calc(8px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom))}
#modeChooser .stack-chooser-card{
  position:relative;
  width:min(100%,calc((100dvh - 16px)*.6667),460px);
  max-height:calc(100dvh - 16px);
  aspect-ratio:2/3;
  padding:0!important;
  overflow:visible;
  background-color:transparent!important;
  background-image:url("assets/menu-mode-panel-v1.png")!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:100% 100%!important;
  border:0!important;
  box-shadow:none!important;
}
#modeChooser .stack-chooser-card::before{display:none!important}
#modeChooser .chooser-orbit{
  position:absolute;
  z-index:2;
  left:37%;
  top:2.2%;
  width:26%;
  height:16.8%;
  margin:0;
  display:grid;
  place-items:center;
  border:0!important;
  background:none!important;
  box-shadow:none!important;
}
#modeChooser .chooser-orbit::before,#modeChooser .chooser-orbit::after,#modeChooser .chooser-orbit i{display:none!important}
#modeChooser .chooser-orbit b{color:#8defff;font:900 clamp(16px,6vw,27px) ui-monospace,monospace;letter-spacing:.08em;text-shadow:0 0 9px rgba(44,215,255,.85)}
#modeChooser .eyebrow{
  position:absolute;
  z-index:3;
  left:29.5%;
  top:20.45%;
  width:41%;
  height:4.7%;
  margin:0;
  display:grid;
  place-items:center;
  color:#9ff4ff;
  font:900 clamp(7px,2.25vw,11px) ui-monospace,monospace;
  letter-spacing:.06em;
  white-space:nowrap;
  text-align:center;
  text-shadow:0 0 7px rgba(34,207,255,.7);
}
#modeChooser .stack-options{position:absolute;z-index:3;inset:0;display:block;margin:0;padding:0}
#modeChooser .stack-options button{
  position:absolute;
  left:12.7%;
  width:74.6%;
  height:11.5%;
  min-height:0!important;
  margin:0;
  padding:0 7.5%!important;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  border:0!important;
  border-radius:0!important;
  background:none!important;
  background-color:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  clip-path:none!important;
}
#modeChooser .stack-options button:nth-child(1){top:29.2%}
#modeChooser .stack-options button:nth-child(2){top:47.3%}
#modeChooser .stack-options button:nth-child(3){top:65.7%}
#modeChooser .stack-options button strong{width:100%;color:#e9fcff;font:900 clamp(13px,4.2vw,19px)/1.05 ui-monospace,monospace;letter-spacing:.045em;text-shadow:0 0 6px rgba(43,210,255,.66)}
#modeChooser .stack-options button small{width:100%;margin-top:clamp(3px,.8vh,6px);color:#9fb7c4;font:700 clamp(8px,2.55vw,12px)/1.28 ui-monospace,monospace;letter-spacing:0;white-space:normal;text-align:center}
#modeChooser .stack-options button span{display:none!important}
#modeChooser .stack-options button:active{background:rgba(30,197,255,.1)!important;filter:brightness(1.24) drop-shadow(0 0 7px rgba(39,213,255,.7))}
#modeChooser .tutorial-toggle{
  position:absolute;
  z-index:4;
  left:21%;
  top:82.5%;
  width:58%;
  height:7.2%;
  min-height:0;
  margin:0;
  padding:0 9%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(8px,2.5vw,14px);
  border:0!important;
  border-radius:0!important;
  background:none!important;
  box-shadow:none!important;
}
#modeChooser .tutorial-toggle>i{flex:0 0 clamp(25px,7vw,34px);width:clamp(25px,7vw,34px);height:clamp(14px,4vw,19px);border:1px solid #387c91!important;background:#07141b!important;box-shadow:inset 0 0 7px #000,0 0 5px rgba(41,203,255,.28)!important}
#modeChooser .tutorial-toggle input:checked+i{border-color:#5ceaff!important;background:#123848!important;box-shadow:inset 0 0 7px #000,0 0 9px rgba(41,220,255,.72)!important}
#modeChooser .tutorial-toggle span strong{color:#dffaff;font:900 clamp(10px,3vw,14px) ui-monospace,monospace;letter-spacing:.07em;white-space:nowrap;text-shadow:0 0 6px rgba(43,210,255,.65)}

/* Captain selection uses the same measured glass-window system as Mode. */
#stackChooser{overflow:hidden;padding:calc(8px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom))}
#stackChooser .stack-chooser-card{
  position:relative;
  width:min(100%,calc((100dvh - 16px)*.6667),460px);
  max-height:calc(100dvh - 16px);
  aspect-ratio:2/3;
  padding:0!important;
  overflow:visible;
  background-color:transparent!important;
  background-image:url("assets/menu-mode-panel-v1.png")!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:100% 100%!important;
  border:0!important;
  box-shadow:none!important;
}
#stackChooser .stack-chooser-card::before{display:none!important}
#stackChooser .chooser-orbit{position:absolute;z-index:2;left:37%;top:2.2%;width:26%;height:16.8%;margin:0;display:grid;place-items:center;border:0!important;background:none!important;box-shadow:none!important}
#stackChooser .chooser-orbit::before,#stackChooser .chooser-orbit::after,#stackChooser .chooser-orbit i{display:none!important}
#stackChooser .chooser-orbit b{color:#8defff;font:900 clamp(19px,7vw,31px) ui-monospace,monospace;letter-spacing:.04em;text-shadow:0 0 9px rgba(44,215,255,.85)}
#stackChooser .eyebrow{position:absolute;z-index:3;left:29.5%;top:20.45%;width:41%;height:4.7%;margin:0;display:grid;place-items:center;color:#9ff4ff;font:900 clamp(8px,2.45vw,12px) ui-monospace,monospace;letter-spacing:.055em;white-space:nowrap;text-align:center;text-shadow:0 0 7px rgba(34,207,255,.7)}
#stackChooser .stack-options{position:absolute;z-index:3;inset:0;display:block;margin:0;padding:0}
#stackChooser .stack-options>button[data-stack]{position:absolute;left:12.7%;width:74.6%;height:11.5%;min-height:0!important;margin:0;padding:0 6%!important;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border:0!important;border-radius:0!important;background:none!important;background-color:transparent!important;background-image:none!important;box-shadow:none!important;clip-path:none!important}
#stackChooser .stack-options>button[data-stack]:nth-child(1){top:29.2%}
#stackChooser .stack-options>button[data-stack]:nth-child(2){top:47.3%}
#stackChooser .stack-options>button[data-stack]:nth-child(3){top:65.7%}
#stackChooser .stack-options>button[data-stack] strong{width:100%;color:#e9fcff;font:900 clamp(12px,3.8vw,18px)/1.05 ui-monospace,monospace;letter-spacing:.035em;text-align:center;text-shadow:0 0 6px rgba(43,210,255,.66)}
#stackChooser .stack-options>button[data-stack] small{width:100%;margin-top:clamp(3px,.7vh,5px);color:#9fb7c4;font:700 clamp(8px,2.35vw,11px)/1.3 ui-monospace,monospace;letter-spacing:0;text-align:center;white-space:normal}
#stackChooser .stack-options>button[data-stack] span{display:none!important}
#stackChooser .stack-options>button[data-stack]:active{background:rgba(30,197,255,.1)!important;filter:brightness(1.24) drop-shadow(0 0 7px rgba(39,213,255,.7))}
#stackChooser #createCustomStack{position:absolute;left:21%;top:82.5%;width:58%;height:7.2%;min-height:0!important;margin:0;padding:0 7%!important;display:flex;align-items:center;justify-content:center;text-align:center;border:0!important;border-radius:0!important;background:none!important;background-color:transparent!important;background-image:none!important;box-shadow:none!important}
#stackChooser #createCustomStack strong{color:#e9fcff;font:900 clamp(10px,3vw,14px)/1 ui-monospace,monospace;letter-spacing:.06em}
#stackChooser #createCustomStack small{display:none!important}
#stackChooser #createCustomStack span{display:none!important}

/* Custom-stack library uses the same measured metal frame and glass bays. */
#customStackChooser{overflow:hidden;padding:calc(8px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom))}
#customStackChooser .stack-chooser-card{position:relative;width:min(100%,calc((100dvh - 16px)*.6667),460px);max-height:calc(100dvh - 16px);aspect-ratio:2/3;padding:0!important;overflow:visible;background:transparent url("assets/menu-mode-panel-v1.png") center/100% 100% no-repeat!important;border:0!important;box-shadow:none!important}
#customStackChooser .stack-chooser-card::before{display:none!important}
#customStackChooser .chooser-orbit{position:absolute;z-index:2;left:37%;top:2.2%;width:26%;height:16.8%;margin:0;display:grid;place-items:center;border:0!important;background:none!important;box-shadow:none!important}
#customStackChooser .chooser-orbit::before,#customStackChooser .chooser-orbit::after,#customStackChooser .chooser-orbit i{display:none!important}
#customStackChooser .chooser-orbit b{color:#8defff;font:900 clamp(19px,7vw,31px) ui-monospace,monospace;letter-spacing:.04em;text-shadow:0 0 9px rgba(44,215,255,.85)}
#customStackChooser .eyebrow{position:absolute;z-index:3;left:29.5%;top:20.45%;width:41%;height:4.7%;margin:0;display:grid;place-items:center;color:#9ff4ff;font:900 clamp(9px,2.7vw,13px) ui-monospace,monospace;letter-spacing:.055em;white-space:nowrap;text-align:center;text-shadow:0 0 7px rgba(34,207,255,.7)}
#customStackChooser .stack-options{position:absolute;z-index:3;inset:0;display:block;margin:0;padding:0}
#customStackChooser .custom-create-option,#customStackChooser .custom-stack-slot{position:absolute;left:12.7%;width:74.6%;height:11.5%;margin:0;border:0!important;background:none!important;box-shadow:none!important}
#customStackChooser .custom-create-option{top:29.2%;padding:0 6%!important;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
#customStackChooser .custom-stack-slot[data-custom-slot="0"]{top:47.3%}
#customStackChooser .custom-stack-slot[data-custom-slot="1"]{top:65.7%}
#customStackChooser .custom-create-option strong,#customStackChooser .custom-stack-play strong{width:100%;color:#e9fcff;font:900 clamp(12px,3.8vw,18px)/1.05 ui-monospace,monospace;letter-spacing:.035em;text-align:center;text-shadow:0 0 6px rgba(43,210,255,.66)}
#customStackChooser .custom-create-option small,#customStackChooser .custom-stack-play small{width:100%;margin-top:clamp(3px,.7vh,5px);color:#9fb7c4;font:700 clamp(8px,2.35vw,11px)/1.25 ui-monospace,monospace;text-align:center}
#customStackChooser .custom-stack-slot{display:grid;grid-template-columns:minmax(0,1fr) clamp(68px,21vw,98px);align-items:center;gap:clamp(5px,1.5vw,8px);padding:0 5%}
#customStackChooser .custom-stack-slot.empty{display:block}
#customStackChooser .custom-stack-play{min-width:0;padding:0 3%!important;display:flex;flex-direction:column;align-items:center;justify-content:center;border:0!important;background:none!important;box-shadow:none!important}
#customStackChooser .custom-stack-edit{
  position:relative;
  align-self:center;
  min-width:0!important;
  min-height:clamp(28px,7.8vw,38px)!important;
  padding:4px 7px!important;
  display:grid;
  place-items:center;
  color:#dffbff!important;
  font:900 clamp(7px,2vw,10px)/1.05 ui-monospace,SFMono-Regular,Consolas,monospace!important;
  letter-spacing:.045em!important;
  text-align:center;
  text-shadow:0 0 6px rgba(63,220,255,.7);
  border:1px solid #4ba4b7!important;
  border-radius:4px!important;
  background:
    linear-gradient(180deg,rgba(78,111,123,.94) 0%,rgba(26,49,59,.98) 42%,rgba(7,23,31,.98) 54%,rgba(22,55,67,.98) 100%)!important;
  box-shadow:
    inset 0 1px 0 rgba(225,250,255,.48),
    inset 0 -2px 4px rgba(0,0,0,.9),
    0 0 0 2px rgba(4,14,19,.85),
    0 0 7px rgba(42,205,238,.34)!important;
}
#customStackChooser .custom-stack-edit::before,#customStackChooser .custom-stack-edit::after{content:"";position:absolute;top:4px;width:2px;height:2px;border-radius:50%;background:#a6c8d0;box-shadow:0 calc(clamp(28px,7.8vw,38px) - 11px) 0 #657f88}
#customStackChooser .custom-stack-edit::before{left:4px}
#customStackChooser .custom-stack-edit::after{right:4px}
#customStackChooser .custom-stack-edit:active{color:#fff!important;border-color:#7defff!important;background:linear-gradient(180deg,#3d9bb1,#0b4050 52%,#08232d)!important;box-shadow:inset 0 0 8px rgba(73,226,255,.8),0 0 11px rgba(42,219,255,.72)!important;transform:translateY(1px)}
#customStackChooser .empty-stack-window{display:block;width:100%;height:100%}
#customStackChooser .custom-stack-navigation{position:absolute;left:22%;top:82.5%;width:56%;height:7.2%;display:grid;grid-template-columns:auto auto;gap:clamp(7px,2vw,10px);align-items:center;justify-content:center;padding:0}
#customStackChooser .custom-stack-navigation button{position:relative;width:auto!important;min-width:0!important;min-height:0!important;height:clamp(21px,5.4vw,27px)!important;margin:0;padding:2px clamp(8px,2.1vw,11px)!important;display:grid;place-items:center;text-align:center;border:1px solid #4ba4b7!important;border-radius:3px!important;background:linear-gradient(180deg,rgba(78,111,123,.94),rgba(26,49,59,.98) 42%,rgba(7,23,31,.98) 54%,rgba(22,55,67,.98))!important;box-shadow:inset 0 1px 0 rgba(225,250,255,.48),inset 0 -1px 3px rgba(0,0,0,.9),0 0 0 1px rgba(4,14,19,.85),0 0 5px rgba(42,205,238,.3)!important}
#customStackChooser .custom-stack-navigation button::before,#customStackChooser .custom-stack-navigation button::after{content:"";position:absolute;top:3px;width:1.5px;height:1.5px;border-radius:50%;background:#a6c8d0;box-shadow:0 calc(clamp(21px,5.4vw,27px) - 8px) 0 #657f88}
#customStackChooser .custom-stack-navigation button::before{left:3px}
#customStackChooser .custom-stack-navigation button::after{right:3px}
#customStackChooser .custom-stack-navigation strong{color:#e9fcff;font:900 clamp(7px,2.15vw,10px)/1 ui-monospace,monospace;letter-spacing:.035em;white-space:nowrap;text-shadow:0 0 6px rgba(63,220,255,.7)}
#customStackChooser .custom-stack-navigation button:active{color:#fff!important;border-color:#7defff!important;background:linear-gradient(180deg,#3d9bb1,#0b4050 52%,#08232d)!important;box-shadow:inset 0 0 8px rgba(73,226,255,.8),0 0 11px rgba(42,219,255,.72)!important;transform:translateY(1px)}
#customStackChooser #nextCustomStackPage.inactive{opacity:.42}
#customStackChooser button:active{filter:brightness(1.25) drop-shadow(0 0 7px rgba(39,213,255,.7))}

/* Fleet hangar: a deliberately different, scrollable ship-selection screen. */
#shipChooser{
  align-items:flex-start!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  padding:calc(18px + env(safe-area-inset-top)) 12px calc(26px + env(safe-area-inset-bottom))!important;
  background:
    radial-gradient(circle at 15% 18%,rgba(75,210,255,.13) 0 1px,transparent 2px),
    radial-gradient(circle at 81% 32%,rgba(255,255,255,.12) 0 1px,transparent 2px),
    radial-gradient(circle at 37% 73%,rgba(92,177,255,.1) 0 1px,transparent 2px),
    linear-gradient(180deg,#02070b 0%,#07131b 42%,#020609 100%)!important;
  background-size:83px 83px,119px 119px,151px 151px,100% 100%!important;
}
#shipChooser .ship-chooser-card{
  position:relative!important;
  width:min(100%,520px)!important;
  min-height:100%!important;
  max-height:none!important;
  margin:0 auto!important;
  padding:clamp(22px,5vw,34px) clamp(12px,3.5vw,22px) clamp(24px,6vw,38px)!important;
  overflow:visible!important;
  border:1px solid rgba(87,153,173,.38)!important;
  border-radius:clamp(16px,4vw,24px)!important;
  background:
    linear-gradient(90deg,transparent 0 7%,rgba(99,159,177,.08) 7.2% 7.6%,transparent 7.8% 92%,rgba(99,159,177,.08) 92.2% 92.6%,transparent 92.8%),
    linear-gradient(180deg,rgba(18,35,44,.96),rgba(5,13,18,.97))!important;
  box-shadow:inset 0 0 0 3px #03090d,inset 0 0 34px rgba(35,151,183,.1),0 12px 35px #000!important;
}
#shipChooser .ship-chooser-card::before{
  content:""!important;
  position:absolute!important;
  inset:8px!important;
  display:block!important;
  pointer-events:none;
  border:1px solid rgba(124,179,194,.18)!important;
  border-radius:clamp(11px,3vw,18px)!important;
  background:none!important;
  box-shadow:none!important;
}
#shipChooser h2{
  position:relative;
  margin:0!important;
  color:#e9fbff!important;
  font:1000 clamp(24px,7.5vw,38px)/1 ui-monospace,SFMono-Regular,Consolas,monospace!important;
  letter-spacing:.055em!important;
  text-align:center;
  text-shadow:0 0 10px rgba(48,211,255,.64)!important;
}
#shipChooser .ship-chooser-card>p:not(.eyebrow){
  position:relative;
  margin:clamp(11px,2.5vh,17px) auto clamp(20px,4vh,30px)!important;
  color:#a9c4cf!important;
  font:750 clamp(11px,3.1vw,14px)/1.5 ui-monospace,SFMono-Regular,Consolas,monospace!important;
  letter-spacing:.015em;
  text-align:center;
}
#shipChooser .ship-options{display:grid!important;gap:clamp(18px,4.5vh,30px)!important;margin:0!important}
#shipChooser .ship-options button{
  position:relative!important;
  width:100%!important;
  min-height:clamp(330px,80vw,410px)!important;
  margin:0!important;
  padding:clamp(16px,4vw,23px) clamp(16px,4vw,24px) clamp(14px,3.5vw,20px)!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-rows:minmax(175px,1fr) auto auto!important;
  gap:clamp(7px,2vw,12px)!important;
  overflow:hidden!important;
  clip-path:none!important;
  border:1px solid #486c78!important;
  border-radius:clamp(10px,3vw,16px)!important;
  background:
    linear-gradient(90deg,rgba(255,255,255,.06),transparent 12% 88%,rgba(255,255,255,.04)),
    radial-gradient(ellipse at 50% 40%,rgba(43,176,211,.16),transparent 57%),
    linear-gradient(180deg,#142832 0%,#071118 66%,#0c1d25 100%)!important;
  box-shadow:inset 0 1px 0 rgba(220,247,255,.28),inset 0 -5px 12px #010405,0 0 0 4px #040b0f,0 0 18px rgba(29,151,183,.18)!important;
}
#shipChooser .ship-speed-meter{
  position:relative!important;
  z-index:2!important;
  grid-column:1!important;
  grid-row:1!important;
  align-self:end!important;
  justify-self:end!important;
  width:clamp(78px,22vw,112px)!important;
  height:clamp(165px,45vw,230px)!important;
  margin:0 clamp(2px,.7vw,5px) 0 0!important;
  padding:0!important;
  display:block!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  filter:drop-shadow(0 5px 5px rgba(0,0,0,.75))!important;
  pointer-events:none!important;
}
#shipChooser .ship-options button::before{
  content:""!important;
  position:absolute!important;
  inset:9px!important;
  display:block!important;
  pointer-events:none;
  border:1px solid rgba(64,181,208,.2)!important;
  border-radius:clamp(7px,2vw,11px)!important;
  background:linear-gradient(90deg,#75909a 0 12px,transparent 12px calc(100% - 12px),#75909a calc(100% - 12px)) top/100% 2px no-repeat!important;
}
#shipChooser .ship-silhouette{
  grid-column:1!important;
  grid-row:1!important;
  align-self:center!important;
  justify-self:start!important;
  width:min(74%,320px)!important;
  max-width:none!important;
  height:clamp(145px,38vw,195px)!important;
  margin:0!important;
  background-position:center!important;
  background-size:contain!important;
  filter:drop-shadow(0 8px 6px rgba(0,0,0,.82)) drop-shadow(0 0 13px rgba(49,207,246,.46))!important;
  transform:scale(.96);
}
#shipChooser .ship-dashboard-preview{
  position:relative!important;
  grid-column:1!important;
  grid-row:2!important;
  align-self:center!important;
  justify-self:center!important;
  width:min(94%,430px)!important;
  height:clamp(58px,16vw,86px)!important;
  margin:0!important;
  padding:0!important;
  border:1px solid rgba(91,197,220,.5)!important;
  border-radius:5px!important;
  background:#02070b!important;
  box-shadow:0 5px 12px rgba(0,0,0,.78),0 0 8px rgba(42,204,237,.2)!important;
  opacity:.82;
  transition:opacity .18s ease,filter .18s ease,transform .18s ease;
  pointer-events:none;
  overflow:hidden!important;
}
#shipChooser .ship-dashboard-preview img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;margin:0!important;padding:0!important;display:block!important;object-fit:fill!important;border:0!important;background:none!important;box-shadow:none!important;pointer-events:none!important}
#shipChooser .ship-dashboard-preview img:last-child{z-index:2!important;opacity:1!important}
#shipChooser .ship-options button:hover .ship-dashboard-preview,
#shipChooser .ship-options button:focus-visible .ship-dashboard-preview{opacity:1;filter:brightness(1.16);transform:scale(1.025)}
#shipChooser .ship-options span{
  grid-column:1!important;
  grid-row:3!important;
  align-self:stretch!important;
  min-width:0!important;
  display:grid!important;
  grid-template-columns:1fr auto!important;
  grid-template-rows:auto auto!important;
  column-gap:12px!important;
  align-items:center!important;
  padding:clamp(8px,2.2vw,12px) clamp(10px,2.7vw,15px)!important;
  border:1px solid rgba(75,175,198,.38)!important;
  border-radius:6px!important;
  background:linear-gradient(180deg,rgba(13,41,51,.94),rgba(3,16,22,.98))!important;
  box-shadow:inset 0 0 9px #000!important;
}
#shipChooser .ship-options strong{grid-column:1;grid-row:1;color:#eafcff!important;font:1000 clamp(15px,4.7vw,22px)/1.05 ui-monospace,SFMono-Regular,Consolas,monospace!important;letter-spacing:.045em!important;text-align:left!important;text-shadow:0 0 7px rgba(49,218,255,.65)!important}
#shipChooser .ship-options small{grid-column:1;grid-row:2;margin-top:4px!important;color:#91aeb9!important;font:800 clamp(8px,2.25vw,10px)/1.2 ui-monospace,SFMono-Regular,Consolas,monospace!important;letter-spacing:.02em!important;text-align:left!important}
#shipChooser .ship-options span b{grid-column:2;grid-row:1/3;align-self:center!important;margin:0!important;padding:clamp(7px,2vw,10px) clamp(9px,2.5vw,13px)!important;color:#dffcff!important;font:900 clamp(8px,2.35vw,11px)/1 ui-monospace,SFMono-Regular,Consolas,monospace!important;letter-spacing:.04em!important;white-space:nowrap!important;border:1px solid #4a9aad!important;border-radius:4px!important;background:linear-gradient(180deg,#345968,#0a222c)!important;box-shadow:inset 0 1px rgba(255,255,255,.24),inset 0 -2px 4px #000,0 0 7px rgba(44,210,245,.27)!important}
#shipChooser .ship-options button:active{transform:scale(.99)!important;filter:brightness(1.2)!important}
#shipChooser .ship-options button:active span b{border-color:#7ceeff!important;box-shadow:inset 0 0 8px rgba(70,226,255,.65),0 0 12px rgba(44,219,255,.58)!important}
@media(max-width:370px){#shipChooser .ship-options button{min-height:315px!important}#shipChooser .ship-silhouette{height:136px!important}#shipChooser .ship-speed-meter{width:72px!important;height:154px!important}#shipChooser .ship-dashboard-preview{height:54px!important}#shipChooser .ship-options span{grid-template-columns:1fr!important}#shipChooser .ship-options span b{grid-column:1;grid-row:3;margin-top:8px!important;justify-self:stretch;text-align:center}}

/* Generated opening key art. CSS only handles full-screen fitting and the fade. */
.launch-splash{
  position:fixed;
  z-index:10000;
  inset:0;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:#000;
  opacity:1;
  visibility:visible;
  transition:opacity .85s ease,visibility 0s linear .85s;
}
.launch-splash img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center;
  user-select:none;
  -webkit-user-drag:none;
}
.launch-splash.departing{opacity:0;visibility:hidden;pointer-events:none}
@media(orientation:landscape){.launch-splash img{object-fit:contain;background:#000}}
@media(prefers-reduced-motion:reduce){.launch-splash{transition-duration:.25s}}

/* Center every menu in the usable viewport. Auto margins collapse safely when
   a tall menu must scroll, so its top remains reachable on shorter phones. */
.stack-chooser:not(.hidden){
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
}
.stack-chooser>.stack-chooser-card{
  flex:0 0 auto!important;
  margin-block:auto!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Unified cockpit language. Glass readouts share one squared digital face,
   and interactive illumination is always the same cyan outline. */
:root{--fortress-display-font:"Arial Narrow","Roboto Mono","Cascadia Mono",ui-monospace,SFMono-Regular,Consolas,monospace}
.status-strip,
.target-card,
.panel-health,
.raider-health,
.objective,
.battle-message,
.stack-chooser-card,
.modal-card,
.tutorial-card{font-family:var(--fortress-display-font)!important}
.rank-button.selected,
.position-button.digit-entered,
.suit-button:not(:disabled):active,
.primary-button:focus-visible,
.top-restart:focus-visible{outline:1px solid #70efff!important;outline-offset:1px;box-shadow:inset 0 0 11px rgba(36,220,255,.44),0 0 11px rgba(36,220,255,.72)!important}

/* Compact metal-and-glass top HUD: score, multiplier, restart only. */
.status-strip{
  height:clamp(56px,7.2vh,68px)!important;
  grid-template-columns:1.2fr .95fr 1.2fr!important;
  border-top:1px solid #738794!important;
  border-bottom:1px solid #243d49!important;
  background:
    linear-gradient(90deg,transparent 32.9%,rgba(54,220,255,.25) 33%,transparent 33.2%,transparent 66.8%,rgba(54,220,255,.25) 67%,transparent 67.2%),
    linear-gradient(180deg,#52616a 0,#1b2931 12%,#071117 23%,#02070b 78%,#17262e 90%,#65747c 100%)!important;
  box-shadow:inset 0 1px rgba(235,250,255,.52),inset 0 -2px rgba(0,0,0,.8),0 5px 16px rgba(0,0,0,.48)!important;
}
.status-strip>div{position:relative;border:0!important}
.status-strip>div:before{content:"";position:absolute;inset:7px 8px;border:1px solid #2f5968;clip-path:polygon(6px 0,calc(100% - 6px) 0,100% 6px,100% calc(100% - 6px),calc(100% - 6px) 100%,6px 100%,0 calc(100% - 6px),0 6px);background:linear-gradient(145deg,rgba(16,39,49,.68),rgba(2,8,12,.86));box-shadow:inset 0 0 10px #000,0 0 5px rgba(35,208,255,.18);pointer-events:none}
.status-strip>div>*{position:relative;z-index:1}
.status-strip .score-status span{color:#83a7b6!important;font:800 clamp(7px,2vw,9px)/1 var(--fortress-display-font)!important;letter-spacing:.16em!important}
.status-strip .score-status strong{margin-top:3px!important;color:#f4feff!important;font:950 clamp(23px,7.4vw,34px)/.9 var(--fortress-display-font)!important;letter-spacing:-.045em!important;text-shadow:0 0 4px #fff,0 0 12px rgba(47,222,255,.72)!important;font-variant-numeric:tabular-nums}
.status-strip .score-status strong.score-wide{font-size:clamp(19px,5.8vw,28px)!important;letter-spacing:-.065em!important}
.status-strip .score-status strong.score-extra-wide{font-size:clamp(16px,4.8vw,23px)!important;letter-spacing:-.075em!important}
.status-strip .score-status strong.score-rolling{animation:hud-score-roll .28s ease-out}
@keyframes hud-score-roll{0%{filter:brightness(1);transform:translateY(0)}42%{filter:brightness(1.75);transform:translateY(-1px)}100%{filter:brightness(1);transform:translateY(0)}}

.status-strip .combo-status strong b{font:1000 clamp(32px,10.5vw,47px)/1 var(--fortress-display-font)!important;letter-spacing:-.08em!important;transition:color .14s ease,text-shadow .14s ease,filter .14s ease!important}
#comboLabel.combo-level-1{color:#75f1ff!important;text-shadow:0 0 7px rgba(52,224,255,.5)!important}
#comboLabel.combo-level-2{color:#52eaff!important;text-shadow:0 0 8px rgba(35,219,255,.62)!important}
#comboLabel.combo-level-3{color:#2bddff!important;text-shadow:0 0 10px rgba(27,206,255,.72)!important}
#comboLabel.combo-level-4{color:#25c2ff!important;text-shadow:0 0 11px rgba(25,181,255,.78)!important}
#comboLabel.combo-level-5{color:#249dff!important;text-shadow:0 0 12px rgba(29,137,255,.82)!important}
#comboLabel.combo-level-6{color:#557cff!important;text-shadow:0 0 13px rgba(67,94,255,.86)!important}
#comboLabel.combo-level-7{color:#ffba45!important;text-shadow:0 0 12px rgba(255,159,34,.78)!important}
#comboLabel.combo-level-8{color:#ff7a24!important;text-shadow:0 0 14px rgba(255,99,23,.9)!important}
#comboLabel.combo-level-9{color:#bffaff!important;text-shadow:0 0 5px #fff,0 0 15px #24e5ff,0 0 28px rgba(28,178,255,.9)!important;animation:max-combo-breathe 1.05s ease-in-out infinite alternate}
@keyframes max-combo-breathe{from{filter:brightness(1);text-shadow:0 0 4px #fff,0 0 11px #24e5ff,0 0 20px rgba(28,178,255,.65)}to{filter:brightness(1.5);text-shadow:0 0 7px #fff,0 0 19px #35efff,0 0 34px rgba(28,178,255,1)}}

.restart-status .top-restart{
  width:min(96px,25vw)!important;
  height:31px!important;
  min-height:31px!important;
  border:1px solid #4fb6c9!important;
  color:#dffbff!important;
  background:linear-gradient(180deg,#354852 0,#14232b 45%,#071117 55%,#1b3039 100%)!important;
  font:900 clamp(8px,2.25vw,10px)/1 var(--fortress-display-font)!important;
  letter-spacing:.11em!important;
  text-shadow:0 0 5px rgba(69,222,255,.62)!important;
  box-shadow:inset 0 1px rgba(225,250,255,.45),inset 0 -2px rgba(0,0,0,.7),0 0 7px rgba(36,210,255,.22)!important;
}
.restart-status .top-restart:active{border-color:#8df4ff!important;filter:brightness(1.28);box-shadow:inset 0 0 13px rgba(36,220,255,.5),0 0 13px rgba(36,220,255,.72)!important}

.restart-status{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:center!important;gap:clamp(5px,1.5vw,8px)!important;padding:0 5px!important}
.restart-status .top-restart{width:min(76px,20vw)!important}
.restart-status .top-pause{
  position:relative!important;
  z-index:2;
  flex:0 0 31px!important;
  width:31px!important;
  height:31px!important;
  min-width:31px!important;
  min-height:31px!important;
  margin:0!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid #4fb6c9!important;
  border-radius:50%!important;
  color:#dffbff!important;
  background:radial-gradient(circle at 50% 35%,#38505b 0,#14252d 47%,#050c11 72%,#213640 100%)!important;
  font:1000 14px/1 var(--fortress-display-font)!important;
  letter-spacing:-.12em!important;
  text-indent:-.12em;
  text-shadow:0 0 6px rgba(69,222,255,.78)!important;
  box-shadow:inset 0 1px rgba(225,250,255,.5),inset 0 -2px rgba(0,0,0,.75),0 0 8px rgba(36,210,255,.3)!important;
}
.restart-status .top-pause.is-paused{color:#9dffb8!important;border-color:#4edb83!important;text-indent:.08em;letter-spacing:0!important;text-shadow:0 0 7px rgba(44,255,113,.85)!important;box-shadow:inset 0 0 10px rgba(29,184,86,.3),0 0 10px rgba(44,255,113,.48)!important}
.restart-status .top-pause:active{border-color:#8df4ff!important;filter:brightness(1.3);box-shadow:inset 0 0 13px rgba(36,220,255,.55),0 0 13px rgba(36,220,255,.75)!important}

@media(max-height:700px){.status-strip{height:54px!important}.status-strip>div:before{inset:5px 7px}.status-strip .combo-status strong b{font-size:34px!important}.status-strip .score-status strong{font-size:24px!important}.status-strip .score-status strong.score-wide{font-size:20px!important}.status-strip .score-status strong.score-extra-wide{font-size:17px!important}.restart-status .top-restart{height:27px!important;min-height:27px!important}.restart-status .top-pause{flex-basis:27px!important;width:27px!important;height:27px!important;min-width:27px!important;min-height:27px!important;font-size:12px!important}}
@media(prefers-reduced-motion:reduce){#comboLabel.combo-level-9,.status-strip .score-status strong.score-rolling{animation:none!important}}

/* Mechanical control-cassette changeover. The live Fortress controls remain
   completely untouched. This artwork floats above them only during the swap. */
#phaseTwoControls.raider-training-dashboard,
#phaseTwoControls.raider-keypad-dashboard{
  flex-basis:clamp(220px,33dvh,315px)!important;
  height:clamp(220px,33dvh,315px)!important;
  min-height:clamp(220px,33dvh,315px)!important;
}
.dashboard-transition{
  position:absolute;
  z-index:12;
  left:0;
  right:0;
  bottom:0;
  width:100%;
  max-width:100%;
  height:clamp(220px,33dvh,315px);
  pointer-events:none;
  overflow:visible;
  contain:layout;
}
.dashboard-transition.hidden{display:none!important}
.dashboard-cassette-shutter{
  position:absolute;
  z-index:4;
  inset:18% 7% 6%;
  opacity:0;
  transform:scaleY(.03);
  transform-origin:center;
  background:url("assets/dashboard-armored-shutter-v1.png") center/100% 100% no-repeat;
  filter:grayscale(.28) sepia(.1) brightness(.7) contrast(1.28) drop-shadow(0 -5px 10px rgba(0,0,0,.82));
}
.dashboard-transition.transitioning .dashboard-cassette-shutter{animation:dashboard-cassette-swap 4.25s ease-in-out both}
@keyframes dashboard-cassette-swap{
  0%{opacity:0;transform:scaleY(.03)}
  12%{opacity:1;transform:scaleY(.16)}
  34%,61%{opacity:1;transform:scaleY(1)}
  84%{opacity:1;transform:scaleY(.15)}
  100%{opacity:0;transform:scaleY(.03)}
}
.dashboard-turret-mount{
  position:absolute;
  z-index:6;
  top:auto;
  bottom:calc(100% - 2px);
  width:clamp(58px,15%,84px);
  aspect-ratio:1;
  transform:perspective(190px) rotateX(68deg) scale(.92);
  transform-origin:50% 100%;
  opacity:.94;
  filter:drop-shadow(0 7px 7px rgba(0,0,0,.9));
}
.dashboard-turret-mount.left{left:8%}
.dashboard-turret-mount.right{right:8%}
.dashboard-turret-mount:after{
  content:"";
  position:absolute;
  z-index:-1;
  left:8%;
  right:8%;
  bottom:2%;
  height:28%;
  clip-path:polygon(10% 0,90% 0,100% 100%,0 100%);
  background:linear-gradient(180deg,#71818a,#273942 35%,#091319 100%);
  border:1px solid #718690;
  box-shadow:inset 0 2px rgba(255,255,255,.16),0 4px 7px #000;
}
.dashboard-turret-mount img{display:block;width:100%;height:100%;object-fit:contain}
.dashboard-transition.transitioning .dashboard-turret-mount{animation:dashboard-turret-deploy 4.25s cubic-bezier(.2,.72,.25,1) both}
@keyframes dashboard-turret-deploy{
  0%,18%{transform:perspective(190px) rotateX(68deg) scale(.92);filter:brightness(.68) drop-shadow(0 7px 7px rgba(0,0,0,.9))}
  68%{transform:perspective(190px) rotateX(-5deg) scale(1.02);filter:brightness(1.2) drop-shadow(0 8px 10px rgba(0,0,0,.95))}
  100%{transform:perspective(190px) rotateX(0) scale(1);filter:brightness(1.08) drop-shadow(0 8px 10px rgba(0,0,0,.95))}
}
.dashboard-transition.deployed .dashboard-cassette-shutter{display:none}
.dashboard-transition.parked .dashboard-turret-mount{transform:perspective(190px) rotateX(68deg) scale(.92);filter:brightness(.72) drop-shadow(0 7px 7px rgba(0,0,0,.9))}
.dashboard-transition.deployed .dashboard-turret-mount{transform:perspective(190px) rotateX(0) scale(1);filter:brightness(1.08) drop-shadow(0 8px 10px rgba(0,0,0,.95))}
.dashboard-scan{display:none}
.dashboard-transition.fast-scan .dashboard-cassette-shutter{display:none!important}
.dashboard-transition.fast-scan .dashboard-scan{
  display:block;
  position:absolute;
  z-index:10;
  left:4%;
  right:4%;
  top:8%;
  bottom:3%;
  overflow:hidden;
  opacity:0;
  background:rgba(0,8,13,.78);
  box-shadow:inset 0 0 25px #000;
}
.dashboard-transition.fast-scan .dashboard-scan::after{
  content:"";
  position:absolute;
  left:-8%;
  top:0;
  width:10%;
  height:100%;
  background:linear-gradient(90deg,transparent,rgba(150,250,255,.95),#fff,rgba(24,210,255,.55),transparent);
  filter:blur(1px);
  box-shadow:0 0 18px #25dfff;
}
.dashboard-transition.fast-scan.transitioning .dashboard-scan{animation:dashboard-power-dim 1.7s ease-in-out both}
.dashboard-transition.fast-scan.transitioning .dashboard-scan::after{animation:dashboard-scan-sweep 1.36s cubic-bezier(.3,.05,.2,1) .16s both}
.dashboard-transition.fast-scan.transitioning .dashboard-turret-mount{animation:dashboard-turret-fast-deploy 1.7s cubic-bezier(.15,.75,.2,1) both}
@keyframes dashboard-power-dim{0%{opacity:0}16%,48%{opacity:1}70%{opacity:.3}100%{opacity:0}}
@keyframes dashboard-scan-sweep{from{transform:translateX(0)}to{transform:translateX(1080%)}}
@keyframes dashboard-turret-fast-deploy{0%,20%{transform:perspective(190px) rotateX(68deg) scale(.92);filter:brightness(.7)}75%{transform:perspective(190px) rotateX(-4deg) scale(1.02);filter:brightness(1.32)}100%{transform:perspective(190px) rotateX(0) scale(1);filter:brightness(1.08)}}
.dashboard-turret-mount .turret-hardware{
  position:absolute;
  z-index:1;
  left:50%;
  bottom:-31%;
  width:148%;
  height:auto;
  object-fit:contain;
  opacity:.76;
  transform:translateX(-50%) translateY(20%) scale(.76)!important;
  transform-origin:50% 75%!important;
  filter:brightness(.68) saturate(.75) drop-shadow(0 5px 5px #000);
  transition:none!important;
}
.dashboard-turret-mount .turret-weapon{position:relative;z-index:3}
.dashboard-transition.fast-scan.transitioning .turret-hardware{animation:turret-hardware-deploy 1.7s cubic-bezier(.15,.72,.2,1) both!important}
.dashboard-transition.deployed .turret-hardware{opacity:1;transform:translateX(-50%) translateY(4%) scale(1)!important;filter:brightness(.94) saturate(.9) drop-shadow(0 6px 7px #000)}
@keyframes turret-hardware-deploy{
  0%,12%{opacity:.72;transform:translateX(-50%) translateY(22%) scale(.74);filter:brightness(.62) saturate(.7)}
  58%{opacity:1;transform:translateX(-50%) translateY(2%) scale(1.03);filter:brightness(1.08) saturate(.95)}
  78%{filter:brightness(1.35) saturate(1.08) drop-shadow(0 0 5px rgba(38,220,255,.5))}
  100%{opacity:1;transform:translateX(-50%) translateY(4%) scale(1);filter:brightness(.94) saturate(.9) drop-shadow(0 6px 7px #000)}
}

/* The Raider cassette is centered inside equal armored side buffers. Its live
   digits match the Fortress dashboard's cyan digital artwork. */
#phaseTwoControls.raider-keypad-dashboard:before,
#phaseTwoControls.raider-keypad-dashboard:after{
  content:"";
  position:absolute;
  z-index:1;
  top:20%;
  bottom:8%;
  width:7%;
  pointer-events:none;
  background:linear-gradient(90deg,#18262d,#66747b 48%,#17242b);
  border:1px solid #71838b;
  box-shadow:inset 0 0 8px #020506;
}
#phaseTwoControls.raider-keypad-dashboard:before{left:1.6%;clip-path:polygon(0 8%,75% 0,100% 5%,100% 95%,75% 100%,0 92%)}
#phaseTwoControls.raider-keypad-dashboard:after{right:1.6%;clip-path:polygon(25% 0,100% 8%,100% 92%,25% 100%,0 95%,0 5%)}
#phaseTwoControls.raider-keypad-dashboard .position-grid.numeric-keypad{z-index:2!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button{
  color:#75eaff!important;
  -webkit-text-fill-color:#75eaff!important;
  font-family:var(--fortress-display-font)!important;
  font-size:clamp(22px,7vw,36px)!important;
  font-weight:950!important;
  line-height:1!important;
  letter-spacing:0!important;
  text-shadow:0 0 4px #bffaff,0 0 10px rgba(28,189,255,.82)!important;
}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button.digit-entered{
  font-size:clamp(22px,7vw,36px)!important;
  filter:none!important;
}

/* Unified Fortress Raider cassette. Digits and glass are baked into one
   production skin. Live HTML supplies only hit areas and cyan selection. */
#phaseTwoControls.raider-keypad-dashboard{
  background-image:url("assets/dashboard-raiders-keypad-fortress-v2.png")!important;
  background-size:calc(100% + 28px) calc(100% + 18px)!important;
  background-position:center!important;
  background-color:#02070b!important;
}
#phaseTwoControls.raider-keypad-dashboard:before,
#phaseTwoControls.raider-keypad-dashboard:after{display:none!important;content:none!important}
#phaseTwoControls.raider-keypad-dashboard .position-grid.numeric-keypad{inset:0!important;width:100%!important;height:100%!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button{
  width:14.2%!important;
  height:14.8%!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:transparent!important;
  -webkit-text-fill-color:transparent!important;
  text-shadow:none!important;
  clip-path:polygon(8% 0,92% 0,100% 14%,100% 86%,92% 100%,8% 100%,0 86%,0 14%)!important;
}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(1),
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(4),
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(7){left:27.3%!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(2),
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(5),
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(8){left:43.45%!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(3),
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(6),
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(9){left:58.2%!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(-n+3){top:23.1%!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(n+4):nth-of-type(-n+6){top:39.7%!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(n+7):nth-of-type(-n+9){top:57.5%!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:nth-of-type(10){left:28.9%!important;top:76.6%!important;width:42.3%!important;height:14.2%!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button.digit-entered{
  color:transparent!important;
  -webkit-text-fill-color:transparent!important;
  border:2px solid #a8f7ff!important;
  background:rgba(27,194,255,.13)!important;
  box-shadow:inset 0 0 15px rgba(35,220,255,.62),0 0 12px rgba(31,203,255,.82)!important;
  outline:0!important;
}

/* Three clear upper-glass readouts: health, first digit, second digit. */
#phaseTwoControls.raider-keypad-dashboard .recall-heading{
  display:block!important;
  position:absolute!important;
  z-index:4!important;
  left:6.2%!important;
  top:8.15%!important;
  width:50.8%!important;
  height:7.1%!important;
  margin:0!important;
  padding:0 2%!important;
  pointer-events:none!important;
}
#phaseTwoControls.raider-keypad-dashboard .recall-heading>.raider-health{
  display:grid!important;
  place-items:center!important;
  width:100%!important;
  height:100%!important;
  padding:0!important;
  border:0!important;
  background:none!important;
  box-shadow:none!important;
}
#phaseTwoControls.raider-keypad-dashboard .raider-health>span{display:none!important}
#phaseTwoControls.raider-keypad-dashboard .raider-health>i{display:block!important;width:94%!important;height:clamp(8px,2.4vw,13px)!important;margin:0!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-code{
  position:absolute!important;
  z-index:4!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  padding:0!important;
  pointer-events:none!important;
}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-code span{
  position:absolute!important;
  top:7.05%!important;
  width:10.1%!important;
  height:9%!important;
  display:grid!important;
  place-items:center!important;
  color:#d9fbff!important;
  font:950 clamp(18px,6vw,31px)/1 var(--fortress-display-font)!important;
  text-shadow:0 0 4px #fff,0 0 10px rgba(33,211,255,.86)!important;
}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-code span:first-child{left:66.35%!important}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-code span:last-child{left:77.6%!important}
.bomb.drone.dive-bombing{transition:transform .1s cubic-bezier(.12,.82,.25,1)!important}

/* One permanent, unlabeled health display in the same glass for both phases. */
#buildControls .panel-health>span,
#phaseTwoControls .raider-health>span{display:none!important}
#buildControls .panel-health,
#phaseTwoControls.raider-keypad-dashboard .recall-heading>.raider-health{
  grid-template-columns:1fr!important;
  grid-template-rows:1fr!important;
  place-items:center!important;
}
#buildControls .panel-health>i,
#phaseTwoControls.raider-keypad-dashboard .raider-health>i{
  width:94%!important;
  height:clamp(6px,1.7vw,11px)!important;
  margin:0!important;
}

/* Cleaned training inset preserves its existing layout without the generated
   white canvas around it. */
#phaseTwoControls.raider-training-dashboard{
  background-image:url("assets/dashboard-raiders-training-inset-v2.png")!important;
}

/* Phase two now keeps the complete Fortress chassis and header pixel-for-pixel.
   Only the lower control cassette changes to the Raider keypad. */
#phaseTwoControls.raider-keypad-dashboard{
  background-image:url("assets/dashboard-raiders-fortress-chassis-v3.png")!important;
}

/* The health readout contains only the bar. Its centerline is identical to the
   adjacent position and card windows in both phases. */
#buildControls.ship-fortress .panel-health>span,
#buildControls.ship-strike .panel-health>span,
#buildControls.ship-interceptor .panel-health>span,
#phaseTwoControls.raider-training-dashboard .raider-health>span,
#phaseTwoControls.raider-keypad-dashboard .raider-health>span,
#phaseTwoControls.raider-keypad-dashboard .raider-readouts .panel-health>span{
  display:none!important;
  visibility:hidden!important;
}
#buildControls.ship-fortress .panel-health,
#phaseTwoControls.raider-keypad-dashboard .raider-readouts .panel-health{
  left:6.2%!important;
  top:7.05%!important;
  width:50.8%!important;
  height:9%!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-rows:1fr!important;
  place-items:center!important;
  padding:0 1.25%!important;
}
#buildControls.ship-fortress .panel-health>i,
#phaseTwoControls.raider-keypad-dashboard .raider-readouts .panel-health>i{
  display:block!important;
  align-self:center!important;
  justify-self:center!important;
  width:94%!important;
  height:clamp(6px,1.7vw,11px)!important;
  margin:0!important;
}

/* The shutter fills the complete inset opening so neither control cassette is
   visible at the midpoint of the swap. The permanent Fortress rim remains. */
.dashboard-cassette-shutter{
  inset:4.6% 4.6% 4.2%!important;
}


/* Raiders dashboard cleanup. Crop the baked light rim at the bitmap edge and
   let the shield readout sit cleanly in the existing black-glass aperture. */
#phaseTwoControls.raider-training-dashboard,
#phaseTwoControls.raider-keypad-dashboard{
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  background-size:calc(100% + 6px) calc(100% + 6px)!important;
  background-position:center!important;
  box-shadow:none!important;
  clip-path:polygon(8% 1.5%,92% 1.5%,99% 10.7%,99% 87.8%,90.8% 97.2%,9.2% 97.2%,1% 87.8%,1% 10.7%)!important;
}
/* The unified Raider bitmap contains a baked white export margin. Keep the
   live dashboard geometry fixed and crop only the painted skin beneath it. */
#phaseTwoControls.raider-keypad-dashboard{
  background-size:calc(100% + 28px) calc(100% + 20px)!important;
  clip-path:polygon(8.2% 2.2%,91.8% 2.2%,98.4% 11%,98.4% 87.4%,90.5% 96.4%,9.5% 96.4%,1.6% 87.4%,1.6% 11%)!important;
}
#phaseTwoControls.raider-training-dashboard .recall-heading,
#phaseTwoControls.raider-training-dashboard .recall-heading>.raider-health,
#phaseTwoControls.raider-training-dashboard .raider-health{
  border:0!important;
  outline:0!important;
  background:transparent!important;
  background-color:transparent!important;
  box-shadow:none!important;
  filter:none!important;
}
#phaseTwoControls .raider-health>i{
  border:0!important;
  outline:0!important;
  border-radius:1px!important;
  background:#020609!important;
  box-shadow:inset 0 2px 5px #000!important;
}

/* Raider upper glass mirrors the Fortress readouts exactly. The left window
   contains only the live integrity bar. The two right windows receive the
   first and second keypad digits at the Fortress position/card coordinates. */
#phaseTwoControls.raider-keypad-dashboard .recall-heading{
  left:6.2%!important;
  top:8.15%!important;
  width:50.8%!important;
  height:7.1%!important;
}
#phaseTwoControls.raider-keypad-dashboard .raider-health>span{
  display:none!important;
}
#phaseTwoControls.raider-keypad-dashboard .raider-health>i{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  width:94%!important;
  height:clamp(6px,1.7vw,11px)!important;
  overflow:hidden!important;
}
#phaseTwoControls.raider-keypad-dashboard .raider-health>i>b{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  height:100%!important;
}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-code span{
  top:7.05%!important;
  width:10.1%!important;
  height:9%!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0!important;
  background:#020d13!important;
  box-shadow:none!important;
  color:#b7f8ff!important;
  -webkit-text-fill-color:#b7f8ff!important;
  font:900 clamp(10px,3.25vw,23px)/1 ui-monospace,monospace!important;
  letter-spacing:normal!important;
  text-shadow:none!important;
  white-space:nowrap!important;
}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-code span:first-child{
  left:66.35%!important;
  width:9.95%!important;
}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-code span:last-child{
  left:77.6%!important;
  width:10.1%!important;
}

/* Phase two now uses the same readout structure and measurements as the
   Fortress dashboard instead of maintaining a separate overlay system. */
#phaseTwoControls.raider-keypad-dashboard{
  background-size:100% 100%!important;
  background-color:#02070b!important;
  background-blend-mode:normal!important;
  clip-path:polygon(8.2% 3.1%,91.8% 3.1%,98.4% 11%,98.4% 87.4%,90.5% 98.5%,9.5% 98.5%,1.6% 87.4%,1.6% 11%)!important;
}
#phaseTwoControls.raider-keypad-dashboard .raider-readouts{
  position:absolute!important;
  z-index:2!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  display:block!important;
  pointer-events:none!important;
}
#phaseTwoControls.raider-keypad-dashboard .raider-readouts .panel-health{
  position:absolute!important;
  left:6.2%!important;
  top:8.15%!important;
  width:50.8%!important;
  height:7.1%!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-rows:1fr!important;
  place-items:center!important;
  padding:0 1.25%!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0!important;
  background:#020d13!important;
  box-shadow:none!important;
}
#phaseTwoControls.raider-keypad-dashboard .raider-readouts .panel-health>span{display:none!important}
#phaseTwoControls.raider-keypad-dashboard .raider-readouts .panel-health>i{
  display:block!important;
  width:94%!important;
  height:clamp(6px,1.7vw,11px)!important;
  margin:0!important;
  overflow:hidden!important;
  border-color:#4f8794!important;
}
#phaseTwoControls.raider-keypad-dashboard .raider-readouts .build-readouts{display:contents!important}
#phaseTwoControls.raider-keypad-dashboard .raider-readouts .target-position,
#phaseTwoControls.raider-keypad-dashboard .raider-readouts .target-card{
  position:absolute!important;
  top:7.05%!important;
  height:9%!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0!important;
  background:#020d13!important;
  box-shadow:none!important;
  color:#b7f8ff!important;
  font:900 clamp(10px,3.25vw,23px)/1 ui-monospace,monospace!important;
  letter-spacing:normal!important;
  text-shadow:none!important;
  white-space:nowrap!important;
}
#phaseTwoControls.raider-keypad-dashboard .raider-readouts .target-position{
  left:66.35%!important;
  width:9.95%!important;
}
#phaseTwoControls.raider-keypad-dashboard .raider-readouts .target-card{
  left:77.6%!important;
  width:10.1%!important;
}

/* Dashboard-mounted defense system. The old deck turrets are retired; these
   two mounts stay visually attached to the control cassette. */
.dashboard-turret-mount img{
  transform-origin:50% 62%!important;
  transition:transform .08s linear,filter .16s ease!important;
}
.dashboard-transition.deployed .dashboard-turret-mount{
  filter:brightness(1.08) drop-shadow(0 8px 10px rgba(0,0,0,.95))!important;
}
.dashboard-transition.deployed .dashboard-turret-mount img{
  animation:none;
}
.dashboard-transition.deployed .dashboard-turret-mount.firing img{
  filter:brightness(1.32) drop-shadow(0 3px 5px rgba(0,0,0,.9))!important;
}
.ground-laser.dashboard-twin-beam{
  height:1.5px!important;
  border-radius:2px!important;
  background:linear-gradient(90deg,#dcffe5 0,#55ff82 42%,#12ef55 78%,#dfffe7 100%)!important;
  box-shadow:0 0 2px 1px #fff,0 0 6px 2px #22ff63,0 0 11px 3px rgba(16,255,82,.45)!important;
}
.ground-laser.dashboard-twin-beam:after{display:none!important;content:none!important}
.ground-muzzle.dashboard-muzzle{
  width:8px!important;
  height:8px!important;
  box-shadow:0 0 4px 2px #fff,0 0 9px 4px #28ff68!important;
}

/* One permanent dashboard chassis. Fortress establishes the exterior size,
   bevel, corner cuts, and transition footprint. Ship and Raider artwork is
   treated only as an inset beneath this shared perimeter. */
#buildControls.ship-fortress,
#buildControls.ship-strike,
#buildControls.ship-interceptor,
#phaseTwoControls.raider-training-dashboard,
#phaseTwoControls.raider-keypad-dashboard{
  box-sizing:border-box!important;
  width:100%!important;
  height:clamp(220px,33dvh,315px)!important;
  min-height:clamp(220px,33dvh,315px)!important;
  max-height:315px!important;
  flex:0 0 clamp(220px,33dvh,315px)!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  background-position:center!important;
  background-size:100% 100%!important;
  background-repeat:no-repeat!important;
  box-shadow:none!important;
  clip-path:polygon(5% 2.4%,95% 2.4%,98.4% 12.8%,100% 50%,98.4% 87.2%,94.5% 98.4%,5.5% 98.4%,1.6% 87.2%,0 50%,1.6% 12.8%)!important;
  overflow:hidden!important;
  isolation:isolate!important;
}

/* The transparent center leaves every current control inset and live hit area
   exactly where it already is while one Fortress frame owns the perimeter. */
#buildControls.ship-fortress::after,
#buildControls.ship-strike::after,
#buildControls.ship-interceptor::after,
#phaseTwoControls.raider-training-dashboard::after,
#phaseTwoControls.raider-keypad-dashboard::after{
  content:""!important;
  display:block!important;
  position:absolute!important;
  z-index:9!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  opacity:1!important;
  visibility:visible!important;
  pointer-events:none!important;
  background:url("assets/dashboard-fortress-master-frame-v1.png") center/100% 100% no-repeat!important;
}

/* Baffles use the same fixed chassis footprint for every ship and phase. */
.dashboard-transition{
  box-sizing:border-box!important;
  width:100%!important;
  height:clamp(220px,33dvh,315px)!important;
  max-height:315px!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  margin:0!important;
}

/* One physical dashboard remains mounted for the entire game. The build and
   Raider interfaces are now internal cassettes and cannot alter its bounds. */
.dashboard-chassis{
  position:relative;
  z-index:8;
  box-sizing:border-box;
  width:100%;
  height:clamp(220px,33dvh,315px);
  min-height:clamp(220px,33dvh,315px);
  max-height:315px;
  margin:0;
  padding:0;
  flex:none;
  overflow:hidden;
  isolation:isolate;
  background:#02080d;
  clip-path:polygon(5% 2.4%,95% 2.4%,98.4% 12.8%,100% 50%,98.4% 87.2%,94.5% 98.4%,5.5% 98.4%,1.6% 87.2%,0 50%,1.6% 12.8%);
}
.dashboard-chassis::after{
  content:"";
  position:absolute;
  z-index:20;
  inset:0;
  pointer-events:none;
  background:url("assets/dashboard-fortress-master-frame-v1.png") center/100% 100% no-repeat;
}
.dashboard-chassis>.dashboard-inset{
  position:absolute!important;
  z-index:1!important;
  inset:0!important;
  box-sizing:border-box!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  flex:none!important;
  clip-path:none!important;
  overflow:hidden!important;
}
.dashboard-chassis>#buildControls::after,
.dashboard-chassis>#phaseTwoControls::after{
  display:none!important;
  content:none!important;
}

/* Interceptor still uses the shared header overlay. Strike owns a complete
   flattened dashboard and must not receive any legacy skin above it. */
.dashboard-chassis>#buildControls.ship-interceptor::before{
  content:""!important;
  display:block!important;
  position:absolute!important;
  z-index:8!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  pointer-events:none!important;
  background:url("assets/dashboard-fortress-header-overlay-v1.png") center/100% 100% no-repeat!important;
}
#buildControls.ship-strike .build-hint,
#buildControls.ship-interceptor .build-hint{
  position:absolute!important;
  z-index:10!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  pointer-events:none!important;
}
#buildControls.ship-strike .panel-health,
#buildControls.ship-interceptor .panel-health{
  position:absolute!important;
  left:6.2%!important;
  top:7.05%!important;
  width:50.8%!important;
  height:9%!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-rows:1fr!important;
  place-items:center!important;
  padding:0 1.25%!important;
  border:0!important;
  background:#020d13!important;
  box-shadow:none!important;
}
#buildControls.ship-strike .panel-health>i,
#buildControls.ship-interceptor .panel-health>i{
  align-self:center!important;
  justify-self:center!important;
  width:94%!important;
  height:clamp(6px,1.7vw,11px)!important;
  margin:0!important;
}
#buildControls.ship-strike .build-hint .target-position,
#buildControls.ship-strike .build-hint .target-card,
#buildControls.ship-interceptor .build-hint .target-position,
#buildControls.ship-interceptor .build-hint .target-card{
  position:absolute!important;
  top:7.05%!important;
  height:9%!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0!important;
  background:#020d13!important;
  box-shadow:none!important;
  color:#b7f8ff!important;
  font:900 clamp(10px,3.25vw,23px)/1 ui-monospace,monospace!important;
  letter-spacing:normal!important;
  text-shadow:none!important;
}
#buildControls.ship-strike .build-hint .target-position,
#buildControls.ship-interceptor .build-hint .target-position{left:66.35%!important;width:9.95%!important}
#buildControls.ship-strike .build-hint .target-card,
#buildControls.ship-interceptor .build-hint .target-card{left:77.6%!important;width:10.1%!important}

/* Every ship uses the Fortress selection behavior. The dashboard artwork
   permanently supplies each rank glyph; the live control is only a clear hit
   area whose glass outline illuminates when selected. */
#buildControls.ship-fortress .rank-button,
#buildControls.ship-strike .rank-button,
#buildControls.ship-interceptor .rank-button,
#buildControls.ship-fortress .rank-button.selected,
#buildControls.ship-strike .rank-button.selected,
#buildControls.ship-interceptor .rank-button.selected{
  color:transparent!important;
  -webkit-text-fill-color:transparent!important;
  text-shadow:none!important;
  font-size:0!important;
  transform:none!important;
}
#buildControls.ship-fortress .rank-button>span,
#buildControls.ship-strike .rank-button>span,
#buildControls.ship-interceptor .rank-button>span{
  display:none!important;
  opacity:0!important;
  visibility:hidden!important;
  font-size:0!important;
  text-shadow:none!important;
}
#buildControls.ship-fortress .rank-button::before,
#buildControls.ship-fortress .rank-button::after,
#buildControls.ship-strike .rank-button::before,
#buildControls.ship-strike .rank-button::after,
#buildControls.ship-interceptor .rank-button::before,
#buildControls.ship-interceptor .rank-button::after{
  content:none!important;
  display:none!important;
}
#buildControls.ship-fortress .rank-button.selected,
#buildControls.ship-strike .rank-button.selected,
#buildControls.ship-interceptor .rank-button.selected{
  background:rgba(40,210,255,.2)!important;
  box-shadow:inset 0 0 0 2px #c8faff,inset 0 0 14px #21d6ff,0 0 9px #18c8ff!important;
  filter:none!important;
}

/* Raider keypad numerals are permanently baked into the dashboard artwork.
   Live buttons are empty hit areas; entered digits illuminate only the glass
   perimeter and can never render a duplicate glowing numeral. */
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button,
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button:active,
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button.digit-entered{
  color:transparent!important;
  -webkit-text-fill-color:transparent!important;
  font-size:0!important;
  text-shadow:none!important;
  background:transparent!important;
  background-image:none!important;
  filter:none!important;
}
#phaseTwoControls.raider-keypad-dashboard .numeric-keypad .position-button.digit-entered{
  border:2px solid #70efff!important;
  outline:0!important;
  box-shadow:inset 0 0 0 1px rgba(200,250,255,.55),0 0 8px rgba(24,200,255,.82)!important;
}

/* Story briefings are true interstitial pages. The opaque field deliberately
   hides the battlefield and control deck until the player continues. */
.briefing-overlay{
  position:fixed;
  inset:0;
  z-index:9000;
  display:grid;
  place-items:center;
  box-sizing:border-box;
  padding:max(18px,env(safe-area-inset-top)) 12px max(18px,env(safe-area-inset-bottom));
  overflow:auto;
  background:
    radial-gradient(circle at 50% 45%,rgba(20,87,109,.22) 0,rgba(4,19,31,.72) 34%,rgba(1,7,14,.98) 72%),
    linear-gradient(180deg,#061322 0,#020914 100%);
  pointer-events:auto;
  isolation:isolate;
}
.briefing-overlay::before{
  content:'';
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  opacity:.48;
  background-image:
    radial-gradient(circle,#39bfe0 0 1px,transparent 1.4px),
    radial-gradient(circle,#677f91 0 1px,transparent 1.5px);
  background-position:17px 23px,73px 91px;
  background-size:127px 139px,181px 193px;
}
.briefing-overlay.enemy-brief{
  background:
    radial-gradient(circle at 50% 45%,rgba(118,37,18,.2) 0,rgba(4,19,31,.76) 36%,rgba(1,7,14,.98) 72%),
    linear-gradient(180deg,#061322 0,#020914 100%);
}
.briefing-overlay.hidden{display:none!important}
.briefing-plaque{
  position:relative;
  width:min(780px,96vw);
  min-height:clamp(320px,46vw,380px);
  box-sizing:border-box;
  padding:clamp(55px,8vw,78px) clamp(42px,9vw,92px) clamp(45px,7vw,66px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#eafcff;
  /* The source artwork has transparent space above and below the metal.
     Enlarging it vertically makes the visible frame—and its glass opening—
     match this element's real content box. */
  background:url('./assets/mission-briefing-plaque-v1.png') center/100% 148% no-repeat;
  filter:drop-shadow(0 10px 18px rgba(0,0,0,.78));
  pointer-events:auto;
  animation:briefing-arrival .34s cubic-bezier(.16,.9,.24,1) both;
}
.briefing-eyebrow{
  margin:0 0 12px;
  transform:translateY(-6px);
  max-width:100%;
  color:#62eaff;
  font:900 clamp(9px,1.8vw,13px)/1.05 ui-monospace,monospace;
  letter-spacing:.14em;
  white-space:normal;
}
.briefing-plaque h2{
  width:100%;
  margin:0 0 8px;
  font:1000 clamp(21px,4.8vw,38px)/.95 ui-monospace,monospace;
  letter-spacing:.02em;
  overflow-wrap:anywhere;
  text-shadow:0 0 12px rgba(54,220,255,.38);
}
.enemy-brief .briefing-plaque h2,
.enemy-brief .briefing-copy strong{color:#ff754d;text-shadow:0 0 12px rgba(255,64,20,.55)}
.enemy-brief .briefing-plaque h2{font-size:clamp(20px,4.7vw,36px);line-height:.96;text-wrap:balance}
.briefing-copy{display:grid;gap:5px;width:100%;max-width:100%;min-width:0}
.briefing-copy strong{
  font:1000 clamp(12px,2.7vw,19px)/1.08 ui-monospace,monospace;
  letter-spacing:.025em;
  overflow-wrap:anywhere;
}
.briefing-copy span{
  font:800 clamp(10px,2.2vw,15px)/1.2 ui-monospace,monospace;
  color:#d2dde0;
  overflow-wrap:anywhere;
}
.briefing-copy b{
  color:#70efff;
  font:1000 clamp(10px,2.3vw,16px)/1.08 ui-monospace,monospace;
  letter-spacing:.07em;
  overflow-wrap:anywhere;
}
.briefing-plaque button{
  width:min(82%,380px);
  max-width:100%;
  min-height:44px;
  margin-top:11px;
  padding:9px 16px;
  border:2px solid #8cf4ff;
  border-radius:5px;
  background:linear-gradient(180deg,#1d5b70 0,#082630 55%,#04151b 100%);
  color:#fff;
  box-shadow:inset 0 0 12px rgba(80,230,255,.36),0 0 10px rgba(27,198,255,.58);
  font:1000 clamp(11px,2.4vw,16px)/1 ui-monospace,monospace;
  letter-spacing:.065em;
  white-space:normal;
  cursor:pointer;
  animation:briefing-action-pulse 1.25s ease-in-out infinite;
}
.briefing-plaque button::after{content:'  ▶';color:#8cf4ff}
.briefing-plaque button:active{transform:translateY(1px);filter:brightness(1.3)}
@keyframes briefing-arrival{from{opacity:0;transform:translateY(-18px) scale(.96)}to{opacity:1;transform:none}}
@keyframes briefing-action-pulse{50%{border-color:#d9fdff;box-shadow:inset 0 0 15px rgba(110,240,255,.5),0 0 17px rgba(27,198,255,.82)}}
@media(max-height:560px){
  .briefing-plaque{width:min(680px,94vw);min-height:320px;padding-top:62px;padding-bottom:52px}
}

/* Custom stack rapid-entry console. It uses the established Fortress control
   language while keeping all 52 completed cards visible above the controls. */
#customStackBuilder{align-items:flex-start!important;overflow-y:auto!important;padding:12px 8px max(18px,env(safe-area-inset-bottom))!important}
#customStackBuilder .custom-builder-card{position:relative;width:min(620px,98vw)!important;max-width:620px!important;margin:auto!important;padding:18px clamp(12px,3vw,22px)!important}
.custom-deck-grid-wrap{width:100%;padding:8px;border:2px solid #58707c;border-radius:8px;background:linear-gradient(180deg,#1d3039,#03080c 14%,#07131a 86%,#223943);box-shadow:inset 0 0 18px #000,0 0 0 2px #101c22;overflow:hidden}
.custom-deck-grid{display:grid;grid-template-columns:repeat(13,minmax(0,1fr));gap:3px;width:100%}
.custom-deck-slot,.custom-deck-card{position:relative;display:grid;place-items:center;min-width:0;height:39px;padding:1px;border:1px solid #38505e;border-radius:3px;background:#03090d;color:#3d5968;box-shadow:inset 0 0 5px #000;font-family:ui-monospace,monospace}
.custom-deck-slot small,.custom-deck-card small{position:absolute;top:2px;left:3px;font-size:5px;line-height:1;color:#607b8a}
.custom-deck-card{border-color:#b9d4df;background:linear-gradient(145deg,#f3f8fa,#b8c8d0);color:#0c1820;cursor:pointer}
.custom-deck-card b{font-size:clamp(8px,2.1vw,12px);line-height:1}.custom-deck-card.red b{color:#bd1742}
.custom-card-arriving{animation:custom-card-lock-in .18s cubic-bezier(.2,.9,.3,1) both}
@keyframes custom-card-lock-in{from{opacity:.25;transform:translateY(58px) scale(1.7);filter:drop-shadow(0 0 10px #43e9ff)}to{opacity:1;transform:none;filter:none}}
.custom-active-card-wrap{display:grid;grid-template-columns:82px 1fr;align-items:center;gap:15px;width:min(420px,100%);margin:12px auto 8px}
.custom-active-card{position:relative;width:82px;height:94px;display:grid;place-items:center;border:2px solid #6eeeff;border-radius:8px;background:linear-gradient(145deg,#eff9fc,#a9c5d4);color:#0b1821;box-shadow:0 0 13px rgba(47,221,255,.64),inset 0 0 10px rgba(21,65,86,.3);font:1000 32px ui-monospace,monospace}
.custom-active-card small{position:absolute;left:7px;top:6px;color:#39596a;font:900 10px ui-monospace,monospace}.custom-active-card.rank-selected span{color:#087da4;text-shadow:0 0 6px rgba(43,220,255,.35)}
.custom-entry-heading{text-align:left}.custom-entry-heading strong{display:block;color:#eefcff;font:1000 clamp(18px,5vw,27px)/1 ui-monospace,monospace;letter-spacing:.035em;text-shadow:0 0 9px rgba(42,219,255,.7)}.custom-entry-heading b{display:block;margin-top:7px;color:#62eaff;font:900 9px ui-monospace,monospace;letter-spacing:.1em}
.custom-fortress-dashboard{position:relative!important;grid-template-columns:30px 1fr!important;gap:8px!important;margin-top:0!important;padding:12px!important;border:3px solid #6e7f86!important;border-radius:10px!important;background:linear-gradient(145deg,#27383f,#080d11 12%,#121b20 88%,#34474f)!important;box-shadow:inset 0 0 0 3px #10191e,inset 0 0 22px #000,0 5px 12px #000!important}
.custom-fortress-dashboard .custom-rank-row{display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:5px!important;padding:7px!important}
.custom-fortress-dashboard .custom-rank-row .rank-button{grid-column:span 4;height:42px!important;min-width:0!important;font-size:16px!important}
.custom-fortress-dashboard .custom-rank-row .rank-button:nth-child(n+10){grid-column:span 3}
.custom-fortress-dashboard .custom-suit-row{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;padding:7px!important}
.custom-fortress-dashboard .custom-suit-row .suit-button{height:50px!important;min-width:0!important}.custom-fortress-dashboard .custom-suit-row .suit-button span{font-size:25px!important}.custom-fortress-dashboard .custom-suit-row .suit-button small{display:none!important}
.custom-duplicate-alert{position:absolute;inset:0;z-index:20;display:grid;place-items:center;padding:18px;background:rgba(1,6,11,.9);backdrop-filter:blur(3px)}
.custom-duplicate-alert>div{width:min(410px,94%);padding:24px 18px;border:3px solid #a55c28;border-radius:10px;background:linear-gradient(160deg,#35160c,#090d12 42%,#111a20);box-shadow:inset 0 0 22px #000,0 0 24px rgba(255,91,26,.45);text-align:center}
.custom-duplicate-alert small{color:#ff8b48;font:1000 9px ui-monospace,monospace;letter-spacing:.14em}.custom-duplicate-alert h3{margin:11px 0 6px;color:#fff;font:1000 clamp(17px,4.7vw,24px) ui-monospace,monospace}.custom-duplicate-alert p{margin:0 0 16px!important;color:#bdcbd2!important;font:800 11px ui-monospace,monospace!important}.custom-duplicate-alert button{width:100%;min-height:43px;margin-top:7px;border:1px solid #6d8895;background:linear-gradient(#233a46,#09141a);color:#ddfaff;font:1000 10px ui-monospace,monospace;letter-spacing:.05em}.custom-duplicate-alert button:first-of-type{border-color:#e37835;color:#ffc19b}
@media(max-width:430px){.custom-deck-grid{gap:2px}.custom-deck-slot,.custom-deck-card{height:34px}.custom-deck-card b{font-size:8px}.custom-active-card-wrap{grid-template-columns:70px 1fr}.custom-active-card{width:70px;height:82px}.custom-fortress-dashboard{padding:8px!important}.custom-fortress-dashboard .custom-rank-row .rank-button{height:38px!important}.custom-fortress-dashboard .custom-suit-row .suit-button{height:44px!important}}

/* Permanent rendered turret sockets stay mounted through both phases. Only
   the weapon rises; the base never appears, opens, or changes shape. */
.dashboard-transition.parked .dashboard-turret-mount,
.dashboard-transition.fast-scan.transitioning .dashboard-turret-mount,
.dashboard-transition.deployed .dashboard-turret-mount{
  transform:none!important;
  filter:drop-shadow(0 7px 8px rgba(0,0,0,.92))!important;
  opacity:1!important;
}
.dashboard-turret-mount .turret-hardware,
.dashboard-transition.parked .turret-hardware,
.dashboard-transition.fast-scan.transitioning .turret-hardware,
.dashboard-transition.deployed .turret-hardware{
  position:absolute!important;
  z-index:1!important;
  left:50%!important;
  bottom:-25%!important;
  width:132%!important;
  height:auto!important;
  opacity:1!important;
  transform:translateX(-50%) translateY(8%) scale(1)!important;
  animation:none!important;
  filter:brightness(.83) saturate(.82) drop-shadow(0 5px 6px #000)!important;
}
.dashboard-transition.parked .turret-weapon{
  opacity:0!important;
  transform:translateY(48%) scale(.78)!important;
  filter:brightness(.55)!important;
}
.dashboard-transition.fast-scan.transitioning .turret-weapon{animation:turret-rise-during-scan .85s cubic-bezier(.16,.78,.18,1) .55s both!important}
.dashboard-transition.deployed .turret-weapon{opacity:1}
@keyframes turret-rise-from-socket{
  0%,16%{opacity:0;transform:translateY(48%) scale(.78);filter:brightness(.52)}
  58%{opacity:1;transform:translateY(0) scale(1);filter:brightness(.92)}
  76%{transform:translateY(-3%) scale(1.025);filter:brightness(1.26) drop-shadow(0 0 5px rgba(45,220,255,.48))}
  100%{opacity:1;transform:translateY(0) scale(1);filter:brightness(1.08)}
}

/* Rendered power harnesses connect first, carry a visible green charge into
   the permanent sockets, and only then allow the weapons to rise. */
.dashboard-turret-mount .turret-cable{
  position:absolute!important;
  z-index:0!important;
  bottom:-52%!important;
  width:190%!important;
  height:auto!important;
  object-fit:contain!important;
  transform-origin:50% 50%!important;
  transition:none!important;
}
.dashboard-turret-mount.left .turret-cable{right:42%!important}
.dashboard-turret-mount.right .turret-cable{left:42%!important;transform:scaleX(-1)!important}
.dashboard-turret-mount .cable-dormant{filter:grayscale(.78) brightness(.42) contrast(1.15)!important;opacity:0}
.dashboard-turret-mount .cable-energy{filter:brightness(1.08) drop-shadow(0 0 5px rgba(36,255,74,.72))!important;opacity:0}
.dashboard-transition.fast-scan.transitioning .left .cable-dormant{animation:cable-connect-left-after-scan .55s cubic-bezier(.18,.72,.2,1) 2.03s both!important}
.dashboard-transition.fast-scan.transitioning .right .cable-dormant{animation:cable-connect-right-after-scan .55s cubic-bezier(.18,.72,.2,1) 2.03s both!important}
.dashboard-transition.fast-scan.transitioning .left .cable-energy{animation:cable-charge-left-after-connect .55s ease-out 2.58s both!important}
.dashboard-transition.fast-scan.transitioning .right .cable-energy{animation:cable-charge-right-after-connect .55s ease-out 2.58s both!important}
.dashboard-transition.deployed .cable-dormant{opacity:.82}
.dashboard-transition.deployed .cable-energy{opacity:1;clip-path:inset(0)!important}
.dashboard-transition.deployed .right .turret-cable{transform:scaleX(-1)!important}
.dashboard-transition.fast-scan.transitioning .turret-hardware{animation:socket-energy-after-connect .55s ease 2.58s both!important}
@keyframes turret-rise-during-scan{0%{opacity:0;transform:translateY(48%) scale(.78);filter:brightness(.52)}76%{opacity:1;transform:translateY(-3%) scale(1.025);filter:brightness(1.22)}100%{opacity:1;transform:none;filter:brightness(1.08)}}
@keyframes turret-rise-after-scan{0%{opacity:0;transform:translateY(48%) scale(.78);filter:brightness(.52)}76%{opacity:1;transform:translateY(-3%) scale(1.025);filter:brightness(1.22)}100%{opacity:1;transform:none;filter:brightness(1.08)}}
@keyframes cable-connect-left-after-scan{0%{opacity:0;transform:translate(-38%,38%) scale(.86)}82%{opacity:.82;transform:translate(-3%,4%) scale(1.01)}100%{opacity:.82;transform:none}}
@keyframes cable-connect-right-after-scan{0%{opacity:0;transform:translate(38%,38%) scaleX(-1) scale(.86)}82%{opacity:.82;transform:translate(3%,4%) scaleX(-1) scale(1.01)}100%{opacity:.82;transform:scaleX(-1)}}
@keyframes cable-charge-left-after-connect{0%{opacity:0;clip-path:inset(0 100% 0 0)}8%{opacity:1}100%{opacity:1;clip-path:inset(0)}}
@keyframes cable-charge-right-after-connect{0%{opacity:0;transform:scaleX(-1);clip-path:inset(0 100% 0 0)}8%{opacity:1}100%{opacity:1;transform:scaleX(-1);clip-path:inset(0)}}
@keyframes socket-energy-after-connect{0%{transform:translateX(-50%) translateY(8%) scale(1);filter:brightness(.83) saturate(.82)}74%{transform:translateX(-50%) translateY(8%) scale(1.045);filter:brightness(1.4) saturate(1.25) drop-shadow(0 0 10px rgba(34,255,76,.88))}100%{transform:translateX(-50%) translateY(8%) scale(1);filter:brightness(.98) saturate(.94)}}
@keyframes cable-connect-left{
  0%,36%{opacity:0;transform:translate(-38%,38%) scale(.86)}
  64%{opacity:.82;transform:translate(-3%,4%) scale(1.01)}
  72%,100%{opacity:.82;transform:none}
}
@keyframes cable-connect-right{
  0%,36%{opacity:0;transform:translate(38%,38%) scaleX(-1) scale(.86)}
  64%{opacity:.82;transform:translate(3%,4%) scaleX(-1) scale(1.01)}
  72%,100%{opacity:.82;transform:scaleX(-1)}
}
@keyframes cable-charge-left{
  0%,68%{opacity:0;transform:none;clip-path:inset(0 100% 0 0)}
  70%{opacity:1}
  94%,100%{opacity:1;transform:none;clip-path:inset(0)}
}
@keyframes cable-charge-right{
  0%,68%{opacity:0;transform:scaleX(-1);clip-path:inset(0 100% 0 0)}
  70%{opacity:1}
  94%,100%{opacity:1;transform:scaleX(-1);clip-path:inset(0)}
}
@keyframes socket-energy-pulse{
  0%,82%{transform:translateX(-50%) translateY(8%) scale(1);filter:brightness(.83) saturate(.82) drop-shadow(0 5px 6px #000)}
  94%{transform:translateX(-50%) translateY(8%) scale(1.045);filter:brightness(1.4) saturate(1.25) drop-shadow(0 0 10px rgba(34,255,76,.88))}
  100%{transform:translateX(-50%) translateY(8%) scale(1);filter:brightness(.98) saturate(.94) drop-shadow(0 6px 7px #000)}
}
@keyframes turret-rise-from-socket{
  0%,5%{opacity:0;transform:translateY(48%) scale(.78);filter:brightness(.52)}
  31%{opacity:1;transform:translateY(0) scale(1);filter:brightness(.96)}
  40%{transform:translateY(-3%) scale(1.025);filter:brightness(1.22) drop-shadow(0 0 5px rgba(45,220,255,.4))}
  48%,100%{opacity:1;transform:translateY(0) scale(1);filter:brightness(1.08)}
}

/* The custom-stack console uses the Fortress dashboard's actual control
   geometry: the 13 values occupy the left bay and the four suits occupy the
   separate 2x2 bay on the right. */
#customStackBuilder .custom-fortress-dashboard{
  display:grid!important;
  grid-template-columns:minmax(0,3fr) minmax(118px,2fr)!important;
  grid-template-rows:1fr!important;
  align-items:stretch!important;
  gap:10px!important;
  min-height:224px!important;
  padding:13px!important;
  overflow:hidden!important;
  background:
    linear-gradient(90deg,transparent 0 59.2%,#080d10 59.2% 60.4%,#4d6069 60.4% 61%,transparent 61%),
    linear-gradient(145deg,#35474e,#11181c 10%,#1b262b 88%,#3d5058)!important;
}
#customStackBuilder .custom-fortress-dashboard::before{
  content:'';
  position:absolute;
  inset:6px;
  z-index:0;
  border:2px solid #10191d;
  border-radius:7px;
  box-shadow:inset 0 0 18px #000;
  pointer-events:none;
}
#customStackBuilder .custom-fortress-dashboard .custom-control-label{display:none!important}
#customStackBuilder .custom-fortress-dashboard .custom-rank-row{
  position:relative;
  z-index:1;
  grid-column:1!important;
  grid-row:1!important;
  align-content:stretch!important;
  height:100%!important;
  margin:0!important;
}
#customStackBuilder .custom-fortress-dashboard .custom-suit-row{
  position:relative;
  z-index:1;
  grid-column:2!important;
  grid-row:1!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-rows:repeat(2,minmax(0,1fr))!important;
  align-content:stretch!important;
  height:100%!important;
  margin:0!important;
}
#customStackBuilder .custom-fortress-dashboard .custom-rank-row .rank-button{height:auto!important;min-height:40px!important}
#customStackBuilder .custom-fortress-dashboard .custom-suit-row .suit-button{width:100%!important;height:auto!important;min-height:82px!important;background-size:100% 100%!important}
#customStackBuilder .custom-fortress-dashboard .custom-suit-row .suit-button span{font-size:clamp(25px,7vw,38px)!important}
@media(max-width:430px){
  #customStackBuilder .custom-fortress-dashboard{grid-template-columns:minmax(0,3fr) minmax(106px,2fr)!important;gap:7px!important;min-height:205px!important;padding:9px!important}
  #customStackBuilder .custom-fortress-dashboard .custom-suit-row .suit-button{min-height:75px!important}
}

/* Phase-one release controls: install, offline update, and player-data
   portability. These remain separate from gameplay and scoring. */
.player-tools-button{position:fixed;z-index:8;left:max(12px,env(safe-area-inset-left));bottom:max(12px,env(safe-area-inset-bottom));min-width:116px;height:36px;padding:0 12px;border:1px solid #477f8d;border-radius:5px;background:linear-gradient(180deg,#3d5963,#0a2029 55%,#061116);box-shadow:inset 0 1px rgba(255,255,255,.25),inset 0 -2px 3px #000,0 0 8px rgba(38,198,231,.28);color:#dffbff;font:900 9px/1 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.06em}
.release-tools{position:fixed;inset:0;z-index:9500;display:grid;place-items:center;padding:max(16px,env(safe-area-inset-top)) 12px max(16px,env(safe-area-inset-bottom));overflow:auto;background:radial-gradient(circle at 50% 35%,rgba(18,78,99,.24),rgba(1,6,11,.96) 65%);backdrop-filter:blur(7px)}
.release-tools-card{position:relative;width:min(540px,96vw);padding:70px clamp(38px,9vw,68px) 72px;text-align:center;background:transparent url('assets/menu-command-frame-v1.png') center/100% 100% no-repeat;filter:drop-shadow(0 10px 22px #000)}
.release-tools-card>p{margin:0 0 8px;color:#61e9ff;font:900 9px ui-monospace,monospace;letter-spacing:.13em}.release-tools-card h2{margin:0 0 15px;color:#f1fdff;font:1000 clamp(20px,5vw,29px)/1 ui-monospace,monospace;text-shadow:0 0 10px rgba(56,220,255,.72)}
.release-install-status{min-height:44px;display:grid;place-items:center;margin-bottom:10px;padding:9px 12px;border:1px solid #385d6c;background:rgba(2,10,15,.82);color:#bcd3dc;font:800 10px/1.35 ui-monospace,monospace}
.release-tools-card button,.release-data-actions label{min-height:43px;display:grid;place-items:center;padding:9px 12px;border:1px solid #557b89;border-radius:4px;background:linear-gradient(180deg,#29424d,#09171d 62%,#040b0e);color:#e1fbff;font:1000 9px/1.15 ui-monospace,monospace;letter-spacing:.055em;cursor:pointer}.release-tools-card button:active,.release-data-actions label:active{filter:brightness(1.35)}.release-tools-card button:disabled{opacity:.58;cursor:default}
.release-tools-card .release-primary{width:100%;border-color:#62eaff;box-shadow:inset 0 0 12px rgba(44,219,255,.24),0 0 9px rgba(44,219,255,.3);color:#fff}
.release-data-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.release-data-actions input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.release-tools-card>small{display:block;margin:11px 2px;color:#7f9aa6;font:750 8px/1.35 ui-monospace,monospace}.release-tools-card .release-close{width:100%;margin-top:8px;color:#9fb7c1}
.app-update{position:fixed;inset:0;z-index:9600;display:grid;place-items:center;padding:18px;background:rgba(1,5,9,.78);backdrop-filter:blur(5px)}.app-update>div{width:min(390px,94vw);padding:24px 20px;border:2px solid #6e828a;clip-path:polygon(16px 0,calc(100% - 16px) 0,100% 16px,100% calc(100% - 16px),calc(100% - 16px) 100%,16px 100%,0 calc(100% - 16px),0 16px);background:linear-gradient(145deg,#5a676c,#0b171c 9%,#03090c 90%,#647279);box-shadow:inset 0 0 22px #000,0 0 20px rgba(40,218,255,.3);text-align:center}.app-update small,.app-update strong,.app-update span{display:block}.app-update small{color:#61eaff;font:900 8px ui-monospace,monospace;letter-spacing:.12em}.app-update strong{margin:8px 0;color:#fff;font:1000 22px ui-monospace,monospace}.app-update span{margin-bottom:15px;color:#a9c0ca;font:800 10px ui-monospace,monospace}.app-update button{width:100%;min-height:42px;margin-top:7px;border:1px solid #5f8794;background:linear-gradient(#28434e,#071319);color:#e5fcff;font:1000 10px ui-monospace,monospace}.app-update #installUpdateButton{border-color:#59e6ff;box-shadow:0 0 9px rgba(48,218,255,.32)}
@media(max-width:430px){.release-tools-card{padding:62px 32px 66px}.release-data-actions{grid-template-columns:1fr}.player-tools-button{min-width:105px;font-size:8px}}

/* The active numbered card and the dashboard make the entry sequence
   self-explanatory; remove the redundant floating console copy. */
#customStackBuilder .custom-builder-card>.eyebrow,
#customStackBuilder .custom-builder-card>h2,
#customStackBuilder .custom-builder-card>p,
#customStackBuilder .custom-entry-heading,
#customStackBuilder .custom-progress>span{display:none!important}
#customStackBuilder .custom-builder-card{
  margin-top:0!important;
  margin-bottom:0!important;
  padding-top:clamp(74px,12vw,94px)!important;
  padding-bottom:clamp(68px,11vw,88px)!important;
}
#customStackBuilder .custom-active-card-wrap{display:flex!important;justify-content:center!important;margin-top:12px!important}
#customStackBuilder .custom-progress{grid-template-columns:1fr!important;margin-left:0!important;margin-right:0!important}
#customStackBuilder .custom-builder-actions button{
  overflow:hidden!important;
  background-size:104% 112%!important;
  clip-path:polygon(8% 2%,92% 2%,99% 17%,99% 83%,92% 98%,8% 98%,1% 83%,1% 17%)!important;
}
#customStackBuilder .custom-fortress-dashboard .custom-rank-row .rank-button{
  overflow:hidden!important;
  background-size:104% 112%!important;
  clip-path:polygon(8% 2%,92% 2%,99% 17%,99% 83%,92% 98%,8% 98%,1% 83%,1% 17%)!important;
}
