/* ============================================================
   Merge VFX&CG — prototype stylesheet
   Palette: black_white_blue5_final (dark bg / white text / 5% blue accent)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;600;700;800&display=swap');

:root {
  --color-bg: #0F1418;
  --color-bg-subtle: #12171C;
  --color-surface: #1A2128;
  --color-border: #2B333B;
  --color-border-strong: #3A434C;
  --color-text: #FFFFFF;
  --color-text-muted: #B9C2C9;
  --color-text-faint: #7C8791;
  --color-accent: #4B9FD0;
  --color-accent-soft: rgba(75, 159, 208, 0.12);
  --color-accent-dark: #3A82B0;
  --color-accent-on: #06222F;

  --font-jp: "Noto Sans JP", "Inter", sans-serif;
  --font-en: "Inter", "Noto Sans JP", sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);

  --max-width: 1520px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-jp);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt";
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 20, 24, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 0.5px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 7px;
  overflow: hidden;
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; }

.logo-sub {
  display: block;
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-top: 1px;
}

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

.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--color-accent);
}

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

.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 0.5px solid var(--color-border);
  border-radius: 0;
  color: var(--color-text-faint);
  font-size: 13px;
  min-width: 200px;
  background: var(--color-surface);
  cursor: text;
}

.search-trigger svg { width: 15px; height: 15px; flex-shrink: 0; }
.search-trigger kbd {
  margin-left: auto;
  font-family: var(--font-en);
  font-size: 11px;
  border: 0.5px solid var(--color-border-strong);
  border-radius: 0;
  padding: 1px 5px;
  color: var(--color-text-faint);
  background: var(--color-bg);
}

.nav-toggle { display: none; }

/* The mobile-only search row lives inside .main-nav (see nav.js/search.js)
   so it's reachable from the hamburger dropdown; on desktop .main-nav is a
   plain inline row, so hide it there in favor of the .header-actions pill. */
.main-nav .search-trigger { display: none; }

/* ---------- Buttons / Chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 0;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-on);
}
.btn-primary:hover { background: var(--color-accent-dark); color: #fff; }

.btn-outline {
  background: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-text);
}
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 0;
  font-size: 12.5px;
  font-weight: 500;
  border: 0.5px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface);
  transition: all 0.15s ease;
}

.chip:hover { border-color: var(--color-text-muted); color: var(--color-text); }

.chip.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-on);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: 0.5px solid var(--color-border);
}

.tag-accent {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-color: transparent;
}

.badge-level {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 0;
  text-transform: uppercase;
  font-family: var(--font-en);
}
.badge-level.beginner { background: #16261d; color: #5fcf8a; }
.badge-level.intermediate { background: #2a2110; color: #e0ab48; }
.badge-level.advanced { background: #2a1616; color: #e07a7a; }

.stars {
  font-family: var(--font-en);
  color: var(--color-accent);
  font-size: 13px;
  letter-spacing: 1px;
}
.stars .dim { color: var(--color-border-strong); }

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

.hero {
  position: relative;
  padding: 140px 0 80px;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-bg);
  border-bottom: 0.5px solid var(--color-border);
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5) saturate(1.05);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(15,20,24,0.35) 0%, rgba(15,20,24,0.6) 45%, rgba(15,20,24,0.95) 100%),
    radial-gradient(circle at 15% 20%, rgba(75,159,208,0.14), transparent 45%);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 80%);
  opacity: 0.5;
}

.hero .container { position: relative; z-index: 3; }

.hero-credit {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 16px;
  font-size: 11px;
  font-family: var(--font-en);
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.55);
}

.hero h1 {
  font-size: clamp(18px, 2.6vw, 28px);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  max-width: 820px;
  white-space: nowrap;
  color: var(--color-text);
}

/* True small-phone widths only — everything above this (including a
   non-maximized laptop window) keeps the tagline on one line. */
@media (max-width: 480px) {
  .hero h1 { white-space: normal; }
}

.hero h1 em {
  font-style: normal;
  color: var(--color-accent);
}

.hero p.lead {
  font-size: 16.5px;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 0 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

/* ---------- Sections ---------- */

.section {
  padding: 72px 0;
}
.section.subtle { background: var(--color-bg-subtle); border-top: 0.5px solid var(--color-border); border-bottom: 0.5px solid var(--color-border); }

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

.section-head .eyebrow {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
  display: block;
}

.section-head h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.section-head p {
  color: var(--color-text-muted);
  font-size: 14.5px;
  margin: 8px 0 0;
}

.section-head .link-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.section-head .link-more:hover { color: var(--color-accent); }
.section-head .link-more svg { width: 15px; height: 15px; }

/* ---------- Start here: hub/guide cards (visually distinct from entry-card) ---------- */

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.hub-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: linear-gradient(150deg, var(--color-accent-soft), var(--color-surface) 60%);
  border: 0.5px solid var(--color-border-strong);
  transition: border-color 0.18s ease;
}
.hub-card:hover { border-color: var(--color-accent); }
.hub-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  font-family: var(--font-en);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  background: rgba(15, 20, 24, 0.5);
  border: 0.5px solid var(--color-accent);
  padding: 4px 9px;
}
.hub-badge svg { width: 11px; height: 11px; }
.hub-card h3 { font-size: 16.5px; font-weight: 700; margin: 0; color: var(--color-text); line-height: 1.5; }
.hub-card p { font-size: 13px; color: var(--color-text-muted); margin: 0; flex: 1; }
.hub-card .hub-meta { font-size: 12px; color: var(--color-text-faint); font-family: var(--font-en); }

/* ---------- Category grid ---------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.category-card {
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px;
  background: var(--color-surface);
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.category-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.category-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-icon svg { width: 19px; height: 19px; }

.category-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
}
.category-card .count {
  font-size: 12.5px;
  color: var(--color-text-faint);
  font-family: var(--font-en);
}

/* ---------- Entry cards ---------- */

.entry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.related-posts-section {
  margin: 8px 0 64px;
  padding-top: 40px;
  border-top: 0.5px solid var(--color-border);
}
.related-posts-section h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 6px;
}
.related-posts-lead {
  font-size: 13px;
  color: var(--color-text-faint);
  margin: 0 0 20px;
}
.related-posts-grid { grid-template-columns: repeat(4, 1fr); }
.related-posts-grid .entry-card.is-more-hidden { display: none; }
.related-posts-more {
  display: block;
  margin: 24px auto 0;
  padding: 10px 28px;
  border: 0.5px solid var(--color-border-strong);
  border-radius: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.related-posts-more:hover { border-color: var(--color-accent); color: var(--color-text); }

.entry-card {
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
}

.entry-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-strong);
  transform: translateY(-3px);
}

.entry-thumb {
  aspect-ratio: 16/9;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 12px;
}

.entry-thumb svg {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 22px;
  height: 22px;
  color: rgba(255,255,255,0.9);
}

.entry-thumb .badge-level {
  background: rgba(15,20,24,0.75);
  backdrop-filter: blur(4px);
}

.entry-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* thumbnail gradient variants (placeholder art per category) */
.thumb-modeling   { background: linear-gradient(135deg, #556270 0%, #2f3945 100%); }
.thumb-surfacing  { background: linear-gradient(135deg, #c98f2b 0%, #6b4a1a 100%); }
.thumb-lighting   { background: linear-gradient(135deg, #4b9fd0 0%, #1c4a66 100%); }
.thumb-comp       { background: linear-gradient(135deg, #4a5a8a 0%, #1c223a 100%); }
.thumb-sim        { background: linear-gradient(135deg, #2e9e7a 0%, #12403a 100%); }
.thumb-rigging    { background: linear-gradient(135deg, #8b7ed8 0%, #3c3466 100%); }
.thumb-pipeline   { background: linear-gradient(135deg, #3a4048 0%, #14171b 100%); }
.thumb-shoot      { background: linear-gradient(135deg, #b6603f 0%, #5a2c1a 100%); }
.thumb-industry   { background: linear-gradient(135deg, #5a72b0 0%, #232c4a 100%); }
.thumb-resource   { background: linear-gradient(135deg, #c98f2b 0%, #4a3410 100%); }
.thumb-reel       { background: linear-gradient(135deg, #8b7ed8 0%, #3a2c66 60%, #191233 100%); }
.thumb-environment { background: linear-gradient(135deg, #7a8c5e 0%, #2f3a26 100%); }
.thumb-article    { background: linear-gradient(135deg, #5a6b85 0%, #1c222b 100%); }
.thumb-website    { background: linear-gradient(135deg, #2fa8a0 0%, #123f3c 100%); }
.thumb-tips       { background: linear-gradient(135deg, #d0a02f 0%, #4a3510 100%); }
.thumb-tutorial   { background: linear-gradient(135deg, #4b9fd0 0%, #123650 100%); }
.thumb-daily-analysis { background: linear-gradient(135deg, #d8608b 0%, #4a1530 100%); }
.thumb-art-of-composition { background: linear-gradient(135deg, #6f8fd8 0%, #1e2a4d 100%); }

.entry-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.entry-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.entry-category {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-en);
}

.entry-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  line-height: 1.5;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-summary {
  font-size: 13.5px;
  color: var(--color-text-muted);
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.entry-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 0.5px solid var(--color-border);
  font-size: 12px;
  color: var(--color-text-faint);
}

/* ---------- Newsletter / CTA band ---------- */

.cta-band {
  border-radius: var(--radius-lg);
  background: var(--color-accent);
  color: var(--color-accent-on);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-band h3 { font-size: 22px; margin: 0 0 8px; font-weight: 800; color: var(--color-accent-on); }
.cta-band p { margin: 0; color: rgba(6,34,47,0.72); font-size: 14.5px; max-width: 420px; }
.cta-band .btn-primary { background: var(--color-accent-on); color: #fff; }
.cta-band .btn-primary:hover { background: #0a3244; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 0.5px solid var(--color-border);
  padding: 56px 0 32px;
  background: var(--color-bg-subtle);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: 13.5px;
  color: var(--color-text-muted);
  max-width: 280px;
  margin: 14px 0 0;
}

.footer-disclaimer-note {
  font-size: 12px;
  color: var(--color-text-faint);
  max-width: 300px;
  margin: 10px 0 0;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  text-transform: uppercase;
  margin: 0 0 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 13.5px; color: var(--color-text-muted); }
.footer-col a:hover { color: var(--color-accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 0.5px solid var(--color-border);
  font-size: 12.5px;
  color: var(--color-text-faint);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-faint);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb .sep { color: var(--color-border-strong); }
.breadcrumb .current { color: var(--color-text-muted); }

/* ---------- Archive page: toolbar + filters ---------- */

.archive-head {
  padding: 48px 0 32px;
  border-bottom: 0.5px solid var(--color-border);
  background: var(--color-bg-subtle);
}

.archive-head h1 { font-size: 30px; margin: 0 0 10px; font-weight: 800; color: var(--color-text); }
.archive-head p { color: var(--color-text-muted); margin: 0; font-size: 14.5px; }

.search-bar-lg {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 0.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: 13px 18px;
  max-width: 560px;
  box-shadow: var(--shadow-sm);
}
.search-bar-lg svg { width: 18px; height: 18px; color: var(--color-text-faint); flex-shrink: 0; }
.search-bar-lg input {
  border: none;
  outline: none;
  font-size: 14.5px;
  width: 100%;
  font-family: var(--font-jp);
  background: transparent;
  color: var(--color-text);
}
.search-bar-lg input::placeholder { color: var(--color-text-faint); }

.archive-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 44px 0 80px;
  align-items: start;
}

.filter-panel {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.filter-group h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin: 0 0 12px;
}

.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  font-size: 13.5px;
  color: var(--color-text-muted);
  cursor: pointer;
}
.filter-option:hover { color: var(--color-text); }
.filter-option .n { font-family: var(--font-en); font-size: 12px; color: var(--color-text-faint); }
.filter-option.is-active { color: var(--color-accent); font-weight: 600; }

.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.archive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.result-count { font-size: 13.5px; color: var(--color-text-muted); }
.result-count strong { color: var(--color-text); }

.sort-select {
  font-size: 13.5px;
  border: 0.5px solid var(--color-border);
  border-radius: 0;
  padding: 8px 12px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  font-family: var(--font-jp);
}

.pagination-wrap {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.pagination-range { font-size: 12.5px; color: var(--color-text-faint); }

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.pagination a,
.pagination span.ellipsis {
  min-width: 36px; height: 36px; padding: 0 8px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0;
  border: 0.5px solid var(--color-border);
  font-size: 13.5px;
  font-family: var(--font-en);
  font-weight: 600;
  color: var(--color-text-muted);
}
.pagination a:hover { border-color: var(--color-accent); color: var(--color-text); }
.pagination span.ellipsis { border-color: transparent; color: var(--color-text-faint); }
.pagination a.is-active { background: var(--color-accent); color: var(--color-accent-on); border-color: var(--color-accent); }
.pagination a.next {
  display: flex; align-items: center; gap: 6px;
  width: auto; padding: 0 14px;
  color: var(--color-text);
}
.pagination a.next svg { width: 14px; height: 14px; }

/* ---------- Entry detail page ---------- */

.entry-hero {
  padding: 44px 0 0;
}

.entry-hero .category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 6px 14px;
  border-radius: 0;
  margin-bottom: 18px;
  font-family: var(--font-en);
  letter-spacing: 0.03em;
}

.entry-hero h1 {
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 800;
  line-height: 1.45;
  margin: 0 0 20px;
  max-width: 800px;
  color: var(--color-text);
}

.entry-meta-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  margin-bottom: 36px;
  border-bottom: 0.5px solid var(--color-border);
  font-size: 13.5px;
  color: var(--color-text-muted);
}

.entry-meta-bar .meta-item { display: flex; align-items: center; gap: 6px; }
.entry-meta-bar svg { width: 15px; height: 15px; color: var(--color-text-faint); }

.entry-detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding-bottom: 80px;
  align-items: start;
}

.entry-hero-thumb {
  aspect-ratio: 21/9;
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 0.5px solid var(--color-border);
}
/* When a real image is present, size the box to the image's own aspect
   ratio instead of forcing a fixed crop — the fallback (icon/gradient only,
   no <img>) keeps the fixed 21:9 box above. */
.entry-hero-thumb:has(img) {
  aspect-ratio: auto;
}
.entry-hero-thumb svg { width: 48px; height: 48px; color: rgba(255,255,255,0.85); }
.entry-hero-thumb img { width: 100%; height: auto; display: block; }

/* ---------- Multi-image gallery switcher (main viewer + thumbnail row) ---------- */

.entry-hero-thumb:has(+ .gallery-thumbs) { margin-bottom: 12px; }

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 0 0 40px;
}
.gallery-thumbs a {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
}
.gallery-thumbs a.is-active { border-color: var(--color-accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Lightbox (see lightbox.js): click-to-zoom on the hero image / inline body images. */
main .entry-hero-thumb > img,
main .prose img {
  cursor: zoom-in;
}
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 12, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  padding: 40px;
}
.lightbox-overlay.is-open { opacity: 1; visibility: visible; }
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  cursor: default;
}
.lightbox-caption {
  margin-top: 16px;
  color: var(--color-text-muted);
  font-size: 13px;
  max-width: 80vw;
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
}
body.lightbox-locked { overflow: hidden; }

.prose h2 {
  font-size: 19px;
  font-weight: 800;
  margin: 40px 0 16px;
  color: var(--color-text);
}
.prose p { font-size: 15px; color: var(--color-text-muted); margin: 0 0 16px; }
.prose ul { margin: 0 0 20px; padding-left: 22px; }
.prose ul li { font-size: 15px; color: var(--color-text-muted); margin-bottom: 10px; padding-left: 4px; }
.prose ul li::marker { color: var(--color-accent); }

.video-embed {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 0.5px solid var(--color-border);
  margin: 32px 0;
  background: var(--color-surface);
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.content-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0 32px;
}

.content-image figure {
  margin: 0;
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
}

.content-image img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  object-position: top;
  display: block;
}

.content-image figcaption {
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--color-text-faint);
  border-top: 0.5px solid var(--color-border);
}

@media (max-width: 680px) {
  .content-image-grid { grid-template-columns: 1fr; }
}
.prose p.lead-summary {
  font-size: 16.5px;
  color: var(--color-text);
  border-left: 3px solid var(--color-accent);
  padding-left: 18px;
}

.memo-box {
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  margin: 24px 0 32px;
}
.memo-box .memo-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  font-family: var(--font-en);
}
.memo-box .memo-label svg { width: 15px; height: 15px; }
.memo-box p { font-size: 14.5px; color: var(--color-text-muted); margin: 0 0 10px; }
.memo-box p:last-child { margin-bottom: 0; }

.source-link-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 32px 0;
  flex-wrap: wrap;
  background: var(--color-surface);
}
.source-link-box .url {
  font-family: var(--font-en);
  font-size: 13px;
  color: var(--color-text-muted);
  word-break: break-all;
}
.source-link-box .label { font-size: 13px; color: var(--color-text-faint); margin-bottom: 4px; }

.source-link-item { margin: 32px 0; }
.source-link-item .source-link-box { margin: 12px 0 0; }
.source-link-divider { border: none; border-top: 0.5px solid var(--color-border); margin: 40px 0 0; }
.source-link-image {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--color-border);
}

.sidebar-box {
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 20px;
  background: var(--color-surface);
}
.sidebar-box h4 {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  margin: 0 0 14px;
}

.related-mini {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 0.5px solid var(--color-border);
}
.related-mini:first-of-type { border-top: none; padding-top: 0; }
.related-thumb {
  width: 52px; height: 52px;
  border-radius: 8px;
  flex-shrink: 0;
}
.related-mini h5 { font-size: 13px; margin: 0 0 4px; font-weight: 600; line-height: 1.4; color: var(--color-text); }
.related-mini .cat { font-size: 11px; color: var(--color-text-faint); }

/* ---------- Ad slot placeholder ---------- */

.ad-slot {
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  color: var(--color-text-faint);
  font-size: 12px;
  text-align: center;
  padding: 18px;
  background: repeating-linear-gradient(45deg, #12171c, #12171c 10px, #171d23 10px, #171d23 20px);
}

/* ---------- Responsive ---------- */

@media (max-width: 1240px) {
  .entry-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 960px) {
  .entry-detail-layout { grid-template-columns: 1fr; }
  .archive-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .entry-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .main-nav, .search-trigger { display: none; }
  .nav-toggle {
    display: flex;
    width: 38px; height: 38px;
    align-items: center; justify-content: center;
    border: 0.5px solid var(--color-border);
    border-radius: 0;
    cursor: pointer;
    background: transparent;
    color: var(--color-text);
  }
  .nav-toggle.is-open { border-color: var(--color-accent); color: var(--color-accent); }
  .hero { padding: 56px 0 48px; min-height: 440px; }
  .section { padding: 52px 0; }
  .entry-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .hub-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 32px; }

  /* Mobile nav dropdown (see nav.js). .main-nav is hidden above; when
     .nav-toggle is clicked, nav.js adds .is-open and it reappears here as a
     panel instead of the desktop inline row. */
  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    background: var(--color-bg-subtle);
    border-bottom: 0.5px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: 4px 24px 12px;
    z-index: 60;
  }
  .main-nav.is-open a {
    padding: 14px 2px;
    border-top: 0.5px solid var(--color-border);
    font-size: 15px;
  }
  .main-nav.is-open a:first-child { border-top: none; }

  /* The header's search pill is hidden on mobile (rule above); reuse the
     same .search-trigger class/JS as a full-width row inside the nav panel
     instead, so search is still reachable without a keyboard. */
  .main-nav .search-trigger {
    display: flex;
    width: 100%;
    min-width: 0;
    border: none;
    border-top: 0.5px solid var(--color-border);
    border-radius: 0;
    background: none;
    padding: 14px 2px;
    font-size: 15px;
    color: var(--color-text-faint);
    cursor: pointer;
  }
  .main-nav .search-trigger kbd { display: none; }
}

/* ---------- Search modal (⌘K / Ctrl+K, or the header search pill) — see search.js ---------- */

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 12, 0.72);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
  padding: 12vh 20px 40px;
}
.search-overlay.is-open { opacity: 1; visibility: visible; }

.search-modal {
  width: 100%;
  max-width: 560px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 0.5px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.search-modal-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 0.5px solid var(--color-border);
  flex-shrink: 0;
}
.search-modal-bar svg { width: 17px; height: 17px; color: var(--color-text-faint); flex-shrink: 0; }
.search-modal-bar input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--color-text);
  font-size: 15px;
  font-family: var(--font-jp);
}
.search-modal-bar input::placeholder { color: var(--color-text-faint); }
.search-modal-bar kbd {
  font-family: var(--font-en);
  font-size: 11px;
  border: 0.5px solid var(--color-border-strong);
  border-radius: 0;
  padding: 2px 6px;
  color: var(--color-text-faint);
  flex-shrink: 0;
}

.search-modal-results {
  overflow-y: auto;
  flex: 1;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 0.5px solid var(--color-border);
  font-size: 14px;
  color: var(--color-text);
}
.search-modal-results a.search-result:last-child { border-bottom: none; }
.search-result:hover,
.search-result.is-active { background: var(--color-accent-soft); }
.search-result-cat {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-family: var(--font-en);
}
.search-result-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-modal-status {
  padding: 12px 18px;
  font-size: 12.5px;
  color: var(--color-text-faint);
  border-top: 0.5px solid var(--color-border);
  flex-shrink: 0;
}

body.search-locked { overflow: hidden; }

@media (max-width: 680px) {
  .search-overlay { padding: 0; align-items: stretch; }
  .search-modal { max-width: none; max-height: none; height: 100%; border-radius: 0; border: none; }
}
