/* Launch Bay redesign. All rules are scoped to the canonical Home screen. */
#play-home {
  --home-panel: #07121deF;
  --home-panel-strong: #0a1b28f2;
  --home-cyan: var(--nd-accent);
  --home-amber: var(--nd-primary);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(105deg, #030609e8 0%, #03060999 45%, #030609c7 100%),
    url('../unit_asset/ui/neon/home-backdrop.webp') center / cover fixed,
    var(--nd-surface-0);
  color: var(--nd-text-1);
}

#play-home::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at 48% 45%, #1b72a622 0, transparent 56%),
    linear-gradient(0deg, #03060970, transparent 44%, #0306094f);
  content: "";
  pointer-events: none;
}

#play-home .play-home-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(8px, 1.1vw, 16px);
  width: min(1780px, 100%);
  height: calc(100dvh - 48px);
  min-height: 0;
  max-height: none;
  box-sizing: border-box;
  overflow: auto;
  padding: clamp(14px, 1.8vw, 28px);
  border: 0;
  border-radius: 0;
  background: linear-gradient(135deg, #030b12d9, #05111be6 48%, #030a11dc);
  box-shadow: inset 0 1px #3ff3ff20, inset 0 0 90px #0d76a01a;
}

#play-home .flightdeck-frame-overlay { display: none; }

#play-home .flightdeck-header {
  display: grid !important;
  grid-template-columns: minmax(240px, .85fr) minmax(260px, 1fr);
  align-items: end !important;
  gap: 20px !important;
  min-height: 62px;
  padding: 0 2px 12px;
  border-bottom: 1px solid #3ff3ff45;
}

#play-home .flightdeck-title { min-width: 0; }
#play-home .flightdeck-header .screen-eyebrow {
  margin: 0 0 3px;
  color: var(--home-cyan);
  font: 700 10px/1.2 var(--nd-font-label);
  letter-spacing: .18em;
}
#play-home .flightdeck-header h1 {
  margin: 0 !important;
  color: var(--nd-text-1) !important;
  font: 700 clamp(23px, 2vw, 32px)/1.05 var(--nd-font-display) !important;
  letter-spacing: .035em !important;
  text-shadow: 0 0 22px #3ff3ff42;
}
#play-home .play-home-intro {
  justify-self: end;
  max-width: 42ch;
  margin: 0;
  color: var(--nd-text-2);
  font: var(--nd-size-body)/1.5 var(--nd-font-body);
}
#home-chat-launcher { display: none; }

#play-home .play-home-workspace {
  display: grid;
  grid-template-columns: minmax(245px, .86fr) minmax(390px, 1.4fr) minmax(265px, .92fr);
  grid-template-rows: 82px minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
}
#play-home .play-home-choices { display: contents; }
#play-home .play-home-frame-panel { grid-column: 1; grid-row: 1 / 3; }
#play-home .play-home-skin-panel { grid-column: 2; grid-row: 1; }
#play-home .play-home-preview-panel { grid-column: 2; grid-row: 2; }
#play-home #social-chat { grid-column: 3; grid-row: 1 / 3; }
#play-home .play-home-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid #285462;
  border-radius: var(--nd-radius-md);
  background: linear-gradient(150deg, #10232df2, #081017f5 74%);
  box-shadow: inset 0 1px #3ff3ff17, 0 12px 32px #0009;
}
#play-home .play-home-panel::before {
  position: absolute;
  z-index: 2;
  inset: 0 auto auto 0;
  width: 42px;
  height: 2px;
  background: var(--home-cyan);
  box-shadow: 0 0 12px #3ff3ff9c;
  content: "";
  pointer-events: none;
}
#play-home .flightdeck-section-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 12px;
  border-bottom: 1px solid #28546299;
  background: #081017b8;
}
#play-home .flightdeck-section-heading > .nd-chip {
  display: inline-flex;
  min-width: 30px;
  min-height: 24px;
  justify-content: center;
  padding: 2px 7px;
  border-color: #3ff3ff66;
  border-radius: 999px;
  background: #062029;
  color: var(--home-cyan);
  font: 700 10px/1.2 var(--nd-font-label);
}
#play-home .flightdeck-section-heading h2 {
  margin: 0;
  color: var(--nd-text-1);
  font: 700 14px/1.25 var(--nd-font-heading);
  letter-spacing: .02em;
}
#play-home .flightdeck-section-heading p.nd-chip {
  display: inline-flex;
  width: max-content;
  min-height: 21px;
  margin: 4px 0 0;
  padding: 2px 7px;
  color: #ffd99a;
  border-color: #ffb34766;
  background: #261c12;
  font: 700 9px/1.2 var(--nd-font-label);
}

/* Frame cards share the tab selection language; the selected state is unmistakable. */
#play-home .nd-tab-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(4, minmax(64px, 1fr));
  gap: 7px;
  min-height: 0;
  overflow: auto;
  margin: 0;
  padding: 10px;
}
#play-home .nd-tab-list > button {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  min-width: 0;
  min-height: 64px;
  padding: 6px 9px;
  border: 1px solid #28546299;
  border-radius: var(--nd-radius-sm);
  background: linear-gradient(110deg, #081017, #0b2029);
  color: var(--nd-text-1);
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}
#play-home .nd-tab-list > button:hover { border-color: #3ff3ff99; box-shadow: 0 0 14px #3ff3ff24; }
#play-home .nd-tab-list > button[aria-pressed="true"] {
  border-color: var(--home-cyan);
  background: linear-gradient(110deg, #103543, #0b2029);
  box-shadow: inset 3px 0 var(--home-cyan), 0 0 17px #3ff3ff2c;
}
#play-home .nd-tab-list > button:focus-visible,
#play-home .nd-chip-list > button:focus-visible,
#play-home .play-home-actions button:focus-visible {
  outline: 2px solid var(--home-cyan);
  outline-offset: 2px;
  box-shadow: 0 0 18px #3ff3ff55;
}
#play-home .nd-tab-list img {
  grid-row: 1 / 3;
  width: 58px;
  height: 58px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 9px #3ff3ff55);
}
#play-home .nd-tab-list strong {
  align-self: end;
  color: var(--nd-text-1);
  font: 700 13px/1.2 var(--nd-font-heading);
  letter-spacing: .04em;
}
#play-home .nd-tab-list button > span:not(.frame-stat-bars) {
  align-self: start;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--nd-text-2);
  font: 11px/1.25 var(--nd-font-body);
}
#play-home .nd-tab-list .frame-stat-bars { display: none !important; }

#play-home .nd-chip-list {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 7px 10px;
  scrollbar-width: thin;
}
#play-home .nd-chip-list > button {
  display: flex;
  flex: 0 0 68px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 68px;
  height: 58px;
  min-height: 44px;
  padding: 2px 5px;
  overflow: hidden;
  border: 1px solid #28546299;
  border-radius: 999px;
  background: #081017;
  color: var(--nd-text-2);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
#play-home .nd-chip-list > button[aria-pressed="true"] {
  border-color: var(--home-amber);
  background: #261c12;
  color: #ffe0a8;
  box-shadow: inset 0 0 0 1px #ffb34733, 0 0 12px #ffb34722;
}
#play-home .nd-chip-list img { width: 42px; height: 34px; object-fit: contain; image-rendering: pixelated; }
#play-home .nd-chip-list span {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font: 9px/1.1 var(--nd-font-label);
  text-overflow: ellipsis;
  white-space: nowrap;
}

#play-home .play-home-preview-panel { padding-bottom: 8px; }
#play-home .flightdeck-preview-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, .8fr);
  gap: 8px;
  min-height: 0;
  height: 100%;
  padding: 8px;
}
#play-home .flightdeck-preview-left,
#play-home .flightdeck-preview-right { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#play-home .flightdeck-preview-scene {
  position: relative;
  display: grid;
  flex: 1 1 auto;
  place-items: center;
  min-height: 105px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #285462;
  border-radius: var(--nd-radius-sm);
  background: radial-gradient(ellipse at 50% 70%, #12506b8c, transparent 55%),
    linear-gradient(150deg, #061118b8, #030609dd),
    url('../unit_asset/ui/neon/home-backdrop.webp') center / cover;
  box-shadow: inset 0 0 34px #3ff3ff19;
}
#play-home .flightdeck-preview-scene::after {
  position: absolute;
  inset: 0;
  border: 1px solid #3ff3ff17;
  background: linear-gradient(90deg, #03060944, transparent 24%, transparent 76%, #03060944);
  content: "";
  pointer-events: none;
}
#play-home .flightdeck-preview-ring {
  position: absolute;
  top: 60%;
  left: 50%;
  width: min(58%, 280px);
  aspect-ratio: 1;
  border: 1px solid #3ff3ff4d;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 12px #3ff3ff0a, 0 0 30px #3ff3ff22;
}
#play-home .flightdeck-preview-scene img {
  position: relative;
  z-index: 1;
  width: min(70%, 340px);
  height: 82%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 16px #3ff3ff82) drop-shadow(0 10px 8px #000c);
  animation: home-neon-float 5s ease-in-out infinite;
}
#play-home .flightdeck-preview-scene #home-preview-badge {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  padding: 4px 7px;
  border: 1px solid #ffb34788;
  border-radius: 999px;
  background: #15120de8;
  color: #ffe0a8;
  font: 700 9px/1.2 var(--nd-font-label);
  letter-spacing: .08em;
}
@keyframes home-neon-float { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-4px); } }
#play-home .flightdeck-preview-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  padding: 7px 2px 0;
}
#play-home .home-preview-career-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#play-home .flightdeck-preview-copy h3 {
  margin: 0;
  color: var(--nd-text-1);
  font: 700 20px/1.1 var(--nd-font-heading);
  letter-spacing: .05em;
}
#play-home .flightdeck-preview-copy p { margin: 3px 0 0; color: var(--nd-text-2); font: 11px/1.35 var(--nd-font-body); }
#play-home .flightdeck-preview-copy .gear-mastery-progress { margin-top: 3px; }
#play-home #home-preview-stats { display: grid; place-items: center; flex: 1 1 auto; min-height: 0; }
#play-home #home-preview-stats svg { max-width: 100%; max-height: 100%; overflow: visible; }
#play-home .play-home-skill {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 64px;
  margin: 4px 0 0;
  padding: 8px;
  border: 1px solid #285462;
  border-left: 3px solid var(--home-amber);
  border-radius: var(--nd-radius-sm);
  background: linear-gradient(110deg, #10232d, #081017);
}
#play-home .home-skill-icon { width: 36px; height: 36px; }
#play-home .home-skill-copy { min-width: 0; }
#play-home .play-home-skill h2 { margin: 0; color: #ffd99a; font: 700 11px/1.2 var(--nd-font-label); letter-spacing: .05em; }
#play-home .play-home-skill p { margin: 3px 0 0; color: var(--nd-text-2); font: 11px/1.3 var(--nd-font-body); }
#play-home .play-home-skill p:last-child { display: block; }

#play-home #social-chat {
  position: static;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  width: auto;
  max-width: none;
  min-width: 0;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 10px;
  border: 1px solid #285462;
  border-radius: var(--nd-radius-md);
  background: linear-gradient(150deg, #10232df2, #081017f5 74%);
  box-shadow: inset 0 1px #3ff3ff17, 0 12px 32px #0009;
  text-shadow: none;
}
#play-home .social-chat-header { display: flex; align-items: center; justify-content: space-between; min-height: 34px; padding: 0 2px 7px; border-bottom: 1px solid #28546299; color: var(--nd-text-1); }
#play-home #home-chat-toggle { min-height: 44px; padding: 5px 9px; border: 1px solid transparent; border-radius: var(--nd-radius-sm); background: transparent; color: var(--nd-text-1); font: 700 13px/1.2 var(--nd-font-heading); }
#play-home .social-chat-title { display: none; }
#play-home .social-chat-header > span { color: var(--nd-accent); font: 9px/1.2 var(--nd-font-label); letter-spacing: .08em; }
#play-home #social-feed { flex: 1 1 auto; min-height: 48px; max-height: none; overflow: auto; margin: 7px 0; mask-image: none; }
#play-home .social-line { gap: 6px; border-color: #28546266; color: var(--nd-text-2); }
#play-home #chat-form { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px; border: 1px solid #28546277; border-radius: var(--nd-radius-sm); background: #03060980; }
#play-home #chat-form label { display: none; }
#play-home #chat-channel { min-width: 62px; min-height: 44px; border-color: #285462; background-color: #081017; color: var(--nd-text-1); }
#play-home #chat-input { flex: 1 1 110px; min-width: 0; min-height: 44px; border-color: #285462; background: #081017; color: var(--nd-text-1); }
#play-home #chat-form button { min-height: 44px; border: 1px solid #3ff3ff66; border-radius: var(--nd-radius-sm); background: #0b2029; color: var(--nd-accent); }
#play-home #social-chat > small { padding-top: 6px; color: var(--nd-text-3); font: 9px/1.3 var(--nd-font-label); }
#play-home #sticker-tray { flex-wrap: wrap; gap: 4px; opacity: 1; }
#play-home #sticker-tray button { width: 38px; height: 38px; border-color: #285462; background: #081017; }

#play-home .flightdeck-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  padding: 8px 2px 0;
  border-top: 1px solid #3ff3ff45;
}
#play-home .flightdeck-footer-kicker { color: var(--nd-accent); font: 700 9px/1.2 var(--nd-font-label); letter-spacing: .12em; }
#play-home .flightdeck-loadout { min-width: 0; }
#play-home .flightdeck-loadout .play-loadout-note { max-width: 44ch; margin: 4px 0 0; color: var(--nd-text-2); font: 11px/1.3 var(--nd-font-body); }
#play-home .flightdeck-loadout #home-status { min-height: 0; margin: 2px 0 0; color: #ffd99a; font: 10px/1.3 var(--nd-font-body); }
#play-home .home-first-sortie-guide { max-width: 40ch; margin: 3px 0 0; color: var(--nd-text-2); font: 11px/1.3 var(--nd-font-body); }
#play-home .play-home-actions { display: flex; align-items: center; gap: 7px; }
#play-home .play-home-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #3ff3ff66;
  border-radius: var(--nd-radius-sm);
  background: #081017;
  color: var(--nd-text-2);
  font: 700 10px/1.2 var(--nd-font-label);
  letter-spacing: .02em;
  cursor: pointer;
}
#play-home .play-home-actions button:hover { border-color: var(--nd-accent); color: var(--nd-accent); box-shadow: var(--nd-glow); }
#play-home .play-home-actions button::before {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  background: center / contain no-repeat;
  content: "";
}
#play-home #home-customize::before { background-image: url('../unit_asset/ui/neon/icon-hangar.webp'); }
#play-home #home-browse::before { background-image: url('../unit_asset/ui/neon/icon-rooms.webp'); }
#play-home .quick-play-mode { display: grid; gap: 2px; color: var(--nd-text-3); font: 9px/1.2 var(--nd-font-label); }
#play-home .quick-play-mode select { min-height: 38px; border: 1px solid #285462; border-radius: var(--nd-radius-sm); background: #081017; color: var(--nd-text-1); font: 11px/1.2 var(--nd-font-label); }
#play-home #quick-play-feedback { flex: 1 0 100%; }

@media (max-width: 1100px) and (orientation: landscape) {
  #play-home .play-home-body { width: 100%; height: calc(100dvh - 48px); padding: 8px 10px; gap: 3px; }
  #play-home .flightdeck-header { grid-template-columns: minmax(180px, .7fr) minmax(220px, 1fr); min-height: 37px; padding-bottom: 5px; }
  #play-home .flightdeck-header .screen-eyebrow { font-size: 8px; }
  #play-home .flightdeck-header h1 { font-size: 20px !important; }
  #play-home .play-home-intro { font-size: 10px; line-height: 1.25; }
  #play-home .play-home-workspace { grid-template-columns: minmax(172px, .92fr) minmax(220px, 1.28fr) minmax(174px, .9fr); grid-template-rows: 48px minmax(0, 1fr); gap: 4px 6px; }
  #play-home .play-home-frame-panel { grid-column: 1; grid-row: 1 / 3; }
  #play-home .play-home-skin-panel { grid-column: 2; grid-row: 1; }
  #play-home .play-home-preview-panel { grid-column: 2; grid-row: 2; }
  #play-home #social-chat { grid-column: 3; grid-row: 1 / 3; padding: 5px; }
  #play-home .flightdeck-section-heading { min-height: 32px; padding: 3px 6px; gap: 6px; }
  #play-home .flightdeck-section-heading h2 { font-size: 11px; }
  #play-home .flightdeck-section-heading > .nd-chip { min-width: 25px; min-height: 21px; padding: 1px 5px; font-size: 9px; }
  #play-home .nd-tab-list { gap: 4px; padding: 5px; }
  #play-home .nd-tab-list > button { grid-template-columns: 42px minmax(0, 1fr); min-height: 48px; padding: 3px 4px; column-gap: 4px; }
  #play-home .nd-tab-list img { width: 40px; height: 40px; }
  #play-home .nd-tab-list strong { font-size: 11px; }
  #play-home .nd-tab-list button > span:not(.frame-stat-bars) { font-size: 9px; line-height: 1.1; }
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-frame-grid button { grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); justify-items: start; column-gap: 4px; text-align: left; }
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-frame-grid img { grid-row: 1; width: 42px; height: 42px; min-width: 42px; min-height: 42px; object-fit: contain; }
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-frame-grid strong { align-self: center; }
  /* The shared mobile rule forces this copy visible with !important; compact cards keep the Frame art and name. */
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-frame-grid button > span:not(.frame-stat-bars) { display: none !important; }
  #play-home .nd-chip-list { gap: 3px; padding: 2px 5px; }
  #play-home .nd-chip-list > button { flex-basis: 48px; width: 48px; height: 40px; min-height: 40px; padding: 0 2px; }
  #play-home .nd-chip-list img { width: 32px; height: 25px; }
  #play-home .nd-chip-list span { font-size: 7px; }
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-skins .play-home-skin { flex-basis: 48px; width: 48px; height: 44px; min-height: 44px; padding: 1px; gap: 0; }
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-skins img { width: 34px; height: 34px; min-width: 34px; min-height: 34px; object-fit: contain; }
  #play-home .flightdeck-preview-content { grid-template-columns: minmax(0, 1fr) minmax(130px, .72fr); gap: 5px; padding: 5px; }
  #play-home .play-home-preview-panel { padding-bottom: 0; }
  #play-home .flightdeck-preview-copy { padding-top: 0; }
  #play-home .flightdeck-preview-copy h3 { font-size: 15px; }
  #play-home .flightdeck-preview-copy p { font-size: 9px; line-height: 1.2; }
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-preview-left .flightdeck-preview-scene { flex: 0 0 84px; min-height: 84px; margin: 0; }
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-preview-copy { padding-top: 2px; }
  #play-home .home-preview-career-row { flex-wrap: wrap; }
  #play-home #home-preview-title { flex: 1 0 100%; min-height: 20px; font-size: 15px; line-height: 1.3; white-space: normal; overflow: visible; }
  #play-home .play-home-skill { grid-template-columns: 32px minmax(0, 1fr); gap: 4px; min-height: 52px; margin-top: 3px; padding: 4px; }
  #play-home .home-skill-icon { width: 30px; height: 30px; }
  #play-home .play-home-skill h2 { font-size: 9px; }
  #play-home .play-home-skill p { font-size: 9px; line-height: 1.2; }
  #play-home .social-chat-header { min-height: 27px; padding: 0 1px 3px; }
  #play-home #home-chat-toggle { min-height: 44px; padding-inline: 3px; font-size: 10px; }
  #play-home .social-chat-header > span { font-size: 7px; }
  #play-home #social-feed { min-height: 30px; margin: 3px 0; }
  #play-home .social-line { gap: 3px; padding: 2px; font-size: 8px; }
  #play-home .social-line small { font-size: 7px; }
  #play-home #chat-form { flex-wrap: nowrap; gap: 2px; padding: 2px; }
  #play-home #chat-channel { flex: 0 0 40px; width: 40px; min-width: 40px; min-height: 44px; padding: 0 2px; font-size: 9px; }
  #play-home #chat-input { min-height: 44px; padding: 0 4px; font-size: 10px; }
  #play-home #chat-form button { min-height: 44px; padding: 0 5px; font-size: 9px; }
  #play-home #social-chat > small { padding-top: 3px; font-size: 7px; }
  #play-home #sticker-tray { flex-wrap: nowrap; margin-top: 0; overflow-x: auto; }
  #play-home #sticker-tray button { flex: 0 0 34px; width: 34px; height: 38px; }
  #play-home .flightdeck-footer { min-height: 50px; gap: 5px; padding-top: 4px; }
  #play-home .flightdeck-footer-kicker { font-size: 8px; }
  #play-home .play-home-actions { gap: 4px; }
  #play-home .play-home-actions button { min-height: 44px; padding: 4px 7px; font-size: 9px; }
  #play-home .play-home-actions button::before { flex-basis: 14px; width: 14px; height: 14px; }
  #play-home .quick-play-mode { font-size: 8px; }
  #play-home .quick-play-mode select { min-height: 36px; }
}

@media (max-width: 900px) and (orientation: portrait) {
  #play-home .play-home-body { display: block; width: 100%; height: 100dvh; min-height: 100dvh; max-height: none; overflow: auto; padding: 12px; }
  #play-home .flightdeck-header { grid-template-columns: 1fr; align-items: start !important; gap: 4px !important; min-height: 0; padding-bottom: 9px; }
  #play-home .play-home-intro { justify-self: start; }
  #play-home .play-home-workspace { display: grid; grid-template-columns: 1fr; grid-template-rows: auto; overflow: visible; }
  #play-home .play-home-choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-height: 0; }
  #play-home .play-home-frame-panel,
  #play-home .play-home-skin-panel,
  #play-home .play-home-preview-panel,
  #play-home #social-chat { grid-column: 1; grid-row: auto; }
  #play-home .play-home-panel { overflow: visible; }
  #play-home .nd-tab-list { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; grid-auto-rows: minmax(70px, auto); }
  #play-home .nd-chip-list { min-height: 72px; }
  #play-home .nd-chip-list > button { flex-basis: 76px; width: 76px; height: 62px; }
  #play-home .play-home-preview-panel { min-height: 460px; }
  #play-home .flightdeck-preview-scene { flex: 0 0 220px; }
  #play-home .play-home-workspace { min-height: 640px; }
  #play-home .flightdeck-footer { position: sticky; bottom: 0; z-index: 10; flex-direction: column; align-items: stretch; padding: 8px; background: #030609f2; }
  #play-home .play-home-actions { display: grid; grid-template-columns: 1fr 1fr auto; }
}

@media (max-height: 600px) and (orientation: landscape) and (pointer: coarse) {
  body[data-app-state="PLAY_HOME"] #play-home .play-home-body { display: grid; grid-template-rows: minmax(0, 1fr) 52px; height: calc(100dvh - 120px); min-height: 0; margin-top: 48px; padding: 4px 10px; gap: 4px; overflow: hidden; }
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-header { display: none !important; }
  #play-home .flightdeck-header { grid-template-columns: minmax(180px, .7fr) minmax(220px, 1fr); align-items: center !important; gap: 8px !important; min-height: 34px; padding: 0 0 4px; }
  #play-home .flightdeck-header .screen-eyebrow { display: none; }
  #play-home .flightdeck-header h1 { font-size: 20px !important; }
  #play-home .play-home-intro { max-width: 30ch; font-size: 11px; }
  body[data-app-state="PLAY_HOME"] #home-chat-launcher { position: fixed; z-index: 117; top: 2px; left: 136px; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #3ff3ff88; border-radius: 50%; background: #081923; color: var(--nd-accent); font: 700 20px/1 var(--nd-font-heading); cursor: pointer; }
  body[data-app-state="PLAY_HOME"] #home-chat-launcher[hidden] { display: none; }
  body[data-app-state="PLAY_HOME"] #home-chat-launcher svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  body[data-app-state="PLAY_HOME"] #home-chat-launcher b { position: absolute; top: -3px; right: -4px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border: 1px solid #081017; border-radius: 999px; background: #ffb347; color: #081017; font: 700 11px/1 var(--nd-font-label); }
  body[data-app-state="PLAY_HOME"] #play-home .play-home-workspace { position: relative; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); grid-template-rows: 60px minmax(0, 1fr); gap: 4px; }
  body[data-app-state="PLAY_HOME"] #play-home .play-home-choices { display: contents; }
  body[data-app-state="PLAY_HOME"] #play-home .play-home-frame-panel { grid-column: 1; grid-row: 1; }
  body[data-app-state="PLAY_HOME"] #play-home .play-home-skin-panel { grid-column: 2; grid-row: 1; }
  body[data-app-state="PLAY_HOME"] #play-home .play-home-preview-panel { grid-column: 1 / -1; grid-row: 2; }
  #play-home .play-home-frame-panel .flightdeck-section-heading,
  #play-home .play-home-skin-panel .flightdeck-section-heading { display: none; }
  #play-home .play-home-frame-panel { overflow: hidden; }
  #play-home .nd-tab-list { display: flex; align-items: center; gap: 4px; height: 100%; padding: 2px 5px; overflow-x: auto; overflow-y: hidden; }
  #play-home .nd-tab-list > button { display: grid; flex: 0 0 66px; grid-template-columns: 34px 12px; align-items: center; justify-items: center; gap: 2px; min-width: 66px; min-height: 52px; height: 52px; padding: 1px 3px; text-align: center; }
  #play-home .nd-tab-list img { grid-row: 1; width: 34px; height: 34px; min-width: 34px; min-height: 34px; }
  #play-home .nd-tab-list strong { align-self: center; font-size: 13px; line-height: 1; }
  #play-home .nd-tab-list strong { width: 12px; overflow: hidden; font-size: 0; line-height: 1; white-space: nowrap; }
  #play-home .nd-tab-list strong::before { content: attr(data-short-label); font: 700 13px/1 var(--nd-font-heading); }
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-frame-grid strong { font-size: 11px; }
  #play-home .nd-tab-list button > span:not(.frame-stat-bars) { display: none !important; }
  #play-home .nd-chip-list { gap: 6px; height: 100%; padding: 2px 5px; overflow-x: auto; overflow-y: hidden; }
  #play-home .nd-chip-list > button,
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-skins .play-home-skin { flex: 0 0 112px; width: 112px; height: 44px; min-height: 44px; flex-direction: row; gap: 4px; padding: 1px 5px; }
  #play-home .nd-chip-list img,
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-skins img { width: 32px; height: 32px; min-width: 32px; min-height: 32px; object-fit: contain; }
  #play-home .nd-chip-list span { display: block; flex: 1 1 auto; min-width: 0; max-width: 100%; overflow: hidden; font-size: 11px; line-height: 1.05; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-skins .play-home-skin span { font-size: 11px; }
  #play-home .play-home-preview-panel { padding-bottom: 0; }
  #play-home .play-home-preview-panel > .flightdeck-section-heading { min-height: 26px; padding: 1px 7px; }
  #play-home .play-home-preview-panel > .flightdeck-section-heading h2 { font-size: 12px; }
  #play-home .play-home-preview-panel > .flightdeck-section-heading > .nd-chip { min-height: 22px; }
  #play-home .flightdeck-preview-content { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 8px; padding: 5px 8px 7px; }
  body[data-app-state="PLAY_HOME"] #play-home .play-home-preview-panel .flightdeck-preview-right { display: grid; grid-template-columns: 124px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: center; gap: 5px; }
  #play-home .flightdeck-preview-left { position: relative; }
  #play-home .flightdeck-preview-scene { flex: 1 1 auto !important; height: auto; min-height: 66px !important; }
  #play-home .flightdeck-preview-scene img { width: min(82%, 300px); }
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-preview-left .flightdeck-preview-scene img { width: auto; max-width: 72%; height: 100px; object-fit: contain; }
  #play-home .flightdeck-preview-copy { position: absolute; z-index: 3; right: 4px; bottom: 2px; left: 8px; padding: 2px 4px !important; background: linear-gradient(90deg, #03090ee8, #03090e88); }
  #play-home .flightdeck-preview-copy #home-preview-role,
  #play-home .flightdeck-preview-copy #home-preview-mastery,
  #play-home .home-account-progression { display: none; }
  #play-home .flightdeck-preview-copy { padding: 2px 2px 0 !important; }
  #play-home .flightdeck-preview-copy h3 { font-size: 17px; }
  #play-home .flightdeck-preview-copy p { font-size: 11px; line-height: 1.25; }
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-preview-right #home-preview-stats { flex: none; width: 120px; height: 120px; max-height: 120px; }
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-preview-right #home-preview-stats.gear-pentagram svg { width: 120px; height: 120px; max-height: 120px; }
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-preview-right #home-preview-stats .pentagram-label { font-size: 24px; }
  #play-home .play-home-skill { grid-template-columns: 36px minmax(0, 1fr); min-height: 54px; margin: 0; padding: 5px; }
  #play-home .home-skill-icon { width: 34px; height: 34px; }
  #play-home .play-home-skill h2,
  #play-home .play-home-skill p { font-size: 11px; }
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-preview-right .play-home-skill h2,
  body[data-app-state="PLAY_HOME"] #play-home .flightdeck-preview-right .play-home-skill p { font-size: 11px; }
  #play-home .social-chat-header { min-height: 46px; padding: 0 4px 5px; }
  #play-home #home-chat-toggle { min-width: 44px; min-height: 44px; font-size: 11px; }
  #play-home .social-chat-header > span { font-size: 11px; }
  #play-home #social-feed { min-height: 60px; margin: 6px 0; }
  #play-home .social-line { gap: 5px; padding: 4px; font-size: 11px; }
  #play-home .social-line small { font-size: 11px; }
  #play-home #chat-form { flex-wrap: nowrap; gap: 5px; padding: 4px; }
  #play-home #chat-channel { flex: 0 0 64px; width: 64px; min-width: 64px; min-height: 44px; padding: 0 4px; font-size: 11px; }
  #play-home #chat-input { min-width: 0; min-height: 44px; padding: 0 8px; font-size: 12px; }
  #play-home #chat-form button { min-width: 52px; min-height: 44px; padding: 0 7px; font-size: 11px; }
  #play-home #social-chat > small { padding-top: 5px; font-size: 11px; }
  #play-home #sticker-tray { flex-wrap: nowrap; overflow-x: auto; }
  #play-home #sticker-tray button { flex: 0 0 44px; width: 44px; height: 44px; }
  #play-home .flightdeck-footer { min-height: 52px; height: 52px; align-items: center; gap: 6px; padding: 2px 0 0; overflow: visible; transform: translateY(-10px); }
  #play-home .flightdeck-loadout { display: none; }
  #play-home .flightdeck-footer-kicker { font-size: 11px; }
  #play-home .flightdeck-loadout .play-loadout-note,
  #play-home .flightdeck-loadout #home-status { font-size: 11px; }
  #play-home .play-home-actions { align-items: center; gap: 6px; min-height: 48px; }
  #play-home .play-home-actions button { min-height: 44px; padding: 4px 8px; font-size: 11px; white-space: nowrap; }
  #play-home .play-home-actions button::before { flex-basis: 16px; width: 16px; height: 16px; }
  #play-home .quick-play-mode { display: flex; flex-direction: row; align-items: center; gap: 4px; min-width: 0; font-size: 11px; line-height: 1.1; white-space: nowrap; }
  #play-home .quick-play-mode select { width: 76px; min-width: 76px; min-height: 44px; font-size: 11px; }
  #play-home #quick-play-feedback { position: absolute; z-index: 4; inset: auto 5px 5px; }
  body[data-app-state="PLAY_HOME"] #social-chat#social-chat {
    position: fixed;
    z-index: 31;
    top: 48px;
    right: max(0px, calc(100% - 100vw));
    left: auto;
    bottom: 60px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    width: min(360px, 86vw);
    grid-column: auto;
    grid-row: auto;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 10px 10px max(10px, env(safe-area-inset-bottom));
    border: 1px solid #3ff3ff99;
    border-right: 0;
    border-radius: 14px 0 0 0;
    box-shadow: -16px 0 40px #000b, inset 0 1px #3ff3ff33;
    transform: translateX(102%);
    transition: transform 180ms ease;
  }
  body[data-app-state="PLAY_HOME"] #social-chat#social-chat[data-drawer-open="true"] { transform: translateX(0); }
  body[data-app-state="PLAY_HOME"] #social-chat#social-chat[hidden] { display: none; }
  body[data-app-state="PLAY_HOME"] #social-chat #social-feed { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  body[data-app-state="PLAY_HOME"] #social-chat #chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; min-width: 0; margin-top: 6px; }
  body[data-app-state="PLAY_HOME"] #social-chat #chat-form label { display: none; }
  body[data-app-state="PLAY_HOME"] #social-chat #chat-input { width: 100%; box-sizing: border-box; }
  body[data-app-state="PLAY_HOME"] #social-chat #sticker-tray { min-width: 0; }
  body[data-app-state="PLAY_HOME"] #social-chat .social-chat-header { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: center; gap: 6px; min-height: 46px; padding: 0 4px 5px; }
  body[data-app-state="PLAY_HOME"] #social-chat .social-chat-header #home-chat-toggle { grid-column: 3; grid-row: 1; }
  body[data-app-state="PLAY_HOME"] #social-chat .social-chat-header .social-chat-title { grid-column: 1; grid-row: 1; }
  body[data-app-state="PLAY_HOME"] #social-chat .social-chat-header .social-chat-channel { grid-column: 2; grid-row: 1; }
  body[data-app-state="PLAY_HOME"] #social-chat .social-chat-header .social-chat-title { display: block; color: var(--nd-text-1); font: 700 13px/1.2 var(--nd-font-heading); }
  body[data-app-state="PLAY_HOME"] #social-chat .social-chat-header .social-chat-channel { font-size: 9px; white-space: nowrap; }
  body[data-app-state="PLAY_HOME"] #social-chat #home-chat-toggle { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--nd-text-1); font: 0/1 var(--nd-font-body); }
  body[data-app-state="PLAY_HOME"] #social-chat #home-chat-toggle::before { content: "×"; font: 400 24px/1 var(--nd-font-body); }
  body[data-app-state="PLAY_HOME"] #home-chat-launcher[aria-expanded="true"] { visibility: hidden; pointer-events: none; }
  body[data-app-state="PLAY_HOME"] #social-chat .social-chat-header > span { font-size: 11px; }
  body[data-app-state="PLAY_HOME"] #social-chat #social-feed { min-height: 60px; margin: 6px 0; }
  body[data-app-state="PLAY_HOME"] #social-chat .social-line { gap: 5px; padding: 4px; font-size: 11px; }
  body[data-app-state="PLAY_HOME"] #social-chat .social-line small { font-size: 11px; }
  body[data-app-state="PLAY_HOME"] #social-chat #chat-form { flex-wrap: nowrap; gap: 5px; padding: 4px; }
  body[data-app-state="PLAY_HOME"] #social-chat #chat-channel { flex: 0 0 64px; width: 64px; min-width: 64px; min-height: 44px; padding: 0 4px; font-size: 11px; }
  body[data-app-state="PLAY_HOME"] #social-chat #chat-input { min-width: 0; min-height: 44px; padding: 0 8px; font-size: 16px; }
  body[data-app-state="PLAY_HOME"] #social-chat #chat-form button { min-width: 52px; min-height: 44px; padding: 0 7px; font-size: 11px; }
  body[data-app-state="PLAY_HOME"] #social-chat > small { padding-top: 5px; font-size: 11px; }
  body[data-app-state="PLAY_HOME"] #social-chat #sticker-tray { flex-wrap: nowrap; overflow-x: auto; }
  body[data-app-state="PLAY_HOME"] #social-chat #sticker-tray button { flex: 0 0 44px; width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  #play-home .flightdeck-preview-scene img { animation: none; }
  #play-home .nd-tab-list > button,
  #play-home .nd-chip-list > button,
  #play-home .play-home-actions button { transition: none; }
  #play-home #social-chat { transition: none; }
}
