:root {
    --brand: #8a1d2b;
    --brand-dark: #6e1722;
    --brand-tint: #fbf3f4;
    --ink: #1c1917;
    --muted: #78716c;
    --line: #e7e5e0;
    --line-strong: #d6d3ce;
    --bg: #faf8f4;
    --card: #ffffff;
    --accent: #b48438;
    --ok: #1a7f37;
    --ok-bg: #e6f6ea;
    --bad: #cf222e;
    --bad-bg: #fdecee;
    --warn: #92400e;
    --warn-bg: #fef3c7;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(28,25,23,.04), 0 4px 14px rgba(28,25,23,.05);
    --shadow-lg: 0 4px 8px rgba(28,25,23,.06), 0 12px 28px rgba(28,25,23,.08);
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Hoefler Text", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

/* Typography — serif for emphasis, sans for body */
h1, h2 { font-family: var(--serif); letter-spacing: -.01em; line-height: 1.15; font-weight: 700; }
h3 { font-family: var(--serif); letter-spacing: -.005em; line-height: 1.25; font-weight: 700; }
h1 { font-size: 1.9rem; margin: 0 0 .25em; }
h2 { font-size: 1.4rem; margin: 0 0 .3em; }
h3 { font-size: 1.1rem; margin: 0 0 .35em; }

code { background: #f1ede6; padding: 2px 7px; border-radius: 5px; font-size: .9em; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.num { text-align: right; }
.mt { margin-top: 16px; }

/* Layout */
.container { max-width: 1024px; margin: 0 auto; padding: 28px 20px 80px; }
.topbar {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 50;
}
.topbar-inner { max-width: 1024px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--ink); font-size: 1.15rem; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-logo { height: 34px; width: auto; border-radius: 8px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink); padding: 8px 14px; border-radius: 8px; font-size: .95rem; font-weight: 500; transition: background .15s ease; }
.nav a:hover { background: var(--brand-tint); color: var(--brand); text-decoration: none; }
.nav-logout button, .nav-logout { margin: 0; }
.nav-logout button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px 14px; font-size: .95rem; font-weight: 500; border-radius: 8px; transition: color .15s ease, background .15s ease; }
.nav-logout button:hover { color: var(--brand); background: var(--brand-tint); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 1.2rem; padding: 6px 12px; cursor: pointer; color: var(--ink); }

.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .9rem; margin-top: 40px; background: var(--card); text-align: center; }
.footer .container { padding-top: 0; padding-bottom: 0; }
.footer a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); }
.footer a:hover { color: var(--brand); }

/* Flash */
.flashes { max-width: 1024px; margin: 16px auto 0; padding: 0 20px; }
.flash { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 10px; font-size: .95rem; border: 1px solid; }
.flash-success { background: var(--ok-bg); border-color: #b7e0c1; color: var(--ok); }
.flash-error { background: var(--bad-bg); border-color: #f3c2c8; color: var(--bad); }
.flash-info { background: var(--brand-tint); border-color: #f0d8db; color: var(--brand-dark); }
.inline-note { padding: 7px 10px; margin-top: 6px; border-radius: 6px; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 20px; box-shadow: var(--shadow); }
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.page-head { margin-bottom: 22px; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { margin: 4px 0; }
.page-head.between { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    border: 1px solid var(--brand);
    border-radius: var(--radius-sm);
    padding: 12px 22px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    line-height: 1.2;
    transition: background .15s ease, transform .08s ease, box-shadow .15s ease;
    font-family: inherit;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(138,29,43,.18); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-lg { padding: 15px 30px; font-size: 1.08rem; }
.btn-block { display: block; width: 100%; margin-top: 10px; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--brand-tint); color: var(--brand-dark); border-color: var(--brand); box-shadow: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.btn-link { font-weight: 600; }
.link-btn { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 0; font-size: .95rem; font-family: inherit; }
.link-btn:hover { color: var(--brand-dark); text-decoration: underline; }
.link-btn.danger { color: var(--bad); }

/* Forms */
label { display: block; font-weight: 600; margin: 16px 0 6px; font-size: .95rem; color: var(--ink); }
input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(138,29,43,.12); }
input[type=color] { height: 48px; padding: 4px; }
input[type=file] { border: 2px dashed var(--line-strong); background: var(--bg); padding: 14px; cursor: pointer; }
input[type=file]:hover { border-color: var(--brand); background: var(--brand-tint); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.inline-form { display: flex; gap: 10px; align-items: stretch; }
.inline-form input { flex: 1; }
.inline-suffix { display: flex; align-items: center; gap: 8px; }
.inline-suffix input { flex: 1; }
.inline-suffix span { color: var(--muted); font-size: .95rem; }
.logo-preview { max-height: 84px; border-radius: var(--radius-sm); border: 1px solid var(--line); margin-bottom: 10px; display: block; padding: 6px; background: #fff; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.row-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }

/* Tags */
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: #f1ede6; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tag-approved, .tag-paid { background: var(--ok-bg); color: var(--ok); }
.tag-rejected, .tag-canceled { background: var(--bad-bg); color: var(--bad); }
.tag-submitted, .tag-pending { background: var(--warn-bg); color: var(--warn); }
.tag-draft, .tag-refunded { background: #f1ede6; color: var(--muted); }
.tag-used { background: var(--ink); color: #fff; }

/* Marketing / hero (root site) */
.hero { text-align: center; padding: 60px 0 30px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 0 0 16px; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 680px; margin: 0 auto 16px; line-height: 1.55; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px 0; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.feature h3 { margin-top: 0; color: var(--brand); }
.chamber-list { list-style: none; padding: 0; }
.chamber-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.chamber-list li:last-child { border-bottom: 0; }

/* Chamber storefront — the big public-facing wow */
.storefront-hero {
    text-align: center;
    padding: 40px 20px 30px;
    background: linear-gradient(180deg, var(--brand-tint) 0%, transparent 100%);
    margin: -28px -20px 30px;
    border-radius: 0 0 var(--radius) var(--radius);
    position: relative;
}
.storefront-hero h1 { font-size: clamp(2.1rem, 5vw + .3rem, 3.4rem); margin: 0 0 14px; color: var(--ink); }
.storefront-hero .lead { font-size: 1.25rem; color: var(--ink); margin-bottom: 14px; }
.storefront-hero p.muted { max-width: 640px; margin: 0 auto 22px; }
.stat-row {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 32px 0;
    flex-wrap: wrap;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 12px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow);
}
.stat { display: flex; flex-direction: column; align-items: center; padding: 4px 36px; position: relative; }
.stat + .stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12%;
    bottom: 12%;
    width: 1px;
    background: var(--line);
}
.stat-n { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; color: var(--brand); line-height: 1; }
.stat-l { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; font-weight: 600; }
.cta { margin: 30px 0 8px; }
.cta form { margin: 0; }
.cta .muted { margin-top: 12px; }
.badge { display: inline-block; background: var(--warn-bg); color: var(--warn); padding: 10px 18px; border-radius: 999px; font-weight: 600; }
.category-index { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.category-index li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.cat-name { font-weight: 500; }
.cat-count { background: var(--brand); color: #fff; border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: .85rem; min-width: 32px; text-align: center; }

/* Stat grids (dashboards) */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow);
    transition: border-color .15s ease, transform .08s ease, box-shadow .15s ease;
}
.stat-card.link { color: var(--ink); }
.stat-card.link:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card .stat-n { font-size: 1.9rem; color: var(--brand); }
.stat-card .stat-l { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }

/* Wallet */
.search { margin-bottom: 24px; }
.search input { background: #fff; border-radius: 999px; padding: 14px 22px; font-size: 1.02rem; }
.wallet-cat { margin-bottom: 36px; }
.cat-heading { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 6px; letter-spacing: -.005em; }
.coupon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 18px; }
.coupon-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    position: relative;
    color: var(--ink);
    box-shadow: var(--shadow);
    transition: border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.coupon-card:hover { border-color: var(--brand); text-decoration: none; color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.coupon-card.is-redeemed { opacity: .55; }
.coupon-logo { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; flex-shrink: 0; background: var(--bg); padding: 4px; }
.coupon-body { min-width: 0; }
.coupon-biz { font-weight: 700; font-size: 1rem; }
.coupon-desc { font-size: .9rem; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.coupon-card .tag-used { position: absolute; top: 10px; right: 10px; }
.no-results { text-align: center; }

/* Coupon detail — "premium ticket" aesthetic */
.back-link { display: inline-block; margin-bottom: 14px; color: var(--muted); font-weight: 500; }
.back-link:hover { color: var(--brand); }
.coupon-detail { max-width: 480px; margin: 0 auto; }
.coupon-front {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 32px 28px 28px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    border-bottom: 0;
}
.detail-logo { max-height: 72px; max-width: 200px; object-fit: contain; margin: 0 auto 14px; display: block; }
.coupon-front h1 { font-size: 1.7rem; margin: 12px 0 6px; }
.offer {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 16px 0 14px;
    line-height: 1.3;
    color: var(--ink);
}
.coupon-meta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; align-items: center; margin: 14px 0 18px; }
.meta-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.meta-item { color: var(--muted); font-size: .88rem; }
.biz-contact {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: .9rem;
    margin-top: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.store-code-input {
    width: 100%;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: .15em;
    text-transform: uppercase;
    margin: 18px 0 14px;
    padding: 16px 12px;
    border: 2px solid var(--line-strong);
    background: var(--bg);
}
.store-code-input:focus { background: #fff; border-color: var(--brand); }

/* The redeem panel = the "tear-off" half of the ticket */
.redeem-panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-top: 2px dashed var(--line-strong);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 28px;
    text-align: center;
    margin: 0 0 18px;
    position: relative;
    box-shadow: var(--shadow);
}
/* Notches that suggest a perforation line where the ticket tears */
.redeem-panel::before, .redeem-panel::after {
    content: "";
    position: absolute;
    top: -10px;
    width: 18px;
    height: 18px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 50%;
}
.redeem-panel::before { left: -10px; }
.redeem-panel::after { right: -10px; }
.redeem-panel h2 { font-size: 1.2rem; margin: 0 0 14px; color: var(--ink); }
.redeem-panel.used { border-color: var(--ok); border-top-style: solid; background: var(--ok-bg); }
.redeem-panel.used h2 { color: var(--ok); }
.qr-box { display: flex; align-items: center; justify-content: center; min-height: 240px; }
.qr-box canvas { border-radius: 8px; }
.code-box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: clamp(3rem, 12vw, 4.8rem);
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--brand);
    line-height: 1;
}
.big-check { font-size: 3.4rem; color: var(--ok); line-height: 1; }
.manual { margin-top: 16px; text-align: left; }
.manual summary { cursor: pointer; color: var(--brand); font-size: .92rem; font-weight: 500; padding: 4px 0; }
.manual summary:hover { color: var(--brand-dark); }
.token-box { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; margin-top: 8px; word-break: break-all; background: var(--bg); }
.qr-status { margin-top: 12px; }
.coupon-back { margin-top: 22px; padding: 22px 24px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.coupon-back h3 { font-family: var(--sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.disclaimers { font-size: .82rem; color: var(--muted); padding-left: 20px; margin: 0; line-height: 1.5; }
.disclaimers li { margin: 4px 0; }

/* Approvals */
.approval { display: flex; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.approval-body { flex: 1; min-width: 260px; }
.approval-actions { display: flex; flex-direction: column; gap: 12px; min-width: 240px; }
.approval-actions form { margin: 0; }
.reject-form { display: flex; gap: 8px; }
.reject-form input { flex: 1; }

/* Bars */
.bar-list { list-style: none; padding: 0; margin: 0; }
.bar-list li { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.bar-label { width: 38%; font-size: .92rem; }
.bar { flex: 1; background: var(--bg); border-radius: 999px; height: 12px; overflow: hidden; border: 1px solid var(--line); }
.bar span { display: block; height: 100%; background: var(--brand); }
.bar-n { width: 34px; text-align: right; font-weight: 700; color: var(--ink); }

/* Lists */
.simple-list { list-style: none; padding: 0; margin: 0; }
.simple-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.simple-list li:last-child { border-bottom: 0; }
.simple-list form { margin: 0; }

/* Merchant scanner */
.reader { max-width: 360px; margin: 0 auto 18px; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--brand); }
.result { max-width: 440px; margin: 22px auto 0; padding: 28px; border-radius: var(--radius); text-align: center; border: 1px solid; }
.result-ok { background: var(--ok-bg); border-color: #b7e0c1; }
.result-bad { background: var(--bad-bg); border-color: #f3c2c8; }
.result-icon { font-size: 2.8rem; line-height: 1; margin-bottom: 8px; }
.result-ok .result-icon { color: var(--ok); }
.result-bad .result-icon { color: var(--bad); }
.result h2 { margin: 4px 0 8px; }

/* Errors */
.error-code { font-family: var(--serif); font-size: 4rem; color: var(--brand); margin: 0; line-height: 1; }

/* PWA install prompt (consumer wallet) */
.install-prompt {
    background: linear-gradient(135deg, var(--brand-tint) 0%, #fff 100%);
    border: 1px solid #f0d8db;
    border-radius: var(--radius);
    padding: 14px 18px;
    margin: 0 0 22px;
    box-shadow: var(--shadow);
}
.install-content { display: flex; align-items: center; gap: 14px; }
.install-icon { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.install-text { flex: 1; min-width: 0; line-height: 1.35; }
.install-text strong { display: block; font-size: 1rem; color: var(--ink); font-weight: 700; }
.install-text span { display: block; font-size: .88rem; color: var(--muted); }
.install-prompt .btn { flex-shrink: 0; padding: 10px 18px; font-size: .95rem; }
.install-dismiss {
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    flex-shrink: 0;
    border-radius: 6px;
    transition: color .15s ease, background .15s ease;
}
.install-dismiss:hover { color: var(--ink); background: rgba(0,0,0,.05); }

/* Modal (iOS install instructions) */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(28,25,23,.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 200;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn .15s ease;
}
.modal-overlay[hidden] { display: none; }
.modal {
    background: var(--card);
    border-radius: var(--radius);
    padding: 30px 28px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: rise .18s ease;
}
.modal h3 { margin: 0 0 16px; font-size: 1.3rem; }
.modal ol { padding-left: 22px; margin: 0 0 18px; line-height: 1.75; color: var(--ink); }
.modal ol li { margin: 8px 0; }
.modal p.muted { margin: 0 0 18px; }
.share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #007aff;
    color: #fff;
    border-radius: 5px;
    width: 22px;
    height: 22px;
    vertical-align: -5px;
    font-size: .95rem;
    font-weight: 700;
    margin: 0 2px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 720px) {
    .container { padding: 22px 16px 60px; }
    .topbar-inner { padding: 12px 16px; }
    .features { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .nav-toggle { display: block; }
    .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-top: 8px; }
    body.nav-open .nav { display: flex; }
    .nav a, .nav-logout button { width: 100%; text-align: left; padding: 12px 14px; border-radius: 0; border-bottom: 1px solid var(--line); }
    .approval-actions { min-width: 100%; }
    .storefront-hero { padding: 28px 16px 22px; margin: -22px -16px 24px; }
    .stat { padding: 4px 22px; }
    .stat-n { font-size: 1.8rem; }
    h1 { font-size: 1.65rem; }
    h2 { font-size: 1.25rem; }

    /* Install banner stacks the install button below the text on narrow phones */
    .install-content { flex-wrap: wrap; }
    .install-text { flex-basis: calc(100% - 100px); }
    .install-dismiss { order: 99; }
    .install-prompt .btn { flex-basis: 100%; margin-top: 4px; }
}

/* --- Act-as-member (chamber admin impersonation) ------------------------- */
.impersonation-bar {
    position: sticky; top: 0; z-index: 60;
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
    gap: 8px 16px;
    background: var(--brand); color: #fff;
    padding: 8px 20px; font-size: .92rem; font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.impersonation-bar form { margin: 0; }
.impersonation-bar button {
    background: #fff; color: var(--brand); border: 0;
    padding: 5px 14px; border-radius: var(--radius-sm); font-weight: 700; cursor: pointer;
}
.impersonation-bar button:hover { background: rgba(255,255,255,.85); }
.impersonation-bar + .topbar { top: 0; }

.btn-secondary {
    background: #fff; color: var(--brand); border-color: var(--brand);
}
.btn-secondary:hover {
    background: var(--brand-tint); color: var(--brand-dark);
    border-color: var(--brand-dark); box-shadow: none;
}
