:root {
  --bg: #fff7f1;
  --surface: #ffffff;
  --surface-2: #fff0e7;
  --ink: #1e2640;
  --ink-2: #454c68;
  --muted: #737a94;
  --line: #f0e2d7;
  --primary: #e64a26;
  --primary-press: #cc3d1c;
  --primary-soft: #ffe5da;
  --primary-text: #c2381a;
  --on-primary: #ffffff;
  --good: #0f8a47;
  --bad: #d23b3b;
  --c-prop: #e64a26;
  --c-move: #f5a524;
  --c-furn: #14a89a;
  --c-month: #5b6cf0;
  --line-green: #06c755;
  --shadow: 0 1px 2px rgba(30, 38, 64, .05), 0 10px 30px rgba(30, 38, 64, .07);
  --radius: 20px;
  --font: "Zen Maru Gothic", system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11131c;
    --surface: #1b1e2b;
    --surface-2: #252a3b;
    --ink: #eef0f7;
    --ink-2: #c9cde0;
    --muted: #9aa0b8;
    --line: #2c3146;
    --primary: #ff7a52;
    --primary-press: #ff8f6c;
    --primary-soft: #3a2420;
    --primary-text: #ff9b7a;
    --on-primary: #1d0f08;
    --good: #3ccf7e;
    --bad: #ff6b6b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11131c;
  --surface: #1b1e2b;
  --surface-2: #252a3b;
  --ink: #eef0f7;
  --ink-2: #c9cde0;
  --muted: #9aa0b8;
  --line: #2c3146;
  --primary: #ff7a52;
  --primary-press: #ff8f6c;
  --primary-soft: #3a2420;
  --primary-text: #ff9b7a;
  --on-primary: #1d0f08;
  --good: #3ccf7e;
  --bad: #ff6b6b;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { 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: var(--font);
  font-weight: 500;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary-text); }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tiny { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

/* ヘッダー */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center;
  height: 56px; padding: 0 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); text-decoration: none; font-weight: 900; font-size: 17px;
}
.logo svg { width: 28px; height: 28px; color: var(--primary); }

main { max-width: 560px; margin: 0 auto; padding: 0 16px; }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none; line-height: 1.3;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn-primary:hover { background: var(--primary-press); }
.btn-ghost { background: transparent; color: var(--ink-2); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-line { background: var(--line-green); color: #fff; }
.btn-xl { width: 100%; min-height: 58px; font-size: 19px; }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: 14px; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.link-btn {
  background: none; border: 0; padding: 8px 4px;
  color: var(--primary-text); font-weight: 700; font-size: 14px;
  text-decoration: underline; text-underline-offset: 3px;
}
.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink);
}
.icon-btn svg { width: 20px; height: 20px; }

/* トップ */
.hero { padding: 28px 0 40px; text-align: center; }
.hero-kicker {
  display: inline-block; margin: 0 0 12px; padding: 4px 12px;
  border-radius: 999px; background: var(--primary-soft); color: var(--primary-text);
  font-weight: 700; font-size: 13px;
}
.hero-title { margin: 0; font-size: clamp(32px, 9vw, 44px); line-height: 1.3; font-weight: 900; letter-spacing: .01em; }
.hl { color: var(--primary); position: relative; }
.hero-lead { margin: 16px 0 0; color: var(--ink-2); font-size: 16px; }
.hero-lead strong { color: var(--ink); }
.hero-points {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin: 18px 0 24px; padding: 0; list-style: none;
}
.hero-points li {
  padding: 4px 12px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.hero-points li::before { content: "✓ "; color: var(--good); }
#resumeBtn { margin-top: 12px; }
.hero-preview {
  margin-top: 32px; padding: 8px 16px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  text-align: left;
}
.pv-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1.5px dashed var(--line); font-size: 14px; color: var(--ink-2);
}
.pv-row:last-child { border-bottom: 0; }
.pv-row span:last-child {
  flex: none; padding: 2px 10px; border-radius: 999px;
  background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--muted);
}

/* 質問 */
.wizard { padding: 12px 0 0; min-height: calc(100svh - 56px); display: flex; flex-direction: column; }
.wiz-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.progress { flex: 1; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress-bar { height: 100%; width: 20%; border-radius: inherit; background: var(--primary); transition: width .3s ease; }
.step-count { font-size: 13px; font-weight: 700; color: var(--muted); min-width: 36px; text-align: right; }
.step { border: 0; margin: 0; padding: 0; min-width: 0; flex: 1; animation: stepIn .28s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.q { padding: 0; font-size: 26px; font-weight: 900; line-height: 1.4; }
.q:focus { outline: none; }
.q-hint { margin: 4px 0 20px; color: var(--muted); font-size: 14px; }
.q-note {
  margin: 16px 0 0; padding: 10px 14px; border-radius: 12px;
  background: var(--surface-2); color: var(--ink-2); font-size: 13px;
}
.q-note.warn { background: color-mix(in srgb, var(--c-move) 18%, var(--surface)); }
.sub-q { margin-top: 24px; }
.sub-q-title { margin: 22px 0 10px; font-weight: 700; font-size: 15px; }

.opts { display: grid; gap: 10px; }
.opt { display: block; position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-body {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 16px;
  background: var(--surface); border: 2px solid var(--line);
  transition: border-color .15s ease, background-color .15s ease, transform .12s ease;
  cursor: pointer;
}
.opt-body:active { transform: scale(.985); }
.opt input:checked + .opt-body { border-color: var(--primary); background: var(--primary-soft); }
.opt input:focus-visible + .opt-body { outline: 3px solid var(--primary); outline-offset: 2px; }
.opt-emoji { font-size: 28px; line-height: 1; flex: none; }
.opt-text { display: flex; flex-direction: column; line-height: 1.45; }
.opt-text b { font-size: 16px; font-weight: 700; }
.opt-text small { font-size: 13px; color: var(--muted); }
.opts-compact .opt-body { padding: 12px 16px; }
.opts-compact .opt-text { flex-direction: row; justify-content: space-between; align-items: center; width: 100%; gap: 8px; }

.rent-box {
  padding: 20px 16px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
}
.rent-display { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rent-value { font-size: 40px; font-weight: 900; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.rent-value small { font-size: 18px; margin-left: 2px; }
.round-btn {
  width: 48px; height: 48px; border-radius: 999px; flex: none;
  border: 2px solid var(--line); background: var(--surface-2); font-size: 24px; font-weight: 700; line-height: 1;
}
.range { width: 100%; margin: 18px 0 14px; accent-color: var(--primary); height: 28px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 6px 16px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: 14px;
}
.chip[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); }

.month-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.month { position: relative; }
.month input { position: absolute; opacity: 0; pointer-events: none; }
.month span {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 56px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--surface);
  font-weight: 700; cursor: pointer; line-height: 1.2;
}
.month small { font-size: 10px; font-weight: 700; color: var(--bad); margin-top: 2px; }
.month input:checked + span { border-color: var(--primary); background: var(--primary-soft); }
.month input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px; border-radius: 16px; background: var(--surface-2); }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 52px; padding: 6px 4px; border-radius: 12px;
  font-weight: 700; font-size: 15px; text-align: center; line-height: 1.3; cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.segmented small { font-size: 11px; color: var(--muted); font-weight: 500; }
.segmented input:checked + span { background: var(--surface); box-shadow: 0 2px 8px rgba(30, 38, 64, .12); color: var(--primary-text); }
.segmented input:focus-visible + span { outline: 3px solid var(--primary); }
.segmented-sm span { min-height: 40px; font-size: 13px; }

.wiz-nav {
  position: sticky; bottom: 0;
  margin: 12px -16px 0; padding: 24px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) calc(100% - 24px), transparent);
}
.wiz-nav .btn:disabled { background: var(--line); color: var(--muted); box-shadow: none; cursor: not-allowed; }

/* 結果 */
.result { padding: 8px 0 24px; }
.card {
  margin-bottom: 14px; padding: 20px 18px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-title { margin: 0 0 12px; font-size: 18px; font-weight: 900; }
.shared-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 10px 14px; border-radius: 14px;
  background: var(--surface-2); font-size: 14px; font-weight: 700;
}
.summary { padding-top: 22px; }
.eyebrow { margin: 0; font-size: 15px; font-weight: 700; color: var(--muted); }
.big { display: flex; flex-direction: column; margin-top: 6px; }
.big-label { font-weight: 700; font-size: 15px; }
.big-value {
  font-size: clamp(56px, 17vw, 76px); font-weight: 900; line-height: 1.05;
  color: var(--primary); letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.big-value small { font-size: .38em; margin-left: 4px; letter-spacing: 0; }
.stackbar { display: flex; height: 14px; margin: 16px 0 10px; border-radius: 999px; overflow: hidden; background: var(--line); gap: 2px; }
.seg { display: block; height: 100%; transition: flex-grow .4s ease; flex: 0 0 auto; }
.seg-prop { background: var(--c-prop); }
.seg-move { background: var(--c-move); }
.seg-furn { background: var(--c-furn); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend b { color: var(--ink); font-weight: 700; margin-left: 2px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sw-prop { background: var(--c-prop); }
.sw-move { background: var(--c-move); }
.sw-furn { background: var(--c-furn); }
.sw-month { background: var(--c-month); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.mini { display: flex; flex-direction: column; padding: 14px; border-radius: 16px; background: var(--surface-2); }
.mini-label { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.mid-value { font-size: clamp(24px, 7vw, 30px); font-weight: 900; line-height: 1.25; font-variant-numeric: tabular-nums; }
.mini-note { font-size: 11px; color: var(--muted); }

.conds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.cond {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 32px; padding: 4px 12px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-size: 12px; font-weight: 700; color: var(--ink-2);
}
.cond::after { content: "✎"; font-size: 11px; color: var(--muted); }
.cond:hover { border-color: var(--muted); }

.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.share-row .btn { padding: 10px 8px; font-size: 15px; white-space: nowrap; }
.share-sub { display: flex; justify-content: center; gap: 20px; margin-top: 6px; }

.tip-list { margin: 0; padding: 0; list-style: none; counter-reset: tip; }
.tip {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 4px 10px; align-items: start;
  padding: 12px 0; border-bottom: 1.5px dashed var(--line);
}
.tip:last-child { border-bottom: 0; padding-bottom: 0; }
.tip::before {
  counter-increment: tip; content: counter(tip);
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-text); font-weight: 900; font-size: 13px;
}
.tip-title { font-weight: 700; font-size: 15px; line-height: 1.5; }
.tip-save { font-weight: 900; color: var(--good); white-space: nowrap; font-size: 15px; text-align: right; line-height: 1.5; }
.tip-save small { display: block; font-size: 10px; color: var(--muted); font-weight: 700; }
.tip-text { grid-column: 2 / 4; margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }

.section { padding: 0; }
.section summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px; cursor: pointer; list-style: none; font-weight: 900; font-size: 17px;
}
.section summary::-webkit-details-marker { display: none; }
.section summary b { font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 8px; }
.section summary b::after {
  content: ""; width: 9px; height: 9px; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s ease;
}
.section[open] summary b::after { transform: rotate(-135deg) translateY(-1px); }
.sec-title { display: inline-flex; align-items: center; gap: 8px; }
.section > *:not(summary) { margin-left: 18px; margin-right: 18px; }
.section > *:last-child { margin-bottom: 18px; }
.sec-note { font-size: 12px; color: var(--muted); margin-top: 10px; }

.rows { display: grid; }
.row {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
  padding: 12px 0; border-top: 1.5px solid var(--line);
}
.row-name { font-weight: 700; font-size: 15px; }
.row-hint { grid-column: 1 / -1; font-size: 12px; color: var(--muted); line-height: 1.5; }
.row-amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.row-ctrl { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.select {
  appearance: none; -webkit-appearance: none;
  min-height: 40px; padding: 6px 34px 6px 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface-2);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
  font-size: 14px; font-weight: 700;
}
.yen-input { display: inline-flex; align-items: center; gap: 6px; }
.yen-input input {
  width: 120px; min-height: 40px; padding: 6px 10px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface-2);
  text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 16px;
}
.yen-input input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.row-edited .row-name::after { content: "変更済み"; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); font-size: 10px; color: var(--muted); vertical-align: 2px; }

.furn-cat { margin: 16px 0 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.check {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-top: 1.5px solid var(--line); cursor: pointer;
}
.check input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; }
.check-name { flex: 1; font-weight: 700; font-size: 15px; line-height: 1.4; }
.check-name small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.check-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.check input:not(:checked) ~ .check-price, .check input:not(:checked) ~ .check-name { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }
#furnPreset { margin-bottom: 8px; }
#gradeSeg { margin-bottom: 4px; }

.month-chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 96px; margin-top: 16px; }
.mc-bar { display: flex; flex-direction: column; align-items: center; height: 100%; }
.mc-track { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.mc-fill { width: 100%; border-radius: 6px 6px 3px 3px; background: var(--line); transition: height .3s ease; }
.mc-bar.is-on .mc-fill { background: var(--c-move); }
.mc-label { font-size: 10px; color: var(--muted); margin-top: 4px; font-weight: 700; }
.mc-bar.is-on .mc-label { color: var(--ink); }

.income .income-input { display: grid; gap: 8px; margin-top: 16px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.income .yen-input input { width: 100%; }
.income .yen-input { width: 100%; }
.need { display: grid; gap: 8px; }
.need-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 14px; }
.need-row b { font-size: 17px; font-weight: 900; white-space: nowrap; font-variant-numeric: tabular-nums; }
.compare { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
.income-result { margin: 12px 0 0; padding: 14px; border-radius: 14px; font-weight: 700; font-size: 15px; }
.income-result.is-good { background: color-mix(in srgb, var(--good) 14%, var(--surface)); }
.income-result.is-bad { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); }
.income-result b { font-size: 20px; font-weight: 900; }

.pr-card {
  position: relative; margin: -2px 0 14px; padding: 18px;
  border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface);
}
.pr-badge {
  position: absolute; top: 12px; right: 12px; padding: 1px 8px; border-radius: 6px;
  background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 700;
}
.pr-title { margin: 0 40px 4px 0; font-weight: 900; font-size: 16px; }
.pr-text { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.pr-card .btn { width: 100%; }
.pr-dev { margin: 8px 0 0; font-size: 11px; color: var(--muted); }

.result-actions { display: flex; justify-content: center; margin: 20px 0 8px; }

/* 解説 */
.guide { padding: 32px 0 16px; border-top: 1.5px solid var(--line); margin-top: 24px; }
.guide h2 { font-size: 20px; font-weight: 900; margin: 32px 0 10px; line-height: 1.45; }
.guide h2:first-child, .ad-slot + h2 { margin-top: 0; }
.ad-slot { display: flex; flex-direction: column; align-items: center; margin: 0 0 32px; }
.ad-label { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.ad-frame { display: block; width: 300px; height: 250px; border: 0; border-radius: 8px; background: var(--surface-2); }
.guide p { margin: 0 0 12px; color: var(--ink-2); font-size: 15px; }
.guide strong { color: var(--ink); }
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1.5px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { background: var(--surface-2); font-weight: 700; }
td:first-child { font-weight: 700; white-space: nowrap; }
.faq { border-bottom: 1.5px solid var(--line); }
.faq summary { padding: 14px 0; font-weight: 700; cursor: pointer; }
.faq p { padding-bottom: 6px; }
.sources { padding-left: 20px; margin: 0; font-size: 13px; }
.sources li { margin-bottom: 6px; }

.footer { max-width: 560px; margin: 0 auto; padding: 24px 16px calc(32px + env(safe-area-inset-bottom)); text-align: center; border-top: 1.5px solid var(--line); }
.footer-nav { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }

/* 画像ダイアログ */
.img-dialog {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100svh - 32px);
  padding: 16px; border: 0; border-radius: 24px;
  background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.img-dialog::backdrop { background: rgba(17, 19, 28, .55); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dialog-head h2 { margin: 0; font-size: 17px; font-weight: 900; }
#imgPreview { width: 100%; border-radius: 14px; border: 1.5px solid var(--line); }
.dialog-actions { display: grid; gap: 8px; margin-top: 12px; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 600px) {
  .hero { padding-top: 48px; }
  .card { padding: 24px; }
  .section > *:not(summary) { margin-left: 24px; margin-right: 24px; }
  .section summary { padding: 20px 24px; }
}

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