/* ============================================================
   着せかえ（色の組み合わせ）
   html の data-theme="mint" / "pink" で切り替わります。
   新しい色を作りたいときは、このブロックをコピーして数字を変えます。
   ============================================================ */

/* ミント × ブラウン */
:root,
[data-theme="mint"] {
  --bg: #e7f3ec;          /* 背景（うすいミント） */
  --surface: #fffdf8;     /* フォームのカード */
  --text: #3a2a20;        /* 文字（こげ茶） */
  --muted: #86766a;
  --line: #d9cdbf;
  --strong: #5a3e2b;      /* ボタンや選択中の色（ブラウン） */
  --on-strong: #fffdf8;
  --select-bg: #d3eedf;   /* 選んだ家具のボタン */
  --select-line: #5a3e2b;
  --accent: #3d9a76;      /* アクセント（濃いミント） */
  --stamp: #cf5747;       /* ハンコ（朱色） */

  /* 見積書の紙 */
  --paper: #fffdf8;
  --paper-text: #3a2a20;
  --paper-muted: #8f7f73;
  --paper-line: #e4d9cc;

  /* 内訳の色 */
  --c1: #8b5e3c;
  --c2: #6cc3a0;
  --c3: #e2c7a4;

  /* イラストの色 */
  --ill-line: #3a2a20;
  --ill-win: #cdeadb;
  --ill-sun: #fffdf8;
  --ill-box: #d8b68f;
  --ill-tape: #b98e66;
  --ill-leaf: #5dae8b;
  --ill-pot: #8b5e3c;
}

/* ブラック × ピンク */
[data-theme="pink"] {
  --bg: #121112;
  --surface: #1c1a1b;
  --text: #f6eff2;
  --muted: #a99ea3;
  --line: #363133;
  --strong: #ff8fb1;
  --on-strong: #121112;
  --select-bg: #3a2229;
  --select-line: #ff8fb1;
  --accent: #ff8fb1;
  --stamp: #ff5c8d;

  --paper: #fff5f8;
  --paper-text: #1d1619;
  --paper-muted: #8c7b82;
  --paper-line: #efd9e1;

  --c1: #ff8fb1;
  --c2: #1d1619;
  --c3: #f7c9d7;

  --ill-line: #f6eff2;
  --ill-win: #262224;
  --ill-sun: #ff8fb1;
  --ill-box: #ff8fb1;
  --ill-tape: #e46c92;
  --ill-leaf: #f7c9d7;
  --ill-pot: #f6eff2;
}

/* 文字の種類 */
:root {
  --font-body: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  --font-head: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-mono: "DM Mono", ui-monospace, Consolas, monospace;
}

/* ============================================================
   基本
   ============================================================ */
* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 32px; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ============================================================
   ヘッダー
   ============================================================ */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.logo {
  font-family: var(--font-head); font-weight: 800; font-size: 1.4rem;
  letter-spacing: .02em; color: var(--text); text-decoration: none;
}

.theme-switch { display: flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--muted); }
.swatch {
  width: 26px; height: 26px; padding: 0;
  border: 2px solid var(--bg); border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--line);
  cursor: pointer; transition: box-shadow .2s, transform .2s;
}
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
.swatch-mint { background: linear-gradient(135deg, #8fd3b6 50%, #5a3e2b 50%); }
.swatch-pink { background: linear-gradient(135deg, #ff8fb1 50%, #121112 50%); }

.hero-grid { display: grid; gap: 24px; align-items: center; padding: 24px 0 48px; }
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; padding: 40px 0 72px; }
}

h1 {
  margin: 0 0 20px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.3rem, 7vw, 4rem);
  line-height: 1.25;
  letter-spacing: .01em;
}
/* 大きい見出しは1行ずつ。言葉の途中で折り返さない */
.h1-line { display: block; white-space: nowrap; }
.h1-sub {
  display: block; width: fit-content; margin-bottom: 16px; padding-bottom: 4px;
  border-bottom: 1.5px solid var(--text);
  font-family: var(--font-body); font-size: .85rem; font-weight: 700; letter-spacing: .04em;
}
.lead { max-width: 30em; margin: 0 0 32px; color: var(--muted); }

.hero-art { max-width: 380px; width: 100%; justify-self: center; }
.hero-art svg { display: block; width: 100%; height: auto; }
@media (max-width: 859px) { .hero-art { max-width: 260px; order: -1; } }

/* 一人暮らし／二人暮らしの切り替え */
.mode-toggle { display: inline-flex; border: 1.5px solid var(--text); border-radius: 99px; overflow: hidden; }
.mode-toggle label { position: relative; }
.mode-toggle label + label { border-left: 1.5px solid var(--text); }
.mode-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.mode-toggle span {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 26px; font-weight: 700; cursor: pointer;
  transition: background .2s, color .2s;
}
.mode-toggle input:checked + span { background: var(--strong); color: var(--on-strong); }
.mode-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -4px; }
@media (max-width: 480px) {
  .mode-toggle { display: flex; }
  .mode-toggle label { flex: 1; }
  .mode-toggle span { justify-content: center; padding: 12px 8px; }
}

/* ============================================================
   2列レイアウト（パソコンでは右に見積書を固定）
   ============================================================ */
.layout { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: start; }
@media (min-width: 940px) {
  .layout { grid-template-columns: 1fr 390px; gap: 36px; }
  .receipt-col {
    position: sticky; top: 20px;
    max-height: calc(100vh - 40px); overflow-y: auto;
    scrollbar-width: thin; padding: 2px 2px 8px;
  }
}

.panel { padding: 24px 20px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); }
@media (min-width: 640px) { .panel { padding: 36px; } }

/* ============================================================
   入力フォーム
   ============================================================ */
.step + .step { margin-top: 36px; padding-top: 36px; border-top: 1.5px dashed var(--line); }
.step-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.step-no {
  display: grid; place-items: center; flex-shrink: 0;
  width: 34px; height: 34px; border: 1.5px solid var(--text); border-radius: 50%;
  font-family: var(--font-head); font-weight: 800; font-size: 1rem;
}
.step-head h2 { margin: 0; font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; line-height: 1.4; }
.step-note { margin: 2px 0 0; font-size: .78rem; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px 18px; }
.field label { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); }

/* 入力欄は下線だけのシンプルな形 */
input[type="number"], select {
  width: 100%;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  transition: border-color .2s;
}
input[type="number"] { font-family: var(--font-mono); }
input[type="number"]:hover, select:hover { border-bottom-color: var(--muted); }
input[type="number"]:focus, select:focus { outline: none; border-bottom-color: var(--strong); }
select {
  appearance: none; padding-right: 28px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238f7f73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 4px center;
}
select option { background: var(--surface); color: var(--text); }

/* 「円」「日」などの単位 */
.with-unit { position: relative; }
.with-unit input { padding-right: 28px; }
.with-unit span {
  position: absolute; right: 2px; bottom: 10px;
  color: var(--muted); font-size: .85rem; pointer-events: none;
}

/* チェックボックス（四角） */
.checks { display: grid; gap: 12px; margin-top: 24px; }
.check { display: flex; align-items: center; gap: 12px; font-size: .92rem; cursor: pointer; }
.check small { display: block; color: var(--muted); font-size: .74rem; line-height: 1.3; }
.check input {
  appearance: none; flex-shrink: 0; display: grid; place-content: center;
  width: 22px; height: 22px; margin: 0;
  border: 1.5px solid var(--text); border-radius: 4px; background: transparent; cursor: pointer;
}
.check input::after {
  content: ""; width: 11px; height: 6px; margin-top: -3px;
  border: 2px solid var(--on-strong); border-top: 0; border-right: 0;
  transform: rotate(-45deg) scale(0); transition: transform .15s;
}
.check input:checked { background: var(--strong); border-color: var(--strong); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }

/* 価格帯の切り替え */
.segmented { display: flex; border: 1.5px solid var(--text); border-radius: 8px; overflow: hidden; }
.segmented label { flex: 1; position: relative; }
.segmented label + label { border-left: 1.5px solid var(--text); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block; padding: 10px 4px; text-align: center;
  font-size: .82rem; font-weight: 700; cursor: pointer; transition: background .2s, color .2s;
}
.segmented input:checked + span { background: var(--strong); color: var(--on-strong); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -4px; }

.quick { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 16px 0 14px; }
.text-btn {
  padding: 2px 0; border: 0; border-bottom: 1px solid var(--muted);
  background: none; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer;
}
.text-btn:hover { color: var(--text); border-bottom-color: var(--text); }

/* 家具・家電：タップで選ぶタグ */
.items { display: flex; flex-wrap: wrap; gap: 8px; }
.item { position: relative; cursor: pointer; }
.item input { position: absolute; opacity: 0; pointer-events: none; }
.item span {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 99px;
  font-size: .86rem; color: var(--muted);
  transition: border-color .2s, background .2s, color .2s;
}
.item span em { font-style: normal; font-family: var(--font-mono); font-size: .76rem; }
.item:hover span { border-color: var(--muted); }
.item input:checked + span { border-color: var(--select-line); background: var(--select-bg); color: var(--text); }
.item input:checked + span::before { content: "✓"; font-weight: 700; color: var(--select-line); }
.item input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============================================================
   見積書
   ============================================================ */
.receipt-wrap { filter: drop-shadow(0 10px 24px rgba(40, 25, 15, .12)); }
.receipt {
  padding: 30px 26px 40px;
  background: var(--paper);
  color: var(--paper-text);
  /* 下の端を紙のようにギザギザ（半円の切り込み）にする */
  -webkit-mask: radial-gradient(circle 6px at 50% 100%, transparent 6px, #000 6.5px) 0 0 / 16px 100% repeat-x;
          mask: radial-gradient(circle 6px at 50% 100%, transparent 6px, #000 6.5px) 0 0 / 16px 100% repeat-x;
}

.receipt-title {
  margin: 0 0 18px; text-align: center;
  font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; letter-spacing: .5em; text-indent: .5em;
}
.receipt-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 6px; border-bottom: 1.5px solid var(--paper-text);
}
#receiptTo { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
#receiptDate { font-family: var(--font-mono); font-size: .75rem; color: var(--paper-muted); }
.receipt-note { margin: 10px 0 18px; font-size: .74rem; color: var(--paper-muted); }

.receipt-total { position: relative; padding: 12px 14px 10px; background: color-mix(in srgb, var(--paper-line) 45%, transparent); }
.receipt-total .label { font-size: .75rem; font-weight: 700; color: var(--paper-muted); }
.total {
  margin: 0; font-family: var(--font-head); font-weight: 800;
  font-size: clamp(2.2rem, 8vw, 2.7rem); line-height: 1.2; font-variant-numeric: tabular-nums;
}
.total .cur { margin-right: 2px; font-size: .62em; }
.total .dash { margin-left: 2px; font-size: .62em; }

/* ハンコ */
.stamp {
  position: absolute; right: 12px; top: 50%;
  display: grid; place-items: center;
  width: 56px; height: 56px; border: 2px solid var(--stamp); border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--stamp);
  font-family: var(--font-head); font-weight: 800; font-size: .9rem; color: var(--stamp);
  transform: translateY(-50%) rotate(-14deg); opacity: .85;
}

.ratio { margin: 8px 0 14px; font-size: .74rem; color: var(--paper-muted); }

.bar { display: flex; gap: 2px; height: 6px; margin-bottom: 22px; }
.bar div { height: 100%; transition: flex-grow .4s ease; min-width: 0; }

/* おふたりの負担割合 */
.split { margin-bottom: 22px; padding: 14px 0; border-top: 1.5px dashed var(--paper-line); border-bottom: 1.5px dashed var(--paper-line); }
.split-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: .82rem; font-weight: 700; }
.split-head span { font-family: var(--font-mono); }
.split input[type="range"] { width: 100%; margin: 0 0 10px; accent-color: var(--c1); cursor: pointer; }
.split-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.split-cols small { display: block; font-size: .72rem; color: var(--paper-muted); }
.split-cols strong { font-family: var(--font-mono); font-size: 1.2rem; font-weight: 500; }

/* 明細（点線でつなぐ） */
.group { margin-bottom: 16px; }
.row { display: flex; align-items: baseline; gap: 6px; }
.row .leader { flex: 1; min-width: 12px; border-bottom: 1.5px dotted var(--paper-line); transform: translateY(-4px); }
.row .amt { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.group-head { font-weight: 700; font-size: .9rem; }
.group-head .mark { width: 9px; height: 9px; flex-shrink: 0; align-self: center; }
.group ul { margin: 4px 0 0; padding: 0 0 0 15px; list-style: none; font-size: .78rem; color: var(--paper-muted); }
.group li { padding: 1px 0; }
.receipt-foot { margin: 20px 0 0; padding-top: 12px; border-top: 1.5px solid var(--paper-text); font-size: .68rem; color: var(--paper-muted); }

.btn-share {
  display: block; margin-top: 18px; padding: 14px;
  border-radius: 99px; background: var(--strong); color: var(--on-strong);
  text-align: center; text-decoration: none; font-weight: 700; font-size: .92rem;
  transition: transform .2s, opacity .2s;
}
.btn-share:hover { transform: translateY(-2px); opacity: .92; }

/* 保存フォームとURLコピー */
.save-form { display: flex; gap: 8px; margin-top: 18px; }
.save-form input {
  flex: 1; min-width: 0; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: 99px;
  background: var(--surface); color: var(--text); font: inherit; font-size: .9rem;
}
.save-form input:focus { outline: none; border-color: var(--strong); }
.save-form button {
  flex-shrink: 0; padding: 11px 18px; border: 1.5px solid var(--strong); border-radius: 99px;
  background: transparent; color: var(--text); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer;
  transition: background .2s, color .2s;
}
.save-form button:hover { background: var(--strong); color: var(--on-strong); }
.link-btn {
  display: block; margin: 12px auto 0; padding: 2px 0;
  border: 0; border-bottom: 1px solid var(--muted); background: none;
  color: var(--muted); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
}
.link-btn:hover { color: var(--text); border-bottom-color: var(--text); }

/* ============================================================
   下のセクション
   ============================================================ */
.block { margin-top: 96px; }
.block-title {
  display: flex; align-items: center; gap: 16px;
  margin: 0 0 12px; font-family: var(--font-head); font-weight: 800;
  font-size: clamp(1.4rem, 3.6vw, 2rem); line-height: 1.4;
}
.block-title::after { content: ""; flex: 1; height: 1.5px; background: var(--line); }
.block-lead { margin: 0 0 20px; color: var(--muted); }
.block-lead strong { font-family: var(--font-mono); font-weight: 500; font-size: 1.15em; color: var(--text); border-bottom: 2px solid var(--accent); }

/* 節約ポイント */
.tips { margin: 0; padding: 0; list-style: none; border-top: 1.5px solid var(--text); }
.tips li {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 16px 4px; border-bottom: 1.5px dashed var(--line);
}
.tip-no { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; color: var(--accent); }
.tips .save { font-family: var(--font-mono); font-size: 1.05rem; white-space: nowrap; }
@media (max-width: 480px) {
  .tips li { grid-template-columns: auto 1fr; row-gap: 2px; }
  .tips .save { grid-column: 2; }
}

/* 物件くらべ */
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.cmp-card {
  display: flex; flex-direction: column;
  padding: 20px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface);
}
.cmp-card.is-best { border-color: var(--strong); }
.cmp-badges { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; margin-bottom: 8px; }
.cmp-badges span {
  padding: 1px 10px; border-radius: 99px; background: var(--strong); color: var(--on-strong);
  font-size: .7rem; font-weight: 700;
}
.cmp-card h3 { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; line-height: 1.4; word-break: break-all; }
.cmp-meta { margin: 2px 0 10px; font-size: .76rem; color: var(--muted); }
.cmp-total { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: 1.9rem; line-height: 1.2; }
.cmp-diff { margin: 2px 0 12px; font-size: .76rem; color: var(--muted); }
.cmp-dl { margin: 0 0 16px; font-size: .8rem; }
.cmp-dl div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px dashed var(--line); }
.cmp-dl dt { color: var(--muted); }
.cmp-dl dd { margin: 0; font-family: var(--font-mono); }
.cmp-dl .cmp-2y { border-top: 1.5px solid var(--text); font-weight: 700; }
.cmp-dl .cmp-2y dt { color: var(--text); }
.cmp-actions { display: flex; gap: 8px; margin-top: auto; }
.cmp-btn {
  flex: 1; padding: 8px; border: 1.5px solid var(--strong); border-radius: 99px;
  background: var(--strong); color: var(--on-strong); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer;
}
.cmp-btn.is-ghost { flex: 0 0 auto; padding: 8px 14px; border-color: var(--line); background: transparent; color: var(--muted); }
.cmp-btn.is-ghost:hover { border-color: var(--stamp); color: var(--stamp); }

/* 貯金プラン */
.saving {
  display: grid; gap: 18px; align-items: end;
  padding: 24px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface);
}
@media (min-width: 720px) { .saving { grid-template-columns: 260px 1fr; gap: 36px; } }
.saving-result { margin: 0; }
.saving-result strong { display: block; font-family: var(--font-head); font-weight: 800; font-size: clamp(1.15rem, 3vw, 1.45rem); line-height: 1.5; }
.saving-result span { display: block; margin-top: 4px; font-size: .84rem; color: var(--muted); }

/* やることリスト */
.plan-top { display: grid; gap: 20px; align-items: end; margin-bottom: 14px; }
@media (min-width: 720px) { .plan-top { grid-template-columns: auto 1fr; gap: 48px; } }
.countdown { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.countdown span { font-weight: 700; }
.countdown strong { font-family: var(--font-head); font-weight: 800; font-size: 3.4rem; line-height: 1; color: var(--accent); }
.countdown small { flex-basis: 100%; font-family: var(--font-mono); font-size: .76rem; color: var(--muted); }
.progress span { display: block; margin-bottom: 6px; font-family: var(--font-mono); font-size: .82rem; color: var(--muted); }
.progress-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress-bar div { height: 100%; background: var(--strong); transition: width .4s ease; }

.todo { margin: 0; padding: 0; list-style: none; border-top: 1.5px solid var(--text); }
.todo-item { padding: 14px 4px; border-bottom: 1.5px dashed var(--line); }
.todo-check { display: flex; gap: 14px; cursor: pointer; }
.todo-check input {
  appearance: none; flex-shrink: 0; display: grid; place-content: center;
  width: 24px; height: 24px; margin: 2px 0 0;
  border: 1.5px solid var(--text); border-radius: 50%; background: transparent; cursor: pointer;
}
.todo-check input::after {
  content: ""; width: 11px; height: 6px; margin-top: -3px;
  border: 2px solid var(--on-strong); border-top: 0; border-right: 0;
  transform: rotate(-45deg) scale(0); transition: transform .15s;
}
.todo-check input:checked { background: var(--strong); border-color: var(--strong); }
.todo-check input:checked::after { transform: rotate(-45deg) scale(1); }
.todo-body { display: flex; flex-direction: column; }
.todo-when { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); }
.todo-when b { margin-left: 8px; padding: 0 8px; border-radius: 99px; background: var(--stamp); color: #fff; font-family: var(--font-body); font-size: .7rem; }
.todo-title { font-weight: 700; }
.todo-note { font-size: .8rem; color: var(--muted); }
.todo-more { margin: 4px 0 0 38px; }
.todo-link { font-size: .8rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.todo-link:hover { text-decoration: underline; }
.todo-item.is-done .todo-title { text-decoration: line-through; color: var(--muted); }
.todo-item.is-done .todo-note, .todo-item.is-done .todo-more { display: none; }

/* 一言メッセージ */
.toast {
  position: fixed; left: 50%; bottom: 90px; z-index: 20;
  max-width: calc(100% - 32px); padding: 12px 20px;
  border-radius: 99px; background: var(--text); color: var(--bg);
  font-size: .85rem; font-weight: 700; text-align: center;
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 940px) { .toast { bottom: 32px; } }

/* 広告カード */
.pr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }
.pr-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.pr-card:hover { border-color: var(--text); transform: translateY(-3px); }
.pr-card strong { font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; }
.pr-desc { flex: 1; color: var(--muted); font-size: .85rem; }
.pr-tag {
  align-self: flex-start; padding: 0 6px; border: 1px solid var(--muted); border-radius: 3px;
  font-family: var(--font-mono); font-size: .66rem; color: var(--muted);
}
.pr-more { font-size: .8rem; font-weight: 700; color: var(--accent); }

/* よくある質問 */
.faq details { border-bottom: 1.5px dashed var(--line); }
.faq details:first-of-type { margin-top: 20px; border-top: 1.5px solid var(--text); }
.faq summary {
  display: flex; align-items: baseline; gap: 14px;
  padding: 18px 4px; font-weight: 700; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; margin-left: auto; color: var(--muted); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.q, .a { flex-shrink: 0; font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; }
.q { color: var(--accent); }
.a { color: var(--stamp); }
.faq details p { display: flex; gap: 14px; margin: 0; padding: 0 4px 20px; color: var(--muted); font-size: .92rem; }

/* ============================================================
   文章だけのページ（プライバシーポリシーなど）
   ============================================================ */
.doc { max-width: 760px; padding-top: 32px; }
.doc-title { font-size: clamp(1.7rem, 5vw, 2.4rem); }
.doc h2 {
  margin: 44px 0 10px; padding-bottom: 6px; border-bottom: 1.5px solid var(--text);
  font-family: var(--font-head); font-weight: 800; font-size: 1.25rem;
}
.doc p { margin: 0 0 12px; color: var(--muted); }
.doc-dl { margin: 0; }
.doc-dl div { display: grid; grid-template-columns: 8em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1.5px dashed var(--line); }
.doc-dl dt { font-weight: 700; }
.doc-dl dd { margin: 0; color: var(--muted); }
.doc-date { margin-top: 32px !important; font-family: var(--font-mono); font-size: .8rem; }
footer a { color: inherit; }

footer {
  margin-top: 96px; padding-top: 32px; padding-bottom: 110px;
  border-top: 1.5px solid var(--text); color: var(--muted); font-size: .76rem;
}
footer .logo { display: block; margin-bottom: 10px; }
footer p { margin: 0 0 4px; }

/* ============================================================
   スマホ用：下に浮かぶ合計バー
   ============================================================ */
.sticky-total {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 18px;
  border: 1.5px solid var(--paper-text); border-radius: 14px;
  background: var(--paper); color: var(--paper-text);
  box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .3);
  transition: transform .3s ease;
}
.sticky-total span { font-size: .72rem; font-weight: 700; color: var(--paper-muted); }
.sticky-total strong { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.sticky-total a {
  margin-left: auto; padding: 8px 16px; border-radius: 99px;
  background: var(--strong); color: var(--on-strong);
  text-decoration: none; font-size: .8rem; font-weight: 700;
}
.sticky-total.hidden { transform: translateY(160%); }
@media (min-width: 940px) {
  .sticky-total { display: none; }
  footer { padding-bottom: 40px; }
}

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