/* スマホ縦持ち・片手操作が前提 */
:root {
  --bg: #faf8f3; /* ほんのり紙っぽい白（2026-11-06 ユーザーの希望。見本を4回見て決めた） */
  --card: #ffffff;
  --text: #1f2933;
  --muted: #61707f;
  --line: #d9e0e6;
  --primary: #2f80c8;
  --primary-text: #ffffff;
  --danger: #c8412f;
  --ok-bg: #e6f5ea;
  --ok-text: #22693a;
  --error-bg: #fdecea;
  --error-text: #a3261a;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

body.kid { font-size: 19px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 700; color: var(--text); text-decoration: none; }

.logout { margin: 0; }

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

h1 { font-size: 1.4em; margin: 8px 0 16px; display: flex; align-items: center; gap: 8px; }
h2 { font-size: 1.1em; margin: 28px 0 10px; }

a { color: var(--primary); }

.lead { margin-top: 0; }
.note { color: var(--muted); font-size: 0.92em; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.field { display: block; margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.label { display: block; font-weight: 600; margin-bottom: 6px; padding: 0; }
.req { margin-left: 6px; font-size: 0.75em; color: var(--danger); font-weight: 600; }
.hint { display: block; color: var(--muted); font-size: 0.85em; margin-top: 4px; }
.error { display: block; color: var(--error-text); font-size: 0.9em; margin-top: 4px; font-weight: 600; }

input[type="text"], input[type="password"], input[type="email"], input[type="date"] {
  width: 100%;
  font-size: 17px; /* 16px以上にしてiPhoneの自動拡大を防ぐ */
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

.has-error input { border-color: var(--error-text); }

/* パスワード欄の目のマーク */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 56px; }
button.pw-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 52px;
  height: 100%;
  min-height: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  color: var(--muted);
}
button.pw-toggle[hidden] { display: none; }
.pw-toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pw-toggle .eye-closed { display: none; }
.pw-toggle[aria-pressed="true"] .eye-open { display: none; }
.pw-toggle[aria-pressed="true"] .eye-closed { display: block; }

/* 連打しても iPhone のダブルタップで拡大しない（2本指の拡大はそのまま。2026-11-16 ユーザー） */
button, .button, a, input, select, label, [role="button"], .tap-card { touch-action: manipulation; }
button, .button {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius);
  font-size: 1em;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

/* ボタンの種類：送信（追加・保存など）＝青＋紙飛行機、取り消し系＝赤、画面を移るだけ（戻る・編集）＝うすい青 */
button.primary, .button.primary { background: var(--primary); color: var(--primary-text); }
button.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button.primary::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask: var(--plane) center / contain no-repeat;
  mask: var(--plane) center / contain no-repeat;
}
:root {
  --plane: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M22 2L11 13'/%3E%3Cpath d='M22 2l-7 20-4-9-9-4z'/%3E%3C/svg%3E");
  --nav-bg: #dcebfa;
  --nav-text: #1d5a96;
}
.danger { background: var(--danger); color: #fff; }
.nav, .button.nav { background: var(--nav-bg); color: var(--nav-text); }
.back-row { margin: 16px 0 0; }

button.link {
  display: inline;
  width: auto;
  min-height: 0;
  padding: 8px 4px;
  background: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9em;
}
button.logout-button { display: inline-flex; align-items: center; gap: 6px; }
.exit-icon { width: 22px; height: 22px; fill: none; stroke: #1f8a4c; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.flash { padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.flash.ok { background: var(--ok-bg); color: var(--ok-text); }
.flash.error { background: var(--error-bg); color: var(--error-text); }

.menu { display: grid; gap: 12px; margin-bottom: 16px; }
.menu-item {
  display: block;
  padding: 18px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

/* 追加の画面へ進むボタンは緑 */
.button.add-nav { background: #2f9e55; color: #fff; }

/* パンくずメニュー（いまいる画面までの道順） */
.crumbs { margin: 0 0 8px; font-size: 0.85em; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
.crumbs li { display: inline-flex; align-items: center; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 6px; color: var(--muted); }
.crumbs a { color: var(--primary); text-decoration: none; padding: 6px 0; }
.crumbs [aria-current] { color: var(--text); font-weight: 600; }

.members { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.member {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}
.member .dot { grid-row: span 2; }
.member-name { font-weight: 700; }
.member-meta { color: var(--muted); font-size: 0.85em; }
.member.inactive { opacity: 0.6; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0 0 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.choices { display: flex; gap: 10px; flex-wrap: wrap; }
.choice {
  flex: 1 1 120px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.choice.disabled { color: var(--muted); }

.colors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 0.8em;
}
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch:has(input:checked) { border-color: var(--text); background: #fff; }
.swatch input:focus-visible + .dot { outline: 3px solid var(--primary); outline-offset: 2px; }

.dot { display: inline-block; width: 22px; height: 22px; border-radius: 50%; flex: none; }
.swatch .dot { width: 32px; height: 32px; }

/* 表示色（src/users.js の COLORS と対応） */
.color-e5534b { background: #e5534b; }
.color-f08c2e { background: #f08c2e; }
.color-d4a514 { background: #d4a514; }
.color-3fa34d { background: #3fa34d; }
.color-2fa4d8 { background: #2fa4d8; }
.color-3b6fd8 { background: #3b6fd8; }
.color-8a5cd1 { background: #8a5cd1; }
.color-e0609a { background: #e0609a; }

/* ---- ステップ2：設定画面 ---- */
select {
  width: 100%;
  font-size: 17px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

.items { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.item {
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.item.inactive { opacity: 0.6; }
.item-main { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.item-name { font-weight: 700; overflow-wrap: anywhere; }
.item-name .dot { width: 0.8em; height: 0.8em; vertical-align: -0.04em; margin-right: 0.3em; } /* 名前の文字と高さをそろえる（2026-11-17 ユーザー） */
.item-amount { font-weight: 700; white-space: nowrap; }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--muted);
  font-size: 0.8em;
}
.tag .dot { width: 12px; height: 12px; }

.row-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.row-actions form { margin: 0; }
button.icon {
  width: 48px;
  min-height: 44px;
  padding: 0;
  background: var(--primary); /* 並べ替えはすぐ送信するので青（小さいので紙飛行機なし） */
  color: var(--primary-text);
  font-size: 1.1em;
}
button.icon:disabled { opacity: 0.35; cursor: default; }
.icon-link {
  margin-left: auto;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--nav-bg); /* 編集は画面を移るだけなので、うすい青 */
  color: var(--nav-text);
  font-weight: 700;
  text-decoration: none;
}

.add-row { margin: 0 0 16px; }
.add-row .field { margin-bottom: 8px; }

.badge {
  font-size: 0.6em;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--muted);
  font-weight: 600;
}

.card-title { margin-top: 0; display: flex; align-items: center; gap: 8px; }
.current { margin-top: 0; }

.confirm-box {
  margin: 0 0 16px;
  padding: 14px;
  border: 2px solid #e2a514;
  border-radius: var(--radius);
  background: #fff8e6;
}
.confirm-q { margin: 0 0 10px; font-size: 1.2em; font-weight: 700; }
.confirm-box .note { margin: 8px 0 0; }

.history { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 0.9em; }
.history caption { text-align: left; font-weight: 600; padding-bottom: 6px; }
.history th, .history td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.history th { color: var(--muted); font-weight: 600; }

.hidden-list { margin-bottom: 16px; }
.hidden-list summary { cursor: pointer; color: var(--muted); padding: 8px 0; }

[hidden] { display: none !important; }

/* ---- ステップ3：報告 ---- */
.button.big { min-height: 64px; font-size: 1.15em; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; }
.button.small { min-height: 40px; padding: 8px 16px; width: auto; display: inline-block; margin-left: auto; }

.pick { margin-bottom: 12px; }
.pick-title { font-size: 1em; margin: 0 0 8px; }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.pick-item.on { background: var(--primary); border-color: var(--primary); color: #fff; }
/* 子供の札は、選んだらその子の色（2026-11-16 ユーザー）。丸は白いふちで見えるように */
.pick-item.on:has(.color-e5534b) { background: #e5534b; border-color: #e5534b; }
.pick-item.on:has(.color-f08c2e) { background: #f08c2e; border-color: #f08c2e; }
.pick-item.on:has(.color-d4a514) { background: #d4a514; border-color: #d4a514; }
.pick-item.on:has(.color-3fa34d) { background: #3fa34d; border-color: #3fa34d; }
.pick-item.on:has(.color-2fa4d8) { background: #2fa4d8; border-color: #2fa4d8; }
.pick-item.on:has(.color-3b6fd8) { background: #3b6fd8; border-color: #3b6fd8; }
.pick-item.on:has(.color-8a5cd1) { background: #8a5cd1; border-color: #8a5cd1; }
.pick-item.on:has(.color-e0609a) { background: #e0609a; border-color: #e0609a; }
.pick-item.on .dot { box-shadow: 0 0 0 2px #fff; }
.pick-row.dates .pick-item { min-width: 72px; justify-content: center; }

.form-title { font-size: 1.05em; margin: 4px 0 10px; }
.chore-list { display: grid; gap: 8px; margin-bottom: 20px; }
.chore-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.chore-row:not(.check) { grid-template-columns: 1fr auto; }
.chore-row input[type="checkbox"] { width: 28px; height: 28px; }
.chore-row:has(input:checked) { border-color: var(--primary); background: #eef5fc; }
.chore-row.full { background: #f1f3f5; color: var(--muted); }
.chore-info { display: flex; flex-direction: column; }
.chore-name { font-weight: 700; }
.chore-price { font-size: 0.9em; color: var(--muted); }
.chore-left { font-size: 0.8em; color: var(--muted); grid-column: 1 / -1; }
.chore-row.check .chore-left:empty { display: none; }
.chore-row .error { grid-column: 1 / -1; }
.qty { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.qty input { width: 80px; font-size: 17px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; text-align: right; }

.choices.column { flex-direction: column; }
.choices.column .choice { flex: none; }
.total { font-size: 1.2em; text-align: right; margin: 8px 0 12px; }
.total strong { font-size: 1.3em; }

.report .status { font-weight: 700; }
.status-approved .status { background: var(--ok-bg); color: var(--ok-text); }
.status-rejected .status { background: var(--error-bg); color: var(--error-text); }
.status-cancelled { opacity: 0.6; }

/* 報告：日付はフォームの中のラジオボタン（見た目はボタン）、数量の項目もチェックボックス */
fieldset.pick { border: 0; padding: 0; min-width: 0; margin: 0 0 12px; }
legend.pick-title { padding: 0; font-weight: 700; }
.pick-item input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.pick-item:has(input:checked) { background: var(--primary); border-color: var(--primary); color: #fff; }
.pick-item:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.chore-row { grid-template-columns: 1fr auto; }
.chore-check { display: flex; align-items: center; gap: 12px; }
.chore-check input[type="checkbox"] { width: 28px; height: 28px; flex: none; }
.chore-row .chore-left:empty { display: none; }

/* 報告できなかったときの、いちばん上のお知らせ */
.flash.failed { border: 2px solid var(--error-text); font-size: 1.05em; }
.chore-row.has-error, .chore-row.has-error:has(input:checked) { border-color: var(--error-text); background: var(--error-bg); }

/* ---- ステップ4：承認 ---- */
.waiting-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 2px 12px;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.waiting-card.has-waiting { border: 2px solid #e2a514; background: #fff8e6; }
.waiting-label { font-weight: 700; }
.waiting-count strong { font-size: 1.8em; }
.waiting-note { grid-column: 1 / -1; color: var(--muted); font-size: 0.8em; }

.filter { margin-bottom: 12px; }
.select-all { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 600; }
.select-all input, .approval-check > input { width: 26px; height: 26px; flex: none; }
.approval-check { display: flex; gap: 12px; align-items: flex-start; }
.approval-body { display: block; flex: 1; min-width: 0; }
.item.approval:has(input:checked) { border-color: var(--primary); background: #eef5fc; }
.memo { display: block; margin: 6px 0 0; font-size: 0.9em; }
.trail { list-style: none; margin: 8px 0 0; padding: 0; font-size: 0.8em; color: var(--muted); }
.trail li.superseded { text-decoration: line-through; }
.trail .when { margin-left: 6px; }
.status-split .status, .status-one_more .status { background: #fff3d6; color: #8a5a00; }
/* 承認画面の枠（2026-11-20。見本 docs/mock/apprframe）：お手伝い・毎日 Mission（ルーティンごと）・努力 Mission。1件1行 */
.ap-box { background: #fff; border: 1px solid #e3e6ea; border-radius: 14px; padding: 8px; margin-bottom: 10px; }
.ap-h { margin: 0 2px 6px; font-size: 15px; font-weight: 900; color: #2c3e50; }
/* 努力 Mission：見出しは毎日 Mission と同じく枠の外。黄色い枠には報告だけ（2026-11-20） */
.ap-effort { border: 2px solid #e8b84a; background: #fff9e8; border-radius: 12px; padding: 6px 6px 1px; }
.ap-effort .ap-rows > .ap-row { border: 1px solid #f0dca8; border-radius: 10px; margin-bottom: 5px; background: #fff; }
.ap-rt .ap-rows > .ap-row:last-child { border-radius: 0 0 10px 10px; }
.ap-rows { list-style: none; margin: 0; padding: 0; }
.ap-row { border-top: 1px solid #e6edf3; }
.ap-box > .ap-rows > .ap-row, .others-turn .ap-row { border: 1px solid #e3e8ee; border-radius: 10px; margin-bottom: 5px; background: #fff; }
.ap-check { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 14px; cursor: pointer; }
.ap-check > input { width: 20px; height: 20px; flex: none; margin: 0; }
.ap-name { flex: 1; min-width: 0; font-weight: 800; line-height: 1.3; }
.ap-name small { font-weight: 700; color: #6b7884; font-size: 11px; margin-left: 4px; }
.ap-name .dot { width: 9px; height: 9px; margin-right: 3px; vertical-align: 1px; }
.ap-amount { font-weight: 900; white-space: nowrap; }
.ap-row:has(.ap-check input:checked) { background: #eef5fc; }
.ap-row.status-one_more .ap-name small, .ap-row.status-split .ap-name small { color: #8a5a00; }
.ap-more { padding: 0 8px 6px 36px; font-size: 13px; }
.ap-more .trail { margin: 2px 0 0; }
.ap-rt { position: relative; border: 2px solid #b9d3ea; border-radius: 12px; margin-bottom: 12px; background: #fff; }
.ap-rt:last-child { margin-bottom: 0; }
.ap-rt-head { display: flex; align-items: center; gap: 6px; background: #dceaf7; padding: 5px 8px; border-radius: 10px 10px 0 0; font-size: 14px; font-weight: 900; white-space: nowrap; }
.ap-rt-date { flex: none; font-size: 11px; font-weight: 800; color: #5a6b7b; background: #fff; border-radius: 7px; padding: 1px 6px; }
.ap-rt-time { flex: none; color: #2c6aa5; }
.ap-rt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ap-rt.done { border-color: #7fd0a6; }
.ap-rt.done .ap-rt-head { background: #c9eed9; padding-top: 12px; }
.ap-rt.done .ap-rt-time { color: #1f8a52; }
/* COMPLETE のシール：その子の色。枠の上のふちに少しはみ出して貼る */
.ap-seal { position: absolute; right: -6px; top: -15px; transform: rotate(5deg); color: #fff; font-size: 11px; font-weight: 900; padding: 4px 10px; border-radius: 999px; border: 2.5px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,.3); white-space: nowrap; line-height: 1.2; z-index: 2; }
.ap-seal b { font-size: 12.5px; }
/* NEW! シール（2026-11-21 ユーザー。見本 docs/mock/newstamp の A）：この親が承認画面で初めて見た報告。行の上のふちに少し傾けて貼る */
.ap-row.is-new { position: relative; }
.ap-new { position: absolute; right: 54px; top: -9px; transform: rotate(-6deg); background: #fff; color: #d9534f; border: 2.5px solid #d9534f; border-radius: 6px; font-size: 12px; font-weight: 900; line-height: 1; letter-spacing: .06em; padding: 3px 7px; box-shadow: 0 2px 4px rgba(0,0,0,.25); z-index: 2; pointer-events: none; }
/* 承認の定型文：スクリプトが動くときは隠しておき、豚を押すと豚の上に出す */
.approve-buttons { display: flex; flex-direction: column; gap: 8px; }
.approve-buttons button { width: 100%; justify-content: flex-start; text-align: left; }
.pig-menu:not(.open) { display: none; }
.pig-menu.open { position: fixed; right: 12px; bottom: 112px; width: min(300px, calc(100vw - 24px)); z-index: 61; margin: 0; border-radius: 18px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.pig-menu.open .form-title { font-size: 15px; margin-bottom: 8px; }
.pig-menu.open .note { text-align: center; margin: 6px 0 0; font-size: 13px; }
.pig-menu-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 60; }
body:has(.pig-menu.open) .pigfab { z-index: 62; }
body:has(.pig-menu.open) .tap-sign { display: none; }
.decide .form-title { margin-top: 0; }
.decide .choices, form .choices.column { margin-bottom: 12px; }
.decide.has-error { border-color: var(--error-text); }
.comment { margin: 8px 0 0; font-size: 0.9em; }
.pager { display: flex; gap: 8px; justify-content: space-between; margin-top: 8px; }

/* ---- ステップ5：お金 ---- */
.money-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.money-title { font-weight: 700; }
.money-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--line); }
.money-row.inactive { opacity: 0.6; }
.money-name { display: flex; align-items: center; gap: 6px; font-weight: 700; grid-row: span 3; }
.money-val { text-align: right; }
.money-val small { color: var(--muted); }
.money-go { color: var(--nav-text); font-weight: 700; text-align: right; font-size: 0.9em; }
.prepaid { color: #8a5a00; }
.facts.money dd strong { font-size: 1.2em; }
.notice { padding: 14px; margin-bottom: 16px; border: 2px solid #e2a514; border-radius: var(--radius); background: #fff8e6; }
.notice-title { margin: 0 0 4px; font-weight: 700; }
.notice form { margin-top: 10px; }
.payout form { margin-top: 8px; }

/* ---- ステップ6：おこづかい帳 ---- */
input[type="date"] { min-height: 48px; }
.balance-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}
.balance-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.balance-value { font-size: 2em; }
.balance-card.minus .balance-value { color: var(--danger); }
.ledger-actions { display: grid; gap: 8px; margin-bottom: 16px; }
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.month-nav .button.small { margin: 0; }
.month-nav .spacer { width: 110px; }
.month-sums { display: flex; justify-content: center; gap: 20px; margin: 4px 0 12px; color: var(--muted); }
.month-sums strong { color: var(--text); }
.items.ledger > li { list-style: none; }
.ledger-row { display: block; color: var(--text); text-decoration: none; }
.item-amount.in { color: var(--ok-text); }
.item-amount.out { color: var(--danger); }
.trail.big { font-size: 0.9em; }
.trail.big li { padding: 6px 0; border-bottom: 1px solid var(--line); }
a.button.danger { margin-bottom: 8px; }
.month-nav .button.small { white-space: nowrap; flex: none; padding: 8px 12px; font-size: 0.9em; }
.month-nav strong { flex: 1; text-align: center; white-space: nowrap; }
.month-nav .spacer { width: 0; flex: none; }
.month-nav .placeholder { visibility: hidden; }

/* iPhone（Safari）の日付欄は独自の見た目と最小幅を持っていて、枠からはみ出すので、ほかの入力欄と同じにそろえる */
input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  min-width: 0;
  max-width: 100%;
  text-align: left;
  line-height: 1.4;
}
input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }

/* ---- ステップ7：ダッシュボード ---- */
.w-2 { width: 2%; }
.w-4 { width: 4%; }
.w-6 { width: 6%; }
.w-8 { width: 8%; }
.w-10 { width: 10%; }
.w-12 { width: 12%; }
.w-14 { width: 14%; }
.w-16 { width: 16%; }
.w-18 { width: 18%; }
.w-20 { width: 20%; }
.w-22 { width: 22%; }
.w-24 { width: 24%; }
.w-26 { width: 26%; }
.w-28 { width: 28%; }
.w-30 { width: 30%; }
.w-32 { width: 32%; }
.w-34 { width: 34%; }
.w-36 { width: 36%; }
.w-38 { width: 38%; }
.w-40 { width: 40%; }
.w-42 { width: 42%; }
.w-44 { width: 44%; }
.w-46 { width: 46%; }
.w-48 { width: 48%; }
.w-50 { width: 50%; }
.w-52 { width: 52%; }
.w-54 { width: 54%; }
.w-56 { width: 56%; }
.w-58 { width: 58%; }
.w-60 { width: 60%; }
.w-62 { width: 62%; }
.w-64 { width: 64%; }
.w-66 { width: 66%; }
.w-68 { width: 68%; }
.w-70 { width: 70%; }
.w-72 { width: 72%; }
.w-74 { width: 74%; }
.w-76 { width: 76%; }
.w-78 { width: 78%; }
.w-80 { width: 80%; }
.w-82 { width: 82%; }
.w-84 { width: 84%; }
.w-86 { width: 86%; }
.w-88 { width: 88%; }
.w-90 { width: 90%; }
.w-92 { width: 92%; }
.w-94 { width: 94%; }
.w-96 { width: 96%; }
.w-98 { width: 98%; }
.w-100 { width: 100%; }
.earned-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: #eef7f0;
  border: 1px solid #b9dfc4;
  color: var(--text);
  text-decoration: none;
}
.earned-link > span:first-child { font-size: 0.85em; color: var(--muted); }
.earned-link strong { font-size: 1.6em; grid-row: span 2; grid-column: 2; grid-row-start: 1; white-space: nowrap; }
.earned-link small, .hero small { font-size: 0.55em; margin-left: 2px; }
.earned-go { font-size: 0.8em; color: var(--nav-text); font-weight: 700; }
.hero { display: flex; flex-direction: column; align-items: center; padding: 16px; margin-bottom: 12px; border-radius: var(--radius); background: #eef7f0; border: 1px solid #b9dfc4; }
.hero-label { color: var(--muted); font-weight: 600; }
.hero-value { font-size: 2.6em; line-height: 1.2; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.tile { padding: 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; }
.tile-label { font-size: 0.8em; color: var(--muted); }
.tile strong { font-size: 1.3em; white-space: nowrap; }
.tile .minus { color: var(--danger); }
.units { margin-bottom: 8px; }
.units .pick-item { flex: 1; justify-content: center; padding: 8px 6px; }

/* グラフ（色はデータ可視化の検証済みパレットの1〜3番） */
.chart-box { margin: 0; }
.chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart .grid { stroke: #e3e7eb; stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 10px; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.chart .area { opacity: 0.22; stroke: none; }
/* 面は塗り、線は線だけ（線に塗りが付くと面のように見えてしまう） */
.chart .area.s1 { fill: #2a78d6; }
.chart .area.s2 { fill: #eb6834; }
.chart .area.s3 { fill: #1baf7a; }
.chart .area.s4 { fill: #a46ad4; }
.chart .area.s5 { fill: #f08c00; }
.chart .line.s1 { stroke: #2a78d6; }
.chart .line.s2 { stroke: #eb6834; }
.chart .line.s3 { stroke: #1baf7a; }
.chart .line.s4 { stroke: #a46ad4; }
.chart .line.s5 { stroke: #f08c00; }
.chart .hit { fill: transparent; stroke: none; }
.chart .cursor { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0; margin: 8px 0 4px; font-size: 0.85em; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch-mark { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.swatch-mark.s1 { background: #2a78d6; }
.swatch-mark.s2 { background: #eb6834; }
.swatch-mark.s3 { background: #1baf7a; }
.swatch-mark.s4 { background: #a46ad4; }
.swatch-mark.s5 { background: #f08c00; }
.readout { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 4px 0 0; padding: 8px 10px; border-radius: 8px; background: #f3f5f7; font-size: 0.85em; }
.readout strong { width: 100%; }
.chart-table { margin-top: 8px; font-size: 0.85em; }
.chart-table summary { cursor: pointer; color: var(--muted); padding: 6px 0; }
.big-count { margin: 0 0 8px; }
.big-count strong { font-size: 2em; margin-right: 2px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: 6.5em 1fr auto; align-items: center; gap: 8px; font-size: 0.9em; }
.bar-name { overflow-wrap: anywhere; }
.bar-track { height: 12px; background: #eef2f6; border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: #2a78d6; border-radius: 4px; }
.bar-value { white-space: nowrap; color: var(--muted); }

/* ---- 上部メニュー（スクロールしても上に残す） ---- */
.top-sticky { position: sticky; top: 0; z-index: 10; }
.topnav {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topnav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 6px 0 5px;
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  border-bottom: 3px solid transparent;
}
.topnav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.topnav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.topnav a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--primary); }
body.kid .topnav a { font-size: 11px; }
.topbar { padding-top: 6px; padding-bottom: 6px; }

/* 資産総額 */
.hero-note { font-size: 0.75em; color: var(--muted); }
.hero-value.minus { color: var(--danger); }
.earned-note { margin: -4px 0 12px; font-size: 0.8em; color: var(--muted); text-align: center; }
.units .pick-item { white-space: nowrap; font-size: 0.9em; min-width: 0; padding-left: 4px; padding-right: 4px; }

/* 自由入力のカード：入力欄はカードの横いっぱいに */
.free-row .free-fields { grid-column: 1 / -1; display: grid; gap: 0; margin-top: 8px; }
.free-row .free-fields .field { margin-bottom: 10px; }
.free-row .error { grid-column: 1 / -1; }
.report-form > .field { margin-top: 4px; }

/* 報告画面の「しさん」：枠の中は「しさん」と金額の1行だけ。「ちなみに」は枠の外の小さな一行 */
.earned-link { grid-template-columns: minmax(0, 1fr) auto auto; padding: 8px 14px; margin-bottom: 4px; gap: 8px; }
.earned-link > span:first-child { font-size: 0.9em; font-weight: 700; color: var(--muted); }
.earned-link strong { grid-row: auto; grid-column: auto; font-size: 1.4em; }
.earned-link .earned-go { font-size: 1.4em; color: var(--nav-text); line-height: 1; }
.earned-link + .earned-note { margin: 0 0 14px; text-align: right; }

/* ---- ステップ8：バックアップ ---- */
.backup-last { font-size: 1.4em; }
.history .failed-row td { color: var(--error-text); }
a.notice { display: block; color: var(--text); text-decoration: none; }

/* ---- ステップ9a：誕生日 ---- */
.birthday { margin: 0 0 14px; padding: 14px; border: 2px solid #e0609a; border-radius: var(--radius); background: #fdeef5; color: #8a2456; font-size: 1.15em; font-weight: 700; text-align: center; }
.tag.warn { background: #fff3d6; color: #8a5a00; }

/* ---- ステップ9b：報告画面のタブ（おてつだい／Mission）、誕生日ボーナス ---- */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 14px; padding: 4px; border-radius: var(--radius); background: #f0ebe2; }
.tabs .tab { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 8px; background: transparent; color: var(--muted); }
.tabs .tab[aria-selected="true"] { background: var(--card); color: var(--primary); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--primary); color: #fff; font-size: 0.8em; }
.tab-count[hidden], .tab-count:empty { display: none; }
.tab-panel[hidden] { display: none; }
.total [hidden] { display: none; }
.birthday-gift { display: block; margin-top: 4px; font-size: 0.9em; }
.tag.mission { background: #efe7fb; color: #5b3a99; }

/* ---- ステップ9c：目標（あと○で○○！）、Reward、ポイントの記録 ---- */
.goal { display: grid; gap: 6px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #d9c9f2; border-radius: var(--radius); background: #f6f0fd; color: var(--text); text-decoration: none; }
.goal.done { border-color: #9fd3ad; background: var(--ok-bg); }
.goal-head { display: flex; justify-content: space-between; align-items: baseline; }
.goal-points { font-size: 1.3em; font-weight: 700; color: #5b3a99; }
.goal.done .goal-points { color: var(--ok-text); }
.goal-head .earned-go { font-size: 1.4em; color: var(--nav-text); line-height: 1; }
.goal-text { font-weight: 700; }
.goal-track { display: block; height: 12px; border-radius: 6px; background: #e4daf3; overflow: hidden; }
.goal-fill { display: block; height: 100%; border-radius: 6px; background: #7b52c4; }
.goal.done .goal-fill { background: #3fa34d; }
.reward-list, .point-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.reward-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 10px; border-radius: 8px; background: #f6f8fa; }
.reward-list li.can { background: var(--ok-bg); }
.reward-name { font-weight: 700; }
.reward-points { text-align: right; }
.reward-left { grid-column: 1 / -1; font-size: 0.85em; color: var(--muted); }
.reward-list li.can .reward-left { color: var(--ok-text); font-weight: 700; }
.point-history li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ph-date { color: var(--muted); font-size: 0.85em; }
.ph-points { font-weight: 700; white-space: nowrap; }
.point-history li.in .ph-points { color: var(--ok-text); }
.point-history li.out .ph-points { color: var(--danger); }
.point-history li.inactive { opacity: 0.5; }
.point-history li.inactive .ph-points { text-decoration: line-through; }

/* ---- ステップ10：通知のオン・オフ ---- */
.push-box { display: grid; gap: 10px; }
.push-box [hidden] { display: none; }

/* ---- 入力ミスの表示をもっと目立つ赤に（2026-10-22 ユーザーの希望） ---- */
:root {
  --alert: #e0182d;      /* 枠・しるし：あざやかな赤 */
  --alert-text: #c8102a; /* 文字：読みやすさのため少しだけ濃い赤 */
  --alert-bg: #ffe8eb;
}
.error { color: var(--alert-text); font-weight: 700; }
.error::before { content: "⚠ "; }
.has-error input, .has-error select, .has-error textarea {
  border: 2px solid var(--alert);
  background: #fff6f7;
  box-shadow: 0 0 0 3px rgba(224, 24, 45, 0.18);
}
fieldset.has-error .choices { border-radius: var(--radius); box-shadow: 0 0 0 2px var(--alert); background: #fff6f7; }
.flash.error { background: var(--alert-bg); color: var(--alert-text); }
.flash.failed { border: 2px solid var(--alert); border-left-width: 8px; font-weight: 700; }
.chore-row.has-error, .chore-row.has-error:has(input:checked) { border: 2px solid var(--alert); background: var(--alert-bg); }
.card.has-error, .decide.has-error { border: 2px solid var(--alert); box-shadow: 0 0 0 3px rgba(224, 24, 45, 0.15); }

/* ---- 余白・行間を詰めて、1画面に入る量を増やす（2026-10-23 ユーザーの希望。文字の大きさはそのまま） ---- */
body { line-height: 1.45; }
main { padding: 10px 12px 40px; }
h1 { margin: 4px 0 10px; }
h2 { margin: 18px 0 6px; }
p { margin: 0 0 10px; }
.card { padding: 10px 12px; margin-bottom: 10px; }
.field { margin-bottom: 12px; }
.label { margin-bottom: 3px; }
.hint, .error { margin-top: 2px; }
input[type="text"], input[type="password"], input[type="email"], input[type="date"], select { padding: 8px 10px; }
input[type="date"] { min-height: 42px; }
button, .button { min-height: 44px; padding: 8px 12px; }
.button.big { min-height: 50px; margin-bottom: 10px; }
.menu { gap: 6px; margin-bottom: 10px; }
.menu-item { padding: 10px 12px; }
.members, .items, .chore-list { gap: 5px; }
.member { padding: 8px 12px; }
.item { padding: 8px 10px; }
.item-meta { margin-top: 3px; gap: 4px; }
.row-actions { margin-top: 6px; }
.icon-link { padding: 6px 12px; }
.choices { gap: 6px; }
.choice { padding: 8px 10px; }
.chore-list { margin-bottom: 12px; }
.chore-row { padding: 6px 10px; gap: 2px 10px; }
.chore-check { gap: 10px; }
.qty input { padding: 6px 8px; }
.pick { margin-bottom: 8px; }
fieldset.pick { margin-bottom: 8px; }
.pick-title { margin-bottom: 4px; }
.pick-row { gap: 5px; }
.pick-item { min-height: 38px; padding: 4px 10px; }
.tabs { margin-bottom: 8px; }
.tabs .tab { min-height: 40px; padding: 4px 8px; }
.total { margin: 4px 0 8px; }
.waiting-card, .money-card, .balance-card, .hero { padding: 10px 12px; margin-bottom: 10px; }
.money-card { gap: 5px; }
.money-row { padding-top: 5px; }
.notice { padding: 10px 12px; margin-bottom: 10px; }
.tiles { gap: 6px; margin-bottom: 10px; }
.tile { padding: 8px 10px; }
.goal { padding: 8px 12px; margin-bottom: 8px; gap: 4px; }
.birthday { padding: 8px 12px; margin-bottom: 8px; }
.earned-link { padding: 6px 12px; }
.earned-link + .earned-note { margin-bottom: 8px; }
.flash { padding: 8px 12px; }
.confirm-box { padding: 10px 12px; margin-bottom: 10px; }
.history th, .history td { padding: 5px 4px; }
.back-row { margin-top: 10px; }

/* 報告の日付：スマホでは4つずつ2行、広い画面では1行 */
.pick-row.dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 5px; }
.pick-row.dates .pick-item { min-width: 0; padding: 4px 2px; white-space: nowrap; font-size: 0.85em; justify-content: center; }

/* 設定メニュー：右の空いたところに説明 */
.settings-menu .menu-item { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; align-items: center; }
.menu-desc { font-size: 0.78em; font-weight: 400; color: var(--muted); line-height: 1.35; }

/* 報告のカード：数量の欄がない項目は、名前と金額を1行に（金額は右寄せ） */
.chore-row:not(.free-row):not(:has(.qty)) .chore-check { grid-column: 1 / -1; }
.chore-row:not(.free-row):not(:has(.qty)) .chore-info { flex: 1; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: baseline; column-gap: 8px; }
.chore-row:not(.free-row):not(:has(.qty)) .chore-price { white-space: nowrap; margin-left: auto; }
.chore-row input[type="checkbox"], .chore-check input[type="checkbox"] { width: 24px; height: 24px; }
.chore-row { min-height: 44px; }

/* 設定の一覧：並べ替え・編集のボタンを少し小さく */
button.icon { width: 44px; min-height: 36px; }
.icon-link { padding: 5px 14px; }
.row-actions { margin-top: 4px; }

/* ---- ステップ9d：期間ごとのポイントと Reward ---- */
.money-row .money-name { grid-row: span 4; }
.goal-label { font-size: 0.85em; font-weight: 700; color: #5b3a99; margin-right: 8px; }
.goal-head { justify-content: flex-start; }
.goal-head .earned-go { margin-left: auto; }
.goal-mini { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 8px; font-size: 0.82em; }
.goal-mini-head { display: inline-flex; gap: 6px; align-items: baseline; white-space: nowrap; }
.goal-mini .goal-track { height: 6px; }
.goal-mini-text { grid-column: 1 / -1; color: var(--muted); }
.goal-mini.done .goal-fill { background: #3fa34d; }
.period-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.period-head strong { color: #5b3a99; }
.card.period.done .period-head strong { color: var(--ok-text); }
.card.period.done .goal-fill { background: #3fa34d; }
.period-text { margin: 6px 0 4px; font-weight: 700; }
.line-list { list-style: none; margin: 0; padding: 0; font-size: 0.9em; }
.line-list li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-top: 1px solid var(--line); color: var(--muted); }
.line-list li.got { color: var(--ok-text); font-weight: 700; }
.held-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.held-list li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--ok-bg); }
.held-name { font-weight: 700; }
.held-limit { font-size: 0.85em; color: var(--muted); white-space: nowrap; }
.held-list li.soon .held-limit { color: var(--alert-text); font-weight: 700; }
.held-action { margin: 0; }
button.small-button { min-height: 36px; padding: 4px 12px; width: auto; font-size: 0.9em; }
button.small-button::before { width: 16px; height: 16px; }
.undo-link { margin-left: 6px; font-size: 0.85em; color: var(--danger); }
.point-history li.log-use .ph-points, .point-history li.log-grant .ph-points { color: var(--ok-text); }
.point-history li.log-expire .ph-points, .point-history li.log-cancel .ph-points { color: var(--muted); }
.grant-of { display: block; font-size: 0.78em; font-weight: 400; color: var(--muted); }

/* ---- 子供の報告画面のいちばん上の計器（2026-10-24 ユーザーのスケッチから。src/views/instruments.js） ---- */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.brand { display: inline-flex; align-items: center; gap: 6px; }
.brand img { width: 26px; height: 26px; flex: none; }
/* 資産：昔の車の距離計。白いダイヤルの中に「しさん」と「えん」 */
.odo { display: flex; align-items: center; gap: 6px; width: 100%; padding: 4px 8px; margin-top: 2px; border-radius: 9px; text-decoration: none;
  background: linear-gradient(#ffffff, #f7f4ee); border: 1px solid #ddd5c8; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); color: var(--text); }
.odo-label, .odo-unit { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.odo-digits { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; min-width: 0; }
.odo-digits.odo-8 { grid-template-columns: repeat(8, 1fr); }
.odo-digits.odo-9 { grid-template-columns: repeat(9, 1fr); }
.odo-digits span { height: 30px; display: grid; place-items: center; border-radius: 3px; font: 700 20px/1 "SF Mono", Menlo, Consolas, monospace; color: var(--text);
  background: linear-gradient(#d5dbe0 0%, #ffffff 22%, #f4f6f8 50%, #ffffff 78%, #d5dbe0 100%); box-shadow: inset 0 0 0 1px #c3ccd5; }
.odo-go { color: var(--nav-text); font-size: 18px; font-weight: 700; margin-left: 2px; }
.odo + .earned-note { margin: 4px 0 6px; }
/* 計器盤（枠なし）：Daily・Weekly・Monthly の円い計器と、Yearly の路線図 */
.panel { display: block; margin: 0 0 8px; color: var(--text); text-decoration: none; }
.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-width: 260px; margin: 0 auto; }
.gauges-2 { grid-template-columns: repeat(2, 1fr); max-width: 174px; }
.gauges-1 { grid-template-columns: 1fr; max-width: 87px; }
.gauge { text-align: center; }
.gauge svg { width: 100%; height: auto; display: block; }
.gauge-left { font-size: 10px; line-height: 1.3; color: var(--muted); margin-top: -2px; }
.gauge-left b { color: #d9480f; }
.gauge.done .gauge-left b { color: #2f8a46; }
.g-rim { fill: #f1f4f7; stroke: #c3ccd5; stroke-width: 2; }
.g-face { fill: #fff; }
.g-track { fill: none; stroke: #e3e8ed; stroke-width: 11; }
.g-value { fill: none; stroke: #ff8c1a; stroke-width: 11; }
/* 期間ごとの色（2026-11-04 ユーザーの希望）：Daily オレンジ・Weekly 青・Monthly むらさき */
.gauge.p-weekly .g-value { stroke: #2f9be0; }
.gauge.p-monthly .g-value { stroke: #8a5cd1; }
.gauge.p-daily .g-name { fill: #d96b00; }
.gauge.p-weekly .g-name { fill: #1f7cc0; }
.gauge.p-monthly .g-name { fill: #6f42b8; }
.gauge.p-weekly .gauge-left b { color: #1f7cc0; }
.gauge.p-monthly .gauge-left b { color: #6f42b8; }
.gauge.done .g-value { stroke: #3fa34d; }
.g-mark { fill: #ffc233; stroke: #fff; stroke-width: 2; }
.g-mark.got { fill: #3fa34d; }
.g-name { font-size: 9px; font-weight: 700; fill: var(--muted); text-anchor: middle; }
.g-num { font: 800 20px Menlo, Consolas, monospace; fill: var(--text); text-anchor: middle; }
.route { margin-top: -4px; padding: 0 4px; }
.route svg { width: 100%; max-width: 300px; height: auto; display: block; margin: 0 auto; }
.route-head { display: flex; flex-wrap: wrap; gap: 0 10px; justify-content: space-between; font-size: 10px; color: var(--muted); padding: 0 4px; }
.route-head b { color: #2f8a46; }
.r-rail { stroke: #dfe4e8; stroke-width: 8; stroke-linecap: round; }
.r-done { stroke: #80c241; stroke-width: 8; stroke-linecap: round; }
.r-station { fill: #fff; stroke: #9aa5b1; stroke-width: 2.5; }
.r-station.got { stroke: #3a7d1d; }
.r-got { fill: #3a7d1d; }
.r-name { font-size: 10px; font-weight: 700; fill: var(--text); text-anchor: middle; }
.r-name.got { fill: #3a7d1d; }
.r-line { font-size: 8.5px; fill: #8a96a3; text-anchor: middle; }
.t-panta { fill: none; stroke: #6c757d; stroke-width: 1.3; }
.t-body { fill: #e9ecef; stroke: #868e96; stroke-width: 1.2; }
.t-black { fill: #212529; }
.t-green { fill: #80c241; }
.t-window { fill: #a5d8ff; }
.t-skirt { fill: #adb5bd; }
.t-wheel { fill: #343a40; }

/* おうちの人が自由入力を直したときの印（2026-10-24） */
.changed { margin: 6px 0 0; font-size: 0.85em; }
.tag.changed-tag { background: #fff3d6; color: #8a5a00; font-weight: 700; }
.trail li.edit { color: #8a5a00; }

/* 報告したあとの「ほうこくしたよ！」（2026-10-24） */
.report-done { text-align: center; padding: 16px 4px; }
.done-mark { width: 84px; height: 84px; margin: 8px auto 6px; border-radius: 50%; background: #3fa34d; color: #fff; font-size: 52px; line-height: 84px; font-weight: 800; }
.done-title { justify-content: center; font-size: 1.8em; margin: 0 0 2px; color: #2f8a46; }
.done-date { color: var(--muted); margin: 0 0 10px; }
.done-list { list-style: none; margin: 0 auto 6px; padding: 0; max-width: 360px; text-align: left; }
.done-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line); font-weight: 700; }
.done-total { font-size: 1.1em; font-weight: 700; margin: 6px 0; }
.report-done .button.big { margin: 12px 0 4px; }
.done-records { margin: 10px 0 0; font-size: 0.9em; }

/* Mission の想定回数と、想定どおりやったら貯まるポイント（2026-10-25） */
.expect-row { display: flex; align-items: center; gap: 8px; }
.expect-row select { width: auto; flex: none; }
.expect-row input { width: 90px; font-size: 17px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; text-align: right; }
.estimate .note { margin: 4px 0; }
.estimate-table { width: 100%; border-collapse: collapse; font-size: 0.9em; margin: 4px 0; }
.estimate-table th, .estimate-table td { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.estimate-table thead th { color: var(--muted); font-weight: 600; font-size: 0.85em; }
.estimate-table tbody th { text-align: left; font-weight: 700; }
.estimate-table tbody th .dot { width: 12px; height: 12px; margin-right: 4px; vertical-align: -1px; }
.estimate-table td { font-family: Menlo, Consolas, monospace; font-weight: 700; }
.estimate-table tr.on { background: #eef5fc; }

/* ---- 異変さがし（10.16、2026-10-27）：public/app.js が画面にかける ---- */
.anom-flip { transform: rotate(180deg); }
.anom-mirror { transform: scaleX(-1); }
.anom-tilt { transform: rotate(9deg); }
.anom-tilt-s { transform: rotate(2.5deg); }
.anom-grow { transform: scale(1.3); }
.anom-flip, .anom-mirror, .anom-tilt, .anom-tilt-s, .anom-grow { transform-box: fill-box; transform-origin: center; }
.anom-ib { display: inline-block; } /* 形を変える異変は、文字の中の要素だけ inline-block にする（public/app.js） */
.anom-hide, .anom-ghost { opacity: 0; }
.anom-gone { display: none !important; }
.anom-red { color: #e03131 !important; stroke: #e03131 !important; fill: #e03131; }
.t-green.anom-red { fill: #e03131; }
.anom-blue { stroke: #1c7ed6 !important; }
.anom-hue { filter: hue-rotate(25deg) saturate(1.3); }
button.anom-redbg { background: #e03131 !important; }
.anom-poop { font-size: 1.15em; line-height: 1; }
span.anom-poop.small { font-size: 0.7em; margin-left: 2px; vertical-align: top; }
.brand { position: relative; }
.brand .anom-poop { font-size: 22px; }
.brand .anom-poop.small { position: absolute; left: 18px; top: -4px; font-size: 11px; margin: 0; } /* 豚の角に小さなうんこ（アプリ名が2行にならないように） */
.topnav .anom-poop { font-size: 20px; line-height: 22px; }
.chore-check .anom-poop { font-size: 24px; width: 28px; text-align: center; }
/* 「ぜんぶ みつけたよ！」のシール・にせのシール（資産のダイヤルの右上に小さく） */
.sticker-slot { position: relative; height: 0; }
.sticker { position: absolute; right: -4px; top: -6px; z-index: 2; transform: rotate(8deg); padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; line-height: 1.3;
  background: #fff4b8; color: #8a5a00; border: 2px solid #f2c94c; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); white-space: nowrap; }
.sticker.real { background: #ffe066; color: #7a4b00; border-color: #f59f00; }
.sticker.pop { animation: sticker-pop 0.4s ease-out; }
@keyframes sticker-pop { from { transform: rotate(8deg) scale(0.3); } to { transform: rotate(8deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .sticker.pop { animation: none; } }
.anom-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50; padding: 10px 18px; border-radius: 999px;
  background: #2f2a1f; color: #fff; font-weight: 800; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); transition: opacity 0.5s; white-space: nowrap; }
.anom-toast.out { opacity: 0; }

/* ---- いたずら（10.17）---- */
.prank-link { display: block; width: max-content; margin: 22px auto 0; padding: 4px; font-size: 12px; color: #b9c0cc; text-decoration: none; } /* まん中（右下には豚がいる。2026-11-06 ユーザーの希望） */
.prank-host { position: relative; }
.prank-stamp { position: absolute; z-index: 6; transform: translate(-50%, -50%); line-height: 1; text-align: center; pointer-events: auto; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25)); user-select: none; -webkit-user-select: none; }
img.prank-stamp { height: auto; }
.prank-stamp.big, .prank-stamp.photo { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }
.prank-label { position: absolute; z-index: 6; transform: translate(-50%, -50%); padding: 0 4px; background: var(--card); font-weight: 700; white-space: nowrap; }
.prank-burst { position: fixed; left: 50%; top: 42%; z-index: 60; transform: translate(-50%, -50%) rotate(-6deg); display: flex; flex-direction: column; align-items: center;
  padding: 16px 28px; border: 4px solid #f59f00; border-radius: 22px; background: #fff6c2; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3); white-space: nowrap;
  animation: prank-pop 0.35s ease-out; transition: opacity 0.5s; }
.prank-burst strong { font-size: 44px; font-weight: 900; color: #d9480f; line-height: 1.15; }
.prank-burst small { font-size: 14px; font-weight: 800; color: #7a4b00; }
.prank-burst small.prank-left { margin-top: 4px; font-size: 18px; color: #d9480f; }
.prank-burst small.prank-reward { margin-top: 4px; font-size: 18px; color: #2f9e44; }
.prank-burst.out { opacity: 0; }
@keyframes prank-pop { from { transform: translate(-50%, -50%) rotate(-6deg) scale(0.3); } to { transform: translate(-50%, -50%) rotate(-6deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .prank-burst { animation: none; } }
.prank-step { margin: 14px 0 6px; font-weight: 800; }
.prank-who { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.prank-target { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 8px 4px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); font-weight: 800; text-align: center; }
.prank-target input { position: absolute; opacity: 0; pointer-events: none; }
.prank-target:has(input:checked) { border-color: var(--primary); background: #eaf1ff; }
.prank-target.pending { opacity: 0.55; }
.prank-target small { font-size: 11px; font-weight: 600; color: var(--muted); }
.prank-target-name { display: inline-flex; align-items: center; gap: 6px; }
.prank-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } /* 5つ（2026-11-17）。最後の1つは横いっぱい */
.prank-tools button:last-child:nth-child(odd) { grid-column: span 2; }
.prank-tools button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 6px 4px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); font-size: 15px; font-weight: 800; }
.prank-tools button.on { border-color: var(--primary); background: #eaf1ff; }
.prank-palette { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; max-height: 62vh; overflow-y: auto; -webkit-user-select: none; user-select: none; }
.prank-levels, .prank-tools { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.prank-pick { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 52px; min-height: 0; padding: 2px; border: 0; border-radius: 12px; background: var(--line); font-size: 30px; line-height: 1; }
.prank-pick img { width: 36px; height: 36px; object-fit: contain; }
.prank-pick.on { background: #eaf1ff; outline: 3px solid var(--primary); }
/* いま選んでいるスタンプ・色（道具のボタンと③の見出し） */
.prank-now { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--bg); font-size: 24px; line-height: 1; vertical-align: middle; }
.prank-now img { width: 26px; height: 26px; object-fit: contain; }
.prank-now i { display: block; width: 22px; height: 22px; border-radius: 50%; }
.prank-tap .prank-now { margin: 0 4px; }
.prank-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 17px; font-weight: 800; }
.prank-sheet-x { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%; background: var(--line); color: var(--text); font-size: 15px; }
.prank-seg { display: flex; margin: 0 0 8px; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.prank-seg[hidden] { display: none; }
.prank-seg button { flex: 1; min-height: 40px; padding: 6px 0; border: 0; border-radius: 0; background: none; color: var(--text); font-size: 14px; font-weight: 800; }
.prank-seg button.on { background: #eaf1ff; }
.prank-flee-mark { outline: 3px dashed #e8590c !important; outline-offset: 2px; }
/* すべる・ヒビわれ（2026-11-17。見本 docs/mock/prank-glass） */
.prank-slide-mark { outline: 3px dashed #1c7ed6 !important; outline-offset: 2px; transform: translate(6px, 3px) rotate(-3deg); }
.prank-now[data-now-level] { width: auto; padding: 0 6px; font-size: 12px; font-weight: 800; }
.prank-levels { display: grid; gap: 8px; }
.prank-level { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 0; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); text-align: left; }
.prank-level b { font-size: 17px; }
.prank-level small { font-size: 12px; color: var(--muted); font-weight: 600; }
.prank-level.on { border-color: var(--primary); background: #eaf1ff; }
.prank-crack { filter: none; }
.prank-crack svg { display: block; overflow: visible; }
.prank-gate { position: fixed; inset: 0; z-index: 1000; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; } /* iPhone の傾きの許可を聞く透明な膜（PrankFx） */
.prank-sliding { z-index: 7; will-change: transform; } /* 影は付けない（逃げるボタンと同じく、部品そのものだけが動く。2026-11-17 ユーザー） */
.prank-glass { position: fixed; inset: 0; z-index: 9990; touch-action: none; -webkit-user-select: none; user-select: none; }
.prank-glass svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.prank-shard { position: fixed; z-index: 9991; pointer-events: none; will-change: transform, opacity; }
.prank-pick.photo small { font-size: 10px; font-weight: 700; color: var(--muted); }
.prank-pick.photo span img { border-radius: 4px; object-fit: cover; }
.prank-frame { position: relative; overflow: hidden; margin: 0 calc(50% - 50vw); border-top: 3px dashed #9db8ee; border-bottom: 3px dashed #9db8ee; background: var(--bg); } /* 相手の画面と同じ幅で見せる（画面のはしまで） */
.prank-frame iframe { display: block; width: 100%; height: 600px; border: 0; }
.prank-cover { position: absolute; inset: 0; z-index: 1; cursor: crosshair; }
/* 置いたいたずらは、右下の豚の吹き出し（「しかける」の札の上）。見本 docs/mock/prank-bubble */
.prank-bubble { position: fixed; right: 8px; bottom: calc(96px + var(--kb, 0px)); z-index: 52; max-width: min(300px, calc(100vw - 16px)); background: #fff; color: #1f2933; border-radius: 16px; padding: 6px 8px 8px; box-shadow: 0 6px 16px rgba(0, 0, 0, .45); }
.prank-bubble[hidden] { display: none; }
.prank-bubble::after { content: ""; position: absolute; right: 30px; bottom: -11px; border: 8px solid transparent; border-top: 12px solid #fff; border-bottom: 0; }
.prank-count { margin: 0 4px 5px; font-size: 11px; font-weight: 700; color: #6b7680; }
.prank-count b { color: #1f2933; margin-left: 4px; }
.prank-chips { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.prank-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 3px 3px 9px; border-radius: 999px; background: #f1f3f5; color: #1f2933; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.prank-chip img { width: 22px; height: 22px; object-fit: contain; }
.prank-chip-x { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 50%; background: #d9534f; color: #fff; font-size: 13px; }
.prank-msg { min-height: 1.4em; margin: 6px 2px; color: var(--error-text); font-size: 13px; font-weight: 700; }
.prank-sheet-wrap { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; background: rgba(0, 0, 0, 0.35); }
.prank-sheet-wrap[hidden] { display: none; }
.prank-sheet { width: 100%; padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px)); border-radius: 18px 18px 0 0; background: var(--card); box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.25); }
.prank-sheet .prank-step { margin-top: 0; }
.prank-sheet input { width: 100%; padding: 10px; border: 2px solid var(--primary); border-radius: 10px; font-size: 18px; }
.prank-sheet-buttons { display: flex; gap: 8px; margin-top: 8px; }
.prank-sheet-buttons .nav { flex: 1; }
.prank-sheet-buttons .primary { flex: 2; }
.prank-hit { cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* 親のログイン方法（10.18）。Google・LINE のボタンは、それぞれの会社の決まった色とマーク */
.sso-head { margin: 4px 0 8px; font-size: 0.92em; font-weight: 700; color: var(--muted); }
.button.sso { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 10px; background: #fff; color: #1f1f1f; border: 1.5px solid #d0d6df; }
.button.sso.line { background: #06c755; border-color: #06c755; color: #fff; }
.button.sso.email { color: var(--primary); border-color: #9db8ee; }
.sso-logo { flex: none; width: 22px; height: 22px; }
.sso-logo.mail { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sso.line .sso-logo rect { fill: #fff; }
.sso.line .sso-logo path { fill: #06c755; }
.sso-or { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; color: var(--muted); font-size: 0.85em; }
.sso-or::before, .sso-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #eaf1ff; color: var(--primary); font-size: 0.8em; font-weight: 700; }
.login-methods { padding-top: 4px; padding-bottom: 4px; }
.login-method { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.login-method:last-child { border-bottom: 0; }
.login-method .sso-logo { width: 26px; height: 26px; color: var(--primary); }
.login-method-name { flex: 1; font-weight: 700; line-height: 1.35; }
.login-method-state { font-size: 0.8em; color: var(--muted); }
.login-method-state.on { color: #2f9e55; }
.login-method form { margin: 0; }
.small-button, button.small-button { width: auto; min-height: 40px; padding: 8px 16px; font-size: 0.92em; }
button.primary.small-button::before { display: none; }
.code-input { font-size: 1.5em; letter-spacing: 0.4em; text-align: center; }

/* 運営者の管理画面（10.18）。上の帯を紺色にして、家族の画面と見分けられるようにする */
.topbar.admin-bar { background: #1f2f4a; border-bottom: 0; }
.admin-brand { color: #fff; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.admin-brand .brand-name { color: #fff; font-size: 0.95em; }
.admin-badge { background: #f5b301; color: #1f2f4a; border-radius: 6px; padding: 2px 8px; font-size: 0.75em; font-weight: 800; }
.admin-logout, .admin-logout .logout-text { color: #cfe0ff; }
.admin-logout .exit-icon { stroke: #cfe0ff; }
.admin-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 14px; } /* 7つあるので4つずつ2段（2026-12-01 YouTube を足した） */
.admin-tabs a { flex: 1; text-align: center; padding: 9px 0; border-radius: 10px; background: #e8edf5; color: #1f2f4a; font-weight: 800; text-decoration: none; font-size: 0.92em; white-space: nowrap; }
.admin-tabs a.on { background: #1f2f4a; color: #fff; }
.admin-sum { display: flex; gap: 8px; margin-bottom: 12px; }
.admin-sum div { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; }
.admin-sum b { display: block; font-size: 1.4em; }
.admin-sum span { font-size: 0.75em; color: var(--muted); }
.admin-family { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; color: var(--text); text-decoration: none; }
.admin-family.stop { background: #fff5f5; }
.admin-no { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: #e8edf5; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #1f2f4a; }
.admin-name { font-weight: 800; }
.admin-meta { font-size: 0.78em; color: var(--muted); }
.admin-status { grid-row: span 2; font-size: 0.78em; font-weight: 800; color: #2f9e55; }
.admin-status.off { color: var(--danger); }
.admin-unread { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 0.85em; line-height: 18px; }
.admin-report.unread { border-color: var(--danger); }
.admin-report-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }

/* 子供から運営者への通報（10.20） */
.menu-arrow { float: right; color: var(--muted); }
.tell-lead p { margin: 0 0 8px; line-height: 1.7; }
.tell-lead p:last-child { margin-bottom: 0; }
.tell-example { color: var(--muted); font-size: 0.92em; }
.tell-text { display: block; width: 100%; min-height: 9em; font-size: 1.05em; padding: 10px; border: 1px solid var(--line); border-radius: 10px; box-sizing: border-box; font-family: inherit; }
.tell-done { text-align: center; padding: 28px 12px; }
.tell-done-mark { font-size: 56px; line-height: 1; }
.tell-done p { font-size: 1.25em; font-weight: 700; line-height: 1.7; margin: 14px 0 0; }

/* ログインしなくても見られるページ（アプリの紹介・プライバシーポリシー。2026-10-29） */
.public-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 24px 0 8px; font-size: 0.9em; }
.public-links a { color: var(--muted); }
.about-steps { margin: 0; padding-left: 1.4em; line-height: 1.8; }
.policy { line-height: 1.75; }
.policy h2 { font-size: 1.05em; }
.policy ul { padding-left: 1.3em; margin: 4px 0 12px; }
.policy p { margin: 6px 0 10px; }

/* 家族のデータを消す（2026-10-29） */
.delete-list { margin: 0; padding-left: 1.3em; line-height: 1.7; }

/* 引っ越したあとの古い住所の画面（2026-10-29） */
.moved-label { margin: 0; color: var(--muted); font-size: 0.9em; }
.moved-host { margin: 4px 0 12px; font-size: 1.6em; font-weight: 800; letter-spacing: 0.02em; }

/* いたずらの画面：暗い色で「わるいことをしてる感」（2026-10-30 ユーザーの希望。彩度は控えめに）。色の変数を置きかえる */
body.prank-dark {
  --bg: #161518;
  --card: #242128;
  --text: #eeecf1;
  --muted: #a8a3b1;
  --line: #3e3a46;
  --ok-bg: #16301f;
  --ok-text: #8fe0a8;
  --error-bg: #3a1a20;
  --error-text: #ff9a91;
  --nav-bg: #302c37;
  --nav-text: #e0dbe9;
  color-scheme: dark;
}
body.prank-dark .prank-target:has(input:checked),
body.prank-dark .prank-tools button.on { border-color: #a18cb2; background: #352f3d; }
body.prank-dark .prank-sheet-x { background: #38343e; }
/* 選んだスタンプの四角も、パレットと同じうすい紫（黒い棒人間が見えるように） */
body.prank-dark .prank-now { background: #e6def0; }
body.prank-dark .prank-now[data-now-level] { color: #2b2633; }
body.prank-dark .prank-level.on { border-color: #a18cb2; background: #352f3d; }
body.prank-dark .prank-seg button.on { background: #352f3d; color: #fff; }
body.prank-dark .prank-frame { border-color: #6f647e; }
body.prank-dark input[type="text"] { background: #1b191e; color: var(--text); border-color: var(--line); }
.prank-title { line-height: 0; margin: 6px 0 12px; }
.prank-title img { display: block; width: 140px; height: auto; }
/* 親ホームのいたずらの入り口（代理報告と同じ大きさ） */
.button.prank-go { background: #2e2a35; color: #f2eef7; border: 2px solid #6f647e; }

/* 通知をオンにするか聞くカード（2026-10-30）。下から出る */
.push-ask { position: fixed; inset: 0; z-index: 80; background: rgba(20, 30, 50, 0.45); display: flex; align-items: flex-end; }
.push-ask[hidden] { display: none; }
.push-ask-sheet { width: 100%; padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--card); color: var(--text); text-align: center; box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.2); animation: push-ask-up 0.25s ease-out; }
.push-ask-bell { font-size: 52px; line-height: 1; margin: 4px 0 10px; }
.push-ask h2 { margin: 0 0 8px; font-size: 21px; }
.push-ask p { margin: 0 0 18px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.push-ask-later { display: block; margin: 10px auto 0; padding: 8px 16px; border: 0; background: none; color: var(--muted); font-size: 15px; font-weight: 700; }
@keyframes push-ask-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .push-ask-sheet { animation: none; } }
.push-ask p span { display: inline-block; } /* 文の区切りで折り返す */

/* ---- お手紙（10.19、2026-10-31）：机のような茶系（横向きの荒い柾目）。ボタンの色はほかの画面と同じ ---- */
.post-link { position: relative; display: block; width: 30px; text-decoration: none; }
.post-link svg { display: block; width: 30px; height: auto; }
.post-link .post-count { position: absolute; top: -6px; right: -9px; min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box; border-radius: 9px;
  background: #e0182d; color: #fff; border: 2px solid #fff; font-size: 10px; font-weight: 700; line-height: 13px; text-align: center; }
.post-link.beside-odo { float: right; margin: 4px 6px 0 10px; }
.post-link.beside-odo + .odo { width: auto; }
.post-link.beside-name { position: absolute; top: 14px; right: 22px; width: 32px; } /* 足が下の枠に少しかかるのがおしゃれ（2026-10-31 ユーザー） */
main:has(> .post-link.beside-name) { position: relative; }
.post-link.beside-name svg { width: 32px; }

html:has(body.letter-desk) { background: #5a3a21; }
body.letter-desk {
  min-height: 100vh; color: #3b2a1c; background-color: #6a4528; background-attachment: fixed;
  background-image:
    repeating-linear-gradient(180deg, rgba(40, 20, 5, .22) 0 2px, transparent 2px 9px, rgba(40, 20, 5, .12) 9px 10px, transparent 10px 23px, rgba(255, 230, 190, .06) 23px 27px, transparent 27px 41px, rgba(40, 20, 5, .28) 41px 43px, transparent 43px 58px),
    repeating-linear-gradient(180deg, transparent 0 70px, rgba(30, 12, 0, .18) 70px 74px, transparent 74px 131px, rgba(255, 220, 170, .07) 131px 140px, transparent 140px 197px),
    repeating-linear-gradient(180deg, rgba(255, 215, 160, .05) 0 110px, rgba(0, 0, 0, .08) 110px 260px, rgba(255, 215, 160, .04) 260px 330px),
    linear-gradient(#74502f, #5a3a21);
}
body.letter-desk main h1 { color: #fbf1e1; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
body.letter-desk .crumbs a { color: #f3d9b1; }
body.letter-desk .crumbs li, body.letter-desk .crumbs [aria-current] { color: #e9d6bd; }
body.letter-desk .crumbs li + li::before { color: #c9ab86; }
body.letter-desk .card { background: #fbf5ea; border-color: #d9c3a3; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); }
body.letter-desk .card .note { color: #7d6650; }
body.letter-desk .tabs { background: rgba(0, 0, 0, .22); }
body.letter-desk .tabs .tab { color: #ead8bf; text-decoration: none; border-radius: var(--radius); }
body.letter-desk .tabs .tab[aria-selected="true"] { background: #fbf5ea; color: #6b4a2f; }
.letter-hint { color: #ead8bf; font-size: 0.85em; margin: 6px 2px 10px; }
.letter-row { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.letter-icon { font-size: 30px; line-height: 1; }
.letter-who { font-weight: 700; margin: 0; }
.letter-new { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; background: #b5532f; color: #fff; font-size: 0.75em; vertical-align: 2px; }
.letter-meta { display: block; font-size: 0.85em; color: #7d6650; }
.letter-label { font-weight: 700; padding: 0; margin-bottom: 6px; }
.letter-who-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.letter-who-pick label { display: block; }
.letter-who-pick input { position: absolute; opacity: 0; pointer-events: none; }
.letter-who-pick span { display: block; padding: 10px; border: 1.5px solid #d9c3a3; border-radius: 10px; background: #fffaf2; text-align: center; font-weight: 600; }
.letter-who-pick input:checked + span { border-color: #8a5a33; background: #f3e3c7; color: #6b4a2f; }
.letter-who-pick input:focus-visible + span { outline: 2px solid #8a5a33; }
.letter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.letter-chip { width: auto; min-height: 36px; padding: 6px 12px; border-radius: 18px; border: 1.5px solid #c9a77c; background: #fffaf2; color: #6b4a2f; font-size: 0.9em; }
.letter-chip.on { background: #8a5a33; border-color: #8a5a33; color: #fff; }
body.letter-desk input[type="date"] { width: 100%; box-sizing: border-box; background: #fffaf2; border-color: #d9c3a3; }
.letter-sheet { display: block; width: 100%; box-sizing: border-box; margin: 0 0 12px; padding: 14px 16px; min-height: 300px;
  border: 1px solid #cbb08a; border-radius: 6px; box-shadow: 0 3px 8px rgba(0, 0, 0, .35); color: #3b2a1c;
  font: inherit; font-size: 16px; line-height: 32px; white-space: pre-wrap; overflow-wrap: anywhere; resize: vertical;
  background: #fffdf7 repeating-linear-gradient(transparent 0 31px, #e3d2b5 31px 32px); background-position: 0 14px; background-attachment: local; }
.letter-sheet.has-error { border: 2px solid var(--alert); }
.letter-actions { display: flex; gap: 8px; }
.letter-actions .button { flex: 1; }
/* ポストがあるときは、異変さがしのシールをポストの左（計器の右上）に */
main:has(.post-link.beside-odo) .sticker { right: 40px; }
/* fieldset の見出しを、枠の線の上ではなくカードの中に */
.letter-label { float: left; width: 100%; }
.letter-label + * { clear: both; }

/* ---- お手紙の便せん（10.19 ②）。幅に合わせて大きさが変わるよう、長さは cqw（便せんの幅の1%）で書く ---- */
.lsheet { position: relative; width: 100%; aspect-ratio: 1000 / 1350; margin: 0 0 12px; overflow: hidden; border-radius: 3px; container-type: inline-size;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .45); background: #fff; color: #2b2b2b; --lh: 9cqw; --t: 12cqw; --r: 6cqw; --b: 6cqw; --l: 8cqw; --rule: transparent; }
.lsheet .ls-text, .lsheet textarea.ls-text { position: absolute; top: var(--t); right: var(--r); bottom: var(--b); left: var(--l); margin: 0; padding: 0; border: 0; border-radius: 0;
  background: transparent; box-shadow: none; overflow: hidden; resize: none; outline: none; min-height: 0; width: auto; height: auto;
  font-size: 4.6cqw; line-height: var(--lh); white-space: pre-wrap; overflow-wrap: anywhere; color: inherit; letter-spacing: 0.02em; }
.lsheet.dir-v .ls-text { writing-mode: vertical-rl; }
.lsheet .ls-over { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lsheet.font-klee .ls-text { font-family: 'Klee One', 'Hiragino Maru Gothic ProN', sans-serif; font-weight: 600; }
.lsheet.font-mincho .ls-text { font-family: 'Shippori Mincho', 'Hiragino Mincho ProN', serif; font-weight: 500; }
.lsheet.font-maru .ls-text { font-family: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif; font-weight: 500; }
.lsheet.font-yusei .ls-text { font-family: 'Yusei Magic', 'Hiragino Maru Gothic ProN', sans-serif; font-weight: 400; }
.lsheet.font-boku .ls-text { font-family: 'Yuji Boku', 'Hiragino Mincho ProN', serif; font-weight: 400; }
/* 罫線：横書きは横の線、縦書きは縦の線（文字の行に合わせる） */
.lsheet::before { content: ""; position: absolute; top: var(--t); right: var(--r); bottom: var(--b); left: var(--l); pointer-events: none;
  background: repeating-linear-gradient(transparent 0 calc(var(--lh) - 1px), var(--rule) calc(var(--lh) - 1px) var(--lh)); }
.lsheet.dir-v::before { background: repeating-linear-gradient(to left, transparent 0 calc(var(--lh) - 1px), var(--rule) calc(var(--lh) - 1px) var(--lh)); }
/* ① 和紙 */
.lsheet.paper-washi { background: #f6efe0 radial-gradient(#e9dcc3 1px, transparent 1px) 0 0 / 7px 7px; color: #2b2b2b; --rule: #c9a77c; --t: 8cqw; --r: 7cqw; --b: 8cqw; --l: 7cqw; --lh: 9.5cqw; }
/* ② ノート */
.lsheet.paper-note { background: #fff; color: #1f3a7a; --rule: #9ec3e6; --t: 12cqw; --r: 5cqw; --b: 6cqw; --l: 13cqw; }
.lsheet.paper-note::after { content: ""; position: absolute; top: 0; bottom: 0; left: 10cqw; width: 1px; background: #f19a9a; pointer-events: none; }
.lsheet.paper-note.dir-v { --t: 9cqw; --l: 13cqw; --r: 6cqw; }
/* ③ 方眼 */
.lsheet.paper-grid { background-color: #f3fbff; background-image: linear-gradient(#cfe8f5 1px, transparent 1px), linear-gradient(90deg, #cfe8f5 1px, transparent 1px);
  background-size: 4.5cqw 4.5cqw; color: #223; --t: 9cqw; --r: 8cqw; --b: 8cqw; --l: 8cqw; }
/* ④ さくら */
.lsheet.paper-sakura { background: #fff7f9; color: #7a3045; --rule: #f5cbd5; --t: 16cqw; --r: 9cqw; --b: 12cqw; --l: 9cqw; }
.lsheet.paper-sakura::after { content: ""; position: absolute; inset: 3cqw; border: 2px solid #f2b8c6; border-radius: 3cqw; pointer-events: none; }
.lsheet .ls-deco { position: absolute; inset: 0; pointer-events: none; font-style: normal; }
.lsheet .ls-d1::before, .lsheet .ls-d1::after, .lsheet .ls-d2::before, .lsheet .ls-d2::after { content: "🌸"; position: absolute; font-size: 6cqw; line-height: 1; }
.lsheet .ls-d1::before { left: 5cqw; top: 5cqw; } .lsheet .ls-d1::after { right: 5cqw; top: 5cqw; }
.lsheet .ls-d2::before { left: 5cqw; bottom: 5cqw; } .lsheet .ls-d2::after { right: 5cqw; bottom: 5cqw; }
/* ⑤ エアメール */
.lsheet.paper-air { background: #fff; color: #223; --rule: #d7dbe3; --t: 17cqw; --r: 8cqw; --b: 9cqw; --l: 8cqw; }
.lsheet.paper-air::after { content: ""; position: absolute; inset: 0; border: 2.8cqw solid; border-image: repeating-linear-gradient(45deg, #d33 0 3cqw, #fff 3cqw 5cqw, #2a5bb8 5cqw 8cqw, #fff 8cqw 10cqw) 28; pointer-events: none; }
.lsheet .ls-post { inset: auto; top: 6cqw; right: 6.5cqw; width: 12cqw; height: 14cqw; border: 2px dashed #2a5bb8; color: #2a5bb8; font-size: 2.6cqw; line-height: 1.3; text-align: center; padding-top: 2cqw; box-sizing: border-box; }
.lsheet.paper-air.dir-v { --t: 22cqw; }

/* ---- お手紙を書く画面（10.19 ②） ---- */
.ed-dest { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #ead8bf; font-size: 0.9em; margin: -4px 2px 10px; }
/* 書く画面（2026-11-02 ユーザーの希望）：上の帯・メニューを出さず、ボタンを上のカードにまとめ、紙を横幅いっぱいに */
body.letter-write .top-sticky { display: none; }
body.letter-write main { padding-top: 10px; }
[data-step="2"] .ed-dest { margin: -4px 2px 8px; }
.ed-dest-tap { width: auto; min-height: 30px; padding: 0; background: none; color: #ead8bf; font-size: 1em; font-weight: normal; text-decoration: underline dotted; text-underline-offset: 3px; text-align: left; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-go { width: auto; flex: none; margin: 0; min-height: 34px; padding: 4px 14px; font-size: 0.85em; }
.ed-bar { background: #fbf5ea; border: 1px solid #d9c3a3; border-radius: 12px; padding: 8px 10px; margin-bottom: 10px; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); }
.ed-row { display: flex; align-items: center; gap: 6px; margin: 4px 0; flex-wrap: wrap; }
.ed-papers { display: flex; gap: 5px; }
.ed-paper { width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 3px; border: 2px solid transparent; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.ed-paper.on { border-color: #2f80c8; outline: 2px solid #fff; }
.ed-paper.p-washi { background: #f6efe0 repeating-linear-gradient(to left, transparent 0 5px, #c9a77c 5px 6px); }
.ed-paper.p-note { background: #fff repeating-linear-gradient(transparent 0 5px, #9ec3e6 5px 6px); }
.ed-paper.p-grid { background-color: #f3fbff; background-image: linear-gradient(#cfe8f5 1px, transparent 1px), linear-gradient(90deg, #cfe8f5 1px, transparent 1px); background-size: 5px 5px; }
.ed-paper.p-sakura { background: #fff7f9; box-shadow: inset 0 0 0 2px #f2b8c6, 0 1px 2px rgba(0, 0, 0, .3); }
.ed-paper.p-air { background: #fff; border: 3px solid; border-image: repeating-linear-gradient(45deg, #d33 0 3px, #fff 3px 5px, #2a5bb8 5px 8px, #fff 8px 10px) 4; }
.ed-paper.p-air.on { outline: 2px solid #2f80c8; }
.ed-seg { display: inline-flex; border: 1.5px solid #c9a77c; border-radius: 16px; overflow: hidden; }
.ed-seg button { width: auto; min-height: 30px; padding: 3px 8px; border-radius: 0; background: #fffaf2; color: #6b4a2f; font-size: 0.8em; font-weight: 600; }
.ed-seg button.on { background: #8a5a33; color: #fff; }
.ed-seg .font-klee { font-family: 'Klee One', sans-serif; } .ed-seg .font-mincho { font-family: 'Shippori Mincho', serif; } .ed-seg .font-maru { font-family: 'Zen Maru Gothic', sans-serif; } .ed-seg .font-yusei { font-family: 'Yusei Magic', sans-serif; } .ed-seg .font-boku { font-family: 'Yuji Boku', serif; }
.ed-pens { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-color { width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #c9a77c; }
.ed-color.on { box-shadow: 0 0 0 3px #2f80c8; }
.ed-width { width: 32px; height: 32px; min-height: 0; padding: 0; border-radius: 8px; background: #fffaf2; border: 1.5px solid #c9a77c; display: inline-flex; align-items: center; justify-content: center; }
.ed-width.on { border-color: #2f80c8; background: #eaf2fd; }
.ed-width i { display: block; border-radius: 50%; background: #333; }
.ed-width.w0 i { width: 4px; height: 4px; } .ed-width.w1 i { width: 8px; height: 8px; } .ed-width.w2 i { width: 13px; height: 13px; }
.ed-tool { width: auto; min-height: 32px; padding: 4px 9px; border-radius: 8px; border: 1.5px solid #c9a77c; background: #fffaf2; color: #6b4a2f; font-size: 0.8em; font-weight: 600; }
.ed-tool.on { border-color: #2f80c8; background: #eaf2fd; }
.ed-sheet { margin-bottom: 8px; }
.ed-acts { display: flex; align-items: center; gap: 5px; margin: 6px 0 2px; }
.ed-icon { flex: none; width: 44px; min-height: 32px; padding: 0; border-radius: 8px; border: 1.5px solid #c9a77c; background: #fffaf2; color: #6b4a2f; font-size: 1.05em; font-weight: 700; white-space: nowrap; letter-spacing: -0.04em; }
.ed-icon.danger { border-color: #d9534f; background: #fff1ef; color: #c0392b; }
.ed-acts .ed-pager { flex: 1; justify-content: flex-end; gap: 4px; margin: 0; color: #6b4a2f; }
.ed-page { width: 28px; min-height: 32px; padding: 0; border-radius: 8px; background: #e8dccb; color: #6b4a2f; font-size: 1.1em; }
.ed-page:disabled { opacity: 0.4; }
.ed-acts .ed-pg { white-space: nowrap; font-size: 0.85em; padding: 0 2px; }
.ed-sheet textarea.ls-text { font-size: 4.6cqw; }
.ed-sheet.tool-hand .ls-over { pointer-events: auto; touch-action: none; }
.ed-sheet.tool-hand.erasing .ls-over { cursor: cell; }
.ed-sheet.tool-type .ed-item { pointer-events: auto; touch-action: none; cursor: move; }
.ed-pager { display: flex; align-items: center; }
.ed-pg { font-weight: 700; }
.ed-picker-bg { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; }
.ed-picker { width: 100%; max-height: 75vh; overflow: auto; background: #fbf5ea; border-radius: 16px 16px 0 0; padding: 12px 14px calc(16px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -4px 12px rgba(0, 0, 0, .3); color: #3b2a1c; }
.ed-picker-title { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; font-weight: 700; }
.ed-picker-title small { font-weight: normal; color: #7d6650; }
.ed-picker-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.ed-picker-grid button { min-height: 40px; padding: 2px; background: transparent; font-size: 24px; line-height: 1; }
.ed-picker-grid img { width: 30px; height: 30px; object-fit: contain; }
.ed-picker-hint { font-size: 0.85em; color: #7d6650; margin: 10px 0; }
.ed-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; max-width: 90vw; padding: 10px 18px; border-radius: 999px;
  background: #2f2a1f; color: #fff; font-weight: 700; text-align: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); transition: opacity .5s; }
.ed-toast.out { opacity: 0; pointer-events: none; }
.ed-minis { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 4px 0 6px; }
.lsheet.ed-mini { width: 46px; margin: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.ed-count { text-align: center; color: #ead8bf; margin: 0 0 12px; }
.sig-box { position: relative; height: 0; padding-bottom: 33.333%; background: #fffdf7; border: 2px dashed #c9a77c; border-radius: 10px; }
.sig-svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.sig-base { position: absolute; left: 7%; right: 7%; bottom: 24%; border-bottom: 1.5px solid #c9a77c; pointer-events: none; }
.sig-cap { position: absolute; left: 7%; bottom: 7%; font-size: 0.8em; color: #9b8366; pointer-events: none; }
.sig-box + .row-actions button { width: auto; padding: 8px 18px; min-height: 40px; }

/* ---- お手紙の BGM と封筒（10.19 ②b） ---- */
.bgm-pick { padding-bottom: 6px; }
.bgm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid #ecdcc3; }
.bgm-row:first-of-type { border-top: 0; }
.bgm-row label { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-size: 0.95em; }
.bgm-row input { width: 20px; height: 20px; flex: none; accent-color: #8a5a33; }
.bgm-try { width: auto; flex: none; min-height: 34px; padding: 4px 12px; border-radius: 17px; background: var(--nav-bg); color: var(--nav-text); font-size: 0.85em; }
.bgm-now { margin: -4px 0 10px; }
.bgm-toggle { width: auto; min-height: 36px; padding: 6px 14px; border-radius: 18px; background: rgba(255, 245, 225, .92); color: #6b4a2f; font-size: 0.85em; }

body.env-showing { overflow: hidden; }
.envelope { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; cursor: pointer;
  background: #5a3a21 repeating-linear-gradient(180deg, rgba(40, 20, 5, .22) 0 2px, transparent 2px 9px, rgba(40, 20, 5, .12) 9px 10px, transparent 10px 23px, rgba(255, 230, 190, .06) 23px 27px, transparent 27px 41px, rgba(40, 20, 5, .28) 41px 43px, transparent 43px 58px);
  transition: opacity .5s .8s; -webkit-tap-highlight-color: transparent; }
.env-body { position: relative; width: min(78vw, 340px); aspect-ratio: 3 / 2; perspective: 900px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); }
.env-back, .env-front, .env-flap, .env-paper { position: absolute; inset: 0; }
.env-back { background: #e9dcc3; border-radius: 6px; }
.env-paper { inset: 8% 7% 6%; background: #fffdf7 repeating-linear-gradient(transparent 0 11px, #e3d2b5 11px 12px); border-radius: 3px; transition: transform .7s .35s ease-out; }
.env-front { background: #f6ecd8; border-radius: 6px; clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%); }
.env-flap { background: #efe1c6; border-radius: 6px 6px 0 0; clip-path: polygon(0 0, 100% 0, 50% 56%); transform-origin: top; transition: transform .45s ease-in; z-index: 2; }
.env-seal { position: absolute; left: 50%; top: 52%; z-index: 3; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e0584a, #a8261c);
  color: #fbd6cf; font-size: 20px; line-height: 44px; text-align: center; box-shadow: 0 2px 4px rgba(0, 0, 0, .35); transition: opacity .2s; }
.env-from { margin: 6px 0 0; color: #fbf1e1; font-weight: 700; font-size: 1.1em; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.env-tap { margin: 0; color: #f3d9b1; animation: env-blink 1.6s ease-in-out infinite; }
@keyframes env-blink { 50% { opacity: .45; } }
.envelope.opening .env-seal { opacity: 0; }
.envelope.opening .env-flap { transform: rotateX(180deg); z-index: 0; }
.envelope.opening .env-paper { transform: translateY(-62%); z-index: 1; }
.envelope.opening { opacity: 0; pointer-events: none; }
.envelope.opening .env-tap { animation: none; opacity: 0; }
@media (prefers-reduced-motion: reduce) { .env-flap, .env-paper, .envelope { transition: none; } .env-tap { animation: none; } }
/* 手書き・サインの最中に画面が動かないように（iPhone は letter-editor.js でも止める） */
.ed-sheet.tool-hand, .sig-box { touch-action: none; -webkit-user-select: none; user-select: none; }
/* いたずらの入り口：クレヨンの「いたずら」の絵（2026-10-31） */
.prank-link.crayon { padding: 4px 0; margin-top: 16px; line-height: 0; }
.prank-link.crayon img { display: block; width: 86px; height: auto; }
/* いたずらの画面のスタンプの所だけ、うすい紫（暗い背景だと黒い棒人間が見えないため。2026-10-31 ユーザーの希望） */
body.prank-dark .prank-palette { background: #e6def0; border-radius: 12px; padding: 6px; }
body.prank-dark .prank-palette .prank-pick { background: #f4f0f8; color: #3a3342; }
body.prank-dark .prank-palette .prank-pick.on { background: #c9b8dc; outline-color: #7b5fa0; }
body.prank-dark .prank-palette .prank-pick small { color: #5a4f66; }

/* 親からもらって使ったお金のOK待ち（2026-11-01） */
.parent-paid .items { margin: 8px 0 0; }
.parent-paid .item { display: block; background: #fff; }
.inline-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.notice .inline-actions { margin-top: 8px; }
.tag.paid-tag { background: #e6f0ff; color: #1f4f9a; }

/* ---- お手紙③（未来の自分・外の人・親の確認） ---- */
.letter-who-pick .grp { grid-column: 1 / -1; font-size: 0.8em; color: #7d6650; margin: 6px 0 -2px; }
.letter-who-pick span small { display: block; font-weight: 400; font-size: 0.75em; color: #7d6650; }
.notice-parent { display: flex; gap: 8px; align-items: flex-start; background: #fff4d6; border: 1.5px solid #e7c46a; border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; font-size: 0.9em; color: #6b4a00; }
.notice-parent[hidden] { display: none; }
.st-wait, .st-fix { display: inline-block; border-radius: 10px; padding: 1px 8px; font-size: 0.75em; margin-left: 6px; vertical-align: 2px; }
.st-wait { background: #fff4d6; color: #6b4a00; }
.st-fix { background: #fde2df; color: #a8261c; }
.st-wait-box, .st-fix-box { border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; font-weight: 600; }
.st-wait-box { background: #fff4d6; color: #6b4a00; }
.st-fix-box { background: #fde2df; color: #a8261c; }
.review-card { display: block; text-decoration: none; color: inherit; border: 2px solid #e7a33c; background: #fff8ec; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
.review-card strong { font-size: 1.5em; margin: 0 2px; }
.review-card .note { display: block; margin-top: 2px; }
.review-fix { margin-top: 14px; }
.review-fix input { margin: 4px 0 8px; }
.contact { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.contact .em { font-size: 0.85em; color: var(--muted); overflow-wrap: anywhere; }
.contact.inactive { opacity: 0.6; }
/* 手紙だけの画面（読む画面・外の人が開く画面）：上の帯を出さない。消すボタンは目立たせない（2026-11-01 ユーザーの希望） */
body.letter-only .top-sticky { display: none; }
body.letter-only main { padding-top: 18px; }
.letter-dates { text-align: center; margin: 2px 0 12px; font-size: 0.8em; opacity: 0.85; }
.letter-actions .button.danger.soft { flex: 0 0 calc((100% - 8px) / 4); background: #e9b9b0; color: #7a2e22; }
.letter-actions .button { margin: 0; }
/* 上部メニューの赤い丸：やることがあるとき（2026-11-01） */
.topnav a { position: relative; }
.topnav a.has-todo::after { content: ""; position: absolute; top: 4px; left: calc(50% + 7px); width: 10px; height: 10px; border-radius: 50%; background: #e0182d; border: 2px solid #fff; }
/* お手紙のリマインド（10.21）：手紙を書こうのカード（本人の画面だけ）と、設定 › リマインド */
.reminder-cards { margin: 0 0 12px; position: relative; z-index: 1; }
/* カードはいちばん上。ポストが重なってもよいが、ポストがいちばん上（2026-11-02 ユーザーの希望） */
.post-link { z-index: 5; }
main > .reminder-cards:first-child .reminder-card:first-child, main > .vh + .reminder-cards .reminder-card:first-child { padding-right: 48px; }
.reminder-card { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; border: 2px solid #c98a4b; background: #fbf3e6; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; }
.reminder-card .rc-bell { font-size: 1.6em; }
.reminder-card .rc-text { display: flex; flex-direction: column; gap: 2px; }
.reminder-card .rc-meta { font-size: 0.85em; color: var(--muted); }
/* ひらがなの言葉はことばの切れめ（空白）でだけ折り返す */
.reminder-cards.kid .rc-text { word-break: keep-all; overflow-wrap: anywhere; }
.reminder-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.reminder-row.inactive { opacity: 0.6; }
.when-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.when-row select, .when-row input { width: auto; flex: 1 1 5em; min-width: 0; }
/* 利用規約の「親のおやくそく」（本文とは別に読んで同意してもらう。2026-11-03） */
.promise-box { border: 2px solid #e7a33c; background: #fff8ec; border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; }
.promise-box .promise-title { font-weight: 700; margin: 0 0 6px; }
.promise-box p:last-child { margin: 0; line-height: 1.8; }
.promise-box p { line-height: 1.8; margin: 0 0 6px; }
.promise-box ol { margin: 0; padding-left: 1.4em; line-height: 1.8; }
.promise-box li + li { margin-top: 4px; }
/* Reward をもらったときのお知らせの窓（10.14、2026-11-04。モックで形を決めた。動きは public/app.js） */
.rw-back { position: fixed; inset: 0; z-index: 90; background: rgba(20, 30, 50, .5); display: flex; align-items: center; justify-content: center; padding: 20px; overflow: hidden; }
.rw-back[hidden] { display: none; }
.rw-card { position: relative; overflow: hidden; width: 100%; max-width: 340px; max-height: 80vh; display: flex; flex-direction: column; background: #fff; color: var(--text); border-radius: 22px; padding: 20px 18px 12px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); animation: rw-pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes rw-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
/* 窓が出るときに1回だけ、斜めの光が通る */
.rw-shine { position: absolute; top: -50%; left: -60%; width: 40%; height: 200%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent); transform: rotate(18deg); animation: rw-shine 1.1s .35s ease-out both; pointer-events: none; z-index: 2; }
@keyframes rw-shine { from { left: -60%; } to { left: 130%; } }
.rw-title { min-height: 56px; display: flex; align-items: center; justify-content: center; margin: 0 0 10px; padding-left: 64px; text-align: left; font-size: 20px; line-height: 1.3; word-break: keep-all; animation: rw-twinkle 1.2s .3s ease-out both; }
@keyframes rw-twinkle { 0% { text-shadow: 0 0 0 rgba(255, 200, 40, 0); } 40% { text-shadow: 0 0 14px rgba(255, 190, 30, .9); } 100% { text-shadow: 0 0 0 rgba(255, 200, 40, 0); } }
/* ロゴの豚のトロフィー（左上。いちばんいい Reward の期間の色） */
.rw-trophy { position: absolute; top: 8px; left: 8px; width: 72px; height: 72px; z-index: 1; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); animation: rw-trophy .6s .15s cubic-bezier(.2, 1.5, .4, 1) both; }
.rw-trophy img { display: block; width: 72px; height: 72px; }
@keyframes rw-trophy { from { transform: scale(0) rotate(-25deg); } to { transform: none; } }
/* トロフィーだけが光る：トロフィーの形で切りぬいた光の帯（Monthly は3秒ごとに1回、Yearly は2回） */
.rw-glint { position: absolute; inset: 0; pointer-events: none; -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%) no-repeat; background-size: 300% 100%; background-position: 150% 0; }
.rw-trophy.glint-1 .rw-glint { animation: rw-glint1 3s .8s infinite; }
.rw-trophy.glint-2 .rw-glint { animation: rw-glint2 3s .8s infinite; }
@keyframes rw-glint1 { 0% { background-position: 150% 0; } 50% { background-position: -50% 0; } 100% { background-position: -50% 0; } }
@keyframes rw-glint2 { 0% { background-position: 150% 0; } 36% { background-position: -50% 0; } 36.01% { background-position: 150% 0; } 42% { background-position: 150% 0; } 78% { background-position: -50% 0; } 100% { background-position: -50% 0; } }
/* もらった Reward の一覧（多いときは窓の中でスクロール。スクロールバーは自分で描く） */
.rw-list-wrap { position: relative; display: flex; min-height: 0; margin: 0 0 12px; }
.rw-list { list-style: none; margin: 0; padding: 2px; display: grid; gap: 6px; overflow-y: auto; min-height: 0; flex: 1; scrollbar-width: none; }
.rw-list::-webkit-scrollbar { display: none; }
.rw-list li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; background: #fff8ec; border: 2px solid #ffd27a; font-weight: 700; font-size: 17px; text-align: left; line-height: 1.25; }
.rw-list .who { display: block; font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.1; }
.rw-badge { flex: none; font-size: 11px; font-weight: 800; color: #fff; border-radius: 999px; padding: 3px 8px; }
.rw-badge.daily { background: #ff8c1a; } .rw-badge.weekly { background: #2f9be0; } .rw-badge.monthly { background: #8a5cd1; } .rw-badge.yearly { background: #3fa34d; }
.rw-track { display: none; flex: none; width: 6px; margin-left: 6px; border-radius: 3px; background: #edf0f3; position: relative; }
.rw-thumb { position: absolute; left: 0; top: 0; width: 6px; border-radius: 3px; background: #a3adb8; }
.rw-list-wrap.scrolls .rw-track { display: block; }
.rw-list-wrap.scrolls::after { content: ''; position: absolute; left: 0; right: 12px; bottom: 0; height: 28px; background: linear-gradient(rgba(255, 255, 255, 0), #fff); pointer-events: none; }
.rw-list-wrap.scrolls.at-end::after { display: none; }
.rw-go { flex: none; display: block; padding: 12px; border-radius: 12px; background: var(--nav-bg); color: var(--nav-text); font-weight: 800; font-size: 17px; text-decoration: none; }
.rw-close { flex: none; display: block; width: auto; min-height: 0; margin: 6px auto 0; padding: 8px 16px; border: 0; background: none; color: var(--muted); font-size: 15px; font-weight: 700; }
.rw-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 91; }
.rw-confetti i { position: absolute; top: 0; left: 0; width: 8px; height: 14px; margin: -7px 0 0 -4px; border-radius: 2px; will-change: transform; }
@media (prefers-reduced-motion: reduce) { .rw-card, .rw-shine, .rw-title, .rw-trophy, .rw-glint { animation: none !important; } .rw-confetti { display: none; } }
/* もっている Reward の一覧のトロフィー */
.held-list .held-trophy { width: 40px; height: 40px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2)); }
/* 同意のチェック（登録・同意の画面。10.20） */
.consent { margin: 12px 0; display: grid; gap: 8px; }
.consent .choice { align-items: flex-start; }
.consent .choice span { line-height: 1.6; }
.consent .error { margin: -4px 0 0; color: var(--alert-text); font-size: 14px; }
.consent .promise-box { margin: 4px 0; }

/* 「ようこそ」の同意の画面（10.20、2026-11-05。モック /mock/mock-consent.html のまま） */
body.welcome { background: #fff; }
body.welcome main { padding: 0; max-width: none; }
.wc { max-width: 440px; margin: 0 auto; padding: 48px 26px 40px; min-height: 100vh; box-sizing: border-box; }
.wc-logo { display: block; margin: 0 auto 14px; }
.wc-title { display: block; text-align: center; font-size: 26px; line-height: 1.45; margin: 0 0 16px; }
.wc-lead { text-align: center; color: #4b5563; line-height: 1.8; margin: 0 0 28px; }
.wc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.wc-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; line-height: 1.8; }
.wc-no { flex: none; width: 30px; height: 30px; margin-top: 2px; border-radius: 50%; background: #2f80c8; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.wc-tap { text-align: center; color: #9aa3ad; font-size: 14px; margin: 30px 0 0; animation: wc-blink 2.2s ease-in-out 1.6s infinite; }
@keyframes wc-blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.wc-agree { margin-top: 30px; }
.wc-agree .primary { width: 100%; }
.wc-out { text-decoration: none; text-align: center; display: block; width: auto; margin: 12px auto 0; padding: 8px 16px; border: 0; background: none; color: #6b7280; font-size: 15px; font-weight: 700; }
/* 文字をふわっと出す */
.fade, .wc-list li:not([hidden]), .wc-agree:not([hidden]) { animation: wc-fade .9s ease-out both; }
.wc-logo.fade { animation-delay: .1s; } .wc-title.fade { animation-delay: .35s; } .wc-lead.fade { animation-delay: .8s; }
.wc-tap.fade { animation: wc-fade .9s ease-out 1.3s both, wc-blink 2.2s ease-in-out 2.3s infinite; }
@keyframes wc-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade, .wc-list li, .wc-agree, .wc-tap { animation: none !important; } }
.wc-notes { background: #f3f7fc; border-radius: 12px; padding: 12px 14px; margin: -12px 0 24px; font-size: 15px; line-height: 1.7; }
.wc-notes p { margin: 0; }
.wc-notes .wc-notes-title { font-weight: 800; margin-bottom: 4px; }

/* 管理画面：規約の書きかえ（10.20、2026-11-05） */
.legal-text { display: block; width: 100%; min-height: 24em; font-size: 15px; line-height: 1.6; padding: 10px; border: 1px solid var(--line); border-radius: 10px; box-sizing: border-box; font-family: inherit; margin-bottom: 10px; }
.legal-note { display: block; width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 10px; box-sizing: border-box; font-family: inherit; font-size: 15px; }
.legal-help { margin: 0 0 10px; font-size: 0.9em; }
.legal-help summary { color: var(--primary); font-weight: 700; cursor: pointer; }
.legal-help ul { margin: 6px 0 0; padding-left: 1.3em; line-height: 1.7; }
.legal-preview { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.wc-preview .wc-list { margin-bottom: 12px; }
.legal-diff p { margin: 0 0 6px; padding: 8px 10px; border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.92em; line-height: 1.6; }
.legal-diff p span { display: block; font-size: 0.8em; font-weight: 800; }
.legal-diff .add { background: #e8f7ee; color: #1d5e36; }
.legal-diff .del { background: #fdecec; color: #8a1f1f; }
/* 文書を全部出す形（2026-11-25）：変わらない行はうすく、変わったところは右下の ↑↓ で飛ぶ */
.legal-diff.full .same { color: #6b7785; padding: 2px 10px; margin: 0; }
.legal-diff.full .add, .legal-diff.full .del { margin: 4px 0; }
.legal-diff.full .now { box-shadow: 0 0 0 3px #e0a800; }
.chg-nav { position: fixed; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #d5dde6; border-radius: 999px; padding: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.chg-nav button { min-width: 44px; min-height: 44px; margin: 0; padding: 0; border-radius: 999px; font-size: 20px; }
.chg-nav button::before { display: none; }
/* 書きかえの欄の後ろに同じ文を置いて色を塗る（2026-11-25）。文字は欄のほうだけ見せる */
.hl-wrap { position: relative; margin-bottom: 10px; }
.hl-wrap .legal-text { position: relative; z-index: 1; background: transparent; margin-bottom: 0; }
.hl-back { position: absolute; inset: 0; overflow: hidden; padding: 10px; border: 1px solid transparent; border-radius: 10px; font-size: 15px; line-height: 1.6; color: transparent; white-space: pre-wrap; overflow-wrap: break-word; background: #fff; }
.hl-line.add { background: #d8f2e2; }
.hl-line.delbefore { box-shadow: inset 0 3px 0 #d64545; }
.hl-line.delafter { box-shadow: inset 0 -3px 0 #d64545; }
.hl-line.now { outline: 3px solid #e0a800; outline-offset: -1px; }
.hl-wrap.hl-off .hl-line { background: none; box-shadow: none; outline: none; }
.chg-nav span { min-width: 54px; text-align: center; font-weight: 800; font-size: 14px; }


/* 問い合わせのチャット（10.22、2026-11-06。見本 /mock/mock-chat.html） */
.chat { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; }
/* 管理画面のやりとり：高さの決まった枠に入れ、開いたら下（いちばん新しい）を見せる（data-scroll-end。2026-11-25） */
.chat-scroll { max-height: 65vh; overflow-y: auto; border: 1px solid #d5dde6; border-radius: 12px; padding: 10px; margin: 0 0 12px; background: #fbfcfd; }
.chat-scroll .chat:last-child { margin-bottom: 0; }
/* 返事の欄に AI の下書きが入っているときは、文字を青に（2026-11-25 ユーザー） */
textarea.ai-draft { color: #1d5fb4; }
.chat-day { text-align: center; color: var(--muted); font-size: 0.78em; margin: 6px 0 0; }
.chat-empty { color: var(--muted); text-align: center; margin: 24px 0; }
.bubble { max-width: 82%; margin: 0; padding: 10px 12px; border-radius: 16px; line-height: 1.6; font-size: 0.95em; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble small { display: block; font-size: 0.72em; color: var(--muted); margin-bottom: 2px; font-weight: 700; }
.bubble .time { display: block; text-align: right; font-size: 0.7em; color: var(--muted); margin-top: 4px; }
.bubble.me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.bubble.me .time { color: #d6e7f7; }
.bubble.ai { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.operator { align-self: flex-start; background: #e9f6ee; border: 1px solid #bfe3cc; border-bottom-left-radius: 4px; }
.bubble.sys { align-self: center; max-width: 92%; background: #f0ebe2; color: #6b5a43; font-size: 0.8em; padding: 6px 12px; border-radius: 12px; text-align: center; }
.chat-form { position: sticky; bottom: 0; background: var(--bg); padding: 8px 0 10px; border-top: 1px solid var(--line); }
.chat-form textarea { display: block; width: 100%; box-sizing: border-box; min-height: 3.2em; padding: 10px; border: 1px solid var(--line); border-radius: 12px; font-family: inherit; font-size: 1em; margin-bottom: 8px; }
.chat-form .primary { width: 100%; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.92em; margin: 6px 0 12px; }
.legal-table th, .legal-table td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.legal-table th { background: #f0ebe2; }
.table-wrap { overflow-x: auto; }
/* 管理画面の問い合わせ：その1件に入るやりとりに枠（ほかの日・ほかの問い合わせのやりとりと見分ける） */
.bubble.this-case { box-shadow: 0 0 0 2px #e0a800; }

/* ---- 右下の豚のアイコン（2026-11-06。見本 /mock/mock-pigchat.html）。下の余白はふだんのまま（ユーザーの希望で詰めた） ---- */
/* 豚だけ（枠・背景なし）。絵は羽を広げたときの大きさの枠なので、豚は左下に寄っている */
.pigfab { position: fixed; right: 4px; bottom: 6px; width: 96px; height: 96px; border: 0; padding: 0; background: none; z-index: 50; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pigfab .body { position: absolute; inset: 0; }
.pigfab img { position: absolute; left: 0; top: 0; width: 96px; height: 96px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.25)); opacity: 0; }
.pigfab .awake { opacity: 1; }
.pigfab .fx { position: absolute; pointer-events: none; opacity: 0; }
/* 寝る */
.pigfab.sleeping .awake { opacity: 0; }
.pigfab.sleeping .sleep { opacity: 1; }
.pigfab.sleeping .body { animation: breathe 2.4s ease-in-out infinite; transform-origin: 35% 90%; }
@keyframes breathe { 0%, 100% { transform: scale(1) rotate(-5deg); } 50% { transform: scale(1.05, .96) rotate(-5deg); } }
.zzz { left: 62px; top: 30px; font: 800 15px sans-serif; color: #6b84ad; }
.pigfab.sleeping .zzz { animation: zfloat 2.4s ease-out infinite; }
.pigfab.sleeping .zzz.z2 { animation-delay: .8s; font-size: 12px; }
.pigfab.sleeping .zzz.z3 { animation-delay: 1.6s; font-size: 10px; }
@keyframes zfloat { 0% { opacity: 0; transform: translate(0, 8px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(12px, -24px); } }
/* 羽で浮く：羽の角度がちがう3枚の絵を順に出す */
.pigfab.flying .awake { opacity: 0; }
.pigfab.flying .f1 { animation: f1 .36s steps(1) infinite; }
.pigfab.flying .f2 { animation: f2 .36s steps(1) infinite; }
.pigfab.flying .f3 { animation: f3 .36s steps(1) infinite; }
@keyframes f1 { 0% { opacity: 1; } 25% { opacity: 0; } 75% { opacity: 0; } }
@keyframes f2 { 0% { opacity: 0; } 25% { opacity: 1; } 50% { opacity: 0; } 75% { opacity: 1; } }
@keyframes f3 { 0% { opacity: 0; } 50% { opacity: 1; } 75% { opacity: 0; } }
.pigfab.flying { animation: float 1.6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
/* 草を食べる */
.grass { left: 2px; top: 72px; width: 28px; height: 22px; transform-origin: 50% 100%; }
.pigfab.eating .grass { opacity: 1; animation: munch 3.6s steps(6) forwards; }
@keyframes munch { 0% { transform: scaleY(1); } 100% { transform: scaleY(.15); } }
.pigfab.eating .body { animation: nibble .45s ease-in-out infinite; transform-origin: 30% 90%; }
@keyframes nibble { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-8deg) translate(-2px, 3px); } }
/* ニヤリと笑う */
.pigfab.grinning .awake { opacity: 0; }
.pigfab.grinning .grin { opacity: 1; }
.pigfab.grinning .body { animation: smirk 2.4s ease-in-out forwards; transform-origin: 35% 90%; }
@keyframes smirk { 0% { transform: rotate(0); } 25%, 80% { transform: rotate(6deg); } 100% { transform: rotate(0); } }
.kira { left: 60px; top: 34px; font: 700 14px sans-serif; color: #e0a800; }
.pigfab.grinning .kira { animation: kira 1.2s ease-in-out .5s 2; }
@keyframes kira { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1.2) rotate(30deg); } }
/* コインが落ちてきて入る */
.coin { left: 37px; top: -30px; width: 14px; height: 16px; }
.pigfab.coining .coin { animation: coin 1.4s cubic-bezier(.5, 0, 1, .6) forwards; }
@keyframes coin { 0% { opacity: 1; transform: translateY(0) rotateY(0); } 70% { opacity: 1; transform: translateY(62px) rotateY(540deg); } 78% { opacity: 0; transform: translateY(68px) rotateY(600deg) scaleY(.3); } 100% { opacity: 0; transform: translateY(68px); } }
.pigfab.coining .body { animation: gulp .5s ease-out 1.05s; transform-origin: 35% 100%; }
@keyframes gulp { 0% { transform: scale(1); } 40% { transform: scale(1.08, .9); } 100% { transform: scale(1); } }
.chari { left: -36px; top: 40px; font: 800 12px sans-serif; color: #b88700; white-space: nowrap; }
.pigfab.coining .chari { animation: chari 1s ease-out 1.1s forwards; }
@keyframes chari { 0% { opacity: 0; transform: translateY(4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-12px); } }
.pigfab.hop .body { animation: hop .5s ease-out; }
@keyframes hop { 0% { transform: translateY(0); } 40% { transform: translateY(-10px); } 100% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .pigfab, .pigfab * { animation: none !important; } }
/* 吹き出し */
.say { right: 84px; top: 22px; background: #fff; border: 2px solid #2f80c8; color: #1f2933; font: 800 13px sans-serif; border-radius: 12px; padding: 4px 9px; white-space: nowrap; }
.pigfab.saying .say { animation: say 2.4s ease-out forwards; }
@keyframes say { 0% { opacity: 0; transform: scale(.6); } 12% { opacity: 1; transform: scale(1.05); } 20%, 85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
/* 開いたとき：下からぴょこっと出てきて跳ねる */
.pigfab.enter .body { animation: enter 1s cubic-bezier(.3, 1.5, .6, 1); }
/* 行事のあいさつ（2026-11-09）：ぴょんと出てきて、きらり */
.pigfab.season .body { animation: enter 1s cubic-bezier(.3, 1.5, .6, 1); }
.pigfab.season .kira { animation: kira 1.2s ease-in-out .4s 2; }
@keyframes enter { 0% { transform: translateY(110px); } 60% { transform: translateY(-14px); } 80% { transform: translateY(0); } 90% { transform: translateY(-5px); } 100% { transform: translateY(0); } }
/* 報告したとき：コインが3枚つづけて入る */
.pigfab.report .coin, .pigfab.ok .coin { animation: coin 1.1s cubic-bezier(.5, 0, 1, .6) forwards; }
.pigfab.report .coin.c2 { animation-delay: .45s; }
.pigfab.report .coin.c3 { animation-delay: .9s; }
.pigfab.report .body { animation: gulp .45s ease-out .8s 3; transform-origin: 35% 100%; }
/* Reward をもらったとき：高く飛んでキラキラ */
.pigfab.reward .awake { opacity: 0; }
.pigfab.reward .f1 { animation: f1 .3s steps(1) infinite; }
.pigfab.reward .f2 { animation: f2 .3s steps(1) infinite; }
.pigfab.reward .f3 { animation: f3 .3s steps(1) infinite; }
.pigfab.reward { animation: soar 3s ease-in-out forwards; }
@keyframes soar { 0% { transform: translateY(0); } 40% { transform: translateY(-120px) rotate(-6deg); } 70% { transform: translateY(-90px) rotate(4deg); } 100% { transform: translateY(0); } }
.spark { font: 700 16px sans-serif; color: #e0a800; }
.spark.s1 { left: 0; top: 10px; } .spark.s2 { left: 70px; top: 0; } .spark.s3 { left: 40px; top: 70px; }
.pigfab.reward .spark { animation: kira 1s ease-in-out infinite; }
.pigfab.reward .spark.s2 { animation-delay: .3s; } .pigfab.reward .spark.s3 { animation-delay: .6s; }
/* OK をもらったとき：ニヤリ＋コイン1枚 */
.pigfab.ok .awake { opacity: 0; }
.pigfab.ok .grin { opacity: 1; }
.pigfab.ok .kira { animation: kira 1.2s ease-in-out .3s 2; }
.pigfab.ok .body { animation: gulp .45s ease-out .8s; transform-origin: 35% 100%; }
/* 異変・いたずらが残っている画面（2026-11-06）：斜め上を見て、頭の上にハテナ（青＝異変、紫＝いたずら。両方なら2つ） */
.pigfab.puzzled .awake { opacity: 0; }
.pigfab.puzzled .look { opacity: 1; }
.pigfab.puzzled .body { animation: tilt 3.6s ease-in-out infinite; transform-origin: 35% 90%; }
@keyframes tilt { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-4deg); } }
.pigfab .q { top: 6px; left: 14px; font: 900 30px/1 "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", sans-serif; paint-order: stroke; -webkit-text-stroke: 5px #fff; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); transform-origin: 50% 100%; }
.pigfab .q.anom { color: #2f80c8; }
.pigfab .q.prank { color: #8e4fd0; }
.pigfab.q-anom.q-prank .q.anom { left: 2px; top: 10px; }
.pigfab.q-anom.q-prank .q.prank { left: 30px; top: 0; }
.pigfab.puzzled.q-anom .q.anom, .pigfab.puzzled.q-prank .q.prank { opacity: 1; animation: qbob 1.8s ease-in-out infinite; }
.pigfab.puzzled .q.prank { animation-delay: .9s; }
@keyframes qbob { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-5px) rotate(8deg); } }
.say.prank-say { border-color: #8e4fd0; }
/* ---- 子供が押したときの反応（2026-11-09。見本 /mock/mock-pig3.html） ---- */
.pigfab.hold.saying .say { animation: none; opacity: 1; }
.pigfab.spin .body { animation: pig-spin .8s cubic-bezier(.4, 1.4, .6, 1); transform-origin: 35% 60%; }
@keyframes pig-spin { 0% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-28px) rotate(200deg); } 100% { transform: translateY(0) rotate(360deg); } }
.twinkle, .tk { color: #f5b400; font-size: 18px; line-height: 1; }
.twinkle { left: 60px; top: 8px; }
.pigfab.spin .twinkle { animation: pig-pop 1s ease-out .5s; }
@keyframes pig-pop { 0% { opacity: 0; transform: scale(.3); } 40% { opacity: 1; transform: scale(1.3); } 100% { opacity: 0; transform: scale(1); } }
.pigfab.tumble .body { animation: pig-tumble 2.2s ease-in-out; transform-origin: 35% 90%; }
@keyframes pig-tumble { 0% { transform: none; } 20% { transform: translateX(-10px) rotate(-100deg); } 65% { transform: translateX(-10px) rotate(-100deg); } 85% { transform: rotate(8deg); } 100% { transform: none; } }
.sweat { left: 58px; top: 20px; font-size: 16px; }
.pigfab.tumble .sweat { animation: pig-pop 1s ease-out .9s; }
.pigfab.sneeze .body { animation: pig-sneeze 1.4s ease-in-out; transform-origin: 35% 90%; }
@keyframes pig-sneeze { 0% { transform: none; } 35% { transform: rotate(-10deg) scale(1.04); } 45% { transform: rotate(-10deg) scale(1.06); } 55% { transform: translateX(-10px) rotate(12deg) scale(.96); } 65% { transform: translateX(4px); } 75% { transform: translateX(-3px); } 100% { transform: none; } }
.pigfab.tickle .body { animation: pig-wiggle .18s ease-in-out 10; transform-origin: 35% 90%; }
@keyframes pig-wiggle { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.pigfab.tickle .awake, .pigfab.fart .awake { opacity: 0; }
.pigfab.tickle .grin, .pigfab.fart .grin { opacity: 1; }
.tk { left: 50px; top: 20px; font-size: 16px; }
.pigfab.tickle .tk { animation: pig-rise 1.6s ease-out forwards; }
.pigfab.tickle .t2 { animation-delay: .3s; left: 62px; }
.pigfab.tickle .t3 { animation-delay: .6s; left: 40px; }
@keyframes pig-rise { 0% { opacity: 0; transform: translateY(10px) scale(.5); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-34px) scale(1.2); } }
.pigfab.fart .body { animation: pig-fart 1.6s ease-in-out; transform-origin: 35% 90%; }
@keyframes pig-fart { 0%, 100% { transform: none; } 30% { transform: scale(1.04, .94); } 40% { transform: translateX(6px) scale(1); } }
.puff { left: -14px; top: 40px; font-size: 26px; line-height: 1; }
.pigfab.fart .puff { animation: pig-puff 1.6s ease-out .45s; }
@keyframes pig-puff { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(-22px, -10px) scale(1.6); } }
.pigfab.angry .body { animation: pig-shake .1s linear 14; filter: sepia(1) saturate(4) hue-rotate(-40deg); }
@keyframes pig-shake { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(2px); } }
.fume { left: 56px; top: 10px; font-size: 22px; line-height: 1; }
.pigfab.angry .fume { animation: pig-pop .7s ease-out 2; }
/* ---- 豚とジャンケン（2026-11-09）：豚の手、選ぶ窓、結果 ---- */
.hand { left: 20px; top: -46px; font-size: 44px; line-height: 1; }
.pigfab.showhand .hand { opacity: 1; animation: pig-pop-in .25s ease-out; }
/* ピストルを5回続けて押したとき：サングラスをかける（2026-11-10） */
.pigfab .shades { inset: 0; }
.pigfab .shades svg { position: absolute; }
/* キャラのサングラス（2026-11-21）：豚の目の場所から、横・縦（px）・大きさ・傾きをずらす（data-shades → public/app.js が --sh-* に入れる） */
.pigfab .shades .sh-in { position: absolute; inset: 0; transform-origin: 22px 66.5px; transform: translate(calc(var(--sh-x, 0) * 1px), calc(var(--sh-y, 0) * 1px)) rotate(calc(var(--sh-r, 0) * 1deg)) scale(var(--sh-s, 1)); }
/* レンズ：顔の正面に合わせて、たての線はそのまま横の線だけ傾ける。つる：頭の右の側面の中で、先が小さくカーブ */
.pigfab .shades .lens { left: 7px; top: 60.5px; width: 30px; height: 12px; transform: skewY(21deg); }
.pigfab .shades .temple { left: 0; top: 0; width: 96px; height: 96px; }
.pigfab.shades .shades { opacity: 1; animation: shades-on .5s ease-out; }
/* サングラスをかけている間は、異変・いたずらのときも上を向かず、ふつうの顔のまま（マフィアっぽく。2026-11-10 ユーザーの希望） */
.pigfab.shades.puzzled .awake { opacity: 1; }
.pigfab.shades.puzzled .look { opacity: 0; }
@keyframes shades-on { from { transform: translateY(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pig-pop-in { from { transform: scale(.5); } to { transform: scale(1); } }
.jk-panel { position: fixed; left: 8px; right: 8px; bottom: calc(112px + env(safe-area-inset-bottom, 0px)); z-index: 60; max-width: 440px; margin: 0 auto; padding: 10px 12px 14px; border-radius: 18px; background: var(--card); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.jk-panel[hidden], .jk-result[hidden] { display: none; }
.jk-title { margin: 0 0 8px; text-align: center; font-weight: 800; font-size: 16px; }
.jk-hands { display: flex; gap: 8px; }
.jk-hands button { flex: 1; display: flex; flex-direction: column; align-items: center; min-height: 0; padding: 8px 0; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text); font-size: 40px; line-height: 1.1; -webkit-tap-highlight-color: transparent; }
.jk-hands small { margin-top: 2px; font-size: 13px; font-weight: 800; }
.jk-panel .jk-gun { position: absolute; left: auto; right: 10px; bottom: 2px; width: auto; min-height: 0; padding: 2px 4px; border: 0; background: none; color: var(--text); font-size: 8px; line-height: 1; opacity: .2; -webkit-tap-highlight-color: transparent; }
/* ピストルを押したとき：正面の顔で画面いっぱいに膨らむ → タップで破裂（2026-11-10） */
.pig-what { position: fixed; left: 50%; bottom: 0; z-index: 80; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pig-what svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); }
.pig-what.full svg { animation: jiggle .5s ease-in-out infinite; }
.pig-what .eye-bulge { transform-box: fill-box; transform-origin: center; }
.pig-what .what { position: absolute; left: 29%; top: 4%; z-index: 1; padding: .45em .55em; border: 4px solid #222; border-radius: 50%; background: #fff; color: #e03131; font: 900 2.75em/1 "Arial Black", Impact, sans-serif; white-space: nowrap; transform: rotate(6deg); }
.pig-what .what::after { content: ""; position: absolute; left: 22%; bottom: -24px; border: 14px solid transparent; border-top: 26px solid #222; transform: rotate(25deg); }
.jk-result { position: fixed; left: 50%; top: 40%; z-index: 60; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -50%) rotate(-4deg); padding: 14px 22px; border: 4px solid #f0a020; border-radius: 18px; background: #fff6d8; font-weight: 900; font-size: 26px; color: #d9480f; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); animation: prank-pop .3s ease-out; white-space: nowrap; }
.jk-result small { margin-top: 4px; font-size: 16px; color: #2f9e44; }
.jk-result.lose { color: #5a5a7a; border-color: #9aa5c4; background: #f1f4fb; }
.jk-result.lose small { color: #5a5a7a; }
@media (prefers-reduced-motion: reduce) { .jk-result { animation: none; } }
/* ごくまれ（子供が押したとき100回に1回くらい）：膨らんで画面いっぱい → タップで破裂 */
.pigfab.gone { visibility: hidden; }
.pig-balloon { position: fixed; z-index: 80; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pig-balloon img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); }
.pig-balloon.full img { animation: jiggle .5s ease-in-out infinite; }
@keyframes jiggle { 0%, 100% { transform: scale(1, 1); } 25% { transform: scale(1.03, .97) rotate(-1.5deg); } 75% { transform: scale(.97, 1.03) rotate(1.5deg); } }
.pig-bit { position: fixed; z-index: 81; pointer-events: none; box-shadow: inset -3px -3px 0 rgba(0,0,0,.12); }
.pig-bit.star { box-shadow: none; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); } /* キラキラのキャラの破裂（2026-11-21） */
.pig-flash { position: fixed; inset: 0; z-index: 79; background: #fff; pointer-events: none; }

/* 豚のアイコンから開く、問い合わせのチャットの窓（親だけ） */
.cb[hidden] { display: none; }
.cb-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 60; }
.cb-sheet { position: fixed; left: 0; right: 0; bottom: 0; height: 80vh; height: 80dvh; max-width: 560px; margin: 0 auto; background: var(--bg); border-radius: 18px 18px 0 0; z-index: 61; display: flex; flex-direction: column; box-shadow: 0 -4px 16px rgba(0, 0, 0, .2); }
.cb-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--card); border-radius: 18px 18px 0 0; }
.cb-head p { flex: 1; margin: 0; font-size: 16px; }
.cb-head small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.cb-x { width: 36px; min-height: 36px; padding: 0; border: 0; background: #eef1f4; border-radius: 50%; font-size: 18px; color: var(--text); }
.cb-body { flex: 1; overflow-y: auto; padding: 12px 14px; margin: 0; }
.cb-body [data-cb-list] { display: flex; flex-direction: column; gap: 10px; }
.cb-all { font-size: 12px; text-align: center; margin: 6px 0 0; }
.cb-form { padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); display: flex; gap: 8px; align-items: flex-end; }
.cb-form textarea { flex: 1; min-height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; font: inherit; font-size: 16px; }
.cb-form button { width: auto; min-height: 44px; padding: 0 16px; }
body.cb-open { overflow: hidden; }
/* 親の豚の赤い丸：まだ読んでいない運営者の返事がある（チャットの窓を開くと消える） */
.pig-dot { position: absolute; left: 50px; top: 30px; width: 16px; height: 16px; border-radius: 50%; background: #e5322b; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
/* 管理画面：FAQ とメモを1つの画面で（2026-11-08） */
.kn-jump { display: flex; gap: 8px; }
.kn-jump a { flex: 1; text-align: center; }
.kn-doc { border-top: 3px solid var(--line); margin-top: 18px; padding-top: 4px; scroll-margin-top: 8px; }
/* 設定の一覧のまとまり（2026-11-08） */
.settings-menu .menu-group { font-size: 0.95em; color: var(--muted, #5b6573); margin: 18px 2px 6px; }
.settings-menu .menu-group:first-child { margin-top: 4px; }
/* おこづかい帳の預金・財布の絵（2026-11-08。金額の左と、資産総額の下の「預金 ＋ 財布」の前） */
.tile.has-ico strong { display: flex; align-items: center; gap: 8px; }
.tile-ico { flex: none; width: 30px; height: 30px; }
.tile-ico.bank { color: #2f80c8; }
.tile-ico.wallet { color: #b9773a; }
.hero-note.has-ico { display: inline-flex; align-items: center; gap: 4px; }
.hero-note .tile-ico { width: 20px; height: 20px; }
/* 管理画面：紹介ページの数（10.23、2026-11-09） */
.admin-lp { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); }
.admin-lp th, .admin-lp td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.admin-lp th:first-child, .admin-lp td:first-child { text-align: left; }

/* ---- 報告画面：押して送信（2026-11-13 要件 10.24。見本 docs/mock/sched/stepper2） ---- */
.tap-list { display: grid; gap: 8px; margin-bottom: 14px; }
.tap-card {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 0 #d3dbe2;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s, box-shadow .08s, background .2s;
}
.tap-card:active { transform: translateY(2px); box-shadow: none; }
.tap-card:has(.tap-drawer:not([hidden])):active { transform: none; box-shadow: 0 2px 0 #d3dbe2; }
.tap-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.tap-card.sent, .tap-card.okd { background: #e4f5ea; border-color: #86cfa3; box-shadow: none; }
.tap-card.waiting { border-style: dashed; }
.tap-card[hidden] { display: none; }
.tap-mark {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px dashed #b9c4ce;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  font-size: 1.05em;
}
.tap-card.sent .tap-mark, .tap-card.okd .tap-mark { border: 0; background: #2bb673; animation: tap-pop .3s; }
@keyframes tap-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.2); } 100% { transform: none; } }
.tap-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tap-info .chore-name { font-weight: 700; font-size: 1.05em; }
.tap-info .chore-price { color: var(--muted); font-size: .8em; font-weight: 700; }
.tap-right { flex: none; font-weight: 800; color: #1f8a52; white-space: nowrap; font-size: .95em; }
.tap-hint { color: #9aa5af; font-size: .8em; font-weight: 700; }
.tap-pend { position: absolute; right: 10px; bottom: -10px; font-size: .72em; font-weight: 800; color: #b26a00; background: #fff1dd; border-radius: 9px; padding: 2px 7px; white-space: nowrap; }
.tap-toast {
  position: absolute;
  right: 10px;
  top: -11px;
  z-index: 2;
  background: #1f2933;
  color: #fff;
  font-size: .75em;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  pointer-events: none;
  animation: tap-fade 1.9s forwards;
}
.tap-toast.bad { background: var(--danger); animation-duration: 3.5s; white-space: normal; max-width: 85%; }
@keyframes tap-fade { 0% { opacity: 0; transform: translateY(4px); } 12% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }
.tap-list[data-free-list] { position: relative; }

/* 下に開く引き出し（取り消す？・数を決めておくる） */
.tap-drawer {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding-top: 10px;
  margin-top: 2px;
  border-top: 1px dashed #d6e0e8;
  cursor: default;
}
.tap-drawer[hidden] { display: none; }
.tap-drawer > * { white-space: nowrap; }
.tap-q { margin-right: auto; font-size: .85em; font-weight: 800; color: var(--muted); }
.tap-drawer button.tap-small { display: inline-block; width: auto; min-height: 40px; padding: 8px 14px; font-size: .95em; }
.tap-qgrp { display: flex; align-items: center; gap: 6px; margin-right: auto; }
.tap-stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.tap-stepper button.tap-step {
  width: 44px;
  min-height: 42px;
  padding: 0;
  border-radius: 0;
  background: #eef4fa;
  color: var(--primary);
  font-size: 1.4em;
  font-weight: 900;
}
.tap-stepper button.tap-step:disabled { color: #c3cbd2; background: #f5f7f9; cursor: default; }
.tap-num { width: 48px; border: 0; text-align: center; font-weight: 900; font-size: 1.05em; padding: 0; background: transparent; }
.tap-unit { font-size: .95em; }
.tap-drawer button.tap-send, .tap-free button.tap-send { display: inline-flex; width: auto; min-height: 42px; padding: 8px 14px; margin-left: auto; }
button.tap-send:disabled { background: #c9d1d8; cursor: default; }

/* リストにないお手伝い */
.tap-free { position: relative; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.tap-free-fields { display: flex; gap: 8px; margin-top: 8px; }
.tap-free-fields input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 9px; font-size: 1em; }
.tap-free-fields input[name="free_amount"] { flex: none; width: 80px; }

/* 送れていない分のお知らせ（1分たっても送れないとき） */
.tap-banner {
  position: sticky;
  top: 6px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--danger);
  color: #fff;
  font-weight: 800;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: .92em;
}
.tap-banner[hidden] { display: none; }
.tap-banner button.tap-retry { display: inline-block; width: auto; min-height: 0; margin-left: auto; background: #fff; color: var(--danger); border-radius: 9px; padding: 7px 10px; font-weight: 900; white-space: nowrap; }
.tap-report .tabs { margin-bottom: 12px; }

/* 毎日 Mission のルーティン（2026-11-14。見本 docs/mock/sched/stepper2：時間は見出しの中、左は細い線と丸だけ） */
.tap-dh { margin: 4px 2px 10px; font-size: 1.02em; }
.tap-dh span { font-weight: 400; color: var(--muted); font-size: .85em; }
.tap-tl { position: relative; padding-left: 22px; margin-bottom: 6px; }
.tap-tl::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: #c9d6e3; }
.tap-rt { position: relative; margin-bottom: 12px; }
.tap-rt-dot { position: absolute; left: -21px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); }
.tap-rt-box { border-radius: 12px; overflow: hidden; border: 2px solid #b9d3ea; background: #f3f8fd; }
.tap-rt-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #dcebf8; }
.tap-rt-time { font-weight: 900; color: #2f5f8c; font-size: .95em; }
.tap-rt-name { font-weight: 800; flex: 1; }
.tap-rt-prog { display: flex; gap: 3px; }
.tap-rt-prog i { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #7fb0db; }
.tap-rt-prog i.f { background: var(--primary); border-color: var(--primary); }
.tap-card.in { border: 0; border-top: 1px solid #d6e5f2; border-radius: 0; box-shadow: none; padding: 10px 10px; }
.tap-card.in .tap-mark { width: 30px; height: 30px; }
.tap-card.in.sent, .tap-card.in.okd { background: #e9f7ee; }
.tap-rt-box > .tap-card.in:active { transform: none; background: #eef4fa; }
button.tap-all { display: block; width: 100%; min-height: 0; border: 0; border-top: 1px solid #d6e5f2; border-radius: 0; background: #eaf3fb; color: var(--primary); font-weight: 800; padding: 9px; font-size: .95em; }
.tap-stamp {
  display: none;
  position: absolute;
  right: 46px;
  top: 3px;
  transform: rotate(-8deg);
  border: 3px solid #e0533b;
  color: #e0533b;
  font-weight: 900;
  padding: 1px 8px;
  border-radius: 8px;
  font-size: .85em;
  letter-spacing: .05em;
  background: rgba(255, 255, 255, .85);
  pointer-events: none;
}
.tap-rt.done .tap-stamp { display: block; animation: tap-stamp .35s ease-out; }
@keyframes tap-stamp { 0% { transform: rotate(-8deg) scale(2.2); opacity: 0; } 100% { transform: rotate(-8deg) scale(1); opacity: 1; } }
.tap-rt.done .tap-rt-box { border-color: #7fd0a6; background: #eefaf3; }
.tap-rt.done .tap-rt-head { background: #c9eed9; }
.tap-rt.done .tap-rt-time { color: #1f8a52; }
.tap-rt.done .tap-rt-prog i { border-color: #2bb673; background: #2bb673; }
.tap-rt.done .tap-rt-dot { background: #2bb673; border-color: #2bb673; }
.tap-rt.done button.tap-all { display: none; }
/* 努力 Mission：黄色・点線・旗で、はっきり別の見た目 */
.tap-effort { margin-top: 16px; border: 2px solid #e8b84a; background: #fff9e8; border-radius: 14px; padding: 10px; }
.tap-effort .tap-dh { color: #9a6a00; }
.tap-effort .tap-card { border-color: #f0dca8; }
.tap-effort .tap-card.sent, .tap-effort .tap-card.okd { background: #fff3d2; border-color: #e3b448; }
.tap-effort .tap-card.sent .tap-mark, .tap-effort .tap-card.okd .tap-mark { background: #e0a020; }
.tap-effort .tap-right { color: #9a6a00; }
.tap-effort .chore-price { color: #9a6a00; }

/* 毎日 Mission の設定（2026-11-14） */
.rt-masters { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 4px; }
.rt-master { padding: 8px 14px; border-radius: 10px 10px 0 0; border: 1px solid var(--line); border-bottom: 3px solid transparent; font-weight: 800; background: #f4f6f8; color: #61707f; text-decoration: none; }
.rt-master.on { background: #fff; color: var(--primary); border-bottom-color: var(--primary); }
.rt-master.plus { background: #2bb673; color: #fff; border-color: #2bb673; border-radius: 10px; }
.rt-lab { font-weight: 800; font-size: .9em; margin: 0 0 6px; }
.rt-dnav { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rt-arrow { width: 44px; height: 42px; border-radius: 10px; background: #e3effa; color: var(--primary); font-weight: 900; display: flex; align-items: center; justify-content: center; text-decoration: none; flex: none; }
.rt-date { position: relative; flex: 1; text-align: center; font-weight: 800; font-size: 1.05em; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.rt-date small { color: var(--muted); font-size: .7em; }
.rt-date input[type="date"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; cursor: pointer; }
.rt-dayinfo { font-size: .85em; font-weight: 700; background: #f4f6f8; border-radius: 10px; padding: 8px 10px; margin: 0 0 12px; }
.rt-pill { border-radius: 10px; padding: 2px 8px; font-weight: 800; }
.rt-pill.school { background: #dcebf8; color: #2f6fa8; }
.rt-pill.off { background: #fff1dd; color: #b26a00; }
a.rt-link { display: block; color: inherit; text-decoration: none; }
.rt-link .tap-rt-box { display: block; }
.rt-link .tap-rt-head { display: flex; }
.rt-edit { background: #e3effa; color: var(--primary); border-radius: 8px; padding: 3px 9px; font-size: .78em; font-weight: 800; border: 1px solid #c5dcf0; white-space: nowrap; }
.rt-head-chips { display: block; padding: 0 10px 6px; background: #dcebf8; }
.rt-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.rt-chip { font-size: .72em; font-weight: 800; background: #fff; border: 1px solid #b9d3ea; color: #2f5f8c; border-radius: 9px; padding: 1px 7px; white-space: nowrap; }
.rt-chip.big { font-size: .9em; padding: 4px 10px; border-color: #f0dca8; color: #1f2933; }
.rt-item { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 9px 10px; border-top: 1px solid #d6e5f2; background: #fff; }
.rt-item-name { font-weight: 700; flex: 1; min-width: 40%; }
.rt-item .rt-chip { background: #f1f4f7; border-color: #e1e6ea; color: #5b6772; }
.rt-item.empty { color: var(--muted); font-size: .9em; }
.rt-item.off { opacity: .35; }
.tap-rt.off .tap-rt-box { opacity: .38; border-style: dashed; }
.tap-rt.off .tap-rt-dot { border-color: #b5c0ca; }
.rt-offnote { position: absolute; right: 8px; top: -9px; z-index: 2; background: #61707f; color: #fff; font-size: .7em; font-weight: 800; padding: 2px 8px; border-radius: 10px; }
.rt-effort { margin-top: 14px; }
.rt-effort-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.rt-wd { display: flex; gap: 4px; }
.rt-wd-item { flex: 1; position: relative; }
.rt-wd-item input { position: absolute; opacity: 0; pointer-events: none; }
.rt-wd-item span { display: block; text-align: center; padding: 8px 0; border-radius: 8px; border: 1px solid var(--line); font-weight: 800; font-size: .9em; background: #fff; }
.rt-wd-item input:checked + span { background: #3d8fd6; color: #fff; border-color: #3d8fd6; }
.rt-wd-item input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.rt-opt { display: flex; gap: 5px; }
.rt-opt-item { flex: 1; position: relative; }
.rt-opt-item input { position: absolute; opacity: 0; pointer-events: none; }
.rt-opt-item span { display: block; text-align: center; padding: 9px 0; border-radius: 9px; border: 1px solid var(--line); font-weight: 800; font-size: .92em; background: #fff; }
.rt-opt-item input:checked + span { background: #3d8fd6; color: #fff; border-color: #3d8fd6; }
.rt-opt-item input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.rt-sec { font-size: 1.05em; margin: 16px 0 2px; }
.rt-ex { background: #f4f6f8; border-radius: 10px; padding: 8px 10px; font-size: .82em; color: #44515c; line-height: 1.6; }
.rt-sum { background: #e8f6ee; border: 1px solid #9bd8b5; border-radius: 10px; padding: 9px 10px; font-size: .9em; font-weight: 800; color: #1f6a40; }
.rt-time { max-width: 160px; }
.rt-items { display: grid; gap: 6px; margin-bottom: 12px; }
.rt-item-link { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; background: #fff; }
.rt-always { font-size: .8em; color: var(--primary); font-weight: 800; }
.rt-go { color: var(--muted); font-weight: 900; margin-left: auto; }

/* ふだんと違う日（2026-11-14） */
.tap-banner-day { display: flex; align-items: center; gap: 8px; border-radius: 12px; padding: 10px 12px; margin: -2px 0 12px; font-weight: 800; }
.tap-banner-day small { display: block; font-weight: 600; font-size: .8em; opacity: .9; }
.tap-banner-day.off, .tap-banner-day.master { background: #fff1dd; color: #b26a00; }
.tap-banner-day.school { background: #dcebf8; color: #2f6fa8; }
.tap-banner-day.rest { background: #eceff2; color: #5b6772; }
.rt-days .rt-day { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid #edf0f3; }
.rt-day-d { font-weight: 800; min-width: 104px; font-size: .9em; }
.rt-day-m { flex: 1; color: var(--muted); font-size: .85em; }
.rt-tag { font-size: .75em; font-weight: 800; padding: 3px 8px; border-radius: 12px; white-space: nowrap; }
.rt-tag.off { background: #fff1dd; color: #b26a00; }
.rt-tag.school { background: #dcebf8; color: #2f6fa8; }
.rt-tag.rest { background: #eceff2; color: #5b6772; }
.rt-tag.master { background: #e8f6e8; color: #2c7a3c; }
.rt-day-x button { width: 34px; min-height: 34px; padding: 0; border-radius: 9px; font-size: 1em; }
.rt-dates { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.rt-dates input[type="date"] { border: 1px solid var(--line); border-radius: 10px; padding: 8px; font-size: 1em; }
.rt-range[hidden] { display: none; }
.rt-kinds { display: grid; gap: 6px; }
.rt-kind { position: relative; }
.rt-kind input { position: absolute; opacity: 0; pointer-events: none; }
.rt-kind span { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.rt-kind small { display: block; color: var(--muted); font-size: .8em; }
.rt-kind input:checked + span { border-color: var(--primary); background: #eef5fc; box-shadow: inset 0 0 0 1px var(--primary); }
.rt-kind input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
/* 代理報告：その日・次の日を選び直す、この日だけ消す */
.day-row { display: grid; gap: 6px; margin: 0 0 10px; }
.day-sel { background: #f4f6f8; border-radius: 10px; padding: 8px 10px; }
.day-sel summary { cursor: pointer; font-weight: 700; font-size: .9em; list-style: none; }
.day-sel summary::-webkit-details-marker { display: none; }
.day-sel-form { display: grid; gap: 6px; margin-top: 8px; }
.day-allx button { min-height: 40px; padding: 8px; font-size: .9em; margin-bottom: 12px; }
.tap-rt-head form { margin: 0; }
.rt-skip button, .rt-unskip button { display: inline-block; width: auto; min-height: 0; padding: 3px 8px; border-radius: 8px; font-size: .72em; white-space: nowrap; }
.rt-skipped { margin: 0 0 12px; display: grid; gap: 6px; }
.rt-skipped-row { display: flex; align-items: center; gap: 6px; border: 1px dashed #c9d1d8; border-radius: 10px; padding: 8px 10px; font-size: .85em; color: var(--muted); }
.rt-skipped-row form { margin-left: auto; }

/* COMPLETE・PERFECT ボーナス（2026-11-14） */
.tap-rt-bonus { font-size: .72em; font-weight: 800; color: #b26a00; background: #fff1dd; border: 1px solid #f0d3a6; border-radius: 9px; padding: 1px 7px; white-space: nowrap; }
.tap-rt.done .tap-rt-bonus { display: none; }
.tap-stamp small { display: block; font-size: .85em; letter-spacing: 0; text-align: center; }
.rt-bonus { border: 2px solid #f0d3a6; background: #fffaf1; }
.rt-bonus h2 { margin-top: 0; }
.rt-bonus-row { display: flex; align-items: center; gap: 8px; }
.rt-bonus-row input { width: 90px; text-align: center; font-weight: 800; border: 1px solid var(--line); border-radius: 10px; padding: 9px; font-size: 1em; }
.rt-bonus-row button.primary { display: inline-flex; width: auto; min-height: 44px; margin-left: auto; padding: 8px 16px; }
.rt-bonus-field .rt-bonus-row { margin: 4px 0; }
.rt-arrow.off { background: #f1f3f5; color: #c3cbd2; }
.tap-dnav { margin: 4px 0 4px; }
.rt-chip.who { display: inline-flex; align-items: center; gap: 3px; background: #fff; border-color: #d9e0e6; color: #44515c; }
.rt-chip.warn { background: #fdecea; border-color: #f3c3bc; color: var(--danger); }
.rt-bonus form > .rt-bonus-row { margin-bottom: 8px; }
.rt-bonus-who { display: inline-flex; align-items: center; gap: 4px; min-width: 90px; font-weight: 800; }
.rt-bonus form > button.primary { margin-top: 4px; }
.rt-missions-link { margin-top: 10px; }

/* 報告画面：えらんでから、右下の豚が持つ札「➤ おくる N」で送る（2026-11-14 見本 docs/mock/sched/stepper3） */
.tap-card.picked { background: #eef5fc; border-color: #2f80c8; box-shadow: 0 2px 0 #9cc3e6; }
.tap-card.in.picked { background: #eef5fc; }
.tap-card.picked .tap-mark { border: 2px solid #2f80c8; color: #2f80c8; background: #fff; }
.tap-card.picked .tap-right { color: #2f80c8; }
.tap-effort .tap-card.picked { background: #eef5fc; border-color: #2f80c8; }
.tap-report { padding-bottom: 70px; }
button.tap-sign {
  position: fixed; right: 92px; bottom: 30px; z-index: 51; display: inline-flex; gap: 6px; width: auto; min-height: 0; margin: 0;
  border: 0; background: var(--primary, #2f80c8); color: #fff; font-weight: 900; font-size: 1.05em; padding: 13px 16px; border-radius: 26px;
  box-shadow: 0 4px 12px rgba(0,0,0,.28); white-space: nowrap; animation: sign-bob 1.2s ease-in-out infinite;
}
button.tap-sign.alone { right: 12px; }
button.tap-sign[hidden] { display: none; }
button.tap-sign::before { width: 18px; height: 18px; }
button.tap-sign b { display: inline-block; min-width: 22px; background: #fff; color: var(--primary, #2f80c8); border-radius: 12px; margin-left: 4px; padding: 0 6px; }
@keyframes sign-bob { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) translateY(-3px); } }
.pigfab.holding:not(.sleeping) .body { transform: rotate(-8deg); }

/* キーボードが出ているときは、右下の豚と札をキーボードの上に（--kb は public/app.js。2026-11-15） */
.pigfab { bottom: calc(6px + var(--kb, 0px)); }
button.tap-sign { bottom: calc(30px + var(--kb, 0px)); border: 3px solid #fff; box-shadow: 0 8px 18px rgba(0,0,0,.45), 0 2px 4px rgba(0,0,0,.3); }

/* 豚の案内（2026-11-15。見本 docs/mock/sched/tour.css） */
.tour-block { position: fixed; inset: 0; z-index: 90; }
.tour-spot { position: fixed; z-index: 91; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,.6); transition: all .3s; pointer-events: none; }
.tour-spot::after { content: ""; position: absolute; inset: -4px; border: 3px solid #ffd54a; border-radius: 14px; animation: tour-pulse 1.2s ease-in-out infinite; }
@keyframes tour-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.tour-box { position: fixed; left: 12px; right: 12px; z-index: 92; display: flex; align-items: flex-end; gap: 6px; transition: top .3s; }
.tour-box img { width: 62px; flex: none; filter: drop-shadow(0 4px 4px rgba(0,0,0,.4)); }
.tour-say { position: relative; flex: 1; background: #fff; border: 2px solid #1f2933; border-radius: 16px; padding: 10px 12px 8px; font-weight: 800; font-size: .95em; line-height: 1.5; color: #1f2933; }
.tour-say::before { content: ""; position: absolute; left: -10px; bottom: 16px; border: 8px solid transparent; border-right-color: #1f2933; }
.tour-say small { display: block; color: #8a96a3; font-size: .75em; margin-bottom: 2px; }
.tour-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.tour-btns button { display: inline-block; width: auto; min-height: 0; border-radius: 10px; padding: 8px 14px; font-weight: 900; font-size: .9em; }
.tour-skip { background: #eef1f4; color: #61707f; }
.tour-next { background: var(--primary); color: #fff; }
.tour-spot.none::after { display: none; } /* 光らせる所がない段（吹き出しだけ） */

/* はじめての準備（豚ナビ。2026-11-21 見本 docs/mock/pignavi）：右下の豚の吹き出しと、一覧 */
.pn-h1row h1 { margin-right: auto; }
.pn-h1row .bd-howto { margin-right: 44px; } /* 右のポストとかさならないように */
.pn-card { position: fixed; left: 14px; right: 14px; bottom: calc(112px + var(--kb, 0px)); z-index: 60; background: #fff; border: 2px solid #1f2933; border-radius: 16px; padding: 10px 12px; font-weight: 800; line-height: 1.5; color: #1f2933; box-shadow: 0 6px 18px rgba(0,0,0,.18); animation: bd-up .25s; }
.pn-card::after { content: ""; position: absolute; right: 34px; bottom: -18px; border: 9px solid transparent; border-top-color: #1f2933; }
.pn-card::before { content: ""; position: absolute; right: 36px; bottom: -13px; border: 7px solid transparent; border-top-color: #fff; z-index: 1; }
.pn-head { display: flex; align-items: center; gap: 8px; color: #8a96a3; font-size: .75em; }
.pn-dots { display: flex; gap: 4px; }
.pn-dots i { width: 9px; height: 9px; border-radius: 50%; background: #dde3e9; }
.pn-dots i.ok { background: #3fa34d; }
.pn-dots i.now { background: #ffd54a; box-shadow: 0 0 0 2px #e0b400; }
.pn-card .pn-all-link { margin-left: auto; width: auto; min-height: 0; padding: 0; background: none; border: 0; color: var(--primary); text-decoration: underline; font-weight: 800; font-size: 1em; }
.pn-text { margin: 4px 0 8px; }
.pn-good { color: #2f9e44; }
.pn-btns { display: flex; gap: 8px; justify-content: flex-end; }
.pn-btns button { display: inline-flex; width: auto; min-height: 0; border-radius: 10px; padding: 9px 14px; font-weight: 900; font-size: .9em; border: 0; }
.pn-later { background: #eef1f4; color: #61707f; }
.pn-go { background: #2f9e55; color: #fff; } /* 追加の画面へ進むボタンと同じ緑 */
.pn-ok { background: var(--primary); color: #fff; }
.pn-btns button.primary::before { width: 16px; height: 16px; }
.pn-sheet .pn-all { display: block; width: 100%; margin: 4px 0 12px; border: 0; border-radius: 12px; padding: 12px; background: #e3f0fb; color: var(--primary); font-weight: 900; font-size: 1em; }
.pn-sheet .pn-row { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; min-height: 0; padding: 11px 4px; border: 0; border-top: 1px solid #eef1f4; border-radius: 0; background: none; color: inherit; font-weight: 800; font-size: 1em; text-align: left; }
.pn-row .mk { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .85em; background: #eef1f4; color: #8a96a3; }
.pn-row.ok .mk { background: #3fa34d; color: #fff; }
.pn-row.now { background: #fff8d6; border-radius: 10px; }
.pn-row.now .mk { background: #ffd54a; color: #1f2933; }
.pn-row .t { flex: 1; }
.pn-row .t small { display: block; color: #8a96a3; font-weight: 600; font-size: .78em; }
.pn-row .go { color: var(--primary); font-size: .85em; font-weight: 900; white-space: nowrap; }

/* 毎日 Mission の設定（2026-11-15 作り直し。見本 docs/mock/sched/mdef5）：子供の画面と同じ枠とカード。ルーティンは緑、努力 Mission は濃い緑のふち */
.bd-h1row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bd-h1row h1 { margin-bottom: 4px; }
button.bd-howto { display: inline-block; width: auto; min-height: 0; flex: none; background: #e3eef8; color: var(--primary); border-radius: 16px; padding: 6px 12px; font-size: .85em; font-weight: 900; }
.bd button, .bd-sheet .bd-seg button, .bd-sheet .bd-ok { min-height: 0; width: auto; display: inline-flex; align-items: center; justify-content: center; }
.bd input, .bd select, .bd-sheet input, .bd-sheet select { font-size: 16px; } /* 16px より小さいと iPhone が拡大する */
.bd-rt { position: relative; border: 2px solid #9fd6b4; border-radius: 14px; overflow: hidden; background: #f5fbf7; margin: 0 0 12px; }
.bd-rt.dirty, .bd-eff.dirty { box-shadow: 0 0 0 3px #f5c451; }
.bd-head { display: flex; align-items: center; gap: 4px; background: #dff3e6; border-bottom: 2px solid #4fae78; padding: 6px 8px; }
.bd-head input { border: 1px solid transparent; border-bottom: 1px dashed #8fcca6; background: transparent; border-radius: 6px; font-weight: 900; padding: 1px 3px; min-width: 0; width: auto; color: var(--text); }
.bd-head input:focus, .bd-card input:focus { outline: 0; border: 1px solid var(--primary); background: #fff; }
.bd-ti { width: 6.4em; color: #2b7a4b !important; }
.bd-na { flex: 1; }
.bd-bonus { display: inline-flex; align-items: center; background: #fff3d6; border: 1px solid #ecc98a; border-radius: 10px; padding: 1px 6px; font-weight: 900; color: #9a6a00; white-space: nowrap; }
.bd-bonus input { width: 2.4em; text-align: center; border: 1px solid #ecc98a !important; background: #fff !important; color: #9a6a00; height: 26px; }
.bd-cond { display: flex; align-items: center; gap: 6px; padding: 5px 8px; background: #eef8f1; border-bottom: 1px solid #c4e6cf; flex-wrap: wrap; }
.bd-cond select { width: 47%; flex: none; border: 1px solid #8fd0a8; background: #fff; color: #1f8a52; font-weight: 900; border-radius: 8px; padding: 2px 4px; height: 32px; }
.bd-kids { display: flex; gap: 3px; flex-wrap: nowrap; margin-left: auto; }
.bd button.bd-kid { border: 1px solid var(--kc, #9aa5af); background: #fff; color: var(--kc, #4a5866); border-radius: 14px; padding: 3px 8px; font-weight: 800; font-size: .8em; }
.bd button.bd-kid.on { background: var(--kc, #4a5866); color: #fff; }
.bd-wd { flex-basis: 100%; display: flex; gap: 4px; }
.bd-wd[hidden], .bd-said[hidden] { display: none; }
.bd-wd button { flex: 1; background: #dff3e6; color: #1f8a52; border-radius: 8px; padding: 5px 0; font-weight: 900; }
.bd-wd button.on { background: #2bb673; color: #fff; }
.bd-said { flex-basis: 100%; font-size: .78em; font-weight: 800; color: #1f6a40; }
.bd-card { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 6px 8px; border-top: 1px solid #d3eedc; background: #fff; }
.bd-list .bd-card:first-child { border-top: 0; }
.bd-mark { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px dashed #b9c4ce; }
.bd-t { flex: 1; min-width: 0; }
.bd-nm { width: 100%; font-weight: 800; border: 1px solid transparent; border-bottom: 1px dashed #b9c4ce; border-radius: 6px; padding: 1px 3px; background: transparent; color: var(--text); }
.bd-pt { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 3px; color: var(--muted); font-weight: 800; font-size: .85em; }
.bd-pt input { border: 1px solid var(--line); border-radius: 7px; padding: 0 3px; height: 28px; font-weight: 800; text-align: center; color: var(--text); background: #fbfcfd; }
.bd-u { width: 4.2em; } .bd-pp { width: 3em; }
.bd button.bd-qty { background: #2bb673; border: 2px solid #2bb673; color: #fff; border-radius: 18px; padding: 3px 14px; min-width: 5em; font-weight: 800; font-size: .95em; margin-left: 4px; }
.bd button.bd-qty.on { background: #1b7a45; border-color: #1b7a45; }
.bd button.bd-chips { margin-left: auto; background: #eef1f4; color: #4a5866; border-radius: 14px; padding: 3px 9px; font-size: .85em; font-weight: 800; }
.bd-drawer { flex-basis: 100%; display: flex; align-items: center; gap: 6px; border-top: 1px dashed #d9e0e6; padding: 5px 0 1px 32px; font-weight: 800; color: #3c4a57; }
.bd-stp { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.bd button.bd-step { width: 36px; height: 34px; background: #eef4fa; color: var(--primary); font-size: 1.3em; font-weight: 900; padding: 0; border-radius: 0; }
.bd button.bd-step:disabled { color: #c3cbd2; background: #f5f7f9; }
.bd-stp input { width: 40px; border: 0; text-align: center; font-weight: 900; height: 34px; padding: 0; }
.bd-foot { display: flex; border-top: 1px dashed #9fd0a9; }
.bd button.bd-add { flex: 1; background: #eef8f1; color: #1f8a52; font-weight: 900; padding: 8px; border-radius: 0; }
.bd button.bd-del { flex: none; background: #fff; color: var(--danger, #d64545); font-weight: 800; font-size: .78em; padding: 8px 10px; border-radius: 0; border-left: 1px dashed #9fd0a9; }
.bd button.bd-addrt { display: flex; width: 100%; border: 2px dashed #9fd0a9; border-radius: 14px; background: #f1faf3; color: #1f8a52; font-weight: 900; padding: 12px; margin: 4px 0 8px; }
.bd button.bd-addrt[hidden] { display: none; }
.bd-hidden { color: var(--muted); font-size: .8em; margin: 0 2px 8px; }
.bd-eh { color: #9a6a00; margin: 18px 0 2px; }
.bd-eff { border: 2px solid #2e8b57; border-radius: 14px; overflow: hidden; background: #fffaf0; margin-bottom: 10px; }
.bd-eff[hidden] { display: none; }
.bd-ehead { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: #fff3d2; font-size: .85em; font-weight: 800; color: #9a6a00; }
.bd-ehead .bd-kids { margin-left: 0; }
.bd-eff .bd-pt { color: #9a6a00; }
.bd-starter { background: #fff; border: 2px solid #9fd6b4; border-radius: 14px; padding: 12px; margin: 10px 0; }
.bd-starter[hidden] { display: none; }
.bd-st-t { font-weight: 900; margin: 0 0 4px; }
.bd-st-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; border-top: 1px solid #e3efe7; padding: 8px 2px; }
.bd-st-row input { width: 22px; height: 22px; accent-color: #2bb673; }
.bd-st-row small { flex-basis: 100%; padding-left: 30px; color: var(--muted); font-size: .8em; }
.bd-starter button { margin-top: 8px; }
.bd-sheetbg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 80; }
.bd-sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow: auto; background: #fff; border-radius: 18px 18px 0 0; z-index: 81; padding: 8px 16px 18px; animation: bd-up .25s; }
.bd-sheetbg[hidden], .bd-sheet[hidden], .bd-auto[hidden], .bd-expect[hidden], .bd-sheet .hint[hidden] { display: none; }
@keyframes bd-up { from { transform: translateY(100%); } to { transform: none; } }
.bd-grab { width: 44px; height: 5px; border-radius: 3px; background: #d0d6dc; margin: 2px auto 8px; }
.bd-sheet h3 { margin: 0 0 8px; }
.bd-lab { font-weight: 900; margin: 14px 0 4px; }
.bd-seg { display: flex; gap: 6px; }
.bd-sheet .bd-seg button { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 4px; font-weight: 800; color: #3c4a57; }
.bd-sheet .bd-seg button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.bd-auto { margin: 0; background: #eef4fa; border-radius: 8px; padding: 8px 10px; font-weight: 800; color: #3a5f86; }
.bd-expect { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.bd-expect select, .bd-expect input { width: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-weight: 800; background: #fff; }
.bd-expect input { width: 4em; text-align: center; }
.bd-sheet button { margin-top: 10px; }
.bd-sheet .bd-ok { width: 100%; background: var(--primary); color: #fff; border-radius: var(--radius); padding: 12px; font-weight: 900; }
.bd-toast { position: fixed; left: 50%; bottom: calc(110px + var(--kb, 0px)); transform: translateX(-50%); background: #1f2933; color: #fff; padding: 8px 16px; border-radius: 18px; font-weight: 800; font-size: .9em; z-index: 95; white-space: nowrap; }
.bd-toast[hidden] { display: none; }
/* 毎日 Mission の設定：全体の input[type="text"]（幅いっぱい・大きい余白）より強く */
.bd input[type="text"], .bd input[type="time"], .bd-sheet input[type="text"] { width: auto; min-width: 0; padding: 0 3px; font-size: 16px; border-radius: 7px; }
.bd .bd-head input[type="text"], .bd .bd-head input[type="time"] { border: 1px solid transparent; border-bottom: 1px dashed #8fcca6; background: transparent; border-radius: 6px; font-weight: 900; padding: 1px 3px; height: 30px; }
.bd .bd-head .bd-ti { width: 6.4em; flex: none; }
.bd .bd-head .bd-na { flex: 1; width: auto; }
.bd .bd-head .bd-bonus input[type="text"] { width: 2.4em; text-align: center; border: 1px solid #ecc98a; background: #fff; height: 26px; }
.bd .bd-card .bd-nm { width: 100%; border: 1px solid transparent; border-bottom: 1px dashed #b9c4ce; background: transparent; border-radius: 6px; padding: 1px 3px; height: 30px; font-weight: 800; }
/* ルーティンの中の Mission をやる子（頭文字の丸。2026-11-16 見本 docs/mock/kidpick A案） */
.bd-nrow { display: flex; align-items: center; gap: 6px; }
.bd-nrow .bd-nm { flex: 1; min-width: 0; }
.bd-who { display: flex; gap: 4px; flex-shrink: 0; }
.bd-who:empty { display: none; }
.bd button.bd-wk { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--kc); background: var(--kc); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; padding: 0; line-height: 1; min-height: 0; }
.bd button.bd-wk.off { background: #fff; color: #bbb; border-color: #ddd; text-decoration: line-through; }
.bd-others { font-size: 12px; color: #777; padding: 4px 10px; }
.bd .bd-pt input[type="text"] { border: 1px solid var(--line); height: 28px; text-align: center; font-weight: 800; background: #fbfcfd; }
.bd .bd-pt .bd-u { width: 4.2em; } .bd .bd-pt .bd-pp { width: 3em; }
.bd .bd-stp input[type="text"] { width: 40px; border: 0; height: 34px; text-align: center; font-weight: 900; padding: 0; border-radius: 0; }
.bd-sheet .bd-expect input[type="text"] { width: 4em; padding: 8px; text-align: center; }
.bd .bd-cond select { width: 44%; font-size: 16px; }
.bd .bd-cond .bd-kids button.bd-kid { font-size: .74em; padding: 3px 7px; }

/* お手伝いの設定（2026-11-15。見本 docs/mock/sched/cdef）：1つの枠に1つ。黄色系 */
.bd-ch { border: 2px solid #e8c76f; border-radius: 14px; overflow: hidden; background: #fffdf6; margin-bottom: 8px; }
.bd-ch.dirty { box-shadow: 0 0 0 3px #f5c451; }
.bd-ch[hidden] { display: none; }
.bd-chead { display: flex; align-items: center; gap: 4px; padding: 4px 8px; background: #fff3d2; border-bottom: 1px solid #f0dca8; font-size: .85em; font-weight: 800; color: #9a6a00; }
.bd-chead .bd-kids { margin-left: 0; }
.bd-mv { margin-left: auto; display: flex; gap: 4px; }
.bd-mv[hidden] { display: none; }
.bd .bd-mv button { background: var(--primary); color: #fff; border-radius: 7px; width: 32px; height: 28px; font-weight: 900; padding: 0; }
.bd-ch .bd-card { background: #fffdf6; border-top: 0; }
.bd .bd-pt .bd-yen { width: 4.4em; }
.bd-cstarter { border-color: #e8c76f; }
.bd-hiddenbox { margin: 10px 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.bd-hiddenbox summary { font-weight: 800; color: var(--muted); }
.bd-hrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0 2px; }
.bd-hrow small { color: var(--muted); }
.bd-hrow button { width: auto; min-height: 0; padding: 6px 12px; font-size: .9em; }
/* 親の代理報告：「× この日だけ消す」は見出しの2行目に（名前が縦にならないように。2026-11-15 ユーザー） */
.tap-rt-head { flex-wrap: wrap; row-gap: 4px; }
.tap-rt-head .rt-skip { order: 9; flex-basis: 100%; display: flex; justify-content: flex-end; }

/* 代理報告：先の日と「＋ この日だけ足す」（2026-11-15。見本 docs/mock/sched/oneday） */
.tap-future { background: #fff3d2; border: 1px solid #f0dca8; color: #8a5a00; border-radius: 10px; padding: 8px 10px; font-weight: 800; font-size: .85em; margin: 6px 0; }
.tap-report.future .tap-card { opacity: .55; cursor: default; }
.tap-report.future .tap-card:active { transform: none; }
.tap-report.future .tap-all { display: none; }
.tap-rt.one .tap-rt-box { border-color: #e0a020; }
.tap-rt.one .tap-rt-head { background: #fff3d2; }
.tap-rt-one { background: #e0a020; color: #fff; border-radius: 8px; padding: 1px 7px; font-size: .72em; font-weight: 900; white-space: nowrap; }
button.one-add { border: 2px dashed #9fd0a9; background: #f1faf3; color: #1f8a52; font-weight: 900; border-radius: 14px; padding: 12px; margin: 4px 0 10px; min-height: 0; }
.one-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 80; }
.one-sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow: auto; background: #fff; border-radius: 18px 18px 0 0; z-index: 81; padding: 8px 16px 18px; }
.one-bg[hidden], .one-sheet[hidden], .one-sheet [data-one-panel][hidden] { display: none; }
.one-grab { width: 44px; height: 5px; border-radius: 3px; background: #d0d6dc; margin: 2px auto 8px; }
.one-sheet h3 { margin: 0 0 8px; }
.one-seg { display: flex; gap: 6px; margin-bottom: 4px; }
.one-seg button { flex: 1; min-height: 0; border: 1px solid var(--line); background: #fff; color: #3c4a57; border-radius: 10px; padding: 9px 4px; font-size: .85em; font-weight: 800; }
.one-seg button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.one-row { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 6px; }
.one-t { flex: 1; min-width: 0; }
.one-t b { display: block; }
.one-t small { color: var(--muted); font-weight: 700; }
.one-row button { width: auto; min-height: 0; padding: 8px 14px; flex: none; }
.one-newhead { display: flex; gap: 6px; margin-bottom: 6px; }
.one-sheet input[type="time"] { width: 7.5em; flex: none; font-size: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.one-sheet input[type="text"] { padding: 8px; font-size: 16px; }
.one-newhead input[type="text"] { flex: 1; min-width: 0; }
.one-item { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.one-item input[name="item_name"] { flex: 1; min-width: 0; }
.one-item input[name="item_points"] { width: 3.6em; flex: none; text-align: center; }
.one-item span { color: var(--muted); font-weight: 800; font-size: .85em; white-space: nowrap; }
button.one-more { min-height: 0; background: #eef8f1; color: #1f8a52; border-radius: 10px; padding: 8px; font-weight: 900; }
.one-sheet .primary, .one-sheet .nav { margin-top: 10px; }

/* 設定の画面の色は、報告画面にそろえる（2026-11-15 ユーザー）：ルーティンは青、努力 Mission は黄色の点線の囲み、お手伝いは白いカード。数量の緑・子供の色はそのまま */
.bd-rt { border-color: #b9d3ea; background: #f3f8fd; }
.bd-head { background: #dcebf8; border-bottom: 1px solid #c9dcee; }
.bd .bd-head .bd-ti { color: #2f5f8c !important; }
.bd .bd-head input[type="text"], .bd .bd-head input[type="time"] { border-bottom-color: #9cc3e6; }
.bd-cond { background: #eaf3fb; border-bottom-color: #d6e5f2; }
.bd .bd-cond select { border-color: #9cc3e6; color: var(--primary); }
.bd-wd button { background: #dcebf8; color: var(--primary); }
.bd-wd button.on { background: var(--primary); color: #fff; }
.bd-said { color: #2f5f8c; }
.bd-card { border-top-color: #d6e5f2; }
.bd-foot { border-top-color: #b9d3ea; }
.bd button.bd-add { background: #eaf3fb; }
.bd button.bd-del { border-left-color: #b9d3ea; }
.bd-effwrap { margin-top: 18px; border: 2px dashed #e8b84a; background: #fff9e8; border-radius: 14px; padding: 10px; }
.bd-effwrap .bd-eh { margin-top: 0; }
.bd-eff { border: 1px solid #f0dca8; background: #fff; box-shadow: 0 2px 0 #f0dca8; }
.bd-ehead { background: #fffdf6; border-bottom: 1px solid #f6e9c6; }
.bd-ch { border: 1px solid var(--line); background: #fff; box-shadow: 0 2px 0 #d3dbe2; }
.bd-chead { background: #f7f9fb; border-bottom: 1px solid #e6ebef; color: var(--muted); }
.bd-ch .bd-card { background: #fff; }
.bd-cstarter { border-color: var(--line); }
/* 設定の画面の「1日 最大 − 数 ＋」を低く（2026-11-15 ユーザー：数字の上下の余白を少なく） */
.bd button.bd-step { height: 26px; width: 32px; font-size: 1.1em; line-height: 1; }
.bd .bd-stp input[type="text"] { height: 26px; line-height: 26px; }
.bd-drawer { padding-top: 3px; padding-bottom: 0; }
.estimate-table .est-day { font-family: inherit; font-weight: 600; font-size: 0.75em; color: var(--muted); margin-right: 3px; }
.estimate-table thead th { line-height: 1.2; }
/* 設定 › Reward（2026-11-16。カードの上でそのまま直す。見本 docs/mock/reward-targets/inline.html） */
.bd .rwi-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-weight: 800; color: #3c4a57; }
.bd .rwi-row select { width: auto; height: 36px; font-size: 16px; padding: 0 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 800; }
/* ライン・期限の数字：16px 以上（iPhone が拡大しない）で太く、高さをそろえる */
.bd .rwi-row input.rwi-num { width: 4.5em; height: 36px; font-size: 18px; font-weight: 800; padding: 0 6px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; color: var(--text); text-align: center; }
.bd .rwi-row input.rwi-ex { width: 3em; }
.bd .rwi-acts { display: flex; gap: 6px; margin-left: auto; }
.bd .rwi-acts button { width: auto; min-height: 0; padding: 5px 12px; font-size: .85em; border-radius: 10px; }
.bd .rwi-acts button:disabled { opacity: .3; cursor: default; }
.bd-hrow.dirty { box-shadow: 0 0 0 3px #f5c451; border-radius: 10px; }
/* 下から出る窓：引いて閉じる（public/app.js の sheetSwipe）。窓の中のスクロールが後ろの画面に伝わらないように。開いているあいだは後ろを動かさない */
.bd-sheet { overscroll-behavior: contain; }
.bd-grab { position: relative; }
.bd-grab::after { content: ''; position: absolute; left: -40px; right: -40px; top: -14px; bottom: -14px; } /* 指でつかみやすく */
html:has(.bd-sheet:not([hidden])), html:has(.bd-sheet:not([hidden])) body { overflow: hidden; }
/* 管理画面：紹介ページの訪問の中身（2026-11-19） */
.admin-visits { list-style: none; margin: 0; padding: 0; background: var(--card); font-size: 13px; }
.admin-visits li { padding: 6px 8px; border-bottom: 1px solid var(--line); border-left: 4px solid #9aa5b1; display: flex; flex-direction: column; gap: 2px; }
.admin-visits li.k-browser { border-left-color: #2f9e44; }
.admin-visits li.k-program { border-left-color: #e8a317; }
.admin-visits .v-ref { color: #1c64c8; word-break: break-all; }
.admin-visits .v-ua { color: #888; font-size: 11px; word-break: break-all; }

/* ---- キャラのコレクション（要件 10.25。2026-11-20 見本 docs/mock/chara/screens） ---- */
/* ポイントの画面のカード */
.cc { position: relative; overflow: hidden; }
.cc-head { display: flex; align-items: center; gap: 10px; }
.cc-head img { width: 56px; height: 56px; flex: none; }
.cc-head h2 { margin: 0; font-size: 1.1em; }
.cc-head small { display: block; color: #666; font-size: .78em; font-weight: 400; }
.cc-left { margin: 10px 0 4px; font-size: 1.05em; }
.cc-left b { font-size: 1.4em; color: #1d5a96; }
.cc-bar { height: 14px; border-radius: 7px; background: #e6edf5; overflow: hidden; }
.cc-bar i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, #7cc4ff, #2f7de1); }
.cc-bar.full i { background: linear-gradient(90deg, #ffd84a, #ff9f1a, #ff5fa2, #a66bff); }
.cc-num { display: flex; justify-content: space-between; font-size: .78em; color: #888; margin-top: 2px; }
.cc .row { display: flex; gap: 8px; margin-top: 12px; }
.cc .row .button { flex: 1; text-align: center; }
.cc.ready { border: 3px solid #ffc83d; box-shadow: 0 0 0 4px #fff3c4; }
.cc .gacha-go { font-size: 1.2em; padding: 14px 8px; }
.cc-note { background: #fff7e0; border-radius: 10px; padding: 8px 10px; font-size: .9em; margin: 10px 0 0; line-height: 1.5; }

/* ガチャの画面：星空 */
.sky { margin: 0 -12px; padding: 14px 12px 26px; color: #fff; position: relative; overflow: hidden; min-height: 70vh;
  background: radial-gradient(ellipse 80% 40% at 70% 20%, #5b3a9a55, #0000 70%), radial-gradient(ellipse 60% 30% at 20% 70%, #1e6fb555, #0000 70%), linear-gradient(#0b1030, #1a1450 55%, #2a1a5e); }
.sky .stars { position: absolute; inset: 0; pointer-events: none; }
.sky .stars i { position: absolute; border-radius: 50%; background: #fff; box-shadow: 0 0 4px #fff; animation: star-tw 3s ease-in-out infinite; }
@keyframes star-tw { 50% { opacity: .25; } }
.sky > * { position: relative; }
.sky .gc { text-align: center; }
.sky .gc-left, .sky .note { color: #d8dcff; }
.sky .machine { position: relative; width: 280px; margin: 0 auto; }
.sky .machine img[data-gacha-machine] { display: block; width: 280px; height: 280px; }
.sky .machine.shake img[data-gacha-machine], .sky img.shake { animation: gacha-shake .12s linear infinite; }
@keyframes gacha-shake { 0% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-3px, 1px) rotate(-1.5deg); } 50% { transform: translate(2px, -1px) rotate(1deg); } 75% { transform: translate(-2px, 0) rotate(-.5deg); } 100% { transform: translate(3px, 1px) rotate(1.5deg); } }
.sky .cap { position: absolute; left: 70px; top: 196px; width: 54px; height: 54px; z-index: 2; }
.sky .cap.drop { animation: cap-drop .9s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes cap-drop { 0% { transform: translate(14px, -18px) scale(.3); opacity: 0; } 40% { transform: translate(-6px, 30px) rotate(-30deg) scale(1); opacity: 1; } 70% { transform: translate(-16px, 20px) rotate(-60deg); } 100% { transform: translate(-22px, 30px) rotate(-90deg); } }
.whiteout { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 90; }
.whiteout.on { opacity: 1; transition: opacity .45s ease-in; }
.whiteout.clear { opacity: 0; transition: opacity .9s ease-out; }
/* 結果 */
.sky .res { text-align: center; padding: 18px 0 6px; }
.sky .res .ray { position: absolute; left: 50%; top: 130px; width: 440px; height: 440px; margin: -220px 0 0 -220px; border-radius: 50%; z-index: 0; }
.sky .res > * { position: relative; z-index: 1; }
.sky .res > .ray { position: absolute; z-index: 0; }
.sky .res img { width: 210px; height: 210px; }
.sky .res .rk { display: inline-block; font-weight: 900; font-size: 1.5em; padding: 2px 14px; border-radius: 999px; color: #fff; margin-top: -6px; letter-spacing: .05em; background: #8a96a6; }
.sky .res .nm { font-size: 1.6em; font-weight: 800; margin: 6px 0 2px; color: #fff; text-shadow: 0 2px 6px #000a; }
.sky .res .msg { color: #fff; font-weight: 700; margin: 0 0 10px; text-shadow: 0 1px 4px #000c, 0 0 10px #0008; }
.sky .res .btns { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.sky .res.n .ray { background: radial-gradient(circle, #eaf4ffcc 0, #eaf4ff00 60%); }
.sky .res.r .ray { background: radial-gradient(circle, #8fc8ffcc 0, #8fc8ff00 62%); }
.sky .res.r .rk { background: #2f7de1; box-shadow: 0 0 10px #8fc8ff; }
.sky .res.sr .ray, .sky .res.lg .ray { animation: ray-spin 8s linear infinite; }
@keyframes ray-spin { to { transform: rotate(360deg); } }
.sky .res.sr .ray { background: repeating-conic-gradient(from 0deg, #ffd76a 0 10deg, #fff3c4 10deg 20deg); -webkit-mask: radial-gradient(circle, #000 25%, #0000 65%); mask: radial-gradient(circle, #000 25%, #0000 65%); }
.sky .res.sr .rk { background: linear-gradient(90deg, #f0a500, #ffcc33, #f0a500); color: #5a3a00; box-shadow: 0 0 12px #ffcc33; }
.sky .res.lg .ray { background: repeating-conic-gradient(from 0deg, #ff8fb1 0 8deg, #ffd76a 8deg 16deg, #8fe3a8 16deg 24deg, #8fc8ff 24deg 32deg, #c9a2ff 32deg 40deg); -webkit-mask: radial-gradient(circle, #000 25%, #0000 66%); mask: radial-gradient(circle, #000 25%, #0000 66%); }
.sky .res.lg .rk { background: linear-gradient(90deg, #ff5f8f, #ffb02e, #3fcf74, #3d9bff, #a66bff); box-shadow: 0 0 14px #c9a2ff; }
.sky .res .sparks { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.sky .res .sparks i, .pigfab .glitter i { position: absolute; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: glit 2.2s ease-in-out infinite; }
@keyframes glit { 0%, 100% { transform: scale(.4); opacity: .3; } 50% { transform: scale(1.1); opacity: 1; } }

/* 右下のキャラのキラキラ（ユニコーン・天使の豚。いつも） */
.pigfab .glitter { position: absolute; inset: -6px; pointer-events: none; opacity: 1; }
.pigfab .glitter i { width: 12px; height: 12px; }
.pigfab .glitter i:nth-child(1) { left: 6%; top: 18%; background: #ffd84a; animation-delay: 0s; }
.pigfab .glitter i:nth-child(2) { left: 74%; top: 4%; background: #9fd8ff; animation-delay: .4s; width: 9px; height: 9px; }
.pigfab .glitter i:nth-child(3) { left: 84%; top: 52%; background: #ffb3e6; animation-delay: .9s; }
.pigfab .glitter i:nth-child(4) { left: -4%; top: 86%; background: #b6ffcf; animation-delay: 1.3s; width: 8px; height: 8px; } /* 鼻の上だと鼻水に見えるので、体の外の左下へ（2026-11-21 ユーザー。見本 docs/mock/unicorn-glitter の A） */
.pigfab .glitter i:nth-child(5) { left: 46%; top: -2%; background: #fff3a0; animation-delay: 1.7s; width: 8px; height: 8px; }
.pigfab .glitter i:nth-child(6) { left: 52%; top: 80%; background: #d6b8ff; animation-delay: .6s; width: 9px; height: 9px; }

/* キャラをえらぶ画面 */
.sky.sky-col { min-height: 0; padding-top: 12px; }
.sky-col .col-sum, .sky-col .col-legend, .sky-col .col-last { color: #fff; }
.sky-col .col-left { color: #b9d8ff; }
.sky-col .col-go { color: #ffe07a; font-weight: 800; text-decoration: none; }
.sky-col .tile.lock { background: rgba(255, 255, 255, .88); }
.sky-col .tile.r-lg.lock { background: linear-gradient(rgba(255, 255, 255, .88), rgba(255, 255, 255, .88)) padding-box, linear-gradient(135deg, #ff5f8f, #ffb02e, #3fcf74, #3d9bff, #a66bff) border-box; }
.sky-col .pick { color: #333; }
.col-sum { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 8px; }
.col-sum b { font-size: 1.3em; }
.col-left { font-size: .8em; color: #1d5a96; }
.col-legend { display: flex; gap: 8px; flex-wrap: wrap; font-size: .72em; margin-bottom: 8px; }
.col-legend span { display: inline-flex; align-items: center; gap: 3px; }
.col-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.r-start, .col-legend .r-start { --rc: #9aa4b1; }
.r-n { --rc: #8a96a6; } .r-r { --rc: #2f7de1; } .r-sr { --rc: #e09a00; }
.col-legend i { background: var(--rc); }
.col-legend .r-lg { background: linear-gradient(135deg, #ff5f8f, #ffb02e, #3fcf74, #3d9bff, #a66bff); }
.col-legend .r-n { background: #8a96a6; } .col-legend .r-r { background: #2f7de1; } .col-legend .r-sr { background: #e09a00; }
.chara-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tile { position: relative; display: block; min-width: 0; background: #fff; border-radius: 12px; padding: 4px 2px 5px; text-align: center; border: 3px solid var(--rc, #9aa4b1); font-size: .66em; line-height: 1.25; color: inherit; text-decoration: none; }
.tile.r-lg { border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #ff5f8f, #ffb02e, #3fcf74, #3d9bff, #a66bff) border-box; }
.tile img { width: 64px; height: 64px; display: block; margin: 0 auto; }
.tile.lock img { filter: brightness(0); opacity: .18; }
.tile.lock .q { position: absolute; left: 0; right: 0; top: 20px; font-size: 26px; font-weight: 900; color: #9aa4b1; }
.tile .nm { display: block; font-weight: 700; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.lock .nm { color: #aaa; }
.tile.now { box-shadow: 0 0 0 3px #2f7de1; }
.tile.picked { background: #eef6ff; }
.tile .now-tag { position: absolute; left: 50%; transform: translateX(-50%); top: -9px; background: #2f7de1; color: #fff; font-size: 10px; font-weight: 800; border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.tile .no { position: absolute; left: 4px; top: 2px; font-size: 9px; color: #aaa; }
.col-last { margin: 12px 0 4px; font-weight: 800; font-size: .95em; }
/* キャラを選ぶ画面の下の札。報告画面の「日付」（fieldset.pick）にかからないよう、キャラの画面だけに（2026-11-21） */
.sky-col .pick { margin-top: 14px; background: #fff; border-radius: 14px; padding: 12px; display: flex; align-items: center; gap: 10px; border: 2px solid #dcebfa; }
.sky-col .pick img { width: 84px; height: 84px; flex: none; }
.sky-col .pick .t { flex: 1; }
.sky-col .pick .t b { font-size: 1.15em; }
.sky-col .pick button { margin-top: 6px; }

/* もっている Reward：同じ Reward をまとめた「×数」と「全部見る」（2026-11-21 ユーザー。見本 docs/mock/reward-group の A） */
.held-cnt { display: inline-block; background: #e5534b; color: #fff; border-radius: 10px; padding: 0 7px; font-size: .85em; margin-left: 2px; }
.held-all { font-weight: 400; grid-column: 1 / -1; margin: -6px 0 0 48px; } /* 行の下に、横いっぱい（名前の位置から） */
.held-all summary { display: inline-block; list-style: none; cursor: pointer; font-size: .8em; color: var(--primary); padding: 2px 0; }
.held-all summary::-webkit-details-marker { display: none; }
.held-all summary::after { content: ' ▼'; font-size: .8em; }
.held-all[open] summary::after { content: ' ▲'; }
.held-all ul { list-style: none; margin: 2px 0 0; padding: 0; font-size: .8em; color: var(--muted); }
.held-all li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; border-top: 1px dashed #cfe3d2; white-space: nowrap; }
.held-list li.soon .held-all li:first-child span { color: var(--alert-text); font-weight: 700; }

/* ---- ○倍デー（2026-11-24。見本 docs/mock/xday） ---- */
.xd-head { display: flex; align-items: center; gap: 8px; }
.xd-date { font-size: 1.25em; font-weight: 800; }
.xd-today { background: #ff5a1f; color: #fff; border-radius: 8px; padding: 1px 8px; font-size: .8em; font-weight: 700; }
.xd-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 10px; }
.xd-tags span { background: #fff1e6; color: #b4440a; border: 1px solid #ffc9a3; border-radius: 999px; padding: 1px 9px; font-size: .85em; font-weight: 700; }
.xd-acts { display: flex; gap: 8px; }
.xd-acts > * { flex: 1; margin: 0; }
.xd-acts form { display: flex; }
.xd-acts .button, .xd-acts button { width: 100%; margin: 0; }
.xd-past { border: 1px solid #ddd; background: #fff; border-radius: 12px; padding: 12px; margin: 12px 0; }
.xd-past summary { font-weight: 700; color: #555; }
.xd-past-row { padding: 8px 0 0; border-top: 1px solid #eee; margin-top: 8px; }
.xd-past-row .xd-date { font-size: 1em; }
.xd-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; gap: 8px; }
.xd-lb { font-weight: 700; }
.xd-stp { display: flex; align-items: center; flex: none; }
.xd-step { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; border: 0; background: var(--nav-bg); color: var(--nav-text); font-size: 22px; font-weight: 800; }
.xd-stp output { min-width: 70px; text-align: center; font-size: 1.35em; font-weight: 800; }
.xd-stp output.off { color: #aaa; font-size: 1.05em; }
.xd-hint { display: block; background: #f3f6fa; border-radius: 8px; padding: 8px; margin-top: 6px; }
.xd-ck { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #eee; font-size: 1em; margin: 0; }
.xd-ck input { width: 22px; height: 22px; flex: none; margin: 0; }
.xd-ck small { color: #888; margin-left: auto; font-size: .8em; }
.xd-ck.all { font-weight: 800; font-size: 1.1em; border-bottom: 2px solid #ddd; }
.xd-ck.sub { padding-left: 34px; }
.xd-h { font-weight: 800; margin: 14px 0 2px; color: #444; }
.xd-list.xd-off { opacity: .45; }
.xd-note { font-size: .82em; color: #666; background: #fff8e1; border-radius: 8px; padding: 8px; margin-top: 10px; line-height: 1.5; }
/* 子供の報告画面：倍になるカードのシールと金額 */
.tap-card, .tap-free { position: relative; }
.xd-sticker { position: absolute; right: -6px; top: -10px; background: #ff5a1f; color: #fff; font-weight: 900; font-size: 15px; line-height: 1.2; padding: 3px 8px; border-radius: 10px; transform: rotate(8deg); box-shadow: 0 2px 0 #b8350a; z-index: 3; pointer-events: none; }
.xd-old { text-decoration: line-through; color: #aaa; margin-right: 4px; }
.xd-new { color: #e0480f; font-weight: 800; }
/* 豚の王冠のオーラ（全部＝金、一部だけ＝水色で薄く）と、2行のセリフ */
.pigfab .pig-aura { position: absolute; pointer-events: none; overflow: visible; animation: pig-aura-up 1s ease-out both; }
.pigfab .pig-aura.gold { filter: drop-shadow(0 0 5px #ffc400); --aura-op: .6; }
.pigfab .pig-aura.blue { filter: drop-shadow(0 0 5px #7fd6ff); --aura-op: .45; }
@keyframes pig-aura-up { 0% { transform: scaleY(0); opacity: 0; } 100% { transform: scaleY(1); opacity: var(--aura-op); } }
.pigfab .say.two { white-space: pre-line; text-align: left; line-height: 1.45; top: -6px; width: max-content; max-width: calc(100vw - 110px); }
@media (prefers-reduced-motion: reduce) { .pigfab .pig-aura { animation: none; opacity: var(--aura-op); } }
.xd-link { margin: 4px 0 12px; font-weight: 700; }
.xd-link .xd-on { display: block; font-size: .85em; color: #b4440a; font-weight: 700; margin-top: 2px; }
.xd-tag { display: inline-block; background: #ff5a1f; color: #fff; border-radius: 6px; padding: 0 5px; font-size: .78em; font-weight: 800; vertical-align: 1px; }
.tap-card.in .xd-sticker { right: 4px; top: -6px; } /* ルーティンの枠の中は、はみ出すと切れるので内側に */

/* 管理画面の Insta タブ（2026-11-25） */
.ig-row { display: block; text-decoration: none; color: inherit; }
.ig-when { font-weight: 800; }
.ig-badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; margin-left: 6px; vertical-align: middle; font-weight: 700; }
.b-plan { background: #e7f1ff; color: #1c62b0; }
.b-draft { background: #fff3cd; color: #8a6d00; }
.b-done { background: #e6f6ea; color: #237a3b; }
.b-fail { background: #fde8e6; color: #b42318; }
.ig-cap { font-size: 14px; color: #555; margin: 4px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-ok { background: #e6f6ea; border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.ig-ok.warn { background: #fff3cd; }
/* サーバーの Claude（開発用）のログイン（管理画面の設定、2026-11-27） */
.cc-ok { background: #e6f6ea; border-radius: 8px; padding: 10px 12px; font-size: 15px; margin: 0 0 10px; }
.cc-ng { background: #fdecec; color: #9b1c1c; border-radius: 8px; padding: 10px 12px; font-size: 15px; margin: 0 0 10px; }
.cc-step { font-weight: 700; margin: 14px 0 6px; }
.cc-cancel { margin-top: 12px; }
.ig-strip { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 8px 0; }
.ig-strip img { width: 64px; flex: none; border-radius: 6px; scroll-snap-align: start; border: 1px solid #ddd; }
.ig-strip.big img { width: 82%; }
.ig-strip video { width: 64px; flex: none; border-radius: 6px; scroll-snap-align: start; border: 1px solid #ddd; background: #000; }
.ig-strip.big video { width: 82%; max-width: 360px; aspect-ratio: 9 / 16; }
.ig-caption { display: block; }
.ig-caption .label { display: block; font-weight: 700; margin-bottom: 6px; }
.ig-text { min-height: 16em; }
.ig-show { white-space: pre-wrap; margin: 0; font-size: 15px; }
