/* ═══════════════════════════════════════════════════════════
   CleanClip 净片工坊 · Design System
   tech-dark / neon-terminal · tokens 见 .design-tmp/design-contract.md
   ═══════════════════════════════════════════════════════════ */

:root {
  --primary: #22d3ee;
  --primary-hover: #06b6d4;
  --primary-dim: rgba(34, 211, 238, .14);
  --accent2: #7c8cf8;

  --bg: #070b14;
  --surface: #0d1320;
  --surface-glass: rgba(13, 19, 32, .72);
  --surface-2: #111a2b;

  --border: rgba(148, 163, 184, .14);
  --border-strong: rgba(148, 163, 184, .26);

  --text: #e6edf6;
  --text-sub: #8b98ab;
  --text-faint: #5b6779;

  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;

  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, "SF Mono", "Courier New", monospace;

  --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-16: 16px;
  --fs-20: 20px; --fs-28: 28px; --fs-40: 40px;

  --r-sm: 8px; --r-md: 12px; --r-lg: 18px;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 8px 32px rgba(0, 0, 0, .45);
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, .6), 0 0 0 1px rgba(34, 211, 238, .12);

  --ease: cubic-bezier(.22, .68, .32, 1);
  --sidebar-w: 400px;
}

/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-16);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
svg { flex-shrink: 0; }
::selection { background: rgba(34, 211, 238, .28); }

/* ── Background FX ────────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow {
  position: fixed; z-index: -2; border-radius: 50%;
  filter: blur(120px); pointer-events: none; opacity: .5;
}
.bg-glow--a { width: 560px; height: 560px; top: -220px; left: 8%; background: radial-gradient(circle, rgba(34, 211, 238, .16), transparent 65%); }
.bg-glow--b { width: 480px; height: 480px; top: 18%; right: -180px; background: radial-gradient(circle, rgba(124, 140, 248, .10), transparent 65%); }

/* ── Layout ───────────────────────────────────────────── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 max(24px, env(safe-area-inset-left, 24px)) 64px max(24px, env(safe-area-inset-right, 24px)); }

.topbar { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(7, 11, 20, .72); border-bottom: 1px solid var(--border); }
.topbar__inner { max-width: 1080px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand__mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #04121a; background: linear-gradient(135deg, var(--primary), #0891b2); box-shadow: 0 0 18px rgba(34, 211, 238, .45); }
.brand__mark svg { width: 18px; height: 18px; }
.brand__name { font-size: var(--fs-16); font-weight: 700; letter-spacing: .2px; display: inline-flex; align-items: baseline; gap: 8px; }
.brand__name em { font-style: normal; font-size: var(--fs-12); font-weight: 500; color: var(--text-sub); letter-spacing: .3em; }

.topbar__actions { display: flex; align-items: center; gap: 14px; }
.net-dot { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-12); color: var(--text-sub); }
.net-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 8px var(--primary); }
.net-dot.is-demo i { background: var(--accent2); box-shadow: 0 0 8px var(--accent2); }
.net-dot.is-proxy i { background: var(--success); box-shadow: 0 0 8px var(--success); }

/* ── Glass card ───────────────────────────────────────── */
.glass {
  background: var(--surface-glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

/* ── Hero ─────────────────────────────────────────────── */
.hero { padding: 72px 0 8px; text-align: center; }
.hero__title { font-size: clamp(32px, 6vw, var(--fs-40)); font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; }
.hero__title em { font-style: normal; background: linear-gradient(100deg, var(--primary) 20%, #7dd3fc 80%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 32px rgba(34, 211, 238, .3); }
.hero__sub { margin-top: 12px; color: var(--text-sub); font-size: var(--fs-14); letter-spacing: .4px; }

/* ── Composer (input card) ────────────────────────────── */
.composer { margin: 32px auto 0; max-width: 760px; padding: 6px 6px 6px 18px; text-align: left; position: relative; transition: border-color .25s var(--ease), box-shadow .25s var(--ease); }
.composer:focus-within { border-color: rgba(34, 211, 238, .45); box-shadow: var(--shadow-card), 0 0 0 3px rgba(34, 211, 238, .08), 0 0 34px rgba(34, 211, 238, .08); }

.composer__top { display: flex; align-items: center; gap: 7px; padding: 10px 0 0; color: var(--primary); font-size: var(--fs-13); font-weight: 600; }
.composer__top svg { width: 15px; height: 15px; }
.composer__top #platformDetectText b { color: var(--text); }

.composer textarea {
  width: 100%; border: none; outline: none; background: transparent; resize: vertical;
  font-family: var(--font-mono); font-size: var(--fs-14); line-height: 1.7;
  color: var(--text); padding: 14px 12px 8px; min-height: 84px;
}
.composer textarea::placeholder { color: var(--text-faint); font-family: var(--font-body); }

.composer__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 0; flex-wrap: wrap; }
.composer__hint { font-size: var(--fs-12); color: var(--text-faint); flex: 1; min-width: 200px; }
.composer__btns { display: flex; align-items: center; gap: 8px; }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 20px; border-radius: var(--r-md);
  font-size: var(--fs-14); font-weight: 600; letter-spacing: .2px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
  user-select: none; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(0) scale(.98); }
.btn--sm { height: 32px; padding: 0 14px; font-size: var(--fs-13); border-radius: var(--r-sm); }
.btn--sm svg { width: 14px; height: 14px; }
.btn--lg { height: 48px; padding: 0 28px; font-size: var(--fs-16); }

.btn--primary {
  color: #04121a;
  background: linear-gradient(135deg, #34e0f8, var(--primary) 55%, #0aa8c4);
  box-shadow: 0 4px 18px rgba(34, 211, 238, .28), 0 1px 0 rgba(255, 255, 255, .4) inset;
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(34, 211, 238, .4), 0 1px 0 rgba(255, 255, 255, .4) inset; }
.btn--primary:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--ghost { color: var(--text); background: rgba(148, 163, 184, .07); border: 1px solid var(--border-strong); }
.btn--ghost:hover { border-color: rgba(34, 211, 238, .4); color: var(--primary); background: var(--primary-dim); transform: translateY(-1px); }
.btn--ghost:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn__label::after { content: "…"; }

.icon-btn {
  width: 38px; height: 38px; border-radius: var(--r-sm); display: grid; place-items: center;
  color: var(--text-sub); border: 1px solid transparent;
  transition: color .18s, background .18s, border-color .18s, transform .18s var(--ease);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--primary); background: var(--primary-dim); border-color: rgba(34, 211, 238, .3); }
.icon-btn--sm { width: 32px; height: 32px; }
.icon-btn--sm svg { width: 15px; height: 15px; }
.icon-btn--danger:hover { color: var(--danger); background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .3); }

/* ── Platform pills ───────────────────────────────────── */
.platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 13px; border-radius: 999px;
  font-size: var(--fs-13); font-weight: 500; color: var(--text-sub);
  background: rgba(148, 163, 184, .07); border: 1px solid var(--border);
}
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--pc, var(--primary)); box-shadow: 0 0 7px var(--pc, var(--primary)); }
.pill b { font-weight: 600; color: var(--text); }

.pill--solid { color: var(--text); background: rgba(148, 163, 184, .1); }
.pill--type { color: var(--primary); background: var(--primary-dim); border-color: rgba(34, 211, 238, .3); }
.pill--type svg { width: 13px; height: 13px; }
.pill--type.is-images { color: var(--accent2); background: rgba(124, 140, 248, .13); border-color: rgba(124, 140, 248, .34); }
.pill--src { color: var(--text-sub); font-size: var(--fs-12); border-style: dashed; }

/* ── Result section ────────────────────────────────────── */
.result { margin-top: 40px; }

/* loading / scan */
.scan { display: flex; align-items: center; gap: 28px; padding: 28px 32px; overflow: hidden; }
.scan__visual { flex-shrink: 0; }
.scan__frame { position: relative; width: 76px; height: 76px; border-radius: var(--r-md); display: grid; place-items: center; color: var(--primary); background: var(--primary-dim); border: 1px solid rgba(34, 211, 238, .3); overflow: hidden; }
.scan__frame svg { width: 30px; height: 30px; }
.scan__line { position: absolute; left: 0; right: 0; top: -20%; height: 34%; background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .35)); animation: scanline 1.6s var(--ease) infinite; }
@keyframes scanline { 0% { top: -40%; } 100% { top: 110%; } }
.scan__body { flex: 1; min-width: 0; }
.scan__text { font-size: var(--fs-16); font-weight: 600; }
.scan__steps { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-12); color: var(--text-faint); }
.scan__steps span.is-active { color: var(--primary); }
.scan__steps span.is-done { color: var(--success); }
.scan__steps i { width: 14px; height: 1px; background: var(--border-strong); }

/* error notice */
.notice { display: flex; gap: 16px; padding: 22px 26px; align-items: flex-start; }
.notice--danger { border-color: rgba(248, 113, 113, .32); background: rgba(248, 113, 113, .05); }
.notice__icon { color: var(--danger); padding-top: 2px; }
.notice__icon svg { width: 21px; height: 21px; }
.notice__body strong { font-size: var(--fs-16); }
.notice__body p { color: var(--text-sub); font-size: var(--fs-13); margin-top: 6px; }
.notice__actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* result card */
.result-card { margin-top: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 0; overflow: hidden; animation: rise .5s var(--ease) both; }
.result-card__media { background: #04070d; min-height: 320px; display: grid; place-items: center; position: relative; border-right: 1px solid var(--border); }
.result-card__side { padding: 26px 28px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }

.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.result-card__title { font-size: var(--fs-20); font-weight: 700; line-height: 1.45; letter-spacing: .1px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result-card__author { color: var(--text-sub); font-size: var(--fs-13); }

.quality-list { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(148, 163, 184, .05); border: 1px dashed var(--border); }
.quality-list li { display: flex; align-items: center; gap: 9px; font-size: var(--fs-13); color: var(--text-sub); }
.quality-list svg { width: 15px; height: 15px; color: var(--success); }

.result-actions { display: flex; gap: 10px; flex-wrap: wrap; width: 100%; margin-top: 2px; }
.fallback-tip { font-size: var(--fs-12); color: var(--warning); line-height: 1.7; }

/* video */
.video-wrap { width: 100%; height: 100%; display: grid; place-items: center; padding: 18px; }
.video-wrap video { width: 100%; max-height: 72vh; border-radius: var(--r-md); background: #000; outline: none; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }

/* gallery */
.gallery { width: 100%; height: 100%; display: flex; flex-direction: column; padding: 18px; gap: 14px; }
.gallery__stage { position: relative; flex: 1; min-height: 280px; display: grid; place-items: center; }
.gallery__stage img { max-height: 60vh; max-width: 100%; border-radius: var(--r-md); object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); user-select: none; }
.gallery__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: rgba(7, 11, 20, .72); border: 1px solid var(--border-strong); backdrop-filter: blur(6px); transition: background .18s, border-color .18s; }
.gallery__nav:hover { background: rgba(34, 211, 238, .18); border-color: rgba(34, 211, 238, .45); }
.gallery__nav svg { width: 17px; height: 17px; }
.gallery__nav--prev { left: 6px; }
.gallery__nav--next { right: 6px; }
.gallery__count { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: var(--fs-12); color: var(--text); background: rgba(7, 11, 20, .72); border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px; backdrop-filter: blur(6px); }
.gallery__thumbs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.gallery__thumbs button { width: 52px; height: 52px; border-radius: var(--r-sm); overflow: hidden; border: 2px solid transparent; opacity: .55; transition: opacity .18s, border-color .18s, transform .18s var(--ease); padding: 0; }
.gallery__thumbs button:hover { opacity: .95; transform: translateY(-2px); }
.gallery__thumbs button.is-active { opacity: 1; border-color: var(--primary); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* download progress inside button */
.btn .btn__prog { font-family: var(--font-mono); font-size: var(--fs-12); opacity: .85; }

/* ── History ──────────────────────────────────────────── */
.history { margin-top: 72px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-20); font-weight: 700; }
.section-head h2 svg { width: 20px; height: 20px; color: var(--primary); }
.count-chip { font-family: var(--font-mono); font-size: var(--fs-12); font-weight: 500; color: var(--primary); background: var(--primary-dim); border: 1px solid rgba(34, 211, 238, .3); border-radius: 999px; padding: 1px 10px; }

.history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.hcard { overflow: hidden; cursor: pointer; transition: transform .2s var(--ease), border-color .2s; animation: rise .4s var(--ease) both; }
.hcard:hover { transform: translateY(-3px); border-color: rgba(34, 211, 238, .35); }
.hcard__cover { position: relative; aspect-ratio: 4 / 3; background: #04070d; overflow: hidden; }
.hcard__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.hcard:hover .hcard__cover img { transform: scale(1.04); }
.hcard__type { position: absolute; top: 10px; left: 10px; width: 28px; height: 28px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--text); background: rgba(7, 11, 20, .72); border: 1px solid var(--border-strong); backdrop-filter: blur(6px); }
.hcard__type svg { width: 14px; height: 14px; }
.hcard__ops { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; }
.hcard:hover .hcard__ops, .hcard:focus-within .hcard__ops { opacity: 1; }
.hcard__ops .icon-btn { width: 30px; height: 30px; background: rgba(7, 11, 20, .78); border: 1px solid var(--border-strong); backdrop-filter: blur(6px); }
.hcard__ops .icon-btn svg { width: 14px; height: 14px; }
.hcard__body { padding: 13px 14px 14px; }
.hcard__title { font-size: var(--fs-13); font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.hcard__meta { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hcard__meta .pill { height: 24px; padding: 0 10px; font-size: var(--fs-12); border-radius: 999px; }
.hcard__time { font-size: var(--fs-12); color: var(--text-faint); font-family: var(--font-mono); }

/* empty state */
.empty-state { grid-column: 1 / -1; border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); padding: 44px 20px; text-align: center; color: var(--text-faint); }
.empty-state svg { width: 34px; height: 34px; margin: 0 auto 12px; display: block; opacity: .8; }
.empty-state p { font-size: var(--fs-13); line-height: 1.8; }
.empty-state b { color: var(--text-sub); }

/* ── How it works ─────────────────────────────────────── */
.how { margin-top: 72px; }
.how__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how__item { padding: 22px; position: relative; overflow: hidden; }
.how__no { font-family: var(--font-mono); font-size: 26px; font-weight: 700; color: transparent; -webkit-text-stroke: 1px rgba(34, 211, 238, .5); letter-spacing: 1px; }
.how__item h3 { margin-top: 10px; font-size: var(--fs-16); font-weight: 700; }
.how__item p { margin-top: 7px; font-size: var(--fs-13); color: var(--text-sub); line-height: 1.75; }
.legal { margin-top: 18px; padding: 15px 20px; display: flex; gap: 12px; align-items: flex-start; }
.legal svg { width: 17px; height: 17px; color: var(--warning); flex-shrink: 0; margin-top: 3px; }
.legal p { font-size: var(--fs-12); color: var(--text-sub); line-height: 1.8; }

/* ── Footer ────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 26px 24px calc(34px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.footer p { font-size: var(--fs-12); color: var(--text-faint); letter-spacing: .3px; }

/* ── Drawer (settings) ────────────────────────────────── */
.drawer-mask { position: fixed; inset: 0; z-index: 90; background: rgba(4, 7, 13, .6); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.drawer-mask.is-open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95; width: min(var(--sidebar-w), 100vw);
  background: var(--surface); border-left: 1px solid var(--border);
  transform: translateX(102%); transition: transform .32s var(--ease);
  display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0, 0, 0, .5);
}
.drawer.is-open { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.drawer__head h2 { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-16); font-weight: 700; }
.drawer__head h2 svg { width: 17px; height: 17px; color: var(--primary); }
.drawer__body { flex: 1; overflow-y: auto; padding: 20px 22px 40px; display: flex; flex-direction: column; gap: 22px; }

.opt { display: flex; gap: 14px; align-items: flex-start; padding: 15px 16px; border-radius: var(--r-md); background: rgba(148, 163, 184, .05); border: 1px solid var(--border); }
.opt--col { flex-direction: column; gap: 13px; }
.opt__row { display: flex; gap: 14px; align-items: flex-start; }
.opt__text strong { font-size: var(--fs-14); display: block; }
.opt__text p { font-size: var(--fs-12); color: var(--text-sub); margin-top: 4px; line-height: 1.7; }
.opt__text code { font-family: var(--font-mono); font-size: 11px; color: var(--primary); background: var(--primary-dim); padding: 1px 6px; border-radius: 4px; }
.opt__field label { display: block; font-size: var(--fs-12); color: var(--text-sub); margin-bottom: 7px; }
.input-mono { width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: rgba(7, 11, 20, .6); color: var(--text); font-family: var(--font-mono); font-size: var(--fs-13); outline: none; transition: border-color .18s, box-shadow .18s; }
.input-mono:focus { border-color: rgba(34, 211, 238, .5); box-shadow: 0 0 0 3px rgba(34, 211, 238, .1); }
.input-mono::placeholder { color: var(--text-faint); }

/* switch */
.switch { position: relative; display: inline-block; flex-shrink: 0; width: 40px; height: 22px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; z-index: 2; margin: 0; }
.switch__track { position: absolute; inset: 0; border-radius: 999px; background: rgba(148, 163, 184, .22); border: 1px solid var(--border-strong); transition: background .2s, border-color .2s; }
.switch__track i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #cbd5e1; transition: transform .22s var(--ease), background .2s; }
.switch input:checked + .switch__track { background: rgba(34, 211, 238, .32); border-color: rgba(34, 211, 238, .55); }
.switch input:checked + .switch__track i { transform: translateX(18px); background: var(--primary); box-shadow: 0 0 8px rgba(34, 211, 238, .7); }

/* api list */
.opt-block { padding: 15px 16px; border-radius: var(--r-md); background: rgba(148, 163, 184, .04); border: 1px solid var(--border); }
.opt-block > header strong { font-size: var(--fs-14); }
.opt-block > header p { font-size: var(--fs-12); color: var(--text-sub); margin-top: 5px; line-height: 1.75; }
.opt-block > header code { font-family: var(--font-mono); font-size: 11px; color: var(--primary); background: var(--primary-dim); padding: 1px 5px; border-radius: 4px; }
.api-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.api-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: var(--r-sm); border: 1px solid var(--border); background: rgba(7, 11, 20, .5); }
.api-item__main { flex: 1; min-width: 0; }
.api-item__name { font-size: var(--fs-13); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.api-item__name .tag-off { font-size: 10px; color: var(--text-faint); border: 1px solid var(--border-strong); border-radius: 4px; padding: 0 5px; font-weight: 500; }
.api-item__url { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.api-add { margin-top: 12px; display: flex; gap: 8px; }
.api-add .input-mono { flex: 1; }
.api-empty { font-size: var(--fs-12); color: var(--text-faint); padding: 4px 2px; }

/* ── Toast ─────────────────────────────────────────────── */
.toast-wrap { position: fixed; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; padding: 0 16px; max-width: 100vw; }
.toast {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px;
  border-radius: 999px; font-size: var(--fs-13); font-weight: 500; color: var(--text);
  background: rgba(13, 19, 32, .92); border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px); box-shadow: 0 10px 36px rgba(0, 0, 0, .55);
  animation: toastIn .3s var(--ease) both; max-width: min(92vw, 560px);
}
.toast.is-leaving { animation: toastOut .28s var(--ease) both; }
.toast svg { width: 15px; height: 15px; flex-shrink: 0; }
.toast--success svg { color: var(--success); }
.toast--warn svg { color: var(--warning); }
.toast--error svg { color: var(--danger); }
.toast--info svg { color: var(--primary); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.97); } }

/* ── Reveal animation ─────────────────────────────────── */
.reveal { animation: rise .6s var(--ease) both; animation-delay: calc(var(--d, 0) * .07s + .08s); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* spinner */
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(4, 18, 26, .3); border-top-color: #04121a; animation: spin .7s linear infinite; }
.spinner--light { border-color: rgba(34, 211, 238, .25); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .18); border-radius: 999px; border: 2.5px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(34, 211, 238, .35); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .result-card { grid-template-columns: 1fr; }
  .result-card__media { border-right: none; border-bottom: 1px solid var(--border); }
}
@media (max-width: 768px) {
  .container { padding: 0 16px 48px; }
  .hero { padding-top: 48px; }
  .how__grid { grid-template-columns: 1fr; }
  .scan { flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px; }
  .composer { padding: 4px 4px 4px 14px; }
  .composer__bar { flex-direction: column; align-items: stretch; }
  .composer__btns { justify-content: flex-end; }
  .btn--primary { flex: 1; }
  .drawer { width: 100vw; }
  .history-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .net-dot b { display: none; }
}
@media (max-width: 480px) {
  .hero__sub { font-size: var(--fs-13); }
  .platforms { gap: 7px; }
  .pill { height: 27px; font-size: var(--fs-12); padding: 0 11px; }
  .result-card__side { padding: 20px 18px; }
  .gallery__thumbs button { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .scan__line { animation: none; }
}
