.budget-sub{margin:16px 0 8px;font-size:.72rem;font-weight:800;letter-spacing:.06em;color:#8a817a;text-transform:uppercase}
.budget-items-head{display:flex;flex-wrap:wrap;gap:6px;align-items:baseline}
.budget-items-head span{font-weight:600;letter-spacing:0;text-transform:none;color:#b0a89f;font-size:.74rem}
/* category dot colors */
.cat-dot{display:inline-block;width:10px;height:10px;border-radius:50%;flex:none}
.cat-lodging{background:#8b6f4e!important}
.cat-hotel{background:#e89535!important}
.cat-food{background:#d8564a!important}
.cat-train{background:#4e86c7!important}
.cat-car{background:#5aa469!important}
.cat-fuel{background:#9b6bc7!important}
.cat-other{background:#9aa0a6!important}
.cat-list{list-style:none;padding:0;margin:0;display:grid;gap:9px}
.cat-list li{display:flex;align-items:center;gap:10px;font-size:.88rem}
.cat-name{flex:1;color:#39312b}
.cat-list strong{font-size:.9rem}
/* expense rows (clickable) */
.expense-list{display:grid;gap:0}
.expense-row{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;border:0;background:none;padding:11px 0;font:inherit;color:inherit;text-align:left;cursor:pointer;border-bottom:1px solid #f0eae5}
.expense-row:hover{background:#fff8e8}
.expense-lbl{display:grid;gap:1px;min-width:0}
.expense-lbl strong{font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.expense-lbl small{font-size:.74rem;color:#8a817a}
.expense-row>strong{white-space:nowrap}
.expense-empty{color:#a89f97;font-size:.86rem;padding:10px 0;list-style:none}
/* per-person settlement */
.pp-list{list-style:none;padding:0;margin:0;display:grid;gap:11px}
.pp-list li{display:grid;gap:2px}
.pp-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.pp-head span{font-weight:600;font-size:.9rem}
.pp-list small{font-size:.76rem;color:#8a817a}
.bal{font-size:.88rem;white-space:nowrap}
.bal.pos{color:#2f7d5b}
.bal.neg{color:#c0392b}
/* add-expense split checkboxes */
.split-boxes{display:flex;flex-wrap:wrap;gap:8px}
.split-box{display:inline-flex;align-items:center;gap:7px;border:1.5px solid #e4ddd6;border-radius:999px;padding:7px 13px;font-size:.88rem;cursor:pointer}
.split-box input{width:16px;height:16px;margin:0;accent-color:#17120f}
.split-box:has(input:checked){border-color:#17120f;background:#fff8e8}
/* expense detail dialog */
.exp-dialog{width:min(420px,calc(100% - 28px));border:0;border-radius:22px;padding:24px;box-shadow:0 30px 80px #2a160633}
.exp-dialog::backdrop{background:#2114094d}
.exp-dialog .dialog-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.exp-dialog h2{margin:0;font-size:1.25rem}
.exp-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:2px 0 10px}
.exp-cat{display:inline-flex;align-items:center;gap:7px;font-weight:600;color:#39312b;font-size:.9rem}
.exp-meta strong{font-size:1.4rem}
.exp-payer{margin:0 0 4px;font-size:.95rem;color:#39312b}
.exp-split{list-style:none;padding:12px 0 0;margin:8px 0 0;border-top:1px solid #f0eae5;display:grid;gap:9px}
.exp-split li{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:.92rem}
.exp-paid{font-style:normal;font-size:.66rem;font-weight:800;background:#17120f;color:#fff;padding:1px 7px;border-radius:999px;margin-left:5px}
.exp-dialog .dialog-actions{display:flex;justify-content:flex-end;margin-top:18px}
.exp-dialog .danger-button{border:0;border-radius:999px;padding:10px 18px;background:#fbe6e3;color:#c0392b;font:inherit;font-weight:700;cursor:pointer}
.exp-dialog .danger-button:hover{background:#f6cfc9}
/* ===== activity items ===== */
.activity-card{position:relative;display:flex;flex-direction:column}
.activity-main{display:block;width:100%;border:0;background:none;text-align:left;font:inherit;color:inherit;cursor:pointer;padding:0}
.activity-note{font-size:.82rem;color:#6a4122;margin:7px 0 0;background:#fff3cf;padding:6px 10px;border-radius:9px;display:inline-block;line-height:1.5}
.activity-cost{display:inline-block;margin-top:9px;font-weight:700;font-size:.82rem;color:#15100e;background:#ffe6a0;padding:3px 11px;border-radius:999px}
.activity.is-stay .activity-card{background:#fff3cf;box-shadow:inset 0 0 0 2px #ffd36b}
.activity.is-stay .activity-card strong{color:#5c3a1a}
.activity-dot.stay{background:#6a4122!important;box-shadow:0 0 0 1px #6a4122!important}
.activity-nav{align-self:flex-start;margin-top:10px;display:inline-flex;align-items:center;gap:5px;font-size:.78rem;font-weight:700;color:#2f6bd6;background:#eaf1fd;border-radius:999px;padding:5px 12px;text-decoration:none}
.activity-nav:hover{background:#d9e6fb}
/* ===== budget overview ===== */
.budget-empty{color:#a89f97;font-size:.86rem;margin:14px 0 0;line-height:1.6}
/* ===== dialog two-up + delete ===== */
.field-split{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.dialog-actions .danger-text{color:#c0392b;margin-right:auto;border-color:transparent;background:none}
.dialog-actions .danger-text:hover{background:#fbe6e3}
/* ===== participants ===== */
.owner-row{display:flex;align-items:center;gap:12px;padding:2px 0 14px;list-style:none}
.owner-tag{display:block;font-size:.66rem;font-weight:800;letter-spacing:.06em;color:#e85c2b;margin-bottom:1px}
.owner-row .mem-info strong{font-size:1.05rem}
.mem-avatar.big{width:46px;height:46px;font-size:1.15rem}
.people-head{list-style:none;font-size:.72rem;font-weight:800;letter-spacing:.05em;color:#8a817a;padding:12px 0 6px;border-top:1px solid #f0eae5;text-transform:uppercase}
.mem-badge.guest{background:#ece7e1;color:#6a6159}
.share-copy--mt{margin-top:18px}
#addPersonForm{margin-top:8px}
/* ===== currency ===== */
.jpy{font-size:.68em;font-weight:600;color:#a76a25;white-space:nowrap}
.cost-row{display:flex;gap:8px}
.cost-row input{flex:1;min-width:0}
.cost-row select{flex:none;width:92px}
.cost-hint{display:block;margin-top:6px;font-size:.82rem;font-weight:700;color:#2f7d5b}
/* ===== nav button (theme) ===== */
.activity-nav{color:#6a4122;background:#fff0c8;border:1px solid #f1d899}
.activity-nav:hover{background:#ffe6a0;color:#5c3a1a}
.activity-nav svg{flex:none}
/* ===== edit trip chip ===== */
.trip-detail-edit{margin-left:9px;font-size:.8rem;font-weight:700;background:#fffaf0;color:#6a4122;padding:3px 11px;border-radius:999px;white-space:nowrap}
.trip-detail:hover .trip-detail-edit{background:#fff;color:#15100e}
/* ===== Japan hero theme ===== */
.trip-hero.theme-jp{position:relative;overflow:hidden}
.trip-hero.theme-jp::before{content:"";position:absolute;left:0;right:0;bottom:0;height:60%;background:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20400%20150'%3E%3Ccircle%20cx='320'%20cy='45'%20r='28'%20fill='%23ff7a2f'/%3E%3Cpath%20d='M0%20150%20L90%2070%20L120%2095%20L150%2060%20L175%2095%20L210%2055%20L250%2090%20L290%2070%20L400%20150Z'%20fill='%23d9810f'/%3E%3Cpath%20d='M210%2055%20L188%2082%20L202%2086%20L210%2072%20L220%2088%20L232%2080Z'%20fill='%23fff4df'/%3E%3C/svg%3E") bottom center/auto 100% no-repeat;opacity:.28;z-index:0;pointer-events:none}
.trip-hero.theme-jp>*{position:relative;z-index:1}
/* ===== dialog polish ===== */
#entryDialog{width:min(480px,calc(100% - 28px))}
#tripEditDialog{width:min(440px,calc(100% - 28px));border:0;border-radius:20px;padding:0;box-shadow:0 25px 70px #0004}
#tripEditDialog::backdrop{background:#13211966}
#tripEditDialog form{padding:24px}
.field textarea{border:1px solid var(--line,#e4ddd6);border-radius:10px;padding:10px 12px;background:var(--bg,#f6f2ec);font:inherit;color:var(--ink,#15100e);resize:vertical;width:100%;line-height:1.5}
.field textarea:focus,.field input:focus,.field select:focus{outline:0;border-color:#ffc52c}
#formFields .field{margin-bottom:15px}
/* ===== dialog form polish + mobile-first ===== */
#entryDialog form,#tripEditDialog form,#nameDialog form{max-height:88vh;overflow:auto}
#entryDialog .field input,#entryDialog .field select,#entryDialog .field textarea,#tripEditDialog .field input,#tripEditDialog .field select,#nameDialog .field input{width:100%;box-sizing:border-box;min-height:46px;font-size:16px}
#entryDialog .field textarea{min-height:66px;min-width:100%;max-width:100%}
.cost-row{display:flex;gap:10px;align-items:stretch}
.cost-row input{flex:1;min-width:0}
.cost-row select{flex:none;width:120px}
.cost-hint{min-height:1.1em}
#formFields .field{margin-bottom:16px}
/* editable display name */
#userName{cursor:pointer}
#userName::after{content:" ✎";opacity:.45;font-size:.82em}
#userName:hover{color:#e85c2b}
@media(max-width:480px){.field-split{grid-template-columns:1fr}.cost-row select{width:104px}.split-boxes{gap:7px}.create-foot .primary-button{padding:12px 20px}}
/* split-among line + editable day heading */
.activity-split{display:block;margin-top:6px;font-size:.78rem;color:#6a4122;line-height:1.5}
#dayLabel{cursor:pointer}
#dayLabel::after{content:" ✎";opacity:.5;font-size:.9em}
#dayLabel:hover{color:#e85c2b}
/* fix: cost-row must override generic full-width rule */
#entryDialog .cost-row{display:flex;gap:10px;align-items:stretch}
#entryDialog .cost-row input{flex:1 1 auto;width:auto;min-width:0}
#entryDialog .cost-row select{flex:0 0 auto;width:116px}
/* fix2: force cost input to shrink (flex-basis 0) so row never overflows */
#entryDialog .cost-row{width:100%;box-sizing:border-box;flex-wrap:nowrap}
#entryDialog .cost-row input{flex:1 1 0;width:0;min-width:0}
#entryDialog .cost-row select{flex:0 0 112px;width:112px}
/* payer + split info line (below cost pill) */
.activity-payline{display:block;margin-top:7px;font-size:.8rem;color:#5c3a1a;line-height:1.55}
.activity-payline b{font-weight:700}
.pay-names{color:#8a6a3a}
.activity-cost{line-height:1.4}
