/* ─── Design tokens ─────────────────────────────────────────────────────────── */
:root {
    --bg-primary: #f5f5f3;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0ed;
    --bg-input: #f0f0ed;
    --border: #e0e0d8;
    --border-hover: #c8c8c0;
    --text-primary: #2E3131;
    --text-secondary: #575955;
    --text-muted: #999;
    --accent: #F3C300;
    --accent-hover: #d4a900;
    --accent-glow: rgba(243, 195, 0, 0.15);
    --success: #00b377;
    --warning: #e09000;
    --danger: #e0303f;
    --info: #1a7fd4;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
    --header-h: 56px;
    --nav-h: 48px;
}

/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100dvh;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
svg { display: block; flex-shrink: 0; }

/* ─── Scrollbars ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ─── Header ─────────────────────────────────────────────────────────────────── */
.header {
    position: sticky; top: 0; z-index: 100;
    height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    gap: 12px;
}
.header-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-logo { font-size: 22px; line-height: 1; }
.header-title {
    font-size: 16px; font-weight: 700; letter-spacing: -0.3px;
    color: var(--text-primary);
}
.header-right { display: flex; align-items: center; gap: 4px; }

.connection-status {
    display: flex; align-items: center; gap: 5px;
    font-size: 11px; color: var(--text-muted);
    padding: 4px 8px; border-radius: 99px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.conn-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--text-muted);
    transition: background var(--transition);
}
.connection-status.connected .conn-dot { background: var(--success); box-shadow: 0 0 6px var(--success); }
.connection-status.connected .conn-label { color: var(--success); }
.connection-status.disconnected .conn-dot { background: var(--danger); }
.connection-status.disconnected .conn-label { color: var(--danger); }

.user-info { display: flex; align-items: center; gap: 7px; }
.user-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid var(--border);
    object-fit: cover;
    display: block;
}
.user-name { font-size: 13px; color: var(--text-secondary); display: none; }
@media (min-width: 480px) { .user-name { display: block; } }

/* Touch-target minimum 44×44 for icon buttons */
.btn-icon {
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    transition: color var(--transition), background var(--transition);
    flex-shrink: 0;
}
.btn-icon:hover { color: var(--text-primary); background: var(--bg-card-hover); }

/* ─── Store nav ──────────────────────────────────────────────────────────────── */
.store-nav {
    position: sticky; top: var(--header-h); z-index: 90;
    display: flex; align-items: stretch;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.store-nav::-webkit-scrollbar { display: none; }

.store-tabs { display: flex; align-items: stretch; flex: 1; }

.store-tab {
    position: relative;
    display: flex; align-items: center; gap: 6px;
    padding: 0 18px;
    height: var(--nav-h);
    font-size: 13px; font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    border: none; background: none;
    transition: color var(--transition);
    flex-shrink: 0;
}
.store-tab::after {
    content: '';
    position: absolute; bottom: 0; left: 16px; right: 16px;
    height: 2px; border-radius: 2px 2px 0 0;
    background: var(--accent);
    opacity: 0;
    transition: opacity var(--transition);
}
.store-tab:hover { color: var(--text-primary); }
.store-tab.active { color: var(--text-primary); }
.store-tab.active::after { opacity: 1; }

.tab-icon { font-size: 15px; }
.tab-name { letter-spacing: 0.3px; }
.tab-badge {
    font-size: 10px; font-weight: 700;
    min-width: 17px; height: 17px;
    padding: 0 4px;
    background: var(--accent); color: #000;
    border-radius: 99px;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}
.store-tab.has-need .tab-badge { opacity: 1; }

.btn-add-store {
    display: flex; align-items: center; gap: 6px;
    padding: 0 16px;
    height: var(--nav-h);
    font-size: 12px; font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    border-left: 1px solid var(--border);
    transition: color var(--transition);
}
.btn-add-store:hover { color: var(--accent); }

/* ─── Toolbar ────────────────────────────────────────────────────────────────── */
.toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 10px 16px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    /* toolbar height is variable due to chip wrapping; columns use padding-top instead of sticky offset */
}

.search-wrap {
    position: relative;
    display: flex; align-items: center;
    flex: 1; min-width: 160px; max-width: 320px;
}
.search-icon {
    position: absolute; left: 10px;
    color: var(--text-muted); pointer-events: none;
}
.search-input {
    width: 100%;
    height: 36px;
    padding: 0 32px 0 34px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    transition: border-color var(--transition);
    outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--accent); }
.search-clear {
    position: absolute; right: 8px;
    font-size: 16px; color: var(--text-muted);
    line-height: 1;
    padding: 8px 4px; /* larger touch target */
    transition: color var(--transition);
}
.search-clear:hover { color: var(--text-primary); }

.category-chips {
    display: flex; align-items: center; gap: 6px;
    flex-wrap: nowrap; overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    -ms-overflow-style: none;
}
.category-chips::-webkit-scrollbar { display: none; }

.chip {
    display: inline-flex; align-items: center;
    height: 32px; padding: 0 12px;
    font-size: 12px; font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 99px;
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
    flex-shrink: 0;
}
.chip:hover { color: var(--text-primary); border-color: var(--border-hover); }
.chip.active { color: #000; background: var(--accent); border-color: var(--accent); }

.btn-add-item {
    display: flex; align-items: center; gap: 6px;
    height: 36px; padding: 0 14px;
    font-size: 13px; font-weight: 600;
    color: #000;
    background: var(--accent);
    border-radius: var(--radius-sm);
    transition: background var(--transition), box-shadow var(--transition);
    flex-shrink: 0;
    margin-left: auto;
}
.btn-add-item:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

/* ─── Columns ────────────────────────────────────────────────────────────────── */
.columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: calc(100dvh - var(--header-h) - var(--nav-h) - 60px);
}

.column {
    padding: 0 12px 24px;
    border-right: 1px solid var(--border);
    min-height: 200px;
}
.column:last-child { border-right: none; }

.column-header {
    /* Not sticky — toolbar height is dynamic; scrolling columns is fine on mobile */
    display: flex; align-items: center; gap: 8px;
    padding: 12px 0 8px;
    background: var(--bg-primary);
}
.column-title {
    font-size: 11px; font-weight: 800;
    letter-spacing: 1.2px; text-transform: uppercase;
}
.have-title { color: var(--success); }
.need-title { color: var(--warning); }

.column-badge {
    font-size: 11px; font-weight: 700;
    min-width: 20px; height: 20px; padding: 0 5px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 99px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
}
.need-badge { background: rgba(255,170,0,0.12); border-color: rgba(255,170,0,0.3); color: var(--warning); }

/* ─── Item list & items ──────────────────────────────────────────────────────── */
.item-list { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }

.category-group {}
.category-label {
    font-size: 10px; font-weight: 700; letter-spacing: 0.8px;
    text-transform: uppercase; color: var(--text-muted);
    padding: 10px 0 4px;
}

.item-card {
    position: relative;
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.item-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}
.item-card:active { transform: scale(0.98); }

.item-card.need-card {
    border-color: rgba(255,170,0,0.25);
    background: rgba(255,170,0,0.05);
}
.item-card.need-card:hover {
    background: rgba(255,170,0,0.1);
    border-color: rgba(255,170,0,0.4);
}

.item-check {
    width: 20px; height: 20px; flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    transition: border-color var(--transition), background var(--transition);
}
.item-card:hover .item-check { border-color: var(--border-hover); }
.item-card.need-card .item-check { border-color: var(--warning); }
.item-check-inner {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--success);
    opacity: 0;
    transition: opacity var(--transition);
}
.item-card[data-status="have"] .item-check-inner { opacity: 1; }
.item-card[data-status="need"] .item-check { background: rgba(255,170,0,0.15); }

.item-body { flex: 1; min-width: 0; }
.item-name {
    font-size: 14px; font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.item-card.need-card .item-name { color: var(--accent); }
.item-notes {
    font-size: 11px; color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.item-actions {
    display: flex; align-items: center; gap: 4px;
    /* Always visible on touch devices; hover-only on desktop */
    opacity: 0;
    transition: opacity var(--transition);
}
.item-card:hover .item-actions { opacity: 1; }
/* Show edit button always on touch/mobile so it's discoverable */
@media (hover: none) {
    .item-actions { opacity: 1; }
}

/* Touch target: visually 28px but tap area is 44×44 via padding + negative margin */
.item-edit-btn {
    width: 28px; height: 28px;
    padding: 8px;
    margin: -8px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    color: var(--text-muted);
    transition: color var(--transition), background var(--transition);
}
.item-edit-btn:hover { color: var(--text-primary); background: var(--bg-primary); }

/* Dragging */
.item-card.dragging {
    opacity: 0.5;
    transform: scale(0.96);
}
.item-card.drag-over {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

/* Touch long-press hint */
.item-card.long-press-active {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(255,71,87,0.2);
}

/* ─── Item animations ────────────────────────────────────────────────────────── */
.item-card.toggling {
    animation: toggle-out 0.25s ease forwards;
}
@keyframes toggle-out {
    to { opacity: 0; transform: translateX(12px) scale(0.97); }
}
.item-card.entering {
    animation: toggle-in 0.25s ease forwards;
}
@keyframes toggle-in {
    from { opacity: 0; transform: translateX(-12px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

/* ─── Empty states ───────────────────────────────────────────────────────────── */
.empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}
.empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; font-weight: 500; }
.empty-sub { font-size: 12px; margin-top: 4px; }

/* ─── Toasts ─────────────────────────────────────────────────────────────────── */
.toast-container {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; gap: 8px;
    z-index: 9999;
    pointer-events: none;
    width: max-content; max-width: calc(100vw - 32px);
}
.toast {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 13px; font-weight: 500;
    color: var(--text-primary);
    animation: toast-in 0.25s ease;
    pointer-events: auto;
}
.toast.toast-success { border-color: rgba(0,214,143,0.35); }
.toast.toast-error { border-color: rgba(255,71,87,0.35); }
.toast.toast-info { border-color: rgba(51,154,240,0.35); }
.toast.toast-out { animation: toast-out 0.25s ease forwards; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: none; }
}
@keyframes toast-out {
    to { opacity: 0; transform: translateY(8px) scale(0.96); }
}
.toast-icon { font-size: 16px; }

/* ─── Modals ─────────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 500;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    padding: 16px;
    animation: overlay-in 0.15s ease;
}
@keyframes overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%; max-width: 480px;
    animation: modal-in 0.2s ease;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
}
.modal-sm { max-width: 360px; }
.modal-lg { max-width: 560px; }
@keyframes modal-in {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: none; }
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 20px 0;
}
.modal-title {
    font-size: 17px; font-weight: 700;
}
/* Touch-target 44×44 for modal close */
.modal-close {
    font-size: 22px; line-height: 1;
    color: var(--text-muted);
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    margin: -6px -6px -6px 0;
    transition: color var(--transition), background var(--transition);
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.modal-body { padding: 20px; }

/* ─── Forms ──────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label {
    display: block; margin-bottom: 6px;
    font-size: 12px; font-weight: 600;
    color: var(--text-secondary); letter-spacing: 0.3px;
}
.form-input {
    width: 100%; height: 44px;
    padding: 0 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition);
    -webkit-appearance: none;
    appearance: none;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }
.form-input-sm { width: 64px; }
select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23575955' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    padding-right: 32px;
}
select.form-input option { background: var(--bg-card); }

.modal-actions {
    display: flex; justify-content: flex-end; gap: 8px;
    margin-top: 20px; padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn-primary {
    height: 44px; padding: 0 18px;
    font-size: 13px; font-weight: 700;
    color: #000; background: var(--accent);
    border-radius: var(--radius-sm);
    transition: background var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.btn-secondary {
    height: 44px; padding: 0 18px;
    font-size: 13px; font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: color var(--transition), border-color var(--transition);
}
.btn-secondary:hover { color: var(--text-primary); border-color: var(--border-hover); }

.btn-danger {
    height: 44px; padding: 0 18px;
    font-size: 13px; font-weight: 700;
    color: #fff; background: var(--danger);
    border-radius: var(--radius-sm);
    transition: opacity var(--transition);
}
.btn-danger:hover { opacity: 0.85; }

.btn-danger-outline {
    height: 44px; padding: 0 18px;
    font-size: 13px; font-weight: 600;
    color: var(--danger);
    background: transparent;
    border: 1px solid var(--danger);
    border-radius: var(--radius-sm);
    transition: background var(--transition);
    margin-right: auto;
}
.btn-danger-outline:hover { background: rgba(255,71,87,0.1); }

.btn-sm { height: 36px; padding: 0 12px; font-size: 12px; }

/* ─── Settings modal ─────────────────────────────────────────────────────────── */
.settings-body { display: flex; flex-direction: column; gap: 24px; }
.settings-section { }
.settings-section-title {
    font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 10px;
}
.settings-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.settings-row {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-height: 44px;
}
.settings-row-icon { font-size: 16px; }
.settings-row-name { flex: 1; font-size: 14px; }
.settings-row-edit {
    height: 32px; padding: 0 12px;
    font-size: 11px; font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition);
    /* extra tap area handled by settings-row padding */
}
.settings-row-edit:hover { color: var(--text-primary); border-color: var(--border-hover); }
/* Touch-target: minimum 44×44 via padding */
.settings-row-delete {
    min-width: 44px; height: 44px; margin: -8px -4px -8px 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
}
.settings-row-delete:hover { color: var(--danger); background: rgba(255,71,87,0.1); }

.settings-add-form { display: flex; gap: 8px; }
.settings-add-form .form-input { flex: 1; }

.export-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── Confirm dialog ─────────────────────────────────────────────────────────── */
.confirm-message { font-size: 14px; color: var(--text-secondary); margin-bottom: 4px; }

/* ─── Login page ─────────────────────────────────────────────────────────────── */
.login-body {
    display: flex; align-items: center; justify-content: center;
    min-height: 100dvh;
    background: var(--bg-primary);
}
.login-container { width: 100%; max-width: 400px; padding: 24px; }
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px 32px;
    text-align: center;
}
.login-logo { margin-bottom: 32px; }
.login-logo-icon { font-size: 52px; display: block; margin-bottom: 12px; }
.login-title { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.login-subtitle { font-size: 14px; color: var(--text-secondary); }

.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; height: 48px;
    background: #fff; color: #3c4043;
    font-size: 15px; font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid #dadce0;
    margin-bottom: 16px;
    transition: box-shadow var(--transition), background var(--transition);
    cursor: pointer;
}
.btn-google:hover { background: #f8f9fa; box-shadow: 0 1px 6px rgba(0,0,0,0.2); }

.login-note { font-size: 12px; color: var(--text-muted); }

.error-banner {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; margin-bottom: 20px;
    background: rgba(255,71,87,0.1);
    border: 1px solid rgba(255,71,87,0.3);
    border-radius: var(--radius-sm);
    font-size: 13px; color: #ff6b6b;
    text-align: left;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .header-title { display: none; }
    .toolbar { padding: 8px 12px; gap: 6px; }
    .search-wrap { max-width: 100%; flex: 1; min-width: 0; }
    /* Move chips to their own scrollable row */
    .category-chips {
        order: 10;
        width: 100%;
        flex-basis: 100%;
        padding-bottom: 2px;
    }
    .btn-add-item { padding: 0 10px; font-size: 12px; flex-shrink: 0; }
    .columns { gap: 0; }
    .column { padding: 0 8px 20px; }
    .item-card { padding: 9px 10px; }
    .item-name { font-size: 13px; }
    .store-tab { padding: 0 12px; font-size: 12px; }
    /* Always show item actions on mobile */
    .item-actions { opacity: 1; }
}

@media (max-width: 375px) {
    .column { padding: 0 6px 16px; }
    .store-tab .tab-name { display: none; }
    .store-tab { padding: 0 10px; }
}

/* ─── Safe area (iPhone notch / home indicator) ──────────────────────────────── */
@supports (padding: env(safe-area-inset-top)) {
    .header {
        padding-top: env(safe-area-inset-top);
        height: calc(var(--header-h) + env(safe-area-inset-top));
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
    .store-nav {
        top: calc(var(--header-h) + env(safe-area-inset-top));
    }
    .toast-container { bottom: calc(24px + env(safe-area-inset-bottom)); }
    body { padding-bottom: env(safe-area-inset-bottom); }
}

/* ─── Store brand logos ───────────────────────────────────────────────────── */
.tab-icon img.brand-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}
.tab-icon { display: flex; align-items: center; justify-content: center; }
