/* Ledger: Portfolio Viewer — self-contained dark theme.
   Brand facts (verified 2026-06 from ledger.com / Ledger Live research):
   pure-black canvas #000, #1A1A1A panels, white primary buttons (Ledger Live
   style), Ledger orange #FF5300 accent, Inter type. */

:root {
  --bg:        #000000;
  --bg-soft:   #0B0B0C;
  --panel:     #131315;
  --panel-2:   #1A1A1C;
  --elevated:  #232326;
  --line:      #26262A;
  --line-soft: #1E1E22;
  --text:      #FFFFFF;
  --muted:     #9C9CA3;
  --muted-2:   #64646B;

  --accent:    #FF5300;            /* Ledger orange */
  --accent-soft: rgba(255, 83, 0, .12);
  --cta:       #FFFFFF;            /* Ledger Live primary buttons: white on black */
  --on-cta:    #000000;

  --green:     #2FD089;
  --red:       #FF4E6A;

  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 10px 32px rgba(0, 0, 0, .55);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'SF Mono', 'Roboto Mono', ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font: 13px/1.45 var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'tnum' 1, 'cv09' 1;
}

body.popup { width: 400px; height: 600px; overflow: hidden; }
body.full { min-height: 100vh; }

button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }

/* ---------- app shell ---------- */
.app {
  display: flex; flex-direction: column;
  height: 600px;
  background:
    radial-gradient(1200px 420px at 50% -260px, rgba(255, 83, 0, .07), transparent 60%),
    var(--bg);
}
.app.wide {
  height: 100vh; max-width: 860px; margin: 0 auto;
  padding: 0 20px;
}
.spacer { flex: 1; }

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 14px 10px;
}
.app.wide .topbar { padding: 22px 0 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { border-radius: 8px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text .name { font-weight: 700; font-size: 14px; letter-spacing: -.2px; }
.brand-text .sub { font-size: 10.5px; color: var(--muted); }

.readonly-pill {
  font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(255, 83, 0, .35);
  padding: 3px 8px; border-radius: 999px;
}

.icon-btn {
  width: 30px; height: 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--muted); transition: color .15s, background .15s, border-color .15s;
}
.icon-btn:hover { color: var(--text); background: var(--elevated); border-color: var(--line); }
.icon-btn.danger:hover { color: var(--red); border-color: rgba(255, 78, 106, .4); }
.icon-btn svg { width: 15px; height: 15px; }

/* ---------- wallet chips ---------- */
.chips {
  display: flex; gap: 6px; align-items: center;
  padding: 2px 14px 10px; overflow-x: auto; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.app.wide .chips { padding: 2px 0 10px; }
.chips:empty { display: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--muted); font-weight: 600; font-size: 12px;
  transition: all .15s;
}
.chip:hover { color: var(--text); background: var(--elevated); }
.chip.on { background: var(--cta); border-color: var(--cta); color: var(--on-cta); }
.chip-add { color: var(--accent); border-style: dashed; border-color: rgba(255, 83, 0, .45); background: transparent; }
.chip-add:hover { background: var(--accent-soft); color: var(--accent); }
.chip-add svg { width: 12px; height: 12px; }
.chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- content ---------- */
.content {
  flex: 1; overflow-y: auto; padding: 0 14px 16px;
  scrollbar-width: thin; scrollbar-color: var(--elevated) transparent;
}
.app.wide .content { padding: 0 0 24px; }
.content::-webkit-scrollbar { width: 8px; }
.content::-webkit-scrollbar-thumb { background: var(--elevated); border-radius: 8px; }

/* ---------- hero (no wallets yet) ---------- */
.hero { text-align: center; padding: 34px 18px 22px; }
.hero-mark {
  width: 92px; height: 92px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #1A1A1C, #0C0C0D 70%);
  border: 1px solid var(--line); border-radius: 26px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 18px 44px rgba(255, 83, 0, .10);
}
.hero h2 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.4px; }
.hero p { margin: 0 auto 20px; max-width: 340px; color: var(--muted); font-size: 12.5px; }
.hero-actions { display: flex; gap: 8px; justify-content: center; margin-bottom: 22px; }
.hero-trust { display: flex; gap: 14px; justify-content: center; color: var(--muted-2); font-size: 11px; }
.hero-trust span { display: inline-flex; align-items: center; gap: 5px; }
.hero-trust svg { width: 13px; height: 13px; color: var(--accent); }
.hero-trust b { font-weight: 600; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 11px; font-weight: 700; font-size: 12.5px;
  border: 1px solid transparent; transition: all .15s;
}
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: var(--cta); color: var(--on-cta); }
.btn-primary:hover { background: #E9E9E9; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--panel-2); }
.btn-danger { background: rgba(255, 78, 106, .14); border-color: rgba(255, 78, 106, .4); color: var(--red); }
.btn-danger:hover { background: rgba(255, 78, 106, .22); }

/* ---------- summary ---------- */
.summary { padding: 14px 2px 12px; }
.sum-label { font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted-2); }
.sum-total {
  font-size: 34px; font-weight: 800; letter-spacing: -1.2px;
  margin: 4px 0 8px; font-variant-numeric: tabular-nums;
  transition: opacity .2s;
}
.sum-total.dim { opacity: .55; }
.sum-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--line);
  padding: 4px 9px; border-radius: 999px;
}
.pill-btn { transition: all .15s; position: relative; }
.pill-btn:hover { color: var(--text); background: var(--elevated); }
.pill-btn svg { width: 11px; height: 11px; }
.pill-addr { font-family: var(--mono); font-size: 10.5px; }
.pill-ens { color: var(--accent); border-color: rgba(255, 83, 0, .35); background: var(--accent-soft); }

.copied-tag {
  display: none; color: var(--green); font-weight: 700;
}
.copy-btn.copied .copied-tag { display: inline; }
.copy-btn.copied svg, .copy-btn.copied .pill-addr { display: none; }

.upd { display: inline-flex; align-items: center; gap: 5px; color: var(--muted-2); font-size: 11px; }
.upd.busy { color: var(--accent); }
.upd svg { width: 11px; height: 11px; }
.spin { animation: rot 1s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* wallet head */
.whead-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.whead-label { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }

/* ---------- tabs ---------- */
.tabs {
  display: flex; gap: 4px; padding: 0 14px 10px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.app.wide .tabs { padding: 0 0 10px; }
.tab {
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 12px; border-radius: 10px; white-space: nowrap;
  background: transparent; border: 1px solid transparent;
  color: var(--muted-2); font-weight: 600; font-size: 11.5px;
  transition: all .15s;
}
.tab b { font-size: 10px; font-weight: 600; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.tab:hover { color: var(--text); background: var(--panel-2); }
.tab.on { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.tab.on b { color: var(--accent); }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 12px; margin-bottom: 10px;
}
.card-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 10px;
}
.card-title svg { width: 13px; height: 13px; color: var(--accent); }

/* ---------- allocation ---------- */
.alloc-bar {
  display: flex; height: 10px; border-radius: 999px; overflow: hidden;
  background: var(--bg-soft); margin-bottom: 10px; gap: 2px;
}
.alloc-bar i { display: block; height: 100%; border-radius: 2px; min-width: 3px; }
.alloc-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 4px; }
.alloc-key {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--muted);
}
.alloc-key i { width: 8px; height: 8px; border-radius: 3px; }
.alloc-key b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.alloc-key em { font-style: normal; color: var(--muted-2); font-variant-numeric: tabular-nums; }

.tt-title { margin-top: 14px; }
.tt-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; font-size: 12px;
}
.tt-sym { font-weight: 700; width: 52px; flex-shrink: 0; }
.tt-bar {
  flex: 1; height: 6px; background: var(--bg-soft);
  border-radius: 999px; overflow: hidden;
}
.tt-bar i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #FF8A50); }
.tt-pct { width: 38px; text-align: right; color: var(--muted-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.tt-usd { width: 74px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- wallet cards ---------- */
.wcards { background: none; border: none; padding: 0; }
.wcards .card-title { padding: 0 2px; }
.wcard {
  width: 100%; display: flex; align-items: center; gap: 10px;
  text-align: left; padding: 11px 12px; margin-bottom: 8px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  transition: border-color .15s, transform .12s;
}
.wcard:hover { border-color: rgba(255, 83, 0, .4); transform: translateY(-1px); }
.wc-ic {
  width: 34px; height: 34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #000; border: 1px solid var(--line); border-radius: 10px;
}
.wc-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.wc-label { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-addr { font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); }
.wc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.wc-usd { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.wc-sub { display: flex; align-items: center; gap: 4px; }
.wc-dot { width: 7px; height: 7px; border-radius: 50%; }
.wc-err {
  width: 14px; height: 14px; border-radius: 50%; text-align: center;
  font-size: 10px; font-weight: 800; line-height: 14px;
  color: var(--red); background: rgba(255, 78, 106, .15);
}

/* ---------- chain sections ---------- */
.sec { padding: 0; overflow: hidden; }
.sec-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 12px; border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .015);
}
.sec-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sec-name { font-weight: 700; font-size: 12.5px; }
.sec-link { display: inline-flex; color: var(--muted-2); transition: color .15s; }
.sec-link:hover { color: var(--accent); }
.sec-link svg { width: 12px; height: 12px; }
.sec-usd { font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }

.row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--line-soft);
}
.row:last-child { border-bottom: none; }
.tlogo { border-radius: 50%; background: var(--bg-soft); flex-shrink: 0; }
.row-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.row-sym { font-weight: 700; font-size: 12.5px; }
.row-name { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.row-nums { display: flex; flex-direction: column; align-items: flex-end; }
.row-usd { font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.row-sub { font-size: 10.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

.unpriced {
  padding: 8px 12px; font-size: 10.5px; color: var(--muted-2);
  background: rgba(255, 255, 255, .015);
}

/* ---------- empty / banner ---------- */
.empty-card { text-align: center; padding: 26px 16px; }
.empty-ic {
  width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
}
.empty-card b { font-size: 13.5px; }
.empty-card p { margin: 6px auto 0; max-width: 280px; color: var(--muted); font-size: 12px; }

.banner {
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(255, 78, 106, .08); border: 1px solid rgba(255, 78, 106, .25);
  color: #FFB3BF; border-radius: var(--radius-sm);
  padding: 9px 11px; font-size: 11.5px; margin-bottom: 10px;
}
.banner svg { width: 13px; height: 13px; flex-shrink: 0; margin-top: 1px; }

/* ---------- skeletons ---------- */
.skel {
  display: inline-block; border-radius: 6px;
  background: linear-gradient(90deg, var(--panel-2) 25%, var(--elevated) 50%, var(--panel-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-row { gap: 10px; }
.skel-ic { width: 28px; height: 28px; border-radius: 50%; }
.skel-a { width: 34%; height: 12px; }
.skel-b { width: 22%; height: 12px; margin-left: auto; }
.skel-usd { width: 54px; height: 13px; }
.skel-dot { width: 9px; height: 9px; border-radius: 50%; }
.skel-name { width: 90px; height: 12px; }

/* ---------- footer ---------- */
.footer {
  padding: 9px 14px 11px; font-size: 10px; color: var(--muted-2);
  border-top: 1px solid var(--line-soft); text-align: center;
}
.app.wide .footer { padding: 12px 0 16px; }
.footer-link {
  background: none; border: none; padding: 0; font-size: 10px;
  color: var(--muted); text-decoration: underline; text-underline-offset: 2px;
}
.footer-link:hover { color: var(--accent); }
.footer-note { display: block; margin-top: 2px; color: var(--muted-2); opacity: .8; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, .72); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s; padding: 18px;
}
/* The author display:flex above would override the UA [hidden] rule and leave
   an invisible click-eating overlay across the whole app — guard it. */
.modal-backdrop[hidden] { display: none; }
.modal-backdrop.open { opacity: 1; }
.modal {
  width: 100%; max-width: 380px; max-height: 92%;
  overflow-y: auto; scrollbar-width: thin;
  background: linear-gradient(180deg, #17171A, #101012);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 20px; position: relative;
  transform: translateY(10px) scale(.98); transition: transform .2s;
}
.modal-backdrop.open .modal { transform: none; }
.modal-sm { max-width: 320px; }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
}
.modal-close:hover { color: var(--text); }
.modal-close svg { width: 13px; height: 13px; }
.modal-cta {
  width: 100%; margin-top: 16px; padding: 12px;
  background: var(--cta); color: var(--on-cta);
  border: none; border-radius: 12px; font-weight: 800; font-size: 13px;
  transition: background .15s;
}
.modal-cta:hover { background: #E9E9E9; }

/* wallet form */
.mf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mf-head h3 { margin: 0; font-size: 16px; letter-spacing: -.3px; }
.mf-head svg { flex-shrink: 0; }
.danger-head svg { width: 18px; height: 18px; color: var(--red); }
.mf-sub { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.mf-label {
  display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--muted-2); margin: 10px 0 5px;
}
.mf-input {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: var(--bg-soft); border: 1px solid var(--line);
  color: var(--text); font: inherit; outline: none;
  transition: border-color .15s;
}
.mf-input:focus { border-color: rgba(255, 83, 0, .55); }
.mf-input.invalid { border-color: var(--red); }
.mf-input.mono { font-family: var(--mono); font-size: 12px; }
.mf-addr {
  font-family: var(--mono); font-size: 11px; color: var(--muted-2);
  padding: 8px 2px 0;
}
.mf-err { color: var(--red); font-size: 11.5px; margin-top: 8px; }
.mf-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* ---------- onboarding / welcome ---------- */
.ob-hero { text-align: center; padding: 6px 0 14px; }
.ob-hero-ic {
  width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: #000; border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(255, 83, 0, .12);
}
.ob-hero h2 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.3px; }
.ob-hero p { margin: 0 auto; max-width: 300px; color: var(--muted); font-size: 12px; }

.ob-sec-title {
  font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
  color: var(--accent); margin: 16px 0 9px;
  display: flex; align-items: center; gap: 8px;
}
.ob-hint { font-size: 10px; color: var(--muted-2); text-transform: none; letter-spacing: 0; font-weight: 500; }

.ob-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.ob-step {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 10px 12px;
}
.ob-num {
  width: 18px; height: 18px; border-radius: 6px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  font-size: 10.5px; font-weight: 800; text-align: center; line-height: 18px;
}
.ob-ic { color: var(--muted); flex-shrink: 0; margin-top: 1px; }
.ob-ic svg { width: 15px; height: 15px; }
.ob-text { display: flex; flex-direction: column; gap: 1px; font-size: 12px; }
.ob-text b { font-size: 12.5px; }
.ob-text span { color: var(--muted); font-size: 11.5px; }
.ob-text code {
  font-family: var(--mono); font-size: 10.5px;
  background: var(--bg-soft); padding: 1px 4px; border-radius: 4px;
}

.ob-safe {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--accent-soft); border: 1px solid rgba(255, 83, 0, .3);
  border-radius: 12px; padding: 10px 12px; margin-top: 12px;
  font-size: 11.5px; color: #FFD9C4;
}
.ob-safe svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.ob-safe b { color: var(--text); }

.quiz { display: flex; flex-direction: column; gap: 10px; }
.quiz-item { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; padding: 11px 12px; }
.quiz-q { font-weight: 700; font-size: 12.5px; margin-bottom: 8px; }
.quiz-opts { display: flex; flex-direction: column; gap: 6px; }
.quiz-opt {
  display: flex; align-items: center; gap: 8px; text-align: left;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 10px; font-size: 11.5px; color: var(--muted);
  transition: all .15s;
}
.quiz-opt:hover:not(:disabled) { color: var(--text); border-color: var(--muted-2); }
.quiz-opt:disabled { cursor: default; opacity: .75; }
.quiz-opt.correct { border-color: rgba(47, 208, 137, .6); color: var(--green); opacity: 1; }
.quiz-opt.wrong { border-color: rgba(255, 78, 106, .6); color: var(--red); opacity: 1; }
.qo-mark {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid currentColor; opacity: .7;
}
.quiz-opt.correct .qo-mark { background: var(--green); border-color: var(--green); }
.quiz-opt.wrong .qo-mark { background: var(--red); border-color: var(--red); }
.quiz-why {
  display: flex; gap: 7px; align-items: flex-start;
  margin-top: 8px; font-size: 11px; color: var(--muted);
}
.quiz-why[hidden] { display: none; }
.quiz-why svg { width: 12px; height: 12px; color: var(--green); flex-shrink: 0; margin-top: 1px; }

.ob-legal { margin: 14px 0 0; text-align: center; font-size: 10px; color: var(--muted-2); }

/* ---------- splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: #000; cursor: pointer;
  transition: opacity .5s ease, visibility .5s;
}
.splash-out { opacity: 0; visibility: hidden; pointer-events: none; }
.splash[hidden] { display: none; }
.splash-aura {
  position: absolute; inset: 0;
  background:
    radial-gradient(560px 320px at 50% 34%, rgba(255, 83, 0, .16), transparent 65%),
    radial-gradient(800px 500px at 50% 110%, rgba(255, 255, 255, .045), transparent 60%);
  animation: aura 3.2s ease-in-out infinite alternate;
}
@keyframes aura { to { transform: scale(1.06); opacity: .85; } }
.splash-inner { position: relative; text-align: center; }
.splash-logo {
  position: relative; width: 88px; height: 88px; margin: 0 auto 20px;
  border-radius: 24px; overflow: hidden;
  animation: logoIn .8s cubic-bezier(.2, .8, .25, 1.1) both;
  box-shadow: 0 22px 60px rgba(255, 83, 0, .22), 0 0 0 1px var(--line);
}
@keyframes logoIn { from { transform: translateY(14px) scale(.85); opacity: 0; } }
.splash-logo img { display: block; }
.splash-glow {
  position: absolute; inset: -30%;
  background: radial-gradient(closest-side, rgba(255, 83, 0, .25), transparent);
  animation: pulse 2.2s ease-in-out infinite;
}
.splash-sheen {
  position: absolute; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .22), transparent);
  transform: skewX(-18deg); animation: sheen 2.4s ease-in-out infinite;
}
@keyframes sheen { 0% { left: -60%; } 55%, 100% { left: 130%; } }
.splash-title {
  font-size: 21px; font-weight: 800; letter-spacing: -.5px;
  animation: fadeUp .7s .15s ease both;
}
.splash-sub { color: var(--muted); font-size: 12px; margin-top: 4px; animation: fadeUp .7s .28s ease both; }
@keyframes fadeUp { from { transform: translateY(8px); opacity: 0; } }
.splash-bar {
  width: 150px; height: 3px; margin: 20px auto 12px;
  background: var(--panel-2); border-radius: 999px; overflow: hidden;
  animation: fadeUp .7s .4s ease both;
}
.splash-bar i {
  display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, var(--accent), #FF9E66);
  border-radius: 999px; animation: barSlide 1.5s ease-in-out infinite;
}
@keyframes barSlide { 0% { transform: translateX(-110%); } 100% { transform: translateX(400%); } }
.splash-loading { color: var(--muted-2); font-size: 11px; animation: fadeUp .7s .5s ease both; }
.splash-dots b { animation: pulse 1.2s infinite; font-weight: 400; }
.splash-dots b:nth-child(2) { animation-delay: .2s; }
.splash-dots b:nth-child(3) { animation-delay: .4s; }

/* ---------- options page ---------- */
.opts-page { max-width: 620px; margin: 0 auto; padding: 0 20px 40px; min-height: 100vh; display: flex; flex-direction: column; }
.opts-page .content-flow { flex: 1; }
.opt-sec { margin-bottom: 14px; }
.opt-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line-soft);
}
.opt-row:last-child { border-bottom: none; }
.opt-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.opt-name { font-weight: 700; font-size: 12.5px; }
.opt-desc { font-size: 11px; color: var(--muted-2); }
.opt-mini {
  padding: 6px 11px; border-radius: 9px; font-size: 11.5px; font-weight: 700;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  transition: all .15s;
}
.opt-mini:hover { color: var(--text); background: var(--elevated); }
.opt-mini.danger { color: var(--red); border-color: rgba(255, 78, 106, .35); background: rgba(255, 78, 106, .08); }
.opt-mini.danger:hover { background: rgba(255, 78, 106, .16); }
.opt-empty { color: var(--muted-2); font-size: 12px; padding: 8px 0; }

.about-box { display: flex; gap: 12px; align-items: flex-start; }
.about-box img { border-radius: 12px; }
.about-name { font-weight: 800; font-size: 14px; }
.about-ver { font-size: 11px; color: var(--muted-2); margin-top: 1px; }
.about-note { font-size: 11px; color: var(--muted-2); margin: 8px 0 0; }
.about-link { color: var(--accent); font-size: 11.5px; text-decoration: none; }
.about-link:hover { text-decoration: underline; }

/* ---------- privacy page ---------- */
.privacy-wrap { max-width: 640px; margin: 0 auto; padding: 0 20px 48px; }
.privacy-title { font-size: 20px; letter-spacing: -.4px; margin: 18px 0 4px; }
.privacy-date { color: var(--muted-2); font-size: 11px; margin-bottom: 18px; }
.privacy-wrap h2 { font-size: 14px; margin: 22px 0 8px; letter-spacing: -.2px; }
.privacy-wrap p, .privacy-wrap li { color: var(--muted); font-size: 12.5px; }
.privacy-wrap ul { padding-left: 18px; }
.privacy-wrap b { color: var(--text); }
.privacy-hl {
  background: var(--accent-soft); border: 1px solid rgba(255, 83, 0, .3);
  border-radius: 12px; padding: 12px 14px; color: #FFD9C4; font-size: 12.5px;
}
