:root {font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR",system-ui,sans-serif;color:#152f2e;background:#f5f8f7;font-synthesis:none;--green:#0b736b;--soft:#e4f4ef;--red:#db5c54;--line:#e8eeec;--sub:#73847f;--shadow:0 6px 28px rgba(21,68,60,.06)}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.48;cursor:not-allowed}a{color:var(--green)}.loading{padding:30vh 20px;text-align:center;color:var(--sub)}.app-shell{max-width:680px;min-height:100dvh;margin:auto;background:white;padding:0 20px 110px;position:relative;box-shadow:var(--shadow)}
.top{display:flex;justify-content:space-between;align-items:center;padding:25px 0 10px;gap:10px}.brand{font-size:22px;font-weight:800;letter-spacing:-1px}.brand-small{font-size:11px;color:var(--sub);font-weight:600;margin-left:6px}.user-pill{background:var(--soft);color:var(--green);padding:8px 11px;border-radius:30px;font-weight:700;font-size:12px}.muted{color:var(--sub)}.subline{font-size:12px;color:var(--sub);margin-top:3px}.month-nav{display:flex;justify-content:center;align-items:center;gap:16px;margin:10px 0 14px}.month-nav strong{font-size:18px;min-width:116px;text-align:center}.iconbtn{width:40px;height:40px;border:0;background:transparent;border-radius:12px;color:#43635c;font-size:24px}.iconbtn:active{background:var(--soft)}
.summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:14px 12px;background:#f1f8f5;border-radius:17px;margin-bottom:16px}.summary>div{text-align:center;min-width:0}.summary span{font-size:11px;color:#6b8179;display:block;margin-bottom:5px}.summary b{font-size:clamp(13px,3.9vw,18px);font-variant-numeric:tabular-nums;letter-spacing:-.5px;display:block;white-space:nowrap}.expense{color:#d34d49!important}.income{color:#0b736b!important}.transfer{color:#647aaf!important}
.weekdays,.calendar{display:grid;grid-template-columns:repeat(7,1fr)}.weekdays{color:#85928e;font-size:11px;text-align:center;margin-bottom:7px}.weekdays span{padding:7px 0}.weekdays span:first-child{color:#e17a72}.calendar{gap:4px}.day{height:72px;min-width:0;border:1px solid transparent;background:transparent;border-radius:12px;padding:6px 2px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px}.day.other{opacity:.35}.day.selected{background:#e9f7f3;border-color:#b4dcd1}.day.today .number{background:var(--green);color:#fff}.number{display:grid;place-items:center;border-radius:50%;width:24px;height:24px;font-weight:700;font-size:12px}.day .amt{font-size:10px;color:#d34d49;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.4px}.day .inc{font-size:9px;color:var(--green);white-space:nowrap}.section-title{display:flex;justify-content:space-between;align-items:center;margin:24px 0 10px;gap:8px}.section-title h2{font-size:17px;margin:0;letter-spacing:-.7px}.section-title small{font-size:12px;color:var(--sub)}.txlist{display:flex;flex-direction:column}.txrow{display:flex;align-items:center;gap:12px;border:0;border-bottom:1px solid var(--line);width:100%;text-align:left;background:white;padding:12px 1px;min-height:64px}.tx-icon{display:grid;place-items:center;width:42px;height:42px;background:#f2f5f4;border-radius:14px;font-size:21px;flex-shrink:0}.tx-main{flex:1;min-width:0}.tx-title{font-size:14px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-meta{font-size:11px;color:var(--sub);margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-amt{font-weight:800;font-size:14px;white-space:nowrap;font-variant-numeric:tabular-nums}.empty{padding:40px 14px;text-align:center;color:#90a09b;font-size:13px;border:1px dashed var(--line);border-radius:14px}.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);max-width:680px;width:100%;height:calc(69px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);display:grid;grid-template-columns:repeat(5,1fr);border-top:1px solid var(--line);background:rgba(255,255,255,.98);z-index:3}.tab{background:transparent;border:0;color:#91a19b;font-size:11px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px}.tab .symbol{font-size:22px}.tab.active{color:var(--green);font-weight:800}.fab{position:fixed;bottom:calc(82px + env(safe-area-inset-bottom));right:max(24px,calc((100vw - 620px)/2));width:58px;height:58px;border:0;border-radius:19px;background:var(--green);box-shadow:0 8px 22px rgba(11,115,107,.25);color:#fff;font-size:34px;line-height:1;z-index:4}.panel{background:#fff}.search{width:100%;border:1px solid #dce8e3;border-radius:12px;padding:13px;margin:4px 0 10px;outline:none}.search:focus,.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--green)}.chartrow{display:flex;align-items:center;gap:10px;padding:12px 0}.chartlabel{width:82px;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chartbar{height:10px;flex:1;background:#ecf2f0;border-radius:20px;overflow:hidden}.chartbar::-webkit-progress-bar{background:#ecf2f0;border-radius:20px}.chartbar::-webkit-progress-value{background:#28a392;border-radius:20px}.chartbar::-moz-progress-bar{background:#28a392;border-radius:20px}.chartvalue{font-size:12px;font-weight:700;text-align:right;min-width:84px}.card{border:1px solid var(--line);border-radius:16px;padding:18px;margin-top:12px}.card h3{font-size:15px;margin:0 0 12px}.btn{border:0;border-radius:12px;background:var(--green);color:white;font-weight:700;padding:13px 16px}.btn-outline{background:#f0f5f3;color:var(--green)}.btn-danger{background:#fff0ed;color:#c54b47}.btn:disabled{opacity:.55}.field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:700}.field input,.field select,.field textarea{width:100%;border:1px solid #dce8e3;padding:12px;border-radius:11px;background:white;outline:0;font-size:15px}.field textarea{min-height:64px;resize:vertical}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.fields{display:flex;flex-direction:column;gap:12px}.overlay{position:fixed;inset:0;z-index:20;background:rgba(8,34,28,.44);display:flex;align-items:flex-end;justify-content:center}.sheet{background:#fff;border-radius:22px 22px 0 0;width:100%;max-width:680px;max-height:94dvh;overflow:auto;padding:20px 20px calc(24px + env(safe-area-inset-bottom));box-shadow:0 -8px 30px #0002}.sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.sheet-head h2{font-size:19px;margin:0}.sheet-actions{display:flex;gap:10px;margin-top:16px}.sheet-actions .btn{flex:1}.quick{width:100%;border:2px solid #bde5d7;border-radius:13px;background:#f4fcf8;padding:14px;font-size:16px;font-weight:600;margin-bottom:14px;outline:none}.quick-tip{font-size:11px;color:var(--sub);margin:-5px 0 15px}.login-shell{min-height:100dvh;display:flex;flex-direction:column;justify-content:center;max-width:430px;margin:auto;padding:25px}.login-logo{width:72px;height:72px;margin-bottom:20px}.login-shell h1{font-size:27px;margin:0 0 5px}.login-shell p{color:var(--sub);margin:0 0 25px;font-size:14px}.toast{position:fixed;bottom:calc(94px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#123e37;color:#fff;border-radius:11px;padding:11px 16px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:100;max-width:90vw;text-align:center;font-size:13px}.toast.visible{opacity:1}.smallbtn{border:0;background:none;color:var(--green);font-weight:700;padding:8px 2px}.page-btn{margin:15px auto;display:block}.alert{padding:13px 14px;border-radius:12px;background:#fff7e9;color:#8b652b;font-size:12px;line-height:1.6}.version{font-size:11px;color:#aab6b2;margin:20px 0;text-align:center}
@media(max-width:370px){.app-shell{padding-left:12px;padding-right:12px}.day{height:67px}.day .amt{font-size:9px}.summary{padding:12px 3px}}
@media(prefers-color-scheme:dark){:root{background:#111b1a;color:#e9f4f0;--line:#31423d;--sub:#9eada8}body,.app-shell,.bottom-nav,.sheet,.txrow{background:#172320;color:#e9f4f0}.summary,.card,.tx-icon{background:#213630}.day.selected,.user-pill{background:#234139}.day .amt{color:#ff928b}.field input,.field select,.field textarea,.search,.quick{background:#1b2a26;color:#eff7f4;border-color:#38504a}.empty{color:#a1b8af}.alert{background:#4b3b26;color:#ffdaaa}.btn-outline{background:#29483f;color:#b1eed7}.iconbtn{color:#c3ded4}.chartbar{background:#36453f}}

/* v0.3.0 notification review (the whole panel remains within the existing Records tab) */
.notification-panel{margin-bottom:14px}
.notification-panel .section-title{margin:0 0 8px}
.notification-panel [hidden]{display:none}
.notification-row{padding:13px 0;border-top:1px solid var(--line, #e3e9e6)}
.notification-title{font-weight:700;margin-bottom:5px;overflow-wrap:anywhere}
.notification-row .muted{font-size:12px;line-height:1.5}
.notification-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:9px}
.notification-actions .btn{padding:8px 12px;font-size:12px}

/* v0.4.2 Android collector pairing */
.device-item{border-top:1px solid var(--line);padding:10px 0;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;overflow-wrap:anywhere}
.device-item .btn{flex-shrink:0;font-size:12px;padding:9px 10px}
#pair-token{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere}

/* v0.4.2 signup / invitations */
.login-shell{padding-top:30px;padding-bottom:30px;justify-content:safe center}
.login-shell .login-logo{width:58px;height:58px;margin-bottom:13px}
.auth-bottom{display:flex;gap:8px;justify-content:center;align-items:center;margin-top:15px;font-size:13px;color:var(--sub)}
.signup-modes{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--line);padding:6px;gap:5px;border-radius:12px;min-width:0}
.signup-modes legend{font-size:12px;font-weight:700;padding:0 5px;color:var(--sub)}
.signup-modes label{padding:9px 3px;display:flex;gap:6px;align-items:center;justify-content:center;font-size:12px}
.signup-tip{font-size:12px!important;line-height:1.5;margin:0!important;color:var(--sub)}
#register-form .field input{min-height:44px}
#signup-gate{margin-bottom:15px}
#new-family-field[hidden],#join-family-field[hidden]{display:none}
@media (max-width:380px){.signup-modes{grid-template-columns:1fr}.login-shell{padding:16px}}

.signup-modes input:disabled+span{opacity:.5}

/* v0.4.5 / mobile-first shared family moneybook */
:root{--green:#343431;--soft:#f3f3f3;--line:#ededed;--sub:#777875;--shadow:none;color:#262626;background:#fff}
body,.app-shell,.panel,.txrow{background:#fff;color:#262626}
.app-shell{box-shadow:none;padding-left:18px;padding-right:18px}
.top{padding:24px 5px 18px}.brand{font-size:23px;letter-spacing:-.7px}.brand-small{font-size:10px}.user-pill{background:#f3f3f3;color:#484744}
.bottom-nav{box-shadow:0 -4px 22px rgba(0,0,0,.035);height:calc(74px + env(safe-area-inset-bottom));border-color:#ededed}
.tab{color:#888;font-size:11px;gap:6px}.tab.active{color:#272727}.tab .symbol{font-size:24px;font-weight:650}
.nav-gap{pointer-events:none}.fab{background:#ffda43;color:#fff;border-radius:50%;width:68px;height:68px;font-weight:600;font-size:45px;
 bottom:calc(29px + env(safe-area-inset-bottom));left:50%;right:auto;transform:translateX(-50%);
 box-shadow:0 7px 18px rgba(45,40,0,.16)}
.summary{background:#f6f6f6;border-radius:20px;padding:19px 10px}.summary b{font-size:clamp(12px,3.8vw,19px)}
.day.selected{background:#fff8d8;border-color:#ffe78d}.day.today .number{background:#ffda43;color:#302811}
.settings-profile{display:flex;align-items:center;gap:16px;padding:14px 6px 23px}
.profile-avatar{width:72px;height:72px;border-radius:50%;background:#e5dfd3;display:grid;place-items:center;font-size:35px;flex-shrink:0}
.profile-detail{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}.profile-detail strong{font-size:19px;letter-spacing:-.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-detail span{font-size:13px;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.settings-profile-arrow{background:none;border:0;font-size:32px;width:44px;color:#252525}
.settings-group-title{font-size:19px;margin:29px 6px 17px;letter-spacing:-.5px}
.settings-list{display:flex;flex-direction:column;gap:12px}
.settings-row{background:#f2f2f2;border:0;border-radius:20px;padding:18px 20px;min-height:73px;display:flex;align-items:center;text-align:left;width:100%;gap:12px;justify-content:space-between;color:#242424}
.settings-row strong{font-size:16px;font-weight:750}.settings-row small{font-size:11px;color:#757575;display:block;margin-top:5px;line-height:1.4}
.settings-row .chevron{font-size:27px;font-weight:500;align-self:center;color:#333}
.settings-row:focus-visible,.fab:focus-visible,.tab:focus-visible{outline:3px solid #ffda43;outline-offset:2px}
.settings-heading{display:flex;align-items:center;gap:12px;margin:14px 0 23px}.settings-heading h2{font-size:20px;margin:0}.settings-heading .iconbtn{color:#222;font-size:26px}
.settings-form{background:#f6f6f6;border-radius:20px;padding:19px;margin:0 0 18px}
.settings-form .field small{font-weight:400;font-size:11px;color:#777}.settings-form .field input,.settings-form .field select{background:#fff;border-color:#e4e4e4}
.settings-form .btn{background:#333}.settings-description{font-size:12px;color:#777;line-height:1.65;padding:4px 4px 14px;margin:0}
.settings-readonly{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:16px 3px;border-top:1px solid #e2e2e2;font-size:13px}
.settings-readonly em{font-size:12px;color:#898989;font-style:normal}.settings-readonly strong{font-size:13px}
.recurring-item{background:#f2f2f2;border-radius:17px;padding:14px 16px;display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.recurring-item span{min-width:0}.recurring-item strong{display:block;font-size:14px}.recurring-item small{display:block;color:#777;font-size:11px;margin-top:4px}
.recurring-item>div{display:flex;flex-wrap:wrap;gap:6px}.recurring-item .btn{font-size:11px;padding:9px 10px}
.daily-budget{background:#f8f8f8;border-radius:13px;margin:18px 0 4px;padding:10px 14px;display:grid;grid-template-columns:1fr auto;gap:6px;font-size:11px;color:#777}
.daily-budget b{color:#333}.daily-budget b.budget-over{color:#b94e44}.daily-budget progress{width:100%;grid-column:1/-1;accent-color:#ffcf2d;height:7px}
@media(prefers-color-scheme:dark){:root{background:#fff;color:#262626;--line:#ededed;--sub:#777875}body,.app-shell,.bottom-nav,.sheet,.txrow{background:#fff;color:#262626}.card{background:#fff}.settings-row,.recurring-item,.summary{background:#f2f2f2}.login-shell{background:#fff;color:#262626}.field input,.field select,.field textarea,.search,.quick{background:white;color:#222;border-color:#ddd}.settings-form .field input,.settings-form .field select{background:#fff;color:#222}.settings-heading .iconbtn{color:#222}.day.selected{background:#fff8d8}.alert{background:#fff7e9;color:#8b652b}.btn-outline{background:#f0f0f0;color:#333}.user-pill{background:#f2f2f2;color:#333}}
