/* TropicoHead — Shared Styles */

:root {
  --bg: #faf8f2;
  --bg-section: #ffffff;
  --text: #2c2c2c;
  --text-muted: #5a5a5a;
  --accent: #3a7d44;
  --accent-light: #e8f0e4;
  --accent-dark: #2a5e32;
  --warm: #c4956a;
  --warm-light: #f5ede4;
  --border: #d4cfc4;
  --header-bg: #3a7d44;
  --header-text: #faf8f2;
  --tag-verified: #2a7d3a;
  --tag-high: #3a6d8c;
  --tag-medium: #8c7a3a;
  --tag-low: #a0522d;
  --tag-missing: #b22222;
  --tag-t26: #7b5ea7;
  --tag-bug: #cc4444;
  --diff-tutorial: #6b7280;
  --diff-easy: #2a7d3a;
  --diff-medium: #3a6d8c;
  --diff-hard: #b8860b;
  --diff-very-hard: #b22222;
}

[data-theme="dark"] {
  --bg: #14181f;
  --bg-section: #1d232c;
  --text: #e6e3dc;
  --text-muted: #9aa1ab;
  --accent-light: #2a3540;
  --border: #2f3742;
  --header-text: #f3efe7;
  --tag-verified: #5ec07b;
  --tag-high: #6fa9d6;
  --tag-medium: #d6c068;
  --tag-low: #d39966;
  --tag-missing: #e07b7b;
  --tag-t26: #b69fdb;
  --tag-bug: #f08c8c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="sepia"]):not([data-theme="high-contrast"]) {
    --bg: #14181f;
    --bg-section: #1d232c;
    --text: #e6e3dc;
    --text-muted: #9aa1ab;
    --accent-light: #2a3540;
    --border: #2f3742;
    --header-text: #f3efe7;
    --tag-verified: #5ec07b;
    --tag-high: #6fa9d6;
    --tag-medium: #d6c068;
    --tag-low: #d39966;
    --tag-missing: #e07b7b;
    --tag-t26: #b69fdb;
    --tag-bug: #f08c8c;
  }
}

[data-theme="sepia"] {
  --bg: #f4ecd8;
  --bg-section: #fbf3df;
  --text: #4a3a2a;
  --text-muted: #7a6852;
  --accent-light: #ecd9b5;
  --border: #d4c099;
  --header-text: #fbf3df;
  --tag-verified: #4a7d44;
  --tag-high: #3a6d8c;
  --tag-medium: #8c7a3a;
  --tag-low: #a0522d;
  --tag-missing: #8a2a2a;
  --tag-t26: #6b4ea7;
  --tag-bug: #b22222;
}

[data-theme="high-contrast"] {
  --bg: #ffffff;
  --bg-section: #ffffff;
  --text: #000000;
  --text-muted: #1a1a1a;
  --accent: #0044aa;
  --accent-light: #e6f0ff;
  --accent-dark: #002255;
  --border: #000000;
  --header-bg: #000000;
  --header-text: #ffffff;
  --tag-verified: #006611;
  --tag-high: #003388;
  --tag-medium: #884400;
  --tag-low: #882200;
  --tag-missing: #aa0000;
  --tag-t26: #550088;
  --tag-bug: #aa0000;
}

.tropicohead-telegram-widget {
  display: flex; align-items: center; gap: 0.55rem;
  background: var(--bg-section, #fff);
  border: 1px solid var(--border, #d4cfc4);
  border-left: 4px solid var(--accent, #3a7d44);
  border-radius: 6px;
  padding: 0.55rem 0.9rem;
  margin: 0.5rem auto 1rem;
  max-width: 1000px;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text, #2c2c2c);
}
.tropicohead-telegram-widget-icon { font-size: 1.1rem; flex-shrink: 0; }
.tropicohead-telegram-widget-body { flex: 1; }
.tropicohead-telegram-widget-next {
  background: var(--accent-light, #e8f0e4); color: var(--accent-dark, #2a5e32);
  border: none; border-radius: 999px;
  padding: 0.2rem 0.55rem; font-size: 0.9rem;
  cursor: pointer; flex-shrink: 0;
}
.tropicohead-telegram-widget-next:hover { background: var(--accent, #3a7d44); color: #fff; }

.tropicohead-mobile-menu-toggle { display: none; }
@media (max-width: 700px) {
  .tropicohead-mobile-menu-toggle {
    display: flex; align-items: center; justify-content: center;
    position: fixed; bottom: 8rem; right: 0.75rem;
    width: 48px; height: 48px; border-radius: 999px;
    background: var(--accent-dark, #2a5e32); color: #fff;
    border: none; font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 70; cursor: pointer;
  }
  .tropicohead-mobile-menu-toggle:active { transform: scale(0.95); }
}
.tropicohead-mobile-menu {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 1000;
}
.tropicohead-mobile-menu-inner {
  background: var(--bg-section, #fff); color: var(--text, #2c2c2c);
  border-radius: 12px 12px 0 0;
  padding: 1rem 1.2rem; width: 100%;
  max-height: 80vh; overflow-y: auto;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.25);
}
.tropicohead-mobile-menu-inner h2 { margin: 0 0 0.5rem; color: var(--accent-dark, #2a5e32); font-size: 1rem; }
.tropicohead-mobile-menu-inner ul { list-style: none; padding: 0; margin: 0; }
.tropicohead-mobile-menu-inner li { padding: 0.5rem 0; border-bottom: 1px solid var(--border, #d4cfc4); }
.tropicohead-mobile-menu-inner a { color: var(--text, #2c2c2c); text-decoration: none; font-size: 1rem; }
.tropicohead-mobile-menu-inner a:hover { color: var(--accent-dark, #2a5e32); text-decoration: underline; }
.tropicohead-mobile-menu-close {
  background: var(--accent, #3a7d44); color: #fff;
  border: none; border-radius: 6px;
  padding: 0.6rem 1rem; font-size: 0.95rem;
  cursor: pointer; margin-top: 1rem; width: 100%;
}
.tropicohead-mobile-menu-close:hover { background: var(--accent-dark, #2a5e32); }

.tropicohead-mobile-fab {
  display: none;
}
@media (max-width: 700px) {
  .tropicohead-mobile-fab {
    display: flex; align-items: center; justify-content: center;
    position: fixed;
    width: 48px; height: 48px;
    border-radius: 999px;
    background: var(--accent, #3a7d44);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 70;
    cursor: pointer;
  }
  .tropicohead-mobile-fab-search { right: 0.75rem; bottom: 4.5rem; }
  .tropicohead-mobile-fab-top { right: 0.75rem; bottom: 0.75rem; }
  .tropicohead-mobile-fab:active { transform: scale(0.95); }
}

.tropicohead-penultimo-popup {
  position: fixed; bottom: 1.2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--bg-section, #fff);
  border: 1px solid var(--accent, #3a7d44);
  border-left: 4px solid var(--accent, #3a7d44);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  max-width: min(560px, calc(100% - 2rem));
  z-index: 999;
  font-size: 0.95rem;
}
.tropicohead-penultimo-icon { font-size: 1.4rem; }
.tropicohead-penultimo-text { color: var(--text, #2c2c2c); }
.tropicohead-penultimo-close {
  background: transparent; border: none;
  font-size: 1.1rem; cursor: pointer;
  color: var(--text-muted, #5a5a5a);
}
.tropicohead-penultimo-close:hover { color: var(--accent-dark, #2a5e32); }

.tropicohead-footer-info {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border, #d4cfc4);
  font-size: 0.78rem;
  color: var(--text-muted, #5a5a5a);
  text-align: center;
}

.tropicohead-recently-shipped {
  display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center;
  background: var(--bg-section, #fff);
  border-bottom: 1px solid var(--border, #d4cfc4);
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text-muted, #5a5a5a);
}
.tropicohead-recently-shipped-label { font-weight: 700; color: var(--accent-dark, #2a5e32); }
.tropicohead-recently-shipped a { color: var(--text, #2c2c2c); text-decoration: none; }
.tropicohead-recently-shipped a:hover { color: var(--accent-dark, #2a5e32); text-decoration: underline; }
.tropicohead-recently-shipped-sep { color: var(--text-muted); }

.tropicohead-featured-section {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  background: var(--accent-light, #e8f0e4);
  border: 1px solid var(--border, #d4cfc4);
  border-left: 4px solid var(--accent, #3a7d44);
  border-radius: 6px;
  padding: 0.55rem 0.9rem;
  margin: 0.5rem auto 1rem;
  max-width: 1000px;
  font-size: 0.92rem;
}
.tropicohead-featured-section-label { font-weight: 700; color: var(--accent-dark, #2a5e32); }
.tropicohead-featured-section a { color: var(--text, #2c2c2c); text-decoration: underline; }
.tropicohead-featured-section a:hover { color: var(--accent-dark, #2a5e32); }

.tropicohead-search-help {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.tropicohead-search-help-inner {
  background: var(--bg-section, #fff);
  color: var(--text, #2c2c2c);
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 10px;
  padding: 1.5rem 1.7rem;
  max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.tropicohead-search-help-inner h2 { margin: 0 0 0.4rem; color: var(--accent-dark, #2a5e32); }
.tropicohead-search-help-inner h3 { margin: 1rem 0 0.4rem; font-size: 1rem; color: var(--accent-dark, #2a5e32); }
.tropicohead-search-help-inner dl { margin: 0.4rem 0; display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 0.4rem 0.8rem; }
.tropicohead-search-help-inner dt { font-family: monospace; color: var(--text, #2c2c2c); }
.tropicohead-search-help-inner dt code, .tropicohead-search-help-inner dt kbd { background: var(--accent-light, #e8f0e4); padding: 0.1rem 0.45rem; border-radius: 4px; font-size: 0.86em; }
.tropicohead-search-help-inner dd { margin: 0; color: var(--text-muted, #5a5a5a); font-size: 0.92em; }
.tropicohead-search-help-close {
  background: var(--accent, #3a7d44); color: #fff;
  border: none; border-radius: 6px;
  padding: 0.55rem 1.1rem;
  margin-top: 1rem;
  font-size: 0.95rem; cursor: pointer;
}
.tropicohead-search-help-close:hover { background: var(--accent-dark, #2a5e32); }

.tropicohead-recent-searches {
  padding: 0.6rem 0.8rem;
  background: var(--bg-section, #fff);
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 6px;
  margin: 0.4rem 0;
}
.tropicohead-recent-label { margin: 0 0 0.4rem; font-size: 0.78rem; font-weight: 600; color: var(--text-muted, #5a5a5a); text-transform: uppercase; letter-spacing: 0.04em; }
.tropicohead-recent-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tropicohead-recent-pill {
  background: var(--accent-light, #e8f0e4);
  color: var(--text, #2c2c2c);
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.12s;
}
.tropicohead-recent-pill:hover { background: var(--accent, #3a7d44); color: #fff; }
.tropicohead-recent-pill:focus { outline: 2px solid var(--accent, #3a7d44); outline-offset: 2px; }
.tropicohead-recent-clear {
  background: transparent; border: none;
  color: var(--text-muted, #5a5a5a);
  font-size: 0.78rem; cursor: pointer;
  margin-top: 0.4rem; padding: 0;
  text-decoration: underline;
}
.tropicohead-recent-clear:hover { color: var(--accent-dark, #2a5e32); }

.tropicohead-focus-mode .game-nav,
.tropicohead-focus-mode #tropicohead-theme-toggle,
.tropicohead-focus-mode .tropicohead-chat-strip,
.tropicohead-focus-mode .tropicohead-plaza-lane,
.tropicohead-focus-mode .tropicohead-plaza-citizen,
.tropicohead-focus-mode .tropicohead-citizen-bubble,
.tropicohead-focus-mode .tropicohead-social-bar,
.tropicohead-focus-mode .tropicohead-recently-shipped,
.tropicohead-focus-mode .tropicohead-featured-section,
.tropicohead-focus-mode .tropicohead-mobile-fab,
.tropicohead-focus-mode .tropicohead-install,
.tropicohead-focus-mode .tropicohead-leaderboard,
.tropicohead-focus-mode #tropicohead-recent,
.tropicohead-focus-mode .tropicohead-progress,
.tropicohead-focus-mode .tropicohead-comments,
.tropicohead-focus-mode .tropicohead-pending-edits,
.tropicohead-focus-mode .tropicohead-propose-edit-btn,
.tropicohead-focus-mode .giscus-footer,
.tropicohead-focus-mode .tropicohead-badge-toast-container,
.tropicohead-focus-mode #tropicohead-calculator,
.tropicohead-focus-mode .music-toggle,
.tropicohead-focus-mode .toc-preview-tooltip,
.tropicohead-focus-mode .tropicohead-scroll-progress,
.tropicohead-focus-mode .tropicohead-back-to-top {
  display: none !important;
}
.tropicohead-focus-mode .tropicohead-footer-info { display: none; }

.tropicohead-scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 998; pointer-events: none;
  background: transparent;
}
.tropicohead-scroll-progress-fill {
  display: block; height: 100%; width: 0%;
  background: var(--accent, #3a7d44);
  transition: width 60ms linear;
}

.tropicohead-sandbox-filter {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 1rem;
  align-items: center;
}
.tropicohead-sandbox-filter button {
  padding: 0.35rem 0.85rem; font-size: 0.85rem; cursor: pointer;
  background: var(--bg-section); border: 1px solid var(--border);
  border-radius: 999px; color: var(--text-muted);
}
.tropicohead-sandbox-filter button[aria-pressed="true"] {
  background: var(--accent, #3a7d44); color: #fff;
  border-color: var(--accent-dark, #2a5e32);
}
.tropicohead-sandbox-filter button:hover {
  border-color: var(--accent, #3a7d44);
  color: var(--accent-dark, #2a5e32);
}

.tropicohead-cabinet-share-button {
  display: inline-block; margin-top: 0.8rem;
  padding: 0.45rem 0.95rem; font-size: 0.88rem; cursor: pointer;
  background: var(--accent-light, #e8f0e4); color: var(--accent-dark, #2a5e32);
  border: 1px solid var(--accent, #3a7d44); border-radius: 999px;
  font-weight: 600;
}
.tropicohead-cabinet-share-button:hover {
  background: var(--accent, #3a7d44); color: #fff;
}
.tropicohead-cabinet-shared-banner {
  margin: 0.8rem 0; padding: 0.7rem 1rem; font-size: 0.92rem;
  background: var(--accent-light, #e8f0e4);
  border-left: 4px solid var(--accent, #3a7d44);
  border-radius: 4px;
}
.tropicohead-cabinet-shared-banner a {
  color: var(--accent-dark, #2a5e32); font-weight: 600;
}

.tropicohead-activity-rank,
.tropicohead-time-spent-chip,
.tropicohead-streak-chip,
.tropicohead-bookmark-count-chip {
  display: inline-block; margin-top: 0.6rem; margin-right: 0.5rem;
  padding: 0.35rem 0.75rem; font-size: 0.85rem; font-weight: 600;
  background: var(--accent-light, #e8f0e4); color: var(--accent-dark, #2a5e32);
  border-radius: 999px; border: 1px solid var(--accent, #3a7d44);
}
.tropicohead-streak-chip { background: #ffe8d4; color: #6b2e00; border-color: #d4842e; }

.tropicohead-welcome-back {
  display: block; margin: 0.8rem auto; max-width: 880px;
  padding: 0.7rem 1rem; font-size: 0.95rem; line-height: 1.5;
  background: var(--accent-light, #e8f0e4); color: var(--accent-dark, #2a5e32);
  border-left: 4px solid var(--accent, #3a7d44); border-radius: 4px;
}
.tropicohead-welcome-back strong { color: var(--accent-dark, #2a5e32); }

.tropicohead-next-badge-hint {
  display: block; margin: 0.5rem auto; max-width: 880px;
  padding: 0.55rem 1rem; font-size: 0.88rem;
  background: var(--bg-section); color: var(--text);
  border-left: 4px solid var(--accent-light, #e8f0e4); border-radius: 4px;
}
.tropicohead-next-badge-hint strong { color: var(--accent-dark, #2a5e32); }
.tropicohead-next-badge-hint em { color: var(--text-muted, #6a6a6a); font-style: italic; }

.tropicohead-up-next {
  margin: 1rem 0 0; padding: 0.4rem 0.7rem;
  background: var(--accent-light, #e8f0e4);
  border-left: 3px solid var(--accent, #3a7d44);
  border-radius: 4px; font-size: 0.85rem;
  color: var(--text-muted);
}
.tropicohead-up-next a { color: var(--accent-dark, #2a5e32); font-weight: 600; text-decoration: none; }
.tropicohead-up-next a:hover { text-decoration: underline; }

.tropicohead-heading-anchor {
  opacity: 0; transition: opacity 100ms ease;
  margin-left: 0.3rem; font-size: 0.75em;
  color: var(--text-muted, #6a6a6a); text-decoration: none;
  font-weight: 400;
}
h3:hover .tropicohead-heading-anchor,
h4:hover .tropicohead-heading-anchor {
  opacity: 1;
}
.tropicohead-heading-anchor:hover { color: var(--accent, #3a7d44); }

.tropicohead-milestone-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.6rem; padding: 0.6rem 1rem; margin: 0 auto;
  background: linear-gradient(90deg, var(--accent-light), var(--accent));
  color: #fff; font-weight: 600; font-size: 0.92rem;
}
.tropicohead-milestone-banner button {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px; width: 28px; height: 28px; font-size: 1rem; cursor: pointer;
  padding: 0; line-height: 1;
}
.tropicohead-milestone-banner button:hover { background: rgba(255,255,255,0.2); }

.tropicohead-back-to-top {
  position: fixed; right: 1.1rem; bottom: 5.5rem;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent, #3a7d44); color: #fff;
  border: none; font-size: 1.2rem; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 997; opacity: 1; transition: opacity 200ms ease, transform 200ms ease;
}
.tropicohead-back-to-top:hover { background: var(--accent-dark, #2a5e32); }
.tropicohead-back-to-top-hidden { opacity: 0; pointer-events: none; transform: translateY(20px); }

.tropicohead-focus-mode .container,
.tropicohead-focus-mode main.container {
  max-width: 800px; margin: 0 auto; padding: 1rem 1.5rem;
}

.tropicohead-section-toc {
  background: var(--accent-light, #e8f0e4);
  border: 1px solid var(--border, #d4cfc4);
  border-left: 3px solid var(--accent, #3a7d44);
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}
.tropicohead-section-toc-label { margin: 0 0 0.35rem; font-weight: 600; color: var(--accent-dark, #2a5e32); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.tropicohead-section-toc-list { list-style: none; padding-left: 0; margin: 0; columns: 2; column-gap: 1.2rem; }
@media (max-width: 700px) { .tropicohead-section-toc-list { columns: 1; } }
.tropicohead-section-toc-item, .tropicohead-section-toc-item-sub { padding: 0.12rem 0; break-inside: avoid; }
.tropicohead-section-toc-item-sub { padding-left: 1.1rem; font-size: 0.86em; color: var(--text-muted, #5a5a5a); }
.tropicohead-section-toc a { color: var(--text, #2c2c2c); text-decoration: none; }
.tropicohead-section-toc a:hover { text-decoration: underline; color: var(--accent-dark, #2a5e32); }

.tropicohead-reading-time {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--text-muted, #5a5a5a);
  background: var(--accent-light, #e8f0e4);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  margin-left: 0.5rem;
  vertical-align: middle;
  font-weight: 500;
}
.tropicohead-copy-link {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.35rem;
  margin-left: 0.25rem;
  vertical-align: middle;
  color: var(--accent, #3a7d44);
  transition: transform 0.12s, color 0.12s;
}
.tropicohead-copy-link:hover { transform: scale(1.15); }
.tropicohead-copy-link:focus { outline: 2px solid var(--accent, #3a7d44); outline-offset: 2px; }
.tropicohead-copy-link-flash { color: var(--accent-dark, #2a5e32); }

.tropicohead-bookmark-toggle {
  background: transparent;
  border: none;
  color: var(--accent, #3a7d44);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 0.4rem;
  margin-left: 0.4rem;
  vertical-align: middle;
  transition: transform 0.12s;
}
.tropicohead-bookmark-toggle[aria-pressed="true"] { color: var(--accent-dark, #2a5e32); }
.tropicohead-bookmark-toggle:hover { transform: scale(1.15); }
.tropicohead-bookmark-toggle:focus { outline: 2px solid var(--accent, #3a7d44); outline-offset: 2px; }

.tropicohead-me-bookmarks { margin-top: 1rem; }
.tropicohead-me-bookmarks ol { list-style: none; padding: 0; margin: 0; }
.tropicohead-me-bookmarks li {
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--border, #d4cfc4);
  display: flex; gap: 0.5rem; align-items: baseline;
}
.tropicohead-me-bookmarks li a { font-weight: 600; color: var(--text, #2c2c2c); text-decoration: none; }
.tropicohead-me-bookmarks li a:hover { text-decoration: underline; }
.tropicohead-me-bookmarks .game-tag { font-size: 0.78rem; color: var(--text-muted, #5a5a5a); }
.tropicohead-me-bookmarks .added { font-size: 0.78rem; color: var(--text-muted, #5a5a5a); margin-left: auto; }
.tropicohead-me-bookmarks-empty { color: var(--text-muted, #5a5a5a); font-style: italic; padding: 0.5rem; }
.tropicohead-me-visits { margin-top: 1rem; }
.tropicohead-me-visits ol { list-style: none; padding: 0; margin: 0.4rem 0; }
.tropicohead-me-visits li {
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid var(--border, #d4cfc4);
  display: flex; justify-content: space-between; align-items: baseline;
}
.tropicohead-me-visits a { color: var(--text, #2c2c2c); text-decoration: none; font-weight: 600; }
.tropicohead-me-visits a:hover { color: var(--accent-dark, #2a5e32); text-decoration: underline; }
.tropicohead-me-visits-count { background: var(--accent-light); color: var(--accent-dark); border-radius: 999px; padding: 0.1rem 0.55rem; font-size: 0.78rem; font-weight: 700; }
.tropicohead-me-visits-meta { font-size: 0.85rem; color: var(--text-muted); }
.tropicohead-me-visits-empty { color: var(--text-muted); font-style: italic; padding: 0.5rem; }
.tropicohead-bookmarks-actions { display: flex; gap: 0.5rem; margin: 0.5rem 0 0.6rem; flex-wrap: wrap; }
.tropicohead-bookmarks-export, .tropicohead-bookmarks-import {
  background: var(--accent-light, #e8f0e4);
  color: var(--text, #2c2c2c);
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-block;
}
.tropicohead-bookmarks-export:hover, .tropicohead-bookmarks-import:hover { background: var(--accent, #3a7d44); color: #fff; }

#tropicohead-theme-toggle {
  position: fixed; top: 0.75rem; right: 0.75rem;
  z-index: 60;
  background: var(--bg-section);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
#tropicohead-theme-toggle:hover { background: var(--accent-light); }
@media (max-width: 700px) {
  #tropicohead-theme-toggle { top: 0.5rem; right: 0.5rem; padding: 0.3rem 0.65rem; font-size: 0.78rem; }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
}

/* --- Social bar (upvote/downvote + Suggest-an-edit) --- */

.tropicohead-social-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--border, #d4cfc4);
  font-size: 0.85rem;
  color: var(--text-muted, #5a5a5a);
  flex-wrap: wrap;
}

.tropicohead-vote {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tropicohead-vote-label {
  font-size: 0.82rem;
  color: var(--text-muted, #5a5a5a);
  margin-right: 0.2rem;
}

.tropicohead-vote-btn {
  background: transparent;
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.tropicohead-vote-btn:hover {
  background: var(--accent-light, #e8f0e4);
}

.tropicohead-vote-btn[aria-pressed="true"] {
  background: var(--accent, #3a7d44);
  border-color: var(--accent-dark, #2a5e32);
  color: #fff;
}

.tropicohead-suggest-edit {
  font-size: 0.82rem;
  color: var(--accent-dark, #2a5e32);
  text-decoration: none;
}

.tropicohead-suggest-edit:hover {
  text-decoration: underline;
}

.tropicohead-vote-counts {
  font-size: 0.82rem;
  color: var(--text-muted, #5a5a5a);
  margin-left: 0.2rem;
}

.tropicohead-giscus-link {
  font-size: 0.78rem;
  color: var(--text-muted, #5a5a5a);
  text-decoration: none;
  opacity: 0.7;
  margin-left: auto;
}

.tropicohead-giscus-link:hover {
  opacity: 1;
  text-decoration: underline;
  color: var(--accent-dark, #2a5e32);
}

.tropicohead-giscus-container { margin-top: 1rem; }

.tropicohead-comment-section {
  margin-top: 1rem;
  border: 1px dashed var(--border, #d4cfc4);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  background: var(--bg-section, #ffffff);
}

.tropicohead-comment-section > summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--accent-dark, #2a5e32);
  font-weight: 600;
  list-style: none;
}

.tropicohead-comments-list { margin-top: 0.6rem; font-size: 0.9rem; color: var(--text-muted, #5a5a5a); }

.tropicohead-comments-ul { list-style: none; padding: 0; margin: 0; }
.tropicohead-comments-ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border, #d4cfc4);
}
.tropicohead-comments-ul li:last-child { border-bottom: 0; }

.tropicohead-comment-name { font-weight: 600; color: var(--text, #2c2c2c); }
.tropicohead-comment-date { font-size: 0.78rem; color: var(--text-muted, #5a5a5a); }
.tropicohead-comment-body { margin-top: 0.2rem; color: var(--text, #2c2c2c); white-space: pre-wrap; }

.tropicohead-comment-form { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.8rem; }
.tropicohead-comment-form input,
.tropicohead-comment-form textarea {
  font-family: inherit;
  font-size: 0.92rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 4px;
  background: #fff;
  color: var(--text, #2c2c2c);
}
.tropicohead-comment-form textarea { resize: vertical; }
.tropicohead-comment-form button {
  align-self: flex-start;
  background: var(--accent, #3a7d44);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 0.4rem 0.9rem;
  font-family: inherit;
  cursor: pointer;
}
.tropicohead-comment-form button:hover { background: var(--accent-dark, #2a5e32); }
.tropicohead-comment-status { font-size: 0.85rem; min-height: 1.2em; }

.tropicohead-auth-control {
  position: absolute;
  top: 0.55rem;
  left: 0.6rem;
  z-index: 1100;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.85);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tropicohead-auth-control button {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.tropicohead-auth-control button:hover { background: rgba(255,255,255,0.32); }

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

.tropicohead-auth-box {
  background: var(--bg-section, #fff);
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 12px 36px rgba(0,0,0,0.35);
}

.tropicohead-auth-box h3 {
  margin: 0 0 0.5rem;
  color: var(--accent-dark, #2a5e32);
}

.tropicohead-auth-box p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted, #5a5a5a);
}

.tropicohead-auth-box form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tropicohead-auth-box input {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 4px;
}

.tropicohead-auth-box form button {
  background: var(--accent, #3a7d44);
  color: #fff;
  border: 0;
  padding: 0.5rem;
  border-radius: 4px;
  font-family: inherit;
  cursor: pointer;
}

.tropicohead-auth-close {
  margin-top: 0.7rem;
  background: transparent;
  border: 0;
  color: var(--text-muted, #5a5a5a);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
}

.tropicohead-auth-status-msg {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  min-height: 1.2em;
  color: var(--accent-dark, #2a5e32);
}

/* --- Search: Cross-game results --- */

.search-cross-game-divider {
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted, #5a5a5a);
  background: var(--warm-light, #f5ede4);
  border-top: 1px dashed var(--border, #d4cfc4);
  border-bottom: 1px dashed var(--border, #d4cfc4);
}

.search-result.search-cross-game {
  padding: 0;
}

.search-cross-game-link {
  display: block;
  padding: 0.55rem 1rem;
  text-decoration: none;
  color: var(--accent-dark, #2a5e32);
  font-size: 0.92rem;
}

.search-cross-game-link:hover {
  background: var(--accent-light, #e8f0e4);
  text-decoration: none;
}

.search-result-game {
  display: inline-block;
  background: var(--accent, #3a7d44);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-right: 0.4rem;
  letter-spacing: 0.5px;
}

/* --- Search: Did You Mean? (fuzzy fallback) --- */

.search-did-you-mean {
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--warm, #c4956a);
  background: var(--warm-light, #f5ede4);
}

.search-did-you-mean-label {
  font-size: 0.85rem;
  color: var(--text-muted, #5a5a5a);
  margin-bottom: 0.35rem;
  font-style: italic;
}

.search-did-you-mean-suggestions {
  font-size: 0.95rem;
}

.search-did-you-mean-link {
  color: var(--accent-dark, #2a5e32);
  text-decoration: none;
  font-weight: 600;
}

.search-did-you-mean-link:hover {
  text-decoration: underline;
}

/* --- Search Easter Egg (pinned Shannon/Ike result) --- */

.search-result.search-easter-egg {
  background: linear-gradient(135deg, var(--accent-light, #e8f0e4) 0%, var(--warm-light, #f5ede4) 100%);
  border-left: 4px solid var(--accent, #3a7d44);
}

.search-result.search-easter-egg .search-result-title {
  font-weight: 700;
  color: var(--accent-dark, #2a5e32);
}

/* --- Citizen Plaza chat strip (below game-nav) --- */

#tropicohead-chat-strip {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 1rem;
  background: linear-gradient(180deg, #2a3142 0%, #1a1a2e 100%);
  color: rgba(255,255,255,0.92);
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: relative;
  z-index: 900;
  transition: background 0.15s;
}

#tropicohead-chat-strip:hover { background: linear-gradient(180deg, #364056 0%, #1f1f38 100%); }

.tropicohead-chat-strip-label {
  font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.tropicohead-chat-strip-ticker {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0.85;
}

.tropicohead-chat-strip-pill {
  flex-shrink: 0;
  background: var(--accent, #3a7d44);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

/* Overlay */
.tropicohead-chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.tropicohead-chat-box {
  background: var(--bg-section, #fff);
  border-radius: 10px;
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  overflow: hidden;
}

.tropicohead-chat-header {
  background: var(--header-bg, #3a7d44);
  color: #fff;
  padding: 0.8rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tropicohead-chat-header h3 { margin: 0; font-size: 1rem; }

.tropicohead-chat-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.tropicohead-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem 1.1rem;
  background: var(--bg, #faf8f2);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tropicohead-chat-message {
  padding: 0.4rem 0.6rem;
  background: #fff;
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 6px;
}

.tropicohead-chat-name { font-weight: 700; color: var(--accent-dark, #2a5e32); font-size: 0.88rem; }
.tropicohead-chat-date { font-size: 0.75rem; color: var(--text-muted, #5a5a5a); }
.tropicohead-chat-body { margin-top: 0.15rem; font-size: 0.92rem; color: var(--text, #2c2c2c); white-space: pre-wrap; }
.tropicohead-chat-empty { color: var(--text-muted, #5a5a5a); font-style: italic; }

.tropicohead-chat-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.8rem 1.1rem;
  background: #fff;
  border-top: 1px solid var(--border, #d4cfc4);
}

.tropicohead-chat-form input,
.tropicohead-chat-form textarea {
  font-family: inherit;
  font-size: 0.92rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 4px;
}

.tropicohead-chat-form textarea { resize: vertical; }

.tropicohead-chat-form button {
  align-self: flex-start;
  background: var(--accent, #3a7d44);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 0.45rem 1rem;
  font-family: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}

.tropicohead-chat-form button:hover { background: var(--accent-dark, #2a5e32); }

.tropicohead-chat-status { font-size: 0.83rem; color: var(--text-muted, #5a5a5a); min-height: 1.1em; }

@media (max-width: 700px) {
  #tropicohead-chat-strip {
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
  }
  #tropicohead-chat-strip .tropicohead-chat-strip-ticker {
    flex: 1;
    max-width: 60%;
  }
  .tropicohead-chat-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }
  .tropicohead-chat-box {
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }
  .tropicohead-chat-header h3 { font-size: 0.92rem; }
  .tropicohead-chat-form input,
  .tropicohead-chat-form textarea { font-size: 16px; /* prevent iOS auto-zoom */ }
}

/* --- Music Toggle (floating top-right) --- */

#tropicohead-music-toggle {
  position: fixed;
  top: 0.55rem;
  right: 0.6rem;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

#tropicohead-music-toggle:hover {
  background: rgba(0, 0, 0, 0.82);
}

#tropicohead-music-toggle[aria-pressed="true"] {
  background: var(--accent, #3a7d44);
  border-color: var(--accent-dark, #2a5e32);
}

/* --- Game Navigation Bar --- */

.game-nav {
  background: #1a1a2e;
  text-align: center;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.game-nav a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 0.4rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.game-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

.game-nav a.active {
  color: #fff;
  background: var(--header-bg);
  font-weight: 600;
}

/* --- Header --- */

header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 2rem 1.5rem 2.5rem;
  text-align: center;
  border-bottom: 4px solid var(--accent-dark);
}

header .dedication {
  font-size: 0.85rem;
  opacity: 0.8;
  font-style: italic;
  margin-bottom: 1rem;
  letter-spacing: 0.3px;
}

header .dedication .header-credits-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,255,255,0.5);
  font-style: normal;
}

header .dedication .header-credits-link:hover {
  color: #fff;
  border-bottom-color: #fff;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.3rem;
  letter-spacing: 0.5px;
}

header .subtitle {
  font-size: 1rem;
  opacity: 0.9;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

header .tagline {
  font-size: 0.85rem;
  opacity: 0.7;
  font-style: italic;
  margin-bottom: 1.5rem;
  min-height: 1.2em;
}

/* --- Search Hero --- */

.search-hero {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-hero #search-input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  font-size: 1.15rem;
  font-family: inherit;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  background: rgba(255,255,255,0.15);
  color: var(--header-text);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.search-hero #search-input::placeholder {
  color: rgba(255,255,255,0.6);
}

.search-hero #search-input:focus {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.2);
}

.search-hero #search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-section);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  max-height: 60vh;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 1001;
  display: none;
}

.search-hero #search-results.has-results {
  display: block;
}

/* --- Layout --- */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
}

nav {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}

nav h2 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--accent-dark);
  border-bottom: 2px solid var(--accent-light);
  padding-bottom: 0.4rem;
}

nav ol {
  padding-left: 1.4rem;
  columns: 2;
  column-gap: 2rem;
}

@media (max-width: 600px) {
  nav ol {
    columns: 1;
  }
}

nav li {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  break-inside: avoid;
}

nav a {
  color: var(--accent);
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
  color: var(--accent-dark);
}

/* --- Strategy Block (Overview + Spoiler Walkthrough) --- */

.strategy-block {
  --strat-border: var(--accent);
  --strat-bg: var(--accent-light);
  --strat-label: var(--accent-dark);
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-left: 4px solid var(--strat-border);
  border-radius: 6px;
  background: var(--bg-section);
  overflow: hidden;
}

.strategy-block[data-difficulty="tutorial"] {
  --strat-border: var(--diff-tutorial);
  --strat-bg: #f1f3f5;
  --strat-label: #4b5563;
}

.strategy-block[data-difficulty="easy"] {
  --strat-border: var(--diff-easy);
  --strat-bg: #e8f5e9;
  --strat-label: #1b5e20;
}

.strategy-block[data-difficulty="medium"] {
  --strat-border: var(--diff-medium);
  --strat-bg: #e3f2fd;
  --strat-label: #0d47a1;
}

.strategy-block[data-difficulty="hard"] {
  --strat-border: var(--diff-hard);
  --strat-bg: #fff8e1;
  --strat-label: #7a5a07;
}

.strategy-block[data-difficulty="very-hard"] {
  --strat-border: var(--diff-very-hard);
  --strat-bg: #ffebee;
  --strat-label: #8b0000;
}

.strategy-overview {
  padding: 0.9rem 1.25rem;
  background: var(--strat-bg);
}

.strategy-overview .strategy-overview-label {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--strat-label);
  font-weight: 700;
}

.strategy-overview p {
  margin: 0;
}

.strategy-overview p + p {
  margin-top: 0.5rem;
}

details.strategy-walkthrough {
  border: none;
  border-top: 1px dashed var(--border);
  border-radius: 0;
  background: transparent;
}

details.strategy-walkthrough[open] {
  border-color: var(--border);
}

details.strategy-walkthrough > summary {
  padding: 0.6rem 1.25rem;
  background: transparent;
  border-bottom: none;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted);
}

details.strategy-walkthrough > summary::before {
  color: var(--text-muted);
}

details.strategy-walkthrough > summary:hover {
  background: var(--warm-light);
  color: var(--accent-dark);
}

details.strategy-walkthrough[open] > summary {
  border-bottom: 1px dashed var(--border);
  color: var(--accent-dark);
}

.walkthrough-content {
  padding: 0.75rem 1.25rem 1rem;
}

.walkthrough-content ol {
  margin: 0;
  padding-left: 1.4rem;
}

.walkthrough-content ol li {
  margin-bottom: 0.65rem;
  line-height: 1.55;
}

.walkthrough-content ol li:last-child {
  margin-bottom: 0;
}

.walkthrough-content p {
  margin: 0 0 0.5rem;
}

.walkthrough-content p:last-child {
  margin-bottom: 0;
}

/* --- Sections --- */

section {
  margin: 1rem 0;
}

details {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

details[open] {
  border-color: var(--accent);
}

summary {
  cursor: pointer;
  padding: 0.8rem 1.2rem;
  background: var(--warm-light);
  border-bottom: 1px solid var(--border);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "\25B6";
  font-size: 0.7rem;
  color: var(--accent);
  transition: transform 0.2s;
  flex-shrink: 0;
}

details[open] > summary::before {
  transform: rotate(90deg);
}

summary:hover {
  background: var(--accent-light);
}

summary h2.section-title {
  font-size: 1.15rem;
  color: var(--accent-dark);
  margin: 0;
  display: inline;
}

.section-content {
  padding: 1rem 1.5rem;
}

.section-content h1 {
  font-size: 1.4rem;
  color: var(--accent-dark);
  margin: 1.5rem 0 0.8rem;
  border-bottom: 2px solid var(--accent-light);
  padding-bottom: 0.3rem;
}

.section-content h2 {
  font-size: 1.2rem;
  color: var(--accent-dark);
  margin: 1.3rem 0 0.6rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
}

.section-content h3 {
  font-size: 1.05rem;
  color: var(--text);
  margin: 1rem 0 0.5rem;
}

.section-content h4 {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0.8rem 0 0.4rem;
}

.section-content h5, .section-content h6 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.6rem 0 0.3rem;
}

/* --- Typography --- */

p {
  margin: 0.6rem 0;
}

ul, ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

li {
  margin-bottom: 0.3rem;
}

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

blockquote {
  border-left: 3px solid var(--warm);
  background: var(--warm-light);
  padding: 0.6rem 1rem;
  margin: 0.8rem 0;
  font-style: italic;
  color: var(--text-muted);
  border-radius: 0 4px 4px 0;
}

code {
  background: #eee8dd;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

pre {
  background: #2c2c2c;
  color: #e8e8e8;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0.8rem 0;
  font-size: 0.85rem;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* --- Tables --- */

.table-wrap {
  overflow-x: auto;
  margin: 0.8rem 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}

th {
  background: var(--accent-light);
  color: var(--accent-dark);
  font-weight: 600;
  text-align: left;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  vertical-align: top;
}

tr:nth-child(even) {
  background: var(--warm-light);
}

tr:hover {
  background: var(--accent-light);
}

/* --- Links --- */

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--accent-dark);
}

/* --- Back to Top --- */

.back-to-top {
  text-align: right;
  margin: 0.8rem 1.2rem;
  font-size: 0.85rem;
}

.back-to-top a {
  color: var(--warm);
  font-weight: 500;
}

strong {
  color: var(--text);
}

/* --- Confidence Tags --- */

.tag-verified {
  background: #d4edda;
  color: var(--tag-verified);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.8em;
  font-weight: 600;
  white-space: nowrap;
}

.tag-high {
  background: #d1ecf1;
  color: var(--tag-high);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.8em;
  font-weight: 600;
  white-space: nowrap;
}

.tag-medium {
  background: #fff3cd;
  color: var(--tag-medium);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.8em;
  font-weight: 600;
  white-space: nowrap;
}

.tag-low {
  background: #fde2d4;
  color: var(--tag-low);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.8em;
  font-weight: 600;
  white-space: nowrap;
}

.tag-missing {
  background: #f8d7da;
  color: var(--tag-missing);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.8em;
  font-weight: 600;
  white-space: nowrap;
}

.tag-t26 {
  background: #e8dff5;
  color: var(--tag-t26);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.8em;
  font-weight: 600;
  white-space: nowrap;
}

.tag-bug {
  background: #f8d7da;
  color: var(--tag-bug);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.8em;
  font-weight: 600;
  white-space: nowrap;
}

/* --- Footer --- */

footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* --- Badge unlock toasts --- */

.tropicohead-badge-toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2000;
  pointer-events: none;
}

.tropicohead-badge-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-width: 260px;
  max-width: 340px;
  background: linear-gradient(135deg, var(--accent, #3a7d44) 0%, var(--accent-dark, #2a5e32) 100%);
  color: white;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  animation: tropicohead-toast-in 0.3s ease-out, tropicohead-toast-out 0.4s ease-in 4.6s forwards;
}

@keyframes tropicohead-toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes tropicohead-toast-out {
  to { opacity: 0; transform: translateX(40px); }
}

.tropicohead-badge-toast-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.tropicohead-badge-toast-headline {
  font-weight: 700;
  font-size: 0.9rem;
}

.tropicohead-badge-toast-description {
  font-size: 0.78rem;
  opacity: 0.92;
  margin-top: 2px;
}

/* --- Achievement badges (La Presidenta's Cabinet) --- */

.tropicohead-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.tropicohead-badge {
  position: relative;
  background: var(--bg-section, #fff);
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tropicohead-badge--unlocked {
  border-color: var(--accent, #3a7d44);
  box-shadow: 0 3px 10px rgba(58, 125, 68, 0.15);
}

.tropicohead-badge--locked {
  opacity: 0.62;
  filter: grayscale(0.5);
}

.tropicohead-badge--epic.tropicohead-badge--unlocked {
  border-color: #d49a2a;
  box-shadow: 0 3px 14px rgba(212, 154, 42, 0.25);
}

.tropicohead-badge--rare.tropicohead-badge--unlocked {
  border-color: #d4842a;
}

.tropicohead-badge-icon {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.tropicohead-badge-label {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  color: var(--accent-dark, #2a5e32);
}

.tropicohead-badge-description {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted, #5a5a5a);
  line-height: 1.4;
}

.tropicohead-badge-stamp {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent, #3a7d44);
  color: white;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 3px;
}

/* --- Progress bar in header --- */

.tropicohead-progress {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
  padding: 0.25rem 0.7rem;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.82rem;
}

.tropicohead-progress:hover {
  background: rgba(255, 255, 255, 0.22);
}

.tropicohead-progress-label {
  white-space: nowrap;
}

.tropicohead-progress-track {
  display: inline-block;
  width: 110px;
  height: 6px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 3px;
  overflow: hidden;
}

.tropicohead-progress-fill {
  display: block;
  height: 100%;
  background: var(--accent, #3a7d44);
  transition: width 0.5s ease;
}

/* --- PWA install button --- */

.tropicohead-install-button {
  display: inline-block;
  margin: 0.6rem 0 0;
  padding: 0.35rem 0.9rem;
  background: var(--accent, #3a7d44);
  color: white;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
}

.tropicohead-install-button:hover {
  filter: brightness(1.08);
}

/* --- WoWhead-style filter sidebar --- */

#tropicohead-filter-sidebar {
  max-width: 760px;
  margin: 0.5rem auto 0;
  padding: 0.5rem 1rem;
  background: var(--bg-section, #fff);
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 6px;
  font-size: 0.85rem;
}

#tropicohead-filter-sidebar h3 {
  margin: 0 0 0.3rem;
  font-size: 0.92rem;
  color: var(--accent-dark, #2a5e32);
}

.tropicohead-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
}

.tropicohead-filter-form label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  user-select: none;
}

.tropicohead-filtered-out {
  display: none !important;
}

/* --- Top all-time leaderboard widget --- */

#tropicohead-leaderboard {
  max-width: 760px;
  margin: 0.5rem auto 0;
  padding: 0.5rem 1rem;
  background: linear-gradient(180deg, var(--accent-light, #e6f0e7) 0%, var(--bg-section, #fff) 100%);
  border: 1px solid var(--accent, #3a7d44);
  border-radius: 6px;
  font-size: 0.86rem;
}

#tropicohead-leaderboard h3 {
  margin: 0 0 0.3rem;
  font-size: 0.92rem;
  color: var(--accent-dark, #2a5e32);
}

#tropicohead-leaderboard ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

#tropicohead-leaderboard li a {
  text-decoration: none;
  color: var(--accent-dark, #2a5e32);
}

#tropicohead-leaderboard li a:hover {
  text-decoration: underline;
}

.tropicohead-leaderboard-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 0.3rem;
  background: var(--accent, #3a7d44);
  color: white;
}

.tropicohead-leaderboard-badge-t2 { background: #c9a227; color: #2c2010; }
.tropicohead-leaderboard-badge-t3 { background: #d4842a; color: white; }
.tropicohead-leaderboard-badge-t4 { background: #d49a2a; color: #2c1f10; }

.tropicohead-leaderboard-net {
  color: var(--text-muted, #5a5a5a);
  font-size: 0.78rem;
}

/* --- /me Activity Dashboard (Phase 10b) --- */

#tropicohead-me {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.tropicohead-me-identity {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-muted, #5a5a5a);
  margin-bottom: 1.2rem;
}

.tropicohead-me-signin {
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--bg-section, #fbf6e7);
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 8px;
  text-align: center;
}

.tropicohead-me-totals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0;
}

.tropicohead-me-totals-cell {
  background: var(--bg-section, #fbf6e7);
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.tropicohead-me-totals-icon { font-size: 1.6rem; }
.tropicohead-me-totals-value { font-size: 1.8rem; font-weight: 700; color: var(--accent, #3a7d44); }
.tropicohead-me-totals-label { font-size: 0.85rem; color: var(--text-muted, #5a5a5a); }

.tropicohead-me-recent {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  background: var(--bg, #fff);
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 8px;
}

.tropicohead-me-recent h3 {
  margin: 0 0 0.6rem;
  color: var(--accent, #3a7d44);
  font-size: 1.05rem;
}

.tropicohead-me-recent-empty {
  color: var(--text-muted, #5a5a5a);
  font-style: italic;
  margin: 0;
}

.tropicohead-me-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tropicohead-me-recent-list li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border, #d4cfc4);
  font-size: 0.92rem;
}

.tropicohead-me-recent-list li:last-child { border-bottom: none; }

.tropicohead-me-recent-meta {
  font-size: 0.82rem;
  color: var(--text-muted, #5a5a5a);
}

.tropicohead-me-recent-body { margin-top: 0.2rem; }

.tropicohead-auth-me {
  margin: 0 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  background: var(--accent, #3a7d44);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.tropicohead-auth-me:hover { background: #2a5e32; color: #fff; }

/* --- Giscus demoted footer link (Phase 14 SG5) --- */

.tropicohead-giscus-footer {
  display: inline-block;
  margin: 0.6rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted, #5a5a5a);
  text-decoration: none;
  opacity: 0.7;
}

.tropicohead-giscus-footer:hover {
  opacity: 1;
  text-decoration: underline;
}

/* --- Build Planner + /compare (Phase 10a) --- */

#tropicohead-calculator {
  position: sticky;
  top: 1rem;
  margin: 2rem 0;
  padding: 1rem 1.2rem;
  background: var(--bg-section, #fbf6e7);
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 8px;
}

.tropicohead-calculator-heading {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--accent, #3a7d44);
}

.tropicohead-calculator-totals {
  font-weight: 700;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.tropicohead-calculator-plan {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
  font-size: 0.88rem;
}

.tropicohead-calculator-plan-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0;
  border-bottom: 1px dashed var(--border, #d4cfc4);
}

.tropicohead-calculator-remove {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  color: #b22222;
  padding: 0 0.3rem;
}

.tropicohead-calculator-filters,
.tropicohead-compare-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}

.tropicohead-calculator-filter,
.tropicohead-compare-filter,
.tropicohead-calculator-filter-all {
  background: var(--bg, #fff);
  border: 1px solid var(--border, #d4cfc4);
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
}

.tropicohead-calculator-filter:hover,
.tropicohead-compare-filter:hover { background: var(--accent, #3a7d44); color: #fff; }

.tropicohead-calculator-picker {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 320px;
  overflow-y: auto;
}

.tropicohead-calculator-pickable {
  text-align: left;
  background: #fff;
  border: 1px solid var(--border, #d4cfc4);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
}

.tropicohead-calculator-pickable:hover {
  background: var(--accent, #3a7d44);
  color: #fff;
}

.tropicohead-calculator-actions {
  margin-top: 0.6rem;
}

.tropicohead-calculator-actions button {
  background: var(--accent, #3a7d44);
  color: #fff;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

.tropicohead-compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}

.tropicohead-compare-table th,
.tropicohead-compare-table td {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border, #d4cfc4);
  vertical-align: top;
}

.tropicohead-compare-table thead th {
  background: var(--bg-section, #fbf6e7);
  font-weight: 700;
  text-align: left;
  color: var(--accent, #3a7d44);
}

.tropicohead-compare-name {
  font-weight: 600;
  background: #fbf6e7;
}

.tropicohead-compare-absent {
  text-align: center;
  color: var(--text-muted, #5a5a5a);
}

/* --- Community edits (Phase 9B) --- */

.tropicohead-propose-edit-btn {
  display: inline-block;
  margin: 0.6rem 0 0;
  padding: 0.3rem 0.7rem;
  background: var(--bg-section, #fbf6e7);
  border: 1px solid var(--accent, #3a7d44);
  color: var(--accent, #3a7d44);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}

.tropicohead-propose-edit-btn:hover {
  background: var(--accent, #3a7d44);
  color: #fff;
}

.tropicohead-pending-edits {
  margin: 0.8rem 0 0;
  padding: 0.6rem 0.8rem;
  background: #fff8e1;
  border: 1px solid #d4cfc4;
  border-radius: 4px;
  font-size: 0.88rem;
}

.tropicohead-pending-edits-title {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  color: var(--accent, #3a7d44);
}

.tropicohead-pending-edit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0;
  border-bottom: 1px dashed #d4cfc4;
}

.tropicohead-pending-edit:last-child { border-bottom: none; }

.tropicohead-pending-edit-author {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: var(--text-muted, #5a5a5a);
}

.tropicohead-pending-edit-summary {
  flex: 1 1 auto;
  min-width: 0;
}

.tropicohead-pending-edit-up,
.tropicohead-pending-edit-down {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.tropicohead-pending-edit-up:hover { background: rgba(58, 125, 68, 0.15); }
.tropicohead-pending-edit-down:hover { background: rgba(178, 34, 34, 0.15); }
.tropicohead-pending-edit-up:disabled,
.tropicohead-pending-edit-down:disabled { opacity: 0.4; cursor: not-allowed; }

.tropicohead-pending-edit-net {
  font-weight: 700;
  min-width: 2rem;
  text-align: center;
}

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

.tropicohead-edits-dialog {
  background: #fff;
  border-radius: 8px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 1.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.tropicohead-edits-dialog h3 { margin-top: 0; color: var(--accent, #3a7d44); }

.tropicohead-edits-dialog label {
  display: block;
  margin: 0.7rem 0;
  font-weight: 600;
}

.tropicohead-edits-dialog textarea,
.tropicohead-edits-dialog input[type="text"] {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.5rem;
  border: 1px solid #d4cfc4;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  box-sizing: border-box;
}

.tropicohead-edits-dialog textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  resize: vertical;
}

.tropicohead-edits-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.tropicohead-edits-actions button {
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

.tropicohead-edits-actions button[type="submit"] {
  background: var(--accent, #3a7d44);
  color: #fff;
}

.tropicohead-edits-cancel {
  background: #ccc;
  color: #2c2c2c;
}

.tropicohead-edits-status {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-muted, #5a5a5a);
}

/* --- Cabinet: global leaderboard (Phase 8) --- */

#tropicohead-global-leaderboard {
  margin: 2.5rem 0 1rem;
  padding: 1.2rem 1.4rem;
  background: var(--bg-section, #fbf6e7);
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.tropicohead-global-leaderboard-title {
  margin: 0 0 0.8rem;
  font-size: 1.3rem;
  color: var(--accent, #3a7d44);
}

.tropicohead-global-leaderboard-empty {
  color: var(--text-muted, #5a5a5a);
  font-style: italic;
}

.tropicohead-global-leaderboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tropicohead-global-leaderboard-list li {
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--border, #d4cfc4);
  font-size: 0.95rem;
}

.tropicohead-global-leaderboard-list li:last-child {
  border-bottom: none;
}

.tropicohead-global-leaderboard-rank {
  font-weight: 700;
  color: var(--accent, #3a7d44);
}

.tropicohead-global-leaderboard-email {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}

.tropicohead-global-leaderboard-badges {
  font-weight: 700;
  white-space: nowrap;
}

/* --- TOC sort by popularity toggle --- */

.tropicohead-toc-sort-toggle {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.25rem 0.7rem;
  background: var(--bg-section, #fff);
  border: 1px solid var(--border, #d4cfc4);
  border-radius: 4px;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--accent-dark, #2a5e32);
}

.tropicohead-toc-sort-toggle:hover {
  background: var(--accent-light, #e6f0e7);
}

/* --- Recently Viewed sidebar --- */

#tropicohead-recent {
  max-width: 760px;
  margin: 0.5rem auto 0;
  padding: 0.6rem 1rem;
  background: var(--bg-section, #fff);
  border: 1px solid var(--border, #d4cfc4);
  border-left: 3px solid var(--accent, #3a7d44);
  border-radius: 6px;
  font-size: 0.88rem;
}

#tropicohead-recent[hidden] {
  display: none;
}

#tropicohead-recent h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  color: var(--accent-dark, #2a5e32);
}

#tropicohead-recent ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
}

#tropicohead-recent li a {
  text-decoration: none;
  color: var(--accent-dark, #2a5e32);
  border-bottom: 1px dashed currentColor;
}

#tropicohead-recent li a:hover {
  border-bottom-style: solid;
}

/* --- TOC hover preview tooltip --- */

.toc-preview-tooltip {
  position: absolute;
  max-width: 360px;
  padding: 8px 12px;
  background: #2a2a2a;
  color: #f4ede1;
  font-size: 0.82rem;
  line-height: 1.4;
  border-radius: 6px;
  border-left: 3px solid var(--accent, #3a7d44);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  z-index: 1000;
  pointer-events: none;
  animation: toc-tip-fade 0.18s ease-out;
}

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

/* --- Plaza Citizens (walking emoji + speech bubbles) --- */

.tropicohead-plaza-lane {
  position: relative;
  height: 38px;
  margin: 0 0 4px;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.03) 100%);
}

.tropicohead-plaza-citizen {
  position: absolute;
  bottom: 2px;
  left: -3rem;
  font-size: 1.4rem;
  line-height: 1;
  animation: tropicohead-plaza-walk 24s linear infinite;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.15));
}

@keyframes tropicohead-plaza-walk {
  0%   { transform: translateX(0); }
  50%  { transform: translateX(50vw) scaleX(1); }
  50.01% { transform: translateX(50vw) scaleX(-1); }
  100% { transform: translateX(100vw) scaleX(-1); }
}

/* Ike — Special Advisor for Naps (Phase 14 SG7).
   Slower walk (40s vs 24s), and a 30% nap-pose pause via opacity/transform. */

.tropicohead-plaza-ike {
  animation: tropicohead-plaza-ike-nap 40s linear infinite;
}

@keyframes tropicohead-plaza-ike-nap {
  0%   { transform: translateX(0) scale(1); opacity: 1; }
  15%  { transform: translateX(15vw) scale(1); opacity: 1; }
  20%  { transform: translateX(15vw) scale(0.95); opacity: 0.75; }
  40%  { transform: translateX(15vw) scale(0.95); opacity: 0.75; }
  45%  { transform: translateX(15vw) scale(1); opacity: 1; }
  50%  { transform: translateX(50vw) scaleX(1); opacity: 1; }
  50.01% { transform: translateX(50vw) scaleX(-1); }
  70%  { transform: translateX(70vw) scaleX(-1); opacity: 1; }
  75%  { transform: translateX(70vw) scaleX(-1) scale(0.95); opacity: 0.75; }
  90%  { transform: translateX(70vw) scaleX(-1) scale(0.95); opacity: 0.75; }
  95%  { transform: translateX(70vw) scaleX(-1) scale(1); opacity: 1; }
  100% { transform: translateX(100vw) scaleX(-1); opacity: 1; }
}

.tropicohead-citizen-bubble {
  position: absolute;
  bottom: 30px;
  left: 30%;
  max-width: 280px;
  padding: 4px 10px;
  background: var(--accent, #3a7d44);
  color: white;
  font-size: 0.78rem;
  border-radius: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  animation: tropicohead-bubble-float 9s ease-out forwards;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 5;
}

@keyframes tropicohead-bubble-float {
  0%   { opacity: 0; transform: translateY(8px); }
  10%  { opacity: 1; transform: translateY(0); }
  85%  { opacity: 1; transform: translateY(-12px); }
  100% { opacity: 0; transform: translateY(-24px); }
}

/* --- Cross-game search v2: per-game accent badges --- */

.search-cross-game-group {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.search-cross-game-group-header {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  color: var(--text-muted, #5a5a5a);
  background: rgba(0, 0, 0, 0.03);
  border-top: 1px solid var(--border, #d4cfc4);
}

.search-result-game-t1 {
  background: #3a7d44;
  color: white;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
}

.search-result-game-t2 {
  background: #c9a227;
  color: #2c2010;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
}

.search-result-game-t3 {
  background: #d4842a;
  color: white;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
}

.search-result-game-t4 {
  background: #d49a2a;
  color: #2c1f10;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* --- Responsive --- */

@media (max-width: 700px) {
  header h1 {
    font-size: 1.5rem;
  }
  .container {
    padding: 0.8rem 1rem 2rem;
  }
  .section-content {
    padding: 0.8rem 1rem;
  }
  table {
    font-size: 0.8rem;
  }
  th, td {
    padding: 0.3rem 0.5rem;
  }
  .game-nav {
    gap: 0.25rem;
    padding: 0.4rem 0.5rem;
  }
  .game-nav a {
    padding: 0.6rem 0.8rem;
    font-size: 0.82rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
  }
  .tropicohead-plaza-lane {
    display: none;
  }
  .tropicohead-plaza-citizen {
    display: none;
    animation: none;
  }
  .tropicohead-citizen-bubble {
    display: none;
    animation: none;
  }
}

@keyframes tropicohead-konami-flash {
  0% { box-shadow: inset 0 0 0 0 rgba(255, 215, 0, 0); background: transparent; }
  20% { box-shadow: inset 0 0 80px 12px rgba(255, 215, 0, 0.5); background: rgba(255, 215, 0, 0.06); }
  60% { box-shadow: inset 0 0 80px 12px rgba(255, 215, 0, 0.35); background: rgba(255, 215, 0, 0.04); }
  100% { box-shadow: inset 0 0 0 0 rgba(255, 215, 0, 0); background: transparent; }
}
.tropicohead-konami-flash {
  animation: tropicohead-konami-flash 1.2s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .tropicohead-citizen,
  .tropicohead-plaza-citizen,
  .tropicohead-badge-toast,
  .tropicohead-speech-bubble,
  .tropicohead-chat-strip,
  .toc-preview-tooltip,
  .tropicohead-konami-flash {
    animation: none !important;
    transition: none !important;
  }
  .tropicohead-badge:hover,
  .tropicohead-badge:focus {
    transform: none !important;
  }
}

@media print {
  html, body {
    background: #ffffff !important;
    color: #111111 !important;
    font-size: 11pt !important;
    line-height: 1.45;
  }
  .game-nav,
  #tropicohead-theme-toggle,
  .search-hero,
  .tropicohead-chat-strip,
  .tropicohead-chat-overlay,
  .tropicohead-plaza-lane,
  .tropicohead-plaza-citizen,
  .tropicohead-citizen-bubble,
  .tropicohead-social-bar,
  .giscus-footer,
  .tropicohead-comments,
  .tropicohead-comment-form,
  .tropicohead-propose-edit-btn,
  .tropicohead-pending-edits,
  .tropicohead-badge-toast-container,
  .tropicohead-progress,
  .tropicohead-install,
  .tropicohead-leaderboard,
  #tropicohead-recent,
  .toc-preview-tooltip,
  .back-to-top,
  #tropicohead-calculator,
  .music-toggle,
  .tropicohead-telegram-widget,
  .tropicohead-recently-shipped,
  .tropicohead-featured-section,
  .tropicohead-footer-info,
  .tropicohead-mobile-fab,
  .tropicohead-mobile-menu-toggle,
  .tropicohead-mobile-menu-inner,
  .tropicohead-scroll-progress,
  .tropicohead-back-to-top,
  #search-input,
  .search-form,
  .search-results {
    display: none !important;
  }
  body {
    color: #000 !important;
    background: #fff !important;
  }
  details, details[open] {
    display: block !important;
  }
  details > summary {
    list-style: none;
    pointer-events: none;
  }
  details > summary::-webkit-details-marker { display: none; }
  details > summary .section-title {
    font-size: 14pt;
    margin: 1em 0 0.4em;
  }
  .section-content {
    display: block !important;
  }
  section[id] {
    page-break-inside: avoid;
    break-inside: avoid-page;
  }
  section[id] + section[id],
  h2 {
    page-break-before: auto;
    break-before: auto;
  }
  a {
    color: #111111 !important;
    text-decoration: underline;
  }
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #444444;
  }
  a[href^="#"]::after,
  a[href^="javascript:"]::after { content: ""; }
  header h1, header .subtitle, header .tagline { color: #111111 !important; background: transparent !important; }
  .tag-verified, .tag-high, .tag-medium, .tag-low, .tag-missing {
    color: #111111 !important;
    background: #f5f5f5 !important;
    border: 1px solid #cccccc;
  }
  table { page-break-inside: avoid; }
  footer { font-size: 9pt; color: #444444; }
}
