/* agT2-1109 - Character select "B · Face-off" (+ deck library, load, card art / loadout, scout, more options).
   Colours come ONLY from the shared theme tokens (--t-*), with fallbacks equal to the Midnight tone so the screen looks right
   before / without the theme system. Constant (never themed): text on card art (white on a dark scrim) and the status
   colours of the deck check (ok / warn / bad - the zone palette). Loaded after style.css + portal.css; every rule is scoped to
   #setup.cs2 so the old character-select rules it overrides stay untouched for anything else. */
#setup.cs2 {
  --fo-bg: var(--t-bg, #0a0f1f);
  --fo-surf: var(--t-surf, #121a33);
  --fo-surf2: var(--t-surf2, #182246);
  --fo-line: var(--t-line, #2a3766);
  --fo-text: var(--t-text, #e8ecff);
  --fo-muted: var(--t-muted, #9aa6cf);
  --fo-accent: var(--t-accent, #6fd3ff);
  --fo-on-accent: var(--t-on-accent, #0a0f1f);
  --fo-p1: var(--t-p1, #6fd3ff);
  --fo-on-p1: var(--t-on-p1, #0a0f1f);
  --fo-p2: var(--t-p2, #b69cff);
  --fo-on-p2: var(--t-on-p2, #140f1a);
  --fo-ok: #5ccf92;
  --fo-warn: var(--zone-l, #f5d04a);
  --fo-bad: var(--zone-h, #ff6b5e);
  --fo-bad-text: color-mix(in srgb, #e5484d 72%, var(--fo-text));
  --fo-scrim: rgb(6 9 20 / 0.82);
  --fo-display: "Chakra Petch", "Arial Narrow Bold", sans-serif;
  --fo-card-h: clamp(300px, calc(100vh - 330px), 540px);
  max-width: none; margin: -1.5rem; border: 0; padding: 0 clamp(16px, 4vw, 60px) 12px;
  min-height: 100vh; min-height: 100dvh; box-sizing: border-box;
  display: flex; flex-direction: column;
  background: var(--fo-bg); color: var(--fo-text);
  font-family: Manrope, -apple-system, "Segoe UI", "Noto Sans", sans-serif;
}
#setup.cs2[hidden] { display: none; }
#setup.cs2::before { display: none; }
#setup.cs2 .cs2-sr, #setup.cs2 .title-bar h1.cs2-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
#setup.cs2 [hidden] { display: none !important; }
#setup.cs2 button { font-family: inherit; -webkit-tap-highlight-color: transparent; }
#setup.cs2 button:not(:disabled):active { transform: translateY(1px); }
#setup.cs2 button:focus-visible, #setup.cs2 input:focus-visible, #setup.cs2 select:focus-visible, #setup.cs2 textarea:focus-visible {
  outline: 2px solid var(--fo-accent); outline-offset: 2px;
}

/* ---- header ---- */
#setup.cs2 .cs2-titlebar { min-height: 64px; padding: 14px 150px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; }
#setup.cs2 .cs2-titlebar .eyebrow { font-size: 12px; letter-spacing: 4px; text-transform: uppercase; color: var(--fo-muted); margin: 0; }
#setup.cs2 .cs2-titlebar .format { display: none; font-size: 13px; color: var(--fo-muted); letter-spacing: 0; text-transform: none; }
#setup.cs2[data-section="tutorial"] .cs2-titlebar .format { display: block; }
#setup.cs2 .cs2-toplinks { display: none; }
#setup.cs2[data-section="play"] .setup-nav { display: none; }
#setup.cs2[data-section="tutorial"] .cs2-toplinks, #setup.cs2[data-section="tutorial"] .cs2-recent { display: none !important; }
#setup.cs2 .setup-nav { border-color: var(--fo-line); }
#setup.cs2 .setup-nav-item { color: var(--fo-muted); }
#setup.cs2 .setup-nav-item.active { color: var(--fo-accent); border-color: var(--fo-accent); }
#setup.cs2 .tutorial-section { width: 100%; max-width: 1200px; margin: 0 auto; }
/* T1's --on-tutorial: the label on the tutorial indigo (today's dark label on the dark tones, white on the light tones' deeper indigo) */
#setup.cs2 .tutorial-learn-btn { color: var(--on-tutorial, #0a0d1a); }

#setup.cs2 .cs2-link {
  background: none; border: 0; border-radius: 6px; padding: 6px 4px; min-height: 32px;
  color: var(--fo-accent); font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; width: auto; margin: 0; box-shadow: none;
}
#setup.cs2 .cs2-link:hover { text-decoration: underline; }

/* ---- recent matchups ---- */
#setup.cs2 .cs2-recent { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; justify-content: center; padding: 2px 0 6px; }
#setup.cs2 .cs2-recent-lead { font-size: 13px; color: var(--fo-muted); }
#setup.cs2 .cs2-recent-chips { display: flex; gap: 8px; flex-wrap: wrap; }
#setup.cs2 .cs2-chip {
  height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--fo-line); background: var(--fo-surf);
  color: var(--fo-text); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
#setup.cs2 .cs2-chip.on { background: var(--fo-accent); border-color: var(--fo-accent); color: var(--fo-on-accent); }

/* ---- the face-off stage ---- */
#setup.cs2 .cs2-stage {
  flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px) minmax(0, 1fr);
  grid-template-areas: "p1 console p2"; gap: clamp(20px, 3vw, 40px); align-items: center; padding: 6px 0 18px;
}
#setup.cs2 #csSideHuman { grid-area: p1; }
#setup.cs2 #opponentHalf, #setup.cs2 #csFriendSide { grid-area: p2; }
#setup.cs2 .cs2-console { grid-area: console; }
#setup.cs2 .cs2-vs-badge { display: none; }
#setup.cs2 .cs2-side { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; padding: 0; color: var(--fo-text); align-self: start; }
#setup.cs2 .cs2-console { align-self: center; }

#setup.cs2 .cs2-card, #setup.cs2 .cs2-slot {
  position: relative; box-sizing: border-box; width: min(100%, calc(var(--fo-card-h) * 5 / 7)); aspect-ratio: 5 / 7; border-radius: 18px;
}
#setup.cs2 .cs2-card { border: 3px solid var(--fo-p1); background: var(--fo-surf2); overflow: hidden; box-shadow: 0 14px 34px rgb(0 0 0 / 0.32); }
#setup.cs2 .p2 .cs2-card { border-color: var(--fo-p2); }
#setup.cs2 .cs2-card .fighter-portrait { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; border: 0; box-shadow: none; background: var(--fo-surf2); }
#setup.cs2 .cs2-card .fighter-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }
#setup.cs2 .cs2-card .portrait-empty { color: var(--fo-muted); }
#setup.cs2 .cs2-card .loading-cap { color: var(--fo-accent); text-shadow: none; }
#setup.cs2 .cs2-card .deck-shuffle .card { border-color: var(--fo-line); background: repeating-linear-gradient(135deg, var(--fo-surf) 0 6px, var(--fo-surf2) 6px 12px); }

#setup.cs2 .cs2-pill {
  font-size: 13px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; padding: 4px 12px; border-radius: 999px;
  background: var(--fo-p1); color: var(--fo-on-p1); white-space: nowrap;
}
#setup.cs2 .p2 .cs2-pill { background: var(--fo-p2); color: var(--fo-on-p2); }
#setup.cs2 .cs2-card .cs2-pill { position: absolute; top: 14px; left: 14px; z-index: 2; box-shadow: 0 2px 8px rgb(0 0 0 / 0.35); }
#setup.cs2 .p2 .cs2-card .cs2-pill { left: auto; right: 14px; }

#setup.cs2 .cs2-warn {
  position: absolute; z-index: 3; left: 12px; right: 12px; top: 54px; min-height: 40px; padding: 8px 12px; border-radius: 10px;
  border: 0; background: var(--fo-warn); color: #1a1406; font-size: 13px; font-weight: 800; cursor: pointer; text-align: center;
}
#setup.cs2 .cs2-scout-btn svg { flex-shrink: 0; }

#setup.cs2 .cs2-info { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; max-width: 100%; }
#setup.cs2 .cs2-name { font-family: var(--fo-display); font-weight: 700; font-size: clamp(28px, 3vw, 44px); line-height: 1; text-transform: uppercase; letter-spacing: 0.5px; overflow-wrap: anywhere; }
#setup.cs2 .cs2-meta { font-size: 14px; color: var(--fo-muted); line-height: 1.4; }
#setup.cs2 .cs2-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
#setup.cs2 .cs2-btn {
  min-height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--fo-line); background: var(--fo-surf); color: var(--fo-text);
  font-size: 15px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0; width: auto; box-shadow: none;
}
#setup.cs2 .cs2-btn:hover:not(:disabled) { border-color: var(--fo-accent); }
#setup.cs2 .cs2-btn:disabled { opacity: 0.55; }
#setup.cs2 .cs2-only-phone { display: none; }

/* empty slot: dashed "Load your deck" (+ the saved-deck strip when the library has decks) */
#setup.cs2 .cs2-slot { border: 3px dashed var(--fo-p1); background: var(--fo-surf); display: flex; flex-direction: column; padding: 14px; gap: 10px; }
#setup.cs2 .p2 .cs2-slot { border-color: var(--fo-p2); }
#setup.cs2 .cs2-slot-main {
  flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 12px;
  background: none; border: 0; border-radius: 12px; color: var(--fo-text); cursor: pointer; text-align: center; width: 100%;
}
#setup.cs2 .cs2-slot-main:hover .cs2-slot-title { text-decoration: underline; text-decoration-thickness: 2px; }
#setup.cs2 .cs2-slot-ic { color: var(--fo-p1); flex: none; }
#setup.cs2 .p2 .cs2-slot-ic { color: var(--fo-p2); }
#setup.cs2 .cs2-slot-title { font-family: var(--fo-display); font-weight: 700; font-size: clamp(24px, 2.6vw, 34px); line-height: 1; text-transform: uppercase; }
#setup.cs2 .cs2-slot-sub { font-size: 14px; color: var(--fo-muted); max-width: 290px; line-height: 1.5; }
#setup.cs2 .cs2-slot-lib { display: none; flex-direction: column; gap: 8px; min-height: 0; }
#setup.cs2 .cs2-slot.has-decks .cs2-slot-lib { display: flex; }
#setup.cs2 .cs2-slot.has-decks .cs2-slot-ic { width: 40px; height: 40px; }
#setup.cs2 .cs2-slot-cap { font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--fo-muted); }
#setup.cs2 .cs2-slot .roster-strip {
  margin: 0; width: 100%; max-width: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 8px;
  max-height: 156px; overflow-y: auto; padding: 2px;
}
#setup.cs2 .cs2-slot .roster-tile {
  aspect-ratio: 5 / 7; border-radius: 8px; border: 2px solid var(--fo-line); background: var(--fo-surf2); color: var(--fo-muted);
  font-size: 12px; font-weight: 700; padding: 0;
}
#setup.cs2 .cs2-slot .roster-tile:hover { border-color: var(--fo-accent); transform: translateY(-2px); }
#setup.cs2 .cs2-slot .roster-tile.new-slot { border-style: dashed; font-size: 22px; color: var(--fo-accent); }
#setup.cs2 .cs2-slot .roster-empty-hint { display: none; }
#setup.cs2 .cs2-friend-card { border-style: solid; }
#setup.cs2 .cs2-friend-card .cs2-slot-main { cursor: default; }

/* ---- the VS console ---- */
#setup.cs2 .cs2-console { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 0; width: auto; max-width: none; margin: 0; }
#setup.cs2 .cs2-vs {
  align-self: center; width: auto; height: auto; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none;
  font-family: var(--fo-display); font-weight: 700; font-size: clamp(64px, 7vw, 96px); line-height: 0.9; color: var(--fo-accent);
}
#setup.cs2 .console-block { margin: 0; width: 100%; border: 0; background: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
#setup.cs2 .console-block .mode-roster { display: flex; flex-direction: column; gap: 8px; margin: 0; }
#setup.cs2 .console-block .mode-option {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--fo-line);
  border-left-width: 1px; background: var(--fo-surf); color: var(--fo-text); box-shadow: none; text-align: left; width: 100%; margin: 0;
}
#setup.cs2 .console-block .mode-option:hover { border-color: var(--fo-accent); }
#setup.cs2 .console-block .mode-option[aria-checked="true"] {
  border: 2px solid var(--fo-accent); padding: 11px 13px; background: color-mix(in srgb, var(--fo-accent) 14%, var(--fo-surf)); box-shadow: none;
}
#setup.cs2 .console-block .mode-option .mode-txt { display: flex; flex-direction: column; gap: 2px; }
#setup.cs2 .console-block .mode-option .mode-nm, #setup.cs2 .console-block .mode-option[aria-checked="true"] .mode-nm { font-size: 15px; font-weight: 700; color: inherit; letter-spacing: 0; }
#setup.cs2 .console-block .mode-option .mode-ds { font-size: 12px; color: var(--fo-muted); line-height: 1.35; }
#setup.cs2 .cs2-row { display: flex; flex-direction: column; gap: 14px; }
#setup.cs2 .cs2-diff { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--fo-text); }
#setup.cs2 select, #setup.cs2 .cs2-panel select {
  height: 40px; min-width: 140px; border-radius: 10px; border: 1px solid var(--fo-line); background: var(--fo-surf); color: var(--fo-text); font-size: 14px; padding: 0 10px; max-width: 100%;
}
#setup.cs2 .cs2-fight, #setup.cs2 #startMatch.cs2-fight {
  height: 64px; border-radius: 16px; border: 0; background: var(--fo-accent); color: var(--fo-on-accent); clip-path: none; box-shadow: none; margin: 0; width: 100%;
  font-family: var(--fo-display); font-weight: 700; font-size: 32px; letter-spacing: 4px; text-transform: uppercase; padding: 0 12px; filter: none; opacity: 1; cursor: pointer;
}
#setup.cs2 .cs2-fight:hover:not(:disabled) { filter: brightness(1.08); }
#setup.cs2 .cs2-fight:disabled, #setup.cs2 #startMatch.cs2-fight:disabled { background: var(--fo-surf2); color: var(--fo-muted); border: 1px solid var(--fo-line); font-size: 24px; letter-spacing: 3px; opacity: 1; filter: none; cursor: not-allowed; }
#setup.cs2 .engage-blockers { margin: 0; font-size: 12px; color: var(--fo-text); text-align: center; line-height: 1.4; }
#setup.cs2 .cs2-hint { margin: 0; font-size: 12px; color: var(--fo-muted); text-align: center; line-height: 1.5; }
#setup.cs2 .cs2-links { display: flex; justify-content: center; gap: 4px 16px; flex-wrap: wrap; }
#setup.cs2 .training-btn.cs2-link { background: none; border: 0; padding: 6px 4px; width: auto; margin: 0; }
#setup.cs2 .error { margin: 0; color: var(--fo-bad-text); font-size: 13px; text-align: center; }
#setup.cs2 .error:empty { display: none; }
/* vs Friend: room code controls */
#setup.cs2 .pvp-controls { display: flex; flex-direction: column; gap: 10px; color: var(--fo-text); }
#setup.cs2 .pvp-controls .key-hint { font-size: 12px; color: var(--fo-muted); margin: 0; line-height: 1.45; }
#setup.cs2 .pvp-controls .engage-btn { height: 52px; border-radius: 14px; border: 0; clip-path: none; box-shadow: none; background: var(--fo-accent); color: var(--fo-on-accent); font-family: var(--fo-display); font-size: 22px; letter-spacing: 2px; margin: 0; filter: none; }
#setup.cs2 .pvp-controls .engage-btn:disabled { background: var(--fo-surf2); color: var(--fo-muted); border: 1px solid var(--fo-line); opacity: 1; }
#setup.cs2 .pvp-join-row { display: flex; gap: 8px; }
#setup.cs2 .pvp-join-row input { flex: 1; min-width: 0; height: 44px; border-radius: 10px; border: 1px solid var(--fo-line); background: var(--fo-surf); color: var(--fo-text); padding: 0 12px; font-family: "IBM Plex Mono", monospace; font-size: 15px; text-transform: uppercase; }
#setup.cs2 .pvp-join-row button { height: 44px; border-radius: 10px; border: 1px solid var(--fo-accent); background: var(--fo-surf2); color: var(--fo-text); font-weight: 700; padding: 0 14px; white-space: nowrap; }
#setup.cs2 .pvp-waiting { border: 1px solid var(--fo-line); border-radius: 12px; padding: 10px 12px; background: var(--fo-surf); }
#setup.cs2 .pvp-waiting p { margin: 0 0 6px; font-size: 13px; }
#setup.cs2 .pvp-room-code { font-family: "IBM Plex Mono", monospace; font-size: 28px; font-weight: 600; letter-spacing: 6px; color: var(--fo-accent); }

/* keyboard hints (desktop only) */
#setup.cs2 .control-bar { border-top: 1px solid var(--fo-line); background: none; margin: 0 calc(-1 * clamp(16px, 4vw, 60px)); padding: 10px 16px; }
#setup.cs2 .control-chip { color: var(--fo-muted); font-size: 12px; }
#setup.cs2 .control-chip .key { border-color: var(--fo-line); color: var(--fo-accent); background: var(--fo-surf); font-size: 11px; min-width: 22px; height: 20px; }

/* ---- sheets (dialogs) ---- */
#setup.cs2 .cs2-sheet { position: fixed; inset: 0; z-index: 45; background: rgb(0 0 0 / 0.56); display: flex; align-items: center; justify-content: center; padding: 24px; }
body.cs2-sheet-open { overflow: hidden; }
#setup.cs2 .cs2-panel {
  position: relative; width: min(1120px, 100%); max-height: min(800px, calc(100dvh - 48px)); display: flex; flex-direction: column; box-sizing: border-box;
  background: var(--fo-bg); color: var(--fo-text); border: 1px solid var(--fo-line); border-radius: 22px; overflow: hidden; box-shadow: 0 24px 64px rgb(0 0 0 / 0.45);
}
#setup.cs2 .cs2-grab { display: none; }
#setup.cs2 .cs2-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px 20px; padding: 20px 28px; border-bottom: 1px solid var(--fo-line); flex-wrap: wrap; flex: none; }
#setup.cs2 .cs2-head-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#setup.cs2 .cs2-head-back { flex-direction: row; align-items: center; gap: 14px; }
#setup.cs2 .cs2-head-ctl { display: flex; align-items: center; gap: 12px; }
#setup.cs2 .cs2-h { margin: 0; font-family: var(--fo-display); font-weight: 700; font-size: 30px; line-height: 1; text-transform: uppercase; color: var(--fo-text); letter-spacing: 0.5px; }
#setup.cs2 .cs2-h2 { font-family: var(--fo-display); font-weight: 700; font-size: 24px; line-height: 1; text-transform: uppercase; }
#setup.cs2 .cs2-sub { font-size: 13px; color: var(--fo-muted); }
#setup.cs2 .cs2-cap { font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--fo-muted); margin: 0; }
#setup.cs2 .cs2-note { font-size: 12px; color: var(--fo-muted); margin: 0; line-height: 1.5; }
#setup.cs2 .cs2-note a { color: var(--fo-accent); }
#setup.cs2 .cs2-err { color: var(--fo-bad-text); }
#setup.cs2 .cs2-icon-btn {
  width: 44px; height: 44px; flex: none; border-radius: 10px; border: 1px solid var(--fo-line); background: var(--fo-surf); color: var(--fo-text);
  display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer;
}
#setup.cs2 .cs2-primary {
  min-height: 44px; padding: 0 20px; border-radius: 12px; border: 0; background: var(--fo-accent); color: var(--fo-on-accent);
  font-size: 15px; font-weight: 800; cursor: pointer; white-space: nowrap;
}
#setup.cs2 .cs2-primary:disabled { background: var(--fo-surf2); color: var(--fo-muted); opacity: 1; border: 1px solid var(--fo-line); }
#setup.cs2 .cs2-big { min-height: 54px; border-radius: 14px; font-size: 16px; }
#setup.cs2 .cs2-ghost { background: transparent; }
#setup.cs2 .cs2-seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--fo-surf); border: 1px solid var(--fo-line); }
#setup.cs2 .cs2-seg button {
  min-height: 38px; padding: 0 16px; border-radius: 9px; border: 0; background: transparent; color: var(--fo-text); font-size: 14px; font-weight: 600; cursor: pointer; margin: 0;
}
#setup.cs2 .cs2-seg button[aria-checked="true"], #setup.cs2 .cs2-seg button[aria-selected="true"] { background: var(--fo-accent); color: var(--fo-on-accent); font-weight: 800; }
#setup.cs2 #csLibFor button[data-side="human"][aria-checked="true"] { background: var(--fo-p1); color: var(--fo-on-p1); }
#setup.cs2 #csLibFor button[data-side="opponent"][aria-checked="true"] { background: var(--fo-p2); color: var(--fo-on-p2); }
#setup.cs2 .cs2-scroll { overflow-y: auto; padding: 18px 28px 24px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
#setup.cs2 .cs2-panel input[type="text"], #setup.cs2 .cs2-panel input[type="url"], #setup.cs2 .cs2-panel input[type="search"], #setup.cs2 .cs2-panel input[type="password"], #setup.cs2 .cs2-panel textarea {
  min-height: 44px; border-radius: 10px; border: 1px solid var(--fo-line); background: var(--fo-surf); color: var(--fo-text); font-size: 15px; padding: 0 12px; box-sizing: border-box; width: 100%; font-family: inherit;
}
#setup.cs2 .cs2-panel input::placeholder, #setup.cs2 .cs2-panel textarea::placeholder { color: var(--fo-muted); opacity: 0.85; }

/* library */
#setup.cs2 .cs2-lib { height: min(800px, calc(100dvh - 48px)); }
#setup.cs2 .cs2-lib-bar { display: flex; align-items: center; gap: 12px; padding: 16px 28px 10px; flex: none; }
#setup.cs2 .cs2-search { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--fo-muted); min-width: 0; }
#setup.cs2 .cs2-lib-recent { display: flex; flex-direction: column; gap: 10px; padding: 4px 28px 10px; flex: none; }
#setup.cs2 .cs2-lib-recent-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 2px; }
#setup.cs2 .cs2-faced { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 12px; border: 1px solid var(--fo-line); background: var(--fo-surf); color: var(--fo-text); text-align: left; cursor: pointer; flex: none; margin: 0; }
#setup.cs2 .cs2-faced:hover { border-color: var(--fo-p2); }
#setup.cs2 .cs2-faced-art { width: 34px; height: 48px; border-radius: 6px; overflow: hidden; background: var(--fo-surf2); display: flex; align-items: center; justify-content: center; flex: none; font-size: 11px; color: var(--fo-muted); }
#setup.cs2 .cs2-faced-art img, #setup.cs2 .cs2-tile-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }
#setup.cs2 .cs2-tile-pick, #setup.cs2 .cs2-faced { -webkit-touch-callout: none; } /* r62ui: a long press opens the deck's ⋯ menu, not the phone's image menu */
/* r65dx (Discord "Context Menu"): the Selected Character screen's deck ⋯ menu - its box sits in a fixed full-screen host while open there
   (app.js r65dxOpenSideMenu); a long press on the character card opens it, not the phone's image menu */
#setup.cs2 .r65dx-menu-host { position: fixed; inset: 0; z-index: 44; pointer-events: none; }
#setup.cs2 .r65dx-menu-host > .cs2-menu { pointer-events: auto; }
#setup.cs2 .cs2-card { -webkit-touch-callout: none; }
#setup.cs2 .cs2-card .r65dx-card-menu { z-index: 2; }
#setup.cs2 .p2 .cs2-card .r65dx-card-menu { right: auto; left: 14px; } /* the 2P pill holds the right corner */
@media (min-width: 821px) and (min-height: 521px) { #setup.cs2 .cs2-actions .r65dx-deck-menu { display: none; } } /* desktop: the card's ⋯ (the action row is full) */
@media (max-width: 820px), (max-height: 520px) { #setup.cs2 .cs2-card .r65dx-card-menu { display: none; } } /* phones: the action row's ⋯ icon */
#setup.cs2 .cs2-faced-txt { display: flex; flex-direction: column; gap: 2px; }
#setup.cs2 .cs2-faced-txt b { font-size: 14px; }
#setup.cs2 .cs2-faced-txt small { font-size: 12px; color: var(--fo-muted); }
/* ug1114 (Discord "[Desktop] Recently Used"): the label and the deck boxes share one line; every box is the same size, a long deck name is cut
   short with "…" (the whole name is the box's tooltip). Phones still hide the row (below). */
#setup.cs2 .cs2-lib-recent { flex-direction: row; align-items: center; gap: 14px; }
#setup.cs2 .cs2-lib-recent > .cs2-cap { flex: none; white-space: nowrap; }
#setup.cs2 .cs2-lib-recent-row { flex: 1 1 auto; min-width: 0; }
#setup.cs2 .cs2-lib-recent .cs2-faced { width: 200px; box-sizing: border-box; }
#setup.cs2 .cs2-lib-recent .cs2-faced-txt { min-width: 0; flex: 1 1 auto; }
#setup.cs2 .cs2-lib-recent .cs2-faced-txt b, #setup.cs2 .cs2-lib-recent .cs2-faced-txt small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#setup.cs2 .cs2-lib-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 16px; padding: 10px 28px 20px; align-content: start; }
#setup.cs2 .cs2-tile { position: relative; min-width: 0; }
#setup.cs2 .cs2-tile-pick {
  width: 100%; height: 100%; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 14px; border: 2px solid var(--fo-line);
  background: var(--fo-surf); color: var(--fo-text); text-align: left; cursor: pointer; margin: 0; box-sizing: border-box;
}
#setup.cs2 .cs2-tile-pick:hover { border-color: var(--fo-accent); }
#setup.cs2 #csLibrary[data-side="human"] .cs2-tile.on .cs2-tile-pick { border-color: var(--fo-p1); }
#setup.cs2 #csLibrary[data-side="opponent"] .cs2-tile.on .cs2-tile-pick { border-color: var(--fo-p2); }
#setup.cs2 .cs2-tile-art { height: 170px; border-radius: 10px; overflow: hidden; background: var(--fo-surf2); display: flex; align-items: center; justify-content: center; color: var(--fo-muted); font-size: 22px; flex: none; }
#setup.cs2 .cs2-tile-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#setup.cs2 .cs2-tile-name { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* r63vx (Discord "Deck Name"): the deck's primary symbol before its name - the Meta page's ◆ + symbol colour in a small pill (app.js r63vxSymHtml). */
#setup.cs2 .r63vx-sym {
  display: inline-flex; align-items: center; gap: 3px; vertical-align: 1px; margin-right: 6px; padding: 0 6px; height: 16px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--r63vx-c) 60%, transparent); background: color-mix(in srgb, var(--r63vx-c) 16%, transparent);
  color: color-mix(in srgb, var(--r63vx-c) 72%, currentColor); font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1; white-space: nowrap;
}
#setup.cs2 .r63vx-sym > span { color: var(--r63vx-c); font-size: 9px; }
#setup.cs2 .cs2-meta .r63vx-sym { vertical-align: 1px; }
/* r65dx (Discord "Deck Name" follow-up): the primary symbol's icon before a deck's name (app.js r63vxSymHtml) - 16px, the icons' own size */
#setup.cs2 .r65dx-sym { display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; border-radius: 50%; flex: none; user-select: none; -webkit-user-drag: none; }
#setup.cs2 .cs2-tile-sub { font-size: 12px; color: var(--fo-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#setup.cs2 .cs2-tile-when { font-size: 11px; color: var(--fo-muted); }
#setup.cs2 .cs2-tag { position: absolute; top: 14px; left: 14px; font-size: 10px; font-weight: 800; letter-spacing: 1px; padding: 2px 7px; border-radius: 999px; background: var(--fo-p1); color: var(--fo-on-p1); }
#setup.cs2 .cs2-tag.p2 { background: var(--fo-p2); color: var(--fo-on-p2); }
#setup.cs2 .cs2-tile-menu {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgb(255 255 255 / 0.25);
  background: var(--fo-scrim); color: #fff; font-size: 18px; line-height: 1; padding: 0; cursor: pointer; margin: 0;
}
#setup.cs2 .cs2-tile-new {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 250px; border-radius: 14px;
  border: 2px dashed var(--fo-line); background: transparent; color: var(--fo-muted); font-size: 14px; font-weight: 700; cursor: pointer; margin: 0; padding: 12px;
}
#setup.cs2 .cs2-tile-new:hover { border-color: var(--fo-accent); color: var(--fo-text); }
#setup.cs2 .cs2-tile-new span { font-size: 28px; color: var(--fo-accent); line-height: 1; }
#setup.cs2 .cs2-empty { grid-column: 1 / -1; font-size: 14px; }
#setup.cs2 .cs2-panel-foot { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 12px 28px; border-top: 1px solid var(--fo-line); font-size: 12px; color: var(--fo-muted); flex: none; }
#setup.cs2 .cs2-menu {
  position: absolute; z-index: 5; display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 12px; box-sizing: border-box;
  background: var(--fo-surf); border: 1px solid var(--fo-line); box-shadow: 0 14px 34px rgb(0 0 0 / 0.4);
}
#setup.cs2 .cs2-menu-title { font-size: 12px; font-weight: 800; color: var(--fo-muted); padding: 4px 10px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#setup.cs2 .cs2-menu > button { min-height: 40px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent; color: var(--fo-text); text-align: left; font-size: 14px; font-weight: 600; cursor: pointer; margin: 0; }
#setup.cs2 .cs2-menu > button:hover, #setup.cs2 .cs2-menu > button:focus-visible { background: var(--fo-surf2); }
#setup.cs2 .cs2-menu .cs2-danger { color: var(--fo-bad-text); }
#setup.cs2 .cs2-menu input { margin: 2px 0 8px; }
#setup.cs2 .cs2-menu .cs2-note { padding: 0 10px 8px; }
#setup.cs2 .cs2-menu-row { display: flex; gap: 8px; padding: 0 2px 2px; }
#setup.cs2 .cs2-menu-row button { flex: 1; min-height: 40px; border-radius: 10px; border: 1px solid var(--fo-line); background: var(--fo-surf2); color: var(--fo-text); font-weight: 700; margin: 0; padding: 0 10px; }
#setup.cs2 .cs2-menu-row .cs2-primary { background: var(--fo-accent); color: var(--fo-on-accent); border: 0; }
#setup.cs2 .cs2-menu-row .cs2-danger-btn { background: var(--fo-bad); color: #1f0a0a; border: 0; }

/* load a new deck */
#setup.cs2 .cs2-load-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 28px; padding: 22px 28px; }
#setup.cs2 .cs2-load-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#setup.cs2 .cs2-tabs { align-self: flex-start; }
#setup.cs2 .cs2-tabs button { min-height: 40px; padding: 0 18px; }
#setup.cs2 .cs2-linkpanel { display: flex; flex-direction: column; gap: 6px; }
#setup.cs2 .cs2-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 800; color: var(--fo-text); }
#setup.cs2 .cs2-field em { font-style: normal; font-weight: 500; color: var(--fo-muted); }
#setup.cs2 .cs2-inline { display: flex; gap: 10px; }
#setup.cs2 .cs2-inline input { flex: 1; min-width: 0; }
#setup.cs2 .cs2-btn-accent { border-color: var(--fo-accent); background: var(--fo-surf2); font-weight: 800; white-space: nowrap; }
#setup.cs2 .cs2-grow { flex: 1; min-height: 0; }
#setup.cs2 .cs2-panel textarea#csLoadText { min-height: 220px; flex: 1; padding: 12px 14px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 14px; line-height: 1.6; resize: vertical; }
#setup.cs2 .cs2-usefor { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; font-size: 13px; font-weight: 800; }
#setup.cs2 .cs2-check { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 16px; background: var(--fo-surf); border: 1px solid var(--fo-line); align-self: stretch; min-height: 0; }
#setup.cs2 .cs2-check-body { display: flex; flex-direction: column; gap: 10px; }
#setup.cs2 .cs2-ck { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
#setup.cs2 .cs2-ck-ic { width: 22px; height: 22px; flex: none; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
#setup.cs2 .cs2-ck.ok .cs2-ck-ic { background: var(--fo-ok); color: #07170e; }
#setup.cs2 .cs2-ck.warn .cs2-ck-ic { background: var(--fo-warn); color: #1a1406; }
#setup.cs2 .cs2-ck.bad .cs2-ck-ic { background: var(--fo-bad); color: #1f0a0a; }
#setup.cs2 .cs2-ck.info .cs2-ck-ic { background: var(--fo-surf2); border: 1px solid var(--fo-line); color: var(--fo-text); }
#setup.cs2 .cs2-ck-char { display: flex; gap: 14px; align-items: center; }
#setup.cs2 .cs2-ck-art { width: 84px; height: 118px; flex: none; border-radius: 10px; overflow: hidden; border: 2px solid var(--fo-p1); background: var(--fo-surf2); }
#setup.cs2 .cs2-ck-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }
#setup.cs2 .cs2-ck-char > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#setup.cs2 .cs2-ck-char b { font-family: var(--fo-display); font-weight: 700; font-size: 26px; line-height: 1; text-transform: uppercase; }
#setup.cs2 .cs2-ck-char small { font-size: 12px; color: var(--fo-muted); }
#setup.cs2 .cs2-check-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

/* card art / loadout (full screen) */
#setup.cs2 .cs2-full { padding: 0; }
#setup.cs2 .cs2-full .cs2-panel { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; border: 0; }
#setup.cs2 .cs2-art-head { padding: 14px clamp(16px, 3vw, 40px); flex-wrap: nowrap; }
#setup.cs2 .cs2-art-titles { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
#setup.cs2 .cs2-art-titles .cs2-h { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
#setup.cs2 .cs2-art-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(300px, 500px) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); padding: 24px clamp(16px, 3vw, 40px); }
#setup.cs2 .cs2-art-char { display: flex; flex-direction: column; align-items: center; gap: 14px; }
#setup.cs2 .cs2-carousel { display: flex; align-items: center; gap: 16px; }
#setup.cs2 .cs2-round { width: 48px; height: 48px; flex: none; border-radius: 999px; border: 1px solid var(--fo-line); background: var(--fo-surf); color: var(--fo-text); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; margin: 0; }
#setup.cs2 .cs2-art-big { width: min(340px, 32vw); aspect-ratio: 5 / 7; border-radius: 18px; border: 3px solid var(--fo-p1); overflow: hidden; background: var(--fo-surf2); display: flex; align-items: center; justify-content: center; }
#setup.cs2 .cs2-art-big img { width: 100%; height: 100%; object-fit: cover; display: block; }
#setup.cs2 .cs2-art-label { font-family: var(--fo-display); font-weight: 700; font-size: 20px; letter-spacing: 1px; text-transform: uppercase; text-align: center; }
#setup.cs2 .cs2-art-thumbs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
#setup.cs2 .cs2-art-thumbs button { width: 60px; height: 84px; border-radius: 8px; border: 2px solid var(--fo-line); background: var(--fo-surf2); padding: 0; overflow: hidden; cursor: pointer; margin: 0; }
#setup.cs2 .cs2-art-thumbs button[aria-checked="true"] { border: 3px solid var(--fo-p1); }
#setup.cs2 .cs2-art-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
#setup.cs2 .cs2-art-deck { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#setup.cs2 .cs2-art-deckhead { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
#setup.cs2 .cs2-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; cursor: pointer; position: relative; min-height: 44px; }
#setup.cs2 .cs2-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
#setup.cs2 .cs2-switch-ui { width: 44px; height: 26px; border-radius: 999px; background: var(--fo-line); position: relative; flex: none; transition: background 0.15s; }
#setup.cs2 .cs2-switch-ui::after { content: ""; position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 999px; background: var(--fo-text); transition: transform 0.15s; }
#setup.cs2 .cs2-switch input:checked + .cs2-switch-ui { background: var(--fo-accent); }
#setup.cs2 .cs2-switch input:checked + .cs2-switch-ui::after { transform: translateX(18px); background: var(--fo-on-accent); }
#setup.cs2 .cs2-switch input:focus-visible + .cs2-switch-ui { outline: 2px solid var(--fo-accent); outline-offset: 2px; }
#setup.cs2 .cs2-switch input:disabled ~ * { opacity: 0.55; }
#setup.cs2 .cs2-art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
#setup.cs2 .cs2-acard { display: flex; flex-direction: column; gap: 5px; padding: 0; border: 0; background: transparent; color: var(--fo-text); text-align: left; cursor: default; min-width: 0; margin: 0; }
#setup.cs2 .cs2-acard.multi { cursor: pointer; }
#setup.cs2 .cs2-acard-art { position: relative; aspect-ratio: 5 / 7; border-radius: 10px; overflow: hidden; border: 2px solid var(--fo-line); background: var(--fo-surf2); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--fo-muted); text-align: center; padding: 0; }
#setup.cs2 .cs2-acard-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
#setup.cs2 .cs2-acard.multi:hover .cs2-acard-art { border-color: var(--fo-accent); }
#setup.cs2 .cs2-acard.alt .cs2-acard-art { border-color: var(--fo-p1); }
#setup.cs2 .cs2-acard.on .cs2-acard-art { outline: 3px solid var(--fo-accent); outline-offset: 2px; }
#setup.cs2 .cs2-qty { position: absolute; z-index: 1; top: 6px; left: 6px; font-size: 11px; font-weight: 800; background: rgb(0 0 0 / 0.72); color: #fff; padding: 1px 6px; border-radius: 6px; }
#setup.cs2 .cs2-badge { position: absolute; z-index: 1; top: 6px; right: 6px; font-size: 9px; font-weight: 800; letter-spacing: 0.5px; background: var(--fo-accent); color: var(--fo-on-accent); padding: 2px 6px; border-radius: 999px; }
#setup.cs2 .cs2-acard-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#setup.cs2 .cs2-art-choice { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; background: var(--fo-surf); border: 1px solid var(--fo-line); box-shadow: 0 -8px 24px rgb(0 0 0 / 0.2); }
#setup.cs2 .cs2-choice-name { font-size: 14px; font-weight: 800; flex: 1 1 160px; }
#setup.cs2 .cs2-art-choice .cs2-seg { flex-wrap: wrap; }
/* p31112 (Discord "Card Image on Decklist"): deck cards - hover preview, hold for Card Info, drag to reorder (app.js p31112WireGrid) */
#setup.cs2 .cs2-acard { position: relative; touch-action: manipulation; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
#setup.cs2 .cs2-acard img { -webkit-user-drag: none; -webkit-touch-callout: none; }
@media (pointer: coarse) { #setup.cs2 .cs2-acard img { pointer-events: none; } }
@media (hover: hover) and (pointer: fine) { #setup.cs2 .cs2-acard:not(.multi) { cursor: grab; } }
#setup.cs2 .cs2-acard .cs2-acard-art { transition: transform 0.12s ease; }
#setup.cs2 .cs2-acard.longpress-armed .cs2-acard-art, #setup.cs2 .cs2-acard.p31112-held .cs2-acard-art { outline: 2px solid var(--fo-accent); outline-offset: 2px; }
#setup.cs2 .cs2-acard.p31112-held .cs2-acard-art { transform: scale(1.05); }
#setup.cs2 .cs2-acard.p31112-src { opacity: 0.35; }
#setup.cs2 .cs2-acard.p31112-drop-before::before, #setup.cs2 .cs2-acard.p31112-drop-after::after { content: ""; position: absolute; z-index: 2; top: -2px; bottom: 18px; width: 4px; border-radius: 4px; background: var(--fo-accent); box-shadow: 0 0 10px var(--fo-accent); pointer-events: none; }
#setup.cs2 .cs2-acard.p31112-drop-before::before { left: -6px; }
#setup.cs2 .cs2-acard.p31112-drop-after::after { right: -6px; }
#setup.cs2 .cs2-acard.p31112-dropped .cs2-acard-art { animation: p31112-drop 0.35s ease-out; }
@keyframes p31112-drop { from { transform: scale(1.08); } to { transform: none; } }
body.p31112-dragging, body.p31112-dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.p31112-ghost { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; border-radius: 10px; overflow: hidden; box-shadow: 0 14px 34px rgb(0 0 0 / 0.55); opacity: 0.92; transform-origin: 50% 50%; }
.p31112-ghost img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (prefers-reduced-motion: reduce) { #setup.cs2 .cs2-acard .cs2-acard-art { transition: none; } #setup.cs2 .cs2-acard.p31112-dropped .cs2-acard-art { animation: none; } }
/* q31112 (Discord "Card Image on Decklist", follow-up): the art only - ×N at the top centre, one dot per art under the card (app.js q31112TileHtml) */
#setup.cs2 .q31112-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#setup.cs2 .q31112-cell .cs2-acard { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { #setup.cs2 .q31112-cell .cs2-acard { cursor: grab; } #setup.cs2 .q31112-cell .cs2-acard:hover .cs2-acard-art { border-color: var(--fo-accent); } }
#setup.cs2 .cs2-acard .cs2-qty.q31112-qty { top: 3px; left: 50%; transform: translateX(-50%); font-size: 10px; line-height: 14px; padding: 0 5px; border-radius: 999px; pointer-events: none; }
#setup.cs2 .q31112-dots { display: flex; justify-content: center; align-items: center; min-height: 18px; }
#setup.cs2 .q31112-dot { flex: 0 1 18px; min-width: 10px; height: 18px; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#setup.cs2 .q31112-dot::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--fo-muted); opacity: 0.45; transition: transform 0.12s ease, opacity 0.12s ease; }
#setup.cs2 .q31112-dot:hover::before { opacity: 0.85; }
#setup.cs2 .q31112-dot.on::before { background: var(--fo-accent); opacity: 1; transform: scale(1.25); }
#setup.cs2 .q31112-dot:focus-visible { outline: 2px solid var(--fo-accent); outline-offset: -2px; border-radius: 6px; }
#setup.cs2 .q31112-cell .cs2-acard.p31112-drop-before::before, #setup.cs2 .q31112-cell .cs2-acard.p31112-drop-after::after { bottom: -2px; }
#setup.cs2 .q31112-cell:has(.p31112-src) .q31112-dots { opacity: 0.35; }
@media (pointer: coarse) { #setup.cs2 .q31112-dots { min-height: 24px; } #setup.cs2 .q31112-dot { flex-basis: 22px; height: 24px; } }
@media (max-width: 820px), (max-height: 520px) {
  #setup.cs2 .cs2-art-grid:not(.whole) .q31112-cell { flex: 0 0 92px; }
  #setup.cs2 .cs2-art-grid:not(.whole) .q31112-cell .cs2-acard { flex: none; }
  #setup.cs2 .q31112-emoji { font-size: 17px; line-height: 1; }
}
@media (prefers-reduced-motion: reduce) { #setup.cs2 .q31112-dot::before { transition: none; } }
/* desktop: the Loadout's Card Info slides in over the character column (left) so the deck cards stay clickable (phones: the bottom sheet) */
@media (min-width: 821px), (orientation: landscape) {
  .inspector.p31112-info { left: 0.6rem; right: auto; transform: translateX(calc(-100% - 20px)); }
  .inspector.p31112-info.visible { transform: translateX(0); }
}

/* r50e (Discord "[DESKTOP] Context Menu"): a pinned Loadout (Decklist) Card Info is the centred Card Info window too (style.css .ug14-modal) */
.inspector.p31112-info.ug14-modal.visible { left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%, -50%); }
/* r50e (Discord "Folders"): deck library folders (app.js r50eFolderHeadHtml) - a full-width header row over each folder's decks */
#setup.cs2 .r50e-newfolder { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
#setup.cs2 .r50e-folder { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 4px; padding: 0 0 6px; border-bottom: 1px solid var(--fo-line); }
#setup.cs2 .r50e-folder-toggle { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border-radius: 10px; border: 0; background: transparent; color: var(--fo-text); font-size: 15px; font-weight: 800; text-align: left; cursor: pointer; margin: 0; }
#setup.cs2 .r50e-folder-toggle:hover, #setup.cs2 .r50e-folder-toggle:focus-visible { background: var(--fo-surf2); }
#setup.cs2 .r50e-chev { display: inline-flex; color: var(--fo-muted); transition: transform 0.15s; }
#setup.cs2 .r50e-folder.collapsed .r50e-chev { transform: rotate(-90deg); }
#setup.cs2 .r50e-folder-ic { display: inline-flex; color: var(--fo-accent); }
#setup.cs2 .r50e-folder-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#setup.cs2 .r50e-folder-n { flex: none; font-size: 12px; font-weight: 600; color: var(--fo-muted); white-space: nowrap; }
#setup.cs2 .r50e-folder-menu { flex: none; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--fo-line); background: var(--fo-surf2); color: var(--fo-text); font-size: 18px; line-height: 1; padding: 0; cursor: pointer; margin: 0; }
#setup.cs2 .r50e-loose { min-height: 40px; padding: 0 10px 6px; }
#setup.cs2 .r50e-folder-label { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--fo-muted); }
#setup.cs2 .cs2-menu { overflow-y: auto; }
#setup.cs2 .cs2-menu > button.r50e-move { display: flex; align-items: center; gap: 10px; flex: none; }
#setup.cs2 .cs2-menu > button.r50e-move span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#setup.cs2 .cs2-menu > button.r50e-move svg { flex: none; color: var(--fo-accent); }
#setup.cs2 .cs2-menu > button.r50e-move.on { background: var(--fo-surf2); }
#setup.cs2 .r50e-here { font-size: 11px; font-weight: 700; color: var(--fo-muted); }
@media (max-width: 820px), (max-height: 520px) {
  #setup.cs2 .cs2-lib-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
  #setup.cs2 .cs2-lib-bar #csLibBuild { grid-row: 1; grid-column: 1; }
  #setup.cs2 .cs2-lib-bar #r50eNewFolder { grid-row: 1; grid-column: 2; width: 54px; min-height: 50px; padding: 0; justify-content: center; }
  #setup.cs2 .cs2-lib-bar #r50eNewFolder .r50e-nf-txt { display: none; }
  #setup.cs2 .cs2-lib-bar #csLibNew { grid-row: 1; grid-column: 3; width: 54px; min-height: 50px; padding: 0; justify-content: center; } /* r59c: icon next to New folder */
  #setup.cs2 .cs2-lib-bar #csLibNew .r50e-nf-txt { display: none; }
  #setup.cs2 .cs2-lib-bar .cs2-search { grid-row: 2; grid-column: 1 / -1; }
  #setup.cs2 .r50e-folder { margin-top: 2px; }
  /* the pressed-button nudge (button:active translateY(1px)) dropped the centring translateY(-50%): the ⋯ jumped ~20px down under the finger
     and the tap's click landed on the deck behind it (it loaded the deck instead of opening the menu) */
  #setup.cs2 .cs2-tile-menu:not(:disabled):active { transform: translateY(calc(-50% + 1px)); }
}
/* scout + more */
#setup.cs2 .cs2-scout-panel, #setup.cs2 .cs2-more { width: min(760px, 100%); }
#setup.cs2 .cs2-scout-panel .cpu-read { width: 100%; max-width: none; margin: 0; border: 0; background: none; }
#setup.cs2 .cs2-scout-panel .cpu-read > summary { pointer-events: none; padding: 0 0 8px; list-style: none; }
#setup.cs2 .cs2-scout-panel .cpu-read .cr-kick, #setup.cs2 .cs2-scout-panel .cpu-read .cr-toggle { display: none; }
#setup.cs2 .cs2-scout-panel .cpu-read .cr-plan { font-size: 18px; color: var(--fo-text); }
#setup.cs2 .cs2-scout-panel .cpu-read .cr-body { padding: 0; }
#setup.cs2 .cs2-more .ai-opponent-controls, #setup.cs2 .cs2-more .local-ai-controls { display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--fo-text); margin: 0; }
#setup.cs2 .cs2-more .local-ai-controls label, #setup.cs2 .cs2-more .claude-api-key-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#setup.cs2 .cs2-more .key-hint { font-size: 12px; color: var(--fo-muted); margin: 0; line-height: 1.5; }
#setup.cs2 .cs2-more-row { display: flex; gap: 10px; flex-wrap: wrap; }
#setup.cs2 .cs2-keys { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--fo-muted); }
#setup.cs2 .cs2-keys kbd { display: inline-flex; min-width: 24px; height: 22px; align-items: center; justify-content: center; padding: 0 5px; margin-right: 4px; border-radius: 5px; border: 1px solid var(--fo-line); background: var(--fo-surf); color: var(--fo-accent); font-family: "IBM Plex Mono", monospace; font-size: 12px; }
@media (hover: none) { #setup.cs2 .cs2-no-touch { display: none; } }

/* ---------- laptop heights ---------- */
@media (max-height: 820px) and (min-width: 821px) {
  #setup.cs2 { --fo-card-h: clamp(280px, calc(100vh - 300px), 520px); }
  #setup.cs2 .cs2-titlebar { min-height: 52px; padding-top: 10px; }
  #setup.cs2 .cs2-vs { font-size: 64px; }
  #setup.cs2 .console-block .mode-option { padding: 9px 12px; }
  #setup.cs2 .console-block .mode-option[aria-checked="true"] { padding: 8px 11px; }
  #setup.cs2 .cs2-fight, #setup.cs2 #startMatch.cs2-fight { height: 56px; font-size: 28px; }
  #setup.cs2 .cs2-name { font-size: clamp(26px, 2.6vw, 36px); }
  #setup.cs2 .cs2-side { gap: 10px; }
}
@media (max-width: 1100px) and (min-width: 821px) {
  #setup.cs2 .cs2-stage { grid-template-columns: minmax(0, 1fr) 250px minmax(0, 1fr); gap: 18px; }
  #setup.cs2 .cs2-btn { padding: 0 14px; }
}

/* ---------- phone (portrait; landscape below overrides) ---------- */
@media (max-width: 820px), (max-height: 520px) {
  #setup.cs2 { padding: 0 16px; --fo-ph: clamp(150px, calc((100dvh - 270px) / 2), 268px); }
  #setup.cs2 .cs2-hide-phone { display: none; }
  /* w21110: the "Recent:" row is not shown on phones any more (see below), so it no longer takes height from the two cards */
  #setup.cs2 .cs2-only-phone { display: inline-flex; }
  #setup.cs2 .cs2-only-phone[hidden] { display: none !important; }
  #setup.cs2 .cs2-titlebar { min-height: 0; padding: 12px 104px 2px; gap: 2px; }
  #setup.cs2 .cs2-titlebar .eyebrow { line-height: 32px; }
  #setup.cs2 .cs2-toplinks { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 12px; margin: 0 -96px; }
  #setup.cs2 .cs2-links, #setup.cs2 .control-bar, #setup.cs2 #csSaveHint { display: none !important; }
  #setup.cs2 .cs2-recent { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding: 0 0 6px; }
  #setup.cs2 .cs2-recent-lead { white-space: nowrap; font-size: 12px; }
  #setup.cs2 .cs2-recent-chips { flex-wrap: nowrap; }
  #setup.cs2 .cs2-chip { height: 34px; }

  #setup.cs2 .cs2-stage { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 4px 0 0; }
  #setup.cs2 #csSideHuman { order: 1; }
  #setup.cs2 .cs2-vs-badge {
    order: 2; display: flex; align-self: center; margin: -26px 0; position: relative; z-index: 4; width: 52px; height: 52px; border-radius: 999px;
    background: var(--fo-bg); border: 2px solid var(--fo-accent); align-items: center; justify-content: center;
    font-family: var(--fo-display); font-weight: 700; font-size: 22px; color: var(--fo-accent);
  }
  #setup.cs2 #opponentHalf, #setup.cs2 #csFriendSide { order: 3; }
  #setup.cs2 .cs2-console {
    order: 4; position: sticky; bottom: 0; z-index: 5; margin-top: auto; background: var(--fo-bg); align-self: stretch;
    padding: 12px 0 max(14px, env(safe-area-inset-bottom)); gap: 10px;
  }
  #setup.cs2 .cs2-vs { display: none; }
  #setup.cs2 .cs2-side { position: relative; display: block; align-self: stretch; }
  #setup.cs2 .cs2-card, #setup.cs2 .cs2-slot { width: 100%; height: var(--fo-ph); aspect-ratio: auto; border-width: 2px; }
  #setup.cs2 .cs2-card .fighter-portrait img { object-position: 50% 18%; }
  #setup.cs2 .cs2-card::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgb(0 0 0 / 0.38) 0, transparent 30%, transparent 46%, rgb(0 0 0 / 0.82) 100%); }
  #setup.cs2 .cs2-card .cs2-pill, #setup.cs2 .p2 .cs2-card .cs2-pill { top: 12px; left: 12px; right: auto; font-size: 11px; padding: 3px 10px; }
  #setup.cs2 .cs2-info { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 12px; align-items: flex-start; text-align: left; gap: 2px; color: #fff; pointer-events: none; }
  #setup.cs2 .cs2-name { font-size: clamp(22px, 8vw, 32px); color: #fff; text-shadow: 0 2px 8px rgb(0 0 0 / 0.6); }
  #setup.cs2 .cs2-m-deck, #setup.cs2 .cs2-m-size { display: none; }
  #setup.cs2 .cs2-meta { font-size: 12px; color: rgb(255 255 255 / 0.88); text-shadow: 0 1px 4px rgb(0 0 0 / 0.7); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  #setup.cs2 .cs2-actions { position: absolute; z-index: 3; top: 8px; right: 8px; gap: 6px; flex-wrap: nowrap; justify-content: flex-end; }
  #setup.cs2 .cs2-actions .cs2-btn { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; background: var(--fo-scrim); border-color: rgb(255 255 255 / 0.36); color: #fff; }
  #setup.cs2 .cs2-warn { top: auto; bottom: 66px; z-index: 3; }

  #setup.cs2 .cs2-slot { padding: 10px; gap: 6px; }
  #setup.cs2 .cs2-slot-main { gap: 8px; padding: 6px; }
  #setup.cs2 .cs2-slot-ic { display: none; }
  #setup.cs2 .cs2-slot .cs2-pill { font-size: 11px; padding: 3px 10px; }
  #setup.cs2 .cs2-slot-title { font-size: clamp(22px, 7vw, 28px); }
  #setup.cs2 .cs2-slot-sub { font-size: 13px; }
  #setup.cs2 .cs2-slot.has-decks .cs2-slot-sub, #setup.cs2 .cs2-slot.has-decks .cs2-slot-cap { display: none; }
  #setup.cs2 .cs2-slot .roster-strip { display: flex; overflow-x: auto; overflow-y: hidden; max-height: none; gap: 6px; padding: 2px 2px 4px; }
  #setup.cs2 .cs2-slot .roster-tile { flex: 0 0 auto; width: 46px; height: 64px; aspect-ratio: auto; }

  #setup.cs2 .console-block { gap: 10px; }
  #setup.cs2 .console-block .mode-roster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--fo-surf); border: 1px solid var(--fo-line); }
  #setup.cs2 .console-block .mode-option { min-height: 40px; padding: 0 4px; border: 0; border-radius: 9px; background: transparent; align-items: center; justify-content: center; color: var(--fo-text); }
  #setup.cs2 .console-block .mode-option[aria-checked="true"] { border: 0; padding: 0 4px; background: var(--fo-accent); color: var(--fo-on-accent); }
  #setup.cs2 .console-block .mode-option .mode-ds { display: none; }
  #setup.cs2 .console-block .mode-option .mode-txt { align-items: center; }
  #setup.cs2 .console-block .mode-option .mode-nm, #setup.cs2 .console-block .mode-option[aria-checked="true"] .mode-nm { font-size: 14px; }
  #setup.cs2 .cs2-row { flex-direction: row; align-items: flex-end; gap: 10px; }
  #setup.cs2 .cs2-diff { flex-direction: column; align-items: stretch; gap: 2px; font-size: 11px; color: var(--fo-muted); }
  #setup.cs2 .cs2-diff select { height: 48px; width: 118px; min-width: 0; }
  #setup.cs2 .cs2-fight, #setup.cs2 #startMatch.cs2-fight { flex: 1; height: 56px; font-size: 26px; }
  #setup.cs2 .cs2-fight:disabled, #setup.cs2 #startMatch.cs2-fight:disabled { font-size: 17px; letter-spacing: 1px; }
  #setup.cs2 .pvp-controls .key-hint { display: none; }

  /* sheets become bottom / full-height sheets */
  #setup.cs2 .cs2-sheet { align-items: flex-end; padding: 0; }
  #setup.cs2 .cs2-panel { width: 100%; max-height: calc(100dvh - 36px); border-radius: 22px 22px 0 0; border-bottom: 0; }
  #setup.cs2 .cs2-grab { display: block; flex: none; width: 40px; height: 4px; border-radius: 999px; background: var(--fo-line); margin: 10px auto 0; }
  #setup.cs2 .cs2-panel-head { padding: 10px 16px 12px; gap: 10px; }
  #setup.cs2 .cs2-h { font-size: 24px; }
  #setup.cs2 .cs2-scroll { padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); }
  #setup.cs2 .cs2-lib { height: calc(100dvh - 36px); }
  /* r59c: the For You / For Opponent toggle is gone - the close button shares the title row */
  #setup.cs2 .cs2-lib .cs2-head-txt { flex: 1 1 0; min-width: 0; }
  #setup.cs2 .cs2-lib .cs2-head-ctl { flex: 0 0 auto; justify-content: flex-end; }
  #setup.cs2 .cs2-lib .cs2-panel-head { position: relative; }
  #setup.cs2 .cs2-lib-bar { flex-direction: column-reverse; align-items: stretch; padding: 12px 16px 6px; gap: 10px; }
  #setup.cs2 .cs2-lib-bar .cs2-primary { min-height: 50px; }
  #setup.cs2 .cs2-search { flex-direction: column; align-items: stretch; gap: 4px; font-size: 12px; }
  #setup.cs2 .cs2-lib-recent { padding: 4px 16px 6px; }
  #setup.cs2 .cs2-lib-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 6px 16px 16px; }
  #setup.cs2 .cs2-tile-pick { flex-direction: row; align-items: center; gap: 12px; padding: 8px 54px 8px 8px; }
  #setup.cs2 .cs2-tile-art { width: 44px; height: 62px; border-radius: 7px; font-size: 13px; }
  #setup.cs2 .cs2-tile-txt { flex: 1; }
  #setup.cs2 .cs2-tile-name { font-size: 15px; }
  #setup.cs2 .cs2-tag { position: static; flex: none; }
  #setup.cs2 .cs2-tile-menu { top: 50%; right: 8px; transform: translateY(-50%); width: 40px; height: 40px; background: var(--fo-surf2); color: var(--fo-text); border-color: var(--fo-line); }
  #setup.cs2 .cs2-tile-new { min-height: 56px; flex-direction: row; }
  #setup.cs2 .cs2-panel-foot { justify-content: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); text-align: center; }

  #setup.cs2 .cs2-load { height: 100dvh; max-height: 100dvh; border-radius: 0; }
  #setup.cs2 .cs2-load-body { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px 16px 0; }
  #setup.cs2 .cs2-tabs { align-self: stretch; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); } /* db1113: + Build here */
  #setup.cs2 .cs2-panel textarea#csLoadText { min-height: 120px; max-height: 34dvh; }
  #setup.cs2 #csUseFor { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); flex: 1 1 100%; }
  #setup.cs2 #csUseFor button { padding: 0 6px; }
  #setup.cs2 .cs2-check { padding: 12px; gap: 10px; }
  #setup.cs2 .cs2-ck-art { width: 40px; height: 56px; border-radius: 6px; }
  #setup.cs2 .cs2-ck-char b { font-size: 20px; }
  #setup.cs2 .cs2-check-foot { position: sticky; bottom: 0; background: var(--fo-surf); padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); flex-direction: row; }
  #setup.cs2 .cs2-check-foot .cs2-primary { flex: 1; }

  #setup.cs2 .cs2-full .cs2-panel { border-radius: 0; max-height: none; height: 100dvh; }
  #setup.cs2 .cs2-art-head { padding: 8px 16px; gap: 10px; }
  #setup.cs2 .cs2-art-head .cs2-btn { width: 44px; padding: 0; }
  #setup.cs2 .cs2-art-head .cs2-h { font-size: 22px; max-width: 52vw; }
  #setup.cs2 .cs2-art-body { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 4px 0 0; }
  #setup.cs2 .cs2-art-char { padding: 0 16px; gap: 8px; }
  #setup.cs2 .cs2-carousel { gap: 10px; }
  #setup.cs2 .cs2-round { width: 44px; height: 44px; }
  #setup.cs2 .cs2-art-big { width: min(210px, 52vw); border-radius: 16px; }
  #setup.cs2 .cs2-art-label { font-size: 16px; }
  #setup.cs2 .cs2-art-thumbs button { width: 36px; height: 50px; }
  #setup.cs2 .cs2-art-deck { padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; background: var(--fo-surf); border-top: 1px solid var(--fo-line); }
  #setup.cs2 .cs2-art-grid:not(.whole) { display: flex; overflow-x: auto; gap: 8px; margin-right: -16px; padding-right: 16px; }
  #setup.cs2 .cs2-art-grid:not(.whole) .cs2-acard { flex: 0 0 92px; }
  #setup.cs2 .cs2-art-grid.whole { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  #setup.cs2 .cs2-art-choice { position: static; padding: 10px 12px; }
}
/* w21110 (Discord "Suggestions for the new layout"), phones only: no "Recent:" row above the character art and no "Recently faced" row in
   the deck library (History has the past games), no extra line under the character name, Card art is a pencil icon and Scout an icon
   (aria-label + title keep the names). Tapping the character art opens the deck change (app.js), so the card shows a pointer. */
#setup.cs2 .cs2-card { cursor: pointer; }
#setup.cs2 .w21110-ic-phone { display: none; }
@media (max-width: 820px), (max-height: 520px) {
  #setup.cs2 .cs2-recent, #setup.cs2 .cs2-lib-recent { display: none !important; }
  #setup.cs2 .cs2-info .cs2-meta { display: none; }
  #setup.cs2 .w21110-ic-phone { display: block; flex: none; }
  #setup.cs2 .w21110-ic-btn .w21110-txt { display: none; }
  #setup.cs2 .cs2-actions .cs2-btn.w21110-ic-btn { padding: 0; min-width: 40px; gap: 0; }
}
@media (max-height: 520px) and (orientation: landscape) {
  #setup.cs2 .cs2-actions .cs2-btn.w21110-ic-btn { min-width: 34px; }
}
@media (max-width: 380px) {
  #setup.cs2 .cs2-actions .cs2-btn { padding: 0 9px; font-size: 12px; }
  #setup.cs2 .cs2-card .cs2-pill, #setup.cs2 .p2 .cs2-card .cs2-pill { font-size: 10px; letter-spacing: 1px; padding: 3px 8px; }
}
/* r66mh (Discord "[Mobile] Home"), phones only: no Tutorial / Training Puzzles / More options row above the character (they are in the menu
   left of the profile button, portal.css), and the Difficulty dropdown next to FIGHT is a sliders icon (the cs2-icon-btn) opening the CPU
   settings popover (the deck ⋯ menu's cs2-menu look): Difficulty + Personality + Challenge (app.js r66mhPlace moves the real controls in). */
#setup.cs2 .console-block .r66mh-cpu-btn, #setup.cs2 .console-block .r66mh-cpu-pop { display: none; }
@media (max-width: 820px), (max-height: 520px) {
  #setup.cs2 .cs2-titlebar .cs2-toplinks { display: none !important; }
  #setup.cs2 .console-block .cs2-row { position: relative; flex-direction: row; align-items: stretch; gap: 10px; }
  #setup.cs2 .console-block .cs2-row .cs2-fight { flex: 1 1 auto; min-width: 0; }
  #setup.cs2[data-mode="local"] .console-block .r66mh-cpu-btn { display: inline-flex; width: 56px; height: 56px; border-radius: 14px; }
  #setup.cs2 .console-block .r66mh-cpu-btn[aria-expanded="true"] { border-color: var(--fo-accent); color: var(--fo-accent); }
  #setup.cs2[data-mode="local"] .console-block .r66mh-cpu-pop:not([hidden]) {
    display: flex; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 6; width: auto; gap: 8px; padding: 8px 8px 10px;
  }
  #setup.cs2 .r66mh-cpu-pop .cs2-menu-title { padding: 4px 6px 0; }
  #setup.cs2 .r66mh-cpu-pop .cs2-diff, #setup.cs2 .r66mh-cpu-pop .local-ai-controls label {
    display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 0 6px; font-size: 14px; color: var(--fo-text);
  }
  #setup.cs2 .r66mh-cpu-pop .cs2-diff[hidden] { display: none !important; }
  #setup.cs2 .r66mh-cpu-pop .local-ai-controls { display: flex; flex-direction: column; gap: 8px; margin: 0; }
  #setup.cs2 .r66mh-cpu-pop .local-ai-controls[hidden] { display: none !important; }
  #setup.cs2 .r66mh-cpu-pop .cs2-diff select, #setup.cs2 .r66mh-cpu-pop .local-ai-controls select { height: 40px; width: 190px; min-width: 0; max-width: 62%; flex: 0 1 auto; }
  #setup.cs2 .r66mh-cpu-pop .key-hint { margin: 2px 6px 0; font-size: 11px; line-height: 1.45; color: var(--fo-muted); }
  /* More options without its CPU settings (they sit in the popover): no empty "CPU opponent" heading */
  #setup.cs2 #csMore.r66mh-cpu-out .cs2-scroll > h3.cs2-cap:first-child, #setup.cs2 #csMore.r66mh-cpu-out #csMoreCpuOff { display: none !important; }
}
@media (max-height: 520px) and (orientation: landscape) {
  #setup.cs2 .console-block .cs2-row { flex-direction: row; align-items: stretch; }
  #setup.cs2[data-mode="local"] .console-block .r66mh-cpu-btn { width: 48px; height: 48px; }
  #setup.cs2 .cs2-row #startMatch.cs2-fight { flex: 1 1 auto; min-width: 0; }
  #setup.cs2[data-mode="local"] .console-block .r66mh-cpu-pop:not([hidden]) { position: fixed; left: 50%; right: auto; top: 52px; bottom: auto; width: min(340px, calc(100vw - 32px)); transform: translateX(-50%); max-height: calc(100dvh - 60px); overflow-y: auto; }
}
/* r69mh (Discord "[Mobile] Home" follow-up), phones in the one-column layout (portrait): the two character windows share ALL the height the
   header and the console (mode toggle + FIGHT row) leave, so there is no empty band under the 2P window any more (the old --fo-ph guess still
   counted the links row + Difficulty label that rev 00754 took away). Friend mode's taller console simply gets its room. The phone landscape
   three-column layout is untouched. No ⋯ in the character windows' action rows on phones: a long press on the card opens the same deck menu
   (app.js r65dx, anchored on the action row - the ⋯'s old spot - by r69mhSideAnchor); the deck library's tile ⋯ has the same menu too. */
@media (max-width: 820px) and (min-height: 521px), (max-height: 520px) and (orientation: portrait) {
  #setup.cs2 .cs2-stage > .cs2-side:not([hidden]) { display: flex; flex-direction: column; align-items: stretch; flex: 1 1 0; min-height: 150px; }
  #setup.cs2 .cs2-stage > .cs2-side > .cs2-card, #setup.cs2 .cs2-stage > .cs2-side > .cs2-slot { flex: 1 1 0; height: auto; min-height: 0; }
}
@media (max-width: 820px), (max-height: 520px) {
  #setup.cs2 .cs2-actions .r65dx-deck-menu { display: none !important; }
}
/* phone landscape: the three columns again, cards fill the height */
@media (max-height: 520px) and (orientation: landscape) {
  #setup.cs2, #setup.cs2.has-recent { --fo-ph: max(190px, calc(100dvh - 92px)); }
  #setup.cs2 .cs2-side { align-self: stretch; }
  #setup.cs2 .cs2-card .cs2-pill, #setup.cs2 .p2 .cs2-card .cs2-pill { top: 8px; left: 8px; font-size: 10px; padding: 2px 8px; letter-spacing: 1px; }
  #setup.cs2 .cs2-actions { top: auto; bottom: 8px; left: 8px; right: 8px; justify-content: flex-start; }
  #setup.cs2 .cs2-actions .cs2-btn { min-height: 32px; padding: 0 9px; font-size: 12px; border-radius: 8px; }
  #setup.cs2 .cs2-info { bottom: 46px; left: 10px; right: 10px; }
  #setup.cs2 .cs2-warn { top: 34px; bottom: auto; }
  #setup.cs2 .cs2-card::after { background: linear-gradient(180deg, rgb(0 0 0 / 0.3) 0, transparent 22%, transparent 40%, rgb(0 0 0 / 0.9) 100%); }
  #setup.cs2 .cs2-lib .cs2-sub, #setup.cs2 .cs2-lib .cs2-panel-foot, #setup.cs2 .cs2-search > span, #setup.cs2 .cs2-grab { display: none; }
  #setup.cs2 .cs2-lib .cs2-head-txt { flex: 1 1 auto; }
  #setup.cs2 .cs2-lib .cs2-head-ctl { flex: 0 0 auto; }
  #setup.cs2 .cs2-lib-bar { flex-direction: row; align-items: center; }
  #setup.cs2 .cs2-lib-bar .cs2-primary { min-height: 44px; }
  #setup.cs2 .cs2-lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #setup.cs2 .cs2-titlebar { padding-top: 6px; }
  #setup.cs2 .cs2-titlebar .eyebrow { line-height: 28px; }
  /* r73b5 (phone landscape): the fixed News / menu / profile buttons (their bottom edge sits ~46px down) overlapped the top of the character
     cards (which started at 38px) - a taller title row starts the cards at ~52px; VERSUS stays centred on the buttons. Portrait and desktop
     are untouched. */
  #setup.cs2 .cs2-titlebar { padding-top: 12px; }
  #setup.cs2 .cs2-titlebar .eyebrow { line-height: 36px; }
  #setup.cs2, #setup.cs2.has-recent { --fo-ph: max(190px, calc(100dvh - 106px)); } /* the cards 14px shorter to make room */
  #setup.cs2 .cs2-recent { display: none !important; }
  #setup.cs2 .cs2-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 230px) minmax(0, 1fr); grid-template-areas: "p1 console p2"; gap: 12px; align-items: stretch; padding: 2px 0 10px; }
  #setup.cs2 .cs2-vs-badge { display: none; }
  #setup.cs2 .cs2-console { position: static; padding: 0; justify-content: center; background: none; align-self: center; }
  #setup.cs2 .cs2-vs { display: block; font-size: 40px; }
  #setup.cs2 .cs2-row { flex-direction: column; align-items: stretch; gap: 8px; }
  #setup.cs2 .cs2-diff { flex-direction: row; align-items: center; justify-content: space-between; font-size: 12px; }
  #setup.cs2 .cs2-diff select { height: 40px; width: auto; flex: 1; }
  #setup.cs2 .cs2-fight, #setup.cs2 #startMatch.cs2-fight { flex: none; height: 48px; font-size: 22px; }
  #setup.cs2 .cs2-fight:disabled, #setup.cs2 #startMatch.cs2-fight:disabled { font-size: 16px; }
  #setup.cs2 .console-block .mode-option .mode-nm, #setup.cs2 .console-block .mode-option[aria-checked="true"] .mode-nm { font-size: 12px; }
  #setup.cs2 .cs2-name { font-size: 22px; }
  #setup.cs2 .cs2-panel { max-height: 100dvh; height: 100dvh; border-radius: 0; }
  #setup.cs2 .cs2-art-body { grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); }
  #setup.cs2 .cs2-art-big { width: min(150px, 30vw); }
  #setup.cs2 .cs2-load-body { grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); }
}
@media (prefers-reduced-motion: reduce) {
  #setup.cs2 .cs2-switch-ui, #setup.cs2 .cs2-switch-ui::after, #setup.cs2 .cs2-slot .roster-tile { transition: none; }
}
