/* Ruler of the Galaxy: the menus. The start screen, main menu, contender select, lobby, pause menu, dialogs and
   settings, plus one button style for the whole game. Loaded after ruler.css, so anything here wins. */

:root {
  --gold-hi: #ffd25a;
  --gold-lo: #ff8a00;
  --ink: #04101c;
  --edge: rgba(0, 240, 255, 0.3);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  --z-warp: 40;
  --z-dialog: 30;
  --z-splash: 50;
}

/* ---------- one button style ---------- */
.ico { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; }
.ico svg { width: 100%; height: 100%; }
.btn, button.big, button.small, button.primary, button.gold {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.55em; overflow: hidden;
  min-height: 44px; padding: 11px 20px; border-radius: 7px; border: 1px solid rgba(170, 205, 255, 0.3);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03)), rgba(10, 16, 36, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 3px 0 rgba(0, 0, 0, 0.4), 0 8px 18px -8px rgba(0, 0, 0, 0.7);
  font: 800 13px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); white-space: nowrap;
  transition: transform 0.14s var(--ease), box-shadow 0.18s, border-color 0.18s, background 0.18s, filter 0.18s;
}
.btn::after, button.big::after, button.small::after, button.primary::after, button.gold::after {
  content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  transform: translateX(-130%); transition: transform 0.55s var(--ease); pointer-events: none;
}
.btn:hover:not(:disabled), button.big:hover:not(:disabled), button.small:hover:not(:disabled), button.primary:hover:not(:disabled), button.gold:hover:not(:disabled) {
  border-color: var(--cyan); transform: translateY(-1px); background: linear-gradient(180deg, rgba(0, 240, 255, 0.2), rgba(0, 240, 255, 0.05)), rgba(10, 16, 36, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 3px 0 rgba(0, 0, 0, 0.4), 0 0 24px rgba(0, 240, 255, 0.3);
}
.btn:hover:not(:disabled)::after, button.big:hover:not(:disabled)::after, button.small:hover:not(:disabled)::after, button.primary:hover:not(:disabled)::after, button.gold:hover:not(:disabled)::after { transform: translateX(130%); }
.btn:active:not(:disabled), button.big:active:not(:disabled), button.small:active:not(:disabled), button.primary:active:not(:disabled), button.gold:active:not(:disabled) { transform: translateY(2px) scale(0.985); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(0, 0, 0, 0.4); }
.btn:disabled, button.big:disabled, button.small:disabled, button.primary:disabled, button.gold:disabled { opacity: 0.38; filter: saturate(0.5); cursor: not-allowed; }
.btn:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
button.big { font-size: 15px; min-height: 52px; padding: 14px 28px; }
button.small { font-size: 11.5px; min-height: 36px; padding: 8px 14px; border-radius: 6px; }
.btn.gold, button.gold { color: #1a0f00; border-color: rgba(255, 238, 180, 0.7); background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 3px 0 #9a5200, 0 10px 26px -6px rgba(255, 150, 0, 0.55); }
.btn.gold:hover:not(:disabled), button.gold:hover:not(:disabled) { background: linear-gradient(180deg, #ffe48c, #ff9a1a); border-color: #fff4c8; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 3px 0 #9a5200, 0 0 34px rgba(255, 170, 0, 0.7); }
.btn.primary, button.primary { color: var(--ink); border-color: rgba(190, 250, 255, 0.7); background: linear-gradient(180deg, #7df4ff, #19b6ff); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 3px 0 #0a6e98, 0 10px 26px -6px rgba(0, 200, 255, 0.5); }
.btn.primary:hover:not(:disabled), button.primary:hover:not(:disabled) { background: linear-gradient(180deg, #a4f8ff, #38c4ff); border-color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 3px 0 #0a6e98, 0 0 34px rgba(0, 220, 255, 0.7); }
.btn.danger { color: #ffd9e2; border-color: rgba(255, 120, 150, 0.7); background: linear-gradient(180deg, #ff4a78, #b3123f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 3px 0 #690a25, 0 10px 26px -6px rgba(255, 42, 109, 0.5); }
.btn.danger:hover:not(:disabled) { background: linear-gradient(180deg, #ff6d92, #cc1a4c); border-color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 3px 0 #690a25, 0 0 30px rgba(255, 42, 109, 0.7); }
.btn.ghost { background: transparent; border-color: rgba(170, 205, 255, 0.22); box-shadow: none; color: #cdd6f5; }
.btn.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.07); box-shadow: none; }
.btn.icon-btn, button.icon-btn { min-height: 0; width: 42px; height: 42px; padding: 0; border-radius: 8px; font-size: 18px; letter-spacing: 0; }
button.icon-btn.off { opacity: 0.55; }
button.link { background: none; border: none; box-shadow: none; text-transform: none; letter-spacing: 0; min-height: 0; }

/* every glass panel gets four little corner brackets, like a game HUD */
.panel { background: linear-gradient(180deg, rgba(18, 26, 52, 0.84), rgba(8, 12, 28, 0.86)); border-radius: 14px; }
/* (the bazaar, dice console and chat drawer are placed with position: absolute already; these need the brackets anchored) */
.sel-panel, .squad, .rules-panel, .chat-panel, .pause-panel, .modal, .end { position: relative; }
.panel::before, .panel::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid var(--cyan); opacity: 0.75; pointer-events: none; transition: opacity 0.3s; }
.panel::before { top: 0; left: 0; border-right: none; border-bottom: none; border-top-left-radius: 14px; }
.panel::after { bottom: 0; right: 0; border-left: none; border-top: none; border-bottom-right-radius: 14px; }

/* switches, segmented choices, range sliders, key caps */
.switch { flex: none; position: relative; width: 52px; height: 28px; min-height: 0; padding: 0; border-radius: 99px; border: 1px solid rgba(170, 205, 255, 0.3); background: rgba(0, 0, 0, 0.5); box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5); }
.switch::before { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #9aa6d0; transition: transform 0.22s var(--spring), background 0.2s, box-shadow 0.2s; }
.switch::after { display: none; }
.switch.on { background: rgba(0, 240, 255, 0.28); border-color: var(--cyan); }
.switch.on::before { transform: translateX(24px); background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.switch:disabled { opacity: 0.45; }
.segmented { display: inline-flex; gap: 0; border-radius: 8px; overflow: hidden; border: 1px solid rgba(170, 205, 255, 0.28); background: rgba(0, 0, 0, 0.3); }
.seg { min-height: 38px; padding: 8px 15px; border: none; border-radius: 0; background: transparent; box-shadow: none; font: 800 12px var(--display); letter-spacing: 0.08em; color: var(--muted); }
.seg + .seg { border-left: 1px solid rgba(170, 205, 255, 0.18); }
.seg:hover:not(:disabled) { background: rgba(255, 255, 255, 0.07); color: #fff; border-color: inherit; transform: none; }
.seg.on { color: var(--ink); background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); border-color: transparent; }
.seg:disabled { opacity: 0.45; }
input[type='range'] { -webkit-appearance: none; appearance: none; flex: 1; height: 28px; padding: 0; background: transparent; border: none; --v: 50%; cursor: pointer; }
input[type='range']::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--cyan) var(--v), rgba(255, 255, 255, 0.14) var(--v)); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5); }
input[type='range']::-moz-range-track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); }
input[type='range']::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--cyan); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -7px; border-radius: 50%; background: #fff; border: 3px solid var(--cyan); box-shadow: 0 0 14px rgba(0, 240, 255, 0.7); }
input[type='range']::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--cyan); }
input[type='range']:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 6px; }
kbd { display: inline-block; min-width: 26px; padding: 3px 7px; border-radius: 5px; border: 1px solid rgba(170, 205, 255, 0.45); border-bottom-width: 3px; background: rgba(255, 255, 255, 0.08); font: 700 11px var(--mono); text-align: center; color: #e6ecff; }
.keyhints { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font: 600 12.5px var(--body); }
.kh { display: inline-flex; align-items: center; gap: 5px; }
.kh span { margin-left: 2px; }

/* ---------- the flash of light between screens ---------- */
.warp { position: fixed; inset: 0; z-index: var(--z-warp); pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%, #fff 0, rgba(160, 235, 255, 0.85) 18%, rgba(60, 40, 160, 0.35) 55%, transparent 80%); }
.warp.go { animation: warp 0.9s var(--ease); }
@keyframes warp { 0% { opacity: 0; transform: scale(0.4); } 22% { opacity: 0.95; transform: scale(1.1); } 100% { opacity: 0; transform: scale(2.2); } }

/* ---------- the start screen ---------- */
.splash { position: fixed; inset: 0; z-index: var(--z-splash); display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 46%, rgba(3, 5, 14, 0.2) 0, rgba(3, 5, 14, 0.78) 62%, rgba(3, 5, 14, 0.96) 100%); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.splash.out { opacity: 0; transform: scale(1.12); pointer-events: none; }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; animation: rise 1s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.logo-lockup { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.emblem { width: clamp(96px, 16vw, 150px); height: auto; overflow: visible; filter: drop-shadow(0 0 22px rgba(255, 190, 60, 0.55)) drop-shadow(0 6px 0 rgba(0, 0, 0, 0.4)); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.wordmark { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.wm-1 { font: 900 clamp(54px, 11vw, 112px) / 0.95 var(--display); letter-spacing: 0.06em; padding-left: 0.06em; background: linear-gradient(180deg, #fff 8%, #bff6ff 45%, #2cc8ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 rgba(0, 20, 60, 0.7)) drop-shadow(0 0 26px rgba(0, 200, 255, 0.4)); }
.wm-2 { display: flex; align-items: center; gap: 14px; margin-top: 4px; font: 700 clamp(14px, 2.6vw, 24px) var(--display); letter-spacing: 0.5em; padding-left: 0.5em; text-transform: uppercase; color: var(--gold-hi); text-shadow: 0 0 18px rgba(255, 184, 0, 0.55); }
.wm-2::before, .wm-2::after { content: ''; width: clamp(24px, 6vw, 70px); height: 2px; background: linear-gradient(90deg, transparent, var(--gold-hi)); }
.wm-2::after { transform: scaleX(-1); }
.splash-bar { width: min(420px, 74vw); height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6); margin-top: 18px; transition: opacity 0.4s; }
.splash-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--violet)); box-shadow: 0 0 14px var(--cyan); transition: width 0.45s var(--ease); }
.splash-status { min-height: 18px; font: 600 12px var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.splash.loaded .splash-bar { opacity: 0; }
.splash-press { min-height: 0; padding: 10px 26px; font: 800 17px var(--display); letter-spacing: 0.32em; text-transform: uppercase; color: #fff; background: none; border: none; box-shadow: none; animation: blink 1.6s ease-in-out infinite; text-shadow: 0 0 20px rgba(0, 240, 255, 0.8); cursor: pointer; }
.splash-press::after { display: none; }
.splash-press[hidden] { display: none; }
@keyframes blink { 50% { opacity: 0.28; } }
.splash-tip { position: absolute; left: 0; right: 0; bottom: 56px; text-align: center; padding: 0 24px; font: 500 15px var(--body); color: #b7c1e6; opacity: 0; }
.splash-tip.in { animation: tip 4.5s ease-in-out; }
@keyframes tip { 0% { opacity: 0; transform: translateY(6px); } 12%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.splash-foot { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; font: 600 11px var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: rgba(154, 163, 200, 0.7); }

/* ---------- the main menu ---------- */
.home { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; padding: 0; pointer-events: none; align-items: stretch; }
.home > * { pointer-events: auto; }
.home::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(3, 5, 14, 0.9) 0, rgba(3, 5, 14, 0.72) 30%, rgba(3, 5, 14, 0.2) 56%, transparent 72%), linear-gradient(0deg, rgba(3, 5, 14, 0.7), transparent 22%), linear-gradient(180deg, rgba(3, 5, 14, 0.6), transparent 18%); }
.home > * { position: relative; }
.home-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 28px 0; }
.home-top-right { display: flex; align-items: center; gap: 10px; }
.arcade-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 8px 6px; border-radius: 8px; color: #cfe0ff; text-decoration: none; font: 700 12px var(--display); letter-spacing: 0.14em; text-transform: uppercase; transition: color 0.2s, background 0.2s, transform 0.2s var(--ease); }
.arcade-link:hover { color: #fff; background: rgba(255, 255, 255, 0.08); transform: translateX(-3px); }
.pilot { --c: #8fa3d8; display: inline-flex; align-items: center; gap: 12px; min-height: 0; padding: 7px 14px 7px 8px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 22%, transparent), rgba(8, 12, 28, 0.8)); text-transform: none; letter-spacing: 0; text-align: left; box-shadow: none; }
.pilot::after { display: none; }
.pilot:hover { border-color: var(--c); box-shadow: 0 0 20px color-mix(in srgb, var(--c) 40%, transparent); transform: none; }
.pilot-art { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; font-size: 22px; background: color-mix(in srgb, var(--c) 28%, rgba(0, 0, 0, 0.4)); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); }
.pilot-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pilot-text b { font: 800 14px var(--display); letter-spacing: 0.06em; color: #fff; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pilot-text small { font: 600 12px var(--body); color: var(--c); }
.pilot-edit { width: 1em; height: 1em; color: var(--muted); }
.home-col { display: flex; flex-direction: column; justify-content: center; gap: 22px; width: min(480px, 100%); padding: 0 28px 10px 44px; min-height: 0; }
.home-col .logo-lockup { align-items: flex-start; gap: 6px; }
.home-col .emblem { width: 76px; margin-left: 4px; }
.home-col .wordmark { align-items: flex-start; }
.home-col .wm-1 { font-size: clamp(52px, 7.4vw, 86px); padding-left: 0; }
.home-col .wm-2 { font-size: clamp(12px, 1.5vw, 17px); letter-spacing: 0.42em; padding-left: 0.1em; }
.home-col .wm-2::before { display: none; }
.home-col .wm-2::after { width: 56px; transform: none; background: linear-gradient(90deg, var(--gold-hi), transparent); }
.home-view { min-height: 0; }
.home-view.in > * { animation: slide-in 0.5s var(--ease) both; }
@keyframes slide-in { from { opacity: 0; transform: translateX(-26px); } }
.home.enter .home-top, .home.enter .home-col .logo-lockup, .home.enter .home-foot { animation: rise 0.9s var(--ease) both; }
.home-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 24px; padding: 0 28px 18px 44px; }
.foot-right { display: flex; align-items: center; gap: 18px; font: 600 12px var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.online { display: inline-flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 10px var(--emerald); animation: blink 2.4s ease-in-out infinite; }
.version { opacity: 0.6; }

/* the menu: big items, a bar slides in under the one you are on */
.menu { display: flex; flex-direction: column; gap: 6px; }
.menu-item { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; min-height: 0; padding: 14px 54px 14px 22px; border-radius: 10px; border: 1px solid transparent; background: transparent; box-shadow: none; text-align: left; text-transform: none; letter-spacing: 0; overflow: hidden; animation: slide-in 0.55s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms + 120ms); transition: transform 0.22s var(--ease), background 0.22s, border-color 0.22s; }
.menu-item::before { content: ''; position: absolute; left: 0; top: 12%; bottom: 12%; width: 4px; border-radius: 4px; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); transform: scaleY(0); transition: transform 0.25s var(--ease); }
.menu-item::after { content: '›'; position: absolute; right: 22px; top: 50%; transform: translate(-10px, -52%); font: 400 34px/1 var(--display); color: var(--cyan); opacity: 0; transition: transform 0.25s var(--ease), opacity 0.25s; background: none; inset: auto 22px auto auto; width: auto; }
.menu-item .mi-label { font: 800 clamp(19px, 2.2vw, 24px) / 1.1 var(--display); letter-spacing: 0.09em; text-transform: uppercase; color: #e6ecff; transition: color 0.2s, text-shadow 0.2s; }
.menu-item .mi-sub { font: 500 14px var(--body); color: var(--muted); transition: color 0.2s; }
.menu-item.sel, .menu-item:hover { transform: translateX(10px); background: linear-gradient(90deg, rgba(0, 240, 255, 0.2), rgba(0, 240, 255, 0.04) 70%, transparent); border-color: rgba(0, 240, 255, 0.22); border-right-color: transparent; }
.menu-item.sel::before, .menu-item:hover::before { transform: scaleY(1); }
.menu-item.sel::after, .menu-item:hover::after { transform: translate(0, -52%); opacity: 1; }
.menu-item.sel .mi-label, .menu-item:hover .mi-label { color: #fff; text-shadow: 0 0 18px rgba(0, 240, 255, 0.6); }
.menu-item.sel .mi-sub, .menu-item:hover .mi-sub { color: #cdd8ff; }
.menu-item:first-child .mi-label { color: var(--gold-hi); }
.menu-item.danger .mi-label { color: #ff9ab5; }
.menu-item.danger.sel, .menu-item.danger:hover { background: linear-gradient(90deg, rgba(255, 42, 109, 0.25), rgba(255, 42, 109, 0.05) 70%, transparent); border-color: rgba(255, 42, 109, 0.3); }
.menu-item.danger::before { background: var(--crimson); box-shadow: 0 0 14px var(--crimson); }
.menu-item:focus-visible { outline: none; }

/* join, practice: a panel that takes the menu's place */
.sub-panel { display: flex; flex-direction: column; gap: 14px; padding: 24px 26px 22px; border-radius: 14px; border: 1px solid var(--edge); background: linear-gradient(180deg, rgba(18, 26, 52, 0.86), rgba(8, 12, 28, 0.9)); box-shadow: 0 24px 50px -16px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.07); backdrop-filter: blur(12px); }
.sub-panel h2 { margin: 0; font: 900 clamp(24px, 3vw, 32px) var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.sub-panel .muted { margin: -6px 0 0; font-size: 15px; }
.sub-label { margin-top: 4px; font: 800 11.5px var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.sub-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 8px; }
.sub-actions .big { flex: 1; min-width: 160px; }
.code-boxes { display: flex; gap: 10px; margin: 6px 0; }
.code-box { width: 68px; height: 84px; padding: 0; text-align: center; font: 900 42px var(--mono); text-transform: uppercase; caret-color: var(--cyan); color: var(--gold-hi); border-radius: 10px; border: 2px solid rgba(170, 205, 255, 0.28); background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.5); transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--spring); }
.code-box:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.18), inset 0 3px 8px rgba(0, 0, 0, 0.5); transform: translateY(-3px); }
.opp-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.opp { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 0; padding: 12px 4px 10px; border-radius: 10px; border: 2px solid rgba(170, 205, 255, 0.2); background: rgba(0, 0, 0, 0.3); box-shadow: none; text-transform: none; letter-spacing: 0; transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s; }
.opp::after { display: none; }
.opp-bots { font-size: 15px; line-height: 1; min-height: 16px; }
.opp b { font: 900 26px var(--display); color: #fff; }
.opp small { font: 600 11px var(--body); color: var(--muted); }
.opp:hover { border-color: var(--cyan); transform: translateY(-2px); background: rgba(0, 240, 255, 0.08); }
.opp.on { border-color: var(--gold-hi); background: rgba(255, 184, 0, 0.14); box-shadow: 0 0 22px rgba(255, 184, 0, 0.25); }
.opp.on b { color: var(--gold-hi); }
.sub-panel .segmented { align-self: flex-start; }

/* ---------- the contender select ---------- */
.select-screen { --c: #00f0ff; position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); grid-template-rows: auto 1fr auto auto; gap: 14px 24px; padding: 18px 28px 16px; pointer-events: none; animation: fade 0.35s; }
.select-screen > * { pointer-events: auto; }
.select-screen::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(3, 5, 14, 0.92), rgba(3, 5, 14, 0.55) 24%, transparent 46%), linear-gradient(270deg, rgba(3, 5, 14, 0.85), transparent 46%), linear-gradient(180deg, rgba(3, 5, 14, 0.7), transparent 18%); }
.select-screen > * { position: relative; }
.sel-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; }
.sel-head h2 { margin: 2px 0 0; font: 900 clamp(20px, 2.6vw, 30px) var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.back-btn { min-height: 40px; padding: 8px 16px 8px 10px; }
.sel-panel { grid-column: 2; grid-row: 2 / 4; align-self: start; max-height: 100%; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; padding: 22px 22px 20px; border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 24px 50px -16px rgba(0, 0, 0, 0.85), 0 0 40px color-mix(in srgb, var(--c) 22%, transparent); transition: border-color 0.4s, box-shadow 0.4s; }
.sel-panel::before, .sel-panel::after { border-color: var(--c); }
.sel-info.swap > * { animation: slide-in 0.4s var(--ease) both; }
.sel-info.swap > *:nth-child(2) { animation-delay: 40ms; }
.sel-info.swap > *:nth-child(3) { animation-delay: 80ms; }
.sel-info.swap > *:nth-child(4) { animation-delay: 120ms; }
.sel-info.swap > *:nth-child(5) { animation-delay: 160ms; }
.sel-info.swap > *:nth-child(6) { animation-delay: 200ms; }
.sel-info.swap > *:nth-child(7) { animation-delay: 240ms; }
.sel-tags { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.role-tag { padding: 4px 10px; border-radius: 4px; background: color-mix(in srgb, var(--c) 24%, transparent); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); font: 800 11px var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: #fff; }
.diff { display: inline-flex; align-items: center; gap: 7px; font: 700 11px var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.diff-pips { display: inline-flex; gap: 3px; }
.diff-pips i { width: 14px; height: 6px; border-radius: 2px; background: rgba(255, 255, 255, 0.16); }
.diff-pips i.on { background: var(--c); box-shadow: 0 0 8px var(--c); }
.sel-name { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; font: 900 clamp(24px, 2.6vw, 32px) / 1.05 var(--display); letter-spacing: 0.03em; color: #fff; text-shadow: 0 0 24px color-mix(in srgb, var(--c) 60%, transparent); }
.sel-art { font-size: 1.15em; filter: drop-shadow(0 0 12px var(--c)); }
.sel-title { margin-top: 4px; font: 700 14px var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--c); }
.sel-lore { margin: 12px 0 14px; font: 500 15.5px/1.5 var(--body); color: #cdd6f5; }
.sel-stats { display: grid; gap: 8px; margin-bottom: 16px; padding: 14px 14px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.32); border: 1px solid rgba(255, 255, 255, 0.08); }
.stat-row { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 12px; font: 700 12.5px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: #cdd6f5; }
.stat-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.stat-bar i { height: 10px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); transform: skewX(-18deg); }
.stat-bar i.on { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 70%, transparent); }
.sp-kicker { margin: 0 0 6px; font: 800 11px var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.sel-power { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; margin-bottom: 14px; border-radius: 10px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 12%, rgba(0, 0, 0, 0.3)); }
.sel-power b { font: 800 16px var(--display); letter-spacing: 0.04em; color: #fff; }
.sel-power span { font: 500 15px/1.4 var(--body); color: #dbe2fb; }
.sel-evos { display: grid; gap: 7px; margin-bottom: 18px; }
.evo-line { display: flex; flex-direction: column; gap: 1px; padding: 8px 0 8px 12px; border-left: 2px solid rgba(255, 255, 255, 0.14); }
.evo-line b { font: 700 13.5px var(--display); color: #e9fff3; letter-spacing: 0.02em; }
.evo-line span { font: 500 13.5px/1.35 var(--body); color: #aab4d8; }
.confirm-btn, .sel-info > .btn.big { width: 100%; position: sticky; bottom: 0; }
.sel-roster { grid-column: 1; grid-row: 3; align-self: end; display: flex; align-items: center; gap: 10px; }
.sel-tiles { display: flex; gap: 10px; flex: 1; min-width: 0; }
.c-tile { --c: #00f0ff; position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 0; padding: 10px 6px 8px; border-radius: 12px; border: 2px solid color-mix(in srgb, var(--c) 28%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, rgba(8, 12, 28, 0.85)), rgba(8, 12, 28, 0.9)); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.8); text-transform: none; letter-spacing: 0; animation: rise 0.5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); transition: transform 0.22s var(--spring), border-color 0.2s, box-shadow 0.2s; }
.c-tile::after { display: none; }
.ct-frame { display: grid; place-items: center; width: 100%; aspect-ratio: 1; max-width: 76px; border-radius: 10px; background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--c) 38%, transparent), rgba(0, 0, 0, 0.3) 72%); }
.ct-art { font-size: clamp(26px, 3.4vw, 40px); line-height: 1; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6)); }
.ct-name { font: 800 clamp(9.5px, 1.2vw, 11.5px) var(--display); letter-spacing: 0.04em; text-transform: uppercase; color: #cdd6f5; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-lock { position: absolute; top: 6px; right: 6px; display: none; width: 22px; height: 22px; padding: 3px; border-radius: 6px; background: rgba(0, 0, 0, 0.7); color: #ffb3c4; }
.c-tile:hover { transform: translateY(-4px); border-color: var(--c); }
.c-tile.on { transform: translateY(-10px) scale(1.06); border-color: var(--c); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 65%, transparent), 0 14px 26px -10px rgba(0, 0, 0, 0.9); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 30%, rgba(8, 12, 28, 0.85)), rgba(8, 12, 28, 0.9)); }
.c-tile.on .ct-name { color: #fff; }
.c-tile.taken { opacity: 0.55; filter: saturate(0.4); }
.c-tile.taken .ct-lock { display: block; }
.c-tile.random { --c: #ffcc4d; }
.sel-arrow { flex: none; display: grid; place-items: center; width: 44px; height: 64px; padding: 0; min-height: 0; border-radius: 10px; font-size: 22px; background: rgba(8, 12, 28, 0.8); box-shadow: none; }
.sel-arrow::after { display: none; }
.sel-arrow:hover:not(:disabled) { transform: scale(1.08); }
.select-screen .keyhints { grid-column: 1; grid-row: 4; }
.selecting .select-screen ~ * { display: none; }
.selecting .home { display: none; }

/* ---------- dialogs ---------- */
.layer-dialog { position: fixed; inset: 0; z-index: var(--z-dialog); pointer-events: none; }
.dialog-wrap { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at center, rgba(2, 4, 12, 0.55), rgba(2, 4, 12, 0.85)); backdrop-filter: blur(3px); pointer-events: auto; animation: fade 0.22s; transition: opacity 0.2s; }
.dialog-wrap.closing { opacity: 0; }
.dialog { position: relative; width: min(460px, 100%); padding: 24px 24px 20px; border-radius: 14px; border: 1px solid var(--edge); background: linear-gradient(180deg, rgba(20, 28, 56, 0.96), rgba(8, 12, 28, 0.98)); box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08); animation: pop-in 0.34s var(--spring); }
.dialog::before, .dialog::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid var(--cyan); pointer-events: none; }
.dialog::before { top: -1px; left: -1px; border-right: none; border-bottom: none; border-top-left-radius: 14px; }
.dialog::after { bottom: -1px; right: -1px; border-left: none; border-top: none; border-bottom-right-radius: 14px; }
.dialog.danger { border-color: rgba(255, 42, 109, 0.5); }
.dialog.danger::before, .dialog.danger::after { border-color: var(--crimson); }
@keyframes pop-in { from { opacity: 0; transform: translateY(14px) scale(0.92); } }
.dialog-head h2 { margin: 0 0 10px; font: 900 22px var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.dialog-body p { margin: 0 0 6px; font: 500 16px/1.5 var(--body); color: #cdd6f5; }
.dialog-body .muted { margin-bottom: 14px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.dialog-actions .btn { min-width: 120px; }
.name-form { display: flex; gap: 10px; }
.name-input { flex: 1; min-width: 0; height: 52px; padding: 0 16px; font: 800 20px var(--display); letter-spacing: 0.06em; color: #fff; border-radius: 8px; border: 2px solid rgba(170, 205, 255, 0.3); background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.5); }
.name-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.16), inset 0 3px 8px rgba(0, 0, 0, 0.5); }
.name-form .icon-btn { width: 52px; height: 52px; }

/* ---------- the older pop-up windows (How to play, settings) in the same style ---------- */
.modal-wrap { background: radial-gradient(ellipse at center, rgba(2, 4, 12, 0.6), rgba(2, 4, 12, 0.88)); backdrop-filter: blur(3px); animation: fade 0.22s; }
.modal { animation: pop-in 0.34s var(--spring); }
.modal-head { padding: 16px 20px; background: linear-gradient(180deg, rgba(0, 240, 255, 0.09), transparent); }
.modal-head h2 { font: 900 22px var(--display); letter-spacing: 0.1em; text-transform: uppercase; }
.modal-head .icon-btn { width: 38px; height: 38px; font-size: 16px; }
.settings { display: flex; flex-direction: column; gap: 4px; min-width: min(480px, 76vw); }
.set-head { margin: 14px 0 6px; font: 800 12px var(--display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--cyan); }
.set-head:first-child { margin-top: 0; }
.set-row { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 6px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.07); }
.set-glyph { flex: none; width: 28px; text-align: center; font-size: 20px; }
.set-label { flex: 0 0 150px; display: flex; flex-direction: column; font: 700 14px var(--display); letter-spacing: 0.04em; }
.set-label small { font: 500 12.5px var(--body); color: var(--muted); letter-spacing: 0; }
.set-val { flex: none; min-width: 34px; text-align: right; font: 700 15px var(--mono); color: var(--gold-hi); }
.set-row .segmented { margin-left: auto; }
.set-row .switch { margin-left: auto; }
.set-foot { display: flex; justify-content: flex-end; margin-top: 12px; }

/* ---------- icon buttons (the top bar) share the button look ---------- */
button.icon-btn { display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid rgba(170, 205, 255, 0.28); background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03)), rgba(10, 16, 36, 0.8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 0 rgba(0, 0, 0, 0.4); transition: transform 0.14s var(--ease), border-color 0.18s, box-shadow 0.18s, background 0.18s; color: var(--text); }
button.icon-btn:hover:not(:disabled) { border-color: var(--cyan); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 0 rgba(0, 0, 0, 0.4), 0 0 18px rgba(0, 240, 255, 0.3); }
button.icon-btn:active:not(:disabled) { transform: translateY(2px) scale(0.96); box-shadow: none; }
button.icon-btn.on { border-color: var(--gold-hi); color: var(--gold-hi); }
button.icon-btn .ico { width: 20px; height: 20px; }
button.icon-btn.bazaar-toggle { display: none; }
@media (max-width: 1180px) { button.icon-btn.bazaar-toggle { display: inline-grid; } }
button.icon-btn.small-icon { width: 32px; height: 32px; }
button.icon-btn.small-icon .ico { width: 16px; height: 16px; }
.top-right { align-items: center; }

/* ---------- the lobby ---------- */
.lobby { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(310px, 390px) minmax(0, 1fr) minmax(300px, 360px); grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px 22px; padding: 16px 24px 18px; pointer-events: none; align-content: stretch; }
.lobby > * { pointer-events: auto; }
.lobby::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(3, 5, 14, 0.82), transparent 34%, transparent 66%, rgba(3, 5, 14, 0.82)), linear-gradient(0deg, rgba(3, 5, 14, 0.7), transparent 18%), linear-gradient(180deg, rgba(3, 5, 14, 0.6), transparent 16%); }
.lobby > * { position: relative; }
.lobby-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; }
.lobby-title h2 { margin: 2px 0 0; font: 900 clamp(20px, 2.4vw, 28px) var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.lobby-head-right { margin-left: auto; display: flex; gap: 8px; }
.squad { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; gap: 12px; padding: 16px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; align-self: start; max-height: 100%; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 800 12px var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan); }
.code-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 10px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.lobby-code { margin-top: 2px; font: 900 clamp(34px, 4vw, 48px) / 1 var(--mono); letter-spacing: 0.16em; color: var(--gold-hi); text-shadow: 0 0 26px rgba(255, 184, 0, 0.55), 0 3px 0 rgba(90, 40, 0, 0.6); }
.code-btns { display: flex; gap: 6px; align-items: center; }
.qr-box { display: flex; justify-content: center; padding: 6px 0 2px; }
.qr-box[hidden] { display: none; }
.qr { width: 150px; height: 150px; border-radius: 10px; background: #fff; padding: 7px; }
.seats { display: flex; flex-direction: column; gap: 6px; }
.seat { --c: #5a6496; display: grid; grid-template-columns: 22px 38px 1fr auto auto; align-items: center; gap: 10px; min-height: 56px; padding: 7px 10px 7px 8px; border-radius: 10px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 18%, rgba(8, 12, 28, 0.85)), rgba(8, 12, 28, 0.85)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); border-left: 4px solid var(--c); animation: slide-in 0.45s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.seat.me { border-color: var(--c); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 30%, transparent); }
.seat-no { font: 800 12px var(--mono); color: var(--muted); text-align: center; }
.seat-av { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; font-size: 22px; background: rgba(0, 0, 0, 0.35); }
.seat-who { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.seat-who b { display: flex; align-items: center; gap: 8px; font: 800 15px var(--display); letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-who b .you { font: 700 10px var(--display); letter-spacing: 0.14em; color: var(--ink); background: var(--c); padding: 2px 6px; border-radius: 3px; }
.seat-who > span { font: 600 13px var(--body); color: var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat.empty { grid-template-columns: 22px 1fr auto; border: 1px dashed rgba(170, 205, 255, 0.2); border-left-width: 1px; background: rgba(0, 0, 0, 0.18); }
.seat-wait { font: 600 13.5px var(--body); color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 4px; }
.badge .ico { width: 12px; height: 12px; }
.you-card { padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.you-card > .btn { width: 100%; }
.you-pick { --c: #00f0ff; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 2px solid color-mix(in srgb, var(--c) 60%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 24%, rgba(8, 12, 28, 0.9)), rgba(8, 12, 28, 0.9)); box-shadow: 0 0 24px color-mix(in srgb, var(--c) 28%, transparent); }
.yp-art { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; font-size: 30px; background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--c) 40%, transparent), rgba(0, 0, 0, 0.35)); }
.yp-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.yp-role { font: 800 10.5px var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--c); }
.yp-text b { font: 800 16px var(--display); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yp-text small { font: 600 13px var(--body); color: #aab4d8; }
.pulse { animation: pulse-gold 1.6s ease-in-out infinite; }
@keyframes pulse-gold { 50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 3px 0 #9a5200, 0 0 40px rgba(255, 170, 0, 0.8); } }
.lobby-right { grid-column: 3; grid-row: 2; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; min-height: 0; align-self: stretch; }
.rules-panel { padding: 14px 16px 12px; }
.rules-card { display: flex; flex-direction: column; gap: 6px; }
.lock-note { display: inline-flex; align-items: center; gap: 5px; font: 600 11px var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.lock-note .ico { width: 13px; height: 13px; }
.rule-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.26); border: 1px solid rgba(255, 255, 255, 0.07); }
.rule-row.locked { opacity: 0.85; }
.rr-glyph { text-align: center; font-size: 20px; color: var(--gold-hi); }
.rr-text { display: flex; flex-direction: column; min-width: 0; }
.rr-text b { font: 700 14px var(--display); letter-spacing: 0.03em; }
.rr-text small { font: 500 12.5px var(--body); color: var(--muted); }
.chat-panel { padding: 12px 14px; display: flex; flex-direction: column; min-height: 0; }
.chat-panel .chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.launchbar { grid-column: 1 / -1; grid-row: 3; display: flex; justify-content: center; }
.launch-inner { display: flex; align-items: center; gap: 22px; padding: 10px 12px 10px 24px; border-radius: 14px; border: 1px solid var(--edge); background: rgba(8, 12, 28, 0.88); backdrop-filter: blur(10px); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.85); }
.launch-note { font: 600 15px var(--body); color: #cdd6f5; }
.launch-note.waiting { display: inline-flex; align-items: center; gap: 10px; padding-right: 12px; font: 700 13px var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.launch { min-width: 220px; }
.selecting .lobby { display: none; }

/* ---------- the menu inside a battle ---------- */
.pause { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at center, rgba(2, 4, 12, 0.55), rgba(2, 4, 12, 0.88)); backdrop-filter: blur(4px); animation: fade 0.2s; transition: opacity 0.18s; }
.pause.closing { opacity: 0; }
.pause-panel { width: min(440px, 100%); padding: 24px 22px 18px; animation: pop-in 0.34s var(--spring); }
.pause-panel h2 { margin: 2px 0 14px; font: 900 26px var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.pause-keys { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.pause .menu-item { animation-duration: 0.4s; }

/* ---------- the battle screen: its own buttons, matched to the rest ---------- */
.controls .btn, .controls button.big { min-width: 0; }
.controls .roll-btn { flex: 1; min-width: 200px; }
.round-pill, .goal-pill { border-radius: 8px; background: rgba(8, 12, 28, 0.82); }

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .home::before { background: linear-gradient(0deg, rgba(3, 5, 14, 0.94) 0, rgba(3, 5, 14, 0.8) 55%, rgba(3, 5, 14, 0.15) 80%, transparent), linear-gradient(180deg, rgba(3, 5, 14, 0.6), transparent 16%); }
  .home { grid-template-rows: auto 1fr auto; }
  .home-top { padding: 12px 14px 0; }
  .home-col { width: 100%; justify-content: flex-end; padding: 0 16px 6px; gap: 14px; max-height: 100%; overflow-y: auto; }
  .home-col .emblem { width: 52px; }
  .home-col .wm-1 { font-size: 46px; }
  .home-foot { padding: 0 16px 12px; }
  .menu-item { padding: 11px 44px 11px 16px; }
  .menu-item .mi-label { font-size: 18px; }
  .menu-item .mi-sub { font-size: 13px; }
  .pilot-text small, .pilot-edit { display: none; }
  .pilot-text b { max-width: 110px; }
  .code-box { width: 58px; height: 72px; font-size: 36px; }
  .select-screen { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; padding: 10px 12px 12px; gap: 8px; }
  .select-screen::before { background: linear-gradient(0deg, rgba(3, 5, 14, 0.96) 0, rgba(3, 5, 14, 0.8) 50%, transparent 72%), linear-gradient(180deg, rgba(3, 5, 14, 0.7), transparent 16%); }
  .sel-panel { grid-column: 1; grid-row: 3; align-self: end; max-height: 56vh; padding: 14px 14px 12px; }
  .sel-roster { grid-column: 1; grid-row: 2; }
  .sel-lore { display: none; }
  .select-screen .keyhints { display: none; }
  .sel-arrow { width: 32px; height: 52px; }
  .c-tile { padding: 6px 3px 6px; }
  .ct-name { display: none; }
  .sel-head h2 { font-size: 17px; }
  .sel-head { gap: 12px; }
  .stat-row { grid-template-columns: 88px 1fr; font-size: 11px; }
  .splash-tip { bottom: 62px; }
  .lobby { display: flex; flex-direction: column; padding: 10px 12px 0; gap: 10px; overflow-y: auto; overflow-x: hidden; }
  .lobby::before { position: fixed; background: linear-gradient(0deg, rgba(3, 5, 14, 0.94), rgba(3, 5, 14, 0.78) 60%, rgba(3, 5, 14, 0.5)); }
  .lobby-head { flex: none; gap: 10px; }
  .lobby-head .eyebrow { display: none; }
  .lobby-title h2 { font-size: 16px; }
  .back-btn { padding: 8px 12px 8px 8px; min-height: 40px; }
  .squad, .lobby-right { flex: none; max-height: none; overflow: visible; }
  .lobby-right { display: block; }
  .chat-panel { display: none; }
  .launchbar { flex: none; position: sticky; bottom: 0; margin: auto -12px 0; padding: 14px 12px 12px; background: linear-gradient(0deg, rgba(3, 5, 14, 0.96) 55%, transparent); }
  .launch-inner { width: 100%; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px; }
  .launch-note { font-size: 13px; }
  .launch { min-width: 0; padding: 12px 12px; font-size: 12.5px; letter-spacing: 0.05em; }
  .lobby-code { font-size: 38px; }
  .seat { grid-template-columns: 18px 34px 1fr auto auto; gap: 8px; }
  .pause-panel { padding: 18px 16px 14px; }
}
@media (max-height: 560px) and (min-width: 700px) {
  .home-col { gap: 12px; }
  .home-col .emblem { display: none; }
  .home-col .wm-1 { font-size: 52px; }
  .menu-item { padding: 8px 44px 8px 20px; }
  .menu-item .mi-sub { display: none; }
  .sel-panel { padding: 14px 16px; }
  .sel-lore, .sel-evos { display: none; }
}
@media (hover: none) { .keyhints, .home-hints { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .emblem, .splash-press, .live-dot { animation: none !important; }
  .menu-item, .c-tile { animation: none !important; }
}

/* while the start screen is up, nothing else shows through it */
#app, #labels { transition: opacity 0.8s var(--ease); }
body:has(#splash:not(.out)) #app, body:has(#splash:not(.out)) #labels { opacity: 0; pointer-events: none; }

/* keyboard hints off: the keys still work, the screen stays clean */
.keyhints, .nm-keyhints, .home-hints { display: none !important; }
