/* =========================================
   Reset & Base
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* =========================================
   Variáveis — Tema Claro (padrão)
   ========================================= */
:root,
[data-theme="light"] {
  --bg:        #F8F6FF;
  --surface:   #FFFFFF;
  --surface2:  #F3F0FF;
  --surface3:  #EDE9FF;
  --border:    #E5E0F5;
  --accent:    #7C3AED;
  --accent2:   #A78BFA;
  --gold:      #D4A84B;
  --gold2:     #F0D080;
  --text:      #1A1033;
  --text-sec:  #6B5F8A;
  --text-muted:#9B8FBA;
  --error:     #DC2626;
  --radius:    12px;
  --shadow-sm: 0 2px 8px rgba(124,58,237,.08);
  --shadow:    0 4px 20px rgba(124,58,237,.12);
  --shadow-lg: 0 8px 40px rgba(124,58,237,.16);
}

/* =========================================
   Variáveis — Tema Escuro
   ========================================= */
[data-theme="dark"] {
  --bg:        #0F0A1E;
  --surface:   #1A1033;
  --surface2:  #231642;
  --surface3:  #2D1F52;
  --border:    #2D1F52;
  --accent:    #A78BFA;
  --accent2:   #C4B5FD;
  --gold:      #F0D080;
  --gold2:     #D4A84B;
  --text:      #F0EEFF;
  --text-sec:  #C4B5FD;
  --text-muted:#7C6FA0;
  --error:     #F87171;
  --radius:    12px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
  --shadow:    0 4px 20px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.5);
}

/* =========================================
   Base tipográfica
   ========================================= */
html, body {
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  scroll-behavior: smooth;
  line-height: 1.7;
}

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

/* =========================================
   Buttons
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.3rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: .9rem;
  font-family: inherit;
  font-weight: 500;
  transition: box-shadow .18s, transform .1s, opacity .15s;
  min-height: 44px;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #9b59e8);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: var(--shadow); opacity: .93; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); background: var(--surface2); }
.btn-sm  { padding: .35rem .9rem; font-size: .82rem; min-height: 36px; }
.btn-full { width: 100%; justify-content: center; }

/* =========================================
   Forms
   ========================================= */
.form-group { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.2rem; }
.form-group label { font-size: .85rem; color: var(--text-sec); font-weight: 500; }
input[type="password"],
input[type="text"],
textarea,
.input-inline {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  padding: .65rem 1rem;
  width: 100%;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
textarea { resize: vertical; min-height: 60px; }

.form-row {
  display: flex;
  gap: .6rem;
  align-items: center;
}
.form-row .input-inline { flex: 1; }

.alert { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .9rem; }
.alert-error { background: rgba(220,38,38,.08); border: 1px solid var(--error); color: var(--error); }

/* =========================================
   Login
   ========================================= */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(ellipse at 50% 0%, var(--surface3) 0%, var(--bg) 70%);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-symbol {
  font-size: 2rem;
  color: var(--gold);
  letter-spacing: .3rem;
  margin-bottom: 1rem;
}

.login-card h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: .3rem;
  letter-spacing: -0.02em;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 1.8rem;
}

/* =========================================
   App layout
   ========================================= */
.app-layout {
  --header-height: 68px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  padding-bottom: 48px;
}

/* =========================================
   Universal Header
   ========================================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-brand {
  font-family: var(--font-serif, serif);
  font-size: 1.05rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .app-header {
    height: 44px;
    margin-left: 180px;  /* compensate sidebar */
  }
}

/* =========================================
   Page Content (centralized)
   ========================================= */
.page-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}
.form-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

/* =========================================
   Sessions list (index)
   ========================================= */
.main-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  width: 100%;
  flex: 1;
  overflow-y: auto;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.section-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.new-session-form {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.session-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.session-item { }

.session-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.3rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, border-color .2s, transform .15s;
}

.session-link:hover {
  border-color: var(--accent2);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  text-decoration: none;
}

.session-title { color: var(--text); font-weight: 500; }
.session-date  { font-size: 0.875rem; color: var(--text-muted); }

/* =========================================
   Sidebar
   ========================================= */
.sidebar {
  width: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  position: fixed;
  top: var(--header-height, 68px);
  left: 0;
  bottom: 0;
  z-index: 15;
  flex-shrink: 0;
  background: var(--surface2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

/* Compensar sidebar fixa no layout desktop */
.app-body { padding-left: 260px; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface2);
  z-index: 1;
  flex-shrink: 0;
}

.sidebar-header-actions {
  display: flex;
  align-items: center;
  gap: .2rem;
}

.sidebar-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 .2rem;
  display: none;
}
.sidebar-close:hover { color: var(--text); }

.sidebar-toggle-collapse {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  opacity: 0.4;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--text);
  transition: opacity 0.15s, background-color 0.15s;
}
.sidebar-toggle-collapse:hover {
  opacity: 1;
  background-color: var(--surface3);
}

/* Sidebar collapsed = thin bar */
.sidebar.collapsed {
  width: 40px;
  min-width: 40px;
  overflow: hidden;
}

.sidebar.collapsed .sidebar-header {
  padding: 8px 4px;
  justify-content: center;
}

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-content,
.sidebar.collapsed .sidebar-new-folder-btn,
.sidebar.collapsed .sidebar-close {
  display: none;
}

.sidebar.collapsed .sidebar-toggle-collapse {
  width: 100%;
  padding: 8px 0;
  font-size: 14px;
  opacity: 0.6;
}

.sidebar.collapsed .sidebar-toggle-collapse:hover {
  opacity: 1;
}

.app-body.sidebar-collapsed { padding-left: 40px; }

.sidebar-content { padding: .5rem 0; flex: 1; }

.sidebar-loading,
.sidebar-empty {
  padding: 1rem;
  font-size: .82rem;
  color: var(--text-muted);
}

.sidebar-session {
  border-bottom: 1px solid var(--border);
  padding: .4rem 0;
  transition: background .15s;
}
.sidebar-session:hover { background: var(--surface3); }

.sidebar-session--current { background: rgba(124,58,237,.06); }

.sidebar-session-title {
  display: flex;
  align-items: center;
  padding: .35rem 1rem;
  font-size: .84rem;
  gap: 4px;
}

.sidebar-session-link {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s;
  min-width: 0;
  flex: 1;
}
.sidebar-session-link:hover { color: var(--accent); text-decoration: none; }

.sidebar-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-session--current .sidebar-session-link {
  color: var(--accent);
  font-weight: 600;
}

.sidebar-readings { display: flex; flex-direction: column; gap: 1px; }

.sidebar-reading-link {
  display: block;
  padding: .22rem 1rem .22rem 1.6rem;
  font-size: .77rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s, background .15s;
}
.sidebar-reading-link:hover {
  color: var(--accent2);
  background: rgba(124,58,237,.06);
  text-decoration: none;
}

.sidebar-no-readings {
  display: block;
  padding: .2rem 1rem .2rem 1.6rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
}

.sidebar-backdrop { display: none; }

.sidebar-toggle {
  display: none;
}

/* =========================================
   Mobile — sidebar drawer + responsivo
   ========================================= */
@media (max-width: 700px) {
  .sidebar-toggle { display: inline-flex; }
  .sidebar-close  { display: block; }
  .sidebar-toggle-collapse { display: none; }

  .sidebar.collapsed {
    width: min(270px, 88vw);
    min-width: 0;
  }

  .app-body { padding-left: 0 !important; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .25s ease;
    width: min(270px, 88vw);
  }
  .sidebar.is-open { transform: translateX(0); }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 49;
    background: rgba(10,5,30,.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .sidebar-backdrop.is-open { display: block; }

  .session-layout { max-width: 100%; }
  .session-title-bar { padding: 1rem 1rem 0; }
  .session-tags-bar  { padding: 0 1rem; }
  .readings-container { padding: 1rem 1rem 2rem; }
  .question-form-bar  { padding: .75rem 1rem; }

  .spread-card-grid,
  .model-card-grid { gap: .3rem; }

  .spread-card,
  .model-card { min-width: 58px; padding: .45rem .55rem; }

  .main-content { padding: 1.5rem 1rem; }
  .filter-bar   { flex-direction: column; align-items: flex-start; }
}

/* =========================================
   Progress overlay
   ========================================= */
.progress-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10,5,30,.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
}
.progress-overlay.is-visible { display: flex; }

.progress-message {
  color: var(--accent2);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  max-width: 340px;
  line-height: 1.6;
  min-height: 1.6em;
}

.progress-bar-track {
  width: 320px;
  max-width: 80vw;
  height: 3px;
  background: rgba(255,255,255,.12);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 2px;
  transition: width 28s cubic-bezier(0.05, 0.8, 0.3, 1);
}

/* =========================================
   Session detail
   ========================================= */
.session-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.session-title-bar {
  scroll-margin-top: 80px;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem 2rem 0;
  flex-shrink: 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.session-title-bar h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.readings-container {
  flex: 1;
  padding: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.reading-card {
  scroll-margin-top: 80px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.3rem 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.reading-card:hover { box-shadow: var(--shadow); }

.reading-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: .3rem;
}

.reading-question p { color: var(--text); }

.reading-question-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.reading-context-display {
  font-size: 0.875rem;
  opacity: 0.5;
  font-style: italic;
  margin-top: 0.25rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border);
}

/* Compatibility scores */
.compat-scores {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.score-row:last-child {
  margin-bottom: 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.score-label {
  min-width: 130px;
  font-size: 0.85rem;
}

.score-value {
  min-width: 40px;
  text-align: right;
  font-weight: 600;
  font-size: 0.85rem;
}

.score-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease-out;
}

.score-bar-fill[data-level="high"] {
  background: linear-gradient(90deg, #7c3aed, #a855f7);
}

.score-bar-fill[data-level="medium"] {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.score-bar-fill[data-level="low"] {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.cards-list {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.card-position {
  font-size: .88rem;
  padding: .2rem 0;
  color: var(--text);
}

.card-position strong {
  color: var(--accent);
}

.lenormand-cards {
  opacity: .7;
  font-size: .82rem;
}

.interpretation-text {
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.8;
  overflow-x: hidden;
  word-break: break-word;
}

.interpretation-text p,
.interpretation-text div {
  overflow-wrap: break-word;
}

/* =========================================
   Markdown renderizado
   ========================================= */
.interpretation-text.markdown-rendered { white-space: normal; }
.interpretation-text.markdown-rendered p { margin-bottom: .85rem; line-height: 1.8; }
.interpretation-text.markdown-rendered h2 {
  color: var(--gold);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(212,168,75,.2);
  padding-bottom: .3rem;
  margin: 1.4rem 0 .6rem;
}
.interpretation-text.markdown-rendered h3 {
  color: var(--accent);
  font-size: .95rem;
  font-weight: 600;
  margin: 1.1rem 0 .4rem;
}
.interpretation-text.markdown-rendered strong { color: var(--accent); font-weight: 600; }
.interpretation-text.markdown-rendered em { color: var(--text-sec); font-style: italic; }
.interpretation-text.markdown-rendered hr { border: none; border-top: 1px solid var(--border); margin: 1.2rem 0; }
.interpretation-text.markdown-rendered blockquote {
  border-left: 3px solid var(--accent2);
  padding: .4rem .9rem;
  margin: .8rem 0;
  color: var(--text-sec);
  font-style: italic;
  background: rgba(124,58,237,.05);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.interpretation-text.markdown-rendered table { width: 100%; border-collapse: collapse; font-size: .88rem; margin: .8rem 0; }
.interpretation-text.markdown-rendered th {
  background: var(--surface2);
  color: var(--gold);
  font-weight: 600;
  text-align: left;
  padding: .4rem .7rem;
  border: 1px solid var(--border);
}
.interpretation-text.markdown-rendered td { padding: .35rem .7rem; border: 1px solid var(--border); color: var(--text); }
.interpretation-text.markdown-rendered tr:nth-child(even) td { background: var(--surface2); }
.interpretation-text.markdown-rendered ul,
.interpretation-text.markdown-rendered ol { padding-left: 1.4rem; margin-bottom: .8rem; }
.interpretation-text.markdown-rendered li { margin-bottom: .3rem; line-height: 1.7; }

.reading-meta { font-size: .73rem; color: var(--text-muted); text-align: right; }
.reading-source { font-style: italic; }
.reading-source--fallback { color: #b45309; }

.reading-feedback-prompt {
  font-size: .85rem;
  color: var(--text-muted);
  padding: .5rem 1rem .75rem;
  border-top: 1px solid var(--border);
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: .85rem;
  text-decoration: underline;
  padding: 0;
}

/* =========================================
   Floating feedback button
   ========================================= */
.feedback-float-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.4rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(124,58,237,.4);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, box-shadow .2s;
}
.feedback-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(124,58,237,.6);
}

/* =========================================
   Readings counter
   ========================================= */
.readings-counter {
  text-align: right;
  padding: 0.25rem 0;
  margin-bottom: 0.5rem;
}

.readings-remaining {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.counter-low {
  color: #dc2626;
  font-weight: 600;
}

.grace-warning {
  text-align: center;
  padding: .75rem;
  font-size: .9rem;
  color: var(--accent);
  opacity: .8;
}

/* =========================================
   Question form bar
   ========================================= */
.question-form-bar {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.form-section-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: .5rem;
  margin-top: .6rem;
}
.form-section-label:first-child { margin-top: 0; }

.question-input-row {
  display: flex;
  gap: .7rem;
  align-items: flex-end;
  margin-top: .6rem;
}

.question-input-row textarea {
  flex: 1;
  min-height: 46px;
}

/* =========================================
   Empty state
   ========================================= */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  padding: 3rem;
  color: var(--text-muted);
  text-align: center;
}

.empty-icon { font-size: 2.5rem; }

/* =========================================
   Spread & Model cards visuais
   ========================================= */
.spread-card-grid,
.model-card-grid {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: .2rem;
}

.spread-card,
.model-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  padding: .5rem .7rem;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  min-width: 64px;
  transition: border-color .15s, background .15s, box-shadow .15s;
  text-align: center;
}
.spread-card:hover,
.model-card:hover {
  border-color: var(--accent2);
  background: var(--surface3);
}
.spread-card input[type="radio"],
.model-card  input[type="radio"] { display: none; }

.spread-card:has(input:checked),
.model-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--surface3);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

.spread-card-icon,
.model-card-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.spread-card-name,
.model-card-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.spread-card-desc,
.model-card-desc {
  font-size: .68rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* =========================================
   Wizard — nova sessão
   ========================================= */
.wizard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 2.5rem;
  max-width: 540px;
  width: 100%;
  margin: 2rem auto;
  box-shadow: var(--shadow);
}

.wizard-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
}

.wizard-step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .2s, color .2s, background .2s;
}
.wizard-step-dot.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(124,58,237,.1);
}

.wizard-step-line { flex: 1; height: 2px; background: var(--border); margin: 0 .6rem; }

.wizard-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}

.wizard-subtitle { font-size: .85rem; color: var(--text-muted); margin: -.6rem 0 1.2rem; }

.radio-card-group { display: flex; gap: .8rem; margin-bottom: 1.4rem; flex-wrap: wrap; }

.radio-card {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .9rem 1.1rem;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.radio-card input[type="radio"] { display: none; }
.radio-card--selected,
.radio-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--surface3);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.radio-card:hover { border-color: var(--accent2); }

.radio-card-icon { font-size: 1.4rem; flex-shrink: 0; }
.radio-card-text { display: flex; flex-direction: column; gap: .15rem; }
.radio-card-text strong { color: var(--text); font-size: .92rem; font-weight: 600; }
.radio-card-text small  { color: var(--text-muted); font-size: 0.875rem; }

.wizard-divider {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: .4rem;
  margin: .4rem 0 1rem;
}

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 480px) {
  .form-row-2 { grid-template-columns: 1fr; }
  .wizard-card { padding: 1.5rem 1.2rem; }
}

.required { color: var(--error); }
.optional  { color: var(--text-muted); font-size: 0.875rem; }
.input-error { border-color: var(--error) !important; }

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  gap: .8rem;
}

/* =========================================
   Autocomplete de cidades
   ========================================= */
.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  list-style: none;
  z-index: 100;
  display: none;
  max-height: 260px;
  overflow-y: auto;
}

.autocomplete-item {
  padding: .45rem .75rem;
  font-size: .88rem;
  color: var(--text);
  cursor: pointer;
  transition: background .1s;
}
.autocomplete-item:hover,
.autocomplete-item--active {
  background: rgba(124,58,237,.12);
  color: var(--accent);
}

/* =========================================
   Tag badges
   ========================================= */
.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  font-style: normal;
  font-family: inherit;
}

.tag-badge--lg {
  font-size: .88rem;
  padding: .3rem .85rem;
}

/* Badge removível (session.html) */
.tag-badge--removable { padding-right: 4px; }

.tag-remove-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  margin-left: 1px;
  border-radius: 50%;
  transition: color .15s, background .15s;
  font-family: inherit;
}
.tag-remove-btn:hover {
  color: #fff;
  background: rgba(0,0,0,.2);
}

/* =========================================
   Session list — actions menu
   ========================================= */
.session-item {
  position: relative;
  display: flex;
  align-items: stretch;
}

.session-item .session-link {
  flex: 1;
  min-width: 0;
  padding-right: 3.5rem;
}

.session-link-left {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 0;
}

.session-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
}

.session-actions {
  display: flex;
  align-items: stretch;
  position: relative;
  margin-left: .3rem;
}

.session-actions-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 .6rem;
  opacity: 0;
  transition: opacity .15s, color .15s, background .15s;
  align-self: stretch;
}
.session-item:hover .session-actions-btn { opacity: 1; }
.session-actions-btn:hover { color: var(--text); background: var(--surface2); }

.session-actions-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 20;
  min-width: 160px;
  flex-direction: column;
  overflow: hidden;
}
.session-actions-menu.open { display: flex; }
.session-actions-menu button {
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: .6rem 1rem;
  text-align: left;
  color: var(--text);
  font-size: .85rem;
  font-family: inherit;
  font-weight: 400;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.session-actions-menu button:last-child { border-bottom: none; }
.session-actions-menu button:hover { background: var(--surface2); }
.session-actions-menu button.danger { color: var(--error); }

.session-archived { opacity: 0.55; }
.session-archived .session-link { font-style: italic; }

/* ── Journey kebab button ── */
.session-kebab {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text);
  opacity: 0.35;
  cursor: pointer;
  font-size: 1.4rem;
  padding: 0.6rem 0.5rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  line-height: 1;
  transition: opacity 0.15s, background 0.15s;
  z-index: 2;
}
.session-item:hover .session-kebab { opacity: 0.6; }
.session-kebab:hover { opacity: 1 !important; background: rgba(0,0,0,0.06); }

/* ── Journey dropdown menu ── */
.journey-menu {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.4rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 100;
  min-width: 160px;
}
.journey-menu.hidden { display: none; }
.journey-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
  text-align: left;
  transition: background 0.1s;
}
.journey-menu-item:hover { background: rgba(13,148,136,0.08); }
.journey-menu-danger { color: var(--error, #e53e3e); }
.journey-menu-danger:hover { background: rgba(229,62,62,0.08); }
.journey-menu-divider { height: 1px; background: var(--border); margin: 0.25rem 0; }

/* Card "..." trigger (home page) */
.card-menu-trigger {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
  transition: opacity 0.15s ease, background-color 0.15s ease;
  z-index: 1;
}
.session-item:hover .card-menu-trigger { opacity: 1; }
.card-menu-trigger:hover { background-color: var(--surface3); }

@media (max-width: 768px) {
  .card-menu-trigger { opacity: 1; }
}

.session-star-badge {
  color: var(--accent);
  font-size: 0.9rem;
}

/* =========================================
   Filter bar (index)
   ========================================= */
.filter-bar {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  padding: 2px;
  gap: 2px;
}

.filter-tab {
  padding: .28rem .85rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background .15s, color .15s;
  text-decoration: none;
  border-radius: 999px;
}
.filter-tab:hover { color: var(--text); text-decoration: none; background: var(--surface3); }
.filter-tab--active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }

.filter-tag-select {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.filter-tag-select select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: .82rem;
  padding: .3rem .6rem;
  cursor: pointer;
  outline: none;
}

.filter-tag-select select:focus {
  border-color: var(--accent);
}

/* =========================================
   Tag editor overlay (index)
   ========================================= */
.tag-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(13, 11, 20, .7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.tag-editor-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.tag-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  color: var(--accent2);
}

.tag-editor-header button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.tag-editor-body {
  padding: .8rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  max-height: 260px;
  overflow-y: auto;
}

.tag-editor-item {
  display: flex;
  align-items: center;
  gap: .3rem;
  cursor: pointer;
  padding: .2rem .4rem;
  border-radius: var(--radius);
  transition: background .15s;
}

.tag-editor-item input[type="checkbox"] {
  display: none;
}

.tag-editor-item.selected {
  outline: 2px solid var(--accent2);
  outline-offset: 1px;
  border-radius: 999px;
}

.tag-editor-footer {
  padding: .8rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
}

/* =========================================
   Session tags bar (session.html)
   ========================================= */
.session-tags-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding: 0.25rem 2rem;
  flex-shrink: 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.session-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.session-tags-add {
  position: relative;
}

.tags-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 30;
  min-width: 180px;
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: .4rem 0;
}

.tags-dropdown-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .8rem;
  cursor: pointer;
  transition: background .15s;
}

.tags-dropdown-item:hover {
  background: var(--surface2);
}

.tags-dropdown-item input[type="checkbox"] {
  width: auto;
  cursor: pointer;
  flex-shrink: 0;
}

/* =========================================
   Tags page
   ========================================= */
.tags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: .9rem;
  margin-top: .5rem;
}

.tag-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.tag-card:hover { box-shadow: var(--shadow); }

.tag-card-count { font-size: 0.875rem; color: var(--text-muted); }
.tag-card-actions { display: flex; gap: .3rem; }
.danger-btn { color: var(--error) !important; }

/* =========================================
   Modal (tags page) — com backdrop blur
   ========================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,5,30,.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 101;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 490px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1rem; font-weight: 600; color: var(--text); }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  border-radius: 8px;
  padding: 0 .2rem;
  transition: color .15s;
}
.modal-close:hover { color: var(--text); }

.modal-body { padding: 1.2rem 1.5rem; display: flex; flex-direction: column; gap: .3rem; }
.modal-footer {
  display: flex;
  gap: .6rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.emoji-grid { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .5rem; }

.emoji-btn {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1.1rem;
  width: 2.1rem;
  height: 2.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, background .15s;
}
.emoji-btn:hover { border-color: var(--accent); background: var(--surface3); }

/* Paleta de cores por categoria */
.color-category-label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-top: .5rem;
  margin-bottom: .25rem;
}
.color-category { display: flex; gap: .35rem; flex-wrap: wrap; }

.color-palette { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .5rem; }

.color-swatch {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: transform .12s, border-color .15s, box-shadow .15s;
}
.color-swatch:hover { transform: scale(1.18); }
.color-swatch.selected { border-color: #fff; transform: scale(1.18); box-shadow: 0 0 0 2px var(--accent); }

.tag-preview-box {
  padding: .6rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

/* Sidebar tags */
.sidebar-session-tags { padding: .15rem 1rem; display: flex; flex-wrap: wrap; gap: .2rem; }
.sidebar-session--archived .sidebar-session-title { opacity: .6; font-style: italic; }

/* Pastas na sidebar */
.folder-group {
  margin-bottom: 2px;
}

.folder-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background-color 0.15s ease;
}

.folder-header:hover {
  background-color: var(--surface);
}

.folder-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.folder-chevron {
  font-size: 10px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  opacity: 0.5;
}

.folder-group.open .folder-chevron {
  transform: rotate(90deg);
}

.folder-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-count {
  font-size: 0.875rem;
  opacity: 0.5;
  flex-shrink: 0;
}

.folder-content .sidebar-session {
  padding-left: 20px;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
}

.session-star {
  color: var(--accent);
  font-size: 0.875rem;
  flex-shrink: 0;
  margin-right: 4px;
}

.sidebar-new-folder-btn {
  font-size: 0.875rem;
  padding: 2px 6px;
}

/* Session "..." trigger */
.session-menu-trigger {
  opacity: 0;
  background: none;
  border: none;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
  transition: opacity 0.15s ease, background-color 0.15s ease;
  flex-shrink: 0;
  margin-left: auto;
  line-height: 1;
}
.sidebar-session:hover .session-menu-trigger { opacity: 1; }
.session-menu-trigger:hover { background-color: var(--surface3); }

@media (max-width: 768px) {
  .session-menu-trigger { opacity: 1; }
}

/* Context menus */
.context-menu {
  position: fixed;
  z-index: 1100;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 200px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text);
  text-align: left;
  transition: background-color 0.1s ease;
}
.context-menu-item:hover { background-color: var(--surface3); }
.context-menu-item--danger { color: #e53e3e; }
.context-menu-item--danger:hover { background-color: rgba(229, 62, 62, 0.08); }
.context-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }
.context-menu-icon { width: 20px; text-align: center; flex-shrink: 0; }

/* Folder/color picker overlay */
.folder-picker-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1101;
  display: flex;
  align-items: center;
  justify-content: center;
}

.folder-picker {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  min-width: 260px;
  max-width: 320px;
  max-height: 400px;
  overflow-y: auto;
}
.folder-picker h3 { margin: 0 0 12px 0; font-size: 1rem; }

.folder-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text);
  text-align: left;
  transition: background-color 0.1s ease;
}
.folder-picker-item:hover { background-color: var(--surface3); }
.folder-picker-new { color: var(--accent); font-weight: 500; }

/* =========================================
   Settings page
   ========================================= */
.settings-tabs {
  display: flex;
  gap: .25rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.75rem;
}
.settings-tab {
  padding: .6rem 1.1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  color: var(--text-sec);
  font-size: .9rem;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: color .15s, border-color .15s;
}
.settings-tab:hover { color: var(--text); }
.settings-tab--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.settings-panel { animation: fadein .18s ease; }
.settings-form { display: flex; flex-direction: column; gap: 1rem; }
.settings-section-title {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
  margin-top: .5rem;
}

/* Alerts */
.alert {
  padding: .75rem 1rem;
  border-radius: 8px;
  font-size: .9rem;
  margin-bottom: 1.25rem;
}
.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
[data-theme="dark"] .alert-success { background: #064e3b; color: #6ee7b7; border-color: #065f46; }
[data-theme="dark"] .alert-error   { background: #7f1d1d; color: #fca5a5; border-color: #991b1b; }

/* Danger zone */
.danger-zone {
  border: 1.5px solid #fca5a5;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  background: #fff5f5;
}
[data-theme="dark"] .danger-zone { background: #2d0f0f; border-color: #7f1d1d; }
.danger-zone-title {
  font-weight: 700;
  color: #dc2626;
  margin-bottom: .5rem;
  font-size: .95rem;
}
.btn-danger {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: .5rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 600;
  transition: background .15s;
}
.btn-danger:hover { background: #b91c1c; }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

/* Astro profile card */
.astro-profile-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.astro-profile-card-header {
  background: var(--surface3);
  padding: .75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: .9rem;
}
.astro-profile-text {
  padding: 1rem;
  font-size: .82rem;
  line-height: 1.6;
  white-space: pre-wrap;
  font-family: inherit;
  color: var(--text-sec);
}

/* =========================================
   Resonance
   ========================================= */
.reading-resonance {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.resonance-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.resonance-buttons {
  display: flex;
  gap: 0.5rem;
}
.resonance-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.3rem 0.75rem;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s;
}
.resonance-btn:hover,
.resonance-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}
.resonance-feedback textarea {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  resize: none;
  box-sizing: border-box;
}
.resonance-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.resonance-thanks {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.resonance-voted {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =========================================
   User search (notification target)
   ========================================= */
.user-search-container {
  position: relative;
}
.user-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.user-search-item {
  padding: .6rem 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .1rem;
  transition: background .15s;
}
.user-search-item:hover { background: var(--surface2); }
.user-search-name { font-size: .9rem; color: var(--text); }
.user-search-email { font-size: 0.875rem; color: var(--text-muted); }
.user-search-item.muted {
  color: var(--text-muted);
  cursor: default;
  font-size: .85rem;
}

/* =========================================
   Notification bell
   ========================================= */
.notif-bell {
  position: relative;
  font-size: 1.1rem;
}
.notif-bell-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  border: 2px solid var(--bg-header);
}

/* =========================================
   Notification banner (index page)
   ========================================= */
.notif-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.15),
    rgba(124, 58, 237, 0.05)
  );
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.notif-banner-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.notif-banner-text {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}

/* =========================================
   Home pinned message
   ========================================= */
.home-pinned-message {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: linear-gradient(
    135deg,
    rgba(255, 248, 230, 0.08),
    rgba(255, 214, 100, 0.05)
  );
  border: 1px solid rgba(212, 168, 75, 0.4);
  border-left: 3px solid #D4A84B;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.home-pinned-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
  color: #D4A84B;
}
.home-pinned-content {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-line;
}

/* =========================================
   Session share / export actions
   ========================================= */
.session-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.share-url-box {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}
.share-url-box input {
  flex: 1;
  padding: .5rem .75rem;
  font-size: .85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}
.share-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: .5rem;
}

/* WhatsApp button */
.btn-whatsapp {
  color: #25D366;
  padding: 0.3rem 0.5rem;
}
.btn-whatsapp:hover {
  color: #128C7E;
}
.whatsapp-icon {
  vertical-align: middle;
}

/* Export link (bottom of session) */
.session-export-link {
  text-align: center;
  padding: 1rem 0;
  opacity: 0.5;
}
.session-export-link:hover {
  opacity: 1;
}

/* Toast notification */
.toast-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 9999;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--accent);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  padding: 1.25rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.toast-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Hide text on mobile */
@media (max-width: 600px) {
  .hide-mobile {
    display: none;
  }
}

/* =========================================
   Print styles
   ========================================= */
@media print {
  .sidebar, .app-header, .question-form-bar,
  .session-actions, .reading-resonance,
  .notif-bell, .feedback-float-btn,
  .session-tags-bar {
    display: none !important;
  }
  .app-layout, .app-body, .session-layout {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
  .readings-container {
    overflow: visible !important;
    max-width: 100% !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
  .session-title-bar,
  .reading-card:first-child {
    page-break-after: avoid;
    break-after: avoid;
  }
  .reading-card {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ccc !important;
    margin-bottom: 1rem;
  }
}

/* =========================================
   Sortable table headers
   ========================================= */
.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.sortable:hover {
  color: var(--accent);
}
.sort-icon {
  font-size: 0.875rem;
  opacity: 0.6;
  margin-left: 0.25rem;
}

/* =========================================
   Admin multi-user selector
   ========================================= */
.user-dropdown {
  position: absolute;
  top: calc(100% - 0.4rem);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.dropdown-item {
  padding: 0.6rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.1s;
}
.dropdown-item:hover,
.dropdown-item:active {
  background: var(--surface2);
}
.dropdown-item.already-selected {
  background: rgba(124, 58, 237, 0.1);
}
.dropdown-item.muted {
  color: var(--text-muted);
  cursor: default;
  font-size: 0.85rem;
}
.item-name {
  font-size: 0.9rem;
  color: var(--text);
  flex: 1;
}
.item-email {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.item-check {
  color: var(--accent);
  font-size: 0.85rem;
}
.selected-users {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  font-size: 0.875rem;
  color: var(--text);
}
.user-chip button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  line-height: 1;
}
.user-chip button:hover {
  color: var(--text);
}

/* =========================================
   Admin notification replies
   ========================================= */
.notif-replies-toggle {
  font-size: 0.875rem;
  color: var(--accent);
  cursor: pointer;
  margin-top: 0.5rem;
  display: inline-block;
}
.notif-replies-toggle:hover {
  text-decoration: underline;
}
.notif-replies-panel {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.notif-reply-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.notif-reply-item:last-child {
  border-bottom: none;
}
.notif-reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}
.notif-reply-user {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.notif-reply-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.notif-reply-text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
  font-style: italic;
}

/* =========================================
   App footer
   ========================================= */
.app-footer {
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  opacity: 0.3;
  border-top: 1px solid var(--border);
  margin-bottom: 52px;
  margin-top: auto;
  color: var(--text);
}

@media (min-width: 768px) {
  .app-footer {
    margin-bottom: 0;
    margin-left: 180px;
  }
}

/* Legacy footer classes (kept for compat) */
.footer-brand {
  font-weight: 600;
}
.footer-sep {
  display: none; /* hidden in slim footer */
}
.footer-version {
  display: none;
}
.footer-disclaimer {
  display: none;
  font-style: italic;
  font-size: 0.875rem;
}
@media (max-width: 600px) {
  .app-footer {
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.5rem 1rem;
  }
  .footer-sep {
    display: none;
  }
}

/* =========================================
   Utils
   ========================================= */
.hidden { display: none !important; }

/* =========================================
   Pergunta rápida na home
   ========================================= */
.quick-ask-container {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.08),
    rgba(124, 58, 237, 0.03)
  );
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.quick-ask-title {
  font-size: 1.3rem;
  font-weight: normal;
  color: var(--text);
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  text-align: center;
}

.quick-ask-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  font-size: 1rem;
  color: var(--text);
  font-family: Georgia, serif;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
  line-height: 1.6;
  box-sizing: border-box;
  text-align: left;
}

.quick-ask-input::placeholder {
  text-align: center;
  opacity: 0.5;
}

.quick-ask-input:focus {
  outline: none;
  border-color: var(--accent);
}

.quick-ask-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.875rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.quick-ask-sessions-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* =========================================
   Página de confirmação
   ========================================= */
.ask-confirm-container {
  max-width: 540px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.ask-header {
  text-align: center;
  font-size: 1.6rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 2rem;
}

.ask-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.ask-question-display {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  margin: 0 0 1.5rem 0;
  color: var(--text);
  line-height: 1.7;
}

.ask-suggestion {
  text-align: center;
  margin: 1.5rem 0;
}

.ask-spread-name {
  display: block;
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.ask-reason {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

.ask-confirm-btn {
  width: 100%;
  margin-top: 1rem;
}

.ask-other-spreads {
  margin-top: 1.5rem;
  text-align: center;
}

.ask-other-spreads summary {
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
}

.ask-spread-options {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.ask-spread-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
}

.ask-back {
  display: block;
  text-align: center;
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .quick-ask-container {
    padding: 1.25rem;
  }
  .ask-confirm-container {
    margin: 1rem auto;
  }
}

/* Loading state */
.ask-loading {
  text-align: center;
  padding: 2rem;
  margin-top: 1rem;
}

.ask-loading-symbol {
  display: block;
  font-size: 1.8rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

.ask-loading-text {
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

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

/* =========================================
   Nova barra de conversa
   ========================================= */
.conv-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}

.conv-textarea {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--text);
  font-family: Georgia, serif;
  resize: none;
  line-height: 1.5;
  transition: border-color 0.2s;
  min-height: 44px;
}

.conv-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.conv-submit {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

.conv-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.conv-option-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.conv-option-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
}

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

.conv-chip {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.conv-chip input {
  display: none;
}

.conv-chip span {
  font-size: 0.875rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.15s;
  white-space: nowrap;
}

.conv-chip input:checked + span {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.conv-chip:hover span {
  border-color: var(--accent);
  color: var(--text);
}

@media (max-width: 600px) {
  .conv-options {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* =========================================
   Avatar grid & user avatar
   ========================================= */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
  justify-items: center;
}

.avatar-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.avatar-option:hover {
  border-color: var(--accent);
  transform: scale(1.1);
}

.avatar-option input { display: none; }

.avatar-selected {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.15);
}

.avatar-icon { font-size: 1.4rem; }

.avatar-letter {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--accent);
}

.user-avatar {
  font-size: 1.2rem;
  margin-right: 0.25rem;
}

.user-avatar-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.875rem;
  font-weight: bold;
  vertical-align: middle;
}

@media (max-width: 600px) {
  .avatar-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* =========================================
   Streaming SSE
   ========================================= */
.reading-stream {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-family: Georgia, serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  max-height: 70vh;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  transition: opacity 0.2s ease;
}

.reading-stream h2,
.reading-stream h3 {
  color: var(--accent);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.reading-stream strong {
  color: var(--text);
}

.reading-stream hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.reading-stream p {
  margin-bottom: 0.75rem;
}

.stream-loading-container {
  text-align: center;
  padding: 3rem 1rem;
}

.stream-loading-symbol {
  display: block;
  font-size: 2rem;
  letter-spacing: 0.4em;
  color: var(--accent);
  animation: streamPulse 2.5s ease-in-out infinite;
}

.stream-loading-text {
  color: var(--text-muted);
  font-style: italic;
  margin-top: 1rem;
  font-size: 0.95rem;
}

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

/* =========================================
   Pausa Ritual
   ========================================= */
.ritual-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg, #0f0f1a);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.ritual-container {
  text-align: center;
  max-width: 480px;
  padding: 2rem;
}

.ritual-phase {
  opacity: 1;
  transition: opacity 0.8s ease;
}

.ritual-question {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-muted, #a09bb8);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.ritual-message {
  font-family: Georgia, serif;
  font-size: 0.95rem;
  color: var(--text-muted, #a09bb8);
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.ritual-message-strong {
  font-size: 1.1rem;
  color: var(--text, #e8e0f0);
  letter-spacing: 0.06em;
}

.ritual-subtle {
  font-size: 0.875rem;
  opacity: 0.5;
  letter-spacing: 0.08em;
}

.ritual-symbols {
  display: block;
  font-size: 2rem;
  letter-spacing: 0.4em;
  color: var(--accent, #b39ddb);
  margin-bottom: 1.5rem;
}

.ritual-breath .ritual-symbols {
  animation: ritualBreathe 8s ease-in-out infinite;
}

@keyframes ritualBreathe {
  0%   { transform: scale(0.8); opacity: 0.4; }
  50%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.4; }
}

.ritual-particles .ritual-symbols {
  animation: ritualGlow 3s ease-in-out infinite;
}

@keyframes ritualGlow {
  0%   { opacity: 0.3; text-shadow: none; }
  50%  { opacity: 1;
         text-shadow: 0 0 20px rgba(124, 58, 237, 0.4),
                      0 0 40px rgba(124, 58, 237, 0.2); }
  100% { opacity: 0.3; text-shadow: none; }
}

.ritual-symbols-slow {
  animation: ritualSlow 4s ease-in-out infinite;
}

@keyframes ritualSlow {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.8; }
}

@media (max-width: 600px) {
  .ritual-container { padding: 1.5rem 1rem; }
  .ritual-question { font-size: 1rem; }
  .ritual-symbols { font-size: 1.5rem; }
  .ritual-message { font-size: 0.85rem; }
}

/* Engrenagem de settings — escondida no desktop, visível no mobile */
.header-settings-link {
  display: none !important;
}

/* =========================================
   Mobile header responsivo (360px+)
   ========================================= */
@media (max-width: 600px) {
  /* Header compacto */
  .header-inner {
    padding: 0.5rem 0.75rem;
    gap: 0.25rem;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
  }

  /* Grupo esquerdo — navegação */
  .header-left {
    flex: 1;
    justify-content: flex-start;
    gap: 0.25rem;
  }

  /* Logo centralizado */
  .header-logo {
    flex: 0 0 auto;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    white-space: nowrap;
    text-align: center;
  }

  /* Grupo direito — ações */
  .header-right {
    flex: 1;
    justify-content: flex-end;
    gap: 0.25rem;
  }

  /* Título Quantarot — esconder no mobile */
  .header-inner h1 {
    display: none;
  }

  /* Botões menores */
  .header-inner .btn-ghost.btn-sm {
    font-size: 0.875rem;
    padding: 0.25rem 0.4rem;
  }

  /* "← Sessões" — mostrar só ← */
  .header-inner a[href="/"] {
    font-size: 0;
    line-height: 1;
  }
  .header-inner a[href="/"]::before {
    content: "←";
    font-size: 0.85rem;
  }

  /* Logout: escondido no mobile (movido para Settings) */

  /* Esconder Tags e Sair no header mobile */
  .header-inner a[href="/tags"] {
    display: none !important;
  }
  .header-inner a[href="/admin"] {
    font-size: 0;
    line-height: 1;
  }
  .header-inner a[href="/admin"]::before {
    content: "⚙️";
    font-size: 0.85rem;
  }
  .header-inner form[action="/logout"] {
    display: none !important;
  }

  /* Esconder nome/avatar settings link no mobile */
  .header-inner a[href="/settings"]:not(.header-settings-link) {
    display: none !important;
  }

  /* Esconder theme toggle no mobile */
  #theme-toggle {
    display: none !important;
  }

  /* Mostrar engrenagem settings no mobile */
  .header-settings-link {
    display: inline-flex !important;
    align-items: center;
    font-size: 1.1rem;
    padding: 0.25rem;
    color: var(--text-muted);
    text-decoration: none;
  }

  /* Session actions — scroll horizontal */
  .session-actions {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
    flex-wrap: nowrap;
  }
  .session-actions::-webkit-scrollbar {
    display: none;
  }
  .session-actions .btn-ghost.btn-sm {
    font-size: 0.85rem;
    padding: 0.3rem 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Quick ask container mobile */
  .quick-ask-container {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
  }
  .quick-ask-title {
    font-size: 1.1rem;
  }
  .quick-ask-input {
    font-size: 0.9rem;
    min-height: 60px;
  }
}

/* ═══════════════════════════════════════
   Intent chips & Spread selector
   ═══════════════════════════════════════ */

.intent-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.intent-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.intent-chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

.intent-chip.active {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.spread-selector {
  margin-top: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.spread-category {
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
}

.spread-category:last-child {
  border-bottom: none;
}

.spread-category-header {
  margin-bottom: 0.4rem;
}

.spread-category-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.spread-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
}

.spread-option:hover {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.05);
}

.spread-option.active {
  background: rgba(124, 58, 237, 0.12);
  border-color: var(--accent);
}

.spread-option-icon {
  font-size: 0.85rem;
}

.spread-option-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.spread-option-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
}

.spread-option-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  opacity: 0.6;
  line-height: 1.3;
}

.spread-option-cards {
  font-size: 0.875rem;
  color: var(--text-muted);
  opacity: 0.5;
  margin-left: auto;
  white-space: nowrap;
}

/* Chat e followup cards */
.reading-card-chat {
  border-left: 3px solid var(--accent);
  background: transparent;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
}

.reading-card-chat .reading-question-text {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 0.25rem;
}

.chat-response {
  font-family: Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}

.reading-card-followup {
  border-left: 3px solid var(--text-muted);
  background: transparent;
}

.reading-card-followup .reading-label {
  font-size: 0.875rem;
  opacity: 0.5;
}

.deepen-inline-btn {
  display: block;
  margin: 0.75rem auto 0;
  font-size: 0.875rem;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.deepen-inline-btn:hover {
  opacity: 1;
}

/* Typing indicator (3 pulsing dots) */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 14px 18px;
  margin: 8px 0;
  background: var(--surface2);
  border-radius: 16px;
  width: fit-content;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
  opacity: 0.4;
  animation: typing-pulse 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-pulse {
  0%, 60%, 100% { opacity: 0.4; transform: scale(1); }
  30% { opacity: 1; transform: scale(1.2); }
}

@media (max-width: 600px) {
  .intent-chips {
    gap: 0.35rem;
  }
  .intent-chip {
    font-size: 0.875rem;
    padding: 0.3rem 0.6rem;
  }
  .spread-option {
    padding: 0.3rem 0.5rem;
  }
  .spread-option-name {
    font-size: 0.72rem;
  }
  .spread-option-desc {
    display: none;
  }
  .spread-option-cards {
    display: none;
  }
}

/* Out-of-scope notice */
.out-of-scope-notice {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 0 0 1rem;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════
   Carta do Dia — Card dourado
   ═══════════════════════════════════════ */

.daily-card-container {
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.daily-card {
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.daily-card--pending {
  background: linear-gradient(135deg, rgba(180,130,30,0.18) 0%, rgba(245,200,80,0.28) 100%) !important;
  border: 1px solid rgba(212,168,75,0.45) !important;
}

.daily-card--done {
  background: linear-gradient(135deg, rgba(180,130,30,0.14) 0%, rgba(245,200,80,0.22) 100%) !important;
  border: 1px solid rgba(212,168,75,0.4) !important;
}

.daily-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.daily-card-icon {
  font-size: 1.3rem;
}

.daily-card-title {
  font-family: Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: #D4A84B;
}

.daily-card-streak {
  font-size: 0.875rem;
  color: #D4A84B;
  opacity: 0.7;
  font-style: italic;
}

.streak-milestone {
  text-align: center;
  font-size: .85rem;
  color: var(--accent);
  padding: .5rem;
  background: var(--surface2);
  border-radius: 8px;
  margin-top: .5rem;
}

/* Daily cosmic (numerology + moon) */
.daily-cosmic {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 0 auto 1.5rem;
  max-width: 600px;
  flex-wrap: wrap;
}

.cosmic-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 140px;
  flex: 1;
}

.cosmic-emoji {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.cosmic-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.cosmic-meaning {
  font-size: 0.875rem;
  opacity: 0.6;
  text-align: center;
  margin-top: 0.25rem;
}

/* Edu note (visible block) */
.edu-note {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--surface2);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  line-height: 1.6;
  opacity: 0.85;
}

/* Reading summary (anchor links) */
.reading-summary {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.summary-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.summary-item {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.15s ease;
}

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

.summary-item:hover {
  opacity: 0.7;
}

.summary-item strong {
  color: var(--accent);
  margin-right: 0.25rem;
}

/* Anchor scroll offset for fixed header */
span[id^="pos-"],
span#sintese {
  scroll-margin-top: 80px;
}

/* Context field */
.context-details {
  margin-top: 0.5rem;
}

.context-toggle {
  font-size: 0.85rem;
  color: var(--accent);
  cursor: pointer;
  opacity: 0.7;
}

.context-toggle:hover {
  opacity: 1;
}

.context-textarea {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text);
  resize: vertical;
  box-sizing: border-box;
}

.seven-day-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  text-align: center;
}

.seven-day-header h3 {
  font-size: 1rem;
  margin-bottom: .75rem;
}

.seven-day-body {
  font-size: .9rem;
  color: var(--text-sec);
  margin-bottom: .75rem;
}

.seven-day-body p {
  margin-bottom: .4rem;
}

.seven-day-cta {
  margin-top: .75rem;
  font-size: .85rem;
  opacity: .8;
}

.daily-card-invite {
  font-family: Georgia, serif;
  font-size: 0.95rem;
  color: var(--text-sec, #666);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.daily-card-name {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text, #333);
  margin-bottom: 0.35rem;
}

.daily-card-summary {
  font-family: Georgia, serif;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  opacity: 0.85;
}

.daily-card-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-daily {
  background: linear-gradient(135deg, #D4A84B, #B8922E);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.5rem;
  font-family: Georgia, serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-daily:hover {
  background: linear-gradient(135deg, #B8922E, #9A7A20);
  transform: translateY(-1px);
}

/* Ritual solar */
.ritual-overlay--daily {
  background: linear-gradient(180deg, rgba(15, 15, 26, 0.97) 0%, rgba(30, 20, 10, 0.97) 100%);
}

.ritual-symbols-daily {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  animation: dailyPulse 3s ease-in-out infinite;
}

.ritual-symbols-daily-slow {
  animation: dailyPulseSlow 4s ease-in-out infinite;
}

@keyframes dailyPulse {
  0%   { transform: scale(0.9); opacity: 0.5; text-shadow: none; }
  50%  { transform: scale(1.15); opacity: 1; text-shadow: 0 0 30px rgba(212, 168, 75, 0.5), 0 0 60px rgba(212, 168, 75, 0.2); }
  100% { transform: scale(0.9); opacity: 0.5; text-shadow: none; }
}

@keyframes dailyPulseSlow {
  0%, 100% { opacity: 0.3; text-shadow: none; }
  50%      { opacity: 0.8; text-shadow: 0 0 20px rgba(212, 168, 75, 0.4); }
}

.ritual-breath-daily .ritual-symbols-daily {
  animation: dailyBreathe 8s ease-in-out infinite;
}

@keyframes dailyBreathe {
  0%   { transform: scale(0.8); opacity: 0.4; }
  50%  { transform: scale(1.3); opacity: 1; text-shadow: 0 0 40px rgba(212, 168, 75, 0.4); }
  100% { transform: scale(0.8); opacity: 0.4; }
}

.ritual-message-daily {
  font-family: Georgia, serif;
  font-size: 0.95rem;
  color: #D4A84B;
  letter-spacing: 0.04em;
  line-height: 1.6;
  opacity: 0.8;
}

.ritual-message-daily-strong {
  font-size: 1.1rem;
  opacity: 1;
  color: #E8C86A;
}

.ritual-subtle-daily {
  font-size: 0.875rem;
  opacity: 0.6;
  letter-spacing: 0.08em;
}

/* Sessão personalizada */
.session-custom-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.session-custom-link:hover {
  opacity: 1;
}

.session-custom-hint {
  display: block;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-sec, #888);
  opacity: 0.5;
  margin-top: 0.25rem;
}

/* ask_confirm spread choice */
.ask-spread-choice {
  text-align: center;
  margin: 0.75rem 0;
}

@media (max-width: 600px) {
  .daily-card {
    padding: 1rem;
    margin: 0 0.5rem;
  }
  .daily-card-invite {
    font-size: 0.9rem;
  }
  .daily-card-title {
    font-size: 0.9rem;
  }
  .btn-daily {
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
  }
  .ritual-symbols-daily {
    font-size: 2rem;
  }
}

/* ═══════════════════════════════════════
   Onboarding Overlay
   ═══════════════════════════════════════ */

.onboarding-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.85) !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.5rem !important;
}

.onboarding-container {
  background: var(--bg, #fff) !important;
  border-radius: 20px !important;
  padding: 2.5rem 2rem !important;
  max-width: 420px !important;
  width: 100% !important;
  position: relative !important;
  text-align: center !important;
}

.onboarding-close {
  position: absolute !important;
  top: 1rem !important;
  right: 1rem !important;
  background: none !important;
  border: none !important;
  font-size: 1.5rem !important;
  color: var(--text-sec) !important;
  cursor: pointer !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  transition: all 0.2s !important;
}

.onboarding-close:hover {
  background: var(--surface);
  color: var(--text);
}

.onboarding-card {
  display: none !important;
  padding: 1rem 0;
}

.onboarding-card.active {
  display: block !important;
  animation: onboardingFadeIn 0.4s ease;
}

@keyframes onboardingFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.onboarding-icon {
  font-size: 3rem !important;
  margin-bottom: 1rem !important;
}

.onboarding-title {
  font-family: Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.onboarding-text {
  font-family: Georgia, serif;
  font-size: 0.9rem;
  color: var(--text-sec);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto;
}

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.onboarding-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: var(--border) !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.onboarding-dot.active {
  background: var(--accent) !important;
  width: 24px !important;
  border-radius: 4px !important;
}

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

.onboarding-prev,
.onboarding-next {
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .onboarding-container {
    padding: 2rem 1.5rem;
    border-radius: 16px;
  }
  .onboarding-icon {
    font-size: 2.5rem;
  }
  .onboarding-title {
    font-size: 1.1rem;
  }
  .onboarding-text {
    font-size: 0.85rem;
  }
}

/* ═══════════════════════════════════════
   Página /tiragens — Catálogo
   ═══════════════════════════════════════ */

.tiragens-category {
  margin-bottom: 2.5rem;
}

.tiragens-category-title {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.tiragens-category-desc {
  font-family: Georgia, serif;
  font-size: 0.85rem;
  color: var(--text-sec);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.tiragens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.tiragem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
}

.tiragem-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tiragem-card--featured {
  border-color: var(--accent);
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.03) 0%,
    rgba(124, 58, 237, 0.08) 100%
  );
}

.tiragem-card--daily {
  border-color: rgba(212, 168, 75, 0.3);
  background: linear-gradient(
    135deg,
    rgba(212, 168, 75, 0.03) 0%,
    rgba(212, 168, 75, 0.08) 100%
  );
}

.tiragem-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tiragem-card-icon {
  font-size: 1.5rem;
}

.tiragem-card-name {
  font-family: Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.tiragem-card-count {
  font-size: 0.875rem;
  color: var(--text-sec);
  opacity: 0.6;
}

.tiragem-card-desc {
  font-family: Georgia, serif;
  font-size: 0.82rem;
  color: var(--text-sec);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.tiragem-card-btn {
  display: inline-block;
  font-family: Georgia, serif;
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.tiragem-card-btn:hover {
  opacity: 0.7;
}

.tiragem-card-btn--daily {
  color: #D4A84B;
}

@media (max-width: 600px) {
  .tiragens-grid {
    grid-template-columns: 1fr;
  }
  .tiragem-card {
    padding: 1rem;
  }
  .tiragem-card-name {
    font-size: 0.9rem;
  }
  .tiragem-card-desc {
    font-size: 0.875rem;
  }
}

/* Guardian Card */
.guardian-card {
  text-align: center;
  padding: 1.25rem;
  margin: 1rem auto;
  max-width: 320px;
  background: var(--surface2);
  border: 1px solid var(--accent);
  border-radius: 16px;
}

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

.guardian-icon {
  font-size: 1.3rem;
}

.guardian-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.guardian-name {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.guardian-count {
  display: block;
  font-size: 0.875rem;
  opacity: 0.5;
}

.guardian-insight {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.6;
  opacity: 0.75;
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

/* Universe Message */
.universe-message-card {
  text-align: center;
  margin: 0 auto 1.5rem;
  max-width: 400px;
}

.universe-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 16px;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.universe-btn:hover {
  background: rgba(124, 58, 237, 0.08);
  transform: translateY(-1px);
}

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

.universe-icon {
  font-size: 1.3rem;
}

.universe-text {
  font-weight: 400;
}

/* =========================================
   Serif Typography (Block 6.2)
   ========================================= */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
}

.interpretation-text h2 {
  font-family: var(--font-serif);
  font-weight: 600;
}

.session-title-bar h2 {
  font-family: var(--font-serif);
}

body, p, button, input, textarea, select, .btn,
.filter-tab, .tag-badge, .reading-label,
.session-date, .reading-meta {
  font-family: var(--font-sans);
}

/* =========================================
   Sanctuary Greeting (Block 6.1)
   ========================================= */
/* =========================================
   Home Layout Zones
   ========================================= */
.home-layout {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

.zone-identity {
  text-align: center;
  padding: 1.5rem 0 1rem;
}

.zone-ritual {
  margin-bottom: 1.5rem;
}

.zone-action {
  margin-bottom: 2rem;
}

.zone-history {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.greeting-meta {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  opacity: 1;
  color: var(--text);
  flex-wrap: wrap;
}

.ritual-chips {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.875rem;
  white-space: nowrap;
}

.chip-link {
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s;
}

.chip-link:hover {
  border-color: var(--accent);
}

/* Dream register */
.dream-register {
  margin-top: 1rem;
  text-align: center;
}

.dream-register-toggle {
  font-size: 0.85rem;
  opacity: 0.6;
  cursor: pointer;
  list-style: none;
}

.dream-register-toggle::-webkit-details-marker {
  display: none;
}

.dream-register-toggle:hover {
  opacity: 0.9;
}

.dream-register-form {
  margin-top: 0.75rem;
  text-align: left;
}

.dream-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text);
  font-size: 0.9rem;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.5;
  font-family: inherit;
}

.dream-register-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.dream-register-hint {
  font-size: 0.875rem;
  opacity: 0.6;
  margin-top: 0.25rem;
}

/* Home cards grid: Carta do Dia + Horóscopo side by side */
.home-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

.home-cards-grid .daily-card-container,
.home-cards-grid .horoscope-card-container {
  display: flex;
  flex-direction: column;
  max-width: none;
  margin: 0;
}

.home-cards-grid .daily-card,
.home-cards-grid .horoscope-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  text-align: center;
}

.home-cards-grid .daily-card-body,
.home-cards-grid .horoscope-card-body {
  flex: 1;
}

.home-cards-grid .daily-card-actions,
.home-cards-grid .horoscope-card-actions {
  margin-top: auto;
}

.home-cards-grid .zone-action {
  display: flex;
  flex-direction: column;
}

.home-cards-grid .zone-action .quick-ask-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Horoscope card on home */
.horoscope-card-container {
  display: flex;
  flex-direction: column;
}

.horoscope-card {
  background: linear-gradient(135deg, rgba(13,148,136,0.12) 0%, rgba(212,168,75,0.15) 100%);
  border: 1px solid rgba(13,148,136,0.35);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.horoscope-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.horoscope-card-title {
  font-family: Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: #0D9488;
}

.horoscope-card-date {
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.45;
  margin-top: -0.25rem;
  margin-bottom: 0.25rem;
}

.horoscope-card-body {
  flex: 1;
}

.horoscope-card-sign {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0D9488;
  margin-bottom: 0.35rem;
}

.horoscope-card-summary {
  font-family: Georgia, serif;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  opacity: 0.85;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.horoscope-card-actions {
  margin-top: auto;
}

.btn-horoscope {
  display: inline-block;
  font-family: Georgia, serif;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, #0D9488, #0F766E);
  text-decoration: none;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 10px;
  border: none;
  transition: all 0.2s;
}

.btn-horoscope:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.horoscope-card-icon {
  font-size: 1.3rem;
}

.horoscope-card--empty {
  justify-content: center;
  align-items: center;
}

.horoscope-card-empty-text {
  font-size: 0.85rem;
  opacity: 0.6;
  margin: 0.5rem 0;
  text-align: center;
}

.horoscope-card-empty-link {
  font-size: 0.875rem;
  color: #0D9488;
}

/* ===== Astrology page (/minha-astrologia) ===== */

.astro-daily-card {
  background: linear-gradient(135deg, rgba(13,148,136,0.12) 0%, rgba(212,168,75,0.15) 100%);
  border: 1px solid rgba(13,148,136,0.35);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.astro-horoscope-content {
  font-family: var(--font-serif, serif);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

.astro-horoscope-content h1 {
  display: none;
}

.astro-horoscope-content h2 {
  font-family: var(--font-sans, sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: #0D9488;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.75rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(13,148,136,0.15);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.astro-horoscope-content h2:first-of-type {
  margin-top: 0;
}

.astro-horoscope-content p {
  margin: 0 0 1rem;
}

.astro-energy-bars {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(13,148,136,0.15);
}

.astro-bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.4rem;
}

.astro-bar-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.astro-bar-explanation {
  font-family: var(--font-serif, serif);
  font-size: 0.875rem;
  color: var(--text);
  opacity: 0.85;
  font-style: italic;
  padding-left: 90px;
  line-height: 1.4;
}

.astro-bar-label {
  font-size: 0.85rem;
  color: var(--text);
  width: 90px;
  flex-shrink: 0;
  font-weight: 500;
}

.astro-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(13,148,136,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.astro-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0D9488, #14B8A6);
  border-radius: 4px;
  transition: width 0.8s ease-out;
}

.astro-bar-value {
  font-size: 0.875rem;
  color: #0D9488;
  font-weight: 500;
  width: 65px;
  text-align: right;
  flex-shrink: 0;
}

.astro-bar-fill.bar-intense {
  background: linear-gradient(90deg, #D4A84B, #F5C850);
}
.astro-bar-fill.bar-strong {
  background: linear-gradient(90deg, #0D9488, #14B8A6);
}
.astro-bar-fill.bar-good {
  background: linear-gradient(90deg, #0D9488, #5EEAD4);
}
.astro-bar-fill.bar-moderate {
  background: linear-gradient(90deg, #D4A84B, #FBBF24);
}
.astro-bar-fill.bar-low {
  background: linear-gradient(90deg, #9CA3AF, #D1D5DB);
}

.astro-bar-summary {
  font-family: var(--font-serif, serif);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text);
  opacity: 0.85;
  margin-top: 0.5rem;
  text-align: center;
}

.astro-cta-link {
  display: inline-block;
  font-size: 0.85rem;
  color: #0D9488;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1.5px solid #0D9488;
  border-radius: 20px;
  margin: 0.75rem 0 1.5rem;
  transition: all 0.15s;
  font-weight: 500;
}

.astro-cta-link:hover {
  background: rgba(13,148,136,0.12);
  color: #0F766E;
}

button.astro-cta-link {
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.astro-personal-note {
  position: relative;
  font-family: var(--font-serif, serif);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  padding: 1.5rem 1.5rem 1.25rem;
  margin-bottom: 1.5rem;
  background: rgba(13,148,136,0.08);
  border: 1px solid rgba(13,148,136,0.2);
  border-radius: 16px;
}

.astro-personal-badge {
  display: block;
  font-family: var(--font-sans, sans-serif);
  font-size: 0.875rem;
  font-weight: 600;
  color: #0D9488;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(13,148,136,0.15);
}

.astro-personal-text {
  font-family: var(--font-serif, serif);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

.astro-moon-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(13,148,136,0.15);
  font-size: 0.85rem;
  opacity: 0.7;
}

.astro-moon-tip {
  font-family: var(--font-serif, serif);
  font-style: italic;
  font-size: 0.85rem;
  opacity: 0.8;
}

.astro-sign-section {
  margin-bottom: 2rem;
}

.astro-details {
  margin-bottom: 1.5rem;
}

.astro-details-toggle {
  font-size: 0.9rem;
  font-weight: 500;
  color: #0D9488;
  cursor: pointer;
  list-style: none;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(13,148,136,0.15);
  margin-bottom: 1rem;
}

.astro-details-toggle::-webkit-details-marker {
  display: none;
}

.astro-details[open] .astro-details-toggle {
  margin-bottom: 1rem;
}

.astro-narrative {
  font-family: var(--font-serif, serif);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-line;
}

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

@media (max-width: 600px) {
  .astro-details-grid {
    grid-template-columns: 1fr;
  }
}

.astro-info-card {
  background: var(--surface2);
  border-radius: 12px;
  padding: 1rem;
}

.astro-info-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.5;
  margin-bottom: 0.5rem;
  color: #0D9488;
  font-weight: 600;
}

.astro-info-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
}

.astro-decanato {
  border-left: 3px solid #0D9488;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.astro-moon-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.astro-nav-link {
  font-size: 0.85rem;
  color: #0D9488;
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(13,148,136,0.2);
  border-radius: 20px;
  transition: all 0.15s;
}

.astro-nav-link:hover {
  background: rgba(13,148,136,0.08);
}

.zone-extras {
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .home-cards-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-layout {
    display: block;
  }

  .ritual-chips {
    justify-content: center;
  }
}

.sanctuary-greeting {
  text-align: center;
  padding: 0.5rem 1rem 0;
}

.greeting-text {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.greeting-date {
  font-size: 0.9rem;
  opacity: 0.5;
  margin-bottom: 0.25rem;
}

.greeting-cosmic {
  font-size: 0.85rem;
  opacity: 0.6;
}

/* =========================================
   Generous Spacing (Block 6.3)
   ========================================= */
.reading-card {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.interpretation-text {
  line-height: 1.8;
  font-size: 1rem;
}

.interpretation-text p {
  margin-bottom: 1.25rem;
}

.interpretation-text h2 {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.interpretation-text h2:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.daily-card-container {
  margin-bottom: 2rem;
}

.daily-cosmic {
  margin: 1.5rem 0 2rem;
}

.app-footer {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
}

/* =========================================
   Context Nudge (Block 6.6)
   ========================================= */
.context-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--accent);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.context-nudge {
  cursor: pointer;
}

.context-nudge:hover {
  background: rgba(124, 58, 237, 0.12);
}

.nudge-dismiss {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.5;
  padding: 0 0.25rem;
}

/* Caderno Card */
.caderno-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 0.75rem auto;
  max-width: 400px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s;
}

.caderno-card:hover {
  border-color: var(--accent);
}

.caderno-icon {
  font-size: 1.5rem;
}

.caderno-title {
  display: block;
  font-family: var(--font-serif, serif);
  font-size: 0.95rem;
  font-weight: 500;
}

.caderno-subtitle {
  display: block;
  font-size: 0.875rem;
  opacity: 0.5;
}

/* =========================================
   Bottom Navigation (mobile)
   ========================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  opacity: 0.6;
  font-size: 0.875rem;
  gap: 0.05rem;
  padding: 0.25rem 0.5rem;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item.active {
  opacity: 1;
  color: var(--accent);
}

.bottom-nav-item:hover {
  opacity: 0.7;
}

.bottom-nav-icon {
  font-size: 1rem;
  line-height: 1;
}

.bottom-nav-label {
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* =========================================
   Desktop Sidebar
   ========================================= */
.desktop-sidebar {
  display: none !important;
}

.notif-dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
}

.notif-badge-sidebar {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 14px;
  height: 14px;
  background: #ef4444;
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

@media (min-width: 768px) {
  .desktop-sidebar {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 44px;
    left: 0;
    bottom: 0;
    width: 180px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 0;
    z-index: 800;
    overflow-y: auto;
  }

  .sidebar-user {
    padding: 1rem 1rem 0.5rem;
    font-family: var(--font-serif, serif);
    font-size: 0.95rem;
    opacity: 0.7;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.25rem 0.5rem;
  }

  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    opacity: 0.5;
    font-size: 0.85rem;
    transition: all 0.15s;
  }

  .sidebar-item:hover {
    opacity: 0.8;
    background: var(--surface2);
  }

  .sidebar-item.active {
    opacity: 1;
    color: var(--accent);
    background: rgba(124, 58, 237, 0.08);
  }

  .sidebar-icon {
    font-size: 1rem;
    width: 1.2rem;
    text-align: center;
  }

  .sidebar-sub {
    display: flex;
    flex-direction: column;
    padding-left: 2.25rem;
    margin-top: -0.25rem;
    margin-bottom: 0.25rem;
  }

  .sidebar-subitem {
    font-size: 0.875rem;
    color: var(--text);
    opacity: 0.6;
    text-decoration: none;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    transition: opacity 0.15s;
  }

  .sidebar-subitem:hover {
    opacity: 1;
    background: rgba(13,148,136,0.08);
  }

  .sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0.75rem;
  }

  /* Push main content right and center in remaining space */
  .main-content {
    margin-left: 180px;
    max-width: none;
    width: calc(100% - 180px);
    padding: 0;
  }

  .bottom-nav {
    display: none;
  }
}

/* Wider screens: center content accounting for sidebar */
@media (min-width: 1100px) {
  .main-content {
    margin-left: 180px;
    max-width: none;
    width: calc(100% - 180px);
    padding: 0;
  }
}

/* Footer: hidden on mobile, slim on desktop */
.app-footer a {
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 767px) {
  .app-footer {
    display: none;
  }
}

/* Feedback button hidden on mobile (available in profile) */
@media (max-width: 767px) {
  .feedback-float-btn {
    display: none;
  }
}

/* Astro data banner */
.astro-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  margin: 0.75rem 0;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 10px;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}

.astro-banner:hover {
  background: rgba(124, 58, 237, 0.1);
}

/* =========================================
   Home textarea + quick actions
   ========================================= */
.zone-title {
  font-family: var(--font-serif, serif);
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.6;
  margin-bottom: 0.5rem;
  text-align: center;
}

.home-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
  resize: none;
  box-sizing: border-box;
  font-family: inherit;
}

.home-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.home-ask-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.home-submit {
  flex: 1;
  padding: 0.6rem;
  font-size: 0.9rem;
}

.home-choose {
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  white-space: nowrap;
  text-decoration: none;
}

/* =========================================
   Consult page
   ========================================= */
.consult-textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
}

.consult-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.consult-submit {
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem;
  font-size: 1rem;
}

.spread-selector {
  margin-top: 1.25rem;
}

.spread-category-title {
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}

.spread-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
}

.spread-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
  font-family: inherit;
  color: var(--text);
}

.spread-card:hover {
  border-color: var(--accent);
}

.spread-card.selected {
  border-color: var(--accent);
  background: var(--surface2);
}

.spread-card-icon {
  font-size: 1.3rem;
}

.spread-card-name {
  font-size: 0.875rem;
  font-weight: 500;
}

.spread-card-cost {
  font-size: 0.875rem;
  opacity: 0.6;
}

.spread-more-toggle {
  font-size: 0.875rem;
  opacity: 0.6;
  cursor: pointer;
  text-align: center;
  margin: 0.5rem 0;
}

.spread-more-toggle:hover {
  opacity: 0.7;
}

/* =========================================
   Back link
   ========================================= */
.back-link {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s;
}

.back-link:hover {
  background: rgba(124, 58, 237, 0.08);
}

/* =========================================
   Journey page tabs
   ========================================= */
.journey-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.journey-tab {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--text);
  opacity: 0.5;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}

.journey-tab.active {
  opacity: 1;
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.journey-tab:hover {
  opacity: 0.7;
}

/* Mobile: grid 2x2 */
@media (max-width: 500px) {
  .journey-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-bottom: none;
  }
  .journey-tab {
    text-align: center;
    padding: 0.5rem 0.25rem;
    font-size: 0.875rem;
    border-bottom: 2px solid var(--border);
  }
  .journey-tab.active {
    border-bottom-color: var(--accent);
  }
}

/* =========================================
   Profile page links
   ========================================= */
.profile-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.15s;
}

.profile-link:hover {
  border-color: var(--accent);
}

/* AI Insight rendered markdown */
#insight-content h1 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  color: var(--text);
}

#insight-content h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0D9488;
  margin: 1rem 0 0.5rem;
}

#insight-content h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.75rem 0 0.4rem;
}

#insight-content p {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

#insight-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

#insight-content table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
  margin: 0.75rem 0;
}

#insight-content th,
#insight-content td {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  text-align: left;
}

#insight-content th {
  background: rgba(13,148,136,0.08);
  font-weight: 600;
}

#insight-content strong {
  font-weight: 600;
}

#insight-content ul, #insight-content ol {
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

#insight-content li {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 0.25rem;
}

/* Cloudflare Turnstile */
.cf-turnstile {
  margin: 1rem auto;
}

.cf-turnstile iframe {
  border-radius: 8px;
}

/* ============================================
   SHARE CARDS (renderizados como PNG)
   ============================================ */

/* Card vertical pra Stories (1080x1920 → escala 1/4 = 270x480) */
.share-card-story {
  width: 270px;
  height: 480px;
}

/* Card quadrado pra Feed (1080x1080 → escala 1/4 = 270x270) */
.share-card-square {
  width: 270px;
  height: 270px;
}

.share-card-bg {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  color: #e0e0e0;
  font-family: 'Cormorant Garamond', serif;
  overflow: hidden;
  position: relative;
}

.share-card-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(13,148,136,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.share-card-header {
  text-align: center;
}

.share-card-logo {
  font-family: Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #0D9488;
  opacity: 0.9;
}

.share-card-body {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.share-card-date {
  font-family: Arial, sans-serif;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.5;
  margin-bottom: 0.5rem;
}

.share-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.share-card-subtitle {
  font-size: 0.875rem;
  opacity: 0.6;
}

.share-card-reversed {
  font-family: Arial, sans-serif;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #D4A84B;
  margin-top: 0.25rem;
}

.share-card-spread {
  font-family: Arial, sans-serif;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.5;
  margin-bottom: 0.75rem;
}

.share-card-cards {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.share-card-card-name {
  font-size: 0.875rem;
  color: #D4A84B;
}

.share-card-quote {
  font-style: italic;
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 220px;
  opacity: 0.8;
  margin-top: 0.75rem;
}

.share-card-footer {
  text-align: center;
}

.share-card-url {
  font-family: Arial, sans-serif;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  opacity: 0.4;
}

/* Barras de energia no card de share */
.share-bars {
  width: 100%;
  margin-top: 0.75rem;
}

.share-bar-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  margin-bottom: 0.2rem;
}

.share-bar-label {
  font-family: Arial, sans-serif;
  font-size: 0.875rem;
  width: 55px;
  text-align: left;
  flex-shrink: 0;
}

.share-bar-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.share-bar-fill {
  height: 100%;
  border-radius: 2px;
}

.share-bar-fill.bar-intense {
  background: linear-gradient(90deg, #D4A84B, #F5C850);
}
.share-bar-fill.bar-strong {
  background: linear-gradient(90deg, #0D9488, #14B8A6);
}
.share-bar-fill.bar-good {
  background: linear-gradient(90deg, #0D9488, #5EEAD4);
}
.share-bar-fill.bar-moderate {
  background: linear-gradient(90deg, #D4A84B, #FBBF24);
}
.share-bar-fill.bar-low {
  background: linear-gradient(90deg, #6B7280, #9CA3AF);
}

.share-bar-value {
  font-family: Arial, sans-serif;
  font-size: 0.45rem;
  width: 40px;
  text-align: right;
  opacity: 0.7;
  flex-shrink: 0;
}

/* Botão de compartilhar */
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-share:hover {
  border-color: #0D9488;
  color: #0D9488;
}

