/*
 * www.onestamp.jp のスタイル（resources/views/web）。ビルドせずにそのまま配信する。
 * 色はアプリ（AccentColor）に合わせる。ダークモードにも対応する。
 */

:root {
    color-scheme: light;
    --accent: #008570;
    --accent-strong: #006b5a;
    --accent-soft: #e3f3ef;
    --accent-text: #ffffff;
    --bg: #f7f9f8;
    --surface: #ffffff;
    --surface-2: #eef3f1;
    --text: #14201c;
    --muted: #5a6763;
    --line: #dde5e2;
    --shadow: 0 1px 2px rgb(16 32 28 / 6%), 0 8px 24px rgb(16 32 28 / 8%);
    --radius: 20px;
    --radius-small: 12px;
    /* 余白の基準（カードの内側・カードどうしの間・セクションの上下）。スマホでは詰める */
    --card-pad: 24px;
    --grid-gap: 24px;
    --section-space: 88px;
    --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --accent: #2eb89c;
        --accent-strong: #5fd0b8;
        --accent-soft: #11302a;
        --accent-text: #04201a;
        --bg: #0d1211;
        --surface: #151c1b;
        --surface-2: #1b2422;
        --text: #eaf1ee;
        --muted: #9fada8;
        --line: #283331;
        --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 30%);
    }
}

@media (max-width: 560px) {
    :root { --card-pad: 20px; --grid-gap: 16px; --section-space: 56px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.8;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.35; letter-spacing: 0.01em; margin: 0; }
p { margin: 0; }
/*
 * 大きな見出しだけ、日本語を文節の区切りで折り返し、行の長さをそろえる（対応するブラウザだけ）。
 * 文章（説明文・カードの中の文）に使うと、行を早めに折り返して右の余白が不ぞろいに広く見えるので使わない。
 */
h1, .section-head h2, .banner h2 { word-break: auto-phrase; text-wrap: balance; }
.lead { text-wrap: pretty; }
/* 文章は両端をそろえる（禁則処理や英単語で行末に 1〜2 文字分の空きができて、右の余白が不ぞろいに見えないように） */
.lead, .feature p, .steps p, .purpose span, .banner p, .faq details p, .contact-box p, .prose p, .prose li, .description, .field-hint { text-align: justify; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 760px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

/* ---------- ボタン ---------- */

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 700; font-size: 0.95rem; line-height: 1.3; text-decoration: none; text-align: center;
    cursor: pointer; font-family: inherit;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-small { padding: 8px 16px; font-size: 0.875rem; }
.button-large { padding: 15px 26px; font-size: 1rem; }
.button-primary { background: var(--accent); color: var(--accent-text); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent); }
.button-primary:hover { background: var(--accent-strong); }
.button-secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.button-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.button-ghost:hover { background: var(--surface); }
.button-light { background: #ffffff; color: #00594b; }
.button-outline-light { background: transparent; color: #ffffff; border-color: rgb(255 255 255 / 55%); }
.button-outline-light:hover { background: rgb(255 255 255 / 10%); }

/* ---------- ヘッダー ---------- */

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-mark {
    width: 34px; height: 34px; border-radius: 10px; flex: none;
    background: linear-gradient(135deg, #00a58a, #006b5a);
    display: grid; place-items: center;
    box-shadow: 0 2px 6px rgb(0 133 112 / 30%);
}
.logo-mark img { width: 22px; height: 22px; }
.logo-text { font-weight: 900; font-size: 1.3rem; letter-spacing: -0.01em; }
.logo-text span { color: var(--accent); }

.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
    color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.92rem;
    padding: 8px 14px; border-radius: 999px;
}
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

.menu { display: none; position: relative; margin-left: auto; }
.menu summary {
    list-style: none; cursor: pointer; width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; color: var(--text);
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--surface-2); }
.menu-panel {
    position: absolute; right: 0; top: 52px; width: min(300px, calc(100vw - 32px));
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 10px; display: grid; gap: 2px;
}
.menu-panel a:not(.button) { color: var(--text); text-decoration: none; font-weight: 600; padding: 12px 14px; border-radius: 12px; }
.menu-panel a:not(.button):hover { background: var(--surface-2); }
.menu-panel .button { margin-top: 8px; }

@media (max-width: 820px) {
    .site-nav, .header-cta { display: none; }
    .menu { display: block; }
}

/* ---------- 共通の見出し・セクション ---------- */

.eyebrow {
    color: var(--accent); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.14em; margin-bottom: 10px;
}
.lead { color: var(--muted); font-size: 1.05rem; margin-top: 16px; max-width: 48em; }

.section { padding: var(--section-space) 0; }
.section-tight { padding: 40px 0 var(--section-space); }
/* 背景の同じセクションが続くときは、上下の余白を重ねない */
.section:not(.section-tint) + .section:not(.section-tint) { padding-top: 0; }
.section-tint { background: var(--surface-2); }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 800; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }

.link-arrow { font-weight: 700; text-decoration: none; white-space: nowrap; }
.link-arrow::after { content: " →"; }

.page-head { padding: 64px 0 24px; }
.page-head h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); font-weight: 900; }
.page-head-accent {
    background: radial-gradient(1200px 400px at 85% -10%, rgb(255 255 255 / 18%), transparent 60%), linear-gradient(135deg, #00957d, #005a4c);
    color: #ffffff; padding: 88px 0;
}
.page-head-accent .eyebrow { color: #b8f0e3; }
/* 緑の帯は幅いっぱいに広がるので、説明文も帯の幅まで使う（幅を絞ると右が空いて見える） */
.page-head-accent .lead { color: rgb(255 255 255 / 85%); max-width: none; }
.page-head-accent .hero-actions { margin-top: 32px; }

.small-note { color: var(--muted); font-size: 0.9rem; margin-top: 20px; text-align: center; }

/* ---------- トップのヒーロー ---------- */

.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(900px 500px at 90% 10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
        radial-gradient(700px 400px at 0% 100%, color-mix(in srgb, #f5c542 18%, transparent), transparent 70%);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 88px; }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 3.8rem); font-weight: 900; line-height: 1.2; letter-spacing: 0; }
.hero .lead { font-size: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 20px; color: var(--muted); font-size: 0.95rem; }
.hero-note strong { color: var(--accent); font-size: 1.2rem; }
.hero-visual { display: flex; justify-content: center; }

@media (max-width: 880px) {
    .hero-inner { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 64px; }
    .hero-visual { margin-top: 8px; }
    .hero-visual .phone { width: 250px; }
}

/* アプリの画面のイメージ */
.phone {
    width: 290px; aspect-ratio: 9 / 19; border-radius: 46px; padding: 12px;
    background: linear-gradient(145deg, #2a3331, #0f1514);
    box-shadow: 0 30px 60px rgb(0 60 50 / 25%), inset 0 0 0 2px rgb(255 255 255 / 8%);
    transform: rotate(-3deg);
}
.phone-screen {
    height: 100%; border-radius: 36px; overflow: hidden; padding: 14px 14px 18px;
    background: linear-gradient(180deg, #f2f7f5, #ffffff);
    color: #14201c; display: flex; flex-direction: column; gap: 12px;
}
.phone-status { display: flex; justify-content: space-between; align-items: center; font-size: 0.7rem; font-weight: 700; padding: 0 8px; }
.phone-island { width: 76px; height: 22px; border-radius: 999px; background: #0f1514; }
.phone-title { font-weight: 800; font-size: 1.05rem; padding: 6px 4px 0; }
.mock-card { background: #ffffff; border-radius: 18px; padding: 14px; box-shadow: 0 4px 14px rgb(0 60 50 / 10%); }
.mock-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mock-name { font-weight: 800; font-size: 0.8rem; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-card-head > div:first-child, .mock-near > div { min-width: 0; }
.mock-sub { color: #5a6763; font-size: 0.7rem; }
.mock-ring {
    width: 46px; height: 46px; border-radius: 50%; flex: none;
    background: conic-gradient(#008570 0 78%, #dde5e2 78% 100%);
    display: grid; place-items: center;
}
.mock-ring span { width: 36px; height: 36px; border-radius: 50%; background: #ffffff; display: grid; place-items: center; font-size: 0.62rem; font-weight: 800; }
.mock-stamps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 6px 4px; }
.mock-stamp {
    aspect-ratio: 1; border-radius: 50%; border: 2px dashed #c9d6d2;
    display: grid; place-items: center;
}
.mock-stamp.pressed {
    border: none; background: linear-gradient(135deg, #00a58a, #006b5a);
    transform: rotate(calc(var(--i) * 13deg - 20deg));
    box-shadow: 0 3px 8px rgb(0 133 112 / 30%);
    animation: press 0.5s cubic-bezier(.3, 1.6, .5, 1) both;
    animation-delay: calc(var(--i) * 80ms + 300ms);
}
.mock-stamp img { width: 56%; height: 56%; }
@keyframes press { from { transform: scale(1.6) rotate(0deg); opacity: 0; } }
.mock-near { display: flex; align-items: center; gap: 10px; background: #ffffff; border-radius: 16px; padding: 12px; box-shadow: 0 4px 14px rgb(0 60 50 / 10%); margin-top: auto; }
.mock-pin { width: 30px; height: 30px; border-radius: 50%; background: #e3f3ef; flex: none; position: relative; }
.mock-pin::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #008570; box-shadow: 0 0 0 6px rgb(0 133 112 / 15%); }
.mock-button { margin-left: auto; background: #008570; color: #ffffff; font-size: 0.62rem; font-weight: 800; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
    .mock-stamp.pressed { animation: none; }
    .button { transition: none; }
}

/* ---------- 特長・ステップ ---------- */

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--grid-gap); }
.feature-grid-3 { grid-template-columns: repeat(3, 1fr); }
.feature {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: var(--card-pad);
}
.feature h3 { font-size: 1.08rem; font-weight: 800; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.95rem; }
.feature-icon {
    width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent); margin-bottom: 18px;
}
.feature-icon svg { width: 26px; height: 26px; }

@media (max-width: 980px) { .feature-grid, .feature-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid, .feature-grid-3 { grid-template-columns: 1fr; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--grid-gap); }
.steps-4 { grid-template-columns: repeat(4, 1fr); }
.steps li { background: var(--surface); border-radius: var(--radius); padding: var(--card-pad); border: 1px solid var(--line); }
.steps h3 { font-size: 1.08rem; font-weight: 800; margin: 14px 0 8px; }
.steps p { color: var(--muted); font-size: 0.95rem; }
.step-number {
    display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
    background: var(--accent); color: var(--accent-text); font-weight: 900; font-size: 1.1rem;
}
@media (max-width: 980px) { .steps-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .steps, .steps-4 { grid-template-columns: 1fr; } }

.purpose-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--grid-gap); }
.purpose {
    display: grid; gap: 6px; padding: var(--card-pad); border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border: 1px solid var(--line);
}
.purpose strong { font-size: 1.15rem; font-weight: 800; }
.purpose span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 720px) { .purpose-grid { grid-template-columns: 1fr; } }

/* ---------- スタンプラリーのカード ---------- */

.book-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--grid-gap); }
@media (max-width: 900px) { .book-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .book-grid { grid-template-columns: 1fr; } }

.book-card {
    display: flex; flex-direction: column; text-decoration: none; color: var(--text);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.book-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.book-card-image { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
/* スタンプラリー・スタンプの画像は、透過の部分を白で見せる（ダークモードでも。画像は白い背景を前提に作られている） */
.book-card-image > img { width: 100%; height: 100%; object-fit: cover; background: #ffffff; }
.book-card-placeholder {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: linear-gradient(135deg, #00a58a, #006b5a);
}
.book-card-placeholder img { width: 64px; opacity: 0.9; }
.book-card-body { padding: 16px 20px 20px; display: grid; gap: 6px; }
.book-card h3 { font-size: 1.02rem; font-weight: 800; line-height: 1.5; }
.book-card-meta { color: var(--muted); font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.book-card-period { color: var(--muted); font-size: 0.8rem; }

/* ---------- チップ（タグ） ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--grid-gap); }
.chips-filter { margin: 0 0 32px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 999px; font-size: 0.88rem; font-weight: 700;
    background: var(--surface); color: var(--text); border: 1px solid var(--line); text-decoration: none;
}
.chip span { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
a.chip:hover { border-color: var(--accent); }
.chip[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.chip[aria-current="page"] span { color: inherit; opacity: 0.8; }
.chip-overlay { position: absolute; left: 12px; top: 12px; background: rgb(0 0 0 / 60%); color: #ffffff; border: none; font-size: 0.75rem; padding: 4px 10px; }

/* ---------- ページ送り・空 ---------- */

.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 40px; }
.page { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 700; font-size: 0.9rem; }
.page.disabled { opacity: 0.4; }
.page-status { color: var(--muted); font-size: 0.9rem; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* ---------- バナー ---------- */

.banner {
    display: flex; align-items: center; justify-content: space-between; gap: 32px;
    padding: 48px; border-radius: 28px; color: #ffffff;
    background: radial-gradient(800px 300px at 100% 0%, rgb(255 255 255 / 16%), transparent 60%), linear-gradient(135deg, #00957d, #005a4c);
}
.banner h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 900; margin-bottom: 12px; }
.banner p { color: rgb(255 255 255 / 88%); max-width: 36em; }
.banner .eyebrow { color: #b8f0e3; }
.banner-actions { display: flex; flex-wrap: wrap; gap: 12px; flex: none; }
@media (max-width: 820px) { .banner { flex-direction: column; align-items: flex-start; padding: 32px 24px; } }

/* ---------- スタンプラリー・スタンプのページ ---------- */

.detail { padding: 32px 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-body { padding: var(--card-pad); }
.hero-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #ffffff; }
.card h1 { font-size: 1.5rem; font-weight: 900; margin-bottom: 8px; }
.meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; }
.meta span + span::before { content: "・"; }
.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0 8px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); margin-left: 4px; vertical-align: 2px; }
.description { margin-top: 14px; }
.notice { background: var(--accent-soft); border-radius: var(--radius-small); padding: 14px 18px; margin-bottom: 16px; font-size: 0.95rem; }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 14px 0 0; font-size: 0.95rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.app-cta { display: grid; gap: 10px; margin: 24px 0 72px; }
.hint { color: var(--muted); font-size: 0.85rem; text-align: center; margin-top: 4px; }

/* ---------- FAQ ---------- */

.faq-group { font-size: 1.2rem; font-weight: 800; margin: 40px 0 14px; }
.faq-group:first-child { margin-top: 0; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-small); }
.faq summary {
    cursor: pointer; list-style: none; padding: 16px 48px 16px 20px; font-weight: 700; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 20px 18px; color: var(--muted); }
.contact-box { margin-top: 48px; padding: var(--card-pad); border-radius: var(--radius); background: var(--accent-soft); display: grid; gap: 14px; justify-items: start; }
.contact-box h2 { font-size: 1.2rem; font-weight: 800; }

/* ---------- フォーム ---------- */

.form { display: grid; gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
@media (max-width: 560px) { .form { padding: var(--card-pad); } }
.field { display: grid; gap: 8px; }
.field label { font-weight: 700; }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
    width: 100%; font: inherit; color: var(--text); background: var(--bg);
    border: 1px solid var(--line); border-radius: var(--radius-small); padding: 12px 14px;
}
.field input[type="text"], .field input[type="email"], .field select { min-height: 50px; }
/* Safari の標準の見た目では padding が効かず低くなるので、見た目を外して矢印を付ける */
.field select {
    -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%235a6763' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 20px;
}
.field textarea { resize: vertical; min-height: 180px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
/* input[type="text"] などの枠の指定より強くする（弱いと、お名前・メールアドレスだけ赤くならない） */
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #d14343; }
.field-hint { color: var(--muted); font-size: 0.85rem; }
.field-error { color: #d14343; font-size: 0.88rem; font-weight: 600; }
.checkbox { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.checkbox input { width: 20px; height: 20px; accent-color: var(--accent); }
.form .button { justify-self: start; }
.alert { background: #fdecec; color: #8a1f1f; border-radius: var(--radius-small); padding: 14px 18px; margin-bottom: 16px; font-weight: 600; }
@media (prefers-color-scheme: dark) { .alert { background: #3a1717; color: #ffb4b4; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.done { text-align: center; display: grid; gap: 16px; justify-items: center; padding: 40px 0; }
.done h1 { font-size: 1.6rem; font-weight: 900; }
.done p { color: var(--muted); max-width: 32em; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; }

/* ---------- 文書（プライバシーポリシー） ---------- */

.prose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
@media (max-width: 560px) { .prose { padding: var(--card-pad); } }
.prose h2 { font-size: 1.25rem; font-weight: 800; margin: 40px 0 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.prose h2:first-of-type { border-top: none; padding-top: 0; }
.prose h3 { font-size: 1.05rem; font-weight: 800; margin: 24px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 4px; }
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-size: 0.92rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); white-space: nowrap; }
mark.todo { background: #ffe58a; color: #3a2e00; padding: 0 4px; border-radius: 4px; }

/* ---------- フッター ---------- */

.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 56px 0 24px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }
.footer-nav { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-nav div { display: grid; gap: 6px; align-content: start; }
.footer-nav h2 { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.1em; margin-bottom: 4px; font-weight: 700; }
.footer-nav a { color: var(--text); text-decoration: none; font-size: 0.92rem; }
.footer-nav a:hover { color: var(--accent); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 560px) { .footer-nav { gap: 28px 40px; } }

/* ---------- 一覧の検索 ---------- */

.search {
    display: flex; align-items: center; gap: 8px; margin-top: 28px; max-width: 640px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 18px;
    box-shadow: 0 2px 10px rgb(16 32 28 / 5%);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.search svg { color: var(--muted); flex: none; }
.search input {
    flex: 1; min-width: 0; border: none; background: transparent; color: var(--text);
    font: inherit; padding: 8px 4px; outline: none;
}
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search .button { flex: none; }
.result-count { color: var(--muted); margin: -12px 0 24px; font-size: 0.95rem; }
.result-count a { margin-left: 12px; font-weight: 700; }
