:root {
  color-scheme: dark;
  --bg: #0b0f19;
  --card: #121927;
  --line: #26334a;
  --text: #eef2ff;
  --muted: #9aa7bd;
  --accent: #8b5cf6;
  --accent-strong: #a78bfa;
  --danger: #fda4af;
}

* { box-sizing: border-box; }
body.age-locked { overflow: hidden; }
body { margin: 0; background: radial-gradient(circle at top, #17213b 0, var(--bg) 42rem); color: var(--text); font: 16px/1.5 system-ui, sans-serif; }
.shell { width: min(900px, calc(100% - 32px)); margin: 0 auto; padding: 40px 0 72px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.session-state { color: #86efac; font-size: .85rem; font-weight: 700; margin: 8px 0 0; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); letter-spacing: -.04em; margin-bottom: 0; }
h2 { font-size: 1.15rem; margin-bottom: 8px; }
.eyebrow, .label { color: var(--accent-strong); font-size: .72rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow { margin-bottom: 4px; }
.card { background: color-mix(in srgb, var(--card) 94%, transparent); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: 0 18px 60px #0003; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.muted { color: var(--muted); }
label { display: block; font-size: .9rem; font-weight: 650; margin: 18px 0 7px; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #0b1220; color: var(--text); font: inherit; padding: 11px 12px; }
textarea { resize: vertical; min-height: 130px; }
input:focus, textarea:focus, select:focus { border-color: var(--accent-strong); outline: 2px solid #8b5cf633; }
.button { border: 0; border-radius: 10px; background: var(--accent); color: white; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font: 700 .92rem inherit; padding: 11px 16px; text-decoration: none; transition: background .15s, transform .15s; }
.button:hover { background: var(--accent-strong); color: #100b1e; transform: translateY(-1px); }
.button.secondary { background: #25324a; }
.button.quiet { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.hidden { display: none !important; }
.secret-box { background: #1f1735; border: 1px solid #6941a5; border-radius: 12px; margin-top: 28px; padding: 16px; }
.secret-box p { color: var(--muted); margin-bottom: 10px; }
.code-row { display: flex; align-items: center; gap: 10px; }
code { background: #0b1220; border: 1px solid var(--line); border-radius: 8px; display: block; flex: 1; font-size: .85rem; overflow-wrap: anywhere; padding: 10px; }
.age-modal { align-items: center; background: #050812ee; display: flex; inset: 0; justify-content: center; padding: 20px; position: fixed; z-index: 10; }
.age-modal-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 90px #000b; max-width: 560px; padding: 28px; width: 100%; }
.age-modal-card .button { margin-top: 18px; width: 100%; }
.notice { border: 1px solid #76542d; background: #2a2115; color: #f7d9a4; border-radius: 12px; padding: 13px 16px; margin-bottom: 16px; font-size: .9rem; }
.age-gate { max-width: 680px; }
.check-row { align-items: center; display: flex; gap: 10px; }
.check-row input { width: auto; }
.balance { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.balance > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.balance strong { font-size: 1.15rem; overflow-wrap: anywhere; }
.media-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: #0b1220; border-radius: 11px; padding: 4px; }
.media-choice { border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font: 700 .95rem inherit; padding: 10px; }
.media-choice.selected { background: #2b1d53; color: white; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cost-line { color: var(--muted); font-size: .9rem; margin: 20px 0 12px; }
.cost-line strong { color: var(--text); }
.status { border-top: 1px solid var(--line); color: var(--muted); margin-top: 22px; padding-top: 16px; min-height: 42px; }
.status.error, .global-status.error { color: var(--danger); }
.status.success { color: #86efac; }
.preview { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; }
.preview p { margin-bottom: 10px; }
.preview img { background: #0b1220; border: 1px solid var(--line); border-radius: 12px; display: block; max-height: 70vh; max-width: 100%; object-fit: contain; }
.download { margin-top: 15px; }
.purchase-trigger { margin: 0 0 16px; }
.section-heading { display: flex; justify-content: space-between; }
.packages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.package { border: 1px solid var(--line); background: #0b1220; border-radius: 12px; padding: 14px; }
.package strong, .package span { display: block; }
.package span { color: var(--muted); font-size: .88rem; margin: 4px 0 12px; }
.package .button { width: 100%; }
.global-status { min-height: 24px; color: var(--muted); margin: 16px 4px; }

@media (max-width: 680px) {
  .shell { width: min(100% - 22px, 900px); padding-top: 24px; }
  .auth-grid, .balance, .form-grid, .packages { grid-template-columns: 1fr; gap: 18px; }
  .card { padding: 18px; }
  .topbar { align-items: flex-start; }
}
