/* ==========================================================================
   Mulala Online Wiki — Dark Medieval Fantasy Stylesheet
   Weathered stone, forged iron, burnished gold trim, torch warmth.
   Mobile-first responsive design (375px phone -> 1280px+ desktop).
   ========================================================================== */

:root {
  --bg-abyss: #0c0a08;
  --bg-stone: #14110e;
  --bg-panel: #1c1814;
  --bg-card: #231e19;
  --bg-card-hover: #2c251f;
  --bg-elevated: #2e2720;

  --iron-dark: #2a231c;
  --iron-border: #3d3328;
  --iron-light: #544738;

  --gold-dim: #8c6f32;
  --gold: #c9a24a;
  --gold-bright: #e6c46e;
  --gold-glow: rgba(201, 162, 74, 0.22);

  --torch: #d97724;
  --torch-bright: #f59e0b;
  --crimson: #b93829;
  --crimson-bg: rgba(185, 56, 41, 0.18);

  --text-main: #ede4d3;
  --text-body: #d4c8b4;
  --text-muted: #9c8f7a;
  --text-dim: #706554;

  --clr-exc: #4ade80;
  --clr-anc: #2dd4bf;
  --clr-sock: #c084fc;
  --clr-opt: #60a5fa;
  --clr-rare: #facc15;

  --rarity-common: #86efac;
  --rarity-mid: #93c5fd;
  --rarity-rare: #fca5a5;

  --font-serif: 'Cinzel', Georgia, serif;
  --font-thai: 'Noto Sans Thai', 'Sarabun', system-ui, -apple-system, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 6px 20px rgba(0, 0, 0, 0.55);
  --shadow-gold: 0 0 18px rgba(201, 162, 74, 0.18);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-abyss);
  color: var(--text-main);
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-thai);
  font-size: 0.96875rem; /* 15.5px minimum readable Thai body */
  line-height: 1.65;
  color: var(--text-body);
  background:
    radial-gradient(circle at 50% 0%, rgba(217, 119, 36, 0.10) 0%, transparent 55%),
    linear-gradient(180deg, #120f0c 0%, #0c0a08 100%);
  overflow-x: hidden;
}

a {
  color: var(--gold-bright);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #fff3d1;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Sticky Header & Global Search
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 17, 14, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--iron-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  min-height: 44px;
}

.brand-emblem {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #3a2d1b 0%, #1d160e 100%);
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 8px rgba(201, 162, 74, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--gold-bright);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  line-height: 1.15;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #d9822b 0%, #9e4816 100%);
  border: 1px solid #f3b562;
  color: #fff8eb;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 2px 12px rgba(217, 119, 36, 0.4);
  transition: transform 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}

.btn-play:hover {
  color: #ffffff;
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.header-search-wrap {
  position: relative;
  order: 3;
  width: 100%;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-abyss);
  border: 1px solid var(--iron-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-box:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-glow);
}

.search-icon {
  padding-left: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  min-height: 42px;
  padding: 6px 36px 6px 10px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-thai);
  font-size: 0.94rem;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-clear {
  position: absolute;
  right: 6px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.search-clear:hover {
  color: var(--text-main);
  background: var(--iron-border);
}

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--bg-panel);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
  z-index: 150;
  padding: 8px;
}

.search-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  padding: 6px 10px 4px;
  border-bottom: 1px solid var(--iron-dark);
  margin-top: 4px;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  min-height: 44px;
}

.search-item:hover {
  background: var(--bg-card-hover);
}

.search-item-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.site-nav {
  background: linear-gradient(180deg, #191511 0%, #13100d 100%);
  border-top: 1px solid rgba(201, 162, 74, 0.15);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nav-inner::-webkit-scrollbar {
  display: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 13px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-link.active {
  color: var(--gold-bright);
  border-bottom-color: var(--gold-bright);
  background: linear-gradient(180deg, transparent 0%, rgba(201, 162, 74, 0.12) 100%);
}

/* ==========================================================================
   Main Container & Common Section Primitives
   ========================================================================== */
.wiki-main {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.page-header {
  background: linear-gradient(135deg, rgba(44, 37, 31, 0.85) 0%, rgba(24, 20, 16, 0.92) 100%);
  border: 1px solid var(--iron-border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.page-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gold-bright);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.page-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

/* ==========================================================================
   Hero Banner (Home Page)
   ========================================================================== */
.hero-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gold-dim);
  background:
    linear-gradient(135deg, rgba(16, 13, 10, 0.92) 0%, rgba(28, 23, 18, 0.82) 55%, rgba(16, 13, 10, 0.95) 100%),
    url('/assets/bg-charsel.jpg') center/cover no-repeat;
  padding: 28px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card), var(--shadow-gold);
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: rgba(201, 162, 74, 0.14);
  border: 1px solid rgba(201, 162, 74, 0.4);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.hero-title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 1.85rem;
  line-height: 1.2;
  color: #fff6df;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.hero-desc {
  margin: 0 0 20px;
  max-width: 720px;
  font-size: 1rem;
  color: var(--text-body);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #e08b32 0%, #a44914 100%);
  border: 1px solid #f7c379;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(217, 119, 36, 0.45);
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(1.1);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  background: rgba(35, 30, 25, 0.9);
  border: 1px solid var(--gold-dim);
  color: var(--gold-bright);
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold-bright);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-pill {
  background: rgba(15, 12, 10, 0.78);
  border: 1px solid var(--iron-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.stat-pill-val {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-bright);
}

.stat-pill-lbl {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Filter Bar & Controls
   ========================================================================== */
.filter-bar {
  background: var(--bg-panel);
  border: 1px solid var(--iron-border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

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

.filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
}

.filter-input,
.filter-select {
  width: 100%;
  min-height: 42px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-abyss);
  border: 1px solid var(--iron-border);
  color: var(--text-main);
  font-family: var(--font-thai);
  font-size: 0.92rem;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--gold);
}

.pill-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pill-tab {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  border: 1px solid var(--iron-border);
  color: var(--text-body);
  font-family: var(--font-thai);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-tab:hover {
  border-color: var(--gold-dim);
  color: var(--text-main);
}

.pill-tab.active {
  background: linear-gradient(180deg, #3a2d1b 0%, #241c12 100%);
  border-color: var(--gold);
  color: var(--gold-bright);
  box-shadow: 0 0 12px rgba(201, 162, 74, 0.2);
}

.result-count {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ==========================================================================
   Grids & Cards
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.wiki-card {
  background: var(--bg-card);
  border: 1px solid var(--iron-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

a.wiki-card:hover,
.wiki-card.clickable:hover {
  border-color: var(--gold);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.card-sub {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Sprites, Icons & Neutral Placeholders
   ========================================================================== */
.sprite-box {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: radial-gradient(circle, #2b241d 0%, #14110e 100%);
  border: 1px solid var(--iron-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
}

.sprite-box.lg {
  width: 112px;
  height: 112px;
  padding: 8px;
}

.sprite-box.sm {
  width: 44px;
  height: 44px;
  padding: 4px;
}

.sprite-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: auto;
}

.asset-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.02) 6px,
    rgba(201, 162, 74, 0.05) 6px,
    rgba(201, 162, 74, 0.05) 12px
  );
  color: var(--gold-dim);
  font-family: var(--font-serif);
  font-size: 0.72rem;
  text-align: center;
  line-height: 1.1;
  padding: 2px;
  user-select: none;
}

.asset-placeholder-glyph {
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 2px;
}

/* ==========================================================================
   Tags & Badges
   ========================================================================== */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--bg-abyss);
  border: 1px solid var(--iron-border);
  color: var(--text-body);
}

.badge-lv {
  background: rgba(201, 162, 74, 0.12);
  border-color: var(--gold-dim);
  color: var(--gold-bright);
}

.badge-boss {
  background: var(--crimson-bg);
  border-color: var(--crimson);
  color: #fca5a5;
}

.badge-golden {
  background: rgba(250, 204, 21, 0.16);
  border-color: #eab308;
  color: #fde047;
}

.badge-anc {
  background: rgba(45, 212, 191, 0.14);
  border-color: #14b8a6;
  color: var(--clr-anc);
}

.badge-rare {
  background: rgba(192, 132, 252, 0.16);
  border-color: #a855f7;
  color: #e9d5ff;
}

.rarity-บ่อย {
  color: var(--rarity-common);
  border-color: rgba(134, 239, 172, 0.35);
}

.rarity-ปานกลาง {
  color: var(--rarity-mid);
  border-color: rgba(147, 197, 253, 0.35);
}

.rarity-หายาก {
  color: var(--rarity-rare);
  border-color: rgba(252, 165, 165, 0.35);
}

/* ==========================================================================
   Stat Key-Value Grids & Tables
   ========================================================================== */
.kv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.kv-box {
  background: rgba(12, 10, 8, 0.65);
  border: 1px solid var(--iron-dark);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.kv-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: block;
}

.kv-val {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.95rem;
}

.wiki-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--iron-border);
}

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

.wiki-table th,
.wiki-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--iron-dark);
  vertical-align: top;
}

.wiki-table th {
  background: var(--bg-abyss);
  color: var(--gold-bright);
  font-weight: 600;
  white-space: nowrap;
}

.wiki-table tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   Detail Layouts (Monster Detail, Map Detail, Guide Layout)
   ========================================================================== */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.detail-panel {
  background: var(--bg-card);
  border: 1px solid var(--iron-border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.section-heading {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  color: var(--gold-bright);
  border-bottom: 1px solid var(--iron-border);
  padding-bottom: 8px;
}

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

.item-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-panel);
  border: 1px solid var(--iron-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.88rem;
  min-height: 40px;
}

.item-chip:hover {
  border-color: var(--gold);
}

/* Guide Sidebar + Content */
.guide-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.guide-nav-list {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  padding-bottom: 6px;
}

.guide-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  border: 1px solid var(--iron-border);
  color: var(--text-body);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.guide-nav-btn.active {
  background: linear-gradient(90deg, rgba(201, 162, 74, 0.2) 0%, rgba(35, 30, 25, 0.9) 100%);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.guide-text {
  white-space: pre-line;
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--text-body);
  margin-bottom: 18px;
}

/* FAQ Accordion / Cards */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--iron-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.faq-q {
  margin: 0 0 8px;
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--gold-bright);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.faq-a {
  margin: 0;
  color: var(--text-body);
  font-size: 0.95rem;
}

/* Loading & Empty States */
.loading-state,
.empty-state {
  text-align: center;
  padding: 48px 20px;
  background: var(--bg-panel);
  border: 1px solid var(--iron-border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  border: 3px solid var(--iron-border);
  border-top-color: var(--gold-bright);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #0e0b09;
  border-top: 1px solid var(--iron-border);
  padding: 28px 16px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
}

.footer-title {
  font-family: var(--font-serif);
  color: var(--gold);
  letter-spacing: 0.05em;
}

.footer-brand p {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.9rem;
}

/* ==========================================================================
   Responsive Breakpoints (Tablet 640px+ / Desktop 960px+ & 1280px)
   ========================================================================== */
@media (min-width: 640px) {
  .stats-strip {
    grid-template-columns: repeat(4, 1fr);
  }

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

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

  .kv-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 960px) {
  .header-inner {
    flex-wrap: nowrap;
    padding: 12px 24px;
  }

  .header-search-wrap {
    order: 2;
    max-width: 440px;
  }

  .header-actions {
    order: 3;
  }

  .wiki-main {
    padding: 28px 24px 64px;
  }

  .hero-banner {
    padding: 40px 36px;
  }

  .hero-title {
    font-size: 2.35rem;
  }

  .filter-bar {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

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

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

  .detail-layout {
    grid-template-columns: 340px 1fr;
    align-items: start;
  }

  .guide-layout {
    grid-template-columns: 270px 1fr;
    align-items: start;
  }

  .guide-nav-list {
    flex-direction: column;
    overflow-x: visible;
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
  }
}
