:root {
  /* 「お金の国」テーマ: ゴールド×オレンジの派手めパレット */
  --bg: #fff6e3;              /* あたたかいゴールドクリーム */
  --surface: #ffffff;
  --text: #3d2f23;
  --muted: #a3907a;
  --border: #f2e2c4;
  --accent: #ff9214;          /* メイン＝ビビッドオレンジ */
  --accent-deep: #e07800;
  --accent-weak: #fff1d6;
  --gold: #ffce3a;            /* 金貨ゴールド */
  --gold-deep: #d9a916;
  --trip: #ff6b8a;            /* 旅行・イベント＝ピンク */
  --trip-weak: #ffe3ea;
  --warn: #ffbe0b;            /* 注意＝イエロー */
  --warn-weak: #fff3cd;
  --pos: #1f8a5b;
  --neg: #e0483a;
  --radius: 16px;
  --shadow: 0 3px 16px rgba(160,110,20,0.10);
}

* { box-sizing: border-box; }

/* アプリ自体を背景化: 外側背景の露出とオーバースクロール／ピンチズームの余白を無くす。 */
html { height: 100%; overscroll-behavior: none; }

body {
  margin: 0;
  min-height: 100%;
  overscroll-behavior: none;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; }

/* グローバルの appbar は非表示（ダッシュボードの挨拶カードがヘッダー役） */
.appbar { display: none; }

main {
  max-width: 820px;
  margin: 18px auto 40px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

h1 { font-size: 22px; margin: 4px 0 12px; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 14px 0 8px; color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.muted { color: var(--muted); font-size: 13px; }
.spacer { flex: 1; }

/* フォーム */
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 12px; color: var(--muted); }
input, select {
  font: inherit;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfbf9;
}
input:focus, select:focus { outline: 2px solid var(--accent-weak); border-color: var(--accent); }
input.grow { flex: 1; min-width: 140px; }
input.price { width: 110px; }

/* 日付入力: iOS Safari のネイティブ装飾（内側の枠/影・値のはみ出し）を消して
   指定した枠にきちんと収める。値は中央寄せ・高さは他の入力とそろえる。 */
input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  min-height: calc(1.6em + 20px);
  text-align: center;
  line-height: 1.2;
}
input[type="date"]::-webkit-date-and-time-value { text-align: center; margin: 0; }
input[type="date"]::-webkit-datetime-edit { padding: 0; }
input[type="date"]::-webkit-calendar-picker-indicator { margin-left: 6px; }

button {
  font: inherit;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
button:hover { background: #f5f4ef; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); border-radius: 999px; font-weight: 700; }
button.primary:hover { filter: brightness(1.06); background: var(--accent); }
.link-btn { border: none; background: none; color: var(--accent); padding: 4px 6px; }
.link-btn:hover { background: none; text-decoration: underline; }

/* プロジェクトカード */
.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.trip-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 6px; position: relative; transition: transform .12s, box-shadow .12s; }
.trip-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(31,60,45,0.10); }
.proj-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.proj-icon.trip { background: var(--trip-weak); }
.proj-icon.daily { background: var(--accent-weak); }
.proj-tag { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.proj-tag.trip { background: var(--trip-weak); color: var(--trip); }
.proj-tag.daily { background: var(--accent-weak); color: var(--accent-deep); }
.trip-title { font-weight: 700; font-size: 16px; margin-top: 4px; }
.trip-total { font-size: 22px; font-weight: 800; color: var(--accent-deep); }

/* アバター（メンバー） */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.avatars { display: flex; }
.avatars .avatar { border: 2px solid #fff; margin-left: -8px; }
.avatars .avatar:first-child { margin-left: 0; }

/* プロジェクト詳細ヘッダー（種類で色分け：旅行=珊瑚 / 日常=緑） */
.trip-header { position: relative; border-radius: var(--radius); padding: 18px 20px 20px; color: #fff; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "back back" "main album"; align-items: end; column-gap: 12px;
  background: linear-gradient(135deg, #2bb074, var(--accent-deep)); box-shadow: var(--shadow); }
.trip-header.trip { background: linear-gradient(135deg, #ef9b76, #e07248); }
.trip-header .back { grid-area: back; font-size: 13px; color: rgba(255,255,255,0.92); text-decoration: none; margin-bottom: 6px; }
.trip-header-main { grid-area: main; }
.trip-header h1 { margin: 4px 0 2px; color: #fff; }
.trip-header .muted { color: rgba(255,255,255,0.9); }
.album-open-btn { grid-area: album; align-self: center; background: #fff; color: var(--text); border: none; border-radius: 999px; padding: 9px 16px; font-weight: 700; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.album-open-btn:hover { filter: brightness(0.98); }

.members { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.member-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.member-name { font-weight: 600; min-width: 80px; }
.member-name-input { flex: 1; min-width: 110px; font-weight: 600; }
.weight-input { width: 64px; }
.link-btn.danger { color: var(--neg); }

/* プロジェクト詳細：下部タブバー＋タブ単位の表示 */
.detail { display: flex; flex-direction: column; gap: 16px; padding-bottom: 88px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: #fff;
  border-top: 1px solid var(--border); box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  display: flex; justify-content: center; gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.tabbar-item { border: none; background: none; cursor: pointer; flex: 0 0 auto; width: 72px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; color: var(--muted); padding: 6px 4px; border-radius: 14px; }
.tabbar-item:hover { background: #f5f4ef; }
.tabbar-item .ti-ico { font-size: 19px; line-height: 1; }
.tabbar-item.active { color: var(--accent-deep); background: var(--accent-weak); font-weight: 700; }
.weight-mini { width: 48px; margin-left: 4px; padding: 2px 4px; }
.override-wrap { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 月次予算バー */
.budget-bar { height: 12px; background: #efeee7; border-radius: 999px; overflow: hidden; margin: 6px 0 12px; }
.budget-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.budget-fill.over { background: var(--neg); }

/* 繰り返し支出 */
.recurring-list { list-style: none; margin: 0 0 12px; padding: 0; }
.recurring-list li { padding: 6px 0; border-bottom: 1px solid #f0f0ee; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.recurring-list li:last-child { border-bottom: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { background: var(--accent-weak); color: var(--accent); border-radius: 999px; padding: 3px 12px; font-size: 13px; }
.chip.sm { background: #f1f0eb; color: var(--muted); padding: 2px 8px; font-size: 12px; }

/* 集計テーブル */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.table td { padding: 6px 8px; border-bottom: 1px solid #f0f0ee; }
.table td.pos { color: var(--pos); font-weight: 600; }
.table td.neg { color: var(--neg); font-weight: 600; }
.settle { margin: 4px 0 0; padding-left: 18px; }
.settle li { margin: 2px 0; }

/* レシート明細フォーム */
.item-rows { display: flex; flex-direction: column; gap: 8px; }
.item-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px; background: #fafafa; border: 1px solid var(--border); border-radius: 8px; }
/* 負担者をトグルチップで選ぶ（✓＝選択中は緑） */
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check { font-size: 13px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; background: #f1f0ea; color: var(--muted); cursor: pointer; border: 1px solid transparent; }
.check input[type=checkbox] { display: none; }
.check:has(input:checked) { background: var(--accent-weak); color: var(--accent-deep); border-color: var(--accent); font-weight: 600; }
.check:has(input:checked)::before { content: '✓'; font-weight: 800; }

/* レシート一覧 */
.receipt { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0ee; }
.receipt:last-child { border-bottom: none; }
.receipt-body { flex: 1; min-width: 0; }
.receipt-thumb { width: 56px; height: 56px; flex: 0 0 56px; object-fit: cover; border-radius: 8px; background: #f1f0eb; cursor: pointer; }
.receipt-thumb.placeholder { display: flex; align-items: center; justify-content: center; font-size: 26px; cursor: default; }
.receipt-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.items { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.items li { margin: 2px 0; }
.items .share { color: var(--muted); font-size: 12px; }

.status { display: inline-block; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.status.err { background: #fcebeb; color: var(--neg); }

/* 写真プレビュー */
.preview { max-width: 240px; max-height: 180px; border-radius: 8px; margin-top: 4px; }

/* タブ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tab { border: none; background: none; padding: 8px 16px; border-radius: 0; border-bottom: 2px solid transparent; color: var(--muted); }
.tab:hover { background: none; color: var(--text); }
.tab.active { color: var(--accent-deep); border-bottom-color: var(--accent); font-weight: 700; }

/* 挨拶ヘッダー */
.greeting { display: flex; align-items: center; gap: 12px; }
.greeting .leaf { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-weak); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.greeting-text { flex: 1; }
.greeting-text strong { font-size: 17px; }
.greeting .me-avatar { width: 38px; height: 38px; font-size: 14px; }

/* 5タブ・ナビ */
.nav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.nav-item { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #f1f0ea; color: var(--text); border: none; font-size: 13px; font-weight: 600; cursor: pointer; }
.nav-item:hover { background: #e9e7df; }
.nav-item.active { background: var(--accent-deep); color: #fff; }

/* 残高ヒーローカード */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 22px 24px; color: #fff;
  background: linear-gradient(135deg, #2bb074, var(--accent-deep)); box-shadow: 0 8px 24px rgba(21,131,79,0.22); }
.hero::after { content: ''; position: absolute; right: -30px; top: -30px; width: 150px; height: 150px; border-radius: 999px; background: rgba(255,255,255,0.08); }
.hero-label { font-size: 13px; opacity: .9; }
.hero-amount { font-size: 40px; font-weight: 800; margin: 2px 0 10px; letter-spacing: .5px; }
.hero-stats { display: flex; gap: 18px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-stat { font-size: 13px; }
.hero-stat .k { display: block; opacity: .85; font-size: 11px; }
.hero-stat .v { font-weight: 700; font-size: 15px; }
.hero-stat + .hero-stat { border-left: 1px solid rgba(255,255,255,0.25); padding-left: 18px; }

/* セクション見出し＋作成ボタン */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.section-head h2 { margin: 0; }

/* レシート読取バナー */
.scan-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--accent-weak); margin-bottom: 12px; }
.scan-banner .scan-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-deep); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; flex: 0 0 auto; }
.scan-banner .scan-text { flex: 1; min-width: 0; }
.scan-banner .scan-text strong { display: block; font-size: 14px; }
.scan-banner .scan-text .muted { font-size: 12px; }

/* 支払いの内訳（横バー） */
.paybars { display: flex; flex-direction: column; gap: 10px; }
.paybar-row { display: flex; align-items: center; gap: 10px; }
.paybar-track { flex: 1; height: 14px; background: #efeee7; border-radius: 999px; overflow: hidden; }
.paybar-fill { height: 100%; border-radius: 999px; }
.paybar-val { font-weight: 700; font-size: 13px; min-width: 72px; text-align: right; }

/* 精算行（アバター付き） */
.settle { list-style: none; margin: 6px 0 0; padding: 0; }
.settle li { display: flex; align-items: center; gap: 6px; padding: 6px 0; }
.settle .arrow { color: var(--muted); }
.settle .amt { margin-left: auto; font-weight: 700; color: var(--accent-deep); }

/* 認証・グループ */
.auth-wrap { max-width: 420px; margin: 40px auto; }
.auth-card h2 { font-size: 20px; }
.auth-legal { margin: 12px 0 0; font-size: 12px; line-height: 1.6; }
.auth-action-link { display: inline-block; margin-top: 12px; text-decoration: none; }
.userbar { padding: 4px 0; }
.group-list { list-style: none; margin: 0 0 12px; padding: 0; }
.group-list li { padding: 6px 0; border-bottom: 1px solid #f0f0ee; font-size: 14px; }
.group-list li:last-child { border-bottom: none; }
.invite { background: var(--accent-weak); color: var(--accent); padding: 1px 8px; border-radius: 6px; font-size: 13px; user-select: all; }

/* TimeTree風の家計簿スペース切替。全タブの同じ位置に固定し、選択状態を共有する。 */
.space-switcher {
  position: absolute;
  z-index: 2600;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
}
.space-select,
.quick-space-select {
  max-width: 230px;
  border: 1px solid rgba(90, 70, 35, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #352d24;
  box-shadow: 0 5px 18px rgba(55, 42, 20, .13);
  padding: 8px 30px 8px 13px;
  font-weight: 800;
  font-size: 12px;
}
.theme-kids .space-select {
  background: rgba(255, 250, 225, .95);
  border: 2px solid rgba(135, 96, 20, .35);
  color: #5b421a;
}
.af-place-detected {
  display: block;
  min-height: 18px;
  margin: -2px 0 8px;
  color: #24784d;
  font-size: 12px;
  font-weight: 700;
}
.card-group { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 思い出写真グリッド */
.row.between { justify-content: space-between; align-items: center; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.photo-item { position: relative; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--border); }
.photo-thumb { width: 100%; height: 130px; object-fit: cover; display: block; background: #f1f0eb; cursor: pointer; }
.photo-del { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 999px; border: none; background: rgba(0,0,0,0.55); color: #fff; font-size: 13px; cursor: pointer; line-height: 1; }
.photo-del:hover { background: rgba(0,0,0,0.8); }
.photo-cap { padding: 6px 8px 0; font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-link { padding: 2px 8px 8px; font-size: 11px; color: var(--accent-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 地図 */
.map { height: 360px; border-radius: 10px; overflow: hidden; }

/* 場所ピッカー（地図でピンを刺す） */
.picker-overlay { position: fixed; inset: 0; z-index: 2500; background: var(--bg); }
.picker-map { position: absolute; inset: 0; }
.picker-search { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 2; }
.picker-search-row { display: flex; gap: 8px; }
.picker-input { flex: 1; background: #fff; border-radius: 12px; padding: 11px 14px; box-shadow: var(--shadow); }
.picker-search .primary { box-shadow: var(--shadow); }
.picker-results { margin-top: 8px; background: #fff; border: 1px solid var(--border); border-radius: 12px; max-height: 46vh; overflow: auto; box-shadow: var(--shadow); }
.picker-result { padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.picker-result:last-child { border-bottom: none; }
.picker-result:hover { background: var(--accent-weak); }
.picker-result-name { font-weight: 700; font-size: 14px; }
.picker-result-detail { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-loc { position: absolute; right: 16px; bottom: 168px; z-index: 2; background: #fff; border-radius: 999px; padding: 10px 16px; font-weight: 700; color: var(--accent-deep); box-shadow: var(--shadow); }
.picker-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; background: #fff; border-radius: 18px 18px 0 0; padding: 16px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 12px rgba(0,0,0,0.12); }
.picker-tag { font-size: 12px; font-weight: 800; color: var(--accent-deep); }
.picker-name { font-size: 18px; font-weight: 800; margin: 2px 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-bar { display: flex; gap: 12px; }
.picker-bar button { flex: 1; padding: 13px; border-radius: 12px; }

/* グラフ */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.chart-box { min-width: 0; }

/* 詳細モーダル */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 1000; }
.modal { background: #fff; border-radius: 12px; max-width: 420px; width: 100%; max-height: 90vh; overflow: auto; position: relative; }
.modal-photo { width: 100%; max-height: 240px; object-fit: cover; display: block; background: #f1f0eb; }
.modal-photo.placeholder { display: flex; align-items: center; justify-content: center; height: 160px; font-size: 48px; }
.modal-close { position: absolute; top: 8px; right: 8px; background: #fff; border: 1px solid var(--border); border-radius: 999px; width: 32px; height: 32px; padding: 0; line-height: 1; }
.modal-body { padding: 14px 18px 18px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head strong { font-size: 17px; }
.modal-meta { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.modal-total { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 10px; font-size: 16px; }

/* スマホ対応 */
@media (max-width: 600px) {
  .appbar { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 16px; }
  main { margin: 12px auto; padding: 0 12px; gap: 12px; }
  .card { padding: 14px 16px; }
  h1 { font-size: 20px; }

  /* フォームは縦積み・入力欄は全幅 */
  .row { gap: 8px; }
  .field { flex: 1 1 100%; }
  .field input, .field select { width: 100%; }
  .row > input, .row > button, .row > select { flex: 1 1 100%; }
  input.grow, input.price { flex: 1 1 100%; width: 100%; }
  .item-row { gap: 6px; }
  .checks { gap: 6px 14px; }

  /* 集計テーブルを詰める */
  .table { font-size: 13px; }
  .table th, .table td { padding: 5px 4px; }

  .trip-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .charts { grid-template-columns: 1fr; }
  .map { height: 300px; }

  .overlay { padding: 10px; }
  .tab { padding: 8px 12px; }
}

/* ===== 思い出アルバム（スクラップブック・ビューア） ===== */
.album-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: #2b2925;
  display: flex; flex-direction: column;
}
.album-top {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: rgba(0,0,0,0.25);
  color: #fff; flex: 0 0 auto;
}
.album-close { background: none; border: none; color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.album-title { flex: 1; text-align: center; font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-top-spacer { width: 56px; }

/* ページ送り（横スクロール＋スナップ） */
.album-pages {
  flex: 1; min-height: 0;
  display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.album-pages::-webkit-scrollbar { display: none; }
.album-loading { margin: auto; color: #cfcabd; }

.album-page {
  flex: 0 0 100%; width: 100%; height: 100%;
  scroll-snap-align: center; scroll-snap-stop: always;
  position: relative; overflow: hidden;
}

/* 記録ページ（台紙クリーム） */
.album-leaf {
  background: #fbf8f1;
  display: flex; flex-direction: column;
  padding: 20px; max-width: 760px; margin: 0 auto;
}
.album-area { position: relative; flex: 1; min-height: 0; margin: 0 auto; width: 100%; max-width: 520px; }
.album-slot { position: absolute; padding: 6px; display: flex; align-items: center; justify-content: center; }
/* 白フチのプリント */
.album-print {
  max-width: 100%; max-height: 100%;
  background: #fff; padding: 8px; border-radius: 3px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.22);
  display: flex;
}
.album-img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; display: block; background: #efeae0; }

/* 写真なしページ */
.album-textcard {
  position: absolute; inset: 6px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid #e7e1d4; border-radius: 12px;
}
.album-cat-icon { font-size: 72px; }

.album-footer { flex: 0 0 auto; padding-top: 14px; }
.album-meta-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.album-place { font-size: 18px; font-weight: 800; color: #2b2925; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-amount { font-size: 19px; font-weight: 800; color: var(--accent); }
.album-date { font-size: 12px; color: #8a857a; margin-top: 2px; }
.album-caption { font-size: 15px; font-style: italic; color: #2b2925; margin-top: 8px; }

/* 表紙 */
.album-cover { background: #3a3a3a; }
.album-cover-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.album-cover-plain { background: linear-gradient(135deg, #4b4690, #2b2925); }
.album-cover-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.32); display: flex; align-items: center; justify-content: center; padding: 24px; }
.album-cover-plate { border: 2px solid rgba(255,255,255,0.85); padding: 28px 30px; text-align: center; max-width: 80%; }
.album-cover-title { font-size: 30px; font-weight: 800; color: #fff; letter-spacing: 1px; }
.album-cover-subtitle { font-size: 14px; color: #fff; margin-top: 12px; font-weight: 600; letter-spacing: 2px; }

/* ナビ */
.album-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 999px; border: none;
  background: rgba(0,0,0,0.45); color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 5;
}
.album-nav:hover { background: rgba(0,0,0,0.65); }
.album-nav.prev { left: 12px; }
.album-nav.next { right: 12px; }
.album-counter {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.55); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px; z-index: 5;
}

@media (max-width: 600px) {
  .album-nav { display: none; }
  .album-leaf { padding: 16px; }
  .album-cover-title { font-size: 24px; }
}

/* ===== マネコのステージ（3Dキャラクター） ============================ */
.stage-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: linear-gradient(180deg, #bfe3f7 0%, #dff0fb 45%, #eaf6ea 100%);
}
.stage-holder { position: relative; height: 420px; }
.stage-canvas { position: absolute; inset: 0; }
.stage-canvas canvas { display: block; width: 100%; height: 100%; cursor: pointer; }
.stage-name {
  position: absolute;
  left: 14px; bottom: 12px;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #4a3b30;
  pointer-events: none;
}
.stage-bubble {
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  max-width: 78%;
  background: #fff;
  border: 2px solid #4a3b30;
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #35302a;
  box-shadow: 0 3px 10px rgba(40,40,30,0.12);
  transition: opacity 0.25s;
  z-index: 3;
  pointer-events: none;
}
.stage-bubble::after {
  content: "";
  position: absolute;
  bottom: -10px; left: 50%;
  margin-left: -8px;
  border: 8px solid transparent;
  border-top-color: #4a3b30;
  border-bottom: 0;
}
.stage-bubble.hidden { opacity: 0; }
.stage-bubble.pop { animation: bubble-pop 0.25s ease-out; }
@keyframes bubble-pop {
  0% { transform: translateX(-50%) scale(0.7); }
  70% { transform: translateX(-50%) scale(1.06); }
  100% { transform: translateX(-50%) scale(1); }
}

/* マネコの気づきチップ */
.tips { display: flex; flex-wrap: wrap; gap: 8px; }
.tip {
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: #fff;
}
.tip.warn { background: var(--warn-weak); border-color: #e8d3a0; }
.tip.ok { background: var(--accent-weak); border-color: #bfe0cd; }
.tip.info { background: #eef4fb; border-color: #d3e2f2; }

.center { text-align: center; }
button.big-add { font-size: 16px; padding: 13px 26px; border-radius: 999px; }

/* 最近の買い物 */
.recent-list { display: flex; flex-direction: column; gap: 8px; }
.recent-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fbfbf9;
  cursor: pointer;
}
.recent-row:hover { background: var(--accent-weak); }
.recent-icon { font-size: 22px; }
.recent-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.recent-store { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-total { font-weight: 700; color: var(--accent-deep); }

/* カレンダー */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cal-head h2 { margin: 0; }
.cal-nav { padding: 4px 12px; border-radius: 999px; font-size: 16px; }
.cal-month-total { font-weight: 700; color: var(--accent-deep); font-size: 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-w { text-align: center; font-size: 12px; color: var(--muted); padding: 2px 0; }
.cal-cell {
  position: relative; /* 収入マーク(.cal-inc-dot)の基準 */
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 2px;
  min-height: 52px;
  padding: 4px 2px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.cal-cell.has { background: var(--accent-weak); }
.cal-cell.today { outline: 2px solid var(--accent); }
.cal-d { font-size: 12px; color: var(--text); }
.cal-t { font-size: 10px; color: var(--accent-deep); font-weight: 700; word-break: keep-all; }
.cal-detail { margin-top: 12px; }
.cal-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 7px 10px;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.chart-box.wide { max-width: 100%; }

@media (max-width: 600px) {
  .stage-holder { height: 300px; }
  .cal-cell { min-height: 44px; }
  .cal-t { font-size: 9px; }
}

/* ===== 派手化: お金の国テーマの上書き ================================= */
body {
  background:
    radial-gradient(circle at 12% 8%, rgba(255,206,58,0.14) 0 90px, transparent 90px),
    radial-gradient(circle at 88% 30%, rgba(255,146,20,0.10) 0 120px, transparent 120px),
    radial-gradient(circle at 22% 80%, rgba(255,107,138,0.08) 0 100px, transparent 100px),
    var(--bg);
  background-attachment: fixed;
}

/* 今月の支出ヒーロー: ゴールドグラデ＋金貨 */
.hero {
  background: linear-gradient(135deg, #ffc02e 0%, #ff9214 55%, #ff7a3d 100%) !important;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "🪙";
  position: absolute;
  font-size: 110px;
  right: -14px; top: -22px;
  opacity: 0.28;
  transform: rotate(18deg);
}
.hero::after {
  content: "✨";
  position: absolute;
  font-size: 36px;
  left: 12px; bottom: 8px;
  opacity: 0.6;
}

/* タブの選択状態をゴールドに */
.nav-item.active {
  background: linear-gradient(135deg, #ffd44d, #ffab2e) !important;
  color: #4a3410 !important;
  border-color: #eab53a !important;
  box-shadow: 0 2px 8px rgba(230,160,30,0.35);
}

/* ステージ背景をもっとドラマチックに（空→金色の地平線） */
.stage-card {
  background: linear-gradient(180deg, #8fd3ff 0%, #cfeeff 38%, #ffe9a8 62%, #ffd97a 100%);
}

/* きろく（クイック記録）フォーム */
.quick-card { border: 2px solid var(--gold); }
.quick-amount-row {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 10px 0 14px;
}
.quick-yen { font-size: 34px; font-weight: 800; color: var(--accent-deep); }
input.quick-price {
  font-size: 40px;
  font-weight: 800;
  width: 220px;
  text-align: center;
  border: 2px solid var(--gold);
  border-radius: 14px;
  background: #fffdf4;
  color: var(--text);
}
input.quick-price:focus { outline: 3px solid var(--warn-weak); border-color: var(--accent); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.qchip {
  border-radius: 999px;
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}
.qchip.active {
  background: linear-gradient(135deg, #ffd44d, #ffab2e);
  border-color: #eab53a;
  color: #4a3410;
  font-weight: 700;
}
.stack { display: flex; flex-direction: column; gap: 8px; }

/* 3Dが使えない環境のフォールバック */
.stage-fallback {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
}
.fb-cat { font-size: 96px; animation: fb-bob 2.2s ease-in-out infinite; }
@keyframes fb-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.fb-msg {
  background: #fff;
  border: 2px solid #4a3b30;
  border-radius: 14px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 14px;
}

/* ======================================================================
   2アプリ化（デザイン 2a/3a）: theme-kids「マネコタウン」/ theme-adult「マネコ家計簿」
   デザイントークン: 墨#2E2A24 紙#F7F4EE 金#C99B2E/#E3C56A/#FFD54A 緑#7CC77A→#3E9E6C
   ====================================================================== */
body { font-family: "M PLUS Rounded 1c", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif; }
main { padding-bottom: 130px; } /* 下部ナビのぶん */

/* ---- 下部ナビ（共通ベース・中央=きろく） ---- */
.bnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  display: flex; justify-content: center; align-items: flex-end; gap: 6px;
  padding: 8px 10px calc(12px + env(safe-area-inset-bottom));
}
.bnav-item {
  width: 72px; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700; color: #8C8375; padding: 0;
}
.bnav-ico { font-size: 20px; line-height: 1; }
.bnav-item.center { transform: translateY(-20px); }
.bnav-item.center .bnav-ico {
  width: 62px; height: 62px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800;
  transition: transform .15s;
}
.bnav-item.center:hover .bnav-ico { transform: scale(1.06); }

/* おとな: 白バー＋墨色の＋ボタン */
body.theme-adult .bnav { background: #fff; box-shadow: 0 -6px 20px rgba(60,50,30,.08); }
body.theme-adult .bnav-item.active { color: #C99B2E; }
body.theme-adult .bnav-item.center .bnav-ico { background: #2E2A24; color: #FFD54A; box-shadow: 0 6px 16px rgba(46,42,36,.35); }

/* こども: パステル丸ボタン＋金コインのきろく */
body.theme-kids .bnav { background: rgba(255,253,246,.92); box-shadow: 0 -6px 20px rgba(120,80,10,.12); }
body.theme-kids .bnav-item .bnav-ico {
  width: 50px; height: 50px; border-radius: 999px; border: 3.5px solid #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(120,80,10,.18);
}
body.theme-kids .bnav-item:nth-child(1) .bnav-ico { background: radial-gradient(circle at 35% 30%, #FFE9A8, #FFD54A); }
body.theme-kids .bnav-item:nth-child(2) .bnav-ico { background: radial-gradient(circle at 35% 30%, #BFE3FA, #6FB7E8); }
body.theme-kids .bnav-item:nth-child(4) .bnav-ico { background: radial-gradient(circle at 35% 30%, #FBD0E0, #F06292); }
body.theme-kids .bnav-item:nth-child(5) .bnav-ico { background: radial-gradient(circle at 35% 30%, #D9CDF4, #9B7FD4); }
body.theme-kids .bnav-item.center .bnav-ico {
  width: 74px; height: 74px;
  background: radial-gradient(circle at 35% 28%, #FFE9A8, #FFD54A 55%, #DFA318);
  border: 4px solid #fff; color: #A9750B;
  box-shadow: 0 8px 18px rgba(190,130,20,.4);
  animation: fb-bob 3s ease-in-out infinite;
}
body.theme-kids .bnav-item { color: #7A6647; }
body.theme-kids .bnav-item.active { color: #A9750B; }

/* ---- 初回モード選択 ---- */
.mode-pick { margin-top: 36px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.mode-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 24px 14px; border-radius: 20px; background: #fff; cursor: pointer;
  border: 2.5px solid var(--border); font: inherit; transition: transform .12s;
}
.mode-card:hover { transform: translateY(-3px); }
.mode-emoji { font-size: 46px; }
.mode-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
.mode-kids { border-color: #FFD54A; }
.mode-adult { border-color: #C99B2E; }
.mode-family { border-color: #6FB7E8; }
.mode-personal { border-color: #C99B2E; }
@media (max-width: 600px) { .mode-grid { grid-template-columns: 1fr; } }

/* ======================= こども「マネコタウン」 ======================= */
body.theme-kids { background: linear-gradient(180deg, #FFF3CF, #FFE9B8); }
.kids-scene {
  position: relative; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, #5FB2EE 0%, #A8DCFA 30%, #FFE2A0 50%, #FFD489 58%, #EFD3A0 72%, #D9AE6E 100%);
  box-shadow: 0 8px 24px rgba(120,80,10,.18);
}
.kids-stage-holder { height: 560px; }
@media (max-width: 600px) { .kids-stage-holder { height: 500px; } }

.k-hud-top {
  position: absolute; top: 10px; left: 10px; right: 10px; z-index: 5;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.k-pill {
  background: #FFFDF6; border: 2.5px solid #E8B62B; border-radius: 999px;
  padding: 4px 13px; font-weight: 800; font-size: 14px; color: #7A6647;
  box-shadow: 0 2px 6px rgba(120,80,10,.16);
}
.k-coin { margin-right: 2px; }
.k-hearts { color: #F06292; letter-spacing: 2px; font-size: 15px; }
.k-present {
  margin-left: auto; font-size: 32px; border: none; background: none; cursor: pointer;
  filter: drop-shadow(0 3px 4px rgba(120,80,10,.3));
  transition: transform .15s;
}
.k-present:hover { transform: scale(1.12) rotate(-6deg); background: none; }

.k-lv {
  position: absolute; top: 58px; left: 14px; z-index: 5;
  width: 58px; height: 58px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(120,80,10,.22);
}
.k-lv-inner {
  width: 46px; height: 46px; border-radius: 999px; background: #FFFDF6;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.k-lv-label { font-size: 9px; font-weight: 800; color: #A9750B; line-height: 1; }
.k-lv-num { font-size: 17px; font-weight: 800; color: #7A6647; line-height: 1.1; }

.k-challenge {
  position: absolute; top: 58px; right: 14px; z-index: 5; width: 205px;
  background: #FFFDF6; border: 2.5px solid #E8B62B; border-radius: 14px;
  overflow: hidden; cursor: pointer; text-align: left;
  box-shadow: 0 3px 10px rgba(120,80,10,.2);
}
.k-ch-head { background: linear-gradient(135deg, #FFD54A, #E8B62B); padding: 4px 11px; font-size: 11px; font-weight: 800; color: #5a4326; }
.k-ch-body { padding: 8px 11px; font-size: 12.5px; font-weight: 700; color: #5a4326; display: flex; flex-direction: column; gap: 2px; }
.k-ch-left { color: #E8483F; }
.k-ch-bonus { color: #3E9E6C; font-size: 11.5px; font-weight: 800; }
.k-challenge.done { border-color: #7CC77A; }

.k-goal {
  position: absolute; right: 14px; top: 45%; z-index: 5; width: 215px;
  background: #FFFDF6; border: 2.5px solid #E8B62B; border-radius: 14px;
  padding: 10px 12px; cursor: pointer;
  box-shadow: 0 3px 10px rgba(120,80,10,.2);
}
.k-goal-head { font-size: 12.5px; font-weight: 800; color: #5a4326; }
.k-goal-pct { color: #3E9E6C; }
.k-goal-bar { height: 10px; background: #F0E4C8; border-radius: 999px; overflow: hidden; margin: 6px 0; }
.k-goal-fill { height: 100%; background: linear-gradient(90deg, #7CC77A, #3E9E6C); border-radius: 999px; }
.k-goal-nums { font-size: 11.5px; font-weight: 700; color: #7A6647; }
.k-goal.empty { border-style: dashed; }

.k-edge {
  position: absolute; top: 60%; z-index: 5;
  width: 56px; height: 56px; border-radius: 999px;
  background: #fff; border: 3px solid #E8B62B; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(120,80,10,.22);
  transition: transform .15s;
}
.k-edge:hover { transform: scale(1.08); background: #fff; }
.k-edge-l { left: 10px; }
.k-edge-r { right: 10px; }
.k-edge-ico { font-size: 20px; font-weight: 800; color: #A9750B; line-height: 1; }
.k-edge-label { font-size: 8.5px; font-weight: 800; color: #7A6647; }

.k-toast {
  position: absolute; left: 50%; bottom: 16px; z-index: 6;
  transform: translate(-50%, 24px); opacity: 0;
  background: #2E2A24; color: #FFD54A; border-radius: 999px;
  padding: 9px 20px; font-weight: 800; font-size: 14px;
  transition: all .4s ease;
  pointer-events: none;
}
.k-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* こどもモードのきろくフォームはおおきく */
body.theme-kids .quick-card h2 { font-size: 20px; }
body.theme-kids .qchip { font-size: 15px; padding: 9px 18px; }
body.theme-kids input.quick-price { font-size: 46px; }

/* ======================= おとな「マネコ家計簿」 ======================= */
body.theme-adult { background: #F7F4EE; }
body.theme-adult .card { border: none; border-radius: 20px; box-shadow: 0 4px 14px rgba(60,50,30,.07); }

.a-header { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 0; }
.a-month-big { font-size: 24px; font-weight: 800; color: #2E2A24; }
.a-month-year { font-size: 13px; color: #8C8375; margin-left: 6px; }
.a-lv-pill { background: #fff; border-radius: 999px; padding: 5px 13px; font-size: 12px; font-weight: 800; color: #C99B2E; box-shadow: 0 2px 8px rgba(60,50,30,.08); }

.a-hero-wrap { position: relative; padding-top: 92px; }
.a-peek { position: absolute; top: -6px; right: 22px; width: 150px; height: 132px; z-index: 0; }
.a-peek-fallback { font-size: 70px; display: block; text-align: center; }
.a-chip {
  position: absolute; top: 30px; left: 6px; z-index: 2; max-width: 58%;
  background: #fff; border-radius: 14px 14px 14px 4px; padding: 8px 14px;
  font-size: 12.5px; font-weight: 800; color: #2E2A24;
  box-shadow: 0 4px 14px rgba(60,50,30,.14);
}
.a-hero {
  position: relative; z-index: 1;
  background: #2E2A24; border-radius: 24px; padding: 18px 20px;
  box-shadow: 0 14px 30px rgba(46,42,36,.28);
  display: flex; flex-direction: column; gap: 9px;
}
.a-hero-top { display: flex; justify-content: space-between; font-size: 12.5px; color: #B8AE9C; font-weight: 700; }
.a-hero-amount { font-size: 38px; font-weight: 800; color: #F7F4EE; line-height: 1.1; }
.a-hero-bar { height: 10px; background: #4A443A; border-radius: 999px; overflow: hidden; }
.a-hero-fill { height: 100%; background: linear-gradient(90deg, #E3C56A, #C99B2E); border-radius: 999px; }
.a-hero-sub { display: flex; gap: 18px; font-size: 12.5px; color: #B8AE9C; font-weight: 700; }
.a-hero-sub strong { color: #F7F4EE; }
.a-hero-sub .a-pos { color: #E3C56A; }
.a-set-budget { align-self: flex-start; background: none; border: 1.5px solid #4A443A; color: #E3C56A; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 5px 13px; }
.a-set-budget:hover { background: #3a352d; }

.a-card { background: #fff; border-radius: 20px; padding: 16px 18px; box-shadow: 0 4px 14px rgba(60,50,30,.07); }
.a-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.a-card h2 { margin: 0; font-size: 15px; color: #2E2A24; }
.a-link { background: none; border: none; color: #C99B2E; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.a-link:hover { background: none; text-decoration: underline; }
.a-empty { color: #8C8375; font-size: 13px; }

.a-cat-row { display: grid; grid-template-columns: 84px 1fr 84px; align-items: center; gap: 10px; padding: 7px 0; }
.a-cat-name { font-size: 13px; font-weight: 700; color: #2E2A24; }
.a-cat-bar { height: 8px; background: #F0EBE0; border-radius: 999px; overflow: hidden; }
.a-cat-fill { height: 100%; border-radius: 999px; }
.a-cat-amount { text-align: right; font-size: 13px; font-weight: 800; color: #2E2A24; }

.a-recent-row { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: none; border-bottom: 1px solid #F0EBE0; padding: 10px 2px; cursor: pointer; text-align: left; }
.a-recent-row:last-child { border-bottom: none; }
.a-recent-row:hover { background: #FBF8F1; }
.a-recent-ico { width: 34px; height: 34px; border-radius: 999px; background: #F0E4C8; color: #7A6647; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.a-recent-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.a-recent-name { font-size: 13px; font-weight: 800; color: #2E2A24; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-recent-date { font-size: 10.5px; color: #8C8375; }
.a-recent-amount { font-size: 14px; font-weight: 800; color: #2E2A24; }

/* ---- ちょきん（両モード共通） ---- */
.sv-stats { display: flex; gap: 26px; flex-wrap: wrap; }
.sv-stat { display: flex; flex-direction: column; }
.sv-stat .k { font-size: 12px; color: var(--muted); }
.sv-stat strong { font-size: 22px; color: var(--accent-deep); }
.sv-goal { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.sv-goal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sv-goal-nums { margin-left: auto; font-size: 12.5px; font-weight: 700; color: #7A6647; }
.sv-bar { height: 12px; background: #F0E4C8; border-radius: 999px; overflow: hidden; margin: 8px 0; }
.sv-fill { height: 100%; background: linear-gradient(90deg, #7CC77A, #3E9E6C); border-radius: 999px; transition: width .5s; }
.sv-fill.done { background: linear-gradient(90deg, #E3C56A, #C99B2E); }
.sv-done-badge { color: #C99B2E; font-weight: 800; }

/* ======================================================================
   デザインモック移植（design_handoff_maneko_home）: keyframes・スマホ画面キャンバス
   ====================================================================== */
@keyframes mfloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
@keyframes mfloat2 { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }
@keyframes mshadow { 0%,100%{transform:scaleX(1);opacity:.55} 50%{transform:scaleX(.8);opacity:.3} }
@keyframes mspin { from{transform:rotateY(0)} to{transform:rotateY(360deg)} }
@keyframes mspinr { from{transform:rotate(0) } to{transform:rotate(360deg)} }
@keyframes morbit { from{transform:rotate(0)} to{transform:rotate(360deg)} }
@keyframes mbeckon { 0%,100%{transform:rotate(34deg)} 50%{transform:rotate(4deg)} }
@keyframes mwag { 0%,100%{transform:rotate(28deg)} 50%{transform:rotate(50deg)} }
@keyframes mjump { 0%,12%{transform:translateY(0) rotate(-7deg) scale(1.04,.94)} 40%{transform:translateY(-42px) rotate(5deg) scale(.97,1.05)} 62%{transform:translateY(0) rotate(-2deg) scale(1.05,.93)} 74%{transform:translateY(-12px) rotate(-6deg) scale(1,1)} 88%,100%{transform:translateY(0) rotate(-7deg) scale(1.02,.97)} }
@keyframes mjshadow { 0%,12%{transform:scaleX(1);opacity:.55} 40%{transform:scaleX(.62);opacity:.22} 62%{transform:scaleX(1);opacity:.55} 74%{transform:scaleX(.85);opacity:.4} 88%,100%{transform:scaleX(1);opacity:.55} }
@keyframes msparkle { 0%,100%{transform:rotate(45deg) scale(.35);opacity:.15} 50%{transform:rotate(45deg) scale(1);opacity:1} }
@keyframes mfall { 0%{transform:translateY(-80px) rotateY(0);opacity:0} 12%{opacity:1} 100%{transform:translateY(760px) rotateY(900deg);opacity:1} }
@keyframes mcloud { 0%,100%{transform:translateX(0)} 50%{transform:translateX(22px)} }
@keyframes mbagbob { 0%,100%{transform:rotate(-4deg)} 50%{transform:rotate(4deg)} }

/* こどもホーム v3: 生成3Dアートを主役にし、操作だけを高コントラストで重ねる */
.kids-town-3d {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("/assets/kids/maneko-town-3d.webp") center center / cover no-repeat;
  transform: scale(1.015);
  transition: filter .35s ease;
}
.kids-town-stage-0 { filter: saturate(.78) brightness(.92); }
.kids-town-stage-1 { filter: saturate(.9) brightness(.96); }
.kids-town-stage-2 { filter: saturate(1) brightness(1); }
.kids-town-stage-3 { filter: saturate(1.08) brightness(1.03); }
.kids-town-stage-4 { filter: saturate(1.16) brightness(1.08) contrast(1.03); }
.kids-town-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.06) 0 31%, transparent 47%, rgba(66,38,13,.14) 100%);
}
.kids-maneko-wrap {
  position: absolute;
  left: 50%;
  bottom: 130px;
  width: 214px;
  height: 300px;
  transform: translateX(-50%);
  transform-origin: bottom center;
  cursor: pointer;
  z-index: 4;
  filter: drop-shadow(0 12px 12px rgba(64,35,9,.26));
}
.kids-maneko-3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform-origin: center bottom;
  user-select: none;
  -webkit-user-drag: none;
}
.kids-maneko-shadow {
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 4px;
  height: 20px;
  border-radius: 50%;
  background: rgba(50,29,10,.35);
  filter: blur(6px);
  transform-origin: center;
}
.kids-world-action {
  position: absolute;
  top: 586px;
  z-index: 9;
  width: 92px;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,.82);
  border-radius: 22px;
  background: rgba(255,253,246,.84);
  box-shadow: 0 8px 24px rgba(67,38,12,.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #60420f;
  font-size: 11px;
  font-weight: 800;
}
.kids-world-action-icon { font-size: 30px; line-height: 1.05; }

/* モックの提示背景と同じ生成りの上に、402×840 のスマホ画面を置く。
   こどもは「世界そのものが背景」に見えるよう、フチを生成りではなく空→砂のグラデにする。 */
/* おとなはホームのキャンバスと完全同色に統一（旧 #F6EFE2 → #F7F4EE）。renderHome が html/body に上書きする。 */
body.theme-adult { background: #F7F4EE; }
/* こどもの既定フォールバック（renderHome が stageBackdrop で上書き）。
   background-attachment:fixed は iOS で効かず、むしろ描画不整合を招くため外す。 */
body.theme-kids {
  background: linear-gradient(180deg,#7FC0F0 0%,#A8DCFA 24%,#FFE7B0 50%,#EFD3A0 72%,#D9AE6E 100%);
}
.pc-wrap { display: flex; justify-content: center; }
.pc-canvas {
  position: relative;
  width: 402px; height: 840px;
  overflow: hidden;
  /* アプリ自体を背景化: カード感（角丸・影）を廃し、キャンバス＝画面の背景そのものに見せる。 */
  border-radius: 0;
  box-shadow: none;
  transform-origin: top center;
  flex: 0 0 auto;
}
/* fillHeight モード（きろく/レポート/ちょきん/せってい）: transform なしで幅いっぱい＋高さ画面フィット。
   内側の .pc-scroll だけがスクロールする（body/二重スクロールを起こさない）。 */
.pc-canvas.fill { width: 100%; max-width: 460px; height: auto; }

/* テーマ表示中は main の余白を詰めてスマホ画面を全画面フィットに（body の二重スクロール防止）。
   ホーム（絶対配置840px）で縦がはみ出す場合だけ body スクロールする。 */
body.theme-kids main#app, body.theme-adult main#app {
  margin: 0 auto;
  /* 上下の 4px 余白を廃止（外側背景の露出を無くす）。safe-area だけ残して standalone のノッチ回避。 */
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  max-width: 460px;
  gap: 0;
  min-height: 100dvh;
  justify-content: flex-start;
}
/* こどもホーム（非fillキャンバス＝cover スケール・スマホ幅のみ）: キャンバスがビューポート全体を
   覆うゲーム画面なので safe-area 余白も外す（HUD は top:60px・ナビは bottom:26px でノッチ/ホームバーを回避）。 */
@media (max-width: 500px) {
  body.theme-kids main#app:has(> .pc-wrap > .pc-canvas:not(.fill)) { padding: 0; }
}
.pc-scroll {
  position: absolute; inset: 0;
  overflow-y: auto;
  /* 下パディングにソフトキーボード高さ(--kb)を足す: iOS standalone PWA では
     キーボード表示で window.innerHeight が縮まず、記録ボタンがキーボードの裏に隠れて
     スクロールしても前に出せなくなる（phone.ts が --kb を設定）。 */
  padding: 20px 14px calc(240px + env(safe-area-inset-bottom) + var(--kb, 0px));
  display: flex; flex-direction: column; gap: 14px;
}
.hv { transition: transform .15s; }
.hv:hover { transform: scale(1.05); }

/* ======================================================================
   おとなモード機能拡張: モーダル・明細カード・詳細フォーム・ジャンル・地図
   ====================================================================== */
/* キャンバス内モーダル */
.cm-overlay {
  position: absolute; inset: 0; z-index: 3000; /* Leaflet のペイン/コントロール(〜1000)より上 */
  background: rgba(46,42,36,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 22px 16px;
}
.cm-card {
  position: relative; z-index: 1;
  width: 100%; max-height: 92%;
  background: #FFFFFF; border-radius: 20px;
  box-shadow: 0 18px 40px rgba(46,42,36,.35);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: cm-pop .18s ease-out;
}
@keyframes cm-pop { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.cm-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px; }
.cm-title { font-size: 14px; font-weight: 800; color: #2E2A24; }
.cm-close { border: none; background: #F0EBE0; color: #8C8375; width: 28px; height: 28px; border-radius: 999px; font-size: 13px; cursor: pointer; padding: 0; }
.cm-body { overflow-y: auto; padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }

/* 見やすい明細カード */
.rc-card { display: flex; flex-direction: column; gap: 6px; }
.rc-head { padding-bottom: 6px; border-bottom: 1px solid #F0EBE0; }
.rc-store { font-size: 15px; font-weight: 800; color: #2E2A24; }
.rc-meta { font-size: 11px; font-weight: 700; color: #8C8375; }
.rc-genre { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.rc-genre-chip { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 10px; }
.rc-genre-sub { font-size: 12px; font-weight: 800; color: #8C8375; }
.rc-item { display: flex; justify-content: space-between; gap: 10px; padding: 5px 2px 5px 10px; border-radius: 8px; cursor: pointer; }
.rc-item:hover { background: #FBF8F1; }
.rc-item-name { font-size: 13px; font-weight: 700; color: #2E2A24; }
.rc-item-price { font-size: 13px; font-weight: 800; color: #2E2A24; }
.rc-total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1.5px solid #2E2A24; font-size: 13px; font-weight: 800; }
.rc-total-amount { font-size: 16px; font-weight: 800; color: #2E2A24; }
.rc-photos { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.rc-photo { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; cursor: pointer; box-shadow: 0 3px 10px rgba(60,50,30,.18); }
.rc-photo-big { width: 100%; border-radius: 14px; }
.cal-day-cards { display: flex; flex-direction: column; gap: 18px; }
.cal-day-cards .rc-card + .rc-card { border-top: 2px dashed #F0E4C8; padding-top: 12px; }

/* ジャンル選択シート */
.gp-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 8px; }
.gp-chip { border: 2px solid transparent; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 800; cursor: pointer; }
.gp-chip.active { border-color: #2E2A24; }

/* 詳細きろくフォーム */
.af-card h2 { margin-bottom: 4px; }
.af-place-row { align-items: center; }
.af-place { font-size: 12.5px; font-weight: 700; color: #5C544A; }
.af-rows-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; font-size: 13px; font-weight: 800; color: #2E2A24; }
.af-total { font-size: 16px; color: #C99B2E; }
.af-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.af-row { display: grid; grid-template-columns: 1fr 84px 108px 30px; gap: 6px; align-items: center; }
.af-name, .af-price { min-width: 0; }
.af-genre { font-size: 11.5px; font-weight: 800; border: none; border-radius: 999px; padding: 8px 8px; cursor: pointer; }
.af-del { border: none; background: none; color: #B8AE9C; cursor: pointer; font-size: 13px; padding: 4px; }
.af-del:hover { color: #E8483F; background: none; }
.af-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.af-thumb { position: relative; }
.af-thumb img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; }
.af-thumb-x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 999px; border: none; background: #2E2A24; color: #fff; font-size: 11px; cursor: pointer; padding: 0; }

/* 今月のジャンル別 */
.gr-row { display: grid; grid-template-columns: 96px 1fr 76px; gap: 10px; align-items: center; padding: 6px 0; }
.gr-chip { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3px 8px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gr-bar { height: 8px; border-radius: 999px; background: #F0EBE0; overflow: hidden; }
.gr-fill { height: 100%; border-radius: 999px; }
.gr-value { min-width: 0; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.gr-amount { text-align: right; font-size: 12.5px; font-weight: 800; color: #2E2A24; }
.gr-percent { color: #8C8375; font-size: 10px; font-weight: 800; }

/* 買い物マップ */
.report-map { height: 300px; border-radius: 14px; overflow: hidden; }

/* 月初サマリー */
.ms-body { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.ms-total-label { font-size: 12px; font-weight: 700; color: #8C8375; }
.ms-total { font-size: 34px; font-weight: 800; color: #2E2A24; line-height: 1.1; }
.ms-diff { font-size: 12.5px; font-weight: 800; color: #C99B2E; }
.ms-sec { font-size: 12px; font-weight: 800; color: #8C8375; margin-top: 8px; }
.ms-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; }
.ms-chip { font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 3px 10px; }
.ms-note { font-size: 12px; font-weight: 700; color: #5C544A; }
.ms-comment { margin-top: 8px; background: #FBF8F1; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; font-weight: 700; color: #2E2A24; }

/* レシート読み取りボタン（きろくフォームの窓口） */
.af-ocr {
  width: 100%;
  border: 2px dashed #C99B2E;
  background: #FBF8F1;
  color: #7A5A20;
  font-weight: 800;
  font-size: 14px;
  border-radius: 14px;
  padding: 13px 12px;
  cursor: pointer;
  margin-top: 4px;
}
.af-ocr:hover { background: #F5EDDA; }
.af-ocr:disabled { opacity: .6; cursor: wait; }
.af-ocr-note { margin: 2px 0 6px; }

/* 金額入力のスピナー矢印を消す（84pxの狭い欄を圧迫するため。テンキーは inputMode で維持） */
.af-price::-webkit-outer-spin-button, .af-price::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.af-price { -moz-appearance: textfield; appearance: textfield; }

/* ======================================================================
   目標（期限・ペース・ホームのスワイプカード）＋ こども世界観の統一
   ====================================================================== */
/* PWA standalone でステータスバーに食い込まないように（4px 余白は廃止・safe-area のみ） */
body.theme-kids main#app, body.theme-adult main#app {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* 貯金目標のペース表示（毎月あと¥X） */
.sv-pace { margin: 2px 0 6px; font-size: 12px; font-weight: 700; color: #B9506E; }

/* ホームの目標カード（スワイプ切替） */
.ag-swipe {
  display: flex; overflow-x: auto; gap: 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
  cursor: pointer;
}
.ag-swipe::-webkit-scrollbar { display: none; }
.ag-card {
  flex: 0 0 100%; scroll-snap-align: start;
  background: #FFFFFF; border-radius: 18px; padding: 12px 16px 10px;
  box-shadow: 0 4px 14px rgba(60,50,30,.07);
  display: flex; flex-direction: column; gap: 7px;
}
.ag-head { display: flex; justify-content: space-between; align-items: baseline; }
.ag-name { font-size: 13px; font-weight: 800; color: #2E2A24; }
.ag-pct { font-size: 12px; font-weight: 800; color: #C99B2E; }
.ag-bar { height: 8px; border-radius: 999px; background: #F0EBE0; overflow: hidden; }
.ag-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #E3C56A, #C99B2E); }
.ag-sub { display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 700; color: #8C8375; }
.ag-dots { display: flex; justify-content: center; gap: 6px; margin-top: 7px; }
.ag-dot { width: 6px; height: 6px; border-radius: 999px; background: #D8D2C4; cursor: pointer; }
.ag-dot.on { background: #C99B2E; }

/* こども: 記録ボタンが金色ナビに隠れないよう余白を大きく（iPhone のホームインジケータぶんも足す）。
   下端に十分な余白があると、保存ボタンをスクロールでナビより上へ持ってこられる。 */
body.theme-kids .pc-scroll { padding-bottom: calc(340px + env(safe-area-inset-bottom) + var(--kb, 0px)); }

/* こども: 全タブをマネコタウンの世界観に（クリーム＋金ふち＋丸文字） */
body.theme-kids .pc-scroll .card {
  background: #FFFDF6;
  border: 2.5px solid #E8B62B;
  border-radius: 18px;
  box-shadow: 0 5px 14px rgba(120,80,20,.22);
}
body.theme-kids .pc-scroll h2 { color: #7A4A00; }
body.theme-kids .pc-scroll h3 { color: #A08A60; }
body.theme-kids .pc-scroll .muted { color: #A08A60; }
body.theme-kids .pc-scroll .field-label { color: #A08A60; font-weight: 700; }
body.theme-kids .pc-scroll input, body.theme-kids .pc-scroll select {
  border: 2px solid #F0E4C8; border-radius: 12px; background: #FFFDF6;
}
body.theme-kids .pc-scroll input:focus, body.theme-kids .pc-scroll select:focus {
  outline: 3px solid #FFF3CD; border-color: #E8B62B;
}
body.theme-kids .pc-scroll button.primary {
  background: radial-gradient(circle at 35% 30%, #FFC94D, #F5A623);
  border: 3px solid #FFFDF6; color: #7A4A00; font-weight: 800;
  box-shadow: 0 5px 12px rgba(120,80,20,.35);
}
body.theme-kids .pc-scroll button.primary:hover { filter: brightness(1.04); }
body.theme-kids .pc-scroll .sv-bar, body.theme-kids .pc-scroll .cal-cell { border-radius: 12px; }
body.theme-kids .pc-scroll .cal-cell { border: 2px solid #F0E4C8; background: #FFFDF6; }
body.theme-kids .pc-scroll .cal-cell.has { background: #FFF3CD; }
body.theme-kids .pc-scroll .cal-cell.today { outline: 2.5px solid #E8B62B; }
body.theme-kids .pc-scroll .gr-bar { background: #F0E4C8; }

/* こどものモーダル（けいじばん・ちょきんばこ）も世界観に */
body.theme-kids .cm-card { background: #FFFDF6; border: 3px solid #E8B62B; }
body.theme-kids .cm-title { color: #7A4A00; }
body.theme-kids .cm-close { background: #F0E4C8; color: #A08A60; }
.kd-form { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }

/* ======================================================================
   👨‍👩‍👧 親子アカウント連携（main.ts settingsPanel）
   ====================================================================== */
/* 子リストの1行: 名前＋操作ボタン */
.link-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.link-row:last-of-type { border-bottom: none; }
.link-name { font-weight: 800; color: #2E2A24; }
.link-btns { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.link-btns .link-btn { padding: 5px 10px; border-radius: 999px; background: #F0EBE0; font-weight: 700; font-size: 12.5px; }
.link-btns .link-btn:hover { background: #E7E0D2; text-decoration: none; }
.link-btns .link-btn.danger { background: none; }
.link-connected { font-weight: 800; color: #2E7D46; }
body.theme-kids .link-connected { color: #3E9E6C; }

/* 連携コード表示（1文字ずつ間隔・タップで選択しやすく） */
.link-code-block { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-top: 10px; }
.link-code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 30px; font-weight: 800; letter-spacing: .34em;
  color: #2E2A24; background: #F7F3EA; border: 2px dashed #C9BEA6;
  border-radius: 14px; padding: 12px 20px; text-align: center;
  align-self: stretch; user-select: all; -webkit-user-select: all;
}
body.theme-kids .link-code { background: #FFF7DE; border-color: #E8B62B; color: #7A4A00; }
/* こどものコード入力（大きめ・字間） */
input.link-code-input { font-size: 22px; letter-spacing: .18em; text-align: center; text-transform: uppercase; }
.link-sent { font-weight: 800; color: #2E7D46; }
body.theme-kids .link-sent { color: #3E9E6C; }

/* 子のようす モーダル（読み取り専用） */
.cv { display: flex; flex-direction: column; gap: 12px; }
.cv-wallet { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  background: #F7F3EA; border-radius: 14px; padding: 12px 16px; }
.cv-wallet-k { font-size: 13px; font-weight: 800; color: #8C8375; }
.cv-wallet-v { font-size: 30px; font-weight: 800; color: #2E2A24; }
.cv-month { display: flex; gap: 10px; }
.cv-stat { flex: 1; background: #FAF7F0; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.cv-stat span { font-size: 12px; font-weight: 700; color: #8C8375; }
.cv-stat strong { font-size: 17px; font-weight: 800; color: #2E2A24; }
.cv-stage { font-size: 14px; font-weight: 800; color: #7A4A00; background: #FFF3CD; border-radius: 999px; padding: 8px 14px; text-align: center; }
.cv-sec { font-size: 13px; font-weight: 800; color: #8C8375; margin-top: 2px; }
.cv-goal { display: flex; flex-direction: column; gap: 6px; }
.cv-goal-head { display: flex; align-items: center; gap: 10px; }
.cv-goal-nums { margin-left: auto; font-size: 12.5px; font-weight: 700; color: #7A6647; }
.cv-goal .sv-done-badge { margin-left: auto; }
.cv-rec { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #F0EBE0; }
.cv-rec:last-child { border-bottom: none; }
.cv-rec-date { font-size: 11.5px; font-weight: 700; color: #8C8375; white-space: nowrap; }
.cv-rec-name { flex: 1; font-weight: 700; color: #2E2A24; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-rec-amt { font-weight: 800; color: #2E2A24; white-space: nowrap; }

/* 🧹 おてつだいポイント（子のちょきんタブ・親のモーダル） */
.chore-badge { margin-left: 8px; font-size: 12px; font-weight: 800; color: #C24242;
  background: #FDE5E5; border-radius: 999px; padding: 2px 9px; vertical-align: middle; }
.chore-pts { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  background: #FFF7DE; border-radius: 14px; padding: 12px 16px; margin-bottom: 4px; }
.chore-pts-k { font-size: 13px; font-weight: 800; color: #8C7A4A; }
.chore-pts-v { font-size: 28px; font-weight: 800; color: #A9750B; }
.chore-list { display: flex; flex-direction: column; }
.chore-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.chore-row:last-child { border-bottom: none; }
.chore-name { font-weight: 800; color: #2E2A24; }
.chore-pt { font-size: 12.5px; font-weight: 800; color: #3E9E6C; }
.chore-do { margin-left: auto; padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.chore-do.waiting { background: #EAE2CF; color: #9A8C6A; box-shadow: none; }
.chore-ex { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.chore-ex-btn { border-radius: 999px; font-weight: 800; }
.chore-hist { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.chore-hist-h { font-size: 12px; font-weight: 800; color: #A08A60; margin-top: 4px; }
.chore-hist-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #7A6647; }
.chore-hist-name { font-weight: 700; }
.chore-hist-mark { margin-left: auto; font-weight: 800; }
.chore-hist-mark.approved { color: #2E9E6C; }
.chore-hist-mark.rejected { color: #C24242; }
.chore-hist-mark.pending { color: #C99B2E; }
/* 親モーダル */
.chp { display: flex; flex-direction: column; gap: 10px; }
.chp-pts { font-size: 14px; font-weight: 800; color: #A9750B; background: #FFF7DE; border-radius: 12px; padding: 8px 14px; text-align: center; }
.chp-sec { font-size: 13px; font-weight: 800; color: #8C8375; margin-top: 2px; }
.chp-pend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.chp-pname { font-weight: 800; color: #2E2A24; }
.chp-date { font-size: 11.5px; font-weight: 700; color: #8C8375; }
.chp-pend .chp-ok, .chp-pend .link-btn.danger { padding: 5px 10px; border-radius: 999px; background: #F0EBE0; font-weight: 700; font-size: 12.5px; }
.chp-pend .chp-ok { color: #2E7D46; }
.chp-pend .link-btn:not(:last-child) { margin-left: 0; }
.chp-pend .chp-ok { margin-left: auto; }
.chp-done { margin-left: auto; font-weight: 800; color: #2E7D46; }
.chp-menu { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #F0EBE0; }
.chp-mname { font-weight: 700; color: #2E2A24; }
.chp-mpt { font-size: 12.5px; font-weight: 800; color: #3E9E6C; }
.chp-menu .link-btn.danger { margin-left: auto; }
.chp-add { align-items: flex-end; margin-top: 6px; }

/* 🎁 プレゼント（衣装ガチャ）モーダル */
.gacha { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.gc-stage { position: relative; height: 96px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gc-burst { position: absolute; inset: 0; pointer-events: none; }
.gc-get { position: absolute; left: 50%; bottom: 4px; transform: translate(-50%, 6px); opacity: 0; transition: opacity .25s, transform .25s;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 14px; font-weight: 800; color: #B9506E; white-space: nowrap; text-shadow: 0 1px 0 rgba(255,255,255,.7); }
.gc-get.show { opacity: 1; transform: translate(-50%, 0); }
.gc-rl { font-size: 12px; font-weight: 800; padding: 1px 10px; border-radius: 999px; }
.gc-rl.gc-rare { background: #DCE7FA; color: #39628F; }
.gc-rl.gc-super { background: linear-gradient(90deg,#FFE9A0,#F5C542); color: #8A5E0A; }
.gc-price { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gc-cost { font-size: 13px; font-weight: 800; color: #7A5A20; }
.gc-need { font-size: 12px; font-weight: 700; color: #B9506E; }
.gc-complete { font-size: 15px; font-weight: 800; color: #C99B2E; text-align: center; padding: 6px 0; }
.gc-open { border: none; cursor: pointer; font-size: 16px; font-weight: 800; color: #7A4A00;
  padding: 10px 30px; border-radius: 999px; background: linear-gradient(180deg,#FFE9A8,#FFD54A);
  box-shadow: 0 6px 14px rgba(150,95,10,.4); }
.gc-open:disabled { background: #EAE2CF; color: #B4A98C; box-shadow: none; cursor: default; }
.gc-hint { font-size: 12px; font-weight: 800; color: #A08A60; text-align: center; }
.gc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gc-slot { display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 9px 4px; border-radius: 14px; background: #FFFDF6; border: 2.5px solid #EAD9AE; }
.gc-slot.equipped { border-color: #F5C542; box-shadow: 0 0 0 2px rgba(245,197,66,.4), 0 4px 10px rgba(150,100,20,.22); }
.gc-slot.locked { background: #F1EEE6; border-color: #E0DACD; }
.gc-ico { font-size: 26px; line-height: 1; }
.gc-ico.gc-sil { color: #C4BCA9; filter: grayscale(1); }
.gc-name { font-size: 10.5px; font-weight: 800; color: #6B5638; text-align: center; line-height: 1.2; }
.gc-slot.locked .gc-name { color: #B4A98C; }
.gc-toggle { border: none; cursor: pointer; font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 999px;
  background: #F0E4C8; color: #7A5A20; }
.gc-slot.equipped .gc-toggle { background: #FFD54A; color: #7A4A00; }
@keyframes gcshake { 0%,100%{transform:rotate(0)} 15%{transform:rotate(-7deg)} 30%{transform:rotate(6deg)} 45%{transform:rotate(-5deg)} 60%{transform:rotate(4deg)} 75%{transform:rotate(-2deg)} }
@keyframes gcfall { 0%{transform:translateY(-10px) rotate(0);opacity:0} 12%{opacity:1} 100%{transform:translateY(150px) rotate(340deg);opacity:0} }

/* 金額入力(.price)のスピナー矢印も消す（ちょきん・収入の入力欄） */
input.price::-webkit-outer-spin-button, input.price::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input.price { -moz-appearance: textfield; appearance: textfield; }

/* ======================================================================
   マネコのぼうけん（RPGふう たびマップ）— journey.ts
   フルスクリーンの縦スクロール。貯金が進むと景色とマネコの衣装が変わる。
   ====================================================================== */
.jr-overlay {
  position: fixed; inset: 0; z-index: 4000;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: #BFD3E8;                 /* 中央402ステージ外（PC等の左右）はデザインのフレーム色 */
  font-family: 'M PLUS Rounded 1c', sans-serif;
  opacity: 0;
  transition: opacity .32s ease;
}
/* overlay 自体に transform を持たせない（opacityフェードのみ）。
   スクロールコンテナ(.jr-overlay)に transform を持たせると、その中の position:fixed
   （.jr-top / .jr-foot）の包含ブロックを奪ってしまい、固定バーがスクロールで消えるため。 */
.jr-overlay.jr-in { opacity: 1; }
.jr-overlay.jr-out { opacity: 0; pointer-events: none; }

/* 上部固定バー（もどる／タイトル／％）— v2 の見た目 */
.jr-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 4100;
  display: flex; align-items: center; gap: 10px;
  padding: calc(40px + env(safe-area-inset-top)) 14px 12px;
  background: linear-gradient(180deg, rgba(191,211,232,.96), rgba(191,211,232,0));
  pointer-events: none;
}
.jr-top .jr-back {
  pointer-events: auto;
  border: none; cursor: pointer;
  background: #FFFDF6; color: #5C4A2E;
  font-weight: 800; font-size: 14px; font-family: inherit;
  border-radius: 999px; padding: 8px 15px 8px 12px;
  box-shadow: 0 4px 12px rgba(80,60,20,.2);
}
.jr-title {
  display: flex; align-items: center; gap: 6px;
  color: #2E2A24; font-weight: 800; font-size: 16px;
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
}
.jr-hud {
  margin-left: auto;
  background: linear-gradient(180deg, #FF7A5C, #D8382C);
  color: #FFF; font-weight: 800; font-size: 15px;
  border-radius: 999px; padding: 7px 15px; box-shadow: 0 4px 12px rgba(180,50,40,.35);
}

/* 目標切替ピル（.jr-top の直下・fixed）。◀▶で目標を循環切替 */
.jr-goal-bar {
  position: fixed; left: 0; right: 0;
  top: calc(88px + env(safe-area-inset-top));
  display: flex; justify-content: center;
  z-index: 4100; pointer-events: none;
}
.jr-goal-pill {
  pointer-events: auto;
  display: flex; align-items: center;
  background: #FFFDF6; border: 2.5px solid #E8B62B; border-radius: 999px;
  padding: 0 8px;
  box-shadow: 0 4px 12px rgba(150,100,20,.25);
  font-size: 13px; font-weight: 800; color: #7A5A20;
}
.jr-goal-pill .jr-goal-label { white-space: nowrap; padding: 10px 6px; }
.jr-goal-pill button {
  border: none; background: none; cursor: pointer; padding: 0;
  min-width: 44px; min-height: 44px;              /* タップ領域44px確保 */
  font-family: inherit; font-size: 13px; font-weight: 800; color: #C89A2E;
}

/* 下部の現在地バナー — v2（白フェードは内側の inline が担当。ここは固定枠だけ） */
.jr-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4100;
  pointer-events: none;
}

@keyframes mflame { from { transform: scaleY(.82); opacity: .85; } to { transform: scaleY(1.12); opacity: 1; } }
@keyframes mpulse { 0%,100%{transform:translateX(-50%) scale(1);box-shadow:0 0 0 0 rgba(216,60,44,.5)} 50%{transform:translateX(-50%) scale(1.06);box-shadow:0 0 0 12px rgba(216,60,44,0)} }
@keyframes mflag { 0%,100%{transform:skewY(0)} 50%{transform:skewY(-9deg)} }
@keyframes mchev { 0%,100%{opacity:.3;transform:translateX(-50%) translateY(0)} 50%{opacity:1;transform:translateX(-50%) translateY(5px)} }

/* ======================================================================
   📣 アプリ内トースト（こども向け通知・どの画面でも .pc-canvas 上部に出る）
   ====================================================================== */
.app-toast {
  position: absolute; top: 104px; left: 50%; transform: translateX(-50%);
  z-index: 2500; /* HUD(〜15)より上・モーダル .cm-overlay(3000) より下 */
  width: max-content; max-width: 86%;
  background: #FFFDF6;
  border: 2.5px solid #E8B62B;
  border-radius: 18px;
  padding: 10px 18px;
  font-size: 13px; font-weight: 800; color: #7A5A20;
  line-height: 1.5; text-align: center;
  box-shadow: 0 8px 20px rgba(120,80,20,.32);
  cursor: pointer;
  animation: toast-pop .3s cubic-bezier(.34,1.56,.64,1);
}
.app-toast.leaving { opacity: 0; transform: translateX(-50%) translateY(-8px); transition: opacity .2s, transform .2s; }
@keyframes toast-pop { from { opacity: 0; transform: translateX(-50%) translateY(-14px) scale(.9); } to { opacity: 1; transform: translateX(-50%); } }

/* 📅 カレンダーの収入マーク（緑の＋ドット）と日別カードの収入行 */
.cal-inc-dot {
  position: absolute; top: 3px; right: 3px;
  width: 13px; height: 13px; border-radius: 999px;
  background: #2E9E5B; color: #fff;
  font-size: 10px; font-weight: 800; line-height: 13px; text-align: center;
}
.cal-inc-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #EAF7EE; border: 1.5px solid #BCE3C8; border-radius: 12px;
  padding: 8px 12px;
}
.cal-inc-name { font-size: 13px; font-weight: 700; color: #2E2A24; }
.cal-inc-amt { color: #1E7A43; font-size: 13px; }

/* ======================================================================
   🐾 初回チュートリアル（利用タイプ選択の直後・1回だけ）
   ====================================================================== */
.tut-overlay {
  position: absolute; inset: 0; z-index: 3500; /* .cm-overlay(3000) より上・最前面 */
  background: rgba(46,42,36,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 18px;
}
.tut-card {
  position: relative; width: 100%; max-width: 320px;
  background: #FFFDF6; border-radius: 20px;
  box-shadow: 0 18px 40px rgba(46,42,36,.35);
  padding: 22px 20px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
  animation: cm-pop .18s ease-out;
}
.tut-skip { position: absolute; top: 10px; right: 12px; font-size: 12px; padding: 4px 8px; }
.tut-dots { display: flex; gap: 6px; margin-bottom: 4px; }
.tut-dot { width: 7px; height: 7px; border-radius: 999px; background: #E4DCC8; }
.tut-dot.active { background: #E8B62B; }
.tut-emoji { font-size: 42px; line-height: 1; margin-top: 6px; }
.tut-title { font-size: 16px; font-weight: 800; color: #2E2A24; margin: 2px 0 0; }
.tut-text { font-size: 13px; color: #5C544A; line-height: 1.6; margin: 0; }
.tut-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; width: 100%; }
.tut-prev { background: none; border: none; color: #8C8375; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.tut-prev:disabled { visibility: hidden; }
.tut-next { flex: 1; max-width: 160px; }
/* ======================================================================
   Maneko Town v4 — savings-driven town, journey and four-tab experience
   ====================================================================== */
.kids-home-v3 {
  position: relative;
  width: 402px;
  height: 840px;
  overflow: hidden;
  isolation: isolate;
  color: #3d2f22;
  font-family: "M PLUS Rounded 1c", sans-serif;
  background: #d8ebf1;
}
.kids-home-v3-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-position: center 50%;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.035);
  filter: saturate(.98) contrast(.98);
}
.kids-home-v3.stage-0 .kids-home-v3-bg { background-position: center 48%; }
.kids-home-v3.stage-1 .kids-home-v3-bg { background-position: center 51%; }
.kids-home-v3.stage-2 .kids-home-v3-bg { background-position: center 52%; }
.kids-home-v3.stage-3 .kids-home-v3-bg { background-position: center 53%; }
.kids-home-v3.stage-4 .kids-home-v3-bg { background-position: center 55%; }
.kids-home-v3-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(26,35,44,.3), rgba(26,35,44,0) 26%),
    linear-gradient(0deg, rgba(48,31,15,.28), rgba(48,31,15,0) 30%);
}
.kids-home-v3-header {
  position: absolute;
  left: 14px;
  right: 14px;
  top: calc(48px + env(safe-area-inset-top));
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kids-month-chip,
.kids-map-chip,
.kids-goal-strip {
  border: 1px solid rgba(255,255,255,.82);
  background: rgba(255,250,239,.87);
  color: #3d2f22;
  box-shadow: 0 8px 24px rgba(39,25,12,.2);
  backdrop-filter: blur(15px) saturate(1.1);
  -webkit-backdrop-filter: blur(15px) saturate(1.1);
}
.kids-map-chip {
  min-height: 40px;
  border-radius: 999px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  cursor: pointer;
}
.kids-month-chip {
  min-width: 188px;
  min-height: 78px;
  padding: 10px 14px 9px 53px;
  position: relative;
  border-radius: 19px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.kids-month-chip::before {
  content: "◒";
  position: absolute;
  left: 15px;
  top: 19px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg,#f7c55f,#dc8b22);
  color: #fff7dc;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 8px rgba(128,75,12,.24),inset 0 1px 0 rgba(255,255,255,.5);
  font-size: 15px;
}
.kids-month-chip span { color: #7b684e; font-size: 9px; font-weight: 800; }
.kids-month-chip strong { font-size: 21px; line-height: 1.12; letter-spacing: .02em; }
.kids-month-chip small {
  max-width: 128px;
  overflow: hidden;
  color: #927b5d;
  font-size: 7px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kids-map-chip { font-size: 12px; font-weight: 800; }
.kids-goal-strip {
  position: absolute;
  left: 14px;
  right: 14px;
  top: calc(100px + env(safe-area-inset-top));
  z-index: 20;
  padding: 10px 12px;
  border-radius: 16px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.kids-goal-strip-top,
.kids-goal-meta { display: flex; justify-content: space-between; align-items: center; }
.kids-goal-strip-top strong {
  max-width: 80%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}
.kids-goal-strip-top b { color: #25745a; font-size: 12px; }
.kids-goal-track {
  display: block;
  height: 7px;
  margin: 6px 0 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(101,83,52,.18);
}
.kids-goal-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg,#80c779,#36a374);
  box-shadow: 0 0 10px rgba(54,163,116,.38);
}
.kids-goal-meta { font-size: 9.5px; font-weight: 700; color: #7b684e; }
.kids-town-open {
  position: absolute;
  inset: 0;
  width: 100%;
  z-index: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.kids-town-open:hover,
.kids-town-open:focus,
.kids-town-open:active {
  background: transparent;
  outline: none;
}
.kids-home-v3-header,
.kids-map-chip,
.kids-goal-strip,
.kids-bubble-v3,
.kids-toast-v3,
.kids-home-v3 > .kids-nav-v3 {
  transition: opacity .24s ease, transform .24s ease;
}
.kids-home-v3.kids-home-v3-ui-hidden .kids-home-v3-header,
.kids-home-v3.kids-home-v3-ui-hidden .kids-map-chip,
.kids-home-v3.kids-home-v3-ui-hidden .kids-goal-strip,
.kids-home-v3.kids-home-v3-ui-hidden .kids-bubble-v3,
.kids-home-v3.kids-home-v3-ui-hidden .kids-toast-v3,
.kids-home-v3.kids-home-v3-ui-hidden > .kids-nav-v3 {
  opacity: 0;
  pointer-events: none;
}
.kids-home-v3.kids-home-v3-ui-hidden .kids-home-v3-header,
.kids-home-v3.kids-home-v3-ui-hidden .kids-goal-strip { transform: translateY(-12px); }
.kids-home-v3.kids-home-v3-ui-hidden > .kids-nav-v3 { transform: translateY(16px); }
.kids-maneko-v3 {
  position: absolute;
  left: 50%;
  bottom: var(--walk-to-y);
  width: 184px;
  height: 255px;
  z-index: 8;
  transform: translateX(-50%) scale(var(--walk-to-scale));
  transform-origin: bottom center;
  cursor: pointer;
  filter: drop-shadow(0 10px 9px rgba(48,29,10,.28));
}
.kids-maneko-v3.is-moving {
  animation: maneko-walk-forward 1.8s cubic-bezier(.2,.75,.3,1) both;
}
.kids-maneko-v3.is-tapped img { animation: maneko-hop .72s ease; }
.kids-maneko-v3 img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  user-select: none;
  -webkit-user-drag: none;
}
.kids-maneko-v3-shadow {
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 7px;
  height: 14px;
  border-radius: 50%;
  background: rgba(39,27,16,.36);
  filter: blur(6px);
}
@keyframes maneko-walk-forward {
  0% { bottom: var(--walk-from-y); transform: translateX(-50%) translateX(-4px) scale(var(--walk-from-scale)); }
  18% { transform: translateX(-50%) translateX(5px) translateY(-8px) scale(var(--walk-from-scale)); }
  38% { transform: translateX(-50%) translateX(-4px) scale(var(--walk-from-scale)); }
  58% { transform: translateX(-50%) translateX(5px) translateY(-8px) scale(var(--walk-to-scale)); }
  78% { transform: translateX(-50%) translateX(-3px) scale(var(--walk-to-scale)); }
  100% { bottom: var(--walk-to-y); transform: translateX(-50%) scale(var(--walk-to-scale)); }
}
@keyframes maneko-hop {
  0%,100% { transform: translateY(0) rotate(0); }
  45% { transform: translateY(-25px) rotate(3deg); }
}
.kids-bubble-v3 {
  position: absolute;
  left: 50%;
  bottom: 390px;
  z-index: 18;
  max-width: 250px;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 15px;
  background: rgba(255,250,239,.92);
  color: #4e3d2b;
  box-shadow: 0 8px 22px rgba(39,25,12,.2);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.45;
  opacity: 0;
  transform: translate(-50%,8px);
  transition: .25s ease;
  pointer-events: none;
}
.kids-bubble-v3.show { opacity: 1; transform: translate(-50%,0); }
.kids-place-label {
  position: absolute;
  left: 15px;
  bottom: 154px;
  z-index: 14;
  display: flex;
  flex-direction: column;
  color: #fff;
  text-shadow: 0 2px 8px rgba(34,22,10,.7);
}
.kids-place-label span { font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.kids-place-label strong { font-size: 18px; }
.kids-record-fab {
  position: absolute;
  right: 14px;
  bottom: 153px;
  z-index: 18;
  min-height: 43px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 999px;
  background: linear-gradient(180deg,#ffe58b,#f4bd3d);
  box-shadow: 0 8px 22px rgba(102,63,9,.35);
  color: #6b450b;
  font: 800 12px "M PLUS Rounded 1c", sans-serif;
}
.kids-record-fab span { font-size: 18px; vertical-align: -1px; }
.kids-toast-v3 {
  position: absolute;
  left: 50%;
  bottom: 220px;
  z-index: 30;
  max-width: 82%;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(42,38,32,.87);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: translate(-50%,8px);
  transition: .25s ease;
  pointer-events: none;
}
.kids-toast-v3.show { opacity: 1; transform: translate(-50%,0); }

.kids-nav-v3 {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 1200;
  min-height: 76px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  align-items: center;
  padding: 6px 7px;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 25px;
  background: rgba(255,250,239,.88);
  box-shadow: 0 12px 32px rgba(45,30,15,.24);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.kids-nav-v3-item {
  min-width: 0;
  min-height: 62px;
  border: 0;
  border-radius: 19px;
  background: transparent;
  color: #796b58;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font: 800 10px "M PLUS Rounded 1c", sans-serif;
}
.kids-nav-v3-item.active {
  background: rgba(244,190,55,.22);
  color: #684817;
}
.kids-nav-v3-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: saturate(.72) sepia(.12);
  transition: .18s ease;
}
.kids-nav-v3-item.active .kids-nav-v3-icon {
  filter: saturate(1.08) drop-shadow(0 3px 4px rgba(119,70,9,.18));
  transform: translateY(-1px) scale(1.05);
}

/* Secondary tabs keep the town visible while the cream sheet protects legibility. */
body.theme-kids .pc-scroll.kids-tab-shell {
  padding-top: 184px;
  padding-bottom: calc(132px + env(safe-area-inset-bottom) + var(--kb,0px));
  background-position: center 50%;
  background-size: cover;
  background-repeat: no-repeat;
  isolation: isolate;
}
body.theme-kids .pc-scroll.kids-tab-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,transparent 0 125px,rgba(255,249,237,.72) 190px,#fff9ed 285px,#f8f0df 100%);
  pointer-events: none;
}
body.theme-kids .kids-tab-add { background-image: linear-gradient(rgba(34,34,30,.05),rgba(34,34,30,.05)),url("/assets/kids/stage-1.webp"); }
body.theme-kids .kids-tab-savings { background-image: linear-gradient(rgba(34,34,30,.04),rgba(34,34,30,.04)),url("/assets/kids/stage-2.webp"); }
body.theme-kids .kids-tab-report { background-image: linear-gradient(rgba(34,34,30,.08),rgba(34,34,30,.08)),url("/assets/kids/stage-3.webp"); }
body.theme-kids .kids-tab-family { background-image: linear-gradient(rgba(34,34,30,.08),rgba(34,34,30,.08)),url("/assets/kids/stage-1.webp"); }
body.theme-kids .kids-tab-settings {
  background-image: linear-gradient(rgba(19,29,53,.34),rgba(19,29,53,.2)),url("/assets/kids/stage-4.webp");
  background-position: center 28%;
}
body.theme-kids .pc-scroll.kids-tab-shell .card {
  position: relative;
  background: rgba(255,252,244,.94);
  border: 1px solid rgba(255,255,255,.92);
  box-shadow: 0 10px 30px rgba(72,50,23,.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Full-screen 3D journey. */
.jr-overlay.journey-v3-overlay {
  overflow: hidden;
  background: #203f69;
}
.journey-v3-canvas {
  position: relative;
  width: min(100%,47.3684dvh,460px);
  height: 100dvh;
  min-height: 720px;
  margin: 0 auto;
  overflow: hidden;
  background: url("/assets/kids/journey-3d.webp") center / 100% 100% no-repeat;
  color: #fff;
}
.journey-v3-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,rgba(12,29,56,.3),transparent 23%,transparent 70%,rgba(18,28,30,.38));
}
.journey-v3-mist {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg,rgba(236,244,255,.18) 0%,rgba(236,244,255,.06) calc(100% - var(--reveal)),transparent calc(108% - var(--reveal)));
  mix-blend-mode: screen;
  transition: .5s ease;
}
.journey-v3-header {
  position: absolute;
  left: 12px;
  right: 12px;
  top: calc(12px + env(safe-area-inset-top));
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
}
.journey-v3-back,
.journey-v3-goal,
.journey-v3-footer {
  border: 1px solid rgba(255,255,255,.58);
  background: rgba(25,39,53,.58);
  box-shadow: 0 10px 30px rgba(10,20,35,.24);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}
.journey-v3-back {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
}
.journey-v3-header > div {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  text-shadow: 0 2px 8px rgba(0,0,0,.45);
}
.journey-v3-header span { font-size: 16px; font-weight: 900; }
.journey-v3-header strong { font-size: 24px; }
.journey-v3-goal {
  position: absolute;
  left: 50%;
  top: calc(66px + env(safe-area-inset-top));
  z-index: 12;
  width: min(330px,calc(100% - 40px));
  min-height: 46px;
  border-radius: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: opacity .24s ease,transform .24s ease;
}
.journey-v3-goal button {
  width: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
}
.journey-v3-goal > img {
  width: 42px;
  height: 42px;
  margin-left: 4px;
  object-fit: contain;
  filter: drop-shadow(0 3px 4px rgba(24,18,10,.2));
}
.journey-v3-goal > span {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.journey-v3-goal strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.journey-v3-goal small { font-size: 9.5px; color: rgba(255,255,255,.78); }
.journey-v3-stage {
  position: absolute;
  z-index: 4;
  max-width: 118px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,.74);
  text-shadow: 0 2px 7px rgba(0,0,0,.68);
}
.journey-v3-stage span {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(24,38,51,.62);
  border: 1px solid rgba(255,255,255,.56);
  font-size: 9px;
  font-weight: 900;
}
.journey-v3-stage strong { font-size: 10px; line-height: 1.2; }
.journey-v3-stage.current { color: #fff5b3; }
.journey-v3-stage.current span { background: #e8a52c; color: #fff; }
.journey-v3-stage.done span { background: #3a9e73; color: #fff; }
.journey-v3-stage.future { opacity: .6; filter: saturate(.65); }
.journey-v3-marker {
  position: absolute;
  z-index: 9;
  width: 78px;
  transform: translate(-50%,-100%);
  transition: left .7s ease,top .7s ease;
  filter: drop-shadow(0 8px 9px rgba(22,15,8,.42));
}
.journey-v3-marker span {
  position: absolute;
  left: 50%;
  top: -2px;
  transform: translate(-50%,-100%);
  padding: 3px 8px;
  border-radius: 999px;
  background: #d84a3a;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.journey-v3-marker img { display: block; width: 100%; height: 102px; object-fit: contain; object-position: bottom; }
.journey-v3-footer {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 12;
  padding: 10px 13px;
  border-radius: 18px;
  transition: opacity .24s ease,transform .24s ease;
}
.journey-v3-footer div { display: flex; justify-content: space-between; align-items: center; }
.journey-v3-footer strong { font-size: 13px; }
.journey-v3-footer span { font-size: 12px; font-weight: 900; color: #ffe584; }
.journey-v3-footer i {
  display: block;
  height: 7px;
  margin: 6px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
}
.journey-v3-footer b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#f4bc42,#fff09a); }
.journey-v3-footer p { margin: 0; font-size: 9.5px; font-weight: 700; color: rgba(255,255,255,.84); text-align: center; }
.journey-v3-canvas.journey-v3-ui-hidden .journey-v3-goal {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%,-14px);
}
.journey-v3-canvas.journey-v3-ui-hidden .journey-v3-footer {
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
}

@media (prefers-reduced-motion: reduce) {
  .kids-maneko-v3,
  .kids-maneko-v3 img { animation: none !important; }
}
.quick-place {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.quick-place-status { margin: 0; font-size: 11px; }
.quick-place-status.found {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 10px;
  background: #e8f6ed;
  color: #247353 !important;
  font-weight: 800;
}
.family-tab-intro { overflow: hidden; }
.family-tab-kicker {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
  color: #a87b24;
}
.settings-drawer {
  border-radius: 18px;
  background: rgba(255,252,244,.9);
  border: 1px solid rgba(255,255,255,.92);
  box-shadow: 0 10px 30px rgba(72,50,23,.12);
  overflow: hidden;
}
.settings-drawer > summary {
  padding: 15px 16px;
  list-style: none;
  cursor: pointer;
  color: #6c5124;
  font-size: 13px;
  font-weight: 900;
}
.settings-drawer > summary::-webkit-details-marker { display: none; }
.settings-drawer > summary::after { content: "＋"; float: right; }
.settings-drawer[open] > summary::after { content: "−"; }
.settings-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 10px 12px;
}
.settings-drawer-body .card { box-shadow: none !important; }

/* Approved concept-faithful secondary screens. */
.kids-photo-page {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  display: block;
  gap: 0;
  overflow: hidden;
  isolation: isolate;
  color: #5b371b;
  background: #e8d4ae;
  font-family: "M PLUS Rounded 1c", sans-serif;
}
.kids-photo-scene {
  position: absolute;
  inset: 0;
  height: auto;
  overflow: hidden;
  z-index: 0;
}
.kids-photo-scene-bg {
  position: absolute;
  inset: 0;
  background-position: center 50%;
  background-size: cover;
  transform: scale(1.02);
}
.kids-photo-record .kids-photo-scene-bg { background-image: url("/assets/kids/scene-record.webp"); background-position: center 50%; }
.kids-photo-report .kids-photo-scene-bg { background-image: url("/assets/kids/scene-record.webp"); background-position: center 44%; }
.kids-photo-savings .kids-photo-scene-bg { background-image: url("/assets/kids/scene-savings.webp"); background-position: center 50%; }
.kids-photo-family .kids-photo-scene-bg { background-image: url("/assets/kids/scene-family.webp"); background-position: center 50%; }
.kids-photo-settings .kids-photo-scene-bg { background-image: url("/assets/kids/scene-settings.webp"); background-position: center 50%; }
.kids-photo-scene-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,rgba(31,25,18,.03),rgba(31,25,18,.05) 42%,rgba(47,30,14,.38) 100%);
}
.kids-photo-settings .kids-photo-scene-shade {
  background: linear-gradient(90deg,rgba(29,24,29,.7),rgba(27,35,54,.3)),linear-gradient(0deg,rgba(15,20,33,.3),transparent);
}
.kids-photo-scene-maneko {
  position: absolute;
  z-index: 2;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 12px 12px rgba(43,25,10,.28));
}
.kids-photo-record .kids-photo-scene-maneko,
.kids-photo-report .kids-photo-scene-maneko { width: 195px; height: 260px; right: -5px; top: 58px; }
.kids-photo-savings .kids-photo-scene-maneko { width: 176px; height: 250px; left: 50%; top: 54px; transform: translateX(-50%); }
.kids-photo-family .kids-photo-scene-maneko { width: 178px; height: 248px; right: -1px; top: 61px; }
.kids-photo-settings .kids-photo-scene-maneko { width: 225px; height: 285px; left: 50%; top: 28px; transform: translateX(-50%); }
.kids-photo-sheet {
  position: absolute;
  left: 0;
  right: 0;
  top: 270px;
  bottom: 0;
  z-index: 5;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.kids-photo-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  display: block;
  padding: 12px 12px calc(102px + env(safe-area-inset-bottom) + var(--kb,0px));
}
.kids-photo-content-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 16px 14px 18px;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 27px;
  background:
    radial-gradient(circle at 24% 0,rgba(255,255,255,.72),transparent 38%),
    rgba(255,248,233,.94);
  box-shadow: 0 10px 28px rgba(65,40,17,.24),inset 0 1px 0 #fff;
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
}
.kids-photo-page > .kids-nav-v3 {
  z-index: 1200;
  background: rgba(255,250,239,.97);
  box-shadow: 0 10px 28px rgba(45,30,15,.3);
}
.kids-photo-title {
  margin: 0 0 2px;
  color: #5a351a;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 800;
  text-align: center;
  letter-spacing: .05em;
}
.kids-photo-price {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #573317;
}
.kids-photo-price > span { font-size: 28px; font-weight: 800; }
.kids-photo-price .kids-photo-amount {
  width: 200px;
  height: 58px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #573317;
  font: 800 45px/1 "M PLUS Rounded 1c",sans-serif;
  letter-spacing: .04em;
  text-align: center;
  box-shadow: none;
  outline: none;
}
.kids-photo-amount::-webkit-inner-spin-button { -webkit-appearance: none; }
.kids-photo-categories {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 7px;
}
.kids-photo-category {
  height: 48px;
  min-width: 0;
  border: 1px solid #ead6b4;
  border-radius: 12px;
  background: linear-gradient(180deg,#fffaf0,#f9edd5);
  color: #684623;
  box-shadow: 0 3px 8px rgba(92,59,20,.08),inset 0 1px 0 #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: inherit;
}
.kids-line-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  color: currentColor;
}
.kids-line-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.kids-photo-category .kids-line-icon { width: 19px; height: 19px; }
.kids-photo-category strong { font-size: 10px; white-space: nowrap; }
.kids-photo-category.active {
  border-color: #ef9e18;
  background: linear-gradient(180deg,#ffb12b,#f19109);
  color: #fff;
  box-shadow: 0 4px 10px rgba(229,133,4,.28),inset 0 1px 0 rgba(255,255,255,.54);
}
.kids-photo-wide-row,
.kids-photo-primary,
.kids-photo-secondary,
.kids-photo-next-row,
.kids-photo-history-row {
  width: 100%;
  min-height: 50px;
  border-radius: 13px;
  font-family: inherit;
  font-weight: 800;
}
.kids-photo-wide-row {
  border: 1px solid #ead7b5;
  background: linear-gradient(180deg,#fffaf0,#faefd9);
  color: #684623;
  box-shadow: 0 3px 8px rgba(92,59,20,.1),inset 0 1px 0 #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
}
.kids-photo-row-icon { width: 20px; height: 20px; color: #8b5d2a; }
.kids-photo-detected {
  display: none;
  margin: -5px 6px 0;
  color: #4e8c3b;
  font-size: 9.5px;
  font-weight: 800;
  text-align: right;
}
.kids-photo-detected.show { display: block; }
.kids-photo-info-box {
  overflow: hidden;
  border: 1px solid #ead7b5;
  border-radius: 13px;
  background: rgba(255,250,239,.76);
  box-shadow: 0 3px 9px rgba(92,59,20,.07),inset 0 1px 0 #fff;
}
.kids-photo-info-row {
  width: 100%;
  min-height: 45px;
  padding: 0 11px;
  border: 0;
  border-bottom: 1px solid #eadcc4;
  background: transparent;
  color: #674522;
  display: grid;
  grid-template-columns: 24px 48px minmax(0,1fr) 14px;
  align-items: center;
  gap: 9px;
  font-family: inherit;
  text-align: left;
}
.kids-photo-info-row:last-child { border-bottom: 0; }
.kids-photo-info-row strong { font-size: 12px; }
.kids-photo-destinations-row {
  padding: 10px 11px 12px;
  background: rgba(255,250,239,.35);
}
.kids-destination-head {
  min-height: 28px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 9px;
  color: #674522;
}
.kids-destination-head strong { font-size: 12px; }
.kids-destination-summary {
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff0ce;
  color: #9b661d;
  font-size: 8px;
  font-weight: 900;
}
.kids-destination-summary.empty { background: #f8e1dd; color: #a65349; }
.kids-destination-options {
  margin-top: 7px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 6px;
}
.kids-destination-option {
  min-width: 0;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #ead7b5;
  border-radius: 11px;
  background: #fffaf0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #704b27;
  font-size: 9px;
  font-weight: 800;
}
.kids-destination-option:has(input:checked) {
  border-color: #efa42d;
  background: #fff0cf;
  box-shadow: inset 0 0 0 1px rgba(239,164,45,.2);
}
.kids-destination-option input {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: #eb961c;
}
.kids-destination-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kids-photo-row-value,
.kids-photo-native-input {
  min-width: 0;
  margin-left: 0;
  color: #704b27;
  font: 700 10px "M PLUS Rounded 1c",sans-serif;
  text-align: right;
}
.kids-photo-native-input {
  width: 100%;
  max-width: none;
  height: 34px;
  padding: 2px 4px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.kids-genre-control {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.kids-photo-genre-select { flex: 1; }
.kids-auto-badge {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 999px;
  background: #e9f3df;
  color: #668047;
  font-size: 7px;
  font-weight: 900;
}
.kids-photo-chevron { margin-left: 2px; font-size: 18px; color: #9a784f; }
.kids-record-mode-switch {
  align-self: center;
  display: grid;
  grid-template-columns: repeat(2,1fr);
  width: 178px;
  padding: 3px;
  border: 1px solid rgba(224,197,154,.9);
  border-radius: 999px;
  background: rgba(239,221,190,.72);
}
.kids-record-mode-switch button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8a6841;
  font: 800 10px "M PLUS Rounded 1c",sans-serif;
}
.kids-record-mode-switch button.active {
  background: #fffaf0;
  color: #714514;
  box-shadow: 0 2px 7px rgba(96,57,15,.12);
}
.kids-photo-primary {
  border: 1px solid #f0a41d;
  background: linear-gradient(180deg,#ffad25,#ef8a05);
  color: #fff;
  box-shadow: 0 5px 12px rgba(213,119,4,.3),inset 0 1px 0 rgba(255,255,255,.55);
  font-size: 16px;
  text-shadow: 0 1px 1px rgba(134,72,0,.25);
}

/* Savings screen */
.kids-photo-goal-select {
  width: 100%;
  height: 34px;
  border: 1px solid #ead7b5;
  border-radius: 10px;
  background: #fffaf0;
  color: #684623;
}
.kids-photo-goal-card {
  min-height: 150px;
  padding: 17px 15px;
  border: 1px solid #ead5b1;
  border-radius: 18px;
  background: rgba(255,250,239,.83);
  box-shadow: 0 4px 12px rgba(92,59,20,.1),inset 0 1px 0 #fff;
  display: flex;
  align-items: center;
  gap: 16px;
}
.kids-photo-goal-emoji {
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(95,57,17,.14));
}
.kids-photo-goal-main { min-width: 0; flex: 1; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px; }
.kids-photo-goal-name { grid-column: 1 / -1; font-size: 12px; text-align: center; }
.kids-photo-goal-numbers { font-size: 18px; font-weight: 800; white-space: nowrap; }
.kids-photo-goal-percent { font-size: 18px; }
.kids-photo-progress {
  grid-column: 1 / -1;
  height: 10px;
  margin-top: 8px;
  border: 1px solid #dac7a6;
  border-radius: 999px;
  overflow: hidden;
  background: #eadfc9;
}
.kids-photo-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#ffae25,#ef920e); }
.kids-photo-quick-amounts { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.kids-photo-quick-amounts button,
.kids-photo-quick-amounts input {
  min-width: 0;
  height: 49px;
  border: 1px solid #ead7b5;
  border-radius: 12px;
  background: linear-gradient(180deg,#fffaf0,#f9edd5);
  color: #684623;
  font: 800 14px "M PLUS Rounded 1c",sans-serif;
  text-align: center;
  box-shadow: 0 3px 8px rgba(92,59,20,.08);
}
.kids-photo-quick-amounts button.active { border-color: #eda021; box-shadow: inset 0 0 0 2px #ffc55c; }
.kids-photo-next-row,
.kids-photo-history-row {
  border: 1px solid #ead7b5;
  background: rgba(255,250,239,.78);
  color: #684623;
  display: grid;
  grid-template-columns: 28px 1fr 18px;
  align-items: center;
  text-align: left;
  padding: 0 12px;
  font-size: 11px;
}
.kids-photo-next-row span:first-child { font-size: 20px; }
.kids-photo-next-row b,
.kids-photo-history-row b { text-align: right; font-size: 17px; color: #a17d50; }
.kids-photo-manage {
  border: 1px solid #ead7b5;
  border-radius: 12px;
  background: rgba(255,250,239,.64);
}
.kids-photo-manage > summary {
  padding: 11px 13px;
  color: #8a6337;
  font-size: 10px;
  font-weight: 800;
  list-style: none;
}
.kids-photo-manage-body { display: flex; flex-direction: column; gap: 9px; padding: 0 10px 10px; }
.kids-photo-manage-body input { height: 42px; border: 1px solid #ead7b5; border-radius: 10px; background: #fffaf0; }
.kids-photo-secondary { border: 1px solid #d9bd91; background: #fff8e9; color: #684623; }
.kids-goal-icon-label { color: #8a6337; font-size: 10px; font-weight: 800; }
.kids-goal-icon-picker {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 5px;
}
.kids-goal-icon-option {
  min-width: 0;
  aspect-ratio: 1;
  padding: 5px;
  border: 1px solid #ead7b5;
  border-radius: 10px;
  background: #fffaf0;
  color: #79552e;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: inherit;
}
.kids-goal-icon-option img { width: 100%; height: 100%; max-width: 50px; max-height: 50px; object-fit: contain; }
.kids-goal-icon-option.active {
  border-color: #ef9e18;
  background: #fff0cf;
  box-shadow: inset 0 0 0 1px #ffc45d;
}

/* Kids report: adult report information, reduced to one glance. */
.kids-report-summary {
  padding: 15px 17px;
  border-radius: 18px;
  background: linear-gradient(145deg,rgba(60,45,31,.96),rgba(43,35,28,.96));
  color: #fff9e9;
  box-shadow: 0 8px 18px rgba(45,29,15,.25);
  display: flex;
  flex-direction: column;
}
.kids-report-summary span { color: #d8c7ad; font-size: 10px; font-weight: 800; }
.kids-report-summary strong { margin: 2px 0; font-size: 30px; line-height: 1.2; }
.kids-report-summary small { color: #e7d9c3; font-size: 9px; font-weight: 700; }
.kids-report-card {
  padding: 13px;
  border: 1px solid #ead7b5;
  border-radius: 16px;
  background: rgba(255,250,239,.8);
  box-shadow: 0 3px 9px rgba(92,59,20,.08);
}
.kids-report-card h2 { margin: 0 0 10px; color: #654322; font-size: 12px; }
.kids-report-category-row {
  display: grid;
  grid-template-columns: 58px 1fr 66px;
  align-items: center;
  gap: 7px;
  margin: 8px 0;
}
.kids-report-category-row > span { font-size: 9px; font-weight: 800; }
.kids-report-category-row > div { height: 8px; overflow: hidden; border-radius: 999px; background: #eadfc9; }
.kids-report-category-row i { display: block; height: 100%; border-radius: inherit; background: var(--bar-color); }
.kids-report-category-row strong { text-align: right; font-size: 9px; }
.kids-report-trend {
  height: 116px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  align-items: end;
  gap: 9px;
}
.kids-report-trend > div { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.kids-report-trend strong { width: 100%; overflow: hidden; color: #8a6841; font-size: 7px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.kids-report-trend i { width: 22px; max-height: 76px; margin: 4px 0; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg,#ffc155,#ec9015); }
.kids-report-trend span { color: #8a6841; font-size: 8px; font-weight: 800; }
.kids-report-record-button {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.kids-report-record-button .kids-line-icon { width: 18px; height: 18px; }
.kids-photo-content-card > .card {
  margin: 0;
  padding: 13px;
  border: 1px solid #ead7b5;
  border-radius: 16px;
  background: rgba(255,250,239,.88);
  box-shadow: 0 3px 9px rgba(92,59,20,.08);
}
.kids-photo-content-card > .card h2 {
  color: #654322;
  font-size: 12px;
}
.kids-photo-content-card .gr-row {
  grid-template-columns: 74px minmax(42px,1fr) 64px;
  gap: 6px;
}
.kids-photo-content-card .gr-chip { padding-inline: 5px; font-size: 9px; }
.kids-photo-content-card .gr-amount { font-size: 9px; }
.kids-photo-content-card .gr-percent { font-size: 8px; }
.kids-photo-content-card .chart-box.wide { height: 190px; }
.kids-photo-content-card .cal-head {
  display: grid;
  grid-template-columns: 32px minmax(0,1fr) 32px;
  gap: 6px;
}
.kids-photo-content-card .cal-head h2 { text-align: center; }
.kids-photo-content-card .cal-head .spacer { display: none; }
.kids-photo-content-card .cal-month-total {
  grid-column: 1 / -1;
  text-align: right;
  font-size: 10px;
}
.kids-photo-content-card .cal-nav { padding: 3px; }
.kids-photo-content-card .cal-grid { gap: 2px; }
.kids-photo-content-card .cal-cell {
  min-width: 0;
  min-height: 46px;
  padding: 3px 1px;
}
.kids-photo-content-card .cal-d { font-size: 9px; }
.kids-photo-content-card .cal-t { font-size: 6.5px; }

/* Family screen */
.kids-family-connection { display: grid; grid-template-columns: 1fr 100px 1fr; align-items: center; margin: -3px 10px 0; }
.kids-family-person { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.kids-family-person img {
  width: 69px;
  height: 69px;
  object-fit: contain;
  border-radius: 50%;
  background: #f5dfb8;
  border: 3px solid #fff8e8;
  box-shadow: 0 3px 8px rgba(93,57,19,.18);
}
.kids-family-person strong { max-width: 90px; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kids-family-heart { display: flex; align-items: center; justify-content: center; gap: 4px; color: #bc8f58; }
.kids-family-heart b { color: #cc7b23; font-size: 22px; }
.kids-family-block {
  overflow: hidden;
  border: 1px solid #ead7b5;
  border-radius: 14px;
  background: rgba(255,250,239,.78);
  box-shadow: 0 3px 8px rgba(92,59,20,.08);
}
.kids-family-block-title { min-height: 31px; padding: 7px 12px 2px; color: #62401f; font-size: 12px; font-weight: 800; }
.kids-family-money-row,
.kids-family-chore {
  width: 100%;
  min-height: 48px;
  padding: 0 11px;
  border: 0;
  border-top: 1px solid #eadcc4;
  background: transparent;
  color: #674522;
  display: grid;
  grid-template-columns: 1fr auto 16px;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  text-align: left;
}
.kids-family-money-row span { font-size: 10px; }
.kids-family-money-row strong { color: #558a34; font-size: 17px; }
.kids-family-money-row b { color: #9b7d58; }
.kids-family-chore { grid-template-columns: 34px 1fr auto 14px; }
.kids-family-chore-icon { font-size: 22px; }
.kids-family-chore strong { font-size: 10px; }
.kids-family-chore b { color: #5c913a; font-size: 14px; }
.kids-family-chore i { font-style: normal; color: #9b7d58; }
.kids-family-chore.pending { opacity: .66; }
.kids-photo-empty { margin: 0; padding: 13px; color: #9a805f; font-size: 10px; text-align: center; }
.kids-photo-history-row span { font-size: 18px; }
.kids-family-manage .settings-drawer,
.kids-family-manage .card { background: #fffaf0; }

/* Settings screen */
.kids-photo-settings-menu {
  overflow: hidden;
  border: 1px solid #ead7b5;
  border-radius: 14px;
  background: rgba(255,250,239,.82);
  box-shadow: 0 4px 12px rgba(92,59,20,.1),inset 0 1px 0 #fff;
}
.kids-photo-settings-menu button {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 0;
  border-bottom: 1px solid #eadcc4;
  background: transparent;
  color: #674522;
  display: grid;
  grid-template-columns: 28px 1fr 16px;
  align-items: center;
  text-align: left;
  font-family: inherit;
}
.kids-photo-settings-menu button:last-child { border-bottom: 0; }
.kids-photo-settings-menu button span { font-size: 18px; }
.kids-photo-settings-menu button strong { font-size: 12px; }
.kids-photo-settings-menu button b { font-size: 17px; color: #9a784f; }
.kids-settings-menu-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.kids-photo-settings-menu button .kids-settings-menu-copy strong { font-size: 12px; }
.kids-photo-settings-menu button .kids-settings-menu-copy small {
  overflow: hidden;
  color: #9b7e5b;
  font-size: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kids-settings-router {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  transition: height .32s cubic-bezier(.22,.72,.28,1);
}
.kids-settings-pane {
  width: 100%;
  transition: opacity .3s ease, transform .34s cubic-bezier(.22,.72,.28,1);
  will-change: opacity,transform;
}
.kids-settings-top {
  position: relative;
  opacity: 1;
  transform: translateX(0);
}
.kids-settings-detail {
  position: absolute;
  left: 0;
  top: 0;
  opacity: .5;
  pointer-events: none;
  transform: translateX(104%);
}
.kids-settings-router.show-detail .kids-settings-top {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-28%);
}
.kids-settings-router.show-detail .kids-settings-detail {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
.kids-settings-detail-head {
  min-height: 36px;
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
}
.kids-settings-detail-head .kids-photo-title {
  margin: 0;
  text-align: center;
}
.kids-settings-back {
  width: 34px;
  height: 34px;
  padding: 0 0 3px;
  border: 1px solid #e4cfaa;
  border-radius: 50%;
  background: rgba(255,250,239,.92);
  color: #815a30;
  box-shadow: 0 3px 8px rgba(92,59,20,.1);
  font: 800 26px/1 "M PLUS Rounded 1c",sans-serif;
}
.kids-photo-legal { display: flex; justify-content: center; gap: 12px; margin: 7px 0; color: #9d805a; font-size: 9px; }
.kids-photo-legal a { color: inherit; text-decoration: none; }
.kids-photo-settings-details {
  border: 0;
  border-radius: 18px;
  background: transparent;
}
.kids-photo-settings-details > summary {
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid #ead7b5;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,253,246,.95), rgba(255,244,223,.91));
  box-shadow: 0 6px 16px rgba(92,59,20,.12), inset 0 1px 0 #fff;
  color: #694621;
  display: grid;
  grid-template-columns: 38px 1fr 20px;
  align-items: center;
  gap: 9px;
  list-style: none;
  cursor: pointer;
}
.kids-photo-settings-details > summary::-webkit-details-marker { display: none; }
.kids-settings-summary-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(145deg, #eba85a, #c87223);
  box-shadow: 0 3px 8px rgba(166,91,24,.25), inset 0 1px 0 rgba(255,255,255,.45);
  color: #fffaf0;
  display: grid;
  place-items: center;
  font-size: 18px;
  text-shadow: 0 1px 2px rgba(87,46,12,.25);
}
.kids-settings-summary-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kids-settings-summary-copy strong { font-size: 12px; }
.kids-settings-summary-copy small { color: #9a7a53; font-size: 8.5px; font-weight: 650; }
.kids-photo-settings-details > summary > b {
  color: #a17d52;
  font-size: 18px;
  text-align: center;
  transition: transform .2s ease;
}
.kids-photo-settings-details[open] > summary > b { transform: rotate(180deg); }
.kids-photo-settings-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 10px 0 0;
}
.kids-photo-settings-body > .card {
  margin: 0;
  padding: 13px;
  border: 1px solid #ead7b5;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,253,246,.94), rgba(255,246,228,.9));
  box-shadow: 0 5px 14px rgba(92,59,20,.1), inset 0 1px 0 #fff;
}
.kids-photo-settings-body > .card h2 {
  margin: 0 0 5px;
  color: #66431f;
  font-size: 13px;
}
.kids-photo-settings-body > .card .muted {
  margin: 3px 0 9px;
  color: #9a7a53;
  font-size: 9px;
  line-height: 1.55;
}
.kids-photo-settings-body > .card > .row {
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
}
.kids-photo-settings-body > .card .field {
  width: 100%;
  gap: 4px;
  color: #7e5c35;
  font-size: 9px;
  font-weight: 800;
}
.kids-photo-settings-body > .card input,
.kids-photo-settings-body > .card select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #e7d3af;
  border-radius: 12px;
  background: rgba(255,253,247,.94);
  color: #62401f;
  box-shadow: inset 0 1px 3px rgba(91,57,20,.07);
  font-family: inherit;
}
.kids-photo-settings-body > .card button,
.kids-photo-settings-body > .card .link-btn {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
}
.kids-photo-settings-body > .card button.primary {
  border: 1px solid #cc761f;
  background: linear-gradient(145deg, #f1aa52, #d47a24);
  box-shadow: 0 3px 8px rgba(166,91,24,.2), inset 0 1px 0 rgba(255,255,255,.4);
  color: #fff;
}
.kids-photo-settings-body > .card .link-btn {
  border: 1px solid #e3cda9;
  background: rgba(255,249,237,.92);
  color: #76502a;
}
.kids-photo-settings-body > .card .link-btn.danger {
  border-color: #e8c3b4;
  color: #ae543c;
}
.kids-settings-toggle-row {
  min-height: 58px;
  padding: 8px 0;
  border-top: 1px solid #eadcc4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.kids-settings-toggle-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kids-settings-toggle-copy strong { color: #694621; font-size: 10px; }
.kids-settings-toggle-copy small { color: #9a7a53; font-size: 8px; line-height: 1.4; }
.kids-settings-switch {
  position: relative;
  width: 43px;
  height: 26px;
  flex: 0 0 auto;
}
.kids-photo-settings-body > .card .kids-settings-switch input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 43px;
  min-height: 26px;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.kids-settings-switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d8c8ae;
  box-shadow: inset 0 1px 3px rgba(84,54,21,.14);
  transition: background .2s ease;
}
.kids-settings-switch i::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fffdf7;
  box-shadow: 0 2px 5px rgba(75,49,21,.24);
  transition: transform .2s ease;
}
.kids-settings-switch input:checked + i { background: #e99a2e; }
.kids-settings-switch input:checked + i::after { transform: translateX(17px); }

body.maneko-reduce-motion *,
body.maneko-reduce-motion *::before,
body.maneko-reduce-motion *::after {
  scroll-behavior: auto !important;
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
}

@media (max-height: 760px) {
  .kids-photo-sheet { top: 208px; }
  .kids-photo-record .kids-photo-scene-maneko,
  .kids-photo-report .kids-photo-scene-maneko { top: 18px; }
  .kids-photo-savings .kids-photo-scene-maneko,
  .kids-photo-family .kids-photo-scene-maneko { top: 14px; }
  .kids-photo-settings .kids-photo-scene-maneko { top: -5px; }
}

/* Home proportions from the approved single-screen concept. */
.kids-home-v3-header {
  left: 18px;
  right: auto;
  top: calc(62px + env(safe-area-inset-top));
}
.kids-map-chip {
  position: absolute;
  right: 17px;
  top: calc(242px + env(safe-area-inset-top));
  z-index: 20;
  width: 57px;
  height: 57px;
  min-height: 57px;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  font-size: 27px;
}
.kids-goal-strip {
  left: 18px;
  right: auto;
  top: calc(145px + env(safe-area-inset-top));
  width: 260px;
  padding: 9px 12px 8px 53px;
  border-radius: 17px;
}
.kids-goal-icon {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.kids-goal-strip .kids-goal-track i {
  background: linear-gradient(90deg,#ffad25,#ef920e);
  box-shadow: 0 0 8px rgba(239,146,14,.28);
}
.kids-goal-strip-top strong { font-size: 10px; }
.kids-goal-meta { font-size: 8.5px; }
.kids-town-open { inset: 0; }
.kids-maneko-v3 {
  bottom: 130px;
  width: 278px;
  height: 390px;
}
.kids-record-fab {
  right: auto;
  left: 50%;
  bottom: 122px;
  width: 88px;
  height: 88px;
  min-height: 88px;
  padding: 0;
  transform: translateX(-50%);
  border: 4px solid #fff3d3;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: radial-gradient(circle at 34% 25%,#ffc34b,#ed8e08 72%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(124,68,2,.38),inset 0 0 0 2px #e7a224;
  text-shadow: 0 2px 2px rgba(132,70,0,.3);
}
.kids-record-fab span { font-size: 27px; line-height: 1; }
.kids-record-fab strong { font-size: 13px; }
.kids-bubble-v3 { bottom: 505px; }

.journey-v3-stage {
  width: 136px;
  max-width: 136px;
  min-height: 66px;
  padding: 7px 55px 7px 19px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 14px;
  background: rgba(255,249,235,.84);
  box-shadow: 0 6px 16px rgba(30,28,22,.2),inset 0 1px 0 #fff;
  color: #654426;
  text-shadow: none;
}
.journey-v3-stage span {
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
}
.journey-v3-stage strong { font-size: 10px; }
.journey-v3-stage > img {
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 54px;
  height: 61px;
  object-fit: contain;
  object-position: bottom;
}
.journey-v3-stage.current { color: #9a5d07; border-color: #f2c66f; }
.journey-v3-stage.future { opacity: .76; }
.journey-v3-marker { width: 82px; }
.journey-v3-marker img { height: 106px; }
