/* Haulwave — styled to match the Haulwave Windows app (ets2radio-installer/ui.xaml). */
:root {
  --bg: #0A0D1A;
  --bg-2: #0C1020;
  --surface: #121731;
  --surface-hover: #171D3B;
  --surface-sel: #191C45;
  --nav-active: #1A1F44;
  --track: #1B2244;
  --line: #232A4D;
  --line-strong: #323B68;
  --frame: #2E3766;
  --text: #EEF0FB;
  --text-2: #C3C7E4;
  --nav-text: #9CA1C8;
  --muted: #858BB0;
  --dim: #6E73A0;
  --accent: #6D6AF5;
  --accent-2: #8F84FF;
  --accent-top: #8A86FF;
  --accent-label: #A9A2FF;
  --cyan: #5AD1FF;
  --green: #3DDC97;
  --amber: #F5B84A;
  --red: #FF6B7A;
  --font: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --side-w: 250px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.55 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
p a, .credits a, .rows-empty a { color: var(--accent-2); }
p a:hover, .rows-empty a:hover { text-decoration: underline; }
code { font: 500 .84em var(--mono); background: var(--track); border: 1px solid var(--line); padding: .1em .4em; border-radius: 6px; color: var(--text-2); word-break: break-word; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: rgba(109, 106, 245, .45); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
[hidden] { display: none !important; }

/* ---------- Buttons (Primary / Ghost / GhostSm / IconBtn) ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; padding: 0 24px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  font: 600 15px var(--font); transition: background .15s, border-color .15s, box-shadow .15s, opacity .15s, filter .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(180deg, var(--accent-top), var(--accent)); color: #fff; box-shadow: 0 12px 26px -10px rgba(109, 106, 245, .75); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { filter: brightness(1.16); }
.btn-primary:disabled { opacity: .4; box-shadow: none; filter: none; cursor: not-allowed; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); font-size: 14px; }
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--line-strong); }
.btn-ghost:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { height: 52px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 4px; color: var(--muted); font: 500 13px var(--font); cursor: pointer; }
.btn-link:hover { color: var(--text); }
.btn-link:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--track); color: #fff; }
.btn:focus-visible, .nav-item:focus-visible, .chip:focus-visible, .game-pick button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }

.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px 18px;
  background: linear-gradient(170deg, #1C1A52 0%, #0F1328 45%, #0C1020 100%); border-right: 1px solid #1A2040; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding-left: 6px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--accent-2), var(--accent)); flex: none; }
.brand-mark svg { width: 24px; height: 24px; stroke: #fff; stroke-width: 3; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 17px; font-weight: 700; color: #fff; }
.brand-text small { font-size: 12px; color: #AFB3DA; }

.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 26px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 0; background: none;
  color: var(--nav-text); font: 600 14px var(--font); text-align: left; cursor: pointer; transition: background .15s, color .15s;
}
.nav-item svg { width: 17px; height: 17px; }
.nav-item span { flex: 1; }
.nav-item:hover { background: var(--surface); color: #E3E5F7; }
.nav-item.active { background: var(--nav-active); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent-2); }
.nav-meta { font-style: normal; font-size: 12px; color: var(--dim); font-weight: 500; }
.nav-ok { color: var(--green); font-size: 11px; font-weight: 700; }
.nav-badge { min-width: 22px; padding: 1px 7px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; text-align: center; }
.nav-badge.zero { background: var(--track); color: var(--dim); }
.nav-badge.bump, .count-pill.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.3); } }

.side-bottom { margin-top: auto; padding-top: 20px; }
.side-label { margin: 0 0 8px 6px; font-size: 11px; font-weight: 700; color: var(--dim); letter-spacing: .02em; }
.side-games { display: flex; flex-direction: column; gap: 6px; }
.side-games button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 12px; cursor: pointer; text-align: left;
  background: #0F1328; border: 1.5px solid var(--line); color: var(--text); font-family: var(--font); transition: border-color .15s, background .15s;
}
.side-games button:hover { border-color: var(--line-strong); }
.side-games button[aria-checked="true"] { border-color: var(--accent); background: var(--surface-sel); }
.g-badge { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; font-size: 10px; font-weight: 700; color: #fff; flex: none; }
.g-ets2 { background: #16B8A6; }
.g-ats { background: #E0567A; }
.g-text { display: flex; flex-direction: column; min-width: 0; }
.g-text strong { font-size: 13px; font-weight: 600; }
.g-text small { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.g-text i { width: 6px; height: 6px; border-radius: 50%; background: #5A608A; }
.side-games button[aria-checked="true"] .g-text i { background: var(--green); }
.side-games .on { display: none; }
.side-games button[aria-checked="true"] .on { display: inline; }
.side-games button[aria-checked="true"] .off { display: none; }
.side-foot { margin: 12px 0 0 6px; font-size: 10.5px; color: #555B85; }

.main { position: relative; min-width: 0; display: flex; flex-direction: column; }
.mobile-top { display: none; }
.page { flex: 1; width: 100%; max-width: 1180px; padding: 44px 36px 28px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 26px; font-weight: 700; color: var(--text); }
.page-head .sub { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* Summary card (the app's Install summary) */
.summary {
  display: flex; align-items: center; gap: 0; padding: 18px 22px; margin-bottom: 18px; border-radius: 16px;
  background: linear-gradient(135deg, #1C1B4A, var(--surface)); border: 1px solid #2A3160;
}
.summary-num { display: flex; flex-direction: column; padding-right: 24px; margin-right: 22px; border-right: 1px solid #2A3160; }
.summary-num strong { font-size: 44px; font-weight: 700; line-height: 1.05; color: #fff; }
.summary-num span { font-size: 13px; color: #AFB3DA; }
.eyebrow { margin: 0 0 8px; font-size: 11px; font-weight: 700; color: var(--accent-label); letter-spacing: .02em; }
.summary-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-step { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 5px; border-radius: 8px; background: #2A2A66; color: #E3E5F7; font-size: 12.5px; }
.chip-step b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--accent); color: #fff; font-size: 11px; }
.summary-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---------- Toolbar ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 10px;
  margin: 0 -12px; padding: 12px; background: rgba(10, 13, 26, .88); backdrop-filter: blur(14px);
}
.search {
  flex: 1 1 280px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109, 106, 245, .18); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: 14.5px var(--font); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent-2); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; pointer-events: none; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); }
select, .modal input { height: 44px; padding: 0 12px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; font: 14px var(--font); }
select { appearance: none; padding-right: 38px; min-width: 170px; cursor: pointer; }
select:hover { border-color: var(--line-strong); }
select:focus, .modal input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109, 106, 245, .18); }
.chips { flex-basis: 100%; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--nav-text); font: 600 12.5px var(--font); cursor: pointer; text-transform: capitalize; transition: all .15s; }
.chip:hover { color: #E3E5F7; border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--surface-sel); border-color: var(--accent); color: #fff; }
.chip:last-child { margin-right: 28px; }
.result-count { margin: 8px 0 14px; font-size: 13px; color: var(--muted); }

/* ---------- Station cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.card {
  display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, background .15s;
  animation: rise .3s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.card:hover { border-color: var(--line-strong); }
.card.selected { border-color: var(--accent); background: var(--surface-sel); }
.card.playing { border-color: var(--cyan); }
.card-top { display: flex; align-items: center; gap: 12px; }
.avatar {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; overflow: hidden; flex: none;
  background: var(--c, var(--accent)); color: #fff; font-size: 14px; font-weight: 700;
}
.card-title { flex: 1; min-width: 0; }
.card-title strong { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title span { display: block; margin-top: 1px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; min-height: 22px; }
.tag { padding: 2px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--track); color: var(--nav-text); border: 1px solid transparent; }
.tag-cc { font: 500 11px/1.65 var(--mono); color: var(--text-2); }
.tag-ok { color: var(--green); background: rgba(61, 220, 151, .13); border-color: rgba(61, 220, 151, .33); }
.tag-star { color: var(--amber); background: rgba(245, 184, 74, .13); border-color: rgba(245, 184, 74, .33); }
.tag-custom { color: var(--cyan); background: rgba(90, 209, 255, .13); border-color: rgba(90, 209, 255, .33); }
.card-actions { display: flex; gap: 8px; margin-top: auto; }
.card-actions .btn { flex: 1; height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.play-btn { flex: 0 0 34px !important; padding: 0 !important; }
.play-btn.playing { color: var(--cyan); border-color: var(--cyan); }
.add-btn.on { background: linear-gradient(180deg, var(--accent-top), var(--accent)); border-color: transparent; color: #fff; }

.skeleton { pointer-events: none; animation: none; }
.sk { border-radius: 8px; background: linear-gradient(90deg, var(--track) 0%, #222a52 50%, var(--track) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { padding: 56px 16px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 16px; }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 14px; background: var(--track); color: var(--muted); }
.empty-title { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.empty p { margin: 4px 0; }
.more { display: flex; justify-content: center; padding-top: 22px; }

/* ---------- Bottom action bar ---------- */
.actionbar {
  position: sticky; bottom: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 36px; background: rgba(10, 13, 26, .94); backdrop-filter: blur(14px); border-top: 1px solid #1A2040;
}
.ab-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ab-avatars { display: flex; }
.ab-avatars .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; border: 2px solid var(--bg); margin-left: -8px; }
.ab-avatars .avatar:first-child { margin-left: 0; }
.ab-text { display: flex; flex-direction: column; min-width: 0; }
.ab-text strong { font-size: 14px; font-weight: 600; }
.ab-text span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-actions { display: flex; gap: 10px; flex: none; }
.ab-actions .btn { height: 44px; }
.actionbar.off { display: none; }

/* ---------- My file ---------- */
.file-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.drop {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1.5px dashed var(--line-strong); transition: border-color .15s, background .15s;
}
.drop:hover, .drop.drag { border-color: var(--accent); background: var(--surface-sel); }
.drop.loaded { border-style: solid; border-color: rgba(61, 220, 151, .45); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--track); color: var(--accent-2); flex: none; }
.drop.loaded .drop-icon { background: #163A33; color: var(--green); }
.drop-text { display: flex; flex-direction: column; }
.drop-title { font-size: 14px; font-weight: 600; }
.drop-sub { font-size: 12px; color: var(--muted); }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 11px 12px 11px 14px; border-radius: 12px; font-size: 13px; }
.banner-amber { background: #2A2414; border: 1px solid #6B5521; color: #F5D493; }
.section { margin-top: 22px; }
.section-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.badge { min-width: 24px; padding: 1px 8px; border-radius: 9px; background: var(--track); color: var(--text); text-align: center; font-size: 11px; }
.badge-accent { background: var(--accent); color: #fff; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rows li { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; animation: rise .25s ease both; }
.rows li.removed { opacity: .45; }
.rows li.removed .li-name { text-decoration: line-through; }
.li-av { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; overflow: hidden; flex: none; background: var(--c, var(--accent)); color: #fff; font-size: 11.5px; font-weight: 700; }
.li-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-meta { font: 500 11px var(--mono); color: var(--muted); }
.rows button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.rows button:hover { background: #2A1820; color: var(--red); }
.rows li.removed button:hover { background: #163A33; color: var(--green); }
.rows svg { width: 14px; height: 14px; }
.rows-empty { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; }

.install-card {
  position: sticky; top: 20px; padding: 20px; border-radius: 16px;
  background: linear-gradient(160deg, #1C1B4A, var(--surface) 70%); border: 1px solid #2A3160;
}
.install-num { display: flex; flex-direction: column; margin-bottom: 18px; }
.install-num strong { font-size: 44px; font-weight: 700; line-height: 1.05; color: #fff; font-variant-numeric: tabular-nums; }
.install-num span { font-size: 13px; color: #AFB3DA; }
.checks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 24px; font-size: 13px; color: var(--text-2); }
.checks li::before { content: ""; position: absolute; left: 3px; top: 5px; width: 10px; height: 5px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.install-links { display: flex; justify-content: center; gap: 6px; margin-top: 16px; color: var(--line-strong); }
.install-foot { margin: 6px 0 0; text-align: center; font-size: 11.5px; color: var(--dim); }

/* ---------- Help ---------- */
.steps { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.steps li { padding: 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.step-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 14px; border-radius: 10px; background: var(--track); color: var(--accent-2); }
.steps h3 { font-size: 15px; margin-bottom: 6px; }
.steps p { margin: 0; font-size: 13.5px; color: var(--muted); }
.faq { display: flex; flex-direction: column; gap: 8px; max-width: 820px; }
.faq details { border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.faq details[open] { border-color: var(--line-strong); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 18px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 16px 14px; font-size: 13.5px; color: var(--muted); }
.inline-link { padding: 0; border: 0; background: none; color: var(--accent-2); font: inherit; cursor: pointer; }
.inline-link:hover { text-decoration: underline; }
.credits { margin: 28px 0 0; font-size: 12px; color: var(--dim); }

/* ---------- Player ---------- */
.player {
  position: fixed; right: 24px; bottom: 92px; z-index: 40; display: flex; align-items: center; gap: 12px; width: min(540px, calc(100% - 32px));
  padding: 8px; border-radius: 16px; background: rgba(18, 23, 49, .97); border: 1px solid var(--frame); box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .8);
  animation: rise .25s ease both;
}
.player-art .avatar { width: 42px; height: 42px; }
.player-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.player-meta strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-meta span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player.live .player-meta span { color: var(--green); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 20px; }
.bars i { width: 4px; height: 25%; border-radius: 2px; background: linear-gradient(var(--cyan), var(--accent)); animation: eq 1.1s ease-in-out infinite paused; }
.bars i:nth-child(2) { animation-delay: -.4s; } .bars i:nth-child(3) { animation-delay: -.8s; } .bars i:nth-child(4) { animation-delay: -.2s; } .bars i:nth-child(5) { animation-delay: -.6s; }
.player.live .bars i { animation-play-state: running; }
@keyframes eq { 0%, 100% { height: 22%; } 50% { height: 100%; } }
.player .btn-sm { height: 32px; }
#playerAdd.btn-primary { box-shadow: none; }

/* ---------- Modals ---------- */
.modal { width: min(480px, calc(100% - 32px)); padding: 0; border-radius: 16px; background: var(--bg); color: var(--text); border: 1px solid var(--frame); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9); }
.modal[open] { animation: rise .2s ease both; }
.modal-wide { width: min(780px, calc(100% - 32px)); }
.modal::backdrop { background: rgba(4, 6, 14, .72); backdrop-filter: blur(4px); }
.modal form { display: grid; gap: 14px; padding: 26px; }
.modal h3 { font-size: 22px; font-weight: 700; }
.modal h3.mono { font-size: 15px; font-weight: 500; }
.modal p { margin: -6px 0 0; font-size: 13.5px; }
.modal label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.modal input { width: 100%; }
.modal pre { margin: 0; max-height: 58vh; overflow: auto; padding: 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font: 12.5px/1.7 var(--mono); color: var(--text-2); }
.form-row { display: grid; grid-template-columns: 1fr 90px 100px; gap: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.modal-actions .btn { height: 42px; }
.modal-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--green); color: var(--bg); box-shadow: 0 0 0 10px rgba(61, 220, 151, .12); margin: 6px 0 6px 10px; }
.modal-icon svg { width: 24px; height: 24px; stroke-width: 2.6; }
.modal-icon-amber { background: var(--amber); box-shadow: 0 0 0 10px rgba(245, 184, 74, .12); }
.install-steps { margin: 0; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 12px; }
.install-steps li { counter-increment: st; position: relative; padding-left: 36px; font-size: 14px; color: var(--text-2); }
.install-steps li::before { content: counter(st); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.install-steps strong { color: var(--text); }
.warn { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #2A2414; border: 1px solid #6B5521; }
.warn svg { color: var(--amber); margin-top: 2px; }
.modal .warn p { margin: 0; font-size: 13px; color: #F5D493; }
.game-pick.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.game-pick.seg button { height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--nav-text); font: 600 13px var(--font); cursor: pointer; }
.game-pick.seg button[aria-checked="true"] { border-color: var(--accent); background: var(--surface-sel); color: #fff; }
.unlock-next { margin: 0 !important; padding: 12px 14px; border-radius: 12px; background: #11291F; border: 1px solid rgba(61, 220, 151, .35); color: var(--text-2); }
.manual { border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.manual summary { padding: 12px 14px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.manual[open] summary { border-bottom: 1px solid var(--line); }
.manual .install-steps { padding: 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 20px; left: calc(50% + var(--side-w) / 2); transform: translate(-50%, -12px); z-index: 60; display: flex; align-items: center; gap: 10px;
  max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--frame); font-size: 14px; font-weight: 500;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); flex: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok::before { background: var(--green); }
.toast.error::before { background: var(--red); }

.scrim { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .file-layout { grid-template-columns: 1fr; }
  .install-card { position: static; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; width: 270px; transform: translateX(-102%); transition: transform .25s ease; }
  .side.open { transform: none; box-shadow: 30px 0 60px rgba(0, 0, 0, .5); }
  .scrim.open { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(4, 6, 14, .6); }
  .mobile-top {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 16px;
    background: rgba(10, 13, 26, .9); backdrop-filter: blur(14px); border-bottom: 1px solid #1A2040;
  }
  .mobile-top .brand { flex: 1; padding: 0; }
  .brand-sm .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .brand-sm .brand-mark svg { width: 20px; height: 20px; }
  .brand-sm strong { font-size: 16px; }
  .count-pill { min-width: 20px; padding: 0 6px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; }
  .page { padding: 24px 16px 20px; }
  .toolbar { top: 60px; margin: 0 -16px; padding: 10px 16px; }
  .actionbar { padding: 12px 16px; }
  .ab-avatars, #barReview { display: none; }
  .player { right: 16px; bottom: 84px; }
  .toast { left: 50%; top: 72px; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .summary { flex-direction: column; align-items: flex-start; gap: 14px; }
  .summary-num { flex-direction: row; align-items: baseline; gap: 8px; padding: 0; margin: 0; border: 0; }
  .summary-num strong { font-size: 32px; }
  .select-wrap { flex: 1 1 140px; }
  select { width: 100%; min-width: 0; }
  .ab-text span { display: none; }
  .ab-actions .btn { padding: 0 16px; }
  .player-bars { display: none; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .form-row label:first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Station logos (see hwLogo in app.js) ---------- */
.avatar img, .li-av img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .25s ease; }
.avatar img.ready, .li-av img.ready { opacity: 1; }
.avatar img.fill, .li-av img.fill { object-fit: cover; }
.avatar img.wide, .li-av img.wide { object-fit: contain; padding: 3px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.avatar img.logo-bg, .li-av img.logo-bg { object-fit: cover; opacity: .9; filter: blur(8px) saturate(1.4) brightness(.85); transform: scale(1.6); }
.avatar.has-logo, .li-av.has-logo { color: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }

/* ---------- Volume ---------- */
.vol { display: flex; align-items: center; gap: 4px; padding: 4px 10px 4px 4px; border-radius: 12px; background: #0F1328; border: 1px solid var(--line); }
.vol-btn { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 9px; background: none; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; }
.vol-btn:hover { background: var(--track); color: #fff; }
.vol-btn svg { width: 17px; height: 17px; }
.vol-slider { position: relative; display: flex; align-items: center; }
.vol-pct {
  position: absolute; left: var(--pct-x, 50%); bottom: 22px; transform: translateX(-50%); padding: 2px 6px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--frame); font: 600 11px var(--font); color: var(--text); pointer-events: none;
  opacity: 0; transition: opacity .15s;
}
.vol-slider:hover .vol-pct, .vol-slider:focus-within .vol-pct { opacity: 1; }
.volume {
  --val: 80%;
  -webkit-appearance: none; appearance: none; width: 92px; height: 18px; margin: 0; background: transparent; cursor: pointer;
}
.volume:focus { outline: none; }
.volume::-webkit-slider-runnable-track {
  height: 4px; border-radius: 99px; transition: height .15s;
  background: linear-gradient(90deg, var(--accent-top), var(--cyan)) 0 / var(--val) 100% no-repeat, var(--line);
}
.volume::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; border: 0; background: #fff;
  box-shadow: 0 0 0 4px rgba(109, 106, 245, .35), 0 2px 6px rgba(0, 0, 0, .5); transition: transform .15s, box-shadow .15s;
}
.volume:hover::-webkit-slider-runnable-track { height: 6px; }
.volume:hover::-webkit-slider-thumb { margin-top: -4px; transform: scale(1.15); box-shadow: 0 0 0 6px rgba(109, 106, 245, .3), 0 2px 8px rgba(0, 0, 0, .5); }
.volume:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--accent); }
.volume::-moz-range-track { height: 4px; border-radius: 99px; background: var(--line); }
.volume::-moz-range-progress { height: 4px; border-radius: 99px; background: linear-gradient(90deg, var(--accent-top), var(--cyan)); }
.volume::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(109, 106, 245, .35), 0 2px 6px rgba(0, 0, 0, .5); }
.volume:hover::-moz-range-thumb { transform: scale(1.15); }
@media (max-width: 600px) {
  .vol { padding: 4px; }
  .vol-slider { display: none; }
}
