/* S NOVA 受講生サイト。FANTS風（左にカテゴリ、右にカード）。紺＋金。 */
:root {
  --navy: #23255c;
  --navy-2: #34388a;
  --gold: #b07a12;
  --gold-2: #d9a63a;
  --bg: #eef0f3;
  --card: #ffffff;
  --line: #e2e5ea;
  --text: #1f2330;
  --sub: #6b7280;
  --link: #2f5bd3;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", sans-serif;
  font-size: 15px;
  line-height: 1.75;
}
a { color: inherit; text-decoration: none; }
/* 文節で折り返す（build.mjs が <wbr> を入れる） */
.doc, .card-d, .card-t, .mhead, .row-t, .lead, .hero h1, .step-t, .toc, .pn { word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.doc p, .doc li { text-wrap: pretty; }
.ic, .ic-s { width: 18px; height: 18px; stroke-width: 2; vertical-align: -3px; }

/* ---------- ヘッダー ---------- */
.bar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.bar-in { max-width: 1120px; margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; color: var(--navy); }
.logo {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: var(--gold-2);
  font-family: Montserrat, sans-serif; font-size: 20px; box-shadow: inset 0 0 0 2px rgba(217, 166, 58, .5);
}
.logo-img { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 1px 3px rgba(35,37,92,.18); }
.brand-t { font-family: Montserrat, "Noto Sans JP", sans-serif; font-size: 18px; line-height: 1.1; letter-spacing: .04em; }
.brand-t small { display: block; font-family: "Noto Sans JP", sans-serif; font-size: 10px; font-weight: 500; color: var(--sub); letter-spacing: 0; }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 13px; }
.topnav a { padding: 6px 10px; border-radius: 8px; color: #4b5263; }
.topnav a:hover { background: #f3f4f6; }
.topnav a.on { color: var(--navy); font-weight: 700; background: #eef0fa; }
.topnav .out span { margin-left: 4px; }

/* ---------- ヒーロー ---------- */
.hero { background: radial-gradient(120% 140% at 0% 0%, var(--navy-2) 0%, var(--navy) 55%, #14163a 100%); color: #fff; }
.hero-in { max-width: 1120px; margin: 0 auto; padding: 40px 16px 44px; }
.eyebrow { margin: 0; font-family: Montserrat, sans-serif; font-size: 12px; letter-spacing: .2em; color: var(--gold-2); }
.hero h1 { margin: 8px 0 6px; font-size: clamp(24px, 4vw, 34px); font-weight: 900; letter-spacing: .02em; }
.lead { margin: 0; color: #cfd3f1; font-size: 14px; }

/* ---------- 共通レイアウト ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 14px 16px 40px; }
.wrap.tight { padding-top: 0; }
.wrap-h { max-width: 1120px; margin: 8px auto 10px; padding: 0 16px; font-size: 17px; font-weight: 900; color: var(--navy); }
.crumbs { font-size: 12px; color: var(--sub); margin: 4px 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--link); }
.crumbs b { font-weight: 500; color: var(--sub); }
.cols { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.main { min-width: 0; }

/* 左のカテゴリ一覧 */
.side { background: var(--card); border-radius: var(--radius); overflow: hidden; position: sticky; top: 76px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.side-i { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; font-size: 13px; font-weight: 700; color: #3c4252; border-bottom: 1px solid var(--line); }
.side-i:last-child { border-bottom: 0; }
.side-i:hover { background: #f7f8fa; }
.side-i.on { color: var(--link); background: #f3f6ff; box-shadow: inset 3px 0 0 var(--link); }
.side-n { font-size: 11px; font-weight: 500; color: #9aa1ad; }

/* 検索 */
.search { position: relative; margin-bottom: 18px; }
.search input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 12px 0 38px; font: inherit; font-size: 14px; }
.search input:focus { outline: 2px solid #c9d6ff; border-color: var(--link); }
.search .ic-s { position: absolute; left: 12px; top: 11px; color: #9aa1ad; }

/* セクション */
.sec { margin-bottom: 26px; }
.sec-t { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: #2b3040; display: flex; align-items: center; gap: 8px; }
.sec-t::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--gold); }

/* カード（FANTSの2列タイル） */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { display: flex; gap: 12px; background: var(--card); border-radius: var(--radius); padding: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(35,37,92,.12); }
.card-b { display: flex; flex-direction: column; min-width: 0; padding: 4px 4px 2px 0; }
.card-t { font-weight: 700; font-size: 14px; line-height: 1.4; color: #1f2330; }
.card-d { font-size: 12px; color: var(--sub); line-height: 1.55; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-m { margin-top: auto; padding-top: 6px; font-size: 11px; color: #9aa1ad; display: flex; align-items: center; gap: 6px; }
.tag { font-size: 10px; font-weight: 700; color: #8a6400; background: #fff3d6; border-radius: 4px; padding: 1px 6px; }

/* サムネイル（色付きタイル＋アイコン＋名前＋英字） */
.thumb {
  flex: 0 0 auto; width: 96px; height: 86px; border-radius: 8px; color: #fff; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.thumb::after { content: ""; position: absolute; inset: 0; background: radial-gradient(90% 70% at 20% 0%, rgba(255,255,255,.28), transparent 60%); pointer-events: none; }
.ic-thumb { width: 28px; height: 28px; stroke-width: 2; }
.thumb-t { word-break: keep-all; overflow-wrap: anywhere; font-size: 10.5px; font-weight: 900; line-height: 1.25; padding: 0 6px; max-height: 2.6em; overflow: hidden; }
.thumb-en { font-family: Montserrat, sans-serif; font-size: 7.5px; letter-spacing: .12em; opacity: .85; }
.thumb.lg { width: 132px; height: 118px; }
.thumb.lg .ic-thumb { width: 38px; height: 38px; }
.thumb.lg .thumb-t { font-size: 13px; }
.thumb.lg .thumb-en { font-size: 9px; }
.thumb.sm { width: 44px; height: 40px; }
.thumb.sm .thumb-t, .thumb.sm .thumb-en { display: none; }
.thumb.sm .ic-thumb { width: 20px; height: 20px; }
.c-navy { background: linear-gradient(135deg, #34388a, #1d1f4d); }
.c-gold { background: linear-gradient(135deg, #e0b24a, #a8710d); }
.c-slate { background: linear-gradient(135deg, #64748b, #334155); }
.c-blue { background: linear-gradient(135deg, #4f7cf3, #2948b8); }
.c-orange { background: linear-gradient(135deg, #ffad3b, #f0730f); }
.c-teal { background: linear-gradient(135deg, #2cc4b5, #0f8a86); }
.c-purple { background: linear-gradient(135deg, #9b6bff, #5b35c9); }
.c-pink { background: linear-gradient(135deg, #ff7aa8, #e0367a); }
.c-green { background: linear-gradient(135deg, #4cc777, #1f9351); }
.c-red { background: linear-gradient(135deg, #ff5757, #d01d1d); }
.c-black { background: linear-gradient(135deg, #3a3a3a, #0d0d0d); }
.c-insta { background: linear-gradient(135deg, #feda75 0%, #fa7e1e 25%, #d62976 55%, #962fbf 80%, #4f5bd5 100%); }
.c-tiktok { background: linear-gradient(135deg, #1a1a1a, #050505); box-shadow: inset 4px 0 0 #25f4ee, inset -4px 0 0 #fe2c55; }
.c-line { background: linear-gradient(135deg, #2bd46c, #06a849); }

/* ロードマップ */
.roadmap { margin: 6px 0 24px; }
.steps { display: flex; align-items: stretch; gap: 8px; }
.step { flex: 1; background: #fff; border-radius: var(--radius); padding: 12px 14px; box-shadow: 0 1px 2px rgba(0,0,0,.05); border-top: 3px solid var(--navy); }
.step:last-child { border-top-color: var(--gold); }
.step:hover { box-shadow: 0 6px 16px rgba(35,37,92,.12); }
.step-no { display: block; font-family: Montserrat, sans-serif; font-size: 11px; letter-spacing: .14em; color: var(--gold); }
.step-t { display: block; font-weight: 700; font-size: 14px; line-height: 1.45; margin-top: 2px; }
.step-arrow { align-self: center; color: #b4bac6; font-size: 20px; }

/* メニュー見出し＋レッスン一覧 */
.mhead { display: flex; gap: 18px; align-items: center; background: #fff; border-radius: var(--radius); padding: 14px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.mhead h1 { margin: 0; font-size: 20px; font-weight: 900; }
.mhead p { margin: 4px 0 0; color: var(--sub); font-size: 13px; }
.mhead .mmeta { font-size: 12px; color: #9aa1ad; }
.rows { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row:hover { background: #f7f8fa; }
.row-n { font-family: Montserrat, sans-serif; font-weight: 800; color: var(--gold); font-size: 14px; width: 26px; }
.row-t { flex: 1; font-weight: 700; font-size: 14px; }
.row-t small { display: block; font-weight: 400; font-size: 11px; color: var(--sub); }
.row-go { color: #b4bac6; font-size: 20px; }
.empty { padding: 18px; color: var(--sub); margin: 0; }

/* レッスン */
.cols.lesson { grid-template-columns: 240px 1fr; }
.toc { background: #fff; border-radius: var(--radius); overflow: hidden; position: sticky; top: 76px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.toc-h { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--line); }
.toc nav a { display: flex; gap: 8px; padding: 10px 12px; font-size: 13px; color: #3c4252; border-bottom: 1px solid var(--line); }
.toc nav a span { flex: 0 0 18px; color: var(--gold); font-family: Montserrat, sans-serif; font-weight: 800; }
.toc nav a em { font-style: normal; }
.toc nav a.on { background: #f3f6ff; color: var(--link); font-weight: 700; box-shadow: inset 3px 0 0 var(--link); }
.doc { background: #fff; border-radius: var(--radius); padding: 24px 28px 28px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.doc-k { margin: 0; font-size: 12px; color: var(--gold); font-weight: 700; }
.doc h1 { margin: 4px 0 16px; font-size: 24px; font-weight: 900; line-height: 1.45; }
.doc h2 { margin: 30px 0 10px; font-size: 18px; font-weight: 900; padding-left: 12px; border-left: 4px solid var(--navy); }
.doc h3 { margin: 22px 0 8px; font-size: 16px; }
.doc blockquote { margin: 0 0 16px; padding: 10px 14px; background: #fff8e6; border-left: 4px solid var(--gold-2); border-radius: 0 8px 8px 0; color: #6b5310; font-size: 13px; }
.doc blockquote p { margin: 0; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li.chk { list-style: none; position: relative; margin-left: -1.2em; padding-left: 1.8em; }
.doc li.chk::before { content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border: 2px solid #b4bac6; border-radius: 4px; }
.doc a { color: var(--link); text-decoration: underline; }
.doc p { margin: 0 0 14px; }
.doc strong { color: #14163a; background: linear-gradient(transparent 62%, #fde9b8 62%); }
.doc li { margin: 4px 0; }
.doc li.chk { cursor: pointer; user-select: none; }
.doc li.chk.done { color: #9aa1ad; text-decoration: line-through; }
.doc li.chk.done::before { background: var(--navy); border-color: var(--navy); }
.doc li.chk.done::after { content: ""; position: absolute; left: 5px; top: calc(.35em + 2px); width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tablewrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 8px; }
.doc table { border-collapse: collapse; width: 100%; min-width: 420px; font-size: 13.5px; line-height: 1.6; }
.doc th, .doc td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc th { background: #f5f6fa; font-weight: 700; color: #2b3040; white-space: nowrap; }
.doc tr:last-child td { border-bottom: 0; }
.doc pre { background: #f5f6fa; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: 14.5px; line-height: 1.85; white-space: pre-wrap; }
.doc pre, .doc pre code { font-family: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", sans-serif; font-size: inherit; }
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.video-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 16 / 9; border-radius: 10px; background: repeating-linear-gradient(135deg, #f4f5f8 0 12px, #eceef3 12px 24px); color: #9aa1ad; font-size: 13px; margin-bottom: 8px; }
.ic-v { width: 36px; height: 36px; stroke-width: 1.6; }
.pns { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.pn { flex: 1; max-width: 50%; background: #fff; border-radius: var(--radius); padding: 12px 14px; font-weight: 700; font-size: 13px; color: var(--link); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.pn small { display: block; color: var(--sub); font-weight: 400; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn.nx { text-align: right; margin-left: auto; }

/* ログイン */
.login-page .hero-in { text-align: center; }
.login-page { min-height: 100vh; background: linear-gradient(160deg, #f4f7fc 0%, #e7edf7 100%) fixed; }
.login-logo { display: block; width: 220px; max-width: 70%; height: auto; margin: 0 auto 2px; border-radius: 12px; }
.login-t { margin: 0; text-align: center; font-size: 13px; font-weight: 700; color: var(--navy); letter-spacing: .06em; }
.login { max-width: 380px; margin: 28px auto 60px; background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 6px 24px rgba(35,37,92,.1); display: grid; gap: 14px; }
.login label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.login input { height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font: inherit; }
.login button { height: 46px; border: 0; border-radius: 10px; background: linear-gradient(135deg, var(--navy-2), var(--navy)); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.login .err { margin: 0; color: #c62828; font-size: 13px; font-weight: 700; }

.foot { text-align: center; font-size: 11px; color: #9aa1ad; padding: 20px 16px 36px; }

/* ---------- スマホ ---------- */
@media (max-width: 860px) {
  .toc { display: none; }
  .main details.toc-m { display: block; }
  .toc-m { background: #fff; border-radius: var(--radius); margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
  .toc-m { position: relative; }
  .toc-m summary { list-style: none; cursor: pointer; padding: 12px 14px; font-weight: 700; font-size: 13px; color: var(--navy); display: flex; flex-direction: column; }
  .toc-m summary::-webkit-details-marker { display: none; }
  .toc-m summary::after { content: "開く ▾"; position: absolute; right: 28px; font-size: 12px; color: var(--link); }
  .toc-m[open] summary::after { content: "閉じる ▴"; }
  .toc-m summary span { font-weight: 400; font-size: 11px; color: var(--sub); }
  .toc-m nav a { display: flex; gap: 8px; padding: 10px 14px; font-size: 13px; color: #3c4252; border-top: 1px solid var(--line); word-break: keep-all; overflow-wrap: anywhere; }
  .toc-m nav a span { flex: 0 0 18px; color: var(--gold); font-family: Montserrat, sans-serif; font-weight: 800; }
  .toc-m nav a em { font-style: normal; }
  .toc-m nav a.on { background: #f3f6ff; color: var(--link); font-weight: 700; }
  .cols, .cols.lesson { grid-template-columns: 1fr; }
  .side { position: static; display: flex; overflow-x: auto; white-space: nowrap; border-radius: 999px; padding: 4px; gap: 4px; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side-i { border: 0; border-radius: 999px; padding: 6px 12px; }
  .side-i.on { box-shadow: none; background: var(--navy); color: #fff; }
  .side-n { display: none; }
  .toc { position: static; }
  .toc nav { max-height: 220px; overflow-y: auto; }
  .steps { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); align-self: center; line-height: 1; }
}
.tabbar { display: none; }
details.toc-m { display: none; }
@media (max-width: 600px) {
  /* 表はスマホでは1行ずつカードにする（横スクロールさせない） */
  .tablewrap { overflow: visible; border: 0; }
  .doc table { min-width: 0; border-collapse: separate; }
  .doc thead { display: none; }
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc tr { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; background: #fff; }
  .doc td { border: 0; padding: 3px 0; }
  .doc td:first-child { font-weight: 700; color: #14163a; }
  .doc td:not(:first-child)::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; color: var(--gold); }
  .doc td:empty { display: none; }
  .doc td.num { display: inline-block; width: auto; min-width: 24px; text-align: center; background: var(--navy); color: #fff; border-radius: 6px; padding: 0 7px; margin-bottom: 4px; font-size: 12px; }
  .doc td.num::before { display: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; font-size: 10px; color: #8a90a0; }
  .tabbar a.on { color: var(--navy); font-weight: 700; }
  .ic-tab { width: 22px; height: 22px; stroke-width: 2; }
  .foot { padding-bottom: 90px; }
  .grid { grid-template-columns: 1fr; }
  .topnav a:not(.out) { display: none; }
  .topnav .out span { display: none; }
  .doc { padding: 18px 16px 22px; }
  .doc h1 { font-size: 20px; }
  .mhead { gap: 12px; }
  .thumb.lg { width: 96px; height: 86px; }
  .thumb.lg .ic-thumb { width: 28px; height: 28px; }
  .thumb.lg .thumb-t { word-break: keep-all; overflow-wrap: anywhere; font-size: 10.5px; }
}
