/* Pythonやろうぜ!! — トップページ デザインシステム（ゲームUI / ネオブルータリズム） */

:root {
  --brand-pink: #ff2d6e;
  --brand-blue: #00a2ff;
  --brand-navy: #0d1420;

  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-border: #111111;
  --color-text: #111111;
  --color-muted: #5a6270;

  --container-max: 1200px;
  --band-padding-y: clamp(48px, 7vw, 88px);

  --radius-card: 4px;

  /* ハードシャドウ（ぼかしゼロ） */
  --shadow-hard: 6px 6px 0 var(--color-border);
  --shadow-hard-sm: 4px 4px 0 var(--color-border);

  --chapter-1: #88B68F;
  --chapter-2: #D9A573;
  --chapter-3: #C9BE7F;
  --chapter-4: #7FA7C7;
  --chapter-5: #B28392;
  --chapter-6: #9C7EAB;
  --chapter-7: #3A3A3A;
}

.site-main {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.band {
  position: relative;
  width: 100%;
  padding: var(--band-padding-y) 0;
  overflow: hidden;
}

.container {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================== Hero ===================== */
.band--hero {
  background-color: #ffffff;
  padding-top: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

/* 斜めのピンク/ブルー背景パネル */
.band--hero::before,
.band--hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 42%;
  z-index: 0;
}

.band--hero::before {
  left: 0;
  background: rgba(255, 45, 110, 0.10);
  clip-path: polygon(0 0, 100% 0, 55% 100%, 0 100%);
}

.band--hero::after {
  right: 0;
  background: rgba(0, 162, 255, 0.10);
  clip-path: polygon(45% 0, 100% 0, 100% 100%, 0 100%);
}

/* アクセントの斜めライン */
.hero-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-lines::before,
.hero-lines::after {
  content: "";
  position: absolute;
  top: -20px;
  width: 3px;
  height: 120px;
  transform: rotate(24deg);
}

.hero-lines::before {
  left: 30%;
  background: var(--brand-pink);
}

.hero-lines::after {
  right: 30%;
  background: var(--brand-blue);
}

/* キャラクター（カードの背面・左右） */
.hero-chara {
  position: absolute;
  bottom: 0;
  z-index: 1;
  width: clamp(140px, 18vw, 250px);
  height: auto;
  pointer-events: none;
}

.hero-chara--left {
  left: max(2vw, calc(50% - 620px));
}

.hero-chara--right {
  right: max(2vw, calc(50% - 620px));
}

/* 中央カード */
.hero-card {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 48px);
  background: #fff;
  border: 3px solid var(--color-border);
  box-shadow: var(--shadow-hard);
  text-align: center;
}

.hero-card__badge {
  display: inline-block;
  padding: 5px 16px;
  margin-bottom: 20px;
  border: 2px solid var(--color-border);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--color-text);
}

.hero-card__badge::before {
  content: "■ ";
  color: var(--brand-pink);
}

.hero-card__title {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 6.5vw, 4.2rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.hero-card__title .t-black {
  color: var(--color-text);
  text-shadow: 3px 3px 0 rgba(17, 17, 17, 0.15);
}

.hero-card__title .t-pink {
  color: var(--brand-pink);
  text-shadow: 3px 3px 0 rgba(255, 45, 110, 0.2);
}

.hero-card__lead {
  margin: 0 0 28px;
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  font-weight: 700;
  line-height: 1.9;
  color: var(--color-text);
}

.hero-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* CTA下：最新動画サムネ付きの横長ボタン */
.hero-card__yt-btn {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 420px;
  margin: 18px auto 0;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-hard-sm);
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.hero-card__yt-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--color-border);
}

.hero-card__yt-btn:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 var(--color-border);
}

.hero-card__yt-thumb {
  flex: 0 0 auto;
  width: 120px;
  aspect-ratio: 16 / 9;
  background: #111;
  border-right: 2px solid var(--color-border);
  overflow: hidden;
}

.hero-card__yt-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card__yt-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
}

.hero-card__yt-kicker {
  font-size: 0.72rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.06em;
  color: var(--color-text);
  line-height: 1.2;
}

.hero-card__yt-kicker .t-pink {
  color: var(--brand-pink);
}

.hero-card__yt-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-muted, #5a6270);
}

/* ===================== ボタン（ハードシャドウ） ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 900;
  font-style: italic;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-card);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--color-border);
  text-decoration: none;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--color-border);
}

.btn--blue {
  background: var(--brand-blue);
  color: #fff;
}

.btn--blue:hover { color: #fff; }

.btn--pink {
  background: var(--brand-pink);
  color: #fff;
}

.btn--pink:hover { color: #fff; }

.btn--outline {
  background: #fff;
  color: var(--color-text);
}

.btn--outline:hover { color: var(--color-text); }

.btn--sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

/* ===================== セクション見出し ===================== */
.step-head {
  margin-bottom: 36px;
}

.step-head__label {
  display: inline-block;
  padding: 4px 18px;
  margin-bottom: 12px;
  background: var(--color-border);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.18em;
  transform: skewX(-12deg);
}

.band--step2 .step-head__label {
  background: var(--brand-pink);
}

.step-head__title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 900;
  font-style: italic;
  color: var(--color-text);
}

.step-head__sub {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-muted);
}

/* ===================== STEP1 ===================== */
.band--step1 {
  background-color: #f4f6f9;
  background-image: radial-gradient(circle, rgba(13, 20, 32, 0.05) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* 章タブ — 斜めパラレログラム（ゲームUI）。折り返して全タブ常時表示 */
.chapter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 12px;
  margin: 0 0 28px;
  overflow: visible;
}

.chapter-tab {
  flex: 0 0 auto;
  padding: 10px clamp(10px, 1.6vw, 22px);
  border: 2px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  font-family: inherit;
  font-size: clamp(0.72rem, 1.1vw, 0.85rem);
  font-weight: 900;
  cursor: pointer;
  transform: skewX(-14deg);
  box-shadow: 3px 3px 0 var(--color-border);
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
  outline: none;
  position: relative;
}

.chapter-tab:focus-visible {
  outline: 3px solid #00a2ff;
  outline-offset: 3px;
  z-index: 1;
}

.chapter-tab > span {
  display: inline-block;
  transform: skewX(14deg);
  white-space: nowrap;
}

.chapter-tab .tab-ch {
  font-style: italic;
  margin-right: 6px;
  color: var(--color-muted);
}

.chapter-tab:hover {
  transform: skewX(-14deg) translate(-1px, -1px);
}

.chapter-tab.active {
  background: var(--brand-navy);
  color: #fff;
  border-bottom: 4px solid var(--tab-accent, var(--brand-blue));
}

.chapter-tab.active .tab-ch {
  color: var(--tab-accent, var(--brand-blue));
}

/* 学習パスの案内バッジ */
.path-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 18px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-muted);
}

.path-badge {
  display: inline-block;
  padding: 4px 10px;
  border: 2px solid var(--color-border);
  font-size: 0.72rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.04em;
  color: #fff;
}

.path-badge--browser {
  background: var(--brand-blue);
}

.path-badge--setup {
  background: var(--brand-pink);
}

.chapter-next {
  margin-top: 28px;
  padding: 18px 20px;
  border: 2px solid var(--color-border);
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chapter-next__text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 900;
  font-style: italic;
  color: var(--color-text);
}

/* パネル — 枠なし、カードを直接置く */
.chapter-panels {
  border: none;
  background: transparent;
}

.chapter-panel {
  display: none;
  padding: 4px;
}

.chapter-panel.active {
  display: block;
}

/* STEP1 単元カード — 白 + 黒枠 + ハードシャドウ */
.band--step1 .video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}

.band--step1 .video-card {
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: 0;
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.band--step1 .video-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--color-border);
}

.band--step1 .video-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.band--step1 .video-card p {
  padding: 9px 10px;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  border-top: 2px solid var(--color-border);
}

.band--step1 .video-card a {
  text-decoration: none;
  color: inherit;
}

.band--step1 .video-card a:hover p {
  color: inherit;
  text-decoration: none;
}

/* ===================== 学習ライブラリ（付箋ボタン） ===================== */
.band--library {
  padding-top: clamp(20px, 3vw, 32px);
}

/* step1 共通カードスタイルを上書き（二重クラス時） */
.band--step1.band--library .video-card {
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  text-align: center;
}

.band--step1.band--library .video-card:hover {
  transform: none;
  box-shadow: none;
}

.band--library .video-grid {
  gap: 28px 18px;
}

.band--library .video-card {
  position: relative;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* サムネ＋付箋を一枚のシルエットとして影付け */
  filter: drop-shadow(4px 4px 0 var(--color-border));
}

.band--library .progress-note {
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #5a6270;
  line-height: 1.5;
}

.band--library .progress-done,
.band--library .progress-seen,
.band--library .progress-partial,
.create-card .progress-done,
.create-card .progress-seen,
.create-card .progress-partial,
.band--gui-hub .progress-done,
.band--gui-hub .progress-seen,
.band--gui-hub .progress-partial {
  position: absolute;
  top: -8px;
  right: -6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 4px 8px;
  color: #fff;
  border: 2px solid #111;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  pointer-events: none;
}

.band--library .progress-done,
.create-card .progress-done,
.band--gui-hub .progress-done {
  background: var(--color-pink, #ff2d6e);
}

.band--library .progress-seen,
.create-card .progress-seen,
.band--gui-hub .progress-seen {
  background: #5a6270;
  min-width: 44px;
}

.band--library .progress-partial,
.create-card .progress-partial,
.band--gui-hub .progress-partial {
  background: #d97706;
  min-width: 48px;
}

.band--library .video-card:hover {
  transform: none;
  box-shadow: none;
  filter: drop-shadow(4px 4px 0 var(--color-border));
}

.band--library .video-card > img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
  border: 2px solid var(--color-border);
  box-shadow: none;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  background: #fff;
}

.band--library .video-card .card-actions {
  display: flex;
  justify-content: stretch;
  gap: 0;
  width: 100%;
  max-width: none;
  padding: 0;
  margin-top: -2px;
  border: none;
  background: transparent;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.band--library .card-btn {
  flex: 1 1 0;
  max-width: none;
  min-width: 0;
  text-align: center;
  padding: 14px 4px 8px;
  text-decoration: none;
  font-weight: 900;
  font-size: 0.72rem;
  font-style: italic;
  white-space: nowrap;
  border-radius: 0;
  border: 2px solid var(--color-border);
  border-top: none;
  box-shadow: none;
  transform: none;
  transition: transform 0.12s ease, background 0.12s ease;
}

.band--library .card-btn + .card-btn {
  border-left-width: 2px; /* 仕切り線（隙間なし） */
}

.band--library .card-btn.explain-btn {
  background: #fff5f8;
  color: #8a1a45;
}

.band--library .card-btn.problem-btn {
  background: #f3faff;
  color: #0a4a7a;
}

.band--library .card-actions .card-btn:only-child {
  transform: none;
}

.band--library .card-btn:hover {
  filter: none;
  text-decoration: none;
  z-index: 3;
  transform: translateY(2px);
}

.band--library .card-btn.explain-btn:hover {
  color: #8a1a45;
  background: #ffebf1;
}

.band--library .card-btn.problem-btn:hover {
  color: #0a4a7a;
  background: #e8f5ff;
}

.band--library .card-btn:active {
  transform: translateY(3px);
}

.band--library .mobile-chapters .gui summary {
  background: var(--chapter-7);
  color: #fff;
}

.band--library .mobile-chapters .gui[open] .problem-group {
  background: color-mix(in srgb, var(--chapter-7) 12%, #fff);
}

/* ===================== お問い合わせ ===================== */
.band--contact {
  background-color: #f4f6f9;
  background-image: radial-gradient(circle, rgba(13, 20, 32, 0.05) 1px, transparent 1px);
  background-size: 18px 18px;
  padding-top: clamp(20px, 3vw, 32px);
}

.container--narrow {
  max-width: 800px;
}

.contact-panel {
  background: #fff;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-hard-sm);
  padding: clamp(20px, 4vw, 32px);
}

.contact-lead {
  margin: 0 0 24px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.8;
  color: var(--color-text);
}

.contact-form-frame {
  border: 2px solid var(--color-border);
  background: #fff;
  overflow: hidden;
  margin-bottom: 24px;
}

.contact-form-frame iframe {
  display: block;
  width: 100%;
  /* Googleフォーム全体が収まる高さ（iframe内スクロールを避ける） */
  height: 1100px;
  border: 0;
  overflow: hidden;
}

@media (max-width: 780px) {
  .contact-form-frame {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .contact-form-frame iframe {
    /* 固定の過大な高さはやめ、画面内で操作できる高さ + 内側スクロール */
    height: min(75vh, 900px);
    min-height: 640px;
  }
}

.contact-mail {
  border: 2px solid var(--color-border);
  background: #f3faff;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.contact-mail__label {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 10px;
  background: var(--brand-blue);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.08em;
  border: 1px solid var(--color-border);
}

.contact-mail__address {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-text);
  word-break: break-all;
}

.contact-mail__hint {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-muted);
}

.contact-note {
  margin: 0;
  padding: 12px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-muted);
  line-height: 1.7;
}

.contact-note p {
  margin: 0 0 4px;
}

/* ===================== フリープログラミング ===================== */
.band--free {
  background-color: #f4f6f9;
  background-image: radial-gradient(circle, rgba(13, 20, 32, 0.05) 1px, transparent 1px);
  background-size: 18px 18px;
  padding-top: clamp(20px, 3vw, 32px);
}

.free-panel {
  background: #fff;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-hard-sm);
  padding: clamp(16px, 3vw, 28px);
  margin-bottom: 40px;
}

.free-lead {
  margin: 0 0 16px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.8;
  color: var(--color-text);
}

.free-prompts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 20px;
}

.free-prompts__label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #5a6270;
}

.free-pane-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 12px;
  background: var(--color-border);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.1em;
}

.band--free .free-code-twin {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  width: 100%;
}

.band--free .free-code-input,
.band--free .free-code-output {
  width: 100%;
  min-width: 0;
}

.band--free .CodeMirror {
  border: 2px solid var(--color-border);
  border-radius: 0;
  height: 360px; /* auto+min-heightだと横スクロールが中途半端な位置に出る */
  font-size: 14px;
}

.band--free .CodeMirror-scroll {
  min-height: 100%;
}

.band--free .free-run-btn {
  width: 100%;
  margin-top: 14px;
  box-sizing: border-box;
}

.band--free .free-output,
.band--free .output.free-output {
  background: #0d1420;
  border: 2px solid var(--color-border);
  border-radius: 0;
  padding: 16px;
  font-family: "Courier New", Monaco, monospace;
  min-height: 200px;
  height: auto;
  color: #7dffa3;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  overflow-y: auto;
  white-space: pre-wrap;
  box-shadow: none;
}

.band--free .friendly-error__tip {
  color: #7dffa3;
  font-family: inherit;
  font-weight: 700;
  white-space: normal;
}

.band--free .friendly-error__raw {
  color: #9da5b4;
  font-size: 0.78rem;
  white-space: pre-wrap;
}

.band--free .problem {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

.free-section {
  margin-bottom: 36px;
}

.free-section__title {
  margin: 0 0 6px;
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 900;
  font-style: italic;
  color: var(--color-text);
}

.free-section__sub {
  margin: 0 0 16px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-muted);
}

.free-table-wrap {
  border: 2px solid var(--color-border);
  border-radius: 0;
  box-shadow: var(--shadow-hard-sm);
  background: #fff;
  overflow-x: auto;
}

.band--free .free-table,
.band--free .free-table.responsive-table {
  margin: 0;
  border-collapse: collapse;
  width: 100%;
  background: #fff;
}

.band--free .free-table th,
.band--free .free-table td {
  border: 1px solid var(--color-border);
  padding: 10px 12px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 700;
  vertical-align: top;
}

.band--free .free-table th {
  background: var(--brand-navy);
  color: #fff;
  font-style: italic;
}

.band--free .free-table code {
  font-size: 0.8rem;
  background: #f4f6f9;
  padding: 2px 6px;
  border: 1px solid #d0d5dd;
}

.free-canvas {
  min-height: 80px;
  border: 2px dashed var(--color-border);
  background: #fff;
  padding: 12px;
}

@media (max-width: 899px) {
  .band--free .CodeMirror {
    height: 220px;
    font-size: 16px;
  }
}

@media (min-width: 900px) {
  .band--free .free-code-twin {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: stretch;
  }

  .band--free .free-output {
    min-height: 320px;
    height: calc(100% - 36px);
  }
}

/* ===================== 斜めシャウトバンド ===================== */
.band--shout {
  background: var(--brand-blue);
  padding: clamp(48px, 8vw, 96px) 0;
  clip-path: polygon(0 18%, 100% 0, 100% 82%, 0 100%);
  margin: -12px 0;
  z-index: 1;
}

.shout__text {
  margin: 0;
  text-align: center;
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 4px 4px 0 var(--color-border);
}

/* ===================== STEP2 ===================== */
.band--step2 {
  background-color: #ffffff;
  background-image: repeating-linear-gradient(
    -12deg,
    transparent,
    transparent 40px,
    rgba(255, 45, 110, 0.05) 40px,
    rgba(255, 45, 110, 0.05) 41px
  );
}

.step2-banner-wrap {
  width: 100%;
  max-width: 560px;
  margin: 0 0 22px;
  border: 3px solid var(--color-border);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}

.step2-banner__img {
  display: block;
  width: 100%;
  height: auto;
}

.create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
  align-items: stretch;
  padding: 4px;
}

.create-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 2px solid var(--color-border);
  overflow: visible;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.create-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--color-border);
  text-decoration: none;
  color: inherit;
}

.create-card__thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
  border-bottom: 2px solid var(--color-border);
}

.create-card__body {
  display: flex;
  flex: 1;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  background: #fff;
  font-weight: 700;
  font-size: 0.78rem;
}

.create-card__label {
  line-height: 1.4;
}

.create-card__arrow {
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--brand-pink);
}

/* GUI ハブ（レッスンカード＋進捗バッジ） */
.band--gui-hub .video-card {
  position: relative;
  overflow: visible;
}

/* ハブ下部: STEP1 事前学習（既定閉じ・レッスンより控えめ） */
.hub-prep {
  max-width: 920px;
  margin: 28px auto 8px;
  border: 1px solid #c5ccd6;
  background: #f7f8fa;
}

.hub-prep__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 700;
  color: #3a4250;
}

.hub-prep__summary::-webkit-details-marker {
  display: none;
}

.hub-prep__summary-label::before {
  content: "▸ ";
  color: #7a8494;
}

.hub-prep[open] .hub-prep__summary-label::before {
  content: "▾ ";
}

.hub-prep__count {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #5a6270;
}

.hub-prep__body {
  padding: 0 16px 14px;
  border-top: 1px solid #d8dde5;
}

.hub-prep__lead {
  margin: 12px 0 10px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
  color: #6b7380;
}

.hub-prep__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hub-prep__item {
  position: relative;
  margin: 0;
  border-top: 1px solid #e4e7ec;
}

.hub-prep__item:first-child {
  border-top: none;
}

.hub-prep__link {
  display: block;
  padding: 10px 56px 10px 4px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #2b3340;
  text-decoration: none;
}

.hub-prep__link:hover {
  color: var(--brand-blue, #00a2ff);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hub-prep__item--ch1 .hub-prep__link {
  font-weight: 800;
}

.band--gui-hub .hub-prep .progress-done,
.band--gui-hub .hub-prep .progress-seen,
.band--gui-hub .hub-prep .progress-partial {
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  min-width: 44px;
  font-size: 0.62rem;
}

/* ===================== NEWS ===================== */
.band--news {
  background-color: #f4f6f9;
  padding-top: clamp(20px, 3vw, 32px);
}

.news-head {
  margin: 0 0 24px;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 900;
  font-style: italic;
}

.news-timeline {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  border: 2px solid var(--color-border);
  background: #fff;
  box-shadow: var(--shadow-hard-sm);
}

.news-row {
  display: grid;
  grid-template-columns: 110px auto 1fr;
  gap: 12px 16px;
  align-items: baseline;
  padding: 16px 20px;
  border-bottom: 2px solid var(--color-border);
  transition: transform 0.12s ease;
}

.news-row:last-child {
  border-bottom: none;
}

.news-row:hover {
  transform: translateX(6px);
}

.news-row__date {
  font-weight: 900;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--brand-blue);
}

.news-row__badge {
  color: var(--brand-pink);
  font-size: 0.72rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.1em;
}

.news-row__badge[hidden] {
  display: none;
}

.news-row__text {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-text);
}

.news-row__text a {
  color: var(--brand-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.news-actions {
  text-align: center;
}

/* ===================== SPアコーディオン（6章） ===================== */
.mobile-chapters {
  display: none;
}

.band--step1 .mobile-chapters .problem-category {
  border-radius: 0;
  box-shadow: var(--shadow-hard-sm);
  border: 2px solid var(--color-border);
  background: #fff;
  width: 100%;
  max-width: none;
  margin: 14px 0;
}

.band--step1 .mobile-chapters .problem-category summary {
  border-radius: 0;
  font-weight: 900;
}

.band--step1 .mobile-chapters .beginner summary { background: var(--chapter-1); }
.band--step1 .mobile-chapters .setup summary { background: var(--chapter-2); }
.band--step1 .mobile-chapters .VSCode-challenge summary { background: var(--chapter-3); }
.band--step1 .mobile-chapters .standard-library summary { background: var(--chapter-4); }
.band--step1 .mobile-chapters .external-library summary { background: var(--chapter-5); }
.band--step1 .mobile-chapters .additional summary { background: var(--chapter-6); }

.band--step1 .mobile-chapters .beginner[open] .problem-group { background: color-mix(in srgb, var(--chapter-1) 20%, #fff); }
.band--step1 .mobile-chapters .setup[open] .problem-group { background: color-mix(in srgb, var(--chapter-2) 20%, #fff); }
.band--step1 .mobile-chapters .VSCode-challenge[open] .problem-group { background: color-mix(in srgb, var(--chapter-3) 20%, #fff); }
.band--step1 .mobile-chapters .standard-library[open] .problem-group { background: color-mix(in srgb, var(--chapter-4) 20%, #fff); }
.band--step1 .mobile-chapters .external-library[open] .problem-group { background: color-mix(in srgb, var(--chapter-5) 20%, #fff); }
.band--step1 .mobile-chapters .additional[open] .problem-group { background: color-mix(in srgb, var(--chapter-6) 20%, #fff); }

.band--step1 .mobile-chapters .video-card {
  border: 2px solid var(--color-border);
  border-radius: 0;
  box-shadow: none;
}

.band--step1.band--library .mobile-chapters .video-card {
  border: none;
  background: transparent;
  box-shadow: none;
}

/* ===================== レスポンシブ ===================== */
@media (max-width: 780px) {
  .hero-chara {
    width: clamp(80px, 16vw, 120px);
    opacity: 0.9;
  }

  .hero-chara--left { left: -12px; }
  .hero-chara--right { right: -12px; }

  .hero-card {
    padding: 28px 18px;
    max-width: 720px;
  }

  .hero-card__yt-btn {
    max-width: 100%;
  }

  .hero-card__yt-thumb {
    width: 96px;
  }

  .band--hero::before,
  .band--hero::after {
    width: 55%;
  }

  /* index / library のみアコーディオンへ切替（チートシート等はタブを残す） */
  .band--step1 .chapter-tabs,
  .band--step1 .chapter-panels,
  .band--library .chapter-tabs,
  .band--library .chapter-panels {
    display: none;
  }

  .mobile-chapters {
    display: block;
  }

  .create-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .step2-banner-wrap {
    max-width: 100%;
  }

  .news-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .container {
    padding: 0 16px;
  }
}
