:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --ink: #1f2a2e;
  --muted: #4f5b60;
  --line: #d8d3c6;
  --accent: #0d6a5b;
  --accent-ink: #ffffff;
  --gain: #0b6b3a;
  --gain-bg: #e7f3ec;
  --loss: #9a3324;
  --loss-bg: #f8e9e5;
  --focus: #b4540a;
  --radius: 10px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.note { display: block; font-size: 0.82rem; color: var(--muted); font-weight: 400; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 100%;
  line-height: 1.75;
}
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; top: 8px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.site-name { font-weight: 700; text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.site-name span { color: var(--accent); }

.pr-bar { background: #fff8e6; border-bottom: 1px solid #ecdcb0; font-size: 0.85rem; }
.pr-bar p { margin: 0; padding: 6px 0; }
.pr-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; margin-right: 6px; line-height: 1.5; vertical-align: 1px; }

h1 { font-size: 1.6rem; line-height: 1.4; margin: 28px 0 8px; }
.lead { color: var(--muted); margin: 0 0 6px; }
.unofficial { font-size: 0.85rem; color: var(--muted); margin: 0 0 20px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin: 0 0 16px; }
.panel h2 { font-size: 1.1rem; margin: 0 0 4px; }
.panel .hint { font-size: 0.85rem; color: var(--muted); margin: 0 0 12px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

.field { margin: 0 0 14px; }
.field > label, .field .label { display: block; font-weight: 700; margin-bottom: 4px; }
.field .note { display: block; font-size: 0.82rem; color: var(--muted); font-weight: 400; }
.input-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.input-row input[type="number"] {
  width: 7.5em; font: inherit; padding: 8px 10px; border: 1px solid #8a8f88; border-radius: 8px; background: #fff; color: var(--ink);
}
.unit { color: var(--muted); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick button {
  font: inherit; font-size: 0.85rem; min-height: 44px; min-width: 44px; padding: 4px 12px;
  border: 1px solid #8a8f88; background: var(--surface); color: var(--ink); border-radius: 22px; cursor: pointer;
}
.quick button:hover { border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-weight: 400; min-height: 44px; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; }
.checks { display: grid; gap: 2px 16px; grid-template-columns: 1fr; }

details.more { margin-top: 4px; }
details.more summary { cursor: pointer; font-weight: 700; padding: 10px 0; min-height: 44px; }
details.more[open] summary { margin-bottom: 8px; }
legend.label { font-weight: 700; margin-bottom: 2px; }
.fee-grid { display: grid; gap: 10px 16px; grid-template-columns: 1fr; margin-top: 10px; }
.fee-grid .field { margin: 0; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 24px; }
.btn-calc {
  font: inherit; font-weight: 700; font-size: 1.05rem; padding: 12px 28px; min-height: 48px;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 24px; cursor: pointer;
}
.btn-reset { font: inherit; padding: 10px 18px; min-height: 48px; background: transparent; border: 1px solid #8a8f88; border-radius: 24px; color: var(--ink); cursor: pointer; }

#result { scroll-margin-top: 12px; }
#summary { font-weight: 700; font-size: 1.05rem; margin: 0 0 12px; }
#summary:focus { outline: none; }
#top-pick { border: 2px solid var(--accent); }
#top-pick h3 { margin: 0 0 2px; font-size: 1.1rem; }
.top-net { font-size: 1.4rem; font-weight: 700; color: var(--gain); margin: 0 0 10px; }
.btn-trial {
  display: inline-block; text-decoration: none; font-weight: 700; padding: 10px 18px; min-height: 44px;
  background: var(--accent); color: var(--accent-ink); border-radius: 22px;
}
.btn-trial .pr-tag { border-color: var(--accent-ink); }
.trial-note { font-size: 0.82rem; color: var(--muted); margin: 10px 0 0; }

#cards { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
.card { background: var(--surface); border: 1px solid var(--line); border-left-width: 6px; border-radius: var(--radius); padding: 12px 14px; }
.card.is-gain { border-left-color: var(--gain); }
.card.is-loss { border-left-color: var(--loss); }
.card.is-even { border-left-color: var(--line); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card h4 { margin: 0; font-size: 1rem; }
.card-net { margin: 0; font-weight: 700; font-size: 1.1rem; }
.is-gain .card-net { color: var(--gain); }
.is-loss .card-net { color: var(--loss); }
.mark { font-size: 0.8em; margin-right: 4px; }
.small { font-size: 0.86rem; color: var(--muted); margin: 6px 0 0; }
.small.even { color: var(--ink); }
.link-trial { display: inline-block; margin-top: 8px; font-weight: 700; padding: 6px 0; min-height: 44px; }
.quick-answers { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 20px; }
.quick-answers h2 { font-size: 1rem; margin: 0 0 6px; }
.quick-answers ul { margin: 0; padding-left: 1.2em; font-size: 0.92rem; }
.quick-answers li { margin-bottom: 4px; }
#adjusted { margin: 0 0 12px; }
.premise { font-size: 0.85rem; color: var(--muted); }
.premise li { margin-bottom: 4px; }

.content h2 { font-size: 1.2rem; margin: 36px 0 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.content h3 { font-size: 1.02rem; margin: 20px 0 6px; }
.content table { border-collapse: collapse; width: 100%; font-size: 0.92rem; background: var(--surface); }
.content th, .content td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.content th { background: #efece3; }
.table-scroll { overflow-x: auto; }
.asof { font-size: 0.85rem; color: var(--muted); }

.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--surface); font-size: 0.85rem; color: var(--muted); }
.site-footer .wrap { padding-top: 16px; padding-bottom: 28px; }
.site-footer p { margin: 0 0 6px; }

@media (min-width: 720px) {
  h1 { font-size: 2rem; }
  .checks { grid-template-columns: 1fr 1fr; }
  .fee-grid { grid-template-columns: 1fr 1fr; }
  #cards { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.field > label.check { display: flex; font-weight: 400; margin-bottom: 0; }

/* 絵(MJ) */
.hero-art { margin: 0 0 20px; }
.hero-art img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 672; object-fit: cover; border-radius: var(--radius); }
.spot { float: right; width: 38%; max-width: 240px; margin: 0 0 8px 14px; }
.spot img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.content h2 { clear: both; }
.panel-head { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; }
.panel-head img { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; flex: none; }
.panel-head h2 { margin: 0; }

/* 本文の棒グラフ */
.chart { margin: 14px 0 18px; padding: 14px 14px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.chart-title { font-weight: 700; margin: 0 0 6px; }
.clegend { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.85rem; color: var(--muted); }
.clegend li { display: flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.carea { position: relative; height: 170px; border-bottom: 1px solid #c9c4b6; margin-top: 18px; }
.ccols { position: absolute; inset: 0; display: flex; justify-content: space-around; align-items: flex-end; }
.cgroup { display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.cbar-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; width: 24px; }
.cbar { width: 100%; border-radius: 4px 4px 0 0; }
.cbar-val { font-size: 0.72rem; color: var(--muted); white-space: nowrap; margin-bottom: 2px; }
.s-a { background: #00806a; }
.s-b { background: #1a7fb0; }
.s-c { background: #d0553a; }
.cline { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--ink); z-index: 1; }
.cline-label { position: absolute; right: 0; top: -1.45em; font-size: 0.75rem; color: var(--ink); background: var(--surface); padding: 0 4px; }
.cxlabels { display: flex; justify-content: space-around; font-size: 0.8rem; color: var(--muted); margin-top: 4px; text-align: center; }
.cunit { font-size: 0.78rem; color: var(--muted); text-align: center; margin: 2px 0 0; }
.chart figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }

/* 結果の得損の棒 */
#result-chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 12px; }
.rc-row { display: grid; grid-template-columns: 7.5em 1fr 7.5em; align-items: center; gap: 8px; min-height: 30px; font-size: 0.88rem; }
.rc-name { overflow-wrap: anywhere; }
.rc-track { position: relative; height: 14px; }
.rc-track::before { content: ""; position: absolute; left: var(--zero, 50%); top: -6px; bottom: -6px; border-left: 1px solid #8a8f88; }
.rc-bar { position: absolute; top: 0; height: 100%; }
.rc-bar.is-gain { left: var(--zero, 50%); background: #00806a; border-radius: 0 4px 4px 0; }
.rc-bar.is-loss { right: calc(100% - var(--zero, 50%)); background: #d0553a; border-radius: 4px 0 0 4px; }
.rc-val { font-weight: 700; text-align: right; white-space: nowrap; }
@media (max-width: 420px) {
  .spot { float: none; width: 100%; max-width: none; margin: 0 0 10px; }
  .rc-row { grid-template-columns: 6em 1fr 6.8em; font-size: 0.8rem; }
}
.intro { display: grid; gap: 4px 28px; grid-template-columns: 1fr; align-items: center; margin-bottom: 20px; }
.intro .hero-art { margin: 8px 0 0; }
@media (min-width: 720px) {
  .intro { grid-template-columns: 1.05fr 1fr; }
  .intro .hero-art { margin: 28px 0 0; }
}
.has-lines .carea, .has-lines .cxlabels, .has-lines .cunit { margin-right: 7.2em; }
.cline-label { left: 100%; right: auto; top: -0.75em; margin-left: 6px; width: 7em; white-space: normal; line-height: 1.25; padding: 0; background: none; }
#top-pick::after { content: ""; display: block; clear: both; }
.top-art { float: right; width: 34%; max-width: 200px; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; margin: 0 0 8px 12px; }
@media (max-width: 420px) { .top-art { width: 40%; } }
.cline-label { white-space: nowrap; top: -1.35em; }
.cline + .cline .cline-label { top: 0.2em; }
.cbar-val { position: relative; z-index: 2; background: var(--surface); padding: 0 2px; border-radius: 3px; }
@media (max-width: 420px) {
  .spot { float: right; width: 42%; margin: 4px 0 6px 12px; }
}

/* 5名レビュー後の調整(2026-11-21) */
.chart { max-width: 600px; }
.cbar-col { width: clamp(24px, 8vw, 48px); }
.cbar-val { font-size: 0.8rem; }
.rc-head { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); margin: 0 0 6px; }
.rc-row { grid-template-columns: minmax(5.5em, auto) minmax(4em, 1fr) auto; }
@media (max-width: 719px) {
  .intro .hero-art img { aspect-ratio: 16 / 6; max-height: 140px; }
  .spot { float: none; width: 100%; max-width: none; margin: 0 0 10px; }
  .spot img { aspect-ratio: 16 / 7; max-height: 160px; }
}

/* 直感的なUI(2026-11-21): 選ぶ→答える→すぐ結果 */
.step-no { display: inline-flex; align-items: center; justify-content: center; width: 1.7em; height: 1.7em; margin-right: 8px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 0.85em; font-weight: 700; vertical-align: 0.1em; }
.step-panel h2, #result-h { font-size: 1.15rem; }
#result-h { margin: 8px 0 10px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 6px 0 14px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 8px 10px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; text-align: center; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tile img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; opacity: .78; transition: opacity .15s; }
.tile-name { font-weight: 700; font-size: 1.05rem; margin-top: 4px; }
.tile-sub { font-size: 0.8rem; color: var(--muted); }
.tile::after { content: ""; position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #8a8f88; background: var(--surface); }
.tile.is-on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.tile.is-on img { opacity: 1; }
.tile.is-on::after { content: "✓"; color: var(--accent-ink); background: var(--accent); border-color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.tile:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.tile:hover { border-color: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .tile:active { transform: scale(.98); } }

.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; margin: 4px 6px 4px 0; border: 1px solid #8a8f88; border-radius: 22px; background: var(--surface); cursor: pointer; font-size: 0.9rem; font-weight: 400; }
.chip input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--accent); }
.chip:has(input:checked) { background: #e3f1ed; border-color: var(--accent); }
.status-chips { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.status-chips .chip { font-size: 0.85rem; }

.step-guide { color: var(--muted); margin: 0 0 16px; padding: 14px 16px; border: 2px dashed var(--line); border-radius: var(--radius); }
.q-panel h2 { display: flex; align-items: center; gap: 10px; }
.q-icon { width: 48px; height: 36px; object-fit: cover; border-radius: 8px; flex: none; }
@media (prefers-reduced-motion: no-preference) { .q-panel { animation: q-in .2s ease-out; } @keyframes q-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } } }

.stepper { display: flex; align-items: center; gap: 6px; }
.stepper input[type="number"] { width: 5.5em; text-align: center; font: inherit; font-size: 1.15rem; font-weight: 700; padding: 8px 6px; border: 1px solid #8a8f88; border-radius: 10px; background: #fff; color: var(--ink); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step { min-width: 48px; height: 48px; padding: 0 8px; border: 1px solid #8a8f88; border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.step:hover { border-color: var(--accent); background: #e3f1ed; }

.sticky-result { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(246,244,238,.96); border-top: 1px solid var(--line); }
.sticky-result a { display: flex; justify-content: space-between; align-items: center; gap: 10px; max-width: 880px; margin: 0 auto; min-height: 48px; padding: 8px 16px; border-radius: 24px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 700; }
.sticky-go { flex: none; font-size: 0.9rem; }
@media (min-width: 1000px) { .sticky-result { display: none; } }
body { padding-bottom: 72px; }
@media (max-width: 999px) { html { scroll-padding-bottom: 96px; } }
@media (min-width: 1000px) { body { padding-bottom: 0; } }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) {
  .wrap { max-width: 1120px; }
  .calc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
  .calc-layout #result { position: sticky; top: 12px; }
  #go-result { display: none; }
  .calc-layout .top-art { width: 30%; }
  .content, .quick-answers, .intro { max-width: 880px; }
}

/* 5名レビュー後(UI) */
.tile { border-color: #8a8f88; }
#summary:focus-visible, #summary:focus { outline: 2px dashed var(--focus); outline-offset: 4px; }
.step-guide.is-active { border-style: solid; border-color: var(--accent); color: var(--ink); background: #eef6f3; font-weight: 700; }
.to-detail { margin: 4px 0 12px; }
.to-detail a { font-weight: 700; }
#result-detail { margin-top: 8px; }
#result-detail h2 { font-size: 1.1rem; }
@media (max-width: 719px) {
  .intro .hero-art { display: none; }
  .tile img { aspect-ratio: 16 / 9; }
  .tiles { gap: 8px; }
  .tile { padding: 6px 6px 8px; }
  .tile::after { top: 10px; right: 10px; width: 24px; height: 24px; }
}

/* 集客・導線(2026-11-21) */
.h1-sub { display: block; font-size: 0.68em; color: var(--muted); margin-top: 4px; }
.calc-back { margin: 10px 0 4px; clear: both; }
.btn-back { font: inherit; font-weight: 700; min-height: 44px; padding: 8px 16px; border: 2px solid var(--accent); border-radius: 22px; background: var(--surface); color: var(--accent); cursor: pointer; }
.btn-back:hover { background: #e3f1ed; }
.calc-back a { font-weight: 700; }
.also-calc { margin: 6px 0 12px; font-size: 0.9rem; }
.also-calc .btn-back { margin: 4px 6px 0 0; padding: 6px 14px; }
@media (min-width: 1000px) {
  .calc-layout #result { max-height: calc(100vh - 24px); overflow: auto; }
}

/* 最初の画面(2026-11-22) */
h1 .nw { display: inline-block; }
.unofficial { margin-bottom: 12px; }
.data-note { font-size: 0.8rem; margin-top: -4px; }
@media (max-width: 719px) {
  .pr-bar { font-size: 0.78rem; }
}
