
:root{
  --cream:#F8F2E8;--paper:#FFFDF8;--sage:#DDE8D8;--sage-deep:#526B58;--pink:#F2DDD8;
  --oat:#EEE5D5;--ink:#3F4B42;--muted:#7B807B;--line:#DDD6CA;--danger:#A85E5E;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang TC","Noto Sans TC","Helvetica Neue",Arial,sans-serif;
}
.missing-place-badge{display:inline-flex;border-radius:999px;background:#f4e6e0;color:#7a514a;padding:3px 8px;font-size:11px;margin:0 0 5px}
*{box-sizing:border-box}html{background:var(--cream);color:var(--ink)}body{margin:0;background:var(--cream);min-height:100%;padding-bottom:calc(84px + env(safe-area-inset-bottom))}
button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}
#app{max-width:760px;margin:0 auto;padding:calc(18px + env(safe-area-inset-top)) 14px 24px}
.topbar{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:4px 4px 16px}
.eyebrow{display:inline-block;background:var(--pink);border-radius:999px;padding:6px 10px;font-size:12px}.topbar h1{font-size:30px;line-height:1.1;margin:8px 0 4px;letter-spacing:-.02em}.topbar h1 span{color:#BD7D7A}.topbar p{margin:0;color:var(--muted);font-size:14px}.header-art{font-size:30px;white-space:nowrap}
.page{display:none}.page.active{display:block}.panel{background:rgba(255,253,248,.92);border:1px solid var(--line);border-radius:28px;padding:16px;box-shadow:0 8px 24px rgba(79,65,45,.06)}
.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.section-head h2{margin:4px 0;font-size:21px}.section-icon{font-size:28px}.tiny{font-size:12px;color:var(--muted);margin:0}.muted{color:var(--muted)}.small{font-size:13px}.hint{font-size:12px;color:var(--muted);line-height:1.55;margin:12px 4px 0}
.day-tabs{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:0 0 10px}.day-tabs::-webkit-scrollbar{display:none}
.day-tab{border:1px solid var(--line);background:var(--paper);border-radius:999px;min-width:62px;padding:10px 13px}.day-tab.active{background:var(--sage-deep);border-color:var(--sage-deep);color:white}
.btn{border:0;border-radius:15px;min-height:44px;padding:9px 14px}.btn.soft{background:var(--sage)}.btn.primary{background:var(--sage-deep);color:white}.btn.danger{background:#F4DFDF;color:#873F3F}.text-btn{border:0;background:transparent;color:var(--muted);padding:8px}.icon-btn{border:1px solid var(--line);background:white;border-radius:50%;width:44px;height:44px;font-size:20px}
.trip-list{margin-top:14px}.trip-card{background:var(--paper);border:1px solid var(--line);border-radius:20px;padding:12px;margin:0;box-shadow:0 4px 12px rgba(60,50,40,.035);transition:transform .15s,opacity .15s,border-color .15s;user-select:none;-webkit-user-select:none}
.trip-card.dragging{opacity:.72;transform:scale(1.015);border-color:#8FA28D;box-shadow:0 12px 26px rgba(70,70,55,.14);z-index:20}.trip-card.drop-target{border-color:#8FA28D}.trip-main{display:grid;grid-template-columns:58px 1fr auto;gap:11px;align-items:start}.time-badge{background:var(--sage);border-radius:15px;text-align:center;font-weight:700;padding:12px 5px;font-size:13px}.trip-title{font-weight:700;margin:2px 0 5px}.trip-note{font-size:13px;color:var(--muted);line-height:1.45;margin:0}.trip-tools{display:flex;gap:5px}.drag-grip,.edit-mini{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;border:1px solid var(--line);background:white}.drag-grip{font-size:18px}.status{display:inline-flex;border-radius:999px;padding:3px 8px;font-size:11px;margin-left:5px;background:var(--oat)}.status.good{background:var(--sage)}.status.maybe{background:var(--pink)}.route-segment{display:grid;grid-template-columns:26px 1fr auto;gap:7px;align-items:center;padding:8px 8px 8px 16px;color:var(--muted);font-size:12px}.route-segment a{background:var(--oat);border-radius:999px;padding:7px 10px;color:var(--ink)}.drag-placeholder{height:6px;border-radius:999px;background:#91A58C;margin:5px 14px}
.backup-box{margin-top:16px;background:#FCF8F0;border:1px solid var(--line);border-radius:20px;padding:12px}.backup-box summary{font-weight:700;cursor:pointer}.card-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.food-card,.collection-card,.route-card,.person-row,.expense-row{background:white;border:1px solid var(--line);border-radius:18px;padding:12px}.food-card h3,.collection-card h3{font-size:15px;margin:0 0 5px}.meta{font-size:12px;color:var(--muted);line-height:1.45}.chip-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.chip{font-size:11px;background:var(--sage);border-radius:999px;padding:5px 8px}.food-actions,.collection-actions{display:flex;gap:7px;margin-top:10px;flex-wrap:wrap}.mini-btn{border:1px solid var(--line);background:var(--paper);border-radius:11px;min-height:38px;padding:7px 10px;font-size:12px}.mini-btn.em{background:var(--sage);border-color:transparent}
.inline-actions{margin-top:12px}.route-card{margin-top:10px}.route-title{display:flex;justify-content:space-between;gap:10px}.route-arrow{color:var(--muted);font-size:12px;margin:7px 0}.route-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.split-layout{display:grid;gap:14px}.mini-form{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end}.mini-form label{font-size:13px}.mini-form input{width:100%}.people-list{display:grid;gap:7px;margin:10px 0 15px}.person-row{display:flex;justify-content:space-between;align-items:center}.expense-form{display:grid;gap:10px;border-top:1px dashed var(--line);padding-top:14px}.expense-form label,.tool-card label,.import-form label,dialog label{display:grid;gap:6px;font-size:13px}.expense-form input,.expense-form select,.tool-card input,.tool-card select,.import-form input,.import-form select,.collection-controls input,.collection-controls select,dialog input,dialog select,dialog textarea{width:100%;border:1px solid var(--line);border-radius:14px;background:white;padding:11px 12px;min-height:44px;font-size:16px}.expense-form fieldset{border:0;padding:0;margin:0}.expense-form legend{font-size:13px;margin-bottom:7px}.checks{display:grid;grid-template-columns:1fr 1fr;gap:6px}.check-row{background:white;border:1px solid var(--line);border-radius:13px;padding:9px}.settlement{background:var(--oat);border-radius:18px;padding:14px;min-height:70px}.settlement-row{display:flex;justify-content:space-between;gap:8px;padding:4px 0;font-size:13px}.section-row{display:flex;justify-content:space-between;align-items:center;margin-top:14px}.expense-row{margin-top:8px;display:flex;justify-content:space-between;gap:10px}.tool-grid{display:grid;gap:12px}.tool-card{background:#FCF8F0;border:1px solid var(--line);border-radius:20px;padding:14px}.tool-card h3{margin:0 0 10px}.phrase{background:white;border:1px solid var(--line);border-radius:15px;padding:10px;margin-top:7px}.phrase strong{display:block;margin-top:3px}.rate-row{display:grid;grid-template-columns:auto 90px auto;gap:7px;align-items:center;margin:10px 0}.convert-result{background:var(--sage);border-radius:16px;padding:13px;text-align:center;font-size:18px;font-weight:700;margin:10px 0}.pack-row{display:flex;align-items:center;gap:8px;background:white;border:1px solid var(--line);border-radius:13px;padding:9px;margin:6px 0}.pack-row.done span{text-decoration:line-through;color:var(--muted)}.pack-row button{margin-left:auto;border:0;background:transparent}
.collections-box{margin-top:16px;border-top:1px solid var(--line);padding-top:16px}.import-form{display:grid;gap:10px;background:var(--oat);padding:12px;border-radius:18px;margin:12px 0}.hidden{display:none!important}.collection-controls{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin:12px 0}.collection-list{display:grid;gap:8px}.collection-card{padding:13px}.collection-top{display:flex;justify-content:space-between;gap:10px}.collection-top h3{margin:0}.priority-pill{font-size:11px;border-radius:999px;padding:5px 8px;background:var(--oat);height:max-content}.priority-pill.must{background:var(--sage)}.priority-pill.custom{background:var(--pink)}
.bottom-nav{position:fixed;left:50%;bottom:calc(10px + env(safe-area-inset-bottom));transform:translateX(-50%);width:min(730px,calc(100% - 20px));display:grid;grid-template-columns:repeat(5,1fr);gap:4px;padding:6px;background:rgba(255,253,248,.95);backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:22px;box-shadow:0 10px 30px rgba(55,45,35,.12);z-index:50}.nav-btn{border:0;background:transparent;border-radius:16px;min-height:52px;font-size:11px;color:var(--muted)}.nav-btn span{display:block;font-size:18px;margin-bottom:2px}.nav-btn.active{background:var(--sage);color:var(--ink);font-weight:700}
dialog{border:1px solid var(--line);border-radius:24px;background:var(--cream);color:var(--ink);width:min(92vw,460px);padding:0}dialog::backdrop{background:rgba(40,35,30,.25)}dialog form{padding:18px;display:grid;gap:10px}.dialog-head{display:flex;justify-content:space-between;align-items:center}.dialog-head h3{margin:0}.dialog-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:4px}
@media(min-width:660px){.split-layout{grid-template-columns:.9fr 1.1fr}.tool-grid{grid-template-columns:1fr 1fr}.collection-list{grid-template-columns:1fr 1fr}}
@media(max-width:500px){.card-grid{grid-template-columns:1fr}.collection-controls{grid-template-columns:1fr 1fr}.collection-controls input{grid-column:1/-1}.trip-main{grid-template-columns:52px 1fr auto}.drag-grip{width:38px;height:38px}.topbar h1{font-size:27px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}


/* V1.1 — centered, cleaner layout */
.topbar{
  text-align:center;
  justify-content:center;
  position:relative;
}
.topbar > div:first-child{width:100%}
.header-art{
  position:absolute;
  right:6px;
  top:8px;
  font-size:22px;
}
.section-head{
  align-items:center;
  text-align:center;
  justify-content:center;
  position:relative;
}
.section-head > div:first-child{flex:1}
.section-head > .btn,
.section-head > .section-icon{
  position:absolute;
  right:0;
  top:0;
}
.panel,
.food-card,
.collection-card,
.route-card,
.person-row,
.expense-row,
.tool-card,
.settlement,
.backup-box{
  text-align:center;
}
.trip-card{text-align:center}
.trip-main{
  grid-template-columns:58px 1fr auto;
  align-items:center;
}
.trip-note{text-align:center}
.route-segment{text-align:center}
.collection-top{
  align-items:center;
}
.collection-top > div:first-child{flex:1;text-align:center}
.collection-top .priority-pill{margin-left:auto}
.food-actions,.collection-actions,.route-actions,.chip-row,.inline-actions{
  justify-content:center;
}
.tool-grid{
  gap:9px;
}
.tool-card{
  padding:11px 12px;
  border-radius:17px;
}
.tool-card h3{
  font-size:16px;
  margin-bottom:7px;
}
.tool-card .small{
  margin:4px 0 8px;
}
.collections-box{
  margin-top:12px;
  padding-top:12px;
}
.expense-form label,.tool-card label,.import-form label,dialog label{
  text-align:center;
}
input,select,textarea{
  text-align:center;
}
textarea{resize:vertical}

@media(max-width:500px){
  .header-art{display:none}
  .section-head > .section-icon{display:none}
  .section-head > .btn{
    position:static;
    margin-left:8px;
  }
  .trip-main{grid-template-columns:52px 1fr auto}
}


/* V1.2 — mobile date centering, compact split editing, interactive weather */
.day-tabs{
  scroll-snap-type:x proximity;
  scroll-padding-inline:50%;
}
.day-tabs::before,
.day-tabs::after{
  content:"";
  flex:0 0 calc(50% - 35px);
}
.day-tab{
  scroll-snap-align:center;
  flex:0 0 auto;
}
@media(min-width:720px){
  .day-tabs::before,.day-tabs::after{display:none}
  .day-tabs{justify-content:center}
}

/* traveler row */
.person-row{
  gap:10px;
  min-height:58px;
  padding:10px 12px;
}
.person-name-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex:1;
}
.person-name-input{
  width:min(220px,100%);
  border:1px solid transparent;
  background:transparent;
  border-radius:12px;
  padding:8px 10px;
  text-align:center;
  font-size:17px;
}
.person-name-input:focus{
  border-color:var(--line);
  background:white;
  outline:none;
}
.person-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:center;
}

/* weather */
.weather-buttons{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  justify-content:center;
}
.weather-chip{
  border:1px solid var(--line);
  background:var(--sage);
  min-height:38px;
  padding:7px 11px;
  border-radius:999px;
}
.weather-chip.active{
  background:var(--sage-deep);
  color:white;
  border-color:var(--sage-deep);
}
.weather-results{
  display:grid;
  gap:8px;
  margin-top:10px;
}
.weather-result{
  border:1px solid var(--line);
  background:white;
  border-radius:15px;
  padding:10px;
  text-align:center;
}
.weather-result h4{
  margin:0 0 4px;
  font-size:14px;
}
.weather-result .meta{
  margin-bottom:7px;
}
.weather-result-actions{
  display:flex;
  gap:7px;
  justify-content:center;
  flex-wrap:wrap;
}

/* compact expense rows */
.expense-row{
  align-items:center;
}
.expense-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}


/* V1.3 — editable trip/date management */
.trip-title-edit{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.trip-title-edit h1{margin-left:44px}
.title-edit-btn{
  width:38px;
  height:38px;
  border:1px solid var(--line);
  border-radius:50%;
  background:var(--paper);
  color:var(--muted);
  display:grid;
  place-items:center;
}
.date-manager{
  display:flex;
  justify-content:center;
  gap:7px;
  flex-wrap:wrap;
  margin:-2px 0 10px;
}
.date-manager-btn{
  min-height:38px;
  border:1px solid var(--line);
  border-radius:999px;
  padding:7px 12px;
  background:var(--paper);
  color:var(--ink);
  font-size:13px;
}
.date-manager-btn.add{background:var(--sage)}
.date-manager-btn.edit{background:var(--oat)}
.date-manager-btn.remove{background:#F7E7E4;color:#8A5552}
@media(max-width:500px){
  .trip-title-edit h1{margin-left:0}
  .title-edit-btn{width:34px;height:34px}
  .date-manager{gap:6px}
  .date-manager-btn{font-size:12px;padding:6px 10px}
}


/* V1.4 — compact packing checklist */
#packingList{
  display:grid;
  gap:7px;
}
.pack-row{
  min-height:48px;
  padding:7px 10px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  text-align:left;
}
.pack-row input[type="checkbox"]{
  appearance:auto;
  -webkit-appearance:checkbox;
  width:20px !important;
  min-width:20px !important;
  max-width:20px !important;
  height:20px !important;
  min-height:20px !important;
  padding:0 !important;
  margin:0 !important;
  flex:0 0 20px;
  border-radius:4px;
}
.pack-row span{
  flex:1 1 auto;
  min-width:0;
  white-space:nowrap;
  writing-mode:horizontal-tb !important;
  text-orientation:mixed !important;
  text-align:left;
  font-size:15px;
  line-height:1.35;
}
.pack-row button{
  flex:0 0 34px;
  width:34px;
  height:34px;
  min-height:34px;
  display:grid;
  place-items:center;
  padding:0;
  font-size:17px;
}
#packingForm{
  margin-top:8px;
  grid-template-columns:minmax(0,1fr) auto;
}
#packingForm input{
  min-height:42px;
  height:42px;
}
#packingForm .btn{
  min-height:42px;
  padding-inline:15px;
}

/* On desktop, packing spans the full row so the two-column grid doesn't leave a blank card beside it */
@media(min-width:660px){
  .tool-card:has(#packingList){
    grid-column:1/-1;
  }
}


/* V1.5 — Collections gets its own bottom tab */
.collections-box.standalone{
  margin-top:0;
  padding-top:0;
  border-top:0;
}
.collections-box.standalone .section-head{
  margin-bottom:10px;
}


/* V1.6 — compact split-bill typography on mobile */
.page[data-page="split"] .panel{
  padding:14px;
}
.page[data-page="split"] .section-head h2{
  font-size:19px;
}
.page[data-page="split"] .section-head .muted{
  font-size:12px;
}
.page[data-page="split"] .person-row{
  min-height:52px;
  padding:8px 10px;
}
.page[data-page="split"] .person-name-input{
  font-size:15px;
  padding:6px 8px;
}
.page[data-page="split"] .mini-btn{
  min-height:34px;
  padding:6px 9px;
  font-size:12px;
}
.page[data-page="split"] .expense-form{
  gap:8px;
}
.page[data-page="split"] .expense-form label,
.page[data-page="split"] .expense-form legend{
  font-size:13px;
}
.page[data-page="split"] .expense-form input,
.page[data-page="split"] .expense-form select{
  min-height:42px;
  padding:9px 10px;
  font-size:15px;
}
.page[data-page="split"] .check-row{
  padding:8px;
  font-size:13px;
}
.page[data-page="split"] .checks{
  gap:6px;
}
.page[data-page="split"] .checks input[type="checkbox"]{
  width:18px !important;
  min-width:18px !important;
  max-width:18px !important;
  height:18px !important;
  min-height:18px !important;
  padding:0 !important;
  margin:0 6px 0 0 !important;
  vertical-align:middle;
}
.page[data-page="split"] .btn.primary{
  min-height:44px;
  font-size:15px;
}
.page[data-page="split"] .settlement{
  padding:12px;
  min-height:58px;
}
.page[data-page="split"] .settlement strong{
  font-size:16px;
}
.page[data-page="split"] .settlement-row{
  font-size:12px;
}
.page[data-page="split"] .section-row{
  margin-top:12px;
}
.page[data-page="split"] .section-row .tiny,
.page[data-page="split"] .text-btn{
  font-size:12px;
}
.page[data-page="split"] .expense-row{
  padding:10px;
}
.page[data-page="split"] .expense-row strong{
  font-size:14px;
}
.page[data-page="split"] .expense-row .meta{
  font-size:11px;
}
@media(max-width:500px){
  .page[data-page="split"] .split-layout{
    gap:10px;
  }
  .page[data-page="split"] .people-list{
    margin:8px 0 12px;
  }
  .page[data-page="split"] .person-row{
    border-radius:15px;
  }
  .page[data-page="split"] .expense-form input,
  .page[data-page="split"] .expense-form select{
    font-size:14px;
  }
  .page[data-page="split"] .check-row{
    font-size:12px;
  }
  .page[data-page="split"] .btn.primary{
    font-size:14px;
  }
}


/* V1.7 — reference FX + user's actual rate */
.rate-card .rate-source-box{
  display:grid;
  gap:6px;
  background:white;
  border:1px solid var(--line);
  border-radius:16px;
  padding:11px 12px;
  margin:8px 0 10px;
}
.rate-source-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:13px;
}
.rate-source-row strong{
  font-size:14px;
}
.actual-rate-box{
  margin-top:10px;
  background:var(--oat);
  border-radius:16px;
  padding:11px 12px;
}
.actual-rate-toggle{
  display:flex !important;
  grid-template-columns:none !important;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:650;
}
.actual-rate-toggle input[type="checkbox"]{
  appearance:auto;
  -webkit-appearance:checkbox;
  width:18px !important;
  min-width:18px !important;
  max-width:18px !important;
  height:18px !important;
  min-height:18px !important;
  padding:0 !important;
  margin:0 !important;
}
#actualRateFields{
  margin-top:9px;
}
#actualRateFields .rate-row{
  margin:7px 0 5px;
}
.rate-divider{
  border-top:1px dashed var(--line);
  margin:12px 0 10px;
}
#activeRateNote{
  margin-top:7px;
  text-align:center;
}


/* V1.8 — single live FX + update banner */
.live-rate-main{
  display:grid;
  gap:4px;
  place-items:center;
  background:white;
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  margin:8px 0 10px;
}
.live-rate-main strong{
  font-size:22px;
  letter-spacing:-.02em;
}
.rate-card .convert-result{
  margin:9px 0;
}
.update-banner{
  position:sticky;
  top:calc(8px + env(safe-area-inset-top));
  z-index:90;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:min(100%,520px);
  margin:0 auto 10px;
  padding:9px 12px;
  background:var(--sage-deep);
  color:white;
  border-radius:999px;
  box-shadow:0 6px 20px rgba(60,70,60,.18);
  font-size:13px;
}
.update-banner button{
  border:0;
  background:white;
  color:var(--sage-deep);
  border-radius:999px;
  min-height:34px;
  padding:6px 11px;
  font-weight:700;
}
.update-banner button:disabled{
  opacity:.58;
  cursor:wait;
}


/* V1.9 — simpler saved filter + cleaner FX text */
.collections-box .collection-filters{
  grid-template-columns:1.3fr 1fr .9fr;
}
@media(max-width:760px){
  .collections-box .collection-filters{
    grid-template-columns:1fr;
  }
}
#rateStatus{
  min-height:18px;
}


/* V2.0 — translation reliability + faster update notice */
.translate-warning{
  margin-top:8px;
  padding:9px 11px;
  border-radius:13px;
  background:#F8E9E2;
  color:#835E55;
  font-size:12px;
  line-height:1.45;
}

/* V2.2 — Google Maps mother list + final settlement */
.mother-list-box{background:var(--oat);border-radius:20px;padding:13px;margin:12px 0;text-align:center}
.mother-list-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.mother-list-head>div{display:grid;gap:3px;text-align:left}
.mother-list-url{margin:10px 0;padding:9px 10px;background:white;border:1px solid var(--line);border-radius:13px;font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mother-list-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.final-settlement{margin-top:9px;display:grid;gap:7px}
.final-settlement-title{font-size:12px;color:var(--muted)}
.transfer-row{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;background:var(--sage);border-radius:15px;padding:10px 12px;font-size:14px}
.transfer-row strong{font-size:15px}
@media(max-width:500px){.mother-list-head{align-items:flex-start}.transfer-row{font-size:13px}}


/* V2.1 — hand off translation to Google Translate */
.google-translate-card{
  grid-column:1/-1;
}
.google-translate-launch{
  display:grid;
  grid-template-columns:46px minmax(0,1fr) 34px;
  align-items:center;
  gap:10px;
  margin-top:9px;
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:white;
  text-align:left;
}
.google-translate-icon{
  width:46px;
  height:46px;
  border-radius:13px;
  display:grid;
  place-items:center;
  background:#EDF3FF;
  color:#3B70D9;
  font-size:22px;
  font-weight:800;
}
.google-translate-launch strong{
  display:block;
  font-size:15px;
}
.google-translate-launch small{
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:12px;
}
.launch-arrow{
  font-size:20px;
  color:var(--muted);
  text-align:center;
}


/* V2.2 — explicit settlement calculation */
.settlement-refresh{
  width:100%;
  margin-top:9px;
  background:var(--sage-deep);
  color:white;
  min-height:42px;
  font-size:14px;
}
.final-settlement{
  margin-top:9px;
  display:grid;
  gap:7px;
}
.final-settlement-title{
  font-size:12px;
  color:var(--muted);
  margin-bottom:2px;
}
.settlement-transfer{
  display:grid;
  grid-template-columns:1fr auto 1fr auto;
  gap:8px;
  align-items:center;
  padding:10px 12px;
  border-radius:15px;
  background:var(--sage);
  font-size:13px;
}
.settlement-transfer .from{
  text-align:right;
  font-weight:650;
}
.settlement-transfer .arrow{
  color:var(--muted);
}
.settlement-transfer .to{
  text-align:left;
  font-weight:650;
}
.settlement-transfer .amount{
  font-weight:800;
  white-space:nowrap;
}
.settlement-none{
  padding:10px 12px;
  border-radius:15px;
  background:var(--oat);
  font-size:13px;
  font-weight:700;
}
@media(max-width:500px){
  .settlement-transfer{
    grid-template-columns:1fr auto 1fr;
  }
  .settlement-transfer .amount{
    grid-column:1/-1;
    text-align:center;
    margin-top:2px;
  }
}


/* V2.3 — compact flight/hotel summary */
.travel-summary-panel{margin-bottom:10px}
.compact-head{margin-bottom:9px}
.travel-summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.travel-summary-card{
  display:grid;gap:2px;text-align:center;background:var(--oat);
  border-radius:16px;padding:10px 8px;font-size:12px
}
.travel-summary-card strong{font-size:15px}
.travel-summary-label{font-size:11px;color:var(--muted);font-weight:700}
.hotel-summary-list{display:grid;gap:6px;margin-top:8px}
.hotel-summary-row{
  display:grid;grid-template-columns:76px 1fr auto;gap:8px;align-items:center;
  border:1px solid var(--line);border-radius:14px;background:white;
  padding:9px 10px;font-size:12px;color:var(--ink)
}
.hotel-summary-row .hotel-date{font-weight:800}
.hotel-summary-row b{font-size:11px;color:var(--sage-deep)}
@media(max-width:520px){
  .travel-summary-grid{grid-template-columns:1fr}
}

/* V2.3 — smoother itinerary drag */
.trip-card.dragging-fixed{
  position:fixed!important;
  margin:0!important;
  z-index:9999!important;
  pointer-events:none!important;
  will-change:transform;
  transition:none!important;
  opacity:.95!important;
  transform:translate3d(0,var(--drag-y,0),0) scale(1.018)!important;
  box-shadow:0 18px 38px rgba(70,70,55,.18)!important;
}
.drag-placeholder.smooth{
  box-sizing:border-box;
  border:2px dashed #91A58C;
  background:rgba(145,165,140,.10);
  margin:0 0 0 0;
  border-radius:20px;
}
body.is-dragging-trip{
  overscroll-behavior:none;
}
body.is-dragging-trip .route-segment{
  opacity:.45;
}


/* V2.4 — collections scope + expense overview */
.collection-scope-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
  margin:8px 0 10px;
  padding:4px;
  border-radius:15px;
  background:var(--oat);
}
.scope-tab{
  border:0;
  border-radius:12px;
  padding:9px 8px;
  background:transparent;
  color:var(--ink);
  font:inherit;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}
.scope-tab.active{
  background:white;
  box-shadow:0 1px 7px rgba(60,65,55,.08);
  color:var(--sage-deep);
}
.collection-import-note{
  grid-column:1/-1;
  padding:10px 12px;
  border-radius:14px;
  background:var(--oat);
  color:var(--muted);
  font-size:12px;
  text-align:center;
}
.expense-overview{
  margin-bottom:10px;
  display:grid;
  gap:8px;
}
.expense-total-card,
.personal-expense-card{
  border-radius:16px;
  padding:11px 13px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.expense-total-card{
  background:var(--sage-deep);
  color:white;
}
.expense-total-card span,
.personal-expense-card span{
  font-size:12px;
  font-weight:700;
}
.expense-total-card strong,
.personal-expense-card strong{
  font-size:16px;
  white-space:nowrap;
}
.personal-expense-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.personal-expense-card{
  background:var(--oat);
  flex-direction:column;
  justify-content:center;
  text-align:center;
}
@media(max-width:520px){
  .personal-expense-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .expense-total-card{padding:10px 12px}
  .expense-total-card strong,.personal-expense-card strong{font-size:14px}
}


/* V2.5 — editable day heading + desktop drag */
.day-intro-edit{
  position:absolute;
  right:18px;
  top:18px;
}
@media(max-width:620px){
  .day-intro-edit{
    position:static;
    margin:8px auto 0;
  }
}
.trip-card{
  cursor:grab;
  -webkit-touch-callout:none;
}
.trip-card:active{
  cursor:grabbing;
}
.drag-grip{
  cursor:grab;
  user-select:none;
}
body.is-dragging-trip{
  cursor:grabbing!important;
  user-select:none;
}

/* V2.6 — meal slots */
.meal-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:5px auto 2px;
  padding:4px 9px;
  border-radius:999px;
  background:var(--oat);
  color:var(--sage-deep);
  font-size:11px;
  font-weight:800;
}


/* V2.7 — direct-click restaurant replacement */
.restaurant-picker-dialog{
  width:min(92vw,680px);
  max-height:82vh;
  border:0;
  padding:0;
  border-radius:24px;
  background:transparent;
}
.restaurant-picker-dialog::backdrop{
  background:rgba(35,39,34,.46);
}
.restaurant-picker-card{
  width:100%;
  max-height:82vh;
  overflow:auto;
  padding:18px;
}
.restaurant-picker-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:12px;
}
.restaurant-picker-list{
  display:grid;
  gap:8px;
}
.restaurant-choice{
  width:100%;
  border:1px solid var(--line);
  border-radius:16px;
  background:white;
  color:var(--ink);
  padding:12px 13px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
  text-align:left;
  font:inherit;
  cursor:pointer;
}
.restaurant-choice:hover{
  border-color:var(--sage-deep);
}
.restaurant-choice-main{
  min-width:0;
  display:grid;
  gap:3px;
}
.restaurant-choice-main strong{
  font-size:14px;
}
.restaurant-choice-main .meta{
  font-size:11px;
}
.restaurant-choice-cta{
  white-space:nowrap;
  font-size:12px;
  font-weight:800;
  color:var(--sage-deep);
  background:var(--sage);
  padding:7px 10px;
  border-radius:999px;
}
@media(max-width:520px){
  .restaurant-picker-dialog{
    width:94vw;
    max-height:86vh;
  }
  .restaurant-picker-card{
    max-height:86vh;
    padding:14px;
  }
  .restaurant-choice{
    grid-template-columns:1fr;
  }
  .restaurant-choice-cta{
    justify-self:start;
  }
}


/* V2.9 — directly editable day heading */
.day-section-head{
  align-items:flex-start;
}
.day-heading-editor{
  flex:1;
  min-width:0;
  border:0;
  background:transparent;
  color:inherit;
  padding:4px 8px 6px;
  margin:0;
  text-align:center;
  font:inherit;
  cursor:pointer;
  border-radius:18px;
}
.day-heading-editor:focus-visible{
  outline:2px solid var(--sage-deep);
  outline-offset:3px;
}
.day-heading-title-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.day-heading-title-row h2{
  margin:0;
}
.day-heading-pencil{
  opacity:.58;
  font-size:16px;
}
.day-heading-help{
  display:block;
  margin-top:5px;
  font-size:10px;
  color:var(--muted);
  opacity:.72;
}
@media (hover:hover) and (pointer:fine){
  .day-heading-editor:hover{
    background:rgba(130,145,125,.07);
  }
  .day-heading-editor:hover .day-heading-pencil{
    opacity:1;
  }
}
@media(max-width:520px){
  .day-section-head{
    gap:8px;
  }
  .day-heading-editor{
    padding-left:0;
    padding-right:0;
  }
  .day-heading-help{
    font-size:9px;
  }
}


/* V2.10 — desktop itinerary drag fix */
.trip-card,
.trip-card *{
  -webkit-user-drag:none;
}
.drag-grip{
  touch-action:none;
}
@media (hover:hover) and (pointer:fine){
  .drag-grip{
    cursor:grab;
  }
  .drag-grip:active{
    cursor:grabbing;
  }
  .trip-card{
    user-select:none;
  }
}


/* V2.12 — choose itinerary day when adding from collections */
.choose-day-dialog{
  width:min(92vw,620px);
  border:0;
  padding:0;
  border-radius:24px;
  background:transparent;
}
.choose-day-dialog::backdrop{
  background:rgba(35,39,34,.46);
}
.choose-day-card{
  width:100%;
  padding:18px;
}
.choose-day-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:12px;
}
.choose-day-list{
  display:grid;
  gap:8px;
}
.choose-day-option{
  width:100%;
  border:1px solid var(--line);
  border-radius:16px;
  background:white;
  color:var(--ink);
  padding:12px 13px;
  display:grid;
  gap:4px;
  text-align:left;
  font:inherit;
  cursor:pointer;
}
.choose-day-option strong{
  font-size:14px;
}
.choose-day-date{
  font-size:11px;
  color:var(--sage-deep);
  font-weight:800;
}
@media (hover:hover) and (pointer:fine){
  .choose-day-option:hover{
    border-color:var(--sage-deep);
    background:rgba(130,145,125,.05);
  }
}


/* V2.13 — dated split bill summaries */
.daily-expense-section{
  margin:12px 0 10px;
}
.daily-expense-summary{
  display:grid;
  gap:9px;
}
.daily-expense-card{
  border:1px solid var(--line);
  border-radius:18px;
  background:white;
  padding:12px;
}
.daily-expense-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}
.daily-expense-head>div{
  display:grid;
  gap:2px;
}
.daily-expense-date{
  font-size:11px;
  color:var(--sage-deep);
  font-weight:800;
}
.daily-expense-head b{
  white-space:nowrap;
  font-size:14px;
}
.daily-person-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  margin-top:9px;
}
.daily-person-spend{
  background:var(--oat);
  border-radius:13px;
  padding:8px 9px;
  display:grid;
  gap:2px;
  text-align:center;
}
.daily-person-spend span{
  font-size:11px;
}
.daily-person-spend strong{
  font-size:13px;
}
.daily-settlement{
  margin-top:8px;
  border-top:1px dashed var(--line);
  padding-top:8px;
  display:grid;
  gap:5px;
}
.daily-settlement>div,
.trip-final-transfer>div{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
}
.trip-final-expense-wrap{
  margin-top:14px;
}
.trip-final-expense-summary{
  border-radius:18px;
  overflow:hidden;
  border:1px solid var(--line);
}
.trip-final-total{
  background:var(--sage-deep);
  color:white;
  padding:11px 13px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
}
.trip-final-total strong{
  white-space:nowrap;
  font-size:16px;
}
.trip-final-people{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1px;
  background:var(--line);
}
.trip-final-people>div{
  background:var(--oat);
  padding:10px 12px;
  display:grid;
  gap:2px;
  text-align:center;
}
.trip-final-people span{
  font-size:11px;
}
.trip-final-people strong{
  font-size:14px;
}
.trip-final-transfer{
  background:white;
  padding:10px 12px;
  display:grid;
  gap:5px;
}
@media(max-width:520px){
  .daily-expense-head{
    align-items:center;
  }
  .daily-person-grid,
  .trip-final-people{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .daily-settlement>div,
  .trip-final-transfer>div{
    align-items:center;
  }
}


/* V2.14 — live weather + Google Maps custom backups */
.weather-card-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.live-weather-box{
  margin:10px 0;
  padding:11px 12px;
  border-radius:15px;
  background:var(--oat);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.live-weather-box>div{
  display:grid;
  gap:2px;
}
.live-weather-box strong{
  font-size:16px;
}
.weather-custom-box{
  margin:10px 0;
  border:1px solid var(--line);
  border-radius:15px;
  overflow:hidden;
}
.weather-custom-box summary{
  cursor:pointer;
  padding:10px 12px;
  font-size:12px;
  font-weight:800;
}
.weather-map-form{
  display:grid;
  gap:8px;
  padding:0 12px 12px;
}
.weather-map-form input,
.weather-map-form select{
  width:100%;
}
@media(max-width:520px){
  .weather-card-head{
    align-items:center;
  }
  .live-weather-box{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* V2.15 — VND + TWD dual currency in split bill */
.money-vnd,
.money-twd{
  display:block;
}
.money-twd{
  margin-top:2px;
  font-size:.78em;
  font-weight:700;
  opacity:.72;
}
.settlement-row strong,
.transfer-row strong,
.settlement-transfer .amount,
.daily-expense-head b,
.daily-person-spend strong,
.trip-final-total strong,
.trip-final-people strong,
.trip-final-transfer strong,
.personal-expense-card strong{
  line-height:1.2;
}
.expense-total-card strong{
  text-align:right;
}


/* V2.19 Sync */
.bella-sync-btn{
  position:fixed;right:16px;bottom:86px;z-index:9000;
  border:1px solid rgba(95,116,91,.22);background:#f2f5ec;
  color:#445044;border-radius:999px;padding:9px 13px;
  font:600 13px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  box-shadow:0 8px 24px rgba(80,70,55,.12);
}
.bella-sync-btn[data-tone="ok"]{background:#edf4e8}
.bella-sync-btn[data-tone="busy"]{background:#f6f0df}
.bella-sync-btn[data-tone="error"]{background:#f9e8e6;color:#8d4f4a}
.bella-sync-modal{
  display:none;position:fixed;inset:0;z-index:9999;
  background:rgba(49,45,39,.28);padding:18px;align-items:center;justify-content:center;
}
.bella-sync-modal.show{display:flex}
.bella-sync-card{
  width:min(430px,100%);background:#fffaf2;border:1px solid #e5dccc;
  border-radius:26px;padding:24px;box-shadow:0 24px 70px rgba(61,52,41,.18);
  position:relative;text-align:center;
}
.bella-sync-close{
  position:absolute;right:14px;top:12px;border:0;background:transparent;
  font-size:26px;color:#877f73;padding:4px 8px;
}
.bella-sync-kicker{font-size:11px;letter-spacing:.12em;color:#9b9488;margin-bottom:5px}
.bella-sync-card h2{font-size:22px;margin:0 0 6px;color:#3f483e}
.bella-sync-status{font-size:13px;color:#7e857b;margin:0 0 18px}
.bella-sync-box{
  border:1px solid #e5dccc;background:#fffdf8;border-radius:16px;padding:13px 14px;margin:10px 0;
}
.bella-sync-label{display:block;font-size:12px;color:#8a8378;margin-bottom:5px}
.bella-sync-code{font-size:22px;font-weight:700;letter-spacing:.12em;color:#4d584b}
.bella-sync-primary,.bella-sync-secondary,.bella-sync-join button{
  border:0;border-radius:14px;padding:12px 14px;font-weight:700;cursor:pointer;
}
.bella-sync-primary{width:100%;background:#dfead8;color:#40503f;margin-top:10px}
.bella-sync-secondary{width:100%;background:#f4e5e2;color:#825e59;margin-top:8px}
.bella-sync-note{font-size:12px;line-height:1.55;color:#8c857b;margin:12px 4px}
.bella-sync-divider{display:flex;align-items:center;gap:10px;color:#aaa298;margin:16px 0}
.bella-sync-divider:before,.bella-sync-divider:after{content:"";height:1px;background:#e8dfd2;flex:1}
.bella-sync-join{display:flex;gap:8px}
.bella-sync-join input{
  min-width:0;flex:1;border:1px solid #ddd3c4;background:#fff;border-radius:13px;
  padding:11px 12px;font-size:15px;text-transform:uppercase;
}
.bella-sync-join button{background:#e8e0d2;color:#4d5049}
@media (max-width:600px){
  .bella-sync-btn{right:12px;bottom:78px;padding:9px 12px}
  .bella-sync-card{padding:22px 18px}
}


/* V2.20 compact expenses + Google Maps saved-place picker */
.day-heading-static{
  flex:1;
  min-width:0;
}
.day-heading-static .day-heading-title-row{
  display:flex;
  align-items:center;
  gap:8px;
}
.expense-record-simple{
  display:grid;
  grid-template-columns:auto auto 1fr;
  align-items:center;
  gap:8px 10px;
  min-width:0;
}
.expense-record-simple>strong{
  font-size:13px;
  white-space:nowrap;
}
.expense-record-simple>span{
  font-size:13px;
  color:var(--muted);
  white-space:nowrap;
}
.expense-record-simple>b{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  min-width:0;
}
.expense-record-simple .money-vnd{
  font-size:13px;
}
.expense-record-simple .money-twd{
  font-size:11px;
  opacity:.72;
}
.weather-saved-picker-box{
  padding:12px;
}
.weather-saved-open{
  width:100%;
}
.weather-saved-picker-box p{
  margin:8px 2px 0;
}
.weather-saved-dialog{
  width:min(560px,calc(100vw - 24px));
  max-height:min(78vh,720px);
  border:0;
  border-radius:24px;
  padding:0;
  background:#fffaf2;
  box-shadow:0 24px 80px rgba(55,48,40,.24);
}
.weather-saved-dialog::backdrop{
  background:rgba(45,40,34,.30);
}
.weather-saved-dialog .picker-dialog-inner{
  padding:20px;
}
.weather-saved-search{
  width:100%;
  margin:12px 0 8px;
  border:1px solid #ded5c8;
  background:#fff;
  border-radius:14px;
  padding:11px 13px;
  font:inherit;
}
.weather-saved-meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
  font-size:12px;
  color:var(--muted);
}
.weather-saved-meta a{
  color:inherit;
  text-decoration:underline;
}
.weather-saved-list{
  display:grid;
  gap:8px;
  max-height:52vh;
  overflow:auto;
  padding-right:2px;
}
.weather-saved-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:11px 12px;
  border:1px solid #e5ddd0;
  background:#fffdf8;
  border-radius:15px;
}
.weather-saved-copy{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.weather-saved-copy strong{
  font-size:13px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.weather-saved-copy span{
  margin-top:3px;
  font-size:11px;
  color:var(--muted);
}
.weather-saved-actions{
  display:flex;
  gap:6px;
  flex-shrink:0;
}
@media (max-width:600px){
  .expense-record-simple{
    grid-template-columns:auto 1fr;
  }
  .expense-record-simple>b{
    grid-column:1 / -1;
    align-items:flex-start;
  }
  .weather-saved-meta{
    align-items:flex-start;
    flex-direction:column;
  }
  .weather-saved-item{
    align-items:flex-start;
    flex-direction:column;
  }
  .weather-saved-actions{
    width:100%;
  }
  .weather-saved-actions>*{
    flex:1;
    text-align:center;
  }
}


/* V2.22 saved feedback + trip place picker */
.bella-saved-toast{
  position:fixed;
  left:50%;
  bottom:92px;
  transform:translate(-50%,12px);
  z-index:10050;
  opacity:0;
  pointer-events:none;
  background:rgba(62,72,60,.94);
  color:#fff;
  border-radius:999px;
  padding:9px 14px;
  font-size:13px;
  font-weight:700;
  box-shadow:0 8px 28px rgba(55,48,40,.18);
  transition:.18s ease;
  white-space:nowrap;
}
.bella-saved-toast.show{
  opacity:1;
  transform:translate(-50%,0);
}
.trip-place-picker-btn{
  display:block;
  width:100%;
  margin-top:8px;
  border:1px solid #ded5c8;
  background:#f3f0e6;
  color:#4f594d;
  border-radius:12px;
  padding:10px 12px;
  font:600 13px/1.2 inherit;
}
.trip-place-picker-dialog{
  width:min(560px,calc(100vw - 24px));
  max-height:min(80vh,720px);
  border:0;
  border-radius:24px;
  padding:0;
  background:#fffaf2;
  box-shadow:0 24px 80px rgba(55,48,40,.24);
}
.trip-place-picker-dialog::backdrop{background:rgba(45,40,34,.30)}
.trip-place-picker-dialog .picker-dialog-inner{padding:20px}
.trip-place-picker-search{
  width:100%;
  margin:12px 0 8px;
  border:1px solid #ded5c8;
  background:#fff;
  border-radius:14px;
  padding:11px 13px;
  font:inherit;
}
.trip-place-picker-meta{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
  color:var(--muted);
  font-size:12px;
}
.trip-place-picker-meta a{color:inherit;text-decoration:underline}
.trip-place-picker-list{
  display:grid;
  gap:8px;
  max-height:52vh;
  overflow:auto;
}
.trip-place-picker-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:11px 12px;
  border:1px solid #e5ddd0;
  background:#fffdf8;
  border-radius:15px;
}
.trip-place-picker-copy{
  display:flex;
  min-width:0;
  flex-direction:column;
}
.trip-place-picker-copy strong{
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.trip-place-picker-copy span{
  margin-top:3px;
  font-size:11px;
  color:var(--muted);
}
.trip-place-picker-actions{display:flex;gap:6px;flex-shrink:0}
@media(max-width:600px){
  .trip-place-picker-meta{flex-direction:column;align-items:flex-start}
  .trip-place-picker-item{align-items:flex-start;flex-direction:column}
  .trip-place-picker-actions{width:100%}
  .trip-place-picker-actions>*{flex:1;text-align:center}
}
.tag-filter-bar{display:grid;gap:7px;margin:9px 0 12px;text-align:left}.tag-filter-scroll{display:flex;gap:6px;overflow-x:auto;overscroll-behavior-x:contain;padding:2px 1px 5px}.tag-filter{flex:0 0 auto;border:1px solid var(--line);border-radius:999px;background:#fffdf8;padding:7px 10px;color:var(--ink);font-size:12px}.tag-filter.active{background:var(--sage);border-color:var(--sage);font-weight:700}.tag-filter small{color:var(--muted)}.all-tags summary{font-size:12px;color:var(--muted);cursor:pointer;text-align:left}.all-tag-options{flex-wrap:wrap;overflow:visible;margin-top:7px}.place-tags{display:flex;flex-wrap:wrap;gap:5px;margin:7px 0;justify-content:flex-start}.place-tag{font-size:11px;line-height:1.4;border-radius:999px;background:#e4ecdf;color:#485a4d;padding:3px 8px}.place-tag.more{background:var(--oat)}.new-place-badge{display:inline-flex;border-radius:999px;background:#fae8c9;color:#795a1d;padding:3px 8px;font-size:11px;margin:0 0 5px}.missing-coordinates{font-size:11px;color:var(--muted);margin:5px 0}.mother-list-url-editor{display:grid;gap:6px;margin:10px 0;text-align:left;font-size:12px;color:var(--muted)}.mother-list-url-editor input{width:100%;min-width:0;border:1px solid var(--line);border-radius:12px;padding:10px;font-size:14px;background:white}.add-master-place-btn{margin:8px 0}.food-pocket-search{display:block;width:100%;min-height:42px;border:1px solid var(--line);border-radius:13px;padding:9px 12px;font-size:16px;margin:10px 0}.master-place-dialog form{max-height:min(88vh,780px);overflow:auto}.master-place-dialog textarea{resize:vertical}

/* V2.59.0 compact page controls and place actions */
.day-tabs-row{display:flex;align-items:center;gap:6px;min-width:0}
.day-tabs-row .day-tabs{flex:1;min-width:0}
.date-manager-menu{position:relative;flex:none;margin:-10px 0 10px}
.date-manager-menu>summary{list-style:none;display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--line);border-radius:50%;background:var(--paper);font-size:22px;line-height:1;cursor:pointer}
.date-manager-menu>summary::-webkit-details-marker{display:none}
.date-manager-menu[open] .date-manager{position:absolute;right:0;top:44px;z-index:60;display:grid;justify-items:stretch;min-width:170px;margin:0;padding:10px;border:1px solid var(--line);border-radius:16px;background:var(--paper);box-shadow:0 10px 28px rgba(55,45,35,.15)}
.date-manager-menu .date-drag-hint{font-size:11px;color:var(--muted);white-space:nowrap}
.day-section-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px;text-align:left;justify-content:initial}
.day-section-head>.btn{position:static;align-self:start;min-height:38px;margin:0;padding:7px 10px;white-space:nowrap}
.day-heading-editor{text-align:left;min-width:0}
.day-heading-title-row{justify-content:flex-start;min-width:0}
.day-heading-title-row h2{text-wrap:balance;overflow-wrap:anywhere}
.quick-filter-row{display:flex;gap:6px;overflow-x:auto;padding:3px 1px 7px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.quick-filter-row::-webkit-scrollbar{display:none}
.quick-filter{flex:0 0 auto;min-height:34px;border:1px solid var(--line);border-radius:999px;padding:6px 11px;background:var(--paper);font-size:12px;white-space:nowrap}
.quick-filter.active{background:var(--sage-deep);border-color:var(--sage-deep);color:#fff}
.place-visited{display:flex!important;align-items:center;justify-content:flex-start;gap:7px;width:max-content;margin:8px 0 0;color:var(--muted);font-size:12px!important;text-align:left!important}
.place-visited input{width:17px!important;height:17px;min-height:0!important;margin:0;accent-color:var(--sage-deep)}
.is-visited{opacity:.58}
.place-action-row{display:flex;justify-content:flex-start;gap:7px;margin-top:8px}
.place-action-row .mini-btn{min-width:0!important;min-height:34px;padding:6px 10px}
.collection-card,.food-card{text-align:left}
.collection-top>div:first-child,.food-card h3,.food-card .meta,.food-card p,.food-card .chip-row,.food-card .food-actions{ text-align:left;justify-content:flex-start }
.collection-card h3,.food-card h3{overflow-wrap:anywhere}
.collection-card p.meta,.food-card p.meta{font-size:11px;line-height:1.35;margin:5px 0}
.food-sort-card>h3{padding-inline:34px}
.food-primary-actions{display:flex;flex-wrap:nowrap;justify-content:flex-start!important;gap:5px!important;margin-top:8px}
.food-primary-actions .mini-btn{flex:1 1 0;min-width:0!important;min-height:34px;padding:5px 3px;font-size:11px;white-space:nowrap}
.nearby-place-actions{margin-top:5px}
.collection-actions{justify-content:flex-start}
.collection-actions .mini-btn{min-width:0!important;min-height:34px;padding:6px 9px}
.expense-fab{position:fixed;right:max(20px,calc((100vw - 760px)/2 + 20px));bottom:calc(92px + env(safe-area-inset-bottom));z-index:45;width:54px;height:54px;border:0;border-radius:50%;background:var(--sage-deep);color:#fff;font-size:30px;line-height:1;box-shadow:0 8px 22px rgba(55,68,54,.25)}
.expense-quick-dialog{width:min(100%,600px);max-width:600px;max-height:88dvh;overflow:auto}
.expense-quick-form{border:0;padding:18px}
.expense-quick-form .dialog-head{margin-bottom:3px}
.expense-quick-form label{text-align:left!important}
.expense-quick-main{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.expense-quick-form .expense-more-options{border-top:1px solid var(--line);padding-top:8px}
.expense-more-options>summary{padding:8px 0;color:var(--muted);font-size:13px;cursor:pointer}
.expense-more-options[open]{display:grid;gap:10px}
.expense-quick-form fieldset{border:0;padding:0;margin:0}
.expense-quick-form .btn{width:100%}
.expense-quick-form input[type=checkbox]{width:18px;min-height:18px}
.expense-quick-dialog::backdrop{background:rgba(40,35,30,.35)}
@media(max-width:600px){
  .day-tabs-row{gap:4px}
  .day-tabs-row .day-tabs{padding-bottom:7px}
  .day-tab{min-width:52px;padding:8px 9px;font-size:13px}
  .date-manager-menu{margin:-8px 0 7px}
  .date-manager-menu>summary{width:34px;height:34px}
  .date-manager-menu .date-manager{gap:7px}
  .date-manager-menu .date-manager-btn{min-height:36px}
  .date-manager-menu .date-drag-hint{font-size:10px}
  .day-section-head{gap:5px}
  .day-heading-editor{padding:0 2px 4px}
  .day-heading-editor .tiny{font-size:10px}
  .day-heading-editor .muted{font-size:12px;line-height:1.35;margin:4px 0}
  .day-heading-help{display:none}
  .day-section-head>.btn{font-size:12px;min-height:34px;padding:6px 8px}
  .expense-fab{right:18px;bottom:calc(88px + env(safe-area-inset-bottom));width:50px;height:50px}
  dialog.expense-quick-dialog{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:none;max-height:min(88dvh,760px);border-radius:24px 24px 0 0;border-bottom:0}
  .expense-quick-form{padding:16px 16px calc(18px + env(safe-area-inset-bottom))}
  #collectionQuickFilters,.food-pocket-layer .quick-filter-row{margin-inline:-2px}
}


/* V2.23 Integrated — Maps links, ranked food picker, clean mobile split */
.trip-title-map,
.food-name-map,
.restaurant-name-map{
  color:inherit;
  text-decoration:none;
  border-bottom:1px dashed rgba(75,90,72,.35);
}
.trip-title-map:active,
.food-name-map:active,
.restaurant-name-map:active{opacity:.66}

.restaurant-choice{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:10px 12px;
  width:100%;
  text-align:left;
  padding:14px;
  border:1px solid #ded6c9;
  border-radius:18px;
  background:#fff;
}
.restaurant-rank{
  align-self:start;
  padding:6px 9px;
  border-radius:999px;
  background:#e3ecdd;
  color:#50604e;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
.restaurant-choice-main{
  display:flex;
  flex-direction:column;
  min-width:0;
  gap:3px;
}
.restaurant-choice-actions{
  grid-column:1 / -1;
  display:flex;
  gap:8px;
}
.restaurant-choice-actions>*{
  flex:1;
  text-align:center;
}
.restaurant-choice-cta{
  border:0;
  border-radius:12px;
  background:#dce8d6;
  color:#465744;
  padding:10px 12px;
  font-weight:800;
}

.split-panel{overflow:hidden}
.split-overview-clean{margin-bottom:12px}
.split-final-clean{
  margin:10px 0 18px;
  padding:14px;
  border:1px solid #ddd5c8;
  border-radius:18px;
  background:#fffdf8;
}
.split-final-clean .transfer-row.compact{
  display:grid;
  grid-template-columns:auto auto auto 1fr;
  align-items:center;
  gap:7px;
}
.split-final-clean .transfer-row.compact strong{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
}
.expense-day-section{
  margin-top:10px;
}
.expense-day-tabs{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:4px 0 12px;
  scrollbar-width:none;
}
.expense-day-tabs::-webkit-scrollbar{display:none}
.expense-day-tab{
  flex:0 0 auto;
  border:1px solid #ded6c9;
  background:#fffdf8;
  color:#666b64;
  border-radius:999px;
  padding:8px 12px;
  font-weight:700;
}
.expense-day-tab.active{
  background:#dfe9d9;
  border-color:#d2dfcb;
  color:#41503f;
}
.expense-list-clean{
  display:grid;
  gap:8px;
}
.expense-row-clean{
  position:relative;
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  align-items:center;
  padding:12px 12px;
  border:1px solid #e0d8cc;
  border-radius:16px;
  background:#fffdf9;
}
.expense-record-line{
  display:grid;
  grid-template-columns:auto auto minmax(0,1fr) auto;
  align-items:center;
  gap:6px 8px;
  min-width:0;
}
.expense-record-date,
.expense-record-payer{
  font-size:12px;
  white-space:nowrap;
  color:#73776f;
}
.expense-record-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#404940;
}
.expense-record-money{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  white-space:nowrap;
}
.expense-record-money .money-vnd{font-size:13px}
.expense-record-money .money-twd{font-size:10px;opacity:.65}
.expense-more-btn{
  width:36px;height:36px;
  border:1px solid #e0d8cc;
  border-radius:12px;
  background:#fff;
  color:#666b64;
  font-size:20px;
  line-height:1;
}
.expense-more-menu{
  position:absolute;
  right:10px;
  top:50px;
  z-index:30;
  display:flex;
  gap:6px;
  padding:6px;
  border:1px solid #ddd4c6;
  border-radius:12px;
  background:#fff;
  box-shadow:0 10px 30px rgba(55,48,40,.13);
}
.expense-more-menu[hidden]{display:none}
.split-editor-card{
  margin-top:14px;
  border:1px solid #e0d8cc;
  border-radius:18px;
  background:#fbf7ef;
  padding:0 14px;
}
.split-editor-card summary{
  cursor:pointer;
  padding:14px 2px;
  font-weight:800;
  color:#50594f;
}
.split-editor-card[open] summary{border-bottom:1px solid #e5ddd1}
.split-editor-card form,
.split-editor-card .people-list{margin:14px 0}
.split-compat-hidden{display:none!important}

@media(max-width:600px){
  .split-panel{
    padding-left:12px!important;
    padding-right:12px!important;
  }
  .personal-expense-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .expense-record-line{
    grid-template-columns:auto auto minmax(0,1fr);
  }
  .expense-record-money{
    grid-column:1 / -1;
    align-items:flex-start;
    margin-top:2px;
  }
  .expense-record-money .money-vnd{font-size:14px}
  .restaurant-choice{
    grid-template-columns:1fr;
  }
  .restaurant-choice-actions,
  .restaurant-rank{grid-column:1}
}


/* V2.24 local fixes */
.expense-custom-name{margin-top:8px}
.expense-custom-name.hidden{display:none}
.restaurant-nearby-maps{
  display:inline-flex;
  margin-top:7px;
}


/* V2.26 — More tools horizontal layout */
.tool-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}
.tool-card-horizontal{
  width:100%;
  display:grid;
  align-items:center;
  gap:14px 16px;
}
.tool-card-title h3{
  margin:0 0 4px;
}
.tool-card-title p{
  margin:0;
}

/* Exchange rate: title | live rate | input | result | refresh */
.rate-card.tool-card-horizontal{
  grid-template-columns:minmax(160px,1.15fr) minmax(210px,1.35fr) minmax(160px,.9fr) minmax(150px,.85fr) auto;
  grid-template-areas:
    "title live input result action"
    "title live input result status";
}
.rate-card .tool-card-title{grid-area:title;text-align:left}
.rate-card .live-rate-main{grid-area:live;margin:0}
.rate-card>label{grid-area:input;margin:0}
.rate-card .convert-result{grid-area:result;margin:0}
.rate-card #refreshRate{grid-area:action;white-space:nowrap;align-self:end}
.rate-card #rateStatus{grid-area:status;margin:4px 0 0;text-align:center}

/* Weather: title/update | current weather | chips | saved picker */
.weather-card.tool-card-horizontal{
  grid-template-columns:minmax(220px,1.15fr) minmax(230px,1fr) minmax(360px,1.75fr);
  grid-template-areas:
    "head live chips"
    "head live picker"
    "results results results";
}
.weather-card .weather-card-head{
  grid-area:head;
  margin:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.weather-card .live-weather-box{grid-area:live;margin:0}
.weather-card .weather-buttons{
  grid-area:chips;
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  align-content:center;
}
.weather-card .weather-saved-picker-box{
  grid-area:picker;
  margin:0;
}
.weather-card .weather-results{
  grid-area:results;
  margin-top:4px;
}

/* Packing remains full-width below */
.tool-grid>.tool-card:not(.tool-card-horizontal){
  width:100%;
}

@media (max-width:1100px){
  .rate-card.tool-card-horizontal{
    grid-template-columns:1fr 1.2fr 1fr;
    grid-template-areas:
      "title live live"
      "input result action"
      "input result status";
  }
  .weather-card.tool-card-horizontal{
    grid-template-columns:1fr 1fr;
    grid-template-areas:
      "head live"
      "chips chips"
      "picker picker"
      "results results";
  }
}

@media (max-width:700px){
  .tool-card-horizontal{
    gap:12px;
  }
  .rate-card.tool-card-horizontal{
    grid-template-columns:1fr 1fr;
    grid-template-areas:
      "title title"
      "live live"
      "input result"
      "action action"
      "status status";
  }
  .rate-card .tool-card-title{text-align:center}
  .rate-card #refreshRate{width:100%}
  .weather-card.tool-card-horizontal{
    grid-template-columns:1fr;
    grid-template-areas:
      "head"
      "live"
      "chips"
      "picker"
      "results";
  }
  .weather-card .weather-card-head{
    align-items:flex-start;
  }
}


/* V2.27 — dialog cleanups, clickable collection titles, stable horizontal tools */
.dialog-x{
  border:1px solid var(--line);
  background:white;
  border-radius:12px;
  width:44px;
  height:44px;
  font-size:28px;
  line-height:1;
  display:grid;
  place-items:center;
  color:var(--ink);
}
.collection-name-map,
.food-name-map,
.restaurant-name-map{
  color:inherit;
  border-bottom:1px dashed rgba(75,90,72,.35);
}
.collection-name-map:active{opacity:.66}
.expense-current-card{
  background:#ECF2E8;
  color:var(--ink);
}
.expense-current-card .money-twd{color:var(--muted)}

.tool-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}
.tool-card-horizontal{
  width:100%;
  display:grid;
  gap:14px 16px;
  align-items:start;
}
.tool-card-horizontal > *{min-width:0}
.tool-card-title{display:grid;gap:4px;align-content:start}
.tool-card-title h3{margin:0}
.tool-card-title p{margin:0}

.rate-card.tool-card-horizontal{
  grid-template-columns:minmax(150px,170px) minmax(0,1fr) minmax(132px,156px);
  grid-template-areas:
    "title live action"
    "title input result"
    "title status status";
}
.rate-card .tool-card-title{grid-area:title;text-align:left;align-self:center}
.rate-card .live-rate-main{grid-area:live;margin:0;align-self:center}
.rate-card > label{grid-area:input;margin:0}
.rate-card .convert-result{grid-area:result;margin:0;display:grid;place-items:center;min-height:72px}
.rate-card #refreshRate{grid-area:action;white-space:normal;min-height:72px;padding:10px 14px}
.rate-card #rateStatus{grid-area:status;margin:0;text-align:left}

.weather-card.tool-card-horizontal{
  grid-template-columns:minmax(160px,180px) minmax(170px,200px) minmax(0,1fr);
  grid-template-areas:
    "head live picker"
    "head chips picker"
    "results results results";
}
.weather-card .weather-card-head{
  grid-area:head;
  margin:0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  gap:10px;
}
.weather-card #refreshWeather{min-width:104px}
.weather-card .live-weather-box{grid-area:live;margin:0;height:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px}
.weather-card .weather-buttons{grid-area:chips;margin:0;display:flex;flex-wrap:wrap;gap:8px;align-content:flex-start}
.weather-card .weather-saved-picker-box{grid-area:picker;margin:0;display:grid;gap:8px;align-content:center}
.weather-card .weather-saved-open{width:100%}
.weather-card .weather-results{grid-area:results;margin-top:4px}

.collection-actions{
  justify-content:center;
}
.restaurant-choice-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
}

@media (max-width:980px){
  .rate-card.tool-card-horizontal{
    grid-template-columns:minmax(140px,170px) minmax(0,1fr);
    grid-template-areas:
      "title live"
      "title input"
      "title result"
      "title action"
      "status status";
  }
  .rate-card #refreshRate{min-height:44px}
  .weather-card.tool-card-horizontal{
    grid-template-columns:minmax(160px,180px) minmax(0,1fr);
    grid-template-areas:
      "head live"
      "chips chips"
      "picker picker"
      "results results";
  }
}
@media (max-width:700px){
  .rate-card.tool-card-horizontal,
  .weather-card.tool-card-horizontal{
    grid-template-columns:1fr;
  }
  .rate-card.tool-card-horizontal{
    grid-template-areas:
      "title"
      "live"
      "input"
      "result"
      "action"
      "status";
  }
  .weather-card.tool-card-horizontal{
    grid-template-areas:
      "head"
      "live"
      "chips"
      "picker"
      "results";
  }
  .rate-card .tool-card-title,
  .weather-card .weather-card-head{
    text-align:center;
    align-items:center;
  }
  .rate-card #rateStatus{text-align:center}
  .weather-card .live-weather-box{text-align:center;display:grid;justify-content:center}
}


/* V2.28 — food backup link cleanup, cumulative split summary, smoother tools layout */
.food-actions,
.collection-actions{
  align-items:center;
  justify-content:center;
  gap:12px;
}
.food-actions-single{
  justify-content:center;
}
.food-actions .mini-btn,
.collection-actions .mini-btn,
.restaurant-choice-cta,
#refreshRate,
#refreshWeather,
.weather-saved-open,
.weather-chip{
  line-height:1.3;
  word-break:keep-all;
}
.food-actions .mini-btn,
.collection-actions .mini-btn{
  min-width:112px;
  padding-inline:16px;
}

/* V2.52.2 — food ordering and drag audit */
#todayFood{display:grid;gap:0}
.food-sort-card{position:relative;user-select:none;-webkit-user-select:none;padding-top:18px}
.food-drag-grip{
  position:absolute;right:10px;top:10px;display:grid;place-items:center;
  width:38px;height:38px;border:1px solid var(--line);border-radius:12px;
  background:var(--paper);font-size:17px;touch-action:manipulation
}
.food-sort-card>h3{padding-inline:34px}
.food-drag-placeholder{
  box-sizing:border-box;border:2px dashed #91A58C;background:rgba(145,165,140,.10);
  border-radius:18px;margin:0
}
.food-sort-card.food-dragging-fixed{
  position:fixed!important;margin:0!important;z-index:9999!important;pointer-events:none!important;
  will-change:transform;transition:none!important;opacity:.96!important;
  transform:translate3d(0,var(--food-drag-y,0),0) scale(1.012)!important;
  box-shadow:0 18px 38px rgba(70,70,55,.18)!important;border-color:#8FA28D!important
}
body.is-dragging-food{overscroll-behavior:none;user-select:none;-webkit-user-select:none}
body.is-dragging-food .food-sort-card:not(.food-dragging-fixed){transition:transform .16s ease}
.food-drag-hint{margin-bottom:18px}
.nearby-walk-btn{display:inline-flex;align-items:center;justify-content:center}
.food-card h3,
.collection-card h3,
.restaurant-choice strong{
  line-height:1.25;
}
.food-name-map,
.collection-name-map,
.restaurant-name-map{
  display:inline;
  text-underline-offset:4px;
  overflow-wrap:anywhere;
}
.expense-current-card{
  background:#ECF2E8;
}
.expense-current-card span:first-child{
  white-space:nowrap;
}

.rate-card.tool-card-horizontal{
  grid-template-columns:minmax(150px,170px) minmax(240px,1.25fr) minmax(160px,1fr) minmax(146px,160px);
  grid-template-areas:
    "title live action action"
    "title input result result"
    "title status status status";
  align-items:center;
}
.rate-card .live-rate-main{
  min-height:128px;
  display:grid;
  place-items:center;
}
.rate-card > label{
  align-self:end;
}
.rate-card .convert-result{
  min-height:80px;
  display:grid;
  place-items:center;
}
.rate-card #refreshRate{
  min-height:96px;
  width:100%;
  display:grid;
  place-items:center;
}
.rate-card #rateStatus{
  padding-left:4px;
}

.weather-card.tool-card-horizontal{
  grid-template-columns:minmax(160px,180px) minmax(170px,220px) minmax(0,1fr);
  grid-template-areas:
    "head live picker"
    "head chips chips"
    "results results results";
  align-items:start;
}
.weather-card .weather-card-head{
  gap:14px;
}
.weather-card #refreshWeather{
  min-height:50px;
  padding-inline:18px;
}
.weather-card .live-weather-box{
  min-height:122px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
}
.weather-card .weather-buttons{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  align-content:start;
}
.weather-card .weather-chip{
  width:100%;
  min-height:46px;
  padding:10px 12px;
  white-space:nowrap;
}
.weather-card .weather-saved-picker-box{
  min-height:122px;
  align-content:center;
}
.weather-card .weather-saved-open{
  min-height:72px;
  padding:12px 16px;
  display:grid;
  place-items:center;
}
.weather-card .weather-saved-picker-box p{
  margin-top:2px;
}
.weather-card .weather-results .collection-card{
  text-align:center;
}
.weather-card .weather-results .collection-actions{
  display:flex;
  flex-wrap:wrap;
}

@media (max-width:980px){
  .rate-card.tool-card-horizontal{
    grid-template-columns:minmax(140px,170px) minmax(0,1fr) minmax(140px,160px);
    grid-template-areas:
      "title live action"
      "title input result"
      "status status status";
  }
  .rate-card #refreshRate{min-height:80px}
  .weather-card.tool-card-horizontal{
    grid-template-columns:minmax(160px,180px) minmax(0,1fr);
    grid-template-areas:
      "head live"
      "picker picker"
      "chips chips"
      "results results";
  }
  .weather-card .weather-buttons{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media (max-width:700px){
  .rate-card.tool-card-horizontal,
  .weather-card.tool-card-horizontal{
    grid-template-columns:1fr;
  }
  .rate-card.tool-card-horizontal{
    grid-template-areas:
      "title"
      "live"
      "input"
      "result"
      "action"
      "status";
  }
  .weather-card.tool-card-horizontal{
    grid-template-areas:
      "head"
      "live"
      "picker"
      "chips"
      "results";
  }
  .rate-card .tool-card-title,
  .weather-card .weather-card-head{
    text-align:center;
    align-items:center;
  }
  .rate-card #rateStatus{text-align:center;padding-left:0}
  .weather-card .live-weather-box{
    grid-template-columns:1fr;
    justify-items:center;
    text-align:center;
    gap:8px;
  }
  .weather-card .weather-buttons{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:520px){
  .weather-card .weather-buttons{
    grid-template-columns:1fr 1fr;
  }
  .weather-card .weather-chip,
  .food-actions .mini-btn,
  .collection-actions .mini-btn{
    min-width:0;
  }
}


/* V2.29 — two-column place cards */
.weather-results,
.collection-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  align-items:stretch;
}
.weather-result,
.collection-card{
  min-width:0;
  height:100%;
}
.weather-result{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:10px;
}
.weather-result h4,
.collection-card h3{
  line-height:1.25;
  overflow-wrap:anywhere;
}
.weather-result-actions,
.collection-actions{
  margin-top:auto;
  justify-content:center;
}
.weather-result-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.weather-result-actions .mini-btn,
.collection-actions .mini-btn{
  min-width:108px;
}

@media (max-width:620px){
  .weather-results,
  .collection-list{
    grid-template-columns:1fr;
  }
  .weather-result-actions .mini-btn,
  .collection-actions .mini-btn{
    min-width:0;
  }
}


/* V2.30 — centered restaurant cards, manual current-spend refresh, inner boxes constrained */
.food-card{
  text-align:center;
}
.food-card h3,
.food-card .meta,
.food-card p,
.food-card .chip-row,
.food-card .food-actions{
  text-align:center;
  justify-content:center;
}
.food-card h3{
  width:100%;
}
.food-name-map{
  display:inline-block;
  max-width:100%;
  text-align:center;
}

/* Keep every inner box inside the main panel */
.panel,
.tool-card,
.tool-card-horizontal,
.live-rate-main,
.live-weather-box,
.weather-custom-box,
.weather-saved-picker-box,
.weather-results,
.collection-card,
.food-card,
.expense-total-card,
.personal-expense-card,
.split-final-clean{
  max-width:100%;
  min-width:0;
  overflow-wrap:anywhere;
}
.tool-card{
  overflow:hidden;
}
.tool-card-horizontal{
  width:100%;
  padding-inline:14px;
}
.tool-card-horizontal input,
.tool-card-horizontal button,
.tool-card-horizontal .convert-result,
.tool-card-horizontal .live-rate-main,
.tool-card-horizontal .live-weather-box,
.tool-card-horizontal .weather-saved-picker-box{
  max-width:100%;
}

/* Manual current trip spend snapshot */
.expense-current-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:14px;
  text-align:left;
  padding:14px 18px;
}
.expense-current-copy{
  display:grid;
  gap:4px;
  min-width:0;
}
.expense-current-copy > span{
  font-size:13px;
  font-weight:800;
  white-space:nowrap;
}
.expense-current-copy small{
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
}
.expense-current-card > strong{
  text-align:right;
  white-space:nowrap;
}
.expense-current-refresh{
  min-width:70px;
  background:white;
}

/* Center the split records too */
.expense-record-line{
  align-items:center;
}
.expense-record-name{
  text-align:center;
}

@media(max-width:700px){
  .expense-current-card{
    grid-template-columns:1fr auto;
    grid-template-areas:
      "copy refresh"
      "money money";
  }
  .expense-current-copy{grid-area:copy}
  .expense-current-card > strong{grid-area:money;text-align:center}
  .expense-current-refresh{grid-area:refresh}
}
@media(max-width:520px){
  .tool-card-horizontal{
    padding-inline:10px;
  }
  .expense-current-card{
    padding:12px;
    gap:10px;
  }
  .expense-current-copy small{
    font-size:10px;
  }
}


/* V2.31 — one-glance split + draggable expense details */
.expense-main-total-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:10px 14px;
  padding:15px 16px;
  border-radius:18px;
  background:var(--sage-deep);
  color:#fff;
}
.expense-main-total-copy{
  display:grid;
  gap:3px;
  text-align:left;
}
.expense-main-total-copy>span{
  font-size:13px;
  font-weight:800;
}
.expense-main-total-copy small{
  font-size:10px;
  opacity:.78;
  line-height:1.35;
}
.expense-main-total-card>strong{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  font-size:18px;
  white-space:nowrap;
}
.expense-main-total-card .money-twd{
  opacity:.82;
}
.expense-main-total-card .expense-current-refresh{
  background:#fff;
  color:var(--sage-deep);
  border-color:transparent;
  min-width:64px;
}
.personal-expense-card>span{
  font-size:12px;
}
.split-final-clean{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px 14px;
  flex-wrap:wrap;
  padding:10px 13px;
}
.split-final-clean .final-settlement-title{
  font-size:12px;
  font-weight:800;
  color:var(--muted);
}
.split-final-clean .transfer-row.compact{
  display:flex;
  align-items:center;
  gap:6px;
}
.split-final-clean .settlement-none{
  font-size:13px;
  font-weight:700;
}

.expense-sort-card{
  cursor:pointer;
  user-select:none;
  -webkit-user-select:none;
  transition:transform .15s,opacity .15s,border-color .15s;
}
.expense-sort-card:active{
  border-color:#a9b8a4;
}
.expense-drag-grip{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:#6c756b;
  font-size:18px;
  touch-action:none;
  cursor:grab;
}
.expense-drag-grip:active{cursor:grabbing}
.expense-drag-placeholder{
  border:2px dashed #aab9a5;
  border-radius:16px;
  background:rgba(221,232,216,.34);
  margin:0;
}
.expense-dragging{
  position:fixed!important;
  z-index:9998;
  opacity:.92;
  transform:scale(1.015);
  box-shadow:0 14px 34px rgba(60,55,45,.18);
  pointer-events:none;
}
body.is-dragging-expense{
  user-select:none;
  -webkit-user-select:none;
}
.expense-day-section .tiny::after{
  content:" · 點卡片編輯，抓 ☰ 上下排序";
  font-weight:400;
  opacity:.72;
}

@media(max-width:600px){
  .expense-main-total-card{
    grid-template-columns:1fr auto;
    grid-template-areas:
      "copy refresh"
      "money money";
  }
  .expense-main-total-copy{grid-area:copy}
  .expense-main-total-card>strong{
    grid-area:money;
    align-items:flex-start;
    font-size:17px;
  }
  .expense-main-total-card .expense-current-refresh{
    grid-area:refresh;
    align-self:start;
  }
  .expense-record-line{
    grid-template-columns:auto auto minmax(0,1fr);
  }
  .expense-record-money{
    grid-column:1 / -1;
    align-items:flex-start;
  }
}


/* V2.32 — final settlement, expense controls, contained More Tools */

/* Final settlement */
.split-final-clean{
  display:block;
  padding:12px 14px 14px;
  margin-top:10px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fffdfa;
}
.split-final-clean .final-settlement-title{
  display:block;
  margin:0 0 8px;
  text-align:left;
  font-size:11px;
  font-weight:800;
  color:var(--muted);
}
.split-final-clean .settlement-inner{
  width:100%;
  max-width:100%;
  padding:10px 12px;
  border-radius:15px;
  background:var(--sage);
  box-sizing:border-box;
}
.split-final-clean .transfer-row.compact{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  width:100%;
}
.split-final-clean .settlement-route{
  min-width:0;
  font-size:14px;
  font-weight:600;
  white-space:nowrap;
}
.split-final-clean .transfer-row.compact strong{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  font-size:15px;
  line-height:1.15;
  white-space:nowrap;
}
.split-final-clean .transfer-row.compact .money-twd{
  margin-top:3px;
  font-size:11px;
  color:#6f776f;
}
.split-final-clean .settlement-none{
  text-align:center;
  font-size:13px;
  font-weight:700;
}

/* Expense: edit/delete + drag */
.expense-row-clean{
  position:relative;
  align-items:center;
}
.expense-row-actions{
  position:relative;
  display:flex;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
}
.expense-more-btn,
.expense-drag-grip{
  width:38px;
  height:38px;
  min-width:38px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#fff;
  color:#667067;
  display:grid;
  place-items:center;
  padding:0;
}
.expense-more-btn{font-size:20px;line-height:1}
.expense-drag-grip{font-size:17px}
.food-drag-grip,.expense-drag-grip{
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
}
.expense-more-menu{
  position:absolute;
  right:44px;
  top:44px;
  z-index:30;
  display:flex;
  gap:6px;
  padding:7px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  box-shadow:0 8px 22px rgba(50,45,38,.12);
  white-space:nowrap;
}
.expense-more-menu[hidden]{display:none!important}
.expense-more-menu .mini-btn{min-height:34px}
.expense-day-section .tiny::after{
  content:" · 點卡片編輯，⋯ 可改金額/刪除，☰ 可拖拉";
}

/* More Tools: force everything inside beige card */
.page[data-page="more"] .tool-card{
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  overflow:hidden;
  padding:18px 20px;
}
.page[data-page="more"] .tool-card *{
  box-sizing:border-box;
  min-width:0;
}

/* Exchange rate */
.rate-card.tool-card-horizontal{
  display:grid;
  grid-template-columns:180px minmax(260px,360px) minmax(170px,220px);
  grid-template-areas:
    "title live action"
    "title input result"
    "status status status";
  justify-content:center;
  align-items:center;
  gap:14px 18px;
}
.rate-card .tool-card-title{grid-area:title}
.rate-card .live-rate-main{grid-area:live}
.rate-card > label{grid-area:input}
.rate-card #refreshRate{grid-area:action}
.rate-card .convert-result{grid-area:result}
.rate-card #rateStatus{grid-area:status}
.rate-card .live-rate-main,
.rate-card > label,
.rate-card #refreshRate,
.rate-card .convert-result{
  width:100%;
  max-width:100%;
}
.rate-card #refreshRate,
.rate-card .convert-result{
  min-height:72px;
  height:auto;
  border-radius:16px;
}
.rate-card #refreshRate{
  padding:10px 14px;
}
.rate-card .convert-result{
  margin:0;
  padding:12px;
  display:grid;
  place-items:center;
}
.rate-card > label{
  align-self:center;
  text-align:center;
}
.rate-card #vndInput{width:100%}

/* Weather */
.weather-card.tool-card-horizontal{
  display:grid;
  grid-template-columns:180px minmax(260px,420px);
  grid-template-areas:
    "head live"
    "chips chips"
    "results results";
  justify-content:center;
  align-items:start;
  gap:14px 18px;
}
.weather-card .weather-card-head{
  grid-area:head;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:12px;
  height:100%;
}
.weather-card #refreshWeather{
  width:auto;
  min-width:126px;
  min-height:44px;
  margin-inline:auto;
}
.weather-card .live-weather-box{
  grid-area:live;
  width:100%;
  min-height:118px;
  padding:14px;
  border-radius:16px;
}
.weather-card .weather-saved-picker-box{
  grid-area:picker;
  width:100%;
  min-height:118px;
  padding:12px;
  border-radius:16px;
}
.weather-card .weather-saved-open{
  width:100%;
  min-height:62px;
}
.weather-card .weather-buttons{
  grid-area:chips;
  width:100%;
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:8px;
}
.weather-card .weather-results{
  grid-area:results;
  width:100%;
}

@media(max-width:1050px){
  .rate-card.tool-card-horizontal{
    grid-template-columns:160px minmax(220px,1fr) minmax(160px,200px);
  }
  .weather-card.tool-card-horizontal{
    grid-template-columns:160px minmax(240px,1fr);
  }
  .weather-card .weather-buttons{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:760px){
  .rate-card.tool-card-horizontal{
    grid-template-columns:1fr;
    grid-template-areas:
      "title"
      "live"
      "input"
      "action"
      "result"
      "status";
  }
  .weather-card.tool-card-horizontal{
    grid-template-columns:1fr;
    grid-template-areas:
      "head"
      "live"
      "chips"
      "results";
  }
  .rate-card .tool-card-title,
  .rate-card #rateStatus{text-align:center}
  .rate-card #refreshRate,
  .rate-card .convert-result{
    max-width:320px;
    width:100%;
    justify-self:center;
  }
  .weather-card .live-weather-box,
  .weather-card .weather-saved-picker-box{
    max-width:420px;
    justify-self:center;
  }
  .weather-card .weather-buttons{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .expense-more-menu{
    right:0;
    top:44px;
    flex-direction:column;
  }
}

.weather-name-map{
  color:inherit;
  text-decoration:none;
  border-bottom:1px dotted currentColor;
}
@media(max-width:520px){
  .split-final-clean .transfer-row.compact{
    grid-template-columns:1fr;
    gap:6px;
  }
  .split-final-clean .transfer-row.compact strong{
    align-items:flex-start;
  }
  .expense-more-btn,
  .expense-drag-grip{
    width:36px;
    height:36px;
    min-width:36px;
  }
}


/* V2.33 — batch split member flow */
.batch-split-open{
  display:block;
  width:min(260px,100%);
  margin:12px auto 2px;
}

.split-batch-dialog{
  width:min(92vw,560px);
}
.split-batch-dialog::backdrop{
  background:rgba(48,44,38,.28);
}
.split-batch-card{
  width:100%;
  max-width:560px;
  padding:20px;
}
.split-batch-intro{
  margin:4px 0 14px;
  line-height:1.55;
}
.split-batch-choice-list{
  display:grid;
  gap:9px;
}
.split-choice-btn{
  display:grid;
  grid-template-columns:1fr;
  gap:2px;
  width:100%;
  padding:12px 14px;
  text-align:left;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fffdfa;
  color:var(--ink);
  cursor:pointer;
}
.split-choice-btn strong{
  font-size:14px;
}
.split-choice-btn span{
  font-size:11px;
  color:var(--muted);
}
.split-choice-btn.active{
  border-color:#9eaf97;
  background:var(--sage);
  box-shadow:inset 0 0 0 1px rgba(95,112,91,.08);
}
.split-batch-date,
.split-batch-form{
  margin-top:12px;
}
.split-batch-date{
  display:grid;
  gap:6px;
}
.split-batch-form{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px 12px;
}
.split-batch-form label{
  display:grid;
  gap:6px;
}
.split-batch-form select,
.split-batch-date select{
  width:100%;
}
.split-batch-preview{
  margin:12px 0 0;
  padding:10px 12px;
  border-radius:12px;
  background:#f3efe5;
  color:#5f635d;
  font-size:12px;
  line-height:1.5;
}
.split-batch-dialog .dialog-actions{
  margin-top:14px;
}
.split-batch-dialog .dialog-actions .btn{
  min-width:140px;
}
@media(max-width:560px){
  .split-batch-card{
    padding:16px;
  }
  .split-batch-form{
    grid-template-columns:1fr;
  }
}


/* V2.34 — expense drag matches itinerary interaction */
.expense-drop-line{
  height:8px;
  margin:4px 12px;
  border-radius:999px;
  background:#91A58C;
  box-shadow:0 0 0 2px rgba(145,165,140,.10);
}

.expense-sort-card.expense-dragging-fixed{
  position:fixed!important;
  margin:0!important;
  z-index:9999!important;
  pointer-events:none!important;
  will-change:transform;
  transition:none!important;
  opacity:.96!important;
  transform:translate3d(0,var(--expense-drag-y,0),0) scale(1.012)!important;
  box-shadow:0 18px 38px rgba(70,70,55,.18)!important;
  border-color:#8FA28D!important;
}

body.is-dragging-expense{
  overscroll-behavior:none;
}

body.is-dragging-expense .expense-sort-card:not(.expense-dragging-fixed){
  transition:transform .16s ease;
}

/* Retire the old large dashed placeholder from V2.31/32 */
.expense-drag-placeholder{
  display:none!important;
}


/* V2.35 — itinerary place picker: category menu */
.trip-place-picker-dialog{
  width:min(680px,calc(100vw - 24px));
}

.trip-place-picker-chips{
  display:flex;
  gap:7px;
  overflow-x:auto;
  padding:2px 0 10px;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.trip-place-picker-chips::-webkit-scrollbar{display:none}

.trip-place-chip{
  flex:0 0 auto;
  min-height:34px;
  padding:7px 13px;
  border:1px solid #ded5c8;
  border-radius:999px;
  background:#fffdf8;
  color:#596159;
  font:700 12px/1 inherit;
  cursor:pointer;
}
.trip-place-chip.active{
  background:var(--sage);
  border-color:#bdcbb6;
  color:#3f5141;
}

.trip-place-picker-list{
  gap:8px;
}

.trip-place-picker-item{
  min-height:68px;
}

.trip-place-picker-copy{
  flex:1;
  gap:3px;
}

.trip-place-picker-name{
  width:max-content;
  max-width:100%;
  color:var(--ink);
  font-size:13px;
  font-weight:800;
  text-decoration:none;
  border-bottom:1px dashed rgba(75,90,72,.35);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.trip-place-picker-name:hover{
  border-bottom-style:solid;
}

.trip-place-picker-actions .choose-trip-place{
  min-width:72px;
}

.trip-place-picker-empty{
  padding:18px 6px;
  text-align:center;
}

@media(min-width:720px){
  .trip-place-picker-list{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .trip-place-picker-item{
    align-items:center;
  }
}

@media(max-width:600px){
  .trip-place-picker-item{
    flex-direction:row;
    align-items:center;
  }
  .trip-place-picker-actions{
    width:auto;
    flex:0 0 auto;
  }
  .trip-place-picker-actions>*{
    flex:none;
  }
}


/* V2.37 — Food page: Today / Nearby / Pocket */
.food-page-panel{
  display:grid;
  gap:18px;
}

.food-head-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.food-delete-btn{
  color:#92514f;
  background:#fae8e6;
  border-color:transparent;
}

.edit-food{
  background:#f7f2e8;
}

.food-layer{
  border-top:1px solid var(--line);
  padding-top:16px;
}

.food-layer-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}

.food-layer-head h3{
  margin:2px 0 4px;
  font-size:18px;
}

.food-layer-head .muted{
  margin:0;
}

.food-nearby-grid,
#foodPocket{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.nearby-food-card{
  position:relative;
}

.nearby-food-distance{
  display:inline-flex;
  width:max-content;
  margin:7px 0 4px;
  padding:5px 9px;
  border-radius:999px;
  background:var(--sage);
  color:#445447;
  font-size:11px;
  font-weight:800;
}

.food-nearby-placeholder{
  grid-column:1 / -1;
  display:grid;
  gap:6px;
  padding:16px;
  border:1px dashed #b8c5b2;
  border-radius:16px;
  background:#f7f6ef;
  text-align:center;
  color:#626a61;
  font-size:12px;
  line-height:1.55;
}

.food-nearby-placeholder strong{
  color:#455646;
  font-size:14px;
}

.places-nearby-dialog{width:min(94vw,560px);max-height:88dvh;overflow:hidden}
.places-nearby-card{display:flex;flex-direction:column;max-height:88dvh;padding:18px;border:1px solid var(--line);border-radius:22px;background:var(--paper)}
.nearby-place-filters{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0}
.nearby-type-toggle{display:flex;gap:6px}
.nearby-radius-label{display:flex;align-items:center;gap:7px;font-size:13px}
.nearby-radius-label select{min-height:40px;border:1px solid var(--line);border-radius:12px;background:#fff;padding:6px 9px;font:inherit}
.places-nearby-results{display:grid;gap:8px;overflow:auto;overscroll-behavior:contain;padding:2px 2px 12px}
.nearby-place-result{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px;border:1px solid var(--line);border-radius:16px;background:#fff}
.nearby-place-main{display:grid;gap:4px;min-width:0}
.nearby-place-main>strong{overflow-wrap:anywhere}
.nearby-place-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;flex:none}
@media(max-width:520px){
  .places-nearby-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 28px - env(safe-area-inset-top))}
  .places-nearby-card{max-height:calc(100dvh - 28px - env(safe-area-inset-top));padding:14px}
  .nearby-place-filters{align-items:stretch;flex-direction:column}
  .nearby-type-toggle .scope-tab{flex:1;min-height:40px}
  .nearby-radius-label{justify-content:space-between}
  .nearby-radius-label select{flex:1}
  .nearby-place-result{align-items:flex-start;flex-direction:column}
  .nearby-place-actions{width:100%;justify-content:stretch}
  .nearby-place-actions>*{flex:1;text-align:center}
}

.travel-summary-toggle{display:none}
.food-layer-note{
  margin:8px 0 12px;
}

.food-empty-state{
  grid-column:1 / -1;
  padding:12px 4px;
  text-align:center;
}

@media(max-width:680px){
  /* Let nested food grids shrink to the panel instead of expanding to min-content width. */
  .food-page-panel,.food-page-panel>*{min-width:0;max-width:100%}
  .food-page-panel>.section-head{
    align-items:flex-start;
  }

  .food-head-actions{
    flex-direction:column-reverse;
    align-items:flex-end;
  }

  #addFoodBtn{
    min-height:42px;
    padding-inline:14px;
    white-space:nowrap;
  }

  .food-nearby-grid,
  #foodPocket{
    grid-template-columns:minmax(0,1fr);
    min-width:0;
  }

  .food-layer-head{
    align-items:center;
  }

  .food-layer-head #refreshNearbyFood{
    flex:0 0 auto;
  }
}


/* V2.38 — editable custom weather backups */
.weather-custom-edit-dialog{
  width:min(92vw,520px);
}

.weather-custom-edit-card{
  width:100%;
  max-width:520px;
}

.weather-custom-edit-form{
  display:grid;
  gap:12px;
}

.weather-custom-edit-form label{
  display:grid;
  gap:6px;
  font-size:12px;
  font-weight:700;
  color:var(--ink);
}

.weather-custom-edit-form input,
.weather-custom-edit-form select{
  width:100%;
}

.weather-custom-edit-actions{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:4px;
}

.weather-custom-edit-actions .btn{
  min-width:120px;
}

.weather-result .weather-edit{
  border-color:#b9c6b4;
  background:#eef4ea;
}

@media(max-width:520px){
  .weather-custom-edit-card{
    padding:16px;
  }
  .weather-custom-edit-actions{
    flex-direction:column-reverse;
  }
  .weather-custom-edit-actions .btn{
    width:100%;
  }
}


/* V2.39 — named custom weather categories */
.weather-custom-group-chips{
  display:contents;
}

.weather-chip-add-custom{
  border-style:dashed;
  background:#f7f4eb;
}

.weather-custom-group-dialog{
  width:min(92vw,520px);
}

.weather-custom-group-card{
  width:100%;
  max-width:520px;
}

.weather-custom-group-form{
  display:grid;
  gap:10px;
}

.weather-custom-group-form label{
  display:grid;
  gap:6px;
  font-size:12px;
  font-weight:700;
}

.weather-custom-group-manager{
  display:grid;
  gap:8px;
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid var(--line);
}

.weather-custom-group-manager-title{
  font-size:11px;
  font-weight:800;
  color:var(--muted);
}

.weather-custom-group-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fffdfa;
}

.weather-custom-group-row>span{
  min-width:0;
  font-size:13px;
  font-weight:700;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.weather-custom-group-row>div{
  display:flex;
  gap:6px;
  flex:0 0 auto;
}

@media(max-width:520px){
  .weather-custom-group-card{
    padding:16px;
  }
}


/* V2.40 — compact custom category dialog */
.weather-custom-group-dialog{
  width:min(88vw,430px);
  max-height:78vh;
}

.weather-custom-group-dialog::backdrop{
  background:rgba(50,47,42,.28);
}

.weather-custom-group-card{
  width:100%;
  max-width:430px;
  padding:18px 18px 16px;
  border-radius:20px;
  overflow:auto;
}

.weather-custom-group-card .dialog-head{
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}

.weather-custom-group-card .dialog-head .tiny{
  margin:0 0 2px;
  font-size:10px;
}

.weather-custom-group-card .dialog-head h3{
  margin:0;
  font-size:20px;
  line-height:1.2;
}

.weather-custom-group-card .dialog-x{
  width:42px;
  height:42px;
  min-width:42px;
  border-radius:14px;
  font-size:24px;
}

.weather-custom-group-form{
  gap:8px;
}

.weather-custom-group-form label{
  gap:5px;
  font-size:12px;
}

.weather-custom-group-form input{
  height:46px;
  padding:0 14px;
  border-radius:14px;
  font-size:14px;
}

.weather-custom-group-form .muted.small{
  margin:2px 0 0;
  font-size:11px;
  line-height:1.4;
}

.weather-custom-group-form .dialog-actions{
  margin-top:4px;
  justify-content:flex-end;
}

.weather-custom-group-form .dialog-actions .btn{
  min-width:104px;
  min-height:42px;
  padding:9px 16px;
  border-radius:13px;
}

.weather-custom-group-manager{
  margin-top:12px;
  padding-top:10px;
  gap:6px;
}

.weather-custom-group-manager-title{
  margin-bottom:2px;
}

.weather-custom-group-row{
  padding:8px 9px;
  border-radius:11px;
}

.weather-custom-group-row>div{
  gap:4px;
}

.weather-custom-group-row .mini-btn{
  min-height:30px;
  padding:5px 9px;
  font-size:11px;
}

@media(max-width:520px){
  .weather-custom-group-dialog{
    width:min(94vw,430px);
    max-height:82vh;
  }
  .weather-custom-group-card{
    padding:16px 14px 14px;
    border-radius:18px;
  }
  .weather-custom-group-card .dialog-head h3{
    font-size:18px;
  }
  .weather-custom-group-card .dialog-x{
    width:40px;
    height:40px;
    min-width:40px;
  }
}


/* V2.41 — linked single-source data */
#featuredCountBadge,
#allCountBadge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  margin-left:5px;
  padding:0 7px;
  border-radius:999px;
  background:rgba(111,132,104,.12);
  color:#526150;
  font-size:10px;
  font-weight:800;
  vertical-align:middle;
}

.collection-scope.active #featuredCountBadge,
.collection-scope.active #allCountBadge,
.collection-tab.active #featuredCountBadge,
.collection-tab.active #allCountBadge{
  background:rgba(255,255,255,.72);
}


/* V2.42 — draggable date tabs */
.day-tabs{
  position:relative;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
}

.day-tab-draggable{
  position:relative;
  touch-action:pan-y;
  user-select:none;
  -webkit-user-select:none;
  cursor:grab;
}

.day-tab-draggable:active{
  cursor:grabbing;
}

.day-tab-dragging{
  position:fixed!important;
  z-index:9999!important;
  margin:0!important;
  pointer-events:none!important;
  opacity:.95;
  transform:scale(1.04);
  box-shadow:0 12px 28px rgba(60,55,45,.18);
  transition:none!important;
  will-change:transform;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
}

.day-tab-drag-origin{
  opacity:0!important;
  pointer-events:none!important;
}

body.is-dragging-day-tab{
  user-select:none;
  -webkit-user-select:none;
}

body.is-dragging-day-tab .day-tabs{
  scroll-snap-type:none!important;
  scroll-behavior:auto!important;
  -webkit-overflow-scrolling:auto;
}

.date-drag-hint{
  display:inline-flex;
  align-items:center;
  margin-left:8px;
  color:var(--muted);
  font-size:11px;
}

@media(max-width:640px){
  .date-drag-hint{
    width:100%;
    justify-content:center;
    margin:2px 0 0;
  }
}


/* V2.43 — expense currency selector */
.expense-money-grid{
  display:grid;
  grid-template-columns:minmax(150px,.65fr) minmax(220px,1.35fr);
  gap:12px;
  align-items:end;
}

.expense-money-grid label{
  display:grid;
  gap:6px;
}

.expense-money-grid select,
.expense-money-grid input{
  width:100%;
}

.expense-rate-note{
  margin:-2px 0 4px;
  text-align:center;
  line-height:1.45;
}

@media(max-width:620px){
  .expense-money-grid{
    grid-template-columns:1fr 1.2fr;
    gap:8px;
  }
}

@media(max-width:420px){
  .expense-money-grid{
    grid-template-columns:1fr;
  }
}


/* V2.44 — weather saved multi-select */
.weather-saved-list{
  padding-bottom:84px;
}

.weather-saved-item.weather-saved-selectable{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  cursor:pointer;
}

.weather-saved-item.selected{
  background:#edf4e9;
  border-color:#aebfa8;
  box-shadow:inset 0 0 0 1px rgba(121,145,113,.10);
}

.weather-saved-item.already-added{
  opacity:.72;
  cursor:default;
}

.weather-saved-check{
  display:flex;
  align-items:center;
  justify-content:center;
}

.weather-saved-checkbox{
  width:20px;
  height:20px;
  accent-color:#6f856b;
}

.weather-saved-added{
  display:inline-flex;
  width:max-content;
  margin-top:3px;
  padding:3px 7px;
  border-radius:999px;
  background:#ece6d7;
  color:#6f6b60;
  font-size:10px;
  font-weight:700;
}

.weather-saved-batchbar{
  position:sticky;
  bottom:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:12px -2px -2px;
  padding:12px;
  border-top:1px solid var(--line);
  border-radius:16px;
  background:rgba(255,252,246,.96);
  backdrop-filter:blur(8px);
  z-index:4;
}

.weather-saved-batchbar>span{
  font-size:12px;
  font-weight:700;
  color:var(--muted);
}

.weather-saved-batchbar .btn{
  min-width:150px;
}

@media(max-width:560px){
  .weather-saved-item.weather-saved-selectable{
    grid-template-columns:auto minmax(0,1fr);
  }

  .weather-saved-actions{
    grid-column:2;
    justify-self:start;
  }

  .weather-saved-batchbar{
    padding:10px;
  }

  .weather-saved-batchbar .btn{
    min-width:130px;
    padding-inline:12px;
  }
}


/* V2.45 — clean Collections page */
.collections-panel-clean{padding-bottom:96px}
.collections-box{display:grid;gap:18px}
.collections-title-head{margin-bottom:0;text-align:center}
.collections-title-head>div{width:100%}
.collection-scope-tabs-clean{margin:0}
.collection-scope-tabs-clean .scope-tab{min-height:52px;font-size:14px}

.collections-source-section,
.collections-list-section{display:grid;gap:12px}

.collections-section-label{padding:0 4px;text-align:left}
.collections-section-label .tiny{margin:0}
.collections-section-label h3{margin:2px 0 0;font-size:17px}

.mother-list-box-clean{margin:0}
.mother-settings-collapse{margin:0 0 12px;border:1px solid var(--line,#ded6c8);border-radius:16px;background:var(--paper,#fffdf8);text-align:left}
.mother-settings-collapse>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;cursor:pointer;list-style:none;font-weight:700}
.mother-settings-collapse>summary::-webkit-details-marker{display:none}
.mother-settings-collapse>summary small{font-size:12px;font-weight:500;color:var(--muted,#858780);text-align:right}
.mother-settings-collapse[open]>summary{border-bottom:1px solid var(--line,#ded6c8)}
.mother-settings-collapse[open]>.mother-list-box{padding:14px;border:0;background:transparent}
.mother-settings-collapse .mother-list-url-editor{display:grid;gap:7px;margin:12px 0;text-align:left}
.mother-list-actions-clean{justify-content:center}
.mother-list-actions-clean .btn{min-width:190px}

.manual-place-details{
  border:1px solid var(--line);
  border-radius:18px;
  background:#fffdf8;
  overflow:hidden;
}
.manual-place-details>summary{
  padding:16px 18px;
  cursor:pointer;
  list-style:none;
  font-weight:800;
  color:var(--ink);
  text-align:center;
}
.manual-place-details>summary::-webkit-details-marker{display:none}
.manual-place-details[open]>summary{
  border-bottom:1px solid var(--line);
  background:#faf6ec;
}
.import-form-clean{
  margin:0;
  padding:16px;
  border:0;
  border-radius:0;
  background:transparent;
  display:grid;
  gap:12px;
}
.import-form-clean label{display:grid;gap:6px}
.import-form-clean .btn{width:100%}

.collections-list-section{padding-top:4px}
.collection-controls-clean{
  margin:0;
  padding:14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#faf6ec;
  display:grid;
  grid-template-columns:1.15fr .9fr .9fr;
  gap:10px;
}
.collection-controls-clean>*{min-width:0}

@media(max-width:700px){
  .collection-controls-clean{grid-template-columns:1fr 1fr}
  .collection-controls-clean #collectionSearch{grid-column:1/-1}
}
@media(max-width:460px){
  .collection-controls-clean{grid-template-columns:1fr}
  .collection-controls-clean #collectionSearch{grid-column:auto}
}


/* V2.46 — collections sync-only source card */
.collections-source-section{
  gap:10px;
}

.mother-list-box-clean{
  padding-bottom:16px;
}

.mother-list-actions-clean{
  margin-top:4px;
}

.mother-list-actions-clean .btn{
  min-width:210px;
}

#motherSyncStatus{
  margin-top:8px;
  text-align:center;
  line-height:1.5;
}

/* Manual single-place import removed in V2.46 */
.manual-place-details,
.import-form-clean{
  display:none!important;
}


/* V2.47 — Weather category manager */
.weather-fixed-group-chips,
.weather-custom-group-chips{
  display:contents;
}

.weather-category-manager-card{
  max-width:520px;
}

.weather-category-add-form{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:end;
}

.weather-category-add-form label{
  display:grid;
  gap:6px;
}

.weather-category-add-form .btn{
  min-width:140px;
  white-space:nowrap;
}

.weather-category-manager-intro{
  margin:10px 0 4px;
}

.weather-custom-group-manager{
  display:grid;
  gap:8px;
  max-height:340px;
  overflow:auto;
  padding-right:2px;
}

.weather-custom-group-manager-title{
  font-weight:800;
  margin:4px 0;
}

.weather-custom-group-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}

.weather-category-row-name{
  min-width:0;
  font-weight:700;
  display:flex;
  align-items:center;
  gap:8px;
}

.weather-category-row-name small{
  font-size:11px;
  font-weight:700;
  color:var(--muted);
  background:#f3efe6;
  border-radius:999px;
  padding:3px 7px;
}

.weather-category-row-actions{
  display:flex;
  gap:7px;
  flex:0 0 auto;
}

.weather-saved-target{
  margin:10px 0 6px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#faf6ec;
}

.weather-saved-target label{
  display:grid;
  gap:6px;
  font-weight:700;
}

.weather-saved-target select{
  width:100%;
}

.weather-saved-target .tiny{
  margin:7px 0 0;
}

@media(max-width:560px){
  .weather-category-add-form{
    grid-template-columns:1fr;
  }
  .weather-category-add-form .btn{
    width:100%;
  }
  .weather-custom-group-row{
    align-items:flex-start;
  }
  .weather-category-row-actions{
    flex-direction:column;
  }
}


/* V2.53.0 — mobile drag, date strip and compact route UX */
.day-tabs{
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  scroll-behavior:smooth;
  touch-action:pan-x;
  scroll-snap-type:none;
}
.day-tab{touch-action:pan-x;flex:0 0 auto}
.route-segment{min-height:40px}
.route-arrow-mini{font-size:14px;text-align:center}
.route-next-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.route-go{white-space:nowrap}
@media(max-width:620px){
  .route-segment{
    min-height:42px;
    grid-template-columns:20px 1fr auto;
    gap:6px;
    padding:4px 6px 4px 10px;
    font-size:11px;
  }
  .route-segment .route-go{padding:6px 9px}
  /* Keep iPhone vertical scroll native; JS only cancels it after long-press drag starts. */
  .trip-card{touch-action:pan-y}
  .drag-grip{touch-action:pan-y}
}
body.is-dragging-trip,
body.is-dragging-day-tab{touch-action:none}

/* V2.59.3: allow native scroll on cards, but take exclusive touch on grips. */
.drag-grip{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.trip-card,.trip-card a{-webkit-touch-callout:none}
@media (hover:none), (pointer:coarse){
  .trip-card{user-select:none;-webkit-user-select:none}
  .trip-card a{-webkit-user-select:none}
}

/* V2.53.1 — drag performance fix */
.day-tab-placeholder{
  flex:0 0 auto!important;
  border:2px dashed #91A58C!important;
  background:rgba(145,165,140,.10)!important;
  pointer-events:none!important;
}
.day-tab-drag-origin{
  position:absolute!important;
  opacity:0!important;
  pointer-events:none!important;
}
body.is-dragging-day-tab .day-tab-placeholder{transition:none!important}
body.is-dragging-trip .trip-card:not(.dragging-fixed),
body.is-dragging-food .food-sort-card:not(.food-dragging-fixed){
  transition:none!important;
}
.trip-card.dragging-fixed,
.food-sort-card.food-dragging-fixed,
.day-tab-dragging{
  contain:paint;
}

/* V2.57.3 scoped trip and expense undo */
.bella-history-bar{position:fixed;right:14px;bottom:calc(82px + env(safe-area-inset-bottom));z-index:99990;display:flex;align-items:center;gap:7px;padding:6px 8px;border:1px solid rgba(111,128,104,.22);border-radius:16px;background:rgba(250,248,241,.96);box-shadow:0 6px 22px rgba(58,67,53,.14)}
.bella-history-bar.hidden{display:none}.bella-history-bar span{font-size:11px;color:#7a8775;white-space:nowrap}.bella-history-bar button{border:0;border-radius:11px;padding:8px 10px;background:#edf1e9;color:#53634e;font:inherit;font-size:13px}.bella-history-bar button:disabled{opacity:.34}
@media(max-width:600px){
  :root{--history-toolbar-height:42px}
  .bella-history-bar{position:fixed;top:calc(env(safe-area-inset-top) + 8px);right:10px;bottom:auto;left:auto;inset-inline:auto;z-index:40;box-sizing:border-box;width:max-content;height:var(--history-toolbar-height);max-width:calc(100vw - 20px);margin:0;padding:4px;gap:5px;border-color:rgba(111,128,104,.28);border-radius:14px;background:#faf8f1;box-shadow:0 4px 14px rgba(58,67,53,.12)}
  .bella-history-bar span{display:none}
  .bella-history-bar button{min-height:32px;padding:6px 9px;font-size:12px;white-space:nowrap}
  .day-tabs{position:sticky;top:calc(env(safe-area-inset-top) + 8px);z-index:35;background:var(--cream);justify-content:flex-start;scroll-padding-inline:0;gap:6px;overscroll-behavior-x:contain}
  body.has-history-toolbar #app{padding-top:calc(58px + env(safe-area-inset-top))}
  body.has-history-toolbar .day-tabs{top:calc(env(safe-area-inset-top) + 8px + var(--history-toolbar-height))}
  .day-tabs::before,.day-tabs::after{display:none;content:none}
  .bella-sync-btn{position:static;display:block;width:max-content;max-width:100%;margin:0 0 12px auto;z-index:auto}
  #app{padding-top:calc(5px + env(safe-area-inset-top));padding-bottom:16px}
  .topbar{padding:0 2px 7px;gap:6px;align-items:center}
  .eyebrow{padding:3px 8px;font-size:10px}
  .topbar h1{font-size:24px;line-height:1.05;margin:4px 0 2px}
  .topbar p{font-size:12px;line-height:1.2}
  .header-art{font-size:18px;top:4px;right:2px}
  .travel-summary-panel{padding:11px 12px;border-radius:20px;margin-bottom:7px}
  .compact-head{margin-bottom:5px}
  .compact-head .tiny{font-size:10px}
  .compact-head h2{font-size:17px;margin:2px 0}
  .compact-head .section-icon{font-size:22px}
  .travel-summary-toggle{display:flex;width:100%;align-items:center;justify-content:space-between;gap:8px;margin-top:3px;padding:9px 10px;border:1px solid var(--line);border-radius:13px;background:#fff;font-size:13px;text-align:left}
  .travel-summary-toggle[hidden]{display:none}
  .travel-summary-toggle span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .travel-summary-toggle b{flex:none;font-size:17px}
  .travel-summary-content[hidden]{display:none}
  .travel-summary-grid{grid-template-columns:1fr 1fr;gap:5px;margin-top:7px}
  .travel-summary-card{padding:7px 5px;font-size:11px}
  .travel-summary-card strong{font-size:13px}
  .travel-summary-label{font-size:10px}
  .hotel-summary-list{gap:4px;margin-top:5px}
  .hotel-summary-row{grid-template-columns:58px 1fr auto;gap:5px;padding:7px;font-size:11px}
  .hotel-summary-row b{font-size:10px}
  .day-heading-title-row h2{font-size:clamp(18px,5vw,22px);text-wrap:balance;line-break:strict}
  .trip-card .time-badge{font-size:14px}
  .trip-card .trip-note{font-size:14px}
  .trip-card .meta,.trip-card .status{font-size:12px}
  .route-segment{font-size:12px}
  .page.active{padding-bottom:calc(108px + env(safe-area-inset-bottom))}
}
.flight-plan-update{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;padding:12px 14px;border:1px solid rgba(111,128,104,.22);border-radius:14px;background:#f3f6ef;color:#53634e;font-size:14px}
.flight-plan-update.hidden{display:none}.flight-plan-update button{flex:none;border:0;border-radius:10px;padding:10px 14px;background:#536b59;color:#fff;font:inherit;font-weight:700}
@media(max-width:600px){.flight-plan-update{align-items:stretch;flex-direction:column}.flight-plan-update button{width:100%}}

/* V2.58.4 update controls and first-paint support */
.app-update-settings{margin-top:14px}
.app-update-settings .tool-card-title p{margin:5px 0}
.auto-update-setting{display:flex;align-items:center;gap:9px;margin:12px 0;color:var(--ink);font-size:14px}
.auto-update-setting input{width:20px;height:20px;accent-color:var(--sage-deep)}
.app-update-actions{display:flex;gap:8px;flex-wrap:wrap}
.app-update-actions button{flex:1;min-width:130px}
#updateToast{position:fixed;top:calc(env(safe-area-inset-top) + 56px);left:50%;transform:translateX(-50%);z-index:95;max-width:calc(100vw - 28px);padding:11px 16px;border:1px solid rgba(111,128,104,.22);border-radius:999px;background:#536b59;color:#fff;box-shadow:0 6px 20px rgba(60,70,60,.18);font-size:14px;font-weight:700;text-align:center;white-space:nowrap}
@media(max-width:600px){
  .update-banner:not(.hidden){position:fixed;top:calc(env(safe-area-inset-top) + 8px);left:10px;right:10px;transform:none;box-sizing:border-box;width:auto;max-width:none;height:54px;margin:0;padding:7px 9px;z-index:90}
  body.has-update-banner.has-history-toolbar .update-banner:not(.hidden){top:calc(env(safe-area-inset-top) + 56px)}
  body.has-update-banner.has-history-toolbar #app{padding-top:calc(118px + env(safe-area-inset-top))}
  body.has-update-banner:not(.has-history-toolbar) #app{padding-top:calc(70px + env(safe-area-inset-top))}
  body.has-update-banner.has-history-toolbar .day-tabs{top:calc(env(safe-area-inset-top) + 110px)}
  .app-update-actions{flex-direction:column}
  .app-update-actions button{width:100%}
}

/* V2.59.0 mobile final overrides */
@media(max-width:600px){
  #app{position:relative}
  .topbar>div:first-child{position:relative;padding-top:22px}
  .topbar .eyebrow{position:absolute;top:0;left:0;margin:0;padding:3px 8px;font-size:10px}
  .bella-sync-btn{position:absolute;top:calc(58px + env(safe-area-inset-top));right:12px;display:block;width:max-content;max-width:120px;margin:0;bottom:auto;height:auto;padding:5px 8px;z-index:2;font-size:10px;line-height:1.1;white-space:nowrap}
  body.has-update-banner.has-history-toolbar .bella-sync-btn{top:calc(118px + env(safe-area-inset-top))}
  body.has-update-banner:not(.has-history-toolbar) .bella-sync-btn{top:calc(70px + env(safe-area-inset-top))}
  .day-tabs-row{position:sticky;top:calc(env(safe-area-inset-top) + 50px);z-index:35;min-height:40px;padding:0 0 2px;background:var(--cream)}
  .day-tabs-row>.day-tabs{position:static!important;top:auto!important;z-index:auto;background:transparent;padding-bottom:4px}
  body.has-update-banner.has-history-toolbar .day-tabs-row{top:calc(env(safe-area-inset-top) + 110px)}
  body.has-update-banner.has-history-toolbar .day-tabs-row>.day-tabs{top:auto}
  .day-tabs-row .date-manager-menu{margin:0 0 4px}
  .topbar{padding-bottom:7px}
  .travel-summary-panel{margin-bottom:5px}
  .day-section-head>.btn{flex:0 0 auto}
  .trip-card{padding:10px}
  .page.active{padding-bottom:calc(116px + env(safe-area-inset-bottom))}
}
.collection-card,.food-card{text-align:left!important}
.collection-top>div:first-child,.food-card h3,.food-card .meta,.food-card p,.food-card .chip-row,.food-card .food-actions{ text-align:left!important }
.food-primary-actions{justify-content:flex-start!important}
.collection-actions{justify-content:flex-start!important}
.collection-card p.meta,.food-card p.meta{font-size:11px;line-height:1.35}

/* V2.59.2: itinerary time stays on one line; title absorbs wrapping. */
.trip-main{grid-template-columns:max-content minmax(0,1fr) auto}
.trip-main>div:nth-child(2){min-width:0}
.trip-title{overflow-wrap:anywhere}
.time-badge{white-space:nowrap;flex:none;min-width:max-content;font-variant-numeric:tabular-nums}
@media(max-width:500px){.trip-main{grid-template-columns:max-content minmax(0,1fr) auto}}
@media(max-width:600px){
  .bella-history-bar span{display:block;max-width:min(42vw,180px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
  .bella-history-bar{gap:4px;padding:4px}
  .bella-history-bar button{padding:6px 7px;font-size:11px}
}

/* Rate tool: currency list */
.rate-list{display:grid;gap:4px;margin:8px 0;font-size:13px}
.rate-list div{display:flex;justify-content:space-between;gap:8px;padding:6px 10px;border-radius:10px;background:rgba(0,0,0,.04)}
.rate-list b{font-weight:700}

.rate-card .rate-extra{grid-column:1/-1;grid-area:auto;display:grid;gap:8px;width:100%;margin-top:6px}
.rate-card .rate-extra label{display:grid;gap:4px;margin:0;grid-area:auto}
.rate-card .rate-extra select,.rate-card .rate-input-row select{width:100%}
.rate-card .rate-input-label{display:grid;gap:4px}
.rate-card .rate-input-row{display:grid;grid-template-columns:minmax(96px,.9fr) 1.4fr;gap:8px}
.rate-card .rate-input-row input{min-width:0}

.sync-card{display:grid;gap:10px}
.sync-card label{display:grid;gap:4px;font-size:13px}
.sync-card input{width:100%;min-width:0}
.sync-card .sync-actions{display:grid;grid-template-columns:1.4fr 1fr;gap:8px}
.sync-card p{margin:0}
