/* ═══════════════════════════════════════════════
   肥龍老火鍋 — Mobile Design System
   Brand: Warm Red + Gold / Dragon-themed tiers
   ═══════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
    --primary:        #c0392b;
    --primary-dark:   #922b21;
    --gold:           #f59e0b;
    --gold-light:     #fef3c7;
    --gold-mid:       #fde68a;
    --bg:             #f7ece4;   /* 平面底色（仍被當填色用，不可放漸層） */
    --card:           #ffffff;   /* CRITICAL: 保持不透明 — 表單輸入框與 .roadmap-dot 圓環都靠它 */
    --text:           #42261c;
    --text-secondary: #6f5344;   /* 比示意圖再深一階，讓 11-13px 小字在玻璃上仍達 AA */
    --text-tertiary:  #94705c;
    --text-primary:   #42261c;   /* .btn-secondary 誤用未定義變數，補上避免退成純黑 #222 */
    --border:         #ded0c2;   /* 略深一階，玻璃上才看得見 */
    --divider:        rgba(66,38,28,.10);
    --success:        #047857;
    --error:          #dc2626;
    --vip-gold:       #f59e0b;

    /* ── 霧面玻璃 ── */
    --app-bg:         transparent;              /* entry.html 讀 var(--app-bg)，原本未定義會蓋掉背景 */
    --glass:          rgba(255,255,255,.62);
    --glass-strong:   rgba(255,255,255,.78);
    --glass-solid:    rgba(255,255,255,.92);    /* 不支援 backdrop-filter 時的實心退路 */
    --glass-border:   rgba(255,255,255,.88);
    --glass-blur:     blur(14px);
    --glass-blur-sm:  blur(10px);               /* 長列表用，降低捲動負擔 */
    --accent-a:       #e8623f;
    --accent-b:       #f6b64a;
    --accent-grad:    linear-gradient(135deg, #e8623f, #f6b64a);

    --radius-card:    20px;
    --radius-btn:     14px;
    --radius-badge:   20px;
    --radius-input:   12px;

    --shadow-card:    0 6px 22px rgba(120,50,25,0.11);
    --shadow-elevated:0 10px 30px rgba(120,50,25,0.16);

    --font-base: 'PingFang TC', 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
}

/* ── Reset / Base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-base);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
    padding-bottom: 72px;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--primary);
    text-decoration: none;
}

/* ── Typography ── */
h1, h2, h3, h4, h5 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

p { margin: 0; }

/* ── Layout ── */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem 1rem 1.5rem;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.4rem;
    border: none;
    border-radius: var(--radius-btn);
    font-family: var(--font-base);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(192,57,43,0.28);
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 3px 12px rgba(192,57,43,0.35);
}

.btn-accent {
    background: var(--gold);
    color: #7c3d0c;
    box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}
.btn-accent:hover {
    background: #d97706;
    box-shadow: 0 3px 12px rgba(245,158,11,0.38);
}

.btn-line {
    background: #06C755;
    color: #fff;
    box-shadow: 0 2px 8px rgba(6,199,85,0.28);
}
.btn-line:hover {
    background: #05A647;
    box-shadow: 0 3px 12px rgba(6,199,85,0.38);
}

.btn-secondary {
    background: #f3f4f6;
    color: var(--text-primary, #222);
    border: 1px solid var(--border, #e5e7eb);
}
.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-full {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
    border-radius: 8px;
}

/* ── Forms ── */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-input);
    font-family: var(--font-base);
    font-size: 0.95rem;
    background: var(--card);
    color: var(--text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.form-group input[readonly] {
    background: #f5f0eb;
    color: var(--text-secondary);
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%238b7e74' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.2rem;
}

.form-row {
    display: flex;
    gap: 0.8rem;
}
.form-half {
    flex: 1;
    min-width: 0;
}

.required {
    color: var(--primary);
}

/* ── Entry / Login Page ── */
.entry-page {
    padding-top: 2.5rem;
    padding-bottom: 2rem;
}

.logo-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-img {
    max-width: 200px;
    height: auto;
    margin-bottom: 0.3rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    mix-blend-mode: multiply;
}

.logo-sub {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.logo-section h1 {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.logo-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-card {
    background: var(--card);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.login-tabs {
    display: flex;
    margin-bottom: 1.4rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid var(--border);
    background: var(--bg);
}

.tab-btn {
    flex: 1;
    padding: 0.6rem 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: var(--font-base);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background 0.18s ease, color 0.18s ease;
}

.tab-btn.active {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.hint-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.9rem;
    line-height: 1.5;
}

.dev-hint {
    background: #fffbea;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: #975a16;
    border: 1px solid #fde68a;
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* ── Error / Alert ── */
.error-msg {
    background: #fef2f2;
    color: var(--error);
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    margin-top: 0.8rem;
    text-align: center;
    font-size: 0.88rem;
    border: 1px solid #fecaca;
}

/* ── Register Page ── */
.register-page {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

.register-page h2 {
    margin-bottom: 1.5rem;
}

.line-profile-preview {
    text-align: center;
    margin-bottom: 1.5rem;
}

.line-profile-preview p {
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.info-banner {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    margin-bottom: 1.2rem;
    border-left: 3px solid #3b82f6;
    line-height: 1.55;
}

.visit-stats-card {
    background: linear-gradient(135deg, #fef9ef 0%, #fff7ed 100%);
    border-radius: var(--radius-card);
    padding: 1rem 1.2rem;
    margin-bottom: 1.2rem;
    border: 1px solid #fcd34d;
}

.visit-total {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.visit-stores {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.store-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-badge);
    font-size: 0.78rem;
    font-weight: 600;
}

/* ── Consent / Privacy ── */
.consent-box {
    margin: 1.2rem 0;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.88rem;
    cursor: pointer;
    line-height: 1.5;
}

.consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
}

.consent-label .link {
    color: var(--primary);
    text-decoration: underline;
}

/* ── Privacy Page ── */
.privacy-page {
    padding-bottom: 2rem;
}

.privacy-page h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.privacy-section {
    margin-bottom: 1.3rem;
}

.privacy-section h3 {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.privacy-section p,
.privacy-section ul {
    font-size: 0.88rem;
    line-height: 1.65;
    color: #4a3f37;
}

.privacy-section ul {
    padding-left: 1.2rem;
}

/* ── Profile Page ── */
.profile-page {
    padding-top: 0;
}

.profile-header {
    background: linear-gradient(160deg, #fef3c7 0%, #fff7ed 55%, #faf8f5 100%);
    text-align: center;
    padding: 2rem 1rem 1.5rem;
    margin: -1rem -1rem 1.2rem;
    border-bottom: 1px solid var(--border);
}

.profile-header h2 {
    margin: 0.6rem 0 0.4rem;
    font-size: 1.3rem;
}

.avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(45,35,25,0.15);
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(45,35,25,0.15);
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 0.22rem 0.75rem;
    border-radius: var(--radius-badge);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge-vip {
    background: linear-gradient(135deg, var(--gold), #fcd34d);
    color: #7c3d0c;
}

.badge-normal {
    background: var(--border);
    color: var(--text-secondary);
}

/* ── Tier Card ── */
.tier-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 60%, #fef9ef 100%);
    border-radius: var(--radius-card);
    padding: 1.2rem 1.3rem;
    margin-bottom: 1rem;
    border: 1px solid #fcd34d;
    box-shadow: 0 2px 10px rgba(245,158,11,0.12);
}

.tier-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.tier-icon {
    font-size: 2.4rem;
    line-height: 1;
    flex-shrink: 0;
}

.tier-info {
    flex: 1;
    min-width: 0;
}

.tier-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #92400e;
}

.tier-message {
    font-size: 0.82rem;
    color: #b45309;
    margin-top: 2px;
    line-height: 1.4;
}

.tier-progress {
    margin-top: 0.8rem;
}

.tier-next {
    font-size: 0.78rem;
    color: #78716c;
    margin-bottom: 5px;
}

.tier-bar-bg {
    height: 7px;
    background: #e7e5e4;
    border-radius: 4px;
    overflow: hidden;
}

.tier-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--primary));
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tier-max {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: #b45309;
    text-align: center;
    font-weight: 600;
}

/* ── Special Message ── */
.special-msg {
    background: var(--gold-light);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    color: #92400e;
    text-align: center;
    border: 1px solid var(--gold-mid);
    line-height: 1.55;
}

/* ── Info Card ── */
.info-card {
    background: var(--card);
    border-radius: var(--radius-card);
    padding: 0.2rem 1rem;
    box-shadow: var(--shadow-card);
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.info-card:hover {
    box-shadow: var(--shadow-elevated);
}

.info-card-title {
    padding: 0.85rem 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.88rem;
    flex-shrink: 0;
}

.info-value {
    color: var(--text);
    font-size: 0.9rem;
    text-align: right;
}

.points {
    font-weight: 700;
    color: var(--primary);
}

/* ── VIP Card ── 尊爵黑金卡 Embossed Black-Gold luxe
   Base: embossed-blackgold (winner) — pressed-metal emboss shadow stack + 描金四角.
   Graft: filigree double-hairline frame discipline (solid fallback header),
          foil-sheen single diagonal screen-blend streak (one restrained moving-light gilt).
   All four corner brackets consolidated into ::before (8 gradient layers) so ::after
   is free for the sheen streak — no markup change, overflow:hidden preserved. */
.vip-card {
    position: relative;
    margin-bottom: 1rem;
    padding: 1.3rem 1.4rem;
    border-radius: var(--radius-card);
    /* deep multi-stop near-black + soft warm gold top highlight */
    background:
        radial-gradient(120% 80% at 50% -20%, rgba(245,158,11,0.16) 0%, rgba(245,158,11,0.04) 38%, transparent 64%),
        linear-gradient(135deg, #0d0b0a 0%, #1c1917 52%, #050505 100%);
    color: #ece7e1;
    /* gold-foil hairline + inner top highlight + deep inner bottom shadow (pressed-metal emboss) */
    border: 1px solid rgba(214,168,86,0.55);
    box-shadow:
        inset 0 1px 0 rgba(253,230,138,0.28),
        inset 0 14px 28px -18px rgba(255,214,140,0.22),
        inset 0 -16px 26px -14px rgba(0,0,0,0.85),
        inset 0 0 0 1px rgba(0,0,0,0.35),
        0 6px 22px rgba(0,0,0,0.42);
    overflow: hidden;
    isolation: isolate;
}

/* 描金角飾 — all four gold corner brackets (TL+TR+BL+BR) in one layer.
   Alpha nudged .85 -> .92 and segments 26px -> 30px so 尊爵 framing still
   registers in the smaller profile.html collapsible context. */
.vip-card::before {
    content: '';
    position: absolute;
    top: 0.7rem;
    left: 0.7rem;
    right: 0.7rem;
    bottom: 0.7rem;
    z-index: 0;
    pointer-events: none;
    background:
        /* top-left */
        linear-gradient(90deg, rgba(212,166,84,0.92), rgba(212,166,84,0)) left top / 30px 1.5px no-repeat,
        linear-gradient(180deg, rgba(212,166,84,0.92), rgba(212,166,84,0)) left top / 1.5px 30px no-repeat,
        /* top-right */
        linear-gradient(270deg, rgba(212,166,84,0.92), rgba(212,166,84,0)) right top / 30px 1.5px no-repeat,
        linear-gradient(180deg, rgba(212,166,84,0.92), rgba(212,166,84,0)) right top / 1.5px 30px no-repeat,
        /* bottom-left */
        linear-gradient(90deg, rgba(212,166,84,0.92), rgba(212,166,84,0)) left bottom / 30px 1.5px no-repeat,
        linear-gradient(0deg, rgba(212,166,84,0.92), rgba(212,166,84,0)) left bottom / 1.5px 30px no-repeat,
        /* bottom-right */
        linear-gradient(270deg, rgba(212,166,84,0.92), rgba(212,166,84,0)) right bottom / 30px 1.5px no-repeat,
        linear-gradient(0deg, rgba(212,166,84,0.92), rgba(212,166,84,0)) right bottom / 1.5px 30px no-repeat;
}

/* foil-sheen — single diagonal screen-blend gilt streak (the one restrained premium effect) */
.vip-card::after {
    content: '';
    position: absolute;
    inset: -40%;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        118deg,
        transparent 30%,
        rgba(253,230,138,0.05) 42%,
        rgba(254,243,199,0.16) 49%,
        rgba(255,250,235,0.26) 51%,
        rgba(253,230,138,0.08) 58%,
        transparent 70%
    );
    transform: rotate(-2deg);
    mix-blend-mode: screen;
}

/* current (active tier) — brighter gold foil border + outer glow + brighter sheen */
.vip-card.current {
    border-color: rgba(245,206,123,0.92);
    box-shadow:
        inset 0 1px 0 rgba(255,240,200,0.45),
        inset 0 16px 30px -18px rgba(255,222,150,0.30),
        inset 0 -16px 26px -14px rgba(0,0,0,0.85),
        inset 0 0 0 1px rgba(0,0,0,0.30),
        0 0 0 1px rgba(245,158,11,0.30),
        0 8px 30px rgba(245,158,11,0.20),
        0 4px 18px rgba(0,0,0,0.45);
}
/* corner brackets glow up via drop-shadow + brightness (cheapest base->current step) */
.vip-card.current::before {
    filter: drop-shadow(0 0 3px rgba(245,158,11,0.45)) brightness(1.18);
}
/* sheen streak reads a touch brighter on the active tier */
.vip-card.current::after {
    background: linear-gradient(
        118deg,
        transparent 28%,
        rgba(253,230,138,0.07) 42%,
        rgba(254,243,199,0.22) 49%,
        rgba(255,251,238,0.34) 51%,
        rgba(253,230,138,0.10) 58%,
        transparent 72%
    );
}

/* header — gold gradient text on warm cream solid fallback (wins without background-clip:text) */
.vip-card-header {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.7rem;
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: 0.01em;
    color: #fde68a; /* fallback: stays warm gold if background-clip:text unsupported */
    background: linear-gradient(100deg, #fef3c7 0%, #fcd34d 40%, #f59e0b 70%, #fcd9a0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 有效中 — slim refined gold pill (literal 999px radius, no undefined var) */
.vip-status.active {
    flex-shrink: 0;
    -webkit-text-fill-color: initial; /* reset so badge text is NOT clipped by header gradient */
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fde68a;
    background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(252,211,77,0.10));
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(245,206,123,0.55);
    box-shadow:
        inset 0 1px 0 rgba(253,230,138,0.30),
        0 1px 3px rgba(0,0,0,0.35);
}

/* body — light warm-neutral for contrast on black, lifted above decoration */
.vip-card-body {
    position: relative;
    z-index: 1;
    font-size: 0.88rem;
    color: #d6d3d1;
    line-height: 1.6;
}

/* benefits — soft gold accent */
.benefits {
    margin-top: 0.45rem;
    font-style: italic;
    font-size: 0.82rem;
    color: #fde68a;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* ── Promo Card ── */
.promo-card {
    background: var(--card);
    border: 2px dashed var(--gold);
    border-radius: var(--radius-card);
    padding: 1.3rem 1.2rem;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fffbf0 0%, #fff9f5 100%);
}

.promo-card h3 {
    margin-bottom: 0.35rem;
    color: var(--text);
}

.promo-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 0.9rem;
}

/* ── Password Section ── */
.settings-card {
    background: var(--card);
    border-radius: var(--radius-card);
    padding: 1.2rem 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}

.settings-card h3 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pw-set-indicator {
    font-size: 0.85rem;
    color: var(--success);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.pw-unset-indicator {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    line-height: 1.5;
}

/* ── Section Label ── */
.section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.07em;
    margin-bottom: 0.7rem;
}

/* ── Coupon Cards ── */
.coupon-card {
    display: flex;
    align-items: stretch;
    background: var(--card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    margin-bottom: 0.9rem;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.coupon-card:not(.coupon-used):hover {
    box-shadow: var(--shadow-elevated);
    transform: translateY(-1px);
}

.coupon-left {
    background: var(--primary);
    color: #fff;
    padding: 1.1rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    text-align: center;
    flex-shrink: 0;
}

.coupon-left.cashback {
    background: linear-gradient(160deg, #065f46, #059669);
}

.coupon-left.redeem {
    background: linear-gradient(160deg, #1e3a5f, #2563eb);
}

.coupon-discount {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.05;
}

.coupon-unit {
    font-size: 0.82rem;
    font-weight: 400;
}

.coupon-type-label {
    font-size: 0.68rem;
    margin-top: 0.2rem;
    opacity: 0.88;
    white-space: nowrap;
}

.coupon-divider {
    width: 1px;
    background: repeating-linear-gradient(
        to bottom,
        var(--border) 0,
        var(--border) 5px,
        transparent 5px,
        transparent 11px
    );
    flex-shrink: 0;
}

.coupon-right {
    flex: 1;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.22rem;
    min-width: 0;
}

.coupon-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.35;
}

.coupon-condition {
    font-size: 0.76rem;
    color: var(--text-secondary);
}

.coupon-code {
    font-family: 'Courier New', 'SF Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--primary);
}

.coupon-expiry {
    font-size: 0.73rem;
    color: var(--text-secondary);
}

.coupon-used {
    opacity: 0.5;
    filter: grayscale(0.4);
}

.coupon-status-stamp {
    position: absolute;
    top: 50%;
    right: 0.9rem;
    transform: translateY(-50%) rotate(-12deg);
    border: 2px solid #aaa;
    color: #aaa;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.05em;
}

/* ── Stamp Cards ── */
.stamp-card-item {
    background: var(--card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    margin-bottom: 0.9rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--border);
    transition: box-shadow 0.2s ease;
}

.stamp-card-item:hover {
    box-shadow: var(--shadow-elevated);
}

.stamp-card-item.stamp-completed {
    border: 2px solid var(--gold);
    background: linear-gradient(135deg, #fffbf0 0%, #fff7f0 100%);
    box-shadow: 0 3px 14px rgba(245,158,11,0.18);
}

.stamp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    gap: 0.5rem;
}

.stamp-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.stamp-card-reward {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 0.7rem;
}

.stamp-circles {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.stamp-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.stamp-circle.filled {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 1px 4px rgba(192,57,43,0.3);
}

.stamp-progress-text {
    margin-top: 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* ── Points / Transactions ── */
.points-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.3rem;
}

.points-balance {
    text-align: right;
}

.points-balance-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
}

.points-balance-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

.tx-type-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.tx-type-icon.earn   { background: #ecfdf5; }
.tx-type-icon.topup  { background: #eff6ff; }
.tx-type-icon.deduct { background: #fff1f2; }

.tx-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.tx-row:last-child {
    border-bottom: none;
}

.tx-detail {
    flex: 1;
    min-width: 0;
}

.tx-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.tx-note {
    font-size: 0.76rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

.tx-date {
    font-size: 0.73rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

.tx-amount {
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.tx-amount.positive { color: var(--success); }
.tx-amount.negative { color: var(--primary); }

/* ── VIP Plans Page ── */
.vip-page h2 {
    margin-bottom: 1rem;
}

.vip-page h3 {
    margin: 1.5rem 0 0.8rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hint {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-bottom: 1rem;
}

.plan-card {
    background: var(--card);
    border-radius: var(--radius-card);
    padding: 1.1rem 1.2rem;
    box-shadow: var(--shadow-card);
    margin-bottom: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid var(--border);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.plan-card:hover {
    box-shadow: var(--shadow-elevated);
    transform: translateY(-1px);
}

.plan-card.featured {
    border: 1.5px solid var(--gold);
    background: linear-gradient(135deg, #fffbf0, #fff9f5);
    box-shadow: 0 3px 14px rgba(245,158,11,0.15);
}

.plan-info {
    flex: 1;
    min-width: 0;
}

.plan-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.plan-duration {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.plan-benefits {
    color: var(--text-secondary);
    font-size: 0.78rem;
    margin-top: 0.25rem;
    line-height: 1.45;
}

.plan-price {
    text-align: right;
    flex-shrink: 0;
}

.price {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.35rem;
    line-height: 1.1;
}

/* ── Campaigns Page ── */
.campaigns-page h2 {
    margin-bottom: 1rem;
}

.campaign-card {
    background: var(--card);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.campaign-card:hover {
    box-shadow: var(--shadow-elevated);
    transform: translateY(-1px);
}

.campaign-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.campaign-body {
    padding: 1rem 1.1rem;
}

.campaign-body h3 {
    margin-bottom: 0.35rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.campaign-body p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
}

.discount-info {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 0.4rem;
}

.campaign-date {
    color: var(--text-secondary);
    font-size: 0.78rem;
    margin-top: 0.4rem;
}

/* ── Modal ── */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(45,35,25,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1.5rem 1rem;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.modal-content {
    background: var(--card);
    border-radius: var(--radius-card);
    padding: 1.6rem;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-elevated);
}

.modal-content h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.buy-steps {
    margin: 0.8rem 0 1rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
}

.step:last-child {
    margin-bottom: 0;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.step p {
    font-size: 0.9rem;
    line-height: 1.5;
    padding-top: 0.3rem;
}

/* ── Bottom Navigation ── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    padding: 0;
    z-index: 100;
    box-shadow: 0 -2px 12px rgba(45,35,25,0.07);
}

.nav-item {
    flex: 1;
    text-decoration: none;
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.55rem 0 0.45rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
    transition: color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2.5px;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
    opacity: 0;
    transition: opacity 0.18s ease;
}

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

.nav-item.active::after {
    opacity: 1;
}

.nav-icon {
    display: block;
    font-size: 1.25rem;
    line-height: 1;
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 2.5rem 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.5;
}
.empty-state-text { font-weight: 600; margin-bottom: 0.2rem; }
.empty-state-sub { font-size: 0.8rem; color: var(--text-secondary); opacity: 0.7; }

/* ── Page Header Row ── */
.page-header-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.3rem;
}
.page-header-row h2 { margin: 0; }
.header-count {
    background: var(--primary); color: #fff;
    padding: 3px 12px; border-radius: 20px;
    font-size: 0.78rem; font-weight: 600;
}

/* ── History Toggle ── */
.history-toggle { margin-top: 0.5rem; }
.history-toggle summary {
    cursor: pointer; color: var(--text-secondary); font-size: 0.88rem;
    padding: 0.5rem 0; list-style: none;
    display: flex; align-items: center; gap: 0.4rem; user-select: none;
}
.history-toggle summary::before { content: '▸'; transition: transform 0.2s; }
.history-toggle[open] summary::before { transform: rotate(90deg); }

/* ── Coupon Meta Row ── */
.coupon-meta {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 0.4rem; font-size: 0.75rem;
}
.coupon-code {
    background: var(--bg); padding: 2px 8px; border-radius: 4px;
    font-family: 'SF Mono', 'Menlo', monospace; font-size: 0.75rem;
    color: var(--text-secondary); letter-spacing: 0.05em;
}
.coupon-expiry { color: var(--text-secondary); }
.coupon-condition { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.15rem; }

/* ── Stamp Card Extras ── */
.stamp-count-badge {
    font-size: 0.82rem; color: var(--text-secondary); font-weight: 600;
}
.stamp-card-desc {
    font-size: 0.8rem; color: var(--text-secondary);
    margin-bottom: 0.6rem; line-height: 1.45;
}
.stamp-redeem-hint {
    margin-top: 0.8rem; font-size: 0.8rem;
    color: var(--gold); font-weight: 600; text-align: center;
}
.stamp-circle { font-size: 0.65rem; display: flex; align-items: center; justify-content: center; }

/* ── Utility ── */
.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-secondary); }
.font-bold   { font-weight: 700; }
.w-full { width: 100%; display: block; }

/* ── Responsive: very small screens ── */
@media (max-width: 360px) {
    body { font-size: 14px; }
    .stamp-circle { width: 26px; height: 26px; }
    .coupon-left { min-width: 66px; }
    .coupon-discount { font-size: 1.45rem; }
}

/* ── Responsive: wider (tablet preview) ── */
@media (min-width: 480px) {
    .app-container { padding: 1.2rem 1.5rem 2rem; }
    .bottom-nav { max-width: 480px; left: 50%; transform: translateX(-50%); }
}

/* ── Lucide Icons ── */
.icon, [data-lucide] {
    width: 1em; height: 1em;
    vertical-align: -0.125em;
    display: inline-block;
}
.nav-icon [data-lucide] {
    width: 22px; height: 22px;
    stroke-width: 2;
}
.icon-sm { width: 0.85em; height: 0.85em; }
.icon-lg { width: 1.5em; height: 1.5em; }
.icon-success { color: var(--success); }
.empty-icon {
    width: 2.5rem; height: 2.5rem;
    opacity: 0.4;
    margin-bottom: 0.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ── Claimable Coupon Cards ── */
.claim-card {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--card); border-radius: var(--radius-card); padding: 1rem;
    margin-bottom: 0.6rem; box-shadow: var(--shadow-card);
    border-left: 4px solid var(--gold);
}
.claim-info { flex: 1; }
.claim-title { font-weight: 600; font-size: 0.95rem; }
.claim-desc { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.15rem; }
.claim-expiry { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.15rem; }
.section-label {
    font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

/* ── Loading ── */
.loading-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(250,248,245,0.8); display: flex;
    align-items: center; justify-content: center; z-index: 200;
}
.spinner {
    width: 36px; height: 36px; border: 3px solid var(--border);
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.loading { opacity: 0.6; pointer-events: none; }
.btn.loading::after {
    content: ''; display: inline-block; width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
    border-radius: 50%; animation: spin 0.6s linear infinite;
    margin-left: 0.4rem; vertical-align: middle;
}
.btn:disabled { opacity: 0.6; }

/* ══════════════════════════════════════════
   公告系統 — Banner + Modal
   ══════════════════════════════════════════ */

/* ── Banner（頂部橫幅） ── */
.ann-banner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-bottom: 1px solid #f59e0b33;
    animation: bannerSlideIn 0.3s ease-out;
}
@keyframes bannerSlideIn {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.ann-banner-content {
    display: flex; align-items: center; gap: 0.5rem;
    flex: 1; min-width: 0;
}
.ann-banner-title {
    font-size: 0.88rem; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ann-banner-close {
    background: none; border: none; font-size: 1.2rem;
    color: #92400e; cursor: pointer; padding: 0 0.3rem;
    flex-shrink: 0;
}
.ann-type-tag {
    font-size: 0.7rem; font-weight: 600; padding: 0.1rem 0.4rem;
    border-radius: 4px; white-space: nowrap; flex-shrink: 0;
}
.ann-type-new_product { background: #dcfce7; color: #166534; }
.ann-type-promotion { background: #fce7f3; color: #9d174d; }
.ann-type-notice { background: #dbeafe; color: #1e40af; }
.ann-type-general { background: #f3f4f6; color: #374151; }

/* ── Modal（彈窗） ── */
.ann-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 500; padding: 1.5rem;
    animation: fadeIn 0.25s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.ann-modal {
    background: var(--card, #fff); border-radius: 16px;
    max-width: 380px; width: 100%;
    max-height: 80vh; overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease-out;
}
@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.ann-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
    font-size: 0.8rem; color: var(--text-secondary, #6b7280);
}
.ann-modal-close {
    background: none; border: none; font-size: 1.4rem;
    cursor: pointer; color: var(--text-secondary, #6b7280);
    padding: 0; line-height: 1;
}
.ann-modal-body {
    padding: 1.2rem; overflow-y: auto; flex: 1;
    text-align: center;
}
.ann-modal-img {
    width: 100%; max-height: 220px; object-fit: cover;
    border-radius: 10px; margin-bottom: 1rem;
}
.ann-modal-title {
    font-size: 1.1rem; font-weight: 700;
    margin-bottom: 0.6rem; color: var(--text, #1f2937);
}
.ann-modal-text {
    font-size: 0.9rem; line-height: 1.6;
    color: var(--text-secondary, #4b5563);
    text-align: left;
}
.ann-modal-footer {
    display: flex; justify-content: center; gap: 0.8rem;
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--border, #e5e7eb);
}

/* ── Tier Hero Card ── */
.tier-hero-card {
    background: linear-gradient(135deg, #c0392b 0%, #8e2020 100%);
    color: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.tier-hero-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.tier-hero-icon { font-size: 2.5rem; }
.tier-hero-name { font-size: 1.4rem; font-weight: 700; }
.tier-hero-message { font-size: 0.85rem; opacity: 0.85; margin-top: 2px; }
.tier-hero-progress { margin-top: 0.5rem; }
.tier-progress-bar-bg {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
}
.tier-progress-bar {
    background: #f1c40f;
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}
.tier-progress-text {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 0.5rem;
    text-align: center;
}
.tier-hero-max {
    text-align: center;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}
.tier-next-unlock {
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    text-align: center;
}
.tier-current-reward {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* ── Quick Summary ── */
.quick-summary {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.quick-item {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 0.8rem 0.5rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}
.quick-icon { font-size: 1.2rem; display: block; }
.quick-value { font-size: 1.3rem; font-weight: 700; display: block; color: #c0392b; }
.quick-label { font-size: 0.75rem; color: #999; }

/* ── Collapsible Sections ── */
.section-collapsible {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 0.6rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    user-select: none;
}
.section-header:active { background: #f8f8f8; }
.section-chevron {
    width: 18px; height: 18px;
    transition: transform 0.2s;
    color: #999;
    flex-shrink: 0;
}
.section-body { padding: 0 1.2rem 1rem; }

/* ── VIP Promo Card (inside collapsible) ── */
.vip-promo-card {
    text-align: center;
    padding: 0.5rem 0;
}
.vip-promo-card p {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════
   等級路線圖 + 來店時間軸
   ═══════════════════════════════════════════════ */

/* ── Page Header ── */
.tiers-page { padding-bottom: 2rem; }

.tiers-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 0 0.5rem;
}
.tiers-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--card);
    box-shadow: var(--shadow-card);
    color: var(--text);
    text-decoration: none;
}
.tiers-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

/* ── Current Tier Summary ── */
.tiers-current-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: var(--radius-card);
    padding: 1.2rem 1rem;
    margin: 0.8rem 0;
    box-shadow: var(--shadow-elevated);
}
.tiers-current-icon { font-size: 2.4rem; }
.tiers-current-name { font-size: 1.1rem; font-weight: 700; }
.tiers-current-msg { font-size: 0.82rem; opacity: 0.85; margin-top: 0.15rem; }
.tiers-current-count {
    font-size: 0.78rem;
    opacity: 0.7;
    margin-top: 0.3rem;
}

/* ── Tabs ── */
.tiers-tabs {
    display: flex;
    gap: 0;
    background: var(--card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 4px;
    margin-bottom: 1rem;
}
.tiers-tab {
    flex: 1;
    padding: 0.6rem 0;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.tiers-tab.active {
    background: var(--primary);
    color: #fff;
}

/* ── Tier Roadmap ── */
.tier-roadmap { padding: 0.5rem 0; }

.roadmap-item {
    display: flex;
    gap: 0.8rem;
    min-height: 60px;
}

.roadmap-line-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 24px;
    flex-shrink: 0;
}

.roadmap-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--border);
    border: 3px solid var(--card);
    box-shadow: 0 0 0 2px var(--border);
    flex-shrink: 0;
    z-index: 1;
}
.roadmap-dot.dot-reached {
    background: var(--text-secondary);
    box-shadow: 0 0 0 2px var(--text-secondary);
}
.roadmap-dot.dot-current {
    background: var(--primary);
    box-shadow: 0 0 0 2px var(--primary), 0 0 0 6px rgba(192,57,43,0.2);
    width: 16px; height: 16px;
}

.roadmap-line {
    width: 2px;
    flex: 1;
    background: var(--border);
    min-height: 20px;
}
.roadmap-line.line-reached {
    background: var(--text-secondary);
}

.roadmap-content {
    flex: 1;
    padding-bottom: 1.2rem;
}

.roadmap-tier-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.roadmap-icon { font-size: 1.2rem; }
.roadmap-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}
.roadmap-threshold {
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: var(--bg);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

.roadmap-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.roadmap-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
    padding: 0.15rem 0.6rem;
    border-radius: 10px;
    margin-top: 0.3rem;
}

.roadmap-reward {
    font-size: 0.8rem;
    color: var(--gold);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* 已達成 */
.roadmap-reached .roadmap-name { color: var(--text-secondary); }
.roadmap-reached .roadmap-desc { opacity: 0.6; }
.roadmap-reached .roadmap-icon { opacity: 0.5; }

/* 目前等級 */
.roadmap-current .roadmap-name {
    color: var(--primary);
    font-size: 1rem;
}
.roadmap-current .roadmap-icon { font-size: 1.4rem; }

/* 未達成 */
.roadmap-locked .roadmap-name { color: var(--text); }
.roadmap-locked .roadmap-dot {
    background: var(--bg);
    border: 2px dashed var(--border);
    box-shadow: none;
}

/* ── Visit Timeline ── */
.visit-timeline { padding: 0.5rem 0; }

.timeline-item {
    display: flex;
    gap: 0.8rem;
}

.timeline-dot-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20px;
    flex-shrink: 0;
}

.timeline-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 5px;
}

.timeline-line {
    width: 2px;
    flex: 1;
    background: var(--border);
    min-height: 20px;
}

.timeline-content {
    flex: 1;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.3rem;
}
.timeline-item:last-child .timeline-content { border-bottom: none; }

.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}
.timeline-store {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}
.timeline-note {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

/* ── Empty State ── */
.timeline-empty {
    text-align: center;
    padding: 3rem 1rem;
}
.timeline-empty-icon { font-size: 2.5rem; margin-bottom: 0.8rem; }
.timeline-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.3rem;
}
.timeline-empty-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════
   客人端優惠券核銷
   ═══════════════════════════════════════════════ */

.coupon-clickable { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.coupon-clickable:active { transform: scale(0.97); }

.coupon-use-hint {
    font-size: 0.7rem;
    color: var(--primary);
    margin-top: 0.3rem;
    font-weight: 500;
}

/* ── Redeem Modal ── */
.redeem-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.redeem-modal {
    background: var(--card);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 480px;
    padding: 1.5rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    position: relative;
    animation: slideUp 0.25s ease-out;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.redeem-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}
.redeem-header {
    text-align: center;
    margin-bottom: 1.2rem;
}
.redeem-icon { font-size: 2rem; margin-bottom: 0.3rem; }
.redeem-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}
.redeem-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
    white-space: pre-line;
}
.redeem-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}
.redeem-input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-input);
    font-size: 1rem;
    text-align: center;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
    box-sizing: border-box;
}
.redeem-input:focus {
    border-color: var(--primary);
    outline: none;
}
.redeem-msg {
    text-align: center;
    font-size: 0.85rem;
    min-height: 1.2rem;
    margin-bottom: 0.5rem;
}
.redeem-msg.error { color: var(--error); }
.redeem-msg.success { color: var(--success); }

/* ── 點數商城 ── */
.store-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card);
    border-radius: var(--radius-card);
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-card);
}
.store-item-info { flex: 1; margin-right: 0.8rem; }
.store-item-name { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.store-item-desc { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.15rem; }
.store-item-cost {
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 0.2rem;
}

/* ============================================================
   換頁轉場 — CSS View Transitions（僅客人端 /m/*，因為只有這裡載入 mobile.css）
   前進：舊頁左移淡出、新頁右移淡入；返回（base.html 的 JS 加 'back' type）反向。
   底部導覽同名 → 轉場中保持不動。不支援的瀏覽器自動退回瞬間切換。
   ============================================================ */
@view-transition { navigation: auto; }

.bottom-nav { view-transition-name: appnav; }
::view-transition-group(appnav) { animation: none; }

::view-transition-old(root) { animation: mvt-out-left 0.30s cubic-bezier(.4,0,.2,1) both; }
::view-transition-new(root) { animation: mvt-in-right 0.30s cubic-bezier(.4,0,.2,1) both; }
:active-view-transition-type(back)::view-transition-old(root) { animation: mvt-out-right 0.30s cubic-bezier(.4,0,.2,1) both; }
:active-view-transition-type(back)::view-transition-new(root) { animation: mvt-in-left 0.30s cubic-bezier(.4,0,.2,1) both; }

@keyframes mvt-out-left  { to   { transform: translateX(-14%); opacity: 0; } }
@keyframes mvt-in-right  { from { transform: translateX(14%);  opacity: 0; } }
@keyframes mvt-out-right { to   { transform: translateX(14%);  opacity: 0; } }
@keyframes mvt-in-left   { from { transform: translateX(-14%); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.001s; }
}

/* ══════════════════════════════════════════════════════════════════════
   霧面玻璃 restyle 覆蓋層（2026-07-24）
   策略：不改上面既有規則，在檔尾以同名選擇器覆蓋 → 風險低、可整段刪除回退。
   規則：實心版寫在外層當 fallback，模糊版放 @supports 內升級。
   ══════════════════════════════════════════════════════════════════════ */

/* ── 固定暖色光暈背景 ──
   用 body::before 而非 background-attachment:fixed（iOS Safari 慣性捲動會抖），
   並取 view-transition-name 讓換頁轉場不把背景一起平移。 */
body { background: var(--bg); }
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(90% 55% at 15% 0%,   rgba(232,98,63,.22),  transparent 60%),
        radial-gradient(80% 50% at 92% 12%,  rgba(192,57,43,.16),  transparent 62%),
        radial-gradient(120% 62% at 45% 100%, rgba(246,182,74,.24), transparent 64%),
        var(--bg);
    view-transition-name: pagebg;
}
::view-transition-group(pagebg) { animation: none; }

/* ── 玻璃表面：實心 fallback ── */
.info-card,
.promo-card,
.vip-promo-card,
.coupon-card,
.stamp-card-item,
.plan-card,
.campaign-card,
.claim-card,
.store-item-card,
.quick-item,
.section-collapsible,
.tiers-back,
.tiers-tabs,
.tier-hero-card,
.modal-content,
.redeem-modal,
.points-header {
    background: var(--glass-solid);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

/* ── 玻璃表面：支援時升級成半透明 + 模糊 ── */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .info-card,
    .promo-card,
    .vip-promo-card,
    .plan-card,
    .campaign-card,
    .store-item-card,
    .quick-item,
    .section-collapsible,
    .tiers-back,
    .tiers-tabs,
    .tier-hero-card,
    .points-header {
        background: var(--glass);
        -webkit-backdrop-filter: var(--glass-blur);
        backdrop-filter: var(--glass-blur);
    }
    /* 長列表項目用較淺模糊，避免舊 Android 捲動卡頓 */
    .coupon-card,
    .stamp-card-item,
    .claim-card {
        background: var(--glass);
        -webkit-backdrop-filter: var(--glass-blur-sm);
        backdrop-filter: var(--glass-blur-sm);
    }
    .modal-content,
    .redeem-modal {
        background: var(--glass-strong);
        -webkit-backdrop-filter: var(--glass-blur);
        backdrop-filter: var(--glass-blur);
    }
}

/* ── 等級主卡：紅漸層白字 → 玻璃深字（配合示意圖） ── */
.tier-hero-card { color: var(--text); }
.tier-hero-message { color: var(--text-secondary); opacity: 1; }
.tier-progress-bar-bg { background: rgba(255,255,255,.72); }
.tier-progress-bar { background: var(--accent-grad); }
.tier-progress-text { color: var(--text-secondary); opacity: 1; }
.tier-hero-max { color: var(--text); }
.tier-current-reward { color: var(--text-secondary); opacity: 1; }
.tier-next-unlock {
    background: rgba(255,255,255,.60);
    border: 1px solid var(--glass-border);
    color: var(--text);
}

/* ── 底部導覽：較濃的霧面 ── */
.bottom-nav {
    background: var(--glass-solid);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -4px 20px rgba(120,50,25,.10);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .bottom-nav {
        background: var(--glass-strong);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }
}
.nav-item { color: var(--text-tertiary); }
.nav-item.active { color: var(--primary); }

/* 平板寬度：導覽變 480px 置中區塊 → 補滿邊框與上圓角，避免半透明時邊線斷在畫面中間 */
@media (min-width: 480px) {
    .bottom-nav {
        border: 1px solid var(--glass-border);
        border-radius: 18px 18px 0 0;
    }
}

/* ── 按鈕 ── */
.btn-primary {
    background: var(--primary);              /* CTA 維持不透明，白字才有對比 */
    box-shadow: 0 6px 18px rgba(192,57,43,.30);
}
.btn-accent {
    background: var(--accent-grad);
    color: #fff;                             /* 原本 #7c3d0c 在橘端不足 4.5:1 */
    box-shadow: 0 6px 18px rgba(232,98,63,.30);
}
.btn-accent:hover { background: linear-gradient(135deg, #d9542f, #eda72f); }
.btn-secondary {
    background: rgba(255,255,255,.62);
    border: 1px solid var(--glass-border);
    color: var(--text);                      /* 原本吃未定義的 --text-primary → 純黑 */
}
.btn-secondary:hover { background: rgba(255,255,255,.82); }
.btn-outline {
    border: 1.5px solid rgba(66,38,28,.22);  /* 原 #e8e0d8 在暖光上幾乎看不見 */
    color: var(--text-secondary);
}

/* ── 表單輸入：一律不透明 ──
   半透明輸入框會讓打字內容浮在漸層上，且 iOS 原生日期/下拉選單會自帶白底造成不一致。 */
.form-group input,
.form-group textarea,
.form-group select {
    background: rgba(255,255,255,.94);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-input);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    background: #fff;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(245,158,11,.14);
}

/* ── 分隔線：改用專屬 token（--border 同時被當填色/圓環用，不能整批換） ── */
.info-row { border-bottom-color: var(--divider); }
.tx-row { border-bottom-color: var(--divider); }

/* ── 長篇法規文字：需要一張可讀的紙面 ──
   隱私權/服務條款是純文字直接貼在背景上，玻璃漸層會讓長文很難讀。 */
.privacy-page,
.legal-page {
    background: rgba(255,255,255,.90);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 1.1rem 1.1rem 1.4rem;
    box-shadow: var(--shadow-card);
    color: var(--text);
}

/* ── 對比修正（這些在舊底色就已偏低，換底後會更糟） ── */
.tier-message { color: #92400e; }
.tier-next { color: var(--text-secondary); }
.price { color: #b45309; }
.stamp-redeem-hint { color: #92400e; }
.empty-state { color: var(--text-secondary); }
.empty-state-sub { opacity: 1; color: var(--text-tertiary); }

/* ── iOS 合成 bug 防護 ──
   同一元素上同時有 filter 與 backdrop-filter，Safari 會把背板算爆（變黑或消失）。
   已使用的券改用降低飽和的實心底，不做模糊。 */
.coupon-used {
    opacity: 1;
    filter: none;
    background: rgba(245,240,235,.92);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    color: var(--text-tertiary);
}

/* ── 必須維持不透明（店員要在櫃檯讀取） ── */
.rdm-pickup,
.rdm-pickup-code,
.pickup-modal,
.pickup-modal-code,
.home-barcode-frame {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* ── 安裝提示條（加到主畫面 / 用外部瀏覽器開啟） ── */
.a2hs-tip {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 10px 12px 0;
    padding: 10px 12px;
    background: var(--glass-solid);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .a2hs-tip {
        background: var(--glass-strong);
        -webkit-backdrop-filter: var(--glass-blur-sm);
        backdrop-filter: var(--glass-blur-sm);
    }
}
.a2hs-ic { font-size: 16px; flex: 0 0 auto; }
.a2hs-txt { flex: 1; min-width: 0; }
.a2hs-x {
    flex: 0 0 auto;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 14px;
    padding: 4px 2px;
    cursor: pointer;
    font-family: inherit;
}
