@font-face { font-family: 'Cinzel'; font-weight: 500; font-display: swap; src: url('/fonts/cinzel-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-weight: 600; font-display: swap; src: url('/fonts/cinzel-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 400; font-display: swap; src: url('/fonts/space-grotesk-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url('/fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; font-display: swap; src: url('/fonts/space-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }
:root {
  --bg: #0B0A12;
  --panel: #13111D;
  --panel-2: #1A1726;
  --line: rgba(233, 221, 255, 0.12);
  --line-2: rgba(233, 221, 255, 0.22);
  --text: #F4EEFF;
  --muted: #B3ACC6;
  --dim: #8E86A6;
  --accent: #FF4FD8;
  --ok: #5EF2B0;
  --warn: #FFB86B;
  --radius: 14px;
  --serif: 'Cinzel', Georgia, serif;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--text); }
img { display: block; max-width: 100%; }
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--serif); font-weight: 600; letter-spacing: 0.14em; font-size: 18px; }
.brand svg { width: 26px; height: 26px; }
.top-links { display: flex; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-decoration: none; color: var(--text); background: transparent; }
.chip:hover { border-color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; padding: 40px 0 56px; }
.hero-copy { flex: 1 1 420px; min-width: 0; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.24em; color: #CBB8E8; }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(44px, 8vw, 84px); letter-spacing: 0.1em; line-height: 1; margin: 18px 0; }
.rule { width: 64px; height: 2px; background: var(--accent); }
.lede { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 480px; margin: 18px 0 0; }
.stats { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
.stat b { display: block; font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: 0.04em; }
.stat span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--dim); }

.stack { flex: 1 1 420px; position: relative; height: 340px; min-width: 0; }
.stack img { position: absolute; top: 50%; border-radius: 16px; border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); object-fit: cover; }
.stack .s1 { width: 34%; left: 0; transform: translateY(-50%); opacity: 0.85; }
.stack .s2 { width: 40%; left: 12%; transform: translateY(-50%); }
.stack .s3 { width: 46%; left: 27%; transform: translateY(-50%); z-index: 3; border-color: var(--accent); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(160, 90, 255, 0.35); }
.stack .s4 { width: 40%; left: 48%; transform: translateY(-50%); z-index: 2; }
.stack .s5 { width: 34%; left: 66%; transform: translateY(-50%); opacity: 0.85; z-index: 1; }

/* Panel */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 4vw, 36px); margin-bottom: 40px; }
.panel h2 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.08em; font-size: 26px; margin: 0 0 6px; }
.panel .sub { color: var(--muted); margin: 0 0 24px; line-height: 1.5; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 12px; border: 1px solid transparent; font: 500 15px var(--sans); cursor: pointer; text-decoration: none; transition: transform .08s ease, background .15s ease, border-color .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--text); color: #0B0A12; }
.btn-primary:hover { background: #ffffff; }
.btn-accent { background: var(--accent); color: #12030F; font-weight: 600; }
.btn-accent:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }

.who { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); margin-bottom: 18px; flex-wrap: wrap; }
.who-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who img { width: 40px; height: 40px; border-radius: 50%; background: #2a2638; }
.who b { display: block; }
.who span { color: var(--dim); font-size: 14px; }
.linkbtn { background: none; border: 0; color: var(--dim); font: 14px var(--sans); cursor: pointer; text-decoration: underline; min-height: 44px; padding: 0 6px; }
.linkbtn:hover { color: var(--text); }

.notice { padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(255, 184, 107, 0.35); background: rgba(255, 184, 107, 0.08); color: #FFD9B0; margin-bottom: 18px; line-height: 1.5; }
.notice.ok { border-color: rgba(94, 242, 176, 0.35); background: rgba(94, 242, 176, 0.08); color: #C8FBE3; }
.notice.err { border-color: rgba(255, 99, 132, 0.4); background: rgba(255, 99, 132, 0.08); color: #FFC9D3; }

.tasks { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.task { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); flex-wrap: wrap; }
.task.done { border-color: rgba(94, 242, 176, 0.35); }
.num { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.task.done .num { background: var(--ok); border-color: var(--ok); color: #04140C; }
.task-body { flex: 1 1 200px; min-width: 0; }
.task-body b { display: block; font-weight: 500; }
.task-body span { color: var(--dim); font-size: 14px; }
.state { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--dim); }
.task.done .state { color: var(--ok); }

.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.wallet { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.wallet label { display: block; font-weight: 500; margin-bottom: 8px; }
.wallet .hint { color: var(--dim); font-size: 14px; margin: 0 0 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
input[type=text], input[type=password] { flex: 1 1 280px; min-width: 0; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #0F0D17; color: var(--text); font: 15px var(--mono); }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.done-card { text-align: center; padding: 28px 16px; }
.done-card svg { width: 64px; height: 64px; margin: 0 auto 12px; display: block; }
.done-card h3 { font-family: var(--serif); letter-spacing: 0.08em; font-size: 24px; margin: 0 0 8px; }
.done-card p { color: var(--muted); margin: 0 auto; max-width: 440px; line-height: 1.5; }

.faq { display: grid; gap: 10px; margin-bottom: 48px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; background: var(--panel); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 500; min-height: 44px; }
.faq p { color: var(--muted); line-height: 1.55; margin: 0 0 16px; }

footer { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--dim); font-size: 14px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.hidden { display: none !important; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Admin */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--dim); font-weight: 500; }
.table-box { overflow-x: auto; }
.yes { color: var(--ok); } .no { color: var(--dim); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--panel-2); }
.box b { display: block; font-family: var(--serif); font-size: 28px; }
.box span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--dim); }

@media (max-width: 640px) {
  .stack { height: 240px; }
  .top-links .chip.hide-sm { display: none; }
}

/* Legal pages */
.legal { max-width: 760px; padding: 24px 0 56px; line-height: 1.65; color: var(--muted); }
.legal h1 { font-size: clamp(34px, 6vw, 52px); margin: 0 0 8px; color: var(--text); }
.legal h2 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.06em; color: var(--text); font-size: 20px; margin: 36px 0 10px; }
.legal .updated { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; color: var(--dim); margin: 0 0 28px; }
.legal b { color: var(--text); font-weight: 500; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal a, footer a { color: var(--text); }

/* Mint page */
.progress { margin-top: 28px; max-width: 460px; }
.progress-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.progress-row b { font-family: var(--serif); font-size: 32px; font-weight: 600; }
.progress-row span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; color: var(--dim); }
.bar { height: 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper .btn { min-width: 48px; padding: 12px; font-size: 20px; line-height: 1; }
.stepper output { min-width: 40px; text-align: center; font: 600 22px var(--serif); }
code.root { font-family: var(--mono); font-size: 12px; word-break: break-all; color: var(--text); }
textarea { width: 100%; min-height: 120px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #0F0D17; color: var(--text); font: 13px var(--mono); resize: vertical; margin: 10px 0; }
textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.windows { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 20px; }
.window { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel-2); }
.window b { display: block; font-weight: 500; }
.window span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--dim); }
.window.live { border-color: var(--accent); }
.window.live span { color: var(--accent); }
.window.mine { box-shadow: 0 0 0 1px var(--accent) inset; }
