/* ============================================================
   4peiron — 共通スタイル
   デザイン基準: https://www.startupclub.community/
   配色: Tokyo Night（#1a1b26 系の藍地／低彩度のカード）／
   ヘアラインの区切り／詰め気味の太い見出し／
   藤・ミント・オレンジの差し色。
   グロー・ネオン・斜めカットは使わない。
   ============================================================ */

:root {
  /* surfaces — Tokyo Night */
  --bg: #1a1b26;
  --bg-band: #16161e;      /* 交互に敷くセクション背景 */
  --surface: #1f2335;      /* カード */
  --surface-2: #24283b;    /* カード内の一段沈んだ面 */
  --surface-3: #292e42;    /* 選択中・ホバー面 */
  --border: #2e3350;
  --border-2: #3b4261;     /* ホバー時の輪郭 */
  --border-soft: rgba(192, 202, 245, 0.08);

  /* text */
  --text: #c0caf5;
  --text-hi: #d5dbf5;      /* 白の代わりに使う最明色 */
  --text-2: #a9b1d6;
  --muted: #787c99;
  --muted-2: #565f89;
  --text-muted: var(--muted); /* 既存ページのインラインスタイル互換 */

  /* accents */
  --primary: #bb9af7;      /* 藤色（ブランド） */
  --primary-2: #9d7cd8;
  --blue: #7aa2f7;
  --cyan: #7dcfff;
  --mint: #73daca;
  --green: #9ece6a;
  --orange: #ff9e64;
  --orange-2: #e08a4b;
  --gold: #e0af68;
  --danger: #f7768e;
  --ink: #1a1b26;          /* 明色ボタンの上に載せる文字色 */

  /* code — Tokyo Night シンタックス */
  --code-bg: #16161e;
  --code-fg: #c0caf5;
  --tok-comment: #565f89;
  --tok-keyword: #bb9af7;
  --tok-string: #9ece6a;
  --tok-number: #ff9e64;
  --tok-func: #7aa2f7;
  --tok-type: #2ac3de;
  --tok-op: #89ddff;
  --tok-prompt: #73daca;

  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  /* 内容が短いページでもフッターを最下部に置く */
  display: flex;
  flex-direction: column;
}
body > .site-footer { margin-top: auto; }

/* 中央上部のごく淡いスポットライト。派手な発光はしない */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 50% -5%, rgba(187, 154, 247, 0.08), transparent 70%),
    radial-gradient(ellipse 50% 40% at 90% 15%, rgba(122, 162, 247, 0.06), transparent 70%);
}

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

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

::selection { background: rgba(122, 162, 247, 0.35); color: var(--text-hi); }

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

/* ---------- 見出しの共通トーン（詰め気味・太め） ---------- */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.18;
  color: var(--text);
}
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.05rem; letter-spacing: -0.02em; line-height: 1.4; }

/* 2行目に敷くハイライト（参照サイトの特徴的な処理） */
.hl { position: relative; display: inline-block; isolation: isolate; }
.hl::after {
  content: ""; position: absolute; z-index: -1;
  left: -4px; right: -4px; bottom: 0.1em; height: 0.34em;
  background: rgba(169, 177, 214, 0.18);
  border-radius: 2px;
}
.hl-primary::after { background: rgba(187, 154, 247, 0.38); }
.hl-mint::after { background: rgba(115, 218, 202, 0.3); }

/* 本文中の強調（太字＋下線） */
strong, .em { color: var(--text); font-weight: 700; }
.u { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.t-primary { color: var(--primary); }
.t-mint { color: var(--mint); }
.t-orange { color: var(--orange); }

.eyebrow {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted-2);
}

/* ============================================================
   ヘッダー：中央に浮かぶバー
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  padding: 14px 0;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 52px; padding: 0 8px 0 18px;
  background: rgba(22, 22, 30, 0.86);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.logo {
  font-size: 0.95rem; font-weight: 800; letter-spacing: -0.02em;
  color: var(--text); white-space: nowrap;
}
.logo span { color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--muted); font-size: 0.82rem; font-weight: 500;
  padding: 7px 11px; border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--text-hi); background: rgba(192, 202, 245, 0.06); }
.main-nav a.current { color: var(--text); }

.btn-login {
  background: var(--text-2); color: var(--ink) !important;
  font-weight: 700; font-size: 0.8rem !important;
  padding: 8px 15px !important; border-radius: var(--radius-sm);
  margin-left: 6px;
}
.btn-login:hover { background: var(--text-hi); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  width: 36px; height: 36px; cursor: pointer; font-size: 1rem;
}

/* ============================================================
   ボタン
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.86rem; font-weight: 700;
  letter-spacing: -0.01em; cursor: pointer; border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--text-2); color: var(--ink); }
.btn-primary:hover { background: var(--text-hi); color: var(--ink); }

.btn-outline {
  background: rgba(192, 202, 245, 0.03); color: var(--text-2);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-2); }

.btn-accent { background: var(--primary); color: var(--ink); }
.btn-accent:hover { background: var(--primary-2); color: var(--ink); }

.btn-ghost { background: none; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--text-hi); background: rgba(192, 202, 245, 0.06); }

.btn-sm { padding: 7px 14px; font-size: 0.78rem; }
.btn-lg { padding: 13px 26px; font-size: 0.92rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   セクションの帯とヘアライン
   ============================================================ */
section { padding: 84px 0; border-top: 1px solid var(--border-soft); }
section.band { background: var(--bg-band); }
section.flush { border-top: none; }

.section-title { text-align: center; margin-bottom: 14px; }
.section-lead {
  color: var(--muted); max-width: 620px; margin: 0 auto 46px;
  text-align: center; font-size: 0.94rem;
}
.section-head { max-width: 560px; margin-bottom: 30px; }
.section-head p { color: var(--muted); font-size: 0.92rem; margin-top: 12px; }

/* 交互配置の2カラム（参照サイトの機能紹介セクション） */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.split.reverse .split-visual { order: -1; }
.split-body h2 { margin-bottom: 14px; }
.split-body > p { color: var(--muted); font-size: 0.92rem; margin-bottom: 20px; }

.check-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.check-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.88rem; color: var(--text-2);
}
.check-list li::before {
  content: "✓"; color: var(--mint); font-weight: 700;
  font-size: 0.82rem; line-height: 1.75; flex-shrink: 0;
}

/* ============================================================
   ヒーロー（中央寄せ）
   ============================================================ */
.hero { padding: 92px 0 72px; text-align: center; border-top: none; }
.hero h1 { margin: 0 auto 22px; max-width: 780px; }
.hero-sub {
  color: var(--muted); font-size: 0.95rem; max-width: 560px;
  margin: 0 auto 30px; line-height: 1.75;
}
.hero-ctas { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 46px; }
.hero-art {
  max-width: 860px; margin: 0 auto;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg);
  background: var(--surface);
}

/* ヒーロー下のバナー */
.banner-carousel { position: relative; max-width: 620px; margin: 0 auto 44px; }
.banner-track { display: flex; overflow: hidden; border-radius: var(--radius); }
.banner {
  min-width: 100%; padding: 14px 20px;
  display: flex; align-items: center; gap: 10px; justify-content: center;
  font-size: 0.85rem; font-weight: 600; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.banner:hover { background: var(--surface-2); color: var(--text); }
.banner-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; cursor: pointer; font-size: 0.9rem;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); border-radius: var(--radius-pill);
}
.banner-nav:hover { color: var(--text); background: var(--surface-3); }
.banner-prev { left: -14px; } .banner-next { right: -14px; }

/* ============================================================
   数値／about
   ============================================================ */
.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; background: var(--border-soft);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 40px;
}
.stat { background: var(--surface); padding: 22px 18px; text-align: center; }
.stat b {
  display: block; font-size: 1.7rem; font-weight: 800;
  letter-spacing: -0.04em; color: var(--text);
}
.stat span { font-size: 0.74rem; color: var(--muted-2); }

.about-card {
  display: grid; grid-template-columns: 88px 1fr; gap: 24px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; max-width: 800px; margin: 0 auto;
}
.avatar {
  width: 88px; height: 88px; border-radius: var(--radius-pill);
  background: linear-gradient(150deg, var(--primary), #7aa2f7);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em;
}
.about-card h3 { margin-bottom: 8px; }
.about-card p { font-size: 0.88rem; color: var(--muted); }

/* ============================================================
   コースカード
   ============================================================ */
.course-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px;
}
.course-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.course-card:hover { border-color: var(--border-2); background: var(--surface-2); }
.course-card h3 { font-size: 1.02rem; }
.course-card p { font-size: 0.85rem; color: var(--muted); flex: 1; }
.course-card .mod {
  font-family: var(--mono); font-size: 0.66rem; color: var(--muted-2);
  letter-spacing: 0.16em;
}
.course-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.badge {
  align-self: flex-start; font-size: 0.68rem; font-weight: 700;
  padding: 3px 10px; border-radius: var(--radius-pill);
  border: 1px solid transparent; letter-spacing: 0;
}
.badge-free { background: rgba(115, 218, 202, 0.12); color: var(--mint); border-color: rgba(115, 218, 202, 0.28); }
.badge-mid { background: rgba(224, 175, 104, 0.12); color: var(--gold); border-color: rgba(224, 175, 104, 0.28); }
.badge-soon { background: var(--surface-2); color: var(--muted-2); border-color: var(--border); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.68rem; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); padding: 2px 9px; border-radius: var(--radius-pill);
}

/* ============================================================
   特徴カード
   ============================================================ */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: border-color 0.18s ease;
}
.feature:hover { border-color: var(--border-2); }
.feature .icon { font-size: 1.4rem; margin-bottom: 12px; }
.feature h3 { margin-bottom: 8px; }
.feature p { font-size: 0.86rem; color: var(--muted); }

/* メンバーシップ誘導 */
.membership-teaser {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 56px 36px; text-align: center;
}
.membership-teaser h2 { margin-bottom: 14px; }
.membership-teaser p { max-width: 520px; margin: 0 auto 26px; color: var(--muted); font-size: 0.92rem; }

/* ============================================================
   料金
   ============================================================ */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.price-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.price-card.featured { border-color: rgba(187, 154, 247, 0.5); background: var(--surface-2); }
.price-card .plan-tag {
  position: absolute; top: 16px; right: 16px;
  background: rgba(224, 175, 104, 0.16); color: var(--gold);
  border: 1px solid rgba(224, 175, 104, 0.32);
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em;
  padding: 2px 9px; border-radius: var(--radius-pill);
}
.price-card h3 { font-size: 0.95rem; }
.price { font-size: 2rem; font-weight: 800; letter-spacing: -0.045em; color: var(--text); }
.price small { font-size: 0.78rem; font-weight: 500; color: var(--muted-2); margin-left: 4px; }
.plan-desc { font-size: 0.84rem; color: var(--muted); }
.plan-features { list-style: none; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.plan-features li {
  font-size: 0.83rem; color: var(--text-2);
  display: flex; gap: 9px; align-items: flex-start;
}
.plan-features li::before { content: "✓"; color: var(--mint); flex-shrink: 0; font-size: 0.8rem; }
.plan-features li.na { color: var(--muted-2); }
.plan-features li.na::before { content: "✓"; color: #3b4261; }

/* ============================================================
   進め方（flow）
   ============================================================ */
.flow-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.flow-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.flow-card .cadence {
  display: inline-block; font-family: var(--mono); font-size: 0.66rem;
  color: var(--primary); background: rgba(187, 154, 247, 0.12);
  border: 1px solid rgba(187, 154, 247, 0.24);
  padding: 2px 9px; border-radius: var(--radius-pill); letter-spacing: 0.08em;
}
.flow-card h3 { margin: 12px 0 8px; }
.flow-card p { font-size: 0.86rem; color: var(--muted); }

/* ============================================================
   FAQ（左に見出し／右に一問一答のヘアライン区切り）
   ============================================================ */
.faq-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: start; }
.faq-list { border-top: 1px solid var(--border-soft); }
.faq-item { border-bottom: 1px solid var(--border-soft); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  color: var(--text); font-family: inherit; font-size: 0.9rem; font-weight: 700;
  letter-spacing: -0.01em; padding: 18px 40px 18px 0; position: relative;
}
.faq-q:hover { color: var(--text-hi); }
.faq-q::after {
  content: "+"; position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%); color: var(--muted-2); font-weight: 400; font-size: 1.1rem;
}
.faq-item.open .faq-q::after { content: "−"; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.24s ease; }
.faq-a p { padding: 0 20px 20px 0; font-size: 0.86rem; color: var(--muted); }

/* ============================================================
   ニュースレター
   ============================================================ */
.newsletter-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 44px 36px; text-align: center;
}
.newsletter-box h2 { margin-bottom: 10px; }
.newsletter-box > p { color: var(--muted); font-size: 0.9rem; max-width: 460px; margin: 0 auto; }
.newsletter-form {
  display: flex; gap: 8px; margin: 22px auto 0; max-width: 440px; flex-wrap: wrap;
}
.newsletter-form input {
  flex: 1; min-width: 200px; padding: 11px 14px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: inherit; font-size: 0.88rem;
}
.newsletter-form input::placeholder { color: var(--muted-2); }
.newsletter-form input:focus { outline: none; border-color: var(--primary); }
.newsletter-art { display: none; }
.form-note { font-size: 0.8rem; color: var(--mint); margin-top: 12px; min-height: 1.2em; }

/* ============================================================
   フッター
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 56px 0 32px; margin-top: 0; background: var(--bg-band);
}
.footer-top {
  display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px;
  padding-bottom: 40px;
}
.footer-brand strong { display: block; font-size: 0.95rem; font-weight: 800; margin-bottom: 12px; }
.footer-brand p { font-size: 0.82rem; color: var(--muted); max-width: 320px; }
.footer-col h5 { font-size: 0.78rem; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.footer-col a {
  display: block; font-size: 0.8rem; color: var(--muted);
  padding: 5px 0;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between;
  border-top: 1px solid var(--border-soft); padding-top: 22px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { font-size: 0.78rem; color: var(--muted-2); }
.footer-links a:hover { color: var(--text-2); }
.copyright { font-size: 0.78rem; color: var(--muted-2); }

/* ============================================================
   下層ページのヒーロー
   ============================================================ */
.page-hero { padding: 66px 0 40px; text-align: center; border-top: none; }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 14px; }
.page-hero p { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 0.92rem; }

/* ============================================================
   コース詳細（レッスン一覧）
   ============================================================ */
.lesson-list { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--border-soft); }
.lesson-row {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 4px; border-bottom: 1px solid var(--border-soft);
  transition: background 0.15s ease;
}
.lesson-row:hover { background: rgba(192, 202, 245, 0.03); }
.lesson-num {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); font-family: var(--mono); font-size: 0.78rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.lesson-row .lesson-meta { flex: 1; }
.lesson-row h3 { font-size: 0.94rem; }
.lesson-row p { font-size: 0.82rem; color: var(--muted); }

/* ============================================================
   レッスン本文
   ============================================================ */
.lesson-layout {
  display: grid; grid-template-columns: 230px 1fr; gap: 40px;
  padding: 44px 0 80px; align-items: start;
}
.lesson-sidebar { position: sticky; top: 96px; }
.lesson-sidebar h4 {
  font-size: 0.72rem; color: var(--muted-2); margin-bottom: 12px;
  font-family: var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
}
.lesson-sidebar ol { list-style: none; }
.lesson-sidebar li { margin-bottom: 2px; }
.lesson-sidebar a {
  display: block; padding: 7px 12px; border-radius: var(--radius-sm);
  font-size: 0.84rem; color: var(--muted);
}
.lesson-sidebar a:hover { color: var(--text); background: rgba(192, 202, 245, 0.05); }
.lesson-sidebar a.active { color: var(--text); background: var(--surface-2); }

.lesson-content h1 { font-size: clamp(1.6rem, 3vw, 2rem); margin-bottom: 8px; }
.lesson-content .crumb { font-size: 0.8rem; color: var(--muted-2); margin-bottom: 20px; }
.lesson-content h2 { font-size: 1.24rem; margin: 36px 0 12px; }
.lesson-content p { margin-bottom: 14px; color: var(--text-2); font-size: 0.94rem; }
.lesson-content code, .article-body code, .api-note code {
  background: var(--code-bg); color: var(--cyan);
  border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 6px; font-family: var(--mono); font-size: 0.85em;
}

/* コードランナー */
.runner {
  margin: 22px 0; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
}
.runner-head {
  background: var(--surface-2); color: var(--muted);
  padding: 10px 16px; font-size: 0.76rem; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
}
.runner textarea {
  width: 100%; min-height: 180px; border: none; resize: vertical; display: block;
  background: var(--code-bg); color: var(--code-fg);
  caret-color: var(--tok-op);
  padding: 16px; font-size: 0.86rem; font-family: var(--mono); line-height: 1.7;
  tab-size: 4;
}
.runner textarea:focus { outline: none; }
.runner textarea::selection { background: rgba(122, 162, 247, 0.3); color: var(--text-hi); }
.runner-bar {
  background: var(--surface-2); padding: 10px 16px;
  display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--border);
}
.runner-out {
  background: var(--code-bg); color: var(--mint); padding: 14px 16px;
  font-family: var(--mono); font-size: 0.83rem; white-space: pre-wrap; min-height: 1.4em;
  border-top: 1px solid var(--border);
}
.runner-out .err { color: var(--danger); }
.runner-status { font-size: 0.74rem; color: var(--muted-2); }

.preview-frame { width: 100%; height: 240px; border: none; background: #fff; display: none; }
.codeblock {
  background: var(--code-bg); color: var(--code-fg);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin: 20px 0; overflow-x: auto;
  font-family: var(--mono); font-size: 0.84rem; line-height: 1.7; white-space: pre;
  tab-size: 4;
}
.codeblock-label {
  display: inline-block; font-family: var(--mono); font-size: 0.68rem;
  color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  padding: 2px 11px; margin-bottom: 10px; letter-spacing: 0.06em;
}

/* ---------- シンタックストークン（Tokyo Night） ---------- */
.codeblock .tok-comment { color: var(--tok-comment); font-style: italic; }
.codeblock .tok-string  { color: var(--tok-string); }
.codeblock .tok-number  { color: var(--tok-number); }
.codeblock .tok-keyword { color: var(--tok-keyword); }
.codeblock .tok-type    { color: var(--tok-type); }
.codeblock .tok-func    { color: var(--tok-func); }
.codeblock .tok-op      { color: var(--tok-op); }
.codeblock .tok-prompt  { color: var(--tok-prompt); }
.codeblock .tok-cmd     { color: var(--tok-func); }
.codeblock .tok-flag    { color: var(--tok-number); }

/* クイズ */
.quiz {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin: 26px 0;
}
.quiz h3 { margin-bottom: 14px; }
.quiz-choices { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.quiz-choices label {
  display: flex; gap: 10px; align-items: center; cursor: pointer;
  padding: 11px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-2);
  font-size: 0.88rem; transition: border-color 0.15s ease;
}
.quiz-choices label:hover { border-color: var(--border-2); }
.quiz-choices input[type="radio"] { accent-color: var(--primary); }
.quiz-result { font-weight: 700; font-size: 0.86rem; min-height: 1.4em; }
.quiz-result.ok { color: var(--mint); }
.quiz-result.ng { color: var(--danger); }

.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 44px; }

/* ============================================================
   認証まわり
   ============================================================ */
.user-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 12px; font-size: 0.8rem;
}
.user-chip a { color: var(--text-2); font-weight: 600; }
.user-chip button {
  background: none; border: none; cursor: pointer;
  color: var(--muted-2); font-family: inherit; font-size: 0.76rem;
}
.user-chip button:hover { color: var(--text); }

.auth-card {
  max-width: 420px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 32px;
}
.auth-card label {
  display: block; font-size: 0.78rem; font-weight: 600;
  color: var(--muted); margin: 16px 0 6px;
}
.auth-card input {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: 0.9rem;
}
.auth-card input::placeholder { color: var(--muted-2); }
.auth-card input:focus { outline: none; border-color: var(--primary); }
.auth-msg { font-size: 0.84rem; margin-top: 12px; min-height: 1.3em; font-weight: 600; }
.auth-msg.ok { color: var(--mint); }
.auth-msg.ng { color: var(--danger); }
.plan-pill {
  display: inline-block; background: rgba(187, 154, 247, 0.14);
  border: 1px solid rgba(187, 154, 247, 0.32); color: var(--primary);
  border-radius: var(--radius-pill); padding: 4px 14px;
  font-weight: 700; font-size: 0.8rem;
}

/* ============================================================
   API ステータス通知（バックエンド未起動時）
   ============================================================ */
.api-note {
  display: none; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 24px;
  font-size: 0.82rem; color: var(--muted); line-height: 1.7;
}
.api-note.show { display: flex; }
.api-note b { color: var(--text-2); }

/* 読み込み中 */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-3) 50%, var(--surface) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
  border-radius: var(--radius); color: transparent;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-card { height: 220px; border: 1px solid var(--border); }

.empty-state {
  text-align: center; padding: 64px 20px; color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.88rem;
}
.empty-state b { display: block; color: var(--text); margin-bottom: 6px; font-size: 0.95rem; }

/* ============================================================
   ツールバー（検索＋フィルタ）— コラム／スタッフ共通
   ============================================================ */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  justify-content: space-between; margin-bottom: 22px;
}
.search-box { position: relative; flex: 1; min-width: 220px; max-width: 320px; }
.search-box input {
  width: 100%; padding: 9px 14px 9px 34px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: inherit; font-size: 0.86rem;
}
.search-box input::placeholder { color: var(--muted-2); }
.search-box input:focus { outline: none; border-color: var(--border-2); background: var(--surface-2); }
.search-box::before {
  content: "⌕"; position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%); color: var(--muted-2); font-size: 1rem; pointer-events: none;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; font-family: inherit;
  font-size: 0.78rem; font-weight: 600; padding: 6px 13px;
  border-radius: var(--radius-pill);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-2); }
.chip.active { background: var(--text-2); border-color: var(--text-2); color: var(--ink); }
.result-count { font-size: 0.78rem; color: var(--muted-2); margin-bottom: 20px; }
.result-count b { color: var(--text-2); }

/* ============================================================
   コラム一覧
   ============================================================ */
.column-featured {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 28px;
  transition: border-color 0.18s ease;
}
.column-featured:hover { border-color: var(--border-2); }
.column-featured .cover { min-height: 260px; border-right: 1px solid var(--border); border-bottom: none; }
.column-featured .body { padding: 34px 32px; display: flex; flex-direction: column; gap: 14px; }
.column-featured h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.column-featured p { color: var(--muted); font-size: 0.9rem; }

.column-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.column-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.column-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.column-card .body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.column-card h3 { font-size: 1rem; }
.column-card p { font-size: 0.84rem; color: var(--muted); flex: 1; }

/* 記事カバー：画像を持たないので低彩度のグラデーションで代用 */
.cover {
  position: relative; min-height: 148px;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(187, 154, 247, 0.18), transparent 70%), var(--surface-2);
}
.cover.c-2 { background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(122, 162, 247, 0.16), transparent 70%), var(--surface-2); }
.cover.c-3 { background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(255, 158, 100, 0.14), transparent 70%), var(--surface-2); }
.cover .glyph { font-size: 2.4rem; opacity: 0.9; }
.cover .cat {
  position: absolute; left: 16px; top: 16px;
  background: rgba(22, 22, 30, 0.72); backdrop-filter: blur(6px);
  border: 1px solid var(--border); color: var(--text-2);
  font-size: 0.68rem; font-weight: 700; padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.post-meta {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  font-size: 0.74rem; color: var(--muted-2);
}
.post-meta .author { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.post-meta .mini-avatar {
  width: 20px; height: 20px; border-radius: var(--radius-pill);
  background: linear-gradient(150deg, var(--primary), #7aa2f7);
  color: var(--ink); font-size: 0.58rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}

.pager {
  display: flex; justify-content: center; align-items: center; gap: 14px;
  margin-top: 36px; font-size: 0.82rem;
}
.pager .page-state { color: var(--muted-2); }
.pager .page-state b { color: var(--text-2); }

/* ============================================================
   コラム記事
   ============================================================ */
.article-layout {
  display: grid; grid-template-columns: 1fr 220px; gap: 48px;
  padding: 36px 0 80px; align-items: start;
}
.article-head { margin-bottom: 28px; }
.article-head .crumb { font-size: 0.8rem; color: var(--muted-2); margin-bottom: 16px; }
.article-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 16px; }
.article-head .lead { color: var(--muted); font-size: 0.94rem; margin-bottom: 18px; }
.article-body { max-width: 680px; }
.article-body h2 { font-size: 1.3rem; margin: 40px 0 14px; }
.article-body h3 { font-size: 1.02rem; margin: 26px 0 10px; }
.article-body p { margin-bottom: 16px; color: var(--text-2); font-size: 0.95rem; }
.article-body ul, .article-body ol { margin: 0 0 18px 0; list-style: none; }
.article-body li {
  display: flex; gap: 10px; margin-bottom: 8px;
  font-size: 0.92rem; color: var(--text-2);
}
.article-body li::before { content: "—"; color: var(--muted-2); flex-shrink: 0; }
.article-body blockquote {
  border-left: 2px solid var(--primary); background: var(--surface);
  padding: 16px 20px; margin: 22px 0; color: var(--text-2); font-size: 0.92rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body .codeblock { margin: 20px 0; }

.article-toc { position: sticky; top: 96px; }
.article-toc h4 {
  font-size: 0.72rem; color: var(--muted-2); margin-bottom: 12px;
  font-family: var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
}
.article-toc a {
  display: block; padding: 6px 12px; font-size: 0.82rem;
  color: var(--muted); border-radius: var(--radius-sm);
}
.article-toc a:hover { color: var(--text); background: rgba(192, 202, 245, 0.05); }
.article-toc a.active { color: var(--text); background: var(--surface-2); }

.article-footer {
  margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--border-soft);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
.like-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); cursor: pointer; padding: 10px 18px;
  border-radius: var(--radius-sm); font-family: inherit;
  font-size: 0.84rem; font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.like-btn:hover { background: var(--surface-2); border-color: var(--border-2); }
.like-btn.liked { background: rgba(187, 154, 247, 0.14); border-color: rgba(187, 154, 247, 0.42); color: var(--primary); }

.author-box {
  display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-top: 32px;
}
.author-box .avatar { width: 56px; height: 56px; font-size: 1.1rem; }
.author-box h4 { font-size: 0.94rem; margin-bottom: 4px; }
.author-box p { font-size: 0.82rem; color: var(--muted); }

.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 18px; }

/* ============================================================
   スタッフ紹介
   ============================================================ */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.staff-card {
  text-align: left; cursor: pointer; color: inherit; font: inherit;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.staff-card:hover { border-color: var(--border-2); background: var(--surface-2); transform: translateY(-2px); }
.staff-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.staff-head { display: flex; gap: 14px; align-items: center; }
.staff-avatar {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: var(--radius-pill);
  background: linear-gradient(150deg, var(--primary), #7aa2f7);
  color: var(--ink); font-size: 1.05rem; font-weight: 800; letter-spacing: -0.03em;
  display: flex; align-items: center; justify-content: center;
}
.staff-avatar.a-2 { background: linear-gradient(150deg, var(--mint), #41a6b5); }
.staff-avatar.a-3 { background: linear-gradient(150deg, var(--orange), #e0af68); }
.staff-card h3 { font-size: 1rem; }
.staff-card .romaji { font-family: var(--mono); font-size: 0.68rem; color: var(--muted-2); letter-spacing: 0.06em; }
.staff-card .role { font-size: 0.82rem; color: var(--primary); font-weight: 600; }
.staff-card .bio { font-size: 0.84rem; color: var(--muted); flex: 1; }
.staff-card .more { font-size: 0.78rem; color: var(--muted-2); font-weight: 600; }
.staff-card:hover .more { color: var(--text-2); }
.team-badge {
  align-self: flex-start; font-size: 0.68rem; font-weight: 700;
  padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}

/* 詳細モーダル */
.modal {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(16, 16, 22, 0.74); backdrop-filter: blur(4px);
}
.modal.open { display: flex; }
.modal-panel {
  position: relative; width: min(720px, 100%); max-height: 86vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.modal-body { padding: 34px; }
.modal-close {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  width: 32px; height: 32px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.9rem;
}
.modal-close:hover { color: var(--text); background: var(--surface-3); }
.staff-detail-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.staff-detail-head .staff-avatar { width: 76px; height: 76px; font-size: 1.5rem; }
.staff-detail-head h2 { font-size: 1.5rem; margin-bottom: 4px; }
.staff-detail-head .role { color: var(--primary); font-weight: 600; font-size: 0.9rem; }
.detail-section { margin-top: 28px; }
.detail-section h4 {
  font-size: 0.72rem; font-family: var(--mono); letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px;
}
.detail-section p { font-size: 0.9rem; color: var(--muted); }

.skill-list { display: flex; flex-direction: column; gap: 12px; }
.skill-row { display: grid; grid-template-columns: 130px 1fr 40px; gap: 14px; align-items: center; }
.skill-row .name { font-size: 0.84rem; color: var(--text-2); }
.skill-row .lv { font-family: var(--mono); font-size: 0.74rem; color: var(--muted-2); text-align: right; }
.skill-track {
  display: block; height: 6px; background: var(--surface-3);
  border-radius: var(--radius-pill); overflow: hidden;
}
.skill-fill {
  display: block; height: 100%; background: var(--primary);
  border-radius: var(--radius-pill);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline { list-style: none; border-left: 1px solid var(--border); margin-left: 4px; }
.timeline li { position: relative; padding: 0 0 20px 22px; }
.timeline li::before {
  content: ""; position: absolute; left: -4px; top: 9px;
  width: 7px; height: 7px; border-radius: var(--radius-pill);
  background: var(--primary);
}
.timeline .year { font-family: var(--mono); font-size: 0.74rem; color: var(--muted-2); }
.timeline .what { font-size: 0.88rem; color: var(--text-2); }
.timeline .where { font-size: 0.78rem; color: var(--muted-2); }

.quote-line {
  border-left: 2px solid var(--primary); background: var(--surface-2);
  padding: 16px 20px; font-size: 0.92rem; color: var(--text-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.link-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 900px) {
  .split, .faq-layout { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse .split-visual { order: 0; }
  .column-featured { grid-template-columns: 1fr; }
  .column-featured .cover { border-right: none; border-bottom: 1px solid var(--border); min-height: 180px; }
  .article-layout, .lesson-layout { grid-template-columns: 1fr; gap: 28px; }
  .article-toc, .lesson-sidebar { position: static; order: -1; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  section { padding: 60px 0; }
  .hero { padding: 60px 0 48px; }
  .about-card { grid-template-columns: 1fr; text-align: center; }
  .about-card .avatar { margin: 0 auto; }
  .footer-top { grid-template-columns: 1fr; gap: 26px; }
  .skill-row { grid-template-columns: 104px 1fr 36px; }
  .modal-body { padding: 26px 22px; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 72px; left: 24px; right: 24px;
    flex-direction: column; align-items: stretch; padding: 10px;
    background: rgba(22, 22, 30, 0.98); backdrop-filter: blur(14px);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 12px; }
  .btn-login { margin-left: 0; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
  .column-card:hover, .staff-card:hover { transform: none; }
}
