:root {
  --bg: #0b1220;
  --bg2: #121c2e;
  --panel: rgba(18, 28, 46, 0.85);
  --ink: #eef3fb;
  --muted: #8fa0b8;
  --accent: #ff6a3d;
  --accent-ink: #1a0a04;
  --mint: #5eead4;
  --mint-dim: rgba(94, 234, 212, 0.14);
  --line: rgba(238, 243, 251, 0.12);
  --warn: #ffb4a2;
  --font: "Outfit", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 45% at 85% -5%, rgba(255, 106, 61, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 90%, rgba(94, 234, 212, 0.12), transparent 50%),
    linear-gradient(160deg, var(--bg), var(--bg2) 60%, #0e1828);
}
.atmosphere::before {
  content: "";
  position: absolute;
  right: max(1rem, 8vw);
  top: 12%;
  width: min(14rem, 28vw);
  height: 70%;
  border-radius: 1.25rem;
  border: 1px solid rgba(238, 243, 251, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 106, 61, 0.12), transparent 35%),
    repeating-linear-gradient(
      180deg,
      transparent 0 2.4rem,
      rgba(94, 234, 212, 0.08) 2.4rem 2.45rem
    ),
    rgba(18, 28, 46, 0.55);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  transform: rotate(3deg);
  animation: stack-float 8s ease-in-out infinite;
}
.atmosphere::after {
  content: "";
  position: absolute;
  right: max(2.5rem, 12vw);
  top: 18%;
  width: min(11rem, 22vw);
  height: 58%;
  border-radius: 1rem;
  border: 1px solid rgba(94, 234, 212, 0.18);
  background: linear-gradient(180deg, rgba(94, 234, 212, 0.08), transparent);
  transform: rotate(-4deg);
  animation: stack-float 10s ease-in-out infinite reverse;
}
@keyframes stack-float {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.brand {
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
}
.top nav { display: flex; gap: 0.75rem; align-items: center; }
.top nav a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-weight: 650;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn.buy { background: var(--accent); color: var(--accent-ink); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.hero {
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
  max-width: 38rem;
  animation: rise 0.7s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.brand-hero {
  font-weight: 800;
  font-size: clamp(3rem, 10vw, 5rem);
  letter-spacing: -0.05em;
  margin: 0 0 1rem;
  line-height: 0.95;
  background: linear-gradient(120deg, var(--ink) 40%, var(--accent) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 {
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
  max-width: 24ch;
  letter-spacing: -0.02em;
}
.lede { color: var(--muted); margin: 0 0 1.75rem; max-width: 34ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.strip {
  padding: 2.5rem 1.5rem 3rem;
  border-top: 1px solid var(--line);
  max-width: 40rem;
}
.strip h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.strip ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.strip li { margin-bottom: 0.45rem; }

.foot {
  padding: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.foot a { color: var(--mint); }

.app-body .workspace {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.status {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  font-family: var(--mono);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
}
.form-grid .full { grid-column: 1 / -1; }
label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}
input, textarea, select {
  font: inherit;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.7rem 0.8rem;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(255, 106, 61, 0.45);
  outline-offset: 1px;
  border-color: transparent;
}
select { cursor: pointer; }

.results {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
  padding: 1rem 1.1rem 1.15rem;
  min-height: 12rem;
}
.panel h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.panel h2 span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
}
.empty {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.5rem 0 0;
}

.bio-list, .link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.bio-item, .link-item {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: rgba(0, 0, 0, 0.18);
  animation: rise 0.35s ease both;
}
.bio-item:nth-child(2) { animation-delay: 0.04s; }
.bio-item:nth-child(3) { animation-delay: 0.08s; }
.bio-item:nth-child(4) { animation-delay: 0.12s; }
.bio-item:nth-child(5) { animation-delay: 0.16s; }
.bio-item:nth-child(6) { animation-delay: 0.2s; }
.bio-meta, .link-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mint);
  background: var(--mint-dim);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}
.chars {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.chars.over { color: var(--warn); }
.bio-text, .link-title {
  margin: 0;
  font-size: 0.95rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.link-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.link-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  min-width: 1.4rem;
  margin-top: 0.15rem;
}
.link-body { flex: 1; min-width: 0; }
.link-hint {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--mono);
}
.icon-btn {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--mint); color: var(--mint); }

.packs {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  background: var(--panel);
}
.packs h3 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}
.pack-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.pack-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  border: 1px solid var(--line);
  font-size: 0.88rem;
}
.pack-list .pack-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.packs.locked { opacity: 0.72; }
.packs .lock-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.watermark {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--mono);
}

dialog {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--bg2);
  color: var(--ink);
  padding: 1.25rem;
  max-width: 22rem;
  width: calc(100% - 2rem);
}
dialog::backdrop { background: rgba(4, 8, 16, 0.7); }
dialog h2 { margin: 0 0 0.5rem; font-size: 1.25rem; letter-spacing: -0.02em; }
dialog p { color: var(--muted); font-size: 0.9rem; }
.err { color: var(--warn); font-size: 0.85rem; }

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink);
  color: var(--bg);
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 40;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 820px) {
  .results { grid-template-columns: 1fr; }
  .atmosphere::before,
  .atmosphere::after { opacity: 0.35; width: 9rem; right: 0.5rem; }
}
@media (max-width: 560px) {
  .top { flex-wrap: wrap; gap: 0.75rem; }
  .form-grid { grid-template-columns: 1fr; }
  .atmosphere::before,
  .atmosphere::after { display: none; }
  .brand-hero { font-size: clamp(2.6rem, 14vw, 3.5rem); }
}
