/* 色や余白は、ここからまとめて調整できます。 */
:root { --bg:#f6f7fb; --paper:#fff; --ink:#272b40; --muted:#85899c; --line:#ececf3; --purple:#7863d5; --purple-soft:#f0edfc; --green:#399c83; --radius:18px; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue","Noto Sans JP","Hiragino Kaku Gothic ProN",Meiryo,sans-serif; font-size:14px; line-height:1.65; }
button,input,select { font:inherit; }
button,select { cursor:pointer; }
button { transition:background .18s,transform .18s; }
button:hover { transform:translateY(-1px); }
button:focus-visible,a:focus-visible { outline:3px solid #b7a7ee; outline-offset:4px; }
input:focus,select:focus { outline:2px solid #b7a7ee; outline-offset:1px; }
[hidden] { display:none !important; }
.header { height:86px; background:var(--paper); border-bottom:1px solid var(--line); display:flex; align-items:center; gap:28px; padding:0 max(5%,calc((100vw - 1200px)/2)); }
.brand { text-decoration:none; display:flex; align-items:center; font-size:23px; font-weight:800; letter-spacing:-.8px; color:var(--ink); white-space:nowrap; }
.brand-icon { width:36px; height:36px; display:grid; place-items:center; margin-right:11px; border-radius:11px; color:white; background:var(--purple); font-size:25px; }
.brand-dot { color:var(--purple); }
.header-caption { color:var(--muted); font-size:12px; }
.demo-badge { margin-left:auto; background:#f4f2fb; border:1px solid #e8e2f8; border-radius:20px; color:#8171a6; padding:5px 12px; font-size:11px; white-space:nowrap; }
.demo-badge>span,.tiny-dot { display:inline-block; width:6px; height:6px; background:#a68dcf; border-radius:50%; margin-right:7px; }
main { max-width:1200px; margin:auto; padding:39px 0 0; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:24px; }
.eyebrow { color:var(--purple); font-size:10px; font-weight:700; letter-spacing:2.4px; margin:0 0 9px; }
h1 { font-size:27px; letter-spacing:1px; margin:0 0 7px; font-weight:750; }
.subtitle { color:var(--muted); margin:0; font-size:12px; }
.month-label { display:flex; align-items:center; gap:10px; background:white; padding:9px 17px; border:1px solid var(--line); border-radius:10px; font-size:13px; white-space:nowrap; }
.month-label>span:first-child { color:var(--purple); font-size:20px; }
.notice { display:flex; align-items:center; gap:10px; padding:12px 16px; background:#eeedf8; border-radius:10px; color:#7c7895; font-size:11px; margin-bottom:24px; }
.notice p { margin:0; }.notice strong { font-weight:600; }
.info-icon { display:grid; place-items:center; border:1px solid #9b93b7; border-radius:50%; width:16px; height:16px; flex-shrink:0; font-size:10px; font-weight:bold; }
.summary-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; margin-bottom:27px; }
.summary-card { background:white; border:1px solid var(--line); border-radius:var(--radius); padding:21px 25px; position:relative; overflow:hidden; }
.summary-top { display:flex; align-items:center; justify-content:space-between; font-size:12px; color:#75798c; }
.summary-icon { height:30px; width:30px; border-radius:9px; display:grid; place-items:center; font-size:19px; }
.income-icon { background:#eaf6f1; color:var(--green); }.expense-icon { background:#fff0e9; color:#d48f6a; }.balance-icon { background:#ffffff24; color:white; }
.amount { font-size:33px; font-weight:700; letter-spacing:.5px; margin:9px 0 1px; font-variant-numeric:tabular-nums; }
.card-caption { color:#9b9eac; font-size:10px; margin:0; }
.balance-card { background:#7b68cf; color:white; border-color:#7b68cf; }.balance-card .summary-top,.balance-card .card-caption { color:#ece6ff; }
.balance-decoration { position:absolute; width:150px; height:150px; border:24px solid #ffffff08; border-radius:50%; bottom:-74px; right:-24px; pointer-events:none; }
.content-grid { display:grid; grid-template-columns:minmax(0,1fr) 355px; gap:25px; align-items:start; }.main-column,.side-column { display:grid; gap:24px; min-width:0; }
.panel { background:white; border:1px solid var(--line); border-radius:var(--radius); padding:25px; }
.panel-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
h2 { margin:0; font-size:16px; letter-spacing:.3px; }.panel-heading p { margin:4px 0 0; font-size:11px; color:var(--muted); }.section-icon { color:#b3a9d6; font-size:24px; }
.type-selector { display:flex; border:0; padding:4px; margin:22px 0 20px; background:#f5f5f9; border-radius:10px; width:240px; }
.type-selector label { flex:1; position:relative; cursor:pointer; }.type-selector input { position:absolute; opacity:0; }.type-selector span { display:block; text-align:center; padding:6px 12px; border-radius:7px; color:#9295a5; font-size:12px; }
.type-selector input:checked+span { color:var(--purple); background:white; box-shadow:0 2px 5px #272b400b; font-weight:bold; }.type-selector input:focus-visible+span { outline:2px solid var(--purple); }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px 20px; }.form-grid>label { font-size:12px; font-weight:600; min-width:0; }.required,.optional { margin-left:6px; font-size:9px; color:#9c96ae; font-weight:400; }.optional { color:#afb0bc; }
.form-grid input,.form-grid select { margin-top:7px; width:100%; height:43px; border:1px solid #e5e6ef; border-radius:8px; padding:9px 12px; background:#fff; color:var(--ink); font-size:12px; min-width:0; }
input::placeholder { color:#b0b2bf; }.money-input { display:block; position:relative; }.money-input>span { position:absolute; top:17px; left:13px; color:#9b9eae; }.money-input input { padding-left:31px; }
.form-footer { margin-top:23px; display:flex; align-items:center; justify-content:space-between; gap:12px; }.form-footer>span { font-size:10px; color:#a0a3b2; }.form-actions { display:flex; gap:8px; align-items:center; }
.primary-button { background:var(--purple); color:white; border:0; border-radius:9px; padding:11px 26px; font-size:12px; font-weight:600; }.primary-button:hover { background:#6954c5; }.text-button { background:none; border:0; color:var(--purple); font-size:11px; padding:5px; }
.status { color:var(--green); font-size:11px; margin:10px 0 0; }.status:empty { display:none; }
.title-with-count { display:flex; gap:10px; align-items:center; }.count { background:#f3f2f9; color:#8d83aa; padding:1px 8px; border-radius:6px; font-size:10px; }.filter-label select { border:1px solid var(--line); border-radius:7px; padding:6px 9px; font-size:10px; color:#838698; background:white; }
.list-caption { margin:6px 0 17px; color:var(--muted); font-size:10px; }.table-scroll { overflow-x:auto; }table { width:100%; border-collapse:collapse; text-align:left; white-space:nowrap; }th { background:#f8f8fb; padding:9px 10px; font-weight:400; font-size:10px; color:#9699aa; }td { padding:14px 10px; border-bottom:1px solid #f0f0f5; font-size:11px; }th:first-child { border-radius:6px 0 0 6px; }th:last-child { border-radius:0 6px 6px 0; }.right { text-align:right; }.record-date { color:#9b9eac; font-size:9px; margin-bottom:2px; }.record-memo { max-width:190px; white-space:normal; overflow-wrap:anywhere; }.category-badge { background:var(--category-bg); color:var(--category-color); padding:4px 9px; border-radius:6px; font-size:10px; }.record-amount { font-size:13px; font-weight:600; font-variant-numeric:tabular-nums; }.record-amount.income { color:var(--green); }.row-actions { display:flex; justify-content:flex-end; gap:8px; }.row-actions button { padding:4px 0; border:0; background:none; font-size:10px; color:#888299; }.row-actions .delete:hover { color:#c75e72; }.row-actions .edit:hover { color:var(--purple); }
.list-footer { display:flex; align-items:center; margin-top:17px; font-size:9px; color:#aaa8b8; }.tiny-dot { width:5px; height:5px; background:#bab4ce; }.empty-state { font-size:12px; color:var(--muted); padding:22px 0; text-align:center; }
.small-tag { background:#f6f5fb; border-radius:5px; padding:2px 8px; color:#918aab; font-size:10px; }.chart-caption { font-size:11px; color:var(--muted); margin:7px 0 0; }.donut-wrap { width:200px; height:200px; position:relative; margin:24px auto; }.donut { width:100%; height:100%; border-radius:50%; background:#eee; mask:radial-gradient(circle,transparent 56%,black 57%); }.donut-center { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; flex-direction:column; pointer-events:none; }.donut-center span { font-size:10px; color:#9a9bac; }.donut-center strong { font-size:23px; margin-top:4px; letter-spacing:.4px; }.chart-legend { padding:0; margin:0; list-style:none; }.chart-legend li { display:flex; align-items:center; gap:9px; margin:13px 0; font-size:11px; }.legend-dot { width:8px; height:8px; border-radius:3px; flex-shrink:0; }.legend-name { color:#838698; flex:1; }.legend-value { font-weight:600; }.legend-percent { font-size:10px; color:#aaacb8; width:34px; text-align:right; }.chart-note { font-size:9px; color:#b0afbf; text-align:center; border-top:1px solid var(--line); padding-top:14px; margin:17px 0 0; }
.advice-panel { padding:25px; border:1px solid #e5dff5; border-radius:var(--radius); background:linear-gradient(125deg,#f0ecfb,#f7f5fc); }.ai-label { font-size:9px; letter-spacing:1.6px; color:#9582c0; margin-bottom:12px; }.ai-label>span { font-size:23px; vertical-align:middle; margin-right:7px; }.advice-panel h2 { color:#655580; font-size:17px; }.advice-intro { font-size:11px; line-height:1.95; color:#9388a5; margin:10px 0 20px; }.advice-button { display:flex; align-items:center; justify-content:space-between; gap:7px; width:100%; padding:12px; border:1px solid #e2d9f2; border-radius:9px; background:white; color:#8064b2; font-size:11px; font-weight:600; }.advice-button:hover { background:#faf8ff; }.advice-button>span:first-child { font-size:18px; }.advice-answer { margin-top:15px; padding:12px; border-radius:8px; background:#ffffff70; color:#9589a5; font-size:11px; line-height:1.9; }.advice-answer p { margin:0; }.advice-answer strong { display:block; margin-bottom:6px; color:#786291; }.ai-note { font-size:9px; color:#aaa0b9; text-align:center; margin:12px 0 0; }
.footer { display:flex; align-items:center; justify-content:space-between; margin-top:37px; padding:24px 0; border-top:1px solid #e8e9f1; color:#aaadbb; font-size:9px; }.footer>span:first-child { font-size:13px; font-weight:bold; color:#8d8b9e; }.footer p { margin:0; }.footer>span:last-child { letter-spacing:.8px; }.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
@media(min-width:1600px) { main { padding-top:50px; } }
@media(max-width:1300px) { main { margin:0 5%; }.content-grid { grid-template-columns:minmax(0,1fr) 320px; gap:20px; }.panel,.advice-panel { padding:22px; } }
@media(max-width:1000px) { .content-grid { grid-template-columns:minmax(0,1fr); }.side-column { grid-template-columns:1fr 1fr; align-items:start; }.summary-card { padding:18px; }.amount { font-size:28px; } }
@media(max-width:600px) { .header { height:70px; padding:0 5%; gap:10px; }.brand { font-size:20px; }.brand-icon { width:31px; height:31px; }.header-caption { display:none; }.demo-badge { font-size:9px; padding:4px 8px; }main { padding-top:26px; }.page-heading { align-items:start; flex-direction:column; gap:16px; margin-bottom:17px; }h1 { font-size:21px; letter-spacing:0; }.subtitle { font-size:11px; }.eyebrow { font-size:9px; }.month-label { font-size:11px; padding:5px 12px; }.notice { font-size:10px; padding:11px 12px; align-items:flex-start; }.info-icon { margin-top:3px; }.summary-grid { gap:8px; margin-bottom:20px; }.summary-card { padding:13px 10px; border-radius:12px; }.summary-top { font-size:10px; }.summary-icon { display:none; }.amount { font-size:clamp(15px,4.5vw,25px); margin-top:10px; letter-spacing:-.5px; }.card-caption { font-size:8px; }.balance-decoration { display:none; }.panel,.advice-panel { padding:20px 16px; border-radius:14px; }.form-grid { gap:16px 12px; }.form-grid input,.form-grid select { font-size:16px; }.form-grid>label { font-size:11px; }.type-selector { width:100%; margin-top:18px; }.form-footer { align-items:flex-start; flex-direction:column; }.form-actions { width:100%; justify-content:flex-end; }.primary-button { flex:1; }.side-column { grid-template-columns:1fr; }.main-column,.side-column { gap:20px; }td { padding:13px 5px; }th { padding:9px 5px; }.record-memo { max-width:105px; }.record-amount { font-size:11px; }.category-badge { font-size:9px; padding:4px 6px; }.row-actions { gap:7px; }.row-actions button { padding:9px 1px; }.footer { flex-wrap:wrap; gap:10px; }.footer p { display:none; }.donut-wrap { width:210px; height:210px; } }

/* 入力エラーと削除確認。既存の配色・角丸に合わせています。 */
.status.error,.storage-warning { color:#b0475e; }
.storage-warning { padding:12px 16px; border:1px solid #ecc6d0; border-radius:10px; background:#fff5f7; }
[aria-invalid="true"] { border-color:#b0475e !important; }
button:disabled { opacity:.5; cursor:not-allowed; transform:none; }
#delete-dialog { width:calc(100% - 40px); max-width:430px; border:1px solid var(--line); border-radius:var(--radius); padding:26px; color:var(--ink); box-shadow:0 20px 80px #272b4033; }
#delete-dialog::backdrop { background:#272b4066; }
#delete-details { overflow-wrap:anywhere; font-size:13px; }
#delete-note { color:var(--muted); font-size:12px; }
#delete-dialog .form-actions { justify-content:flex-end; margin-top:24px; gap:20px; }

.ai-disclosure { font-size:11px; line-height:1.9; color:#78688c; margin:0 0 15px; }
.advice-answer { white-space:pre-wrap; overflow-wrap:anywhere; }
