/* 授業コマ割りシステム かんたん利用ガイド（画面表示とA4印刷の両対応） */
:root {
  color-scheme: light;
  --navy: #16324f;
  --navy-2: #24496e;
  --navy-tint: #eaf0f6;
  --accent: #2f7de1;
  --accent-dark: #1f63bd;
  --accent-tint: #e8f1fd;
  --bg: #f4f6f9;
  --ink: #1b2733;
  --muted: #5d6b79;
  --line: #dde3ea;
  --ok: #1d7a4f;
  --ok-tint: #e7f5ee;
  --warn: #9a5b00;
  --warn-tint: #fff4e0;
  --danger: #b3261e;
  --danger-tint: #fdecea;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.8; }
a { color: var(--accent-dark); }
img { display: block; max-width: 100%; height: auto; }

.m-top { position: sticky; top: 0; z-index: 5; background: var(--navy); color: #fff; }
.m-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(960px, calc(100% - 32px)); margin: 0 auto; padding: 12px 0; }
.m-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; text-decoration: none; }
.m-mark { width: 26px; height: 26px; border-radius: 7px; background: rgba(255, 255, 255, .14) url("favicon.svg") center / 26px no-repeat; }
.m-open { padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--navy); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }

.m-main { width: min(960px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 40px; }
.page { margin-bottom: 24px; padding: 36px 40px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(22, 50, 79, .05), 0 8px 24px rgba(22, 50, 79, .05); }

/* 表紙 */
.cover { text-align: center; }
.eyebrow { display: inline-block; margin: 0 0 10px; padding: 3px 14px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-dark); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.cover h1 { margin: 0 0 14px; color: var(--navy); font-size: clamp(28px, 4.5vw, 40px); line-height: 1.35; }
.lead { margin: 0 auto 24px; max-width: 640px; color: var(--muted); }
.url-box { display: grid; gap: 2px; max-width: 620px; margin: 0 auto 26px; padding: 16px 20px; border: 2px solid var(--accent); border-radius: 14px; background: var(--accent-tint); }
.url-box span { color: var(--accent-dark); font-size: 13px; font-weight: 700; }
.url-box strong { color: var(--navy); font-size: clamp(18px, 3vw, 24px); letter-spacing: .02em; word-break: break-all; }
.url-box small { color: var(--muted); font-size: 13px; line-height: 1.6; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 auto 24px; max-width: 780px; }
.three div { position: relative; display: grid; gap: 2px; padding: 18px 12px 14px; border-radius: 14px; background: var(--navy-tint); }
.three div:not(:last-child)::after { content: "→"; position: absolute; top: 50%; right: -11px; color: var(--accent); font-weight: 700; transform: translateY(-50%); }
.three b { display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto 4px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 17px; }
.three strong { color: var(--navy); font-size: 17px; }
.three span { color: var(--muted); font-size: 13px; }
.safe { max-width: 780px; margin: 0 auto 24px; padding: 14px 20px; border-left: 4px solid var(--ok); border-radius: 8px; background: var(--ok-tint); text-align: left; }
.safe strong { color: var(--ok); }
.safe ul { margin: 4px 0 0; padding-left: 1.2em; font-size: 15px; }
.toc { max-width: 780px; margin: 0 auto; padding: 14px 20px; border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.toc p { margin: 0 0 4px; color: var(--navy); font-weight: 700; }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 28px; font-size: 15px; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent-dark); text-decoration: underline; }
.cover-foot { margin: 20px 0 0; color: var(--muted); font-size: 13px; }

/* 見出し */
h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; color: var(--navy); font-size: 26px; line-height: 1.4; }
.page h2 + .intro { margin-top: 0; }
h2:not(:first-child) { margin-top: 40px; }
.num { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 11px; background: var(--navy); color: #fff; font-size: 20px; }
h3 { margin: 0 0 6px; color: var(--navy); font-size: 19px; line-height: 1.5; }
.sub { margin: 28px 0 10px; padding-left: 12px; border-left: 4px solid var(--accent); }
.tab-title { display: flex; align-items: center; gap: 10px; margin: 30px 0 10px; font-size: 21px; }
.tab-title span { padding: 2px 10px; border-radius: 7px; background: var(--accent); color: #fff; font-size: 14px; }
.intro { margin: 0 0 20px; font-size: 17px; }

/* 手順 */
.steps { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps > li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px; align-items: start; padding-top: 22px; border-top: 1px dashed var(--line); counter-increment: step; }
.steps > li:first-child { padding-top: 0; border-top: 0; }
.steps.compact > li { grid-template-columns: 1fr; padding-top: 12px; }
.step-text { position: relative; padding-left: 52px; }
.step-text::before { content: counter(step); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 18px; font-weight: 700; }
.step-text p { margin: 0; }
figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 2px 10px rgba(22, 50, 79, .08); }
figure.narrow { max-width: 420px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px; align-items: start; }
.two p { margin: 0 0 10px; }
.mini-steps { margin: 0 0 12px; padding-left: 1.4em; }
.mini-steps li { margin-bottom: 8px; padding-left: 4px; }
.mini-steps li::marker { color: var(--accent-dark); font-weight: 700; }
.check { margin: 0 0 10px; padding: 0; list-style: none; }
.check li { position: relative; margin-bottom: 8px; padding-left: 26px; }
.check li::before { content: ""; position: absolute; top: .55em; left: 4px; width: 12px; height: 7px; border-bottom: 3px solid var(--ok); border-left: 3px solid var(--ok); transform: rotate(-45deg); }

/* 画面上の言葉（ボタン名など） */
.ui { display: inline-block; margin: 0 1px; padding: 0 8px; border: 1px solid #b9cbe0; border-radius: 6px; background: #fff; color: var(--navy); font-size: .92em; font-weight: 700; line-height: 1.7; white-space: nowrap; }
.ui.dark { border-color: var(--navy); background: var(--navy); color: #fff; }

/* 囲み */
.tip, .note, .callout, .warn, .contact { border-radius: 10px; }
.tip { margin: 20px 0 0; padding: 12px 16px; background: var(--accent-tint); }
.note { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.callout { margin: 18px 0 8px; padding: 14px 18px; border-left: 4px solid var(--ok); background: var(--ok-tint); }
.callout.blue { border-left-color: var(--accent); background: var(--accent-tint); }
.callout strong, .warn strong, .contact strong { display: block; color: var(--navy); font-size: 17px; }
.callout p, .callout ol { margin: 6px 0 0; }
.warn { margin: 16px 0 0; padding: 14px 18px; border-left: 4px solid var(--danger); background: var(--danger-tint); }
.warn strong { color: var(--danger); }
.warn ul { margin: 4px 0 0; padding-left: 1.2em; }
.contact { margin-top: 24px; padding: 16px 20px; border: 2px solid var(--navy); }
.contact p { margin: 6px 0 0; }

/* 表 */
table { width: 100%; margin: 16px 0 0; border-collapse: collapse; font-size: 15px; }
th { padding: 9px 12px; background: var(--navy-tint); color: var(--navy); font-size: 14px; text-align: left; }
td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
table.small td { padding: 6px 10px; }
.choose td:nth-child(2) { color: var(--navy); white-space: nowrap; }
.choose td:last-child, .choose th:last-child { width: 60px; text-align: center; }
.sym { width: 44px; color: var(--muted); font-size: 18px; font-weight: 700; text-align: center; }
.sym.best { color: #fff; background: #1f63bd; }
.sym.ok { color: #1f4f8f; background: #e3eefc; }
.sym.maybe { color: #8a5a00; background: #fff6e2; }
.status td:first-child { width: 70px; font-weight: 700; white-space: nowrap; }
.dot { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 50%; vertical-align: -1px; }
.dot.ok { background: var(--ok); }
.dot.yellow { background: #e0a030; }
.dot.err { background: var(--danger); }
#s6 figure, #s7 figure, #s8 figure, #s2 figure { margin: 12px 0; }

/* チェックリスト */
.checklist { display: grid; gap: 10px; margin-top: 10px; }
.checklist label { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; font-size: 17px; }
.box { flex: none; width: 24px; height: 24px; border: 2px solid var(--navy); border-radius: 5px; }

/* FAQ */
.faq { margin: 0; }
.faq dt { position: relative; margin-top: 18px; padding-left: 34px; color: var(--navy); font-weight: 700; }
.faq dt::before { content: "Q"; position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--navy); color: #fff; font-size: 14px; }
.faq dd { position: relative; margin: 4px 0 0; padding-left: 34px; }
.faq dd::before { content: "A"; position: absolute; left: 0; top: 2px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--accent-tint); color: var(--accent-dark); font-size: 14px; font-weight: 700; }

.m-foot { padding: 20px 16px 32px; color: var(--muted); font-size: 13px; text-align: center; }

@media screen and (max-width: 760px) {
  body { font-size: 15px; }
  .page { padding: 24px 18px; }
  .three { grid-template-columns: 1fr; }
  .three div:not(:last-child)::after { content: "↓"; top: auto; right: 50%; bottom: -17px; transform: translateX(50%); }
  .toc ol { columns: 1; }
  .steps > li, .two { grid-template-columns: 1fr; gap: 12px; }
  h2 { font-size: 22px; }
  .ui { white-space: normal; }
  table { font-size: 14px; }
  .m-brand { font-size: 15px; }
}

/* ---------- A4印刷・PDF ---------- */
@page { size: A4 portrait; margin: 12mm 12mm 14mm; }
@media print {
  html { scroll-behavior: auto; }
  body { background: #fff; font-size: 11.5pt; line-height: 1.65; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .m-top, .m-foot { display: none; }
  .m-main { width: 100%; padding: 0; }
  .page { margin: 0 0 9mm; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .cover { margin: 0; padding-top: 4mm; break-after: page; }
  .cover h1 { font-size: 24pt; }
  .cover .lead { margin-bottom: 14px; }
  .url-box, .three, .safe { margin-bottom: 14px; }
  .toc ol { columns: 2; }
  #s3, #s9, #s10 { break-before: page; }
  #s9 { break-after: page; }
  .steps { gap: 14px; }
  .steps > li { padding-top: 14px; }
  figure.narrow { max-width: 300px; }
  .two { grid-template-columns: 1fr; gap: 10px; }
  .two figure { max-width: 88%; }
  h2 { font-size: 19pt; }
  h2, h3, .sub, .tab-title { break-after: avoid; }
  figure, tr, .callout, .warn, .tip, .checklist label, .faq dt, .faq dd, .steps > li { break-inside: avoid; }
  figure { box-shadow: none; }
  .steps > li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  a { color: inherit; text-decoration: none; }
  .toc a { color: var(--ink); }
  .intro { font-size: 12pt; }
  .contact { break-inside: avoid; }
  .faq dt { margin-top: 10px; }
  #s10 .contact { margin-top: 14px; }
}
