/* 元八塾 下層ページ（/koukou・/access・404）
   トップページ（content/index.html）の薄いグレーの部分 .page と同じ配色・書体・上部バー・フッター */
:root {
  --bg: #f4f4f4;
  --ink: #1d1d1f;
  --sub: #6e6e73;
  --card: #cfcfcf;
  --rule: #e5e5e5;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Zen Maru Gothic", "Hiragino Sans", -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
  line-break: strict;
}
a { color: inherit; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 10; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; text-decoration: none; }
.skip:focus { top: 12px; }

.page { background: var(--bg); color: var(--ink); min-height: 100svh; display: flex; flex-direction: column; }
main { flex: 1; }

/* 上部バー（トップと同じ。スクロールすると左の文字が入れ替わる） */
.bar { position: sticky; top: 0; z-index: 6; display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; font-size: 13px; font-weight: 500; background: rgba(244,244,244,.85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.bar .brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.bar .brand img { height: 20px; width: auto; flex: none; }
.bar .sw { position: relative; display: block; height: 1.2em; width: 16em; overflow: hidden; text-decoration: none; }
.bar .sw span { position: absolute; left: 0; top: 0; white-space: nowrap; transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .5s; }
.bar .sw span:nth-child(2) { transform: translateY(120%); opacity: 0; }
.bar.alt .sw span:nth-child(1) { transform: translateY(-120%); opacity: 0; }
.bar.alt .sw span:nth-child(2) { transform: none; opacity: 1; }
.bar nav { display: flex; gap: 18px; color: var(--sub); }
.bar nav a { text-decoration: none; color: inherit; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--ink); }
.bar-r { display: flex; align-items: center; gap: 18px; }
.bar .home { color: var(--ink); text-decoration: none; }
.bar .home:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ページ見出し（トップの「こんにちは、元八塾です」の段と同じ4列） */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 0 24px; }
.intro { padding: 120px 0 140px; }
.pagehead h1 { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.7; }
.pagehead .lead { grid-column: span 2; font-size: 14px; line-height: 1.7; color: var(--sub); }
.pagehead .lead p { margin: 0 0 8px; }
.pagehead .lead a { color: var(--ink); text-decoration: none; }
.pagehead .lead a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* セクション（トップの .blk .lab と、白いパネルを灰色の台に載せた .stepcard の形） */
.blk { padding: 0 0 120px; }
.blk .lab { margin: 0; padding: 0 24px 14px; font-size: 14px; font-weight: 500; }
.sheet { margin: 0 24px; background: var(--card); border-radius: 12px; padding: 28px; }
.sheet .panel { background: #fff; border-radius: 12px; padding: 34px 36px 36px; box-shadow: 0 10px 30px rgba(0,0,0,.08); font-size: 14px; line-height: 1.85; }
.txt p { margin: 0 0 12px; max-width: 40em; }
.txt p:last-child { margin-bottom: 0; }
.txt + .cols, .cols + .txt, .txt + .txt { margin-top: 28px; }
.outro { color: var(--sub); }

/* カード → 番号・細線・本文の列（トップの「元八塾のやり方」の3段と同じ組み方） */
.cols { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.col .n { display: block; font-family: Inter, sans-serif; font-weight: 600; font-size: 15px; color: var(--sub); margin-bottom: 6px; }
.col .rule { display: block; height: 1px; background: #e0e0e3; margin-bottom: 14px; }
.col h3 { margin: 0 0 6px; font-family: "Zen Maru Gothic", sans-serif; font-weight: 700; font-size: 16px; line-height: 1.5; }
.col p { margin: 0; color: var(--sub); font-size: 14px; line-height: 1.75; }

/* 表 → トップの料金カードと同じ、左右に並ぶ行 */
.table-wrap + p, p + .table-wrap { margin-top: 20px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th { padding: 0 0 8px; font-size: 12px; font-weight: 400; color: var(--sub); text-align: left; border-bottom: 1px solid var(--rule); }
thead th:last-child, td { text-align: right; }
tbody th, td { padding: 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody th { font-weight: 400; text-align: left; padding-right: 16px; }
td { font-weight: 500; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* リンク（トップの黒い丸ボタン .btn3） */
.more { margin-top: 20px; }
.panel .more a { display: inline-flex; align-items: center; height: 46px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 500; text-decoration: none; }

.cta a { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 500; text-decoration: none; }
.cta .icon { width: 18px; height: 18px; }

/* 右下に固定のLINEボタン（トップのボタンと同じピル型。黒地・白文字） */
.line-fix { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 7; display: inline-flex; align-items: center; height: 52px; padding: 0 24px; border-radius: 999px; background: #1d1d1f; color: #f4f4f4; font-size: 13px; font-weight: 600; text-decoration: none; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.line-fix { gap: 14px; letter-spacing: .06em; }
.line-fix::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #FFE800; flex: none; transition: transform .3s; }
.line-fix:hover { background: #000; }
.line-fix:hover::after { transform: scale(1.6); }

/* フッター（トップと同じ。下はLINEボタンに隠れない分をあける） */
.ft { padding: 40px 24px calc(96px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--sub); }

/* スクロールで浮かび上がる（トップと同じ） */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.rv.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .bar { padding: 18px 16px; }
  .bar nav { display: none; }
  .intro { padding: 72px 0 96px; }
  .grid { padding: 0 16px; }
  .blk .lab { padding: 0 16px 12px; }
  .sheet { margin: 0 16px; padding: 16px; }
  .sheet .panel { padding: 22px 18px; }
  .cols { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .pagehead .lead { grid-column: auto; }
}

/* ポインター：ふだんは小さな黒い点。動かすと数学記号がチョークの粉のようにこぼれ、止めると「？」、リンクの上では黄色くふくらんで「！」、クリックで「＝」 */
.cur{position:fixed;left:0;top:0;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;background:#1d1d1f;pointer-events:none;z-index:10000;opacity:0;display:flex;align-items:center;justify-content:center;transition:width .35s cubic-bezier(.2,.8,.2,1),height .35s cubic-bezier(.2,.8,.2,1),margin .35s cubic-bezier(.2,.8,.2,1),background .25s,opacity .3s,box-shadow .25s}
.cur.on{opacity:1}
.cur b{font:700 22px/1 Jost,Inter,sans-serif;color:#1d1d1f;transform:scale(0) rotate(-20deg);transition:transform .3s cubic-bezier(.2,1.6,.4,1)}
.cur.big{width:56px;height:56px;margin:-28px 0 0 -28px;background:#FFE800;box-shadow:0 0 0 1.5px #1d1d1f}
.cur.big b{transform:none}
.cur i{position:absolute;left:14px;top:-26px;font:700 15px/1 Jost,Inter,sans-serif;font-style:normal;color:#1d1d1f;background:#f4f4f4;border:1.5px solid #1d1d1f;border-radius:10px 10px 10px 2px;padding:4px 7px;opacity:0;transform:translateY(6px) scale(.6);transform-origin:left bottom;transition:opacity .25s,transform .35s cubic-bezier(.2,1.6,.4,1)}
.cur.idle:not(.big) i{opacity:1;transform:none}
.cur-sym{position:fixed;left:0;top:0;pointer-events:none;z-index:9999;font:600 14px/1 Jost,Inter,sans-serif;color:#8a8a8e;animation:curSym .9s ease-out forwards}
.cur-sym.y{color:#1d1d1f;text-shadow:0 0 0 #FFE800;background:#FFE800;border-radius:4px;padding:1px 3px}
@keyframes curSym{0%{opacity:0;transform:translate(var(--x),var(--y)) scale(.4) rotate(0)}20%{opacity:1}100%{opacity:0;transform:translate(calc(var(--x) + var(--dx)),calc(var(--y) - 26px)) scale(1) rotate(var(--r))}}
.cur-pop{position:fixed;left:0;top:0;pointer-events:none;z-index:10001;font:700 26px/1 Jost,Inter,sans-serif;color:#1d1d1f;animation:curPop .55s cubic-bezier(.2,1.4,.4,1) forwards}
@keyframes curPop{0%{opacity:1;transform:translate(var(--x),var(--y)) scale(.3)}100%{opacity:0;transform:translate(var(--x),calc(var(--y) - 30px)) scale(1.4)}}
@media (hover:none),(pointer:coarse){.cur,.cur-sym,.cur-pop{display:none}}
