:root{--bg:#0e1621;--surface:#17212b;--surface-2:#24323f;--line:#22303d;--text:#e9eef3;--muted:#8fa3b5;--accent:#6ab2f2;--accent-strong:#5288c1}*{box-sizing:border-box}html,body,#root{height:100%}body{background:var(--bg);color:var(--text);-webkit-tap-highlight-color:transparent;margin:0;font-family:-apple-system,system-ui,sans-serif}button{font:inherit;cursor:pointer}.screen{height:var(--tg-viewport-stable-height,100dvh);flex-direction:column;display:flex;position:relative}.content{flex:1;padding:12px 16px;overflow-y:auto}.stack{flex-direction:column;gap:12px;display:flex}.card{background:var(--surface);border-radius:14px;padding:14px}.period{justify-content:center;align-items:center;display:flex}.period button{width:44px;height:44px;color:var(--muted);background:0 0;border:0;justify-content:center;align-items:center;padding:0;display:flex}.period button:disabled{color:#3a4a5a;cursor:default}.period .period-label{width:auto;min-width:150px;height:44px;color:var(--text);font-size:16px}.period-label strong{font-weight:600}.overview-head{justify-content:space-between;align-items:center;display:flex;position:relative}.overview-period{flex-direction:column;align-items:flex-start;display:flex}.days-left{color:var(--muted);margin-top:-6px;padding-left:44px;font-size:12px}.gear{background:var(--surface);color:#c7d3de;border:0;border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;width:44px;height:44px;display:flex}.title-row{justify-content:space-between;align-items:center;gap:12px;display:flex}.refresh{width:36px;height:36px;color:var(--muted);background:0 0;border:0;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:flex}.refresh.resting{opacity:.4}.refresh.spinning,.refresh.done{color:var(--accent)}.refresh.spinning svg{animation:.8s linear infinite refresh-spin}@keyframes refresh-spin{to{transform:rotate(360deg)}}.total-amount{font-size:30px;font-weight:700}.total-share{color:var(--muted);margin-top:4px;font-size:13px}.segments{background:var(--surface);border-radius:10px;gap:2px;padding:3px;display:flex;overflow-x:auto}.segments button{min-width:72px;height:34px;color:var(--muted);background:0 0;border:0;border-radius:8px;flex:1 0 auto;padding:0 10px;font-size:14px}.segments button.active{color:var(--text);background:#2f4256}.caption{color:var(--muted);margin:0 0 4px;font-size:13px;font-weight:600}.category{border:0;border-bottom:1px solid var(--line);width:100%;color:var(--text);text-align:left;background:0 0;flex-direction:column;gap:5px;padding:9px 0;display:flex}.category:last-child{border-bottom:0}.category-row{justify-content:space-between;gap:16px;font-size:15px;display:flex}.bar{background:var(--surface-2);border-radius:3px;height:6px;display:block}.bar span{background:var(--accent);border-radius:3px;height:6px;display:block}.total .limit-bar{margin:8px 0}.bar span.over{background:#ff8a7a}.total-share.over-text,.over-text{color:#ff8a7a}fieldset.plain{border:0;min-width:0;margin:0;padding:0}fieldset.plain:disabled{opacity:.6}.card.reset{flex-direction:column;align-items:stretch;gap:4px;display:flex}.suggestions{flex-wrap:wrap;gap:6px;margin-top:-4px;display:flex}.suggestions button{background:var(--surface);height:34px;color:var(--text);border:0;border-radius:17px;padding:0 12px;font-size:14px}.export{text-align:center;flex-direction:column;gap:6px;display:flex}.toast{left:50%;bottom:calc(84px + var(--tg-safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));z-index:30;background:var(--surface-2);width:max-content;max-width:calc(100% - 32px);color:var(--text);border-radius:12px;padding:10px 16px;font-size:14px;animation:.2s ease-out toast-in;position:fixed;transform:translate(-50%);box-shadow:0 6px 20px #0006}.toast-error{color:#ff9a8f}@keyframes toast-in{0%{opacity:0;transform:translate(-50%,8px)}}.secondary{background:var(--surface);height:44px;color:var(--accent);border:0;border-radius:12px;font-size:15px}.secondary:disabled{opacity:.5}.admins-only{background:var(--surface);color:var(--muted);border-radius:12px;margin:0;padding:10px 14px;font-size:14px}.switch{appearance:none;background:var(--surface-2);border-radius:14px;flex-shrink:0;width:46px;height:28px;margin:0 8px 0 0;transition:background .15s;position:relative}.switch:after{content:"";background:#fff;border-radius:50%;width:22px;height:22px;transition:transform .15s;position:absolute;top:3px;left:3px}.switch:checked{background:var(--accent-strong)}.switch:checked:after{transform:translate(18px)}.limit-input.purchase-input{text-align:right;flex:none;width:110px}.empty{color:var(--muted);text-align:center;margin:12px 0;font-size:15px}.title{margin:0;font-size:22px;font-weight:700}.chips{flex-wrap:wrap;gap:6px;display:flex}.chip{background:var(--surface);color:#c7d3de;border-radius:17px;align-items:center;gap:4px;height:34px;padding:0 10px 0 12px;font-size:13px;display:flex;position:relative}.chip.active{color:var(--text);background:#2f4256}.chip select{opacity:0;width:100%;font-size:16px;position:absolute;inset:0}.summary{color:var(--muted);font-size:14px}.day{color:var(--muted);justify-content:space-between;margin:4px 0 2px;font-size:13px;font-weight:600;display:flex}.expense{width:100%;color:var(--text);text-align:left;background:0 0;border:0;border-bottom:1px solid #1c2733;justify-content:space-between;align-items:center;gap:16px;padding:10px 0;font-size:15px;display:flex}.expense-amount{flex-shrink:0;align-items:center;gap:8px;display:flex}.expense-icon{color:var(--muted);flex-shrink:0}.day span:last-child{padding-right:22px}.expense-text{flex-direction:column;gap:2px;min-width:0;display:flex}.expense-note{color:var(--muted);font-size:13px}.tabs{padding:8px 16px calc(8px + var(--tg-safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));background:var(--surface);border-top:1px solid #0b1118;grid-template-columns:repeat(3,minmax(0,1fr));display:grid}.tabs button{height:48px;color:var(--muted);background:0 0;border:0;flex-direction:column;align-items:center;gap:3px;font-size:12px;display:flex}.tabs button.active{color:var(--accent)}.message{color:var(--muted);text-align:center;margin:0;padding:64px 24px;font-size:15px}.message p{margin:0 0 16px}.message button{background:var(--accent-strong);color:#fff;border:0;border-radius:12px;height:44px;padding:0 20px}.hint-small{color:var(--muted);text-align:center;margin:0;font-size:13px}.fab{right:16px;bottom:calc(80px + var(--tg-safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));background:var(--accent-strong);color:#fff;border:0;border-radius:28px;justify-content:center;align-items:center;width:56px;height:56px;display:flex;position:absolute;box-shadow:0 6px 16px #0006}.sheet{height:var(--tg-viewport-height,100dvh);z-index:10;background:#070b10;flex-direction:column;display:flex;position:fixed;top:0;left:0;right:0}.sheet-body{min-height:0;padding:8px 16px calc(12px + var(--tg-safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));background:var(--surface);border-radius:16px 16px 0 0;flex-direction:column;flex:1;gap:12px;margin-top:12px;display:flex;overflow-y:auto}.sheet-head{justify-content:space-between;align-items:center;display:flex}.sheet-head h2{margin:0;font-size:17px;font-weight:600}.sheet-head button{width:44px;height:44px;color:var(--muted);background:0 0;border:0;justify-content:center;align-items:center;margin-right:-12px;display:flex}.amount{width:100%;min-height:50px;color:var(--text);caret-color:var(--accent);font:inherit;letter-spacing:-1px;text-align:center;background:0 0;border:0;outline:0;flex-shrink:0;padding:0;font-size:42px;font-weight:700}.amount::placeholder{color:var(--muted)}.category-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;display:grid}.category-grid button{background:var(--surface-2);min-height:40px;color:var(--text);overflow-wrap:anywhere;border:2px solid #0000;border-radius:10px;padding:2px 4px;font-size:13px}.category-grid button.active{border-color:var(--accent);background:#1f3346}.category-grid button.more{color:var(--accent);grid-column:span 2}.fields{background:var(--bg);border-radius:12px;flex-direction:column;padding:0 12px;display:flex}.field{border-bottom:1px solid #1c2733;justify-content:space-between;align-items:center;gap:12px;min-height:46px;font-size:15px;display:flex;position:relative}.field-value{color:var(--accent)}.field input[type=date]{opacity:0;width:100%;font-size:16px;position:absolute;inset:0}.payers{flex-wrap:wrap;justify-content:flex-end;gap:6px;padding:6px 0;display:flex}.payers button{background:var(--surface);height:32px;color:var(--muted);border:0;border-radius:16px;padding:0 12px;font-size:14px}.payers button.active{color:var(--text);background:#2f4256}.comment{width:100%;height:46px;color:var(--text);background:0 0;border:0;outline:0;padding:0;font-size:16px}.comment::placeholder{color:var(--muted)}.primary{background:var(--accent-strong);color:#fff;border:0;border-radius:12px;flex-shrink:0;height:50px;font-size:16px;font-weight:600}.primary:disabled{opacity:.45;cursor:default}.danger{color:#ff8a7a;background:0 0;border:0;border-radius:12px;flex-shrink:0;height:44px;font-size:15px}.form-error{color:#ff9a8a;text-align:center;margin:0;font-size:14px}.subtitle{color:var(--muted);margin:-8px 0 0;font-size:14px}.add-row{gap:8px;display:flex}.add-row input{background:var(--surface);min-width:0;height:44px;color:var(--text);border:0;border-radius:10px;outline:0;flex:1;padding:0 12px;font-size:16px}.picker{flex-direction:column;gap:8px;display:flex}.picker-list{background:var(--surface);border-radius:14px;max-height:320px;padding:4px 0;overflow-y:auto}.picker-list button{border:0;border-bottom:1px solid var(--line);width:100%;min-height:44px;color:var(--text);text-align:left;background:0 0;padding:8px 14px;font-size:15px}.picker-list button:last-child{border-bottom:0}.picker-list .note{padding:10px 14px}.add-row .currency-chip{white-space:nowrap;width:auto;padding:0 12px}.add-row input::placeholder{color:var(--muted)}.add-row button{width:44px;height:44px;color:var(--text);background:#2f4256;border:0;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;display:flex}.add-row button:disabled{opacity:.5;cursor:default}.purchases{background:var(--surface);border-radius:14px;padding:4px 6px 4px 14px}.purchase{border-bottom:1px solid var(--line);align-items:center;gap:8px;min-height:52px;font-size:16px;display:flex}.purchase:last-child{border-bottom:0}.purchase-check,.purchase-remove{width:40px;height:44px;color:var(--muted);background:0 0;border:0;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:flex}.purchase-check{width:30px;color:var(--accent);justify-content:flex-start}.purchase-title{min-width:0;color:var(--text);text-align:left;overflow-wrap:anywhere;background:0 0;border:0;flex:1;padding:8px 0;font-size:16px}.purchase-input{background:var(--surface-2);min-width:0;height:40px;color:var(--text);border:0;border-radius:8px;outline:0;flex:1;padding:0 8px;font-size:16px}.purchase-name{max-width:30%;color:var(--muted);text-overflow:ellipsis;white-space:nowrap;flex-shrink:0;font-size:13px;overflow:hidden}.purchase-who{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;margin-top:2px;font-size:13px;display:block;overflow:hidden}.purchase.done .purchase-title{color:var(--muted)}.purchase-done-title{text-decoration:line-through}.section-head{justify-content:space-between;align-items:center;margin-bottom:-6px;display:flex}.section-head h2{color:var(--muted);margin:0;font-size:13px;font-weight:600}.link{height:32px;color:var(--accent);background:0 0;border:0;padding:0;font-size:13px}.modal{z-index:20;background:#0000008c;align-items:flex-end;display:flex;position:fixed;inset:0}.modal-card{width:100%;padding:16px 16px calc(16px + var(--tg-safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));background:var(--surface);border-radius:16px 16px 0 0;flex-direction:column;gap:12px;display:flex}.modal-card h2{margin:0;font-size:17px;font-weight:600}.date-field{background:var(--bg);border-radius:12px;justify-content:space-between;align-items:center;gap:12px;min-height:46px;padding:0 12px;font-size:15px;display:flex}.date-field input{color:var(--accent);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;font:inherit;text-align:right;background:0 0;border:0;outline:0;font-size:16px}.link-button{height:44px;color:var(--muted);background:0 0;border:0;padding:0 4px;font-size:15px}.screen-head{align-items:center;gap:4px;margin-left:-12px;display:flex}.screen-head button{width:44px;height:44px;color:var(--accent);background:0 0;border:0;justify-content:center;align-items:center;display:flex}.note{color:var(--muted);margin:0;font-size:13px;font-weight:400}.card .note{margin-top:4px}.rows{background:var(--surface);border-radius:14px;padding:0 14px}.row{border:0;border-bottom:1px solid var(--line);width:100%;min-height:60px;color:var(--text);text-align:left;background:0 0;justify-content:space-between;align-items:center;gap:12px;padding:0;font-size:16px;display:flex;position:relative}.row:last-child{border-bottom:0}.row svg{color:var(--muted);flex-shrink:0}.row select{opacity:0;width:100%;font-size:16px;position:absolute;inset:0}.row-text{flex-direction:column;gap:2px;display:flex}.access-title{margin-bottom:10px;font-size:15px}.segments button:disabled{cursor:default;opacity:.6}.purchase-title.muted{color:var(--muted)}.done-plain{padding-right:14px}.intro{height:100%;padding:12px 20px calc(24px + var(--tg-safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));flex-direction:column;gap:16px;display:flex;overflow-y:auto}.intro-head{justify-content:space-between;align-items:center;min-height:44px;display:flex}.dots{gap:6px;display:flex}.dots span{background:#3a4a5a;border-radius:3px;width:6px;height:6px}.dots span.active{background:var(--accent);width:22px}.intro-picture{background:var(--surface);border-radius:20px;flex-direction:column;flex:none;justify-content:center;gap:6px;height:300px;padding:16px;font-size:14px;display:flex;overflow:hidden}.chat-bubble{background:#182533;border-radius:12px 12px 4px 4px;padding:8px 10px}.chat-action{background:var(--surface-2);text-align:center;border-radius:6px;padding:8px 10px;font-size:13px}.danger-text{color:#ff9a8a}.accent-text{color:var(--accent)}.chat-inline{gap:4px;display:flex}.chat-inline.column{flex-direction:column}.chat-inline div{background:var(--surface-2);text-align:center;border-radius:6px;flex:1;padding:7px 8px;font-size:13px}.chat-inline.column div{text-align:left}.chat-bubble.pre{white-space:pre-line;font-size:13px}.intro-category{flex-direction:column;gap:4px;margin-top:4px;display:flex}.chat-keys{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:12px;display:grid}.chat-keys div{text-align:center;background:#2b3a4a;border-radius:7px;justify-content:center;align-items:center;min-height:38px;padding:2px 4px;font-size:13px;line-height:1.2;display:flex}.intro-picture .hl{outline:2px solid var(--accent);outline-offset:-1px;background:#1f3346;animation:1.6s ease-in-out infinite hl-pulse}@keyframes hl-pulse{50%{outline-color:#6ab2f259}}@media (prefers-reduced-motion:reduce){.intro-picture .hl{animation:none}}.chat-bubble.own{text-align:right;background:#2b5278;border-radius:12px 12px 4px;align-self:flex-end;min-width:48px}.intro-day{margin-top:8px}.intro-row.horizontal{flex-direction:row;justify-content:space-between;align-items:center}.intro-fab-wrap{justify-content:flex-end;display:flex}.intro-fab{background:var(--accent-strong);color:#fff;border-radius:22px;justify-content:center;align-items:center;width:44px;height:44px;font-size:24px;display:flex}.intro-nav{gap:8px;display:flex}.intro-nav button{flex:1;height:50px}.intro-amount{margin:4px 0 8px;font-size:24px;font-weight:700}.intro-row{border-bottom:1px solid var(--line);flex-direction:column;gap:2px;padding:7px 0;display:flex}.intro-row:last-child{border-bottom:0}.intro-title{margin:0;font-size:22px;font-weight:700}.intro-text{color:#c7d3de;margin:0;font-size:15px;line-height:1.45}.support-text{resize:vertical;background:var(--surface-2);width:100%;min-height:160px;color:var(--text);font:inherit;border:0;border-radius:12px;outline:0;padding:12px;font-size:16px}.support-text::placeholder{color:var(--muted)}.author{color:var(--muted);background:0 0;border:0;align-self:center;padding:8px;font-size:13px}.intro-picture .intro-fab.hl{background:var(--accent-strong)}.intro>.primary,.intro-nav{margin-top:auto}.mascot-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.mascot-option{background:var(--surface);color:var(--text);border:2px solid #0000;border-radius:16px;flex-direction:column;align-items:center;gap:6px;padding:10px 10px 12px;font-size:15px;display:flex}.mascot-option img{aspect-ratio:1;border-radius:12px;width:100%;height:auto}.mascot-option.selected{border-color:var(--accent)}.mascot-option:disabled{cursor:default}.mascot-option.selected .note{color:var(--accent)}
