/* ==========================================================
   無課金ゼミナール — 学園ポップ・テーマ
   3カラム / 黒板ヒーロー / カードUI
   ========================================================== */
:root {
  --cream: #FFF8EE;
  --cream-2: #FFF3E2;
  --paper: #FFFFFF;
  --ink: #1E1B33;
  --ink-2: #5E5A7B;
  --ink-3: #8B87A6;
  --line: #1E1B33;

  --pink: #FF5F97;
  --pink-soft: #FFE3EE;
  --yellow: #FFD23F;
  --yellow-soft: #FFF3C4;
  --cyan: #23C4DE;
  --cyan-soft: #D6F5FA;
  --green: #45C66A;
  --green-soft: #DCF5E2;
  --purple: #9270FF;
  --purple-soft: #E9E2FF;
  --orange: #FF9F43;
  --orange-soft: #FFE9D2;
  --board: #1F4437;
  --board-dark: #143027;

  --r-lg: 26px;
  --r: 18px;
  --r-sm: 12px;
  --pop: 5px 5px 0 var(--line);
  --pop-lg: 9px 9px 0 var(--line);
  --soft: 0 14px 34px rgba(30, 27, 51, .10);

  --font: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --header-h: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    linear-gradient(rgba(30, 27, 51, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 27, 51, .035) 1px, transparent 1px),
    radial-gradient(circle at 12% -8%, #FFE9F2 0 22%, transparent 45%),
    radial-gradient(circle at 92% 4%, #E4F8FC 0 18%, transparent 40%);
  background-size: 26px 26px, 26px 26px, 100% 100%, 100% 100%;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }
svg { display: block; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------- header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 248, 238, .88);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 3px solid var(--line);
}
.header-inner {
  width: min(1440px, 100% - 40px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 26px;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand-mark {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: #fff;
  object-fit: cover;
  box-shadow: 3px 3px 0 var(--line);
}
.brand-text {
  display: flex; flex-direction: column;
  font-weight: 800; font-size: 18px; line-height: 1.15; letter-spacing: .02em;
}
.brand-text small { font-size: 10.5px; font-weight: 700; color: var(--pink); letter-spacing: .16em; }

.primary-nav { display: flex; gap: 2px; }
.primary-nav a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13.5px; font-weight: 800;
  color: var(--ink-2);
  transition: background .16s, color .16s, transform .16s;
}
.primary-nav svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.primary-nav a:hover { background: #fff; color: var(--ink); transform: translateY(-1px); }
.primary-nav a.is-active { background: var(--ink); color: #fff; }

.search {
  margin-left: auto;
  display: flex; align-items: center; gap: 9px;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 999px;
  padding: 7px 8px 7px 14px;
  box-shadow: 3px 3px 0 var(--line);
  transition: transform .14s, box-shadow .14s;
  width: min(330px, 100%);
}
.search:focus-within { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--line); }
.search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink); stroke-width: 2.3; stroke-linecap: round; }
.search input {
  border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 14px; font-weight: 600;
  width: 100%; color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); font-weight: 500; }
.search kbd {
  flex: none;
  font-family: inherit; font-size: 11px; font-weight: 800;
  color: var(--ink-2);
  background: var(--cream-2);
  border: 2px solid var(--line);
  border-radius: 7px;
  padding: 1px 7px;
  line-height: 1.5;
}

/* ---------------- shell ---------------- */
.shell {
  width: min(1440px, 100% - 40px);
  margin: 26px auto 0;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 296px;
  gap: 26px;
  align-items: start;
}
.main { min-width: 0; padding-bottom: 40px; }

.rail { position: sticky; top: calc(var(--header-h) + 26px); display: flex; flex-direction: column; gap: 16px; }

.rail-card {
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: var(--r);
  box-shadow: 4px 4px 0 var(--line);
  padding: 15px 15px 16px;
}
.rail-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: .06em;
  color: var(--ink-2);
  margin-bottom: 11px;
}
.rail-head svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

/* 学習の流れ */
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.steps li { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; font-weight: 700; line-height: 1.5; }
.steps b {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--yellow); border: 2.5px solid var(--line);
  font-size: 11px; font-weight: 800;
}
.steps span { padding-top: 1px; color: var(--ink-2); }

/* 区分ナビ */
.catnav { display: flex; flex-direction: column; gap: 4px; }
.catnav a {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border-radius: 11px;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  transition: background .14s, color .14s;
}
.catnav a:hover { background: var(--cream); color: var(--ink); }
.catnav a.is-active { background: var(--ink); color: #fff; }
.dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.dot-U { background: var(--cyan); }
.dot-T { background: var(--yellow); }
.dot-K { background: var(--green); }
.dot-C { background: var(--pink); }
.dot-S { background: var(--purple); }
.catnav .n { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--ink-3); }
.catnav a.is-active .n { color: rgba(255,255,255,.7); }

/* ミニ進捗 */
.mini { display: flex; align-items: center; gap: 12px; }
.ring { flex: none; width: 62px; height: 62px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .bg { stroke: #EFECF8; }
.ring .fg { stroke: var(--pink); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.mini-txt b { display: block; font-size: 20px; font-weight: 800; line-height: 1.1; }
.mini-txt span { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }

/* 今日の1本 */
.pick-thumb { border: 2.5px solid var(--line); border-radius: 11px; overflow: hidden; margin-bottom: 9px; aspect-ratio: 16/9; background: var(--cyan-soft); }
.pick-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pick-title { font-size: 13px; font-weight: 800; line-height: 1.45; margin: 0 0 6px; }
.pick-meta { font-size: 11px; font-weight: 700; color: var(--ink-3); }

/* お知らせ */
.news { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.news li { display: flex; gap: 8px; font-size: 12px; font-weight: 700; color: var(--ink-2); line-height: 1.5; }
.news i {
  flex: none; font-style: normal; font-size: 10px; font-weight: 800;
  background: var(--cyan-soft); border: 2px solid var(--line); border-radius: 7px;
  padding: 0 6px; height: 18px; line-height: 15px; margin-top: 2px;
}

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  border: 3px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--pop-lg);
  overflow: hidden;
  background: var(--cream-2);
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 42%;
  z-index: -2;
}
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(95deg, rgba(255,248,238,.97) 0%, rgba(255,248,238,.9) 38%, rgba(255,248,238,.15) 68%, rgba(20,48,39,.05) 100%);
}
.hero-body { padding: 26px 28px 24px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.chalk {
  max-width: 560px;
  background:
    repeating-linear-gradient(92deg, rgba(255,255,255,.025) 0 2px, transparent 2px 5px),
    radial-gradient(circle at 20% 15%, rgba(255,255,255,.07), transparent 45%),
    linear-gradient(160deg, var(--board) 0%, var(--board-dark) 100%);
  border: 3px solid #0F2A22;
  border-radius: 20px;
  box-shadow: 6px 6px 0 rgba(30,27,51,.85);
  padding: 22px 24px 24px;
  color: #F3FFF8;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--yellow); color: var(--ink);
  border: 2.5px solid var(--line);
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 11px; font-weight: 800; letter-spacing: .1em;
}
.chalk h1 {
  margin: 12px 0 8px;
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: .01em;
  text-shadow: 0 2px 0 rgba(0,0,0,.18);
}
.chalk h1 em {
  font-style: normal;
  color: var(--yellow);
  background: linear-gradient(transparent 68%, rgba(255,210,63,.32) 68%);
}
.chalk p { margin: 0; color: #CFE9DA; font-size: 14px; font-weight: 500; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.hero-stats { display: flex; gap: 9px; flex-wrap: wrap; }
.stat {
  background: rgba(255,255,255,.94);
  border: 2.5px solid var(--line);
  border-radius: 13px;
  padding: 7px 15px;
  box-shadow: 3px 3px 0 var(--line);
  text-align: center; min-width: 88px;
  backdrop-filter: blur(4px);
}
.stat b { display: block; font-size: 21px; font-weight: 800; line-height: 1.15; }
.stat span { font-size: 10.5px; font-weight: 800; color: var(--ink-2); letter-spacing: .06em; }

/* ---------------- gate hero（校門・看板） ---------------- */
.hero-gate {
  min-height: 600px;
  display: grid;
  align-items: end;
  justify-items: center;
  background: #2A2A35;
}
.hero-gate .hero-bg { object-position: center 38%; }
.hero-veil {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg,
    rgba(16, 22, 28, 0) 0%,
    rgba(16, 22, 28, .04) 42%,
    rgba(16, 22, 28, .52) 76%,
    rgba(14, 20, 26, .74) 100%);
}
.hero-content {
  position: relative; z-index: 1;
  display: grid; justify-items: center; gap: 15px;
  padding: 28px 24px 32px;
  text-align: center;
}
.hero-tag {
  background: rgba(255, 255, 255, .94);
  border: 2.5px solid var(--line);
  border-radius: 999px;
  padding: 3px 15px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .1em;
  box-shadow: 3px 3px 0 rgba(30, 27, 51, .85);
}

.gate { position: relative; transform: rotate(-1.4deg); margin-top: 2px; }
.board {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 15px;
  background: linear-gradient(180deg, #FFFDF7 0%, #FFF1D8 100%);
  border: 4px solid var(--line);
  border-radius: 18px;
  padding: 14px 30px 14px 18px;
  box-shadow: 9px 9px 0 rgba(30, 27, 51, .92);
}
.board::after {
  content: ""; position: absolute; inset: 6px;
  border: 2px solid rgba(255, 159, 67, .55);
  border-radius: 12px;
  pointer-events: none;
}
.board-logo {
  border-radius: 50%; border: 3px solid var(--line);
  background: #fff; flex: none;
}
.board-txt { text-align: left; }
.board-name {
  margin: 0;
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 800; line-height: 1.1; letter-spacing: .05em;
}
.board-sub {
  margin: 5px 0 0;
  font-size: 10.5px; font-weight: 800; letter-spacing: .2em;
  color: #8A6A3C;
}
.post {
  position: absolute; top: calc(100% - 6px);
  width: 16px; height: 42px;
  background: linear-gradient(90deg, #BC8347, #8A5A2E);
  border: 3px solid var(--line);
  border-radius: 0 0 5px 5px;
}
.post-l { left: 15%; }
.post-r { right: 15%; }

.hero-copy {
  margin: 12px 0 0;
  color: #fff;
  font-size: clamp(13px, 1.6vw, 15.5px);
  font-weight: 700; line-height: 1.75;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
}
.hero-copy em { font-style: normal; color: var(--yellow); font-size: 1.16em; }
.hero-gate .hero-actions { margin-top: 2px; }
.hero-gate .hero-stats { margin-top: 2px; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 2.5px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13.5px; font-weight: 800;
  background: var(--paper); color: var(--ink);
  box-shadow: 4px 4px 0 var(--line);
  cursor: pointer;
  transition: transform .1s, box-shadow .1s, background .15s;
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--line); }
.btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.btn.primary { background: var(--pink); color: #fff; }
.btn.play { background: var(--yellow); }
.btn:disabled { background: #F2EFF8; color: #A9A5BE; box-shadow: none; cursor: not-allowed; border-color: #C9C5D8; }
.btn-light { background: var(--paper); color: var(--ink); }

/* ---------------- section head ---------------- */
.section-head { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 14px; }
.section-head h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: .01em; }
.section-head .note { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.section-head .more { margin-left: auto; font-size: 12.5px; font-weight: 800; color: var(--pink); }

/* ---------------- steps strip ---------------- */
.howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.howto div {
  position: relative;
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: var(--r);
  box-shadow: 4px 4px 0 var(--line);
  padding: 15px 16px 15px 54px;
}
.howto b {
  position: absolute; left: 14px; top: 14px;
  width: 27px; height: 27px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2.5px solid var(--line);
  background: var(--cyan); color: #fff;
  font-size: 12px; font-weight: 800;
}
.howto h3 { margin: 0 0 3px; font-size: 14px; font-weight: 800; }
.howto p { margin: 0; font-size: 11.5px; font-weight: 600; color: var(--ink-2); line-height: 1.5; }

/* ---------------- tabs ---------------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  border: 2.5px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 6px 15px;
  font-size: 13px; font-weight: 800;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--line);
  transition: transform .1s, background .15s, color .15s;
}
.tab:hover { transform: translate(-1px, -1px); }
.tab[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tab .count { font-size: 11px; color: var(--ink-3); margin-left: 6px; font-weight: 800; }
.tab[aria-pressed="true"] .count { color: rgba(255,255,255,.7); }

/* ---------------- course grid ---------------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--pop);
  overflow: hidden;
  transition: transform .16s, box-shadow .16s;
}
a.card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--line); }
.card-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--cyan-soft); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.noimg { background: repeating-linear-gradient(135deg, #FCFBFF 0 12px, #F1ECFF 12px 24px); position: relative; }
.noimg::after {
  content: "準備中"; position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: var(--ink-3); letter-spacing: .12em;
}
a.card:hover .card-thumb img { transform: scale(1.045); }
.card-body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-cat {
  align-self: flex-start;
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
  padding: 1px 9px; border-radius: 999px;
  border: 2px solid var(--line);
}
.card-title { margin: 0; font-size: 15px; font-weight: 800; line-height: 1.35; }
.card-meta { margin-top: auto; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; color: var(--ink-2); }
.cat-U { background: var(--cyan-soft); }
.cat-T { background: var(--yellow-soft); }
.cat-K { background: var(--green-soft); }
.cat-C { background: var(--pink-soft); }
.cat-S { background: var(--purple-soft); }

.bar { height: 8px; border-radius: 999px; background: #EFECF8; border: 2px solid var(--line); overflow: hidden; flex: 1; }
.bar > i { display: block; height: 100%; background: var(--pink); transition: width .5s ease; }

/* ---------------- unit list ---------------- */
.unit-list { display: flex; flex-direction: column; gap: 9px; }
.unit-row {
  display: flex; align-items: center; gap: 13px;
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: 14px;
  padding: 9px 13px 9px 9px;
  box-shadow: 4px 4px 0 var(--line);
  transition: transform .1s, box-shadow .1s;
}
.unit-row:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--line); }
.unit-no {
  flex: none; width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2.5px solid var(--line);
  background: var(--yellow);
  font-weight: 800; font-size: 13px;
}
.unit-main { flex: 1; min-width: 0; }
.unit-title { display: block; font-weight: 700; font-size: 14.5px; line-height: 1.4; }
.unit-sub { display: block; font-size: 11px; color: var(--ink-3); font-weight: 700; }
.unit-tags { display: flex; gap: 5px; flex: none; }
.tag {
  font-size: 10px; font-weight: 800; letter-spacing: .03em;
  padding: 1px 8px; border-radius: 999px;
  border: 2px solid var(--line);
  background: #F2EFF8; color: var(--ink-3);
  white-space: nowrap;
}
.tag.on { background: var(--green-soft); color: var(--ink); }
.tag.soon { background: #F7F4FF; color: #B0ACBF; }

/* ---------------- unit detail ---------------- */
.crumbs { font-size: 12.5px; font-weight: 700; color: var(--ink-3); margin: 0 0 12px; }
.crumbs a:hover { color: var(--pink); }
.unit-hero {
  display: grid; grid-template-columns: 380px 1fr; gap: 22px; align-items: start;
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--pop-lg);
  padding: 20px;
}
.unit-hero .thumb { border: 2.5px solid var(--line); border-radius: 15px; overflow: hidden; aspect-ratio: 16/9; }
.unit-h1 { margin: 5px 0 8px; font-size: clamp(21px, 2.6vw, 28px); font-weight: 800; line-height: 1.35; }
.unit-code { font-size: 11px; font-weight: 800; letter-spacing: .09em; color: var(--ink-3); }
.actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 16px; }
.state-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.state-btn {
  border: 2.5px solid var(--line); border-radius: 11px;
  background: var(--paper); padding: 6px 13px;
  font-size: 12.5px; font-weight: 800; cursor: pointer;
  transition: background .15s, color .15s;
}
.state-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------------- panels ---------------- */
.panel {
  margin-top: 18px;
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--pop);
  padding: 20px 22px;
}
.panel h2 { margin: 0 0 5px; font-size: 17px; font-weight: 800; }
.panel > p { margin: 0; color: var(--ink-2); font-size: 13.5px; }

.soon {
  display: grid; place-items: center; gap: 9px;
  text-align: center; padding: 26px 16px;
  border: 2.5px dashed #CFCADE;
  border-radius: 15px;
  background: repeating-linear-gradient(135deg, #FCFBFF 0 12px, #F5F2FF 12px 24px);
}
.soon-mark {
  width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--yellow); border: 2.5px solid var(--line);
  font-weight: 800; font-size: 11.5px;
}
.soon h3 { margin: 0; font-size: 15px; font-weight: 800; }
.soon p { margin: 0; max-width: 440px; font-size: 12.5px; color: var(--ink-2); }

/* ---------------- progress ---------------- */
.kpi { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.kpi .box {
  background: var(--paper); border: 2.5px solid var(--line); border-radius: var(--r);
  padding: 14px; box-shadow: 4px 4px 0 var(--line); text-align: center;
}
.kpi b { display: block; font-size: 26px; font-weight: 800; line-height: 1.2; }
.kpi span { font-size: 11.5px; font-weight: 800; color: var(--ink-3); }

.empty { text-align: center; color: var(--ink-3); padding: 38px 0; font-weight: 700; }

/* ---------------- footer ---------------- */
.site-footer { margin-top: 54px; border-top: 3px solid var(--line); background: var(--paper); }

.cta-band { position: relative; overflow: hidden; border-bottom: 3px solid var(--line); }
.cta-band > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 62%;
}
.cta-band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,32,26,.9) 0%, rgba(20,32,26,.72) 55%, rgba(20,32,26,.35) 100%);
}
.cta-inner {
  position: relative; z-index: 1;
  width: min(1180px, 100% - 40px);
  margin-inline: auto;
  display: flex; align-items: center; gap: 20px;
  padding: 34px 0;
  color: #fff;
}
.cta-mark { border-radius: 50%; border: 3px solid #fff; box-shadow: 4px 4px 0 rgba(0,0,0,.35); flex: none; }
.cta-inner h2 { margin: 0 0 3px; font-size: clamp(20px, 2.6vw, 28px); font-weight: 800; }
.cta-inner p { margin: 0; font-size: 13px; color: #E8F5EC; }
.cta-inner .btn { margin-left: auto; flex: none; }

.foot-cols {
  width: min(1180px, 100% - 40px);
  margin-inline: auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1.6fr; gap: 26px;
  padding: 30px 0 10px;
}
.foot-cols > div { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; }
.foot-cols a:hover { color: var(--pink); }
.foot-brand { margin: 0; font-size: 15px; font-weight: 800; }
.foot-head { margin: 0 0 3px; font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--ink-3); }
.copyright { margin: 0; padding: 0 0 26px; text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-3); }

/* ---------------- mobile tabbar ---------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: none;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-top: 3px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; font-weight: 800; color: var(--ink-3);
  padding: 4px 0; border-radius: 10px;
}
.tabbar svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.is-active { color: var(--pink); }

/* ---------------- responsive ---------------- */
@media (max-width: 1240px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
  .rail-right { display: none; }
}
@media (max-width: 1000px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail-left { display: none; }
  .primary-nav { display: none; }
  .hero-shade { background: linear-gradient(180deg, rgba(255,248,238,.9) 0%, rgba(255,248,238,.72) 60%, rgba(255,248,238,.35) 100%); }
}
@media (max-width: 760px) {
  .shell, .header-inner { width: calc(100% - 24px); }
  .shell { margin-top: 16px; }
  .brand-text { font-size: 15px; }
  .brand-text small { display: none; }
  .brand-mark { width: 40px; height: 40px; }
  .search { width: 44px; padding: 7px 10px; overflow: hidden; transition: width .2s ease; }
  .search input, .search kbd { width: 0; opacity: 0; padding: 0; border: 0; }
  .search svg { margin: 0 auto; }
  .search:focus-within { width: min(300px, 70vw); }
  .search:focus-within input { width: 100%; opacity: 1; }
  .chalk { padding: 18px; }
  .hero-gate { min-height: 470px; }
  .board { padding: 12px 18px 12px 12px; gap: 11px; }
  .board-logo { width: 56px; height: 56px; }
  .board-sub { font-size: 9px; letter-spacing: .13em; }
  .post { height: 30px; width: 13px; }
  .howto { grid-template-columns: 1fr; }
  .unit-hero { grid-template-columns: 1fr; }
  .unit-tags { display: none; }
  .cta-inner { flex-wrap: wrap; }
  .cta-inner .btn { margin-left: 0; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .tabbar { display: flex; }
  body { padding-bottom: 68px; }
  .hero { box-shadow: 6px 6px 0 var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
