/* CHARACTER SELECT V4 — a fresh, self-contained arcade selector.
   No previous selection-refresh or portrait-v2 styles are loaded.
   Only the character art, room illustration, and game-side behavior are reused. */

body[data-screen="selection"] {
  background:#fff9fb!important;
  overflow:hidden!important;
}
body[data-screen="selection"] #selection:not([hidden]) {
  --select-ink:#382d43;
  --select-line:#d9cbd9;
  --select-paper:rgba(255,252,250,.94);
  --select-pink:#e27fae;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  align-items:stretch!important;
  align-content:stretch!important;
  box-sizing:border-box;
  width:100%!important;
  height:100dvh!important;
  min-height:100dvh!important;
  max-height:100dvh!important;
  margin:0!important;
  padding:clamp(10px,1.7dvh,22px) clamp(12px,2.4vw,40px)!important;
  gap:clamp(5px,.9dvh,12px)!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0!important;
  color:var(--select-ink)!important;
  background:#fffafc url("assets/selection-training-center-hanja.webp?v=hanja-dojo-20261118") center bottom/cover no-repeat!important;
  position:relative;
  isolation:isolate;
}
#selection, #selection * {box-sizing:border-box;}
#selection .select-head {
  grid-row:1;
  display:flex!important;
  width:100%!important;
  min-width:0;
  min-height:0!important;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#selection .select-head h2 {
  flex:1;
  min-width:0;
  margin:0!important;
  padding:0!important;
  color:#392d43!important;
  font:700 clamp(17px,2.15vw,30px)/1.1 "Kemco Pixel","Galmuri11",monospace!important;
  letter-spacing:.01em!important;
  text-shadow:1px 1px 0 #fff!important;
  white-space:nowrap;
}
#selection .select-head-actions {flex:none;display:flex;align-items:center;}
#selection #home {
  display:block;
  min-height:32px!important;
  margin:0!important;
  padding:6px 12px!important;
  color:#554560!important;
  background:rgba(255,255,255,.80)!important;
  border:1px solid #bfb2c7!important;
  border-radius:3px!important;
  box-shadow:none!important;
  font:500 clamp(11px,1vw,14px)/1.1 "Galmuri11",monospace!important;
  white-space:nowrap;
}
#selection #home:hover {background:#fff!important;}
#selection button:focus-visible {outline:2px solid #f080b1!important;outline-offset:2px;}

#selection .select-main {
  grid-row:2;
  display:grid!important;
  grid-template-columns:minmax(0,53fr) minmax(0,47fr)!important;
  gap:clamp(9px,1.8vw,30px);
  min-height:0;min-width:0;
  width:100%;
  height:100%;
  overflow:hidden;
  align-items:stretch;
}
/* The giant character occupies the room itself, not a framed card. */
#selection .fighter-display {
  position:relative;
  display:block;
  min-width:0;
  min-height:0;
  overflow:hidden;
  background:transparent;
  isolation:isolate;
}
#selection .studio {
  display:block!important;
  position:absolute!important;
  inset:0!important;
  width:100%!important;height:100%!important;
  min-height:0!important;max-height:none!important;
  margin:0!important;padding:0!important;
  overflow:hidden!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
  isolation:isolate;
}
#selection #select-stage {
  display:block!important;
  position:absolute!important;
  inset:0!important;
  width:100%!important;height:100%!important;
  z-index:0!important;
  margin:0;
  background:transparent!important;
  pointer-events:none;
  image-rendering:pixelated;
}
#selection #poster {
  display:block!important;
  position:absolute!important;
  inset:0!important;
  width:100%!important;height:100%!important;
  min-height:0!important;
  margin:0!important;
  z-index:1!important;
  overflow:hidden!important;
  user-select:none;
  touch-action:pan-y;
  background:transparent!important;
}
#selection #slide {
  position:absolute!important;
  inset:2% 8% 6%!important;
  width:auto!important;height:auto!important;
  min-height:0;
  overflow:hidden!important;
  pointer-events:none;
}
#selection #slide img,
#selection #slide img[data-id="3"] {
  position:absolute!important;
  inset:0!important;
  width:100%!important;height:100%!important;
  max-width:none!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  transform:none;
  clip-path:none!important;
  image-rendering:pixelated;
}
#selection #poster button {
  position:absolute!important;
  display:grid!important;
  place-items:center;
  top:47%!important;
  bottom:auto!important;
  width:clamp(29px,3.2vw,44px)!important;
  height:clamp(36px,4vw,52px)!important;
  min-height:0!important;
  padding:0!important;
  border:1px solid #b9aabd!important;
  border-radius:3px!important;
  background:rgba(255,252,250,.80)!important;
  box-shadow:0 1px 0 rgba(80,55,90,.13)!important;
  color:#694e72!important;
  font:400 clamp(20px,2.6vw,34px)/1 sans-serif!important;
  z-index:3!important;
  cursor:pointer;
}
#selection #prev {left:1%!important;right:auto!important;}
#selection #next {right:1%!important;left:auto!important;}
#selection #poster button:hover {border-color:var(--accent)!important;background:#fff!important;color:var(--accent)!important;}
#selection .fighter-identity {
  position:absolute;
  left:clamp(5px,1.6vw,24px);
  bottom:clamp(5px,1.2dvh,15px);
  max-width:min(84%,415px);
  z-index:5;
  padding:8px clamp(9px,1.1vw,15px);
  border-left:3px solid var(--accent,#f37bad);
  background:linear-gradient(90deg,rgba(255,250,252,.97),rgba(255,250,252,.72));
  box-shadow:1px 1px 0 rgba(95,66,100,.1);
  text-align:left;
}
#selection .identity-kicker {
  display:block;
  color:#a08099;
  font:700 clamp(9px,.7vw,11px)/1.15 "Kemco Pixel","Galmuri11",monospace;
  letter-spacing:.08em;
}
#selection .identity-line {display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 10px;}
#selection #fighterName {
  margin:2px 0 0!important;
  font:700 clamp(22px,2.6vw,42px)/1.12 "Galmuri11",monospace!important;
  text-shadow:1px 1px #fff;
  color:var(--accent,#d97aa4)!important;
  white-space:nowrap;
}
#selection #styleName {
  display:block!important;
  font:400 clamp(10px,.88vw,14px)/1.35 "Galmuri11",monospace!important;
  color:#5b4c63!important;
  word-break:keep-all;
  max-width:260px;
}

#selection .select-sidebar {
  display:flex!important;
  flex-direction:column!important;
  justify-content:center;
  gap:clamp(10px,1.6dvh,19px);
  align-self:stretch;
  min-height:0;min-width:0;
  height:100%;
  margin:0!important;
  padding:clamp(11px,1.5vw,24px)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-width:thin;
  scrollbar-color:#d7b6cb transparent;
  background:var(--select-paper)!important;
  border:1px solid #e0d6df!important;
  border-top:3px solid var(--accent,#ec9abb)!important;
  border-radius:3px;
  box-shadow:0 4px 20px rgba(56,40,71,.07);
  backdrop-filter:blur(2px);
}
#selection .desk {
  display:block!important;
  flex:none;
  width:100%!important;
  min-height:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:visible!important;
  background:transparent!important;
  backdrop-filter:none!important;
}
#selection .desk::before {content:none!important;display:none!important;}
#selection .roster-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
  margin:0 0 clamp(6px,.9dvh,10px);
}
#selection .roster-title strong {
  color:#5c4767;
  font:700 clamp(11px,.93vw,15px)/1.3 "Kemco Pixel","Galmuri11",monospace;
  letter-spacing:.025em;
}
#selection .pick {display:none!important;}
#selection .desk .names {
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-auto-flow:row!important;
  grid-template-rows:repeat(2,auto)!important;
  gap:clamp(5px,.8vw,15px)!important;
  width:100%!important;
  padding:0!important;margin:0!important;
  border:0!important;
  background:transparent!important;
}
#selection .names button.fighter-card {
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  width:100%!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  padding:4px 2px!important;
  margin:0!important;
  position:relative;
  border:0!important;
  border-radius:5px!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--select-ink)!important;
  outline-offset:1px;
  transition:background .12s ease;
}
#selection .names button.fighter-card:hover {background:rgba(236,163,196,.10)!important;}
#selection .names button.fighter-card[aria-pressed="true"] {
  border:0!important;
  background:color-mix(in srgb,var(--member) 12%,#fff)!important;
}
#selection .names button.fighter-card[aria-pressed="true"]::before {
  content:"▼"!important;
  display:block!important;
  position:absolute!important;
  left:50%!important;
  top:-7px!important;
  width:auto;height:auto;
  transform:translateX(-50%);
  font:700 12px/1 sans-serif!important;
  color:var(--member)!important;
  z-index:4;
}
#selection .fighter-thumb {
  position:relative!important;
  display:block!important;
  flex:none!important;
  aspect-ratio:1!important;
  width:clamp(60px,10dvh,114px)!important;
  height:clamp(60px,10dvh,114px)!important;
  max-width:100%!important;
  margin:0 auto!important;
  padding:0!important;
  overflow:hidden!important;
  background:linear-gradient(155deg,#fff,#eee7ee)!important;
  border:2px solid #c0b3c4!important;
  border-radius:50%!important;
  box-shadow:0 2px 0 rgba(60,43,65,.12)!important;
  isolation:isolate;
}
#selection .names button.fighter-card[aria-pressed="true"] .fighter-thumb {
  border-color:var(--member)!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--member) 28%,transparent),0 2px 0 rgba(60,43,65,.1)!important;
}
#selection .fighter-thumb img {
  position:absolute!important;
  display:block!important;
  top:47%!important;
  left:50%!important;
  bottom:auto!important;right:auto!important;
  width:auto!important;
  height:var(--portrait-zoom,375%)!important;
  min-width:0!important;
  max-width:none!important;
  min-height:0!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:center!important;
  transform:translate(var(--face-offset-x,-50%),var(--face-offset-y,-27%))!important;
  image-rendering:pixelated;
}
#selection .fighter-thumb[data-pose="0"] img {--portrait-zoom:375%;--face-offset-x:-54%;--face-offset-y:-28%;}
#selection .fighter-thumb[data-pose="1"] img {--portrait-zoom:365%;--face-offset-x:-52%;--face-offset-y:-36%;}
#selection .fighter-thumb[data-pose="2"] img {--portrait-zoom:400%;--face-offset-x:-49%;--face-offset-y:-24%;}
#selection .fighter-thumb[data-pose="3"] img {--portrait-zoom:390%;--face-offset-x:-70%;--face-offset-y:-25%;}
#selection .fighter-thumb[data-pose="4"] img {--portrait-zoom:385%;--face-offset-x:-47%;--face-offset-y:-35%;}
#selection .fighter-thumb[data-pose="5"] img {--portrait-zoom:370%;--face-offset-x:-52%;--face-offset-y:-25%;}
#selection .fighter-label {
  display:block!important;
  width:auto!important;
  max-width:100%;
  margin:0!important;
  padding:0!important;
  color:#473b50!important;
  font:600 clamp(11px,.92vw,15px)/1.3 "Galmuri11",monospace!important;
  white-space:nowrap;
  text-align:center;
}
#selection .technique-section {
  display:block;
  flex:none;
  width:100%;
  min-width:0;
  margin:0;
  padding-top:clamp(7px,.9dvh,12px);
  border-top:1px solid #e9dfe8;
}
#selection .technique-heading {
  display:flex;justify-content:space-between;align-items:center;
  margin:0 0 clamp(7px,1dvh,13px);
  color:#68536e;
  font:700 clamp(11px,.94vw,15px)/1.25 "Kemco Pixel","Galmuri11",monospace;
}
#selection .technique-heading span {color:#b49ab1;font:600 11px/1.3 "Galmuri11",monospace;}
#selection .skill-slots {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:clamp(6px,.8vw,12px)!important;
  width:100%;
  min-width:0;
  margin:0!important;padding:0!important;
  background:transparent!important;
  border:0!important;
}
#selection .move-card {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:7px;
  min-width:0;
  margin:0;
  padding:clamp(8px,1vw,14px);
  border:1px solid #e2d7e2;
  border-left:2px solid var(--move-accent,#e58cae);
  border-radius:3px;
  background:rgba(255,255,255,.83);
  box-shadow:none;
}
#selection .move-card .skill-pixel-icon {
  display:block;
  flex:none;
  width:clamp(28px,2.8vw,39px)!important;
  height:clamp(28px,2.8vw,39px)!important;
  border:0!important;
  background:#2b2236;
  image-rendering:pixelated;
}
#selection .move-copy {min-width:0;width:100%;text-align:left;}
#selection .move-kind {
  display:block;
  margin-bottom:4px;
  font:500 clamp(10px,.8vw,12px)/1.2 "Galmuri11",monospace;
  color:#8a7b91;
}
#selection .move-name {
  display:block;
  margin-bottom:5px;
  font:700 clamp(12px,1.08vw,17px)/1.25 "Galmuri11",monospace;
  color:#372b40;
  word-break:keep-all;
}
#selection .move-description {
  margin:0!important;
  padding:0!important;
  font:400 clamp(10px,.82vw,13px)/1.48 "Galmuri11",monospace!important;
  color:#66586c!important;
  white-space:normal!important;
  word-break:keep-all;
  overflow-wrap:break-word;
}
#selection .select-footer {
  display:flex;
  flex-direction:column;
  gap:clamp(5px,.75dvh,11px);
  width:100%;
  min-width:0;
  margin-top:0;
  padding-top:clamp(6px,1dvh,13px);
  border-top:1px solid #e9dfe8;
}
#selection .selection-status {
  display:flex!important;
  gap:8px!important;
  align-items:center!important;
  width:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#54465d!important;
}
#selection .selection-status-title {
  font:700 clamp(9px,.76vw,12px)/1.2 "Kemco Pixel","Galmuri11",monospace!important;
  color:#a38ba2!important;
  white-space:nowrap;
}
#selection #matchup.matchup-bar {
  display:flex!important;
  flex:1;
  justify-content:space-between;
  align-items:center;
  gap:6px;
  min-width:0;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#5d4e65!important;
  font:500 clamp(10px,.8vw,13px)/1.3 "Galmuri11",monospace!important;
}
#selection #matchup .match-side {display:flex!important;align-items:center;gap:4px;min-width:0;}
#selection #matchup .match-name {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#selection #matchup .match-vs {font-size:10px;color:#b7a9bd;}
#selection #matchup .match-role {
  padding:2px 4px;
  border:1px solid #e1d5df;
  color:#837487;
  background:#f7f1f5;
  font-size:10px;
  flex:none;
}
#selection #cpuDifficulty {display:none!important;}
#selection .mobile-cpu-chooser {
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  gap:clamp(5px,.8vw,12px)!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
}
body[data-mode="duo"] #selection .mobile-cpu-chooser {display:none!important;}
#selection .cpu-small-label {
  flex:none;
  color:#5a4b63;
  font:700 clamp(10px,.82vw,13px)/1.2 "Galmuri11",monospace;
  white-space:nowrap;
}
#selection .mobile-cpu-heading {display:block!important;flex:none;margin:0!important;}
#selection .mobile-cpu-heading label {display:flex;align-items:center;gap:3px;font:400 10px/1.3 "Galmuri11",monospace!important;color:#8b7e8b!important;white-space:nowrap;}
#selection #mobile-difficulty {
  display:block!important;
  min-height:28px!important;
  width:auto!important;
  padding:4px 5px!important;
  border:1px solid #d3c5d4!important;
  border-radius:2px!important;
  background:#fff!important;
  color:#58465f!important;
  font-size:11px!important;
}
#selection .mobile-cpu-controls {
  display:flex!important;
  flex:1!important;
  justify-content:flex-end!important;
  align-items:center!important;
  min-width:0;
  gap:5px!important;
}
#selection .mobile-cpu-controls button {
  display:grid!important;
  place-items:center!important;
  flex:none;
  min-width:25px!important;
  width:25px!important;
  height:29px!important;
  min-height:0!important;
  margin:0!important;padding:0!important;
  background:#fff!important;
  border:1px solid #d1c1d1!important;
  color:#634e6a!important;
  border-radius:2px!important;
  box-shadow:none!important;
  font:400 18px/1 sans-serif!important;
}
#selection .mobile-cpu-controls #mobile-cpu-random {
  width:auto!important;
  min-width:0!important;
  padding:0 7px!important;
  font:500 10px/1 "Galmuri11",monospace!important;
}
#selection #mobile-cpu-image {
  width:28px!important;height:28px!important;
  flex:none;
  border-radius:50%!important;
  object-fit:cover;
  object-position:center 22%;
  image-rendering:pixelated;
  background:#f4edf2;
  border:1px solid #cfc0cc;
}
#selection #mobile-cpu-name {
  flex:none;
  font:700 clamp(11px,.9vw,13px)/1.2 "Galmuri11",monospace!important;
  white-space:nowrap;
}
#selection .selection-action-bar {
  display:flex!important;
  align-items:stretch!important;
  justify-content:flex-end!important;
  gap:7px!important;
  flex-wrap:nowrap!important;
  width:100%!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#selection .selection-action-bar .flow-cta {
  display:inline-flex!important;
  flex:1 1 auto!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  min-height:clamp(33px,4.8dvh,49px)!important;
  height:auto!important;
  margin:0!important;
  padding:7px 11px!important;
  border:1px solid #b986a3!important;
  border-radius:3px!important;
  background:#744d70!important;
  color:#fff9fb!important;
  box-shadow:none!important;
  font:700 clamp(11px,1vw,14px)/1.25 "Galmuri11",monospace!important;
  white-space:nowrap;
  cursor:pointer;
}
#selection .selection-action-bar .flow-cta:hover:not(:disabled) {background:#8f608a!important;}
#selection .selection-action-bar .flow-cta:disabled {cursor:not-allowed;opacity:.55;}
body[data-mode="duo"] #selection #launch {display:none!important;}
body:not([data-mode="duo"]) #selection #online-ready {display:none!important;}
#selection #online-selection-info {
  flex:1 1 55%;
  color:#716076!important;
  margin:0!important;
  padding:3px 0!important;
  font:400 11px/1.3 "Galmuri11",monospace!important;
}

/* Compact browser/mobile landscape — one landscape page, readable without
   squeezing the character or depending on portrait selection UI. */
@media (orientation:landscape) and (max-height:650px) {
  body[data-screen="selection"] #selection:not([hidden]) {
    padding:max(6px,env(safe-area-inset-top)) max(9px,env(safe-area-inset-right))
            max(6px,env(safe-area-inset-bottom)) max(9px,env(safe-area-inset-left))!important;
    gap:5px!important;
  }
  #selection .select-head h2 {font-size:clamp(14px,2.45dvh,20px)!important;}
  #selection #home {min-height:26px!important;padding:4px 7px!important;font-size:10px!important;}
  #selection .select-main {grid-template-columns:minmax(0,51fr) minmax(0,49fr)!important;gap:8px;}
  #selection .select-sidebar {justify-content:flex-start;padding:clamp(6px,1.5dvh,11px)!important;gap:5px;}
  #selection .roster-title {margin-bottom:3px;}
  #selection .roster-title strong {font-size:10px;}
  #selection .desk .names {gap:2px 6px!important;}
  #selection .names button.fighter-card {gap:1px!important;padding:1px!important;}
  #selection .fighter-thumb {
    width:clamp(44px,13.5dvh,68px)!important;
    height:clamp(44px,13.5dvh,68px)!important;
    border-width:1px!important;
  }
  #selection .fighter-label {font-size:clamp(10px,2.65dvh,12px)!important;line-height:1.15!important;}
  #selection .technique-section {padding-top:5px;}
  #selection .technique-heading {margin-bottom:4px;font-size:10px;}
  #selection .skill-slots {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;}
  #selection .move-card {flex-direction:row;gap:5px;padding:5px;}
  #selection .move-card .skill-pixel-icon {width:25px!important;height:25px!important;}
  #selection .move-kind {font-size:9px;margin-bottom:2px;}
  #selection .move-name {font-size:clamp(10px,2.5dvh,12px);margin-bottom:2px;}
  #selection .move-description {font-size:clamp(9px,2.25dvh,11px)!important;line-height:1.32!important;}
  #selection .select-footer {gap:3px;padding-top:4px;}
  #selection .selection-status-title {font-size:9px!important;}
  #selection #matchup.matchup-bar {font-size:10px!important;}
  #selection .cpu-small-label {font-size:10px;}
  #selection .mobile-cpu-heading label {font-size:9px!important;}
  #selection #mobile-difficulty {min-height:23px!important;padding:2px!important;font-size:10px!important;}
  #selection .mobile-cpu-controls button {width:23px!important;height:23px!important;}
  #selection #mobile-cpu-image {width:23px!important;height:23px!important;}
  #selection #mobile-cpu-name {font-size:11px!important;}
  #selection .selection-action-bar .flow-cta {min-height:32px!important;font-size:11px!important;padding:5px 10px!important;}
  #selection .fighter-identity {padding:5px 8px;max-width:88%;}
  #selection #fighterName {font-size:clamp(18px,5dvh,27px)!important;}
  #selection #styleName {font-size:clamp(9px,2.35dvh,11px)!important;max-width:210px;}
  #selection .identity-kicker {font-size:8px;}
}
@media (orientation:landscape) and (max-height:415px) {
  #selection .select-sidebar {padding:5px!important;gap:4px;}
  #selection .fighter-thumb {width:clamp(38px,12.3dvh,52px)!important;height:clamp(38px,12.3dvh,52px)!important;}
  #selection .skill-slots {grid-template-columns:minmax(0,1fr)!important;gap:3px!important;}
  #selection .move-card {flex-direction:row;gap:7px;padding:3px 5px;}
  #selection .move-card .skill-pixel-icon {width:21px!important;height:21px!important;}
  #selection .move-kind {display:inline;font-size:9px;margin:0 5px 0 0;}
  #selection .move-name {display:inline;font-size:11px;margin:0;}
  #selection .move-description {margin:2px 0 0!important;font-size:9px!important;line-height:1.2!important;}
  #selection .technique-heading {margin-bottom:2px;}
  #selection .roster-title {margin-bottom:2px;}
  #selection .mobile-cpu-chooser {gap:5px!important;}
  #selection .cpu-small-label {font-size:9px;}
  #selection .mobile-cpu-controls {gap:3px!important;}
  #selection #mobile-cpu-image {display:none!important;}
  #selection .fighter-identity {bottom:3px;left:4px;}
}
@media (orientation:landscape) and (max-width:680px) {
  #selection .select-main {grid-template-columns:minmax(0,47fr) minmax(0,53fr)!important;gap:6px;}
  #selection .mobile-cpu-heading label {font-size:0!important;}
  #selection #mobile-difficulty {font-size:10px!important;}
  #selection .cpu-small-label {display:none;}
  #selection .match-role {display:none;}
}
/* Portrait desktops can scroll. Mobile phones show the rotation gate. */
@media (orientation:portrait) {
  body[data-screen="selection"] {overflow-y:auto!important;}
  body[data-screen="selection"] #selection:not([hidden]) {
    height:auto!important;min-height:100dvh!important;max-height:none!important;
    overflow:visible!important;
    grid-template-rows:auto auto!important;
    background:#faf7f9!important;
  }
  #selection .select-main {
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:clamp(245px,46dvh,460px) auto!important;
    height:auto!important;overflow:visible!important;
  }
  #selection .fighter-display {min-height:0;height:100%;}
  #selection .select-sidebar {height:auto!important;overflow:visible!important;}
  #selection .fighter-display {
    background:#fff url("assets/selection-training-center-hanja.webp?v=hanja-dojo-20261118") center bottom/cover no-repeat!important;
    border:1px solid #eee3eb;
  }
  #selection .fighter-thumb {width:clamp(58px,16vw,110px)!important;height:clamp(58px,16vw,110px)!important;}
}
/* The portrait gate must hide scrolling content from the first load onward. */
body.orientation-gated {height:100dvh!important;overflow:hidden!important;overscroll-behavior:none;}
body.orientation-gated #rotate-gate:not([hidden]) {z-index:2000;}
@media (prefers-reduced-motion:reduce){
  #selection .names button.fighter-card {transition:none;}
}
