:root {
    --cream: #FAF5EE;
    --cream-2: #F2E9DA;
    --espresso: #2B1810;
    --olive: #4A542D;
    --olive-dark: #3A4222;
    --amber: var(--olive);
    --gold: #C9A66B;
    --forest: #1F4E3C;
    --whatsapp: #25D366;
    --radius: 18px;
    --shadow: 0 8px 24px rgba(43, 24, 16, 0.08);
    --max-width: 420px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--espresso);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    margin: 0 0 0.4em;
    letter-spacing: -0.01em;
}

p { margin: 0 0 0.6em; line-height: 1.5; }
.muted { color: rgba(43, 24, 16, 0.66); }
.small { font-size: 0.85rem; }
em { font-style: normal; color: rgba(43, 24, 16, 0.5); font-weight: 400; }

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Public shell (signup) ---------- */
.public-shell {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 10px 10px 60px;
}
.signup-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px 10px;
    box-shadow: var(--shadow);
}
.signup-header { text-align: center; margin-bottom: 24px; }
.logo-mark {
    width: 96px; height: 96px;
    border-radius: 50%;
    background: var(--espresso);
    color: var(--cream);
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 24px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
    overflow: hidden;
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.logo-mark.logo-bare { background: transparent; }
.signup-header h1 { font-size: 1.7rem; margin-bottom: 4px; }
.signup-header p { color: rgba(43, 24, 16, 0.7); font-size: 0.92rem; margin: 4px 0 0; }

/* Slider on the public signup page sits inside .signup-card, so trim its
   default vertical spacing and tighten the bottom margin. */
.home-slider-public { margin: 4px 0 18px; }
.home-slider-public .home-swiper { border-radius: 14px; }

.how-it-works {
    margin: 6px 0 22px;
    padding: 14px 16px;
    background: var(--cream);
    border-radius: 14px;
    border: 1px solid rgba(43, 24, 16, 0.08);
}
.how-it-works h2 {
    font-size: 0.95rem;
    margin: 0 0 10px;
    color: var(--espresso);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.how-it-works ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.how-it-works li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.how-it-works .step-num {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--olive);
    color: white;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1;
}
.how-it-works strong {
    display: block;
    font-size: 0.92rem;
    color: var(--espresso);
}
.how-it-works small {
    color: rgba(43, 24, 16, 0.62);
    font-size: 0.8rem;
    line-height: 1.35;
}

.welcome-campaign {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(201, 166, 107, 0.42);
    border-radius: 14px;
    background: #fff8e8;
    color: var(--espresso);
    padding: 12px 14px;
    margin: 0 0 20px;
}
.welcome-campaign-count {
    flex-shrink: 0;
    min-width: 56px;
    border-radius: 12px;
    background: var(--olive);
    color: white;
    padding: 8px 10px;
    text-align: center;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.welcome-campaign strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.9rem;
}
.welcome-campaign p {
    margin: 0;
    color: rgba(43, 24, 16, 0.68);
    font-size: 0.82rem;
    line-height: 1.35;
}

.signup-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 500; font-size: 0.92rem; }
.field input, .field select {
    padding: 12px 14px;
    border: 1px solid rgba(43, 24, 16, 0.18);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--cream);
    color: var(--espresso);
}
.field input:focus, .field select:focus {
    outline: 2px solid var(--amber);
    outline-offset: 1px;
    border-color: var(--amber);
}
.hint { color: rgba(43, 24, 16, 0.55); font-size: 0.8rem; }
.error { color: #B91C1C; font-size: 0.8rem; }

/* Phone field with a fixed +673 country-code prefix, so customers type
   only their local number. The normaliser still accepts any format. */
.phone-input { display: flex; align-items: stretch; }
.phone-input .phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid rgba(43, 24, 16, 0.18);
    border-right: none;
    border-radius: 12px 0 0 12px;
    background: var(--cream-2);
    color: var(--espresso);
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
}
.phone-input input {
    flex: 1;
    min-width: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 18px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: transform 0.05s ease, opacity 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--amber); color: white; }
.btn-primary:hover { background: var(--olive-dark); text-decoration: none; }
.btn-whatsapp { background: var(--whatsapp); color: white; margin-top: 10px; }
.btn-whatsapp:hover { background: #20BC59; text-decoration: none; }
.btn-ghost { background: transparent; color: rgba(43, 24, 16, 0.7); border: 1px solid rgba(43, 24, 16, 0.18); }
.btn-ghost:hover { background: rgba(43, 24, 16, 0.04); text-decoration: none; }
.btn-block { width: 100%; }
.card-link { display: flex; flex-direction: column; gap: 6px; margin: 18px 0; }

/* ---------- PWA shell ---------- */
.pwa-body {
    background: var(--cream);
    padding-bottom: 80px; /* leave room for bottom tabs */
}
.pwa-shell {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 10px 24px;
}

.member-greeting {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 16px;
}
.hello { font-size: 0.95rem; margin: 0; color: rgba(43, 24, 16, 0.7); }
.tier { font-size: 0.85rem; margin: 0; }
.tier strong { color: var(--gold); }
.member-clock { text-align: right; line-height: 1.15; }
.member-clock-time {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--espresso);
    font-variant-numeric: tabular-nums;
}
.member-clock-date { display: block; font-size: 0.68rem; color: rgba(43, 24, 16, 0.55); }

/* ---------- Redeem page extras ---------- */
.back-link { display: inline-block; color: rgba(43, 24, 16, 0.7); font-size: 0.9rem; margin-bottom: 14px; }
.redeem-card .redeem-header { margin-bottom: 14px; }
.redeem-card .hello { color: rgba(250, 245, 238, 0.6); font-size: 0.85rem; margin: 0; }
.redeem-card .reward-title { font-size: 1.6rem; color: var(--cream); margin: 4px 0; font-family: 'Fraunces', serif; }
.redeem-card .reward-desc { color: rgba(250, 245, 238, 0.75); font-size: 0.85rem; margin: 0; }
.redeem-card .reward-cost { color: var(--gold); font-size: 0.85rem; margin-top: 10px; font-weight: 500; }
.success-card { text-align: center; }
.success-card .success-mark {
    width: 80px; height: 80px;
    margin: 6px auto 14px;
    border-radius: 50%;
    background: var(--forest);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 42px; font-weight: 700;
}

.pending-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    text-align: center;
}
.pending-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #fff8e8;
    color: var(--olive);
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
}
.pending-card h1 {
    font-size: 1.45rem;
}
.pending-card p {
    color: rgba(43, 24, 16, 0.68);
    font-size: 0.95rem;
}
.pending-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 16px;
    border-top: 1px solid rgba(43, 24, 16, 0.1);
    padding-top: 16px;
    text-align: left;
}
.pending-details span {
    color: rgba(43, 24, 16, 0.55);
    font-size: 0.78rem;
}
.pending-details strong {
    margin-bottom: 8px;
    font-size: 0.98rem;
}

/* ---------- Campaign banner ---------- */
.campaign-banner {
    display: flex; align-items: center; gap: 12px;
    background: linear-gradient(135deg, var(--olive) 0%, var(--gold) 100%);
    color: white;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 14px;
    box-shadow: 0 6px 16px rgba(194, 65, 12, 0.25);
}
.campaign-multiplier {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}
.campaign-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.campaign-text strong { font-size: 0.95rem; }
.campaign-text small { font-size: 0.78rem; opacity: 0.9; }

/* ---------- QR card ---------- */
.qr-card {
    background: var(--espresso);
    color: var(--cream);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow);
}
.qr-box {
    background: white;
    border-radius: 12px;
    padding: 10px;
    margin: 0 auto 10px;
    width: min(240px, 68vw);
    aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
}
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-placeholder { color: var(--espresso); font-size: 0.9rem; }
.qr-hint { font-size: 0.85rem; opacity: 0.75; margin: 0; }

/* ---------- Stamps progress ---------- */
.stamps {
    margin-top: 20px;
    background: var(--cream-2);
    border-radius: var(--radius);
    padding: 18px 22px;
    text-align: center;
}
.stamps-headline {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 2.4rem;
    line-height: 1;
}
.stamps-current { color: var(--amber); }
.stamps-divider { color: rgba(43, 24, 16, 0.3); margin: 0 0.2em; }
.stamps-target { color: var(--espresso); }
.stamps-caption { margin-top: 4px; color: rgba(43, 24, 16, 0.7); font-size: 0.9rem; }

/* ---------- Page headers (rewards, history, me) ---------- */
.page-header { margin: 12px 0 22px; }
.page-header h1 { font-size: 1.9rem; }
.page-header p { font-size: 1.05rem; }

/* ---------- Rewards ---------- */
.reward-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.reward-item {
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    box-shadow: var(--shadow);
}
.reward-item.locked { opacity: 0.65; }
.reward-info h3 { font-size: 1.05rem; margin: 0 0 4px; }
.reward-info .cost { margin: 4px 0 0; font-weight: 500; color: var(--amber); font-size: 0.9rem; }
.reward-item .btn { padding: 10px 14px; font-size: 0.9rem; }

/* ---------- History ---------- */
.history-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.history-item {
    background: white;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex; align-items: center; justify-content: space-between;
}
.history-item .date { font-weight: 500; margin: 0 0 2px; }
.stamp-badge {
    background: var(--forest);
    color: white;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}
.reward-badge {
    background: var(--gold);
    color: var(--espresso);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 600;
}
/* Small amber pill on a scan row noting an active multiplier campaign. */
.bonus-tag {
    display: inline-block;
    margin-top: 4px;
    background: var(--amber);
    color: white;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.72rem;
    font-weight: 600;
}
.history-section { margin-bottom: 18px; }
.history-section-title {
    font-size: 0.82rem;
    color: rgba(43, 24, 16, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    margin: 14px 0 8px;
}
.history-section-title:first-of-type { margin-top: 4px; }
.reward-history-item .date { color: var(--amber); font-weight: 600; }
.empty { background: white; border-radius: 14px; padding: 20px; text-align: center; color: rgba(43, 24, 16, 0.6); list-style: none; }

/* ---------- Profile / Me ---------- */
.profile-block { background: white; border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow); }
.profile-block h3 { font-size: 1.1rem; margin: 0 0 12px; color: rgba(43, 24, 16, 0.65); text-transform: uppercase; letter-spacing: 0.04em; }
.profile-block p { font-size: 1.02rem; }
.profile-block .small { font-size: 0.9rem; }
.locale-form { display: flex; gap: 8px; flex-wrap: wrap; }
.locale-btn {
    background: var(--cream-2);
    border: 1px solid transparent;
    padding: 10px 14px;
    border-radius: 999px;
    font-family: inherit;
    color: var(--espresso);
    cursor: pointer;
    font-size: 0.9rem;
}
.locale-btn.active { background: var(--espresso); color: var(--cream); }

/* ---------- Flash messages ---------- */
.flash {
    background: var(--forest);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* ---------- Bottom tabs ---------- */
.bottom-tabs {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: white;
    border-top: 1px solid rgba(43, 24, 16, 0.08);
    display: flex;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    max-width: var(--max-width);
    margin: 0 auto;
    z-index: 50;
}
.tab {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    text-decoration: none;
    color: rgba(43, 24, 16, 0.55);
    font-size: 0.75rem;
    padding: 6px 4px;
}
.tab .tab-icon { font-size: 1.3rem; line-height: 1; }
.tab.active { color: var(--amber); }
.tab:hover { text-decoration: none; }

/* ---------- Stamp card (per-card model) ---------- */
.stamp-card {
    margin-top: 20px;
    background: var(--cream-2);
    border-radius: var(--radius);
    padding: 18px 18px 20px;
}
.stamp-card-header {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
}
.stamp-card-count {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--amber);
    line-height: 1;
}
.stamp-card-count .of {
    color: rgba(43, 24, 16, 0.4);
    font-size: 0.85rem;
    font-weight: 400;
    margin: 0 0.15em;
}
.stamp-card-reward {
    font-size: 0.85rem;
    color: rgba(43, 24, 16, 0.7);
}
.stamp-card-reward strong {
    color: var(--espresso);
}
.stamp-refresh {
    background: var(--cream-2);
    color: var(--olive);
    border: none;
    border-radius: 999px;
    width: 36px; height: 36px;
    padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    margin-left: auto;
}
.stamp-refresh:hover { background: #E6DDCC; }
.stamp-refresh:active { transform: scale(0.94); }
.stamp-refresh svg { width: 18px; height: 18px; }
.stamp-refresh.spinning svg { animation: stamp-refresh-spin 0.7s linear infinite; }
@keyframes stamp-refresh-spin { to { transform: rotate(360deg); } }
.stamp-card .slots {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.stamp-card .slot {
    aspect-ratio: 1;
    border: 2px dashed rgba(43, 24, 16, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    display: flex; align-items: center; justify-content: center;
    color: transparent;
}
.stamp-card .slot.filled {
    border-style: solid;
    border-color: var(--amber);
    background: var(--amber);
    color: white;
    box-shadow: 0 2px 6px rgba(194, 65, 12, 0.25);
}
.stamp-card .slot svg {
    width: 60%; height: 60%;
}
.stamp-card .slot .slot-logo {
    width: 78%; height: 78%; object-fit: contain;
}
.stamp-card .slot.milestone {
    cursor: pointer;
    position: relative;
}
.stamp-card .slot.milestone:focus-visible {
    outline: 2px solid var(--olive);
    outline-offset: 3px;
}
.slot-popover {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    min-width: 140px; max-width: 200px;
    background: var(--espresso);
    color: var(--cream);
    border-radius: 10px;
    padding: 8px 10px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    z-index: 20;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
    cursor: default;
}
.slot-popover.shown {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.slot-popover::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--espresso);
}
.slot-popover-slot {
    font-size: 0.7rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}
.slot-popover-reward {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
    word-wrap: break-word;
}
.slot-popover-state {
    font-size: 0.72rem;
    opacity: 0.7;
    margin-top: 4px;
    font-style: italic;
}
.slot-popover-expiry {
    font-size: 0.7rem;
    opacity: 0.85;
    margin-top: 3px;
    font-weight: 600;
}
.slot-popover-unlocked { background: var(--gold); color: var(--espresso); }
.slot-popover-unlocked::after { border-top-color: var(--gold); }
.slot-popover-claimed { background: var(--forest); }
.slot-popover-claimed::after { border-top-color: var(--forest); }
.stamp-card-caption {
    margin: 14px 0 0;
    text-align: center;
    color: rgba(43, 24, 16, 0.7);
    font-size: 0.9rem;
}

/* ---------- Unclaimed-reward banner (card screen) ---------- */
.unclaimed-banner {
    display: flex; align-items: center; gap: 12px;
    background: var(--forest);
    color: white;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 14px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(31, 78, 60, 0.25);
}
.unclaimed-banner:hover { text-decoration: none; }
.unclaimed-icon { font-size: 1.6rem; line-height: 1; }
.unclaimed-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.unclaimed-text strong { font-size: 0.95rem; }
.unclaimed-text small { font-size: 0.78rem; opacity: 0.85; }
.unclaimed-chev { font-size: 1.5rem; opacity: 0.7; }

/* ---------- Reward sections (rewards screen) ---------- */
.expiry-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(74, 84, 45, 0.08);
    border: 1px solid rgba(74, 84, 45, 0.2);
    border-left: 3px solid var(--amber);
    border-radius: 12px;
    padding: 11px 14px;
    margin-bottom: 16px;
}
.expiry-banner-icon { font-size: 1.1rem; line-height: 1; }
.expiry-banner-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--espresso);
    line-height: 1.3;
}
.reward-section { margin-bottom: 18px; }
.reward-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: rgba(43, 24, 16, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    margin: 14px 0 8px;
}
.reward-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--amber);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
}
.reward-section:first-of-type .reward-section-title { margin-top: 4px; }
.reward-item.card-reward { border-left: 3px solid var(--amber); }
.reward-item.milestone-reward { border-left: 3px solid var(--gold); }
.reward-item .expires { color: var(--amber); margin-top: 2px; }

/* ---------- Promo coupons ---------- */
.reward-item.coupon-reward { border-left: 3px solid #d64545; }
.reward-item.coupon-claimed { border-left: 3px solid #d64545; background: rgba(214, 69, 69, 0.04); }
.scarcity-badge {
    display: inline-block;
    background: #d64545;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    margin-top: 6px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.coupon-countdown {
    color: #d64545;
    font-weight: 600;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}
.coupon-countdown-large {
    text-align: center;
    margin-top: 12px;
    font-size: 1.05rem;
}

/* ---------- Milestone slots ---------- */
/* pending: dashed circle with faint gold gift icon (teaser only) */
.stamp-card .slot.milestone.milestone-pending {
    border-color: rgba(212, 165, 116, 0.55);
    color: rgba(212, 165, 116, 0.55);
    background: rgba(212, 165, 116, 0.08);
}
/* unlocked: gold filled circle with gift icon — pulses to draw attention */
.stamp-card .slot.milestone.milestone-unlocked {
    border-style: solid;
    border-color: var(--gold);
    background: var(--gold);
    color: var(--espresso);
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.5);
    animation: milestone-pulse 1.8s ease-in-out infinite;
}
/* claimed: forest green with gift icon (done) */
.stamp-card .slot.milestone.milestone-claimed {
    border-style: solid;
    border-color: var(--forest);
    background: var(--forest);
    color: white;
}
@keyframes milestone-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.stamp-card-legend {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 14px;
    justify-content: center;
}
.legend-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    background: rgba(212, 165, 116, 0.18);
    color: var(--espresso);
}
.legend-pill .legend-slot {
    font-weight: 700;
    color: var(--gold);
}
.legend-pill.milestone-unlocked {
    background: var(--gold);
    color: var(--espresso);
}
.legend-pill.milestone-unlocked .legend-slot { color: var(--espresso); }
.legend-pill.milestone-claimed {
    background: var(--forest);
    color: white;
    text-decoration: line-through;
    opacity: 0.85;
}
.legend-pill.milestone-claimed .legend-slot { color: white; }

/* ---------- Home slider (Swiper) ---------- */
.home-slider {
    margin-bottom: 14px;
}
.home-swiper {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--cream-2);
}
.home-swiper .swiper-slide {
    background: var(--cream-2);
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
}
.home-slide-link {
    display: block;
    width: 100%;
    position: relative;
    text-decoration: none;
    color: white;
}
.home-slide-link img {
    width: 100%;
    height: auto;
    display: block;
}
.home-swiper .swiper-wrapper {
    align-items: center;
}
.home-slide-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 18px 14px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
}
.home-swiper .swiper-pagination-bullet {
    background: white;
    opacity: 0.5;
}
.home-swiper .swiper-pagination-bullet-active {
    background: var(--amber);
    opacity: 1;
}

/* ---------- Home rewards row ---------- */
.home-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 12px;
    text-decoration: none;
    color: var(--espresso);
    box-shadow: var(--shadow);
}
.home-row:hover { text-decoration: none; }
.home-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.home-row-text strong { font-size: 1rem; }
.home-row-text small { font-size: 0.8rem; color: rgba(43, 24, 16, 0.66); }
.home-row-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--amber);
    flex-shrink: 0;
}
.home-row-icon svg {
    width: 28px;
    height: 28px;
}
.home-row-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--amber);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ---------- Home QR/History shortcut row ---------- */
.home-shortcut-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.home-shortcut {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: var(--radius);
    padding: 14px;
    text-decoration: none;
    color: var(--espresso);
    box-shadow: var(--shadow);
    min-width: 0;
}
.home-shortcut:hover { text-decoration: none; }
.home-shortcut-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--cream-2);
    color: var(--espresso);
    flex-shrink: 0;
}
.home-shortcut-icon svg {
    width: 24px;
    height: 24px;
}
.home-shortcut-qr .home-shortcut-icon {
    background: var(--espresso);
    color: var(--cream);
}
.home-shortcut-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow: hidden; }
.home-shortcut-text strong { font-size: 0.95rem; }
.home-shortcut-text small {
    font-size: 0.75rem;
    color: rgba(43, 24, 16, 0.66);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- QR full-screen page ---------- */
.qr-page-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.qr-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: white;
    color: var(--espresso);
    box-shadow: var(--shadow);
}
.qr-back:hover { text-decoration: none; }
.qr-back svg { width: 20px; height: 20px; }
.qr-page-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.1rem;
    margin: 0;
}
.qr-card-fullscreen {
    padding: 24px 16px;
}
.qr-card-fullscreen .qr-box {
    width: min(320px, 82vw);
}
