/* 共通 CSS（Layout・ヘッダー・フッター・表のページ）。持ち主: S1
   スマホ優先。原本（screenshots/published/{pc,sp}/）に近い素直な見た目。色・字体の最終決定は後工程 */

:root {
  --c-brand: #7a0000;      /* ヘッダー */
  --c-accent: #c0001a;     /* 主ボタン */
  --c-accent-dark: #9a0015;
  --c-text: #1a1a1a;
  --c-muted: #5c5c5c;
  --c-line: #e3e3e3;
  --c-tint: #eef7f8;       /* 原本の薄い水色の帯 */
  --c-bg: #fff;
  --c-success: #1e7a3c;
  --c-warning: #8a5a00;
  --c-error: #b00020;
  --radius: 14px;
  --radius-pill: 999px;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
  --container: 1080px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans", "Segoe UI", Meiryo, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-bg);
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 0.6em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  background: #fff; color: var(--c-text); padding: 8px 12px; border-radius: 6px;
}
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--c-muted); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 22px; border-radius: var(--radius-pill);
  border: 1px solid transparent; font-size: 15px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background-color 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--c-accent); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--c-accent-dark); }
.btn--outline { background: #fff; color: var(--c-text); border-color: #d4d4d4; box-shadow: var(--shadow); }
.btn--outline:hover { background: #f6f6f6; }
.btn--light { background: #fff; color: var(--c-brand); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.btn--sm { min-height: 36px; padding: 4px 14px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 20px 0; }

/* ---------- ヘッダー ---------- */
.site-header { background: var(--c-brand); color: #fff; position: sticky; top: 0; z-index: 50; }
.site-header__inner {
  max-width: 1200px; margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 64px;
}
.site-header__logo img { width: 48px; height: 48px; background: #fff; border-radius: 6px; padding: 2px; }
/* 旗は 24px、押せる範囲は 44px 角（VN のスマホ利用者が最初に押す。WCAG 2.5.5 の 44px）。375px 幅でも 1 行に収まる:
   余白 32 + ロゴ 48 + 隙間 12×2 + 旗 44×3 + メニュー 44 = 280px */
.lang-switcher { display: flex; gap: 0; align-items: center; flex-shrink: 0; }
.lang-switcher__item {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: 50%; -webkit-tap-highlight-color: transparent;
}
.lang-switcher__item img {
  display: block; width: 24px; height: 24px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px transparent; transition: box-shadow 0.15s;
}
.lang-switcher__item:hover img { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5); }
.lang-switcher__item.is-current img { box-shadow: 0 0 0 2px #fff; }
.site-header__menu-btn {
  margin-left: auto; width: 44px; height: 44px; background: transparent; border: 0; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.site-header__menu-icon, .site-header__menu-icon::before, .site-header__menu-icon::after {
  display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; position: relative; content: "";
}
.site-header__menu-icon::before { position: absolute; top: -7px; }
.site-header__menu-icon::after { position: absolute; top: 7px; }
.site-nav { display: none; width: 100%; padding: 8px 0 12px; }
.site-nav.is-open { display: block; }
.site-nav__links { list-style: none; display: flex; flex-direction: column; }
.site-nav__links a { display: block; padding: 10px 4px; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.site-nav__links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.site-nav__auth { display: flex; gap: 10px; margin-top: 12px; }

@media (min-width: 992px) {
  .site-header__inner { flex-wrap: nowrap; padding: 10px 24px; }
  .site-header__logo img { width: 56px; height: 56px; }
  .site-header__menu-btn { display: none; }
  .site-nav { display: flex; align-items: center; gap: 20px; width: auto; margin-left: auto; padding: 0; }
  .site-nav__links { flex-direction: row; gap: 18px; }
  .site-nav__links a { padding: 6px 0; border: 0; font-size: 15px; }
  .site-nav__auth { margin-top: 0; }
}

/* ---------- 共通の節 ---------- */
.site-main { min-height: 50vh; }
.section { padding: 40px 0; }
.section--tint { background: var(--c-tint); }
.section__title { text-align: center; font-size: clamp(22px, 5.5vw, 34px); font-weight: 800; }
.section__title--page { margin-bottom: 0.4em; }
.section__subtitle { text-align: center; font-size: 20px; margin-top: 32px; }
.section__lead { text-align: center; color: #333; white-space: pre-line; max-width: 640px; margin: 0 auto 24px; }
.notice {
  text-align: center; background: #fafafa; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 16px; margin: 24px auto; max-width: 640px;
}

/* ---------- ホーム ---------- */
.hero { padding: 32px 0 40px; text-align: center; }
.hero__title { font-size: clamp(24px, 6.4vw, 40px); font-weight: 800; white-space: pre-line; }
.hero__lead { white-space: pre-line; color: #333; }
.hero__img { width: 100%; max-width: 680px; margin: 8px auto 0; border-radius: 24px; aspect-ratio: 3 / 2; object-fit: cover; }

.sample-block { max-width: 720px; margin: 0 auto 24px; }
.scene-grid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; max-width: 760px; margin: 0 auto; }
.scene { text-align: center; }
.scene__title { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.scene img { border-radius: 10px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.scene__tag { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: var(--radius-pill); }
.scene__tag--business { background: #e8eefc; color: #1d3f8f; }
.scene__tag--casual { background: #fde9df; color: #8f3b12; }

.pack-img { width: 100%; max-width: 680px; margin: 0 auto 16px; border-radius: 20px; }
.author-grid { display: grid; gap: 16px; max-width: 900px; margin: 0 auto; }
.author { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px; }
.author__name { font-size: 17px; }
.author p { margin: 0; color: #333; font-size: 15px; }
.cta { text-align: center; }

@media (min-width: 768px) {
  .section { padding: 64px 0; }
  .scene-grid { gap: 24px; }
  .scene__title { font-size: 18px; }
  .author-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 課のカード ---------- */
.lesson-grid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; max-width: 900px; margin: 0 auto; }
.lesson-card { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit; text-align: center; }
.lesson-card__title { font-size: clamp(18px, 4.6vw, 28px); font-weight: 800; margin-bottom: 6px; }
.lesson-card__media { position: relative; display: block; width: 100%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.lesson-card__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.2s; }
a.lesson-card:hover .lesson-card__img { transform: scale(1.03); }
.lesson-card--coming_soon .lesson-card__img { filter: grayscale(0.85) brightness(0.9); opacity: 0.75; }
.lesson-card--coming_soon { cursor: default; }
.lesson-card__badge {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.72); color: #222; font-weight: 800; font-size: clamp(14px, 3.6vw, 22px); padding: 4px 0;
}
.lesson-card--locked .lesson-card__img { filter: grayscale(0.5); }
.lesson-card__lock { position: absolute; right: 8px; top: 8px; font-size: 20px; }
.lesson-card__meta { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 8px; font-size: 13px; }
.lesson-card__tag { padding: 2px 10px; border-radius: var(--radius-pill); background: #eee; font-weight: 700; }
.lesson-card__tag--owned { background: #e3f4e8; color: var(--c-success); }
.lesson-card__days { color: var(--c-muted); }
@media (min-width: 768px) {
  .lesson-grid--all { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
  .lesson-grid:not(.lesson-grid--all) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 課ページ ---------- */
.lesson { text-align: center; }
.lesson-head__title { font-size: clamp(28px, 7vw, 44px); font-weight: 800; }
.lesson-head__intro { white-space: pre-line; }
.lesson__badge { display: inline-block; background: #444; color: #fff; font-weight: 700; padding: 4px 14px; border-radius: var(--radius-pill); }
.lesson-structure { max-width: 560px; margin: 0 auto 28px; }
.lesson-structure__title { font-size: 18px; }
.lesson-structure__list { list-style: none; }
.lesson-structure__list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 4px; border-bottom: 1px dashed var(--c-line); text-align: left; }
.lesson-structure__time { color: var(--c-muted); white-space: nowrap; }
.lesson-structure__total { font-weight: 700; margin-top: 10px; }
.lesson-media { display: grid; gap: 24px; max-width: 900px; margin: 0 auto 32px; align-items: start; }
.lesson-media--single { max-width: 480px; }
.lesson-media__thumb { width: 100%; border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; }
.lesson-media__thumb.is-muted { filter: grayscale(0.85); opacity: 0.75; }
.lesson-media__label { font-size: 16px; margin-bottom: 8px; }
.lesson-buy { margin-top: 16px; }
@media (min-width: 768px) {
  .lesson-media { grid-template-columns: 1fr 1fr; gap: 40px; }
  .lesson-media--single { grid-template-columns: 1fr; }
}

.lesson-tabs { max-width: 900px; margin: 0 auto 32px; text-align: left; display: grid; gap: 16px; }
.lesson-tabs__list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.lesson-tabs__button {
  flex: 0 0 auto; min-height: 40px; padding: 6px 16px; border: 2px solid #111; background: #fff; color: #111;
  border-radius: 4px; cursor: pointer; font-size: 15px;
}
.lesson-tabs__button[aria-selected="true"] { background: #ff6a00; color: #111; border-color: #111; }
.lesson-tabs__panel { border: 2px solid #ccc; background: #f6f6f6; border-radius: 4px; padding: 16px 18px; }
.lesson-tabs__heading { text-align: center; font-size: 18px; }
.lesson-tabs__body { white-space: pre-line; margin: 0; }
@media (min-width: 768px) {
  .lesson-tabs { grid-template-columns: 200px 1fr; gap: 40px; align-items: start; }
  .lesson-tabs__list { flex-direction: column; overflow: visible; }
  .lesson-tabs__button { width: 100%; }
}

.lesson-trust { max-width: 640px; margin: 0 auto; font-size: 14px; color: var(--c-muted); }
.lesson-trust__pay { display: flex; align-items: center; justify-content: center; gap: 8px; }
.lesson-trust__pay img { width: 64px; }

/* ---------- 長文ページ（content/） ---------- */
.prose { max-width: 820px; }
.prose h1 { text-align: center; font-size: clamp(24px, 6vw, 36px); font-weight: 800; margin-bottom: 1em; }
.prose h2 { font-size: 20px; margin-top: 1.6em; }
.prose h3 { font-size: 17px; margin: 1.4em 0 0.4em; }
/* FAQ・規約などは原本の項目見出しが h3 だった。h1 の直下を h2 にしたので、見た目は元の h3 のまま（About だけは原本に h2 がある） */
.prose:not(.prose--about-us) h2 { font-size: 17px; margin: 1.4em 0 0.4em; }
.prose p { margin: 0 0 1em; }
.prose section, .prose div { margin: 0; }
.prose a { color: var(--c-accent); }
.prose--faq h2, .prose--faq h3 { background: var(--c-tint); padding: 8px 12px; border-radius: 8px; }
.prose--management-company-overview h2, .prose--management-company-overview h3,
.prose--act-on-specified-commercial-transactions h2, .prose--act-on-specified-commercial-transactions h3 { border-left: 4px solid var(--c-brand); padding-left: 10px; }

/* ---------- 404 ---------- */
.not-found__inner { text-align: center; max-width: 520px; }
.not-found__inner img { margin: 0 auto 16px; }

/* ---------- Alert（views/alert.tsx） ---------- */
.alert { border-radius: 10px; padding: 12px 14px; margin: 12px 0; border: 1px solid; font-size: 15px; text-align: left; }
.alert[hidden] { display: none; }
.alert--info { background: #eef4ff; border-color: #c7d7fb; color: #1d3f8f; }
.alert--success { background: #e9f6ee; border-color: #bfe3cb; color: var(--c-success); }
.alert--warning { background: #fff6e0; border-color: #f1d79a; color: var(--c-warning); }
.alert--error { background: #fdecee; border-color: #f5c2c9; color: var(--c-error); }

/* ---------- フッター ---------- */
.site-footer { border-top: 1px solid var(--c-line); margin-top: 24px; padding: 32px 0 40px; font-size: 13px; }
.site-footer__inner { max-width: 1000px; margin: 0 auto; padding: 0 16px; }
.site-footer__cols { display: grid; gap: 24px; text-align: center; }
.site-footer__heading { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.site-footer__col ul { list-style: none; display: grid; gap: 4px; }
.site-footer__col a { display: inline-block; padding: 6px 4px; text-decoration: none; }
.site-footer__col a:hover { text-decoration: underline; }
.site-footer__brand { display: flex; flex-direction: column; align-items: center; gap: 16px; margin: 32px 0 20px; }
.site-footer__logo img { width: 72px; height: 72px; }
.site-footer__payments { display: flex; align-items: center; gap: 8px; }
.site-footer__payments img { width: auto; height: 52px; }
.site-footer__bottom { border-top: 1px solid var(--c-line); padding-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.site-footer__sns { list-style: none; display: flex; gap: 12px; }
.site-footer__credit { text-align: center; margin: 0; color: #333; }
@media (min-width: 768px) {
  .site-footer__cols { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .site-footer__brand { flex-direction: row; justify-content: space-between; }
  .site-footer__bottom { flex-direction: row; justify-content: space-between; }
  .site-footer__credit { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
