/* Share Cart UI再設計 モック用CSS（2026-10-20）
   設計書 docs/ui_redesign/design_spec_2026-10-20.md §2・§5 と一致させる。
   外部読み込みは Google Fonts のみ。 */

/* ---------- 1. トークン ---------- */
:root {
  color-scheme: light dark;

  --brand: #1D7A5F;
  --brand-strong: #145C47;
  --brand-soft: #E3F3EC;
  --on-brand: #FFFFFF;
  --accent: #E8781E;
  --accent-soft: #FDEBDD;
  --line: #06C755;
  --danger: #C53030;
  --danger-soft: #FBE9E9;
  --warn: #B7791F;
  --bg: #F6F5F2;
  --surface: #FFFFFF;
  --surface-2: #F0EEEA;
  --text: #1F2328;
  --text-2: #5C6166;
  --text-3: #8A9095;
  --border: #E2DFDA;
  --focus: #1D7A5F;
  --scrim: rgba(20, 24, 28, .45);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, .14);

  --fs-12: .75rem;  --fs-13: .8125rem; --fs-14: .875rem; --fs-16: 1rem;
  --fs-18: 1.125rem; --fs-20: 1.25rem; --fs-24: 1.5rem; --fs-28: 1.75rem; --fs-32: 2rem;

  --h-fixbar: 74px; /* 公開ページの下部固定ボタン（上下12px＋ボタン48px＋罫線） */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-full: 999px;

  --h-header: 52px;
  --h-tabbar: 56px;
  --h-addbar: 64px;
  --safe-b: max(0px, env(safe-area-inset-bottom));

  --wrap-public: 960px;
  --wrap-app: 640px;
  --dur: 150ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #4FBF92; --brand-strong: #7BD6B1; --brand-soft: #173A2E; --on-brand: #0E1A15;
    --accent: #F5A05A; --accent-soft: #3D2A1A;
    --danger: #F08A8A; --danger-soft: #3A1F1F; --warn: #F0C060;
    --bg: #121416; --surface: #1C1F22; --surface-2: #262A2E;
    --text: #ECEDEE; --text-2: #A8ADB2; --text-3: #737980; --border: #30353A;
    --focus: #4FBF92; --scrim: rgba(0, 0, 0, .6);
    --shadow-1: none; --shadow-2: 0 8px 24px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  --brand: #4FBF92; --brand-strong: #7BD6B1; --brand-soft: #173A2E; --on-brand: #0E1A15;
  --accent: #F5A05A; --accent-soft: #3D2A1A;
  --danger: #F08A8A; --danger-soft: #3A1F1F; --warn: #F0C060;
  --bg: #121416; --surface: #1C1F22; --surface-2: #262A2E;
  --text: #ECEDEE; --text-2: #A8ADB2; --text-3: #737980; --border: #30353A;
  --focus: #4FBF92; --scrim: rgba(0, 0, 0, .6);
  --shadow-1: none; --shadow-2: 0 8px 24px rgba(0, 0, 0, .5);
}

/* ---------- 2. リセット・基本 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: var(--fs-16);
  line-height: 1.75;
  text-autospace: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.has-tabbar { padding-bottom: calc(var(--h-tabbar) + var(--safe-b) + var(--sp-4)); }
body.has-fixbar { padding-bottom: calc(120px + var(--safe-b)); } /* フッターの無いページ（buy / check系）: 固定バー＝ヒント1行＋ボタン48 */
/* フッターのあるページ: 余白は body ではなく footer の下パディング1か所だけ（固定ボタンの高さ＋safe-area）。二重に付けない */
body.has-fixbar:has(.footer) { padding-bottom: 0; }
body.has-fixbar .footer { padding-bottom: calc(var(--h-fixbar) + var(--safe-b)); }
body.no-scroll { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; } /* display:flex 等の部品に hidden を付けても消えるように（v2） */

/* 日本語組版 */
.jp-phrase { word-break: keep-all; overflow-wrap: anywhere; line-break: strict; text-wrap: balance; }
.jp-body { line-break: strict; overflow-wrap: anywhere; text-wrap: pretty; hanging-punctuation: allow-end; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* 文字段階 */
h1, .h1 { font-size: var(--fs-24); line-height: 1.4; font-weight: 700; letter-spacing: .02em; }
h2, .h2 { font-size: var(--fs-24); line-height: 1.4; font-weight: 700; letter-spacing: .02em; }
h3, .h3 { font-size: var(--fs-18); line-height: 1.5; font-weight: 700; }
.display { font-size: var(--fs-28); line-height: 1.35; font-weight: 700; letter-spacing: .02em; font-feature-settings: "palt"; }
.page-title { font-size: var(--fs-20); line-height: 1.45; font-weight: 700; }
.lead { font-size: var(--fs-16); color: var(--text-2); }
.small { font-size: var(--fs-13); line-height: 1.5; color: var(--text-2); }
.tiny { font-size: var(--fs-12); line-height: 1.5; color: var(--text-3); }
@media (min-width: 768px) { .display { font-size: var(--fs-32); line-height: 1.3; } }

/* レイアウト */
.wrap { width: 100%; max-width: var(--wrap-public); margin: 0 auto; padding: 0 var(--sp-4); }
.wrap-app { width: 100%; max-width: var(--wrap-app); margin: 0 auto; padding: 0 var(--sp-4); }
.section { padding: var(--sp-7) 0; }
.section-tight { padding: var(--sp-5) 0; }
.stack > * + * { margin-top: var(--sp-4); }
.stack-sm > * + * { margin-top: var(--sp-2); }
.row { display: flex; align-items: center; gap: var(--sp-2); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.grow { flex: 1 1 auto; min-width: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 768px) {
  .section { padding: var(--sp-8) 0; }
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
  .grid-2 > * + * { margin-top: 0; }
}

/* ---------- 3. ヘッダー ---------- */
.header {
  position: sticky; top: 0; z-index: 30;
  height: var(--h-header);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: 100%; max-width: var(--wrap-public); margin: 0 auto; padding: 0 var(--sp-4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
}
.header.is-app .header-inner { max-width: var(--wrap-app); }
.logo { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--text); font-weight: 700; font-size: var(--fs-16); }
.logo:hover { text-decoration: none; }
.logo svg { width: 26px; height: 26px; color: var(--brand); }
.header-right { display: flex; align-items: center; gap: var(--sp-1); }
.nav-pc { display: none; }
@media (min-width: 768px) {
  .nav-pc { display: flex; gap: var(--sp-1); }
  .nav-pc a { display: inline-flex; align-items: center; height: 40px; padding: 0 var(--sp-3); border-radius: var(--r-sm); color: var(--text-2); font-size: var(--fs-14); font-weight: 500; }
  .nav-pc a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
  .header .icon-btn.menu-btn { display: none; }
}

/* ---------- 4. ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 48px; padding: 0 var(--sp-5);
  border-radius: var(--r-md); border: 1.5px solid transparent;
  font-size: var(--fs-16); font-weight: 700; line-height: 1.2; white-space: nowrap;
  transition: filter var(--dur) ease-out, transform var(--dur) ease-out, background var(--dur);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; filter: brightness(.96); }
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-secondary { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn-ghost { background: transparent; color: var(--text-2); min-height: 44px; font-weight: 500; }
.btn-ghost.is-danger { color: var(--danger); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-line { background: var(--line); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 var(--sp-3); font-size: var(--fs-14); position: relative; }
.btn-sm::after { content: ""; position: absolute; inset: -4px 0; } /* タップ領域44を確保 */
.btn-header { min-height: 40px; padding: 0 var(--sp-3); font-size: var(--fs-14); }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--surface-2); color: var(--text-3); border-color: transparent; pointer-events: none; }
.btn.is-loading { color: transparent; position: relative; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-md); color: var(--text-2);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 24px; height: 24px; }

/* チップ・セグメント */
.chip-row { display: flex; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 var(--sp-3); border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
  font-size: var(--fs-14); font-weight: 500; white-space: nowrap; position: relative;
}
.chip::after { content: ""; position: absolute; inset: -4px 0; }
.chip.is-on { background: var(--brand-soft); border-color: transparent; color: var(--brand); font-weight: 700; }
.chip svg { width: 16px; height: 16px; }

.seg { display: flex; padding: 4px; background: var(--surface-2); border-radius: var(--r-md); }
.seg button {
  flex: 1; min-height: 40px; border-radius: var(--r-sm); color: var(--text-2);
  font-size: var(--fs-14); font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.seg button[aria-selected="true"] { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--shadow-1); }
.seg .count { font-size: var(--fs-12); padding: 0 6px; min-width: 20px; height: 20px; border-radius: var(--r-full); background: var(--surface-2); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; }
.seg button[aria-selected="true"] .count { background: var(--brand-soft); color: var(--brand); }

/* ---------- 5. カード・バッジ・通知 ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); border: 1px solid var(--border); padding: var(--sp-4); }
.card-title { font-size: var(--fs-18); font-weight: 700; line-height: 1.5; }
.card-body { color: var(--text-2); font-size: var(--fs-16); }
.card + .card { margin-top: var(--sp-3); }

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-full); font-size: var(--fs-12); font-weight: 700; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

.notice { display: flex; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand); font-size: var(--fs-14); }
.notice-warn { border-left-color: var(--warn); }
.notice-danger { border-left-color: var(--danger); }
.notice svg { width: 20px; height: 20px; flex: none; color: var(--text-2); margin-top: 2px; }

/* ---------- 6. フォーム ---------- */
.field { display: block; }
.field > label, .field-label { display: block; font-size: var(--fs-14); font-weight: 700; margin-bottom: 6px; }
.input {
  width: 100%; min-height: 48px; padding: 0 var(--sp-4);
  border: 1.5px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); color: var(--text); font-size: var(--fs-16);
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
textarea.input { min-height: 120px; padding: var(--sp-3) var(--sp-4); line-height: 1.6; resize: vertical; }
.field.is-error .input { border-color: var(--danger); }
.field-msg { font-size: var(--fs-13); color: var(--text-2); margin-top: 6px; }
.field.is-error .field-msg { color: var(--danger); }
.req { margin-left: 6px; }

.radio-row, .check-row {
  display: flex; align-items: center; gap: var(--sp-3); min-height: 56px; padding: 0 var(--sp-2);
  border-bottom: 1px solid var(--border);
}
.radio-row:last-child, .check-row:last-child { border-bottom: 0; }
.radio-row input, .check-row input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }

/* ---------- 7. リスト行（買い物アイテム） ---------- */
.items { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.item { display: flex; align-items: center; min-height: 56px; padding: 6px 4px 6px 4px; border-bottom: 1px solid var(--border); }
.item:last-child { border-bottom: 0; }
.item-check {
  width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand); -webkit-tap-highlight-color: transparent;
}
.item-check .circle { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--text-3); display: inline-flex; align-items: center; justify-content: center; transition: background var(--dur), border-color var(--dur); }
.item-check .circle svg { width: 18px; height: 18px; color: var(--on-brand); opacity: 0; }
.item-check:hover .circle { border-color: var(--brand); }
.item.is-done .circle { background: var(--brand); border-color: var(--brand); }
.item.is-done .circle svg { opacity: 1; }
.item-main { flex: 1 1 auto; min-width: 0; padding: 0 var(--sp-2); }
.item-name { font-size: var(--fs-16); font-weight: 500; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.item.is-done .item-name { color: var(--text-3); text-decoration: line-through; }
.item-meta { display: flex; align-items: center; gap: 6px; font-size: var(--fs-13); color: var(--text-2); line-height: 1.4; margin-top: 2px; }
.item-meta svg { width: 14px; height: 14px; }
.item.is-flash { animation: flash .6s ease-out; }
@keyframes flash { 0% { background: var(--brand-soft); } 100% { background: transparent; } }
.item.is-selectable { cursor: pointer; }
.item.is-selectable[aria-pressed="true"] { background: var(--brand-soft); }

.cat-head { font-size: var(--fs-13); font-weight: 700; color: var(--text-2); padding: var(--sp-4) var(--sp-1) var(--sp-2); }
.cat-head:first-child { padding-top: var(--sp-2); }

.menu { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: var(--sp-3); min-height: 56px; padding: 0 var(--sp-4); border-bottom: 1px solid var(--border); color: var(--text); width: 100%; text-align: left; }
.menu-item:last-child { border-bottom: 0; }
.menu-item:hover { background: var(--surface-2); text-decoration: none; }
.menu-item svg { width: 24px; height: 24px; color: var(--text-2); flex: none; }
.menu-item .chev { margin-left: auto; color: var(--text-3); }
.menu-item.is-danger { color: var(--danger); }
.menu-item.is-danger svg { color: var(--danger); }
.menu-item .sub { font-size: var(--fs-13); color: var(--text-2); display: block; line-height: 1.4; }

/* ---------- 8. 進捗・残り枠 ---------- */
.progress { height: 8px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; flex: 1 1 auto; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: var(--r-full); transition: width var(--dur); }
.quota { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-13); color: var(--text-2); white-space: nowrap; }
.quota .bar { width: 40px; height: 6px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; }
.quota .bar > span { display: block; height: 100%; background: var(--brand); }
.quota.is-warn .bar > span { background: var(--warn); }
.quota.is-warn { color: var(--warn); }
.quota.is-full .bar > span { background: var(--danger); }
.quota.is-full { color: var(--danger); }

/* ---------- 9. 空状態・スケルトン・トースト ---------- */
.empty { text-align: center; padding: var(--sp-7) var(--sp-4); }
.empty .gau { margin: 0 auto var(--sp-4); }
.empty h3 { margin-bottom: var(--sp-2); }
.empty p { color: var(--text-2); margin-bottom: var(--sp-5); }
/* ガウくん（v2: 円のプレースホルダーをやめ実画像に）
   .gau        … 顔だけの丸アイコン（64px）。gau_thumbsup.webp を顔の位置で切り抜く。avatar用
   .gau.lg     … 120px
   .gau-full   … 全身（親指）。幅は --gau-w で指定（既定 140px）
   .stamp      … LINEスタンプ（方言の文字入り）。空状態・完了・上限・案内「だけ」に使う（§0-2） */
.gau { width: 64px; height: 64px; border-radius: 50%; background: #FFF url(/static/images/site/gau_thumbsup.webp) 52% 14% / 175% auto no-repeat; border: 2px solid var(--surface); box-shadow: var(--shadow-1); }
.gau.lg { width: 120px; height: 120px; }
.gau-full { display: block; width: var(--gau-w, 140px); height: auto; margin: 0 auto; }
.stamp { display: block; width: var(--stamp-w, 150px); height: auto; margin: 0 auto; }
.stamp-cap { display: block; text-align: center; font-size: var(--fs-12); color: var(--text-3); margin-top: 2px; }

.skel { height: 56px; border-radius: var(--r-md); background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skel + .skel { margin-top: var(--sp-2); }
@keyframes shimmer { to { background-position: -200% 0; } }

.toast {
  position: fixed; left: var(--sp-4); right: var(--sp-4);
  bottom: calc(var(--h-tabbar) + var(--safe-b) + var(--sp-3));
  z-index: 60; display: flex; align-items: center; gap: var(--sp-3);
  min-height: 48px; padding: var(--sp-2) var(--sp-4);
  background: var(--text); color: var(--bg); border-radius: var(--r-md); box-shadow: var(--shadow-2);
  font-size: var(--fs-14); font-weight: 500;
  transform: translateY(16px); opacity: 0; pointer-events: none; transition: all var(--dur) ease-out;
}
.toast.is-show { transform: none; opacity: 1; pointer-events: auto; }
.toast button { color: var(--brand); font-weight: 700; margin-left: auto; min-height: 36px; padding: 0 var(--sp-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast button { color: #7BD6B1; } }
@media (min-width: 640px) { .toast { left: 50%; right: auto; transform: translate(-50%, 16px); min-width: 320px; } .toast.is-show { transform: translate(-50%, 0); } }

/* ---------- 10. ボトムシート・ドロワー ---------- */
.sheet-scrim, .drawer-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; opacity: 0; pointer-events: none; transition: opacity var(--dur); }
.sheet-scrim.is-open, .drawer-scrim.is-open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-2);
  padding: var(--sp-2) var(--sp-4) calc(var(--sp-4) + var(--safe-b));
  max-height: 85vh; overflow-y: auto;
  transform: translateY(100%); transition: transform var(--dur) ease-out;
}
.sheet.is-open { transform: none; }
.sheet-handle { width: 36px; height: 4px; border-radius: var(--r-full); background: var(--border); margin: 4px auto var(--sp-3); }
.sheet-title { font-size: var(--fs-18); font-weight: 700; margin-bottom: var(--sp-3); }
.sheet-sub { font-size: var(--fs-13); font-weight: 700; color: var(--text-2); padding: var(--sp-3) 0 var(--sp-1); }
.sheet .menu { border: 0; border-radius: 0; }
.sheet .menu-item { padding-left: var(--sp-2); padding-right: var(--sp-2); }
.sheet-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.sheet-actions .btn { flex: 1; }
@media (min-width: 640px) { .sheet { left: 50%; right: auto; width: 480px; transform: translate(-50%, 100%); } .sheet.is-open { transform: translate(-50%, 0); } }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(320px, 85vw); background: var(--surface); box-shadow: var(--shadow-2);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform var(--dur) ease-out;
}
.drawer.is-open { transform: none; }
.drawer-head { height: var(--h-header); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--sp-2) 0 var(--sp-4); border-bottom: 1px solid var(--border); }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--sp-2) var(--sp-2); }
.drawer-item { display: flex; align-items: center; gap: var(--sp-3); min-height: 56px; padding: 0 var(--sp-3); border-radius: var(--r-md); color: var(--text); font-weight: 500; width: 100%; text-align: left; }
.drawer-item:hover { background: var(--surface-2); text-decoration: none; }
.drawer-item svg { width: 24px; height: 24px; color: var(--text-2); }
.drawer-item.is-danger { color: var(--danger); } .drawer-item.is-danger svg { color: var(--danger); }
.drawer-foot { padding: var(--sp-4); padding-bottom: calc(var(--sp-4) + var(--safe-b)); border-top: 1px solid var(--border); }

/* ---------- 11. 下部タブ・固定バー ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--h-tabbar) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex;
}
.tabbar .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-2); font-size: 11px; font-weight: 500; line-height: 1; }
.tabbar .tab svg { width: 24px; height: 24px; }
.tabbar .tab[aria-current="page"] { color: var(--brand); font-weight: 700; }
.tabbar .tab:hover { text-decoration: none; }
@media (min-width: 640px) { .tabbar { left: 50%; transform: translateX(-50%); width: var(--wrap-app); border-left: 1px solid var(--border); border-right: 1px solid var(--border); } }

.fixbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + var(--safe-b));
  background: var(--surface); border-top: 1px solid var(--border);
}
.fixbar .hint { text-align: center; font-size: var(--fs-12); color: var(--text-2); margin-bottom: var(--sp-2); }
.fixbar.is-hidden { transform: translateY(110%); transition: transform var(--dur); }

/* ---------- 12. dashboard固有 ---------- */
.listbar { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: 56px; padding: var(--sp-2) 0; text-align: left; color: var(--text); }
.listbar-name { font-size: var(--fs-18); font-weight: 700; line-height: 1.4; }
.listbar-sub { font-size: var(--fs-13); color: var(--text-2); line-height: 1.4; }
.listbar .chev { color: var(--text-3); margin-left: auto; width: 24px; height: 24px; flex: none; }

.addbar {
  position: sticky; top: var(--h-header); z-index: 20;
  background: var(--bg); padding: var(--sp-2) 0 var(--sp-3);
  display: flex; gap: var(--sp-2);
}
.addbar .input-wrap { position: relative; flex: 1 1 auto; min-width: 0; }
.addbar .input { padding-right: 44px; }
.addbar .clear { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; display: none; }
.addbar .input-wrap.has-text .clear { display: inline-flex; }
.addbar .btn { flex: none; min-width: 72px; padding: 0 var(--sp-4); }

.status-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-1) 0 var(--sp-3); font-size: var(--fs-13); color: var(--text-2); }
.status-row .left { display: flex; align-items: center; gap: var(--sp-2); flex: 1 1 auto; min-width: 0; }

/* ---------- 13. 公開側部品 ---------- */
.steps { counter-reset: step; }
.step { display: flex; gap: var(--sp-3); align-items: flex-start; }
.step + .step { margin-top: var(--sp-4); }
.step-num { counter-increment: step; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-14); }
.step-num::before { content: counter(step); }
.step h3 { margin-bottom: 2px; }
.step p { color: var(--text-2); }

.plan-card { position: relative; }
.plan-card.is-recommended { border-color: var(--brand); }
.plan-card .plan-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.plan-card .plan-name { font-size: var(--fs-18); font-weight: 700; }
.plan-card .plan-price { margin: var(--sp-2) 0 var(--sp-3); font-size: var(--fs-24); font-weight: 700; line-height: 1.2; }
.plan-card .plan-price small { font-size: var(--fs-14); font-weight: 500; color: var(--text-2); margin-left: 2px; }
.plan-card .plan-feats { border-top: 1px solid var(--border); }
.plan-card .plan-feats li { display: flex; justify-content: space-between; gap: var(--sp-3); min-height: 40px; align-items: center; font-size: var(--fs-14); border-bottom: 1px solid var(--border); }
.plan-card .plan-feats li span:last-child { font-weight: 700; white-space: nowrap; }
.plan-card .plan-feats li:last-child { border-bottom: 0; }
.plan-card .btn { margin-top: var(--sp-3); }
.plan-table { display: none; }
@media (min-width: 768px) {
  .plan-cards { display: none; }
  .plan-table { display: table; width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
  .plan-table th, .plan-table td { padding: var(--sp-3); border-bottom: 1px solid var(--border); text-align: center; font-size: var(--fs-14); }
  .plan-table th { background: var(--surface-2); font-weight: 700; }
  .plan-table th:first-child, .plan-table td:first-child { text-align: left; }
}

.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.faq-item + .faq-item { margin-top: var(--sp-2); }
.faq-item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 56px; padding: var(--sp-2) var(--sp-4); font-weight: 500; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg { width: 20px; height: 20px; flex: none; color: var(--text-2); transition: transform var(--dur); }
.faq-item[open] summary svg { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 var(--sp-4) var(--sp-4); color: var(--text-2); }

.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.table th, .table td { padding: var(--sp-3); border-bottom: 1px solid var(--border); text-align: left; font-size: var(--fs-14); vertical-align: top; }
.table th { background: var(--surface-2); font-weight: 700; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-2) var(--sp-4); }
.kv dt { font-size: var(--fs-13); color: var(--text-2); padding-top: 3px; white-space: nowrap; }
.kv dd { margin: 0; font-size: var(--fs-16); font-weight: 500; }

.chat-ex { background: var(--surface-2); border-radius: var(--r-md); padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); }
.bubble { max-width: 80%; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); font-size: var(--fs-14); line-height: 1.5; white-space: pre-line; }
.bubble.me { align-self: flex-end; background: var(--brand); color: var(--on-brand); border-bottom-right-radius: 4px; }
.bubble.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }

.list-plain li { display: flex; gap: var(--sp-3); min-height: 44px; align-items: center; border-bottom: 1px solid var(--border); }
.list-plain li:last-child { border-bottom: 0; }
.list-plain time { font-size: var(--fs-13); color: var(--text-2); white-space: nowrap; }

/* ---------- 14. フッター ---------- */
.footer { background: var(--surface-2); padding: var(--sp-6) 0 calc(var(--sp-5) + var(--safe-b)); margin-top: 0; color: var(--text-2); font-size: var(--fs-13); }
/* 最後のセクションの下余白を消す（フッター自身の上パディングだけにする）。帯（.band）は色付きなので除く */
main > :last-child:not(.band) { padding-bottom: 0; }
main > :last-child:not(.band), main > :last-child:not(.band) :last-child { margin-bottom: 0 !important; }
.footer .logo { margin-bottom: var(--sp-1); }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-4); margin: var(--sp-4) 0; }
.footer-links a { display: flex; align-items: center; min-height: 44px; color: var(--text-2); font-size: var(--fs-14); }
.footer-links a:nth-child(9) { grid-column: 1 / -1; } /* 「特定商取引法に基づく表記」は長いので1行ぶち抜き（全ページ共通） */
.footer-copy { font-size: var(--fs-12); color: var(--text-3); text-align: center; }
@media (min-width: 768px) { .footer-links { grid-template-columns: repeat(4, 1fr); } .footer-links a:nth-child(9) { grid-column: auto; } }

/* ---------- 15. 公開側: ヒーロー・統計・2列（index / features / howto で共用） ---------- */
.hero { padding: var(--sp-6) 0 var(--sp-7); text-align: center; }
.hero .gau { margin: 0 auto var(--sp-4); }
.hero h1 { font-size: var(--fs-28); line-height: 1.35; }
.hero .lead { margin: var(--sp-3) 0 var(--sp-5); }
.hero .ver { display: flex; justify-content: flex-end; margin-bottom: var(--sp-2); }
.hero .ver .badge { gap: 4px; }
.hero .ver svg { width: 14px; height: 14px; }
.hero-pts { display: inline-flex; flex-direction: column; gap: 6px; margin-top: var(--sp-4); text-align: left; font-size: var(--fs-14); }
.hero-pts li { display: flex; gap: 8px; align-items: center; }
.hero-pts svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); text-align: center; }
.stats .num { display: block; white-space: nowrap; font-size: var(--fs-16); font-weight: 700; color: var(--brand); line-height: 1.3; }
.stats small { font-size: var(--fs-12); color: var(--text-2); display: block; line-height: 1.4; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.two .card + .card { margin-top: 0; }
.two .card-title { margin-bottom: var(--sp-2); }
.two li { font-size: var(--fs-14); color: var(--text-2); min-height: 32px; display: flex; align-items: center; }
.two .big { white-space: nowrap; font-size: var(--fs-18); font-weight: 700; line-height: 1.4; color: var(--brand); padding: var(--sp-4) 0; }
.stack > p.jp-body { text-wrap: balance; }
.band { background: var(--brand-soft); text-align: center; }
.news time { min-width: 5.5em; flex: none; }
.grid-cards { display: grid; gap: var(--sp-3); }
.grid-cards .card + .card { margin-top: 0; }
.arts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.arts a { display: block; padding: var(--sp-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text); font-weight: 500; font-size: var(--fs-14); line-height: 1.6; min-height: 88px; }
.arts a:hover { text-decoration: none; border-color: var(--brand); }
.voice .card p:first-child { color: var(--text); margin-bottom: var(--sp-2); }
@media (min-width: 768px) { .grid-cards { grid-template-columns: 1fr 1fr; } .hero h1 { font-size: var(--fs-32); } .arts { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 16. 記事系（blog / faq / howto_alexa / 規約・会社・問い合わせ で共用） ---------- */
.thumb { aspect-ratio: 16 / 9; background: var(--surface-2); border-radius: var(--r-md); display: grid; place-items: center; color: var(--text-3); font-size: var(--fs-13); }
.meta { color: var(--text-2); font-size: var(--fs-13); }
.article h2 { font-size: var(--fs-20); line-height: 1.45; margin: 32px 0 12px; scroll-margin-top: 64px; }
.article h3 { margin: 20px 0 8px; }
.article p { margin: 0 0 12px; }
.article ul, .article ol { margin: 0 0 12px; padding-left: 1.4em; }
.article ul { list-style: disc; } .article ol { list-style: decimal; }
.article li { margin-bottom: 4px; }
.article .table { min-width: 520px; }
.article .table-scroll { margin: 0 0 16px; }
.article .table td:first-child { white-space: nowrap; }
.article .faq-item { margin-bottom: var(--sp-2); }
.toc ol { padding: 0 var(--sp-4) var(--sp-4) calc(var(--sp-4) + 1.4em); list-style: decimal; }
.toc li { display: list-item; padding: 4px 0; }
.toc a { color: var(--text); }
section[id] { scroll-margin-top: 64px; }
.post { display: block; color: var(--text); } .post:hover { text-decoration: none; }
.post h3 { font-size: var(--fs-18); }
.stepbar { display: grid; grid-template-columns: 1fr 1.45fr .75fr; gap: var(--sp-2); }
.stepbar a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: var(--fs-12); font-weight: 700; color: var(--text); padding: var(--sp-2) 0; min-height: 44px; }
.stepbar a:hover { text-decoration: none; }
.shot { aspect-ratio: 540 / 300; margin-top: var(--sp-3); background: var(--surface-2); border-radius: var(--r-md); display: grid; place-items: center; color: var(--text-3); font-size: var(--fs-13); border: 1px dashed var(--border); }
.say { font-size: var(--fs-24); line-height: 1.5; font-weight: 700; text-align: center; padding: var(--sp-4) 0; letter-spacing: .02em; }
.say span { white-space: nowrap; }
.kv dd { overflow-wrap: anywhere; }
.kv-stack { grid-template-columns: 1fr; gap: 0; }
.kv-stack dt { padding-top: var(--sp-3); }
.kv-stack dd { padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border); font-size: var(--fs-16); }
.kv-stack dd:last-child { border-bottom: 0; padding-bottom: 0; }

/* ---------- 17. ログイン後・LIFF の共通部品（account系 / check系） ---------- */
.hdr3 { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%; }
.back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; color: var(--text-2); font-size: var(--fs-14); font-weight: 500; white-space: nowrap; }
.back svg { width: 22px; height: 22px; margin-left: -6px; }
.pagetop { padding-top: var(--sp-4); }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--fs-20); flex: none; }
.avatar.sm { width: 40px; height: 40px; font-size: var(--fs-16); }
.menu details > summary { list-style: none; cursor: pointer; }
.menu details > summary::-webkit-details-marker { display: none; }
.menu details[open] > summary .chev { transform: rotate(90deg); }
.exp { padding: var(--sp-2) var(--sp-4) var(--sp-4); display: grid; gap: var(--sp-3); border-bottom: 1px solid var(--border); }
.menu details:last-child .exp { border-bottom: 0; }
.stripe-note { display: flex; gap: 8px; align-items: flex-start; }
.stripe-note svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--text-3); }
.copyrow { display: flex; gap: var(--sp-2); align-items: center; }
.copyrow .input { min-width: 0; }
.subhead { position: sticky; top: 0; z-index: 30; height: 46px; background: var(--surface); border-bottom: 1px solid var(--border); }
.subhead .wrap-app { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.subhead strong { font-size: var(--fs-16); font-weight: 700; }
.sq { width: 26px; height: 26px; margin: 0 9px; border-radius: 7px; border: 1.5px solid var(--text-3); display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--on-brand); }
.sq svg { width: 18px; height: 18px; opacity: 0; }
.sq.rd { border-radius: 50%; }
[aria-pressed="true"] > .sq { background: var(--brand); border-color: var(--brand); }
[aria-pressed="true"] > .sq svg { opacity: 1; }
.item.is-selectable { min-height: 60px; }

/* ---------- 19. v2（2026-10-20 差し戻し対応）: 親近感の部品 ----------
   目的: 「白カードの縦積み・左揃え見出し＋説明・3点リスト」の繰り返しを崩す。
   使う場所: 公開側（LP・features・howto・faq・blog・CTA）と、ログイン後の「空状態・完了の瞬間・上限」だけ。
   操作の本体（追加バー・一覧・シート・決済フォーム）には使わない。 */
:root {
  --paper: #FFF6CF;          /* 付箋の地（ガウくんのたてがみの黄） */
  --paper-2: #FFEFAE;
  --mane: #F2C21B;           /* 下線・マーカー */
  --talk-bg: #8AA6D6;        /* LINE風トークの地 */
  --talk-me: #8DE055;        /* 自分の吹き出し（LINEの緑） */
  --talk-text: #1F2328;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #3B3418; --paper-2: #4A411D; --mane: #D9AD1C; --talk-bg: #233247; --talk-me: #6CC24A; --talk-text: #0E1A15; }
}
:root[data-theme="dark"] { --paper: #3B3418; --paper-2: #4A411D; --mane: #D9AD1C; --talk-bg: #233247; --talk-me: #6CC24A; --talk-text: #0E1A15; }

/* 見出しの手当て: マーカー・黄色の下線・小さな前置き */
.marker { background: linear-gradient(transparent 58%, var(--paper-2) 58%); padding: 0 .08em; border-radius: 2px; }
.uline { display: inline; background: linear-gradient(transparent 82%, var(--mane) 82%); }
.eyebrow { display: block; font-size: var(--fs-14); font-weight: 700; color: var(--brand); margin-bottom: var(--sp-2); letter-spacing: 0; }
.h-left { text-align: left; }

/* LINE風トーク（LPの「こんな感じで使います」・howtoの例） */
.talk { background: var(--talk-bg); border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-3); display: flex; flex-direction: column; gap: 10px; }
.talk .date { align-self: center; font-size: 11px; color: #fff; background: rgba(0,0,0,.22); border-radius: var(--r-full); padding: 2px 10px; }
.talk .msg { display: flex; align-items: flex-end; gap: 6px; max-width: 100%; }
.talk .msg.me { flex-direction: row-reverse; }
.talk .av { width: 34px; height: 34px; border-radius: 50%; flex: none; align-self: flex-start; background: #E7EEF9; color: #4B5E80; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.talk .av.is-gau { background: #FFF url(/static/images/site/gau_thumbsup.webp) 52% 14% / 175% auto no-repeat; }
.talk .av.is-a { background: #F6D5C4; color: #8A4B2B; }
.talk .av.is-b { background: #CFE3F8; color: #2B5C8A; }
.talk .body { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 78%; }
.talk .msg.me .body { align-items: flex-end; }
.talk .nm { font-size: 11px; color: #fff; padding-left: 4px; }
.talk .bb { background: #fff; color: var(--talk-text); padding: 8px 12px; border-radius: 14px; border-top-left-radius: 4px; font-size: 15px; line-height: 1.5; white-space: pre-line; word-break: keep-all; overflow-wrap: anywhere; }
.talk .msg.me .bb { background: var(--talk-me); border-top-left-radius: 14px; border-top-right-radius: 4px; }
.talk .tm { font-size: 10px; color: rgba(255,255,255,.9); flex: none; line-height: 1; padding-bottom: 4px; white-space: nowrap; }
.talk .tm .read { display: block; }
.talk-cap { font-size: var(--fs-13); color: var(--text-2); margin-top: var(--sp-2); }

/* 付箋（できること・小さな注意） */
.notes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4) var(--sp-3); padding: 6px 4px; }
.note { position: relative; background: var(--paper); border-radius: 3px; padding: 22px 14px 14px; box-shadow: 0 3px 8px rgba(60, 40, 0, .12); transform: rotate(-1.2deg); min-height: 110px; }
.note:nth-child(even) { transform: rotate(1deg); background: var(--paper-2); }
.note::before { content: ""; position: absolute; top: -8px; left: 50%; width: 46px; height: 16px; margin-left: -23px; background: rgba(255,255,255,.55); border: 1px solid rgba(0,0,0,.05); transform: rotate(-3deg); }
.note h3 { font-size: var(--fs-16); line-height: 1.4; margin-bottom: 4px; }
.note p { font-size: var(--fs-13); line-height: 1.55; color: var(--text-2); }
.note.wide { grid-column: 1 / -1; min-height: 0; }
@media (min-width: 768px) { .notes { grid-template-columns: repeat(3, 1fr); } }

/* 写真風の枠（ヒーロー画像） */
.polaroid { width: min(300px, 88%); margin: var(--sp-5) auto var(--sp-4); background: #fff; padding: 10px 10px 12px; border-radius: 3px; box-shadow: 0 6px 18px rgba(0,0,0,.14); transform: rotate(-2deg); position: relative; }
.polaroid img { width: 100%; height: auto; border-radius: 2px; background: #FBF3E4; }
.polaroid figcaption { text-align: center; font-size: var(--fs-13); color: #5C6166; margin-top: 8px; }
.polaroid::after { content: ""; position: absolute; top: -10px; right: 22px; width: 52px; height: 18px; background: rgba(255, 236, 150, .75); transform: rotate(6deg); }

/* レシート（数字をそのまま並べない） */
.receipt { background: #fff; color: #1F2328; width: min(320px, 100%); margin: 0 auto; padding: var(--sp-4) var(--sp-4) var(--sp-5); box-shadow: var(--shadow-1); position: relative; border-radius: 3px 3px 0 0; }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: radial-gradient(circle at 8px 0, #fff 6px, transparent 6.5px) 0 0 / 16px 8px repeat-x; }
.receipt .rt { text-align: center; font-weight: 700; letter-spacing: .1em; border-bottom: 1px dashed #B8B2A8; padding-bottom: 8px; margin-bottom: 8px; font-size: var(--fs-13); }
.receipt dl { margin: 0; }
.receipt .rl { display: flex; align-items: baseline; gap: 6px; font-size: var(--fs-14); padding: 5px 0; }
.receipt .rl dt { flex: none; max-width: 60%; line-height: 1.4; }
.receipt .rl .dots { flex: 1; border-bottom: 1px dotted #B8B2A8; transform: translateY(-5px); min-width: 12px; }
.receipt .rl dd { margin: 0; flex: none; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.receipt .rf { border-top: 1px dashed #B8B2A8; margin-top: 8px; padding-top: 8px; font-size: var(--fs-12); color: #5C6166; text-align: center; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .receipt { background: #F5F1E8; } }

/* 分担表（あなた／家族） */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); align-items: stretch; }
.split .col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-3); }
.split .who { font-size: var(--fs-13); font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.split ol { counter-reset: s; }
.split ol li { counter-increment: s; display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-14); line-height: 1.5; padding: 5px 0; }
.split ol li::before { content: counter(s); flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.split .nothing { text-align: center; }
.split .nothing strong { display: block; font-size: var(--fs-20); color: var(--brand); line-height: 1.3; margin: 2px 0 6px; white-space: nowrap; }
.split .stamp { --stamp-w: 112px; }

/* 手紙（運営からひとこと） */
.letter { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: var(--sp-5) var(--sp-4) var(--sp-4); box-shadow: var(--shadow-1); }
.letter::before { content: ""; position: absolute; top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 28px 28px 0; border-color: transparent var(--bg) var(--surface-2) transparent; }
.letter p { margin-bottom: var(--sp-3); }
.letter p:last-of-type { margin-bottom: 0; }
.letter .sign { display: block; text-align: right; font-size: var(--fs-13); color: var(--text-2); margin-top: var(--sp-3); }
.letter .with { display: flex; gap: var(--sp-3); align-items: center; margin-bottom: var(--sp-3); }
.letter .with .gau { flex: none; }
.letter .with p { font-size: var(--fs-13); color: var(--text-2); margin: 0; }

/* 比較（小さな表。375pxに収める: 1列目 7em＋4列） */
.cmp { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; table-layout: fixed; }
.cmp th, .cmp td { padding: 10px 2px; border-bottom: 1px solid var(--border); text-align: center; font-size: var(--fs-12); line-height: 1.3; vertical-align: middle; }
.cmp th:first-child, .cmp td:first-child { text-align: left; padding-left: 10px; width: 7.9em; font-size: var(--fs-13); word-break: keep-all; overflow-wrap: anywhere; }
.cmp thead th { background: var(--surface-2); font-weight: 700; }
.cmp thead th.is-us { background: var(--brand-soft); color: var(--brand); }
.cmp td.is-us { background: rgba(29,122,95,.07); }
.cmp tr:last-child td { border-bottom: 0; }
.cmp .ok { display: inline-block; width: 15px; height: 15px; border: 2.5px solid var(--brand); border-radius: 50%; vertical-align: middle; }
.cmp .so { color: var(--text-2); font-weight: 700; font-size: var(--fs-16); }
.cmp .ng { color: var(--text-3); font-weight: 700; font-size: var(--fs-16); }

/* 料金（LP用の短い表: プラン／月額／人数／アイテム） */
.price-mini { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.price-mini th, .price-mini td { padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: var(--fs-14); text-align: right; white-space: nowrap; }
.price-mini th:first-child, .price-mini td:first-child { text-align: left; font-weight: 700; }
.price-mini thead th { background: var(--surface-2); font-size: var(--fs-12); font-weight: 700; color: var(--text-2); }
.price-mini tr:last-child td { border-bottom: 0; }
.price-mini .yen { font-variant-numeric: tabular-nums; font-weight: 700; }
.price-mini .yen small { font-weight: 500; color: var(--text-2); font-size: var(--fs-12); }
.free-box { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-3); align-items: center; background: var(--brand-soft); border-radius: var(--r-lg); padding: var(--sp-4); }
.free-box .big { font-size: var(--fs-28); font-weight: 700; color: var(--brand); line-height: 1; white-space: nowrap; }
.free-box .big small { font-size: var(--fs-14); font-weight: 700; }
.free-box ul li { font-size: var(--fs-14); line-height: 1.6; }

/* ステップ（v2: 点線でつなぐ・スタンプを横に添えられる） */
.steps.v2 .step { position: relative; padding-bottom: var(--sp-4); }
.steps.v2 .step + .step { margin-top: 0; }
.steps.v2 .step:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 36px; bottom: 0; border-left: 2px dotted var(--border); }
.steps.v2 .step-side { margin-left: auto; flex: none; --stamp-w: 104px; }
.steps.v2 .step p { font-size: var(--fs-14); }

/* ログイン後: 空・完了・上限の瞬間（ここだけスタンプ可） */
.moment { text-align: center; padding: var(--sp-6) var(--sp-4) var(--sp-5); }
.moment .stamp { --stamp-w: 160px; margin-bottom: var(--sp-2); }
.moment h3 { margin-bottom: var(--sp-2); }
.moment p { color: var(--text-2); margin-bottom: var(--sp-4); }
.moment.is-done { background: var(--paper); border-radius: var(--r-lg); }
.limit { display: flex; gap: var(--sp-3); align-items: center; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--warn); border-radius: var(--r-md); padding: var(--sp-3); margin-bottom: var(--sp-3); }
.limit .stamp { --stamp-w: 72px; margin: 0; flex: none; }
.limit p { font-size: var(--fs-14); line-height: 1.5; }
.limit p strong { display: block; }

/* 下部CTA帯（公開側末尾）にスタンプを横に */
.band .cta-row { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-3); align-items: center; text-align: left; }
.band .cta-row .stamp { --stamp-w: 104px; margin: 0; }

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

/* パンくず（SEO 2026-10-20） */
.crumbs { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0 0 var(--sp-3); font-size: var(--fs-13); color: var(--text-2); }
.crumbs li + li::before { content: "›"; margin: 0 6px; }
.crumbs a { color: inherit; }

/* 追加の決定7（2026-10-21）: 375px幅では、本文が3行を超えるカード・付箋は1列にする（2列だと幅が狭く語の途中で改行するため）。
   2列に並べてよいのは見出しだけの短いカード＝ .is-short を付けたものに限る */
@media (max-width: 480px) {
  .notes { grid-template-columns: 1fr; }
  .notes.is-short { grid-template-columns: 1fr 1fr; }
  .note { min-height: 0; }
  .arts { grid-template-columns: 1fr; }
  .arts.is-short { grid-template-columns: 1fr 1fr; }
}

/* ---------- 20. v4（2026-10-21 差し戻し対応）: ロゴ画像・線のアイコン・テーマ切替 ----------
   オーナー確定: 画面のアイコンは「線のアイコン」（細い線・色は currentColor・塗りなし。Lucide系統）。絵文字のアイコンは全廃。
   使い方: _template.html 先頭のスプライト <symbol id="i-xxx"> を <svg class="i"><use href="#i-xxx"/></svg> で呼ぶ。 */
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

/* ロゴ＝今のサイトと同じかごの画像（favicon-64x64 を 28px で）＋文字 */
.logo img { width: 28px; height: 28px; flex: none; border-radius: 50%; }
.logo span { white-space: nowrap; }
.header-right { gap: 0; }
@media (max-width: 400px) { .header .btn-header { padding: 0 10px; } .header-inner { padding: 0 var(--sp-2) 0 var(--sp-4); } }
.footer .logo { color: var(--text); }
.footer .logo:hover { text-decoration: underline; }

/* 線のアイコン（24pxグリッド） */
.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }
.i-sm { width: 18px; height: 18px; }
.i-xs { width: 16px; height: 16px; }
.i-lg { width: 32px; height: 32px; stroke-width: 1.5; }
.i-xl { width: 40px; height: 40px; stroke-width: 1.5; }
.i-brand { color: var(--brand); }
.i-accent { color: var(--accent); }
.i-muted { color: var(--text-3); }
.i-fill { fill: currentColor; stroke: none; } /* LINEのマークなどブランドの印だけ */
.btn .i { width: 20px; height: 20px; }
.icon-btn .i { width: 24px; height: 24px; }
.drawer-item .i { width: 22px; height: 22px; color: var(--text-2); }
.hero-pts .i { color: var(--brand); }
/* 付箋・カードの先頭アイコン（絵文字の .ico の代わり） */
.ico-line { display: inline-flex; align-items: center; justify-content: flex-start; width: auto; height: 28px; background: none; color: var(--brand); margin-bottom: 6px; } /* オーナー指定：線のアイコンのみ・台座なし */
.ico-line .i { width: 26px; height: 26px; }
.note .ico-line { background: none; }
.list-icon li { display: flex; align-items: center; gap: 10px; }
.list-icon .i { color: var(--brand); width: 22px; height: 22px; }

/* テーマ切替（ヘッダー右・ドロワー）。44px・aria-pressed＝ダークがON。
   html[data-mode] は JS が「いま効いている配色」を入れる（端末設定のときも入る）。html[data-theme] は利用者が選んだときだけ。 */
.theme-btn { position: relative; }
.theme-btn .i-sun, .theme-btn .i-moon { position: absolute; }
.theme-btn .i-moon { display: none; }
html[data-mode="dark"] .theme-btn .i-sun { display: none; }
html[data-mode="dark"] .theme-btn .i-moon { display: block; }
.theme-btn[aria-pressed="true"] { color: var(--brand); }
.drawer-item.theme-row { justify-content: flex-start; width: 100%; text-align: left; position: static; }
.drawer-item.theme-row .i-sun, .drawer-item.theme-row .i-moon { position: static; }
.drawer-item.theme-row .lbl-dark, html[data-mode="dark"] .drawer-item.theme-row .lbl-light { display: none; }
html[data-mode="dark"] .drawer-item.theme-row .lbl-dark { display: inline; }
.drawer-item.theme-row .state { margin-left: auto; font-size: var(--fs-12); color: var(--text-3); }

/* 利用者の声（引用）。星は文字の★（絵文字ではない） */
.voice blockquote { margin: 0; }
.voice .stars { color: var(--accent); letter-spacing: .05em; font-size: var(--fs-14); }

/* ダークでの手当て: 写真枠・レシートは紙なので白のまま。付箋の先頭アイコンは濃い地に合わせる */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .note .ico-line { background: none; } }
:root[data-theme="dark"] .note .ico-line { background: none; }

/* 文中のアイコン（Opus 2026-10-21）：文字との間をあけ、行の高さにそろえる */
:where(p, li, td, th, dd, small, strong, em, label) > svg.i { margin-inline-end: .3em; vertical-align: -0.15em; }
/* 「できない」を表す × は注意の色 */
svg.i:has(> use[href="#i-close"]) { color: var(--danger); }

/* よく読まれている記事（番号つき） */
.popular { counter-reset: pop; }
.popular li { counter-increment: pop; display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); min-height: 44px; }
.popular li:last-child { border-bottom: 0; }
.popular li::before { content: counter(pop); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.popular li:nth-child(n+4)::before { background: var(--surface-2); color: var(--text-2); }
.popular a { color: var(--text); font-weight: 500; line-height: 1.6; }

/* 2026-10-25 オーナー指示: 公開ページの見出し（h2）に、文字の下 1/3 ほどのマーカー線を引いて、本文の太字と見分ける。
   下線（text-decoration）で描くので、見出しが2行に折り返しても行ごとに線が引かれ、DBの記事本文の h2 にもそのまま効く。 */
body:not(.has-tabbar):not(.liff) h2:not(.h3) {
  text-decoration-line: underline;
  text-decoration-color: var(--paper-2);
  text-decoration-thickness: .34em;
  text-underline-offset: -.32em;
  text-decoration-skip-ink: none;
}
body:not(.has-tabbar):not(.liff) h2 .num { display: inline-block; text-decoration: none; margin-right: .3em; }
