:root {
  --bg: #0D0F12;
  --surface: #171A1F;
  --surface-2: #20242B;
  --line: #2A2F37;
  --text: #F2F4F5;
  --muted: #9AA3AD;
  --accent: #3DDC97;
  --accent-ink: #0B2A1C;
  --accent-soft: #12352A;
  --danger: #FF7A6B;
  --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Manrope, system-ui, sans-serif; }
body { min-height: 100vh; padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
a { color: var(--accent); }
img { display: block; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; }
.logo { font-family: Unbounded, sans-serif; font-weight: 700; font-size: 22px; letter-spacing: .5px; }
.balance-pill { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 14px; border: 1px solid var(--line);
  border-radius: 20px; background: var(--surface); color: var(--text); text-decoration: none; font-size: 13px; font-weight: 700; }
.balance-num { display: flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 15px; background: var(--surface-2); font-size: 15px; color: var(--text); }
.balance-num svg { color: var(--accent); }

main { display: flex; flex-direction: column; gap: 22px; padding: 4px 0 16px; }
.section { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; }
.step { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.hint { font-size: 12px; color: var(--muted); padding: 0 16px; }
.link { font-size: 14px; font-weight: 600; text-decoration: none; }
.pad { padding: 0 16px; }

.rail { display: flex; gap: 10px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }

.card { flex: 0 0 auto; padding: 0; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--surface);
  display: flex; flex-direction: column; overflow: hidden; color: var(--text); text-align: left; }
.card.selected { border-color: var(--accent); }
.card .media { width: 100%; background: var(--surface-2); object-fit: cover; position: relative; display: flex; align-items: center; justify-content: center; }
.card .meta { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.card .name { font-size: 14px; font-weight: 700; }
.card .sub { font-size: 12px; color: var(--muted); }
.char-card { width: 112px; } .char-card .media { height: 132px; }
.trend-card { width: 108px; } .trend-card .media { height: 150px; }
.badge { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.6); color: var(--text);
  font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 5px; }
.add-card { flex: 0 0 auto; width: 112px; min-height: 180px; border-radius: var(--radius); background: transparent;
  border: 2px dashed var(--line); color: var(--muted); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; font-size: 13px; font-weight: 600; }

.btn-outline { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: transparent;
  color: var(--text); font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { width: 100%; height: 54px; border: none; border-radius: 16px; background: var(--accent); color: var(--accent-ink);
  font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }

.chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 0 16px; }
.chip { height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 700; }
.chip.selected { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.summary { margin: 0 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; }
.summary .label { font-size: 14px; color: var(--muted); }
.summary .what { font-size: 16px; font-weight: 700; }
.summary .row { display: flex; align-items: baseline; justify-content: space-between; }
.price { font-family: Unbounded, sans-serif; font-size: 20px; font-weight: 700; }

.cta-bar { position: fixed; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom)); padding: 10px 16px;
  background: var(--bg); border-top: 1px solid #1E2228; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 6px 8px calc(12px + env(safe-area-inset-bottom)); background: #111317; border-top: 1px solid #1E2228; }
.tabs a { height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none; }
.tabs a.active { color: var(--accent); font-weight: 700; }
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.page-title { font-family: Unbounded, sans-serif; font-weight: 700; font-size: 24px; padding: 6px 16px 0; }
.page-sub { font-size: 14px; color: var(--muted); padding: 0 16px; margin-top: -14px; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 16px; }
.grid2 .char-card { width: auto; } .grid2 .char-card .media { height: 190px; }

.hero { height: 300px; margin: 0 16px; border-radius: 20px; background: var(--surface); object-fit: cover; width: calc(100% - 32px); }
.tag { padding: 4px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.angles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0 16px; }
.angles img, .angles .ph { width: 100%; height: 96px; border-radius: 12px; background: var(--surface); object-fit: cover; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; }
.pill { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 13px; }

.list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.row-card { width: 100%; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: none; color: var(--text);
  display: flex; align-items: center; gap: 14px; text-align: left; text-decoration: none; }
.row-card .ico { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.row-card .ico svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.row-card .txt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.row-card .t { font-size: 15px; font-weight: 700; line-height: 1.3; }
.row-card .s { font-size: 12px; color: var(--muted); }
.feature { background: var(--accent-soft); flex-direction: column; align-items: flex-start; gap: 8px; }
.feature .kicker { padding: 3px 8px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.feature .t { font-size: 18px; }
.article { padding: 0 16px; font-size: 15px; line-height: 1.6; white-space: pre-line; color: #D6DCE1; }

.balance-card { margin: 0 16px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.balance-card .big { font-family: Unbounded, sans-serif; font-size: 34px; font-weight: 700; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; padding: 0 16px; }
.pack { height: 60px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pack b { font-size: 16px; } .pack span { font-size: 11px; color: var(--muted); }
.hist { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface); }
.hist .thumb { width: 44px; height: 64px; border-radius: 8px; background: var(--surface-2); }
.hist .txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.hist .t { font-size: 14px; font-weight: 700; } .hist .s { font-size: 12px; color: var(--muted); }
.icon-btn { width: 44px; height: 44px; border: none; border-radius: 10px; background: var(--surface-2); color: var(--text);
  display: flex; align-items: center; justify-content: center; }
.empty { padding: 24px 16px; color: var(--muted); text-align: center; font-size: 14px; }

.toast { position: fixed; left: 16px; right: 16px; top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2);
  border: 1px solid var(--line); font-size: 14px; font-weight: 600; z-index: 10; }
.toast.error { border-color: var(--danger); }

.sheet { margin: 40px 16px 0; padding: 24px 20px; border-radius: 20px; background: var(--surface); text-align: center;
  display: flex; flex-direction: column; gap: 12px; align-items: center; }
.sheet .t { font-size: 20px; font-weight: 700; } .sheet .s { color: var(--muted); font-size: 14px; line-height: 1.5; }
