:root{font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Segoe UI,Microsoft YaHei,sans-serif;color:#163830;background:#f3f6f3;color-scheme:light;font-size:16px;--ink:#163830;--green:#126650;--dark:#123d35;--calm:#5b716a;--line:#dce6df;--soft:#e8f3ed;--danger:#aa382d}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,select,textarea{font:inherit;color:inherit}button,summary,select{cursor:pointer}button{touch-action:manipulation}button:disabled,input:disabled,select:disabled{opacity:.58;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #2a8a71;outline-offset:3px}h1,h2,h3,p,dl,dd{margin:0}h1{font-size:clamp(1.8rem,6vw,2.8rem);line-height:1.14;letter-spacing:-.035em}h2{font-size:1.22rem;letter-spacing:-.025em}h3{font-size:1rem}p{line-height:1.55}small,.muted{color:var(--calm)}strong,b{font-weight:740}input:not([type=checkbox]),textarea,select{width:100%;min-width:0;min-height:44px;padding:.55rem .75rem;border:1px solid #c8d8ce;border-radius:10px;background:#fff}select{appearance:none;padding-right:1.85rem;background-image:linear-gradient(45deg,transparent 50%,#49776a 50%),linear-gradient(135deg,#49776a 50%,transparent 50%);background-position:calc(100% - 15px) 52%,calc(100% - 10px) 52%;background-size:5px 5px;background-repeat:no-repeat}textarea{min-height:72px;resize:vertical}input[type=checkbox]{width:19px;height:19px;accent-color:var(--green)}.app{min-height:100dvh}.topbar{min-height:70px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:env(safe-area-inset-top) max(16px,calc((100% - 1000px)/2)) 0;background:#fff;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:10px;white-space:nowrap}.brand strong,.brand small{display:block}.brand strong{font-size:1.07rem;letter-spacing:-.045em}.brand small{font-size:.72rem;margin-top:2px}.brand-mark{width:40px;height:40px;border-radius:12px;background:var(--dark);color:#e9faeb;display:grid;place-items:center;font-size:1.33rem}.main{width:min(100% - 32px,1000px);margin:0 auto;padding:22px 0 calc(105px + env(safe-area-inset-bottom))}.centered{display:grid;place-items:center;min-height:70dvh;padding-bottom:26px}.login{width:min(460px,100%)}.stack{display:flex;flex-direction:column;gap:14px;min-width:0}.action-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.between,.panel-title,.sheet-head,.trip-row,.selection-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.ghost,.secondary,.primary,.white,.sync-badge{min-height:44px;padding:.55rem .82rem;font-weight:680;border-radius:10px;border:1px solid transparent;line-height:1.22}.ghost{background:transparent;color:#236653}.ghost:hover{background:#edf6ef}.secondary{background:#edf6ef;color:#235747;border-color:#dce9df}.secondary:hover{background:#e0f0e5}.primary{background:var(--green);color:#fff}.primary:hover{background:#0d5846}.white{background:#e3f6e8;color:#13543f}.align{justify-self:start;align-self:flex-start}.danger,.negative{color:var(--danger)}.sync-badge{font-size:.78rem;min-height:34px;background:#e6f3eb;color:#1b6751;padding:.4rem .57rem;white-space:nowrap}.sync-badge.offline,.sync-badge.syncing{background:#fff0d6;color:#745312}.sync-badge.failed{background:#fae6e2;color:#8b3429}.language,.signout{font-size:.78rem;padding:.38rem}.trip-row{align-items:end}.trip-select{display:flex;align-items:center;gap:10px;min-width:0;max-width:72%}.trip-select span{white-space:nowrap;color:var(--calm);font-size:.85rem}.trip-select select{font-weight:670;min-width:0;width:auto;max-width:100%}.hero{border-radius:22px;background:linear-gradient(123deg,#143b34,#16634e 84%);color:#fff;padding:clamp(19px,4vw,35px);display:flex;flex-direction:column;gap:13px;box-shadow:0 11px 28px #17432e1c}.hero-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.hero-title h1{margin-top:.28rem;overflow-wrap:anywhere}.hero-title span,.hero-meta,.hero-bottom span{color:#cce7da}.hero-meta{font-size:.84rem;line-height:1.5}.hero-meta span{padding-inline:.12rem}.hero-bottom{display:flex;justify-content:space-between;align-items:flex-end;gap:10px;margin-top:6px;padding-top:15px;border-top:1px solid #ffffff35}.hero-bottom button,.pill{flex-shrink:0}.hero-totals{display:flex;gap:.25rem 1rem;flex-wrap:wrap;margin-top:.3rem}.hero-totals strong{font-size:clamp(1.33rem,4.4vw,1.85rem);font-variant-numeric:tabular-nums}.hero .pill{background:#ffffff23;color:#f2fcf3}.pill{font-size:.78rem;font-weight:730;background:var(--soft);color:#21654f;display:inline-block;border-radius:999px;padding:.32rem .68rem}.chips{display:flex;flex-wrap:wrap;gap:7px}.panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:clamp(14px,3vw,22px);box-shadow:0 5px 20px #1a452605}.panel-title{min-height:34px}.panel-title+.currency-grid,.panel-title+.entry-list,.panel-title+p{margin-top:.55rem}.currency-grid,.family-settlement{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:10px}.currency-card,.family-card{background:#f5f9f6;border:1px solid #e0eae3;padding:13px;border-radius:13px;min-width:0}.currency-card h3,.family-card h3{margin-bottom:8px}.metrics,.metric-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;align-items:center;font-size:.88rem}.metrics>strong{font-size:.77rem;color:var(--calm)}.metric-row{grid-column:1/-1;border-top:1px solid var(--line);padding-top:6px}.metrics>strong:not(:first-child),.metric-row>*:not(:first-child){text-align:right}.date-divider{font-size:.78rem;color:var(--calm);font-weight:700;padding:10px 0 4px}.entry-row{border:0;border-bottom:1px solid #eef2ef;background:#fff;width:100%;display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:10px;text-align:left;align-items:center;min-height:62px;padding:9px 2px;border-radius:4px}.entry-row:hover{background:#f5faf6}.entry-icon{display:grid;place-items:center;background:#e0f2e7;color:#1d6d51;width:35px;height:35px;border-radius:10px;font-size:1.12rem}.entry-icon.refund{background:#f8ecdb;color:#835a20}.entry-icon.transfer{background:#e6edf5;color:#355a75}.entry-icon.deposit{background:#eee8f4;color:#695187}.entry-text,.entry-number{display:flex;flex-direction:column;gap:4px;min-width:0}.entry-text small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.entry-number{text-align:right;font-variant-numeric:tabular-nums}.entry-number strong{font-size:.94rem}.entry-number small,.entry-text small{font-size:.74rem}.bottom-nav{position:fixed;bottom:0;left:0;right:0;z-index:5;border-top:1px solid var(--line);background:#fffffff4;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);display:grid;grid-template-columns:repeat(2,1fr) 70px repeat(2,1fr);padding:7px max(12px,calc((100% - 720px)/2)) calc(6px + env(safe-area-inset-bottom))}.bottom-nav button{border:0;background:none;min-height:48px;color:#4d6e63;font-weight:650;font-size:.77rem;display:grid;place-items:center;align-content:center;gap:3px}.bottom-nav button span{font-size:1.3rem;line-height:1}.bottom-nav button.selected{color:#09634b}.bottom-nav .nav-add{min-height:50px;width:50px;justify-self:center;border-radius:16px;background:var(--green);color:#fff;font-size:1.53rem;box-shadow:0 4px 12px #0d584635}.overlay{position:fixed;inset:0;z-index:10;background:#0d282485;display:grid;align-items:end;justify-items:center;overscroll-behavior:contain}.sheet{background:#fff;border-radius:20px 20px 0 0;max-height:calc(100dvh - max(20px,env(safe-area-inset-top)));overflow:auto;overscroll-behavior:contain;width:min(100%,640px);padding:16px 16px calc(20px + env(safe-area-inset-bottom));box-shadow:0 -15px 50px #162e2726}.sheet-head{min-height:46px;border-bottom:1px solid var(--line);padding-bottom:7px;margin-bottom:10px}.sheet-head h2{overflow-wrap:anywhere}.grid,.row-grid,.amount-entry{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}.amount-entry{grid-template-columns:2fr 1fr;align-items:end}.amount-entry input{font-size:1.6rem;font-weight:730}.row-grid:has(button){grid-template-columns:2fr 1fr auto;align-items:end}.row-grid:has(>label:only-child){grid-template-columns:1fr}.field{display:flex;flex-direction:column;gap:5px;min-width:0}.field span{font-size:.87rem;font-weight:640;color:var(--calm)}.span{grid-column:1/-1}.inline-form{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap}.inline-form .field{flex:1 1 130px}.empty{min-height:70px;display:grid;place-items:center;color:var(--calm);padding:13px}.notice,.error{border-radius:10px;padding:10px 12px;background:#fff2d8;color:#76551b}.error{background:#fae9e5;color:#863326}details{border:1px solid var(--line);border-radius:10px;padding:9px 12px;background:#fff;min-width:0}summary{min-height:28px;font-weight:690;color:#255f50;overflow-wrap:anywhere}.inset{margin-top:10px}.participant,.member-line,.file-row{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.participant label{display:flex;align-items:center;gap:8px}.participant input:not([type=checkbox]){width:105px}.member-line{min-height:45px;border-top:1px solid var(--line);flex-wrap:wrap}.mini-summary{display:flex;flex-direction:column;gap:3px;background:#eef7f0;border-radius:11px;padding:10px 12px;font-size:.87rem}.file-button{position:relative;display:inline-flex;align-items:center;overflow:hidden;cursor:pointer}.file-button:focus-within{outline:2px solid var(--green)}.file-button input{position:absolute;inset:0;opacity:0;cursor:pointer}.file-row .ghost:first-child{overflow-wrap:anywhere;text-align:left;min-width:0}.receipt-tools{border-top:1px solid var(--line);padding-top:12px}.receipt-tools select{width:auto}.save-button{position:sticky;bottom:0;min-height:49px}.detail-amount{display:flex;align-items:center;justify-content:space-between;background:var(--soft);border-radius:11px;padding:14px}.detail-amount strong{font-size:1.45rem}.detail-grid,.family-card dl{display:grid;gap:8px}dl div{display:flex;justify-content:space-between;gap:8px;min-width:0}dt{color:var(--calm);flex-shrink:0}dd{text-align:right;overflow-wrap:anywhere}pre{padding:8px;background:#f1f6f3;font-size:.78rem;border-radius:7px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:310px;overflow:auto}.media-overlay{z-index:15}.media{background:#0c201a;color:#fff;width:100%;height:100%;padding:calc(12px + env(safe-area-inset-top)) 15px calc(9px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:10px;min-height:0}.media-head{display:flex;justify-content:space-between;gap:7px;flex-wrap:wrap}.media-head button{background:#244638;color:#fff;min-height:44px;border:0;border-radius:9px;padding:7px 11px}.media-body{flex:1;min-height:0;overflow:auto;touch-action:pan-x pan-y pinch-zoom}.media img{width:100%;max-height:100%;object-fit:contain;object-position:center top}.media img.zoomed{width:190%;max-width:none;max-height:none}.toast{z-index:25;position:fixed;bottom:calc(77px + env(safe-area-inset-bottom));left:50%;transform:translate(-50%);background:#193e33;color:#fff;padding:10px 14px;border-radius:10px;width:max-content;max-width:92%;box-shadow:0 4px 20px #0002}.qr{width:154px;height:auto}@media(min-width:700px){.overlay:not(.media-overlay){align-items:center}.sheet{border-radius:20px;padding:20px 22px;max-height:91dvh}}@media(max-width:420px){.topbar{padding-inline:12px}.topbar .action-row{gap:2px}.brand-mark{display:none}.trip-select{gap:6px}.trip-select span{display:none}.hero-bottom .white{min-height:44px}.member-line .action-row{gap:2px}.row-grid:has(button){grid-template-columns:1fr 1fr}.panel-title .secondary{font-size:.82rem}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important}}
