:root{--bg: #f2f4f5;--surface: #ffffff;--surface-2: #f6f8f9;--line: #e1e6e8;--text: #15201f;--muted: #5f6d6c;--accent: #0c8599;--accent-soft: #e3f4f6;--on-accent: #ffffff;--pos: #2b8a3e;--neg: #d6336c;--danger: #e03131;--shadow: 0 1px 2px rgb(0 0 0 / .05), 0 4px 16px rgb(0 0 0 / .04);--radius: 14px;--nav-w: 220px;--tab-h: 64px;color-scheme:light;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:16px;-webkit-text-size-adjust:100%}html[data-scheme=dark]{--bg: #0f1a1c;--surface: #172427;--surface-2: #1d2d31;--line: #2a3c40;--text: #e6eeee;--muted: #93a5a6;--accent: #3bc9db;--accent-soft: #163a40;--on-accent: #06272c;--pos: #69db7c;--neg: #ff8fab;--danger: #ff6b6b;--shadow: none;color-scheme:dark}html[data-amount-colors=blue-orange]{--pos: #1c7ed6;--neg: #e8590c}html[data-scheme=dark][data-amount-colors=blue-orange]{--pos: #74c0fc;--neg: #ffa94d}*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--text)}button,input,label,select,a{touch-action:manipulation}h1{font-size:1.6rem;margin:0 0 16px;letter-spacing:-.01em}h2{font-size:1.05rem;margin:0 0 12px}h3{font-size:.95rem;margin:0}p{margin:0 0 8px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.app{min-height:100dvh}.main{padding:16px 16px calc(var(--tab-h) + 24px + env(safe-area-inset-bottom));max-width:980px;margin:0 auto}.nav{position:fixed;z-index:20;left:0;right:0;bottom:0;display:flex;justify-content:space-around;height:calc(var(--tab-h) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:var(--surface);border-top:1px solid var(--line)}.nav-logo{display:none}.nav-item{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;background:none;color:var(--muted);font:inherit;font-size:.72rem;cursor:pointer}.nav-item[aria-current=page]{color:var(--accent);font-weight:600}.nav-icon{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}@media(min-width:768px){.nav{top:0;right:auto;width:var(--nav-w);height:auto;flex-direction:column;justify-content:flex-start;gap:4px;padding:calc(20px + env(safe-area-inset-top)) 12px 12px calc(12px + env(safe-area-inset-left));border-top:0;border-right:1px solid var(--line)}.nav-logo{display:flex;align-items:center;gap:10px;font-weight:700;font-size:1.15rem;padding:0 10px 18px}.nav-logo-mark{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:9px;background:linear-gradient(135deg,#0c8599,#2b8a3e);color:#fff;font-size:1.1rem}.nav-item{flex:0 0 auto;flex-direction:row;justify-content:flex-start;gap:12px;min-height:46px;padding:0 12px;border-radius:10px;font-size:.98rem}.nav-item[aria-current=page]{background:var(--accent-soft)}.main{margin-left:var(--nav-w);padding:calc(24px + env(safe-area-inset-top)) 32px 40px}}@media(min-width:768px){.main.main-solo{margin-left:auto}}@media(min-width:768px)and (min-width:1300px){.main{margin-left:calc(var(--nav-w) + (100vw - var(--nav-w) - 980px) / 2)}}.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px;margin-bottom:16px}.panel-head{display:flex;align-items:center;gap:8px;margin-bottom:10px}.panel-head h2,.panel-head .cat-name{flex:1;margin:0}.hint{color:var(--muted);font-size:.88rem}.field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}.field>span,.field>label{font-size:.88rem;color:var(--muted)}.text-input,.numfield input,select{font:inherit;color:var(--text);background:var(--surface-2);border:1px solid var(--line);border-radius:10px;min-height:44px;padding:0 12px;width:100%}.text-input:focus,.numfield input:focus,select:focus{outline:2px solid var(--accent);outline-offset:-1px}.numfield{display:inline-flex;flex-direction:column;gap:4px;min-width:0}.numfield-label{font-size:.88rem;color:var(--muted)}.numfield-box{display:flex;align-items:center;gap:6px}.numfield input{text-align:right;font-variant-numeric:tabular-nums}.numfield.is-invalid input{border-color:var(--danger);box-shadow:0 0 0 1px var(--danger)}.numfield-suffix{color:var(--muted)}.seg{display:inline-flex;flex-wrap:wrap;gap:4px;background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:3px}.seg button{font:inherit;font-size:.92rem;min-height:38px;padding:0 14px;border:0;border-radius:9px;background:none;color:var(--text);cursor:pointer}.seg button[aria-pressed=true]{background:var(--surface);color:var(--accent);font-weight:600;box-shadow:0 1px 3px #0000001f}.switch-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px}.switch-row input{width:46px;height:28px;accent-color:var(--accent)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;font:inherit;font-weight:500;min-height:44px;padding:0 16px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--text);cursor:pointer}.btn-small{min-height:36px;padding:0 12px;font-size:.9rem}.btn-primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.btn-danger{background:var(--danger);border-color:var(--danger);color:#fff}.btn-ghost{border-color:transparent;background:none;color:var(--accent)}.btn-text-danger{border-color:transparent;background:none;color:var(--danger)}.icon-btn{display:inline-grid;place-items:center;min-width:40px;min-height:40px;border:0;border-radius:10px;background:none;color:var(--muted);font:inherit;font-size:1.05rem;cursor:pointer}.icon-btn:hover{background:var(--surface-2)}.icon-btn:disabled{opacity:.3;cursor:default}.row-buttons{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}.money{font-variant-numeric:tabular-nums;white-space:nowrap}.money.pos{color:var(--pos)}.money.neg{color:var(--neg)}.grid3{display:grid;grid-template-columns:minmax(0,1.6fr) repeat(3,minmax(0,1fr));align-items:center;column-gap:10px}.grid3>.num{text-align:right}.grid3-head{color:var(--muted);font-size:.82rem;padding-bottom:6px;border-bottom:1px solid var(--line)}.grid3-row{min-height:46px;border-bottom:1px solid var(--line)}.grid3-row:last-child{border-bottom:0}.grid3-total{font-weight:650;min-height:44px}.item-wrap{display:flex;align-items:center;gap:4px;border-bottom:1px solid var(--line)}.item-moves{flex:none;width:40px;display:flex;flex-direction:column}.item-moves .icon-btn{min-height:22px}.with-moves{padding-right:44px}.item-row{flex:1;min-width:0;width:100%;font:inherit;color:inherit;text-align:left;background:none;border:0;cursor:pointer;padding:6px 0}.item-row:hover{background:var(--surface-2)}.item-name{display:flex;flex-direction:column;min-width:0}.item-name>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag{font-size:.75rem;color:var(--muted)}.summary{display:grid;gap:10px}.summary-big{font-size:1.25rem;font-weight:700}.callout{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;border-radius:12px;background:var(--accent-soft);margin-top:10px}.income-person{margin-bottom:14px}.income-line{display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,160px) auto;gap:8px;align-items:center;margin-bottom:8px}.tax-table{width:100%;border-collapse:collapse}.tax-scroll{overflow-x:auto}.tax-table th,.tax-table td{padding:6px 4px;border-bottom:1px solid var(--line);text-align:right;vertical-align:middle}.tax-table th:first-child,.tax-table td:first-child{text-align:left;min-width:150px}.tax-table td .numfield{width:100%;min-width:110px}.tax-table thead th{font-size:.82rem;color:var(--muted);font-weight:500}.tax-table tr.calc td{color:var(--muted)}.tax-table tr.sub td{font-weight:600;color:var(--text)}.tax-table tr.section td{padding-top:16px;font-weight:650;color:var(--text);border-bottom:0}@media(max-width:520px){.panel{padding:14px 12px}.tax-table th:first-child,.tax-table td:first-child{min-width:0;font-size:.86rem;padding-right:6px}.tax-table td .numfield{min-width:0}.tax-table .numfield input,.income-line .numfield input{padding:0 8px;font-size:.92rem}.tax-table td:not(:first-child){width:30%}.tax-table .money{font-size:.88rem}.grid3{grid-template-columns:repeat(3,minmax(0,1fr));column-gap:6px;row-gap:2px;font-size:.88rem}.grid3>:first-child{grid-column:1 / -1}.grid3-head>:first-child{display:none}.grid3-row,.item-row{padding-top:8px;padding-bottom:8px}.item-name>span:first-child{white-space:normal}.income-line{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) auto;gap:6px}}.final-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.final-card{padding:16px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line)}.final-card .who{color:var(--muted);font-size:.9rem}.final-card .what{font-size:1.35rem;font-weight:700;margin-top:4px}details.panel>summary{cursor:pointer;font-weight:600;min-height:32px;list-style-position:inside}details.panel[open]>summary{margin-bottom:12px}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.banner{padding:10px 14px;border-radius:10px;margin:10px 0}.banner-error{background:color-mix(in srgb,var(--danger) 14%,transparent);color:var(--text)}.banner-ok{background:color-mix(in srgb,var(--pos) 14%,transparent)}.update-notice{position:fixed;z-index:40;left:50%;transform:translate(-50%);bottom:calc(var(--tab-h) + 12px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:12px;padding:8px 8px 8px 16px;border-radius:14px;background:var(--surface);border:1px solid var(--line);box-shadow:0 6px 24px #0000002e}@media(min-width:768px){.update-notice{bottom:20px}}.sheet-backdrop{position:fixed;z-index:50;top:0;right:0;bottom:0;left:0;background:#0006;display:flex;align-items:flex-end;justify-content:center}.sheet{width:100%;max-height:92dvh;display:flex;flex-direction:column;background:var(--surface);border-radius:18px 18px 0 0;outline:none;padding-bottom:env(safe-area-inset-bottom)}.sheet-head{display:flex;align-items:center;gap:8px;padding:12px 12px 8px 18px;border-bottom:1px solid var(--line)}.sheet-head h2{flex:1;margin:0}.sheet-body{overflow-y:auto;padding:16px 18px}.sheet-foot{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding:12px 18px;border-top:1px solid var(--line)}.sheet-foot .spacer{flex:1}@media(min-width:768px){.sheet-backdrop{align-items:center}.sheet{max-width:560px;border-radius:18px}}.part-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,140px) auto auto;gap:8px;align-items:center;margin-bottom:8px}.check-row{display:flex;align-items:center;gap:10px;min-height:44px}.check-row input{width:22px;height:22px;accent-color:var(--accent)}.live{color:var(--muted);font-size:.9rem;margin-top:4px}
