@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Cormorant+SC:wght@300;400;500&display=swap');

:root {
  --cream:      #F7F4EF;
  --ink:        #1C1917;
  --ink-muted:  #78716C;
  --accent:     #8B6F4E;
  --border:     #DDD7CE;
  --white:      #FDFCFB;
}

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

html { font-size: 18px; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  line-height: 1.75;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */

.site {
  max-width: 640px;
  margin: 0 auto;
  padding: 3.5rem 2rem 7rem;
}

/* ── Profile sidebar layout ───────────────────────────────────────────────── */

.site-profile { /* no width constraint — sidebar layout handles it */ }

.layout-profile {
  display: flex;
  min-height: 100vh;
  max-width: 980px;
  margin: 0 auto;
}

.sidebar {
  width: 200px;
  flex-shrink: 0;
  padding: 3rem 1.75rem 3rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand:hover { text-decoration: none; opacity: 0.75; }

/* Hamburger toggle — hidden on desktop, shown in the mobile top bar.
   Brown lines (the slider accent), no background. */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.25rem;
  margin: 0;
  color: var(--accent);
  cursor: pointer;
  line-height: 0;
}
.nav-toggle:hover { opacity: 0.7; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
}

.sidebar-nav a {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.67rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 0.5rem 0.6rem;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.sidebar-nav a:hover { color: var(--ink); }
.sidebar-nav a.active {
  color: var(--ink);
  border-left-color: var(--accent);
}

.sidebar-footer {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.sidebar-footer a { color: var(--ink-muted); text-decoration: none; }
.sidebar-footer a:hover { color: var(--ink); }

.main-content {
  flex: 1;
  padding: 3.5rem 3rem 5rem;
  min-width: 0;
}

@media (max-width: 720px) {
  .layout-profile { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static;
    border-right: none; border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    flex-direction: column; gap: 0;
  }
  .sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .sidebar-brand { margin-bottom: 0; padding-bottom: 0; border-bottom: none; font-size: 1.3rem; }
  .nav-toggle { display: inline-flex; }

  /* Nav + footer collapse behind the hamburger; revealed when .nav-open. */
  .sidebar-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    flex: none;
    margin-top: 1rem;
  }
  .sidebar.nav-open .sidebar-nav { display: flex; }
  .sidebar-nav a {
    border-left: 2px solid transparent;
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 0.4rem;
    font-size: 0.72rem;
  }
  .sidebar-nav a:last-child { border-bottom: none; }
  .sidebar-nav a.active { color: var(--ink); border-left-color: var(--accent); }

  .sidebar-footer {
    display: none;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 1rem;
  }
  .sidebar.nav-open .sidebar-footer { display: flex; }

  .main-content { padding: 2rem 1.5rem 4rem; }
}

/* ── Hero (landing) ───────────────────────────────────────────────────────── */

/* ── Calendar ─────────────────────────────────────────────────────────────── */

.cal-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.cal-month-title {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--ink-muted);
  text-transform: uppercase;
  font-weight: 400;
  margin: 0;
  border: none;
  padding: 0;
  flex: 1;
  text-align: center;
}

.cal-nav {
  font-size: 1.4rem;
  color: var(--ink-muted);
  text-decoration: none;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  transition: color 0.15s;
}
.cal-nav:hover { color: var(--ink); text-decoration: none; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.cal-weekday {
  background: var(--cream);
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
  padding: 0.6rem 0;
}

.cal-day {
  background: var(--cream);
  min-height: 72px;
  padding: 0.5rem 0.6rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cal-day--empty {
  background: color-mix(in srgb, var(--border) 20%, var(--cream));
}

.cal-day-num {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.cal-empty {
  font-style: italic;
  color: var(--ink-muted);
  margin-top: 2rem;
  text-align: center;
}

/* ── Wax seal ─────────────────────────────────────────────────────────────── */

.seal {
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.18s ease;
  flex-shrink: 0;
  line-height: 0;
}

.seal-art {
  display: block;
  width: 100%;
  height: 100%;
  /* Muted shade so the wax reads soft and tasteful, not full-saturation red. */
  filter: saturate(0.58) brightness(1.06) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28));
  opacity: 0.7;
}

.seal:hover { transform: scale(1.15) rotate(-2deg); }

/* ── Suggestion slide-in panel ────────────────────────────────────────────── */

.panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.15);
  z-index: 99;
}
.panel-overlay.open { display: block; }

.suggestion-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 380px;
  background: var(--cream);
  border-left: 1px solid var(--border);
  padding: 3rem 2.5rem;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  z-index: 100;
}
.suggestion-panel.open { transform: translateX(0); }

.panel-close {
  position: absolute;
  top: 1.5rem; right: 1.75rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--ink-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.4rem;
}
.panel-close:hover { color: var(--ink); }

.panel-date {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  margin: 0 0 0.75rem;
}

.panel-subject {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  margin: 0 0 1.5rem;
  line-height: 1.3;
}

.panel-body {
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.75;
  white-space: pre-wrap;
}

.panel-outcome { margin-top: 1.5rem; }
.outcome-label--did_it     { color: var(--accent); font-style: italic; font-size: 0.9rem; }
.outcome-label--not_now    { color: var(--ink-muted); font-style: italic; font-size: 0.9rem; }
.outcome-label--not_for_me { color: var(--ink-muted); font-style: italic; font-size: 0.9rem; }
.outcome-label--none       { color: var(--border); }

/* ── Panel feedback (react + note) ────────────────────────────────────────── */

.panel-feedback {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.panel-feedback-label {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.85rem;
}

.reaction-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.reaction {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.5rem 0.4rem;
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.reaction:hover { color: var(--ink); border-color: var(--ink); }
.reaction.selected {
  color: var(--cream);
  background: var(--ink);
  border-color: var(--ink);
}

.panel-note {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  color: var(--ink);
  padding: 0.6rem 0.7rem;
  outline: none;
  resize: vertical;
  border-radius: 0;
  -webkit-appearance: none;
  line-height: 1.5;
}
.panel-note:focus { border-color: var(--ink); }

.panel-feedback-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.panel-saved {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--accent);
}

/* ── Standing "tell Serendipity" box ──────────────────────────────────────── */

.tell-box {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.outcome-note-form { margin-top: 2rem; text-align: left; }

/* ── Journal ──────────────────────────────────────────────────────────────── */

.journal-layout {
  display: flex;
  gap: 2.5rem;
  min-height: 60vh;
}

.journal-nav {
  width: 130px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-top: 0.25rem;
}

.journal-tab {
  background: none;
  border: none;
  border-left: 2px solid transparent;
  padding: 0.4rem 0.6rem;
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  cursor: pointer;
  text-align: left;
  transition: color 0.15s, border-color 0.15s;
}
.journal-tab:hover { color: var(--ink); }
.journal-tab.active { color: var(--ink); border-left-color: #6B2737; }

.journal-content { flex: 1; min-width: 0; }

.journal-week { display: none; }
.journal-week.visible { display: block; }

.journal-week-date {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  margin-bottom: 1.5rem;
}

.journal-summary {
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.8;
  white-space: pre-wrap;
}

.journal-suggestions { list-style: none; padding: 0; margin: 0; }

.journal-suggestion-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.journal-suggestion-item:last-child { border-bottom: none; }

.journal-suggestion-subject { color: var(--ink); flex: 1; font-style: italic; }

.journal-outcome {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  flex-shrink: 0;
}

/* ── Brand ────────────────────────────────────────────────────────────────── */

.brand {
  text-align: center;
  margin-bottom: 3.5rem;
}

.brand-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 3.5rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1;
  color: var(--ink);
  letter-spacing: 0.06em;
  display: block;
}

/* ── Step indicator ───────────────────────────────────────────────────────── */

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
}

.step-dot.done   { background: var(--ink-muted); }
.step-dot.active { background: var(--accent); }

/* ── Typography ───────────────────────────────────────────────────────────── */

h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.25;
  margin: 0 0 0.4rem;
}

h2 {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.67rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 400;
  margin: 2.5rem 0 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

p {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  font-size: 1rem;
}

p.lead {
  font-size: 1.05rem;
  color: var(--ink);
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ── Form fields ──────────────────────────────────────────────────────────── */

.field {
  margin-bottom: 2rem;
}

.field label, .field-label {
  display: block;
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.67rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
textarea {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  color: var(--ink);
  padding: 0.35rem 0 0.5rem;
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
  -webkit-appearance: none;
  border-radius: 0;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-bottom-color: var(--ink);
}

textarea {
  line-height: 1.65;
  min-height: 5rem;
}

textarea.tall { min-height: 14rem; }

input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
  color: var(--border);
}

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

.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--cream);
  border: none;
  padding: 0.9rem 2.75rem;
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  margin-top: 0.25rem;
  transition: opacity 0.15s;
  vertical-align: middle;
}
.btn:hover { opacity: 0.75; text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); opacity: 1; }

.invite-share { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 1rem 0 0.5rem; }
#invite-qr svg { width: 100%; height: auto; }

.btn-accent { background: var(--accent); }

/* ── Google sign-in button ────────────────────────────────────────────────── */

.btn-google {
  display: block;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 0.85rem;
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s;
}
.btn-google:hover { border-color: var(--ink); text-decoration: none; }

/* ── AI platform icons ────────────────────────────────────────────────────── */

.ai-platforms { margin-bottom: 0.5rem; }

.ai-label {
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
  font-style: italic;
}

.onboard-privacy {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--ink-muted);
  background: var(--white, #fdfcfb);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin: 1.4rem 0 2rem;
}

/* Onboarding "bring your people" step */
.skip-link {
  font-size: 0.98rem; font-style: italic; color: var(--ink-muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.skip-link:hover { color: var(--ink); }
.invite-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.invite-chip-pill {
  display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.95rem;
  background: var(--white, #fdfcfb); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.35rem 0.55rem 0.35rem 0.9rem;
}
.invite-chip-pill button {
  border: none; background: none; cursor: pointer; color: var(--ink-muted);
  font-size: 1.05rem; line-height: 1; padding: 0;
}
.invite-chip-pill button:hover { color: var(--wine, #7c3b39); }

.ai-icons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.ai-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  opacity: 0.45;
  transition: opacity 0.15s;
}

.ai-icon:hover { opacity: 1; }

.ai-logo {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-logo svg {
  width: 28px;
  height: 28px;
  fill: var(--ink);
}

.ai-logo img {
  width: 28px;
  height: 28px;
  mix-blend-mode: multiply;
  display: block;
}

.ai-name {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.ai-copied {
  display: none;
  margin-top: 1rem;
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  padding-left: 2px;
}
.ai-copied.visible { display: block; }

.paste-area {
  display: none;
  margin-top: 1.5rem;
}
.paste-area.visible { display: block; }

/* ── Profile insight ──────────────────────────────────────────────────────── */

.insight-block {
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.5rem;
  border-left: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 4%, var(--cream));
}

.insight-text {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.75;
}

/* ── Sliders (calibration dials) ──────────────────────────────────────────── */

.dial-row { margin-bottom: 2.25rem; }

.dial-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.9rem;
}

.dial-name {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
}

.dial-meta {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.dial-ends {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

.dial-score {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.85rem;
  color: var(--accent);
  min-width: 1.5rem;
  text-align: right;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1px;
  background: var(--border);
  outline: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 1px var(--accent);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 1px var(--accent);
}

/* ── Divider ──────────────────────────────────────────────────────────────── */

.or-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.25rem 0;
  color: var(--ink-muted);
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.67rem;
  letter-spacing: 0.2em;
}
.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── File upload ──────────────────────────────────────────────────────────── */

.file-drop {
  border: 1px dashed var(--border);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  color: var(--ink-muted);
  font-style: italic;
  transition: border-color 0.15s, color 0.15s;
}
.file-drop:hover { border-color: var(--accent); color: var(--accent); }
.file-drop.has-file { border-color: var(--accent); color: var(--accent); }

input[type="file"] { display: none; }

.file-name {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-top: 0.4rem;
  text-align: center;
}

/* ── Notices ──────────────────────────────────────────────────────────────── */

.notice {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  padding: 0.75rem 1rem;
  margin-bottom: 1.75rem;
}
.notice.success {
  color: var(--accent);
  border-left: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, var(--cream));
}
.notice.error {
  color: #9B1C1C;
  border-left: 2px solid #9B1C1C;
}

/* ── Outcome page ─────────────────────────────────────────────────────────── */

.outcome-wrap {
  text-align: center;
  padding: 5rem 0;
}
.outcome-msg {
  font-style: italic;
  font-size: 1.75rem;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 2rem;
}

/* ── Auth login ───────────────────────────────────────────────────────────── */

.auth-wrap { max-width: 400px; }

/* ── Ops table ────────────────────────────────────────────────────────────── */

.ops-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ops-table th {
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.ops-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

/* ── Profile actions ──────────────────────────────────────────────────────── */

.profile-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2rem;
}

.google-connect {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.google-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.67rem;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
}

.google-status svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
  flex-shrink: 0;
}

.profile-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: 'Cormorant SC', Georgia, serif;
  font-size: 0.67rem;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}

/* ── Save feedback ────────────────────────────────────────────────────────── */

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

.save-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1.5px solid rgba(120, 113, 108, 0.18);
  border-top-color: rgba(120, 113, 108, 0.5);
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.save-tick {
  width: 14px;
  height: 14px;
  display: block;
  color: rgba(120, 113, 108, 0.5);
  flex-shrink: 0;
}

/* ── Circle (correspondents) ──────────────────────────────────────────────── */

/* Relationship = a quiet colour. base tints the ring, label the initial/text. */
.rel-partner{--rel-base:#9c7077;--rel-label:#8f6068}
.rel-friend {--rel-base:#9a8467;--rel-label:#8b7355}
.rel-old    {--rel-base:#ad9760;--rel-label:#917a45}
.rel-parent {--rel-base:#7f8d73;--rel-label:#69755d}
.rel-sibling{--rel-base:#8a7589;--rel-label:#766276}
.rel-new    {--rel-base:#727f90;--rel-label:#5f6b7a}

/* Monogram roundel: engraved stationery — paper ground, hairline ring in the
   relationship colour, initial in a deeper tone. */
.seal-av{position:relative;width:46px;height:46px;flex-shrink:0;border-radius:50%;
  background:var(--white);
  border:1px solid color-mix(in srgb,var(--rel-base,#9a8467) 50%,var(--border));
  display:flex;align-items:center;justify-content:center}
.seal-av::after{content:"";position:absolute;inset:3px;border-radius:50%;
  border:1px solid color-mix(in srgb,var(--rel-base,#9a8467) 26%,transparent)}
.seal-av span{position:relative;z-index:1;font-family:'Cormorant SC',Georgia,serif;font-weight:500;
  font-size:1.1rem;letter-spacing:.02em;color:var(--rel-label,#8b7355)}

.people{display:flex;flex-direction:column}
.person{display:flex;align-items:center;gap:1.1rem;padding:1.15rem .4rem;
  border-bottom:1px solid var(--border);cursor:pointer;transition:background .15s}
.person:hover{background:color-mix(in srgb,var(--accent) 4%,var(--cream))}
.person-body{flex:1;min-width:0}
.person-name{font-size:1.18rem;color:var(--ink);font-style:italic;line-height:1.2}
.person-rel{font-family:'Cormorant SC',Georgia,serif;font-size:.58rem;letter-spacing:.16em;
  text-transform:uppercase;color:var(--rel-label,#8b7355);margin-left:.6rem;font-style:normal;
  white-space:nowrap}
.person-status{font-family:'Cormorant SC',Georgia,serif;font-size:.58rem;letter-spacing:.14em;
  text-transform:uppercase;color:var(--ink-muted);margin-top:.3rem;white-space:nowrap}
.person-reading{font-size:.92rem;color:var(--ink-muted);font-style:italic;margin-top:.15rem;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.plan-ctrl{display:flex;align-items:center;gap:.6rem;flex-shrink:0}
.plan-tag{font-family:'Cormorant SC',Georgia,serif;font-size:.56rem;letter-spacing:.16em;
  text-transform:uppercase;color:var(--ink-muted);opacity:.75}
.toggle{position:relative;width:38px;height:20px;border-radius:20px;background:var(--border);
  border:none;cursor:pointer;transition:background .2s;flex-shrink:0;padding:0}
.toggle::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;
  background:var(--white);box-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform .2s}
.toggle.on{background:var(--accent)}
.toggle.on::after{transform:translateX(18px)}
.cadence{font-family:'Cormorant SC',Georgia,serif;font-size:.58rem;letter-spacing:.12em;
  text-transform:uppercase;color:var(--accent);background:none;border:1px solid var(--border);
  border-radius:20px;padding:.28rem .7rem;cursor:pointer;transition:border-color .15s,opacity .2s;white-space:nowrap}
.cadence:hover{border-color:var(--accent)}
.cadence.hidden{opacity:0;pointer-events:none}

.rel-chips{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:1.1rem}
.rel-chip{font-family:'Cormorant SC',Georgia,serif;font-size:.6rem;letter-spacing:.12em;
  text-transform:uppercase;color:var(--ink-muted);background:none;border:1px solid var(--border);
  border-radius:20px;padding:.4rem .9rem;cursor:pointer;transition:.15s}
.rel-chip:hover{color:var(--ink);border-color:var(--ink)}
.rel-chip.sel{color:var(--cream);background:var(--ink);border-color:var(--ink)}

.circle-add-row{display:flex;gap:1rem;align-items:flex-end;flex-wrap:wrap}
.circle-add-row .field{flex:1;min-width:15rem;margin-bottom:0}

.stranger-box{margin-top:1rem;padding:1.6rem 1.75rem;border-left:2px solid var(--accent);
  background:color-mix(in srgb,var(--accent) 4%,var(--cream))}
.stranger-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}

/* Slide-in correspondent panel reuses .panel-overlay / .suggestion-panel. */
.unread-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--accent);
  vertical-align:3px;margin-left:0.55rem}

.pp-rel-select{font-family:'Cormorant SC',Georgia,serif;font-size:0.66rem;letter-spacing:0.2em;
  text-transform:uppercase;color:var(--rel-label,var(--ink-muted));background:none;border:none;
  border-bottom:1px dashed var(--border);cursor:pointer;outline:none;padding:0.1rem 0;text-align:center}
.pp-desc-input{width:100%;font:inherit;font-style:italic;font-size:0.98rem;color:var(--ink);
  background:none;border:none;border-bottom:1px dashed var(--border);padding:0.3rem 0;outline:none}
.pp-desc-input::placeholder{color:#c9c2b6}
.pp-desc-input:focus,.pp-rel-select:focus{border-bottom-color:var(--ink-muted)}

/* Pending incoming invites — one card per person waiting on your answer */
.invite-strip-label{font-size:0.68rem;letter-spacing:0.22em;text-transform:uppercase;
  color:var(--ink-muted);margin-bottom:1rem}
.invite-strip{display:flex;flex-direction:column;gap:1rem;margin-bottom:2.6rem}
.invite-card2{display:flex;gap:1.1rem;align-items:flex-start;margin:0;
  border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:8px;
  background:var(--white,#fdfcfb);padding:1.2rem 1.3rem}
.invite-card2 .seal-av{width:48px;height:48px}
.invite-card2-body{flex:1;min-width:0}
.invite-card2-head{display:flex;align-items:baseline;gap:0.55rem;flex-wrap:wrap}
.invite-card2-name{font-size:1.15rem;font-style:italic}
.invite-card2-sub{font-family:'Cormorant SC',Georgia,serif;font-size:0.6rem;letter-spacing:0.16em;
  text-transform:uppercase;color:var(--ink-muted)}
.invite-card2-their{font-size:0.92rem;font-style:italic;color:var(--ink-muted);margin-top:0.35rem}
.invite-card2-you{display:flex;align-items:center;gap:0.8rem;flex-wrap:wrap;margin-top:0.9rem}
.invite-card2-label{font-family:'Cormorant SC',Georgia,serif;font-size:0.6rem;letter-spacing:0.14em;
  text-transform:uppercase;color:var(--ink-muted);white-space:nowrap}
.invite-card2-desc{flex:1;min-width:11rem;font:inherit;font-size:0.9rem;font-style:italic;
  background:none;border:none;border-bottom:1px dashed var(--border);outline:none;
  padding:0.25rem 0;color:var(--ink)}
.invite-card2-desc::placeholder{color:#c9c2b6}
.invite-card2-desc:focus{border-bottom-color:var(--ink-muted)}
.invite-chip-av{position:relative}
.invite-chip .seal-av{width:52px;height:52px}
.invite-x{position:absolute;top:-5px;right:-7px;width:18px;height:18px;border-radius:50%;
  background:var(--paper);border:1px solid var(--border);color:var(--ink-muted);
  font-size:0.8rem;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;
  padding:0}
.invite-x:hover{color:var(--accent);border-color:var(--accent)}
.invite-chip-name{font-size:0.98rem;margin-top:0.35rem}
.invite-chip-rel{font-size:0.6rem;letter-spacing:0.18em;text-transform:uppercase;color:var(--rel-label,var(--ink-muted))}
.invite-accept{font:inherit;font-size:0.62rem;letter-spacing:0.18em;text-transform:uppercase;
  margin-top:0.45rem;background:none;border:1px solid var(--border);border-radius:3px;
  color:var(--ink);padding:0.32rem 0.95rem;cursor:pointer}
.invite-accept:hover{border-color:var(--ink);background:var(--ink);color:var(--paper)}
.invite-chip-relsel{font:inherit;font-size:0.66rem;margin-top:0.4rem;background:none;
  border:1px solid var(--border);border-radius:3px;color:var(--ink-muted);padding:0.18rem 0.3rem;max-width:8.5rem}
.invite-chip-desc{font:inherit;font-size:0.82rem;margin-top:0.35rem;background:none;border:none;
  border-bottom:1px dashed var(--border);outline:none;text-align:center;width:9rem;color:var(--ink)}
.invite-chip-desc::placeholder{color:#c9c2b6;font-style:italic}

.panel-seal-wrap{display:flex;justify-content:center;margin-bottom:1.1rem}
.panel-seal-wrap .seal-av{width:60px;height:60px}
.panel-seal-wrap .seal-av span{font-size:1.3rem}
.panel-person-name{text-align:center;font-size:1.5rem;font-style:italic;margin:0 0 .15rem;font-weight:400}
.panel-person-rel{text-align:center;font-family:'Cormorant SC',Georgia,serif;font-size:.58rem;
  letter-spacing:.18em;text-transform:uppercase;color:var(--rel-label,#8b7355);margin-bottom:1.6rem}
.panel-remove{font-family:'Cormorant SC',Georgia,serif;font-size:.6rem;letter-spacing:.14em;
  text-transform:uppercase;color:var(--ink-muted);background:none;border:none;padding:0;cursor:pointer}
.panel-remove:hover{color:#9B1C1C}

/* ── Utility ──────────────────────────────────────────────────────────────── */

.text-muted { color: var(--ink-muted); }
.text-center { text-align: center; }
.mt-1  { margin-top: 1rem; }
.mt-2  { margin-top: 2rem; }
.mb-0  { margin-bottom: 0; }
.mb-2  { margin-bottom: 2rem; }

/* ── Mobile refinements ───────────────────────────────────────────────────────
   One unified pass: the desktop experience translates down, with layouts that
   were built as side-by-side rows stacking instead of squeezing. */
@media (max-width: 720px) {

  /* Journal: week list becomes a horizontal scroll strip above full-width
     entries, instead of a sidebar that starves the textarea of room. */
  .journal-layout { flex-direction: column; gap: 1.4rem; min-height: 0; }
  .journal-nav {
    width: 100%; flex-direction: row; gap: 0.2rem;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--border);
    padding: 0 0 0.1rem; scrollbar-width: none;
  }
  .journal-nav::-webkit-scrollbar { display: none; }
  .journal-tab {
    border-left: none; border-bottom: 2px solid transparent;
    padding: 0.5rem 0.7rem; white-space: nowrap; flex-shrink: 0;
  }
  .journal-tab.active { border-left: none; border-bottom-color: #6B2737; }

  /* AI icons: a clean 3-column grid (two even rows of three) instead of a
     ragged flex wrap where label widths nudge the icons off-axis. */
  .ai-icons {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem 0.5rem; justify-items: center; max-width: 21rem;
  }

  /* Slide-in panel: never wider than the phone. */
  .suggestion-panel { width: min(380px, 92vw); padding: 2.5rem 1.6rem; }

  /* Calendar: tighter cells so seven columns breathe on a phone. */
  .cal-day { min-height: 54px; padding: 0.3rem 0.35rem; }
  .cal-header { gap: 0.8rem; margin-bottom: 1.4rem; }
  .seal { width: 28px; height: 28px; }

  /* Circle rows: the plan caption cedes its space to the person (the
     slide-in panel carries the fully labelled control). */
  .plan-tag { display: none; }
  .person { gap: 0.8rem; }
  .invite-strip { gap: 1rem; }
  .invite-card2 { padding: 1rem 1.1rem; gap: 0.85rem; }
  .invite-card2 .seal-av { width: 42px; height: 42px; }

  /* Invite buttons: compact enough to share a row on a phone. */
  .invite-share .btn { padding: 0.65rem 1rem; font-size: 0.62rem; }

  /* Add-a-correspondent: email field and button stack comfortably. */
  .circle-add-row .field { min-width: 100%; }
  .circle-add-row .btn { width: 100%; text-align: center; }

  /* Profile: keep the Google button on one line. */
  .btn-google { white-space: nowrap; font-size: 0.62rem; padding: 0.7rem 1.1rem; }

  /* Pair-reading and invite text columns already cap their width — give
     them the full phone width instead of desktop side padding. */
  .pr-letter, .pr-together { max-width: 100%; }
}
