@media (max-width: 900px) and (orientation: landscape) and (max-height: 600px) {
  html,
  body {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  body {
    display: block;
    padding: 0;
  }
  .shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(250px, 35vw, 330px);
    grid-template-rows: 46px minmax(0, 1fr);
    width: 100%;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  .topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    position: relative;
    height: 46px;
    grid-template-columns: minmax(120px, 1fr) auto minmax(150px, 1fr);
    padding: 0 8px;
  }
  .brand {
    font-size: 9px;
  }
  .brand small {
    display: inline;
    font-size: 7px;
  }
  .stats {
    position: static;
    width: auto;
    height: 39px;
    order: initial;
    grid-column: auto;
    pointer-events: auto;
  }
  .stats > div {
    min-width: 58px;
    height: 39px;
    padding: 2px 5px 0;
    background: transparent;
    border-left: 1px solid rgba(37, 50, 53, 0.1) !important;
  }
  .stats > div:last-child {
    border-right: 1px solid rgba(37, 50, 53, 0.1) !important;
  }
  .stats strong {
    font-size: 13px;
  }
  .controls button {
    width: 27px;
    height: 27px;
  }
  .game-wrap {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    aspect-ratio: auto;
    overflow: hidden;
  }
  .tray {
    grid-column: 2;
    grid-row: 2;
    align-content: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(42px, 1fr);
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 4px;
    gap: 3px;
    overflow: hidden;
    border-top: 0;
    border-left: 1px solid rgba(37, 50, 53, 0.1);
  }
  .tower-card,
  .ability-btn,
  .jam-btn,
  .next-wave {
    min-height: 0;
    height: auto;
  }
  .tower-card {
    grid-template-columns: 26px minmax(0, 1fr);
    padding: 3px;
  }
  .tower-card .swatch {
    width: 25px;
    height: 25px;
    font-size: 12px;
  }
  .tower-card span b,
  .tower-card em,
  .ability-btn b,
  .next-wave span {
    font-size: 8px;
  }
  .ability-btn small,
  .next-wave small {
    font-size: 6px;
  }
  .next-wave {
    grid-column: 1 / -1 !important;
    min-height: 0;
    padding: 4px 7px;
  }
  .next-wave b {
    font-size: 18px;
  }
  .tower-panel {
    left: 5px;
    right: 5px;
    bottom: 5px;
    width: auto;
    max-height: calc(100% - 10px);
    grid-template-columns: 38px minmax(0, 1fr) minmax(112px, 0.72fr);
    align-items: center;
    padding: 8px;
    overflow-y: auto;
  }
  .panel-actions {
    grid-column: 3;
    grid-row: 1;
    grid-template-columns: 1fr;
  }
  .panel-copy h2 {
    margin: 1px 0 4px;
    font-size: 16px;
  }
  .panel-stats {
    gap: 8px;
  }
  .targeting {
    margin-top: 5px;
  }
}
