:root {
  /* 地色（温かいクリーム紙） */
  --bg: #f4efe3;
  --card: #fffdf8;
  --tile: #ece3d2;
  --ink: #241f18;
  --muted: #8b8272;
  --line: #e6dcc9;
  /* 野球のパレット */
  --navy: #1f3a5f;
  --navy-deep: #16283f;
  --green: #3a5a40;
  --rust: #b23a2f;
  --wood: #a9752f;
  /* 淡いトーン */
  --navy-soft: #e2e8f1;
  --green-soft: #e2ece2;
  --rust-soft: #f6e4e0;
  --wood-soft: #f2e8d5;
  /* 主アクセント＝濃紺（アイコンと統一） */
  --accent: var(--navy);
  --accent-soft: var(--navy-soft);
  --shadow: 0 1px 2px rgba(36, 31, 24, 0.04), 0 8px 22px rgba(36, 31, 24, 0.06);
  --shadow-sm: 0 1px 2px rgba(36, 31, 24, 0.05);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 27rem; margin: 0 auto; padding: 30px 18px 72px; }

/* 見出しに入れる lucide 線アイコン */
.sec-ico { width: 18px; height: 18px; flex: none; stroke-width: 1.8; color: var(--navy); }

/* ===== ログイン前 ===== */
.gate { text-align: center; padding-top: 6vh; }
.applogo {
  display: block; margin: 0 auto 22px; width: 118px; height: 118px;
  border-radius: 27px; box-shadow: 0 8px 26px rgba(31, 58, 95, 0.2);
}
.kicker { color: var(--wood); font-size: 0.76rem; letter-spacing: 0.16em; margin: 0 0 18px; font-weight: 600; }
.title { font-family: Georgia, "Times New Roman", serif; font-weight: 600; font-size: 1.9rem; line-height: 1.35; margin: 0 0 16px; }
.title.small { font-size: 1.4rem; }
/* 命日〜誕生日：赤い縫い目のあいだに置く */
.memorial {
  display: inline-block; color: var(--navy); letter-spacing: 0.12em; font-size: 0.9rem;
  font-variant-numeric: tabular-nums; margin: 0 0 26px; padding: 10px 4px; position: relative;
}
.memorial::before, .memorial::after {
  content: ""; position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--rust); opacity: 0.55;
}
.memorial::before { top: 0; } .memorial::after { bottom: 0; }
.lead { color: #5a5142; font-size: 0.95rem; margin: 0 0 32px; }

.btn {
  display: inline-block; background: var(--navy); color: #fff; text-decoration: none;
  padding: 13px 30px; border-radius: 11px; font-size: 0.95rem; font-weight: 600;
  border: none; cursor: pointer; box-shadow: var(--shadow-sm);
}
.btn:active { transform: translateY(1px); }
.btn-outline {
  display: inline-block; margin-top: 12px; background: transparent; color: var(--navy);
  text-decoration: none; padding: 12px 28px; border: 1.5px solid var(--navy);
  border-radius: 11px; font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
.btn-outline:active { transform: translateY(1px); }
.sub-note { color: var(--muted); font-size: 0.8rem; margin: 22px 0 0; line-height: 1.7; }

/* ===== ログイン後 ヘッダ ===== */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 16px; border-bottom: 2px solid var(--line); margin-bottom: 22px;
}
.brandwrap { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brandmark { width: 30px; height: 30px; border-radius: 9px; flex: none; box-shadow: var(--shadow-sm); }
.brand { font-weight: 700; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who { color: var(--muted); font-size: 0.8rem; margin: -12px 0 16px; }
.view-toggle { margin: 0 0 20px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--navy-soft); color: var(--navy); border: 1px solid #d3ddea;
  border-radius: 999px; padding: 7px 15px; font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.pill:active { transform: translateY(1px); }
.pill:focus-visible { outline: 2px solid var(--navy); }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.share-btn { padding: 6px 13px; font-size: 0.78rem; }
.share-btn svg { flex: none; }
.inapp-hint { margin: 16px auto 0; max-width: 330px; font-size: 0.78rem; line-height: 1.7; color: var(--navy); background: var(--navy-soft); border: 1px solid #d3ddea; border-radius: 12px; padding: 11px 14px; }

/* ===== 残高カード（スコアボード＝主役） ===== */
.balance-card {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(158deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #f1ece2; border-radius: 20px; padding: 26px 24px 24px;
  box-shadow: 0 12px 32px rgba(22, 40, 63, 0.28); margin-bottom: 26px;
}
.balance-card::before, .balance-card::after {
  content: ""; position: absolute; left: 22px; right: 22px; height: 0;
  border-top: 2px dashed rgba(224, 122, 110, 0.6);
}
.balance-card::before { top: 15px; } .balance-card::after { bottom: 15px; }
.balance-label { color: rgba(241, 236, 226, 0.72); font-size: 0.72rem; letter-spacing: 0.16em; margin: 6px 0 4px; text-transform: uppercase; }
.balance { color: #fff; font-size: 2.9rem; font-weight: 700; letter-spacing: 0.01em; margin: 0 0 20px; font-variant-numeric: tabular-nums; }
.split { display: flex; justify-content: space-around; border-top: 1px solid rgba(255, 255, 255, 0.16); padding-top: 16px; }
.split div { display: flex; flex-direction: column; gap: 3px; }
.split-label { color: rgba(241, 236, 226, 0.62); font-size: 0.72rem; }
.split-val { color: #fff; font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ===== 汎用 ===== */
.center { text-align: center; padding-top: 18vh; }
.muted { color: var(--muted); }
.small-note { font-size: 0.8rem; margin: 12px 2px 0; }
.mini-note { font-size: 0.72rem; margin: -2px 0 8px; }
.note { color: var(--muted); font-size: 0.8rem; margin: 22px 2px 0; }
.stub { color: var(--muted); font-size: 0.8rem; margin: 28px 2px 0; padding-top: 16px; border-top: 1px dashed var(--line); }

.section-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 700; margin: 0 0 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.section-head .section-title { margin: 0; }

.form { display: flex; flex-direction: column; gap: 15px; text-align: left; margin: 6px 0 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 11px;
  font-size: 1rem; background: var(--card); color: var(--ink);
}
.input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-soft); }

.link { display: inline-block; margin-top: 16px; background: none; border: none; color: var(--muted); font-size: 0.85rem; text-decoration: underline; cursor: pointer; padding: 4px; }
.link:focus-visible { outline: 2px solid var(--navy); }

/* ===== カード共通 ===== */
.block { margin-bottom: 28px; }
.approvals { background: var(--card); border: 1px solid #d7c98f; border-left: 4px solid var(--wood); border-radius: 14px; padding: 16px 16px 8px; margin-bottom: 22px; box-shadow: var(--shadow); }
.count { color: var(--wood); font-weight: 800; }
.approvals-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.approval { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.approval:last-child { border-bottom: none; }
.approval-name { font-weight: 700; font-size: 0.95rem; }
.approval-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.mini { border: 1.5px solid var(--line); border-radius: 9px; padding: 7px 12px; font-size: 0.82rem; background: var(--card); color: var(--ink); cursor: pointer; font-weight: 600; }
.mini:active { transform: translateY(1px); }
.mini:focus-visible { outline: 2px solid var(--navy); }
.mini.ok { border-color: var(--green); color: var(--green); }
.mini.ok-strong { background: var(--green); border-color: var(--green); color: #fff; }
.mini.danger { border-color: var(--rust); color: var(--rust); }

.link-row { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.small-select { flex: 1; padding: 8px 10px; font-size: 0.82rem; }

/* 参加者一覧 */
.people-list { list-style: none; margin: 14px 0 0; padding: 0; }
.person { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.person-meta { font-size: 0.72rem; color: var(--muted); }
.merge-row { flex-basis: 100%; width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
.merge-label { flex-basis: 100%; width: 100%; font-size: 0.76rem; color: var(--muted); }
.person:last-child { border-bottom: none; }
.person-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.person-name { font-size: 0.92rem; font-weight: 600; }
.person-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.person-right { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.person-badge { font-size: 0.68rem; padding: 2px 9px; border-radius: 999px; flex: none; font-weight: 600; }
.person-badge.on { color: var(--green); background: var(--green-soft); }
.person-badge.off { color: var(--muted); background: var(--bg); border: 1px solid var(--line); }
.person-badge.role-editor { color: var(--navy); background: var(--navy-soft); }
.person-badge.role-viewer { color: var(--muted); background: var(--bg); border: 1px solid var(--line); }

/* ===== 記録パネル（editor） ===== */
.record { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 26px; box-shadow: var(--shadow); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tab { flex: 1 1 auto; padding: 9px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 0.84rem; font-weight: 600; cursor: pointer; }
.tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.panel { margin: 0; }

/* ===== 開催・寄贈のリスト ===== */
.records { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.record { background: var(--card); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; box-shadow: var(--shadow-sm); }
.record.static { padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.record-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; background: none; border: none; cursor: pointer; text-align: left; color: var(--ink); font: inherit; }
.rec-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
.badge { flex: none; font-size: 0.7rem; font-weight: 700; color: var(--navy); background: var(--navy-soft); padding: 3px 9px; border-radius: 7px; }
.badge.kind-drink { color: var(--wood); background: var(--wood-soft); }
.badge.kind-golf { color: var(--green); background: var(--green-soft); }
.badge.kind-baseball { color: var(--navy); background: var(--navy-soft); }
.badge.kind-other { color: var(--muted); background: #ece7dd; }
.badge.alt { color: var(--rust); background: var(--rust-soft); }
.rec-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.92rem; font-weight: 500; }
.rec-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.rec-amount { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.95rem; color: var(--green); }
.record.static .rec-amount { color: var(--rust); }
.rec-date { color: var(--muted); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.record-detail { padding: 0 15px 14px; border-top: 1px solid var(--line); }
.rec-note { color: var(--muted); font-size: 0.82rem; margin: 12px 0 6px; }

/* 開催の修正フォーム（editor） */
/* 閲覧者プレビュー中は開催カード内の管理者UIを隠す（viewer と同じ見た目に） */
.preview-on .edit-bar,
.preview-on .event-edit,
.preview-on .photo-upload,
.preview-on .photo-actions,
.preview-on .memory-actions { display: none !important; }
.edit-bar { display: flex; justify-content: flex-end; margin: 10px 0 2px; }
.edit-event-btn { margin-top: 0; }
.event-edit { display: flex; flex-direction: column; gap: 13px; background: var(--tile); border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; margin: 4px 0 12px; }
.event-edit .checks { max-height: 200px; }
.edit-actions { display: flex; align-items: center; gap: 16px; margin-top: 2px; }
.edit-actions .btn { padding: 11px 26px; }
.edit-actions .link { margin-top: 0; }

/* 参加者チェック（拠出） */
.search-input { margin-bottom: 8px; }
.tag-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tag-chip { border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 999px; padding: 4px 12px; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.tag-chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.checks { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; border: 1.5px solid var(--line); border-radius: 11px; padding: 8px 10px; background: var(--card); }
.check { display: flex; align-items: center; gap: 10px; padding: 7px 2px; font-size: 0.92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--navy); flex: none; }

/* 開催詳細 */
.detail-total { font-weight: 700; margin: 12px 0 4px; color: var(--green); }
.detail-sub { color: var(--muted); font-size: 0.82rem; margin: 10px 0 8px; font-weight: 600; }
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 0.82rem; padding: 4px 11px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); }
.tag-mini { font-size: 0.66rem; background: var(--wood-soft); color: var(--wood); padding: 1px 8px; border-radius: 999px; font-weight: 600; }

/* ===== この基金について ===== */
.story-blocks { display: flex; flex-direction: column; gap: 14px; }
.story-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 17px; box-shadow: var(--shadow-sm); }
.story-label { font-size: 0.92rem; font-weight: 700; margin: 0 0 8px; color: var(--navy); }
.story-body { white-space: pre-wrap; font-size: 0.92rem; margin: 0; line-height: 1.9; }
.story-meta { color: var(--muted); font-size: 0.72rem; margin: 10px 0 0; }
.story-textarea { width: 100%; min-height: 120px; resize: vertical; font-family: inherit; line-height: 1.8; }
.story-actions { display: flex; gap: 8px; margin-top: 10px; }
.special-edit { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }

/* ===== 写真 ===== */
.photos { margin: 6px 0 4px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo-cell { position: relative; }
.photo-thumb { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; display: block; background: var(--tile); }
.photo-badge { position: absolute; top: 5px; left: 5px; font-size: 0.65rem; background: rgba(22, 40, 63, 0.82); color: #fff; padding: 2px 7px; border-radius: 6px; font-weight: 600; }
.photo-actions { display: flex; gap: 4px; margin-top: 4px; }
.photo-actions .mini { padding: 4px 8px; font-size: 0.72rem; }
.photo-upload { margin-top: 12px; }
.small-btn { padding: 8px 16px; font-size: 0.85rem; }

/* ===== スライドショー ===== */
.slideshow { position: fixed; inset: 0; z-index: 100; background: #0d0c0b; display: flex; flex-direction: column; }
.ss-stage { position: relative; flex: 1; overflow: hidden; }
.ss-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 1.1s ease; }
@media (prefers-reduced-motion: reduce) { .ss-img { transition: opacity 0.2s linear; } }
.ss-close { position: absolute; top: 12px; right: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.ss-controls { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
.ss-ctrl { min-width: 56px; padding: 10px 16px; border: none; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 0.95rem; cursor: pointer; }
.ss-ctrl:active { background: rgba(255, 255, 255, 0.24); }

/* ===== 折りたたみ ===== */
.collapse-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: none; border: none; padding: 0; cursor: pointer; color: var(--ink); }
.collapse-head .section-title { margin: 0; }
.collapse-head .chev { color: var(--muted); transition: transform 0.2s; }
.collapse-head.open .chev { transform: rotate(180deg); }
.collapse-body { margin-top: 14px; }

/* ===== 歩み（年表） ===== */
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { position: relative; display: flex; gap: 13px; padding: 0 0 18px 4px; }
.tl-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; background: var(--green); position: relative; box-shadow: 0 0 0 3px var(--green-soft); }
.tl-item:not(:last-child) .tl-dot::after { content: ""; position: absolute; left: 50%; top: 13px; transform: translateX(-50%); width: 2px; height: calc(100% + 18px); background: var(--line); }
.tl-disb .tl-dot { background: var(--rust); box-shadow: 0 0 0 3px var(--rust-soft); }
.tl-date { color: var(--muted); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.tl-title { font-size: 0.92rem; font-weight: 600; }
.tl-sub { color: var(--muted); font-size: 0.8rem; }

/* ===== 監査ログ ===== */
.audit-list { list-style: none; margin: 0; padding: 0; }
.audit-item { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.85rem; flex-wrap: wrap; }
.audit-item:last-child { border-bottom: none; }
.audit-act { font-weight: 600; }
.audit-who { color: var(--navy); font-weight: 600; }
.audit-when { color: var(--muted); font-size: 0.72rem; margin-left: auto; font-variant-numeric: tabular-nums; }

/* ===== 特別日モーダル ===== */
.modal { position: fixed; inset: 0; z-index: 120; background: rgba(20, 18, 16, 0.58); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-card { position: relative; overflow: hidden; background: var(--card); border-radius: 20px; padding: 34px 26px 28px; max-width: 22rem; text-align: center; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32); }
.modal-card::before, .modal-card::after { content: ""; position: absolute; left: 22px; right: 22px; height: 0; border-top: 2px dashed var(--rust); opacity: 0.5; }
.modal-card::before { top: 14px; } .modal-card::after { bottom: 62px; }
.modal-title { font-family: Georgia, serif; font-weight: 600; font-size: 1.35rem; margin: 6px 0 14px; color: var(--navy); }
.modal-body { white-space: pre-wrap; line-height: 1.95; font-size: 0.95rem; margin: 0 0 22px; }

/* 開催カバー写真・続きを見る */
.rec-cover { width: 100%; height: 172px; object-fit: cover; display: block; cursor: pointer; border-top: 1px solid var(--line); background: var(--tile); }
.more-wrap { text-align: center; margin-top: 6px; }
.show-more { color: var(--navy); font-weight: 700; text-decoration: none; }
.show-more::after { content: " ›"; }

/* みんなの想い出 */
.memory-compose { display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.memory-compose-row { display: flex; align-items: center; gap: 10px; }
.memory-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.memory-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; box-shadow: var(--shadow-sm); }
.memory-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.memory-author { font-weight: 700; font-size: 0.9rem; color: var(--navy); }
.memory-date { color: var(--muted); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.memory-body { white-space: pre-wrap; font-size: 0.92rem; line-height: 1.9; margin: 0; }
.memory-photos { margin-top: 10px; }
.memory-actions { margin-top: 10px; }
.memory-body.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* 想い出 専用ページ */
.page-overlay { position: fixed; inset: 0; z-index: 90; background: var(--bg); overflow-y: auto; padding: 16px 18px calc(40px + env(safe-area-inset-bottom)); }
.page-head { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; background: var(--bg); padding: 8px 0 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.page-title { font-weight: 700; font-size: 1rem; }
.page-list { max-width: 27rem; margin: 0 auto; }

/* 投稿の注意・同意 */
.consent { display: flex; align-items: flex-start; gap: 9px; font-size: 0.78rem; color: var(--muted); line-height: 1.7; cursor: pointer; }
.consent input { width: 18px; height: 18px; flex: none; margin-top: 2px; accent-color: var(--navy); }

/* 投稿前の写真プレビュー（個別に外せる） */
.memo-preview { display: flex; flex-wrap: wrap; gap: 10px; }
.memo-preview-cell { position: relative; width: 72px; height: 72px; }
.memo-preview-img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); display: block; }
.memo-preview-x { position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border-radius: 50%; border: none; background: var(--rust); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.media-badge { position: absolute; bottom: 4px; left: 4px; font-size: 0.6rem; background: rgba(22, 40, 63, 0.85); color: #fff; padding: 1px 6px; border-radius: 5px; }

/* 想い出の動画・容量ゲージ */
/* 動画はサムネイル表示（タップで全画面再生） */
.video-cell .photo-thumb { background: #000; }
.video-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.video-play svg { width: 42px; height: 42px; color: #fff; background: rgba(22, 40, 63, 0.6); border-radius: 50%; padding: 11px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.video-overlay { position: fixed; inset: 0; z-index: 115; background: #0d0c0b; display: flex; align-items: center; justify-content: center; padding: 20px; }
.video-el { max-width: 100%; max-height: 100%; border-radius: 8px; }
.storage-gauge { margin-top: 12px; }
.gauge-label { font-size: 0.78rem; color: var(--muted); margin-bottom: 5px; }
.gauge-bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.gauge-bar span { display: block; height: 100%; background: var(--navy); }

/* まとめ・バックアップ */
.ops-buttons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.report { max-width: 30rem; margin: 0 auto; }
.report-inner { padding: 4px 2px 40px; }
.report-kicker { color: var(--wood); font-size: 0.75rem; letter-spacing: 0.14em; margin: 0 0 4px; font-weight: 700; }
.report-title { font-family: Georgia, serif; font-size: 1.55rem; margin: 0 0 6px; }
.report-memorial { color: var(--navy); font-size: 0.85rem; letter-spacing: 0.06em; margin: 0 0 2px; }
.report-date { color: var(--muted); font-size: 0.8rem; margin: 0 0 18px; }
.report-balance { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 16px; border: 2px solid var(--navy); border-radius: 12px; }
.report-balance strong { font-size: 1.9rem; font-variant-numeric: tabular-nums; color: var(--navy); }
.report-split { display: flex; gap: 12px; margin: 10px 0 22px; }
.report-split div { flex: 1; display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.report-split span { color: var(--muted); font-size: 0.72rem; }
.report-split strong { font-variant-numeric: tabular-nums; }
.report-h2 { font-size: 1rem; margin: 22px 0 8px; padding-bottom: 4px; border-bottom: 2px solid var(--line); }
.report-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.report-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px; border-bottom: 1px solid var(--line); }
.report-table td { padding: 6px; border-bottom: 1px solid var(--line); }
.report-table .r { text-align: right; font-variant-numeric: tabular-nums; }
.report-foot { color: var(--muted); font-size: 0.78rem; margin-top: 20px; }

@media print {
  body * { visibility: hidden; }
  #reportPage, #reportPage * { visibility: visible; }
  #reportPage { position: absolute; inset: 0; background: #fff; overflow: visible; z-index: 999; padding: 0; }
  .no-print { display: none !important; }
}
