:root {
  --bg: #f4f0e8;
  --paper: #fffdf8;
  --ink: #1b1a17;
  --muted: #6b665c;
  --line: #e2dccf;
  --accent: #e8590c;
  --accent-ink: #fff;
  --accent-soft: #fde8d9;
  --asphalt: #2a2925;
  --lane: #f5c518;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --paper: #1d1c1a;
    --ink: #efeae0;
    --muted: #a39d91;
    --line: #34312c;
    --accent: #ff7a2e;
    --accent-ink: #1b1a17;
    --accent-soft: #3a2416;
    --asphalt: #2c2a26;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-weight: 500;
  line-height: 1.7;
}
a { color: inherit; }
button { font: inherit; color: inherit; }

.screen { max-width: 520px; margin: 0 auto; padding: 32px 16px 40px; }

/* ================= 1. スタート ================= */
.screen-start {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 24px; padding-bottom: 24px;
}
.title { text-align: center; margin-bottom: 28px; }
.title h1 { margin: 0; font-weight: 900; font-size: clamp(52px, 17vw, 84px); line-height: 1.05; letter-spacing: .06em; }
.subtitle { margin: 10px 0 0; font-weight: 900; font-size: clamp(17px, 5vw, 21px); color: var(--accent); }

.card-q {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 20px; box-shadow: 0 12px 32px rgba(0,0,0,.08);
}
.mode { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.mode-btn { border: 0; background: transparent; border-radius: 999px; padding: 9px 4px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; }
.mode-btn.is-on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }

.label { display: block; font-weight: 700; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.account { margin-bottom: 16px; }
.nick-row { display: flex; gap: 8px; }
.nick-row input {
  flex: 1; min-width: 0; font: 700 17px "Zen Kaku Gothic New", sans-serif; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none;
}
.nick-row input:focus { border-color: var(--accent); }
.icon-btn { flex: none; width: 46px; border: 1.5px solid var(--line); background: var(--paper); border-radius: 10px; font-size: 20px; cursor: pointer; }
.hint { font-size: 11px; color: var(--muted); margin: 6px 0 0; }

.age-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.age-row input {
  width: 100%; font: 700 44px Oswald, sans-serif; color: var(--ink);
  background: transparent; border: 0; border-bottom: 2px solid var(--line); padding: 0 2px; outline: none;
}
.age-row input:focus { border-color: var(--accent); }
.age-row span { font-weight: 700; color: var(--muted); }


.btn-go {
  display: block; width: 100%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  font: 900 18px "Zen Kaku Gothic New", sans-serif; padding: 16px; border-radius: 999px;
  box-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 60%, #000);
  transition: transform .08s, box-shadow .08s;
}
.btn-go:active { transform: translateY(4px); box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.foot-tiny { text-align: center; font-size: 11px; color: var(--muted); margin: 14px 0 0; }

/* ---- ウィザード ---- */
.title { transition: margin .2s; }
.title.is-small { margin-bottom: 14px; }
.screen-start.is-wiz { justify-content: flex-start; padding-top: 28px; }
.title.is-small h1 { font-size: 30px; }
.title.is-small .subtitle { font-size: 13px; margin-top: 4px; }
.wiz-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wiz-back { background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; padding: 6px 0; }
.dots { display: flex; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--accent); }
.q-title { margin: 0; font-size: 20px; font-weight: 900; line-height: 1.45; }
.q-emoji { margin-right: 6px; }
.q-sub { margin: 6px 0 16px; font-size: 13px; color: var(--muted); min-height: 1.7em; }
.choices { display: grid; gap: 10px; margin-bottom: 16px; }
.choice {
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: 15px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper);
  font-weight: 700; font-size: 16px;
}
.choice:hover { border-color: var(--muted); }
.choice.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.choice.is-on::after { content: "✓"; float: right; }
.matrix { width: 100%; border-collapse: collapse; margin: 4px 0 18px; table-layout: fixed; }
.matrix th, .matrix td { padding: 0; text-align: center; }
.matrix thead th { font-size: 11px; font-weight: 700; color: var(--muted); padding-bottom: 6px; line-height: 1.3; }
.matrix thead th:first-child { width: 30%; }
.matrix tbody tr { border-top: 1px solid var(--line); }
.matrix tbody th { text-align: left; padding: 10px 4px 10px 0; }
.m-season { display: block; font-weight: 900; font-size: 16px; line-height: 1.3; }
.m-wx { display: block; font-size: 10px; color: var(--muted); font-weight: 500; }
.mcell {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--line); background: var(--paper); position: relative;
}
.mcell:hover { border-color: var(--muted); }
.mcell.is-on { border-color: var(--accent); background: var(--accent); }
.mcell.is-on::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent-ink); font-weight: 900; font-size: 16px; }
.mcell:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.select {
  width: 100%; font: 700 17px "Zen Kaku Gothic New", sans-serif; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 18px;
}
.btn-geo {
  display: block; width: 100%; cursor: pointer; padding: 12px; border-radius: 12px;
  border: 1.5px dashed var(--accent); background: transparent; color: var(--accent); font-weight: 900; font-size: 15px;
}
.geo-msg { font-size: 12px; color: var(--muted); margin: 6px 0 12px; min-height: 1.2em; }
.age-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.age-pair .age-row input { font-size: 38px; min-width: 0; }
.age-pair .age-row span { white-space: nowrap; font-size: 13px; }
.area-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.area-btn {
  padding: 14px 4px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper);
  font-weight: 900; font-size: 15px; cursor: pointer;
}
.area-btn:hover { border-color: var(--muted); }
.area-btn.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.region-detail { border-top: 1px dashed var(--line); padding-top: 10px; }
.region-detail summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); padding: 4px 0 8px; }
.region-detail[open] summary { margin-bottom: 8px; }
.btn-go:disabled { background: var(--line); color: var(--muted); box-shadow: none; cursor: default; }

/* ================= 演出 ================= */
.reveal { text-align: center; padding: 24px 0 8px; }
.reveal-pre { margin: 0 0 18px; font-weight: 900; font-size: 18px; }
.road {
  position: relative; height: 44px; margin: 0 auto 18px; max-width: 420px;
  background: var(--asphalt); border-radius: 8px; overflow: hidden;
}
.road-line {
  position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px;
  background: repeating-linear-gradient(90deg, var(--lane) 0 22px, transparent 22px 40px);
  background-size: 40px 4px;
  animation: lane .5s linear infinite;
}
.road-line.fast { animation-duration: .25s; }
@keyframes lane { to { background-position: -40px 0; } }
.bike {
  --p: 0;
  position: absolute; top: 50%; font-size: 30px; line-height: 1;
  left: calc(var(--p) * (100% - 40px)); transform: translateY(-55%) scaleX(-1);
}
.reveal-num { margin: 0; display: flex; justify-content: center; align-items: baseline; gap: 6px; flex-wrap: wrap; line-height: 1; }
.reveal-num .num { font: 700 clamp(60px, 20vw, 120px) Oswald, sans-serif; color: var(--accent); display: inline-block; }
.reveal-num .num.is-text { font: 900 clamp(40px, 12vw, 60px) "Zen Kaku Gothic New", sans-serif; }
.reveal-num .approx, .reveal-num .suffix { font-weight: 900; font-size: clamp(15px, 4.6vw, 22px); }
.reveal-num { gap: 4px; }
.num.pop { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.18); text-shadow: 0 0 24px color-mix(in srgb, var(--accent) 60%, transparent); }
  100% { transform: scale(1); }
}
.reveal-sub { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.reveal-diff { margin: 14px 0 0; font-size: 16px; font-weight: 700; opacity: 0; transform: translateY(8px); transition: .4s; }
.reveal-diff.in { opacity: 1; transform: none; }
.reveal-diff b { color: var(--accent); font: 700 26px Oswald, sans-serif; }
.reveal-diff small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 4px; }

.after { animation: fadein .5s ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ================= ボタン類 ================= */
.btn-plus, .btn-again {
  display: block; width: 100%; margin: 20px 0 8px; cursor: pointer;
  background: var(--ink); color: var(--paper); border: 0; border-radius: 999px;
  font: 900 18px "Zen Kaku Gothic New", sans-serif; padding: 16px;
  animation: nudge 1.6s ease-in-out .6s infinite;
}
.btn-again { background: transparent; color: var(--ink); border: 2px solid var(--ink); font-size: 16px; padding: 12px; animation: none; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }

.btn-shop {
  display: block; text-align: center; text-decoration: none; margin: 20px 0;
  background: var(--accent); color: var(--accent-ink); border-radius: var(--radius);
  font-weight: 900; font-size: 18px; padding: 16px; line-height: 1.5;
}
.btn-shop small { font-weight: 700; font-size: 13px; opacity: .9; }
.btn-back { display: block; margin: 24px auto 0; background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 13px; cursor: pointer; }

/* ---- シェア ---- */
.share-block { margin: 22px 0; }
.share-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sns {
  display: block; text-align: center; text-decoration: none; cursor: pointer;
  padding: 10px 4px; border-radius: 10px; font-weight: 700; font-size: 13px;
  border: 0; color: #fff;
}
.sns-x { background: #000; }
.sns-line { background: #06c755; }
.sns-facebook { background: #1877f2; }
.sns-threads { background: #333; }
.sns-bluesky { background: #1185fe; }
.sns-img { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }

/* ---- アプリ送客 ---- */
.app-cta {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px;
  text-decoration: none; margin: 20px 0; padding: 16px 18px; border-radius: var(--radius);
  background: #111; color: #fff; border: 2px solid var(--lane); cursor: pointer;
}
.app-name { font-weight: 900; font-size: 19px; font-style: italic; letter-spacing: .02em; }
.app-name::before { content: "⚡"; margin-right: 4px; font-style: normal; }
.app-tag { grid-column: 1; font-size: 12px; opacity: .8; }
.app-go { grid-column: 2; grid-row: 1 / span 2; font-weight: 900; font-size: 14px; color: var(--lane); }
.app-cta[aria-disabled=true] { cursor: default; }
.app-cta[aria-disabled=true] .app-go { color: #999; }

/* ================= 広告 ================= */
.ads { margin: 24px 0; }
.ad-group { margin-bottom: 20px; }
.ad-head { display: flex; align-items: center; gap: 8px; }
.ad-head h2, .ad-head h3 { margin: 0; font-size: 17px; font-weight: 900; }
.ad-lead { margin: 2px 0 10px; font-size: 13px; color: var(--muted); }
.ad-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ads-big .ad-grid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 480px) { .ads-big .ad-grid, .shop-shelf .ad-grid { grid-template-columns: repeat(3, 1fr); } }
.ad-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px;
}
a.ad-card:active { transform: scale(.98); }
.ad-thumb {
  display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 8px; margin-bottom: 8px;
  background: var(--bg); overflow: hidden;
}
.ad-thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb-icon { font-size: 32px; }
.ad-name { font-weight: 700; font-size: 13px; line-height: 1.4; }
.ad-note { font-size: 11px; color: var(--muted); }
.ad-foot { margin-top: auto; padding-top: 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.ad-go { font-size: 12px; font-weight: 900; color: var(--accent); }
.ad-wait { font-size: 11px; color: var(--muted); }
.ad-price { font-size: 11px; color: var(--muted); }
.ad-card { position: relative; }
.ad-reason {
  align-self: flex-start; margin: -2px 0 6px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 10.5px; font-weight: 900; line-height: 1.5;
}
.ad-why { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.ad-picks { background: var(--paper); border: 2px solid var(--accent); border-radius: var(--radius); padding: 14px 12px 12px; }
.ad-picks .ad-card { background: var(--bg); }
.ad-disclose { font-size: 11px; color: var(--muted); margin: 4px 0 0; }
.pr {
  display: inline-block; font: 700 10px Oswald, sans-serif; letter-spacing: .08em;
  border: 1px solid var(--muted); color: var(--muted); border-radius: 4px;
  padding: 0 5px; margin-right: 4px; line-height: 1.6;
}

/* ================= shop.html ================= */
.shop-hero { text-align: center; padding: 8px 0 12px; }
.shop-hero .back { display: inline-block; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.shop-hero h1 { margin: 0; font-size: clamp(24px, 7vw, 32px); font-weight: 900; line-height: 1.35; }
.shop-hero p { margin: 10px 0 0; font-size: 14px; }
.shop-nav { display: flex; gap: 8px; overflow-x: auto; margin: 18px -16px; padding: 0 16px 4px; }
.shop-nav a {
  flex: none; text-decoration: none; font-size: 13px; font-weight: 700;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; background: var(--paper);
}
.shop-shelf { margin: 28px 0; scroll-margin-top: 12px; }
.shop-shelf .ad-head h2 { font-size: 20px; }
.criteria { font-size: 12px; color: var(--muted); margin: 0 0 12px; padding-left: 10px; border-left: 3px solid var(--accent-soft); }

.sets { display: grid; gap: 14px; margin-top: 12px; }
.set { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.set.recommended { border: 2px solid var(--accent); }
.set .rank { float: left; font-weight: 900; font-size: 32px; line-height: 1; color: var(--accent); margin: 0 14px 0 0; }
.set .badge {
  position: absolute; top: -11px; right: 16px; background: var(--accent); color: var(--accent-ink);
  font-size: 12px; font-weight: 900; padding: 2px 10px; border-radius: 999px;
}
.set h3 { margin: 0; font-size: 16px; font-weight: 900; }
.set p { margin: 2px 0 10px; font-size: 13px; color: var(--muted); }
.set ul { clear: both; margin: 0 0 14px; padding-left: 1.2em; font-size: 14px; }
.btn-cart {
  display: block; text-align: center; text-decoration: none; padding: 12px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 900; font-size: 15px;
}
.btn-cart.is-off { background: var(--line); color: var(--muted); }
.set li a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.set-hint { margin: 0 !important; font-size: 12px !important; text-align: center; }

/* ================= 文書ページ（プライバシーポリシー） ================= */
.doc .back { display: inline-block; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.doc h1 { font-size: 26px; font-weight: 900; margin: 0; }
.doc-date { font-size: 12px; color: var(--muted); margin: 4px 0 20px; }
.doc h2 { font-size: 17px; font-weight: 900; margin: 28px 0 8px; padding-left: 10px; border-left: 4px solid var(--accent); }
.doc p, .doc li { font-size: 14px; }
.doc ul { padding-left: 1.2em; }
.doc a { color: var(--accent); }
.doc-table-wrap { overflow-x: auto; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 440px; }
.doc-table th, .doc-table td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.doc-table th { background: var(--paper); font-weight: 700; }
.shop-note { font-size: 12px; color: var(--muted); }

/* ================= 内訳 ================= */
.breakdown { margin: 24px 0; }
.bd-title { font-size: 17px; font-weight: 900; margin: 0 0 10px; }
.bd-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.bd-card h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 700; }
.bar-row { display: grid; grid-template-columns: 4.2em 1fr 4.6em; align-items: center; gap: 8px; margin: 6px 0; font-size: 14px; }
.bar-label { font-weight: 700; white-space: nowrap; }
.bar { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transform-origin: left; animation: grow .8s ease-out; }
@keyframes grow { from { transform: scaleX(0); } }
.bar-v { text-align: right; font: 700 15px Oswald, sans-serif; }
.bd-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.bd-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.bd-split > div { display: flex; flex-direction: column; }
.bd-k { font-size: 12px; color: var(--muted); font-weight: 700; }
.bd-v { font: 700 22px Oswald, sans-serif; }
.bd-lost { grid-column: 1 / -1; border-top: 1px dashed var(--line); padding-top: 8px; }
.bd-lost .bd-v { color: #4a90d9; }
.bd-best { display: flex; gap: 14px; align-items: center; border: 2px solid var(--accent); }
.bd-best > div { display: flex; flex-direction: column; }
.bd-best-emoji { font-size: 40px; line-height: 1; }
.bd-best-name { font-size: 22px; font-weight: 900; color: var(--accent); line-height: 1.3; }
.bd-best .bd-note { margin-top: 2px; }
.bar-row.is-best .bar-label::after { content: "BEST"; font: 700 9px Oswald, sans-serif; color: var(--accent); margin-left: 4px; vertical-align: 2px; }
.bar-row { grid-template-columns: 5.4em 1fr 4.6em; }
.bd-big { margin: 0; font: 700 40px Oswald, sans-serif; line-height: 1.1; }
.bd-big span { font: 900 16px "Zen Kaku Gothic New", sans-serif; margin: 0 4px; }
.bd-earth { margin: 6px 0 0; font-weight: 700; }
.bd-earth b { font: 700 26px Oswald, sans-serif; color: var(--accent); margin: 0 2px; }
.bd-earth small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }

/* ================= フローティング広告 ================= */
body.has-float { padding-bottom: 84px; }
.float-ad {
  position: fixed; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(500px, calc(100% - 20px)); z-index: 20;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,.25); animation: slideup .4s ease-out;
}
@keyframes slideup { from { transform: translate(-50%, 120%); } }
.fa-link { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 10px; padding: 10px 40px 10px 10px; text-decoration: none; color: var(--ink); }
.fa-thumb { width: 48px; height: 48px; border-radius: 8px; background: var(--bg); display: grid; place-items: center; font-size: 26px; overflow: hidden; }
.fa-thumb img { width: 100%; height: 100%; object-fit: contain; }
.fa-body { min-width: 0; display: flex; flex-direction: column; }
.fa-label { font-size: 10px; color: var(--muted); }
.fa-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fa-go { font-size: 12px; font-weight: 900; color: var(--accent-ink); background: var(--accent); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.fa-close {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--muted);
  font-size: 18px; cursor: pointer;
}

/* ================= フッター ================= */
.site-foot { max-width: 520px; margin: 0 auto; padding: 0 16px 40px; font-size: 11px; color: var(--muted); text-align: center; }
.site-foot p { margin: 4px 0; }

@media (prefers-reduced-motion: reduce) {
  .road-line, .btn-plus, .after { animation: none; }
}
