/*
 * 入園入学だんどりくんのサイト（2026-11-24 に作り直し。docs/decisions.md の「サイトの見た目」）。
 * - 白い背景が基本。色は差し色（だんどりくんの黄色）と、ボタン・小さな面にだけ使う
 * - スマホ（幅 360〜430）を主に作り、パソコンはそれを広げるだけ。文字とボタンは小さくしない（本文 16px・ボタンの高さ 56px）
 * - ブラウザの JavaScript は使わない。style 属性も書けない（守りのヘッダーの style-src 'self'）ので、見た目はすべてここ
 * - 届くメッセージの 3 種類の色は、LINE のメッセージ（src/messages/cards.ts）と同じ
 */
:root {
  --ink: #1d2939;
  --sub: #556070;
  --faint: #7c8695;
  --line: #e4e7eb;
  --bg: #ffffff;
  --soft: #f5f6f8;
  --brand: #ffc21a;
  --brand-soft: #fff6d8;
  --brand-ink: #8a5600;
  /* 主な操作（友だち追加）のボタン。LINE の緑には寄せない */
  --cta: #e85b0c;
  --cta-edge: #b84706;
  --cta-ink: #ffffff;
  --link: #1f63c6;
  --done: #0b7a3e; --done-bg: #e3f6ea;
  --ask: #a36a00; --ask-bg: #fff3cc; --ask-ink: #5a4300;
  --todo: #1f4fa8; --todo-bg: #e4eefc;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  --round: "Hiragino Maru Gothic ProN", "M PLUS Rounded 1c", var(--font);
  --cta-height: 104px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.8; overflow-wrap: break-word; }
body.has-cta { padding-bottom: calc(var(--cta-height) + env(safe-area-inset-bottom)); }
a { color: var(--link); }
img, svg { max-width: 100%; }
h1, h2, h3 { font-feature-settings: "palt"; letter-spacing: .03em; line-height: 1.45; font-weight: 800; word-break: auto-phrase; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
.nw { display: inline-block; }
.icon { width: 1em; height: 1em; flex: none; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 8px; background: #fff; padding: 4px 10px; z-index: 40; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

/* ---------- ヘッダー・フッター ---------- */
.site-header { background: #fff; }
.is-doc .site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 17px; letter-spacing: .03em; font-feature-settings: "palt"; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--ink); display: inline-grid; place-items: center; font-family: var(--round); font-size: 19px; font-weight: 700; flex: none; }

.site-footer { background: var(--soft); color: var(--sub); font-size: 14px; line-height: 1.7; padding: 36px 0 28px; margin-top: 24px; }
.site-footer p { margin: 0 0 12px; }
.brand-footer { margin-bottom: 14px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0 0 16px; }
.footer-nav a { color: var(--ink); text-decoration: none; padding: 8px 0; font-size: 14px; }
.footer-contact a { color: var(--sub); }

/* ---------- ボタン ---------- */
.btn-line { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 420px; min-height: 56px; margin: 0 auto; padding: 0 16px; border-radius: 999px; background: var(--cta); color: var(--cta-ink); font-size: 17px; font-weight: 800; letter-spacing: .03em; font-feature-settings: "palt"; line-height: 1.3; text-align: center; text-decoration: none; text-shadow: 0 1px 1px rgba(120, 40, 0, .25); box-shadow: 0 4px 0 var(--cta-edge); }
.btn-line .icon { width: 22px; height: 22px; }
.btn-line:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--cta-edge); }
.btn-line.is-pending { background: #a3acb7; color: #fff; box-shadow: none; cursor: not-allowed; }

/* 主な操作（友だち追加）は画面の下に固定する（会社の決まり「画面の作り」）。ホームバーの分だけ余白をとる */
.cta-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 255, 255, .97); box-shadow: 0 -4px 18px rgba(29, 41, 57, .10); padding: 12px 16px calc(8px + env(safe-area-inset-bottom)); }
.cta-inner { max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.cta-note { margin: 0; font-size: 12px; line-height: 1.4; color: var(--sub); text-align: center; }

/* ---------- トップ（LP） ---------- */
.hero { padding: 20px 0 24px; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.hero-title { font-size: min(30px, 7.6vw); line-height: 1.4; margin: 0 0 12px; }
.h1-sub { display: block; font-size: 18px; line-height: 1.5; color: var(--brand-ink); margin: 0 0 4px; }
.mark { background: linear-gradient(transparent 62%, var(--brand) 62%, var(--brand) 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero .answer { font-size: 16px; color: var(--sub); margin: 0 0 18px; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; }
.hero-points li { display: inline-flex; align-items: center; gap: 3px; background: var(--brand-soft); color: var(--brand-ink); font-size: 13.5px; font-weight: 700; line-height: 1.4; border-radius: 999px; padding: 6px 12px 6px 9px; }
.hero-points .icon { width: 14px; height: 14px; stroke-width: 3; }
.hero-cta { display: none; }
.hero-note { font-size: 13px; line-height: 1.6; color: var(--faint); margin: 0; }
.hero-visual { position: relative; isolation: isolate; margin: 0 0 20px; }
.hero-chara { display: none; }

.sec { padding: 64px 0 8px; }
.sec-head { text-align: center; margin: 0 0 28px; }
.sec-label { display: inline-block; margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .1em; color: var(--brand-ink); }
.sec-label::before, .sec-label::after { content: ""; display: inline-block; width: 14px; height: 2px; background: var(--brand); vertical-align: middle; margin: 0 8px 3px; }
.sec-title { font-size: 26px; margin: 0; }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; }
.feature { text-align: center; }
.feature-icon { width: 80px; height: 80px; margin: 0 auto 12px; border-radius: 50%; background: var(--brand-soft); color: var(--ink); display: grid; place-items: center; }
.feature-icon .icon { width: 38px; height: 38px; stroke-width: 1.8; }
.feature h3 { font-size: 20px; margin: 0 0 6px; }
.feature p { margin: 0 auto; max-width: 22em; color: var(--sub); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.step { display: grid; grid-template-columns: 60px 1fr; gap: 16px; align-items: center; background: var(--soft); border-radius: 20px; padding: 18px; }
.step-icon { width: 60px; height: 60px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; }
.step-icon .icon { width: 30px; height: 30px; }
.step-num { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; color: var(--brand-ink); line-height: 1.4; }
.step h3 { font-size: 18.5px; margin: 0 0 2px; }
.step p:last-child { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--sub); }

.area-card { text-align: center; border: 2px solid var(--brand); border-radius: 24px; padding: 24px 20px; margin: 0 0 28px; }
.area-big { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 22px; font-weight: 800; letter-spacing: .03em; font-feature-settings: "palt"; margin: 0 0 8px; }
.area-big .icon { width: 28px; height: 28px; color: var(--cta); }
.area-card p:last-child { margin: 0; color: var(--sub); }
.examples-label { text-align: center; font-size: 14px; font-weight: 700; color: var(--sub); margin: 0 0 10px; }
.examples { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.examples a { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.5; }
.examples a span { flex: 1; }
.examples .icon { width: 20px; height: 20px; color: var(--faint); }
.examples .icon:first-child { color: var(--cta); }

.sec-cta { padding-bottom: 16px; }
.cta-card { position: relative; text-align: center; background: var(--brand-soft); border-radius: 28px; padding: 28px 20px 32px; }
.cta-chara { width: 92px; height: auto; margin: 0 auto 8px; display: block; }
.cta-title { font-size: 24px; margin: 0 0 6px; }
.cta-card p { color: var(--sub); margin: 0 0 20px; }

/* 会話の絵（src/site/parts.ts の chatMock）：「頼む → 見つかるまで探す → 見つかったら知らせる」。文字は大きく、吹き出しは 4 つまで */
.chat { width: 100%; max-width: 360px; margin: 0 auto; border: 1px solid #d3dbe6; border-radius: 24px; overflow: hidden; background: #b9cbe4; color: #111; box-shadow: 0 18px 36px -18px rgba(29, 41, 57, .45); }
.chat-head { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 14px; background: #fff; border-bottom: 1px solid #d3dbe6; font-size: 14px; font-weight: 700; line-height: 1.4; }
.chat-head .ava { width: 26px; height: 26px; background: var(--brand-soft); }
.chat-head .ava-img { width: 22px; }
.chat-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 12px 16px; font-size: 15px; line-height: 1.5; }
.chat-date { align-self: center; margin: 0; padding: 1px 12px; border-radius: 999px; background: rgba(29, 41, 57, .35); color: #fff; font-size: 12.5px; font-weight: 700; }
.msg { display: flex; align-items: flex-start; gap: 6px; }
.msg.user { justify-content: flex-end; }
.ava { width: 32px; height: 32px; flex: none; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; }
.ava-img { width: 27px; height: auto; margin-top: 3px; }
.bubble { margin: 0; max-width: 82%; padding: 8px 13px; border-radius: 18px; background: #fff; font-weight: 600; word-break: auto-phrase; text-wrap: balance; }
.msg.user .bubble { background: #8de055; max-width: 86%; }
.bubble-found b { color: var(--done); font-size: 16.5px; }
/* 候補（2 つ目は右にのぞかせる。LINE の横に並ぶカードの形） */
.cands { list-style: none; display: flex; gap: 8px; margin: 0 -12px 0 26px; padding: 0 0 0 12px; overflow: hidden; -webkit-mask-image: linear-gradient(to right, #000 78%, transparent); mask-image: linear-gradient(to right, #000 78%, transparent); }
.cand { flex: 0 0 196px; display: flex; flex-direction: column; gap: 2px; background: #fff; border-radius: 16px; padding: 11px 12px 12px; font-size: 14px; line-height: 1.5; }
.cand-name { font-size: 15.5px; margin-bottom: 2px; }
.cand-row { display: flex; gap: 8px; }
.cand-row i { font-style: normal; flex: none; font-size: 12px; font-weight: 700; color: var(--done); background: var(--done-bg); border-radius: 6px; padding: 1px 6px; align-self: center; }
.cand-btn { margin-top: 8px; padding: 7px; border-radius: 10px; background: #06c755; color: #fff; text-align: center; font-weight: 700; font-size: 14px; }

/* ---------- 読むページ（区のページ・とは・規約など） ---------- */
.crumbs ol { list-style: none; margin: 0; padding: 14px 0 0; display: flex; flex-wrap: wrap; gap: 2px 4px; font-size: 13px; line-height: 1.6; color: var(--faint); }
.crumbs a { color: var(--sub); }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.doc { padding: 4px 0 8px; }
.doc h1 { font-size: 24px; margin: 8px 0 18px; word-break: keep-all; overflow-wrap: anywhere; }
.eyebrow { margin: 16px 0 0; font-size: 13.5px; font-weight: 700; color: var(--brand-ink); }
.doc .answer { background: var(--brand-soft); border-radius: 16px; padding: 16px 18px; margin: 0 0 14px; font-size: 16px; }
.doc h2 { font-size: 21px; margin: 44px 0 14px; padding-left: 14px; border-left: 5px solid var(--brand); }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin: 6px 0; }
.meta { font-size: 13.5px; line-height: 1.7; color: var(--sub); border-left: 3px solid var(--line); padding: 2px 0 2px 12px; margin: 0 0 16px; }
.note { font-size: 14px; color: var(--sub); }
.lead { font-size: 16px; }
.src { font-size: 12.5px; color: var(--faint); }
.src-list { font-size: 13px; color: var(--sub); padding-left: 1.2em; }
.ad { display: inline-block; font-size: 11px; background: #b23c0b; color: #fff; border-radius: 4px; padding: 0 6px; }
.inline-cta { margin: 40px 0 8px; padding: 24px 18px; border-radius: 24px; background: var(--brand-soft); text-align: center; font-weight: 700; }
.inline-cta .btn-line { margin-top: 14px; }
.share-label { display: block; font-size: 13.5px; color: var(--sub); margin-bottom: 4px; }
.share-text { width: 100%; font: inherit; font-size: 15px; line-height: 1.7; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); color: var(--ink); resize: vertical; }
.btn-share { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 2px solid var(--ink); color: var(--ink); font-weight: 700; text-decoration: none; background: #fff; }
.page-foot { padding-top: 8px; padding-bottom: 24px; }
.is-lp .page-foot { text-align: center; }
.updated { color: var(--faint); font-size: 13px; margin: 24px 0 0; }
/* 更新の記録（区のページ・横断データだけ）。小さく、閉じておく */
.changelog { margin-top: 4px; font-size: 13px; color: var(--sub); }
.changelog summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--faint); }
.changelog ul { padding-left: 1.2em; margin: 0 0 8px; }

/* 表（src/site/table.ts）。AI と検索が読めるよう、本物の HTML の表のまま見た目だけ整える */
.table-wrap { overflow-x: auto; margin: 0 0 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.65; }
caption { text-align: left; font-weight: 800; padding: 6px 0 10px; caption-side: top; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
thead th { background: var(--soft); font-size: 13.5px; border-bottom: 0; }
thead th:first-child { border-radius: 10px 0 0 10px; }
thead th:last-child { border-radius: 0 10px 10px 0; }
th small { font-weight: 400; color: var(--sub); }
/* 行の見出し（区の名前など）は 1 文字ずつに折り返さない幅を、出典の列は広がりすぎない幅をとる。見出しと値の 2 列の表（運営者など）は、見出しを折り返さない */
th[scope="row"] { min-width: 6em; }
table:not(.cards) th[scope="row"] { white-space: nowrap; }
td.src { width: 32%; }

/* 列が 3 つ以上の表は、スマホの幅では 1 行を 1 枚のカードにする。列の名前は data-label から出す */
@media (max-width: 719px) {
  table.cards, table.cards tbody, table.cards tr, table.cards th, table.cards td { display: block; width: 100%; }
  table.cards caption { display: block; }
  table.cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  table.cards tr { background: var(--soft); border-radius: 16px; padding: 12px 16px; margin: 0 0 10px; }
  table.cards th, table.cards td { border: 0; padding: 4px 0; background: none; }
  table.cards th[scope="row"] { font-size: 17px; padding-bottom: 4px; }
  table.cards td[data-label]::before { content: attr(data-label); display: block; font-size: 12.5px; font-weight: 700; color: var(--sub); line-height: 1.5; }
  table.cards td.src { padding-top: 6px; }
  /* 1 列目（いつ・日付）はカードの見出しとして太く出す（列の名前は出さない） */
  table.cards tr > td:first-child { font-weight: 700; font-size: 16px; }
  table.cards tr > td:first-child::before { display: none; }
}
/* 列が 5 つ以上の表は、パソコンの幅でもカードにして、値を 3 列に並べる（src/site/table.ts の WIDE） */
@media (min-width: 720px) {
  table.cards.wide, table.cards.wide tbody { display: block; }
  table.cards.wide caption { display: block; }
  table.cards.wide thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  table.cards.wide tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 18px; background: var(--soft); border-radius: 16px; padding: 14px 18px; margin: 0 0 10px; }
  table.cards.wide th, table.cards.wide td { display: block; width: auto; min-width: 0; border: 0; padding: 0; background: none; }
  table.cards.wide th[scope="row"] { grid-column: 1 / -1; font-size: 17px; }
  table.cards.wide td[data-label]::before { content: attr(data-label); display: block; font-size: 12.5px; font-weight: 700; color: var(--sub); line-height: 1.5; }
}

/* ---------- パソコン（スマホの作りを広げる） ---------- */
@media (min-width: 768px) {
  .header-inner { height: 68px; }
  .brand { font-size: 19px; }
  .hero { padding: 24px 0 40px; }
  /* 左に文、右に会話の絵（文は上下の真ん中に） */
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-rows: 1fr auto auto auto auto auto 1fr; grid-template-areas: ". visual" "title visual" "answer visual" "points visual" "cta visual" "note visual" ". visual"; column-gap: 56px; }
  .hero-title { grid-area: title; }
  .hero .answer { grid-area: answer; }
  .hero-points { grid-area: points; }
  .hero-cta { grid-area: cta; }
  .hero-note { grid-area: note; }
  .hero-visual { grid-area: visual; margin: 0; padding: 24px 0 24px 40px; }
  .hero-visual::before { content: ""; position: absolute; z-index: -1; left: 55%; top: 50%; width: 500px; height: 500px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--brand-soft); }
  .hero-chara { display: block; position: absolute; width: 110px; height: auto; left: -24px; bottom: 8px; }
  .hero-title { font-size: 44px; }
  .h1-sub { font-size: 21px; }
  .hero .answer { font-size: 17px; }
  .hero-cta { display: block; margin: 0 0 16px; }
  .hero-cta .btn-line { margin: 0; max-width: 380px; }
  .chat { max-width: 420px; }
  .chat-body { font-size: 16px; padding: 16px 14px 18px; }
  .cand { flex-basis: 220px; }
  .sec { padding: 96px 0 8px; }
  .sec-head { margin-bottom: 44px; }
  .sec-title { font-size: 34px; }
  .features { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .step { grid-template-columns: 1fr; justify-items: center; align-content: start; text-align: center; padding: 28px 20px; }
  .area-card { max-width: 720px; margin: 0 auto 32px; padding: 32px; }
  .area-big { font-size: 26px; }
  .examples { grid-template-columns: repeat(3, 1fr); max-width: 960px; margin: 0 auto; }
  .cta-card { padding: 44px 32px 48px; }
  .cta-title { font-size: 32px; }
  .doc h1 { font-size: 34px; }
  .footer-nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
}
