/* Fast Europe — glass & smoke theme */
:root {
  --bg: #050a18;
  --glass: rgba(14, 24, 54, .52);
  --glass-strong: rgba(10, 18, 42, .82);
  --field: rgba(6, 12, 30, .55);
  --line: rgba(140, 170, 255, .14);
  --line-2: rgba(140, 170, 255, .26);
  --text: #eef2ff;
  --muted: #95a3cc;
  --blue: #2f6bff;
  --blue2: #5b8cff;
  --gold: #ffcc00;
  --gold2: #ffb300;
  --green: #2bd576;
  --red: #ff5a67;
  --orange: #ffab2e;
  --radius: 16px;
  --blur: 18px;
  --ease: cubic-bezier(.2, .75, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; color: var(--text); font-size: 14px; }
html { background: var(--bg); }
body { background: transparent; min-height: 100vh; min-height: 100dvh; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--blue2); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace; font-size: 12.5px; }
::selection { background: rgba(47, 107, 255, .45); }

/* ---------- smoke background ---------- */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(120% 80% at 10% -10%, rgba(47, 107, 255, .28), transparent 60%),
    radial-gradient(90% 70% at 110% 110%, rgba(255, 179, 0, .10), transparent 60%),
    var(--bg);
}
.smoke {
  position: absolute; width: 75vmax; height: 75vmax; border-radius: 50%;
  will-change: transform; transform: translate3d(0, 0, 0);
  animation: drift 42s ease-in-out infinite alternate;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.s1 { left: -20vmax; top: -25vmax; background: radial-gradient(closest-side, rgba(80, 120, 255, .30), rgba(80, 120, 255, .12) 45%, transparent 100%); }
.s2 { right: -30vmax; top: 5vmax; background: radial-gradient(closest-side, rgba(190, 205, 255, .13), rgba(190, 205, 255, .05) 50%, transparent 100%); animation-duration: 55s; animation-delay: -12s; }
.s3 { left: 10vmax; bottom: -40vmax; background: radial-gradient(closest-side, rgba(40, 80, 220, .26), rgba(40, 80, 220, .08) 50%, transparent 100%); animation-duration: 48s; animation-delay: -20s; }
.s4 { right: -10vmax; bottom: -35vmax; background: radial-gradient(closest-side, rgba(255, 190, 40, .10), rgba(255, 190, 40, .03) 50%, transparent 100%); animation-duration: 60s; animation-delay: -30s; }
.s5 { left: 30vmax; top: -10vmax; width: 55vmax; height: 55vmax; background: radial-gradient(closest-side, rgba(220, 230, 255, .08), transparent 100%); animation: drift2 70s ease-in-out infinite alternate; }
.grain {
  position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  50% { transform: translate3d(8vmax, 6vmax, 0) scale(1.15) rotate(25deg); }
  100% { transform: translate3d(-6vmax, 10vmax, 0) scale(.95) rotate(-15deg); }
}
@keyframes drift2 {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: .6; }
  100% { transform: translate3d(-20vmax, 25vmax, 0) scale(1.4); opacity: 1; }
}

/* ---------- glass surfaces ---------- */
.card, .stat, .tbl-wrap, .side, .modal, .toast, .mbar {
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 20px 50px -20px rgba(0, 0, 0, .55);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .card, .stat, .tbl-wrap, .side, .modal, .toast, .mbar { background: var(--glass-strong); }
}

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side {
  border-width: 0 1px 0 0; border-radius: 0; padding: 22px 14px; position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 3px; overflow-y: auto; z-index: 40;
  background: rgba(8, 15, 36, .55);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 22px; }
.brand-logo { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 6px 18px rgba(47, 107, 255, .45)); }
.brand-logo .stars { transform-origin: 32px 32px; animation: spin 40s linear infinite; }
.brand-logo .bolt { animation: bolt 3.2s ease-in-out infinite; transform-origin: 32px 32px; }
.brand-name { font-family: Sora, Inter, sans-serif; font-weight: 800; font-size: 19px; letter-spacing: -.01em; line-height: 1.05; white-space: nowrap; }
.brand-name span {
  background: linear-gradient(90deg, var(--gold), #fff1a8, var(--gold2), var(--gold));
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s linear infinite;
}
.brand-tag { color: var(--muted); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; margin-top: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bolt { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes shimmer { to { background-position: -250% 0; } }

.nav a {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 500;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.nav a:hover { background: rgba(120, 150, 255, .09); color: var(--text); transform: translateX(2px); }
.nav a.on { color: #fff; background: linear-gradient(135deg, rgba(47, 107, 255, .85), rgba(47, 107, 255, .45)); box-shadow: 0 8px 24px -10px rgba(47, 107, 255, .9); }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 22%; bottom: 22%; width: 3px; border-radius: 3px; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.nav svg { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; padding: 14px 12px 4px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }
.side-foot b { color: var(--text); }
.main { padding: 28px 34px 70px; min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.top h1 { margin: 0; font-family: Sora, Inter, sans-serif; font-size: 24px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.top .sub { color: var(--muted); margin-top: 5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }

/* mobile bar + scrim */
.mbar { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(2, 5, 14, .55); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.scrim.on { opacity: 1; pointer-events: auto; }

/* ---------- page entrance animation ---------- */
.enter > * { animation: rise .55s var(--ease) both; }
.enter > *:nth-child(2) { animation-delay: .05s; }
.enter > *:nth-child(3) { animation-delay: .1s; }
.enter > *:nth-child(4) { animation-delay: .15s; }
.enter > *:nth-child(n+5) { animation-delay: .2s; }
.enter .stats > * { animation: rise .55s var(--ease) both; }
.enter .stats > *:nth-child(1) { animation-delay: .06s; } .enter .stats > *:nth-child(2) { animation-delay: .11s; }
.enter .stats > *:nth-child(3) { animation-delay: .16s; } .enter .stats > *:nth-child(4) { animation-delay: .21s; }
.enter .stats > *:nth-child(5) { animation-delay: .26s; } .enter .stats > *:nth-child(6) { animation-delay: .31s; }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- cards / stats ---------- */
.card { border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 14px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
  border-radius: var(--radius); padding: 18px 18px 16px; position: relative; overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.stat:hover { transform: translateY(-3px); border-color: var(--line-2); }
.stat::after { content: ''; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(closest-side, var(--c, rgba(47, 107, 255, .3)), transparent); opacity: .22; pointer-events: none; }
.stat .k { color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.stat .v { font-family: Sora, Inter, sans-serif; font-size: 30px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.stat.gold { background: linear-gradient(135deg, rgba(47, 107, 255, .35), rgba(14, 24, 54, .5)); border-color: rgba(255, 204, 0, .25); }
.stat.gold .v { color: var(--gold); text-shadow: 0 0 24px rgba(255, 204, 0, .35); }
.stat .bar { position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.grid2 > * { min-width: 0; }
.mini { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 8px; margin: 0 -8px; border-bottom: 1px solid var(--line); color: var(--text); border-radius: 10px; transition: background .2s; }
.mini:hover { background: rgba(120, 150, 255, .07); }
.mini:last-child { border-bottom: 0; }
.mini > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini > span:last-child { flex: none; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; background: rgba(6, 12, 30, .35); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .2s; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: rgba(120, 150, 255, .08); }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 2px; color: var(--muted); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.b-active { background: rgba(43, 213, 118, .12); color: var(--green); border-color: rgba(43, 213, 118, .25); }
.b-active::before { animation: pulse 2.2s ease-in-out infinite; }
.b-expired { background: rgba(255, 90, 103, .12); color: var(--red); border-color: rgba(255, 90, 103, .25); }
.b-disabled { background: rgba(149, 163, 204, .12); color: var(--muted); border-color: rgba(149, 163, 204, .2); }
.b-soon { background: rgba(255, 171, 46, .13); color: var(--orange); border-color: rgba(255, 171, 46, .28); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.tag { display: inline-block; padding: 2px 7px; border-radius: 6px; background: rgba(120, 150, 255, .1); border: 1px solid var(--line); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; vertical-align: middle; }
.tag.m3u { color: #8fb0ff; } .tag.mag { color: #f3b0ff; } .tag.enigma { color: #86ecd9; }

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 9px 16px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(120, 150, 255, .08); cursor: pointer; font-weight: 600; white-space: nowrap; color: var(--text);
  transition: transform .2s var(--ease), background .25s, border-color .25s, box-shadow .25s;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: rgba(140, 170, 255, .45); background: rgba(120, 150, 255, .14); }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, #3d78ff, #1e4fd8); border-color: rgba(120, 160, 255, .5); color: #fff; box-shadow: 0 10px 26px -12px rgba(47, 107, 255, .95); }
.btn.gold { background: linear-gradient(135deg, #ffd84a, #ffb300); border-color: rgba(255, 220, 110, .7); color: #0a1636; box-shadow: 0 10px 26px -12px rgba(255, 190, 0, .9); }
.btn.primary::after, .btn.gold::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); transition: left .6s var(--ease);
}
.btn.primary:hover::after, .btn.gold:hover::after { left: 130%; }
.btn.danger { color: #ffc2c7; border-color: rgba(255, 90, 103, .35); background: rgba(255, 90, 103, .1); }
.btn.danger:hover { background: rgba(255, 90, 103, .18); }
.btn.sm { min-height: 32px; padding: 5px 11px; font-size: 12.5px; border-radius: 9px; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.icon { padding: 0; width: 40px; flex: none; }
.btn.icon svg { width: 20px; height: 20px; }

/* ---------- forms ---------- */
input, select, textarea {
  width: 100%; min-height: 42px; background-color: var(--field); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 13px; outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s; -webkit-appearance: none; appearance: none;
}
select {
  padding-right: 34px; background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2395a3cc' stroke-width='1.6'/%3E%3C/svg%3E");
}
select option { background: #0c1530; color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--blue2); box-shadow: 0 0 0 4px rgba(47, 107, 255, .18); background-color: rgba(6, 12, 30, .75); }
input::placeholder, textarea::placeholder { color: rgba(149, 163, 204, .6); }
textarea { min-height: 90px; resize: vertical; }
label.f { display: block; }
label.f > span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 7px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fgrid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 32px; }
.check input { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--blue); -webkit-appearance: checkbox; appearance: auto; flex: none; }
.hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.seg { display: inline-flex; background: var(--field); border: 1px solid var(--line-2); border-radius: 12px; padding: 3px; max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: none; padding: 8px 16px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--muted); transition: background .25s var(--ease), color .25s; white-space: nowrap; }
.seg button.on { background: linear-gradient(135deg, #3d78ff, #1e4fd8); color: #fff; box-shadow: 0 6px 18px -8px rgba(47, 107, 255, .9); }
.search { max-width: 340px; }
.filters select { width: auto; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(2, 5, 14, .6); display: grid; place-items: center; z-index: 60; padding: 16px; animation: fade .25s var(--ease) both; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .modal-bg { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); background: rgba(2, 5, 14, .4); }
}
.modal { border-radius: 20px; width: min(640px, 100%); max-height: 92vh; max-height: 92dvh; overflow: auto; overscroll-behavior: contain; background: rgba(14, 24, 54, .8); animation: pop .35s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translate3d(0, 12px, 0) scale(.97); } to { opacity: 1; transform: none; } }
.modal header { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal header h2 { margin: 0; font-family: Sora, Inter, sans-serif; font-size: 17px; font-weight: 700; }
.modal .body { padding: 20px 22px; }
.modal footer { padding: 14px 22px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.x { background: none; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; width: 36px; height: 36px; border-radius: 10px; transition: background .2s, color .2s; }
.x:hover { background: rgba(120, 150, 255, .12); color: var(--text); }

/* ---------- detail ---------- */
.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); }
.kv > div { padding: 11px 0; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.kv > div:nth-child(odd) { color: var(--muted); }
.copy { display: flex; gap: 10px; align-items: center; background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 8px 12px; margin-bottom: 8px; transition: border-color .2s; }
.copy:hover { border-color: var(--line-2); }
.copy .lbl { color: var(--muted); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; min-width: 104px; }
.copy code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; border: 1px solid; line-height: 1.5; }
.alert.warn { background: rgba(255, 171, 46, .08); border-color: rgba(255, 171, 46, .3); color: #ffd699; }
.alert.err { background: rgba(255, 90, 103, .08); border-color: rgba(255, 90, 103, .3); color: #ffb1b8; }
.alert.info { background: rgba(47, 107, 255, .1); border-color: rgba(91, 140, 255, .3); color: #c3d4ff; }
.pos { color: var(--green); } .neg { color: var(--red); }
.section-title { font-family: Sora, Inter, sans-serif; font-size: 16px; margin: 0 0 12px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px calc(24px + var(--safe-b)); }
.auth .card { width: min(420px, 100%); padding: 34px 30px 30px; border-radius: 24px; animation: pop .6s var(--ease) both; background: rgba(14, 24, 54, .45); }
.auth .brand { flex-direction: column; text-align: center; gap: 14px; padding-bottom: 26px; }
.auth .brand-logo { width: 72px; height: 72px; }
.auth .brand-name { font-size: 32px; }
.auth .brand-tag { font-size: 11px; }
.auth .btn { width: 100%; min-height: 46px; font-size: 15px; }
.stack > * + * { margin-top: 14px; }

/* ---------- toasts ---------- */
#toasts { position: fixed; right: 18px; bottom: calc(18px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; z-index: 90; pointer-events: none; }
.toast { pointer-events: auto; border-left: 3px solid var(--blue); padding: 12px 15px; border-radius: 12px; max-width: 380px; background: rgba(14, 24, 54, .85); animation: toastIn .4s var(--ease) both; }
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }
.toast.out { animation: toastOut .3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translate3d(24px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translate3d(24px, 0, 0); } }
.spin { width: 22px; height: 22px; border: 2px solid rgba(140, 170, 255, .2); border-top-color: var(--gold); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.loading { padding: 60px; display: grid; place-items: center; }

/* ---------- tablet & mobile ---------- */
@media (max-width: 1100px) {
  .main { padding: 24px 22px 60px; }
}
@media (max-width: 900px) {
  :root { --blur: 12px; }
  .shell { grid-template-columns: 1fr; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 84vw); height: auto;
    transform: translate3d(-105%, 0, 0); transition: transform .35s var(--ease);
    border-radius: 0 20px 20px 0; padding-top: calc(22px + var(--safe-t)); padding-bottom: calc(14px + var(--safe-b));
    background: rgba(8, 15, 36, .85);
  }
  .side.open { transform: none; box-shadow: 30px 0 60px rgba(0, 0, 0, .5); }
  .mbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30;
    padding: calc(10px + var(--safe-t)) 14px 10px; border-width: 0 0 1px 0; border-radius: 0; background: rgba(8, 15, 36, .6);
  }
  .mbar .brand { padding: 0; gap: 9px; }
  .mbar .brand-logo { width: 32px; height: 32px; }
  .mbar .brand-name { font-size: 16px; }
  .mbar .brand-tag { display: none; }
  .mbar .credits-pill { margin-left: auto; }
  .main { padding: 18px 16px calc(60px + var(--safe-b)); }
  .top h1 { font-size: 20px; }
  .top > .row:last-child { width: 100%; }
  .top > .row:last-child .btn { flex: 1 1 auto; }
  .grid2, .fgrid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat .v { font-size: 24px; }
  .kv { grid-template-columns: 1fr; }
  .kv > div:nth-child(odd) { padding-bottom: 0; border: 0; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
  .search { max-width: none; flex: 1 1 100%; }
  .filters select { flex: 1 1 30%; }
  .copy { flex-wrap: wrap; }
  .copy .lbl { min-width: 0; width: 100%; }
  /* 16px inputs stop iOS Safari from zooming on focus */
  input, select, textarea { font-size: 16px; }
  /* bottom-sheet modals */
  .modal-bg { place-items: end center; padding: 0; }
  .modal { width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 22px 22px 0 0; border-bottom: 0; animation: sheet .4s var(--ease) both; }
  .modal footer .btn { flex: 1; }
  #toasts { left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); }
  .toast { max-width: none; }
  /* lighter smoke on phones */
  .s4, .s5 { display: none; }
  .smoke { animation-duration: 70s; }
}
@keyframes sheet { from { transform: translate3d(0, 100%, 0); } to { transform: none; } }
@media (max-width: 340px) {
  .stats { grid-template-columns: 1fr; }
  .auth .card { padding: 26px 20px; }
}
@media (hover: none) {
  .stat:hover, .nav a:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .smoke { animation: none !important; }
}
