:root {
  --bg: #14121C;
  --panel: #1F1B2E;
  --accent: #E8A659;
  --accent-2: #7EA0FF;
  --line: rgba(255, 255, 255, 0.08);
  --txt: #ffffff;
  --muted: rgba(255, 255, 255, 0.55);
  --faint: rgba(255, 255, 255, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.wrap {
  width: 100%;
  max-width: 560px;
  padding: 24px 20px 48px;
}

/* ── header ───────────────────────────── */
.eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 10px;
}

h1 {
  font-size: 26px;
  line-height: 1.25;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.lead {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 20px;
}

/* ── ad slots ─────────────────────────── */
.ad-slot {
  min-height: 90px;
  margin: 18px 0;
  border: 1px dashed var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow: hidden;
}
.ad-slot ins { display: block; width: 100%; }

/* ── result panel ─────────────────────── */
.panel {
  background: var(--panel);
  border-radius: 20px;
  padding: 22px;
}

.result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.jo-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  min-width: 46px;
  padding: 12px 8px;
  text-align: center;
  border-radius: 10px;
  color: var(--bg);
  background: linear-gradient(180deg, var(--accent), rgba(232, 166, 89, 0.75));
}

.digits { display: flex; gap: 6px; }

.digit {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  width: 36px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
}
.digit.pop { animation: pop 0.35s ease; }
@keyframes pop {
  0% { transform: translateY(6px) scale(0.9); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

button.generate {
  width: 100%;
  border: 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  padding: 15px;
  border-radius: 14px;
  color: var(--bg);
  background: linear-gradient(180deg, var(--accent), rgba(232, 166, 89, 0.75));
  transition: transform 0.08s ease, filter 0.15s ease;
}
button.generate:hover { filter: brightness(1.05); }
button.generate:active { transform: scale(0.98); }

.subnote {
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--faint);
  margin-top: 12px;
}

.actions { display: flex; gap: 8px; margin-top: 10px; }
.actions button {
  flex: 1;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}
.actions button:hover { color: var(--txt); border-color: rgba(255,255,255,0.18); }

/* ── 구매 링크 ────────────────────────── */
.buy-link {
  display: block;
  margin-top: 12px;
  padding: 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent-2);
  background: rgba(126, 160, 255, 0.08);
  border: 1px solid rgba(126, 160, 255, 0.3);
  border-radius: 14px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.buy-link:hover {
  background: rgba(126, 160, 255, 0.14);
  border-color: rgba(126, 160, 255, 0.5);
}

/* ── history ──────────────────────────── */
.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 26px 0 10px;
}

.hist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}
.hist-jo {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 6px;
  color: var(--bg);
  background: var(--accent-2);
}
.hist-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
}
.hist-empty { font-size: 12.5px; color: var(--faint); }

/* ── info / SEO body ──────────────────── */
.info { margin-top: 32px; }
.info h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 22px 0 8px;
  color: var(--txt);
}
.info p, .info li {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.info ul { padding-left: 18px; margin: 6px 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}
.stat-card .k { font-size: 11px; color: var(--faint); }
.stat-card .v {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

.disclaimer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.7;
  color: var(--faint);
  text-align: center;
}
.disclaimer a { color: var(--muted); }

footer {
  margin-top: 20px;
  text-align: center;
  font-size: 11px;
  color: var(--faint);
}
footer a { color: var(--faint); text-decoration: none; }
footer a:hover { color: var(--muted); }
