/* ==========================================================================
   玄斎マガ（GENSAI MAGA）— Editorial Design System
   Inspired by ガジェマガ (2week.net) × SWELL / AFFINGER × Hiroshima Vermilion
   ========================================================================== */

:root {
  /* Editorial Light Mode (Default: Hard-boiled Monochrome × Itsukushima Vermilion) */
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef1f6;
  --header-bg: #111318;
  --header-surface: #1b1f29;
  --header-text: #f8fafc;
  --header-muted: #9aa4b6;

  --ink: #111318;
  --ink-body: #252a34;
  --ink-muted: #647084;
  --ink-dim: #8a94a6;

  --border: #e2e6ee;
  --border-soft: #edf0f5;
  --border-strong: #111318;

  --accent: #d91e36;
  --accent-hover: #b8152b;
  --accent-soft: rgba(217, 30, 54, 0.08);
  --accent-border: rgba(217, 30, 54, 0.32);

  --ok: #0d9468;
  --ok-soft: rgba(13, 148, 104, 0.1);
  --ok-border: rgba(13, 148, 104, 0.32);

  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, 0.1);

  --marker: linear-gradient(transparent 58%, rgba(255, 224, 71, 0.78) 58%);
  --marker-red: linear-gradient(transparent 58%, rgba(217, 30, 54, 0.22) 58%);

  --shadow-xs: 0 1px 2px rgba(17, 19, 24, 0.04);
  --shadow-sm: 0 2px 8px rgba(17, 19, 24, 0.05);
  --shadow-md: 0 10px 28px rgba(17, 19, 24, 0.08);
  --shadow-lg: 0 22px 50px rgba(17, 19, 24, 0.16);

  /* Store Brand Colors (Kaereba / Moshimo Style) */
  --store-amazon: #f59e0b;
  --store-amazon-hover: #d97706;
  --store-rakuten: #bf0000;
  --store-rakuten-hover: #990000;
  --store-yahoo: #ff0033;
  --store-yahoo-hover: #d4002a;
  --store-official: #111318;
  --store-official-hover: #2c313f;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --max-w: 1180px;
  --sidebar-w: 320px;

  --font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", "Noto Sans JP", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #0b0d12;
  --surface: #131720;
  --surface-2: #191f2b;
  --surface-3: #222938;
  --header-bg: #080a0e;
  --header-surface: #141923;
  --header-text: #f8fafc;
  --header-muted: #94a3b8;

  --ink: #f3f5f8;
  --ink-body: #d3dbe7;
  --ink-muted: #94a3b8;
  --ink-dim: #64748b;

  --border: #242c3c;
  --border-soft: rgba(255, 255, 255, 0.07);
  --border-strong: #434f67;

  --accent: #ef233c;
  --accent-hover: #ff3c54;
  --accent-soft: rgba(239, 35, 60, 0.14);
  --accent-border: rgba(239, 35, 60, 0.42);

  --ok: #10b981;
  --ok-soft: rgba(16, 185, 129, 0.14);
  --ok-border: rgba(16, 185, 129, 0.38);

  --marker: linear-gradient(transparent 58%, rgba(239, 35, 60, 0.42) 58%);
  --marker-red: linear-gradient(transparent 58%, rgba(239, 35, 60, 0.45) 58%);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.38);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.65);

  --store-official: #2a3244;
  --store-official-hover: #3b465e;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-body);
  font-family: var(--font-sans);
  line-height: 1.82;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

button, input {
  font-family: inherit;
}

img, svg { max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

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

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #ff5c72);
  z-index: 200;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ==========================================================================
   2-Tier Magazine Header (ガジェマガ硬派スタイル)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  box-shadow: var(--shadow-sm);
}

.header-top {
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  padding: 6px 0;
  color: var(--header-text);
  cursor: pointer;
  text-align: left;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #1a1e28;
  border: 1px solid rgba(239, 35, 60, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-en {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  background: var(--accent);
  padding: 2px 6px;
  border-radius: 3px;
}
.brand-tagline {
  font-size: 0.72rem;
  color: var(--header-muted);
  margin-top: 2px;
}

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--header-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--header-text);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover {
  background: #252b39;
  border-color: rgba(255, 255, 255, 0.25);
}

.yt-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.yt-header-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Global Category Sub-Nav */
.header-nav-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.global-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.global-nav::-webkit-scrollbar { display: none; }

.gnav-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 0.84rem;
  font-weight: 800;
  padding: 12px 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease;
}
.gnav-btn:hover { color: var(--ink); }
.gnav-btn.active { color: var(--ink); }
.gnav-btn.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
}

.gnav-pill-count {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-muted);
}

/* Views */
.view { display: none; }
.view.active { display: block; }

/* ==========================================================================
   Announcement Ticker / Top Strip
   ========================================================================== */
.info-ticker {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.ticker-inner::-webkit-scrollbar { display: none; }

.ticker-badge {
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 3px;
  flex-shrink: 0;
}
[data-theme="dark"] .ticker-badge {
  background: var(--accent);
  color: #fff;
}

.ticker-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}
.ticker-link:hover { color: var(--accent); text-decoration: underline; }

/* ==========================================================================
   Editorial Pick-Up Hero (Top Magazine Front)
   ========================================================================== */
.pickup-section {
  padding: 24px 0 8px;
}

.pickup-grid {
  display: grid;
  grid-template-columns: 1.48fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.featured-hero-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}
.featured-hero-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-border);
}

.featured-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d1017;
  overflow: hidden;
}
.featured-thumb-wrap img,
.featured-thumb-wrap svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.featured-hero-card:hover .featured-thumb-wrap img,
.featured-hero-card:hover .featured-thumb-wrap svg {
  transform: scale(1.03);
}

/* Editorial Photo Overlay Card (ガジェマガ風 写真×極太バッジ) */
.photo-thumb-box {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0d1017;
  overflow: hidden;
}
.photo-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.photo-thumb-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 18, 0.08) 0%, rgba(10, 12, 18, 0.25) 48%, rgba(10, 12, 18, 0.86) 100%);
  pointer-events: none;
}
.photo-thumb-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
}
.photo-thumb-vol {
  display: inline-block;
  width: fit-content;
  font-family: var(--font-display);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(17, 19, 24, 0.78);
  border-left: 3px solid var(--accent);
  padding: 2px 7px;
  border-radius: 2px;
}
.photo-thumb-stat {
  font-family: var(--font-display);
  font-size: 1.48rem;
  font-weight: 900;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}
.photo-thumb-sub {
  font-size: 0.72rem;
  font-weight: 800;
  color: #e2e8f0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.featured-thumb-wrap .photo-thumb-stat,
.article-eyecatch .photo-thumb-stat {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}
.featured-thumb-wrap .photo-thumb-sub,
.article-eyecatch .photo-thumb-sub {
  font-size: 0.92rem;
}
.featured-thumb-wrap .photo-thumb-overlay,
.article-eyecatch .photo-thumb-overlay {
  left: 22px;
  right: 22px;
  bottom: 18px;
}

/* In-Article Editorial Figure Photo */
.article-photo {
  margin: 22px 0 26px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.article-photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.article-photo figcaption {
  padding: 9px 14px;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--ink-muted);
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}
.article-photo figcaption::before {
  content: "📷";
  font-size: 0.82rem;
}

.thumb-corner-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

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

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

.cat-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--ink);
  color: #fff;
}
[data-theme="dark"] .cat-tag {
  background: var(--surface-3);
  color: #f8fafc;
  border: 1px solid var(--border);
}
.cat-tag.red { background: var(--accent); color: #fff; border-color: transparent; }

.pr-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.featured-title {
  margin: 0;
  font-size: clamp(1.22rem, 2vw, 1.5rem);
  font-weight: 900;
  line-height: 1.38;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.featured-excerpt {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.68;
}

.featured-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.kpi-mini-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.kpi-chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.kpi-chip.ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: var(--ok-border);
}

.read-more-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 900;
  color: var(--accent);
}

/* Right Stack inside Pickup Grid */
.pickup-side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.manifesto-card {
  background: var(--header-bg);
  color: #f8fafc;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.manifesto-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
}

.manifesto-eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fb7185;
  text-transform: uppercase;
}

.manifesto-title {
  margin: 0;
  font-size: 1.24rem;
  font-weight: 900;
  line-height: 1.38;
  letter-spacing: -0.01em;
}
.manifesto-title em {
  font-style: normal;
  color: #ff4d67;
}

.manifesto-desc {
  margin: 0;
  font-size: 0.82rem;
  color: #b4bfd1;
  line-height: 1.65;
}

.torii-mini-art {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0c10;
}

.torii-mini-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #8f9bb0;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stance-pills-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.stance-mini {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  padding: 8px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  color: #f1f5f9;
}
.stance-mini span {
  display: block;
  font-size: 0.64rem;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 2px;
}

/* ==========================================================================
   Main 2-Column Blog Layout (Classic Pro Blog Architecture)
   ========================================================================== */
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-w);
  gap: 26px;
  align-items: start;
  padding: 22px 0 48px;
}

.main-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Section Headers */
.block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-strong);
  margin-bottom: 16px;
}

.block-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.block-title-en {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-tab:hover { border-color: var(--ink); color: var(--ink); }
.filter-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
[data-theme="dark"] .filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
}

/* Magazine Article List (ガジェマガ風 サムネ横並びリスト) */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-card {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-border);
}

.post-card.is-live {
  border-left: 4px solid var(--accent);
}

.post-thumb {
  position: relative;
  background: #0d1017;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 152px;
}
.post-thumb img,
.post-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.post-card:hover .post-thumb img,
.post-card:hover .post-thumb svg { transform: scale(1.04); }

.post-status-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}
.post-status-badge.live {
  background: var(--ok);
  color: #fff;
}
.post-status-badge.soon {
  background: rgba(17, 19, 24, 0.85);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.post-content {
  padding: 15px 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.post-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.42;
  color: var(--ink);
  transition: color 0.15s ease;
}
.post-card:hover .post-title { color: var(--accent); }

.post-excerpt {
  margin: 0;
  font-size: 0.83rem;
  color: var(--ink-muted);
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-footer {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--ink-dim);
}

.post-action-label {
  font-weight: 800;
  color: var(--accent);
}

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

/* Stance 3-Column Strip */
.stance-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stance-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow-xs);
}
[data-theme="dark"] .stance-box { border-top-color: var(--accent); }

.stance-num {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.stance-box h3 {
  margin: 0 0 6px;
  font-size: 0.94rem;
  font-weight: 900;
  color: var(--ink);
}
.stance-box p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.62;
}

/* Weekly Production Schedule */
.schedule-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.day-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
}
.day-card.weekend {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}
.day-code {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.day-task {
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.35;
}
.day-note {
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-top: 4px;
  line-height: 1.45;
}

/* ==========================================================================
   Right Sidebar Widgets (Profile / Search / Popular Ranking / Category / Sticky TOC)
   ========================================================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.sidebar.sticky-col {
  position: sticky;
  top: 120px;
}

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

.widget-title {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-strong);
  font-size: 0.88rem;
  font-weight: 900;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.widget-title span {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

/* Search Widget */
.search-box {
  display: flex;
  gap: 6px;
}
.search-input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.84rem;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}
.search-clear-btn {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.search-clear-btn:hover { color: var(--ink); border-color: var(--ink); }

/* Profile Widget */
.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #111318;
  border: 2px solid var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.profile-name {
  font-size: 1rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.25;
}
.profile-role {
  font-size: 0.74rem;
  color: var(--ink-muted);
  margin-top: 2px;
}
.profile-bio {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.65;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.p-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 6px;
  text-align: center;
}
.p-stat strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--ink);
}
.p-stat span {
  font-size: 0.66rem;
  color: var(--ink-muted);
}
.profile-socials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  transition: all 0.15s ease;
}
.social-btn:hover { border-color: var(--ink); }
.social-btn.yt {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.social-btn.yt:hover { background: var(--accent-hover); }

/* Popular Ranking Widget */
.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ranking-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
}
.ranking-item:last-child { border-bottom: none; padding-bottom: 0; }

.rank-badge {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
  background: var(--surface-3);
  color: var(--ink-muted);
}
.rank-badge.r1 { background: var(--accent); color: #fff; }
.rank-badge.r2 { background: var(--ink); color: #fff; }
[data-theme="dark"] .rank-badge.r2 { background: #3b465c; }
.rank-badge.r3 { background: #64748b; color: #fff; }

.rank-text {
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.42;
  color: var(--ink);
  transition: color 0.15s ease;
}
.ranking-item:hover .rank-text { color: var(--accent); }
.rank-sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-dim);
  margin-top: 2px;
}

/* Category List Widget */
.cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cat-list-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cat-list-btn:hover {
  background: var(--surface-2);
  color: var(--accent);
}
.cat-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--surface-3);
  color: var(--ink-muted);
  padding: 1px 7px;
  border-radius: 999px;
}

/* ==========================================================================
   Tasteful AdSense Slot Styling
   ========================================================================== */
.ad-slot {
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: center;
}
.ad-slot-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}
.ad-slot-desc {
  margin: 0;
  font-size: 0.76rem;
  color: var(--ink-dim);
}

/* ==========================================================================
   Article View (Editorial Reading Experience + Sticky Sidebar TOC)
   ========================================================================== */
.article-paper {
  min-width: 0;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 34px 38px;
  box-shadow: var(--shadow-sm);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 14px;
}
.crumb-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: 800;
  font-size: inherit;
  cursor: pointer;
}
.crumb-btn:hover { text-decoration: underline; }

.article-header-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.article-h1 {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 2.7vw, 2rem);
  font-weight: 900;
  line-height: 1.36;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.article-meta-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 5px;
  cursor: pointer;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

.article-eyecatch {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 24px;
  background: #0d1017;
  aspect-ratio: 16 / 9;
}
.article-eyecatch img,
.article-eyecatch svg { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-secondary:hover {
  border-color: var(--ink);
  background: var(--surface-3);
  color: var(--ink);
  text-decoration: none;
}

/* TL;DR Box (ガジェマガ結論ファースト枠) */
.tldr-box {
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 22px 0;
  background: var(--surface);
}
[data-theme="dark"] .tldr-box { border-color: var(--accent); }

.tldr-bar {
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
[data-theme="dark"] .tldr-bar { background: var(--accent); }

.tldr-bar-title {
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.tldr-jump {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}
[data-theme="dark"] .tldr-jump { background: #111318; }
.tldr-jump:hover { opacity: 0.9; }

.tldr-list {
  margin: 0;
  padding: 16px 20px 16px 36px;
  display: grid;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink);
}

/* KPI Strip */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.kpi-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 14px;
}

.kpi-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
}
.kpi-box.accent {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}
.kpi-label { font-size: 0.72rem; font-weight: 700; color: var(--ink-muted); margin-bottom: 3px; }
.kpi-val {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.25;
}
.kpi-box.accent .kpi-val { color: var(--accent); }
.kpi-sub { font-size: 0.7rem; color: var(--ink-dim); margin-top: 3px; }

/* YouTube Cross-Link Video Card */
.yt-embed-card {
  background: #111318;
  color: #f8fafc;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 22px 0;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.yt-thumb-mock {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: linear-gradient(135deg, #241019, #111318);
  border: 1px solid rgba(239, 35, 60, 0.5);
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
}
.yt-play-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1rem;
  box-shadow: 0 6px 20px rgba(217, 30, 54, 0.55);
  transition: transform 0.15s ease;
}
.yt-thumb-mock:hover .yt-play-circle { transform: scale(1.08); }
.yt-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 1px 5px;
  border-radius: 3px;
}

.yt-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  color: #ff6b81;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.yt-title { margin: 0 0 6px; font-size: 1rem; font-weight: 900; line-height: 1.4; color: #fff; }
.yt-desc { margin: 0 0 10px; font-size: 0.82rem; color: #b4bfd1; line-height: 1.6; }

/* In-Article TOC (Collapsible) */
.toc-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 22px 0;
}
.toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.toc-title {
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
}
.toc-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}
.toc-list.collapsed { display: none; }
.toc-link {
  background: none;
  border: none;
  padding: 2px 0;
  color: var(--ink-body);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.toc-link:hover { color: var(--accent); text-decoration: underline; }

/* Sticky Sidebar TOC (Scroll-Spy) */
.sticky-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 2px solid var(--border);
}
.sticky-toc-btn {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 6px 10px 6px 12px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.42;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.sticky-toc-btn:hover { color: var(--ink); }
.sticky-toc-btn.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 900;
}

/* ==========================================================================
   Pro Blogger Article Typography & Components (AFFINGER / SWELL / ガジェマガ流)
   ========================================================================== */
.article-body h2 {
  margin: 44px 0 16px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-left: 5px solid var(--accent);
  border-bottom: 1px solid var(--border);
  border-radius: 0 6px 6px 0;
  font-size: 1.24rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.4;
  scroll-margin-top: 125px;
}

.article-body h3 {
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
  font-size: 1.04rem;
  font-weight: 900;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.article-body h3::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.article-body p {
  margin: 0 0 16px;
  font-size: 0.97rem;
  line-height: 1.88;
  color: var(--ink-body);
}

.marker {
  background: var(--marker);
  color: var(--ink);
  font-weight: 900;
  padding: 0 3px;
}

/* Speech Bubble (吹き出し — classic ガジェマガ / Japanese pro-blog touch) */
.speech-bubble {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 22px 0;
}
.speech-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  width: 58px;
}
.speech-avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #111318;
  border: 2px solid var(--accent);
  display: grid;
  place-items: center;
}
.speech-avatar-name {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ink-muted);
}
.speech-text {
  position: relative;
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.91rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.7;
}
.speech-text::before {
  content: "";
  position: absolute;
  top: 18px;
  left: -8px;
  width: 14px;
  height: 14px;
  background: var(--surface-2);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}

/* Pros / Cons Comparison Box (ダメな節約 vs 健康担保型) */
.vs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0 24px;
}
.vs-card {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}
.vs-head {
  padding: 9px 14px;
  font-size: 0.84rem;
  font-weight: 900;
  color: #fff;
}
.vs-card.bad .vs-head { background: #475569; }
.vs-card.good .vs-head { background: var(--ok); }
.vs-list {
  margin: 0;
  padding: 14px 16px 14px 32px;
  font-size: 0.85rem;
  display: grid;
  gap: 6px;
  color: var(--ink-body);
}

/* 13 Items Categorized Matrix */
.ingredient-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0 22px;
}
.ing-group {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.ing-group-title {
  font-size: 0.76rem;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ing-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ing-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 4px;
}

/* Daily Routine Timeline */
.timeline {
  display: grid;
  gap: 10px;
  margin: 16px 0 24px;
}
.time-card {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  align-items: start;
}
.time-badge {
  background: var(--ink);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 5px 8px;
  border-radius: 4px;
  text-align: center;
}
[data-theme="dark"] .time-badge { background: var(--accent); }
.time-content strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 4px;
}
.time-content p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-muted);
  line-height: 1.62;
}

/* ==========================================================================
   Interactive Food Cost Simulator (Upgraded Visual Edition)
   ========================================================================== */
.sim-panel {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0 26px;
}

.sim-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.sim-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.preset-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-body);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.preset-btn:hover { border-color: var(--accent); color: var(--accent); }

.sim-meter-wrap {
  background: var(--surface-3);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
  margin: 8px 0 14px;
}
.sim-meter-bar {
  height: 100%;
  width: 94.8%;
  background: linear-gradient(90deg, var(--ok), var(--accent));
  transition: width 0.25s ease;
}

/* Category Cost Breakdown Bar */
.cat-breakdown {
  margin: 0 0 16px;
}
.cat-bar-track {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-3);
  gap: 2px;
}
.cat-seg { height: 100%; transition: width 0.25s ease; }
.cat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 7px;
  font-size: 0.73rem;
  color: var(--ink-muted);
}
.cat-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
}
.cat-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  min-width: 540px;
}
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: middle;
}
th {
  background: var(--header-bg);
  color: #f8fafc;
  font-weight: 800;
  font-size: 0.78rem;
  white-space: nowrap;
}
tbody tr:hover { background: var(--surface-2); }
td.num, th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cost-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}
.step-btn {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}
.step-btn:hover { border-color: var(--accent); color: var(--accent); }
.cost-input {
  width: 78px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 5px;
  padding: 4px 7px;
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.84rem;
}
.cost-input:focus { outline: none; border-color: var(--accent); }

/* Q&A Cards */
.qa-list { display: grid; gap: 12px; margin: 16px 0 24px; }
.qa-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.qa-q {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 900;
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.qa-badge {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
}
.qa-badge.q { background: var(--accent); color: #fff; }
.qa-badge.a { background: var(--ink); color: #fff; }
[data-theme="dark"] .qa-badge.a { background: var(--ok); }
.qa-a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-size: 0.89rem;
  color: var(--ink-body);
  line-height: 1.72;
}

/* Fixed Cost Checklist */
.check-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 14px;
}
.check-bar {
  flex: 1;
  height: 8px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}
.check-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--ok);
  transition: width 0.2s ease;
}
.check-list { display: grid; gap: 8px; margin: 12px 0 18px; }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: border-color 0.15s ease;
}
.check-item:hover { border-color: var(--accent-border); }
.check-item input {
  margin-top: 4px;
  accent-color: var(--accent);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* ==========================================================================
   Kaereba / Moshimo Kantan-Link Style Product Showcase Cards
   ========================================================================== */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 18px 0 26px;
}

.product-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-xs);
  align-items: center;
}

.product-visual {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-align: center;
  gap: 6px;
}
.product-icon { font-size: 2rem; line-height: 1; }
.product-spec-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 3px;
}

.product-info h4 {
  margin: 4px 0 6px;
  font-size: 1.02rem;
  font-weight: 900;
  color: var(--ink);
}
.product-info p {
  margin: 0 0 12px;
  font-size: 0.84rem;
  color: var(--ink-muted);
  line-height: 1.62;
}

.store-btn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  border-radius: 5px;
  border: none;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.store-btn:hover {
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
  opacity: 0.94;
}
.store-btn.amazon { background: var(--store-amazon); color: #111318; }
.store-btn.amazon:hover { background: var(--store-amazon-hover); color: #111318; }
.store-btn.rakuten { background: var(--store-rakuten); }
.store-btn.rakuten:hover { background: var(--store-rakuten-hover); }
.store-btn.yahoo { background: var(--store-yahoo); }
.store-btn.yahoo:hover { background: var(--store-yahoo-hover); }
.store-btn.official { background: var(--store-official); }
.store-btn.official:hover { background: var(--store-official-hover); }

/* Sources Box */
.sources-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-top: 26px;
}
.sources-box h3 { margin-top: 0; }
.sources-box ul {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.82rem;
  color: var(--ink-muted);
  display: grid;
  gap: 6px;
}

/* Footer */
.site-footer {
  background: var(--header-bg);
  color: var(--header-muted);
  padding: 36px 0 40px;
  margin-top: 20px;
  border-top: 3px solid var(--accent);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
}
.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--header-muted);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.footer-link-btn:hover { color: #fff; }
.footer-disclosure {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.73rem;
  line-height: 1.6;
  color: #94a3b8;
}
.footer-copy {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* Modal & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 14, 0.72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 140;
}
.modal-backdrop.open { display: flex; }

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  max-width: 560px;
  width: 100%;
  padding: 22px 24px;
  box-shadow: var(--shadow-lg);
  max-height: 88vh;
  overflow-y: auto;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.modal-head h3 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.4;
}
.close-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  font-weight: 800;
}
.close-btn:hover { border-color: var(--accent); color: var(--accent); }
.modal-body {
  font-size: 0.88rem;
  color: var(--ink-body);
  line-height: 1.72;
}
.modal-body code {
  background: var(--surface-3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--header-bg);
  color: #fff;
  border: 1px solid var(--accent);
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 800;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 160;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Mobile Fixed Bottom Action Bar & TOC Drawer (SWELL / ガジェマガスマホ最適化)
   ========================================================================== */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  background: rgba(17, 19, 24, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.mbar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: #cbd5e1;
  padding: 5px 4px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mbar-btn:active,
.mbar-btn.active {
  color: #fff;
  background: rgba(239, 35, 60, 0.22);
}
.mbar-icon {
  font-size: 1.05rem;
  line-height: 1.1;
}

/* Mobile Table Scroll Hint */
.table-scroll-hint {
  display: none;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-dim);
  text-align: right;
  margin: -10px 0 6px;
}

/* ==========================================================================
   Responsive Breakpoints (Tablet & Smartphone 375px+)
   ========================================================================== */
@media (max-width: 1020px) {
  .pickup-grid { grid-template-columns: minmax(0, 1fr); }
  .blog-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar.sticky-col { position: static; }
  .schedule-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .container { padding: 0 14px; }
  .header-top-inner { min-height: 54px; gap: 8px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-name { font-size: 1.02rem; gap: 6px; }
  .brand-en { font-size: 0.6rem; padding: 2px 5px; }
  .brand-tagline { display: none; }
  .icon-btn { height: 32px; padding: 0 10px; }
  .icon-btn .btn-label { display: none; }
  .yt-header-btn { height: 32px; padding: 0 11px; font-size: 0.74rem; }

  .gnav-btn { padding: 10px 11px; font-size: 0.8rem; }

  .pickup-section { padding: 14px 0 6px; }
  .featured-body { padding: 15px 15px 16px; gap: 8px; }
  .featured-title { font-size: 1.15rem; }
  .manifesto-card { padding: 16px; }
  .manifesto-title { font-size: 1.1rem; }
  .stance-pills-mini { gap: 5px; }
  .stance-mini { padding: 7px 4px; font-size: 0.68rem; }

  .blog-layout { padding: 14px 0 36px; gap: 18px; }
  .block-header { margin-bottom: 12px; gap: 8px; }
  .block-title { font-size: 1rem; }
  .filter-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 2px; }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-tab { flex-shrink: 0; font-size: 0.73rem; padding: 6px 10px; }

  .post-card { grid-template-columns: 1fr; }
  .post-thumb { aspect-ratio: 16 / 9; min-height: auto; }
  .post-content { padding: 13px 14px 14px; }
  .post-title { font-size: 0.96rem; }
  .stance-strip { grid-template-columns: 1fr; }
  .schedule-grid { grid-template-columns: repeat(2, 1fr); }

  /* Article Mobile Readability */
  .article-paper { padding: 18px 15px 26px; border-radius: 8px; }
  .article-h1 { font-size: 1.3rem; line-height: 1.4; }
  .article-meta-bar { font-size: 0.74rem; gap: 8px; padding: 8px 0 12px; }
  .article-meta-left { gap: 8px 12px; }
  .article-body h2 { margin: 32px 0 14px; padding: 10px 12px; font-size: 1.08rem; scroll-margin-top: 108px; }
  .article-body h3 { font-size: 0.96rem; margin: 22px 0 10px; }
  .article-body p { font-size: 0.94rem; line-height: 1.84; }

  .tldr-bar { padding: 9px 12px; }
  .tldr-list { padding: 13px 14px 13px 28px; font-size: 0.88rem; }

  .kpi-grid,
  .kpi-grid.cols-3 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi-box { padding: 10px 11px; }
  .kpi-val { font-size: 1.12rem; }

  .vs-grid { grid-template-columns: 1fr; }
  .ingredient-matrix { grid-template-columns: 1fr; }
  .time-card { grid-template-columns: 1fr; gap: 8px; padding: 12px 13px; }
  .time-badge { width: fit-content; }

  .speech-bubble { gap: 10px; }
  .speech-avatar { width: 44px; }
  .speech-avatar-circle { width: 42px; height: 42px; }
  .speech-text { padding: 12px 13px; font-size: 0.87rem; }

  .yt-embed-card { grid-template-columns: 1fr; padding: 15px; gap: 12px; }
  .product-card { grid-template-columns: 1fr; padding: 14px; gap: 12px; }
  .product-visual { aspect-ratio: auto; flex-direction: row; justify-content: flex-start; padding: 8px 12px; gap: 10px; }
  .product-icon { font-size: 1.5rem; }
  .store-btn-grid { grid-template-columns: 1fr; gap: 7px; }
  .store-btn { padding: 11px 12px; font-size: 0.82rem; }

  /* Simulator & Table Touch Ergonomics */
  .sim-panel { padding: 14px 12px; }
  .sim-presets { gap: 5px; }
  .preset-btn { font-size: 0.72rem; padding: 6px 8px; }
  table { font-size: 0.8rem; min-width: 480px; }
  th, td { padding: 8px 9px; }
  .step-btn { width: 32px; height: 32px; }
  .cost-input { width: 74px; font-size: 16px; padding: 4px 6px; }
  .search-input { font-size: 16px; }
  .table-scroll-hint { display: block; }

  .article-photo figcaption { font-size: 0.73rem; padding: 8px 11px; }
  .featured-thumb-wrap .photo-thumb-overlay,
  .article-eyecatch .photo-thumb-overlay { left: 12px; right: 12px; bottom: 10px; }
  .featured-thumb-wrap .photo-thumb-stat,
  .article-eyecatch .photo-thumb-stat { font-size: 1.45rem; }
  .featured-thumb-wrap .photo-thumb-sub,
  .article-eyecatch .photo-thumb-sub { font-size: 0.76rem; }

  /* Show Mobile Bottom Bar & pad footer */
  .mobile-bottom-bar { display: grid; }
  .site-footer { padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: 74px; right: 14px; left: 14px; text-align: center; }

  /* Hide desktop sticky TOC duplicate widget at bottom of article on mobile (use bottom bar TOC drawer) */
  #view-article-1 .sidebar.sticky-col .widget:first-child,
  #view-article-dynamic .sidebar.sticky-col .widget:first-child { display: none; }
}

@media (max-width: 400px) {
  .brand-en { display: none; }
  .kpi-grid,
  .kpi-grid.cols-3 { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(3, 1fr); }
  .p-stat strong { font-size: 0.76rem; }
}
