.trip-editor {
  --te-border: rgb(225 225 202 / .15);
  --te-text: #f4efe6; --te-muted: #bcc2b4; --te-cream: #e9d8c8;
  display: flex; flex-direction: column; width: min(620px, 100%);
  max-height: min(82dvh, 810px); min-height: min(390px, 76dvh);
  margin: 0 auto; overflow: hidden;
  background: #2d3933; color: var(--te-text);
  border-radius: 18px; font: 500 14px/1.45 var(--font-body,Manrope,Arial,sans-serif);
}
.trip-editor *, .trip-editor *::before, .trip-editor *::after {box-sizing: border-box;}
.trip-editor :is(input,select,button) {font: inherit;}
.trip-editor button {cursor: pointer; color: inherit;}
.trip-editor button:disabled {opacity: .35; cursor: default;}
.trip-editor :focus-visible {outline: 2px solid #efdab4; outline-offset: 2px;}
.te-head,.te-tabs,.te-footer,.te-listbar,.te-list-foot,.te-btn,.te-day-select,.te-check,.te-estimates summary {display: flex; align-items: center;}
.te-head {gap: 12px; padding: 20px 24px 17px;}
.te-head h2 {margin: 0; font: 650 clamp(23px,3vw,29px)/1.15 var(--font-display,Montserrat,Arial,sans-serif); letter-spacing: -.045em;}
.te-head-icon,.te-empty-icon {display: grid; place-items: center; background: #405046; color: #ede2ca; border: 1px solid var(--te-border); border-radius: 12px;}
.te-head-icon {width: 42px; height: 42px;}
.te-btn {justify-content: center; gap: 7px; line-height: 1.1; min-height: 38px; padding: 8px 11px; border: 1px solid transparent; border-radius: 9px; background: transparent;}
.trip-editor .te-btn:not(:disabled):hover {background: rgb(237 230 208 / .11);}
.te-head .te-close {margin-left: auto; width: 36px; height: 36px; padding: 0; color: var(--te-muted);}
.te-tabs {gap: 3px; background: #26322d; border: 1px solid var(--te-border); border-radius: 12px; margin: 0 24px 12px; padding: 3px;}
.te-tabs button {flex: 1; padding: 8px 5px; background: transparent; border: 0; border-radius: 8px; color: var(--te-muted); font-weight: 650;}
.te-tabs button.te-active {background: #e9d8c8; color: #302e28;}
.te-main {flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-color: #667368 transparent; padding: 3px 24px 15px;}
.te-footer {border-top: 1px solid var(--te-border); display: flex; justify-content: space-between; gap: 8px; padding: 13px 24px 16px;}
.trip-editor .te-light {background: var(--te-cream); color: #2b322c; border-radius: 22px; padding: 10px 18px; font-weight: 700;}
.trip-editor .te-light:not(:disabled):hover {background: #f2e4d7;}
.te-share,.te-mild {border-color: var(--te-border); border-radius: 22px;}
.te-subtle {color: var(--te-muted)!important; font-size: 12px!important;}
.te-listbar {justify-content: space-between; min-height: 36px; gap: 10px;}
.te-listbar strong,.te-section h3,.te-estimates h4 {margin: 0; font-size: 15px; font-weight: 700;}
.te-day-select {gap: 6px; color: var(--te-muted);}
.te-day-select svg{width: 15px;}
.te-day-select select,.te-form input,.te-form select,.te-cost-input input {color: var(--te-text); background: #35433b; border: 1px solid var(--te-border); border-radius: 8px; color-scheme: dark;}
.te-day-select select {padding: 5px; max-width: 150px; background: #29362f;}
.te-day-label {margin: 15px 0 5px; color: #dfc8ac; font-size: 12px; font-weight: 700;}
.te-stop {display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--te-border);}
.te-num {width: 26px; height: 26px; display: grid; place-items: center; background: #e9d8c8; color: #26332d; border-radius: 50%; font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 750;}
.te-stop-copy b,.te-stop-copy small {display: block; overflow-wrap: anywhere;}
.te-stop-copy b {font-size: 15px; line-height: 1.32;}
.te-stop-copy small {color: var(--te-muted); font-size: 12px; margin-top: 3px;}
.te-row-actions {display: flex; gap: 0;}
.te-row-actions .te-btn {width: 29px; min-height: 31px; padding: 0;color: var(--te-muted);}
.te-row-actions .te-btn svg {width: 15px;}
.te-list-foot {justify-content: space-between; gap: 5px; margin-top: 14px;}
.te-advice,.te-estimates p {font-size: 12px; line-height: 1.45; color: var(--te-muted); margin: 10px 0 3px;}
.te-empty {display: grid; justify-items: center; text-align: center; padding: 22px 10px; gap: 8px;}
.te-empty-icon {height: 54px; width: 54px; border-radius: 16px; margin-bottom: 4px;}
.te-empty h3 {margin: 0; font: 600 21px/1.23 var(--font-display,Montserrat,Arial,sans-serif); letter-spacing: -.025em;}
.te-empty p {margin: 0 0 7px; color: var(--te-muted);}
.te-form {display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 14px; margin-top: 12px;}
.te-field {display: grid; align-content: start; gap: 5px; min-width: 0;}
.te-field span,.te-totals span {font-size: 12px; color: var(--te-muted);}
.te-form input,.te-form select {width: 100%; min-width: 0; padding: 8px 10px;}
.te-check {gap: 7px; margin-top: 12px; color: var(--te-muted);}
.te-check input {width: 16px; height: 16px; accent-color: #e6c9a6;}
.te-totals {display: grid; grid-template-columns: 1fr 1fr; border-radius: 13px; background: #38463d; border: 1px solid var(--te-border);}
.te-totals div {display: grid; align-content: start; padding: 12px 14px; gap: 3px; min-width: 0;}
.te-totals div+div {border-left: 1px solid var(--te-border);}
.te-totals strong {font-size: 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.3;}
.te-breakdown {margin: 14px 0;}
.te-breakdown>div {display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--te-border); padding: 6px 0; font-size: 13px;}
.te-breakdown>div>span:last-child {text-align: right; color: var(--te-muted);}
.te-estimates summary {gap: 8px; color: var(--te-cream); cursor: pointer; width: fit-content; padding: 6px 0;}
.te-estimates h4 {font-size: 13px; margin: 13px 0 4px;}
.te-cost-input {display: grid; grid-template-columns: minmax(130px,1fr) repeat(2,minmax(60px,.45fr)); gap: 7px; align-items: center; margin-top: 6px;}
.te-cost-input span {font-size: 12px;}
.te-cost-input input {width: 100%; min-width: 0; padding: 5px 8px; font-size: 13px;}
@media (max-width:520px) {
  .trip-editor {max-height: 84dvh; width: 100%;}
  .te-head{padding:16px 14px 12px;gap:8px;}.te-tabs{margin:0 14px 10px;}.te-main{padding:2px 14px 12px;}.te-footer{padding:10px 14px;}
  .te-head-icon{width:34px;height:34px;}
  .te-stop{gap:5px;grid-template-columns:23px minmax(0,1fr) auto;}.te-num{width:21px;height:21px;}
  .te-row-actions .te-btn{width:23px;}
  .te-stop-copy b{font-size:13px;}.te-list-foot{flex-wrap:wrap;}
  .te-cost-input{grid-template-columns:minmax(90px,1fr) repeat(2,minmax(46px,.45fr));}
}
.te-read-settings {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 16px;margin:7px 0 12px;}
.te-read-settings dt {font-size:12px;color:var(--te-muted);}
.te-read-settings dd {margin:3px 0 0;font-size:15px;color:var(--te-text);overflow-wrap:anywhere;}
.te-save-error {margin:0;padding:8px 24px;color:#f3c7ad;font-size:13px;}
.trip-editor[aria-busy="true"] {cursor:progress;opacity:.85;}
