:root {
  color-scheme: dark;
  --ink: #0b0c14;
  --panel: #151722;
  --panel-raised: #1c1e2b;
  --line: #353646;
  --gold: #ffd485;
  --red: #ff7869;
  --mint: #96e4d6;
  --text: #f8efdf;
  --muted: #b6b3c1;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-family: system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(12px, 2.2vw, 32px) clamp(12px, 3.5vw, 48px);
  color: var(--text);
  background: radial-gradient(ellipse at 35% 0%, #272034 0, transparent 50%), var(--ink);
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
.sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.eyebrow, .edition, .game-edition, #phase {
  color: var(--muted);
  font: 700 10px/1.25 var(--mono);
  letter-spacing: .11em;
}
.eyebrow { color: var(--gold); }
.wordmark {
  color: var(--text);
  font-size: clamp(20px, 2.2vw, 29px);
  font-weight: 950;
  letter-spacing: -.09em;
  line-height: 1;
}
.wordmark span { color: var(--red); }
.wordmark small { color: var(--muted); font-size: .62em; font-weight: 750; letter-spacing: -.05em; }
.status-dot, .controller-status i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.status-dot { display: inline-block; box-shadow: 0 0 14px #ff786980; margin-right: 5px; }
.edition-separator { color: var(--red); margin: 0 5px; }

/* Title and entry points */
.title-screen {
  overflow: hidden;
  background: #10111a;
  border: 1px solid #454252;
  border-radius: 12px;
  box-shadow: 0 24px 90px #0009;
}
.title-top, .title-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px clamp(14px, 2.5vw, 32px);
  background: #14151f;
}
.title-top { border-bottom: 1px solid #4d3a46; }
.title-marquee {
  position: relative; display: grid; place-items: center; isolation: isolate;
  min-height: clamp(350px, 59vh, 555px);
  padding: 23px 16px 42px;
  background: linear-gradient(0deg, #10111a 0%, #10111ab0 14%, transparent 65%, #100e23a0),
    url("assets/stages/theater.jpg") center 51% / cover;
}
.title-marquee::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, #121020f5, #12102088 28%, transparent 60%),
    linear-gradient(0deg, #10111a 0%, transparent 28%);
}
#title-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.title-copy { width: min(100%, 600px); text-align: center; }
.title-kicker {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 0 0 13px; color: var(--gold); font: 800 11px/1.2 var(--mono); letter-spacing: .28em;
}
.title-kicker span { width: 24px; height: 1px; background: #ff786980; }
#title-brand {
  margin: 0; color: var(--text); font: 900 clamp(78px, 12.3vw, 166px)/.75 var(--display);
  letter-spacing: -.04em; transform: skew(-9deg);
  text-shadow: 3px 4px #753945, 7px 8px #170f20, 0 0 55px #4a202c;
}
#title-brand em { display: block; font-style: normal; color: var(--red); }
.title-tagline { margin: 21px auto 10px; color: var(--text); font-size: clamp(12px, 1.6vw, 17px); font-weight: 750; }
.title-music {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
  color: var(--muted); background: #181923c7; border: 1px solid #4e4655;
  border-radius: 99px; font-size: 11px; font-weight: 700;
}
.title-music:hover, .title-music[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.title-music span:first-child { color: var(--gold); }
.title-actions {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px; max-width: 1050px; margin: -25px auto 0; padding: 0 clamp(12px, 2.4vw, 24px) 13px;
}
.title-button {
  min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 69px; padding: 10px 14px;
  border: 1px solid #4b4658; border-radius: 7px; background: linear-gradient(145deg, #262435, #181925);
  box-shadow: 0 7px 15px #0005; text-align: left;
}
.title-card-index { color: #a5a2b8; font: 750 11px/1 var(--mono); }
.title-card-copy { display: grid; gap: 4px; flex: 1; min-width: 0; }
.title-card-copy strong { color: var(--text); font-size: clamp(13px, 1.55vw, 19px); line-height: 1.05; }
.title-card-copy small { color: var(--muted); font-size: clamp(10px, 1.1vw, 12px); font-weight: 600; }
.title-card-arrow { flex: none; color: var(--gold); font-size: 21px; line-height: 1; }
.title-primary { background: linear-gradient(145deg, #ffde9d, #ffc774); border-color: #ffe8bd; }
.title-primary :is(.title-card-index, strong, small, .title-card-arrow) { color: #301a22; }
.title-primary small { color: #5c3b37; }
.title-button:hover, .title-button[data-highlight="true"]:focus { border-color: var(--gold); transform: translateY(-2px); }
.title-button[data-highlight="true"]:focus { outline: 2px solid var(--mint); outline-offset: 2px; }
.title-pad { margin: 0 0 13px; color: var(--mint); text-align: center; font: 700 9px/1.3 var(--mono); letter-spacing: .06em; }
.title-footer { border-top: 1px solid var(--line); }
.title-footer, .game-footer { color: var(--muted); font: 700 10px/1.35 var(--mono); }
.title-footer b, .game-footer b { color: var(--red); }
.title-footer a { color: var(--gold); text-decoration: none; }
.title-footer a:hover { text-decoration: underline; }

/* Cabinet frame and mode navigation */
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 51px; margin-bottom: 11px; padding: 6px 2px;
}
.game-brand { display: flex; align-items: center; gap: 11px; padding: 2px; background: none; border: 0; }
.brand-back { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #464452; border-radius: 5px; }
.game-brand:hover .brand-back { color: var(--gold); border-color: var(--gold); }
.game-edition { border-left: 1px solid #4c4659; padding-left: 10px; }
.settings { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.sound {
  min-height: 30px; padding: 5px 8px; border: 1px solid #454451; border-radius: 5px;
  background: #1c1c28; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.sound:hover, .sound[aria-pressed="true"] { border-color: #857054; color: var(--gold); }
#pilot-look[aria-pressed="true"] { border-color: #526d71; color: var(--mint); }
#effect-strength[aria-pressed="true"] { color: var(--muted); border-color: var(--line); }
.arcade-screen { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(330px, 1fr); align-items: start; gap: 13px; }
.mode-tabs {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  padding: 4px; background: #12131c; border: 1px solid var(--line); border-radius: 8px;
}
.mode-tabs button {
  position: relative; min-width: 0; min-height: 39px; padding: 6px 7px;
  color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 5px;
  font-size: clamp(11px, 1.2vw, 14px); font-weight: 780;
}
.mode-tabs button span { margin-right: 4px; color: #9d98ae; font: 750 9px var(--mono); }
.mode-tabs button:hover { color: var(--text); background: #242331; }
.mode-tabs button[aria-pressed="true"] { color: var(--gold); background: #302737; border-color: #705644; }
.mode-tabs button[aria-pressed="true"] span { color: var(--gold); }
.menu-pad-guide {
  grid-column: 1 / -1; margin: -6px 0 0; padding: 4px 8px;
  color: var(--mint); font: 700 10px/1.5 var(--mono); white-space: pre-wrap;
}
[data-pad-focus="true"] { outline: 2px solid var(--mint); outline-offset: -2px; }
.cabinet, .select {
  min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); box-shadow: 0 12px 30px #0005;
}
.cabinet-top, .arcade-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 11px; background: #171924;
}
.cabinet-top { min-height: 42px; border-bottom: 1px solid #302f3e; }
.stage-heading, .stage-meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.stage-heading strong { color: var(--text); font-size: 13px; line-height: 1.2; overflow-wrap: anywhere; }
.stage-meta { justify-content: flex-end; }
.stage-picker { display: flex; align-items: center; gap: 4px; min-width: 0; }
.stage-picker label { min-width: 0; }
.stage-picker button {
  flex: none; width: 26px; height: 27px; padding: 0;
  border: 1px solid #454658; border-radius: 4px; background: #242637;
  color: var(--text); font: 800 18px/1 var(--mono);
}
.stage-picker button:hover { border-color: var(--gold); color: var(--gold); }
.stage-picker:has(select:disabled) { display: none; }
#match-stage {
  max-width: 100%; min-height: 27px; padding: 3px 5px; background: #222434;
  border: 1px solid #454658; border-radius: 4px; font-size: 11px;
}
#phase { text-align: right; font-size: 9px; }
.stage-meta:has(select:enabled) #phase { display: none; }
.arcade-toolbar { min-height: 37px; padding-block: 4px; background: #12141e; }
.controller-status { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11px; color: var(--muted); }
.controller-status i { width: 6px; height: 6px; background: #777485; }
.controller-status[data-pad="true"] { color: var(--mint); }
.controller-status[data-pad="true"] i { background: var(--mint); box-shadow: 0 0 10px #96e4d681; }
.arcade-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.arcade-actions button, .arcade-back {
  min-height: 27px; border: 1px solid #454658; border-radius: 4px;
  background: #242637; color: var(--text); font-size: 11px; font-weight: 750; padding: 4px 7px;
}
.arcade-actions button:disabled { opacity: .42; }
.arcade-actions button:not(:disabled):hover, .arcade-back:hover { color: var(--gold); border-color: #997651; }
#battle-music-toggle { font-size: 13px; min-width: 28px; }
#battle-music-toggle[aria-pressed="false"] { opacity: .55; }
#fullscreen-game[aria-pressed="true"] { color: var(--gold); border-color: #997651; }
.arena { position: relative; background: #090c19; }
#game { display: block; width: 100%; aspect-ratio: 16/9; image-rendering: pixelated; }
#game[data-look="hybrid"] { image-rendering: auto; }
.arena-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 8px; text-align: center; padding: 10px;
  background: radial-gradient(ellipse at center, #090a13e6 0%, #10101a99 46%, #10101a15 84%);
}
#overline, #pause-reason {
  color: var(--gold); font: 800 clamp(8px, 1.05vw, 12px)/1.35 var(--mono); letter-spacing: .09em;
  text-shadow: 0 2px 3px #000;
}
#announcement, .pause-title {
  color: var(--text); font: 900 clamp(29px, 5vw, 70px)/.98 var(--display); text-transform: uppercase;
  text-shadow: 2px 3px #4b253c, 0 4px 12px #000a;
}
#overlay:not([data-state="menu"]):not([hidden]) #announcement { animation: enter-card .21s ease-out both; }
@keyframes enter-card { from { transform: translateY(6px) scale(.96); opacity: .55; } to { transform: none; opacity: 1; } }
#overlay[data-state="menu"] {
  position: relative; inset: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto; align-items: center; gap: 3px 10px; text-align: left;
  padding: 10px 12px; background: #1c1d2a; border-top: 1px solid #5a4655;
}
#overlay[data-state="menu"] #overline { grid-area: 1 / 1; }
#overlay[data-state="menu"] #announcement { grid-area: 2 / 1; font-size: clamp(20px, 2.35vw, 33px); }
#overlay[data-state="menu"] #play { grid-area: 1 / 2 / 3; }
.primary {
  max-width: 100%; min-height: 36px; padding: 7px 10px; background: linear-gradient(#ffdfa3, #ffc778);
  border: 1px solid #ffe9bf; border-radius: 5px; color: #271922; box-shadow: 0 3px 0 #89543a;
  font-weight: 900; font-size: clamp(10px, 1.14vw, 13px); line-height: 1.2; letter-spacing: .02em;
}
.primary span { margin-left: 4px; }
.primary:hover { background: #ffe5af; }
.primary:disabled { opacity: .55; }
.pause-panel { z-index: 2; background: #0d0e19e6; }
.cabinet-bottom { padding: 10px 12px; }
.control-label { color: var(--gold); font: 800 9px var(--mono); margin-bottom: 6px; letter-spacing: .1em; }
.controls { display: flex; flex-wrap: wrap; gap: 4px; }
.controls button {
  display: flex; align-items: center; gap: 4px; min-height: 33px; padding: 4px 5px;
  border: 1px solid #454658; border-radius: 4px; background: #202231; color: var(--muted);
  font-size: 10px; font-weight: 650; touch-action: none;
}
.controls button[aria-pressed="true"] { border-color: var(--gold); background: #553748; }
.controls button[data-key="KeyP"] { border-color: #a5686d; }
.controls button[data-key="KeyO"] { border-color: #8c774e; }
kbd { color: var(--gold); font: 800 11px var(--mono); }
.tip, .keyboard-guide, .pad-guide, .combo-guide { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.combo-guide b { color: var(--mint); }
.combo-guide b:nth-of-type(2) { color: #ffad75; }
.combo-guide span { margin-inline: 5px; }
.pad-guide { color: var(--mint); }
.arcade-screen[data-match="false"] .controls, .arcade-screen[data-match="false"] .control-label { display: none; }
.arcade-screen[data-match="true"] { display: block; }
.arcade-screen[data-match="true"] .cabinet {
  max-width: min(1120px, max(480px, calc((100dvh - 154px) * 16 / 9))); margin-inline: auto;
}
.arcade-screen[data-match="true"] :is(.mode-tabs, .menu-pad-guide, .select, .stage-picker, .tip) { display: none; }
.arcade-screen[data-match="false"] .pad-guide { display: none; }
.arcade-screen[data-match="true"] #phase { display: inline; }

/* Roster and face-off */
.select { padding: 12px; }
.select-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.select-header h2 { margin: 2px 0 0; font: 800 clamp(24px, 3vw, 36px)/1 var(--display); text-transform: uppercase; }
.count { color: var(--gold); background: #2f2837; border: 1px solid #544456; border-radius: 5px; padding: 5px 7px; font: 800 12px var(--mono); }
.matchup { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 5px; margin-bottom: 8px; }
.face-off {
  display: flex; align-items: center; gap: 4px; min-width: 0; padding: 4px;
  background: linear-gradient(130deg, #382d39, #232536); border: 1px solid #59454c; border-radius: 5px;
}
.face-off.cpu { background: linear-gradient(135deg, #412a3a, #272536); border-color: #65444e; }
.face-off canvas { width: 43px; height: 36px; flex: none; object-fit: cover; }
.face-off span { display: grid; min-width: 0; gap: 1px; }
.face-off small { color: var(--gold); font: 800 8px/1.3 var(--mono); letter-spacing: .06em; }
.face-off.cpu small { color: #ffb2a2; }
.face-off b { color: var(--text); font-size: 13px; line-height: 1.12; overflow-wrap: anywhere; }
.side-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; }
.side-switch:has(#choose-cpu[hidden]) { display: none; }
.side-switch button {
  min-height: 30px; background: #212333; border: 1px solid #414456; border-radius: 4px;
  color: var(--muted); font-size: 11px; font-weight: 750;
}
.side-switch button[aria-pressed="true"] { color: var(--text); background: #372c3a; border-color: #a17d54; }
.side-switch b { color: var(--gold); font: 800 10px var(--mono); margin-right: 3px; }
.side-switch button:last-child b { color: var(--red); }
.roster { --roster-columns: 6; display: grid; grid-template-columns: repeat(var(--roster-columns), minmax(0, 1fr)); gap: 5px; }
.roster button {
  position: relative; display: grid; grid-template-rows: auto 14px; overflow: hidden; min-width: 0; padding: 0;
  border: 1px solid #3c4053; border-radius: 5px; background: radial-gradient(ellipse at 50% 80%, #343850, #161924 70%);
  transition: border-color .13s ease, background .13s ease;
}
.roster button:hover, .roster button[data-pad-focus="true"] { border-color: var(--mint); background: radial-gradient(ellipse at 50% 80%, #47516a, #222534 70%); }
.roster button:focus-visible { outline-offset: -2px; z-index: 1; }
.roster button[data-side="J1"] { border-color: var(--gold); background: radial-gradient(ellipse at 50% 80%, #805548, #292231 80%); }
.roster button:is([data-side="J2"], [data-side="IA"]) { border-color: var(--red); background: radial-gradient(ellipse at 50% 80%, #724051, #282036 80%); }
.roster button[data-side]::after {
  content: attr(data-side); position: absolute; top: 1px; right: 1px; padding: 2px 3px;
  background: var(--gold); color: #1a121a; border-radius: 3px; font: 800 8px/1 var(--mono);
}
.roster button:is([data-side="J2"], [data-side="IA"])::after { background: var(--red); }
.roster canvas { display: block; width: 100%; height: 100%; aspect-ratio: 1.27; object-fit: cover; }
.roster button span {
  display: block; overflow: hidden; text-overflow: ellipsis; padding-inline: 2px; white-space: nowrap;
  background: #171927; color: var(--text); text-transform: uppercase;
  font: 800 clamp(8px, .71vw, 10px)/14px var(--mono); letter-spacing: -.035em;
}
.roster button[data-locked] { cursor: not-allowed; }
.roster button[data-locked] canvas { filter: saturate(.25); opacity: .64; }
.roster button[data-locked]::after {
  content: "◆"; position: absolute; top: 2px; right: 3px; background: #171827; color: #c2b8ca;
  border: 1px solid #625a6a; border-radius: 3px; font: 700 8px/1 var(--mono); padding: 2px;
}
.roster button[data-fixed]:not([data-side]) { opacity: .57; }
.move-card, .campaign-panel {
  margin-top: 9px; padding: 8px; border: 1px solid #393949; border-radius: 5px; background: #1b1c28;
  color: var(--muted); font-size: 11px; line-height: 1.35;
}
.move-card h3 { margin: 0 0 4px; color: var(--text); font-size: 13px; }
.move-card dl { display: grid; grid-template-columns: 18px minmax(0,1fr); gap: 2px 5px; margin: 0; }
.move-card dt { color: var(--gold); font: 800 10px/1.45 var(--mono); }
.move-card dd { margin: 0; }
.arcade-screen[data-mode="arcade"] .move-card { display: none; }
.campaign-track, .room-label { color: var(--gold); font: 800 9px/1.25 var(--mono); letter-spacing: .08em; }
.campaign-panel strong { color: var(--text); font-size: 12px; }
.campaign-panel progress { display: block; width: 100%; height: 6px; margin: 5px 0; accent-color: var(--gold); }
.campaign-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 6px; font-size: 10px; }
.campaign-panel details { margin-top: 4px; }
.campaign-panel summary { cursor: pointer; color: var(--gold); }
.campaign-panel p { margin: 4px 0; }
/* Pleine largeur : le curseur manette (movePadCursor) va au contrôle le plus aligné ;
   à 99 px collé à gauche, « Duel signature » juste dessous gagnait toujours. */
#campaign-new { display: block; width: 100%; margin-top: 6px; border: 1px solid #555062; border-radius: 3px; padding: 6px; background: #272638; font-size: 11px; }
#campaign-new[data-confirm="true"] { border-color: #ff514d; background: #4a1f26; color: #fff; }
.duel-preset {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 5px;
  margin-top: 8px; padding: 6px 8px; color: var(--gold); background: #2d2635;
  border: 1px solid #5f4a50; border-radius: 4px; font: 800 9px/1.3 var(--mono); text-align: left;
}
.duel-preset:hover { border-color: var(--gold); }
.duel-preset strong { color: var(--text); font-family: system-ui, sans-serif; font-size: 11px; text-align: right; }
.selection-demo, .online-room { background: #222030; border-block: 1px solid #4c3c50; padding: 8px 12px; }
.online-room { padding: 8px; border: 1px solid #4c3c50; border-radius: 5px; margin-bottom: 7px; }
#room-status { color: var(--text); font-size: 12px; margin: 4px 0 0; }
.room-link, .demo-caption, .demo-toolbar, #demo-moves { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.room-link { margin-top: 6px; }
.room-link input, .room-link button, .demo-toolbar button {
  border: 1px solid #5e5266; border-radius: 4px; background: #2b293d; padding: 5px 7px; font-size: 11px; font-weight: 750;
}
.room-link input { flex: 1; min-width: 0; background: #151623; }
.demo-caption { gap: 7px; margin-bottom: 6px; color: var(--text); font-size: 13px; }
.demo-detail { margin: 0 0 7px; color: var(--muted); font-size: 11px; }
#demo-tier { padding: 3px 5px; border-radius: 3px; color: #291926; background: var(--gold); font: 800 9px var(--mono); text-transform: uppercase; }
.demo-toolbar { justify-content: space-between; }
.demo-toolbar button:hover, .demo-toolbar button[aria-pressed="true"] { color: var(--gold); border-color: #a17d54; background: #3a2d3c; }
.demo-toolbar [data-combo="cascade"] { border-color: #4e8c85; color: var(--mint); }
.demo-toolbar :is([data-combo="meteor"], [data-combo="riner-ippon"]) { border-color: #a57359; color: #ffda79; }
.demo-toolbar [data-combo="macron-tenaille"] { border-color: #52899f; color: #9eeaff; }
.demo-toolbar [data-signature] { border-color: #9d7855; color: #ffdb91; }
.demo-toolbar kbd { margin-left: 5px; font-size: 10px; }
.demo-pad-note { display: none; margin: 5px 0 0; color: var(--mint); font-size: 10px; }
.cabinet:has(.controller-status[data-pad="true"]) .demo-pad-note { display: block; }
.game-footer { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }

/* Full-screen and compact layouts */
.arcade-screen[data-screen]:not([data-screen="normal"]) {
  min-width: 100%; min-height: 100dvh; margin: 0; padding: 12px; gap: 10px; overflow: auto;
  background: var(--ink); align-content: start;
}
.arcade-screen[data-screen="focus"] { position: fixed; inset: 0; z-index: 50; }
body:has(.arcade-screen[data-screen="focus"]) { overflow: hidden; }
body:has(.arcade-screen[data-screen="focus"]) > :is(header, footer) { visibility: hidden; }
.arcade-screen[data-screen]:not([data-screen="normal"])[data-match="true"] { display: flex; align-items: center; justify-content: center; }
.arcade-screen[data-screen]:not([data-screen="normal"])[data-match="true"] .cabinet { width: min(100%, calc((100dvh - 104px) * 16 / 9)); max-width: none; }
.arcade-screen[data-screen]:not([data-screen="normal"])[data-match="true"] .cabinet-bottom { display: none; }
@media (pointer: coarse) {
  .arcade-screen[data-screen]:not([data-screen="normal"])[data-match="true"] .cabinet { width: min(100%, calc((100dvh - 168px) * 16 / 9)); }
  .arcade-screen[data-screen]:not([data-screen="normal"])[data-match="true"] .cabinet-bottom { display: block; padding-block: 5px; }
  .arcade-screen[data-screen]:not([data-screen="normal"])[data-match="true"] .cabinet-bottom > :not(.controls) { display: none; }
}
@media (max-width: 830px) {
  .title-marquee { min-height: clamp(350px, 50vh, 410px); }
  .arcade-screen { grid-template-columns: minmax(0, 1fr); }
  .roster button span { font-size: 10px; }
}
@media (max-width: 570px) {
  .edition-separator, .game-edition, .sound span { display: none; }
  .edition { font-size: 8px; text-align: right; }
  .title-marquee { min-height: 350px; padding-block: 30px; }
  #title-art { width: 145%; left: -22.5%; opacity: .63; }
  .title-actions { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .title-button { min-height: 52px; }
  .mode-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-tabs button { min-height: 33px; }
  .cabinet-top, .arcade-toolbar, .cabinet-bottom, .select { padding-inline: 8px; }
  .stage-heading { gap: 4px; }
  .stage-heading .eyebrow { display: none; }
  .stage-heading strong { font-size: 12px; }
  #match-stage { max-width: min(49vw, 185px); }
  .controller-status, .arcade-actions button { font-size: 10px; }
  .arcade-actions button { padding-inline: 4px; }
  #overlay[data-state="menu"] { padding-inline: 8px; }
  .roster { --roster-columns: 4; }
  .roster button span { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Street Battle shares the cabinet and has its own episode panel. */
.title-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.title-street { background: linear-gradient(145deg, #492c47, #231d31); border-color: #975a71; }
.title-street :is(.title-card-index, .title-card-arrow) { color: #ffa6b0; }
.mode-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.arcade-screen:not([data-mode="street"]) .street-only,
.arcade-screen[data-mode="street"] :is(.duel-only, .side-switch, .duel-preset) { display: none; }
.arcade-screen[data-mode="street"] .face-off { flex: 1; }
.street-roster-note { margin: 2px 0 10px; color: var(--mint); font-size: 11px; line-height: 1.45; }
@media (max-width: 710px) {
  .title-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 355px) {
  .title-button { padding-inline: 7px; gap: 5px; }
  .title-card-arrow { font-size: 16px; }
}

/* Shared Street Battle ranking */
.title-rank { border-color: #6e6954; background: linear-gradient(145deg, #373134, #201e2b); }
@media (min-width: 711px) { .title-actions { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
#leaderboard {
  width: min(94vw, 620px); max-height: min(92dvh, 780px); overflow: auto; color: var(--text);
  border: 1px solid #7a5c56; border-radius: 12px; padding: clamp(12px, 3vw, 24px);
  background: linear-gradient(152deg, #2c2235, #191b29 70%); box-shadow: 0 28px 95px #05050acc;
}
#leaderboard::backdrop { background: #0a0b14c9; backdrop-filter: blur(3px); }
.rank-header { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.rank-header .eyebrow { margin:0 0 5px; color:var(--gold); }
.rank-header h2 { margin:0; font:900 clamp(24px, 5vw, 44px)/1 var(--display); text-transform:uppercase; }
.rank-header button { flex:none; white-space:nowrap; }
#rank-form { margin-top:13px; border:1px solid #816659; border-radius:7px; padding:10px; background:#342838; }
#rank-invite { margin:0 0 7px; color:var(--gold); font:800 13px/1.2 var(--mono); }
#rank-form label { display:block; margin-bottom:4px; color:var(--text); font-size:12px; }
.rank-field { display:flex; gap:7px; flex-wrap:wrap; }
.rank-field input { flex:1 1 156px; min-width:0; padding:8px; color:var(--text); background:#1d1a28; border:1px solid #776473; border-radius:4px; font:inherit; }
#rank-feedback { color:var(--mint); margin:10px 0; font-size:12px; }
#rank-feedback:empty { margin:0; }
.rank-table { width:100%; margin-top:11px; border-collapse:collapse; font:650 clamp(11px, 2.7vw, 14px)/1.2 var(--mono); }
.rank-table :is(th,td) { padding:7px 6px; border-bottom:1px solid #4c4054; }
.rank-table thead th { color:var(--muted); font-size:.83em; text-align:left; }
.rank-table :is(th,td):nth-child(n+3) { text-align:right; white-space:nowrap; }
.rank-table tbody th { text-align:left; overflow-wrap:anywhere; }
.rank-table .rank-place { color:var(--gold); width:3em; }
.rank-table .rank-votes { color:#ffe0a5; font-weight:850; }
.rank-table .rank-percent, .rank-name small, .rank-empty { color:var(--muted); }
.rank-name small { display:block; font-size:.76em; margin-top:2px; }
.rank-highlight { background:#4c3b4b; }
.rank-note { color:var(--muted); font-size:11px; line-height:1.4; margin:11px 0 0; }

/* ── Manette tactile (touch-pad.js) ─────────────────────────────────────
   body[data-touch-fight] : off · on · paused · result · portrait.
   #arcade-screen (id) pour passer devant les règles plein écran / vue agrandie. */
.touch-pad, .touch-rotate { display: none; }
body[data-touch-fight="on"] #arcade-screen {
  touch-action: none; overscroll-behavior: none;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
@media (orientation: landscape) {
  body:is([data-touch-fight="on"], [data-touch-fight="paused"], [data-touch-fight="result"]) { overflow: hidden; }
  body:is([data-touch-fight="on"], [data-touch-fight="paused"], [data-touch-fight="result"]) #arcade-screen {
    position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
    min-height: 0; margin: 0; padding: 0; background: #05060c; overflow: hidden;
  }
  body:is([data-touch-fight="on"], [data-touch-fight="paused"], [data-touch-fight="result"]) #arcade-screen .cabinet {
    width: min(100vw, calc(100dvh * 16 / 9)); max-width: none; border: 0; border-radius: 0; box-shadow: none;
  }
  body:is([data-touch-fight="on"], [data-touch-fight="paused"], [data-touch-fight="result"]) #arcade-screen :is(.cabinet-top, .arcade-toolbar, .cabinet-bottom, .selection-demo) { display: none; }
  body[data-touch-fight="on"] #arcade-screen .touch-pad { display: block; }
}
@media (orientation: portrait) {
  body[data-touch-fight="portrait"] { overflow: hidden; }
  body[data-touch-fight="portrait"] .touch-rotate { display: flex; }
}
.touch-pad {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none;
}
.touch-pad > * { pointer-events: auto; touch-action: none; }
.tp-stick-zone { position: absolute; left: 0; bottom: 0; width: 42%; height: 74%; }
.tp-stick {
  position: absolute; left: calc(max(12px, env(safe-area-inset-left)) + 6px); bottom: 16px;
  width: min(40vh, 156px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #f8efdf10 0 36%, #0b0c1470 37%); border: 2px solid #f8efdf3d;
}
.tp-stick i { position: absolute; width: 18%; height: 12%; background: #f8efdf55; }
.tp-stick i[data-dir="ArrowUp"] { left: 41%; top: 6%; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.tp-stick i[data-dir="ArrowDown"] { left: 41%; bottom: 6%; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.tp-stick i[data-dir="ArrowLeft"] { width: 12%; height: 18%; left: 6%; top: 41%; clip-path: polygon(0 50%, 100% 0, 100% 100%); }
.tp-stick i[data-dir="ArrowRight"] { width: 12%; height: 18%; right: 6%; top: 41%; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.tp-stick i[data-down] { background: var(--gold); }
.tp-knob {
  position: absolute; left: 28%; top: 28%; width: 44%; height: 44%; border-radius: 50%;
  background: #f8efdf2e; border: 2px solid #f8efdf70; box-shadow: 0 2px 10px #0008;
}
.tp-buttons {
  --tp: min(17vh, 66px);
  position: absolute; right: calc(max(12px, env(safe-area-inset-right)) + 4px); bottom: 14px;
  display: grid; grid-template-columns: repeat(3, var(--tp)); gap: min(2.4vh, 9px);
}
.tp-buttons[data-layout="street"] { --tp: min(15.5vh, 60px); grid-template-columns: repeat(4, var(--tp)); }
.tp-button {
  display: grid; place-content: center; width: var(--tp); aspect-ratio: 1; border-radius: 50%;
  text-align: center; color: var(--text); background: #0b0c1480; border: 2px solid #f8efdf52;
  box-shadow: 0 2px 10px #0007; transition: transform .06s, background .06s;
}
.tp-button b { font: 900 calc(var(--tp) * .34)/1 var(--display); }
.tp-button small { margin-top: 1px; font: 750 calc(var(--tp) * .155)/1 system-ui, sans-serif; opacity: .82; }
.tp-button[data-tkey="KeyO"] { border-color: #b39350a0; }
.tp-button[data-tkey="KeyP"] { border-color: #c7737aa0; }
.tp-button[data-tkey="KeyO"][data-ready="true"] { border-color: var(--gold); box-shadow: 0 0 14px #ffd48599; color: var(--gold); }
.tp-button[data-tkey="KeyP"][data-ready="true"] { border-color: var(--red); box-shadow: 0 0 16px #ff7869aa; color: var(--red); }
.tp-button:is([data-tkey="Space"], [data-tkey="ShiftLeft"]) { color: var(--mint); border-color: #96e4d670; }
.tp-button[data-down] { transform: scale(.92); background: #ffd48566; border-color: var(--gold); }
.tp-pause {
  position: absolute; left: 50%; top: 19%; translate: -50% 0; padding: 5px 11px;
  color: var(--text); font: 800 11px/1 var(--mono); background: #0b0c1499; border: 1px solid #f8efdf45; border-radius: 99px;
}
.touch-rotate {
  position: fixed; inset: 0; z-index: 80; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 24px; text-align: center; color: var(--text); background: #0b0c14f5;
}
.touch-rotate strong { margin-top: 18px; font: 900 30px/1 var(--display); letter-spacing: .01em; }
.touch-rotate small { color: var(--muted); font-size: 14px; }
.tp-phone { width: 46px; height: 78px; border: 3px solid var(--gold); border-radius: 9px; animation: tp-turn 1.9s ease-in-out infinite; }
@keyframes tp-turn { 0%, 25% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
@media (prefers-reduced-motion: reduce) { .tp-phone { animation: none; transform: rotate(-90deg); } }

/* ── Menus sur écran tactile ────────────────────────────────────────────
   html[data-touch="true"] est posé par touch-pad.js : l'ordinateur n'est pas concerné. */
.touch-launch { display: none; }
html[data-touch="true"] .keyboard-guide,
html[data-touch="true"] .controller-status[data-pad="false"],
html[data-touch="true"] .arcade-screen[data-match="false"] #pause-game { display: none; }
html[data-touch="true"] .arcade-toolbar { justify-content: flex-end; }
html[data-touch="true"] #fullscreen-game span:last-child { display: none; }
html[data-touch="true"] #fullscreen-game { min-width: 38px; }
/* Le bloc « titre + Lancer » sous l'arène fait doublon avec la barre du bas. */
html[data-touch="true"] #overlay[data-state="menu"] { display: none; }
/* Onglets de mode : une seule ligne qu'on fait défiler au doigt. */
html[data-touch="true"] .mode-tabs {
  display: flex; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
html[data-touch="true"] .mode-tabs::-webkit-scrollbar { display: none; }
html[data-touch="true"] .mode-tabs button { flex: none; min-height: 38px; padding-inline: 13px; white-space: nowrap; scroll-snap-align: start; }
/* Barre de lancement collée en bas. */
body[data-touch-menu="true"] { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
body[data-touch-menu="true"] .touch-launch:not([hidden]) {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 10px;
  padding: 10px max(14px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: linear-gradient(#151722f0, #0b0c14fa); border-top: 1px solid #4d3a46; box-shadow: 0 -10px 28px #0009;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.tl-copy { display: grid; gap: 2px; flex: 1; min-width: 0; }
.tl-copy small { overflow: hidden; color: var(--gold); font: 800 9px/1.2 var(--mono); letter-spacing: .08em; white-space: nowrap; text-overflow: ellipsis; }
.tl-copy strong { overflow: hidden; color: var(--text); font: 900 19px/1.05 var(--display); text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis; }
.touch-launch button { flex: none; min-height: 46px; padding-inline: 16px; font-size: 14px; }
.touch-launch button:disabled { opacity: .5; }

/* Portrait */
@media (orientation: portrait) {
  html[data-touch="true"] .title-marquee { min-height: 300px; padding-block: 24px; }
  html[data-touch="true"] .title-actions { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  html[data-touch="true"] .title-button { min-height: 56px; }
  html[data-touch="true"] .title-card-copy { grid-template-columns: auto 1fr; align-items: baseline; column-gap: 8px; }
  html[data-touch="true"] .title-card-copy small { text-align: right; }
}
/* Paysage (téléphone : peu de hauteur) */
@media (orientation: landscape) and (max-height: 540px) {
  html[data-touch="true"] body { padding-block: 8px; }
  /* Écran titre : tout tient sans défiler, ou presque. */
  html[data-touch="true"] .title-top { padding-block: 8px; }
  html[data-touch="true"] .title-marquee { min-height: 0; padding-block: 14px 12px; }
  html[data-touch="true"] .title-kicker { margin-bottom: 6px; }
  html[data-touch="true"] #title-brand { font-size: min(21vh, 92px); }
  html[data-touch="true"] .title-tagline { margin: 10px auto 6px; font-size: 12px; }
  html[data-touch="true"] .title-music { padding-block: 4px; }
  html[data-touch="true"] .title-actions { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 0; }
  html[data-touch="true"] .title-button { min-height: 0; padding: 9px 8px; justify-content: center; text-align: center; }
  html[data-touch="true"] :is(.title-card-index, .title-card-arrow, .title-card-copy small) { display: none; }
  html[data-touch="true"] .title-card-copy strong { font-size: 13px; }
  html[data-touch="true"] .title-footer { padding-block: 8px; }
  /* Sélection : arène à gauche, distribution à droite. */
  html[data-touch="true"] .arcade-screen[data-match="false"] { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 8px; }
  html[data-touch="true"] .arcade-screen[data-match="false"] .stage-heading { display: none; }
  html[data-touch="true"] .arcade-screen[data-match="false"] .cabinet { position: relative; }
  html[data-touch="true"] .arcade-screen[data-match="false"] .stage-meta { justify-content: flex-start; padding-right: 92px; }
  html[data-touch="true"] .arcade-screen[data-match="false"] .arcade-toolbar { position: absolute; top: 0; right: 0; min-height: 42px; padding-block: 0; background: none; }
  html[data-touch="true"] .arcade-screen[data-match="false"] .demo-detail { display: none; }
  html[data-touch="true"] .arcade-screen[data-match="false"] :is(.tip, .combo-guide) { display: none; }
  html[data-touch="true"] .arcade-screen[data-match="false"] .cabinet-bottom:not(:has(.online-room:not([hidden]))) { display: none; }
  html[data-touch="true"] .select { padding: 9px; }
  html[data-touch="true"] .select-header h2 { font-size: 20px; }
  html[data-touch="true"] .roster { --roster-columns: 4; }
  html[data-touch="true"] .masthead { margin-bottom: 6px; }
  html[data-touch="true"] .tl-copy strong { font-size: 17px; }
  body[data-touch-menu="true"] { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  body[data-touch-menu="true"] .touch-launch:not([hidden]) { padding-block: 7px calc(7px + env(safe-area-inset-bottom)); }
  .touch-launch button { min-height: 40px; }
}

.edition-home{color:#e7c96c;text-decoration:none;font-size:12px;white-space:nowrap}.edition-home:hover{text-decoration:underline}

/* Withdrawn from the presidential race, still playable. */
[data-withdrawn="true"]{border-color:#85858d!important}
[data-withdrawn="true"] img,[data-withdrawn="true"] canvas{filter:grayscale(1);opacity:.72}
[data-withdrawn="true"]:after{content:"HORS COURSE · JOUABLE";position:absolute;top:0;left:0;right:0;background:#292932e8;color:#fff;font:700 7px/1.4 Arial,sans-serif;text-align:center;pointer-events:none}
