:root {
  --text: #24211c;
  --text-muted: #5b5448;
  --bg: #f6f1e7;
  --surface: #fffcf5;
  --border: #e0d6c2;
  --accent: #2f5673;
  --on-accent: #ffffff;
  --gold: #946613;
  --sky: #b8c8d8;
  --paid-tint: #edf2f6;
  /* 不具合のお知らせの赤（`01021`。学習管理の知らせの赤 `--m-notification` と同じ値） */
  --alert: #a4232b;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #eee8dc;
    --text-muted: #b9b09f;
    --bg: #17191c;
    --surface: #212429;
    --border: #363a40;
    --accent: #8fb4d6;
    --on-accent: #10202e;
    --gold: #d9ad55;
    --paid-tint: #1f2a35;
    --alert: #e0757b;
      }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.85;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.container { max-width: 1040px; margin: 0 auto; padding: 0 22px; }

.header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.header a { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; text-decoration: none; }
.header-title { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 900; font-size: 17px; }
.header-title svg { display: block; border-radius: 8px; }

.parent-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 16px;
  border: 1.5px solid var(--accent); border-radius: 999px;
  color: var(--accent); font-size: 14px; font-weight: 700; text-decoration: none;
  white-space: nowrap;
}
.parent-entry { margin: 26px 0 0; }

/*
 * 不具合のときだけ出すお知らせ（`01021`。文面は notice.txt、差し込みは tools/brand/build.mjs）。
 * 見出しの下に置く。不具合の知らせなので赤（2026-10-14 の依頼者の依頼）——赤（`--alert`）の縦線と、赤を淡く混ぜた地。字は本文の色のまま。
 * `color-mix` が効かない端末では、その前の行（地は `--surface`）に落ちる
 */
.site-notice {
  margin: 20px 0 0; padding: 16px 20px 16px 22px;
  background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--alert); border-radius: 18px;
  background: color-mix(in srgb, var(--alert) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--alert) 35%, var(--border)); border-left-color: var(--alert);
  font-size: 15px; line-height: 1.75;
}
/* 1 件 ＝ 日時（太字）＋ 本文の段落。日時と本文は近く、件と件の間は区切り線で離す（書き方は apps/brand/README.md） */
.site-notice p { margin: 0; }
.site-notice p + p { margin-top: 6px; }
.site-notice-time { font-size: 14px; letter-spacing: 0.02em; }
.site-notice-time strong { font-weight: 800; }
.site-notice .site-notice-time + p { margin-top: 0; }
.site-notice-item + .site-notice-item {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--alert) 30%, var(--border));
}
.parent-note { margin: 10px 0 0; font-size: 13px; color: var(--text-muted); }

.hero {
  display: grid; gap: 28px; align-items: center;
  padding: 44px 0 56px;
}
@media (min-width: 900px) { .hero { grid-template-columns: 1.05fr 1fr; gap: 48px; padding: 72px 0 88px; } }
.label { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.06em; color: var(--gold); }
.hero h1 {
  margin: 6px 0 0;
  font-size: clamp(52px, 13vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.tagline { margin: 18px 0 0; font-size: clamp(22px, 4.4vw, 32px); font-weight: 800; line-height: 1.4; }
.description { margin: 16px 0 0; font-size: 16px; color: var(--text-muted); max-width: 34em; }
.play-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 34px; margin-top: 26px;
  border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: 17px; font-weight: 800; text-decoration: none;
}
.play-note { margin: 12px 0 0; font-size: 13px; color: var(--text-muted); }
.art { max-width: 480px; border-radius: 22px; overflow: hidden; background: var(--sky); }
.art canvas { display: block; width: 100%; max-width: 100%; height: 288px; image-rendering: crisp-edges; image-rendering: pixelated; }
h1 { margin: 0; font-size: clamp(36px, 9vw, 64px); font-weight: 900; line-height: 1.1; }

h2 { margin: 0 0 8px; font-size: clamp(26px, 5vw, 40px); font-weight: 800; line-height: 1.25; }
.lead { margin: 0 0 32px; color: var(--text-muted); font-size: 15px; }
.section { padding: 64px 0; border-top: 1px solid var(--border); }
.section > p { margin: 0 0 20px; font-size: 15.5px; }

ol.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
@media (min-width: 760px) { ol.flow { grid-template-columns: repeat(2, 1fr); gap: 22px; } }
@media (min-width: 1000px) { ol.flow { grid-template-columns: repeat(4, 1fr); } }
.step {
  display: flex; flex-direction: column; gap: 14px;
  padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
}
.step-art { border-radius: 14px; background: var(--sky); aspect-ratio: 16 / 10; overflow: hidden; }
.step-art svg { display: block; width: 100%; height: 100%; }
.writing-art { display: flex; align-items: center; justify-content: center; background: #f6f1e7; container-type: size; }
.writing-row {
  --frame: 1.2cqh; --inner: calc(88cqh - 2 * var(--frame)); --side: calc(var(--inner) * 40 / 296);
  display: flex; flex: none; width: calc(var(--side) + var(--inner) + 2 * var(--frame)); height: 88cqh;
  padding: var(--frame); border-radius: 1.8cqh; background: #d8ccae; overflow: hidden;
}
.writing-side {
  position: relative; flex: none; width: var(--side); height: 100%; display: flex; align-items: center; justify-content: center;
  font-family: 'UD Digi Kyokasho NK-R', 'UDデジタル教科書体 NK-R', YuKyokasho, 'Yu Kyokasho', 'Hiragino Mincho ProN', 'Yu Mincho', YuMincho, serif;
  color: #23323a;
}
.writing-side-title { position: absolute; top: 1.2cqh; left: 0; right: 0; text-align: center; font-size: 3.2cqh; line-height: 1; color: #615437; }
.writing-side-body { writing-mode: vertical-rl; white-space: nowrap; font-size: 7.5cqh; line-height: 1; }
.writing-side-body rt { font-size: 3.2cqh; }
.writing-blank { display: inline-block; width: 0.8em; height: 0.8em; margin: 0.1em 0; border: 0.08em solid #23323a; border-radius: 50%; box-sizing: border-box; }
.writing-paper { flex: none; width: var(--inner); height: 100%; background: #fffdf7; }
.writing-paper svg { shape-rendering: auto; }
.step-number { font-size: 13px; font-weight: 800; color: var(--gold); letter-spacing: 0.08em; }
.step h3 { margin: 0; font-size: 20px; font-weight: 900; }
.step p { margin: 0; font-size: 14.5px; color: var(--text-muted); }
.step .tags { font-size: 13px; }

.row { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .row { grid-template-columns: repeat(2, 1fr); } }
.card {
  padding: 22px 22px 22px 24px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 18px; font-size: 15.5px;
}
.card b { display: block; margin-bottom: 4px; font-size: 16.5px; }
.promise .card { border-left: 5px solid var(--gold); }
.continue .card { border-left: 5px solid var(--accent); }

.paid {
  display: inline-block; margin: 0 0 28px; padding: 6px 14px;
  border: 1px solid var(--accent); border-radius: 999px;
  font-size: 14px; font-weight: 800; color: var(--accent);
  /* 地を持たせる（`00805`。依頼者「有償ラベルの色を統一」）——透けていると、カードの中と節の地で色が違って見える */
  background: var(--surface);
}
.screen-row { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .screen-row { grid-template-columns: repeat(2, 1fr); gap: 22px; } }
.screen {
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
}
.screen h3 { margin: 0; font-size: 20px; font-weight: 900; }
.screen p { margin: 0; font-size: 14.5px; color: var(--text-muted); }
.screen-name { font-size: 13px; font-weight: 800; color: var(--gold); letter-spacing: 0.04em; }
/*
 * 画面の枠の中に置く有償版の印（`00805`）。字の幅にして左に寄せ、下の余白は枠の中の間（gap）に任せる。
 * 字の大きさと色は `.screen p` に負けるので、#dashboard の印（`.section > p` の大きさ ・ `--accent`）に戻す
 */
.screen .paid { align-self: flex-start; margin: 0; font-size: 15.5px; color: var(--accent); }
.window {
  border: 1px solid #d5d8de; border-radius: 12px; overflow: hidden;
  background: #fcfcfd; color: #1a1c1f; font-size: 12px; line-height: 1.5;
}
.window-bar { padding: 6px 12px; background: #2e5d8f; color: #ffffff; font-weight: 700; }
.window-body { padding: 10px 12px 12px; display: grid; gap: 8px; }
.window svg { display: block; width: 100%; height: auto; }
.header-title svg, .step-art svg, .window svg { shape-rendering: crispEdges; }
.window-row { display: flex; justify-content: space-between; gap: 8px; color: #474b52; }
.window-row b { color: #1a1c1f; }
/* 出題方法の選ぶ行（`01048`）。学習管理の出し方の行を小さく写す——選んでいる行は藍の枠と淡い藍の地 */
.window-option { padding: 6px 10px; background: #ffffff; border: 1px solid #d5d8de; border-radius: 8px; }
.window-option--selected { background: #d7e3f2; border-color: #2e5d8f; color: #1a1c1f; }
.window-cell { display: flex; gap: 6px; }
.window-cell span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 38px; border: 1px solid #a4232b; border-radius: 6px;
  font-size: 20px; font-weight: 700; background: #ffffff;
}
/* お題の種類（`00805`）。ゲームのお題の札を小さく写す——上に型の名前の帯、下に縦書きのお題。書く 1 字 は濃く、まわりの字は薄く（ゲームの札と同じ） */
.topic-card-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.topic-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 6px 4px 8px; background: #ffffff; border: 1px solid #d5d8de; border-radius: 8px;
}
.topic-card-type { padding: 0 6px; border-radius: 999px; background: #2e5d8f; color: #ffffff; font-size: 10px; font-weight: 700; white-space: nowrap; }
.topic-card-text { display: flex; justify-content: center; align-items: center; gap: 2px; height: 104px; color: #1a1c1f; }
.topic-card-vertical, .topic-card-text small { writing-mode: vertical-rl; }
.topic-card-text b { font-size: 26px; line-height: 1.1; }
.topic-card-text i { font-style: normal; font-size: 18px; line-height: 1.2; opacity: 0.45; }
.topic-card-text small { margin-top: 4px; font-size: 10px; line-height: 1.2; color: #474b52; }
.topic-card-blank { display: block; width: 26px; height: 26px; border: 1.5px dashed #a4232b; border-radius: 4px; }
.screen-sample { font-size: 12px; color: var(--text-muted); text-align: right; }
.dashboard-note { margin: 26px 0 0; display: grid; gap: 10px; font-size: 14.5px; color: var(--text-muted); }
.dashboard-note p { margin: 0; }
.dashboard-note b { color: var(--text); }

.plan-table {
  width: 100%; margin: 0; table-layout: fixed;
  border-collapse: separate; border-spacing: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  font-size: 14px; line-height: 1.5;
}
.plan-table th, .plan-table td { padding: 12px 8px; border-top: 1px solid var(--border); vertical-align: middle; }
.plan-table thead th { padding-left: 2px; padding-right: 2px; border-top: 0; font-size: 14px; font-weight: 800; text-align: center; white-space: nowrap; }
.plan-table thead th:first-child { width: 42%; }
.plan-table thead small { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); white-space: normal; }
.plan-table tbody th { padding-left: 14px; font-size: 13.5px; font-weight: 700; text-align: left; }
.plan-table td { padding-left: 4px; padding-right: 4px; text-align: center; color: var(--text); }
.plan-table .plan-paid { background: var(--paid-tint); }
.plan-table thead .plan-paid { color: var(--accent); }
.plan-table thead .plan-paid small { color: var(--accent); }
.plan-table .plan-yes { font-size: 18px; font-weight: 800; line-height: 1.15; color: var(--accent); }
.plan-table .plan-no { color: var(--text-muted); }
.plan-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.plan-note { margin: 16px 0 0; font-size: 14px; color: var(--text-muted); }
@media (min-width: 700px) {
  .plan-table { font-size: 15.5px; }
  .plan-table th, .plan-table td { padding: 14px 16px; }
  .plan-table tbody th { padding-left: 22px; font-size: 15.5px; }
  .plan-table thead th { font-size: 15.5px; }
  .plan-table thead small { font-size: 13px; }
}

.section .play-button { margin-top: 28px; }

.origin .lead { margin-bottom: 28px; }
.origin-grid { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .origin-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px; } }
.origin-letter { padding: 4px 0 4px 22px; border-left: 4px solid var(--gold); }
.origin-letter p { max-width: 34em; margin: 0 0 14px; font-size: 15.5px; }
.origin-letter p:last-child { margin-bottom: 0; }
.origin-sign { font-size: 14px; font-weight: 700; color: var(--text-muted); text-align: right; }
.origin-aside { padding: 20px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.origin-aside-title { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; color: var(--gold); }
.origin-aside ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.origin-aside li { display: flex; gap: 12px; align-items: baseline; font-size: 14.5px; color: var(--text-muted); }
.origin-aside li b { flex: 0 0 auto; min-width: 4.5em; font-size: 15px; color: var(--text); }

ul.license-list {
  list-style: none; margin: 0; padding: 2px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; font-size: 11px;
}
ul.license-list li { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); align-items: center; column-gap: 12px; border-top: 1px solid var(--border); color: var(--text-muted); }
ul.license-list li a { overflow-wrap: anywhere; }
ul.license-list li:first-child { border-top: 0; }
ul.license-list a { display: inline-flex; align-items: center; min-height: 28px; font-weight: 700; }
.license-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.license-box h6 { margin: 0 0 4px; font-size: 13px; }

.closing { padding: 64px 0 72px; border-top: 1px solid var(--border); text-align: center; }
.closing h2 { margin-bottom: 4px; }
footer { padding: 26px 0 48px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-muted); }
footer nav a { display: inline-flex; align-items: center; min-height: 40px; margin-right: 20px; }

@media (prefers-reduced-motion: no-preference) {
  .unit-row { animation: slide-in 1.6s cubic-bezier(.2,.7,.2,1) 0.2s both; }
  @keyframes slide-in { from { transform: translateX(-46px); } to { transform: translateX(0); } }
  @supports (animation-timeline: view()) {
    .step, .card, .screen {
      animation: fade-in linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 55%;
    }
    @keyframes fade-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
  }
}
