/* 現金出納帳アプリ — スマホで見やすい大きめ文字・大ボタン (BP アプリ流用) */
* { box-sizing: border-box; }

body {
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  background-color: #f0f4f8;
  margin: 0;
  padding: 16px;
  color: #222;
  font-size: 18px;
}

.container {
  max-width: 520px;
  margin: 0 auto;
  background: white;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
  padding: 24px 20px 28px;
  text-align: center;
}

h1 { font-size: 26px; margin: 4px 0 8px; }
.subtitle { font-size: 20px; color: #555; margin: 0 0 20px; }
.hint { font-size: 16px; color: #555; text-align: left; }
.hint-inline { font-size: 13px; color: #777; margin-top: 4px; }
.error {
  background: #fdecea; color: #b71c1c; border-radius: 8px;
  padding: 12px; font-size: 17px;
}

/* ------- ボタン ------- */
.btn {
  display: block; width: 100%; padding: 16px; margin: 12px 0;
  border: none; border-radius: 12px; font-size: 20px; font-weight: bold;
  text-decoration: none; cursor: pointer; transition: 0.2s;
}
.btn-big { padding: 22px 16px; font-size: 23px; }
.btn-primary { background: #0a7d3c; color: white; }
.btn-primary:hover { background: #086330; }
.btn-secondary { background: #e9eef4; color: #234; }
.btn-secondary:hover { background: #d5dee8; }
.link-small { display: inline-block; margin-top: 18px; font-size: 16px; color: #0a7d3c; }

/* ------- 入力欄 ------- */
label {
  display: block; text-align: left; margin-top: 14px;
  font-weight: bold; font-size: 16px;
}
input[type="text"], input[type="password"], input[type="number"],
input[type="date"], select {
  width: 100%; padding: 14px; margin-top: 6px; font-size: 20px;
  border: 1px solid #bbb; border-radius: 8px; background: #f8fbff;
}
.num-big { font-size: 28px; font-weight: bold; text-align: right; }
textarea {
  width: 100%; padding: 14px; margin-top: 6px; font-size: 19px;
  border: 1px solid #bbb; border-radius: 8px; background: #f8fbff;
  font-family: inherit;
}

/* ------- 音声解析の注記 ------- */
.voice-note {
  text-align: left; border-radius: 10px; padding: 12px 14px; margin: 6px 0 4px;
  font-size: 15px; background: #eef6ff; border: 1px solid #cfe2ff;
}
.voice-note.conf-low { background: #fff4e5; border-color: #ffd8a8; }
.voice-note.conf-medium { background: #fffbe6; border-color: #ffe89e; }
.vn-notes { color: #a4560a; margin-top: 6px; }
.vn-text { color: #556; margin-top: 6px; font-style: italic; }

/* ------- 元帳カード (メニュー) ------- */
.ledger-cards { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 16px; }
.ledger-card {
  display: block; text-decoration: none; color: inherit; text-align: left;
  background: #f4f8fb; border: 1px solid #dbe6ef; border-radius: 12px;
  padding: 14px 16px;
}
.ledger-card.child { margin-left: 18px; background: #f7faf7; border-color: #d7e6d7; }
.lc-name { font-size: 16px; color: #556; font-weight: bold; }
.lc-balance { font-size: 26px; font-weight: bold; color: #0a3d62; margin: 2px 0; }
.lc-balance .yen { font-size: 15px; font-weight: normal; }
.lc-sub { font-size: 13px; color: #889; }
.badge {
  display: inline-block; font-size: 11px; background: #ccc; color: #333;
  border-radius: 6px; padding: 1px 6px; vertical-align: middle; font-weight: normal;
}
.grand {
  background: #fff8e6; border: 1px solid #f0e0b0; border-radius: 12px;
  padding: 12px; margin-bottom: 16px; font-size: 16px;
}
.grand b { display: block; font-size: 24px; color: #7a5c00; margin-top: 2px; }

/* ------- 確認画面 ------- */
.confirm-box {
  text-align: left; background: #f4f8fb; border-radius: 12px;
  padding: 8px 16px; margin: 14px 0;
}
.cf-row {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #e3ebf2; padding: 10px 0; gap: 10px;
}
.cf-row:last-child { border-bottom: none; }
.cf-row span { color: #667; font-size: 15px; }
.cf-row b { text-align: right; }
.cf-row.big b { font-size: 26px; }
b.in { color: #0a7d3c; }
b.out { color: #c0392b; }

/* ------- 保存結果 ------- */
.result-box { background: #eef7ee; border-radius: 12px; padding: 14px; margin: 14px 0; }
.result-value { font-size: 19px; margin: 6px 0; }

/* ------- 出納帳テーブル ------- */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tab {
  flex: 1; padding: 10px 4px; font-size: 14px; text-decoration: none;
  background: #eef2f6; color: #456; border-radius: 8px 8px 0 0;
}
.tab.active { background: #0a7d3c; color: white; font-weight: bold; }
.summary-row { display: flex; gap: 8px; margin: 10px 0 14px; }
.summary-row div {
  flex: 1; background: #f4f8fb; border-radius: 10px; padding: 8px 4px;
}
.summary-row span { display: block; font-size: 12px; color: #667; }
.summary-row b { font-size: 17px; }
.ledger-table { overflow-x: auto; margin: 14px 0; }
.ledger-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger-table th, .ledger-table td {
  border-bottom: 1px solid #e3ebf2; padding: 8px 5px; text-align: right;
}
.ledger-table th { background: #f0f4f8; font-size: 12px; }
.ledger-table td.date { text-align: center; white-space: nowrap; color: #556; }
.ledger-table td.acc { text-align: left; }
.ledger-table td.acc small { color: #778; }
.ledger-table td.in { color: #0a7d3c; }
.ledger-table td.out { color: #c0392b; }
.ledger-table td.bal { font-weight: bold; }
/* ------- 勘定科目の管理 ------- */
.add-box { text-align: left; background: #f4f8fb; border-radius: 12px;
  padding: 8px 16px 16px; margin: 12px 0; }
.add-box summary { font-size: 17px; font-weight: bold; cursor: pointer; padding: 8px 0; }
.add-box .chk { display: block; font-weight: normal; margin-top: 12px; font-size: 15px; }
.add-box .chk input { width: 20px; height: 20px; vertical-align: middle; }
.acc-h { font-size: 16px; text-align: left; color: #556; margin: 20px 0 6px;
  border-bottom: 2px solid #e3ebf2; padding-bottom: 4px; }
.acc-row { display: flex; align-items: center; gap: 6px; margin: 6px 0; }
.acc-row.inactive { opacity: 0.45; }
.acc-name { flex: 1; padding: 9px 10px; margin: 0; font-size: 16px; }
.acc-sort { width: 52px; padding: 9px 6px; margin: 0; font-size: 15px; text-align: center; }
.chk-inline { font-size: 13px; color: #667; white-space: nowrap; }
.chk-inline input { width: 18px; height: 18px; vertical-align: middle; }
.mini { border: none; background: #eef2f6; border-radius: 8px; font-size: 17px;
  padding: 8px 10px; cursor: pointer; }
.mini.toggle { background: #fbeeee; }

/* ------- 学習メモ ------- */
.hint-row { display: flex; align-items: center; gap: 8px; text-align: left;
  border-bottom: 1px solid #e3ebf2; padding: 10px 2px; }
.hint-main { flex: 1; font-size: 15px; }
.hint-arrow { color: #99a; margin: 0 4px; }
.tagchip { display: inline-block; background: #eef7f0; color: #0a7d3c;
  border: 1px solid #cfe6d5; border-radius: 6px; padding: 1px 8px; font-size: 13px; }
.tagchip.led { background: #eef2fb; color: #2a4b8a; border-color: #d0dbf0; }
.hint-note { color: #889; font-size: 13px; margin-left: 4px; }

/* ------- 月次レポート ------- */
.month-nav { display: flex; align-items: center; gap: 8px; margin: 8px 0 14px; }
.month-nav .btn { margin: 0; flex: 0 0 auto; width: auto; padding: 12px 14px; font-size: 15px; }
.ym-form { flex: 1; margin: 0; }
.ym-form input[type="month"] { width: 100%; padding: 12px; margin: 0;
  font-size: 17px; text-align: center; }
.report-ledger { margin: 22px 0; }
.rl-title { font-size: 17px; text-align: left; background: #0a7d3c; color: #fff;
  padding: 8px 12px; border-radius: 8px; margin: 0 0 8px; }
.ledger-table tr.carry td { background: #f4f8fb; font-weight: bold; }
.ledger-table tr.carry.end td { background: #eef7f0; }
.ledger-table tr.tot td { background: #fafcfe; color: #556; }
.ledger-table td.muted { color: #99a; }

.ops { white-space: nowrap; }

/* ------- 印刷 (銀行提出 PDF 用) ------- */
@media print {
  body { background: #fff; padding: 0; font-size: 13px; }
  .container { box-shadow: none; max-width: none; border-radius: 0; padding: 0; }
  .no-print, .month-nav { display: none !important; }
  .rl-title { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report-ledger { page-break-inside: avoid; }
}
.ops form { display: inline; }
.edit {
  text-decoration: none; color: #0a7d3c; font-size: 16px; padding: 2px 4px;
}
.del {
  border: none; background: none; color: #c0392b; font-size: 16px;
  cursor: pointer; padding: 2px 4px;
}
