/*
 * Kedr Camp Loyalty — Personal Cabinet
 * 3 tier themes via CSS custom properties
 * Brand: Terracotta #C4956A, Deep Forest #2E4A2E, Cloud White #F1F0EC, Sage #6B8E63, Gold #B8860B
 */

/* ── Base variables ─────────────────────────────────────────────────── */

:root {
    --tg-bg: #F5F0E6;
    --radius: 6px;
    --radius-sm: 6px;
    --transition: 0.3s ease;
    --font-display: 'Playfair Display', Georgia, 'DejaVu Serif', serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, 'Lato', sans-serif;
    --font: var(--font-body);
    --max-width: 480px;

    /* Variant C base palette */
    --c-bg: #F5F0E6;
    --c-surface: #FFFFFF;
    --c-ink: #2C2C2C;
    --c-ink-60: rgba(44,44,44,.62);
    --c-ink-40: rgba(44,44,44,.42);
    --c-ink-12: rgba(44,44,44,.12);
    --c-ink-06: rgba(44,44,44,.06);
    --c-gold: #B8860B;
    --c-sage: #6B8E63;
    --c-forest: #2E4A2E;
    --c-sand: #D4B896;
    --c-sand-30: rgba(212,184,150,.35);

    /* Legacy alias — all var(--cloud-white, #F1F0EC) fallbacks now read as dark ink */
    --cloud-white: var(--c-ink);

    /* Фон */
    --bg-input: #F9F5EA;
    --bg-divider: rgba(44,44,44,.06);
    --bg-tab-bar: var(--c-surface);

    /* Текст */
    --text-tertiary: var(--c-ink-40);
    --text-hint: var(--c-ink-60);

    /* Статусные */
    --status-success: var(--c-sage);
    --status-danger: #C45A5A;
    --status-warning: var(--c-gold);

    /* Таб-бар */
    --tab-inactive: var(--c-ink-40);
    --tab-active: var(--c-forest);

    /* Скругления — variant C uses 6px */
    --r-card: 6px;
    --r-btn: 6px;
    --r-input: 6px;
    --r-badge: 6px;
    --r-tag: 4px;
    --r-progress: 3px;

    /* Динамические — переключаются applyTierTheme() */
    --bg-primary: var(--c-bg);
    --bg-card: var(--c-surface);
    --bg-card-hover: #FAF6EC;
    --text-primary: var(--c-ink);
    --text-secondary: var(--c-ink-60);
    --accent: var(--c-gold);
    --accent-light: rgba(184,134,11,0.08);
    --accent-soft: rgba(184,134,11,0.12);
    --accent-border: rgba(184,134,11,0.3);
    --balance-color: var(--c-gold);
    --balance-sub: var(--c-ink-60);
    --hero-bg: var(--c-surface);
    --hero-border: var(--c-ink-12);
    --tier-gradient: var(--c-forest);
    --tier-glow: rgba(184,134,11,0.25);
    --progress-fill: var(--c-gold);
    --btn-primary-bg: var(--c-forest);
    --btn-primary-color: #F1F0EC;
    --btn-secondary-border: var(--c-ink-12);
    --btn-secondary-text: var(--c-forest);
    --card-bg: var(--c-surface);
    --earn-color: var(--c-sage);
    --earn-icon-bg: rgba(107,142,99,0.12);
    --earn-btn-bg: rgba(107,142,99,0.10);
    --badge-bg: #F8EFDC;
    --badge-border: var(--c-sand);
    --positive: var(--c-sage);
    --negative: #C45A5A;
    --logo-stroke: var(--c-sand);
    --logo-fill: rgba(212,184,150,0.15);
    --logo-text: var(--c-gold);
}

/* Legacy class themes — kept for backward compat, overridden by applyTierTheme() */
.theme-guest {}
.theme-friend {}
.theme-family {}

/* Fixed brand header — visible on every tab, sticks below Telegram header */
.brand-header-fixed {
    position: sticky;
    top: 0;
    z-index: 9;
    text-align: center;
    padding: 14px 0 6px;
    background: var(--c-bg);
    font: italic 13px/1 var(--font-display);
    color: var(--c-gold);
    letter-spacing: 0.2px;
}

/* Tier logo — Кедр Кэмп shield-patch, без круглой рамки (рельефная нашивка) */
.tier-logo {
    display: block;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    object-fit: contain;
}
.hero-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.hero-top .tier-card-body { margin-bottom: 0; }
.hero-top .member-name { margin-top: 0; }

/* ── Reset & base ───────────────────────────────────────────────── */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scrollbar-gutter: stable;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 16px;
    padding-bottom: 32px;
    -webkit-font-smoothing: antialiased;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ── Loading ────────────────────────────────────────────────────── */

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    color: var(--text-secondary, #999);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent, #6B8E63);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Brand logo ────────────────────────────────────────────────── */

.brand-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* Кедр Кэмп shield-patch — без круглой рамки и фона, чтобы был виден рельеф нашивки */
.brand-logo-img {
    width: 220px;
    height: 220px;
    object-fit: contain;
}

.brand-logo-img.small {
    width: 140px;
    height: 140px;
}

.brand-mark {
    font-family: var(--font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--accent, #6B8E63);
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 8px;
    opacity: 0.8;
}

/* ── Empty/error states ─────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-state h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary, #999);
    font-size: 13px;
    line-height: 1.6;
}

.empty-state .empty-hint {
    margin-top: 18px;
    font-size: 12px;
    opacity: 0.6;
}

/* ── Browser login screen ──────────────────────────────────────── */

.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 24px;
}

.login-card {
    text-align: center;
    width: 100%;
    max-width: 320px;
}

.login-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary, #E8E5DF);
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-secondary, #999);
    margin-bottom: 32px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-input {
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary, #fff);
    font-family: var(--font);
    font-size: 16px;
    text-align: center;
    letter-spacing: 1.5px;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}

.login-input:focus {
    border-color: var(--accent, #6B8E63);
    background: rgba(255, 255, 255, 0.08);
}

.login-input::placeholder {
    color: var(--text-secondary, #666);
    letter-spacing: 0;
    font-size: 15px;
}

.login-button {
    padding: 14px;
    border-radius: var(--radius);
    border: none;
    background: var(--accent, #6B8E63);
    color: #fff;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.login-button:active {
    opacity: 0.85;
    transform: scale(0.98);
}

.login-hint {
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-secondary, #666);
    line-height: 1.5;
}

.login-hint strong {
    color: var(--text-primary, #ccc);
}

.login-hint a {
    color: var(--accent, #6B8E63);
    text-decoration: none;
    font-weight: 500;
}

/* ── Tier card → hero (variant C) ────────────────────────────────── */

.tier-card {
    background: var(--c-surface);
    border: 1px solid var(--c-ink-12);
    border-radius: var(--r-card);
    padding: 16px;
    margin: 10px 0;
    position: relative;
}

.tier-card::before { content: none; }

.tier-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.tier-card-logo { display: none; }
.tier-card-brand { display: none; }

.tier-card-body {
    margin-bottom: 0;
    flex: 1;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #EDE4CE;
    border: 1px solid var(--c-sand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--c-forest);
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.member-name {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    margin: 0;
    color: var(--c-ink);
    letter-spacing: 0;
    text-transform: none;
}

.tier-name {
    font-family: Georgia, var(--font-display);
    font-style: italic;
    font-size: 13px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.2px;
    color: var(--c-gold);
    margin-top: 2px;
}

.tier-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid var(--c-ink-06);
}

.points-display {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.points-value {
    font-family: Georgia, var(--font-display);
    font-style: italic;
    font-size: 24px;
    font-weight: 500;
    color: var(--c-gold);
    line-height: 1;
    letter-spacing: 0;
}

.points-unit {
    font: 400 11px/1.4 var(--font-body);
    font-style: normal;
    color: var(--c-ink-60);
}

.points-earned {
    font-size: 11px;
    color: var(--c-ink-60);
    text-align: right;
    align-self: flex-end;
    margin-left: 0;
}
.points-earned b { color: var(--c-ink); font-weight: 500; }

/* tier-info-btn — variant C .info */
.tier-info-btn {
    width: 22px;
    height: 22px;
    min-width: 22px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--c-ink-40);
    background: transparent;
    color: var(--c-ink-60);
    font-size: 11px;
    font-family: Georgia, serif;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.tier-info-btn svg { width: 12px; height: 12px; stroke-width: 2; }

/* ── Card borders (premium touch) ──────────────────────────────── */

.progress-bars,
.benefit-card,
.stat-card,
.rewards-list,
.history-list,
.history-full,
.referral-card,
.promo-card,
.weather-card,
.house-section,
.booking-card,
.badge-card,
.reward-card {
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Sections ───────────────────────────────────────────────────── */

.section {
    margin-bottom: 16px;
}

.section-title {
    font: 500 11px/1 var(--font-body);
    color: var(--c-ink-60);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
    padding: 0 2px 8px;
    border-bottom: 1px solid var(--c-ink-06);
}

/* ── Progress bars (variant C) ──────────────────────────────────── */

.progress-bars {
    background: var(--c-surface);
    border: 1px solid var(--c-ink-12);
    border-radius: var(--r-card);
    padding: 14px;
}

/* Progress-section inside hero: no own bg, just top margin */
#progress-section.progress-section,
.tier-card #progress-section {
    margin-top: 14px;
    padding: 0;
    background: none;
    border: 0;
}

.progress-item {
    margin-bottom: 10px;
}

.progress-item:last-child {
    margin-bottom: 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 11px;
    margin-bottom: 6px;
    color: var(--c-ink-60);
}
.progress-label .progress-target { color: var(--c-ink-60); }
#progress-main-text { color: var(--c-ink); font-weight: 500; }

.progress-bar {
    height: 6px;
    background: var(--c-ink-06);
    border-radius: var(--r-progress);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--c-gold);
    border-radius: var(--r-progress);
    transition: width 0.6s ease;
    min-width: 2px;
}

.progress-hint {
    font-size: 11px;
    color: var(--c-ink-60);
    text-align: center;
    margin-top: 8px;
    opacity: 1;
}

/* ── Max tier badge ─────────────────────────────────────────────── */

.max-tier-badge {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.max-tier-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    color: var(--accent);
}

.max-tier-badge p {
    color: var(--accent);
    font-weight: 500;
}

/* ── Benefits grid ──────────────────────────────────────────────── */

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.benefit-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    text-align: center;
}

.benefit-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    margin: 0 auto 8px;
    color: var(--accent);
}

.benefit-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.benefit-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ── Stats grid (variant C) ─────────────────────────────────────── */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.stat-card {
    background: var(--c-surface);
    border: 1px solid var(--c-ink-12);
    border-radius: var(--r-card);
    padding: 12px 8px;
    text-align: center;
}

.stat-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-sage);
    margin: 0 auto 4px;
}
.stat-icon svg { width: 16px; height: 16px; }

.stat-value {
    font: 500 16px/1 var(--font-body);
    color: var(--c-ink);
}

.stat-label {
    font: 500 11px/1 var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--c-ink-60);
    margin-top: 2px;
}

/* ── Rewards list ───────────────────────────────────────────────── */

.rewards-list {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
}

.reward-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-soft, rgba(46, 74, 46, 0.08));
}

.reward-item:last-child {
    border-bottom: none;
}

.reward-item:not(.affordable) {
    opacity: 0.75;
}

.reward-item.affordable {
    opacity: 1;
}

.reward-name {
    font: 400 16px/1.3 var(--font-display);
    color: var(--text-primary);
}

.reward-desc {
    font: italic 13px/1.4 var(--font-display);
    color: var(--text-secondary);
    margin-top: 4px;
}

.reward-cost {
    font: 700 16px/1 var(--font-display);
    color: var(--balance-color, #C4956A);
    white-space: nowrap;
    margin-left: 12px;
}

/* ── History list ───────────────────────────────────────────────── */

.history-list {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-item:last-child {
    border-bottom: none;
}

.history-desc {
    font: 400 15px/1.3 var(--font-body);
    color: var(--text-primary);
}

.book-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    background: var(--accent, #B8860B);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 20px var(--tier-glow, rgba(184, 134, 11, 0.3));
}
.book-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 24px var(--tier-glow, rgba(184, 134, 11, 0.4)); }
.book-cta-btn:active { transform: translateY(0); }
.book-cta-btn svg { stroke: #fff; }

/* ── Earn points (activity claims) ────────────────────────────────────── */

.earn-type-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.earn-type-card:hover { background: var(--bg-card-hover); }
.earn-type-icon {
    width: 24px;
    font-size: 18px;
    text-align: center;
    margin-right: 12px;
    flex-shrink: 0;
    /* inline icon, no background */
}
.earn-type-info { flex: 1; }
.earn-type-name { font: 400 15px/1.3 var(--font-body); color: var(--text-primary); }
.earn-type-desc { font: 300 11px/1 var(--font-body); color: var(--text-hint, #607060); margin-top: 2px; }
.earn-type-points {
    font: 700 15px/1 var(--font-body);
    color: var(--earn-color, var(--accent));
    white-space: nowrap;
}

/* Activity claim bottom sheet */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.sheet-panel {
    width: 100%;
    max-width: var(--max-width);
    background: var(--bg-card);
    border-radius: 20px 20px 0 0;
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
}
.sheet-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.sheet-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
}
.activity-points-badge {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    font-size: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.activity-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}
.activity-review-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    transition: opacity 0.2s;
}
.activity-review-link:hover { opacity: 0.8; }
.activity-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.activity-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--bg-card-hover);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 14px;
    outline: none;
    box-sizing: border-box;
}
.activity-input:focus { border-color: var(--accent); }
.activity-submit {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}
.activity-note {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}
.activity-result {
    margin-top: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: center;
}
.activity-result.success { background: rgba(107, 142, 99, 0.15); color: #8BAF6B; }
.activity-result.error { background: rgba(196, 69, 69, 0.15); color: #C45A5A; }

.history-booking {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.history-date {
    font: 300 11px/1 var(--font-body);
    color: var(--text-hint, #607060);
    margin-top: 2px;
}

.history-amount {
    font: 700 16px/1 var(--font-display);
    white-space: nowrap;
    margin-left: 12px;
}

.history-amount.positive {
    color: var(--positive);
}

.history-amount.negative {
    color: var(--negative);
}

/* ── Referral card ──────────────────────────────────────────────── */

.referral-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}
.referral-compact { padding: 12px 16px; text-align: left; }
.referral-compact .referral-code-row {
    display: flex; align-items: center; gap: 8px; margin: 0;
}
.referral-compact .btn-sm { padding: 6px 8px; min-height: auto; }

.referral-code-row {
    margin-bottom: 6px;
}

.referral-code-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.referral-code-value {
    color: var(--accent);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-left: 8px;
    white-space: nowrap;
}

.referral-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 8px 0 12px;
}

.referral-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.referral-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent-soft);
    padding: 9px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-secondary:active {
    background: var(--accent-soft);
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ── Section link ("Все →") ──────────────────────────────────────── */

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-link {
    font: 400 12px/1 var(--font-body);
    color: var(--accent);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0.5px;
}

/* ── Legal footer ──────────────────────────────────────────────── */

.legal-footer {
    position: fixed;
    bottom: 56px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 0;
    background: var(--bg-primary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 99;
}
.legal-footer a {
    color: var(--text-secondary);
    font-size: 11px;
    text-decoration: none;
    opacity: 0.7;
}
.legal-footer a:hover { opacity: 1; }
.legal-dot { color: var(--text-secondary); opacity: 0.7; font-size: 11px; }

/* ── Bottom navigation (variant C) ──────────────────────────────── */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--c-surface);
    border-top: 1px solid var(--c-ink-12);
    padding: 8px 0 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 0;
    background: none;
    border: none;
    color: var(--c-ink-40);
    cursor: pointer;
    transition: color var(--transition);
    font-size: 11px;
    font-weight: 500;
}

.nav-btn.active {
    color: var(--c-forest);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* Add bottom padding for nav bar */
body {
    padding-bottom: 80px !important;
}

/* ── Tab header ─────────────────────────────────────────────────── */

.tab-header {
    margin-bottom: 16px;
}

.tab-header h2 {
    font: 400 22px/1.2 var(--font-display);
    color: var(--text-primary);
}

.tab-subtitle {
    font: 300 13px/1 var(--font-body);
    color: var(--text-tertiary, #708080);
    margin-top: 4px;
}

/* ── Filter bar ─────────────────────────────────────────────────── */

.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #2a3a2a;
    background: transparent;
    color: var(--text-hint, #556655);
    font: 400 12px/1 var(--font-body);
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}

.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── Rewards catalog (full page) ────────────────────────────────── */

.catalog-section {
    margin-bottom: 20px;
}

.catalog-category {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.reward-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 8px;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.reward-card.affordable {
    opacity: 1;
    border-left: 3px solid var(--accent);
}

.reward-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.reward-cost-badge {
    font: 700 16px/1 var(--font-display);
    color: var(--balance-color, #C4956A);
    white-space: nowrap;
}

.reward-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.reward-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
}

.reward-tag.dimmed {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.reward-order-btn {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border: none;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}
.reward-order-btn:active { background: var(--accent-hover); }
/* Унифицированный цвет — все «Заказать» одинаково, независимо от типа оплаты.
   Было три разных оттенка (.partial зелёный, .cash коричневый) — путало гостей. */
.reward-order-btn.partial,
.reward-order-btn.cash { background: var(--c-forest); }

.reward-phone {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Reward order confirmation panel */
.reward-confirm-panel {
    margin-top: 12px;
    padding: 16px;
    background: rgba(0,0,0,0.3);
    border-radius: var(--radius);
    border: 1px solid var(--accent-soft);
}
.rcp-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.rcp-name {
    font-size: 15px;
    margin-bottom: 8px;
}
.rcp-payment {
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 14px;
    line-height: 1.6;
}
.rcp-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rcp-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}
.rcp-confirm {
    background: var(--accent);
    color: #fff;
}
.rcp-confirm:active { background: var(--accent-hover); }
.rcp-cancel {
    background: rgba(255,255,255,0.08);
    color: var(--text-secondary);
}
.rcp-cancel:active { background: rgba(255,255,255,0.15); }
.rcp-status {
    text-align: center;
    padding: 12px;
    font-size: 13px;
    line-height: 1.5;
}
.rcp-status.success { color: var(--accent); }
.rcp-status.error { color: #e74c3c; }

/* ── Reviews tab cards ─────────────────────────────────────────── */

.review-type-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 10px;
}
.rtc-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.rtc-icon {
    font-size: 32px;
    flex-shrink: 0;
    line-height: 1;
}
.rtc-info { flex: 1; }
.rtc-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}
.rtc-hint {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.rtc-points {
    font-weight: 700;
    font-size: 16px;
    color: var(--accent);
    white-space: nowrap;
}
.rtc-link {
    display: block;
    margin-top: 10px;
    color: var(--accent);
    font-size: 13px;
    text-decoration: none;
}
.rtc-link:active { opacity: 0.7; }
.rtc-claim-btn {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid var(--accent-soft);
    border-radius: var(--radius);
    background: transparent;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.rtc-claim-btn:active { background: var(--accent-soft); }

/* Activity platform sections inside sheet */
.activity-platform {
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    margin-bottom: 10px;
}
.activity-platform-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.activity-platform-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--cloud-white, #F1F0EC);
}
.activity-platform-link {
    color: var(--accent, #6B8E63);
    font-size: 13px;
    text-decoration: none;
}
.activity-platform .activity-input {
    margin-bottom: 8px;
}
.activity-platform .activity-submit {
    width: 100%;
    margin-bottom: 0;
}
.activity-platform .activity-result {
    margin-top: 6px;
}

/* Platform buttons row */
.rtc-platforms {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.rtc-platform-btn {
    flex: 1;
    padding: 8px 10px;
    border-radius: var(--radius);
    background: var(--accent-soft, rgba(107,142,99,0.12));
    color: var(--accent, #6B8E63);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
}
.rtc-platform-btn:active { opacity: 0.7; }
.rtc-actions {
    display: flex;
    gap: 8px;
}
.rtc-claim-sm {
    flex: 1;
    width: auto;
    font-size: 12px;
    padding: 8px 6px;
}

/* ── History full page ──────────────────────────────────────────── */

.history-full {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
}

.history-full .history-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 12px;
}

.history-full .history-item:last-child {
    border-bottom: none;
}

.history-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    color: var(--accent);
    flex-shrink: 0;
}
/* Emoji-based history icons (earn = green, burn = red) */
.hi-emoji {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.hi-earn {
    background: rgba(76, 175, 80, 0.12);
}
.hi-burn {
    background: rgba(229, 115, 115, 0.12);
}

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

.btn-load-more {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    background: var(--bg-card);
    color: var(--accent);
    border: 1px solid var(--accent-soft);
    border-radius: var(--radius);
    font-size: 15px;
    cursor: pointer;
    transition: opacity var(--transition);
}

.btn-load-more:active {
    opacity: 0.7;
}

/* ── Weather widget ─────────────────────────────────────────────── */

.weather-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
}

.weather-current {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.weather-icon { font-size: 32px; }
.weather-temp { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.weather-desc { font-size: 13px; color: var(--text-secondary); }

.weather-forecast {
    display: flex;
    gap: 8px;
}

.forecast-day {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    background: var(--bg-card-hover);
    border-radius: var(--radius-sm);
}

.forecast-name { font-size: 11px; color: var(--text-secondary); text-transform: capitalize; }
.forecast-icon { font-size: 20px; margin: 4px 0; }
.forecast-temps { font-size: 12px; color: var(--text-primary); }

/* ── Benefits hint ────────────────────────────────────────────── */

.benefits-hint {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 10px;
    opacity: 0.7;
}

/* ── Directions ───────────────────────────────────────────────── */

.directions-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
}

.directions-address {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.directions-address svg {
    flex-shrink: 0;
    color: var(--accent);
}

.directions-buttons {
    display: flex;
    gap: 10px;
}

.btn-direction {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-card-hover);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.15s;
}

.btn-direction:active {
    opacity: 0.7;
}

/* ── Booking wizard ────────────────────────────────────────────── */

.booking-wizard { margin-bottom: 20px; }

.bw-step { display: none; }
.bw-step.active { display: block; }

.bw-form-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.06);
}

.bw-field { margin-bottom: 14px; }
.bw-field label {
    display: block;
    font: 300 12px/1 var(--font-body);
    color: var(--text-tertiary, #708080);
    margin-bottom: 6px;
}

.bw-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-card-hover);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    outline: none;
    -webkit-appearance: none;
}
.bw-input:focus { border-color: var(--accent); }

.bw-btn {
    width: 100%;
    margin-top: 4px;
    padding: 14px;
}
.bw-btn.bw-btn-secondary {
    background: transparent;
    color: var(--btn-primary-bg);
    border: 1px solid var(--btn-primary-bg);
    margin-top: 8px;
}
.bw-btn.bw-btn-secondary:active { background: rgba(46,74,46,0.08); }

.bw-error {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(196,90,90,0.15);
    color: #C45A5A;
    font-size: 13px;
}

.bw-rooms { display: flex; flex-direction: column; gap: 10px; }

.bw-room-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.bw-room-card:active { border-color: var(--accent); }
.bw-room-card.unavailable { opacity: 0.4; pointer-events: none; }

.bw-room-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.bw-room-price { font-size: 20px; font-weight: 700; color: var(--accent); }
.bw-room-detail { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.bw-room-unavail { font-size: 13px; color: var(--negative); }

.bw-summary {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 13px;
    line-height: 1.8;
}

.bw-total {
    margin-top: 10px;
    padding: 12px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.bw-balance-badge {
    margin-top: 8px;
    padding: 8px 14px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
}

.bw-points-row {
    display: flex;
    gap: 8px;
}
.bw-points-row .bw-input { flex: 1; }

.bw-all-points-btn {
    padding: 12px 18px;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.bw-all-points-btn:active { opacity: 0.7; }

.bw-back {
    display: block;
    margin-top: 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    padding: 8px 0;
}

/* ── Bookings ──────────────────────────────────────────────────── */

.bookings-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.booking-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 16px;
    cursor: pointer;
    transition: background var(--transition);
}

.booking-card:active {
    background: var(--bg-card-hover);
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.booking-house {
    font: 700 15px/1 var(--font-body);
    color: var(--text-primary);
}

.booking-status {
    font: 700 11px/1 var(--font-body);
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
}

.status-active { background: rgba(107, 142, 99, 0.2); color: #6B8E63; }
.status-upcoming { background: rgba(184, 134, 11, 0.2); color: #B8860B; }
.status-past { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }

.booking-dates {
    font: 300 12px/1.3 var(--font-body);
    color: var(--text-tertiary, #708080);
    margin-bottom: 4px;
}

.booking-nights {
    color: var(--text-secondary);
    font-size: 12px;
    margin-left: 8px;
}

.booking-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ── Badges ─────────────────────────────────────────────────────── */

.badges-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.badge-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    transition: transform var(--transition);
}

.badge-card.earned {
    border: 1px solid var(--accent-soft);
}

.badge-card.locked {
    opacity: 0.5;
}

.badge-icon { font-size: 32px; margin-bottom: 8px; }
.badge-name { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.badge-desc { font-size: 11px; color: var(--text-secondary); line-height: 1.3; }
.badge-date { font-size: 11px; color: var(--accent); margin-top: 6px; }

/* Badge preview (cabinet) */
.badges-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-mini {
    font-size: 24px;
    opacity: 0.4;
}

.badge-mini.earned {
    opacity: 1;
}

.badge-mini-count {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 4px;
}

/* ── House info ────────────────────────────────────────────────── */

.house-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.house-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
}

.house-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.house-amenity {
    font-size: 13px;
    color: var(--text-primary);
    padding: 4px 0;
}

.house-instruction {
    margin-bottom: 14px;
}

.house-instruction:last-child {
    margin-bottom: 0;
}

.instr-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 4px;
}

.instr-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Promo code ────────────────────────────────────────────────── */

.promo-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.promo-input-row {
    display: flex;
    gap: 8px;
}

.promo-input {
    flex: 1;
    padding: 10px 12px;
    background: var(--bg-card-hover);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.promo-input::placeholder {
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-secondary);
}

.btn-promo {
    padding: 10px 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity var(--transition);
}

.btn-promo:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.promo-result {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.promo-loading { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); }
.promo-success { background: rgba(107, 142, 99, 0.15); color: #6B8E63; }
.promo-error { background: rgba(196, 149, 106, 0.15); color: #C4956A; }

/* ── Tab loader ─────────────────────────────────────────────────── */

.tab-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    opacity: 0.5;
}

/* (login-brand moved to .brand-mark above) */

/* ── Primary button ────────────────────────────────────────────── */

.btn-primary {
    display: inline-block;
    padding: 14px 24px;
    margin-top: 12px;
    background: var(--btn-primary-bg, var(--accent));
    color: var(--btn-primary-color, #F1F0EC);
    border-radius: var(--r-btn, 12px);
    font: 700 15px/1 var(--font-body);
    letter-spacing: 0.5px;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

/* ── About-sheet sections (INFO.about) ──────────────────────────── */

.about-section {
    margin: 16px 0;
    padding: 12px 14px;
    background: rgba(184, 134, 11, 0.05);
    border-left: 3px solid var(--c-forest);
    border-radius: 6px;
}
.about-section h3 {
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--c-forest);
}
.about-section ul { padding-left: 20px; margin: 4px 0; }
.about-section li { margin: 3px 0; font-size: 14px; line-height: 1.45; }
.about-section p { margin: 6px 0; font-size: 14px; line-height: 1.5; }

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 360px) {
    body { padding: 12px; padding-bottom: 80px !important; }
    .tier-card { padding: 16px 14px; }
    .points-value { font-size: 32px; }
    .member-name { font-size: 20px; }
    .benefits-grid { gap: 6px; }
    .benefit-card { padding: 10px 6px; }
    .filter-btn { padding: 6px 12px; }
    .badges-grid { grid-template-columns: 1fr; }
    .weather-forecast { gap: 4px; }
    .forecast-day { padding: 6px 2px; }
    .nav-label { font-size: 11px; }
    .login-title { font-size: 20px; }
}

/* Desktop: center content, limit width, add breathing room */
@media (min-width: 600px) {
    body {
        padding: 24px 32px;
        padding-bottom: 90px !important;
    }
    .bottom-nav {
        max-width: var(--max-width);
        left: 50%;
        transform: translateX(-50%);
        border-radius: 16px 16px 0 0;
    }
    .tier-card { padding: 24px; }
    .points-value { font-size: 38px; }
    .member-name { font-size: 32px; }
    .login-title { font-size: 38px; }
    .onboard-overlay { padding: 60px 40px; }
    .onboard-title { font-size: 20px; }
    .onboard-emoji { font-size: 64px; }
}

/* ── Info icons ────────────────────────────────────────────────── */

.info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    vertical-align: middle;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    /* Reset for <button class="info-icon"> — keep visual identical to <span> */
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
    font: inherit;
    line-height: 0;
}

.info-icon svg {
    display: block;
    width: 16px;
    height: 16px;
}

.info-icon:active { opacity: 0.8; }
.info-icon:focus { outline: none; }
.info-icon:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 50%;
}

/* ── Bottom sheet ──────────────────────────────────────────────── */

.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 100;
    transition: background 0.3s ease;
}

.sheet-overlay.active {
    background: rgba(0, 0, 0, 0.45);
}

.sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-radius: 16px 16px 0 0;
    padding: 12px 20px 32px;
    max-height: 65vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 101;
}

.sheet-overlay.active .sheet {
    transform: translateY(0);
}

.sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--text-secondary);
    border-radius: 2px;
    margin: 0 auto 16px;
    opacity: 0.35;
}

.sheet-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.sheet-body {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.sheet-body p { margin: 0 0 10px; }
.sheet-body p:last-child { margin-bottom: 0; }

.sheet-body .sheet-example {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin: 8px 0;
    font-size: 13px;
}

.sheet-body .sheet-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 13px;
}

.sheet-body .sheet-table th {
    text-align: left;
    padding: 6px 8px;
    font-size: 11px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sheet-body .sheet-table td {
    padding: 8px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sheet-body .sheet-table tr:last-child td {
    border-bottom: none;
    color: var(--accent);
}

.sheet-body .sheet-steps {
    list-style: none;
    padding: 0;
    margin: 8px 0;
    counter-reset: step;
}

.sheet-body .sheet-steps li {
    counter-increment: step;
    padding: 6px 0 6px 28px;
    position: relative;
    font-size: 13px;
}

.sheet-body .sheet-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Inline hints ──────────────────────────────────────────────── */

.section-hint {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-top: 8px;
    text-align: center;
    line-height: 1.4;
}

/* ── Onboarding ────────────────────────────────────────────────── */

.onboard-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
}

.onboard-slide {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 300px;
}

.onboard-slide.active { display: flex; }

.onboard-emoji { font-size: 56px; margin-bottom: 8px; }

.onboard-logo { margin-bottom: 8px; }
.onboard-logo-img { width: 100px; height: 84px; object-fit: contain; }

.onboard-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.onboard-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.onboard-dots {
    display: flex;
    gap: 8px;
    margin: 32px 0 24px;
}

.onboard-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    opacity: 0.3;
    transition: opacity 0.2s, background 0.2s;
}

.onboard-dot.active {
    opacity: 1;
    background: var(--accent);
}

.onboard-btn {
    padding: 14px 48px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.onboard-btn:active { opacity: 0.8; }

.onboard-skip {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
    text-decoration: underline;
    font-family: inherit;
}

/* ═══ CTA (variant C) ═══ */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0 0 10px;
}
.quick-action-btn {
    background: var(--c-forest);
    border: 0;
    border-radius: var(--r-btn);
    height: 46px;
    padding: 0 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}
.quick-action-btn:active { transform: scale(0.97); }
.quick-action-btn.secondary {
    background: transparent;
    border: 1px solid var(--c-forest);
    color: var(--c-forest);
}

/* ═══ Tier strip (variant C) ═══ */
.tier-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 14px 0 12px;
}
.tier-mini {
    border-radius: var(--r-card);
    padding: 10px 6px 12px;
    text-align: center;
    border: 1px solid var(--c-ink-12);
    position: relative;
    cursor: pointer;
}
.tier-mini.guest  { background: #F0F3EE; border-color: #D6E0D2; }
.tier-mini.friend { background: #F8EFDC; border-color: var(--c-sand); }
.tier-mini.family { background: var(--c-forest); border-color: var(--c-forest); color: #fff; }
.tier-mini:not(.current) { opacity: 0.5; }
.tier-mini.current { box-shadow: inset 0 0 0 2px var(--c-gold); }
.tier-mini.current::before {
    content: "ВАШ УРОВЕНЬ";
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--c-gold);
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.6px;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
    text-transform: uppercase;
    line-height: 1.2;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.tier-mini .name {
    font-size: 11px;
    color: var(--c-ink-60);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 500;
}
.tier-mini.family .name { color: rgba(255,255,255,0.78); }
.tier-mini .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: 1px;
}
.tier-mini.guest  .dot { background: var(--c-sage); }
.tier-mini.friend .dot { background: var(--c-gold); }
.tier-mini.family .dot { background: var(--c-gold); }
.tier-mini .pct {
    font-size: 18px;
    font-weight: 500;
    margin-top: 6px;
    line-height: 1;
    color: var(--c-ink);
}
.tier-mini.family .pct { color: var(--c-gold); }
.tier-mini .lab {
    font-size: 11px;
    color: var(--c-ink-60);
    margin-top: 2px;
}
.tier-mini.family .lab { color: rgba(255,255,255,0.62); }

/* ═══ Phase 3: Mission Card ═══ */
.mission-card {
    background: rgba(196, 149, 106, 0.08);
    border: 1px solid rgba(196, 149, 106, 0.25);
    border-radius: 12px;
    padding: 16px;
}
.mission-label {
    font-size: 11px;
    font-weight: 600;
    color: #C4956A;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.mission-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--cloud-white, #F1F0EC);
    margin: 8px 0 4px;
}
.mission-reward {
    font-size: 13px;
    color: var(--accent, #6B8E63);
}
.mission-deadline {
    font-size: 12px;
    color: #FFB74D;
    margin-top: 8px;
}

/* ═══ Phase 3: Expiry Warning ═══ */
.expiry-warning {
    background: rgba(255, 183, 77, 0.1);
    border-left: 3px solid #FFB74D;
    border-radius: 0 8px 8px 0;
    padding: 8px 12px;
    margin-top: 12px;
    font-size: 12px;
    color: #FFB74D;
}

/* ═══ Phase 3: Compact Weather ═══ */
.weather-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-card, #243424);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary, #A0A89A);
    -webkit-tap-highlight-color: transparent;
}
.weather-compact .weather-icon { font-size: 18px; }
.weather-compact-text { flex: 1; display: flex; gap: 4px; align-items: center; }
.weather-tomorrow { color: var(--text-tertiary, #708080); font-size: 12px; }
.weather-expand-icon { color: var(--text-tertiary, #708080); font-size: 11px; }
.weather-forecast-full {
    display: flex;
    gap: 8px;
    padding: 12px 0 0;
    overflow-x: auto;
}

/* ═══ Phase 3: Profile Tab ═══ */
.profile-mini-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 16px;
    background: var(--bg-card, #243424);
    margin: 12px 16px 16px;
    border-radius: 12px;
}
.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-light, rgba(107,142,99,0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.profile-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--cloud-white, #F1F0EC);
}
.profile-tier-line {
    font-size: 13px;
    color: var(--text-secondary, #A0A89A);
    margin-top: 2px;
}
.profile-streak {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    margin: 8px 16px 0;
    background: rgba(255, 152, 0, 0.08);
    border-radius: 8px;
    font-size: 13px;
    color: #FFB74D;
}
.streak-fire { font-size: 16px; }

/* Profile badges horizontal scroll */
.profile-badges-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.profile-badges-scroll::-webkit-scrollbar { display: none; }
.badge-item {
    width: 56px;
    text-align: center;
    flex-shrink: 0;
}
.badge-item .badge-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-light, rgba(107,142,99,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 4px;
}
.badge-item .badge-icon.locked {
    opacity: 0.25;
    filter: grayscale(100%);
}
.badge-item .badge-icon.earned {
    background: rgba(107, 142, 99, 0.3);
    border: 1px solid var(--accent, #6B8E63);
}
.badge-item .badge-name {
    font: 400 11px/1.2 var(--font-body);
    color: var(--text-tertiary, #708080);
}

.badges-quote {
    font: italic 13px/1.3 var(--font-display);
    color: var(--balance-color, #C4956A);
    text-align: center;
    margin-bottom: 12px;
}

/* Profile privileges card */
.profile-privs-card {
    padding: 12px 16px;
    background: var(--bg-card, #243424);
    border-radius: 10px;
}
.privs-current {
    font-size: 13px;
    color: var(--cloud-white, #F1F0EC);
    line-height: 1.5;
}
.privs-next {
    font-size: 12px;
    color: var(--accent, #6B8E63);
    margin-top: 8px;
}

/* Profile divider */
.profile-divider {
    height: 8px;
    background: #141E14;
    margin: 16px 0;
}

/* Birthday date picker */
.birthday-hint {
    font-size: 13px;
    color: var(--text-secondary, #A0A89A);
    margin: 0 0 12px;
    line-height: 1.5;
}
.birthday-hint b { color: var(--accent, #6B8E63); }
.bd-date-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    background: var(--bg-input, #1E2E1E);
    color: var(--cloud-white, #F1F0EC);
    font-size: 16px;
    margin-bottom: 10px;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.bd-date-input::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
}
.birthday-warn {
    font-size: 11px;
    color: #FFB74D;
    margin: 0 0 12px;
}
.birthday-save-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
}
.birthday-save-btn:disabled { opacity: 0.5; }
.birthday-result {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
}
.birthday-result.error {
    background: rgba(229, 115, 115, 0.1);
    color: #E57373;
}
/* Birthday locked card */
.birthday-set-card {
    background: var(--bg-card, #243424);
    border: 1px solid rgba(196, 149, 106, 0.2);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.birthday-set-date {
    font-size: 20px;
    font-weight: 600;
    color: var(--cloud-white, #F1F0EC);
    margin-bottom: 6px;
}
.birthday-set-perks {
    font-size: 12px;
    color: var(--text-secondary, #A0A89A);
    line-height: 1.5;
}
/* Birthday booking badge */
.birthday-badge {
    background: rgba(196, 149, 106, 0.15) !important;
    color: #C4956A !important;
}

/* Profile menu links */
.profile-menu {
    margin: 0 16px 16px;
}
.profile-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    font: 400 15px/1 var(--font-body);
    color: var(--text-secondary, #A0A89A);
    -webkit-tap-highlight-color: transparent;
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-icon { font-size: 18px; }
.profile-menu-arrow {
    margin-left: auto;
    color: var(--text-tertiary, #708080);
    font-size: 15px;
}

/* ═══ Phase 3: Back button for full-screen views ═══ */
.back-btn {
    background: none;
    border: none;
    color: var(--accent, #6B8E63);
    font-size: 15px;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 8px;
    -webkit-tap-highlight-color: transparent;
}

/* ═══ Phase 4: Fortune Wheel ═══ */
.fortune-card {
    background: var(--bg-card, #243424);
    border: 1px solid rgba(212, 170, 64, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}
.fortune-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--cloud-white, #F1F0EC);
    margin-bottom: 8px;
}
.fortune-desc {
    font-size: 13px;
    color: var(--text-secondary, #A0A89A);
    margin-bottom: 16px;
}
.fortune-spin-btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, #D4AA40, #B8860B);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: transform 0.1s;
}
.fortune-spin-btn:active { transform: scale(0.95); }
.fortune-spin-btn:disabled { opacity: 0.6; }

.fortune-wheel-container {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 16px auto;
    overflow: hidden;
    border-radius: 50%;
    border: 3px solid rgba(212, 170, 64, 0.4);
}
.fortune-wheel-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
}
.fortune-segment {
    font-size: 11px;
    color: var(--cloud-white, #F1F0EC);
    padding: 4px 8px;
    text-align: center;
    width: 50%;
}
.fortune-pointer {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    color: #D4AA40;
    z-index: 2;
}

.fortune-result {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
}
.fortune-result.success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
}
.fortune-result.error {
    background: rgba(229, 115, 115, 0.1);
    color: #E57373;
}
.fortune-prize-emoji { font-size: 48px; margin-bottom: 8px; }
.fortune-prize-text { font-size: 20px; font-weight: 700; color: #D4AA40; }
.fortune-prize-sub { font-size: 13px; color: var(--text-secondary, #A0A89A); margin-top: 4px; }

/* ═══ Phase 4: Promo hint ═══ */
.promo-hint {
    font-size: 12px;
    color: var(--text-tertiary, #708080);
    margin: 0 0 8px;
}

/* ═══ Phase 4: Gift Certificates ═══ */
.gift-card {
    padding: 4px 0;
}
.gift-hint {
    font-size: 13px;
    color: var(--text-secondary, #A0A89A);
    margin: 0 0 12px;
    line-height: 1.5;
}
.gift-field { margin-bottom: 12px; }
.gift-field label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary, #A0A89A);
    margin-bottom: 4px;
}
.gift-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--bg-input, #1E2E1E);
    color: var(--cloud-white, #F1F0EC);
    font-size: 16px;
    box-sizing: border-box;
}
.gift-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
}
.gift-result {
    margin-top: 12px;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
}
.gift-result.success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: var(--cloud-white, #F1F0EC);
}
.gift-result.error {
    background: rgba(229, 115, 115, 0.1);
    color: #E57373;
}
.gift-code-display { text-align: center; margin: 8px 0; }
.gift-code-label { font-size: 12px; color: var(--text-secondary, #A0A89A); }
.gift-code-value {
    font-size: 20px;
    font-weight: 700;
    color: #D4AA40;
    font-family: monospace;
    letter-spacing: 2px;
    margin: 8px 0;
}
.gift-copy-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--accent, #6B8E63);
    background: transparent;
    color: var(--accent, #6B8E63);
    font-size: 12px;
    cursor: pointer;
}
.gift-code-hint {
    font-size: 12px;
    color: var(--text-tertiary, #708080);
    margin-top: 8px;
}

/* ═══ Phase 5: Multiplier badges in booking form ═══ */
.bw-multipliers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}
.multiplier-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--earn-btn-bg, rgba(74,122,62,0.15));
    color: var(--earn-color, #6B8E63);
    font-size: 12px;
    font-weight: 500;
}

/* ═══ Phase 3: Tab bar updates ═══ */
.bottom-nav .nav-btn svg {
    stroke-width: 1.8;
}
.nav-label {
    font-size: 11px;
}

/* Contact links */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card, #243424);
    border-radius: 10px;
    color: var(--cloud-white, #F1F0EC);
    text-decoration: none;
    font-size: 15px;
    transition: opacity 0.2s;
}
.contact-link:active {
    opacity: 0.7;
}
.contact-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.contact-text {
    flex: 1;
}

/* Feedback form */
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.feedback-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-card, #243424);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--cloud-white, #F1F0EC);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}
.feedback-input:focus {
    border-color: var(--accent, #6B8E63);
}
.feedback-input::placeholder {
    color: var(--text-secondary, #A0A89A);
}
.feedback-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}
.feedback-file-label {
    display: block;
    padding: 10px 14px;
    background: var(--bg-card, #243424);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: var(--text-secondary, #A0A89A);
    font-size: 13px;
    cursor: pointer;
    text-align: center;
}
.feedback-submit {
    margin-top: 4px;
}
.feedback-result {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}
.feedback-result.success {
    background: rgba(107, 142, 99, 0.15);
    color: #6B8E63;
}
.feedback-result.error {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

/* PWA Install Banner */
.pwa-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #243424;
    border-top: 1px solid rgba(107, 142, 99, 0.2);
    font-size: 13px;
    color: #A0A89A;
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    z-index: 1000;
}
.pwa-banner-btn {
    padding: 6px 14px;
    border-radius: 8px;
    background: #4A7A3E;
    color: #F1F0EC;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.pwa-banner-close {
    padding: 4px 8px;
    background: none;
    border: none;
    color: #556655;
    font-size: 16px;
    cursor: pointer;
}

/* ═══ Tier info button ═══ */
.tier-info-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
    flex-shrink: 0;
}
.tier-info-btn:hover { color: var(--text-primary); }

/* ═══ Info sheet (tooltip modal) ═══ */
.info-tier-list { display: flex; flex-direction: column; gap: 16px; }
.info-tier-item {
    padding: 12px;
    border-radius: 10px;
    background: var(--bg-input, #F9F5EA);
    border: 1px solid var(--border-soft, rgba(46, 74, 46, 0.08));
}
.info-tier-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.info-tier-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.info-tier-cond { font-size: 12px; color: var(--accent); }
.info-note { font-size: 12px; color: var(--text-secondary); margin-top: 12px; line-height: 1.5; }
.info-mult-list { display: flex; flex-direction: column; gap: 12px; }
.info-mult-item { display: flex; gap: 10px; align-items: flex-start; }
.info-mult-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.info-mult-item div { font-size: 13px; line-height: 1.5; }

/* ═══ Booking card enhancements ═══ */
.booking-thanks {
    margin-top: 8px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(107,142,99,0.1);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.booking-review-btn {
    display: block;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--btn-primary-bg, #4A7A3E);
    color: #F1F0EC;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.status-tomorrow {
    background: rgba(255,180,50,0.15);
    color: #FFB432;
}

/* ═══ History tab ═══ */
.history-more-wrap {
    text-align: center;
    padding: 16px;
}
.history-empty { padding: 40px 16px; }

/* ═══ Phone+OTP auth (фаза 2) ═══ */
.auth-container {
    max-width: 360px;
}
.auth-container label {
    display: block;
    text-align: left;
    font-size: 13px;
    color: var(--text-secondary, rgba(44,44,44,.62));
    margin: 16px 0 6px;
}
.auth-container input[type="tel"],
.auth-container input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid var(--accent-border, rgba(184,134,11,0.3));
    border-radius: 12px;
    background: var(--bg-input, #F9F5EA);
    color: var(--text-primary, #2C2C2C);
    box-sizing: border-box;
    font-family: inherit;
}
.auth-container input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light, rgba(184,134,11,0.08));
}
.phone-input-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.phone-prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary, #2C2C2C);
    background: var(--bg-input, #F9F5EA);
    border: 1px solid var(--accent-border, rgba(184,134,11,0.3));
    border-radius: 12px;
    user-select: none;
    flex-shrink: 0;
}
.phone-input-row input[type="tel"] {
    flex: 1;
    min-width: 0;
}
.auth-hint {
    color: var(--text-secondary, rgba(44,44,44,.62));
    font-size: 14px;
    margin: 8px 0 24px;
    line-height: 1.4;
}
.primary-btn {
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    background: var(--c-forest, #2E4A2E);
    color: #F1F0EC;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
}
.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.primary-btn:active {
    opacity: 0.85;
}
.link-btn {
    display: block;
    margin: 12px auto 0;
    background: none;
    border: none;
    color: var(--text-secondary, rgba(44,44,44,.62));
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
}
.auth-error {
    color: #C45A5A;
    font-size: 13px;
    margin: 12px 0 0;
    min-height: 18px;
    text-align: left;
}
.auth-fallback {
    margin-top: 28px;
    font-size: 13px;
    color: var(--text-secondary, rgba(44,44,44,.62));
    text-align: left;
    padding-top: 20px;
    border-top: 1px solid var(--c-ink-12, rgba(44,44,44,.12));
}
.auth-fallback summary {
    cursor: pointer;
    padding: 8px 0;
    color: var(--text-primary, #2C2C2C);
    list-style: none;
    font-weight: 500;
}
.auth-fallback summary::-webkit-details-marker { display: none; }
.auth-fallback summary::before {
    content: "▸ ";
    display: inline-block;
    transition: transform 0.15s;
}
.auth-fallback[open] summary::before {
    transform: rotate(90deg);
}
.auth-fallback .login-form {
    margin-top: 8px;
}
.auth-legal {
    margin-top: 14px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-tertiary, rgba(44,44,44,.42));
    text-align: center;
}
.auth-legal a {
    color: var(--accent, #B8860B);
    text-decoration: underline;
}

/* ════════════════════════════════════════════════════════════════════ */
/* Profile redesign V3 — pilot finding #5 (05.05.2026)                  */
/* ════════════════════════════════════════════════════════════════════ */

/* Mini-card ⓘ button (top-right corner) */
.profile-mini-card { position: relative; }
.profile-mini-info-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 24px;
    height: 24px;
    color: var(--c-gold);
    -webkit-tap-highlight-color: transparent;
}
.profile-mini-info-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: var(--c-gold);
}

/* Achievements link row */
.profile-ach-link {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    padding: 13px 16px;
    background: var(--c-surface);
    border-radius: var(--r-card, 6px);
    font-size: 14px;
    color: var(--c-ink);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.profile-ach-link:active { background: var(--bg-card-hover, #FAF6EC); }
.profile-ach-icon { font-size: 18px; }
.profile-ach-text { flex: 1; font-weight: 500; }
.profile-ach-count { font-size: 13px; color: var(--c-ink-60, rgba(44,44,44,.62)); }
.profile-ach-arrow { color: var(--c-ink-40, rgba(44,44,44,.42)); font-size: 14px; }
.profile-ach-link .info-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 22px;
    height: 22px;
}
.profile-ach-link .info-icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: var(--c-gold);
    opacity: 0.6;
}

/* Menu group label */
.profile-menu-group-label {
    font: 700 10px/1 var(--font-body);
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--c-gold);
    opacity: 0.85;
    margin: 14px 16px 6px 4px;
}
.profile-menu-group-label:first-child { margin-top: 0; }

/* Override profile-menu inner items: white card with rounded corners */
.profile-menu { margin: 0; }
.profile-menu-item {
    background: var(--c-surface);
    border-radius: var(--r-card, 6px);
    border-bottom: none !important;
    margin-bottom: 8px;
    color: var(--c-ink);
    font-weight: 500;
}
.profile-menu-item:last-child { border-bottom: none !important; }
.profile-menu-item:active { background: var(--bg-card-hover, #FAF6EC); }

/* Birthday spoiler in menu */
.profile-menu-spoiler {
    background: var(--c-surface);
    border-radius: var(--r-card, 6px);
    overflow: hidden;
    margin-bottom: 8px;
}
.profile-menu-spoiler .spoiler-head {
    margin: 0;
    cursor: pointer;
    border-bottom: none !important;
}
.profile-menu-spoiler .spoiler-head:active { background: var(--bg-card-hover, #FAF6EC); }
.bd-spoiler-title { flex: 1; }
.bd-filled-meta {
    margin-left: auto;
    font-size: 11px;
    color: var(--c-ink-60, rgba(44,44,44,.62));
    margin-right: 6px;
}
.spoiler-arrow {
    color: var(--c-ink-40, rgba(44,44,44,.42));
    font-size: 14px;
    margin-left: 6px;
}
.spoiler-hint {
    padding: 0 16px 12px;
    font-size: 12px;
    color: var(--c-ink-60, rgba(44,44,44,.62));
    line-height: 1.4;
    margin-top: -4px;
}
.spoiler-body {
    padding: 12px 16px 16px;
    border-top: 1px dashed var(--c-ink-12, rgba(44,44,44,.12));
}
.spoiler-body .birthday-hint {
    font-size: 12px;
    color: var(--c-ink-60, rgba(44,44,44,.62));
    line-height: 1.4;
    padding: 0;
    margin: 0 0 12px;
}
.spoiler-body .birthday-hint b { color: var(--c-ink); font-weight: 700; }
.spoiler-body .birthday-warn {
    font-size: 12px;
    color: var(--c-ink-60, rgba(44,44,44,.62));
    font-style: italic;
    margin: 0 0 14px;
    padding: 0;
    background: none;
    border: none;
}
.spoiler-body .bd-date-input { margin-bottom: 10px; }
.spoiler-body .birthday-save-btn,
.spoiler-body button.btn-primary {
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;
}
.spoiler-body .birthday-set-card {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}
.profile-menu-spoiler.is-filled .spoiler-arrow,
.profile-menu-spoiler.is-filled .spoiler-hint,
.profile-menu-spoiler.is-filled .spoiler-body { display: none; }
