/* ============================================================
   Brave基地 — Cyberpunk Theme
   Brand: Amber Gold #D4A54A · Steel Blue #4A9BD5
   ============================================================ */

/* ─── 1. Variables (default: light) ─── */
:root {
  --bg:         #F5F7FB;
  --bg-alt:     #ECF0F5;
  --surface:    rgba(255, 255, 255, 0.92);
  --border:     rgba(0, 0, 0, 0.08);
  --border-active: rgba(0, 0, 0, 0.18);
  --fg:         #3A4A5A;
  --fg-bright:  #1A2A3A;
  --muted:      #7A8A9A;

  --neon-gold:  #B88A3A;
  --accent-green: #00A88A;
  --neon-cyan:  #3A8BC5;

  --glow-gold:  0 0 6px rgba(184,138,58,0.10), 0 0 20px rgba(184,138,58,0.04);
  --glow-cyan:   0 0 6px rgba(58,139,197,0.10), 0 0 20px rgba(58,139,197,0.04);

  --side-bg: #FFFFFF;
  --side-text: #5A6B8A;
  --side-text-hover: #D4A54A;
  --side-text-muted: #9B9C9F;
  --side-border: rgba(0,0,0,0.08);
  --side-hover-bg: rgba(0,0,0,0.03);

  --max-w: 1212px;
}

/* ─── Dark mode overrides (brave-dark-mode plugin) ─── */
html.brave-dark-mode {
  --bg:         #0E1117;
  --bg-alt:     #161A22;
  --surface:    rgba(18, 22, 30, 0.88);
  --border:     rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 255, 255, 0.18);
  --fg:         #C5C9D4;
  --fg-bright:  #E8EDF5;
  --muted:      #5A6B8A;

  --neon-gold:  #B88A3A;
  --accent-green: #00C9A0;
  --neon-cyan:  #4A9BD5;

  --glow-gold:  0 0 8px rgba(212,165,74,0.12), 0 0 24px rgba(212,165,74,0.05);
  --glow-cyan:   0 0 8px rgba(74,155,213,0.12), 0 0 24px rgba(74,155,213,0.05);

  --side-bg: #0B0E14;
  --side-text: #7A8A9A;
  --side-text-hover: #C5C9D4;
  --side-text-muted: #4A5A7A;
  --side-border: rgba(255,255,255,0.04);
  --side-hover-bg: rgba(255,255,255,0.03);
}


/* ─── 2. Base ─── */
.section-container { padding: 0 24px; width: 100%; }

.brave-base-theme {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6875;
  color: var(--fg);
  background: var(--bg);
  position: relative;
}
.brave-base-theme ::selection { background: rgba(212,165,74,0.25); color: var(--fg-bright); }
.brave-base-theme ::-webkit-scrollbar { width: 6px; }
.brave-base-theme ::-webkit-scrollbar-track { background: var(--bg); }
.brave-base-theme ::-webkit-scrollbar-thumb { background: rgba(0,201,160,0.3); border-radius: 3px; }

.brave-base-theme a { color: inherit; text-decoration: none; }
.brave-base-theme a:hover { color: var(--neon-gold); }
.brave-base-theme img { max-width: 100%; display: block; }

/* ─── 3. Top Bar ─── */
#cardanopress-top-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: 40px;
  color: #fff;
}
.top-bar::before {
  content: '';
  position: absolute; top: 0; left: -120px;
  width: calc(100% + 120px); height: 100%;
  background: linear-gradient(135deg, rgb(206,181,104) 5%, rgb(125,180,147) 40%, rgb(78,170,153) 50%);
  z-index: -1;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.sidebar-collapsed .top-bar::before { left: -64px; width: calc(100% + 64px); }
.sidebar-collapsed .top-bar-inner {
  margin-left: calc(64px + (100% - 64px - var(--max-w)) / 2);
}
@media (max-width: 900px) {
  .top-bar::before { left: 0 !important; width: 100% !important; }
}
.top-bar-inner {
  max-width: var(--max-w);
  margin-left: calc(220px + (100% - 220px - var(--max-w)) / 2);
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 24px 0 0;
  font-size: 0.938rem;
  font-weight: 400;
  transition: margin-left 0.25s ease;
}
.tb-left { display: flex; align-items: center; gap: 12px; }
.tb-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center;
  font-size: 0.938rem;
  white-space: nowrap;
}
.tb-right { display: flex; align-items: center; gap: 10px; }
.wallet-btn {
  background: transparent;
  color: #fff;
  border: none;
  padding: 0;
  border-radius: 0;
  cursor: pointer;
  transition: opacity 0.2s;
  line-height: inherit;
}
.wallet-btn:hover {
  opacity: 0.8;
}
.tb-lang a {
  font-size: 0.813rem;
  padding: 8px 8px;
  transition: opacity 0.2s;
}
.tb-lang a:hover { opacity: 0.8; }

@media (max-width: 768px) {
  .top-bar { height: 32px; }
  .top-bar-inner { padding-left: 16px; }
  .tb-center { display: none; }
}

/* Admin bar — push top bar and header down (desktop only, WP uses position:absolute on mobile) */
body.admin-bar #cardanopress-top-bar { top: 32px; }
body.admin-bar .site-header { top: 72px; }
@media (max-width: 782px) {
  body.admin-bar #cardanopress-top-bar { top: 0; }
  body.admin-bar .site-header { top: 40px; }
}

/* ─── 4. Header (.site-header wrapper) ─── */
.site-header {
  position: fixed;
  top: 40px;
  left: 220px;
  right: 0;
  z-index: 100;
  height: 64px;
  background: var(--side-bg);
  border-bottom: 1px solid var(--border);
}
body.sidebar-collapsed .site-header {
  left: 64px;
}
.site-header .wp-block-site-title {
  font-size: 1.438rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-bright);
}
.site-header .wp-block-site-title a { color: var(--fg-bright); }
.site-header .wp-block-site-title a:hover { color: var(--neon-gold); }
.site-header :where(.wp-block-navigation) .wp-block-navigation-item a {
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.site-header :where(.wp-block-navigation) .wp-block-navigation-item a:hover { color: var(--wp--preset--color--accent-1); }
.site-header :where(.wp-block-navigation) .wp-block-navigation-submenu__toggle,
.site-header :where(.wp-block-navigation) .wp-block-navigation-item.has-child > .wp-block-navigation-item__content::after {
  display: none;
}
.site-header :where(.wp-block-navigation) .wp-block-navigation__responsive-container-open {
  background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--fg-bright);
}
/* Inner flex group — align with top-bar's max-width and center content */
.site-header > .wp-block-group.alignfull {
  background: transparent !important;
  border-bottom: none !important;
  height: 100%;
}
.site-header > .wp-block-group.alignfull > .wp-block-group {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

/* ─── 4b. Header Search Overlay ─── */
.header-search-wrap {
  display: inline-flex;
  align-items: center;
}
.header-search-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--wp--preset--color--accent-4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  line-height: 1;
}
.header-search-btn:hover { color: var(--wp--preset--color--accent-1); }
body.search-visible .header-search-btn svg { stroke: var(--wp--preset--color--accent-1); }
.header-search-btn svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: var(--wp--preset--color--accent-4);
}
body.search-visible .site-header {
  border-bottom: none;
}
.header-search-overlay {
  position: absolute;
  left: 0; right: 0;
  top: 0;
  height: 100%;
  z-index: 200;
  background: var(--bg);
  border: none;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  display: flex;
  align-items: center;
}
body.search-visible .header-search-overlay {
  opacity: 1;
  visibility: visible;
}
.header-search-overlay-inner {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 56px;
  position: relative;
}
.header-search-overlay-form {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
}
.header-search-input {
  flex: 1;
  padding: 10px 16px;
  border: 0;
  border-radius: 30px;
  background: var(--bg-alt);
  color: var(--wp--preset--color--accent-4);
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
  height: 40px;
  -webkit-appearance: none;
  box-shadow: none;
  transition: background 0.2s;
}
.header-search-input::placeholder {
  color: var(--wp--preset--color--accent-4);
  opacity: 0.6;
}
.header-search-input:focus {
  background: var(--bg);
}
.header-search-close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--wp--preset--color--accent-4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  flex-shrink: 0;
}
.header-search-close:hover { color: var(--wp--preset--color--accent-1); }
.header-search-close svg { display: block; }
@media (max-width: 768px) {
  .header-search-overlay-inner { padding: 0 16px; }
  .header-search-input { font-size: 14px; height: 36px; }
}

/* ─── 4c. Search Result Layout ─── */
body.search .wp-block-post-template > li {
  margin-bottom: 0;
}
body.search .wp-block-post-template .wp-block-group.alignfull {
  padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50) !important;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.75em;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: var(--wp--preset--spacing--30) !important;
  background: var(--bg);
  max-width: var(--wp--style--global--content-size);
  margin-left: auto !important;
  margin-right: auto !important;
}
body.search .wp-block-post-featured-image { display: none; }
body.search .wp-block-post-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  font-size: var(--wp--preset--font-size--medium);
}
body.search .wp-block-post-date {
  flex: 0 0 auto;
  margin-top: 0 !important;
}
body.search .wp-block-post-excerpt { display: none; }
body.search .wp-block-query-pagination {
  max-width: var(--wp--style--global--content-size);
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
  background: var(--bg);
}
body.search .wp-block-query-pagination .page-numbers {
  font-size: 14px;
}

/* ─── 4d. Search Result Post-Type Badge ─── */
.post-type-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--muted);
  vertical-align: middle;
  margin-right: 8px;
  line-height: 1.5;
}
.post-type-badge:hover { color: var(--neon-gold); }
.wp-block-post-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* ─── 5. Hero ─── */
.hero {
  position: relative;
  min-height: 380px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

/* FSE 特例：is-layout-constrained 的 :where() 约束在 columns+grid
   或复杂插件内容下不可靠，用 CSS 直接拘束代替 */

/* Hero columns grid */
.hero .container {
  display: grid;
  grid-template-columns: 270px 1fr;
  align-items: center;
  gap: 48px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 0;
}

/* BuddyPress members 页等复杂内容 */
#buddypress {
  max-width: var(--max-w);
  margin: 0 auto;
}
.hero-text { max-width: 55ch; }
.hero-text h1,
.hero-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--fg-bright);
  margin-bottom: 24px;
}
.hero-text h1 em,
.hero-title em {
  font-style: normal;
  color: var(--neon-gold);
  text-shadow: var(--glow-gold);
}
.hero-text h1 .highlight,
.hero-title .highlight { color: var(--neon-cyan); }
.hero-text p {
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  font-weight: 400;
  line-height: 1.65;
  color: var(--fg);
  max-width: 50ch;
}
.hero-text p::before {
  content: '> ';
  color: var(--neon-gold);
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace;
}
@media (max-width: 900px) {
  .hero { min-height: auto; }
  .hero .wp-block-group__inner-container,
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
    padding: 56px 24px;
  }
  .hero-text { max-width: 100%; }
  .hero-text { padding-left: 0 !important; }
  .hero-text p::before { content: none; }
}

/* Typing cursor */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent-green);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ─── 6. Section common ─── */
.section {
  padding: 64px 0;
  position: relative;
}
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-header {
  margin-bottom: 32px;
  position: relative;
}
.section-header h2 {
  font-size: 1.438rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-bright);
  margin-bottom: 0;
  display: inline-block;
}
.section-header h2::before {
  content: '# ';
  color: var(--neon-gold);
  font-weight: 400;
}
/* ─── 7. Tabs ─── */
.tab-list {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-bottom: -1px;
}
.tab-list button {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(212,165,74,0.12);
  border-bottom: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--fg);
  padding: 14px 16px;
  letter-spacing: 0.03em;
  text-align: center;
  white-space: nowrap;
  transition: all 0.2s;
}
.tab-list button:hover {
  color: var(--neon-gold);
  background: rgba(212,165,74,0.06);
  border-color: rgba(212,165,74,0.25);
}
.tab-list button.active {
  color: var(--fg-bright);
  background: var(--surface);
  border-color: rgba(212,165,74,0.15);
  font-weight: 600;
}
@media (max-width: 768px) {
  .tab-list button { white-space: normal; font-size: 0.85rem; flex: 1 1 auto; padding: 10px 8px; }
}
.tab-panel {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  backdrop-filter: blur(4px);
}
.tab-panel.active { display: block; }
.tab-panel p { margin-bottom: 16px; line-height: 1.6875; }
.tab-panel p:last-child { margin-bottom: 0; }

/* ─── 8. Accordion ─── */
.accordion-item { margin-bottom: 6px; }
.accordion-trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 12px 18px;
  background: rgba(212,165,74,0.03);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--fg-bright);
  text-align: left;
  transition: all 0.2s;
}
.accordion-trigger:hover {
  border-color: var(--neon-gold);
  background: rgba(212,165,74,0.06);
}
.accordion-trigger::after {
  content: '+';
  font-size: 1.188rem;
  color: var(--neon-gold);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 12px;
}
.accordion-item.open .accordion-trigger { border-color: var(--neon-gold); }
.accordion-item.open .accordion-trigger::after { content: '−'; }
.accordion-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease;
}
.accordion-item.open .accordion-body { max-height: 600px; }
.accordion-body-inner {
  padding: 16px 18px;
  font-size: 1rem;
  color: var(--fg);
  line-height: 1.6875;
  background: rgba(212,165,74,0.015);
  border: 1px solid var(--border);
  border-top: 0;
}

/* ─── 9. Infra list ─── */
.infra-list { margin: 12px 0 20px 20px; line-height: 1.8; }
.infra-list ul { margin-left: 24px; }
.infra-list li { list-style: none; position: relative; padding-left: 14px; }
.infra-list li::before {
  content: '>';
  position: absolute; left: 0;
  color: var(--neon-gold);
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace;
  font-size: 0.688rem;
}
.infra-list li li::before { content: '-'; color: var(--neon-cyan); }

/* ─── 10. Stat grid ─── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px 8px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.stat-item::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--neon-gold);
  opacity: 0.3;
}
.stat-item:hover { border-color: var(--neon-gold); }
.stat-num {
  display: block;
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--neon-gold);
  line-height: 1.1;
}
.stat-label {
  display: block;
  font-size: 0.688rem;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@media (max-width: 768px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

/* ─── 11. Liberty grid ─── */
.liberty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.liberty-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 14px 16px;
  font-size: 0.813rem;
  line-height: 1.5;
  transition: border-color 0.2s;
}
.liberty-item:hover { border-color: var(--neon-gold); }
.liberty-item strong { color: var(--fg-bright); font-weight: 600; }
.liberty-icon { font-size: 1.438rem; flex-shrink: 0; margin-top: 1px; }
@media (max-width: 768px) { .liberty-grid { grid-template-columns: 1fr; } }

/* ─── 12. Card grid ─── */
.section-container.card-grid .wp-block-post-template { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; padding: 0; margin: 0; }
.section-container.card-grid .wp-block-post-template > li { width: calc(20% - 13px); }
.section-container:not(.card-grid) .wp-block-post-template { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.card-grid .wp-block-post { list-style: none; margin: 0; padding: 0; }
.card-grid .wp-block-post .card { height: 100%; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.25s;
  position: relative;
  backdrop-filter: blur(4px);
}
.card:hover {
  border-color: var(--neon-gold);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(212,165,74,0.06);
}
.card-img { width: 100%; object-fit: cover; display: block; opacity: 0.85; transition: opacity 0.25s; }
.card:hover .card-img { opacity: 1; }
.card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg-bright);
}
/* Query Loop card: overlay from featured image link to make entire card clickable */
.card .wp-block-post-featured-image a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.card .wp-block-post-title { position: relative; z-index: 2; padding: 12px 16px; }

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

/* ─── 15. Collab / Timeline ─── */
.collab-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  align-items: start;
}
.collab-image { display: flex; justify-content: center; align-items: flex-start; padding-top: 20px; }
.collab-image img { max-width: 140px; height: auto; }
.collab-timeline { position: relative; padding-left: 0; }
.collab-timeline::before {
  content: '';
  position: absolute;
  left: 15px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(212,165,74,0.2), transparent);
}
.tl-item { position: relative; padding-left: 50px; padding-bottom: 32px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-icon {
  position: absolute; left: 0; top: 2px;
  width: 32px; height: 32px;
  background: rgba(212,165,74,0.06);
  border: 1px solid rgba(212,165,74,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--neon-gold);
  z-index: 1;
}
.tl-icon svg { width: 14px; height: 14px; }
.tl-title {
  font-size: 1.188rem;
  font-weight: 600;
  color: var(--fg-bright);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}
.tl-link {
  display: inline-block;
  font-size: 0.813rem;
  color: var(--neon-gold);
  margin-bottom: 4px;
}
.tl-link:hover { color: var(--fg-bright); text-decoration: underline; }
.tl-content p { font-size: 0.813rem; line-height: 1.5; color: var(--fg); margin: 0; }
@media (max-width: 768px) {
  .collab-layout { grid-template-columns: 1fr; gap: 20px; }
  .collab-image { display: none; }
}

/* ─── 16. Insights ─── */
.insight-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px;
  transition: all 0.25s;
  backdrop-filter: blur(4px);
}
.insight-card:hover {
  border-color: var(--neon-gold);
  box-shadow: 0 4px 20px rgba(212,165,74,0.08);
  transform: translateY(-2px);
}
.insight-card .insight-meta { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.insight-card .cat-tag { color: var(--neon-cyan); }
.insight-card h4 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--fg-bright);
  margin: 0;
}
/* ─── 18. Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 64px 0 32px;
  margin-top: 0;
}
.wp-block-template-part:last-child > .wp-block-group.is-layout-constrained.has-global-padding {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 {
  font-size: 0.813rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon-gold);
  margin-bottom: 16px;
}
.footer-col a {
  font-size: 0.813rem;
  color: var(--fg);
  line-height: 2;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--neon-gold); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(212,165,74,0.06);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom p {
  color: var(--muted);
  letter-spacing: 0.06em;
}
.footer-socials { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0; }
.footer-socials a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.2s;
}
.footer-socials a:hover {
  border-color: var(--muted);
  color: var(--fg-bright);
}
.footer-note {
  color: var(--muted);
  opacity: 0.5;
  margin-top: 12px;
  letter-spacing: 0.04em;
  text-align: center;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-socials { justify-content: center; }
}
.layout-wrap { min-height: 100vh; }

/* ════════════════════════════════════════════════════════
   Course Single Page (single-sfwd-courses.html)
   ════════════════════════════════════════════════════════ */

.bb-course-layout { max-width: var(--max-w); margin: 0 auto; }
.bb-course-instructor { border-top: 1px solid var(--border); margin-top: 40px; }
.bb-instructor-profile .wp-block-avatar img { border-radius: 50%; }
.bb-course-header { margin-bottom: 32px; }
.bb-course-header .wp-block-post-title { margin: 0 0 12px; }
.bb-course-meta { font-size: 0.875rem; color: var(--muted); }
.bb-course-meta a { color: var(--muted); }
.bb-course-meta a:hover { color: var(--neon-gold); }

.bb-course-sidebar {
  position: sticky; top: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.bb-course-sidebar .bb-course-sidebar-cover { margin: 0; }
.bb-course-sidebar .bb-course-sidebar-cover img { width: 100%; }
/* ═══ Lesson page (single-sfwd-lessons) ═══ */
.bb-lesson-layout { max-width: var(--max-w); margin: 0 auto; }

.bb-lesson-sidebar { position: sticky; top: 100px; align-self: flex-start; }
.bb-lesson-sidebar-inner { padding: 0; }

/* Back to course link */
.bb-lesson-sidebar-inner > p:first-child {
  font-size: 0.813rem; padding: 16px 24px 12px; margin: 0;
}
.bb-lesson-sidebar-inner > p:first-child a {
  color: var(--neon-gold); font-weight: 500;
}
.bb-lesson-sidebar-inner > p:first-child a:hover { text-decoration: underline; }

/* ld-course-content overrides */
.bb-lesson-sidebar .ld-course-content {
  margin: 0; padding: 0; border: none; background: none;
}

/* Section heading — course title */
.bb-lesson-sidebar .ld-course-content .ld-section-heading {
  padding: 0 24px 12px; margin: 0 0 0;
}
.bb-lesson-sidebar .ld-course-content .ld-section-heading h2 {
  font-size: 0.875rem; font-weight: 600; color: var(--fg-bright);
  margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Lesson list */
.bb-lesson-sidebar .ld-course-content .ld-item-list {
  padding: 0; margin: 0; list-style: none;
}
.bb-lesson-sidebar .ld-course-content .ld-item-list-item {
  border: none; border-radius: 0; margin: 0;
  background: none; transform: none;
}
.bb-lesson-sidebar .ld-course-content .ld-item-list-item:nth-child(odd) {
  background: rgba(146,164,183,0.04);
}
.bb-lesson-sidebar .ld-course-content .ld-item-list-item-preview {
  padding: 10px 24px; border: none; display: flex; align-items: center;
}
.bb-lesson-sidebar .ld-course-content .ld-item-list-item-preview:hover {
  background: rgba(146,164,183,0.08);
}
.bb-lesson-sidebar .ld-course-content .ld-item-name {
  font-size: 0.813rem; font-weight: 400; color: var(--accent-6);
  display: flex; align-items: center; gap: 10px; flex: 1;
}
.bb-lesson-sidebar .ld-course-content .ld-item-name:hover { color: var(--neon-gold); }
.bb-lesson-sidebar .ld-course-content .ld-status-icon {
  width: 18px; height: 18px;
  border: 2px solid var(--border-active);
  border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.bb-lesson-sidebar .ld-course-content .ld-item-title {
  font-size: 0.813rem; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; flex: 1;
}

/* Lesson header */
.bb-lesson-header { margin-bottom: 32px; }
.bb-lesson-header .wp-block-post-title { margin: 0 0 16px; }
.bb-lesson-meta { font-size: 0.813rem; color: var(--muted); align-items: center; }
.bb-lesson-meta .wp-block-avatar img { border-radius: 50%; }
.bb-lesson-meta a { color: var(--muted); }
.bb-lesson-meta a:hover { color: var(--neon-gold); }

/* Phase 4 — Lesson list */
.learndash-wrapper .ld-item-list .ld-item-list-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.2s;
}
.learndash-wrapper .ld-item-list .ld-item-list-item:hover {
  border-color: var(--neon-gold);
  transform: translateY(-2px);
}
.learndash-wrapper .ld-item-list .ld-item-list-item .ld-item-list-item-preview {
  padding: 16px 20px;
}
.learndash-wrapper .ld-item-list .ld-item-list-item .ld-item-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--fg-bright);
}
.learndash-wrapper .ld-item-list .ld-item-list-item .ld-status-icon {
  width: 24px; height: 24px;
  border: 2px solid var(--border-active);
  border-radius: 50%;
}
.learndash-wrapper .ld-table-list .ld-table-list-item {
  border-color: var(--border);
}
.learndash-wrapper .ld-section-heading h2 {
  font-size: 1.25rem;
  color: var(--fg-bright);
}
.learndash-wrapper .ld-tabs .ld-tab-content { color: var(--fg); }

/* Phase 6 — Responsive course page */
@media (max-width: 782px) {
  .bb-course-layout { padding: 0 16px !important; flex-direction: column !important; }
  .bb-course-sidebar { position: relative; top: 0; }
}

/* ─── 21. WordPress Core Block Overrides ─── */
.brave-base-theme .wp-block-post-title { color: var(--fg-bright); }
.brave-base-theme .wp-block-post-content { color: var(--fg); }
.brave-base-theme .wp-block-heading { color: var(--fg-bright); }
.brave-base-theme .wp-block-button .wp-block-button__link { border-radius: 0; }
.brave-base-theme .wp-block-columns { gap: 24px; }
.brave-base-theme .wp-block-site-title a { color: var(--fg-bright); }
.brave-base-theme .wp-block-site-title a span { color: var(--neon-gold); }

/* ─── 22. A11y & Print ─── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .top-bar, .side-panel, .site-header, .footer-socials { display: none !important; }
  .layout-wrap { display: block; }
  body { background: #fff !important; color: #000 !important; }
  .section { padding: 20px 0; page-break-inside: avoid; }
  .hero { min-height: auto; padding: 20px 0; background: #f5f5f5 !important; }
  .hero-title em { color: #333 !important; text-shadow: none !important; }
  .card, .tab-panel, .insight-card, .book-card { border-color: #ddd !important; }
  .stat-num { color: #333 !important; }
}

/* ════════════════════════════════════════════════════════
   Side Panel — Fixed left sidebar, collapsible
   ════════════════════════════════════════════════════════ */

.brave-side-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 220px;
  background: var(--side-bg);
  box-shadow: 3px 0 13px -3px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  font-size: 0.875rem;
  font-weight: 500;
  transition: width 0.25s ease, top 0.25s ease;
  overflow: hidden;
}

/* Sidebar starts below top bar (original structure, unchanged) */
body.has-cardanopress-top-bar .brave-side-panel {
  top: 40px;
}

/* Admin bar + top bar */
body.admin-bar.has-cardanopress-top-bar .brave-side-panel {
  top: 72px;
}

/* Admin bar without top bar */
body.admin-bar .brave-side-panel {
  top: 32px;
}

.brave-side-panel.collapsed {
  width: 64px;
}

.brave-side-top {
  display: flex;
  align-items: center;
  padding: 16px 16px 13px;
  border-bottom: 1px solid var(--side-border, rgba(0,0,0,0.06));
  transition: padding 0.25s;
}

.brave-side-panel.collapsed .brave-side-top {
  justify-content: center;
  padding: 20px 4px 17px;
}

.brave-side-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--wp--preset--color--accent-4);
  cursor: pointer;
  font: inherit;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 0;
  white-space: nowrap;
}

.brave-side-toggle:hover {
  color: var(--wp--preset--color--accent-1);
}

.brave-side-toggle svg {
  flex-shrink: 0;
  transition: transform 0.25s;
}

.brave-side-panel.collapsed .brave-side-toggle svg {
  transform: scaleX(-1);
}

.brave-side-panel.collapsed .brave-side-toggle span {
  display: none;
}

/* Navigation */
.brave-side-nav {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
}

.brave-side-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.brave-side-menu li {
  margin: 0;
  padding: 0;
}

.brave-side-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
  white-space: nowrap;
}

.brave-side-menu a:hover,
.brave-side-menu .current-menu-item a {
  color: var(--wp--preset--color--accent-1);
}

.brave-side-panel.collapsed .brave-side-menu a {
  justify-content: center;
  padding: 12px 0;
}

.brave-side-panel.collapsed .nav-label {
  display: none;
}

/* Menu item SVG icons */
.brave-side-menu a .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--wp--preset--color--accent-4);
}
.brave-side-menu a .nav-icon svg {
  stroke: var(--wp--preset--color--accent-4);
}

.brave-side-menu a:hover .nav-icon,
.brave-side-menu .current-menu-item a .nav-icon {
  color: var(--wp--preset--color--accent-1);
}

/* Overlay (mobile) */
.brave-side-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.brave-side-overlay.open {
  display: block;
}

/* Content offset — makes room for sidebar using margin */
.has-brave-sidebar .wp-site-blocks {
  margin-left: 220px;
  width: calc(100% - 220px);
  overflow-x: clip;
  transition: margin-left 0.25s ease, width 0.25s ease;
}

/* Collapsed state via body class (toggled by JS) */
body.sidebar-collapsed .wp-site-blocks {
  margin-left: 64px;
  width: calc(100% - 64px);
  overflow-x: clip;
}

/* Mobile: sidebar slides in from left below top bar */
@media (max-width: 782px) {
  .brave-side-panel {
    left: -220px;
    top: 40px;
    width: 220px !important;
    transition: left 0.25s ease, top 0.25s ease;
  }

  .brave-side-panel.open {
    left: 0;
  }

  body.has-cardanopress-top-bar .brave-side-panel {
    top: 40px;
  }

  body.admin-bar.has-cardanopress-top-bar .brave-side-panel {
    top: 72px;
  }

  body.admin-bar .brave-side-panel {
    top: 32px;
  }

  .brave-side-panel.collapsed {
    width: 220px !important;
  }

  .brave-side-panel.collapsed .nav-label {
    display: inline;
  }

  .brave-side-panel.collapsed .brave-side-menu a {
    justify-content: flex-start;
    padding: 10px 16px;
  }

  .brave-side-panel.collapsed .brave-side-top {
    justify-content: flex-start;
    padding: 16px;
  }

  .brave-side-panel.collapsed .brave-side-toggle span {
    display: inline;
  }

  .brave-side-panel.collapsed .brave-side-toggle svg {
    transform: none;
  }

  .has-brave-sidebar .wp-site-blocks {
    margin-left: 0;
    width: 100%;
  }
}

/* ─── 9. bbPress Topic Archive ─── */

.brave-bbpress-wrap h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--fg-bright);
}

#bbpress-forums {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}
#bbpress-forums ul,
#bbpress-forums li {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Search form */
#bbpress-forums .bbp-search-form {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
#bbpress-forums .bbp-search-form #bbp_search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
  background: var(--bg);
  color: var(--fg);
}
#bbpress-forums .bbp-search-form #bbp_search_submit {
  display: none;
}

/* Breadcrumb */
#bbpress-forums .bbp-breadcrumb {
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
#bbpress-forums .bbp-breadcrumb a {
  color: var(--neon-cyan);
}
#bbpress-forums .bbp-breadcrumb .bbp-breadcrumb-sep {
  margin: 0 4px;
}

/* Note: topic list styling is in brave-buddypress.css (BuddyPress card layout). */

/* ─── Navigation submenu positioning ─── */

/* Ensure top-level submenus appear below parent */
.wp-block-navigation .wp-block-navigation__submenu-container {
  left: -1px !important;
  right: auto !important;
}

/* Sub-submenus (third level): appear to the right by default */
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
  left: 100% !important;
  top: -1px !important;
}

/* If there's not enough space on the right, flip left */
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container.has-left-edge {
  left: auto !important;
  right: 100% !important;
}

/* ─── Single post: TOC column ─── */

.toc-column .trilium-toc-block {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

@media (max-width: 782px) {
  .toc-column {
    display: none;
  }
}

/* ─── Trilium content: image alignment ─── */

.wp-block-post-content .aligncenter,
.entry-content .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  clear: both;
}

.wp-block-post-content .alignleft,
.entry-content .alignleft {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 1em;
}

.wp-block-post-content .alignright,
.entry-content .alignright {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 1em;
}

.wp-block-post-content .wp-block-image,
.entry-content .wp-block-image {
  margin-bottom: 1.5em;
}

.wp-block-post-content .wp-block-image img,
.entry-content .wp-block-image img {
  max-width: 100%;
  height: auto;
}

/* ─── Top bar: dark mode toggle ─── */

#cardanopress-top-bar .tb-right .bdao-block-toggle {
  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
#cardanopress-top-bar .tb-right .bdao-block-toggle:hover {
  opacity: 0.8;
}
#cardanopress-top-bar .tb-right .bdao-block-toggle:focus,
#cardanopress-top-bar .tb-right .bdao-block-toggle:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
#cardanopress-top-bar .tb-right .bdao-block-toggle svg {
  stroke: currentColor;
}

/* ─── CardanoPress Connect Wallet button ─── */

.cp-enhanced-trigger {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 4px;
  padding: 4px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  line-height: normal;
}
/* In top bar: wallet-btn overrides */
.tb-left .cp-enhanced-trigger {
  border: none;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  border-radius: 0;
  color: var(--muted);
}

.cp-enhanced-trigger:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.7);
}

/* ─── CPT single hero gradients ─── */
.hero-info {
  background: linear-gradient(180deg, #f1e4ec, #dccde2);
}
.hero-tool {
  background: linear-gradient(155deg, #aedbc8, #dbbff5);
}
.hero-book {
  background: linear-gradient(135deg, #fed9b7, #c1b6e6);
}
.hero-thumb img {
  border-radius: 12px;
  object-fit: cover;
}

/* ─── 27. 利器 section ─── */
.tool-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--neon-gold);
  padding: 28px 32px;
  margin-bottom: 24px;
  transition: all 0.25s;
  position: relative;
}
.tool-feature:hover {
  border-color: var(--neon-gold);
  box-shadow: var(--glow-gold);
}
.tool-feature h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg-bright);
  margin: 0 0 6px;
}
.tool-feature-badge {
  display: inline-block;
  font-size: 0.688rem;
  color: var(--neon-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  font-weight: 500;
}
.tool-feature p {
  font-size: 0.938rem;
  color: var(--fg);
  margin: 0 0 12px;
  line-height: 1.6;
  max-width: 640px;
}
.tool-feature-link {
  color: var(--neon-gold);
  font-weight: 500;
  font-size: 0.875rem;
}
.tool-feature-link:hover {
  text-decoration: underline;
}
.section-description {
  font-size: 0.938rem;
  color: var(--fg);
  margin: -20px 0 28px;
  line-height: 1.7;
  max-width: 720px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px;
  transition: all 0.25s;
  position: relative;
}
.tool-card:hover {
  border-color: var(--neon-gold);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(212,165,74,0.06);
}
.tool-card-icon {
  font-size: 1.75rem;
  margin-bottom: 10px;
  display: block;
  line-height: 1;
}
.tool-card h4 {
  font-size: 0.938rem;
  font-weight: 600;
  color: var(--fg-bright);
  margin: 0 0 10px;
}
.tool-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}
.tool-card li {
  font-size: 0.813rem;
  color: var(--fg);
  padding: 3px 0;
  line-height: 1.5;
  position: relative;
  padding-left: 14px;
}
.tool-card li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--neon-cyan);
}
.tool-card-sub {
  display: block;
  font-size: 0.688rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.tool-card.is-link { display: block; color: inherit; text-decoration: none; }
@media (max-width: 960px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tool-grid { grid-template-columns: 1fr; } }

/* ─── 28. 加入 CTA section ─── */
.cta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
}
.cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  transition: all 0.25s;
  position: relative;
}
.cta-card:hover {
  border-color: var(--neon-gold);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(212,165,74,0.06);
}
.cta-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
  line-height: 1;
}
.cta-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg-bright);
  margin: 0 0 8px;
}
.cta-card p {
  font-size: 0.813rem;
  color: var(--fg);
  margin: 0 0 16px;
  line-height: 1.5;
}
.cta-btn {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid var(--neon-gold);
  color: var(--neon-gold);
  font-size: 0.813rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 0.2s;
}
.cta-btn:hover {
  background: var(--neon-gold);
  color: var(--bg);
  text-decoration: none;
}
@media (max-width: 768px) { .cta-grid { grid-template-columns: 1fr; } }

/* ─── 30. Role grid (加入 section) ─── */
.role-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.role-item {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
  text-align: center;
  transition: border-color 0.2s;
}
.role-item:hover { border-color: var(--neon-gold); }
.role-icon { font-size: 1.5rem; display: block; margin-bottom: 6px; }
.role-item h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-bright);
  margin: 0 0 4px;
}
.role-item p {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}
@media (max-width: 768px) { .role-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .role-grid { grid-template-columns: 1fr; } }

/* ─── 31. Synergy grid (DAO section) ─── */
.synergy-intro {
  font-size: 0.9rem;
  color: var(--fg);
  margin: 28px 0 14px;
  font-weight: 500;
}
.synergy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 10px;
}
.synergy-item {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 18px 16px;
  transition: border-color 0.2s;
}
.synergy-item:hover { border-color: var(--neon-gold); }
.synergy-icon { font-size: 1.25rem; display: block; margin-bottom: 6px; }
.synergy-item h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-bright);
  margin: 0 0 6px;
}
.synergy-item p {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
@media (max-width: 768px) { .synergy-grid { grid-template-columns: 1fr; } }

/* ─── 32. Space chips (研学 section) ─── */
.space-context {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.6;
}
.space-context strong { color: var(--fg-bright); font-weight: 500; }
.space-chips { margin-top: 4px; }
.space-chip {
  display: inline-block;
  padding: 1px 10px;
  margin: 2px 1px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.75rem;
  color: var(--fg);
  letter-spacing: 0.02em;
  transition: border-color 0.2s;
}
.space-chip:hover { border-color: var(--neon-gold); }

/* ─── Books (carousel) ─── */
.book-section-header {
  margin-top: 32px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg-bright);
  letter-spacing: 0.03em;
}
.book-carousel-wrapper {
  margin-top: 14px;
}
.book-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 14px;
  scrollbar-width: thin;
}
.book-carousel .book-card {
  flex: 0 0 auto;
  width: 155px;
  scroll-snap-align: start;
}
.book-carousel::-webkit-scrollbar { height: 4px; }
.book-carousel::-webkit-scrollbar-track { background: transparent; }
.book-carousel::-webkit-scrollbar-thumb { background: var(--border-active); border-radius: 2px; }
.book-carousel::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.book-card {
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.25s;
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
}
.book-card:hover {
  border-color: var(--neon-gold);
  box-shadow: 0 4px 20px rgba(212,165,74,0.10);
  transform: translateY(-3px);
}
.book-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  opacity: 0.9;
  transition: opacity 0.25s;
}
.book-card:hover img { opacity: 1; }
.book-title {
  display: block;
  padding: 4px 8px 8px;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--fg-bright);
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.02em;
}
.book-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.813rem;
  color: var(--neon-gold);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}
.book-more:hover { opacity: 0.75; color: var(--neon-gold); }
