:root {
    --brand: #0b84c6;
    --brand-dark: #0a6aa0;
    --bg: #eaedf2;
    --text: #0f172a;
    --muted: #64748b;
    --card: #ffffff;
    --radius: 18px;
    --shadow: 0 18px 40px rgba(12, 22, 39, 0.08);
}

* {
    box-sizing: border-box;
}

body.pwa {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.pwa-shell {
    min-height: 100vh;
    padding-bottom: 92px;
}

.pwa-shell--scan {
    padding-bottom: 0;
}

.hidden {
    display: none;
}

[x-cloak] {
    display: none !important;
}

.w-full {
    width: 100%;
}

.pwa-page {
    padding: 0 24px 40px;
}

.pwa-hero {
    background: var(--brand);
    color: #fff;
    padding: 24px 24px 90px;
    border-bottom-left-radius: 44px;
    border-bottom-right-radius: 44px;
    position: relative;
    margin: 0 -24px 30px;
}

.pwa-hero-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-hero-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.pwa-hero-name {
    margin: 2px 0 0;
    font-size: 20px;
    font-weight: 700;
}

.pwa-hero-greeting {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.pwa-hero-subtitle {
    margin: 6px 0 0;
    font-size: 13px;
    opacity: 0.85;
}

.pwa-hero-bell {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pwa-hero-help::after {
    display: none;
}

.pwa-hero-bell::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4d6d;
    box-shadow: 0 0 0 2px rgba(11, 132, 198, 0.55);
    opacity: 0;
}

.pwa-hero-bell.has-unread::after {
    opacity: 1;
}

.pwa-hero-pill {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
}

.pwa-hero-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.pwa-icon {
    width: 20px;
    height: 20px;
}

.pwa-hero-stats {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: rgba(255, 255, 255, 0.08);
    padding: 16px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 22px;
    text-align: center;
    overflow: hidden;
}

.pwa-hero-stats .stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

.pwa-hero-stats .stat:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.22);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.8;
}

.pwa-cta {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: -28px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 26px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    text-align: left;
    text-decoration: none;
    color: var(--text);
    z-index: 2;
}

.pwa-cta .icon {
    background: #e9f5fe;
    color: var(--brand);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-cta strong {
    display: block;
    font-size: 15px;
    color: var(--brand);
    font-weight: 700;
}

.pwa-cta small {
    color: var(--muted);
    display: block;
    margin-top: 4px;
}

.pwa-cta .chevron {
    margin-left: auto;
    font-size: 18px;
    font-weight: 700;
    color: var(--brand);
}

.pwa-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 36px 0 14px;
}

.pwa-section h2,
.pwa-section-header h2 {
    margin: 0;
    font-size: 18px;
}

.pwa-link {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
}

.pwa-card {
    background: var(--card);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    margin-bottom: 18px;
    border: 1px solid #e7ebf0;
}

.pwa-card-clickable {
    cursor: pointer;
}

.pwa-explore-card {
    display: grid;
    gap: 14px;
}

.pwa-explore-card .pwa-card-head {
    align-items: center;
}

.pwa-tenant-logo {
    width: 74px;
    height: 74px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #1d4a73;
    font-weight: 700;
    padding: 8px;
}

.pwa-tenant-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pwa-map-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.pwa-map-icon-link {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #d7e5f3;
    color: #0b84c6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #f4faff;
}

.pwa-map-icon {
    width: 24px;
    height: 24px;
}

.pwa-explore-meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-explore-meta .pwa-chip {
    margin-left: 0;
}

.pwa-card.highlight {
    border: 1px solid rgba(11, 132, 198, 0.2);
}

.pwa-card.skeleton {
    color: var(--muted);
    text-align: center;
}

.pwa-card.empty {
    text-align: center;
    color: var(--muted);
}

.pwa-card-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.pwa-card-head h3 {
    margin: 0;
    font-size: 20px;
}

.pwa-card-head p {
    margin: 4px 0 0;
    font-size: 15px;
    color: var(--muted);
}

.pwa-card-logo {
    width: 74px;
    height: 74px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #1d4a73;
    overflow: hidden;
    padding: 8px;
}

.pwa-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pwa-chip {
    margin-left: auto;
    background: #ffe6e6;
    color: #e11d48;
    font-size: 12px;
    padding: 7px 12px;
    border-radius: 0 14px 0 14px;
    font-weight: 700;
}

.pwa-chip.success {
    background: #dcfce7;
    color: #15803d;
}

.pwa-chip.warning {
    background: #ffe6e6;
    color: #e11d48;
}

.pwa-progress {
    margin-top: 16px;
    padding: 14px;
    border-radius: 16px;
    background: #f5f7fa;
}

.pwa-progress-top {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
    line-height: 1;
    align-items: baseline;
}

.pwa-progress-top span:last-child {
    color: var(--brand);
    font-weight: 700;
}

.pwa-progress-bar {
    height: 12px;
    background: #dde3ea;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 14px;
}

.pwa-progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--brand), var(--brand));
    border-radius: 999px;
    position: relative;
}

.pwa-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to right,
        transparent,
        transparent 22px,
        rgba(255, 255, 255, 0.88) 22px,
        rgba(255, 255, 255, 0.88) 26px
    );
}

.pwa-stamp-track {
    margin-top: 16px;
    padding: 14px;
    border-radius: 16px;
    background: #f1f4f8;
}

.pwa-stamp-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.pwa-stamp-slot {
    width: 100%;
    height: 34px;
    border-radius: 10px;
    border: 1.5px dashed #d7dee8;
    background: #ffffff;
    color: #b4c0cf;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-stamp-slot.filled {
    border-style: solid;
    border-color: #0284c7;
    background: #0284c7;
    color: #ffffff;
}

.pwa-stamp-icon {
    width: 18px;
    height: 18px;
}

.pwa-stamp-emoji {
    font-size: 16px;
    line-height: 1;
}

.pwa-stamp-fa {
    font-size: 15px;
    line-height: 1;
}

.pwa-reward {
    margin-top: 14px;
    font-size: 13px;
    color: #121826;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.pwa-reward-primary {
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff8eb 0%, #ffedd5 100%);
    border: 1px solid #fdba74;
    color: #7c2d12;
    font-weight: 700;
}

.pwa-reward-primary .pwa-reward-icon {
    width: 18px;
    height: 18px;
    color: #c2410c;
}

.pwa-reward-icon {
    width: 16px;
    height: 16px;
    color: #f97316;
}

.pwa-intermediate-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pwa-intermediate-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
}

.pwa-intermediate-title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.pwa-intermediate-meta {
    margin: 2px 0 0;
    font-size: 12px;
    color: #64748b;
}

.pwa-intermediate-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 5px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pwa-intermediate-badge.pending {
    background: #e2e8f0;
    color: #334155;
}

.pwa-intermediate-badge.eligible {
    background: #dbeafe;
    color: #1d4ed8;
}

.pwa-intermediate-badge.claimed {
    background: #dcfce7;
    color: #166534;
}

.pwa-final-reward {
    margin-top: 14px;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff8eb 0%, #ffedd5 100%);
    border: 1px solid #fdba74;
}

.pwa-final-reward-label {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: #b45309;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pwa-final-reward-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7c2d12;
}

.pwa-final-reward-content strong {
    font-size: 16px;
    line-height: 1.2;
}

.pwa-card-link {
    margin-top: 12px;
    width: 100%;
    border: none;
    background: #eef6fb;
    color: var(--brand);
    font-weight: 600;
    border-radius: 12px;
    padding: 10px 12px;
}

.pwa-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 10px;
}

.pwa-page-header h1 {
    margin: 0;
    font-size: 20px;
}

.pwa-btn {
    border: none;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

.pwa-btn.primary {
    background: var(--brand);
    color: #fff;
}

.pwa-btn.ghost {
    background: #eef2f7;
    color: var(--text);
}

.pwa-btn-sm {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
}

.pwa-label {
    font-size: 12px;
    color: var(--muted);
    display: block;
    margin: 10px 0 6px;
}

.pwa-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
}

.pwa-textarea {
    resize: vertical;
    min-height: 110px;
}

.pwa-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.pwa-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pwa-card-header h3 {
    margin: 0;
    font-size: 16px;
}

.pwa-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #eef2f7;
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.pwa-muted {
    color: var(--muted);
    font-size: 13px;
}

.pwa-toast {
    position: fixed;
    bottom: 90px;
    left: 20px;
    right: 20px;
    background: #0f172a;
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    text-align: center;
}

.pwa-toast.success {
    background: #166534;
}

.pwa-toast.error {
    background: #b91c1c;
}

.pwa-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    padding: 8px 16px 18px;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -12px 24px rgba(15, 23, 42, 0.08);
}

.pwa-nav-item {
    text-decoration: none;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    gap: 4px;
}

.pwa-nav-icon {
    width: 22px;
    height: 22px;
}

.pwa-nav-item.active {
    color: var(--brand);
    font-weight: 700;
}

.pwa-nav-scan {
    width: 64px;
    height: 64px;
    background: var(--brand);
    border: none;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -40px auto 0;
    box-shadow: 0 18px 36px rgba(11, 132, 198, 0.35);
    position: relative;
    border: 6px solid #ffffff;
}

.pwa-nav-icon.scan {
    width: 26px;
    height: 26px;
}

.pwa-auth-header {
    text-align: center;
    padding: 34px 20px 8px;
}

.pwa-auth-logo {
    width: 76px;
    height: 76px;
    margin-bottom: 14px;
    object-fit: contain;
}

.pwa-auth-logo-wide {
    width: min(240px, 70vw);
    height: auto;
}

.pwa-auth-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
}

.pwa-auth-header p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.pwa-auth-card {
    background: #fff;
    margin: 20px 12px 0;
    padding: 22px 20px;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.09);
    display: grid;
    gap: 14px;
}

.pwa-auth-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.pwa-auth-tab {
    border: 1px solid #dbe3ee;
    background: #f8fafc;
    color: #475569;
    border-radius: 10px;
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 600;
}

.pwa-auth-tab.active {
    background: #e8f3fb;
    border-color: #8cc7e8;
    color: #0b84c6;
}

.pwa-auth-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.pwa-auth-subtitle {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
}

.pwa-auth-step-indicator {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background-color .2s ease, transform .2s ease;
}

.step-dot.active {
    background: var(--brand);
    transform: scale(1.1);
}

.pwa-code-input {
    text-align: center;
    letter-spacing: 0.38em;
    font-weight: 700;
    font-size: 20px;
}

.pwa-error {
    color: #dc2626;
    font-size: 12px;
    text-align: center;
}

.pwa-scan-frame {
    background: #0f172a;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.pwa-scan-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pwa-install-hero {
    text-align: center;
    padding: 30px 0 20px;
}

.pwa-install-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.pwa-install-logo-wide {
    width: min(260px, 75vw);
    height: auto;
}

.pwa-install-steps {
    margin-top: 24px;
}

.pwa-install-grid {
    display: grid;
    gap: 16px;
    margin-top: 12px;
}

.pwa-install-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 12px;
    text-align: center;
}

.pwa-install-card img {
    width: 100%;
    max-height: 140px;
    object-fit: contain;
}

.pwa-status-card {
    margin-top: 12px;
}

.pwa-status-message {
    margin: 0;
    font-weight: 600;
    font-size: 14px;
}

.pwa-status-message.success {
    color: #166534;
}

.pwa-status-message.error {
    color: #b91c1c;
}

.pwa-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 50;
}

.pwa-modal {
    width: min(100%, 420px);
}

.pwa-push-reminder {
    margin-top: 8px;
    margin-bottom: 20px;
}

.pwa-push-reminder h3 {
    margin: 0;
    font-size: 16px;
}

.pwa-push-reminder p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.pwa-welcome {
    padding-top: 24px;
}

.pwa-welcome-hero {
    text-align: center;
    margin-bottom: 20px;
}

.pwa-welcome-logo {
    width: 82px;
    height: 82px;
    margin-bottom: 8px;
    object-fit: contain;
}

.pwa-welcome-logo-wide {
    width: min(240px, 70vw);
    height: auto;
}

.pwa-welcome-hero h1 {
    margin: 0;
    font-size: 24px;
}

.pwa-welcome-hero p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.pwa-welcome-card {
    margin-bottom: 0;
}

.pwa-welcome-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: var(--text);
    font-size: 14px;
}

/* Card detail layout */
.pwa-card-detail-page {
    padding: 0 0 120px;
    background: #f5f6f8;
}

.pwa-card-detail-wrap {
    min-height: 100vh;
    position: relative;
    background: #f5f6f8;
    color: #0f172a;
}

.pwa-card-hero {
    height: 230px;
    background: linear-gradient(135deg, var(--card-accent), #0f172a);
    background-size: cover;
    background-position: center;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    position: relative;
    overflow: hidden;
}

.pwa-card-hero-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.pwa-card-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 18, 28, 0.1), rgba(7, 18, 28, 0.7));
    z-index: 1;
}

.pwa-card-hero-actions {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    z-index: 2;
}

.pwa-card-hero-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pwa-card-merchant {
    margin-top: -56px;
    text-align: center;
    padding: 0 24px;
    position: relative;
    z-index: 3;
}

.pwa-card-merchant-logo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #fff;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 6px solid #f5f6f8;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
    overflow: hidden;
    position: relative;
    z-index: 4;
}

.pwa-card-merchant-logo img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.pwa-card-merchant h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.pwa-card-merchant h2 {
    margin: 6px 0 10px;
    font-size: 18px;
    color: var(--card-accent);
}

.pwa-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    font-size: 13px;
    color: #475569;
}

.pwa-status-pill .dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
}

.pwa-fidelity-panel {
    margin: 24px 20px 18px;
    border-radius: 26px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.pwa-fidelity-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pwa-fidelity-head h3 {
    margin: 0;
    font-size: 18px;
}

.pwa-fidelity-badge {
    background: #dcfce7;
    color: #15803d;
    font-weight: 700;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
}

.pwa-fidelity-copy {
    margin: 12px 0 18px;
    color: #475569;
}

.pwa-fidelity-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.pwa-fidelity-slot {
    height: 44px;
    border-radius: 14px;
    border: 2px dashed #d6dbe4;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-weight: 700;
}

.pwa-fidelity-slot.filled {
    border-style: solid;
    border-color: var(--card-accent);
    background: var(--card-accent);
    color: #fff;
    box-shadow: 0 6px 14px rgba(230, 62, 159, 0.3);
}

.pwa-fidelity-slot.prize {
    border-style: solid;
    border-color: #facc15;
    background: #fef08a;
    color: #92400e;
}

.pwa-fidelity-progress {
    margin-top: 16px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.pwa-fidelity-progress-fill {
    height: 100%;
    background: var(--card-accent);
    border-radius: 999px;
}

.pwa-fidelity-progress-meta {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #64748b;
}

.pwa-prize-panel,
.pwa-rules-panel {
    margin: 0 20px 18px;
    border-radius: 24px;
}

.pwa-prize-panel {
    display: flex;
    gap: 14px;
    align-items: center;
}

.pwa-prize-panel h3 {
    margin: 0;
    font-size: 16px;
}

.pwa-prize-panel p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
}

.pwa-prize-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: #fce7f3;
    color: #db2777;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.pwa-rules-panel h3 {
    margin: 0 0 10px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-rules-panel ul {
    margin: 0;
    padding-left: 18px;
    color: #64748b;
    display: grid;
    gap: 8px;
    font-size: 14px;
}

.pwa-scan-fixed-btn {
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: 22px;
    background: var(--card-accent);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 16px 28px rgba(230, 62, 159, 0.35);
}

/* Notifications */
.pwa-notifications-page {
    padding-bottom: 90px;
}

.pwa-notify-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0 10px;
}

.pwa-notify-header h1 {
    margin: 0;
    font-size: 24px;
}

.pwa-notify-header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.pwa-notify-filter {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--text);
}

.pwa-notify-group {
    margin-top: 18px;
}

.pwa-notify-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pwa-notify-group-head h2 {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    letter-spacing: 0.08em;
}

.pwa-notify-card {
    background: #fff;
    border-radius: 20px;
    padding: 16px;
    display: flex;
    gap: 14px;
    border: 1px solid #e6edf5;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    margin-bottom: 14px;
    position: relative;
}

.pwa-notify-card.unread {
    border-left: 4px solid var(--brand);
}

.pwa-notify-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    position: relative;
}

.pwa-notify-icon.stamp {
    background: #e0f2fe;
    color: #0284c7;
}

.pwa-notify-icon.reward {
    background: #fde2f3;
    color: #db2777;
}

.pwa-notify-icon.pending {
    background: #e2e8f0;
    color: #64748b;
}

.pwa-notify-body {
    flex: 1;
    min-width: 0;
}

.pwa-notify-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
}

.pwa-notify-body h3 {
    margin: 0;
    font-size: 16px;
}

.pwa-notify-body p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
}

.pwa-notify-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pwa-notify-title-row span {
    color: #94a3b8;
    font-size: 12px;
}

.pwa-notify-progress {
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    margin-top: 10px;
    overflow: hidden;
}

.pwa-notify-progress-fill {
    height: 100%;
    background: var(--brand);
}

.pwa-notify-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.pwa-notify-empty {
    text-align: center;
    color: var(--muted);
    margin: 30px 0 10px;
}

/* Scan */
.pwa-scan-page {
    min-height: 100svh;
    background: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
    --scan-sheet-height: 210px;
}

.pwa-scan-camera-layer {
    position: relative;
    height: 100svh;
    z-index: 1;
    overflow: hidden;
}

.pwa-scan-camera {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pwa-scan-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.65));
}

.pwa-scan-topbar {
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
}

.pwa-scan-topbar h1 {
    margin: 0;
    font-size: 20px;
    text-align: center;
    flex: 1;
}

.pwa-scan-circle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
}

.pwa-scan-tip {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.45);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    z-index: 2;
}

.pwa-scan-target {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(70vw, 260px);
    height: min(70vw, 260px);
    transform: translate(-50%, -50%);
    border-radius: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.pwa-scan-target .corner {
    position: absolute;
    width: 28px;
    height: 28px;
    border: 4px solid #38bdf8;
}

.pwa-scan-target .corner.tl {
    top: -4px;
    left: -4px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 16px;
}

.pwa-scan-target .corner.tr {
    top: -4px;
    right: -4px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 16px;
}

.pwa-scan-target .corner.bl {
    bottom: -4px;
    left: -4px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 16px;
}

.pwa-scan-target .corner.br {
    bottom: -4px;
    right: -4px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 16px;
}

.pwa-scan-description {
    position: absolute;
    bottom: calc(var(--scan-sheet-height) + 16px);
    left: 24px;
    right: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    z-index: 2;
}

.pwa-scan-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin-top: 0;
    background: #fff;
    color: #0f172a;
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    padding: 12px 20px calc(28px + env(safe-area-inset-bottom, 0px));
    z-index: 3;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.15);
}

.pwa-scan-sheet-grabber {
    width: 52px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    margin: 0 auto 12px;
}

.pwa-scan-selectors {
    display: grid;
    gap: 10px;
}

.pwa-scan-actions {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    text-align: center;
}

.pwa-scan-action {
    background: #f1f5f9;
    border: none;
    border-radius: 18px;
    padding: 12px 8px;
    display: grid;
    gap: 6px;
    color: #64748b;
    font-size: 12px;
}

.pwa-scan-action.active {
    background: #e0f2fe;
    color: #0284c7;
}

.pwa-scan-action.center {
    background: #0ea5e9;
    color: #fff;
    box-shadow: 0 10px 18px rgba(14, 165, 233, 0.35);
}

.pwa-scan-action-icon {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin: 0 auto;
}

.pwa-scan-manual {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.pwa-scan-help-link {
    margin-top: 10px;
    background: transparent;
    border: none;
    color: #0284c7;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pwa-inline-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.pwa-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: #e2e8f0;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pwa-scan-status {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: calc(var(--scan-sheet-height) + 16px);
    z-index: 4;
}
