/* 这是什么梗 (www.konghonggame.cn) - Editorial Meme Dictionary Stylesheet */
:root {
  --brand: #0284c7;
  --brand-dark: #0369a1;
  --brand-soft: #e0f2fe;
  --brand-tint: #f0f9ff;
  --accent: #f97316;
  --accent-soft: #fff7ed;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
  word-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
  background: var(--brand-tint);
}

.nav-link-accent {
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-weight: 600;
}

.nav-link-accent:hover,
.nav-link-accent.active {
  background: var(--brand);
  color: #fff;
}

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

.header-search {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 4px 3px 13px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.header-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
  background: #fff;
}

.header-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.88rem;
  width: 145px;
  color: var(--text);
}

.header-search button {
  border: none;
  background: var(--brand);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.header-search button:hover {
  background: var(--brand-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Announcement Banner (Mandatory under homepage nav) */
.notice-banner {
  background: linear-gradient(90deg, #eff6ff 0%, #f0f9ff 55%, #fff7ed 100%);
  border-bottom: 1px solid #dbeafe;
  font-size: 0.9rem;
}

.notice-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.notice-tag {
  flex-shrink: 0;
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.notice-text {
  color: var(--text-2);
  font-weight: 500;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(140deg, #ffffff 0%, #f0f9ff 62%, #e0f2fe 100%);
  border-bottom: 1px solid var(--border);
  padding: 44px 0 48px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.85fr);
  gap: 30px;
  align-items: center;
}

.hero-pill {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: #fff;
  border: 1px solid #bae6fd;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero-copy h1 {
  margin: 0 0 12px;
  font-size: 2.15rem;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-sub {
  margin: 0 0 22px;
  font-size: 1rem;
  color: var(--text-2);
  max-width: 640px;
}

.hero-search,
.banner-search {
  display: flex;
  gap: 8px;
  max-width: 580px;
  background: #fff;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.hero-search input,
.banner-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 10px 12px;
  font-size: 0.96rem;
  color: var(--text);
}

.hero-search button,
.banner-search button {
  flex-shrink: 0;
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 9px;
  cursor: pointer;
}

.hero-search button:hover,
.banner-search button:hover {
  background: var(--brand-dark);
}

.hero-hot-keys {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
}

.hot-keys-label {
  color: var(--muted);
}

.hero-hot-keys a {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #cbd5e1;
  color: var(--text-2);
  padding: 3px 10px;
  border-radius: 999px;
}

.hero-hot-keys a:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: #fff;
}

.hero-stats-card {
  background: var(--surface);
  border: 1px solid #dbeafe;
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-md);
}

.stats-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 16px;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.stat-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.stat-item strong {
  display: block;
  font-size: 1.35rem;
  color: var(--brand-dark);
  line-height: 1.25;
}

.stat-item span {
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Buttons */
.btn-primary,
.btn-primary-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover,
.btn-primary-block:hover {
  background: var(--brand-dark);
}

.btn-primary-block {
  width: 100%;
  margin-top: 12px;
}

.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brand);
  color: var(--brand);
  background: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-outline-sm:hover {
  background: var(--brand);
  color: #fff;
}

.btn-soft-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-soft-sm:hover {
  background: #bae6fd;
}

.btn-detail {
  display: inline-block;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: var(--brand-tint);
  color: var(--brand-dark);
  border: 1px solid #bae6fd;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-detail:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* Sections */
.section-block {
  padding: 40px 0;
}

.section-alt {
  background: #f1f5f9;
  border-top: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0 0 4px;
  font-size: 1.45rem;
  color: var(--text);
}

.section-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.section-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand);
}

.section-more:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* Featured Grid */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.featured-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.featured-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: var(--shadow-md);
}

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

.cat-chip {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--chip-color, var(--brand));
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}

.heat-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.badge-hot {
  background: #fef2f2;
  color: #dc2626;
}

.badge-warm {
  background: #fff7ed;
  color: #ea580c;
}

.badge-rise {
  background: #ecfeff;
  color: #0284c7;
}

.badge-classic {
  background: #f1f5f9;
  color: #475569;
}

.card-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  line-height: 1.4;
}

.card-title a:hover {
  color: var(--brand);
}

.card-tldr {
  margin: 0 0 16px;
  font-size: 0.91rem;
  color: var(--text-2);
  flex: 1;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

/* Main + Sidebar Layout */
.main-with-sidebar,
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 26px;
  align-items: start;
}

.cat-quick-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-pill {
  font-size: 0.83rem;
  padding: 4px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-2);
}

.tab-pill em {
  font-style: normal;
  color: var(--muted);
  margin-left: 3px;
}

.tab-pill:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Meme Row List */
.meme-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.meme-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-sm);
}

.meme-row:hover {
  border-color: #93c5fd;
}

.meme-row-main {
  flex: 1;
  min-width: 0;
}

.meme-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.meme-row-title {
  margin: 0 0 6px;
  font-size: 1.12rem;
  line-height: 1.4;
}

.meme-row-title a:hover {
  color: var(--brand);
}

.meme-row-excerpt {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: var(--text-2);
}

.meme-row-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
}

.tag-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-inline a {
  color: var(--brand-dark);
}

.tag-inline a:hover {
  text-decoration: underline;
}

.read-stat {
  color: var(--muted);
}

.meme-row-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.heat-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}

/* Sidebar Widgets */
.sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.side-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.widget-accent {
  background: linear-gradient(160deg, #ffffff 0%, #f0f9ff 100%);
  border-color: #bae6fd;
}

.widget-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.widget-head h3,
.widget-accent h3 {
  margin: 0;
  font-size: 1.02rem;
}

.widget-accent p {
  font-size: 0.88rem;
  color: var(--text-2);
  margin: 8px 0 12px;
}

.widget-head a {
  font-size: 0.83rem;
  color: var(--brand);
}

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

.rank-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rank-num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

.rank-1 { background: #ef4444; color: #fff; }
.rank-2 { background: #f97316; color: #fff; }
.rank-3 { background: #f59e0b; color: #fff; }
.rank-other { background: #e2e8f0; color: #475569; }

.rank-info {
  flex: 1;
  min-width: 0;
}

.rank-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-title:hover {
  color: var(--brand);
}

.rank-sub {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
}

.rank-score {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent);
}

.widget-tool-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-card-link {
  display: block;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: var(--radius-sm);
  padding: 11px 12px;
}

.tool-card-link:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.tool-card-link strong {
  display: block;
  font-size: 0.92rem;
  color: var(--brand-dark);
  margin-bottom: 2px;
}

.tool-card-link span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.tag-chip span {
  color: var(--muted);
  font-size: 0.75rem;
}

.tag-chip:hover,
.tag-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.tag-chip:hover span,
.tag-chip.active span {
  color: #e0f2fe;
}

.side-search {
  display: flex;
  gap: 6px;
}

.side-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.9rem;
}

.side-search button {
  border: none;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
}

.cat-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-side-list a {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-2);
}

.cat-side-list a:hover,
.cat-side-list a.active {
  background: var(--brand-tint);
  color: var(--brand-dark);
  font-weight: 600;
}

.cat-side-list em {
  font-style: normal;
  color: var(--muted);
}

/* Page Banner & Breadcrumb */
.page-banner {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border-bottom: 1px solid var(--border);
  padding: 28px 0 32px;
}

.page-banner h1 {
  margin: 6px 0 8px;
  font-size: 1.8rem;
  line-height: 1.3;
}

.banner-desc {
  margin: 0;
  color: var(--text-2);
  max-width: 720px;
  font-size: 0.96rem;
}

.banner-search {
  margin-top: 16px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.breadcrumb a:hover {
  color: var(--brand);
}

/* Article Detail */
.article-shell {
  padding: 28px 0 48px;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
}

.article-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.article-header h1 {
  margin: 0 0 18px;
  font-size: 1.85rem;
  line-height: 1.32;
}

.article-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 22px;
}

.fact-item span {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
}

.fact-item strong {
  font-size: 0.9rem;
  color: var(--text);
}

.tldr-box {
  background: var(--brand-tint);
  border: 1px solid #bae6fd;
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 26px;
}

.tldr-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.tldr-head strong {
  color: var(--brand-dark);
  font-size: 0.98rem;
}

.tldr-box p {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
  font-weight: 500;
}

.copy-btn {
  border: 1px solid #93c5fd;
  background: #fff;
  color: var(--brand-dark);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.copy-btn:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.article-body h2 {
  font-size: 1.24rem;
  margin: 26px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.article-body p {
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: 0.98rem;
  line-height: 1.85;
}

.examples-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 12px 0 18px;
}

.example-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
}

.example-scene {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand-dark);
  background: var(--brand-soft);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.example-quote {
  margin: 0 !important;
  color: var(--text) !important;
  font-weight: 500;
}

.tips-box {
  background: var(--accent-soft);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.tips-box p {
  margin: 0;
  color: #9a3412;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.tags-label {
  font-size: 0.86rem;
  color: var(--muted);
}

.related-section {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.related-section h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.related-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--bg);
}

.related-card:hover {
  border-color: var(--brand);
  background: #fff;
}

.rel-cat {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--brand);
  margin-bottom: 4px;
}

.related-card strong {
  display: block;
  font-size: 0.96rem;
  margin-bottom: 4px;
}

.related-card p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Rank Board */
.rank-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rank-board-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 150px;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.rb-pos {
  display: flex;
  justify-content: center;
}

.rb-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.rb-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.rb-title:hover {
  color: var(--brand);
}

.rb-tldr {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--text-2);
}

.rb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--muted);
}

.rb-meter {
  text-align: right;
}

.meter-score {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.meter-score em {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 500;
  margin-left: 2px;
}

.meter-bar {
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0 10px;
}

.meter-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
  border-radius: 999px;
}

/* Timeline */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-era {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.era-year {
  background: var(--brand);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  text-align: center;
  padding: 10px 8px;
  border-radius: var(--radius-md);
}

.era-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}

.era-card h2 {
  margin: 0 0 8px;
  font-size: 1.22rem;
}

.era-summary {
  margin: 0 0 14px;
  font-size: 0.94rem;
  color: var(--text-2);
}

.era-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.era-links a {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand-tint);
  border: 1px solid #bae6fd;
  color: var(--brand-dark);
  font-size: 0.86rem;
  font-weight: 600;
}

.era-links a:hover {
  background: var(--brand);
  color: #fff;
}

/* Tools Page */
.tool-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
}

.tool-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand-dark);
  background: var(--brand-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.tool-head h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.tool-head p {
  margin: 0 0 20px;
  color: var(--text-2);
  font-size: 0.94rem;
}

.quiz-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quiz-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 0;
  background: var(--bg);
}

.quiz-item legend {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 10px;
  padding: 0;
  float: left;
  width: 100%;
}

.quiz-options {
  clear: both;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.92rem;
}

.quiz-option:hover {
  border-color: var(--brand);
}

.quiz-option input {
  margin-top: 4px;
}

.quiz-item.is-correct {
  border-color: #22c55e;
  background: #f0fdf4;
}

.quiz-item.is-wrong {
  border-color: #ef4444;
  background: #fef2f2;
}

.quiz-explain {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 0.88rem;
  color: var(--text-2);
}

.quiz-explain a {
  color: var(--brand);
  font-weight: 600;
  margin-left: 6px;
}

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

.quiz-result {
  margin-top: 20px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f0f9ff 0%, #fff7ed 100%);
  border: 1px solid #bae6fd;
}

.quiz-result h3 {
  margin: 0 0 6px;
  color: var(--brand-dark);
}

.translator-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.translator-col label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.translator-col textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: inherit;
  font-size: 0.94rem;
  line-height: 1.6;
  resize: vertical;
}

.translator-col textarea[readonly] {
  background: var(--bg);
}

.translator-btns {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sub-heading {
  margin: 10px 0 12px;
  font-size: 1.12rem;
}

.slang-table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

.slang-table th,
.slang-table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
}

.slang-table th {
  background: var(--bg);
  color: var(--text-2);
  font-weight: 700;
}

.scene-pill {
  display: inline-block;
  font-size: 0.78rem;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* About / Empty / 404 */
.about-list {
  padding-left: 20px;
  color: var(--text-2);
}

.about-list li {
  margin-bottom: 10px;
}

.archive-meta {
  list-style: none;
  margin: 0;
  padding: 0;
}

.archive-meta li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.9rem;
}

.archive-meta li:last-child {
  border-bottom: none;
}

.archive-meta span {
  color: var(--muted);
}

.empty-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 38px 24px;
  text-align: center;
}

.nf-code {
  font-size: 3.4rem;
  font-weight: 900;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 10px;
}

.nf-hot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.result-summary {
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: 0.94rem;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 28px;
  padding: 42px 20px 32px;
}

.footer-logo-wrap {
  display: inline-block;
  background: #fff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.footer-desc,
.footer-note {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.7;
  color: #94a3b8;
}

.footer-col h3 {
  margin: 0 0 12px;
  font-size: 0.98rem;
  color: #f8fafc;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
}

.footer-col a:hover {
  color: #38bdf8;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 16px 0;
  font-size: 0.82rem;
  color: #94a3b8;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links {
  display: flex;
  gap: 14px;
}

.footer-links a:hover {
  color: #fff;
}

/* Responsive Breakpoints (verified down to 375px) */
@media (max-width: 1024px) {
  .header-search {
    display: none;
  }
  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 12px 16px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .main-nav.is-open {
    display: flex;
  }
  .nav-link {
    padding: 10px 12px;
  }
  .hero-inner,
  .main-with-sidebar,
  .about-grid,
  .translator-box {
    grid-template-columns: 1fr;
  }
  .rank-board-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .rb-meter {
    grid-column: 1 / -1;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .meter-bar {
    flex: 1;
    margin: 0;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 14px;
  }
  .header-inner {
    min-height: 60px;
  }
  .brand-logo {
    height: 36px;
  }
  .hero-section {
    padding: 28px 0 32px;
  }
  .hero-copy h1 {
    font-size: 1.55rem;
  }
  .hero-search,
  .banner-search {
    flex-direction: column;
    padding: 8px;
  }
  .hero-search button,
  .banner-search button {
    width: 100%;
  }
  .featured-grid,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .meme-row {
    flex-direction: column;
    align-items: stretch;
  }
  .meme-row-side {
    flex-direction: row;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
  }
  .article-card,
  .tool-panel {
    padding: 18px 16px;
  }
  .article-header h1,
  .page-banner h1 {
    font-size: 1.42rem;
  }
  .article-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .timeline-era {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .era-year {
    display: inline-block;
    width: auto;
    padding: 4px 14px;
  }
}
