/* ──────────────────────────────────────────
   Montaigne Chatbot - Refined Styles
   Mobile-first, warm parchment aesthetic
   ────────────────────────────────────────── */

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

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

:root {
  --ink:         #2c1a0e;
  --ink-light:   #5a4535;
  --parchment:   #faf6ed;
  --parchment2:  #f3ede0;
  --parchment3:  #ebe4d4;
  --brown:       #7a4f2a;
  --brown-dark:  #5a3520;
  --brown-darkest: #3d2215;
  --brown-light: #c4956a;
  --brown-muted: #a08060;
  --gold:        #9a7b4f;
  --gold-light:  #c9a96e;
  --sepia:       #704214;
  --shadow-warm: rgba(90, 53, 32, 0.08);
  --shadow-md:   rgba(90, 53, 32, 0.12);
  --shadow-lg:   rgba(90, 53, 32, 0.18);
  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui:      'Inter', system-ui, sans-serif;
  --transition:   0.2s ease;
  --header-height: 60px;
  --sidebar-width: 280px;
  --safe-bottom:  env(safe-area-inset-bottom, 0px);
  --safe-top:     env(safe-area-inset-top, 0px);
  --guest-banner-height: 0px;
}

[data-theme="dark"] {
  --ink:         #e8dcc8;
  --ink-light:   #c9b9a0;
  --parchment:   #1a1612;
  --parchment2:  #221d17;
  --parchment3:  #2a241d;
  --brown:       #c4956a;
  --brown-dark:  #a07850;
  --brown-darkest: #805830;
  --brown-light: #d4a87a;
  --brown-muted: #907050;
  --gold:        #c9a96e;
  --gold-light:  #e0c080;
  --sepia:       #d4a060;
  --shadow-warm: rgba(0, 0, 0, 0.2);
  --shadow-md:   rgba(0, 0, 0, 0.3);
  --shadow-lg:   rgba(0, 0, 0, 0.4);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-display);
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ──────────────────────────────────────────
   Paper Texture Overlay
   ────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ──────────────────────────────────────────
   LOGO SVG
   ────────────────────────────────────────── */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brown-light);
  box-shadow: 0 1px 4px var(--shadow-warm);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--brown-darkest);
}

[data-theme="dark"] .logo-title {
  color: var(--ink);
}

[data-theme="dark"] .logo-subtitle {
  color: var(--ink-light);
}

.logo-subtitle {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--brown-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ──────────────────────────────────────────
   AUTH PAGE (index.html)
   ────────────────────────────────────────── */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1.5rem;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(196, 149, 106, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(154, 123, 79, 0.06) 0%, transparent 50%),
    var(--parchment2);
}

.auth-box {
  background: var(--parchment);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-xl);
  box-shadow: 
    0 4px 6px var(--shadow-warm),
    0 12px 24px var(--shadow-md),
    0 24px 48px var(--shadow-warm);
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--parchment3);
  position: relative;
  overflow: hidden;
}

.auth-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brown-light), var(--gold), var(--brown-light));
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--parchment3);
}

.auth-logo .logo-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 0.75rem;
  border-width: 3px;
}

.auth-logo .logo-title {
  font-size: 1.8rem;
}

.auth-tagline {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--brown-muted);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

.auth-box h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--brown-dark);
  margin-bottom: 1.25rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-light);
  margin-bottom: 0.4rem;
}

.form-group input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--parchment3);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-ui);
  transition: all var(--transition);
  background: var(--parchment);
  color: var(--ink);
}

.form-group input:focus {
  outline: none;
  border-color: var(--brown-light);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.15);
}

.form-group input::placeholder {
  color: var(--brown-muted);
  opacity: 0.7;
}

.btn-primary {
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, var(--brown) 0%, var(--brown-dark) 100%);
  color: var(--parchment);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow-md);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0);
}

.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 1.25rem;
  color: var(--brown-muted);
  font-family: var(--font-ui);
}

.auth-switch a {
  color: var(--brown);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.auth-switch a:hover {
  color: var(--brown-dark);
  text-decoration: underline;
}

.auth-box-landing {
  max-width: 480px;
}

.auth-daily-quote {
  padding: 1rem 0;
  margin-bottom: 0.5rem;
  border-top: 1px solid var(--parchment3);
  border-bottom: 1px solid var(--parchment3);
  text-align: center;
}

.auth-daily-quote .quote-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 0.4rem;
}

.auth-daily-quote .quote-source {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--brown-muted);
}

.auth-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--parchment3);
}

.auth-feature {
  text-align: center;
  padding: 0.5rem;
}

.auth-feature .feature-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--parchment2);
  border-radius: 50%;
  color: var(--brown);
}

.auth-feature .feature-icon svg {
  width: 18px;
  height: 18px;
}

.auth-feature h4 {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brown-dark);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-feature p {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--brown-muted);
  line-height: 1.4;
}

.auth-guest-cta {
  padding: 1rem 0 0.5rem;
  text-align: center;
}

.btn-secondary {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--brown);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: var(--brown);
  color: var(--parchment);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  padding: 0.75rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--parchment3);
}

.auth-divider span {
  padding: 0 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--brown-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 480px) {
  .auth-features {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .auth-feature {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 0.5rem 0;
    gap: 0.75rem;
  }
  
  .auth-feature .feature-icon {
    margin: 0;
    flex-shrink: 0;
  }
  
  .auth-feature h4 {
    margin-bottom: 0.15rem;
  }
}

/* ──────────────────────────────────────────
   CHAT PAGE LAYOUT
   ────────────────────────────────────────── */
.chat-page {
  height: 100vh;
  overflow: hidden;
}

.chat-layout {
  display: flex;
  height: 100%;
  max-height: 100vh;
  max-height: 100dvh;
  padding-top: var(--guest-banner-height);
}

/* ── Mobile Header ── */
.mobile-header {
  display: none;
  position: fixed;
  top: var(--guest-banner-height);
  left: 0;
  right: 0;
  height: var(--header-height);
  padding-top: var(--safe-top);
  background: var(--parchment);
  border-bottom: 1px solid var(--parchment3);
  z-index: 100;
  align-items: center;
  padding-left: 1rem;
  padding-right: 1rem;
  gap: 0.75rem;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--brown-dark);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.menu-toggle:hover,
.menu-toggle:focus {
  background: var(--parchment3);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

.mobile-header .logo-icon {
  width: 36px;
  height: 36px;
}

.mobile-header .logo-title {
  font-size: 1.1rem;
}

.mobile-header .logo-subtitle {
  color: var(--brown-muted);
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.68rem;
  white-space: nowrap;
}

.mobile-header-spacer {
  height: calc(var(--header-height) + var(--safe-top) + var(--guest-banner-height));
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--brown-darkest);
  color: var(--parchment2);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  gap: 1.25rem;
  overflow-y: auto;
  position: relative;
}

[data-theme="dark"] .sidebar {
  background: #0f0d0b;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.05), transparent);
}

.sidebar-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-header .logo-icon {
  border-color: rgba(255,255,255,0.2);
}

.sidebar-header .logo-title {
  color: var(--parchment);
}

[data-theme="dark"] .sidebar-header .logo-title,
[data-theme="dark"] .mobile-header .logo-title {
  color: var(--gold-light);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
}

.sidebar-header .logo-subtitle {
  color: var(--brown-muted);
}

[data-theme="dark"] .sidebar-header .logo-subtitle,
[data-theme="dark"] .mobile-header .logo-subtitle {
  color: var(--ink-light);
}

.sidebar-user {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: var(--brown-light);
  font-family: var(--font-ui);
}

.user-name {
  display: block;
  width: 100%;
  min-width: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-actions {
  display: flex;
  width: 100%;
  gap: 0.45rem;
  flex-wrap: nowrap;
  align-items: stretch;
}

.sidebar-actions > * {
  min-width: 0;
}

.btn-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--brown-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-icon:hover,
.btn-icon:focus {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

.btn-ghost {
  flex: 1 1 0;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--brown-light);
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: var(--font-ui);
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--brown-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--parchment2);
  color: var(--brown-dark);
}

.sidebar-section h3 {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brown-muted);
  margin-bottom: 0.6rem;
}

#conversations-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
}

.conv-item {
  background: rgba(255,255,255,0.03);
  border: none;
  color: var(--brown-light);
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-item:hover,
.conv-item:focus {
  background: rgba(255,255,255,0.08);
}

.conv-item.active {
  background: rgba(255,255,255,0.12);
  color: var(--parchment);
}

.btn-new {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.12);
  color: var(--brown-light);
  padding: 0.6rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-new:hover,
.btn-new:focus {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}

.btn-admin-link {
  width: 100%;
  min-height: 40px;
  background: linear-gradient(135deg, rgba(196, 149, 106, 0.14), rgba(154, 123, 79, 0.08));
  border: 1px solid rgba(196, 149, 106, 0.24);
  color: var(--brown-light);
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-admin-link:hover,
.btn-admin-link:focus {
  background: linear-gradient(135deg, rgba(196, 149, 106, 0.2), rgba(154, 123, 79, 0.12));
  border-color: rgba(196, 149, 106, 0.34);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  padding-bottom: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--brown-muted);
  text-align: center;
}

.quote-lang {
  display: block;
  font-size: 0.7rem;
  color: var(--brown);
  margin-top: 0.25rem;
  font-family: var(--font-ui);
  font-style: normal;
  letter-spacing: 0.05em;
}

.profile-summary {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--brown-muted);
  line-height: 1.5;
  padding: 0.5rem 0;
}

.toast {
  position: fixed;
  bottom: calc(1rem + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--brown-darkest);
  color: var(--parchment);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  box-shadow: 0 4px 12px var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

[data-theme="dark"] .toast {
  background: var(--parchment2);
  color: var(--ink);
}

.guest-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--parchment2);
  border-bottom: 1px solid var(--brown-light);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  z-index: 150;
  box-shadow: 0 2px 8px var(--shadow-warm);
}

.btn-cta {
  background: linear-gradient(135deg, var(--brown) 0%, var(--brown-dark) 100%);
  color: var(--parchment);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--shadow-md);
}

.conversion-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1rem;
}

.conversion-modal {
  background: var(--parchment);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 8px 32px var(--shadow-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.conversion-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brown-light), var(--gold), var(--brown-light));
}

.conversion-portrait {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brown-light);
  box-shadow: 0 2px 8px var(--shadow-warm);
  margin-bottom: 1rem;
}

.conversion-modal h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--brown-dark);
  margin-bottom: 0.5rem;
}

.conversion-desc {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--brown-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.conversion-modal .form-group {
  text-align: left;
}

.conversion-modal .btn-primary {
  margin-top: 0.5rem;
}

.auth-inline-error {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: #b23a2c;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
  text-align: left;
}

[data-theme="dark"] .guest-banner {
  background: var(--parchment2);
  border-color: var(--brown);
}

@media (max-width: 480px) {
  .guest-banner {
    justify-content: center;
  }
  
  .conversion-modal {
    padding: 1.5rem;
  }
  
  .conversion-portrait {
    width: 56px;
    height: 56px;
  }
  
  .conversion-modal h2 {
    font-size: 1.1rem;
  }

  .modal-close {
    top: 0.65rem;
    right: 0.65rem;
  }
}

/* ── Sidebar Overlay (Mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  opacity: 0;
  transition: opacity var(--transition);
}

.sidebar-overlay.active {
  opacity: 1;
}

/* ── Main Chat Area ── */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--parchment);
  position: relative;
}

.chat-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 80% 0%, rgba(196, 149, 106, 0.04) 0%, transparent 40%),
    radial-gradient(ellipse at 20% 100%, rgba(154, 123, 79, 0.03) 0%, transparent 40%);
  pointer-events: none;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--parchment3);
  background: var(--parchment);
  box-shadow: 0 1px 3px var(--shadow-warm);
  position: relative;
  z-index: 1;
}

.portrait {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--shadow-warm);
  overflow: hidden;
  border: 2px solid var(--brown-light);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-header-text h1 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--brown-darkest);
  letter-spacing: 0.01em;
}

[data-theme="dark"] .chat-header-text h1 {
  color: var(--brown-light);
}

.chat-header-text .subtitle {
  font-size: 0.78rem;
  color: var(--brown-muted);
  font-style: italic;
  font-family: var(--font-ui);
}

/* ── Messages ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.chat-intro {
  max-width: 820px;
  width: 100%;
  margin: 0 auto 0.25rem;
  animation: messageIn 0.35s ease;
}

.chat-intro-frame {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1.4rem;
  border: 1px solid var(--parchment3);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(201, 169, 110, 0.1), rgba(196, 149, 106, 0.04)),
    var(--parchment);
  box-shadow: 0 10px 30px var(--shadow-warm);
}

.chat-intro-portrait {
  width: 112px;
  height: 112px;
  border-radius: 20px;
  object-fit: cover;
  border: 2px solid var(--brown-light);
  box-shadow: 0 8px 24px var(--shadow-md);
}

.chat-intro-kicker {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brown-muted);
  margin-bottom: 0.45rem;
}

.chat-intro-copy h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.05;
  color: var(--brown-darkest);
  margin-bottom: 0.7rem;
}

.chat-intro-text {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--ink-light);
  line-height: 1.7;
  max-width: 56ch;
}

.chat-intro-quote {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--parchment3);
}

.chat-intro-quote-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink);
}

.chat-intro-quote-source {
  margin-top: 0.3rem;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  color: var(--brown-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.message {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  max-width: 720px;
  animation: messageIn 0.3s ease;
}

@keyframes messageIn {
  from { 
    opacity: 0; 
    transform: translateY(8px); 
  }
  to { 
    opacity: 1; 
    transform: none; 
  }
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.message.assistant .avatar {
  background: var(--parchment3);
  overflow: hidden;
  padding: 0;
  box-shadow: 0 2px 6px var(--shadow-warm);
  border: 1.5px solid var(--brown-light);
}

.message.assistant .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message.user .avatar {
  background: var(--parchment2);
  color: var(--brown);
  border: 1.5px solid var(--parchment3);
}

.bubble {
  background: var(--parchment);
  border: 1px solid var(--parchment3);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.1rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  box-shadow: 0 1px 3px var(--shadow-warm);
  position: relative;
}

.message.user .bubble {
  background: linear-gradient(135deg, var(--brown) 0%, var(--brown-dark) 100%);
  color: var(--parchment);
  border-color: transparent;
  box-shadow: 0 2px 8px var(--shadow-md);
}

[data-theme="dark"] .bubble {
  background: var(--parchment2);
  border-color: var(--parchment3);
}

[data-theme="dark"] .chat-intro-frame {
  background:
    linear-gradient(135deg, rgba(201, 169, 110, 0.08), rgba(196, 149, 106, 0.02)),
    var(--parchment2);
}

[data-theme="dark"] .chat-intro-copy h2 {
  color: var(--brown-light);
}

[data-theme="dark"] .starters-section-title {
  color: #d8c4a7;
}

[data-theme="dark"] .message.user .bubble {
  background: linear-gradient(135deg, var(--brown-darkest) 0%, #4a2a10 100%);
}

/* Thinking animation */
.dots {
  display: inline-flex;
  gap: 4px;
  color: var(--brown-light);
  font-size: 1.3rem;
  line-height: 1;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ── Input Footer ── */
.chat-footer {
  padding: 0.85rem 1.5rem;
  padding-bottom: max(1.25rem, calc(0.85rem + var(--safe-bottom)));
  border-top: 1px solid var(--parchment3);
  background: var(--parchment);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  margin-bottom: 0.5rem;
}

.chat-form {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  max-width: 800px;
  margin: 0 auto;
}

.message-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  max-height: 150px;
  border: 1.5px solid var(--parchment3);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.5;
  resize: none;
  overflow-y: auto;
  background: var(--parchment);
  color: var(--ink);
  transition: all var(--transition);
}

.message-input:focus {
  outline: none;
  border-color: var(--brown-light);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.12);
}

.message-input::placeholder {
  color: var(--brown-muted);
  opacity: 0.8;
}

.send-btn {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--brown) 0%, var(--brown-dark) 100%);
  color: var(--parchment);
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--shadow-warm);
}

.send-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow-md);
}

.send-btn:active {
  transform: translateY(0);
}

.send-btn svg {
  width: 20px;
  height: 20px;
}

.footer-hint {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--brown-muted);
  margin-top: 0.5rem;
  text-align: center;
}

kbd {
  display: inline-block;
  background: var(--parchment2);
  border: 1px solid var(--parchment3);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-size: 0.7rem;
  font-family: var(--font-ui);
}

/* ──────────────────────────────────────────
   Conversation Starters & Topic Paths
   ────────────────────────────────────────── */
.starters-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

.starters-section-title {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brown-muted);
  text-align: center;
  margin-bottom: 0.25rem;
}

.starters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.starter-card {
  background: var(--parchment2);
  border: 1px solid var(--parchment3);
  border-radius: var(--radius-lg);
  padding: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.starter-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-md);
  border-color: var(--brown-light);
}

.starter-card:focus {
  outline: none;
  border-color: var(--brown-light);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.2);
}

.starter-card .category {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brown-muted);
  margin-bottom: 0.35rem;
}

.starter-card .prompt {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.5;
}

.topics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.topic-chip {
  background: transparent;
  border: 1.5px solid var(--brown);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--brown);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.topic-chip:hover {
  background: var(--brown);
  color: var(--parchment);
  transform: translateY(-1px);
}

.topic-chip:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(122, 79, 42, 0.2);
}

[data-theme="dark"] .starter-card {
  background: linear-gradient(180deg, #30271f 0%, #261f19 100%);
  border-color: rgba(212, 168, 122, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 6px 18px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .starter-card:hover,
[data-theme="dark"] .starter-card:focus {
  border-color: rgba(224, 192, 128, 0.48);
  background: linear-gradient(180deg, #392f25 0%, #2d241d 100%);
}

[data-theme="dark"] .starter-card .category {
  color: #d9b57c;
}

[data-theme="dark"] .starter-card .prompt {
  color: #f1e3cd;
}

[data-theme="dark"] .topic-chip {
  background: rgba(212, 168, 122, 0.08);
  border-color: rgba(212, 168, 122, 0.36);
  color: #ecd4ad;
}

[data-theme="dark"] .topic-chip:hover {
  background: var(--brown-light);
  color: #2a1b10;
}

@media (max-width: 600px) {
  .chat-intro-frame {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .chat-intro-portrait {
    margin: 0 auto;
  }

  .chat-intro-text {
    max-width: none;
  }

  .starters-grid {
    grid-template-columns: 1fr;
  }
  
  .topics-row {
    gap: 0.4rem;
  }
  
  .topic-chip {
    font-size: 0.72rem;
    padding: 0.4rem 0.75rem;
  }
}

/* ──────────────────────────────────────────
   RESPONSIVE: Tablet
   ────────────────────────────────────────── */
@media (max-width: 900px) {
  :root {
    --sidebar-width: 240px;
  }
}

/* ──────────────────────────────────────────
   RESPONSIVE: Mobile
   ────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Body becomes a flex column so spacer + chat-layout fill remaining height correctly */
  .chat-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }

  .chat-layout {
    flex: 1;
    min-height: 0;
    height: auto;
    max-height: none;
  }

  .mobile-header {
    display: flex;
  }
  
  .mobile-header-spacer {
    display: block;
    flex-shrink: 0;
  }
  
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding-top: calc(1.5rem + var(--safe-top));
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .sidebar-overlay {
    display: block;
    pointer-events: none;
  }
  
  .sidebar-overlay.active {
    pointer-events: auto;
  }
  
  .chat-header {
    display: none;
  }
  
  .chat-messages {
    padding: 1rem;
  }

  .chat-intro-frame {
    padding: 1.1rem;
    border-radius: 20px;
  }

  .chat-intro-copy h2 {
    font-size: 1.55rem;
  }

  .chat-intro-quote-text {
    font-size: 0.98rem;
  }
  
  .message {
    max-width: 100%;
  }
  
  .chat-footer {
    padding: 0.75rem 1rem;
    padding-bottom: calc(0.75rem + var(--safe-bottom));
  }
  
  .chat-form {
    gap: 0.5rem;
  }
  
  .message-input {
    height: 44px;
    padding: 0.65rem 0.9rem;
  }
  
  .send-btn {
    width: 44px;
    height: 44px;
  }

  .sidebar-user {
    gap: 0.55rem;
  }

  .sidebar-actions {
    gap: 0.4rem;
  }

  .btn-ghost {
    padding: 0.45rem 0.6rem;
    font-size: 0.72rem;
  }
}

/* ──────────────────────────────────────────
   RESPONSIVE: Small Mobile
   ────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-container {
    padding: 1rem;
  }
  
  .auth-box {
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
  }
  
  .auth-logo .logo-icon {
    width: 56px;
    height: 56px;
  }
  
  .auth-logo .logo-title {
    font-size: 1.5rem;
  }
  
  .avatar {
    width: 32px;
    height: 32px;
    font-size: 0.7rem;
  }
  
  .bubble {
    padding: 0.75rem 0.95rem;
    font-size: 0.95rem;
  }
  
  .footer-hint {
    display: none;
  }
}

/* ──────────────────────────────────────────
   Scrollbar Styling
   ────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--parchment3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brown-muted);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--parchment3) transparent;
}

/* ──────────────────────────────────────────
   Focus & Accessibility
   ────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--brown-light);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
  outline: none;
}

/* ──────────────────────────────────────────
   Print Styles
   ────────────────────────────────────────── */
@media print {
  .sidebar,
  .mobile-header,
  .chat-footer,
  .chat-header {
    display: none !important;
  }
  
  .chat-messages {
    overflow: visible;
    height: auto;
  }
}

/* ──────────────────────────────────────────
   Shared Page
   ────────────────────────────────────────── */
.shared-page {
  min-height: 100vh;
  background: var(--parchment2);
}

.shared-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.shared-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--parchment3);
  margin-bottom: 1.5rem;
}

.shared-portrait {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brown-light);
  box-shadow: 0 2px 8px var(--shadow-warm);
}

.shared-header-text h1 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--brown-darkest);
}

.shared-header-text .subtitle {
  font-size: 0.8rem;
  color: var(--brown-muted);
  font-style: italic;
  font-family: var(--font-ui);
}

.shared-messages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.shared-cta {
  text-align: center;
  padding: 1.5rem;
  background: var(--parchment);
  border-radius: var(--radius-lg);
  border: 1px solid var(--parchment3);
}

.shared-cta p {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--brown-muted);
  margin-bottom: 1rem;
}

.shared-cta .btn-primary {
  display: inline-block;
  width: auto;
  padding: 0.75rem 2rem;
  text-decoration: none;
}

.shared-error {
  text-align: center;
  font-family: var(--font-ui);
  color: var(--brown-muted);
  padding: 2rem;
}

[data-theme="dark"] .shared-header-text h1 {
  color: var(--brown-light);
}

/* ──────────────────────────────────────────
   Share Button on Conversations
   ────────────────────────────────────────── */
.conv-item-wrapper {
  position: relative;
}

.conv-item {
  position: relative;
  padding-right: 2.5rem;
}

.share-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: var(--brown-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.conv-item-wrapper:hover .share-btn,
.share-btn:focus {
  opacity: 1;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--brown-light);
}

.share-btn svg {
  width: 14px;
  height: 14px;
}

/* ──────────────────────────────────────────
   Subscription Status
   ────────────────────────────────────────── */
.subscription-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
}

.subscription-badge {
  padding: 0.15rem 0.4rem;
  background: var(--brown-muted);
  color: var(--parchment);
  border-radius: var(--radius-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.65rem;
}

.subscription-badge.subscription-active {
  background: var(--green-dark);
}

.message-counter {
  color: var(--brown-muted);
}

/* ──────────────────────────────────────────
   Upgrade Modal
   ────────────────────────────────────────── */
.upgrade-modal {
  max-width: 420px;
}

.plan-cards {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
}

.plan-card {
  flex: 1;
  padding: 1.25rem 1rem;
  background: var(--parchment2);
  border: 2px solid var(--parchment3);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  position: relative;
}

.plan-card:hover {
  border-color: var(--brown-light);
}

.plan-card.selected {
  border-color: var(--brown);
  background: var(--parchment);
}

.plan-card-featured {
  border-color: var(--brown);
}

.plan-card-featured.selected {
  border-color: var(--brown-darkest);
}

.plan-badge {
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green-dark);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.plan-name {
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--brown-darkest);
  margin-bottom: 0.25rem;
}

.plan-price {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brown);
}

.plan-period {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--brown-muted);
}

.plan-desc {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--brown-muted);
  margin-top: 0.25rem;
}

.btn-subscribe {
  width: 100%;
  margin-top: 0.5rem;
}

.btn-subscribe:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.upgrade-note {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--brown-muted);
  text-align: center;
  margin-top: 1rem;
}

[data-theme="dark"] .plan-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .plan-card:hover {
  border-color: var(--brown-light);
}

[data-theme="dark"] .plan-card.selected {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--brown-light);
}

[data-theme="dark"] .plan-name {
  color: var(--parchment);
}

[data-theme="dark"] .plan-price {
  color: var(--brown-light);
}

/* ──────────────────────────────────────────
   Welcome Modal (First-time visitors)
   ────────────────────────────────────────── */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
  padding: 1rem;
}

.welcome-modal {
  background: var(--parchment);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 12px 40px var(--shadow-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: welcomeIn 0.35s ease;
}

@keyframes welcomeIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.welcome-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brown-light), var(--gold), var(--brown-light));
}

.welcome-portrait {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brown-light);
  box-shadow: 0 4px 16px var(--shadow-md);
  margin-bottom: 1rem;
}

.welcome-modal h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--brown-darkest);
  margin-bottom: 0.25rem;
  letter-spacing: 0.01em;
}

.welcome-subtitle {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brown-muted);
  margin-bottom: 0.75rem;
}

.welcome-bio {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--ink-light);
  line-height: 1.6;
  margin-bottom: 1.75rem;
  max-width: 32ch;
  margin-left: auto;
  margin-right: auto;
}

.welcome-starters {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.welcome-starter {
  width: 100%;
  background: var(--parchment2);
  border: 1.5px solid var(--parchment3);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.welcome-starter:hover {
  background: var(--parchment3);
  border-color: var(--brown-light);
  transform: translateX(4px);
}

.welcome-starter:focus {
  outline: none;
  border-color: var(--brown-light);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.2);
}

.welcome-skip {
  background: transparent;
  border: none;
  color: var(--brown-muted);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  cursor: pointer;
  transition: color var(--transition);
  padding: 0.5rem;
}

.welcome-skip:hover {
  color: var(--brown);
  text-decoration: underline;
}

[data-theme="dark"] .welcome-modal {
  background: var(--parchment2);
}

[data-theme="dark"] .welcome-modal h2 {
  color: var(--brown-light);
}

[data-theme="dark"] .welcome-bio {
  color: var(--ink-light);
}

[data-theme="dark"] .welcome-subtitle {
  color: var(--brown-light);
}

[data-theme="dark"] .welcome-starter {
  background: var(--parchment3);
  border-color: rgba(212, 168, 122, 0.2);
  color: var(--ink);
}

[data-theme="dark"] .welcome-starter:hover {
  background: rgba(212, 168, 122, 0.12);
  border-color: var(--brown-light);
}

@media (max-width: 480px) {
  .welcome-modal {
    padding: 2rem 1.5rem;
    margin: 0.5rem;
  }

  .welcome-portrait {
    width: 80px;
    height: 80px;
  }

  .welcome-modal h2 {
    font-size: 1.35rem;
  }

  .welcome-bio {
    font-size: 0.85rem;
  }

  .welcome-starter {
    padding: 0.75rem 0.9rem;
    font-size: 0.9rem;
  }
}
