:root{--text:#6b6375;--text-h:#08060d;--bg:#fff;--border:#e5e4e7;--code-bg:#f4f3ec;--accent:#aa3bff;--accent-bg:#aa3bff1a;--accent-border:#aa3bff80;--social-bg:#f4f3ec80;--shadow:#0000001a 0 10px 15px -3px, #0000000d 0 4px 6px -2px;--sans:system-ui, "Segoe UI", Roboto, sans-serif;--heading:system-ui, "Segoe UI", Roboto, sans-serif;--mono:ui-monospace, Consolas, monospace;font:18px/145% var(--sans);letter-spacing:.18px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;color:var(--text);background:var(--bg);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}@media (width<=1024px){:root{font-size:16px}}@media (prefers-color-scheme:dark){:root{--text:#9ca3af;--text-h:#f3f4f6;--bg:#16171d;--border:#2e303a;--code-bg:#1f2028;--accent:#c084fc;--accent-bg:#c084fc26;--accent-border:#c084fc80;--social-bg:#2f303a80;--shadow:#0006 0 10px 15px -3px, #00000040 0 4px 6px -2px}#social .button-icon{filter:invert()brightness(2)}}#root{text-align:center;border-inline:1px solid var(--border);box-sizing:border-box;flex-direction:column;width:1126px;max-width:100%;min-height:100svh;margin:0 auto;display:flex}body{margin:0}h1,h2{font-family:var(--heading);color:var(--text-h);font-weight:500}h1{letter-spacing:-1.68px;margin:32px 0;font-size:56px}@media (width<=1024px){h1{margin:20px 0;font-size:36px}}h2{letter-spacing:-.24px;margin:0 0 8px;font-size:24px;line-height:118%}@media (width<=1024px){h2{font-size:20px}}p{margin:0}code,.counter{font-family:var(--mono);color:var(--text-h);border-radius:4px;display:inline-flex}code{background:var(--code-bg);padding:4px 8px;font-size:15px;line-height:135%}:root{--bg:#f6f8fb;--card:#fff;--primary:#06c755;--primary-dark:#05a948;--text:#111827;--muted:#6b7280;--border:#e5e7eb;--danger:#ef4444;--success:#10b981;--warning:#f59e0b}*{box-sizing:border-box}html,body{overflow-x:hidden}body,button,input,select,textarea{font-family:Kanit,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}body{background:var(--bg);color:var(--text);margin:0}.page{min-height:100vh;padding:16px}.page.has-bottom-bar{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}.container{flex-direction:column;gap:12px;width:100%;max-width:480px;margin:0 auto;display:flex}.card{background:var(--card);border:1px solid var(--border);border-radius:18px;padding:16px}.card-title{margin:0 0 12px;font-size:16px;font-weight:700}.app-title{margin:0;font-size:22px;font-weight:700}.header-card{background:var(--card)}.header-top{justify-content:space-between;align-items:center;gap:12px;display:flex}.bill-title{margin:0;font-size:20px;font-weight:700}.header-line{color:var(--muted);margin:8px 0 0;font-size:14px}.header-total{border-top:1px solid var(--border);flex-direction:column;gap:4px;margin-top:14px;padding-top:14px;display:flex}.total-amount{color:var(--text);font-size:28px;font-weight:800}.badge{border-radius:999px;flex-shrink:0;padding:4px 10px;font-size:12px;font-weight:600}.badge-open{color:var(--primary-dark);background:#e7f9ef}.badge-closed{color:var(--muted);background:#f3f4f6}.chip{border-radius:999px;padding:2px 8px;font-size:11px;font-weight:600}.chip-shared{color:var(--primary-dark);background:#e7f9ef}.chip-own{color:#b45309;background:#fef3e2}.field-group{flex-direction:column;gap:12px;display:flex}.field-label{color:var(--text);font-size:14px;font-weight:600}.current-payer{color:var(--muted);margin:0;font-size:14px}input,select{border:1px solid var(--border);width:100%;min-height:44px;color:var(--text);background:#fff;border-radius:12px;padding:10px 12px;font-size:16px}input[type=date],input[type=month],.dateField{appearance:none;border:1px solid var(--border);width:100%;height:48px;min-height:48px;color:var(--text);text-align:left;box-sizing:border-box;background:#fff;border-radius:16px;padding:0 16px;font-size:16px;font-weight:400}input[type=date]::-webkit-date-and-time-value{text-align:left}input[type=date]::-webkit-calendar-picker-indicator{opacity:.65}.btn-save-date{border:1px solid var(--border);width:100%;min-height:48px;color:var(--text);cursor:pointer;background:#fff;border-radius:16px;font-size:16px;font-weight:600}.btn-save-date:active{background:#e7f9ef}.btn-save-date:disabled{opacity:.5;cursor:not-allowed}input:focus,select:focus{border-color:var(--primary);outline:none}.segmented{background:#f3f4f6;border-radius:12px;gap:4px;padding:4px;display:flex}.seg{min-height:40px;color:var(--muted);cursor:pointer;background:0 0;border:none;border-radius:9px;flex:1;font-size:15px;font-weight:600}.seg-active{color:var(--text);background:#fff;box-shadow:0 1px 3px #00000014}.btn-primary{background:var(--primary);color:#fff;cursor:pointer;border:none;border-radius:14px;width:100%;min-height:48px;font-size:16px;font-weight:700}.btn-primary:active{background:var(--primary-dark)}.btn-primary:disabled{cursor:not-allowed;background:#c7e9d4}.btn-secondary{border:1px solid var(--border);width:100%;min-height:44px;color:var(--text);cursor:pointer;background:#fff;border-radius:12px;font-size:15px;font-weight:600}.btn-secondary:disabled{opacity:.5;cursor:not-allowed}.btn-delete{min-height:36px;color:var(--danger);cursor:pointer;background:#fef2f2;border:none;border-radius:10px;flex-shrink:0;padding:0 14px;font-size:14px;font-weight:600}.btn-delete:disabled{opacity:.4;cursor:not-allowed}.item-cards{flex-direction:column;gap:10px;display:flex}.item-card{border:1px solid var(--border);background:#fff;border-radius:14px;justify-content:space-between;align-items:center;gap:12px;padding:12px;display:flex}.item-card-main{flex-direction:column;gap:4px;min-width:0;display:flex}.item-card-head{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.item-card-title{font-size:15px;font-weight:600}.item-card-sub{color:var(--muted);font-size:12px}.item-card-right{flex-shrink:0;align-items:center;gap:10px;display:flex}.item-card-right strong{white-space:nowrap;font-size:15px}.empty-state{text-align:center;padding:28px 16px}.empty-title{margin:0 0 4px;font-size:16px;font-weight:600}.summary h2{margin:0 0 10px;font-size:18px}.summary h3{color:#374151;margin:16px 0 8px;font-size:14px}.row{background:var(--bg);border-radius:12px;justify-content:space-between;align-items:center;gap:8px;margin-top:8px;padding:10px 12px;display:flex}.row span{color:var(--muted);font-size:13px}.row.total{background:#e7f9ef}.row.total strong{color:var(--primary-dark);font-size:18px}.items{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.item{background:var(--bg);border-radius:10px;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;font-size:14px;display:flex}.success-card{padding-top:24px}.successHeader{text-align:center;flex-direction:column;align-items:center;margin-bottom:20px;display:flex}.successIcon{background:var(--primary);color:#fff;border-radius:999px;justify-content:center;align-items:center;width:64px;height:64px;margin-bottom:12px;font-size:42px;line-height:1;display:flex}.success-title{margin:0;font-size:28px;font-weight:700;line-height:1.2}.push-ok{color:var(--success);margin:8px 0 0;font-size:14px}.push-fail{color:var(--warning);margin:8px 0 0;font-size:14px;line-height:1.4}.success-card .summary{text-align:left;margin:0 0 16px}.btn-close{background:var(--primary);color:#fff;cursor:pointer;border:none;border-radius:18px;width:100%;min-height:56px;font-size:18px;font-weight:600}.btn-close:active{background:var(--primary-dark)}.muted{color:var(--muted);font-size:14px}.muted.small{font-size:13px}.center{text-align:center}.success-text{color:var(--success);margin:0;font-size:14px}.error-text{color:var(--danger);margin:0;font-size:14px}.bottom-bar{border-top:1px solid var(--border);padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));z-index:20;background:#fff;position:fixed;bottom:0;left:0;right:0}.bottom-bar-inner{align-items:center;gap:12px;width:100%;max-width:520px;margin:0 auto;display:flex}.bottom-total{white-space:nowrap;flex-direction:column;display:flex}.bottom-total strong{font-size:18px}.bottom-btn{flex:1;width:auto}.sheet-overlay{z-index:30;background:#11182773;align-items:flex-end;display:flex;position:fixed;inset:0}.sheet{width:100%;max-width:520px;padding:12px 16px calc(20px + env(safe-area-inset-bottom,0px));background:#fff;border-radius:20px 20px 0 0;max-height:88vh;margin:0 auto;overflow-y:auto}.sheet-handle{background:var(--border);border-radius:999px;width:40px;height:4px;margin:0 auto 12px}.sheet-actions{gap:10px;margin-top:16px;display:flex}.sheet-actions button{flex:1;width:auto}.debug{color:#e2e8f0;background:#0f172a;border-radius:12px;margin-top:20px;padding:12px;overflow:auto}.debug summary{cursor:pointer;color:#cbd5e1;font-size:14px}.debug pre{white-space:pre-wrap;word-break:break-word;max-height:240px;margin:8px 0 0;font-size:12px;overflow:auto}.open-bill{flex-direction:column;gap:8px;display:flex}.open-bill-head{justify-content:space-between;align-items:center;gap:12px;margin-bottom:4px;display:flex}.stat-grid{grid-template-columns:1fr 1fr;gap:12px;display:grid}.stat-card{flex-direction:column;gap:4px;display:flex}.stat-label{color:var(--muted);font-size:13px}.stat-value{color:var(--text);font-size:18px;font-weight:700}.stat-value.ok{color:var(--success)}.stat-value.warn{color:var(--warning)}.stat-sub{color:var(--muted);font-size:13px}.dash-list{flex-direction:column;gap:8px;display:flex}.dash-row{border:1px solid var(--border);background:#fff;border-radius:14px;justify-content:space-between;align-items:center;gap:12px;padding:12px;display:flex}.dash-row-name{font-size:15px;font-weight:500}.dash-row-amount{white-space:nowrap;font-size:15px}.debt-card{border:1px solid var(--border);background:#fff;border-radius:14px;justify-content:space-between;align-items:center;gap:12px;padding:12px;display:flex}.debt-flow{font-size:15px;font-weight:500}.debt-clear{text-align:center;padding:16px 8px}.debt-clear-title{margin:0 0 4px;font-size:16px;font-weight:600}.recent-card{border:1px solid var(--border);background:#fff;border-radius:14px;justify-content:space-between;align-items:flex-start;gap:12px;padding:12px;display:flex}.recent-main{flex-direction:column;gap:2px;min-width:0;display:flex}.recent-date{color:var(--muted);font-size:12px}.recent-title{font-size:15px;font-weight:600}.dash-actions{gap:12px;margin-top:4px;display:flex}.dash-actions button{border-radius:16px;flex:1;width:auto;min-height:52px}.empty{color:#94a3b8;margin:4px 0;font-size:14px}
