/* Dynamic group-order additions: add/remove people, editable promos, fees, sharing. */
.person-row{gap:10px}
.person-row .amount-field{width:150px}
.amount-wrap{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.amount-hint{font-size:10px;color:#4a8a64;font-weight:600;min-height:0}
.amount-hint:empty{display:none}
.amount-field.invalid{border-color:#e0a27f;box-shadow:0 0 0 3px #fbeee5}
.icon-btn{flex:none;width:28px;height:28px;border-radius:8px;border:1px solid transparent;background:transparent;color:#a3ada3;font-size:18px;line-height:1;display:grid;place-items:center}
.icon-btn:hover:not(:disabled){background:#fbeee5;color:#bc6e37}
.icon-btn:disabled{opacity:.3;cursor:not-allowed}
.icon-btn:focus-visible,.ghost-btn:focus-visible,.text-btn:focus-visible,.primary-btn:focus-visible,.segmented button:focus-visible,.promo-card:focus-visible{outline:2px solid #31825a;outline-offset:2px}

.people-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 0 0}
.ghost-btn{border:1.5px dashed #b9cdbd;background:#f6faf5;color:#2d794f;font-weight:700;font-size:13px;border-radius:9px;padding:9px 14px}
.ghost-btn:hover:not(:disabled){border-style:solid;background:#e9f4ed}
.ghost-btn:disabled{opacity:.45;cursor:not-allowed}
.ghost-btn.small{padding:7px 11px;font-size:12px}
.text-btn{border:0;background:transparent;color:#8b978c;font-size:12px;font-weight:600;padding:6px 2px;text-decoration:underline;text-underline-offset:3px}
.text-btn:hover:not(:disabled){color:#24332a}
.text-btn.danger:hover:not(:disabled){color:#b4562a}
.text-btn:disabled{opacity:.4;cursor:not-allowed}
.hint-text{font-size:11px;color:#8b978c;margin:10px 0 0;line-height:1.6}
.hint-text code{background:#eef2e9;color:#3f6a4e;border-radius:4px;padding:1px 5px;font-size:11px}

.fees{margin-top:8px;border-top:1px solid #eff0ea}
.fees .delivery-row{padding-top:14px}
.select-field{height:38px;border:1px solid #e6e9e3;border-radius:8px;padding:0 10px;background:#fff;color:#24332a;font-weight:600;font-size:13px;max-width:210px}
.select-field:focus{outline:0;border-color:#4a9a6a;box-shadow:0 0 0 3px #e5f4e9}

.comparison{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.promo-label{overflow:hidden;text-overflow:ellipsis;min-width:0}
.promo-bottom.warn{color:#bc6e37;font-weight:600}

.promo-editor{margin-top:16px;padding:16px;border-radius:13px;background:#f7f9f5;border:1px solid #e7ece4}
.editor-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px}
.editor-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.editor-field.wide{grid-column:1/-1}
.editor-label{font-size:11px;font-weight:700;color:#536357}
.editor-label i{font-style:normal;font-weight:500;color:#9ca69d}
.editor-field .amount-field{width:100%;background:#fff}
.editor-field .name-field input{text-align:left}
.segmented{display:inline-flex;background:#e9eee6;border-radius:9px;padding:3px;gap:3px;width:max-content}
.segmented button{border:0;background:transparent;border-radius:7px;padding:7px 12px;font-size:12px;font-weight:700;color:#5d6d61}
.segmented button[aria-checked="true"]{background:#fff;color:#245e42;box-shadow:0 1px 3px rgba(31,55,36,.12)}

.split-row.muted{opacity:.5}
.split-amount small s{color:#aab3a8}
.share-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;flex-wrap:wrap}
.savings{font-size:12px;font-weight:700;color:#bc6e37}
.primary-btn{border:0;background:#1b6647;color:#fff;font-weight:700;font-size:13px;border-radius:9px;padding:11px 16px}
.primary-btn:hover{background:#155238}

.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);background:#24332a;color:#fff;font-size:13px;font-weight:600;padding:11px 16px;border-radius:10px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;max-width:calc(100% - 32px)}
.toast.show{opacity:1;transform:translate(-50%,0)}

@media(max-width:650px){
  .shell{padding:0 16px}
  .comparison{grid-template-columns:1fr 1fr}
  .editor-grid{grid-template-columns:1fr}
  .amount-field,.person-row .amount-field{width:118px;padding:0 8px}
  .person-row{gap:6px}
  .person-name{gap:8px}
  .person-row .avatar{width:26px;height:26px;border-radius:7px;font-size:9px}
  .icon-btn{width:22px}
  .delivery-row{flex-wrap:wrap}
  .select-field{max-width:100%}
  .intro h1{font-size:clamp(36px,11vw,49px);letter-spacing:-2px}
}
@media(max-width:380px){.comparison{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.toast,.promo-card{transition:none}}

/* Budget suggestion */
.budget-panel{padding:29px 28px 26px}
.budget-head{margin-bottom:14px}
.budget-main{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px}
.budget-main strong{font-family:'Space Grotesk',sans-serif;font-size:36px;letter-spacing:-1.8px;color:#1c6244}
.budget-main span{font-size:13px;font-weight:700;color:#536357}
.budget-main small{font-size:12px;color:#8b978c;width:100%}
.budget-explain{font-size:12px;line-height:1.65;color:#68736a;margin:10px 0 0}
.budget-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}
.budget-stats div{background:#f7f9f5;border:1px solid #e7ece4;border-radius:10px;padding:9px 10px;display:flex;flex-direction:column;gap:3px;min-width:0}
.budget-stats span{font-size:10px;color:#8b978c;font-weight:600}
.budget-stats b{font-family:'Space Grotesk',sans-serif;font-size:14px;color:#24332a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.meter{margin-top:22px;padding-top:4px}
.meter-track{position:relative;height:10px;border-radius:10px;background:#eef1ea}
.meter-fill{height:100%;border-radius:10px;background:#9db8a5;transition:width .25s}
.meter-fill.good{background:#3d8c5f}
.meter-fill.warn{background:#de8351}
.meter-mark{position:absolute;top:-5px;bottom:-5px;width:2px;background:#24332a;transform:translateX(-1px)}
.meter-mark.min{background:#a3ada3}
.meter-mark i{position:absolute;top:-17px;left:50%;transform:translateX(-50%);font-style:normal;font-size:9px;font-weight:700;letter-spacing:.8px;text-transform:uppercase;color:#536357;white-space:nowrap}
.meter-mark.min i{color:#9ca69d}
.budget-status{font-size:12px;font-weight:600;color:#68736a;margin:12px 0 0;line-height:1.55}
.budget-status.good{color:#2d794f}
.budget-status.warn{color:#bc6e37}
.budget-compare{margin-top:18px;border-top:1px solid #eff0ea;padding-top:8px}
.budget-compare-head,.budget-compare-row{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:8px;align-items:center}
.budget-compare-head{font-size:9px;font-weight:700;letter-spacing:1.2px;color:#9ca69d;padding:6px 8px}
.budget-compare-head span:not(:first-child),.budget-compare-row>:not(:first-child){text-align:right}
.budget-compare-row{width:100%;border:0;background:transparent;border-radius:8px;padding:9px 8px;font-size:12px;color:#536357;text-align:left}
.budget-compare-row span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.budget-compare-row b{font-family:'Space Grotesk',sans-serif;color:#24332a;white-space:nowrap}
.budget-compare-row:hover{background:#f6faf5}
.budget-compare-row.active{background:#eef5ee}
.budget-compare-row:focus-visible{outline:2px solid #31825a;outline-offset:1px}
.amount-hint.over{color:#bc6e37}
@media(max-width:650px){.budget-panel{padding-left:19px;padding-right:19px}.budget-main strong{font-size:30px}.budget-stats b{font-size:12px}}
@media(prefers-reduced-motion:reduce){.meter-fill{transition:none}}
