/* One visual system for preparation, room dialogs and the live court.
   Shot hit areas, layout presets and gesture coordinates are owned by the
   control system; only their surfaces and interaction colours change here. */
body {
  --ink:#f2f2e9; --muted:#aab8af; --paper:#14221e; --surface:#20312b;
  --line:#40544a; --soft:#273b31; --green:#c0dd94;
  --button-face:#c2dc9b; --button-edge:#9cb77c;
  color:var(--ink); color-scheme:dark; background:#101b18;
}
body button:focus-visible,body summary:focus-visible,body input:focus-visible { outline:2px solid #d6efac; outline-offset:3px; }
body .primary-btn,body .secondary-btn,body .dialog .primary-btn,body .dialog .secondary-btn { border-radius:3px; box-shadow:none; font-weight:550; }
body .primary-btn,body .dialog .primary-btn { background:#c2dc9b; color:#152218; border:1px solid #c2dc9b; }
body .secondary-btn,body .dialog .secondary-btn { background:#25392d; color:#e3eadc; border:1px solid #4b6451; }
body .primary-btn:hover { background:#d1e9ad; }
body .secondary-btn:hover { background:#314837; }
body .text-btn { color:#c5d4c2; }
body input:not([type=range]):not([type=checkbox]),body .dialog input { color:var(--ink); background:#101d19; border:1px solid #40544a; border-radius:3px; box-shadow:none; }
body input::placeholder { color:#8e9f92; }
body .segments { background:#10201a; border-radius:3px; }
body .segments button { color:#afbeb1; border-radius:2px; }
body .segments button.selected { color:#e1f1c5; background:#314837; box-shadow:inset 0 -2px #b8d88e; }

/* Keep the three home entrances on one line, including short phone landscapes. */
body[data-screen=menu] #menu .menu-foot-actions { margin-inline:0; flex-wrap:nowrap; gap:0 clamp(12px,1.5vw,20px); }
body[data-screen=menu] #menu .menu-foot-actions > button { flex:none; display:inline-flex; align-items:center; justify-content:center; white-space:nowrap; line-height:16px; padding-block:0; }
body[data-screen=menu] #menu .community-entry { width:auto; flex:none; min-height:44px; padding:0; border:0; background:none; color:#d5dfcc; white-space:nowrap; line-height:16px; -webkit-text-size-adjust:none; text-size-adjust:none; }
body[data-screen=menu] #menu .community-entry:hover { color:#d6efac; }
/* Cache details are available inside the install dialog; keep the home links compact. */
body[data-screen=menu] #menu .pwa-entry small { display:none; }

/* Center each preparation view within the left side of the court. */
body[data-screen=menu] {
  --entry-gutter:max(clamp(20px,4vw,52px),var(--safe-left));
  --entry-width:min(390px,calc(52vw - 2 * var(--entry-gutter)));
  --entry-left:max(var(--entry-gutter),calc((52vw - var(--entry-width)) / 2));
  --entry-edge:max(12px,var(--safe-bottom));
  --entry-nav-top:max(8px,var(--safe-top));
  --entry-content-top:calc(var(--entry-nav-top) + 48px);
}
body[data-screen=menu]:has(#menu:not([data-entry=home])) .screen-vignette::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,#07100e50 38%,transparent 56%);
}
body[data-screen=menu] #menu.menu-panel:not([data-entry=home]) {
  inset:var(--entry-content-top) auto var(--entry-edge) var(--entry-left);
  width:var(--entry-width);
  max-width:none;
  height:auto;
  padding:4px 8px 4px 0;
  overscroll-behavior:contain;
  touch-action:pan-y;
  text-shadow:0 1px 5px #07100e;
}
body[data-screen=menu] #menu.menu-panel:not([data-entry=home])::before,
body[data-screen=menu] #menu.menu-panel:not([data-entry=home])::after { content:""; flex:1 0 0; }
body[data-screen=menu] #menu[data-entry=solo] #mode-setup { flex:0 0 auto; padding:0; }
body[data-screen=menu] #menu :is(#solo-actions,.friend-actions) {
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:0;
}
body[data-screen=menu] #menu:not([data-entry=home]) .lobby-action { font-size:20px; min-height:48px; }
body[data-screen=menu] #menu:not([data-entry=home]) .entry-heading {
  display:flex;
  align-items:center;
  min-height:44px;
  margin:0 0 4px;
}
body[data-screen=menu] #menu .entry-heading h2 { margin:0; font-size:clamp(20px,3.6vw,28px); font-weight:550; line-height:1.2; }
body[data-screen=menu] .entry-navigation {
  position:fixed;
  z-index:11;
  top:var(--entry-nav-top);
  left:max(12px,var(--safe-left));
  min-height:44px;
  margin:0;
  padding:6px 10px;
  border:1px solid #61745b66;
  border-radius:3px;
  background:#14221ee8;
  color:var(--ink);
  font-size:12px;
  text-decoration:none;
}
#entry-back,#leave-waiting { display:none; }
body[data-screen=menu]:has(#menu:not([data-entry=home])):not(:has(#dialog-backdrop:not([hidden]))) #entry-back,
body[data-screen=menu] #dialog-backdrop:has(#waiting-dialog:not([hidden])) #leave-waiting { display:block; }
body[data-screen=menu] .entry-navigation:hover { color:#d6efac; }
#waiting-dialog #copy-invite {
  flex:none;
  width:auto;
  min-height:44px;
  margin:0;
  padding:6px 0;
  background:none;
  text-decoration:none;
  font-size:11px;
}
#waiting-dialog #copy-invite:hover { color:#d6efac; }

body[data-screen=menu] #menu .field-label,
body[data-screen=menu] #menu .input-label { color:var(--muted); font-size:12px; font-weight:500; }
body[data-screen=menu] #menu .input-label { margin:0 0 6px; }
body[data-screen=menu] #menu .setup-row { display:grid; grid-template-columns:4.3em minmax(0,1fr); align-items:center; gap:8px; border:0; padding:0; margin:0; font-size:12px; }
body[data-screen=menu] #menu .setup-row + .setup-row { margin-top:5px; }
body[data-screen=menu] #menu .segments {
  padding:0;
  gap:4px;
  background:transparent;
  border:0;
  border-radius:0;
}
body[data-screen=menu] #menu .segments button {
  min-height:44px;
  font-size:12px;
  padding:4px;
  border:0;
  border-radius:0;
  background:transparent;
}
body[data-screen=menu] #menu .segments button.selected {
  color:#e1f1c5;
  background:transparent;
  box-shadow:inset 0 -2px var(--green);
}
body[data-screen=menu] #menu .format-choices { flex-wrap:nowrap; }
body[data-screen=menu] #menu .format-choices button { flex:1; }
body[data-screen=menu] #menu .format-choices button:last-child { flex:1.65; }
body[data-screen=menu] #menu .rules-note { min-height:0; margin:6px 0 0; font-size:11px; line-height:1.5; }
body[data-screen=menu] #menu .entry-rules { color:#d6dfd4; font-size:12px; line-height:1.45; }
body[data-screen=menu] #menu .challenge-skills-note { margin-bottom:4px; }
.setup-reference { margin-top:2px; color:var(--muted); font-size:12px; }
.setup-reference summary { cursor:pointer; min-height:44px; display:flex; align-items:center; gap:8px; list-style:none; }
.setup-reference summary::before { content:'＋'; }
.setup-reference[open] summary::before { content:'−'; }
.setup-reference summary::-webkit-details-marker { display:none; }
body[data-screen=menu] #menu .setup-reference .role-note { display:block; min-height:0; margin:0; }
body[data-screen=menu] #menu .entry-submit { width:min(100%,280px); margin:8px 0 0; border:0; }
body[data-screen=menu] #menu .entry-submit .primary-btn,
body #dialog-backdrop #waiting-dialog #ready-room {
  justify-content:flex-start;
  min-height:44px;
  padding:8px 12px;
  color:var(--ink);
  background:linear-gradient(90deg,#b3d78b29,transparent);
  border:0;
  border-left:3px solid #b8dc88;
  border-radius:0;
  font-size:15px;
  text-shadow:none;
}
body[data-screen=menu] #menu .entry-submit .primary-btn { margin:0; }
body[data-screen=menu] #menu .entry-submit .primary-btn:hover,
body #dialog-backdrop #waiting-dialog #ready-room:hover { background:linear-gradient(90deg,#b3d78b46,transparent); }
body[data-screen=menu] #menu :is(#player-name,#room-code) {
  background:#09140e60;
  border:0;
  border-bottom:1px solid #829586;
  border-radius:0;
}
body[data-screen=menu] #menu .entry-content { flex:none; overflow:visible; padding:0; }
body[data-screen=menu] #menu #player-name { height:44px; font-size:16px; }
body[data-screen=menu] #menu #player-profile-note { margin:6px 0 0; font-size:11px; line-height:1.5; }
body[data-screen=menu] #menu :is(#friend-join-options,#friend-create-options) { margin-top:6px; }
body[data-screen=menu] #menu .room-mode-picker { margin:6px 0 0; padding:0; background:none; border:0; }
body[data-screen=menu] #menu #friend-mode-note { display:block; font-size:11px; margin-top:5px; color:#e7c49b; }
body[data-screen=menu] #menu #room-code { font-family:'Rally Numerals','Rally UI',sans-serif; font-size:18px; letter-spacing:.12em; min-height:44px; }
body[data-screen=menu] #menu #room-code::placeholder { font-family:'Rally UI',sans-serif; font-size:13px; letter-spacing:0; }
body[data-screen=menu] #menu #friends-network-note { display:block; margin:6px 0 0; font-size:11px; }
body[data-screen=menu] #menu .hell-contract {
  gap:8px;
  justify-content:space-between;
  max-width:230px;
  padding:4px 0;
  background:none;
  border:0;
  text-align:center;
}
body[data-screen=menu] #menu .hell-contract strong { color:#deebba; font-family:'Rally Numerals','Rally UI',sans-serif; }
body[data-screen=menu] #menu .hell-contract small { font-family:'Rally UI',sans-serif; }
body[data-screen=menu] #menu .hell-skills { gap:0; margin:0; }
body[data-screen=menu] #menu .hell-skills article { padding:3px 0; border:0; border-radius:0; background:transparent; }
body[data-screen=menu] #menu .hell-skills article:first-child { padding-top:0; }
body[data-screen=menu] #menu .hell-skills b { color:var(--ink); font-weight:550; }
body[data-screen=menu] #menu .hell-skills p { color:var(--muted); opacity:1; }

/* The same matte surfaces continue through rooms, pause, results and settings. */
body #dialog-backdrop { background:#060d0ab8; }
body #dialog-backdrop .dialog { background:#14221efc; border:1px solid #40544a; border-top:2px solid #b8d88e; border-radius:4px; color:var(--ink); box-shadow:0 20px 70px #0006; scrollbar-color:#516454 #14221e; }
body #dialog-backdrop .dialog h2 { font-weight:500; letter-spacing:.04em; }
body #dialog-backdrop .dialog .eyebrow { display:none; }
body #dialog-backdrop .dialog .close-dialog { background:#25392d; color:#e3eadc; border-color:#40544a; min-width:44px; min-height:44px; border-radius:3px; }
body #dialog-backdrop .dialog .room-code,body #dialog-backdrop .dialog .pause-clock { color:#d6e7b5; background:transparent; border-color:#40544a; font-family:'Rally Numerals','Rally UI',sans-serif; }
body #dialog-backdrop .dialog :is(.rule-note,.room-mode-summary,.waiting-status,.lobby-players) { color:#b9c9b9; background:transparent; border-color:#40544a; }
body[data-screen=menu]:has(#waiting-dialog:not([hidden])) #menu { visibility:hidden; }
body #dialog-backdrop:has(#waiting-dialog:not([hidden])) {
  justify-content:flex-start;
  padding-top:var(--entry-content-top);
  padding-left:var(--entry-left);
  background:none;
  backdrop-filter:none;
}
body #dialog-backdrop #waiting-dialog {
  flex:0 1 390px;
  max-width:var(--entry-width);
  max-height:calc(var(--page-height) - var(--entry-content-top) - max(16px,var(--safe-bottom)));
  padding:4px 8px 4px 0;
  border:0;
  background:none;
  box-shadow:none;
  text-shadow:none;
}
body #dialog-backdrop #waiting-dialog h2 { margin:0; padding:0; font-size:22px; font-weight:550; }
#waiting-dialog .waiting-invite {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:0 12px;
  margin:4px 0 8px;
}
body #dialog-backdrop #waiting-dialog .room-code { margin:0; padding:0; border:0; font-size:27px; letter-spacing:.1em; }
#waiting-dialog :is(.waiting-status,.lobby-players,.rule-note) { margin:0; overflow-wrap:anywhere; }
#waiting-dialog .waiting-status { text-align:left; font-size:12px; }
#waiting-dialog .lobby-players { margin:6px 0; font-size:12px; line-height:1.5; }
#waiting-dialog .room-mode-summary { font-size:11px; }
#waiting-dialog .rule-note { padding:0; font-size:11px; line-height:1.5; }
#waiting-dialog .rule-note + .rule-note { margin-top:4px; }
#waiting-dialog #ready-room { width:min(100%,220px); margin:8px 0 0; }
#waiting-dialog #ready-room:disabled { display:none; }
body .topbar .icon-btn,body[data-screen=match] .match-settings-toggle { background:#14221ee8; color:#e5eadf; border:1px solid #61745b66; border-radius:3px; box-shadow:none; }
body[data-screen=match] .topbar button { min-height:36px; }
body .shot-layout-settings { background:#25392d; color:#e3eadc; border-color:#40544a; border-radius:3px; }
body .shot-layout-settings:hover { background:#314837; }
body .shot-layout-editor { background:linear-gradient(180deg,#14221e,#101b18); }

/* Two aligned competitors, completed games in muted type and the live score
   in its own column. The service marker stays within the name gutter. */
body .scoreboard {
  display:grid; gap:0; padding:0; overflow:hidden; border:0; border-radius:2px;
  background:#102621f5; color:#fff; box-shadow:0 2px 6px #08130e40;
}
.scoreboard .match-label {
  padding:3px 7px; background:#075e40; color:#fff; font:650 10px/1.35 'Rally UI',sans-serif;
}
body .scoreboard .score-player {
  min-height:23px; padding:0 0 0 6px; gap:4px; grid-template-columns:6px minmax(0,1fr) auto 32px;
  color:#f6f9f7; font-size:12px; line-height:1.15;
}
body .scoreboard .opponent { border-top:1px solid #ffffff26; }
.scoreboard .serve-mark {
  grid-column:1; width:0; height:0; border-block:3px solid transparent; border-left:5px solid #88edac;
}
.scoreboard [id^=name-] { grid-column:2; }
.scoreboard .previous-games { grid-column:3; color:#b9cac5; font:600 10px/1.2 monospace; white-space:pre; }
body .scoreboard .score-player b {
  grid-column:4; align-self:stretch; display:grid; place-items:center;
  background:#e8f4e9; color:#10392a; font:750 18px/1 Arial,sans-serif; font-variant-numeric:tabular-nums;
}
body .hud .match-note { color:#bccbb7; text-shadow:0 1px 4px #07120b; }
body .hud .match-note strong { color:#edf2df; }

body .joystick { border:1px solid #b3c6a766; background:#14221e99; box-shadow:inset 0 0 0 5px #c2dc9b08; }
body #knob { background:#b8c9ab66; border:1px solid #d5e5c4aa; box-shadow:none; }
body .stick-cross::before,body .stick-cross::after { background:#b3c6a744; }

body .aim-heading { background:transparent; border:0; box-shadow:none; }
body .aim-heading b { color:#dce8ce; text-shadow:0 1px 4px #07120b; }
body[data-shot-skin=glass] .shot-btn { --key-accent:#c6d9b2; }
body[data-shot-skin=glass] [data-shot=drop] { --key-accent:#b9d6c4; }
body[data-shot-skin=glass] [data-shot=smash] { --key-accent:#e5d3a3; }
body[data-shot-skin=glass] .key-face { background:linear-gradient(145deg,#334638dd,#14221ee8); border-color:#a2b49399; color:#edf1e4; box-shadow:inset 0 1px #dae8c622,0 4px 16px #0003; text-shadow:none; }
body[data-shot-skin=glass] .shot-btn.smash .key-face { background:linear-gradient(145deg,#494b36dd,#1c2920e8); border-color:#d5c39399; }
body[data-shot-skin=glass] .shot-btn.charging .key-face { background:#314837ed; box-shadow:inset 0 0 0 1px #c2dc9b77; }
body[data-shot-skin=glass] .shot-btn.smash.ready .key-face { border-color:#f0d791; box-shadow:0 0 0 2px #e7d39833; }
body[data-shot-skin=glass] .shot-btn.smash.unavailable .key-face { border-color:#82917e66; color:#bcc7b5aa; }
body .hell-status { background:#14221ef0; border-color:#a48f65; border-radius:3px; }
body .hell-status b { color:#ead29f; }
body .hell-status span { color:#c6cdb9; }
@media (max-height:600px) and (orientation:landscape) {
  body[data-screen=menu] #menu .menu-foot { gap:20px; }
  body[data-screen=menu] #menu .community-entry { font-size:11px; }
}
@media (max-height:360px) and (orientation:landscape) {
  body[data-screen=menu] #menu:not([data-entry=home]) .entry-heading { min-height:28px; margin-bottom:0; }
  body[data-screen=menu] #menu .setup-row + .setup-row { margin-top:0; }
  body[data-screen=menu] #menu .entry-submit { margin-top:4px; }
  body[data-screen=menu] #menu .input-label { margin-bottom:2px; }
  body[data-screen=menu] #menu :is(#friend-join-options,#friend-create-options) { margin-top:4px; }
  body[data-screen=menu] #menu .entry-rules { margin-top:4px; }
}
@media (max-width:640px) and (orientation:landscape) {
  body[data-screen=menu] #menu :is(#friend-formats,#ai-formats) button { font-size:11px; padding-inline:1px; }
  body[data-screen=menu] #menu .setup-row { gap:4px; }
}
@media (orientation:portrait), (max-width:520px) {
  body[data-screen=menu] {
    --entry-gutter:max(16px,var(--safe-left),var(--safe-right));
    --entry-width:min(390px,calc(100vw - 2 * var(--entry-gutter)));
    --entry-left:calc((100vw - var(--entry-width)) / 2);
  }
  body[data-screen=menu]:has(#menu:not([data-entry=home])) .screen-vignette::after { background:#07100e40; }
  body[data-screen=menu] #menu.menu-panel:not([data-entry=home]) { top:max(68px,calc(var(--safe-top) + 52px)); }
  body #dialog-backdrop:has(#waiting-dialog:not([hidden])) { justify-content:center; padding-inline:var(--entry-gutter); }
}

@media (max-width:520px) {
  body[data-screen=menu]:has(#menu:not([data-entry=home])) .topbar .top-actions { gap:4px; }
  body[data-screen=menu] .entry-navigation { width:44px; padding:0; font-size:0; }
  body[data-screen=menu] .entry-navigation::before { content:"←" / ""; font-size:20px; }
}
/* Keep all match actions on screen even on a 320px portrait viewport. */
@media (max-width:360px) {
  body[data-screen=match] .topbar { gap:3px; left:max(4px,var(--safe-left)); right:max(4px,var(--safe-right)); }
  body[data-screen=match] .topbar .brand { display:inline-flex; }
  body[data-screen=match] .topbar .brand-mark { width:23px; height:23px; }
  body[data-screen=match] .topbar .top-actions { gap:3px; }
  body[data-screen=match] .topbar .icon-btn:not(.display-btn) { width:26px; }
  body[data-screen=match] .topbar .display-btn { padding-inline:3px; }
  body[data-screen=match] .match-settings-toggle { white-space:nowrap; padding:4px; font-size:10px; }
}

@media (hover:hover) {
  body button.primary-btn:hover:not(:disabled),body .dialog button.primary-btn:hover:not(:disabled) { background:#d1e9ad; }
  body button.secondary-btn:hover:not(:disabled),body .dialog button.secondary-btn:hover:not(:disabled),body .role-card:not(.selected):hover,body .icon-btn:hover { background:#314837; border-color:#a9bba0; }
  body .segments button:not(.selected):hover { background:#263e2e; }
  body[data-screen=menu] #menu .segments button:not(.selected):hover:not(:disabled) {
    color:var(--ink);
    background:transparent;
  }
}
body .shuttle-edge-indicator { color:#ead29f !important; border-color:#a48f65 !important; }

body[data-screen=match] .brand { color:white; text-decoration:none; border:0; }
body[data-screen=match] .brand small { color:white; }
body[data-screen=match] .brand-mark { background:transparent url('../icons/rally.svg') center / contain no-repeat; border:0; }
body[data-screen=match] .brand-mark svg { display:none; }

/* Native dialogs are outside the shared backdrop but use the same palette. */
body :is(.onboarding-dialog,.pwa-dialog,.release-dialog) { color:#f2f2e9; background:#14221e; border:1px solid #40544a; border-top:2px solid #b8d88e; border-radius:4px; }
body :is(.onboarding-dialog,.pwa-dialog,.release-dialog)::backdrop { background:#060d0ab8; }
body :is(.onboarding-dialog,.pwa-dialog,.release-dialog) h2 { font-weight:500; letter-spacing:.03em; }
body :is(.onboarding-intro,.onboarding-keyboard,.onboarding-return-note,.pwa-note,.pwa-close,.release-close) { color:#aab8af; }
body :is(.onboarding-progress,.onboarding-instructions strong,.pwa-eyebrow) { color:#c0dd94; }
body .onboarding-visual,body .pwa-cache-detail { background:#1d3026; border-color:#40544a; }
body .onboarding-visual span { background:#314837; color:#e1f1c5; border-color:#829873; font-weight:550; }
body .pwa-actions button { background:#25392d; color:#e3eadc; border-color:#4b6451; }
body .pwa-actions #pwa-install,body .release-dialog .release-dismiss { background:#c2dc9b; color:#152218; border-color:#c2dc9b; }
body #dialog-backdrop .dialog .result-score { color:#deebba; }

/* The entrance never leaves live hit targets behind an invisible HUD. */
body[data-entering=true] :is(#hud,#game-controls,.topbar,.player-stamina-layer,#countdown) { visibility:hidden; pointer-events:none; }
body[data-screen=match]:not([data-entering=true]) :is(#hud,#game-controls) { animation:match-chrome-in 180ms ease-out; }
@keyframes match-chrome-in { from { opacity:0; } to { opacity:1; } }
@media(prefers-reduced-motion:reduce) { body[data-screen=match] :is(#hud,#game-controls) { animation:none; } }

/* Remove enclosing button frames; intentional one-sided dividers are restored
   below. Keep the existing hit areas, including navigation and dialogs. */
body button:not(.shot-btn) {
  border-color:transparent !important;
  background:transparent !important;
  box-shadow:none !important;

}
body :is(.primary-btn,.secondary-btn,.pwa-actions button,.release-dismiss,.onboarding-next) {
  color:var(--ink) !important;
}
body button:is(.selected,[aria-pressed=true],[aria-expanded=true]):not(.shot-btn) {
  color:#d6efac !important;
  text-decoration:underline;
  text-underline-offset:6px;
}
/* One divider per destination. Filled controls below commit an action. */
body[data-screen=menu] #menu .lobby-action {
  border:0;
  border-bottom:1px solid var(--line) !important;
  padding-inline-start:2px;
}
body[data-screen=menu] #menu .lobby-action > span:last-child {
  color:var(--button-face);
  font-weight:400;
}
body[data-screen=menu] #menu .segments button.selected {
  box-shadow:inset 0 -2px var(--green) !important;
  text-decoration:none;
}
body button:not(.shot-btn):focus-visible {
  outline:2px solid var(--button-face);
  outline-offset:-2px;
  text-decoration:underline;
  text-underline-offset:6px;
  text-decoration-thickness:2px;
}
body button:not(.shot-btn):active:not(:disabled) { opacity:.72; }
@media(hover:hover) {
  body button:not(.shot-btn):hover:not(:disabled) { color:#d6efac !important; }
}

/* Results share the open, ruled composition of match preparation. */
body #dialog-backdrop #result-dialog {
  flex:0 1 720px; width:720px; display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(180px,1fr);
  gap:32px; padding:28px 32px; border:0; border-radius:0;
  background:linear-gradient(115deg,#14221efa,#101d19f5);
  box-shadow:0 20px 70px #0003;
}
#result-dialog .result-summary,#result-dialog .result-actions { min-width:0; }
#result-dialog .result-kicker,#result-dialog .result-actions-label {
  color:#9bab9d; font-size:11px; line-height:1.5; letter-spacing:.08em;
}
body #dialog-backdrop #result-dialog h2 {
  margin:6px 0 18px; padding:0; font-size:30px; line-height:1.25;
}
#result-dialog[data-outcome=win] #result-title { color:#d6e7b5; }
#result-dialog .result-scoreboard {
  padding:14px 0 12px; border-block:1px solid #b7c7ab30;
}
#result-dialog .result-team-names {
  display:grid; grid-template-columns:1fr 1fr; gap:32px;
  text-align:center; color:#c1cdbf; font-size:12px; line-height:1.5;
}
#result-dialog .result-team-names span { min-width:0; overflow-wrap:anywhere; }
body #dialog-backdrop #result-dialog .result-score {
  display:grid; grid-template-columns:1fr 32px 1fr; align-items:center;
  margin:8px 0 4px; padding:0; border:0; font-size:64px;
  line-height:1.05; letter-spacing:0; color:#e2e9d9;
}
#result-dialog .result-colon { color:#7c8e7d; font-size:32px; font-weight:400; }
#result-dialog[data-outcome=win] #result-score-self,
#result-dialog[data-outcome=loss] #result-score-other { color:#d6e7b5; }
#result-dialog .result-score-label { text-align:center; color:#9bab9d; font-size:10px; line-height:1.5; letter-spacing:.12em; }
#result-dialog #result-reason { margin:12px 0 0; color:#afbfaf; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
#result-dialog .result-actions { align-self:center; padding-left:28px; border-left:1px solid #b7c7ab30; }
#result-dialog .result-actions-label { display:block; margin-bottom:8px; }
body #dialog-backdrop #result-dialog :is(.primary-btn,.secondary-btn,.text-btn) {
  position:relative; width:100%; min-height:48px; margin:0; padding:12px 0;
  border:0; border-radius:0; text-align:left; line-height:1.5;
}
body #dialog-backdrop #result-dialog .primary-btn { font-size:18px; font-weight:550; white-space:normal; }
#result-dialog #rematch::before,#result-dialog #rematch::after {
  content:''; position:absolute; left:0; right:0; height:1px;
  background:linear-gradient(90deg,#c3cec060,#c3cec018 85%,transparent);
  pointer-events:none;
}
#result-dialog #rematch::before { top:0; opacity:.55; }
#result-dialog #rematch::after {
  bottom:0; transform:scaleX(.8); transform-origin:left;
  transition:transform 320ms cubic-bezier(.22,.61,.36,1),opacity 320ms ease;
}
#result-dialog #rematch:is(:hover,:focus-visible)::after { transform:scaleX(1); }
body #dialog-backdrop #result-dialog .secondary-btn { font-size:13px; font-weight:500; }
body #dialog-backdrop #result-dialog .text-btn { color:#afbfaf; font-size:13px; }
#result-dialog .result-record { margin:10px 0 0; text-align:left; font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
@media (orientation:landscape) and (max-height:500px) {
  body #dialog-backdrop #result-dialog { padding:20px 24px; gap:24px; }
  body #dialog-backdrop #result-dialog h2 { margin:4px 0 12px; font-size:26px; }
  #result-dialog .result-scoreboard { padding:10px 0 8px; }
  body #dialog-backdrop #result-dialog .result-score { font-size:54px; }
  #result-dialog .result-actions { padding-left:24px; }
}
@media (max-width:540px) and (orientation:portrait) {
  body #dialog-backdrop #result-dialog { grid-template-columns:minmax(0,1fr); gap:20px; padding:24px; }
  #result-dialog .result-actions { padding:0; border:0; }
  #result-dialog .result-actions-label { display:none; }
}
@media (prefers-reduced-motion:reduce) {
  #result-dialog #rematch::after { transition:none; }
}

/* The shared settings page occupies the viewport and scrolls independently. */
.match-settings-panel {
  position:fixed; inset:0; width:100%; height:100%; max-width:none; max-height:none;
  margin:0; padding:0; border:0; overflow:hidden; background:#101b18; color:#eef3e7;
}
.match-settings-panel[open] { display:flex; flex-direction:column; }
.settings-header {
  display:flex; flex:none; justify-content:space-between; align-items:center; gap:12px;
  padding:calc(max(8px,var(--safe-top)) + 4px) max(16px,var(--safe-right)) 10px max(16px,var(--safe-left));
  border-bottom:1px solid #40544a; background:#14221e;
}
.settings-heading { display:flex; align-items:center; gap:14px; }
.settings-header h2 { margin:0; color:#f2f6ea; font-size:clamp(17px,4vw,22px); }
.settings-header button,.settings-card button { min-height:44px; }
.settings-header button { padding:5px 9px; font-size:12px; }
.settings-scroll {
  flex:1; min-height:0; overflow:auto; touch-action:pan-y; overscroll-behavior:contain;
  padding:14px max(16px,var(--safe-right)) max(20px,var(--safe-bottom)) max(16px,var(--safe-left));
}
.settings-grid { display:grid; grid-template-columns:minmax(0,1fr); align-items:start; gap:24px; max-width:640px; margin:auto; }
.settings-card { min-width:0; padding:0; border:0; background:transparent; }
.settings-card h3 { scroll-margin-top:12px; padding:0 0 8px; border-bottom:1px solid var(--line); margin:0 0 8px; color:#d6efac; font-size:15px; }
.settings-card h4 { margin:12px 0 6px; font-size:13px; }
.settings-card label,.settings-card summary { font-size:13px; }
.settings-card small { display:block; margin:4px 0 8px; color:#b9cbbd; font-size:11px; line-height:1.5; }
.settings-card summary { cursor:pointer; }
.settings-card select {
  width:100%; padding:6px; margin:4px 0 8px; color:inherit; background:#101b18; border:1px solid #61745b;
}
.settings-card .shot-layout-settings { flex-direction:row; justify-content:space-between; margin:0 0 10px; }
.settings-card input[type=range] { min-width:0; width:100%; height:28px; margin:0; padding:0; accent-color:#b9e784; }
.settings-card output { font-variant-numeric:tabular-nums; }
.settings-card .camera-panel-heading,.settings-card label[for^=camera-] { display:flex; justify-content:space-between; align-items:center; gap:6px; }
.settings-card .camera-panel-heading { margin-top:12px; }
.settings-card .camera-panel-heading button { font-size:11px; }
#settings-match-rules { margin-top:12px; }
@media (max-width:530px) {
  .settings-grid { grid-template-columns:minmax(0,1fr); }
}

/* Shared chrome rails: header, navigation and footer use the same safe gutters. */
body[data-screen=menu] {
  --chrome-left:max(24px,var(--safe-left));
  --chrome-right:max(24px,var(--safe-right));
  --chrome-top:max(12px,var(--safe-top));
  --chrome-bottom:max(12px,var(--safe-bottom));
  --entry-nav-top:var(--chrome-top);
}
body[data-screen=menu] .topbar {
  top:var(--chrome-top); right:var(--chrome-right);
  height:44px; padding:0;
}
body[data-screen=menu] .topbar .top-actions { align-items:center; gap:8px; }
body[data-screen=menu] .topbar button {
  flex:none; width:44px; min-width:44px; height:44px; min-height:44px;
  padding:0; line-height:16px; font-size:12px;
}
body[data-screen=menu] .entry-navigation {
  top:var(--chrome-top); left:var(--chrome-left); height:44px;
}
body[data-screen=menu] #menu[data-entry=home] {
  height:calc(var(--page-height) - var(--chrome-bottom) - 64px);
  padding-left:var(--chrome-left); padding-bottom:0;
}
body[data-screen=menu] #menu[data-entry=home] .menu-foot {
  position:fixed; left:var(--chrome-left); right:calc(var(--chrome-right) + 116px);
  bottom:var(--chrome-bottom); width:auto; height:44px; padding:0; margin:0;
  justify-content:center;
}
body[data-screen=menu] #menu .menu-foot-actions { height:44px; }
body[data-screen=menu] #menu .menu-foot-actions > button {
  height:44px; min-height:44px; margin:0; font-size:12px; line-height:16px;
}
.lobby-update { display:none; }
body[data-screen=menu]:has(#menu[data-entry=home]) .lobby-update {
  position:fixed; right:var(--chrome-right); bottom:var(--chrome-bottom);
  z-index:4; display:flex; align-items:center; justify-content:flex-end;
  height:44px; width:max-content; gap:12px; padding:0; border:0; background:none; color:#b9c8bd;
}
.lobby-update .lobby-version {
  position:absolute; right:0; bottom:44px; padding:0;
  font-size:10px; line-height:20px; white-space:nowrap; color:inherit;
  font-variant-numeric:tabular-nums;
}
.lobby-update button {
  display:inline-flex; align-items:center; justify-content:flex-end;
  height:44px; min-height:44px; width:auto; padding:0; border:0;
  background:none; color:#d6efac; font-size:12px; line-height:16px; white-space:nowrap;
}
.lobby-update button[data-preparing] {
  background:linear-gradient(to right,#b6df76 var(--prepared,0%),#495642 0) bottom 8px left / 100% 2px no-repeat;
}
.lobby-update button:hover { color:#f1ffdc; }
.lobby-update button:disabled { opacity:.6; cursor:wait; }
@media (orientation:portrait) {
  body[data-screen=menu] #menu[data-entry=home] {
    width:100%; padding-right:var(--chrome-right);
    padding-top:calc(var(--chrome-top) + 64px);
  }
}
@media (max-width:380px) {
  body[data-screen=menu] { --chrome-left:max(16px,var(--safe-left)); --chrome-right:max(16px,var(--safe-right)); }
  body[data-screen=menu] .topbar .top-actions { gap:4px; }
  body[data-screen=menu] #menu .menu-foot-actions > button { font-size:11px; }
}
/* Match toolbar keeps existing widths while giving every control one baseline. */
body[data-screen=match] .topbar .top-actions { align-items:center; }
body[data-screen=match] .topbar button { height:36px; min-height:36px; line-height:16px; }
body[data-screen=menu] #menu #open-playtest-notice {
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  margin-top:6px;
  padding:6px 12px;
  border:1px solid #759858;
  border-radius:4px;
  background:#22362b;
  color:#e2f0ca;
  font:inherit;
  font-size:12px;
  white-space:nowrap;
}
#open-playtest-notice span:first-child { color:#c2dc9b; }
body[data-screen=menu] #menu #open-playtest-notice:is(:hover,:focus-visible) { background:#354e38; }

#playtest-notice[open] {
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:10px;
  padding:16px 20px;
  overflow:hidden;
}
#playtest-notice h2 {
  margin:0;
  padding-right:40px;
  font-size:clamp(18px,4vw,24px);
}
#playtest-notice .playtest-notice-body {
  overflow:auto;
  overscroll-behavior:contain;
  touch-action:pan-y;
}
#playtest-notice p { margin:0 0 8px; }
#playtest-notice p:last-child { margin-bottom:0; }
#playtest-notice .playtest-notice-actions { display:flex; flex-wrap:wrap; gap:8px; }
#dismiss-playtest-notice {
  min-height:44px;
  padding:8px 14px;
  border:1px solid #b8c8bc;
  border-radius:4px;
  background:transparent;
  color:inherit;
  font:inherit;
  font-size:13px;
}
@media (orientation:landscape) {
  body[data-screen=menu] #menu #open-playtest-notice {
    position:fixed;
    left:50%;
    top:max(calc(var(--chrome-top) + 48px), 18dvh);
    translate:-50% 0;
    font-size:14px;
    min-height:48px;
    padding-inline:14px;
    margin:0;
  }
}
@media (max-height:360px) and (orientation:landscape) {
  body[data-screen=menu] #menu[data-entry=home] #mode-setup { padding-block:6px; }
}
@media (max-height:300px) and (orientation:landscape) {
  body[data-screen=menu] #menu #open-playtest-notice {
    gap:4px;
    padding-inline:8px;
  }
  body[data-screen=menu] #menu[data-entry=home] {
    padding-top:max(10px,var(--safe-top));
    height:calc(var(--page-height) - var(--chrome-bottom) - 48px);
  }
  body[data-screen=menu] #menu[data-entry=home] h1 {
    display:flex;
    align-items:baseline;
    gap:6px;
    font-size:40px;
  }
}

#settings-court { width:100%; height:28dvh; flex:none; object-fit:contain; background:#09120f; }
#layout-court { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
@media (orientation:landscape) {
  #match-settings-panel[open] { display:grid; grid-template: auto minmax(0,1fr) / minmax(0,1fr) minmax(280px,44%); }
  #match-settings-panel .settings-header { grid-column:1/-1; }
  #settings-court { height:100%; }
  #match-settings-panel .settings-grid { grid-template-columns:minmax(0,1fr); }
}

#camera-mode { width:auto; margin:0; }
.settings-card label[for=follow-distance] { display:flex; justify-content:space-between; }
#fatigue-edge { position:fixed; inset:0; pointer-events:none;
  background:radial-gradient(ellipse 73% 72% at 50% 53%, transparent 76%, rgb(215 66 54 / .16) 100%);
  transition:opacity .25s ease; }
#help-dialog .help-item p { grid-column:1 / -1; }

.settings-index { display:flex; align-items:center; gap:4px; }
.settings-index button { min-width:44px; color:var(--muted); }
.settings-index button[aria-selected=true] { color:var(--ink); box-shadow:inset 0 -2px var(--button-face) !important; }
.settings-slider { display:grid; grid-template-columns:5em minmax(0,1fr); gap:8px; align-items:center; min-height:42px; }
.settings-slider output { color:var(--ink); font-size:12px; }
.settings-card .segments button[aria-pressed=true],.settings-card .palette-options button[aria-pressed=true] {
  background:var(--soft) !important; box-shadow:inset 0 -2px var(--button-face) !important; text-decoration:none;
}
#arena-reset { margin-top:12px; padding:0; font:inherit; font-size:12px; color:var(--muted); }
.settings-card .arena-haptics { min-height:44px; }
.settings-card select { min-height:40px; }
body #match-settings-panel .palette-options button { border-radius:3px; }
.settings-card .setup-row { border:0; }
.settings-card .shot-layout-settings { min-height:44px; }
@media (orientation:landscape) {
  .settings-header { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,44%); gap:0; padding-inline:0; }
  .settings-heading { padding-left:max(16px,var(--safe-left)); }
  .settings-index { padding-inline:16px max(16px,var(--safe-right)); }
  .settings-index button { flex:1; }
}
body button:disabled { cursor:default; }
/* Keep the editor in the left panel so the tournament fitting camera stays visible. */
#friend-form[data-pane]:not([data-pane=room]) > :not(#live-player) {display:none!important}
#menu #friend-form #live-player {margin:0 0 12px}
.live-nav {display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid #53655a;margin:0 0 12px}
#menu .live-nav button {height:36px;background:none;color:#c1cec4;border:0;border-bottom:3px solid transparent;border-radius:0}
#menu .live-nav button[aria-pressed=true] {color:#e7f5cf;border-color:#c2dc9b;font-weight:700}
#live-kit,#live-abilities {padding:12px;background:#13251ff2;border:1px solid #466051;border-radius:5px;text-shadow:none}
#live-kit label,#live-host label,#live-guest-lock,#live-budget,#live-abilities small {font-size:13px}
.live-identity,.live-pair {display:grid;grid-template-columns:minmax(0,1fr) minmax(72px,.55fr);gap:10px;margin-top:8px}
#live-player input,#live-host input,#live-guest-lock input,#live-host select {display:block;width:100%;min-width:0;min-height:32px;box-sizing:border-box}
.live-colors {border:0;padding:0;margin:12px 0 0}
.live-colors legend {font-size:13px;margin-bottom:4px}
#live-colors {display:flex;gap:4px;flex-wrap:wrap}
#menu .kit-swatch {width:32px;height:32px;min-width:0;border:2px solid transparent;border-radius:50%;background:var(--swatch);background-clip:content-box;padding:3px}
#menu .kit-swatch::before {content:"";display:block;width:100%;height:100%;border-radius:50%;background:var(--swatch);box-shadow:inset 0 0 0 1px #ffffff45}
#menu .kit-swatch[aria-pressed=true]::before {outline:2px solid #fff;outline-offset:2px}
#menu #live-player #live-next {background:#c2dc9b!important;color:#152218!important;border:0;border-radius:4px;min-height:36px}
#menu #live-stats button {background:#304b3c!important}
@media (orientation:landscape) and (max-height:480px){
 body[data-screen=menu] #menu.menu-panel:has(#friend-form[data-pane]) {top:max(44px,var(--safe-top));padding-top:0}
 body[data-screen=menu] #menu:has(#friend-form[data-pane]) .entry-heading {min-height:32px}
 #live-kit,#live-abilities {padding:8px 10px}
 #menu #live-kit {display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) 58px;gap:2px 8px;align-items:end}
 #menu #live-kit[hidden]{display:none}
 #live-kit>.input-label {grid-column:1;grid-row:1}
 #menu #live-kit>#player-name {grid-column:1;grid-row:2;margin:0}
 #live-kit .live-identity {display:contents}
 #live-kit .live-identity label {grid-row:1 / 3}
 #live-kit .live-colors {grid-column:1/-1;margin:6px 0 0}
 #live-player .live-nav {margin:0 0 6px}
 #menu #live-stats>div {padding:2px 0}
}
#menu #live-next {display:block;width:100%;margin-top:10px}
#menu #live-next[hidden] {display:none}
#live-abilities .live-bank,.live-list-head {display:flex;align-items:center;justify-content:space-between}
.live-bank output {color:#d5edac;font-weight:700;font-variant-numeric:tabular-nums}
#live-stats {margin:8px 0}
#live-stats>div {display:grid;grid-template-columns:auto 1fr 32px 26px 32px;align-items:center;gap:6px;border-top:1px solid #354c40;padding:4px 0}
#live-stats output {text-align:center;font-variant-numeric:tabular-nums}
#live-stats meter {width:100%;accent-color:#badf94}
#menu #live-stats button,#menu #live-refresh {background:#2b4336;color:#eff8e9;border:1px solid #506d59;border-radius:4px;min-height:32px}
#menu #live-stats button:disabled,#menu #live-next:disabled {opacity:.38}
#live-browser {margin:12px 0;text-align:left;border-top:1px solid #53655a;padding-top:10px}
#live-list {display:grid;gap:4px}
#menu #live-list .live-row {display:flex;width:100%;height:auto;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px}
#live-list small,#live-status,#live-abilities small {font-size:12px;color:#cedace}
@media (orientation:portrait) {
 body[data-screen=menu]:has(#friend-form[data-pane]) #menu.menu-panel {top:50%;width:calc(100% - 32px);left:16px;background:#11221df5;padding:8px 12px;border-radius:6px}
}

#friend-network-guide {margin:4px 0 8px;padding:7px 10px;border-left:3px solid #bad792;background:#14271fe8;color:#e8f1e4;text-align:left}
#friend-network-guide strong,#friend-network-guide span {display:block}
#friend-network-guide strong {font-size:14px;color:#d8edb7}
#friend-network-guide span {margin-top:3px;font-size:13px;line-height:1.45}
/* Sheet chrome stays in place while instructions and history scroll. */
body :is(#pwa-dialog,#playtest-notice,#release-notice-dialog,#onboarding-dialog) {
  --sheet-inset:clamp(16px,3vw,24px);
  padding:0; gap:0; overflow:hidden;
  border:1px solid var(--line); border-radius:4px;
  background:var(--paper); color:var(--ink);
}
body #pwa-dialog[open] { display:flex; flex-direction:column; }
body .sheet-header {
  flex:none; display:flex; gap:12px; align-items:center; justify-content:space-between;
  padding:3px 8px 3px var(--sheet-inset); min-height:48px;
  border-bottom:1px solid var(--line); background:var(--paper);
}
body :is(#pwa-dialog,#playtest-notice,#release-notice-dialog) .sheet-header h2 {
  margin:0; padding:0; color:var(--ink); font-size:19px; line-height:1.25; font-weight:550;
}
body .sheet-header :is(.pwa-close,.release-close,.sheet-close),
body #dialog-backdrop .dialog .close-dialog {
  display:grid; place-items:center; flex:none; width:44px; height:44px;
  margin:0; padding:0; color:var(--muted); font:400 24px/1 system-ui,sans-serif;
}
body :is(#pwa-dialog,#playtest-notice,#release-notice-dialog,#onboarding-dialog) .sheet-header button { position:static; }
body .sheet-scroll,body #playtest-notice .playtest-notice-body,body #onboarding-dialog .onboarding-content {
  min-height:0; overflow:auto; padding:14px var(--sheet-inset);
  overscroll-behavior:contain; touch-action:pan-y; scrollbar-width:thin;
}
body #pwa-dialog .pwa-resource {
  padding:12px 0 0; border:0; border-top:1px solid var(--line); background:none; border-radius:0;
}
body #playtest-notice .playtest-notice-actions,body .onboarding-actions {
  gap:8px; padding:0 var(--sheet-inset); border-top:1px solid var(--line); justify-content:flex-end;
}
body .onboarding-actions button { flex:0 1 auto; padding-inline:6px; min-height:44px; }
body #playtest-notice #dismiss-playtest-notice,body #onboarding-dialog #onboarding-next { color:var(--button-face) !important; font-weight:600; }
body .onboarding-header .onboarding-progress { font-size:14px; color:var(--ink); letter-spacing:0; }
body .onboarding-content .onboarding-visual {
  justify-content:flex-start; gap:0; padding:8px 0; margin:8px 0; border:0; background:none;
}
body .onboarding-content .onboarding-visual span { flex:none; background:none; border:0; padding:0; font-size:13px; }
body .onboarding-content .onboarding-visual span+span::before { position:static; display:inline; transform:none; margin:0 10px; }
body .onboarding-visual[data-page="0"] { display:none; }
body .onboarding-content .onboarding-keyboard { color:var(--muted); border-top-color:var(--line); }
body #release-notice-dialog .release-history { padding-inline:var(--sheet-inset); }
body .settings-index button { font-size:14px; text-decoration:none; }
body .settings-scroll { padding-block-start:16px; }
body .settings-card[hidden] { display:none; }
.settings-card h3 { color:var(--ink); font-size:18px; }
.settings-card .camera-panel-heading { margin:0 0 8px; border-bottom:1px solid var(--line); }
.settings-card .camera-panel-heading h3 { border:0; margin:0; padding:0; }
.settings-card :is(.setup-row,label[for=graphics-quality],label[for=camera-mode]) {
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  margin:0; padding:4px 0; min-height:44px;
}
.settings-card label[for=graphics-quality] select { width:auto; max-width:72%; margin:0; }
.settings-card #graphics-fps { color:var(--button-face); }
.settings-card #stick-layout-options { margin-left:8px; padding-left:12px; border-left:1px solid var(--line); }
.settings-restore { max-width:640px; margin:16px auto 0; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.settings-restore summary { cursor:pointer; line-height:44px; }
.settings-restore #arena-reset { margin:0; min-height:44px; }
body .settings-card .segments button[aria-pressed=true],body .settings-card .palette-options button[aria-pressed=true] {
  background:transparent !important; border-radius:0;
}
body[data-screen=menu] #menu #live-kit,body[data-screen=menu] #menu #live-abilities {
  border:0; border-radius:0; background:linear-gradient(90deg,#101e19e6,#101e19a3); padding-inline:8px;
}
#menu .live-nav button[aria-pressed=true] { box-shadow:inset 0 -2px var(--button-face) !important; text-decoration:none; }
#menu #live-player #live-next,body #menu .entry-submit .primary-btn,
body #dialog-backdrop #ready-room,body #training-ui #training-start,body #cup-dialog .cup-actions .cup-primary {
  width:auto; min-height:44px; padding:6px 12px; color:#e2efca !important;
  background:transparent !important; border:0 !important; border-left:2px solid var(--button-face) !important;
  border-radius:0; text-shadow:none; text-align:left;
}
#menu #live-player #live-next:disabled { opacity:.5; }
@media (orientation:portrait) and (max-width:400px) {
  .settings-header { gap:6px; padding-inline:max(8px,var(--safe-left)) max(8px,var(--safe-right)); }
  .settings-heading { gap:4px; }
  .settings-index { gap:0; }
}
body #match-settings-panel .segments { display:flex; gap:4px; }
body #match-settings-panel .segments button { min-width:52px; min-height:44px; padding-inline:8px; }
body .onboarding-content .onboarding-visual span { box-shadow:none; border-radius:0; }
body[data-screen=menu]:has(#friend-form[data-pane]) .top-actions {
  background:#102019df; padding-inline:4px; border-radius:3px;
}
@media (orientation:landscape) and (max-height:480px) {
  body #menu #live-kit .live-identity input { height:44px; margin:0; }
  body #menu #live-kit > .input-label { margin-bottom:0; }
}
#settings-match-rules { max-width:640px; margin-inline:auto; color:var(--muted); font-size:13px; }
#settings-match-rules summary { min-height:44px; line-height:44px; cursor:pointer; }
