/* ==========================================================================
   巴菲特思想录 (bafeite.sixianglu.com) — Styles
   - PC Homepage (≥ 1024px): Style B Split-Pane Knowledge Star Map (60% / 40%)
   - Mobile Homepage (< 1024px): Editorial Quick Feed + Tab Switch to Star Map
   - Archive & Year Pages: Style C 3-Column Layout + Sticky 3:4 Quote Card Studio
   ========================================================================== */

/* ---------- Mobile View Switcher on Homepage ---------- */
.home-mobile-tabs {
  display: none;
  padding: 12px 16px 0;
  gap: 8px;
  background: var(--bg-paper);
}

.home-mobile-tab {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--ink-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.home-mobile-tab.is-active {
  background: var(--accent-burgundy);
  border-color: var(--accent-burgundy);
  color: #FBF7F0;
}

/* ---------- Homepage Style B Split-Pane (PC ≥ 1024px) ---------- */
.starmap-workspace {
  display: grid;
  grid-template-columns: 60% 40%;
  min-height: calc(100vh - var(--header-h));
  border-bottom: 1px solid var(--border-hairline);
  background: var(--bg-paper);
}

/* Left 60% Canvas Stage */
.starmap-stage {
  position: relative;
  border-right: 1px solid var(--border-hairline);
  background-color: var(--bg-paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 640px;
}

.starmap-toolbar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.starmap-toolbar > * {
  pointer-events: auto;
}

.starmap-title-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(251, 247, 240, 0.92);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
}

.starmap-title-chip strong {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: var(--ink-primary);
}

.starmap-title-chip span {
  font-size: 0.78rem;
  color: var(--ink-secondary);
}

.starmap-filter-group {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px;
  box-shadow: var(--shadow-xs);
}

.starmap-filter-btn {
  border: none;
  background: transparent;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.starmap-filter-btn:hover {
  color: var(--ink-primary);
}

.starmap-filter-btn.is-active {
  background: var(--accent-burgundy);
  color: #FBF7F0;
  font-weight: 600;
}

.starmap-canvas-wrap {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 620px;
}

#starMapCanvas {
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#starMapCanvas.is-dragging {
  cursor: grabbing;
}

#starMapCanvas.is-hovering {
  cursor: pointer;
}

.starmap-bottom-bar {
  position: absolute;
  bottom: 14px;
  left: 16px;
  right: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.starmap-bottom-bar > * {
  pointer-events: auto;
}

.starmap-legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 6px 14px;
  background: rgba(251, 247, 240, 0.94);
  border: 1px solid var(--border-hairline);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--ink-secondary);
  box-shadow: var(--shadow-xs);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-dot--concept { background: var(--accent-burgundy); }
.legend-dot--company { background: var(--accent-navy); }
.legend-dot--qa { background: var(--accent-gold); }

.starmap-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
}

.zoom-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--ink-primary);
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.zoom-btn:hover {
  background: var(--bg-subtle);
  color: var(--accent-burgundy);
}

.zoom-btn--text {
  width: auto;
  padding: 0 8px;
  font-size: 0.76rem;
  font-weight: 500;
}

/* Hover tooltip inside canvas */
.starmap-tooltip {
  position: absolute;
  z-index: 30;
  max-width: 280px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  font-size: 0.8rem;
}

.starmap-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.starmap-tooltip__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-primary);
  margin-bottom: 3px;
}

.starmap-tooltip__sub {
  color: var(--ink-secondary);
  line-height: 1.45;
}

/* Right 40% Book-Scroll Detail Drawer */
.scroll-drawer {
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 26px 28px 32px;
}

.scroll-drawer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.scroll-drawer__title {
  font-size: 1.65rem;
  margin-bottom: 4px;
}

.scroll-drawer__en {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  font-style: italic;
  margin-bottom: 14px;
}

.scroll-drawer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-hairline);
}

.scroll-drawer__section {
  margin-bottom: 20px;
}

.scroll-drawer__section-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scroll-drawer__section-title::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--accent-burgundy);
}

.drawer-timeline {
  list-style: none;
  padding: 0 0 0 14px;
  margin: 0;
  border-left: 1px solid var(--border-strong);
}

.drawer-timeline li {
  position: relative;
  padding: 0 0 12px 12px;
  font-size: 0.86rem;
  color: var(--ink-secondary);
}

.drawer-timeline li:last-child {
  padding-bottom: 0;
}

.drawer-timeline li::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-paper);
  border: 2px solid var(--accent-burgundy);
}

.drawer-timeline__year {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--accent-burgundy);
  margin-right: 6px;
}

.drawer-qa-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-qa-item {
  display: block;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  color: var(--ink-primary);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.drawer-qa-item:hover {
  border-color: var(--accent-burgundy-border);
  background: var(--bg-paper);
}

.drawer-qa-item__meta {
  font-size: 0.75rem;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 3px;
}

.drawer-qa-item__title {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink-primary);
}

/* Mobile-only Home Quick Feed */
.home-mobile-feed {
  display: none;
  padding: 16px;
}

.mobile-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
  font-size: 0.92rem;
  margin-bottom: 18px;
  cursor: pointer;
}

.mobile-section-block {
  margin-bottom: 22px;
}

.mobile-section-block h2 {
  font-size: 1.08rem;
  margin-bottom: 10px;
}

/* Below-the-fold Homepage Editorial Strip */
.home-editorial-strip {
  padding: 40px 0 48px;
  background: var(--bg-paper);
}

.home-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.home-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.home-stat-card__num {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent-burgundy);
}

.home-stat-card__label {
  font-size: 0.86rem;
  color: var(--ink-secondary);
}

.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ---------- 1994-2025 Horizontal Year Timeline Bar ---------- */
.year-ribbon {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-hairline);
  padding: 12px 0;
}

.year-ribbon__inner {
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.year-ribbon__label {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.year-ribbon__track {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.year-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-paper);
  color: var(--ink-secondary);
  font-family: var(--font-serif);
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.year-pill:hover {
  border-color: var(--accent-burgundy-border);
  color: var(--accent-burgundy);
}

.year-pill.is-active {
  background: var(--accent-burgundy);
  border-color: var(--accent-burgundy);
  color: #FBF7F0;
}

.year-pill__count {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.78;
}

/* ---------- Style C 3-Column Archive & Year Layout ---------- */
.archive-layout {
  max-width: 1520px;
  margin: 0 auto;
  padding: 24px 20px 56px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

/* Left Filter Sidebar */
.filter-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  max-height: calc(100vh - var(--header-h) - 36px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 18px;
}

.filter-group {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-hairline);
}

.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-group__title {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink-primary);
}

.filter-search-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-paper);
  font-size: 0.85rem;
  outline: none;
}

.filter-search-input:focus {
  border-color: var(--accent-burgundy);
  background: var(--bg-card);
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 0.83rem;
  color: var(--ink-secondary);
  cursor: pointer;
}

.filter-option:hover {
  background: var(--bg-subtle);
  color: var(--ink-primary);
}

.filter-option.is-active {
  background: var(--accent-burgundy-soft);
  border-color: var(--accent-burgundy-border);
  color: var(--accent-burgundy);
  font-weight: 600;
}

.filter-option__count {
  font-size: 0.74rem;
  opacity: 0.75;
}

.filter-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  padding: 3px 8px;
  font-size: 0.76rem;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-paper);
  color: var(--ink-secondary);
  cursor: pointer;
}

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

.filter-chip.is-active {
  background: var(--accent-navy);
  border-color: var(--accent-navy);
  color: #FBF7F0;
}

/* Middle Q&A Reading Stream */
.qa-stream-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.qa-stream-count {
  font-size: 0.88rem;
  color: var(--ink-secondary);
}

.qa-stream {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.qa-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.qa-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.qa-card.is-card-active {
  border-color: var(--accent-burgundy);
  box-shadow: 0 0 0 1px var(--accent-burgundy-border), var(--shadow-sm);
}

.qa-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.qa-card__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.qa-card__title {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.qa-card__title a {
  color: var(--ink-primary);
}

.qa-card__title a:hover {
  color: var(--accent-burgundy);
}

.qa-card__question {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  background: var(--bg-paper);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 12px;
}

.qa-card__answer {
  font-size: 0.95rem;
  color: var(--ink-primary);
  line-height: 1.82;
}

.qa-card__answer p:last-child {
  margin-bottom: 0;
}

.qa-keypoints {
  margin: 14px 0;
  padding: 12px 16px 12px 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

.qa-keypoints li {
  margin-bottom: 5px;
}

.qa-keypoints li:last-child {
  margin-bottom: 0;
}

.qa-editor-note {
  font-size: 0.84rem;
  color: var(--ink-secondary);
  background: rgba(154, 116, 43, 0.07);
  border-left: 3px solid var(--accent-gold);
  padding: 9px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 12px 0;
}

/* Collapsible English Summary & CNBC Verification */
.en-disclosure {
  margin-top: 14px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--bg-paper);
}

.en-disclosure summary {
  padding: 9px 14px;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--accent-navy);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.en-disclosure summary::-webkit-details-marker {
  display: none;
}

.en-disclosure summary::after {
  content: "展开 ▾";
  font-weight: 400;
  color: var(--ink-secondary);
}

.en-disclosure[open] summary::after {
  content: "收起 ▴";
}

.en-disclosure__body {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border-hairline);
  font-size: 0.86rem;
  color: var(--ink-secondary);
  line-height: 1.65;
}

.source-verify-bar {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
}

.qa-card__footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Right Sticky 3:4 Quote Card Studio */
.studio-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.studio-header__title {
  font-family: var(--font-serif);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin: 0;
}

.studio-header__ratio {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
}

.studio-preview-box {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}

.studio-preview-box canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.studio-theme-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.studio-theme-btn {
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: var(--bg-paper);
  color: var(--ink-secondary);
  font-size: 0.77rem;
  cursor: pointer;
  font-weight: 500;
}

.studio-theme-btn.is-active {
  background: var(--accent-burgundy);
  border-color: var(--accent-burgundy);
  color: #FBF7F0;
}

.studio-textarea {
  width: 100%;
  min-height: 68px;
  padding: 8px 10px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--bg-paper);
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 10px;
}

.studio-textarea:focus {
  outline: none;
  border-color: var(--accent-burgundy);
  background: var(--bg-card);
}

.studio-actions {
  display: flex;
  gap: 8px;
}

.studio-actions .btn {
  flex: 1;
}

/* Modal Quote Card Studio Layout */
.quote-modal-body {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  padding: 20px 24px 24px;
  align-items: start;
}

.quote-modal-controls label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin: 12px 0 6px;
}

.quote-modal-controls label:first-child {
  margin-top: 0;
}

.quote-modal-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 0.88rem;
}

/* ---------- Concepts / Companies / Years Grids ---------- */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 20px;
}

.pill-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-filter {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-card);
  color: var(--ink-secondary);
  font-size: 0.83rem;
  cursor: pointer;
}

.pill-filter:hover {
  border-color: var(--accent-burgundy-border);
  color: var(--accent-burgundy);
}

.pill-filter.is-active {
  background: var(--accent-burgundy);
  border-color: var(--accent-burgundy);
  color: #FBF7F0;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.entity-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.entity-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
}

.entity-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.entity-card__title {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.entity-card__title a {
  color: var(--ink-primary);
}

.entity-card__title a:hover {
  color: var(--accent-burgundy);
}

.entity-card__sub {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.entity-card__desc {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 14px;
}

.entity-card__foot {
  padding-top: 12px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

/* ---------- Detail Page 2-Column Layout ---------- */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 28px 0 56px;
  align-items: start;
}

.detail-main {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.detail-aside {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.misconception-pair {
  background: var(--bg-paper);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.misconception-pair:last-child {
  margin-bottom: 0;
}

.misconception-bad {
  font-size: 0.9rem;
  color: var(--accent-burgundy);
  font-weight: 600;
  margin-bottom: 6px;
}

.misconception-good {
  font-size: 0.9rem;
  color: var(--ink-primary);
  margin-bottom: 0;
}

.checklist-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.93rem;
  padding: 10px 14px;
  background: var(--bg-paper);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
}

.checklist-box {
  color: var(--accent-burgundy);
  font-weight: 700;
  flex-shrink: 0;
}

.relation-card {
  padding: 12px 14px;
  background: var(--bg-paper);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.relation-card:last-child {
  margin-bottom: 0;
}

.relation-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.relation-card__note {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  margin: 0;
}

/* Prev / Next Navigation on QA Detail */
.qa-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.qa-pager__link {
  display: block;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  color: var(--ink-primary);
}

.qa-pager__link:hover {
  border-color: var(--accent-burgundy);
}

.qa-pager__dir {
  font-size: 0.78rem;
  color: var(--ink-secondary);
  margin-bottom: 4px;
}

.qa-pager__title {
  font-family: var(--font-serif);
  font-size: 0.96rem;
  font-weight: 700;
}

/* Year Banner inside /years/<year>/ */
.year-context-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-left: 4px solid var(--accent-burgundy);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 20px;
}

.year-context-banner__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.83rem;
  color: var(--ink-secondary);
  margin-bottom: 8px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 1220px) {
  .archive-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .studio-sidebar {
    position: static;
    grid-column: 1 / -1;
    max-width: 440px;
    margin: 0 auto;
  }
}

@media (max-width: 1023px) {
  /* Mobile Homepage Graceful Degradation */
  .home-mobile-tabs {
    display: flex;
  }

  .home-mobile-feed {
    display: block;
  }

  .home-mobile-feed.is-hidden-mobile {
    display: none;
  }

  .starmap-workspace {
    display: none;
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .starmap-workspace.is-visible-mobile {
    display: grid;
  }

  .starmap-stage {
    border-right: none;
    border-bottom: 1px solid var(--border-hairline);
    min-height: 460px;
  }

  .starmap-canvas-wrap {
    min-height: 460px;
  }

  .scroll-drawer {
    max-height: none;
    padding: 20px 16px 26px;
  }

  .home-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-quick-grid,
  .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .archive-layout {
    grid-template-columns: 1fr;
    padding: 16px 16px 40px;
  }

  .filter-sidebar {
    position: static;
    max-height: none;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    position: static;
  }

  .quote-modal-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .home-quick-grid,
  .card-grid-3,
  .card-grid-2,
  .qa-pager {
    grid-template-columns: 1fr;
  }

  .starmap-title-chip {
    display: none;
  }
}
