/* 戦国クイズ 公式サイト — docs/design-tokens-v1.md（案C-K改12）のトークン */
:root {
  color-scheme: light;
  --ink: #1A1A1A; --canvas: #F7EDC4; --paper: #FFF5CC; --hud: #FAF5E8; --white: #FFFFFF;
  --sub: #6B6657; --navy: #051F4A; --sky: #57BAED; --line: #E3DCC7;
  --key-a: #E21B3C; --key-b: #1368CE; --key-c: #D89E00; --key-d: #26890C;
  --red: #E21B3C; --correct-bg: #BFE0FF;
  --radius: 12px; --radius-lg: 16px; --border: 2px; --focus: #FFD84D;
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--canvas); color: var(--ink); font-size: 17px; line-height: 1.8; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }

.skip-link { position: fixed; z-index: 10; top: 12px; left: 12px; padding: 8px 12px; background: var(--ink); color: var(--white); border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

/* ヘッダー */
.site-header { position: relative; z-index: 2; background: var(--hud); border-bottom: 1px solid var(--line); }
.site-header__inner, .section__inner, .site-footer__inner { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 28px; min-height: 68px; padding: 10px 0; }
@media (max-width: 599px) { .site-header__inner { flex-direction: column; align-items: flex-start; } .site-header nav { gap: 6px 16px; } }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--navy); text-decoration: none; white-space: nowrap; }
.wordmark__mark { width: 32px; height: 32px; border-radius: 8px; }
.site-header nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-header nav a, .site-footer nav a { font-size: 14px; font-weight: 700; color: var(--navy); text-decoration: none; }
.site-header nav a:hover, .site-footer nav a:hover { text-decoration: underline; }

/* ヒーロー（城の背景） */
.hero { position: relative; background: var(--sky) url("/assets/images/castle-hero-day.png") right top / cover no-repeat; color: var(--white); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 31, 74, .72) 0%, rgba(5, 31, 74, .35) 55%, rgba(5, 31, 74, 0) 100%); }
.hero__inner { position: relative; width: min(1120px, calc(100% - 40px)); margin-inline: auto; display: grid; grid-template-columns: 1fr; gap: 24px; padding: 56px 0 48px; min-height: 420px; }
.hero__art { display: flex; align-items: flex-end; order: 2; }
.hero__mascot { width: min(260px, 60%); }
.hero__copy { order: 1; display: flex; flex-direction: column; gap: 12px; }
.hero h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1.1; letter-spacing: .02em; text-shadow: 2px 2px 0 var(--navy), 0 0 18px rgba(5, 31, 74, .6); }
.hero__lead { font-size: clamp(22px, 3.2vw, 30px); font-weight: 700; line-height: 1.4; text-shadow: 1px 1px 0 var(--navy), 0 0 12px rgba(5, 31, 74, .6); }
.hero__count strong { font-size: 1.6em; letter-spacing: .02em; }
.hero__note { font-size: 14px; font-weight: 700; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
@media (min-width: 760px) {
  .hero__inner { grid-template-columns: 1.2fr 1fr; align-items: end; min-height: 520px; }
  .hero__art { order: 2; justify-content: center; }
  .hero__copy { order: 1; padding-bottom: 24px; }
}

.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--sub); }
.eyebrow--red { color: var(--red); }
.eyebrow--light { color: rgba(255, 255, 255, .9); }
.small-note { font-size: 14px; color: var(--sub); }

/* ボタン（押せるものは枠線） */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 22px; border-radius: var(--radius-lg); border: var(--border) solid var(--ink); font-size: 17px; font-weight: 700; text-decoration: none; }
.btn--primary { background: var(--navy); color: var(--white); }
.btn--outline { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn:hover { filter: brightness(1.05); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: 4px; }
.text-link--light { color: var(--white); }

/* 旧クラス名の互換（協力者・コールバック・問題フォールバックで使用） */
.pixel-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 22px; border-radius: var(--radius-lg); border: var(--border) solid var(--ink); font-size: 17px; font-weight: 700; text-decoration: none; background: var(--white); color: var(--navy); }
.pixel-button--red, .pixel-button--dark { background: var(--navy); color: var(--white); }
.section--sky { background: var(--correct-bg); }

/* セクション */
.section { padding: 64px 0; }
.section--paper { background: var(--canvas); }
.section--white { background: var(--white); }
.section--navy { background: var(--navy); color: var(--white); }
.section-heading { max-width: 640px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; }
.section h2 { font-size: clamp(26px, 4vw, 36px); line-height: 1.35; color: var(--navy); }
.section--navy h2 { color: var(--white); }

.feature-list { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 760px) { .feature-list { grid-template-columns: 1fr 1fr; } }
.feature-item { display: flex; gap: 16px; padding: 20px; background: var(--white); border-radius: var(--radius); }
.feature-item h3 { font-size: 18px; color: var(--navy); margin-bottom: 6px; }
.feature-item p { font-size: 15px; line-height: 1.7; }
.feature-item__key { width: 40px; height: 40px; border-radius: 8px; flex: none; display: grid; place-items: center; }
.feature-item__key svg { width: 18px; height: 18px; fill: var(--white); }
.feature-item__key--a { background: var(--key-a); }
.feature-item__key--b { background: var(--key-b); }
.feature-item__key--c { background: var(--key-c); }
.feature-item__key--d { background: var(--key-d); }

.preview-layout { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
@media (min-width: 900px) { .preview-layout { grid-template-columns: 1fr 1.1fr; } }
.preview-copy { display: flex; flex-direction: column; gap: 14px; }
.app-screens { display: flex; gap: 20px; justify-content: center; align-items: flex-start; }
.app-screen { margin: 0; width: min(240px, 45%); }
.app-screen img { border-radius: 24px; border: 6px solid var(--ink); box-shadow: 0 12px 30px rgba(26, 26, 26, .18); }
.app-screen figcaption { margin-top: 8px; font-size: 13px; text-align: center; color: var(--sub); }

.connection-layout { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) { .connection-layout { grid-template-columns: 1fr 1fr; gap: 48px; } }
.connection-copy { display: flex; flex-direction: column; gap: 12px; }

.release-layout { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
@media (min-width: 760px) { .release-layout { grid-template-columns: 1fr 1fr; } }
.release-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

/* プライバシーなど本文ページ */
.privacy-main { min-height: 60vh; }
.privacy-content { max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.privacy-content h1 { font-size: clamp(28px, 4vw, 36px); color: var(--navy); }
.privacy-content h2 { font-size: 20px; margin-top: 12px; }
.privacy-content ul { padding-left: 1.2em; }

/* フッター */
.site-footer { background: var(--hud); border-top: 1px solid var(--line); padding: 36px 0; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.footer-brand { font-weight: 700; color: var(--navy); }
.footer-provider { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); }
.footer-logo { height: 28px; width: auto; }
.footer-copy { width: 100%; font-size: 12px; color: var(--sub); }
