/* Estilos isolados do Atlas Interativo de Sintomas (/atlas/) */

.atlas-page,
.atlas-modal,
.atlas-toast {
  --atlas-cream: #F7F1E7;
  --atlas-plate: #F2E8D8;
  --atlas-parchment: #FAF4EA;
  --atlas-surface: #FFFDF9;
  --atlas-warm: #EFE5D5;
  --atlas-chocolate: #2E1E17;
  --atlas-chocolate-light: #523A30;
  --atlas-gold: #B58E4C;
  --atlas-gold-deep: #8C682B;
  --atlas-gold-soft: #EDE1CC;
  --atlas-terracotta: #B54534;
  --atlas-terracotta-deep: #8A2E20;
  --atlas-terracotta-bg: #FCF1EE;
  --atlas-sage: #2F5E4B;
  --atlas-sage-bg: #ECF4F0;
  --atlas-text: #2A1E19;
  --atlas-muted: #6C5A51;
  --atlas-border: #DFD3C1;
  --atlas-border-strong: #CEBD9F;
  --atlas-radius-lg: 20px;
  --atlas-radius-md: 12px;
  --atlas-shadow: 0 18px 44px -18px rgba(46, 30, 23, 0.14), 0 2px 6px rgba(46, 30, 23, 0.04);
  --atlas-shadow-sm: 0 6px 18px -8px rgba(46, 30, 23, 0.12);
  --atlas-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --atlas-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.atlas-page,
.atlas-page *,
.atlas-page *::before,
.atlas-page *::after,
.atlas-modal,
.atlas-modal *,
.atlas-modal *::before,
.atlas-modal *::after {
  box-sizing: border-box;
}

.atlas-page {
  font-family: var(--sans);
  background-color: var(--atlas-cream);
  background-image:
    radial-gradient(ellipse 80% 50% at 15% 0%, rgba(181, 142, 76, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 45% at 88% 10%, rgba(181, 69, 52, 0.05), transparent 55%);
  color: var(--atlas-text);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  position: relative;
  border-top: 3px solid var(--atlas-gold);
}

.atlas-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.atlas-page button:focus-visible,
.atlas-page input:focus-visible,
.atlas-page textarea:focus-visible,
.atlas-page a:focus-visible,
.atlas-page [tabindex]:focus-visible,
.atlas-modal button:focus-visible,
.atlas-modal input:focus-visible,
.atlas-modal textarea:focus-visible,
.atlas-modal a:focus-visible {
  outline: 2px solid var(--atlas-gold);
  outline-offset: 2px;
}

.atlas-container {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 52px;
}

body.is-embed .topbar,
body.is-embed .nav-mobile-overlay,
body.is-embed .nav-mobile-drawer,
body.is-embed .site-footer {
  display: none !important;
}

body.is-embed .atlas-page {
  background-image: none;
}

body.is-embed .atlas-page::before {
  display: none;
}

body.is-embed .atlas-container {
  padding: 14px 14px 24px;
}

body.is-embed .atlas-header {
  padding-bottom: 14px;
  margin-bottom: 14px;
}

body.is-embed .atlas-brand-title h1 {
  font-size: 1.7rem;
}

/* Header Editorial do Atlas */
.atlas-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--atlas-border);
  margin-bottom: 18px;
}

.atlas-brand-title {
  flex: 1 1 360px;
}

.atlas-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--atlas-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--atlas-gold-deep);
  margin-bottom: 6px;
}

.atlas-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--atlas-terracotta);
  display: inline-block;
}

.atlas-brand-title h1 {
  font-family: var(--serif);
  font-size: 2.55rem;
  font-weight: 600;
  color: var(--atlas-chocolate);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
}

.atlas-brand-title h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--atlas-gold-deep);
}

.atlas-brand-title p {
  font-size: 0.94rem;
  color: var(--atlas-muted);
  margin: 6px 0 0;
  max-width: 60ch;
}

.atlas-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Mode Switch */
.mode-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  background: var(--atlas-warm);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--atlas-border-strong);
  box-shadow: inset 0 1px 2px rgba(46, 30, 23, 0.06);
}

.mode-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: var(--atlas-chocolate);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(46, 30, 23, 0.24);
  transition: transform 0.28s var(--atlas-ease);
  pointer-events: none;
}

.mode-switch[data-mode="quiz"] .mode-slider {
  transform: translateX(100%);
}

.mode-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--atlas-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.22s ease;
}

.mode-btn.active {
  color: #FFFDF9;
}

.btn-share-header {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--atlas-surface);
  color: var(--atlas-chocolate);
  border: 1px solid var(--atlas-border-strong);
  padding: 9px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--atlas-shadow-sm);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.btn-share-header:hover {
  border-color: var(--atlas-gold);
  background: var(--atlas-parchment);
  transform: translateY(-1px);
}

/* Search Bar */
.search-bar-section {
  margin-bottom: 22px;
  position: relative;
  z-index: 25;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--atlas-surface);
  border: 1.5px solid var(--atlas-border-strong);
  border-radius: 14px;
  padding: 4px 14px;
  box-shadow: var(--atlas-shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--atlas-gold);
  box-shadow: 0 0 0 4px rgba(181, 142, 76, 0.15);
}

.search-icon {
  color: var(--atlas-gold-deep);
  flex-shrink: 0;
  margin-right: 10px;
  display: flex;
  align-items: center;
}

#search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--atlas-text);
  padding: 10px 4px;
  outline: none;
}

#search-input::placeholder {
  color: var(--atlas-muted);
  opacity: 0.82;
}

.search-kbd {
  font-family: var(--atlas-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--atlas-muted);
  background: var(--atlas-warm);
  border: 1px solid var(--atlas-border);
  border-radius: 6px;
  padding: 2px 7px;
  margin-left: 8px;
  flex-shrink: 0;
}

.search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: var(--atlas-warm);
  color: var(--atlas-chocolate);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  margin-left: 6px;
  flex-shrink: 0;
}

.search-clear.visible {
  display: inline-flex;
}

.search-clear:hover {
  background: var(--atlas-gold-soft);
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--atlas-surface);
  border: 1px solid var(--atlas-border-strong);
  border-radius: 14px;
  box-shadow: 0 22px 48px -14px rgba(46, 30, 23, 0.24);
  max-height: 360px;
  overflow-y: auto;
  display: none;
  padding: 6px;
}

.search-results.open {
  display: block;
  animation: atlasDropdownFade 0.18s var(--atlas-ease);
}

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

.search-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: inherit;
  transition: background 0.14s ease;
}

.search-item:hover,
.search-item.highlighted {
  background: var(--atlas-parchment);
}

.search-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.search-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--atlas-chocolate);
}

.search-item-organ {
  font-family: var(--atlas-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--atlas-gold-deep);
  background: var(--atlas-warm);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.search-item-sub {
  font-size: 0.8rem;
  color: var(--atlas-muted);
  line-height: 1.4;
}

.search-item mark {
  background: rgba(181, 142, 76, 0.28);
  color: var(--atlas-chocolate);
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 600;
}

.search-empty {
  padding: 16px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--atlas-muted);
}

.search-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.search-chips-label {
  font-family: var(--atlas-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--atlas-muted);
  margin-right: 4px;
}

.search-chip {
  border: 1px solid var(--atlas-border);
  background: var(--atlas-surface);
  color: var(--atlas-chocolate-light);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.search-chip:hover {
  border-color: var(--atlas-gold);
  background: var(--atlas-warm);
  color: var(--atlas-chocolate);
  transform: translateY(-1px);
}

/* Main Workspace */
.atlas-workspace {
  display: grid;
  grid-template-columns: minmax(400px, 460px) 1fr;
  gap: 24px;
  align-items: start;
}

/* Left Panel: Anatomical Plate */
.body-card {
  background: var(--atlas-surface);
  border: 1px solid var(--atlas-border-strong);
  border-radius: var(--atlas-radius-lg);
  padding: 16px 16px 18px;
  box-shadow: var(--atlas-shadow);
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.is-embed .body-card {
  top: 16px;
}

.plate-header-strip {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--atlas-border);
}

.plate-folio-code {
  font-family: var(--atlas-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--atlas-gold-deep);
  white-space: nowrap;
}

.body-hint {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--atlas-chocolate-light);
  background: var(--atlas-warm);
  border: 1px solid var(--atlas-border);
  padding: 3px 10px;
  border-radius: 999px;
  text-align: center;
  white-space: nowrap;
}

.svg-wrapper {
  position: relative;
  width: 100%;
  max-width: 430px;
  user-select: none;
}

svg#human-map {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.anatomy-guides,
#silhouette,
.plate-chrome {
  pointer-events: none;
}

.organ-hotspot {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.organ-hotspot .organ-hit {
  pointer-events: all;
}

.organ-hotspot .organ-shape {
  transition: fill 0.24s ease, fill-opacity 0.24s ease, stroke 0.24s ease, stroke-width 0.24s ease, filter 0.24s ease;
}

.organ-hotspot .organ-detail {
  pointer-events: none;
  transition: stroke 0.24s ease, opacity 0.24s ease;
}

.organ-hotspot .organ-leader {
  pointer-events: none;
  transition: stroke 0.22s ease, opacity 0.22s ease, stroke-width 0.22s ease;
}

.organ-hotspot .organ-pin {
  pointer-events: none;
  transition: fill 0.22s ease, stroke 0.22s ease, r 0.22s ease;
}

.organ-hotspot .organ-tag-bg {
  fill: #FFFDF9;
  fill-opacity: 0.92;
  stroke: #D8C9B2;
  stroke-width: 0.9;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.organ-hotspot .organ-tag-num {
  font-family: var(--atlas-mono);
  font-size: 8.5px;
  font-weight: 500;
  fill: #8C682B;
  transition: fill 0.2s ease;
}

.organ-hotspot .organ-tag-text {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  fill: #3B2820;
  transition: fill 0.2s ease;
}

/* Hover State */
.organ-hotspot:hover .organ-shape {
  fill: url(#organGoldHoverGrad);
  fill-opacity: 0.95;
  stroke: var(--atlas-chocolate);
  stroke-width: 1.75;
  filter: url(#organGlow);
}

.organ-hotspot:hover .organ-leader {
  stroke: var(--atlas-gold-deep);
  opacity: 1;
  stroke-width: 1.25;
}

.organ-hotspot:hover .organ-pin {
  fill: var(--atlas-gold);
  stroke: #FFFDF9;
}

.organ-hotspot:hover .organ-tag-bg {
  fill: var(--atlas-warm);
  stroke: var(--atlas-gold);
}

/* Selected State */
.organ-hotspot.selected .organ-shape {
  fill: url(#organTerracottaGrad);
  fill-opacity: 0.95;
  stroke: #722419;
  stroke-width: 1.9;
  filter: url(#organGlow);
}

.organ-hotspot.selected .organ-detail {
  stroke: #FFF6F4;
  opacity: 0.85;
}

.organ-hotspot.selected .organ-leader {
  stroke: var(--atlas-terracotta);
  opacity: 1;
  stroke-width: 1.4;
}

.organ-hotspot.selected .organ-pin {
  fill: var(--atlas-terracotta);
  stroke: #FFFDF9;
}

.organ-hotspot.selected .organ-tag-bg {
  fill: var(--atlas-chocolate);
  stroke: var(--atlas-chocolate);
}

.organ-hotspot.selected .organ-tag-num {
  fill: #E6C792;
}

.organ-hotspot.selected .organ-tag-text {
  fill: #FFFDF9;
}

/* Quiz States */
.organ-hotspot.quiz-correct .organ-shape {
  fill: url(#organSageGrad);
  fill-opacity: 0.95;
  stroke: #1F4536;
  stroke-width: 2;
  filter: url(#organGlow);
}

.organ-hotspot.quiz-correct .organ-leader {
  stroke: var(--atlas-sage);
  opacity: 1;
  stroke-width: 1.4;
}

.organ-hotspot.quiz-correct .organ-pin {
  fill: var(--atlas-sage);
  stroke: #FFFDF9;
}

.organ-hotspot.quiz-correct .organ-tag-bg {
  fill: var(--atlas-sage);
  stroke: var(--atlas-sage);
}

.organ-hotspot.quiz-correct .organ-tag-num,
.organ-hotspot.quiz-correct .organ-tag-text {
  fill: #FFFDF9;
}

.organ-hotspot.quiz-wrong .organ-shape {
  fill: url(#organTerracottaGrad);
  fill-opacity: 0.95;
  stroke: #722419;
  stroke-width: 2;
}

.organ-hotspot.quiz-wrong .organ-tag-bg {
  fill: var(--atlas-terracotta);
  stroke: var(--atlas-terracotta);
}

.organ-hotspot.quiz-wrong .organ-tag-num,
.organ-hotspot.quiz-wrong .organ-tag-text {
  fill: #FFFDF9;
}

.pulse-ring {
  fill: none;
  stroke: var(--atlas-terracotta);
  stroke-width: 1.5;
  opacity: 0;
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
}

.organ-hotspot.selected .pulse-ring {
  animation: atlasPulse 2.2s infinite ease-out;
}

.organ-hotspot.quiz-correct .pulse-ring {
  stroke: var(--atlas-sage);
  animation: atlasPulse 1.8s infinite ease-out;
}

@keyframes atlasPulse {
  0% { transform: scale(0.88); opacity: 0.78; }
  100% { transform: scale(1.42); opacity: 0; }
}

/* Tooltip */
#cursor-tooltip {
  position: fixed;
  background: #2E1E17;
  color: #FFFDF9;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -135%);
  transition: opacity 0.14s ease;
  z-index: 125;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(46, 30, 23, 0.25);
}

/* Quick Pills */
.quick-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--atlas-border);
  width: 100%;
}

.pill-btn {
  background: var(--atlas-parchment);
  border: 1px solid var(--atlas-border);
  color: var(--atlas-chocolate);
  font-family: inherit;
  font-size: 0.77rem;
  font-weight: 600;
  padding: 6px 11px;
  min-height: 36px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.16s ease;
}

.pill-btn-num {
  font-family: var(--atlas-mono);
  font-size: 0.68rem;
  color: var(--atlas-gold-deep);
}

.pill-btn:hover {
  border-color: var(--atlas-gold);
  background: var(--atlas-warm);
}

.pill-btn.active {
  background: var(--atlas-chocolate);
  color: #FFFDF9;
  border-color: var(--atlas-chocolate);
  box-shadow: 0 3px 10px rgba(46, 30, 23, 0.22);
}

.pill-btn.active .pill-btn-num {
  color: #E6C792;
}

/* Right Panel: Clinical Dossier */
.detail-card {
  background: var(--atlas-surface);
  border: 1px solid var(--atlas-border-strong);
  border-radius: var(--atlas-radius-lg);
  box-shadow: var(--atlas-shadow);
  min-height: 580px;
  position: relative;
  overflow: hidden;
}

.panel-reveal {
  animation: atlasPanelReveal 0.3s var(--atlas-ease);
}

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

.dossier-hero {
  background: linear-gradient(180deg, var(--atlas-parchment) 0%, rgba(250, 244, 234, 0.55) 100%);
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--atlas-border);
}

.dossier-body {
  padding: 22px 28px 28px;
}

.mobile-back-row {
  display: none;
  margin-bottom: 12px;
}

.btn-back-map {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--atlas-surface);
  border: 1px solid var(--atlas-border-strong);
  color: var(--atlas-chocolate);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.organ-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.organ-badge {
  font-family: var(--atlas-mono);
  background: var(--atlas-gold-soft);
  color: var(--atlas-chocolate);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(181, 142, 76, 0.28);
}

.btn-share-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--atlas-border-strong);
  background: var(--atlas-surface);
  color: var(--atlas-chocolate-light);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-share-inline:hover {
  border-color: var(--atlas-gold);
  color: var(--atlas-chocolate);
  background: var(--atlas-warm);
}

.organ-hero-grid {
  display: flex;
  align-items: center;
  gap: 18px;
}

.organ-medallion {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: radial-gradient(circle at 32% 28%, #FFFDF9 0%, #EFE2CE 100%);
  border: 1.5px solid var(--atlas-gold);
  box-shadow: 0 8px 20px -8px rgba(46, 30, 23, 0.25), inset 0 0 0 3px rgba(255, 253, 249, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 10px;
}

.organ-medallion svg {
  width: 100%;
  height: 100%;
  display: block;
}

.organ-title {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--atlas-chocolate);
  line-height: 1.08;
  margin: 0 0 6px;
}

.organ-summary {
  color: var(--atlas-muted);
  font-size: 0.93rem;
  line-height: 1.52;
  margin: 0;
}

/* Symptom Tabs */
.symptom-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--atlas-border);
  padding-bottom: 14px;
}

.sym-tab {
  background: var(--atlas-parchment);
  border: 1px solid var(--atlas-border);
  color: var(--atlas-text);
  font-family: inherit;
  padding: 8px 15px;
  min-height: 38px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.sym-tab:hover {
  border-color: var(--atlas-gold);
  background: var(--atlas-warm);
}

.sym-tab.active {
  background: var(--atlas-chocolate);
  color: #FFFDF9;
  border-color: var(--atlas-chocolate);
  box-shadow: 0 4px 12px rgba(46, 30, 23, 0.2);
}

/* Symptom Transition Stage */
#symptom-stage {
  will-change: opacity, transform;
}

.stage-enter-right {
  animation: atlasStageFromRight 0.28s var(--atlas-ease);
}

.stage-enter-left {
  animation: atlasStageFromLeft 0.28s var(--atlas-ease);
}

@keyframes atlasStageFromRight {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes atlasStageFromLeft {
  from { opacity: 0; transform: translateX(-14px); }
  to { opacity: 1; transform: translateX(0); }
}

.stagger-block {
  animation: atlasBlockFadeUp 0.32s var(--atlas-ease) both;
}

.stagger-block:nth-child(2) { animation-delay: 0.04s; }
.stagger-block:nth-child(3) { animation-delay: 0.08s; }

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

/* Info Blocks */
.info-section {
  margin-bottom: 20px;
}

.section-heading {
  font-family: var(--atlas-mono);
  font-size: 0.73rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--atlas-muted);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-heading svg {
  color: var(--atlas-gold-deep);
  flex-shrink: 0;
}

.med-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.med-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--atlas-sage-bg);
  color: var(--atlas-sage);
  border: 1px solid rgba(47, 94, 75, 0.25);
  font-weight: 600;
  font-size: 0.86rem;
  padding: 7px 13px;
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.med-chip.natural {
  background: #F6F1E4;
  color: var(--atlas-chocolate);
  border-color: rgba(181, 142, 76, 0.38);
}

.med-chip.natural svg {
  color: var(--atlas-gold-deep);
}

.med-chip.rx-class {
  background: var(--atlas-warm);
  color: var(--atlas-chocolate);
  border-color: var(--atlas-border-strong);
}

.med-chip.match-pulse {
  animation: atlasChipHighlight 1.6s ease;
}

@keyframes atlasChipHighlight {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(181, 142, 76, 0.65); }
  25% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(181, 142, 76, 0.25); background: var(--atlas-gold-soft); color: var(--atlas-chocolate); border-color: var(--atlas-gold); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(181, 142, 76, 0); }
}

.pediatric-note {
  background: #FCF8EE;
  border: 1px solid rgba(181, 142, 76, 0.28);
  border-left: 4px solid var(--atlas-gold);
  padding: 15px 17px;
  border-radius: 0 var(--atlas-radius-md) var(--atlas-radius-md) 0;
  font-size: 0.91rem;
  line-height: 1.65;
  color: var(--atlas-chocolate-light);
}

.red-flags {
  background: var(--atlas-terracotta-bg);
  border: 1px solid rgba(181, 69, 52, 0.25);
  border-left: 4px solid var(--atlas-terracotta);
  border-radius: var(--atlas-radius-md);
  padding: 16px 18px;
}

.red-flags h4 {
  color: var(--atlas-terracotta-deep);
  font-family: var(--atlas-mono);
  font-size: 0.76rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.red-flags ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
  font-size: 0.89rem;
  color: #5C1F16;
}

.red-flags li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
}

.red-flags li:last-child {
  margin-bottom: 0;
}

.red-flags li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--atlas-terracotta);
  transform: rotate(45deg);
  border-radius: 1px;
}

/* Quiz Mode */
.quiz-shell {
  padding: 26px 28px 30px;
}

.quiz-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.quiz-progress {
  font-family: var(--atlas-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--atlas-gold-deep);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.quiz-bar {
  height: 7px;
  background: var(--atlas-warm);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}

.quiz-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--atlas-gold), var(--atlas-chocolate));
  border-radius: 999px;
  transition: width 0.35s var(--atlas-ease);
}

.quiz-question {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--atlas-chocolate);
  margin: 0 0 14px;
  line-height: 1.2;
}

.quiz-prompt-box {
  background: var(--atlas-parchment);
  padding: 18px 20px;
  border-radius: var(--atlas-radius-md);
  font-size: 0.96rem;
  line-height: 1.6;
  margin-bottom: 18px;
  border: 1px solid var(--atlas-border);
  border-left: 4px solid var(--atlas-gold);
  color: var(--atlas-text);
}

.quiz-feedback {
  padding: 15px 18px;
  border-radius: var(--atlas-radius-md);
  margin-bottom: 18px;
  font-size: 0.91rem;
  line-height: 1.58;
  animation: atlasBlockFadeUp 0.25s var(--atlas-ease);
}

.quiz-feedback.correct {
  background: var(--atlas-sage-bg);
  border: 1px solid rgba(47, 94, 75, 0.4);
  border-left: 4px solid var(--atlas-sage);
  color: #1D4132;
}

.quiz-feedback.wrong {
  background: var(--atlas-terracotta-bg);
  border: 1px solid rgba(181, 69, 52, 0.35);
  border-left: 4px solid var(--atlas-terracotta);
  color: #5C1F16;
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.atlas-btn-primary {
  background: var(--atlas-chocolate);
  color: #FFFDF9;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.atlas-btn-primary:hover {
  background: var(--atlas-chocolate-light);
  transform: translateY(-1px);
}

.atlas-btn-outline {
  background: transparent;
  color: var(--atlas-chocolate);
  border: 1px solid var(--atlas-chocolate);
  padding: 9px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.16s ease;
}

.atlas-btn-outline:hover {
  background: var(--atlas-warm);
}

/* Disclaimer Box */
.atlas-disclaimer {
  margin-top: 28px;
  padding: 18px 22px;
  background: var(--atlas-warm);
  border: 1px solid var(--atlas-border-strong);
  border-radius: var(--atlas-radius-md);
  font-size: 0.81rem;
  color: var(--atlas-muted);
  text-align: center;
}

.atlas-disclaimer strong {
  color: var(--atlas-chocolate);
}

.atlas-disclaimer-refs {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(206, 189, 159, 0.7);
  font-size: 0.76rem;
  line-height: 1.55;
}

/* Share / Embed Modal */
.atlas-modal {
  position: fixed;
  inset: 0;
  background: rgba(42, 30, 25, 0.56);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 120;
  font-family: var(--sans);
}

.atlas-modal.open {
  display: flex;
  animation: atlasFadeBackdrop 0.2s ease;
}

@keyframes atlasFadeBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

.atlas-modal-dialog {
  width: 100%;
  max-width: 520px;
  background: var(--atlas-surface);
  border: 1px solid var(--atlas-border-strong);
  border-radius: var(--atlas-radius-lg);
  box-shadow: 0 24px 60px -16px rgba(42, 30, 25, 0.38);
  padding: 24px;
  animation: atlasPanelReveal 0.24s var(--atlas-ease);
}

.atlas-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.atlas-modal-header h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  color: var(--atlas-chocolate);
  margin: 0;
}

.atlas-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--atlas-border);
  background: var(--atlas-parchment);
  color: var(--atlas-chocolate);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.atlas-modal-close:hover {
  background: var(--atlas-warm);
}

.atlas-modal-tabs {
  display: flex;
  gap: 6px;
  background: var(--atlas-warm);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.atlas-modal-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--atlas-muted);
  cursor: pointer;
}

.atlas-modal-tab.active {
  background: var(--atlas-surface);
  color: var(--atlas-chocolate);
  box-shadow: 0 2px 6px rgba(46, 30, 23, 0.08);
}

.atlas-modal-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--atlas-text);
  margin-bottom: 12px;
  cursor: pointer;
}

.atlas-modal-check input {
  accent-color: var(--atlas-chocolate);
  width: 16px;
  height: 16px;
}

.atlas-modal-field-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.atlas-modal-input,
.atlas-modal-textarea {
  width: 100%;
  font-family: var(--atlas-mono);
  font-size: 0.78rem;
  color: var(--atlas-chocolate);
  background: var(--atlas-parchment);
  border: 1px solid var(--atlas-border);
  border-radius: 10px;
  padding: 10px 12px;
}

.atlas-modal-textarea {
  min-height: 92px;
  resize: vertical;
  margin-bottom: 12px;
  line-height: 1.45;
}

.atlas-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.embed-height-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.84rem;
  color: var(--atlas-muted);
}

.height-pills {
  display: flex;
  gap: 6px;
}

.height-pill {
  border: 1px solid var(--atlas-border);
  background: var(--atlas-parchment);
  color: var(--atlas-chocolate);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.height-pill.active {
  background: var(--atlas-chocolate);
  color: #FFFDF9;
  border-color: var(--atlas-chocolate);
}

.atlas-modal-hint {
  font-size: 0.77rem;
  color: var(--atlas-muted);
  margin: 10px 0 0;
  line-height: 1.4;
}

/* Toast */
#toast.atlas-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 16px);
  background: var(--atlas-chocolate);
  color: #FFFDF9;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(46, 30, 23, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s var(--atlas-ease);
  z-index: 130;
}

#toast.atlas-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Responsive */
@media (max-width: 960px) {
  .atlas-workspace {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .body-card {
    position: static;
  }

  .svg-wrapper {
    max-width: 410px;
  }

  .mobile-back-row {
    display: block;
  }
}

@media (max-width: 600px) {
  .atlas-container {
    padding: 18px 14px 34px;
  }

  .atlas-header {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
  }

  .atlas-brand-title h1 {
    font-size: 1.95rem;
  }

  .atlas-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .mode-switch {
    flex: 1;
  }

  .mode-btn {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .search-kbd {
    display: none;
  }

  .body-card {
    padding: 12px;
  }

  .dossier-hero {
    padding: 18px 18px 16px;
  }

  .dossier-body,
  .quiz-shell {
    padding: 18px;
  }

  .organ-hero-grid {
    gap: 14px;
  }

  .organ-medallion {
    width: 56px;
    height: 56px;
    padding: 8px;
  }

  .organ-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 440px) {
  .organ-leader-group {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
