*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --cream:        #FFF8EC;
  --parchment:    #F5ECD7;
  --amber:        #F4C842;
  --amber-hover:  #d4ab20;
  --amber-bg:     #FEF9D9;
  --green:        #8FB89A;
  --green-hover:  #6fa07e;
  --green-bg:     #EBF5ED;
  --brown:        #1B2444;
  --brown-dark:   #1B2444;
  --brown-mid:    #2A3A6B;
  --brown-light:  #4A5A8A;
  --brown-pale:   #DDD5C0;
  --border:       #DDD5C0;
  --shadow:       rgba(27, 36, 68, 0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Quicksand', sans-serif;
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 15% 60%, rgba(244,200,66,0.04) 0%, transparent 55%),
    radial-gradient(circle at 85% 15%, rgba(143,184,154,0.04) 0%, transparent 50%);
  color: var(--brown);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Nunito', sans-serif;
  line-height: 1.25;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Nav ─────────────────────────────── */

nav {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(27, 36, 68, 0.97);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: 'Baloo 2', cursive;
  font-size: 1.35rem;
  font-weight: 800;
  color: #F5ECD7;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a.link {
  color: #F5ECD7;
  opacity: 0.8;
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-links a.link:hover { opacity: 1; }

/* ── Buttons ─────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: 100px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  line-height: 1;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--amber);
  color: #1B2444;
  box-shadow: 0 2px 8px rgba(244, 200, 66, 0.35);
}
.btn-primary:hover {
  background: var(--amber-hover);
  box-shadow: 0 4px 12px rgba(244, 200, 66, 0.4);
}

.btn-green {
  background: var(--green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(143, 184, 154, 0.3);
}
.btn-green:hover {
  background: var(--green-hover);
  box-shadow: 0 4px 12px rgba(143, 184, 154, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--brown-mid);
}
.btn-outline:hover { border-color: var(--brown-mid); }

/* Outline button inside dark nav */
nav .btn-outline {
  border-color: rgba(245, 236, 215, 0.35);
  color: #F5ECD7;
}
nav .btn-outline:hover {
  border-color: rgba(245, 236, 215, 0.7);
}

.btn-lg {
  padding: 0.9rem 2.2rem;
  font-size: 1.05rem;
}

.btn-block {
  display: block;
  text-align: center;
}

/* ── Hero ────────────────────────────── */

#hero {
  padding: 4.5rem 0 3.5rem;
  text-align: center;
}

#hero h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  color: var(--brown);
  max-width: 700px;
  margin: 0 auto 1rem;
}

#hero .lead {
  font-size: 1.1rem;
  color: var(--brown-mid);
  max-width: 540px;
  margin: 0 auto 2rem;
}

#hero .cta-note {
  margin-top: 0.75rem;
  font-size: 0.83rem;
  color: var(--brown-light);
}

/* ── Story sample ────────────────────── */

#sample {
  padding: 3rem 0 4rem;
}

.story-card {
  background: var(--parchment);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem 2.5rem 1.5rem;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: 0 4px 24px var(--shadow);
}

.story-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brown-light);
  margin-bottom: 0.6rem;
}

.story-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.story-excerpt {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--brown);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  padding-bottom: 1.5rem;
}

.story-meta {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--brown-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Section header ──────────────────── */

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--brown-mid);
  max-width: 500px;
  margin: 0 auto;
}

/* ── How it works ────────────────────── */

#how-it-works {
  padding: 4.5rem 0;
  background: var(--parchment);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 620px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step { text-align: center; padding: 1rem; }

.step-num {
  width: 2.6rem;
  height: 2.6rem;
  background: var(--amber);
  color: #1B2444;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 2px 8px rgba(244, 200, 66, 0.4);
}

.step h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.step p { color: var(--brown-mid); font-size: 0.93rem; }

/* ── Pricing ─────────────────────────── */

#pricing { padding: 4.5rem 0; }

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 680px;
  margin: 0 auto;
}

@media (min-width: 560px) {
  .pricing-grid { grid-template-columns: 1fr 1fr; }
}

.pricing-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pricing-card.featured {
  border-color: var(--green);
  background: var(--green-bg);
}

.plan-name {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brown-light);
  margin-bottom: 0.5rem;
}

.plan-price {
  font-family: 'Baloo 2', cursive;
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--brown);
  margin-bottom: 0.2rem;
}

.plan-price sub {
  font-size: 1rem;
  font-weight: 400;
  color: var(--brown-light);
  vertical-align: baseline;
}

.plan-desc {
  font-size: 0.88rem;
  color: var(--brown-mid);
  margin-bottom: 1.5rem;
}

.plan-features {
  list-style: none;
  margin-bottom: 1.75rem;
  flex: 1;
}

.plan-features li {
  font-size: 0.9rem;
  color: var(--brown-mid);
  padding: 0.3rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.plan-features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── FAQ ─────────────────────────────── */

#faq {
  padding: 4.5rem 0;
  background: var(--parchment);
  border-top: 1px solid var(--border);
}

.faq-list {
  max-width: 680px;
  margin: 0 auto;
}

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }

details { padding: 1.2rem 0; }

summary {
  font-weight: 700;
  font-size: 0.97rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--brown);
  user-select: none;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--brown-light);
  flex-shrink: 0;
}

details[open] summary::after { content: '−'; }

details p {
  margin-top: 0.75rem;
  color: var(--brown-mid);
  font-size: 0.93rem;
  line-height: 1.75;
}

/* ── Footer ──────────────────────────── */

footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

@media (min-width: 600px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-company {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.footer-links { display: flex; gap: 1.5rem; }

.footer-links a, footer small {
  color: var(--brown-light);
  font-size: 0.83rem;
  text-decoration: none;
}

.footer-links a:hover { color: var(--brown-mid); }

/* ── App: shared ─────────────────────────── */

.app-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Auth view ───────────────────────────── */

#view-auth {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px var(--shadow);
}

.auth-logo {
  display: flex;
  justify-content: center;
  text-decoration: none;
  margin-bottom: 1.75rem;
}

.auth-logo img {
  height: 48px;
  width: auto;
}

.auth-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 1.75rem;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  padding: 0.6rem 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brown-light);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.auth-tab.active {
  color: var(--brown);
  border-bottom-color: var(--amber);
}

.auth-form { display: flex; flex-direction: column; gap: 1rem; }

.form-field { display: flex; flex-direction: column; gap: 0.35rem; }

.form-field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brown-mid);
}

.form-field input {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--brown);
  background: var(--cream);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-field input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(244, 200, 66, 0.18);
}

.form-error {
  font-size: 0.85rem;
  color: #c0392b;
  background: #fdf0ee;
  border: 1px solid #f5c6c2;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.25rem;
}

.auth-note {
  font-size: 0.8rem;
  color: var(--brown-light);
  text-align: center;
  margin-top: 0.25rem;
}

.auth-form .btn { margin-top: 0.25rem; }

/* ── Loading screen ──────────────────────── */

#view-loading {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  color: var(--brown-light);
  font-size: 0.95rem;
}

.spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Onboarding / Dashboard base ─────────── */

#view-onboarding,
#view-dashboard {
  min-height: calc(100vh - 64px);
  padding: 2.5rem 0;
}

/* ── Wizard ──────────────────────────────── */

.wizard {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.wizard-progress-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.wizard-progress-fill {
  height: 100%;
  background: var(--amber);
  border-radius: 2px;
  transition: width 0.35s ease;
}

.wizard-step-label {
  font-size: 0.78rem;
  color: var(--brown-light);
  margin-bottom: 1.5rem;
}

.wizard-body {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 1.25rem;
}

.wizard-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.wizard-hint {
  font-size: 0.87rem;
  color: var(--brown-light);
  margin-bottom: 1.25rem;
}

.wizard-field-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brown-mid);
  margin-bottom: 0.6rem;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2rem;
}

/* ── Age options ─────────────────────────── */

.age-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.age-option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.age-option input[type=radio] { accent-color: var(--amber); flex-shrink: 0; }

.age-option.selected {
  border-color: var(--amber);
  background: var(--amber-bg);
}

.age-texts { display: flex; flex-direction: column; gap: 0.1rem; }
.age-label  { font-weight: 700; font-size: 0.95rem; }
.age-desc   { font-size: 0.8rem; color: var(--brown-light); }

/* ── Interests grid ──────────────────────── */

.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.interest-card {
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 0.75rem 0.4rem;
  text-align: center;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  user-select: none;
}

.interest-card:active { transform: scale(0.97); }

.interest-card.selected {
  border-color: var(--amber);
  background: var(--amber-bg);
}

.i-icon  { font-size: 1.7rem; display: block; margin-bottom: 0.3rem; }
.i-label { font-size: 0.78rem; font-weight: 700; color: var(--brown); }

.custom-interest-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.custom-interest-row input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  color: var(--brown);
  background: var(--cream);
}

.custom-interest-row input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(244, 200, 66, 0.18);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--amber-bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.25rem 0.65rem;
  font-size: 0.82rem;
  color: var(--brown-mid);
}

.chip-rm {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--brown-light);
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}
.chip-rm:hover { color: #c0392b; }

/* ── People ──────────────────────────────── */

.people-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.person-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.person-name { font-weight: 700; font-size: 0.9rem; }
.person-type { font-size: 0.82rem; color: var(--brown-light); }

.person-rm {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--brown-light);
  font-size: 1.25rem;
  padding: 0.1rem 0.3rem;
  line-height: 1;
}
.person-rm:hover { color: #c0392b; }

.add-person-form {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
}

.rel-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.rel-tab {
  padding: 0.35rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: #fff;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--brown-light);
  cursor: pointer;
  transition: all 0.15s;
}

.rel-tab.active {
  border-color: var(--amber);
  background: var(--amber-bg);
  color: var(--brown);
}

.person-inputs input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  color: var(--brown);
  background: #fff;
}

.person-inputs input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(244, 200, 66, 0.18);
}

.person-inputs select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  color: var(--brown);
  background: #fff;
  cursor: pointer;
}

.person-inputs select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(244, 200, 66, 0.18);
}

.person-icon { margin-right: 0.35rem; font-size: 1rem; }

.gender-tabs { margin-top: 0.5rem; }

/* ── Step 3: settings ────────────────────── */

.settings-group { margin-bottom: 1.75rem; }
.settings-group:last-child { margin-bottom: 0; }

.lang-toggle {
  display: flex;
  gap: 0.5rem;
}

.lang-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brown-light);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.lang-btn.active {
  border-color: var(--green);
  background: var(--green-bg);
  color: var(--brown);
}

.time-select-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.time-select {
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--brown);
  background: var(--cream);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  min-width: 4.5rem;
  text-align: center;
}

.time-select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(244, 200, 66, 0.18);
}

.time-input {
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--brown);
  background: var(--cream);
  outline: none;
}

.time-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(244, 200, 66, 0.18);
}

.time-colon {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brown);
}

.avoid-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.avoid-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--brown-mid);
  cursor: pointer;
}

.avoid-item input[type=checkbox] { accent-color: var(--amber); width: 1rem; height: 1rem; }

.day-picker { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.35rem; }
.day-btn {
  padding: 0.35rem 0.7rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600;
  border: 1.5px solid var(--brown-pale); background: #fff; color: var(--brown-mid);
  cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.day-btn.selected { background: var(--amber); border-color: var(--amber); color: #fff; }
.day-btn:hover:not(.selected) { border-color: var(--amber); color: var(--amber); }

/* ── Dashboard ───────────────────────────── */

.dash-header {
  padding: 2rem 0 1.5rem;
}

.dash-title {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.sub-badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
}

.sub-badge--trial    { background: var(--amber-bg);  color: var(--amber-hover); border: 1px solid var(--border); }
.sub-badge--active   { background: var(--green-bg);  color: var(--green);       border: 1px solid var(--green); }
.sub-badge--cancelled,
.sub-badge--expired  { background: #fdf0ee;           color: #c0392b;            border: 1px solid #f5c6c2; }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
}

.dash-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
}

.dash-history-card { margin-bottom: 2rem; }

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.dash-card-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
}

/* Profile card */

.profile-rows {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.profile-row--top { align-items: flex-start; }

.profile-row-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brown-light);
  width: 4.5rem;
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.interest-tag {
  background: var(--amber-bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.15rem 0.55rem;
  font-size: 0.78rem;
  color: var(--brown-mid);
}

.interest-tag--more { color: var(--brown-light); cursor: pointer; }
.interest-tag--more:hover { background: var(--parchment); border-color: var(--amber); color: var(--brown); }

.people-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.person-tag {
  font-size: 0.82rem;
  color: var(--brown-mid);
  background: var(--green-bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.15rem 0.55rem;
}

/* Subscription card */

.sub-status-text {
  font-size: 0.93rem;
  color: var(--brown-mid);
  margin-bottom: 0.5rem;
}

.sub-hint {
  font-size: 0.82rem;
  color: var(--brown-light);
  margin-bottom: 1.25rem;
}

.sub-plans {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sub-plan {
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sub-plan--featured {
  border-color: var(--green);
  background: var(--green-bg);
}

.sub-plan-name  { font-size: 0.82rem; font-weight: 700; color: var(--brown-mid); }
.sub-plan-price { font-family: 'Baloo 2', cursive; font-size: 1.15rem; font-weight: 700; color: var(--brown); }

/* History */

.dash-loading-sm {
  font-size: 0.9rem;
  color: var(--brown-light);
  padding: 0.5rem 0;
}

.history-empty { padding: 0.5rem 0; }
.history-empty p       { font-size: 0.93rem; color: var(--brown-mid); }
.history-empty-hint    { font-size: 0.85rem; color: var(--brown-light); margin-top: 0.35rem; }

.story-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.story-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.story-item:last-child { border-bottom: none; }

.story-date       { font-size: 0.78rem; color: var(--brown-light); flex-shrink: 0; width: 4.5rem; }
.story-item-title { font-size: 0.9rem; font-weight: 700; color: var(--brown); }

/* ── Toast ───────────────────────────────── */

.dash-toast {
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.dash-toast--success {
  background: var(--green-bg);
  border: 1px solid var(--green);
  color: var(--green);
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: inherit;
  opacity: 0.6;
  flex-shrink: 0;
  line-height: 1;
}
.toast-close:hover { opacity: 1; }

/* ── Story item — clickable ──────────────── */

.story-item--clickable {
  cursor: pointer;
  border-radius: 10px;
  margin: 0 -0.6rem;
  padding: 0.75rem 0.6rem;
  transition: background 0.12s;
}

.story-item--clickable:hover { background: var(--amber-bg); }
.story-item--clickable:active { background: var(--parchment); }

/* ── Story modal ─────────────────────────── */

.story-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem;
}

.story-modal.is-open { display: flex; }

.story-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 36, 68, 0.55);
  backdrop-filter: blur(3px);
}

.story-modal-panel {
  position: relative;
  z-index: 1;
  background: var(--parchment);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(27, 36, 68, 0.22);
}

.story-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.story-modal-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brown);
  line-height: 1.35;
}

.story-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--brown-light);
  line-height: 1;
  padding: 0.1rem 0.25rem;
  flex-shrink: 0;
  transition: color 0.12s;
}
.story-modal-close:hover { color: var(--brown); }

.story-modal-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.story-modal-actions:not(:empty) {
  margin-bottom: 1.25rem;
}

.story-action-btn.active {
  background: var(--amber-bg);
  border-color: var(--amber);
  color: var(--amber-hover);
}

.story-modal-body {
  font-size: 0.97rem;
  line-height: 1.85;
  color: var(--brown);
}

.story-modal-body p { margin: 0 0 1em; }
.story-modal-body p:last-child { margin-bottom: 0; }

/* ── Mobile responsive ───────────────────── */

@media (max-width: 480px) {
  /* Landing nav: hide secondary login link, keep CTA only */
  .nav-links a.link {
    display: none;
  }

  /* App nav: buttons overflow on small phones — show compact icon/short text */
  .app-nav-inner .btn {
    font-size: 0;
    padding: 0.5rem 0.65rem;
  }
  .app-nav-inner .btn::before {
    content: attr(data-short);
    font-size: 0.88rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
  }

  /* Story sample card: reduce heavy side padding */
  .story-card {
    padding: 1.5rem 1.5rem 1.25rem;
  }
}

/* ── Edit profile modal ───────────────────────────────────────────────────── */

.edit-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem;
}

.edit-modal.is-open { display: flex; }

.edit-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 36, 68, 0.55);
  backdrop-filter: blur(3px);
}

.edit-modal-panel {
  position: relative;
  z-index: 1;
  background: var(--parchment);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(27, 36, 68, 0.22);
}

.edit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.edit-modal-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brown);
}

.edit-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--brown-light);
  line-height: 1;
  padding: 0.1rem 0.25rem;
  flex-shrink: 0;
  transition: color 0.12s;
}
.edit-modal-close:hover { color: var(--brown); }

.edit-modal-body {
  overflow-y: auto;
  padding: 1.5rem 1.75rem 1.75rem;
  flex: 1;
}

.em-people-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.em-person-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.45rem 0.75rem;
}

.em-person-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--brown);
}

.em-person-rel {
  font-size: 0.8rem;
  color: var(--brown-light);
  flex: 1;
}

.em-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--brown-light);
  line-height: 1;
  padding: 0.1rem 0.2rem;
  transition: color 0.12s;
  flex-shrink: 0;
}
.em-remove-btn:hover { color: #c0392b; }

@media (max-width: 480px) {
  .edit-modal {
    padding: 0;
    align-items: flex-end;
  }

  .edit-modal-panel {
    border-radius: 20px 20px 0 0;
    max-height: 94dvh;
    max-width: 100%;
  }

  .edit-modal-header {
    padding: 1.25rem 1.25rem 0.75rem;
  }

  .edit-modal-body {
    padding: 1.25rem 1.25rem 2rem;
  }
}
