*{box-sizing:border-box;margin:0;padding:0}html{font-size:16px}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;background-color:#f5f5f5;color:#333;line-height:1.6;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.container{width:100%;padding:16px;margin:0 auto}@media (min-width: 768px){.container{max-width:800px;padding:20px}}@media (min-width: 1024px){.container{max-width:1200px}}h1{margin-bottom:16px;color:#2c3e50;font-size:1.5rem}@media (min-width: 768px){h1{font-size:2rem;margin-bottom:20px}}h2{font-size:1.25rem}.card{background:#fff;border-radius:12px;padding:16px;margin-bottom:16px;box-shadow:0 2px 8px #00000014}@media (min-width: 768px){.card{padding:20px;border-radius:8px}}.btn{display:inline-flex;align-items:center;justify-content:center;padding:12px 24px;min-height:44px;background-color:#3498db;color:#fff;border:none;border-radius:8px;cursor:pointer;font-size:16px;font-weight:500;text-decoration:none;transition:background-color .2s,transform .1s;-webkit-tap-highlight-color:transparent}.btn:hover{background-color:#2980b9}.btn:active{transform:scale(.98)}.btn:disabled{background-color:#bdc3c7;cursor:not-allowed}.btn-secondary{background-color:#95a5a6}.btn-secondary:hover{background-color:#7f8c8d}.btn-small{padding:8px 16px;min-height:36px;font-size:14px}input,select{width:100%;padding:12px;min-height:44px;margin-bottom:16px;border:1px solid #ddd;border-radius:8px;font-size:16px;-webkit-appearance:none;-moz-appearance:none;appearance:none}input:focus,select:focus{outline:none;border-color:#3498db;box-shadow:0 0 0 3px #3498db1a}.form-group{margin-bottom:16px}label{display:block;margin-bottom:8px;font-weight:500;font-size:14px;color:#555}.error{color:#e74c3c;margin-bottom:16px;padding:12px;background:#fdf2f2;border-radius:8px}.header{display:flex;flex-direction:column;gap:12px;margin-bottom:20px}@media (min-width: 768px){.header{flex-direction:row;justify-content:space-between;align-items:center;margin-bottom:24px}}.header-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.trip-list{list-style:none}.trip-item{display:flex;flex-direction:column;gap:12px}@media (min-width: 480px){.trip-item{flex-direction:row;justify-content:space-between;align-items:center}}.trip-item h3{margin:0;font-size:1.1rem}.empty-state{text-align:center;padding:32px 16px;color:#7f8c8d}.grid-layout{display:flex;flex-direction:column;gap:16px}@media (min-width: 768px){.grid-layout{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}}@media (min-width: 1024px){.grid-layout{grid-template-columns:repeat(3,1fr)}}.participant-chip{display:inline-flex;align-items:center;padding:10px 16px;min-height:44px;border-radius:22px;cursor:pointer;font-size:14px;font-weight:500;transition:all .2s;-webkit-tap-highlight-color:transparent}.participant-chip.selected{background:#3498db;color:#fff}.participant-chip.unselected{background:#ecf0f1;color:#333}.balance-item{padding:12px 0;border-bottom:1px solid #eee;display:flex;flex-direction:column;gap:4px}@media (min-width: 480px){.balance-item{flex-direction:row;justify-content:space-between;align-items:center}}.expense-item{padding:16px 0;border-bottom:1px solid #eee}.expense-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.expense-details{margin-top:8px;display:flex;flex-wrap:wrap;gap:8px}.expense-share{font-size:13px;color:#95a5a6;background:#f5f5f5;padding:4px 8px;border-radius:4px}.member-item{padding:12px 0;border-bottom:1px solid #eee}.add-member-form{display:flex;flex-direction:column;gap:8px}@media (min-width: 480px){.add-member-form{flex-direction:row}.add-member-form input{flex:1;margin-bottom:0}}.page-title{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.page-title h1{margin-bottom:0}.user-info{font-size:14px;color:#7f8c8d}.amount{font-weight:600;font-size:1.1rem}.amount.positive{color:#27ae60}.amount.negative{color:#e74c3c}.amount.neutral{color:#7f8c8d}.badge{display:inline-block;padding:4px 10px;font-size:12px;font-weight:500;border-radius:12px;background:#3498db;color:#fff}.badge.owner{background:#9b59b6}.app-container{display:flex;flex-direction:column;min-height:100vh;max-height:100vh}.app-header{display:flex;align-items:center;gap:12px;padding:12px 16px;background:#fff;border-bottom:1px solid #eee;position:sticky;top:0;z-index:100}.back-btn{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border:none;background:#f0f0f0;border-radius:50%;font-size:20px;cursor:pointer;-webkit-tap-highlight-color:transparent}.back-btn:active{background:#e0e0e0}.app-title{font-size:1.25rem;font-weight:600;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.app-content{flex:1;overflow-y:auto;padding:16px 16px 100px}.tab-content{animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.tab-content h2{margin-bottom:16px}.tab-bar{display:flex;position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid #eee;padding:8px 0;padding-bottom:max(8px,env(safe-area-inset-bottom));z-index:100}.tab-item{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:8px 4px;background:none;border:none;cursor:pointer;color:#95a5a6;transition:color .2s;-webkit-tap-highlight-color:transparent}.tab-item.active{color:#3498db}.tab-icon{font-size:20px;line-height:1}.tab-label{font-size:11px;font-weight:500}.participant-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.participant-chip{border:none}.btn-block{width:100%}.settlement-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}.settlement-people{display:flex;align-items:center;gap:6px}.settlement-from{color:#e74c3c;font-weight:500}.settlement-arrow{color:#7f8c8d}.settlement-to{color:#27ae60;font-weight:500}.member-info{display:flex;align-items:center;gap:8px}.member-email,.expense-payer{font-size:14px;color:#7f8c8d;margin-top:2px}.add-member-form{margin-top:16px;padding-top:16px;border-top:1px solid #eee}.settlement-card{padding:16px;margin-bottom:12px;background:#f8f9fa;border-radius:12px;border-left:4px solid #3498db}.settlement-content{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.settlement-amount{font-weight:600;font-size:1.1rem;color:#2c3e50}.btn-settle{width:100%;background:#27ae60}.btn-settle:hover{background:#219a52}.btn-settle:disabled{background:#95a5a6}.payment-item{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid #eee}.payment-info{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.payment-from{font-weight:500}.payment-arrow{color:#7f8c8d;font-size:14px}.payment-to{font-weight:500;color:#27ae60}.payment-amount{font-weight:600;color:#27ae60}.settled-state{padding:48px 16px}.settled-icon{display:block;font-size:48px;margin-bottom:16px;color:#27ae60}.settlement-note{font-size:14px;color:#7f8c8d;font-style:italic;text-align:center;padding:8px}.edit-title-form{display:flex;align-items:center;gap:8px;flex:1}.edit-title-input{flex:1;margin-bottom:0;font-size:1rem;padding:8px 12px;min-height:36px}.edit-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;font-size:18px;cursor:pointer;color:#7f8c8d;-webkit-tap-highlight-color:transparent}.edit-btn:hover{color:#3498db}.expense-date{font-size:12px;color:#95a5a6;margin-top:2px}.expense-right{display:flex;align-items:center;gap:8px}.btn-delete-small{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:#f5f5f5;border-radius:50%;font-size:14px;font-weight:600;cursor:pointer;color:#95a5a6;transition:all .2s;-webkit-tap-highlight-color:transparent}.btn-delete-small:hover{background:#fee;color:#e74c3c}.btn-delete-small:disabled{opacity:.5;cursor:not-allowed}.btn-danger{background:#e74c3c}.btn-danger:hover{background:#c0392b}.delete-trip-section{margin-top:24px;padding-top:24px;border-top:1px solid #eee}.balance-item-tappable{cursor:pointer;transition:background-color .2s;margin:0 -16px;padding:12px 16px;border-radius:8px}.balance-item-tappable:hover{background-color:#f5f5f5}.balance-item-tappable:active{background-color:#eee}.ledger-header-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.ledger-header-balance{font-size:.9rem;font-weight:500}.ledger-header-balance.positive{color:#27ae60}.ledger-header-balance.negative{color:#e74c3c}.ledger-header-balance.neutral{color:#7f8c8d}.ledger-content{padding-bottom:32px}.ledger-section{margin-bottom:20px}.ledger-section-title{font-size:.85rem;font-weight:600;color:#7f8c8d;letter-spacing:.5px;margin:0 0 12px}.ledger-item{display:flex;justify-content:space-between;align-items:flex-start;padding:10px 0;border-bottom:1px solid #f0f0f0}.ledger-item:last-child{border-bottom:none}.ledger-item-info{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.ledger-item-desc{font-weight:500;color:#333;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ledger-item-date,.ledger-item-meta{font-size:.8rem;color:#95a5a6}.ledger-item-amount{font-weight:600;font-size:.95rem;margin-left:12px;flex-shrink:0}.ledger-item-amount.positive{color:#27ae60}.ledger-item-amount.negative{color:#e74c3c}.ledger-summary{background:#f8f9fa;border-radius:12px;padding:16px;margin-top:8px}.ledger-summary .ledger-section-title{margin-bottom:16px}.ledger-summary-row{display:flex;justify-content:space-between;align-items:center;padding:6px 0;font-size:.95rem}.ledger-summary-row span:first-child{color:#666}.ledger-summary-total{margin-top:8px;padding-top:12px;border-top:1px solid #ddd;font-weight:600}.ledger-summary-total span:first-child{color:#333}.badge.status-open{background:#27ae60}.badge.status-closed{background:#f39c12}.badge.status-archived{background:#95a5a6}.status-controls{display:flex;flex-direction:column;gap:16px}.status-current{display:flex;align-items:center;gap:8px;font-size:.95rem}.status-actions{display:flex;flex-direction:column;gap:8px}.status-hint{font-size:.85rem;color:#7f8c8d;margin:0;line-height:1.4}.status-notice{text-align:center;padding:24px 16px;color:#666}.status-notice p{margin:0 0 12px}.status-notice .btn{margin-top:8px}.filter-row{margin-bottom:16px}.checkbox-label{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:.95rem;color:#555}.checkbox-label input[type=checkbox]{width:auto;min-height:auto;margin:0;padding:0;cursor:pointer}.trip-title-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.trip-title-row h3{margin:0}.trip-archived{opacity:.6}
