:root {
  --bg: #120f1d;
  --bg-2: #1f1831;
  --card: rgba(255, 255, 255, 0.10);
  --card-strong: rgba(255, 255, 255, 0.16);
  --line: rgba(255, 255, 255, 0.18);
  --text: #fff9f0;
  --muted: rgba(255, 249, 240, 0.72);
  --faint: rgba(255, 249, 240, 0.52);
  --accent: #ffb86b;
  --accent-2: #ff6f91;
  --accent-3: #8bd3ff;
  --cool: #9be7ff;
  --success: #a7f3d0;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 184, 107, 0.26), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(139, 211, 255, 0.22), transparent 28%),
    radial-gradient(circle at 50% 80%, rgba(255, 111, 145, 0.19), transparent 35%),
    linear-gradient(135deg, #120f1d 0%, #1d1730 45%, #100f19 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent 80%);
  z-index: 0;
}

.orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
  animation: float 16s ease-in-out infinite alternate;
}

.orb.one { width: 190px; height: 190px; background: rgba(255, 184, 107, 0.18); left: -50px; top: 180px; }
.orb.two { width: 260px; height: 260px; background: rgba(139, 211, 255, 0.13); right: -90px; top: 350px; animation-delay: -7s; }
.orb.three { width: 160px; height: 160px; background: rgba(255, 111, 145, 0.16); left: 40%; bottom: 5%; animation-delay: -3s; }

@keyframes float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(28px, -34px, 0) scale(1.08); }
}

.shell {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(24, 17, 35, 0.76);
  backdrop-filter: blur(22px);
  border-radius: 999px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 14px;
  z-index: 5;
  color: var(--text);
  transition: 180ms ease;
}

.nav.scrolled {
  background: rgba(255, 247, 235, 0.92);
  border-color: rgba(36, 23, 40, 0.12);
  color: #241728;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #211523;
  box-shadow: 0 12px 32px rgba(255, 111, 145, 0.25);
}

.nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255, 255, 255, 0.09);
  color: inherit;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: 180ms ease;
  font-weight: 750;
}

.nav.scrolled .pill {
  background: rgba(36, 23, 40, 0.07);
  border-color: rgba(36, 23, 40, 0.12);
  color: #241728;
}

.pill:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
  padding: 64px 0 36px;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--accent);
  border: 1px solid rgba(255, 184, 107, 0.35);
  background: rgba(255, 184, 107, 0.10);
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(44px, 8vw, 94px);
  letter-spacing: -0.085em;
  line-height: 0.88;
  margin: 0 0 20px;
  max-width: 780px;
}

.highlight {
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
  max-width: 680px;
  margin: 0 0 26px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  font: inherit;
}

.primary {
  border: 0;
  color: #1c1221;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  padding: 14px 19px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(255, 111, 145, 0.24);
  transition: 180ms ease;
  text-decoration: none;
}

.primary:hover { transform: translateY(-2px) scale(1.01); }
.primary:active { transform: translateY(0) scale(0.99); }

.secondary {
  border: 1px solid rgba(139, 211, 255, 0.34);
  color: var(--text);
  background: linear-gradient(135deg, rgba(139, 211, 255, 0.16), rgba(155, 231, 255, 0.08));
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: 180ms ease;
  text-decoration: none;
}

.secondary-memory {
  color: #eafaff;
  box-shadow: 0 14px 34px rgba(139, 211, 255, 0.12);
}

.secondary:hover {
  background: linear-gradient(135deg, rgba(139, 211, 255, 0.24), rgba(155, 231, 255, 0.13));
  transform: translateY(-2px);
}

.secondary:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.drawer-stage {
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06)),
    radial-gradient(circle at top, rgba(255, 184, 107, 0.16), transparent 40%);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.drawer-stage::after {
  content: "";
  position: absolute;
  inset: auto -20% -50% -20%;
  height: 220px;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.16), transparent 65%);
}

.ticket-stack {
  position: relative;
  height: 100%;
  min-height: 370px;
  display: grid;
  place-items: center;
}

.fake-ticket {
  position: absolute;
  width: min(320px, 88%);
  height: 210px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.10);
  transform: rotate(var(--r)) translateY(var(--y));
  opacity: var(--o);
}

.plot-card {
  width: min(390px, 94%);
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.24);
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.96), rgba(255, 235, 214, 0.92));
  color: #211523;
  padding: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.32);
  position: relative;
  z-index: 2;
  transition: 260ms ease;
}

.plot-card.drawing {
  animation: shuffle 720ms ease both;
}

@keyframes shuffle {
  0% { transform: rotate(0deg) translateY(0) scale(1); filter: blur(0); }
  20% { transform: rotate(-7deg) translateX(-16px) translateY(-10px) scale(0.96); filter: blur(1px); }
  45% { transform: rotate(9deg) translateX(18px) translateY(4px) scale(1.02); }
  70% { transform: rotate(-3deg) translateX(-7px) translateY(-5px) scale(0.99); }
  100% { transform: rotate(0deg) translateY(0) scale(1); filter: blur(0); }
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.category {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(33, 21, 35, 0.08);
  font-weight: 850;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.plot-number {
  color: rgba(33, 21, 35, 0.56);
  font-weight: 800;
  font-size: 13px;
}

.plot-title {
  margin: 0 0 12px;
  font-size: 30px;
  letter-spacing: -0.055em;
  line-height: 1;
}

.plot-idea {
  color: rgba(33, 21, 35, 0.78);
  line-height: 1.55;
  font-weight: 560;
  margin: 0 0 18px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.meta {
  padding: 10px;
  border-radius: 16px;
  background: rgba(33, 21, 35, 0.07);
}

.meta small {
  display: block;
  color: rgba(33, 21, 35, 0.55);
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 850;
  margin-bottom: 4px;
}

.meta span {
  font-size: 12px;
  font-weight: 800;
}

.why {
  border-left: 3px solid var(--accent-2);
  padding: 9px 0 9px 12px;
  color: rgba(33, 21, 35, 0.78);
  font-size: 14px;
  line-height: 1.45;
  background: rgba(255, 111, 145, 0.07);
  border-radius: 0 14px 14px 0;
  margin: 0 0 16px;
}

.steps {
  margin: 0;
  padding-left: 18px;
  color: rgba(33, 21, 35, 0.74);
  font-size: 14px;
  line-height: 1.55;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0 0;
}

.stat {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  border-radius: var(--radius-md);
  padding: 14px;
}

.stat strong {
  display: block;
  font-size: 24px;
  letter-spacing: -0.05em;
}

.stat span {
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
}

section {
  margin-top: 28px;
}

.panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-head-clean {
  display: block;
}

h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 46px);
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.section-head p {
  color: var(--muted);
  max-width: 560px;
  line-height: 1.55;
  margin: 0;
}

.section-head-clean p {
  margin-top: 12px;
  max-width: 760px;
}

.log-grid {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 18px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 9px;
}

textarea, input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  border-radius: 18px;
  padding: 14px;
  outline: none;
  resize: vertical;
  min-height: 132px;
}

input, select {
  min-height: 48px;
  resize: none;
}

select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--text) 50%) calc(100% - 20px) calc(50% - 3px)/6px 6px no-repeat,
    linear-gradient(135deg, var(--text) 50%, transparent 50%) calc(100% - 14px) calc(50% - 3px)/6px 6px no-repeat,
    rgba(255, 255, 255, 0.09);
}

select option {
  background: #241b35;
  color: #fff9f0;
}

textarea::placeholder, input::placeholder { color: rgba(255, 249, 240, 0.38); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0;
}

.note-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.privacy-note {
  color: var(--faint);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 14px;
  border: 1px solid rgba(167, 243, 208, 0.22);
  background: rgba(167, 243, 208, 0.06);
  border-radius: 16px;
  padding: 12px;
}

.memory-list {
  display: grid;
  gap: 10px;
  max-height: 460px;
  overflow: auto;
  padding-right: 4px;
}

.memory {
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.07);
  border-radius: 18px;
}

.memory strong {
  display: block;
  margin-bottom: 5px;
  letter-spacing: -0.02em;
}

.memory small {
  color: var(--faint);
  display: block;
  margin-bottom: 8px;
}

.memory p {
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
  font-size: 14px;
  white-space: pre-wrap;
}

.idea-bank {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.bank-item {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 14px;
  min-height: 132px;
}

.bank-item span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.bank-item strong {
  display: block;
  margin: 8px 0;
  letter-spacing: -0.025em;
  font-size: 18px;
}

.bank-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(167, 243, 208, 0.32);
  color: var(--success);
  background: rgba(167, 243, 208, 0.08);
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 20px 0;
}

.feature-card {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.07);
  color: var(--text);
  border-radius: 20px;
  padding: 16px;
  min-height: 150px;
  cursor: pointer;
  transition: 180ms ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.12);
}

.feature-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.feature-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  border: 1px solid var(--line);
  background: rgba(25, 20, 39, 0.88);
  color: var(--text);
  backdrop-filter: blur(18px);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: 220ms ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

footer {
  color: var(--faint);
  text-align: center;
  padding: 32px 0 0;
  font-size: 13px;
}

.tiny {
  color: var(--faint);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1020px) {
  .idea-bank, .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 880px) {
  .hero, .log-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .idea-bank, .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 10px;
  }

  .nav {
    align-items: flex-start;
    border-radius: 24px;
  }

  .nav-actions {
    display: none;
  }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 20px, var(--max)); padding-top: 10px; }
  .hero { padding-top: 40px; }
  .drawer-stage { padding: 14px; }
  .plot-card { width: 100%; padding: 20px; }
  .plot-title { font-size: 26px; }
  .stats, .idea-bank, .feature-grid, .form-row {
    grid-template-columns: 1fr;
  }
  .meta-grid { grid-template-columns: 1fr; }
  h1 { font-size: 50px; }
}
