/* ふりかえりジャーナル — 導入案内ページのスタイル
 *
 * 外部から読み込むものはゼロ。書体は端末が持っているものを並べる。
 * 学校のフィルタリングで何が塞がれていても、この 1 枚で見た目が決まる。 */

:root {
  color-scheme: light dark;
  --bg: #ffffff; --surface: #fdf6ef; --surface-strong: #fbe9d6;
  --text: #1f2430; --text-muted: #4a5260; --accent: #a5410a;
  --link: #9a3c08; --link-visited: #5e3590; --border: #dfd3c6;
  --code-bg: #f2ece6; --callout-bg: #fdf3e8;
  --warn-bg: #fdf0e6; --warn-border: #b45f06;
  --btn-text: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c; --surface: #21252b; --surface-strong: #2b3038;
    --text: #e9ebef; --text-muted: #adb5c0; --accent: #f0a06a;
    --link: #f2ab77; --link-visited: #d3b6f5; --border: #3c434d;
    --code-bg: #2b3038; --callout-bg: #24201c;
    --warn-bg: #2a2118; --warn-border: #e0a35c;
    --btn-text: #16181c;
  }
}

* { box-sizing: border-box; }

body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic UI", "Meiryo", -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  /* 端末の幅に合わせて少しだけ伸縮させる。固定 px にすると、
     電子黒板の 4K でも学習者用端末でも同じ小ささになる。 */
  line-height: 1.9;
  letter-spacing: .01em;
  max-width: 820px;
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right))
           calc(48px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--link); text-decoration: underline; text-underline-offset: .18em; }
a:visited { color: var(--link-visited); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 3px; }

h1 { font-size: clamp(1.55rem, 4.5vw, 1.9rem); line-height: 1.45; margin: 0 0 8px; }
h2 {
  font-size: clamp(1.15rem, 3vw, 1.25rem); line-height: 1.6; margin: 2.4em 0 .6em;
  color: var(--accent); padding-bottom: 6px; border-bottom: 2px solid var(--border);
}
h3 { font-size: 1.05rem; margin: 1.8em 0 .4em; }
p, li { color: var(--text); }
ul, ol { padding-left: 1.5em; }
li { margin-bottom: .4em; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--code-bg); padding: 2px 6px; border-radius: 4px;
  font-size: .92em; overflow-wrap: anywhere;
}
.lead { font-size: 1.1rem; color: var(--text-muted); margin: 0 0 20px; }
.meta { font-size: .95rem; color: var(--text-muted); margin: 0 0 24px; }

.callout {
  background: var(--callout-bg); border: 1px solid var(--border);
  border-left: 5px solid var(--accent); border-radius: 10px;
  padding: 16px 20px; margin: 20px 0;
}
.callout--warn { background: var(--warn-bg); border-left-color: var(--warn-border); }
.callout :first-child { margin-top: 0; }
.callout :last-child { margin-bottom: 0; }
.callout h2 { margin-top: 0; border: 0; padding: 0; font-size: 1.15rem; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 8px; }
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 10px;
  text-decoration: none; border: 1px solid var(--accent);
  font-weight: 600; line-height: 1.5;
  /* 指で押す前提。44px を下回らせない */
  min-height: 44px;
}
.btn--primary { background: var(--accent); color: var(--btn-text); }
.btn--primary:visited { color: var(--btn-text); }
.btn--ghost { color: var(--link); background: transparent; }

.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
figure { margin: 0; }
figure img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
}
figcaption { font-size: .9rem; color: var(--text-muted); margin-top: 6px; line-height: 1.7; }
.shot--wide { margin: 20px 0; }
@media (max-width: 560px) { .shots { grid-template-columns: 1fr; } }

.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps li { position: relative; padding-left: 2.4em; margin-bottom: .8em; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: .35em;
  width: 1.7em; height: 1.7em; border-radius: 50%;
  background: var(--surface-strong); color: var(--accent);
  font-size: .85em; font-weight: 700; line-height: 1.7em; text-align: center;
}

.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: .98rem; }
th, td { border-bottom: 1px solid var(--border); padding: 10px 14px; text-align: left; vertical-align: top; }
thead th { background: var(--surface-strong); white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
@media screen and (max-width: 600px) {
  .table-wrap { border: 0; border-radius: 0; overflow-x: visible; }
  table { display: block; } thead { display: none; }
  tbody, tbody tr, tbody th, tbody td { display: block; width: 100%; }
  tbody tr { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
  tbody th, tbody td { border-bottom: 0; padding: 0; }
  tbody th { margin-bottom: 6px; font-weight: 600; }
  td::before { content: attr(data-label); display: block; font-size: .85em; font-weight: 600; color: var(--text-muted); margin-bottom: 2px; }
}

footer {
  margin-top: 3em; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: .95rem; color: var(--text-muted);
}
footer a { margin-right: .2em; }

@media (max-width: 480px) { body { padding-left: 14px; padding-right: 14px; } }

/* 動きを減らす設定。0 にすると fill-mode: forwards が壊れて中身が消えるので .01ms にする */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ハイコントラスト。色を自分で決めず、OS が決めた色を通す */
@media (forced-colors: active) {
  .btn { border: 1px solid ButtonBorder; }
  .callout, .table-wrap, figure img { border: 1px solid CanvasText; }
}

@media print {
  :root {
    --bg:#fff; --surface:#fff; --surface-strong:#fff; --text:#000; --text-muted:#333;
    --accent:#000; --link:#000; --link-visited:#000; --border:#999; --code-bg:#fff;
    --callout-bg:#fff; --warn-bg:#fff;
  }
  body { max-width: none; font-size: 10.5pt; }
  .actions, .shots, .shot--wide { display: none; }
}
