:root {
  --bg: #0b0d17;
  --bg2: #12162a;
  --card: #161b33;
  --line: #262d50;
  --text: #eef0ff;
  --muted: #9aa3c7;
  --primary: #7c5cff;
  --primary2: #ff5ca8;
  --ok: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #2a1d6b55, transparent), var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: #b8a8ff; }
h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 1.35rem; margin: 0 0 1rem; }
h3 { font-size: 1rem; margin: 1.25rem 0 .5rem; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

.container { max-width: 860px; margin: 0 auto; padding: 0 16px 48px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }

.announcement { background: linear-gradient(90deg, var(--primary), var(--primary2)); color: #fff; text-align: center; padding: 8px 12px; font-size: .9rem; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; background: #0b0d17cc; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 6px; font-weight: 800; color: var(--text); text-decoration: none; font-size: 1.05rem; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.balance { background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.icon-btn { background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 50%; width: 36px; height: 36px; cursor: pointer; }

.hero { text-align: center; padding: 36px 0 20px; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin: 0 0 12px; }
.hero p { color: var(--muted); max-width: 600px; margin: 0 auto; }
.grad { background: linear-gradient(90deg, var(--primary), var(--primary2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--bg2);
  color: var(--text); padding: 10px 16px; border-radius: 12px; font-size: .95rem; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: #3b4580; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: linear-gradient(90deg, var(--primary), var(--primary2)); border: 0; color: #fff; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 10px; }
.btn-lg { padding: 14px 20px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.link { background: none; border: 0; color: #b8a8ff; cursor: pointer; padding: 6px 0; font-size: .9rem; }

.step { margin-bottom: 20px; }
.step-title { font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); font-size: .8rem; }

.drop { display: grid; place-items: center; min-height: 200px; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer;
  background: var(--bg2); text-align: center; padding: 16px; transition: border-color .2s; overflow: hidden; }
.drop.drag { border-color: var(--primary); }
.drop-icon { font-size: 2.2rem; }
.preview { max-width: 100%; max-height: 360px; border-radius: 12px; }

textarea, input[type=text], input:not([type]), input[type=number], input[type=password], input[type=date], select {
  width: 100%; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; }
textarea:focus, input:focus, select:focus { outline: 2px solid #7c5cff66; border-color: var(--primary); }
.examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.examples button { background: #1e2448; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 4px 10px; font-size: .8rem; cursor: pointer; }
.examples button:hover { color: var(--text); }

.chips-input { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips-input input { border: 0; flex: 1; min-width: 160px; background: transparent; padding: 6px; }
.chips-input input:focus { outline: none; }
.chips { display: contents; }
.chip { background: #2b2463; color: #ddd6ff; border-radius: 999px; padding: 4px 6px 4px 10px; font-size: .85rem; display: inline-flex; align-items: center; gap: 4px; }
.chip button { background: none; border: 0; color: #ddd6ff; cursor: pointer; font-size: 1rem; line-height: 1; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.field > span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }

.alert { padding: 10px 12px; border-radius: 12px; margin: 12px 0; font-size: .9rem; }
.alert-error { background: #ef444422; border: 1px solid #ef444466; color: #fecaca; }
.alert-ok { background: #22c55e22; border: 1px solid #22c55e66; color: #bbf7d0; }

#costHint { margin-top: 8px; }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result-grid figure { margin: 0; }
.result-grid figcaption { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.result-grid img { width: 100%; border-radius: 12px; background: var(--bg2); display: block; }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.loading { display: grid; place-items: center; gap: 12px; padding: 40px 0; text-align: center; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--primary); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 24px; }
.tile { position: relative; border-radius: 12px; overflow: hidden; background: var(--card); border: 1px solid var(--line); aspect-ratio: 1; cursor: pointer; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .tag { position: absolute; left: 6px; bottom: 6px; background: #000a; font-size: .7rem; padding: 2px 6px; border-radius: 6px; }
.tile .state { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: .85rem; padding: 8px; text-align: center; }

.how { margin: 32px 0; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.how-grid > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.how-grid p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.how-icon { font-size: 1.6rem; }

.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 12px; }
.pkg { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; }
.pkg.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.pkg .badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: linear-gradient(90deg, var(--primary), var(--primary2));
  font-size: .72rem; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.pkg .pname { color: var(--muted); font-weight: 600; }
.pkg .price { font-size: 1.8rem; font-weight: 800; margin: 4px 0; }
.pkg .per { color: var(--muted); font-size: .8rem; margin-bottom: 12px; }

.footer { border-top: 1px solid var(--line); padding: 20px 16px; text-align: center; color: var(--muted); font-size: .85rem; }
.footer nav { display: flex; gap: 16px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }

.modal { position: fixed; inset: 0; background: #000a; display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-box { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; }
.modal-box.small { max-width: 420px; }
.modal-close { position: absolute; right: 12px; top: 8px; background: none; border: 0; color: var(--muted); font-size: 1.8rem; cursor: pointer; }
.pay-logos { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 8px; }
.col-gap { display: grid; gap: 8px; }

.code-box { background: var(--bg2); border: 1px dashed var(--primary); border-radius: 12px; padding: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 1.4rem; letter-spacing: 3px; font-weight: 700; flex: 1; }
.stats-row { display: flex; gap: 24px; margin-top: 16px; }
.inline-form { display: flex; gap: 8px; }
.order-line { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 6px 0; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1f2547; border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; z-index: 60; }

.legal { max-width: 760px; margin: 32px auto; }
.legal h1 { font-size: 1.8rem; }

@media (max-width: 560px) {
  .row, .result-grid { grid-template-columns: 1fr; }
  #buyBtn { display: none; }
  .card { padding: 16px; }
}

/* report form */
.legal .field { display: block; margin-bottom: 14px; }
.check { display: flex; gap: 8px; align-items: center; margin: 4px 0 14px; color: var(--muted); }
.check input { width: auto; }
.ai-badge { display: inline-block; background: #000a; color: #fff; font-size: .72rem; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
