@media(max-width:799px){body{padding-bottom:116px}.bottom-nav{height:104px;padding:4px 2px max(18px,env(safe-area-inset-bottom));align-items:flex-start}.nav-button{width:19%;min-height:70px;padding:7px 3px;font-size:.78rem;font-weight:800;line-height:1.25}.nav-button span{height:32px;font-size:1.55rem}.nav-button.active{background:#eef5f1;border-radius:14px}.add-main{width:64px;height:64px;margin-top:-15px}}
@media(max-width:799px){html.homegopher-native body{padding-bottom:148px}html.homegopher-native .bottom-nav{bottom:32px}html.homegopher-native #toast{bottom:132px}}
.test-mode-banner{position:sticky;top:0;z-index:5;margin:0 0 12px;padding:9px 12px;border-radius:12px;background:#fff0d8;color:#7c481c;text-align:center;font-size:.78rem;font-weight:900;letter-spacing:.08em}.test-plan-buttons{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.test-plan-buttons button{padding:12px 6px}.test-plan-buttons button.active{background:var(--green);color:#fff}.upgrade-panel{max-width:480px}
.add-inventory-button{background:var(--orange)!important;color:#fff!important}.topbar .icon-button{width:auto;height:48px;padding:0 15px;font-size:.88rem;white-space:nowrap}.topbar .icon-button span{font-size:1.35rem;vertical-align:-1px}.administrator-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}.administrator-stats div{background:var(--cream);border-radius:12px;padding:10px;text-align:center}.administrator-stats strong,.administrator-stats span{display:block}.administrator-stats span{font-size:.72rem;color:var(--muted)}
@media(max-width:420px){.topbar .icon-button{max-width:170px;height:auto;min-height:48px;line-height:1.1}.administrator-stats{grid-template-columns:1fr}}
.household-choices{margin:14px 0}.household-choices h4,.household-members-title{margin:14px 0 8px}.household-choice{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;margin:8px 0;border:1px solid var(--line,#d9dedb);border-radius:12px;background:var(--cream,#f7f5ef)}.household-choice span:first-child{min-width:0}.household-choice strong,.household-choice small{display:block;overflow-wrap:anywhere}.household-choice small{margin-top:3px;color:var(--muted)}.household-member-card{display:block!important}.household-member-card .item-copy{display:block;min-width:0}.household-member-card strong{overflow-wrap:anywhere}.remove-member-button{display:block;width:100%;margin-top:10px;white-space:normal}
.profit-dashboard{margin-top:18px;padding-top:16px;border-top:1px solid #dbe4ed}.profit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.profit-metric{padding:12px;border-radius:14px;background:#f4f7fa;border:1px solid #dbe4ed}.profit-metric strong,.profit-metric span{display:block}.profit-metric strong{font-size:1.15rem;color:#102d45}.profit-metric span{font-size:.78rem;color:#607386;margin-top:3px}.profit-metric.profit-total{background:#eaf7ef;border-color:#b9dfc7}.profit-metric.loss-total{background:#fff1f1;border-color:#efc0c0}.profit-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.profit-controls label{font-size:.78rem;font-weight:700;color:#3d5367}.profit-controls input{width:100%;box-sizing:border-box;margin-top:5px}.profit-note{font-size:.82rem;color:#607386}@media(max-width:520px){.profit-grid,.profit-controls{grid-template-columns:1fr}}
.shopping-mode-card{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;margin:14px 0;padding:16px;border-radius:16px;background:#eef7f3;border:1px solid #c8ded5}.shopping-mode-card strong,.shopping-mode-card small{display:block}.shopping-mode-card small{margin-top:4px;color:var(--muted);line-height:1.35}.shopping-item.in-cart{border-color:#9fcdbb;background:#f1faf6}.check-button.checked{background:var(--green);color:#fff}.finish-shopping{margin-top:14px}.button-link{display:block;box-sizing:border-box;text-align:center;text-decoration:none}@media(max-width:480px){.shopping-mode-card{grid-template-columns:1fr}.shopping-mode-card button{width:100%}}
.guided-tour{position:fixed;inset:0;z-index:10000}.tour-shade{position:absolute;inset:0;background:transparent}.tour-focus{position:fixed;border:4px solid #ff9d3f;border-radius:18px;box-shadow:0 0 0 9999px rgba(8,25,22,.68),0 0 0 7px rgba(255,157,63,.25);background:rgba(255,255,255,.08);cursor:pointer;transition:all .22s ease;animation:tourPulse 1.35s ease-in-out infinite}.tour-card{position:fixed;left:12px;right:12px;z-index:2;max-width:430px;margin:auto;padding:20px;border-radius:18px;background:#fff;box-shadow:0 14px 45px rgba(0,0,0,.3)}.tour-card h2{margin:3px 0 8px}.tour-card p:not(.eyebrow){margin:0;color:var(--muted);line-height:1.45}.tour-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px}.tour-actions button{min-width:110px}.tour-focus:after{content:'Press here';position:absolute;left:50%;top:-34px;transform:translateX(-50%);padding:6px 10px;border-radius:10px;background:#ff9d3f;color:#26382e;font-size:.75rem;font-weight:900;white-space:nowrap}@keyframes tourPulse{50%{box-shadow:0 0 0 9999px rgba(8,25,22,.68),0 0 0 12px rgba(255,157,63,.12)}}.guided-tour.hidden{display:none!important}@media(prefers-reduced-motion:reduce){.tour-focus{transition:none;animation:none}}
.item-card-main{display:flex;align-items:center;gap:14px;min-width:0;flex:1;border:0;background:transparent;padding:0;text-align:left;color:var(--ink)}.quantity-controls{display:inline-flex;align-items:center;gap:7px;flex:0 0 auto}.quantity-controls button{display:grid;place-items:center;width:34px;height:34px;padding:0;border:1px solid #b8c7c2;border-radius:10px;background:#fff;color:var(--green);font-size:1.25rem;font-weight:900}.quantity-controls strong{min-width:22px;text-align:center}.remove-line{border:0;background:transparent;color:#84928e;font-size:1.45rem;padding:5px}.shopping-item .quantity-controls{margin-left:auto}@media(max-width:560px){.item-card,.shopping-item{gap:8px;padding:11px}.item-card .status{display:none}.item-icon{width:38px;height:38px}.quantity-controls{gap:4px}.quantity-controls button{width:31px;height:31px}.shopping-item .item-copy small{font-size:.72rem}}
.cart-purchase-details{display:grid;grid-template-columns:minmax(90px,.7fr) minmax(120px,1.3fr);gap:7px;width:100%;margin-top:8px}.cart-purchase-details label{font-size:.7rem;font-weight:800;color:var(--muted)}.cart-purchase-details input{width:100%;box-sizing:border-box;margin-top:3px;padding:8px 9px}.cart-subtotal{display:flex;justify-content:space-between;align-items:center;margin:12px 0 0;padding:12px 14px;border-radius:13px;background:#eef7f3;color:var(--ink)}.cart-subtotal strong:last-child{font-size:1.12rem}.expiration-review-list{display:grid;gap:10px;margin:14px 0}.expiration-review-item{padding:12px;border:1px solid var(--line,#d9dedb);border-radius:13px;background:var(--cream,#f7f5ef)}.expiration-review-item strong{display:block;margin-bottom:8px}.expiration-date-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}.expiration-date-fields label{font-size:.72rem;font-weight:800;color:var(--muted)}.expiration-date-fields select,.expiration-date-fields input{width:100%;box-sizing:border-box;margin-top:4px}@media(max-width:430px){.cart-purchase-details,.expiration-date-fields{grid-template-columns:1fr}}

/* Keep item names inside their column and reserve space for quantity controls. */
.item-card,.shopping-item{box-sizing:border-box;min-width:0}
.item-card-main{flex:1 1 0%;min-width:0}
.item-card .item-copy,.shopping-item .item-copy{display:block;flex:1 1 0%;min-width:0}
.item-card .item-copy strong,.shopping-item .item-copy strong{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.3}
.item-card .item-copy small,.shopping-item .item-copy small{white-space:normal;overflow-wrap:anywhere}
.item-card .item-icon,.shopping-item .check-button,.item-card .status{flex-shrink:0}
.item-card .quantity-controls,.shopping-item .quantity-controls{flex:0 0 auto;white-space:nowrap}
.quantity-controls button,.quantity-controls strong{flex-shrink:0}
.cart-purchase-details input{box-sizing:border-box;min-width:0;max-width:100%}

.item-location-icon{display:inline-block;margin-right:3px;font-size:1rem;vertical-align:middle}

/* Matched inventory and shopping headings approved in the preview. */
.inventory-list-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0}
.inventory-list-heading .list-heading-copy{min-width:0;flex:1}
.inventory-list-heading h2{font-family:inherit;font-size:1.7rem;font-weight:700;line-height:1.2;margin:0;color:var(--ink);letter-spacing:-.04em}
.inventory-list-heading .list-heading-subtitle{font-family:inherit;font-size:1.1rem;font-weight:700;font-style:normal;line-height:1.3;margin:7px 0 0;color:var(--ink);letter-spacing:-.04em;overflow-wrap:break-word}
.inventory-list-heading .primary-small{flex:0 0 auto;white-space:nowrap;padding:12px 15px}
.inventory-list-heading .inventory-actions{flex:0 0 auto}
@media(max-width:380px){.inventory-list-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.inventory-list-heading .list-heading-copy{display:contents}.inventory-list-heading h2{grid-column:1;grid-row:1;font-size:1.5rem}.inventory-list-heading .list-heading-subtitle{grid-column:1/-1;grid-row:2;margin-top:0}.inventory-list-heading>.primary-small,.inventory-list-heading>.inventory-actions{grid-column:2;grid-row:1}.inventory-list-heading .primary-small{padding:10px 12px}}
