/* ==========================================================================
   Vynor — stylesheet
   Dark, glassy, gamer-friendly. No external fonts or images (nothing to break).
   ========================================================================== */

:root {
  --bg: #0b0d1c;
  --bg-2: #12152b;
  --panel: rgba(24, 28, 56, 0.62);
  --panel-solid: #181c38;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #eef0ff;
  --muted: #9aa0c8;
  --accent: #7c6cff;
  --accent-2: #2de2c8;
  --good: #3ddc84;
  --warn: #ffc857;
  --bad: #ff5d73;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
code { background: rgba(255, 255, 255, 0.08); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }
h1, h2, h3, p { margin: 0; }
.hidden { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }

.ico {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -4px;
}

kbd {
  display: inline-block; min-width: 24px; padding: 1px 7px; margin-right: 3px;
  text-align: center; font: 600 0.75rem/1.6 var(--font);
  background: rgba(255, 255, 255, 0.1); border: 1px solid var(--border-strong);
  border-bottom-width: 2px; border-radius: 6px; color: #fff;
}

::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }

/* ----------------------------- layout ----------------------------------- */

#app { position: fixed; inset: 0; }
.screen { position: absolute; inset: 0; }

.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

/* ------------------------------ buttons --------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 10px 18px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border);
  color: var(--text); font-weight: 600; letter-spacing: 0.01em;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}
.btn:hover { background: rgba(255, 255, 255, 0.14); border-color: var(--border-strong); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:focus-visible, .icon-btn:focus-visible, input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #5a8bff 55%, var(--accent-2)); border-color: transparent; color: #08101c; box-shadow: 0 8px 26px rgba(124, 108, 255, 0.4); }
.btn-primary:hover { background: linear-gradient(135deg, #8d7fff, #6c9aff 55%, #4df0d8); box-shadow: 0 10px 32px rgba(124, 108, 255, 0.55); }
.btn-primary .ico { stroke: #08101c; }
.btn-primary .ico use { color: #08101c; }
.btn-danger { background: rgba(255, 93, 115, 0.16); border-color: rgba(255, 93, 115, 0.4); color: #ffb3bd; }
.btn-danger:hover { background: rgba(255, 93, 115, 0.3); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 20px; font-size: 1.02rem; justify-content: flex-start; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; border-radius: 10px; }

.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--border);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.16); }

.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  border-radius: 999px; font-size: 0.82rem; color: var(--muted);
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border);
}
.pill .ico { width: 16px; height: 16px; }

/* ------------------------------- brand ---------------------------------- */

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 44px; height: 44px; filter: drop-shadow(0 6px 14px rgba(124, 108, 255, 0.5)); }
.brand-mark.sm { width: 40px; height: 40px; }
.brand-mark.xl { width: 92px; height: 92px; }
.brand-word { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; }
.brand-word span { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.spin { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }

/* ------------------------------ main menu ------------------------------- */

#screen-menu {
  display: flex; flex-direction: column;
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(124, 108, 255, 0.35), transparent 60%),
    radial-gradient(900px 600px at 100% 10%, rgba(45, 226, 200, 0.2), transparent 60%),
    linear-gradient(180deg, #0d1030, var(--bg));
  overflow-y: auto; overflow-x: hidden;
}

.bg-cubes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bg-cubes span {
  position: absolute; bottom: -80px; width: 34px; height: 34px; border-radius: 6px;
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.35), rgba(45, 226, 200, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: rise linear infinite;
}
.bg-cubes span:nth-child(1) { left: 5%; animation-duration: 24s; animation-delay: -2s; }
.bg-cubes span:nth-child(2) { left: 14%; width: 20px; height: 20px; animation-duration: 18s; animation-delay: -9s; }
.bg-cubes span:nth-child(3) { left: 24%; width: 48px; height: 48px; animation-duration: 30s; animation-delay: -14s; }
.bg-cubes span:nth-child(4) { left: 33%; animation-duration: 22s; animation-delay: -5s; }
.bg-cubes span:nth-child(5) { left: 44%; width: 18px; height: 18px; animation-duration: 16s; animation-delay: -11s; }
.bg-cubes span:nth-child(6) { left: 53%; width: 40px; height: 40px; animation-duration: 28s; animation-delay: -1s; }
.bg-cubes span:nth-child(7) { left: 63%; animation-duration: 20s; animation-delay: -7s; }
.bg-cubes span:nth-child(8) { left: 72%; width: 24px; height: 24px; animation-duration: 17s; animation-delay: -13s; }
.bg-cubes span:nth-child(9) { left: 80%; width: 52px; height: 52px; animation-duration: 32s; animation-delay: -4s; }
.bg-cubes span:nth-child(10) { left: 88%; animation-duration: 23s; animation-delay: -10s; }
.bg-cubes span:nth-child(11) { left: 94%; width: 16px; height: 16px; animation-duration: 15s; animation-delay: -6s; }
.bg-cubes span:nth-child(12) { left: 38%; width: 28px; height: 28px; animation-duration: 26s; animation-delay: -17s; }
@keyframes rise {
  from { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  to { transform: translateY(-110vh) rotate(260deg); opacity: 0; }
}

.topbar {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 48px);
}
.top-actions { display: flex; align-items: center; gap: 10px; }

.menu-main {
  position: relative; z-index: 1; flex: 1;
  display: grid; grid-template-columns: 340px 1fr; gap: 28px;
  padding: 6px clamp(16px, 4vw, 48px) 24px; max-width: 1360px; width: 100%; margin: 0 auto;
}

.profile-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; align-self: start; position: sticky; top: 8px; }
.preview-wrap {
  position: relative; border-radius: 14px; overflow: hidden; height: 330px;
  background: radial-gradient(circle at 50% 30%, rgba(124, 108, 255, 0.4), rgba(12, 14, 34, 0.9) 70%);
  border: 1px solid var(--border);
}
#preview-canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#preview-canvas:active { cursor: grabbing; }
.preview-hint { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 0.75rem; color: var(--muted); pointer-events: none; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.field input {
  padding: 11px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border); color: var(--text); font-size: 1rem; font-weight: 600; text-transform: none; letter-spacing: 0;
}
.field input:focus { border-color: var(--accent); }

.howto { font-size: 0.82rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 12px; }
.howto-title { font-weight: 700; color: var(--text); margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.howto ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

.section-head { margin-bottom: 18px; }
.section-head h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; }
.sub { color: var(--muted); margin-top: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.card {
  position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-5px); border-color: rgba(124, 108, 255, 0.7); box-shadow: 0 22px 50px rgba(124, 108, 255, 0.28); }
.card:active { transform: translateY(-2px) scale(0.99); }
.card-thumb { position: relative; aspect-ratio: 16 / 9; background: #151937; overflow: hidden; }
.card-thumb svg { width: 100%; height: 100%; display: block; transition: transform 0.4s ease; }
.card:hover .card-thumb svg { transform: scale(1.06); }
.card-live {
  position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 0.76rem; font-weight: 700;
  background: rgba(8, 10, 24, 0.72); backdrop-filter: blur(6px); color: #d7dbff;
}
.card-live i { width: 8px; height: 8px; border-radius: 50%; background: #6b7099; }
.card-live.on i { background: var(--good); box-shadow: 0 0 10px var(--good); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
.card-play {
  position: absolute; right: 12px; bottom: 12px; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #08101c;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); transform: scale(0.8); opacity: 0; transition: 0.18s ease;
}
.card:hover .card-play { transform: scale(1); opacity: 1; }
.card-play .ico { width: 22px; height: 22px; fill: #08101c; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.card-title { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; }
.card-desc { color: var(--muted); font-size: 0.9rem; min-height: 2.6em; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tag { padding: 2px 9px; font-size: 0.72rem; font-weight: 700; color: #cfd3ff; background: rgba(124, 108, 255, 0.22); border-radius: 999px; }
.card.broken { opacity: 0.5; pointer-events: none; }

.notice { margin-top: 18px; font-size: 0.85rem; color: var(--warn); }
.foot { position: relative; z-index: 1; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 14px 16px 20px; color: var(--muted); font-size: 0.8rem; }

/* -------------------------------- in game -------------------------------- */

#screen-game { background: #000; }
#game-root { position: absolute; inset: 0; }
#game-canvas { display: block; position: absolute; inset: 0; outline: none; cursor: crosshair; }

#hud { position: absolute; inset: 0; pointer-events: none; user-select: none; font-weight: 600; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55); }
.hud-menu-btn {
  position: absolute; top: 14px; right: 14px; pointer-events: auto; display: inline-flex; gap: 8px; align-items: center;
  padding: 8px 14px; border-radius: 12px; background: rgba(10, 12, 28, 0.55); border: 1px solid var(--border);
  backdrop-filter: blur(10px); color: #fff; text-shadow: none;
}
.hud-menu-btn:hover { background: rgba(10, 12, 28, 0.8); }

.hud-status {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); padding: 5px 14px; border-radius: 999px;
  font-size: 0.82rem; background: rgba(10, 12, 28, 0.55); backdrop-filter: blur(8px); border: 1px solid var(--border); text-shadow: none;
}
.hud-status:empty { display: none; }
.hud-status[data-kind="good"] { color: #8dffbd; }
.hud-status[data-kind="warn"] { color: var(--warn); }
.hud-status[data-kind="bad"] { color: #ff9aa8; }

.hud-objective {
  position: absolute; top: 14px; left: 14px; min-width: 190px; padding: 10px 14px; border-radius: 14px; display: none;
  background: rgba(10, 12, 28, 0.5); backdrop-filter: blur(8px); border: 1px solid var(--border); text-shadow: none;
}
.hud-objective.show { display: block; }
.obj-title { font-weight: 800; font-size: 1.02rem; background: linear-gradient(135deg, #fff, #b9b2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.obj-line { font-size: 0.85rem; color: #d6d9ff; margin-top: 2px; }

.hud-timer {
  position: absolute; top: 56px; left: 50%; transform: translateX(-50%); font-size: 1.7rem; font-weight: 800;
  font-variant-numeric: tabular-nums; display: none; letter-spacing: 0.02em;
}
.hud-timer.show { display: block; }

.hud-board {
  position: absolute; top: 62px; right: 14px; min-width: 210px; padding: 10px 12px; border-radius: 14px; display: none;
  background: rgba(10, 12, 28, 0.5); backdrop-filter: blur(8px); border: 1px solid var(--border); text-shadow: none;
}
.hud-board.show { display: block; }
.board-title { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 6px; }
.board-row { display: flex; justify-content: space-between; gap: 14px; font-size: 0.86rem; padding: 2px 0; }
.board-row.me { color: var(--accent-2); font-weight: 800; }
.board-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.board-val { color: #c9ccff; font-variant-numeric: tabular-nums; }

.hud-toasts { position: absolute; left: 14px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.toast {
  padding: 8px 14px; border-radius: 12px; font-size: 0.9rem; background: rgba(10, 12, 28, 0.7); backdrop-filter: blur(8px);
  border: 1px solid var(--border); text-shadow: none; animation: toastIn 0.25s ease; transition: opacity 0.35s, transform 0.35s;
}
.toast.good { border-color: rgba(61, 220, 132, 0.5); }
.toast.bad { border-color: rgba(255, 93, 115, 0.55); }
.toast.out { opacity: 0; transform: translateX(-12px); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-16px); } }

.hud-banner { position: absolute; top: 22%; left: 0; right: 0; text-align: center; opacity: 0; transform: scale(0.9); pointer-events: none; }
.hud-banner.show { animation: bannerIn 0.4s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.hud-banner-main { font-size: clamp(2.2rem, 6vw, 4.6rem); font-weight: 900; letter-spacing: -0.02em; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.5); -webkit-text-stroke: 1px rgba(0, 0, 0, 0.25); }
.hud-banner-sub { margin-top: 6px; font-size: clamp(1rem, 2vw, 1.35rem); color: #eef0ff; }
@keyframes bannerIn { to { opacity: 1; transform: scale(1); } }

.hud-countdown {
  position: absolute; top: 38%; left: 0; right: 0; text-align: center; font-size: clamp(5rem, 14vw, 10rem); font-weight: 900;
  opacity: 0; color: #fff; -webkit-text-stroke: 3px rgba(0, 0, 0, 0.25);
}
.hud-countdown.show { animation: countPop 0.7s ease-out forwards; }
@keyframes countPop { 0% { opacity: 0; transform: scale(2.2); } 25% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0.85); } }

.hud-tab {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 280px; padding: 14px 18px; border-radius: 16px; display: none;
  background: rgba(10, 12, 28, 0.78); backdrop-filter: blur(12px); border: 1px solid var(--border-strong); text-shadow: none;
}
.hud-tab.show { display: block; }
.tab-title { font-weight: 800; margin-bottom: 8px; }
.tab-row { display: flex; justify-content: space-between; gap: 20px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.tab-row.me { color: var(--accent-2); }
.tab-score { color: #c9ccff; }

.hud-lockhint {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); padding: 7px 16px; border-radius: 999px; display: none;
  font-size: 0.82rem; background: rgba(10, 12, 28, 0.6); border: 1px solid var(--border); text-shadow: none; white-space: nowrap; max-width: 94vw; overflow: hidden; text-overflow: ellipsis;
}
.hud-lockhint.show { display: block; }
.hud-fps { position: absolute; bottom: 12px; right: 14px; font-size: 0.8rem; color: #b9ffcf; font-variant-numeric: tabular-nums; }
.hud-flash { position: absolute; inset: 0; opacity: 0; }
.hud-flash.go { animation: flash 0.5s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ------------------------------- overlays ------------------------------- */

.overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; z-index: 20; }
.overlay.frost { background: rgba(6, 8, 20, 0.52); backdrop-filter: blur(14px) saturate(130%); -webkit-backdrop-filter: blur(14px) saturate(130%); }
.overlay.solid { background: var(--bg); z-index: 60; }
#modal-skins, #modal-settings { z-index: 40; }
#ready { z-index: 35; }

.pause-card { width: min(440px, 100%); padding: 22px; display: flex; flex-direction: column; gap: 16px; max-height: 94vh; overflow-y: auto; animation: modalIn 0.2s ease; }
.pause-head { display: flex; align-items: center; gap: 14px; }
.pause-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.pause-sub { font-size: 0.85rem; color: var(--muted); }
.pause-buttons { display: grid; gap: 10px; }
.pause-foot { text-align: center; font-size: 0.8rem; color: var(--muted); }

.player-list { display: grid; gap: 6px; max-height: 220px; overflow-y: auto; padding: 6px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); }
.player-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); }
.player-row img { width: 30px; height: 38px; object-fit: contain; image-rendering: pixelated; }
.player-row .pname { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-row .ptag { font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; background: rgba(124, 108, 255, 0.28); }
.player-row.me .pname { color: var(--accent-2); }

.modal { width: min(560px, 100%); max-height: 92vh; display: flex; flex-direction: column; animation: modalIn 0.2s ease; }
.modal-wide { width: min(760px, 100%); padding-bottom: 18px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 8px; }
.modal-head h2 { font-size: 1.35rem; font-weight: 800; }
.modal-foot { display: flex; justify-content: space-between; padding: 14px 22px 18px; border-top: 1px solid var(--border); }
.modal-wide > .muted { padding: 0 22px; margin-top: 8px; }

.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; padding: 12px 22px; overflow-y: auto; }
.skin-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 12px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.05); border: 2px solid transparent; transition: 0.15s ease;
}
.skin-card:hover { background: rgba(255, 255, 255, 0.11); transform: translateY(-3px); }
.skin-card.selected { border-color: var(--accent-2); background: rgba(45, 226, 200, 0.12); box-shadow: 0 0 0 4px rgba(45, 226, 200, 0.12); }
.skin-card img { width: 100%; height: 150px; object-fit: contain; image-rendering: auto; }
.skin-card span { font-weight: 700; font-size: 0.9rem; }
.skin-card small { color: var(--muted); font-size: 0.7rem; }
.skin-tools { display: flex; gap: 10px; padding: 4px 22px 4px; flex-wrap: wrap; }

.settings-body { overflow-y: auto; padding: 4px 22px 8px; display: grid; gap: 8px; }
.set-section { padding: 12px 0; border-bottom: 1px solid var(--border); }
.set-section:last-child { border-bottom: 0; }
.set-section h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-2); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 8px 0; }
.row > label:first-child { font-weight: 600; }
.slider { display: flex; align-items: center; gap: 12px; flex: 0 0 55%; }
.slider output { min-width: 42px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.9rem; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.16); outline-offset: 6px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 2px solid #fff; cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--accent-2); border: 2px solid #fff; cursor: pointer; }

.seg { display: inline-flex; background: rgba(0, 0, 0, 0.3); border-radius: 12px; padding: 3px; border: 1px solid var(--border); }
.seg button { background: transparent; border: 0; padding: 7px 12px; border-radius: 9px; font-weight: 700; font-size: 0.85rem; color: var(--muted); }
.seg button:hover { color: #fff; }
.seg button.on { background: linear-gradient(135deg, var(--accent), #5a8bff); color: #fff; }

.switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: rgba(255, 255, 255, 0.16); border-radius: 999px; transition: 0.18s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: 0.18s; }
.switch input:checked + span { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.switch input:checked + span::before { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.test-sounds { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.ready-card { width: min(460px, 100%); padding: 22px; display: grid; gap: 12px; text-align: center; justify-items: center; animation: modalIn 0.2s ease; }
.ready-card .btn-lg { justify-content: center; width: 100%; }
.ready-thumb { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #151937; }
.ready-thumb svg { width: 100%; height: 100%; display: block; }

.loader { display: grid; gap: 18px; justify-items: center; }
.loader-text { color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }

.ui-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 90;
  padding: 10px 18px; border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  transition: 0.25s ease; max-width: 90vw;
}
.ui-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------- responsive ------------------------------ */

@media (max-width: 900px) {
  .menu-main { grid-template-columns: 1fr; }
  .profile-card { position: static; }
  .preview-wrap { height: 280px; }
  .brand-word { font-size: 1.4rem; }
}
@media (max-width: 560px) {
  .top-actions .pill { display: none; }
  .slider { flex-basis: 50%; }
  .row { flex-wrap: wrap; }
  .hud-board { top: auto; bottom: 18px; right: 10px; min-width: 150px; }
  .hud-objective { min-width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
