/* 賭ける旅人 公式サイト (v7.0 で刷新)。全ページ共通。tools/web/build_site.py が骨組みを作る */
:root {
  --bg: #0d1310;
  --bg2: #121b16;
  --surface: rgba(255, 255, 255, 0.045);
  --border: rgba(212, 175, 55, 0.22);
  --text: #ece7da;
  --muted: #a9a593;
  --gold: #d4af37;
  --gold-soft: #e9cf7a;
  --red: #c0392b;
  --link: #e9cf7a;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f1e4;
    --bg2: #efe7d3;
    --surface: rgba(255, 255, 255, 0.7);
    --border: rgba(140, 106, 24, 0.25);
    --text: #1f2a22;
    --muted: #5e6458;
    --gold: #8c6a18;
    --gold-soft: #8c6a18;
    --link: #7a5a10;
    --shadow: 0 14px 30px rgba(60, 45, 10, 0.15);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(212, 175, 55, 0.08), transparent 60%), var(--bg);
  color: var(--text);
  font: 16px/1.75 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Segoe UI", Roboto, sans-serif;
  overflow-wrap: anywhere;
}
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; }

/* ヘッダー */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner, .site-footer .inner, main {
  max-width: 1080px; margin-inline: auto; padding-inline: 20px;
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: 0.02em; }
.brand img { border-radius: 9px; }
.lang {
  font-size: 14px; padding: 6px 14px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--border); color: var(--text);
}
.lang:hover { border-color: var(--gold); color: var(--gold); }
/* 言語のメニュー (73 言語) */
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; font-size: 14px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text); white-space: nowrap;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu[open] summary, .lang-menu summary:hover { border-color: var(--gold); color: var(--gold); }
.lang-list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 20;
  width: min(560px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; padding: 12px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 8px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
}
.lang-list a { padding: 6px 8px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 14px; }
.lang-list a:hover { background: var(--surface); color: var(--gold); }
.about { margin-top: 36px; }
.about h3 { margin: 22px 0 6px; font-size: 18px; color: var(--gold); }
.about h3:first-child { margin-top: 0; }

/* ヒーロー */
.hero {
  position: relative; margin-top: 24px; padding: clamp(28px, 5vw, 56px);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center;
  border-radius: 28px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow);
  background: linear-gradient(90deg, var(--bg) 25%, color-mix(in srgb, var(--bg) 55%, transparent) 60%, transparent), url("hero.webp") right center / cover no-repeat;
}
.hero-text { position: relative; }
.badge {
  display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: #1a1407; background: linear-gradient(135deg, #f1d77f, #c99a2c);
}
.hero h1 { margin: 0; font-size: clamp(36px, 6vw, 60px); line-height: 1.15; letter-spacing: 0.02em; }
.hero h1.logo { line-height: 0; }
.hero h1.logo img { width: min(100%, 440px); height: auto; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45)); }
.tagline { margin: 10px 0 0; font-size: clamp(18px, 2.4vw, 24px); font-weight: 700; color: var(--gold); }
.lead { margin: 14px 0 22px; color: var(--muted); max-width: 34em; }
.meta { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.store { display: flex; flex-wrap: wrap; gap: 12px; }
.store a {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px;
  background: var(--text); color: var(--bg); text-decoration: none; font-weight: 700; font-size: 15px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.store a:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--bg); }
.store svg { width: 22px; height: 22px; flex: none; }
.hero-shots { position: relative; display: flex; justify-content: center; gap: 18px; }
.phone {
  width: min(44%, 240px); border-radius: 26px; border: 3px solid var(--gold);
  box-shadow: var(--shadow); background: #000;
}
.hero-shots .phone:nth-child(2) { transform: translateY(28px); }

/* 段の一覧 */
.stages { margin-top: 56px; }
.stages h2, .card h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 28px); }
.stages > p { margin: 0 0 22px; color: var(--muted); }
.stage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.stage-grid figure {
  margin: 0; position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--border);
  background: var(--bg2); aspect-ratio: 3 / 4;
}
.stage-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.stage-grid figure:hover img { transform: scale(1.05); }
.stage-grid figcaption {
  position: absolute; inset: auto 0 0 0; padding: 26px 12px 10px; font-size: 14px; font-weight: 700; color: #f5f1e6;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}
.stage-grid figcaption span { display: block; font-size: 11px; color: #e9cf7a; letter-spacing: 0.06em; }
.stage-grid .extra { border-color: var(--gold); }

/* カード */
.cards { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.card {
  padding: 24px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
}
.card h2 { font-size: 20px; color: var(--gold); }
.card p, .card li { color: var(--text); }
.card ul { padding-inline-start: 1.2em; margin: 8px 0; }
.contact { margin-top: 18px; margin-bottom: 56px; }
.contact .store { margin-top: 14px; }

/* 法務ページ */
main.doc { max-width: 820px; padding-block: 32px 64px; }
.doc h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.3; margin: 8px 0 10px; }
.doc h2 { font-size: 20px; margin: 36px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); color: var(--gold); }
.doc h3 { font-size: 17px; margin: 24px 0 8px; }
.doc section { margin: 0; }
.doc ul, .doc ol { padding-inline-start: 1.3em; }
.doc .updated { color: var(--muted); font-size: 14px; }
.doc .notice {
  padding: 16px 18px; border-radius: 14px; margin: 18px 0;
  background: color-mix(in srgb, var(--gold) 10%, transparent); border: 1px solid var(--border);
}
.doc .card { margin: 18px 0; }
.label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); }
.contact-email { font-size: 18px; font-weight: 700; margin: 4px 0; }
.data-table-wrap, .doc table { display: block; overflow-x: auto; }
.doc table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 14px; }
.doc th, .doc td { border: 1px solid var(--border); padding: 8px 10px; vertical-align: top; text-align: start; }
.doc th { background: var(--bg2); }
.doc a.back, .doc .back-link { display: inline-block; margin-top: 24px; }

/* フッター */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0 36px; }
.site-footer .inner { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.site-footer small { color: var(--muted); }

/* スマートフォン幅 */
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr; margin-top: 16px; border-radius: 22px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, transparent), var(--bg) 70%), url("hero.webp") center top / cover no-repeat;
  }
  .hero-shots .phone:nth-child(2) { transform: none; }
  .stage-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .store a { flex: 1 1 100%; justify-content: center; }
  .card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
