/* ExamAI 共通スタイル（トークン・ヘッダー・フッター・ボタン）
   アプリの AppColors / AppText に合わせたダークベース＋電光ブルー */
:root {
  --bg: #07090D;
  --surface: #0E1117;
  --surface2: #151A22;
  --surface3: #1C222C;
  --line: #222935;
  --line-strong: #2F3745;
  --text: #F3F5F9;
  --text-sec: #9AA3B2;
  --text-ter: #5E6878;
  --accent: #4F8CFF;
  --accent-bright: #8AB2FF;
  --cyan: #22D3EE;
  --success: #34D399;
  --error: #F87171;
  --gold: #FBBF24;
  --streak: #FB923C;
  --rose: #FB7185;
  --grad: linear-gradient(135deg, var(--accent), var(--cyan));
  --sans: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.25, 1, 0.5, 1); /* easeOutQuart（アプリの Motion.curve） */
  --radius: 14px;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

img, svg { display: block; max-width: 100%; }
::selection { background: rgba(79, 140, 255, 0.35); }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}
.skip-link:focus { top: 12px; }

.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ─── ヘッダー ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 13, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background-color 0.3s;
}
.site-header.is-scrolled,
.site-header.is-solid { border-bottom-color: var(--line); background: rgba(7, 9, 13, 0.86); }
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
  flex: none;
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--line), 0 4px 16px rgba(79, 140, 255, 0.25);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-size: 13px;
}
.site-nav a {
  color: var(--text-sec);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.header-cta { flex: none; }

@media (max-width: 860px) {
  .site-nav .nav-sub { display: none; }
}
@media (max-width: 520px) {
  .header-inner { gap: 10px; }
  .site-nav { gap: 12px; font-size: 12px; }
  .has-cta .site-nav { display: none; }
  .has-cta .header-cta { margin-left: auto; }
}

/* ─── ボタン ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s, border-color 0.2s;
}
.btn-small { min-height: 36px; padding: 0 14px; border-radius: 10px; font-size: 12.5px; gap: 7px; }
.btn-ghost { color: var(--text); background: var(--surface); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); }

/* App Store ボタン（URL未設定の間は「近日公開」表示） */
.store-btn {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 30px -8px rgba(79, 140, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.store-btn svg { width: 20px; height: 20px; flex: none; }
.store-btn .store-lines { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.store-btn .store-sub { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.12em; opacity: 0.85; }
a.store-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(79, 140, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.store-btn.is-soon { cursor: default; }
.btn-small.store-btn { box-shadow: 0 6px 18px -8px rgba(79, 140, 255, 0.7); }
.btn-small.store-btn svg { width: 15px; height: 15px; }

/* ─── フッター ─── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 44px;
  font-size: 13px;
  color: var(--text-ter);
  background: linear-gradient(180deg, rgba(14, 17, 23, 0.6), transparent 60%);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px 32px;
  align-items: start;
}
.footer-brand p { margin: 10px 0 0; color: var(--text-sec); font-size: 13px; line-height: 1.7; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.site-footer nav a { color: var(--text-sec); text-decoration: none; }
.site-footer nav a:hover { color: var(--text); }
.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.copyright { font-family: var(--mono); letter-spacing: 0.12em; font-size: 11px; }
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* フッター下段のリンク（運営者・お問い合わせ） */
.site-footer .footer-bottom a { color: var(--text-sec); }
.site-footer .footer-bottom a:hover { color: var(--text); }
.site-footer .sep { margin: 0 8px; color: var(--line-strong); }
@media (max-width: 640px) {
  .site-footer .sep { display: none; }
  .site-footer .contact { display: block; }
}
