:root{--bg: #f6f5fb;--surface: #ffffff;--surface-2: #f0eef9;--ink: #2a2740;--ink-2: #6b6784;--ink-3: #a29fba;--brand: #534ab7;--brand-soft: #eeedfe;--positive: #d85a30;--positive-soft: #faece7;--negative: #1d9e75;--negative-soft: #e1f5ee;--danger: #cf3f2f;--danger-soft: #fdeceb;--gold: #ba7517;--gold-soft: #faeeda;--border: #e8e6f2;--radius: 16px;--radius-sm: 12px;--shadow: 0 1px 3px rgba(42, 39, 64, .06), 0 8px 24px rgba(42, 39, 64, .06);--safe-top: env(safe-area-inset-top, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px);--safe-left: env(safe-area-inset-left, 0px);--safe-right: env(safe-area-inset-right, 0px);--keyboard: env(keyboard-inset-height, 0px);--shell: 560px;--gutter: 20px;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Helvetica Neue,sans-serif}*{box-sizing:border-box}html,body{margin:0;padding:0}html{-webkit-text-size-adjust:100%;text-size-adjust:100%}body{background:var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;overscroll-behavior-y:none}input,textarea,select{user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}#root{max-width:var(--shell);margin:0 auto;min-height:100vh;min-height:100dvh}button{font-family:inherit;border:none;cursor:pointer;touch-action:manipulation;background:none;color:inherit}button:active{transform:scale(.97);transition:transform .08s}button:disabled{cursor:default}a{color:inherit;text-decoration:none}.page{padding:calc(20px + var(--safe-top)) calc(var(--gutter) + var(--safe-right)) calc(96px + var(--safe-bottom)) calc(var(--gutter) + var(--safe-left));animation:fadeIn .25s ease}@keyframes fadeIn{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.page-header{margin-bottom:18px}.page-header-row{display:flex;align-items:center;gap:8px;margin-left:-10px}.page-title{flex:1;min-width:0;margin:0;font-size:20px;font-weight:700;line-height:1.3}.page-header-right{flex-shrink:0;margin-left:auto}.page-subtitle{margin:6px 0 0;font-size:13px;line-height:1.5;color:var(--ink-3)}.page-header-row.no-back{margin-left:0}.back-btn{flex-shrink:0;width:44px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:12px;color:var(--ink);background:none}.back-btn svg{width:22px;height:22px}.back-btn:active{background:var(--surface-2);transform:none}.tabbar{position:fixed;bottom:0;left:50%;transform:translate(-50%);width:100%;max-width:var(--shell);display:flex;background:#ffffffeb;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-top:1px solid var(--border);padding:6px calc(12px + var(--safe-right)) calc(6px + var(--safe-bottom)) calc(12px + var(--safe-left));z-index:10}.tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:48px;padding:6px 0;color:var(--ink-3);font-size:11px;background:none;-webkit-tap-highlight-color:transparent}.tab.active{color:var(--brand);font-weight:500}.tab svg{width:24px;height:24px}.card{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px}.card+.card{margin-top:14px}.balance-card{background:linear-gradient(135deg,#534ab7,#7f77dd);color:#fff;border-radius:22px;padding:22px;box-shadow:0 12px 32px #534ab747}.balance-label{font-size:13px;opacity:.85}.balance-amount{font-size:clamp(34px,10vw,44px);font-weight:700;letter-spacing:0;margin:6px 0 2px;font-variant-numeric:tabular-nums;word-break:break-all}.balance-sub{font-size:12px;opacity:.8}.growth-card{margin-top:16px;padding:18px 18px 16px;border-radius:24px;overflow:hidden;background:linear-gradient(180deg,#fffdf7,#f3f8ed);border:1px solid rgba(126,174,105,.18);box-shadow:0 10px 28px #4d6f431a}.growth-card-header,.growth-progress-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.growth-kicker{color:#7b9e6c;font-size:12px;font-weight:700}.growth-title{margin-top:3px;color:#334c35;font-size:19px;font-weight:700}.growth-stats{display:flex;flex-direction:column;align-items:flex-end;gap:3px;color:#789073;font-size:11px;white-space:nowrap}.growth-scene{position:relative;display:block;width:100%;min-height:236px;margin:8px 0 0;padding:0;overflow:hidden;border-radius:20px;background:linear-gradient(180deg,#eaf7fb,#f8fcf3 73%,#e2f0d8);cursor:pointer;text-align:left}.growth-scene:active{transform:none}.growth-sky{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.growth-cloud{position:absolute;width:54px;height:16px;border-radius:999px;background:#ffffffbd}.growth-cloud:before,.growth-cloud:after{content:"";position:absolute;bottom:0;border-radius:50%;background:inherit}.growth-cloud:before{left:12px;width:24px;height:24px}.growth-cloud:after{left:29px;width:17px;height:17px}.growth-cloud-one{top:34px;left:12%}.growth-cloud-two{top:66px;right:11%;transform:scale(.72);opacity:.7}.growth-sparkle{position:absolute;color:#efbd50;font-size:18px;animation:sparkleFloat 2.4s ease-in-out infinite}.growth-sparkle-one{top:25px;right:24%}.growth-sparkle-two{top:92px;left:21%;animation-delay:.8s;font-size:13px}@keyframes sparkleFloat{50%{transform:translateY(-4px) scale(1.1);opacity:.65}}.growth-illustration{position:absolute;left:50%;bottom:25px;width:min(92%,360px);height:190px;transform:translate(-50%)}.growth-fruits{position:absolute;left:50%;transform:translate(-50%);pointer-events:none;filter:drop-shadow(0 3px 3px rgba(100,120,50,.16))}.growth-fruits-canopy{bottom:84px;width:188px;height:112px}.growth-fruits-ground{bottom:35px;width:min(92%,300px);height:54px;z-index:2}.growth-fruit{position:absolute;z-index:2;animation:fruitSettle .38s cubic-bezier(.2,.8,.2,1) both}.growth-fruit:nth-child(2n){animation-delay:.06s}.growth-fruit:nth-child(3n){animation-delay:.12s}@keyframes fruitSettle{0%{opacity:0;scale:.45}to{opacity:1;scale:1}}.growth-caption{position:absolute;right:14px;bottom:12px;left:14px;display:flex;justify-content:space-between;gap:12px;color:#547050;font-size:12px}.growth-stage-label{font-weight:700}.growth-fruit-label{color:#7d9578}.growth-scene-wiggle .growth-illustration{animation:plantWiggle .52s ease}@keyframes plantWiggle{0%,to{transform:translate(-50%) rotate(0)}28%{transform:translate(-50%) rotate(-2deg)}62%{transform:translate(-50%) rotate(2deg)}}.growth-progress-row{margin-top:12px;color:#527052;font-size:12px}.growth-progress-row span:first-child{font-weight:700}.growth-progress-track{height:8px;margin-top:7px;background:#dcebd3}.growth-progress-fill{background:linear-gradient(90deg,#8fc96c,#eeb65d)}.growth-error{min-height:190px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#667a61;font-size:13px}.growth-error .btn-ghost{width:auto;padding:9px 18px}.home-child-switcher{display:grid;grid-template-columns:repeat(auto-fit,minmax(92px,1fr));gap:8px;margin-bottom:12px}.home-child-switcher button{display:flex;min-width:0;min-height:48px;padding:8px 10px;align-items:center;justify-content:center;gap:7px;border:1px solid var(--border);border-radius:14px;background:var(--surface);color:var(--ink-2);font-size:13px;font-weight:600}.home-child-switcher button.active{border-color:#e5b94f;background:#fff8dc;color:#5b4a22;box-shadow:0 4px 14px #6f561c1a}.home-child-switcher button:active{transform:scale(.98)}.home-child-switcher span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.child-profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.child-profile-card{display:flex;min-width:0;min-height:76px;padding:12px;align-items:center;gap:10px;border:1px solid var(--border);border-radius:16px;background:var(--surface);box-shadow:0 5px 16px #2a27400f;text-align:left}.child-profile-card.active{border-color:#e5b94f;background:#fffaf0;box-shadow:0 6px 18px #6f561c1a}.child-profile-card>span{min-width:0}.child-profile-card strong,.child-profile-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.child-profile-card strong{color:var(--ink);font-size:14px}.child-profile-card small{margin-top:4px;color:var(--ink-3);font-size:11px}.quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.quick-action-card{display:flex;align-items:center;gap:12px;min-height:92px;padding:14px;border-radius:20px;background:#fff;border:1px solid var(--border);box-shadow:var(--shadow);transition:transform .14s ease,box-shadow .14s ease}.quick-action-card:active{transform:scale(.98);box-shadow:0 3px 12px #2a274014}.quick-action-card span{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}.quick-action-card strong{color:var(--ink);font-size:15px}.quick-action-card small{color:var(--ink-3);font-size:11px}.quick-action-card-penalty{background:#fffaf0;border-color:#f2dfbb}.home-rule-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:2px 0 8px}.home-rule-card{display:flex;min-width:0;min-height:98px;padding:11px 6px 10px;flex-direction:column;align-items:center;justify-content:center;gap:7px;border:1px solid var(--border);border-radius:16px;background:var(--surface);box-shadow:0 5px 16px #2a274012;text-align:center}.home-rule-card:active{transform:scale(.98)}.home-rule-card>span{width:100%;min-width:0}.home-rule-card strong,.home-rule-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-rule-card strong{color:var(--ink);font-size:12px}.home-rule-card small{margin-top:4px;color:var(--positive);font-size:11px;font-weight:700}.home-rule-card-penalty{background:#fffaf0;border-color:#f2dfbb}.home-rule-card-penalty small{color:var(--negative)}.home-rules-notice{display:flex;align-items:center;justify-content:space-between;min-height:58px;padding:12px 16px;border:1px solid var(--border);border-radius:14px;background:var(--surface);color:var(--ink-3);font-size:13px}.home-rules-notice button{min-width:54px;min-height:40px;color:var(--brand);font-weight:600}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:22px 4px 10px;font-size:15px;font-weight:600}.section-title .more{font-size:13px;color:var(--ink-3);font-weight:400;display:inline-flex;align-items:center;min-height:44px;margin:-12px -8px -12px 0;padding:0 8px}.chip{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:9px 16px;border-radius:999px;background:var(--surface);border:1px solid var(--border);font-size:13px;color:var(--ink-2);flex-shrink:0;-webkit-tap-highlight-color:transparent}.chip.active{background:var(--brand-soft);border-color:var(--brand);color:var(--brand);font-weight:500}.chip-scroll{display:flex;gap:8px;overflow-x:auto;padding-bottom:8px;margin:0 calc(-1 * var(--gutter));padding-left:var(--gutter);padding-right:var(--gutter);-webkit-overflow-scrolling:touch;scrollbar-width:none}.chip-scroll::-webkit-scrollbar{display:none}.input{display:block;width:100%;min-height:48px;padding:14px 16px;border-radius:14px;border:1px solid var(--border);background:var(--surface);color:var(--ink);font-family:inherit;font-size:16px;line-height:1.4;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;scroll-margin-bottom:120px}.input::placeholder{color:var(--ink-3)}.input:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}.input-amount{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}.btn-primary{width:100%;min-height:52px;padding:15px;border-radius:14px;background:var(--brand);color:#fff;font-size:16px;font-weight:600;transition:opacity .15s}.btn-primary:disabled{opacity:.5}.btn-ghost{width:100%;min-height:48px;padding:13px;border-radius:14px;background:var(--surface-2);color:var(--ink-2);font-size:15px}.btn-inline{width:auto;min-height:44px;padding:0 16px;font-size:13px;border-radius:10px;margin-top:8px;display:inline-flex;align-items:center;justify-content:center}.alert{margin-top:12px;padding:12px 14px;border-radius:12px;font-size:13px;line-height:1.55;white-space:pre-line}.alert-error{background:var(--danger-soft);color:var(--danger)}.alert-ok{background:var(--brand-soft);color:var(--brand)}.alert-warn{background:var(--gold-soft);color:var(--gold)}.switch{flex-shrink:0;display:flex;align-items:center;justify-content:flex-end;width:64px;height:44px;padding:6px;margin-right:-6px;background:none}.switch:active{transform:none}.switch-track{position:relative;display:block;width:52px;height:32px;border-radius:16px;background:var(--surface-2);transition:background .2s}.switch.on .switch-track{background:var(--brand)}.switch-knob{position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:13px;background:#fff;box-shadow:0 1px 3px #0000002e;transition:left .2s}.switch.on .switch-knob{left:23px}.switch:disabled{opacity:.5}.rule-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}.rule-grid>.card{min-height:104px}.rule-grid>.card+.card{margin-top:0}.qty-stepper{display:flex;align-items:center;justify-content:space-between;background:var(--surface);border-radius:var(--radius);padding:16px 18px;box-shadow:var(--shadow)}.qty-btn{width:48px;height:48px;border-radius:14px;background:var(--brand-soft);color:var(--brand);font-size:24px;font-weight:600;display:flex;align-items:center;justify-content:center}.qty-value{font-size:22px;font-weight:700;font-variant-numeric:tabular-nums}.row{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--border)}.row:last-child{border-bottom:none}.row-icon{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:22px;flex-shrink:0}.row-body{flex:1;min-width:0}.row-title{font-size:15px;font-weight:500}.row-title,.row-sub{overflow-wrap:anywhere}.row-sub{font-size:12px;color:var(--ink-3);margin-top:2px}.row-tappable{min-height:60px;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:background .12s;margin:0 -10px;padding-left:10px;padding-right:10px;border-radius:10px}.row-tappable:active{background:var(--surface-2)}.row-body-btn{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:2px;min-height:44px;padding:0;text-align:left;font-family:inherit;background:none}.row-body-btn:active{opacity:.6;transform:none}.field-label{font-size:12px;color:var(--ink-3);margin:14px 0 6px}.emoji-picker{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}.emoji-opt{aspect-ratio:1 / 1;min-height:44px;display:flex;align-items:center;justify-content:center;font-size:22px;border-radius:12px;border:1px solid var(--border);background:var(--surface);transition:border-color .15s,background .15s}.emoji-opt.active{border-color:var(--brand);background:var(--brand-soft)}.emoji-opt:active{transform:scale(.94)}.rule-preview{display:flex;align-items:center;gap:12px;margin-top:16px;padding:14px 16px;border-radius:14px;background:var(--surface-2)}.hint-text{margin-top:10px;font-size:12px;line-height:1.55;color:var(--ink-3);text-align:center}.amount{font-weight:600;font-size:16px;font-variant-numeric:tabular-nums;white-space:nowrap}.amount.income{color:var(--positive)}.amount.expense{color:var(--negative)}.empty{text-align:center;padding:40px 0;color:var(--ink-3);font-size:14px}.progress-track{height:10px;border-radius:999px;background:var(--surface-2);overflow:hidden;margin-top:10px}.progress-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,#7f77dd,#534ab7);transition:width .4s ease}.sheet-mask{position:fixed;top:0;right:0;bottom:0;left:0;background:#14122466;z-index:50;animation:fadeIn .18s ease}.sheet{position:fixed;bottom:0;left:50%;transform:translate(-50%);width:100%;max-width:var(--shell);margin-bottom:var(--keyboard);max-height:calc(88dvh - var(--keyboard));overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;background:var(--surface);border-radius:22px 22px 0 0;padding:22px calc(var(--gutter) + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(var(--gutter) + var(--safe-left));z-index:51;animation:slideUp .24s cubic-bezier(.2,.8,.2,1)}@keyframes slideUp{0%{transform:translate(-50%,100%)}to{transform:translate(-50%)}}.sheet-handle{width:40px;height:4px;border-radius:2px;background:var(--border);margin:-6px auto 16px}.coin-layer{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:60}.flying-fruit{position:absolute;width:28px;height:28px;filter:drop-shadow(0 3px 4px rgba(62,88,44,.25));animation:flyTo .9s cubic-bezier(.3,.6,.4,1) forwards}@keyframes flyTo{0%{transform:translate(0) scale(.6);opacity:1}80%{opacity:1}to{transform:translate(var(--dx),var(--dy)) scale(.2);opacity:0}}.celebrate{animation:pop .5s ease}@keyframes pop{0%{transform:scale(1)}40%{transform:scale(1.06)}to{transform:scale(1)}}.login-page{max-width:420px;margin:0 auto;padding-top:clamp(20px,12vh,140px)}.login-brand{text-align:center;margin-bottom:28px}.login-brand-emoji{display:flex;justify-content:center;min-height:56px}.login-brand-title{font-size:26px;font-weight:700;margin-top:10px}.login-brand-sub{font-size:13px;color:var(--ink-3);margin-top:6px}.login-card{padding:22px}@media (max-height: 480px) and (orientation: landscape){.login-page{padding-top:14px}.login-brand{margin-bottom:12px}.login-brand-emoji,.login-brand-sub{display:none}.login-brand-title{font-size:20px;margin-top:0}.login-card{padding:14px}}@media (min-width: 768px){:root{--shell: 720px;--gutter: 28px}.page-title{font-size:22px}.page-subtitle{font-size:14px}.section-title{font-size:16px}.card{padding:20px}.balance-card{padding:26px;border-radius:24px}.balance-label{font-size:14px}.balance-sub{font-size:13px}.row-title{font-size:16px}.row-sub{font-size:13px}.row-icon{width:48px;height:48px;font-size:24px}.amount{font-size:17px}.qty-btn{width:52px;height:52px}.qty-value{font-size:24px}.tab{font-size:12px}.tab svg{width:26px;height:26px}.tabbar{padding-top:8px;padding-bottom:calc(8px + var(--safe-bottom))}.rule-grid{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}.input{font-size:16px}.emoji-picker{grid-template-columns:repeat(8,1fr)}.emoji-opt{font-size:26px}}@media (min-width: 1024px){:root{--shell: 820px}}@media (max-height: 480px) and (orientation: landscape){.page{padding-top:calc(12px + var(--safe-top));padding-bottom:calc(84px + var(--safe-bottom))}.page-title{font-size:18px;margin-bottom:4px}.sheet{max-height:calc(92dvh - var(--keyboard))}.sheet .btn-primary{position:sticky;bottom:0;z-index:1;box-shadow:0 -8px 20px #2a27401a}}@media (prefers-reduced-motion: reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important}.flying-fruit{display:none}}
