:root {
  --bg: #0a0c10;
  --bg-2: #0e1117;
  --panel: #131820;
  --panel-2: #19202b;
  --line: #222a37;
  --line-2: #2c3646;
  --text: #e9edf4;
  --muted: #8a95a8;
  --dim: #5d6779;
  --accent: #ff6b1a;
  --accent-2: #ffae3d;
  --accent-ink: #1a0b02;
  --sound: #ff6b1a;
  --graphic: #3fc6ff;
  --bundle: #b983ff;
  --good: #3ddc97;
  --danger: #ff4d5e;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Rajdhani', 'Inter', system-ui, sans-serif;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 107, 26, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(63, 198, 255, 0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: 0.01em; line-height: 1.1; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.icon { width: 1.1em; height: 1.1em; flex: none; }
.muted { color: var(--muted); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
main.container { flex: 1; padding-bottom: 64px; outline: none; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: var(--accent-ink);
  box-shadow: 0 8px 24px -10px rgba(255, 107, 26, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 30px -8px rgba(255, 107, 26, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn-ghost { background: var(--panel-2); border-color: var(--line-2); }
.btn-ghost:hover { border-color: #3b475b; background: #1e2633; }
.btn-danger { background: rgba(255, 77, 94, 0.1); color: #ff8591; border-color: rgba(255, 77, 94, 0.3); }
.btn-danger:hover { background: rgba(255, 77, 94, 0.18); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--accent-2); font-weight: 600; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 12, 16, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: 0.14em; }
.logo svg { width: 28px; height: 28px; fill: var(--accent); }
.logo-sm { font-size: 16px; }
/* "beta" tucked under the wordmark, same typeface, spread to sit under its full width. */
.logo-text { display: grid; line-height: 0.95; }
.logo-text small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.52em;
  margin-right: -0.52em;
  text-align: center;
  color: var(--accent);
  opacity: 0.85;
}
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 8px; white-space: nowrap; color: var(--muted); font-weight: 500; font-size: 14px; transition: color 0.15s, background 0.15s; }
.nav a:hover { color: var(--text); }
.nav a.is-active { color: var(--text); background: var(--panel-2); }
.nav-user { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.menu { position: relative; }
.menu-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; padding: 6px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: var(--shadow); display: grid; }
.menu-list a, .menu-list button { text-align: left; padding: 8px 10px; border-radius: 6px; background: none; border: 0; font-size: 14px; }
.menu-list a:hover, .menu-list button:hover { background: var(--line); }

/* ---------- hero ---------- */

.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding: 64px 0 40px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 14px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); text-transform: uppercase; }
.hero h1 em { font-style: normal; color: transparent; background: linear-gradient(90deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; }
.hero p { color: var(--muted); font-size: 17px; max-width: 520px; margin: 18px 0 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; margin-top: 34px; flex-wrap: wrap; min-height: 48px; }
.hero-stats div { display: grid; }
.hero-stats b { font-family: var(--display); font-size: 28px; line-height: 1; }
.hero-stats span { color: var(--muted); font-size: 13px; }

.hero-visual { height: 260px; display: flex; align-items: center; justify-content: center; gap: 6px; mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.hero-visual i {
  width: 8px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent) 60%, rgba(255, 107, 26, 0.2));
  height: 30%;
  animation: eq 1.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.13s);
  opacity: calc(0.35 + (var(--i) / 50));
}
@keyframes eq {
  0%, 100% { height: 14%; }
  20% { height: 92%; }
  35% { height: 38%; }
  60% { height: 64%; }
  80% { height: 24%; }
}

.page-head { padding: 48px 0 20px; }
.page-head h1 { font-size: 44px; text-transform: uppercase; }
.page-head p { color: var(--muted); margin: 8px 0 0; max-width: 620px; }
.page-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

/* ---------- toolbar ---------- */

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 12px 0 22px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.tab { padding: 7px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.toolbar-right { display: flex; gap: 10px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); min-width: 260px; }
.search:focus-within { border-color: var(--accent); }
.search input { border: 0; background: none; outline: none; width: 100%; color: var(--text); }
select { height: 40px; padding: 0 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); }

/* ---------- cards ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card {
  --type: var(--sound);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.card.type-graphic { --type: var(--graphic); }
.card.type-bundle { --type: var(--bundle); }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--type) 45%, var(--line)); box-shadow: var(--shadow); }
.card-link { position: absolute; inset: 0; z-index: 1; }
.card-media { position: relative; aspect-ratio: 16 / 9; background: var(--panel-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-art { width: 100%; height: 100%; display: grid; place-items: center; color: var(--type); background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--type) 22%, transparent), transparent 70%); }
.card-art .icon { width: 44px; height: 44px; }
.card-body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.card-title { font-size: 21px; }
.card-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.card-meta b { color: var(--text); font-weight: 600; }
.card-dl { display: inline-flex; align-items: center; gap: 4px; }
.card-facts { display: flex; justify-content: space-between; gap: 8px; color: var(--dim); font-size: 12px; }
.card-delete { position: relative; z-index: 2; margin-top: 6px; justify-self: start; }
.card-skeleton { aspect-ratio: 4 / 3.4; background: linear-gradient(100deg, var(--panel) 30%, var(--panel-2) 50%, var(--panel) 70%) 0 0 / 300% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

.badge {
  --type: var(--sound);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--type);
  background: rgba(10, 12, 16, 0.78);
  border: 1px solid color-mix(in srgb, var(--type) 45%, transparent);
  backdrop-filter: blur(6px);
}
.badge .icon { width: 13px; height: 13px; }
.card-media .badge { position: absolute; left: 10px; top: 10px; }
.badge-graphic { --type: var(--graphic); }
.badge-bundle { --type: var(--bundle); }

.empty { grid-column: 1 / -1; text-align: center; padding: 64px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty-icon { width: 56px; height: 56px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: var(--panel-2); color: var(--accent); }
.empty h3 { font-size: 24px; }
.empty p { color: var(--muted); margin: 6px 0 18px; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }

/* ---------- pack page ---------- */

.back { display: inline-flex; align-items: center; gap: 6px; margin: 28px 0 16px; color: var(--muted); font-size: 14px; }
.back:hover { color: var(--text); }
.pack-hero { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); min-height: 220px; display: flex; align-items: flex-end; }
.pack-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.55; }
.pack-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 12, 16, 0.1), rgba(10, 12, 16, 0.92)); }
.pack-hero-inner { position: relative; z-index: 1; padding: 28px; display: grid; gap: 10px; justify-items: start; }
.pack-hero h1 { font-size: clamp(34px, 5vw, 52px); text-transform: uppercase; }
.pack-hero-meta { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 14px; }
.pack-hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.pack-hero-meta b { color: var(--text); }
.pack-hero-meta a:hover b { color: var(--accent-2); }
.hero-download { display: none; margin-top: 6px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-nosound { --type: #9aa4b5; }
.notice { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; color: #c7cfdb; background: rgba(154, 164, 181, 0.08); border: 1px solid var(--line-2); }
.notice .icon { margin-top: 2px; color: var(--muted); }
.wempty { margin: 2px 8px 6px; font-size: 12px; color: var(--dim); line-height: 1.45; }

.pack-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; margin-top: 20px; align-items: start; }
.pack-main { display: grid; gap: 20px; min-width: 0; }
.pack-side { position: sticky; top: 84px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { font-size: 22px; text-transform: uppercase; }
.panel-head .muted { font-size: 13px; }
.desc { margin: 0; white-space: pre-wrap; color: #c7cfdb; }

.download-card { display: grid; gap: 16px; }
.facts { margin: 0; display: grid; gap: 8px; }
.facts div { display: flex; justify-content: space-between; font-size: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); }
.gun-list { display: flex; flex-wrap: wrap; gap: 6px; }
.gun-list span { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: rgba(255, 107, 26, 0.08); color: #ffb98f; border: 1px solid rgba(255, 107, 26, 0.2); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.gallery-item { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel-2); aspect-ratio: 16 / 9; }
.gallery-item.is-wide { grid-column: 1 / -1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.03); }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(5, 6, 9, 0.94); display: grid; place-items: center; padding: 40px 70px; animation: fade 0.15s; }
.lightbox img { max-height: 86vh; max-width: 100%; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.lb-close, .lb-nav { position: absolute; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel-2); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 16px; top: 50%; translate: 0 -50%; }
.lb-count { position: absolute; bottom: 16px; left: 50%; translate: -50% 0; color: var(--muted); font-size: 13px; }
@keyframes fade { from { opacity: 0; } }

/* ---------- sound preview player ---------- */

.player { display: grid; gap: 16px; user-select: none; -webkit-user-select: none; }
.player-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.readout { display: grid; gap: 2px; }
.readout-cat { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; }
.readout-name { font-size: 34px; text-transform: uppercase; }
.readout-meta { color: var(--muted); font-size: 13px; }

.player-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hs-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 77, 94, 0.45);
  background: rgba(255, 77, 94, 0.08);
  color: #ff8591;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.hs-btn .icon { width: 20px; height: 20px; }
.hs-btn:hover:not(:disabled) { background: rgba(255, 77, 94, 0.16); border-color: rgba(255, 77, 94, 0.7); }
.hs-btn:disabled { opacity: 0.4; cursor: not-allowed; filter: grayscale(0.6); }
.hs-btn.is-hit { animation: hs-hit 0.35s ease-out; }
@keyframes hs-hit { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0.7); background: rgba(255, 77, 94, 0.35); } 100% { box-shadow: 0 0 0 12px rgba(255, 77, 94, 0); } }

.rl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(63, 198, 255, 0.4);
  background: rgba(63, 198, 255, 0.07);
  color: #8fdcff;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.15s, border-color 0.15s;
}
.rl-btn .icon { width: 18px; height: 18px; }
.rl-btn:hover:not(:disabled) { background: rgba(63, 198, 255, 0.14); border-color: rgba(63, 198, 255, 0.7); }
.rl-btn:disabled { opacity: 0.4; cursor: not-allowed; filter: grayscale(0.6); }
.rl-btn.is-active .icon { animation: spin 0.9s linear infinite; }

.supp { display: inline-flex; align-items: center; gap: 12px; padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); transition: border-color 0.15s, background 0.15s; }
.supp:hover:not(:disabled) { border-color: #3b475b; }
.supp:disabled { opacity: 0.45; cursor: not-allowed; }
.supp-track { position: relative; width: 44px; height: 24px; border-radius: 999px; background: #0b0e13; border: 1px solid var(--line-2); transition: background 0.2s; }
.supp-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform 0.2s cubic-bezier(0.3, 1.4, 0.5, 1), background 0.2s; }
.supp-text { font-size: 14px; font-weight: 600; }
.supp-text b { display: inline-block; min-width: 30px; margin-left: 4px; color: var(--muted); font-family: var(--display); font-size: 16px; }
.supp.is-on { border-color: rgba(61, 220, 151, 0.45); background: rgba(61, 220, 151, 0.07); }
.supp.is-on .supp-track { background: rgba(61, 220, 151, 0.25); border-color: rgba(61, 220, 151, 0.5); }
.supp.is-on .supp-knob { transform: translateX(20px); background: var(--good); }
.supp.is-on .supp-text b { color: var(--good); }

.range {
  --bloom: 0;
  position: relative;
  height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: crosshair;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(ellipse at 50% 120%, rgba(255, 107, 26, 0.12), transparent 60%),
    linear-gradient(transparent 49.6%, rgba(255, 255, 255, 0.035) 50%, transparent 50.4%) 0 0 / 100% 40px,
    linear-gradient(90deg, transparent 49.6%, rgba(255, 255, 255, 0.035) 50%, transparent 50.4%) 0 0 / 40px 100%,
    #07090d;
  outline: none;
  touch-action: none;
}
.range:focus-visible { border-color: var(--accent); }
.range::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 90px 20px rgba(0, 0, 0, 0.8); }
.range-target {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 200px;
  height: 200px;
  translate: -50% -50%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 22px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: scale 0.2s;
}
.range.is-aiming .range-target { scale: 1.5; }
.range-holes { position: absolute; inset: 0; pointer-events: none; }
.hole { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #000; box-shadow: 0 0 0 2px rgba(255, 174, 61, 0.35), 0 0 6px rgba(255, 107, 26, 0.5); animation: hole 2.4s forwards; }
@keyframes hole { 0% { box-shadow: 0 0 0 3px rgba(255, 220, 150, 0.9), 0 0 14px rgba(255, 107, 26, 0.9); } 25% { box-shadow: 0 0 0 2px rgba(255, 174, 61, 0.35), 0 0 6px rgba(255, 107, 26, 0.4); } 100% { opacity: 0.25; box-shadow: none; } }

.crosshair { --gap: calc(6px + var(--bloom) * 9px); position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 2; }
.range.is-aiming .crosshair { --gap: calc(3px + var(--bloom) * 3px); }
.crosshair i { position: absolute; background: #fff; box-shadow: 0 0 3px rgba(0, 0, 0, 0.9); transition: transform 0.12s ease-out; }
.crosshair i:nth-child(1), .crosshair i:nth-child(2) { width: 2px; height: 10px; left: -1px; }
.crosshair i:nth-child(3), .crosshair i:nth-child(4) { height: 2px; width: 10px; top: -1px; }
.crosshair i:nth-child(1) { bottom: 0; transform: translateY(calc(var(--gap) * -1)); }
.crosshair i:nth-child(2) { top: 0; transform: translateY(var(--gap)); }
.crosshair i:nth-child(3) { right: 0; transform: translateX(calc(var(--gap) * -1)); }
.crosshair i:nth-child(4) { left: 0; transform: translateX(var(--gap)); }
.crosshair b { position: absolute; width: 2px; height: 2px; left: -1px; top: -1px; background: var(--accent); }
.crosshair.is-kick { animation: kick 0.12s ease-out; }
@keyframes kick { 30% { translate: 0 -4px; } }

.hitmarker { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 3; pointer-events: none; opacity: 0; }
.hitmarker i { position: absolute; left: -1.5px; top: -5px; width: 3px; height: 10px; background: var(--danger); border-radius: 1px; box-shadow: 0 0 6px rgba(255, 77, 94, 0.9); }
.hitmarker i:nth-child(1) { transform: rotate(45deg) translateY(-12px); }
.hitmarker i:nth-child(2) { transform: rotate(135deg) translateY(-12px); }
.hitmarker i:nth-child(3) { transform: rotate(225deg) translateY(-12px); }
.hitmarker i:nth-child(4) { transform: rotate(315deg) translateY(-12px); }
.hitmarker.is-on { animation: hitmarker 0.45s ease-out; }
@keyframes hitmarker { 0% { opacity: 1; scale: 1.5; } 15% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1.1; } }
.hs-pop { position: absolute; left: 50%; top: calc(50% - 44px); translate: -50% 0; z-index: 3; pointer-events: none; opacity: 0; font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--danger); text-shadow: 0 0 12px rgba(255, 77, 94, 0.6), 0 2px 0 #000; }
.hs-pop.is-on { animation: hs-pop 0.9s ease-out; }
@keyframes hs-pop { 0% { opacity: 0; transform: translateY(8px) scale(0.8); } 12% { opacity: 1; transform: none; } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }

.range.is-reloading { cursor: progress; }
.range.is-reloading .crosshair { opacity: 0.35; }
.range-reload { position: absolute; left: 50%; bottom: 56px; translate: -50% 0; z-index: 3; width: 180px; display: grid; gap: 6px; justify-items: center; pointer-events: none; }
.range-reload span { font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #8fdcff; }
.range-reload i { position: relative; width: 100%; height: 4px; border-radius: 2px; background: rgba(63, 198, 255, 0.15); overflow: hidden; }
.range-reload i::after { content: ''; position: absolute; inset: 0; width: 0; background: var(--graphic); }
.range-reload.is-running i::after { animation: reload-fill var(--reload-time, 1s) linear forwards; }
@keyframes reload-fill { to { width: 100%; } }

.range-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 50% 105%, rgba(255, 190, 90, 0.55), rgba(255, 107, 26, 0.18) 35%, transparent 65%); }
.range-flash.is-on { animation: flash 0.11s ease-out; }
.range.is-suppressed .range-flash { background: radial-gradient(ellipse at 50% 110%, rgba(255, 190, 90, 0.16), transparent 45%); }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
.range.is-shake { animation: shake 0.1s; }
@keyframes shake { 25% { transform: translate(2px, -2px); } 60% { transform: translate(-1px, 1px); } }

.range-hint { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; font-size: 13px; color: var(--muted); padding: 5px 12px; border-radius: 999px; background: rgba(10, 12, 16, 0.7); border: 1px solid var(--line); white-space: nowrap; pointer-events: none; }
.range-hint b { color: var(--text); }
.range-status { position: absolute; left: 50%; top: 18px; translate: -50% 0; font-size: 13px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 174, 61, 0.12); color: var(--accent-2); border: 1px solid rgba(255, 174, 61, 0.3); pointer-events: none; }
.range-count { position: absolute; right: 14px; top: 12px; font-size: 12px; color: var(--dim); pointer-events: none; }
.range-count span { font-family: var(--display); font-size: 22px; color: var(--muted); margin-right: 3px; }
.range-keys { position: absolute; left: 14px; top: 14px; font-size: 11px; color: var(--dim); opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.range:focus .range-keys { opacity: 1; }

/* Range + weapon list side by side; stacked when the player itself is narrow */
.player { container-type: inline-size; }
.player-body { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 12px; align-items: stretch; }
@container (max-width: 600px) {
  .player-body { grid-template-columns: 1fr; }
  .player-body .range { height: 280px; }
  .wlist { max-height: 260px; }
}
.player-body .range { height: 360px; }
.wlist {
  position: relative;
  max-height: 360px;
  overflow-y: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  padding: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.wgroup + .wgroup { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.wgroup-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 6px; font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.wgroup-pack .wgroup-head { color: var(--accent-2); }
.wgroup-head em { font-style: normal; font-family: var(--font); font-size: 11px; font-weight: 600; letter-spacing: 0; padding: 1px 7px; border-radius: 999px; background: var(--panel-2); color: var(--dim); }
.wsource { margin: 0 8px 6px; font-size: 12px; color: var(--dim); line-height: 1.4; }
.wsource b { color: var(--muted); font-weight: 600; }
.wsource select { height: 26px; padding: 0 6px; font-size: 12px; border-radius: 6px; background: var(--panel); margin: 0 2px; }
.wcat { padding: 8px 8px 3px; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.witem {
  display: grid;
  width: 100%;
  gap: 1px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  text-align: left;
  transition: background 0.12s, border-color 0.12s;
}
.witem b { font-size: 14px; font-weight: 600; }
.witem small { font-size: 11px; color: var(--dim); }
.witem:hover { background: var(--panel-2); }
.witem.is-active { background: rgba(255, 107, 26, 0.1); border-color: rgba(255, 107, 26, 0.45); }
.witem.is-active b { color: var(--accent-2); }
.wgroup-pack .witem b::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 7px 2px 0; border-radius: 50%; background: var(--accent); }

.player-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--dim); font-size: 13px; flex-wrap: wrap; }
.vol { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.vol input { width: 120px; accent-color: var(--accent); }

/* ---------- forms ---------- */

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: #c7cfdb; }
.field small { color: var(--dim); font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.fields { display: grid; gap: 16px; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.form-error { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(255, 77, 94, 0.1); border: 1px solid rgba(255, 77, 94, 0.3); color: #ff9aa4; font-size: 14px; }

.auth { display: grid; place-items: center; padding: 64px 0; }
.auth-card { width: 100%; max-width: 420px; padding: 32px; }
.auth-card h1 { font-size: 34px; text-transform: uppercase; }
.auth-card > p { margin: 6px 0 22px; }
.auth-card form { display: grid; gap: 16px; }
.auth-card .hint { margin: -6px 0 0; }
.auth-switch { text-align: center; color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.auth-switch a { color: var(--accent-2); font-weight: 600; }

/* ---------- upload ---------- */

.upload { display: grid; gap: 18px; max-width: 900px; }
.type-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.type-opt { --type: var(--sound); position: relative; display: grid; align-content: start; justify-items: start; gap: 4px; padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.type-opt.type-graphic { --type: var(--graphic); }
.type-opt.type-bundle { --type: var(--bundle); }
.type-opt input { position: absolute; opacity: 0; pointer-events: none; }
.type-opt small { color: var(--muted); font-size: 13px; }
.type-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; margin-bottom: 6px; color: var(--type); background: color-mix(in srgb, var(--type) 14%, transparent); }
.type-opt:has(input:checked) { border-color: var(--type); background: color-mix(in srgb, var(--type) 7%, var(--bg-2)); }
.type-opt:has(input:focus-visible) { outline: 2px solid var(--type); outline-offset: 2px; }

.cover-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.cover-pick .muted { display: inline-flex; align-items: center; gap: 8px; }
.cover-thumb { width: 64px; height: 36px; object-fit: cover; border-radius: 5px; }

.wtable { display: grid; gap: 6px; }
.wrow { display: grid; grid-template-columns: 1fr 1.3fr 1.3fr; gap: 8px; align-items: center; padding: 8px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line); }
.wrow-name { display: grid; padding-left: 4px; }
.wrow-name small { color: var(--dim); font-size: 12px; }
.wrow-name b { display: inline-flex; align-items: center; gap: 6px; }
.wrow-hs { grid-template-columns: 1fr 2.6fr; border-color: rgba(255, 77, 94, 0.25); background: rgba(255, 77, 94, 0.04); margin-bottom: 6px; }
.wrow-hs .wrow-name b { color: #ff8591; }
.wrow-hs.wrow-rl { border-color: rgba(63, 198, 255, 0.25); background: rgba(63, 198, 255, 0.04); }
.wrow-rl .wrow-name b { color: #8fdcff; }
.slot { display: flex; align-items: center; gap: 4px; min-width: 0; }
.slot-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border-radius: 8px; border: 1px dashed var(--line-2); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.slot-pick:hover { border-color: #465368; }
.slot-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); flex: none; }
.slot-name { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot.is-filled .slot-pick { border-style: solid; border-color: rgba(255, 107, 26, 0.45); background: rgba(255, 107, 26, 0.06); }
.slot.is-filled .slot-label { color: var(--accent-2); }
.slot.is-filled .slot-name { color: var(--text); }
.slot-btn { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); }
.slot-btn:hover { color: var(--text); }
.slot-na { height: 38px; display: flex; align-items: center; padding: 0 10px; font-size: 12px; color: var(--dim); border-radius: 8px; background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255, 255, 255, 0.02) 6px 12px); }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shot { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-2); border: 1px solid var(--line-2); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.7); }
.shot-add { display: grid; place-items: center; align-content: center; gap: 4px; border-style: dashed; color: var(--muted); font-size: 13px; cursor: pointer; }
.shot-add:hover { color: var(--text); border-color: #465368; }

.dropzone { display: grid; justify-items: center; gap: 6px; padding: 34px 20px; text-align: center; border-radius: var(--radius); border: 2px dashed var(--line-2); background: var(--bg-2); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.dropzone .icon { width: 30px; height: 30px; color: var(--accent); }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: rgba(255, 107, 26, 0.05); }
.dropzone.is-filled { border-style: solid; border-color: rgba(255, 107, 26, 0.5); }

.hint-after { margin: 12px 0 0; }
.hint b { color: #c7cfdb; font-weight: 600; }

.sub-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 10px; flex-wrap: wrap; }
.sub-head h3 { font-size: 17px; text-transform: uppercase; letter-spacing: 0.04em; }
.sub-head .muted { font-size: 13px; }

.scan-status { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; background: var(--bg-2); border: 1px solid var(--line-2); color: #c7cfdb; }
.scan-help { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.scan-help b { color: #c7cfdb; }
.scan-status ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.scan-status li + li { margin-top: 2px; }
.scan-success { border-color: rgba(61, 220, 151, 0.35); background: rgba(61, 220, 151, 0.05); }
.scan-warn { border-color: rgba(255, 174, 61, 0.4); background: rgba(255, 174, 61, 0.06); }
.spinner { flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.live { margin-top: 16px; padding: 16px; border-radius: var(--radius); border: 1px solid rgba(255, 107, 26, 0.3); background: linear-gradient(180deg, rgba(255, 107, 26, 0.06), transparent 40%), var(--bg-2); }
.live-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.live-head b { font-family: var(--display); font-size: 18px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-2); }
.live-head .muted { font-size: 13px; }
.live .player-body .range { height: 300px; }
.live .wlist { max-height: 300px; }

.det-list { display: grid; gap: 6px; max-height: 420px; overflow-y: auto; }
.det-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 220px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line); }
.det-row.is-used { border-color: rgba(255, 107, 26, 0.35); }
.det-name { display: grid; min-width: 0; }
.det-name b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.det-name small { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.det-row select { height: 34px; width: 100%; font-size: 13px; background: var(--panel); }
.det-row.is-used select { border-color: rgba(255, 107, 26, 0.5); color: var(--accent-2); }

.scan-drop { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px; border-radius: var(--radius-sm); border: 1px dashed var(--line-2); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.scan-drop > .icon { width: 22px; height: 22px; color: var(--accent); }
.scan-drop span { display: grid; }
.scan-drop b { font-size: 14px; }
.scan-drop small { color: var(--muted); font-size: 13px; }
.scan-drop:hover, .scan-drop.is-over { border-color: var(--accent); background: rgba(255, 107, 26, 0.05); }

.submit-row { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap; }
.submit-row .form-error { flex: 1 1 100%; }
.progress { position: relative; flex: 1; min-width: 200px; height: 34px; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.progress-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, rgba(255, 107, 26, 0.35), rgba(255, 174, 61, 0.5)); transition: width 0.2s; }
.progress-text { position: relative; display: grid; place-items: center; height: 100%; font-size: 13px; font-weight: 600; }

/* ---------- pack maker ---------- */

.maker { display: grid; gap: 18px; max-width: 980px; }
.mk-rows { display: grid; gap: 6px; }
.mk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.35fr); gap: 10px 14px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line); transition: border-color 0.15s; }
.mk-row.is-set { border-color: rgba(255, 107, 26, 0.35); }
.mk-name { display: grid; min-width: 0; }
.mk-name b { font-size: 15px; }
.mk-name small { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-name code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 11px; color: var(--muted); }
.mk-modes { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.mk-mode { height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 13px; font-weight: 600; transition: color 0.15s, background 0.15s; }
.mk-mode:hover { color: var(--text); }
.mk-mode.is-active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.mk-mode.is-active[data-mode="sound"] { color: var(--accent-2); background: rgba(255, 107, 26, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 107, 26, 0.45); }
.mk-sound { display: grid; gap: 6px; min-width: 0; }
.mk-clips { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-clip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px; border-radius: 9px; border: 1px solid rgba(255, 107, 26, 0.45); background: rgba(255, 107, 26, 0.06); }
.mk-clip-text { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; max-width: 260px; line-height: 1.25; }
.mk-clip-text b, .mk-clip-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-clip-text b { font-size: 13px; font-weight: 500; }
.mk-clip-text small { color: var(--dim); font-size: 11px; }
.mk-clip .slot-btn { width: 28px; height: 28px; }
.mk-none { font-size: 13px; }
.mk-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mk-add small { font-size: 12px; }

.mk-toggle { position: relative; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.mk-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.mk-toggle .supp-track { flex: none; margin-top: 2px; }
.mk-toggle > span:last-child { display: grid; gap: 2px; }
.mk-toggle small { color: var(--muted); font-size: 13px; max-width: 680px; }
.mk-toggle input:checked + .supp-track { background: rgba(61, 220, 151, 0.25); border-color: rgba(61, 220, 151, 0.5); }
.mk-toggle input:checked + .supp-track .supp-knob { transform: translateX(20px); background: var(--good); }
.mk-toggle input:focus-visible + .supp-track { outline: 2px solid var(--accent); outline-offset: 2px; }

.mk-feet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.mk-opt { position: relative; display: grid; gap: 2px; padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.mk-opt input { position: absolute; opacity: 0; pointer-events: none; }
.mk-opt small { color: var(--muted); font-size: 13px; }
.mk-opt:has(input:checked) { border-color: var(--accent); background: rgba(255, 107, 26, 0.06); }
.mk-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.mk-gain { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mk-gain label { font-size: 13px; font-weight: 600; color: #c7cfdb; }
.mk-gain input { flex: 1; min-width: 160px; accent-color: var(--accent); }
.mk-gain b { min-width: 44px; font-family: var(--display); font-size: 22px; color: var(--accent-2); }
.mk-feet-panel .hint { margin: 10px 0 0; }
.mk-sets { display: grid; gap: 6px; }
.mk-set { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; }
.mk-set > span { display: grid; flex: 1; min-width: 0; }
.mk-set small { color: var(--dim); font-size: 12px; }
.mk-set input { accent-color: var(--accent); }
.mk-set:has(input:checked) { border-color: rgba(255, 107, 26, 0.45); background: rgba(255, 107, 26, 0.05); }

.mk-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(5, 6, 9, 0.8); animation: fade 0.15s; }
.mk-dialog { width: 100%; max-width: 640px; max-height: min(720px, 90vh); display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 12px; box-shadow: var(--shadow); }
.mk-dialog .panel-head { margin: 0; align-items: center; }
.mk-kinds { justify-self: start; max-width: 100%; }
.mk-kinds .tab { border: 0; background: none; }
.mk-kinds .tab.is-active { background: var(--panel-2); }
.mk-search { min-width: 0; }
.mk-list { display: grid; gap: 6px; align-content: start; overflow-y: auto; }
.mk-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line); }
.mk-item-name { display: grid; flex: 1; min-width: 0; }
.mk-item-name b, .mk-item-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-item-name b { font-size: 14px; font-weight: 600; }
.mk-item-name small { color: var(--dim); font-size: 12px; }
.mk-empty { margin: 8px 0; }
.mk-dialog-hint { margin: 0; }
.mk-player-empty { margin: 0; font-size: 14px; }

.mk-result { display: grid; gap: 14px; justify-items: start; border-color: rgba(61, 220, 151, 0.35); background: linear-gradient(180deg, rgba(61, 220, 151, 0.06), transparent 50%), var(--panel); }
.mk-result .panel-head { width: 100%; margin: 0; }
.mk-summary { margin: 0; padding-left: 18px; color: #c7cfdb; font-size: 14px; }
.mk-install { margin: 0; }
.mk-publish { width: 100%; border-top: 1px solid var(--line); padding-top: 14px; }
.mk-publish summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--accent-2); list-style: none; }
.mk-publish summary::-webkit-details-marker { display: none; }
.mk-publish form { margin-top: 14px; max-width: 560px; }
.mk-publish .btn { justify-self: start; }

/* ---------- toasts / footer ---------- */

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; gap: 8px; }
.toast { padding: 11px 16px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 14px; animation: toast-in 0.2s ease-out; transition: opacity 0.3s, transform 0.3s; max-width: 340px; }
.toast-success { border-color: rgba(61, 220, 151, 0.4); }
.toast-error { border-color: rgba(255, 77, 94, 0.5); color: #ffb3ba; }
.toast.is-leaving { opacity: 0; transform: translateY(6px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.footer { border-top: 1px solid var(--line); padding: 22px 0; color: var(--dim); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

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

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-visual { height: 140px; order: -1; }
  .pack-layout { grid-template-columns: 1fr; }
  .pack-side { position: static; }
  .hero-download { display: inline-flex; }
}

@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .topbar { position: static; }
  .topbar-inner { gap: 12px; height: auto; min-height: 60px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; margin: 0 -4px; }
  .nav-user .btn span, .menu-btn span { display: none; }
  .page-head h1 { font-size: 34px; }
  .search { min-width: 0; flex: 1; }
  .toolbar-right { width: 100%; }
  .type-picker { grid-template-columns: 1fr; }
  .wrow { grid-template-columns: 1fr 1fr; }
  .wrow-name, .wrow-hs .slot { grid-column: 1 / -1; }
  .det-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .det-row select { grid-column: 1 / -1; }
  .mk-row { grid-template-columns: 1fr; }
  .mk-feet { grid-template-columns: 1fr; }
  .mk-modal { padding: 12px; }
  .range, .player-body .range { height: 260px; }
  .readout-name { font-size: 28px; }
  .player-body { grid-template-columns: 1fr; }
  .wlist, .live .wlist { max-height: 280px; }
  .range-keys { display: none; }
  .lightbox { padding: 60px 12px; }
  .toasts { left: 16px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  /* Keep shot/headshot feedback visible, as a still fade instead of movement. */
  .hitmarker.is-on, .hs-pop.is-on { animation: still-fade 0.6s linear !important; }
  .range-reload.is-running i::after { animation: reload-fill var(--reload-time, 1s) linear forwards !important; }
  .range-flash.is-on { animation: still-fade 0.12s linear !important; }
}
@keyframes still-fade { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
