html {
  -webkit-text-size-adjust: 100%;
  background: #020403;
}

/* Neon Siege interaction and tower identity pass */
.tower-actions .top-move {
  background: transparent;
  color: var(--g);
}
.tower-actions .top-move.moving {
  background: #eaff65;
  border-color: #eaff65;
  box-shadow: 0 0 14px #eaff6580;
  color: #111600;
}
.command-sell {
  background: #130507;
  border: 1px solid #59262b;
  color: #76565a;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  margin: 7px 0 0;
  min-height: 40px;
  padding: 9px;
  width: 100%;
}
.command-sell:disabled {
  cursor: not-allowed;
  filter: blur(0.7px);
  opacity: 0.35;
}
.command-sell.selected {
  background: #e52f3f;
  border-color: #ff7580;
  box-shadow:
    inset 3px 0 #fff,
    0 0 16px #ff4a5575;
  color: #fff;
  filter: none;
  opacity: 1;
  text-shadow: 0 1px #7d0710;
}
header > div:first-child {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
}
.version-badge {
  color: #90b89b;
  font:
    700 8px/1 Consolas,
    monospace;
  letter-spacing: 0.08em;
  margin-left: 7px;
  vertical-align: middle;
}
.about-button {
  background: transparent;
  border: 1px solid #214b31;
  color: #75aa86;
  cursor: pointer;
  font-size: 7px;
  letter-spacing: 0.12em;
  margin-top: 4px;
  min-height: 17px;
  padding: 2px 6px;
}
.about-button:hover {
  border-color: var(--g);
  color: var(--g);
}
.about-overlay {
  align-items: center;
  backdrop-filter: blur(7px);
  background: #000d;
  display: none;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 100;
}
.about-overlay.open {
  display: flex;
}
.about-card {
  background: #030b07;
  border: 1px solid var(--g);
  box-shadow: 0 0 40px #36ff7830;
  max-height: 90vh;
  max-width: 680px;
  overflow: auto;
  padding: 24px;
  position: relative;
  width: 100%;
}
.about-card h2 {
  font-size: 18px;
  margin-top: 8px;
}
.about-card > p {
  color: #8caa95;
  font:
    12px/1.5 Arial,
    sans-serif;
}
.about-close {
  background: transparent;
  border: 1px solid #ff4a55;
  color: #ff6b74;
  cursor: pointer;
  font-size: 22px;
  min-height: 34px;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
}
.enemy-list {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr 1fr;
}
.enemy-list article {
  background: #07130d;
  border: 1px solid #173c28;
  display: grid;
  gap: 4px;
  padding: 10px;
}
.enemy-list strong {
  font-size: 11px;
  letter-spacing: 0.12em;
}
.enemy-list span {
  color: #91aa99;
  font:
    11px/1.35 Arial,
    sans-serif;
}
.about-card h3 {
  color: #eaff65;
  font-size: 11px;
  letter-spacing: 0.14em;
  margin: 18px 0 8px;
}
.tactics-list {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, 1fr);
}
.tactics-list article {
  background: #111504;
  border: 1px solid #3c4818;
  display: grid;
  gap: 5px;
  padding: 10px;
}
.tactics-list strong {
  color: #eaff65;
  font-size: 10px;
  letter-spacing: 0.1em;
}
.tactics-list span {
  color: #aeb78c;
  font:
    10px/1.4 Arial,
    sans-serif;
}
aside i {
  background: #0a2415;
  position: relative;
}
aside i.spread {
  border-color: #ff9a62;
  box-shadow: 0 0 8px #ff9a6260;
  transform: rotate(45deg) scale(0.76);
}
aside i.slow {
  border-color: #78eaff;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 4px #07130d,
    0 0 9px #78eaff80;
}
aside i.arc {
  background: #ffe94a;
  border: 0;
  box-shadow: 0 0 10px #ffe94a90;
  clip-path: polygon(55% 0, 18% 54%, 46% 54%, 31% 100%, 82% 40%, 54% 40%);
}
aside i.missile {
  background: transparent;
  border: 0;
  box-shadow: none;
}
aside i.missile:before,
aside i.missile:after {
  background: #26320a;
  border: 2px solid #eaff65;
  box-shadow: 0 0 7px #eaff6570;
  content: "";
  height: 24px;
  position: absolute;
  top: 1px;
  width: 8px;
}
aside i.missile:before {
  left: 1px;
}
aside i.missile:after {
  right: 1px;
}

@media (max-width: 720px) {
  .command-sell {
    grid-column: 1/-1;
    margin: 0;
  }
  .about-button {
    font-size: 5px;
    margin-top: 2px;
    min-height: 13px;
    padding: 1px 4px;
  }
  .enemy-list {
    grid-template-columns: 1fr;
  }
  .tactics-list {
    grid-template-columns: 1fr;
  }
}

body {
  overscroll-behavior: none;
}

.tower-top {
  align-items: center;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: grid;
  flex: 1 1 430px;
  grid-template-columns: minmax(95px, 1.05fr) minmax(190px, 1.8fr) minmax(
      110px,
      1fr
    );
  height: 100%;
  margin-left: 14px;
  max-width: 520px;
  min-width: 390px;
}

.tower-identity {
  min-width: 0;
  padding: 5px 9px;
}

.tower-identity strong {
  color: var(--g);
  display: block;
  font-size: 11px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.tower-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 100%;
}

.tower-stat {
  border-left: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 5px 6px;
}

.tower-stat small {
  grid-column: 1 / -1;
  letter-spacing: 0.08em;
  font-size: 7px;
}

.tower-stat b {
  color: #dfffea;
  font-size: 12px;
}

.tower-stat em {
  color: var(--g);
  font-size: 9px;
  font-style: normal;
}

.tower-target {
  align-content: center;
  background: #07130d;
  border: 0;
  border-left: 1px solid var(--line);
  color: var(--g);
  cursor: pointer;
  display: grid;
  gap: 5px;
  min-height: 0;
  min-width: 0;
  padding: 5px 4px;
  text-align: center;
}

.tower-target:hover:not(:disabled) {
  background: #102719;
  box-shadow: inset 0 -2px var(--g);
}

.tower-target small {
  font-size: 7px;
  letter-spacing: 0.08em;
}

.tower-target b {
  font-size: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tower-target:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.tower-actions {
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(104px, 1.45fr) repeat(2, minmax(48px, 0.75fr));
  height: 100%;
  padding: 5px;
}

.tower-actions button {
  border: 1px solid var(--g);
  background: var(--g);
  color: #021007;
  font-size: 8px;
  font-weight: 900;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 3px 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tower-actions .top-sell {
  background: #2b080b;
  border-color: #ff4a55;
  color: #ff6b74;
}

.tower-top.empty .tower-stats,
.tower-top.empty .top-sell {
  opacity: 0.38;
}

.command .selected:not(.command-sell) {
  display: none;
}

.overdrive {
  background: #07130d;
  border: 1px solid #294531;
  margin-top: 8px;
  padding: 8px 9px;
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    background 0.18s;
}

.overdrive b {
  color: #749681;
  float: right;
  font-size: 18px;
  line-height: 1;
}

.overdrive p {
  clear: both;
  color: #759080;
  font:
    9px/1.35 Arial,
    sans-serif;
  margin: 6px 0 0;
}

.overdrive.active {
  background: #171a05;
  border-color: #eaff65;
  box-shadow:
    inset 3px 0 #eaff65,
    0 0 14px #eaff6535;
}

.overdrive.active small,
.overdrive.active b {
  color: #eaff65;
}

.overdrive.active p {
  color: #dfeaa0;
}

button {
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(54, 255, 120, 0.22);
}

canvas {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

@media (max-width: 720px) {
  main {
    min-height: 100dvh;
    gap: 7px;
    padding: max(7px, env(safe-area-inset-top))
      max(7px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom))
      max(7px, env(safe-area-inset-left));
  }

  header {
    flex: 0 0 58px;
    height: 58px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
  }

  header > section:not(.tower-top) {
    display: none;
  }

  .tower-top {
    flex: 1 1 auto;
    grid-template-columns: 58px minmax(92px, 1fr) 84px;
    margin-left: 3px;
    max-width: none;
    min-width: 0;
  }

  .tower-identity {
    padding: 3px 4px;
  }

  .tower-identity small {
    font-size: 6px;
  }

  .tower-identity strong {
    font-size: 8px;
    margin-top: 2px;
  }

  .tower-stat {
    padding: 3px;
  }

  .tower-stat small {
    font-size: 5px;
  }

  .tower-stat b {
    font-size: 9px;
  }

  .tower-stat em {
    font-size: 7px;
  }

  .tower-target {
    gap: 2px;
    padding: 2px;
  }

  .tower-target small {
    font-size: 5px;
  }

  .tower-target b {
    font-size: 6px;
  }

  .tower-actions {
    gap: 2px;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    padding: 3px;
  }

  .tower-actions .top-upgrade {
    grid-column: 1 / -1;
  }

  .tower-actions button {
    font-size: 6px;
    min-height: 0;
    padding: 2px;
  }

  header > div {
    flex: 0 0 auto;
  }

  header section {
    flex: 1 1 auto;
    gap: 2px;
  }

  header label {
    border: 0;
    min-width: 0;
    padding: 4px;
    text-align: center;
  }

  header label b {
    margin-top: 3px;
    font-size: 15px;
  }

  header small {
    letter-spacing: 0.08em;
    font-size: 7px;
  }

  h1 {
    font-size: clamp(18px, 6vw, 25px);
    white-space: nowrap;
  }

  .layout {
    min-height: 0;
  }

  aside:first-child {
    order: 1;
    display: flex;
    gap: 6px;
    padding: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  aside:first-child h2 {
    display: none;
  }

  aside:first-child > button {
    flex: 0 0 145px;
    grid-template-columns: 18px 26px 1fr;
    height: 58px;
    padding: 6px;
    scroll-snap-align: start;
  }

  aside:first-child > button strong {
    grid-column: 3;
  }

  aside:first-child > button span small {
    display: none;
  }

  .field {
    order: 2;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 900 / 620;
  }

  .field canvas {
    width: 100%;
    height: 100%;
  }

  .command {
    order: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 8px;
  }

  .command h2,
  .command .intel {
    display: none;
  }

  .command .next {
    display: none;
  }

  .command .next p,
  .command .intel {
    display: none;
  }

  .command .next b {
    font-size: 24px;
  }

  .command .go,
  .command .auto,
  .command .pause {
    margin: 0;
    min-height: 50px;
  }

  .command .pause {
    grid-column: 1 / -1;
  }

  .command .overdrive {
    grid-column: 1 / -1;
    margin: 0;
  }

  .selected {
    grid-column: 1 / -1;
    margin-top: 0;
    padding-top: 8px;
  }

  .selected p {
    margin: 5px 0;
  }

  footer {
    justify-content: center;
    text-align: center;
  }

  footer span:first-child {
    font-size: 0;
  }

  footer span:first-child::after {
    content: "TAP OPEN GROUND TO DEPLOY";
    font-size: 8px;
  }

  footer span:nth-child(2) {
    display: none;
  }
}

@media (max-width: 390px) {
  header > div small {
    display: none;
  }

  header label b {
    font-size: 13px;
  }

  aside:first-child > button {
    flex-basis: 132px;
  }
}

/*
 * itch.io's standard embed is commonly 900px wide. The original stylesheet
 * treats anything below 1000px as a tablet and pushes COMMAND underneath the
 * playfield, which makes a fixed-height iframe clip the controls. Keep the
 * full game in one compact row throughout that embed-width range.
 */
@media (min-width: 721px) and (max-width: 1100px) {
  main {
    height: 100dvh;
    min-height: 0;
    gap: 7px;
    padding: max(5px, env(safe-area-inset-top))
      max(5px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom))
      max(5px, env(safe-area-inset-left));
    overflow: hidden;
  }

  header {
    flex: 0 0 48px;
    height: 48px;
    padding: 6px 12px;
  }

  h1 {
    font-size: 23px;
  }

  header label {
    min-width: 72px;
    padding: 4px 7px;
  }

  header label b {
    margin-top: 3px;
    font-size: 17px;
  }

  header > div small,
  footer {
    display: none;
  }

  .layout {
    flex: 1 1 auto;
    grid-template-columns: 135px minmax(400px, 1fr) 175px;
    min-height: 0;
    gap: 7px;
  }

  aside {
    min-width: 0;
    padding: 6px;
    overflow: hidden;
  }

  h2 {
    margin-bottom: 5px;
    padding-bottom: 6px;
    font-size: 10px;
  }

  aside > button {
    grid-template-columns: 13px 22px minmax(0, 1fr);
    gap: 5px;
    height: 48px;
    margin: 3px 0;
    padding: 5px;
  }

  aside > button kbd {
    font-size: 9px;
  }

  aside > button i {
    width: 22px;
    height: 22px;
  }

  aside > button span {
    min-width: 0;
  }

  aside > button span b {
    font-size: 9px;
  }

  aside > button span small {
    display: none;
  }

  aside > button strong {
    grid-column: 3;
    font-size: 9px;
  }

  .field {
    height: 100%;
    min-height: 0;
  }

  .command {
    display: flex;
    grid-column: auto;
  }

  .command .next {
    padding: 8px;
  }

  .command .intel,
  .command .next p {
    display: none;
  }

  .command .next b {
    font-size: 23px;
  }

  .command .go,
  .command .auto,
  .command .pause {
    min-height: 40px;
    margin-top: 6px;
    padding: 8px 6px;
    font-size: 9px;
  }

  .selected {
    margin-top: 8px;
    padding-top: 8px;
  }

  .selected h3 {
    margin: 6px 0;
    font-size: 11px;
  }

  .selected p {
    margin: 5px 0;
    font-size: 9px;
  }

  .selected button {
    margin-top: 5px;
    padding: 8px 5px;
    font-size: 9px;
  }
}

/*
 * Short mobile iframes need the complete battlefield and primary controls
 * before optional tower detail. This is the portrait-phone fallback used when
 * itch.io supplies the device viewport instead of scaling the 960x540 frame.
 */
@media (max-width: 720px) and (max-height: 600px) {
  main {
    height: 100dvh;
    min-height: 0;
    gap: 4px;
    padding: 4px;
    overflow: hidden;
  }

  header {
    flex-basis: 46px;
    height: 46px;
    padding: 4px 7px;
  }

  h1 {
    font-size: 17px;
  }

  header label {
    padding: 2px;
  }

  header label b {
    font-size: 11px;
  }

  .layout {
    flex: 1 1 auto;
    gap: 4px;
  }

  aside:first-child {
    flex: 0 0 52px;
    padding: 4px;
  }

  aside:first-child > button {
    flex-basis: 118px;
    height: 44px;
    min-height: 44px;
  }

  .field {
    flex: 1 1 auto;
    width: auto;
    min-height: 180px;
    aspect-ratio: auto;
  }

  .command {
    flex: 0 0 126px;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 4px;
  }

  .command .overdrive {
    align-items: center;
    display: flex;
    grid-column: 1 / -1;
    justify-content: space-between;
    min-height: 26px;
    padding: 4px 7px;
  }

  .command .overdrive b {
    float: none;
    font-size: 14px;
  }

  .command .overdrive p {
    display: none;
  }

  .command .go {
    grid-column: 1 / 3;
  }

  .command .auto {
    grid-column: 3 / 5;
  }

  .command .pause {
    grid-column: 1 / 3;
  }

  .command .go,
  .command .auto,
  .command .pause {
    min-height: 44px;
    padding: 5px;
    font-size: 9px;
  }

  .command .selected:not(.command-sell) {
    display: none;
  }

  .command .command-sell {
    grid-column: 3 / 5;
  }

  footer {
    display: none;
  }
}

header .about-button {
  min-height: 17px;
}

@media (max-width: 720px) {
  header .about-button {
    min-height: 13px;
  }

  .command .command-sell {
    grid-column: 1 / -1;
    margin: 0;
  }
}

@media (max-width: 720px) and (max-height: 600px) {
  .command .command-sell {
    grid-column: 3 / 5;
  }
}

/* Start screen and guided training */
.game-cover {
  align-items: center;
  background: linear-gradient(rgba(2, 4, 3, 0.88), rgba(0, 8, 4, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 31px, #173c2838 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, #173c2838 32px);
  display: none;
  inset: 0;
  justify-content: center;
  overflow: auto;
  padding: 18px;
  position: fixed;
  z-index: 500;
}

.game-cover.open {
  display: flex;
}

.cover-card {
  background: #020906f2;
  border: 1px solid #36ff78;
  box-shadow:
    0 0 70px #36ff7835,
    inset 0 0 45px #36ff780a;
  max-width: 720px;
  padding: clamp(22px, 5vw, 48px);
  position: relative;
  text-align: center;
  width: 100%;
}

.cover-card::before,
.cover-card::after {
  border-color: #eaff65;
  border-style: solid;
  content: "";
  height: 22px;
  position: absolute;
  width: 22px;
}

.cover-card::before {
  border-width: 2px 0 0 2px;
  left: 8px;
  top: 8px;
}

.cover-card::after {
  border-width: 0 2px 2px 0;
  bottom: 8px;
  right: 8px;
}

.cover-kicker {
  color: #719a7d;
  letter-spacing: 0.25em;
  margin: 0;
  text-transform: uppercase;
}

.cover-title {
  font:
    clamp(38px, 8vw, 72px) / 0.95 Arial Black,
    sans-serif;
  letter-spacing: -0.05em;
  margin: 12px 0;
  text-transform: uppercase;
}

.cover-title em {
  color: #36ff78;
  font-style: normal;
  text-shadow: 0 0 26px #36ff7890;
}

.cover-card > p {
  color: #9bb8a4;
  font:
    13px/1.55 Arial,
    sans-serif;
  margin: 0 auto 22px;
  max-width: 540px;
}

.cover-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin: 0 auto;
  max-width: 520px;
}

.cover-actions button {
  border: 1px solid #36ff78;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  min-height: 56px;
  padding: 12px;
}

.cover-start {
  background: #36ff78;
  box-shadow: 0 0 24px #36ff7845;
  color: #021007;
}

.cover-tutorial {
  background: #101504;
  border-color: #eaff65 !important;
  color: #eaff65;
}

.cover-hint {
  color: #60826a;
  display: block;
  font:
    9px/1.5 Arial,
    sans-serif;
  letter-spacing: 0.08em;
  margin-top: 18px;
  text-transform: uppercase;
}

.tutorial-coach {
  background: #030b07f5;
  border: 1px solid #eaff65;
  bottom: max(14px, env(safe-area-inset-bottom));
  box-shadow: 0 0 35px #eaff6538;
  display: none;
  max-width: 390px;
  padding: 16px;
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  width: calc(100% - 28px);
  z-index: 450;
}

.tutorial-coach.open {
  display: block;
}

.tutorial-coach small {
  color: #eaff65;
}

.tutorial-coach h3 {
  color: #dfffea;
  font-size: 15px;
  margin: 8px 0;
  text-transform: uppercase;
}

.tutorial-coach p {
  color: #9bb8a4;
  font:
    12px/1.5 Arial,
    sans-serif;
  margin: 0 0 13px;
}

.tutorial-controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.tutorial-controls button {
  background: transparent;
  border: 1px solid #315441;
  color: #86a991;
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
  min-height: 36px;
  padding: 7px 11px;
}

.tutorial-controls .tutorial-next {
  background: #eaff65;
  border-color: #eaff65;
  color: #111600;
}

.tutorial-focus {
  animation: tutorial-pulse 1s ease-in-out infinite alternate;
  outline: 3px solid #eaff65 !important;
  outline-offset: 3px;
}

@keyframes tutorial-pulse {
  from {
    box-shadow: 0 0 8px #eaff6555;
  }
  to {
    box-shadow: 0 0 28px #eaff65cc;
  }
}

@media (max-width: 720px) {
  .game-cover {
    padding: 10px;
  }

  .cover-card {
    padding: 24px 16px;
  }

  .cover-actions {
    grid-template-columns: 1fr;
  }

  .cover-actions button {
    min-height: 48px;
  }

  .tutorial-coach {
    bottom: 8px;
    left: 8px;
    max-width: none;
    padding: 11px;
    right: 8px;
    width: auto;
  }

  .tutorial-coach p {
    font-size: 11px;
    margin-bottom: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tutorial-focus {
    animation: none;
  }
}

/*
 * Dedicated mobile landscape shell. itch.io may report a wide CSS viewport
 * even when the device is physically short, so height and orientation drive
 * this layout instead of desktop-style width breakpoints alone.
 */
@media (orientation: landscape) and (max-height: 1000px) {
  main {
    gap: 6px;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding: max(5px, env(safe-area-inset-top))
      max(5px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom))
      max(5px, env(safe-area-inset-left));
  }

  header {
    align-items: center;
    flex: 0 0 62px;
    gap: 6px;
    height: 62px;
    padding: 5px 8px;
  }

  header > div:first-child {
    flex: 0 0 auto;
  }

  h1 {
    font-size: clamp(18px, 2.4vw, 27px);
    white-space: nowrap;
  }

  header .about-button {
    font-size: 5px;
    margin-top: 2px;
    min-height: 13px;
    padding: 1px 4px;
  }

  header > section:not(.tower-top) {
    flex: 0 0 auto;
  }

  header label {
    min-width: clamp(52px, 6vw, 76px);
    padding: 3px 6px;
  }

  header label b {
    font-size: clamp(14px, 1.7vw, 19px);
    margin-top: 3px;
  }

  .tower-top {
    flex: 1 1 auto;
    grid-template-columns: minmax(72px, 0.8fr) minmax(140px, 1.45fr) minmax(
        170px,
        1.25fr
      );
    margin-left: 0;
    max-width: none;
    min-width: 0;
  }

  .tower-identity {
    padding: 3px 6px;
  }

  .tower-actions {
    gap: 3px;
    grid-template-columns: minmax(82px, 1.35fr) repeat(
        2,
        minmax(40px, 0.72fr)
      );
    grid-template-rows: 1fr;
    padding: 4px;
  }

  .tower-actions .top-upgrade {
    grid-column: auto;
  }

  .tower-actions button {
    font-size: clamp(6px, 0.75vw, 8px);
    min-height: 0;
    padding: 2px 3px;
  }

  .layout {
    flex: 1 1 auto;
    gap: 6px;
    grid-template-columns: clamp(105px, 16vw, 340px) minmax(300px, 1fr) clamp(
        140px,
        22.5vw,
        460px
      );
    min-height: 0;
  }

  aside {
    min-width: 0;
    overflow: hidden;
    padding: 6px;
  }

  aside:first-child {
    display: grid;
    gap: 4px;
    grid-template-rows: auto repeat(5, minmax(0, 1fr));
    order: initial;
    overflow: hidden;
  }

  h2 {
    font-size: 9px;
    margin: 0;
    padding: 0 0 5px;
  }

  aside:first-child > button {
    flex: initial;
    gap: 4px;
    grid-template-columns: 13px 22px minmax(0, 1fr);
    height: auto;
    margin: 0;
    min-height: 0;
    padding: 4px;
  }

  aside:first-child > button kbd {
    font-size: 8px;
  }

  aside:first-child > button i {
    height: 22px;
    width: 22px;
  }

  aside:first-child > button span {
    min-width: 0;
  }

  aside:first-child > button span b,
  aside:first-child > button strong {
    font-size: clamp(7px, 0.75vw, 9px);
  }

  aside:first-child > button span small {
    display: none;
  }

  aside:first-child > button strong {
    grid-column: 3;
  }

  .field {
    aspect-ratio: auto;
    height: 100%;
    min-height: 0;
    order: initial;
    width: auto;
  }

  .command {
    align-content: start;
    display: grid;
    gap: 5px;
    grid-column: auto;
    grid-template-columns: 1fr 1fr;
    order: initial;
    padding: 6px;
  }

  .command h2,
  .command .next,
  .command .overdrive,
  .command .go,
  .command .auto {
    grid-column: 1 / -1;
  }

  .command h2 {
    display: flex;
  }

  .command .next {
    display: block;
    min-height: 42px;
    padding: 6px 8px;
  }

  .command .next p,
  .command .intel,
  .command .overdrive p {
    display: none;
  }

  .command .next b {
    font-size: 21px;
  }

  .command .overdrive {
    margin: 0;
    min-height: 32px;
    padding: 6px 8px;
  }

  .command .overdrive b {
    font-size: 15px;
  }

  .command .go,
  .command .auto,
  .command .pause,
  .command .command-sell {
    font-size: clamp(7px, 0.8vw, 9px);
    margin: 0;
    min-height: 42px;
    padding: 6px;
  }

  .command .pause {
    grid-column: 1;
  }

  .command .command-sell {
    grid-column: 2;
  }

  footer {
    display: none;
  }

  .game-cover {
    padding: 8px;
  }

  .cover-card {
    max-width: 620px;
    padding: 16px 24px;
  }

  .cover-title {
    font-size: clamp(34px, 8vh, 54px);
    margin: 7px 0;
  }

  .cover-card > p {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .cover-actions button {
    min-height: 44px;
  }

  .cover-hint {
    margin-top: 9px;
  }
}

@media (orientation: landscape) and (max-height: 1000px) and (max-width: 1100px) {
  header > section:not(.tower-top) label:last-child {
    display: none;
  }
}

@media (orientation: landscape) and (max-height: 480px) {
  header {
    flex-basis: 54px;
    height: 54px;
  }

  .tower-stat {
    padding: 2px;
  }

  .tower-stat small,
  .tower-target small {
    display: none;
  }

  .tower-identity strong {
    font-size: 8px;
  }

  .command .next {
    min-height: 36px;
  }

  .command .go,
  .command .auto,
  .command .pause,
  .command .command-sell {
    min-height: 38px;
  }
}
