/* A fixed preview above a single wardrobe step with scrollable choices. */
body:has(.step-main) {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior-y: none;
}
html:has(.step-main) { scroll-padding-top: 0; }
#app:has(.step-main) {
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.header.step-header {
  width: 100%;
  max-width: none;
  height: 58px;
  min-height: 58px;
  padding: 0 max(18px, calc((100vw - 1160px) / 2));
  margin: 0;
  position: relative;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
}
.step-header .brand { font-size: 9px; gap: 7px; }
.step-header .brand-second { font-size: 18px; }
.step-header .brand-flower .icon { width: 30px; height: 30px; }
.step-header .mode-nav {
  position: static;
  order: initial;
  padding: 3px;
  gap: 3px;
  border-radius: 11px;
}
.step-header .nav-button { padding: 7px 12px; font-size: 10px; gap: 6px; }
.step-header .nav-button > .icon { width: 17px; height: 17px; }
.step-header .new-badge { font-size: 7px; }
.step-header .header-tools { margin: 0; gap: 13px; }
.step-header .album-button { font-size: 10px; }
.step-header .music-button { height: 31px; padding: 0 9px; }
.step-header .battle-header-label { font-size: 9px; }
.main.step-main {
  width: 100%;
  max-width: 1160px;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 18px max(12px, env(safe-area-inset-bottom));
  margin: 0 auto;
  overflow: hidden;
}
.step-main .intro,
.step-main > .footer,
body:has(.step-main) .mobile-look { display: none; }
.step-main .step-preview {
  position: relative;
  width: 100%;
  height: clamp(165px, 28dvh, 290px);
  min-height: 0;
  flex: 0 0 clamp(165px, 28dvh, 290px);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
}
.step-preview .studio-top { display: none; }
.step-preview .scene-stage {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: inherit;
}
.step-preview .main-character {
  width: min(330px, 74%);
  height: 98%;
  bottom: 1%;
  left: 50%;
  transform: translateX(-50%);
  animation: none;
}
.step-preview .main-character > svg { width: 100%; height: 100%; }
.step-preview .character-shadow { width: 150px; left: calc(50% - 75px); bottom: 9%; }
.step-preview .character-name {
  width: auto;
  right: 14px;
  bottom: 12px;
  left: auto;
  padding: 7px 12px;
  border-radius: 12px;
  background: #fff9ffe6;
  backdrop-filter: blur(8px);
  gap: 3px;
  text-align: right;
}
.step-preview .character-name > span:first-child { font-size: 12px; }
.step-preview .character-name > span:last-child { font-size: 8px; }
.step-preview .scene-pill { top: 10px; left: 12px; }
.step-preview .stage-tools { right: 12px; top: 12px; gap: 6px; }
.step-preview .round-tool { width: 30px; height: 30px; }
.step-preview .round-tool > .icon { width: 15px; height: 15px; }
.step-main .step-wardrobe {
  min-height: 0;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 16px;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
}
.step-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: 0 0 auto; }
.step-heading .step-title { min-width: 0; }
.step-heading .eyebrow { font-size: 7px; letter-spacing: 1.1px; margin-bottom: 4px; }
.step-heading h2 { margin: 0; font-family: 'Comfortaa', sans-serif; font-size: 18px; line-height: 1.35; color: #62417f; }
.step-heading .editor-shortcuts { flex-shrink: 0; }
.step-heading .editor-shortcuts > button { height: 28px; width: 28px; }
.step-track {
  display: flex;
  align-items: stretch;
  gap: 5px;
  min-height: 34px;
  flex: 0 0 auto;
  margin: 0;
}
.step-track button {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 5px;
  border: 1px solid #eee2f6;
  border-radius: 10px;
  background: #fbf7fe;
  color: #9877ad;
  font-size: 10px;
  line-height: 1.2;
}
.step-track button > span:first-child { font-weight: 900; }
.step-track button .icon { height: 14px; width: 14px; }
.step-track button[aria-current='step'] { color: #7541b0; background: #efe0ff; border-color: #c7a3e8; box-shadow: 0 2px 5px #976ac511; }
.step-track button:focus-visible,
.step-main .step-grid button:focus-visible,
.step-navigation button:focus-visible { outline: 3px solid #ad7be0; outline-offset: 2px; }
.step-main .step-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
}
.step-main .outfit-type-tabs { display: flex; justify-content: center; gap: 6px; flex: 0 0 auto; }
.step-main .outfit-type-tabs button {
  min-height: 29px;
  padding: 5px 16px;
  border: 1px solid #e9d7f5;
  border-radius: 8px;
  color: #9b79b3;
  background: #fffcff;
  font-size: 10px;
}
.step-main .outfit-type-tabs button[aria-pressed='true'],
.step-main .outfit-type-tabs button.active { background: #f0e2ff; border-color: #c8a2e8; color: #7c45b4; }
.step-main .step-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: none;
  grid-auto-rows: 132px;
  gap: 7px;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #b58ad8 #f5eafa;
  scroll-behavior: auto;
  padding: 2px;
  margin: 0;
}
.step-main .step-grid .item-card,
.step-main .step-grid .step-face-card,
.step-main .step-grid .step-scene-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #e9ddf4;
  border-radius: 12px;
  background: linear-gradient(140deg, #fffaff, #f4eafa);
  color: #9878ac;
  position: relative;
  overflow: hidden;
  flex: initial;
}
.step-main .step-grid > button:nth-child(3n+2) { background: linear-gradient(140deg, #fffaf8, #fff0ed); }
.step-main .step-grid > button:nth-child(3n) { background: linear-gradient(140deg, #f9fdff, #ecf5ff); }
.step-main .step-grid button[aria-pressed='true'],
.step-main .step-grid button.selected { border-color: #a774d6; background: #efe0ff; box-shadow: inset 0 0 0 1px #b284dc; }
.step-main .step-grid .item-art {
  width: min(100%, 110px);
  height: 0;
  min-height: 0;
  flex: 1;
  max-height: 108px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.step-main .step-grid .item-art > svg { width: 100%; height: 100%; }
.step-main .step-grid .item-name {
  flex: 0 0 auto;
  max-width: 100%;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.step-main .step-grid .item-check { height: 17px; width: 17px; right: 5px; top: 5px; }
.step-main .step-grid .item-check .icon { width: 10px; height: 10px; }
.step-main .step-grid .step-face-card { font-size: 10px; }
.step-main .step-grid .preset-face { width: 54px; height: 54px; min-height: 36px; flex: 0 1 54px; box-shadow: none; }
.step-main .step-grid .preset-face > svg { height: 195px; width: 130px; top: -18px; }
.step-main .step-grid .photo-preset .preset-face > svg { width: 24px; height: 24px; position: static; transform: none; }
.step-main .step-grid .photo-preset .preset-face { overflow: visible; }
.step-main .step-grid .step-scene-card > span:first-child {
  display: block;
  flex: 1;
  width: 100%;
  height: 0;
  min-height: 0;
  max-height: 130px;
  overflow: hidden;
  border-radius: 8px;
}
.step-main .step-grid .step-scene-card svg { width: 100%; height: 100%; }
.step-main .step-grid .step-scene-card small { font-size: 10px; }
.step-main .step-grid .empty-filter { grid-column: 1 / -1; grid-row: 1 / -1; align-self: center; margin: 10px; font-size: 11px; }
.step-main .step-colors {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 0 0 auto;
  min-height: 27px;
}
.step-main .step-colors > label,
.step-main .step-colors > span,
.step-main .step-colors .field-label { font-size: 9px; margin: 0; flex-shrink: 0; }
.step-main .step-colors .swatches { gap: 7px; margin: 0; justify-content: center; max-width: none; }
.step-main .step-colors .swatch { width: 24px; height: 24px; min-width: 24px; }
.step-main .step-grid::-webkit-scrollbar { width: 7px; height: 7px; }
.step-main .step-grid::-webkit-scrollbar-track { background: #f5eafa; border-radius: 8px; }
.step-main .step-grid::-webkit-scrollbar-thumb { background: #b58ad8; border: 1px solid #f5eafa; border-radius: 8px; }
.step-main .choices-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 18px;
  color: #a28cb3;
  font-size: 9px;
  line-height: 1.3;
}
.step-main .step-navigation {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) auto minmax(90px, 1fr);
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  border-top: 1px solid #f0e6f7;
  margin: 0;
  padding-top: 7px;
}
.step-navigation > button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  width: auto;
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid #e5d3f1;
  color: #9474af;
  background: #faf4ff;
}
.step-navigation > button:last-child { background: linear-gradient(120deg, #ad71e9, #8353d6); color: white; border-color: #a578d2; }
.step-navigation > button .icon { width: 15px; height: 15px; }
.step-navigation > button:first-child .icon { transform: rotate(180deg); }
.step-navigation > button:disabled { opacity: .35; }
.step-navigation > span,
.step-navigation > small { color: #ae93bf; font-size: 10px; text-align: center; }
.step-main .step-utilities { min-height: 19px; display: flex; align-items: center; justify-content: center; gap: 12px; flex: 0 0 auto; }
.step-utilities button { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 9px; color: #ab89bd; padding: 2px 8px; }
.step-utilities button .icon { height: 12px; width: 12px; }
/* The same fixed arrangement keeps both opponents visible. */
.step-main .battle-mission { min-height: 52px; flex: 0 0 auto; padding: 8px 14px; gap: 14px; border-radius: 15px; }
.step-main .mission-symbol { height: 34px; width: 34px; border-radius: 10px; }
.step-main .mission-symbol .icon { height: 20px; width: 20px; }
.step-main .mission-title { gap: 10px; }
.step-main .mission-title h1 { font-size: 17px; margin: 4px 0 0; letter-spacing: -.5px; }
.step-main .mission-title .eyebrow { font-size: 7px; letter-spacing: .7px; }
.step-main .mission-title p { display: none; }
.step-main .match-score { position: static; transform: none; padding: 6px 12px; gap: 8px; }
.step-main .match-score > span { font-size: 17px; }
.step-main .match-score > small { font-size: 6px; }
.step-main .battle-clock { height: 42px; width: 42px; border-width: 2px; box-shadow: 0 0 0 3px #f3eafa; }
.step-main .battle-clock > span { display: none; }
.step-main .battle-clock strong { font-size: 14px; }
.step-main .battle-clock > small { font-size: 5px; margin-top: 2px; }
.step-main .pause-button { height: 28px; width: 28px; font-size: 14px; }
.step-main .battle-arena {
  position: relative;
  top: auto;
  z-index: 1;
  margin: 0;
  width: 100%;
  height: clamp(145px, 25dvh, 250px);
  flex: 0 0 clamp(145px, 25dvh, 250px);
  min-height: 0;
  gap: 12px;
  border-radius: 17px;
}
.step-main .duel-lane { height: 100%; min-height: 0; display: flex; flex-direction: column; border-radius: 17px; }
.step-main .lane-heading { height: 31px; min-height: 31px; flex: 0 0 31px; padding: 6px 12px; gap: 7px; }
.step-main .lane-heading > strong { font-size: 11px; max-width: none; }
.step-main .lane-badge { display: none; }
.step-main .lane-ready { font-size: 8px; }
.step-main .duel-scene { flex: 1; min-height: 0; height: auto; }
.step-main .duel-character { height: 97%; width: 80%; left: 10%; bottom: 12px; }
.step-main .duel-podium { bottom: 15px; height: 8px; }
.step-main .lane-progress-label { bottom: 3px; font-size: 6px; }
.step-main .lane-speech { min-height: 29px; max-height: 38px; flex: 0 0 auto; padding: 5px 10px; line-height: 1.35; font-size: 8px; gap: 6px; overflow: hidden; align-items: center; }
.step-main .lane-speech > span { font-size: 12px; }
.step-main .lane-speech > button { height: 19px; width: 19px; min-width: 19px; }
.step-main .lane-speech > button .icon { height: 10px; width: 10px; }
.step-main .versus-medal { width: 34px; height: 34px; font-size: 13px; border-radius: 11px; border-width: 3px; top: 47%; }
.step-main .battle-workbench {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}
.step-main .battle-workbench.two-editors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.local-editor-switch { display: none; }
.step-main .rival-panel { display: none; }
.step-main .pause-banner,
.step-main .battle-ended { flex: 0 0 auto; min-height: 30px; padding: 5px 12px; margin: 0; border-radius: 10px; font-size: 10px; }
.step-main .pause-banner button,
.step-main .battle-ended button { font-size: 9px; padding: 5px 10px; }
.step-main .battle-ended > span { width: auto; font-size: 10px; }
@media (max-width: 700px) {
  .header.step-header { height: 48px; min-height: 48px; padding: 0 12px; gap: 7px; }
  .step-header .brand { font-size: 8px; gap: 4px; }
  .step-header .brand-second { font-size: 14px; }
  .step-header .brand-flower .icon { height: 25px; width: 25px; }
  .step-header .mode-nav { margin-left: auto; }
  .step-header .nav-button { padding: 6px 8px; font-size: 8px; gap: 3px; }
  .step-header .nav-button .icon { height: 14px; width: 14px; }
  .step-header .new-badge { display: none; }
  .step-header .header-tools { gap: 6px; }
  .step-header .album-button > span { display: none; }
  .step-header .album-button .icon { width: 17px; height: 17px; }
  .step-header .music-button { min-width: 27px; height: 27px; padding: 0 6px; }
  .step-header .music-button > span { display: none; }
  .step-header .battle-header-label { display: none; }
  .step-header .icon-button { height: 27px; width: 27px; }
  .main.step-main { gap: 7px; padding: 7px 9px max(7px, env(safe-area-inset-bottom)); }
  .step-main .step-preview { height: clamp(145px, 27dvh, 230px); flex-basis: clamp(145px, 27dvh, 230px); border-radius: 16px; }
  .step-preview .main-character { width: 70%; }
  .step-preview .character-name { bottom: 8px; right: 8px; padding: 5px 8px; max-width: 115px; }
  .step-preview .character-name > span:first-child { font-size: 10px; }
  .step-preview .character-name > span:last-child { display: none; }
  .step-preview .scene-pill { font-size: 7px; padding: 4px 7px; left: 8px; top: 8px; }
  .step-preview .stage-tools { top: 8px; right: 8px; gap: 5px; }
  .step-preview .round-tool { height: 25px; width: 25px; }
  .step-preview .round-tool .icon { height: 12px; width: 12px; }
  .step-main .step-wardrobe { padding: 9px 10px 7px; border-radius: 15px; gap: 6px; }
  .step-heading .eyebrow { font-size: 6px; margin-bottom: 2px; }
  .step-heading h2 { font-size: 14px; }
  .step-heading .editor-shortcuts > button { width: 25px; height: 25px; border-radius: 7px; }
  .step-track { min-height: 31px; gap: 3px; }
  .step-track button { flex-direction: column; gap: 2px; padding: 4px 1px; font-size: 7px; border-radius: 7px; }
  .step-track button .icon { height: 11px; width: 11px; }
  .step-main .step-body { gap: 5px; }
  .step-main .step-grid { gap: 5px; grid-auto-rows: 128px; }
  .step-main .step-grid .item-card,
  .step-main .step-grid .step-face-card,
  .step-main .step-grid .step-scene-card { padding: 4px; border-radius: 9px; gap: 3px; }
  .step-main .step-grid .item-art { max-height: 84px; width: min(100%, 90px); }
  .step-main .step-grid .item-name { font-size: 8px; }
  .step-main .step-grid .step-face-card { font-size: 8px; }
  .step-main .step-grid .preset-face { width: 45px; height: 45px; min-height: 30px; flex-basis: 45px; }
  .step-main .step-grid .preset-face > svg { width: 112px; height: 170px; top: -15px; }
  .step-main .step-grid .photo-preset .preset-face > svg { width: 22px; height: 22px; }
  .step-main .step-grid .step-scene-card small { font-size: 8px; }
  .step-main .choices-scroll-hint { min-height: 16px; font-size: 8px; }
  .step-main .step-colors { gap: 7px; min-height: 24px; }
  .step-main .step-colors > label,
  .step-main .step-colors > span,
  .step-main .step-colors .field-label { font-size: 8px; }
  .step-main .step-colors .swatches { gap: 6px; max-width: 235px; }
  .step-main .step-colors .swatch { height: 22px; width: 22px; min-width: 22px; }
  .step-main .step-navigation { gap: 7px; grid-template-columns: minmax(60px, 1fr) auto minmax(80px, 1fr); padding-top: 5px; }
  .step-navigation > button { font-size: 10px; min-height: 34px; padding: 6px 10px; gap: 5px; border-radius: 8px; }
  .step-navigation > button .icon { height: 12px; width: 12px; }
  .step-navigation > span,
  .step-navigation > small { font-size: 8px; }
  .step-main .step-utilities { min-height: 17px; }
  .step-utilities button { font-size: 8px; padding: 1px 5px; }
  .step-main .outfit-type-tabs { gap: 5px; }
  .step-main .outfit-type-tabs button { font-size: 9px; padding: 4px 12px; min-height: 25px; }
  .step-main .battle-mission { min-height: 44px; padding: 5px 9px; gap: 8px; border-radius: 12px; }
  .step-main .mission-symbol { display: none; }
  .step-main .mission-title h1 { font-size: 12px; margin-top: 3px; line-height: 1.25; }
  .step-main .mission-title .eyebrow { font-size: 5px; letter-spacing: .3px; }
  .step-main .match-score { padding: 4px 8px; gap: 5px; border-radius: 8px; }
  .step-main .match-score > span { font-size: 12px; }
  .step-main .match-score > small { font-size: 5px; }
  .step-main .battle-clock { height: 34px; width: 34px; box-shadow: none; }
  .step-main .battle-clock strong { font-size: 11px; }
  .step-main .battle-clock > small { font-size: 4px; }
  .step-main .pause-button { height: 24px; width: 23px; font-size: 12px; }
  .step-main .battle-arena { height: clamp(142px, 24dvh, 205px); flex-basis: clamp(142px, 24dvh, 205px); gap: 7px; }
  .step-main .duel-lane { border-radius: 12px; border-width: 1px; }
  .step-main .lane-heading { height: 26px; min-height: 26px; flex-basis: 26px; padding: 4px 7px; gap: 3px; }
  .step-main .lane-heading > strong { font-size: 9px; max-width: 95px; }
  .step-main .lane-ready { font-size: 0; }
  .step-main .lane-ready.done .icon { height: 10px; width: 10px; }
  .step-main .lane-ready:not(.done):after { height: 4px; width: 4px; box-shadow: none; }
  .step-main .duel-character { width: 98%; left: 1%; height: 99%; bottom: 10px; }
  .step-main .duel-podium { bottom: 12px; height: 5px; }
  .step-main .lane-progress-label { font-size: 5px; bottom: 3px; }
  .step-main .lane-speech { padding: 4px 6px; min-height: 25px; max-height: 33px; font-size: 6.5px; gap: 4px; line-height: 1.3; }
  .step-main .lane-speech > span { font-size: 9px; }
  .step-main .lane-speech > button { height: 16px; width: 16px; min-width: 16px; }
  .step-main .versus-medal { width: 27px; height: 27px; font-size: 10px; border-radius: 9px; border-width: 2px; }
  .step-main .battle-workbench { gap: 7px; }
  .step-main .pause-banner,
  .step-main .battle-ended { min-height: 26px; padding: 4px 7px; gap: 6px; font-size: 8px; flex-wrap: nowrap; }
  .step-main .pause-banner button,
  .step-main .battle-ended button { padding: 4px 6px; font-size: 7px; }
  .step-main .battle-ended > span { font-size: 7px; width: auto; }
  .step-main .battle-workbench.two-editors { display: flex; flex-direction: column; gap: 6px; }
  .step-main .two-editors .step-wardrobe { display: none; }
  .step-main .two-editors .step-wardrobe.active-editor { display: flex; flex: 1; min-height: 0; }
  .step-main .local-editor-switch { display: flex; align-items: stretch; justify-content: center; gap: 7px; min-height: 30px; flex: 0 0 auto; }
  .local-editor-switch > button { flex: 1; border: 1px solid #e3d0f1; border-radius: 9px; background: #fffaff; color: #a282b6; font-size: 10px; font-weight: 800; padding: 5px 9px; }
  .local-editor-switch > button[aria-pressed='true'] { color: #7e47b8; background: #f0e2ff; border-color: #c59ee4; }
  .local-editor-switch > button .icon { height: 12px; width: 12px; vertical-align: middle; margin-right: 5px; }
}
/* Smaller laptop windows and phones keep navigation visible below the choices. */
@media (max-height: 720px) {
  .header.step-header { height: 44px; min-height: 44px; }
  .main.step-main { gap: 6px; padding-top: 6px; padding-bottom: 6px; }
  .step-main .step-preview { height: clamp(115px, 25dvh, 170px); flex-basis: clamp(115px, 25dvh, 170px); }
  .step-main .battle-arena { height: clamp(110px, 23dvh, 165px); flex-basis: clamp(110px, 23dvh, 165px); }
  .step-main .step-wardrobe { gap: 5px; padding-top: 7px; padding-bottom: 6px; }
  .step-heading h2 { font-size: 13px; }
  .step-heading .eyebrow { font-size: 5.5px; margin-bottom: 2px; }
  .step-track { min-height: 29px; }
  .step-track button { padding-top: 3px; padding-bottom: 3px; }
  .step-main .step-body { gap: 4px; }
  .step-main .step-grid { grid-auto-rows: 112px; }
  .step-main .step-grid .preset-face { height: 38px; width: 38px; flex-basis: 38px; min-height: 25px; }
  .step-main .step-grid .preset-face > svg { height: 147px; width: 98px; top: -14px; }
  .step-main .step-grid .photo-preset .preset-face > svg { height: 20px; width: 20px; }
  .step-main .step-colors .swatch { height: 20px; width: 20px; min-width: 20px; }
  .step-navigation > button { min-height: 31px; font-size: 9px; padding-top: 5px; padding-bottom: 5px; }
  .step-main .step-utilities { min-height: 16px; }
  .step-main .battle-mission { min-height: 40px; padding-top: 4px; padding-bottom: 4px; }
  .step-main .lane-heading { height: 24px; min-height: 24px; flex-basis: 24px; }
  .step-main .lane-speech { min-height: 23px; max-height: 29px; padding-top: 3px; padding-bottom: 3px; }
}
@media (max-height: 560px) {
  .header.step-header { height: 38px; min-height: 38px; }
  .step-main .step-preview { height: 100px; flex-basis: 100px; }
  .step-main .battle-arena { height: 100px; flex-basis: 100px; }
  .step-main .battle-mission { min-height: 33px; }
  .step-main .battle-clock { height: 27px; width: 27px; }
  .step-main .mission-title h1 { font-size: 10px; }
  .step-main .mission-title .eyebrow { display: none; }
  .step-main .step-wardrobe { gap: 4px; padding: 5px 8px; }
  .step-heading .eyebrow { display: none; }
  .step-heading h2 { font-size: 11px; }
  .step-heading .editor-shortcuts > button { height: 21px; width: 21px; }
  .step-track { min-height: 24px; }
  .step-track button { flex-direction: row; gap: 4px; padding: 3px; font-size: 7px; }
  .step-main .step-grid { grid-auto-rows: 94px; gap: 4px; }
  .step-main .step-grid .item-name { font-size: 7px; }
  .step-main .step-grid .step-face-card { font-size: 7px; }
  .step-main .step-grid .preset-face { width: 32px; height: 32px; flex-basis: 32px; min-height: 20px; }
  .step-main .step-grid .preset-face > svg { width: 82px; height: 126px; top: -12px; }
  .step-main .step-colors { min-height: 20px; }
  .step-main .step-colors .swatch { width: 18px; height: 18px; min-width: 18px; }
  .step-main .step-colors .swatches { gap: 5px; max-width: none; }
  .step-main .step-navigation { padding-top: 4px; }
  .step-navigation > button { min-height: 25px; font-size: 8px; padding: 4px 10px; }
  .step-main .step-utilities { display: none; }
  .step-main .choices-scroll-hint { min-height: 14px; font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .step-main *, .step-main *::before, .step-main *::after { animation: none !important; transition: none !important; }
}

.step-main .step-photo-card .item-art { flex-direction: column; gap: 5px; color: #a171ce; }
.step-main .step-photo-card .item-art > .icon { flex: 0 1 38px; width: 38px; height: 38px; min-height: 18px; }
.step-main .step-photo-card .item-art > b { font-size: 8px; color: #fff; background: #af82d4; border-radius: 5px; padding: 2px 6px; }
.step-main .outfit-type-tabs button { display: flex; align-items: center; justify-content: center; gap: 5px; }
.step-main .outfit-type-tabs button .icon { width: 14px; height: 14px; }
.step-main .step-colors.empty { min-height: 27px; }
@media(max-width:700px){.step-main .step-colors.empty{min-height:24px}.step-main .outfit-type-tabs button .icon{width:12px;height:12px}}

/* In a short landscape window the mission shares the header row. */
@media (min-width:701px) and (max-height:480px) {
  .step-header .battle-header-label { visibility:hidden; }
  .battle-main.step-main > .battle-mission {
    position:absolute;z-index:2;top:3px;left:50%;transform:translateX(-50%);
    width:calc(100% - 330px);max-width:390px;height:32px;min-height:32px;
    padding:2px 8px;border-radius:9px;gap:8px;
  }
  .battle-main .mission-symbol { display:none; }
  .battle-main .mission-title h1 { font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
  .battle-main .match-score { padding:4px 7px;gap:4px; }
  .battle-main .match-score > span { font-size:11px; }
  .battle-main .battle-clock { height:25px;width:25px;box-shadow:none; }
  .battle-main .battle-clock strong { font-size:10px; }
  .battle-main .battle-clock small { display:none; }
  .battle-main .pause-button { height:23px;width:23px; }
  .step-main .lane-heading { height:20px;min-height:20px;flex-basis:20px;padding:3px 8px; }
  .step-main .lane-speech { display:none; }
}

/* A short landscape screen uses one continuous horizontal strip. */
@media (min-width:701px) and (max-height:560px) {
  .step-main .step-grid {
    grid-template-columns: none;
    grid-template-rows: minmax(0, 1fr);
    grid-auto-flow: column;
    grid-auto-columns: clamp(100px, 17vw, 150px);
    grid-auto-rows: auto;
    align-content: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: pan-x;
    scrollbar-gutter: auto;
    padding-bottom: 5px;
  }
}
