/* SupportAI のホームページ・教科書と同じ物差しに合わせる上書き（atlas.css のあとに読む）
   ページの枠は「黒（#222224）×紙（#F4F4F4）×金（#D4AA5E）・角は四角」。
   デモの中のアプリ画面の色（青など）は、例として作った架空のアプリの色なのでそのまま */
:root {
  --bg: #F4F4F4;
  --ink: #222224;
  --ink-2: #3D3D41;
  --muted: #77787D;
  --label: #A3A4A8;
  --gold: #D4AA5E;
  --gold-ink: #8A6A2E;
  --gold-soft: #F4EBDA;
  --line: #DFDFE1;
  --line-strong: #BFC0C4;
  --paper: #FFFFFF;
  --sans: "Noto Sans JP", YuGothic, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --display: "Inter", "Noto Sans JP", sans-serif;
  --en: "Inter", "Noto Sans JP", sans-serif;
  --r: 0px;
  --r-sm: 0px;
  --side: clamp(20px, 5vw, 72px);
  --gut: var(--side);
}
body { background: var(--bg); letter-spacing: .04em; }
:focus-visible { outline-color: var(--ink); }

/* ---------- 上のバー（教科書・AILINEのページと同じ作り） ---------- */
.hd { background: rgba(244, 244, 244, .86); border-bottom: 1px solid var(--line); }
.hd-in { height: 68px; gap: 18px; }
.sai { display: flex; align-items: center; gap: 6px; flex: none; padding: 7px 12px 7px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .6); text-decoration: none; font-size: 11px; font-weight: 700; letter-spacing: .1em; transition: background .3s, border-color .3s; }
.sai:hover { background: #fff; border-color: var(--ink); }
.sai img { height: 20px; width: auto; }
.sai-back { font-style: normal; font-family: var(--en); font-weight: 800; transition: transform .3s var(--ease); }
.sai:hover .sai-back { transform: translateX(-3px); }
.sep { width: 1px; height: 22px; background: var(--line-strong); flex: none; }
.logo { gap: 12px; }
.logo img { height: 24px; width: auto; }
.logo span { display: flex; flex-direction: column; line-height: 1.15; border-left: 1px solid var(--line-strong); padding-left: 12px; }
.logo b { font: 800 12px/1.2 var(--en); letter-spacing: .16em; }
.logo small { border: 0; padding: 0; font-size: 10px; letter-spacing: .14em; color: var(--muted); }
.nav a { border-radius: 0; color: var(--ink-2); font-size: 13px; }
.nav a:hover { background: transparent; color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { background: var(--gold); height: 2px; bottom: 0; }
.mt[aria-checked="true"] i { background: var(--ink); }

/* ---------- 共通の部品 ---------- */
.eb { font: 700 12px/1 var(--en); letter-spacing: .16em; color: var(--muted); }
.btn { border-radius: 0; font-weight: 900; letter-spacing: .06em; }
.btn--pri { background: var(--ink); color: #fff; }
.btn--pri:hover { background: var(--gold); color: var(--ink); }
.btn--sec { background: #fff; border-color: var(--ink); }
.btn--sec:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip { border-radius: 0; border-color: var(--line-strong); background: #fff; }
.chip:hover { border-color: var(--ink); }
.tag { border-radius: 0; background: #fff; border: 1px solid var(--line); }
.tag--vid { background: var(--gold-soft); border-color: transparent; color: var(--gold-ink); }
.tag--vid::before { background: var(--gold); }
.sec-h h2 { font-weight: 900; letter-spacing: .02em; }

/* ---------- 表紙 ---------- */
.hero h1 { font-weight: 900; letter-spacing: .02em; }
.hero h1 em { background: var(--ink); color: #fff; padding: 0 .12em; margin-right: .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero-stats { border-top: 2px solid var(--ink); }
.hero-stats b { font-family: var(--en); }
.hero-v { border-radius: 0; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.hero-card { border-radius: 0; box-shadow: 0 0 0 1px var(--ink), 0 18px 34px -22px rgba(34, 34, 36, .5); }
.hero-card i { border-radius: 0; background: var(--ink); color: var(--gold); }
.hero-card small { border-radius: 0; background: var(--gold); color: var(--ink); }
.hero-dots button.is-on { background: var(--gold); }

/* ---------- 参考動画・検索・カード ---------- */
.vid { border-radius: 0; background: #fff; border: 1px solid var(--line); }
.vid-h b { color: transparent; -webkit-text-stroke: 1.2px var(--gold); font-family: var(--en); }
.vid a { border-radius: 0; }
.vid a:hover { background: var(--bg); }
.find-box { border-radius: 0; border: 1.5px solid var(--ink); }
.find-box:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(212, 170, 94, .35); }
.cats .chip b { color: var(--gold-ink); }
.cats .chip.is-on b { color: var(--gold); }
.flt { border-color: var(--line-strong); }
.flt select { border-radius: 0; border-color: var(--line-strong); }
.flt .seg { border-radius: 0; background: #fff; border: 1px solid var(--line); }
.flt .seg button { border-radius: 0; }
.flt .seg button[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.cat-lead b { color: transparent; -webkit-text-stroke: 1.4px var(--gold); font-family: var(--en); }
.cd { background: transparent; }
.cd-prev { border-radius: 0; background: #fff; }
.cd-link { border-radius: 0; }
.cd:hover .cd-prev, .cd:focus-within .cd-prev { box-shadow: inset 0 0 0 1.5px var(--ink); }
.cd-code { font-family: var(--en); font-weight: 800; color: var(--gold-ink); }
.ib { border-radius: 0; }
.empty { border-radius: 0; background: #fff; border: 1px solid var(--line); }
.how div { border-radius: 0; background: #fff; border: 1px solid var(--line); }
.how dt { color: var(--gold-ink); }
.how .is-warn dt { color: #B4471F; }

/* ---------- 詳細 ---------- */
.crumb a:hover { color: var(--ink); text-decoration: underline; }
.dt-code { font-family: var(--en); font-weight: 800; color: var(--gold-ink); letter-spacing: .16em; }
.dt-head h1 { font-weight: 900; letter-spacing: .02em; }
.dt-stage-w { border-radius: 0; box-shadow: 0 0 0 1px var(--line); }
.tp { border-top-color: var(--line); }
.tp-b { border-radius: 0; }
.tp-b[aria-pressed="true"] { background: var(--gold-soft); color: var(--ink); }
.tp-play { border-radius: 50%; background: var(--ink); }
.tp-play:hover { background: var(--gold); color: var(--ink); }
.tp-sel { border-radius: 0; }
.tp-rate { border-radius: 0; background: var(--bg); }
.tp-rate button { border-radius: 0; }
.tl-track i { background: var(--gold); }
.pp { border-radius: 0; background: #fff; border: 1px solid var(--line); }
.pf output { color: var(--gold-ink); font-family: var(--en); font-weight: 800; }
.pf input[type="range"] { accent-color: var(--ink); }
.pf select, .pf-seg { border-radius: 0; }
.pf-seg button { border-radius: 0; }
.pf-seg button[aria-pressed="true"] { background: var(--ink); }
.pf-sw[aria-checked="true"] i { background: var(--ink); }
.blk > h2 { font-weight: 900; }
.blk > h2 small { font-family: var(--en); font-weight: 800; font-size: 13px; color: transparent; -webkit-text-stroke: 1px var(--gold); letter-spacing: .02em; }
.vidref { border-radius: 0; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--gold); }
.vidref b { color: var(--gold-ink); font-family: var(--en); }
.box { border-radius: 0; background: var(--ink); }
.box-h .btn--sm { border-radius: 0; }
.box-h .btn--sm:hover { background: var(--gold); color: var(--ink); }
.box-h .tabs button { border-radius: 0; }
.box .c-k { color: #E6C98F; }
.note-rm { border-radius: 0; background: rgba(34, 34, 36, .9); }

/* ---------- 比較・工房・学ぶ順番・記録 ---------- */
.cmp-c { border-radius: 0; }
.cmp-c select { border-radius: 0; border-color: var(--line-strong); }
.cmp-d a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.cmp-bar { border-radius: 0; }
.cmp-diff { border-radius: 0; background: #fff; border: 1px solid var(--line); }
.cmp-t { border-radius: 0; }
.cmp-t .y { color: var(--ink); }
.cmp-t .y::before { content: "● "; color: var(--gold); }
.pg-f { border-radius: 0; background: #fff; border: 1px solid var(--line); }
.pg-f input[type="text"], .pg-f input[type="number"], .pg-f select, .pg-f textarea { border-radius: 0; border-color: var(--line-strong); }
.pg-ck label { border-radius: 0; }
.pg-ck input { accent-color: var(--ink); }
.pg-prev { border-radius: 0; }
.rm-s { border-radius: 0; background: #fff; border: 1px solid var(--line); }
.rm-n { font-family: var(--en); color: transparent; -webkit-text-stroke: 1.2px var(--line-strong); }
.rm-s.is-done .rm-n { -webkit-text-stroke-color: var(--gold); }
.rm-steps label { border-radius: 0; }
.rm-steps input { accent-color: var(--ink); }
.rm-steps label:has(:checked) { border-color: var(--ink); color: var(--ink); background: var(--gold-soft); }
.qz { border-radius: 0; background: var(--bg); }
.qz-st { border-radius: 0; }
.qz-o button { border-radius: 0; }
.vt-t a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.cnt div { border-radius: 0; background: #fff; border: 1px solid var(--line); }
.cnt i { color: var(--gold-ink); }
.toast-g { border-radius: 0; }

/* ---------- 教材棚とフッター（教科書・AILINEのページと同じ作り） ---------- */
.shelf { max-width: 1260px; margin: 0 auto; padding: 40px var(--side) 90px; }
.shelf h2 { font-family: var(--en); font-size: 12px; letter-spacing: .16em; color: var(--muted); margin: 0 0 14px; padding-top: 28px; border-top: 2px solid var(--ink); }
.shelf-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.bk { position: relative; display: block; text-decoration: none; background: #fff; border: 1px solid var(--line); padding: 22px 22px 24px; transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s; }
.bk:hover { transform: translateY(-4px); box-shadow: 0 18px 34px -22px rgba(34, 34, 36, .4); }
.bk .no { display: block; font-style: normal; font-family: var(--en); font-weight: 800; font-size: 34px; line-height: 1; color: transparent; -webkit-text-stroke: 1.2px var(--gold); }
.bk small { display: block; margin-top: 10px; font-size: 11px; font-weight: 700; color: var(--muted); }
.bk b { display: block; font-size: 17px; font-weight: 900; line-height: 1.5; }
.bk span { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-2); line-height: 1.8; }
.bk::after { content: "→"; position: absolute; right: 20px; bottom: 18px; font-family: var(--en); font-weight: 700; transition: transform .3s; }
.bk:hover::after { transform: translateX(4px); }
.bk.on { background: var(--ink); color: #fff; border-color: var(--ink); pointer-events: none; }
.bk.on span { color: rgba(255, 255, 255, .7); }
.bk.on::after { content: "読んでいます"; font-family: var(--sans); font-size: 11px; color: var(--gold); }
.ft { margin-top: 0; padding: 34px 0 40px; background: var(--bg); color: var(--ink); border-top: 1px solid var(--line); }
.ft .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px 30px; flex-wrap: wrap; }
.f-home { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.f-home img { height: 30px; width: auto; }
.f-home span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 900; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--ink); transition: background .3s, color .3s; }
.f-home:hover span { background: var(--ink); color: #fff; }
.f-home i { font-style: normal; font-family: var(--en); transition: transform .3s; }
.f-home:hover i { transform: translateX(4px); }
.f-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; font-weight: 700; }
.f-links a { text-decoration: none; color: var(--ink-2); }
.f-links a:hover { color: var(--ink); text-decoration: underline; }
.ft small { width: 100%; font-size: 11px; color: var(--muted); line-height: 1.9; }
@media (max-width: 1100px) { .shelf-row { grid-template-columns: repeat(2, 1fr); } }

/* ---------- スマホ ---------- */
@media (max-width: 980px) and (min-width: 761px) { .logo span { display: none; } .sai span, .sep { display: none; } }
@media (max-width: 760px) {
  .hd { background: rgba(244, 244, 244, .97); }
  .hd-in { height: 56px; gap: 10px; }
  .sai { padding: 6px 10px; }
  .sai img { display: none; }
  .sai span { font-size: 10.5px; }
  .logo img { height: 20px; }
  .logo span { padding-left: 10px; }
  .logo small { display: none; }
  .nav { background: rgba(244, 244, 244, .97); }
  .nav a[aria-current="page"] { background: #fff; box-shadow: inset 0 -2px 0 var(--gold); }
  .shelf-row { grid-template-columns: 1fr; }
  .shelf { padding-bottom: 60px; }
}
@media (max-width: 380px) { .logo span { display: none; } }
.ft a { color: inherit; }
.hero h1 { font-size: clamp(34px, 5vw, 62px); }
