:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: rgba(23, 26, 34, 0.76);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4f3ef;
  --muted: #9a9da8;
  --gold: #d6b879;
  --gold-2: #f2daa3;
  --violet: #7068d9;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { overflow-x: hidden; }
button { color: inherit; font: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: wait; opacity: .62; }
.ambient { position: fixed; width: 300px; height: 300px; border-radius: 50%; filter: blur(90px); opacity: .2; pointer-events: none; }
.ambient-one { background: var(--violet); top: -150px; right: -110px; }
.ambient-two { background: #ad743e; top: 340px; left: -230px; }
.shell { position: relative; width: min(100%, 680px); margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 18px calc(110px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .15em; }
.brand b { color: var(--gold); font-weight: 600; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #d8c18e; transform: rotate(45deg); color: var(--gold-2); font-family: Georgia, serif; }
.brand-mark::first-letter { transform: rotate(-45deg); }
.avatar { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: #171a22; font-size: 12px; }
.hero { padding: 54px 4px 30px; }
.eyebrow { color: var(--gold); font-size: 10px; letter-spacing: .23em; }
h1 { margin: 13px 0 14px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 12vw, 66px); line-height: .96; font-weight: 500; letter-spacing: -.035em; }
h1 em { color: var(--gold-2); font-weight: 400; }
.subtitle { color: var(--muted); max-width: 420px; line-height: 1.55; }
.glass { background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(18px); box-shadow: 0 18px 45px rgba(0,0,0,.22); }
.balance-card { display: flex; justify-content: space-between; align-items: center; padding: 18px; border-radius: 18px; }
.balance-card strong { display: block; margin-top: 5px; font-size: 28px; }
.balance-card small, .muted { color: var(--muted); font-size: 12px; font-weight: 400; }
.secondary { border: 1px solid rgba(214,184,121,.42); background: rgba(214,184,121,.08); color: var(--gold-2); padding: 10px 15px; border-radius: 11px; }
.pricing-section { margin-top: 6px; }
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.price-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #13161d; }
.price-item span { font-size: 12px; }
.price-item strong { color: var(--gold-2); font-size: 13px; }
.price-item small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.pricing-subtitle { margin: 22px 2px 10px; font-size: 14px; }
.package-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.package-item { position: relative; display: grid; gap: 5px; padding: 15px 12px; border: 1px solid var(--line); border-radius: 15px; background: #151820; }
.package-item span, .package-item b, .package-item small { font-size: 10px; }
.package-item strong { color: var(--gold-2); font-size: 18px; }
.package-item b { font-weight: 600; }
.package-item small { color: var(--muted); line-height: 1.35; }
.package-item em { position: absolute; top: -8px; right: 7px; padding: 3px 6px; border-radius: 999px; background: var(--gold); color: #17130c; font-size: 8px; font-style: normal; }
.package-featured { border-color: rgba(214,184,121,.42); background: linear-gradient(145deg, rgba(107,93,67,.31), #171920); }
.pricing-cta { width: 100%; margin-top: 10px; padding: 13px; border: 1px solid rgba(214,184,121,.5); border-radius: 13px; background: rgba(214,184,121,.12); color: var(--gold-2); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 32px 2px 13px; }
.section-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.section-head button { border: 0; background: transparent; color: var(--muted); }
.pill { color: var(--gold-2); border: 1px solid rgba(214,184,121,.35); background: rgba(214,184,121,.08); padding: 5px 9px; border-radius: 999px; font-size: 11px; }
.tools { display: grid; gap: 10px; }
.tool { width: 100%; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 13px; padding: 16px; text-align: left; background: #151820; border: 1px solid var(--line); border-radius: 17px; }
.tool-featured { background: linear-gradient(130deg, rgba(107,93,67,.35), rgba(28,28,35,.88)); border-color: rgba(214,184,121,.25); }
.tool-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: rgba(255,255,255,.055); color: var(--gold-2); font-size: 20px; }
.tool b, .tool small { display: block; }
.tool b { font-size: 15px; margin-bottom: 4px; }
.tool small { color: var(--muted); font-size: 11px; }
.tool i { color: #747783; font-style: normal; }
.history-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.history-item { min-height: 150px; border-radius: 15px; overflow: hidden; background: #151820; border: 1px solid var(--line); }
.history-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.history-item p { margin: 10px; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item .history-result { color: var(--text); white-space: normal; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; }
.bottom-nav { position: fixed; z-index: 5; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 24px), 650px); display: grid; grid-template-columns: repeat(4, 1fr); padding: 9px 5px; border-radius: 20px; }
.bottom-nav button { display: grid; gap: 3px; justify-items: center; border: 0; background: transparent; color: #7e818b; font-size: 10px; }
.bottom-nav span { font-size: 18px; }
.bottom-nav .active { color: var(--gold-2); }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 100px; transform: translate(-50%, 20px); width: max-content; max-width: calc(100% - 40px); padding: 12px 16px; border-radius: 12px; background: #252934; opacity: 0; transition: .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.hidden { display: none !important; }
@media (hover: hover) {
  .tool, .secondary, .avatar, .bottom-nav button, .section-head button { transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease; }
  .tool:hover { transform: translateY(-2px); border-color: rgba(214,184,121,.42); background: #1b1e27; }
  .secondary:hover { background: rgba(214,184,121,.16); border-color: rgba(214,184,121,.68); }
  .bottom-nav button:hover, .section-head button:hover { color: var(--gold-2); }
}
@media (min-width: 620px) { .tools { grid-template-columns: 1fr 1fr; } .tool { min-height: 96px; } .hero { padding-top: 70px; } .price-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 430px) { .package-grid { grid-template-columns: 1fr; } .package-item { grid-template-columns: 1fr auto; align-items: center; } .package-item b, .package-item small { grid-column: 1 / -1; } }
.legal-shell { width: min(100%, 820px); padding-bottom: 70px; }
.legal-hero { padding-bottom: 22px; }
.legal-document { padding: clamp(20px, 5vw, 42px); border-radius: 20px; line-height: 1.7; color: #c7c8cd; }
.legal-document h2 { margin: 30px 0 8px; color: var(--text); font-size: 18px; }
.legal-document h2:first-child { margin-top: 0; }
.legal-document p { margin: 8px 0; }
.legal-document code { color: var(--gold-2); }
