/* =========================================================================
   wybbapp.com の見た目。アプリ(frontend/src/index.css)と同じ黒ベースの配色。
   色はここのカスタムプロパティ経由にし、個別のルールに16進数を直書きしない。
   ========================================================================= */

:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #141416;
  --surface-2: #1f1f22;
  --border: #2c2c2e;
  --text: #f5f5f7;
  --text-muted: #98989d;
  --accent: #0a84ff;
  --ok: #30d158;
  --warn: #ffd60a;
  --warn-bg: #3a3000;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
img { max-width: 100%; }
.exercise-photo, .scene-photo { margin: 24px 0; }
.exercise-photo img { display: block; width: 100%; height: auto; max-height: 480px; object-fit: contain; background: var(--surface); border-radius: 12px; }
.exercise-photo figcaption, .scene-photo figcaption { margin-top: 8px; overflow-wrap: anywhere; font-size: 0.9rem; }
.group-photo img, .scene-photo img { display: block; width: 100%; height: 180px; object-fit: cover; border-radius: 12px; }
.scene-photo { margin: 40px 0 24px; }
.scene-photo img { height: 220px; }
.crumbs { overflow-wrap: anywhere; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* ---- ヘッダー・フッター ---- */
.site-header { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(12px); z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; letter-spacing: 0.04em; }
.brand img { border-radius: 7px; }
.site-header nav { display: flex; gap: 16px; font-size: 0.9rem; }
.site-header nav a { color: var(--text-muted); white-space: nowrap; }
.site-header nav a:hover { color: var(--text); text-decoration: none; }

main { padding-top: 32px; padding-bottom: 48px; }

.site-footer { border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; padding: 24px 0 40px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 8px; }
.site-footer nav a { color: var(--text-muted); }

/* ---- 共通 ---- */
h1 { font-size: 1.8rem; line-height: 1.3; margin: 0 0 16px; }
h2 { font-size: 1.3rem; margin: 40px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
h3 { font-size: 1.05rem; margin: 24px 0 8px; }
.lead { color: var(--text-muted); font-size: 1.05rem; }
.small, small { font-size: 0.85rem; color: var(--text-muted); }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 6px; }

.button { display: inline-block; background: var(--accent); color: #fff; padding: 10px 20px; border-radius: 10px; font-weight: 600; }
.button:hover { text-decoration: none; opacity: 0.9; }

/* ---- トップページ ---- */
.hero { text-align: center; padding: 32px 0 16px; }
.hero img { border-radius: 20px; }
.hero h1 { font-size: 2.6rem; margin: 16px 0 0; letter-spacing: 0.06em; }
.hero .tagline { color: var(--text-muted); margin: 0 0 20px; letter-spacing: 0.08em; }
.hero .lead { color: var(--text); }
.badge { display: inline-block; border: 1px solid var(--border); border-radius: 999px; padding: 4px 14px; font-size: 0.85rem; color: var(--text-muted); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.feature h3 { margin: 0 0 8px; }
.feature p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.feature h3 span { font-size: 0.72rem; font-weight: 600; color: var(--warn); border: 1px solid currentColor; border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: 2px; }

.plans { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.plans th, .plans td { border-bottom: 1px solid var(--border); padding: 10px 8px; text-align: center; }
.plans th:first-child, .plans td:first-child { text-align: left; }
.plans th { color: var(--text-muted); font-weight: 600; }

/* ---- 種目の解説 ---- */
.crumbs { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.crumbs a { color: var(--text-muted); }
.exercise h1 .en { display: block; font-size: 0.9rem; font-weight: 400; color: var(--text-muted); margin-top: 4px; letter-spacing: 0.04em; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin: 20px 0; }
.facts div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.facts dt { font-size: 0.78rem; color: var(--text-muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }

.exercise ol li { margin-bottom: 10px; }
.note { margin-top: 32px; padding: 12px 16px; background: var(--surface); border-radius: 12px; font-size: 0.85rem; color: var(--text-muted); }

.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.cards li { margin: 0; }
.cards a { display: block; height: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; color: var(--text); }
.cards a:hover { border-color: var(--accent); text-decoration: none; }
.cards span { display: block; font-size: 0.82rem; color: var(--text-muted); }

.related ul { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; }
.cta { margin-top: 40px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.cta p { margin: 0 0 8px; }
.source { font-size: 0.8rem; color: var(--text-muted); }
.video-item { margin: 20px 0 28px; }
.video-player, .video-item iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; overflow: hidden; background: var(--surface); }
.video-player { position: relative; }
.video-player img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-play { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 64px; height: 46px; border-radius: 12px; background: rgba(0, 0, 0, 0.78); color: var(--text); font-size: 24px; line-height: 1; padding-left: 3px; }
.video-item figcaption { margin-top: 8px; overflow-wrap: anywhere; font-size: 0.8rem; color: var(--text-muted); }

/* ---- 規約・ポリシー ---- */
.document-content { overflow-wrap: anywhere; }
.document-content h2 { font-size: 1.1rem; }
.document-content h3 { font-size: 1rem; }
.date { text-align: right; margin-top: 40px; color: var(--text-muted); }
.tokushoho-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.92rem; }
.tokushoho-table th, .tokushoho-table td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.tokushoho-table th { background: var(--surface); width: 30%; font-weight: 600; }

/* 公開前に埋める必要がある箇所。残っていたらビルドが止まる(site/build.mjs)。 */
.todo { background: var(--warn-bg); color: var(--warn); padding: 0 4px; border-radius: 3px; font-weight: 700; }

@media (max-width: 600px) {
  .exercise-photo img { max-height: 360px; }
  .group-photo img { height: 120px; }
  .scene-photo img { height: 160px; }
  h1 { font-size: 1.5rem; }
  .hero h1 { font-size: 2.1rem; }
  .site-header nav { gap: 12px; font-size: 0.82rem; }
  .tokushoho-table, .tokushoho-table tbody, .tokushoho-table tr, .tokushoho-table th, .tokushoho-table td { display: block; width: 100%; }
  .tokushoho-table th { border-bottom: none; }
  .plans { font-size: 0.85rem; }
}
