*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: #EDEAF2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#app {
  width: 100%;
  max-width: 448px;
  background: #FBFAFC;
  border-radius: 24px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.10), 0 8px 10px -6px rgba(0,0,0,0.10);
  padding: 28px;
  position: relative;
}

/* ── Navigation bar ── */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  height: 20px;
}
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #9B8AAE;
  padding: 0;
  display: flex;
  align-items: center;
  line-height: 1;
}
.icon-btn:hover { color: #2A2138; }

/* ── Eyebrow label ── */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: #9B8AAE;
  margin-bottom: 12px;
}

/* ── Question block ── */
.question-wrap { margin-bottom: 28px; }
.question-text {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  font-size: 26px;
  line-height: 1.2;
  color: #2A2138;
  margin-bottom: 8px;
}
.question-hint {
  color: #9B8AAE;
  font-size: 13px;
  line-height: 1.4;
}

/* ── Choice buttons ── */
.choice {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid #E4DEEE;
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #FBFAFC;
  color: #2A2138;
  font-family: 'Inter', sans-serif;
}
.choice:hover { border-color: #C28E2A; background: #F7F0E0; }
.choice-primary { background: #2A2138; color: #FBFAFC; border-color: #2A2138; }
.choice-primary:hover { background: #3a2e4d; border-color: #3a2e4d; }

/* ── Start screen ── */
.start-wrap { text-align: center; padding: 8px 0; }
.pulse-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pulse-bg {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #C28E2A;
  animation: pulseGlow 2.6s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50%       { transform: scale(1.18); opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) { .pulse-bg { animation: none; } }
.pulse-icon { position: relative; display: flex; }

.start-title {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  font-size: 26px;
  color: #2A2138;
  margin-bottom: 8px;
}
.start-sub { color: #6E6380; font-size: 14px; margin-bottom: 24px; }

.text-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #E4DEEE;
  margin-bottom: 24px;
  color: #2A2138;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  outline: none;
  background: #FBFAFC;
}
.text-input:focus { border-color: #C28E2A; }
.text-input::placeholder { color: #9B8AAE; }

/* ── Create-space body text ── */
.body-text { color: #6E6380; font-size: 15px; margin-bottom: 28px; }

/* ── Space screen warning ── */
.still-planned-note {
  color: #B5762A;
  font-size: 13px;
  font-weight: 500;
  margin-top: -12px;
  margin-bottom: 16px;
}

/* ── Outcome screens ── */
.outcome-wrap { text-align: center; padding: 8px 0; }
.outcome-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.outcome-title {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 8px;
}
.outcome-sub { color: #6E6380; font-size: 15px; margin-bottom: 20px; }
.outcome-body { color: #6E6380; font-size: 14px; margin-bottom: 8px; }
.restart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6E6380;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  background: none;
  border: none;
  cursor: pointer;
  margin-top: 24px;
}
.restart-btn:hover { color: #2A2138; }

/* ── History panel ── */
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.history-title {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  font-size: 22px;
  color: #2A2138;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}
.history-entry { border: 1px solid #E4DEEE; border-radius: 12px; padding: 12px 16px; }
.history-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.history-entry-name { font-weight: 500; color: #2A2138; font-size: 15px; }
.history-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #F2EFF5;
}
.history-entry-reason { color: #6E6380; font-size: 13px; margin-bottom: 4px; }
.history-entry-date { color: #9B8AAE; font-size: 11px; }
.history-msg { color: #6E6380; font-size: 14px; }
.history-error { color: #9B3C3C; font-size: 14px; }
.clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9B3C3C;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  background: none;
  border: none;
  cursor: pointer;
  margin-top: 20px;
}
.clear-btn:hover { opacity: 0.75; }
