/* ============================================
   BRAND COLOR THEMING
   
   РњРµРЅРµРґР¶РµСЂ Р·Р°РґР°С‘С‚ РѕРґРёРЅ HEX-С†РІРµС‚ Р±СЂРµРЅРґР°.
   РЎРµСЂРІРµСЂ РёРЅР¶РµРєС‚РёС‚ РµРіРѕ РІ :root С‡РµСЂРµР· inline style
   РЅР° <html> РёР»Рё С‡РµСЂРµР· PHP: 
     style="--brand: #0D6EFD;"
   
   Р’СЃРµ РїСЂРѕРёР·РІРѕРґРЅС‹Рµ СЂР°СЃСЃС‡РёС‚С‹РІР°СЋС‚СЃСЏ РѕС‚ --brand.
   РџРѕ СѓРјРѕР»С‡Р°РЅРёСЋ вЂ” СЃРёРЅРёР№ #0D6EFD.
   ============================================ */
:root {
    /* === BRAND вЂ” РµРґРёРЅСЃС‚РІРµРЅРЅР°СЏ РЅР°СЃС‚СЂРѕР№РєР° === */
    --brand: #0D6EFD;

    /* РџСЂРѕРёР·РІРѕРґРЅС‹Рµ РѕС‚ brand (CSS) */
    --brand-bright: color-mix(in srgb, var(--brand) 70%, white);
    --brand-dim: color-mix(in srgb, var(--brand) 70%, black);
    --brand-glow: color-mix(in srgb, var(--brand) 25%, transparent);
    --brand-subtle: color-mix(in srgb, var(--brand) 8%, transparent);
    --brand-border: color-mix(in srgb, var(--brand) 20%, transparent);

    /* === PALETTE вЂ” РЅРµРёР·РјРµРЅРЅР°СЏ Р±Р°Р·Р° === */
    --bg-primary: #09090B;
    --bg-card: #18181B;
    --bg-card-hover: #1F1F23;
    --bg-elevated: #27272A;
    --bg-input: #1C1C1F;

    --text-primary: #FAFAFA;
    --text-secondary: #A1A1AA;
    --text-tertiary: #71717A;

    --success: #34D399;
    --success-bg: rgba(52, 211, 153, 0.1);
    --warning: #FBBF24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --danger: #F87171;
    --danger-bg: rgba(248, 113, 113, 0.1);

    --border: rgba(255, 255, 255, 0.06);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --shadow-glow: 0 0 40px var(--brand-glow);
    --font: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   ICONS вЂ” inline SVG line style
   ============================================ */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-sm svg { width: 18px; height: 18px; }
.icon-lg svg { width: 28px; height: 28px; }
.icon-xl svg { width: 32px; height: 32px; }

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100dvh;
    overflow-x: hidden;
}

.app-shell {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100dvh;
    position: relative;
    /* Чтобы контент не скрывался под фиксированной нижней навигацией */
    padding-bottom: max(100px, env(safe-area-inset-bottom, 0px) + 80px);
}

/* ============================================
   SCREENS
   ============================================ */
.screen {
    display: none;
    min-height: 100dvh;
    padding-bottom: 100px;
    animation: screenIn 0.35s ease-out;
}
.screen.active { display: block; }

@keyframes screenIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(9, 9, 11, 0.72);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.header-back {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--brand-bright);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition);
}
.header-back:active { opacity: 0.6; }

.header-slot {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
}
.header-slot--start { justify-content: flex-start; }
.header-slot--end { justify-content: flex-end; }

.header-forward {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-direction: row-reverse;
    max-width: 118px;
    text-align: right;
    color: var(--brand-bright);
    text-decoration: none;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: opacity var(--transition);
}
.header-forward:active { opacity: 0.65; }
.header-forward-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.header .header-title {
    flex: 0 0 auto;
    max-width: 36%;
    padding: 0 6px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.header-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--brand-dim), var(--brand-bright));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: transform var(--transition);
}
.header-avatar:active { transform: scale(0.9); }

.header-avatar.header-avatar--photo {
    padding: 0;
    background: var(--bg-card);
    overflow: hidden;
}
.header-avatar.header-avatar--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.balance-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--brand-subtle);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand-bright);
    cursor: pointer;
    transition: all var(--transition);
}
.balance-chip:active {
    transform: scale(0.95);
    background: color-mix(in srgb, var(--brand) 15%, transparent);
}

.header-balance-inline {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--brand-bright);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    padding: 28px 20px 24px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--brand-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.5;
}

.hero-event-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--brand-subtle);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--brand-bright);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hero-event-label .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.hero-event-label__text {
    text-align: left;
}

.hero-event-label--countdown {
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 0.76rem;
    line-height: 1.35;
    max-width: min(100%, 340px);
    white-space: normal;
}

.hero-event-label--countdown .dot {
    background: var(--warning);
    align-self: flex-start;
    margin-top: 0.35em;
}

.hero-event-label--live .dot {
    background: var(--success);
}

.hero-event-label--ended {
    color: var(--text-tertiary);
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.04);
}

.hero-event-label--ended .dot {
    background: var(--text-tertiary);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 8px;
}

.hero-date {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ============================================
   BALANCE CARD
   ============================================ */
.balance-card {
    margin: 0 20px 28px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.balance-card::after {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, var(--brand-glow) 0%, transparent 70%);
    pointer-events: none;
}

.balance-card-footer {
    position: relative;
    padding-right: 40px;
}

.balance-card-footer .balance-subtitle {
    margin-bottom: 0;
}

.balance-refresh-btn {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-tertiary);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.balance-refresh-btn:hover {
    color: var(--brand-bright);
    border-color: var(--brand-bright);
    background: rgba(255, 255, 255, 0.06);
}

.balance-refresh-btn:focus-visible {
    outline: 2px solid var(--brand-bright);
    outline-offset: 2px;
}

.balance-refresh-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.balance-refresh-btn.is-loading .balance-refresh-btn__icon {
    animation: balance-refresh-spin 0.75s linear infinite;
}

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

.balance-label {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.balance-value {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--brand-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.balance-subtitle {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.balance-card--team {
    margin-top: 12px;
}

.balance-team-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 4px;
}

.balance-label--spaced {
    margin-top: 14px;
}

.balance-team-members-link {
    display: inline-block;
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-bright);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    text-align: left;
}

.balance-team-members-link:hover {
    color: var(--text-primary);
}

.team-members-dialog[open] {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.team-members-dialog {
    width: min(360px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.team-members-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.team-members-dialog__inner {
    padding: 18px 20px 20px;
}

.team-members-dialog__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.team-members-dialog__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.team-members-dialog__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin: -6px -8px 0 0;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-tertiary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.team-members-dialog__close:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.team-members-dialog__team {
    margin: 0 0 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.team-members-dialog__list {
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: min(50vh, 280px);
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text-primary);
}

.team-members-dialog__list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.team-members-dialog__member-icon {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--text-tertiary);
    line-height: 1;
}

.team-members-dialog__empty {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-tertiary);
}

/* ============================================
   ACTION BUTTONS
   ============================================ */
.actions {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition);
    cursor: pointer;
}

.action-btn:active {
    transform: scale(0.98);
    background: var(--bg-card-hover);
}

.action-btn .icon-wrap {
    width: 50px; height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-primary);
}

.action-btn .icon-wrap.accent-bg {
    background: var(--brand-subtle);
    border: 1px solid var(--brand-border);
}
.action-btn .icon-wrap.success-bg {
    background: var(--success-bg);
    border: 1px solid rgba(52, 211, 153, 0.15);
}
.action-btn .icon-wrap.warning-bg {
    background: var(--warning-bg);
    border: 1px solid rgba(251, 191, 36, 0.15);
}

.action-btn .action-text { flex: 1; }
.action-btn .action-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 2px;
}
.action-btn .action-desc {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.action-btn .arrow {
    color: var(--text-tertiary);
}

/* ============================================
   SCAN AREA
   ============================================ */
.scan-area {
    padding: 40px 20px;
    text-align: center;
}

.scan-circle {
    width: 200px; height: 200px;
    border-radius: 50%;
    border: 2px dashed var(--brand-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    color: var(--text-secondary);
    animation: scanPulse 3s infinite;
}

@keyframes scanPulse {
    0%, 100% { border-color: var(--brand-border); }
    50% { border-color: var(--brand); box-shadow: 0 0 30px var(--brand-glow); }
}

.scan-circle .icon svg { width: 56px; height: 56px; stroke-width: 1.2; }

.scan-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.scan-desc {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 28px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--brand-dim), var(--brand));
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-glow);
    letter-spacing: -0.01em;
}
.btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 0 20px var(--brand-glow);
}

.btn-full {
    width: 100%;
    padding: 18px;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    letter-spacing: -0.01em;
}
.btn-full:active { transform: scale(0.98); }
.btn-full.confirm {
    background: linear-gradient(135deg, var(--brand-dim), var(--brand));
    color: white;
    box-shadow: var(--shadow-glow);
}
.btn-full.cancel {
    background: transparent;
    color: var(--text-tertiary);
    margin-top: 8px;
}
.btn-full.secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    margin-top: 8px;
}
.btn-full.secondary:active {
    background: var(--bg-card-hover);
}

.btn-telegram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--brand-dim), var(--brand));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-glow);
    margin-top: 8px;
}
.btn-telegram:active { transform: scale(0.98); }
.btn-telegram:disabled { opacity: 0.35; box-shadow: none; cursor: not-allowed; }

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px 20px 0;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--danger);
    cursor: pointer;
    transition: all var(--transition);
}
.btn-logout:active { background: var(--bg-card-hover); }

.btn-profile-edit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px 20px 0;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-bright);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-profile-edit:active { background: var(--bg-card-hover); }

/* ============================================
   EARN SUCCESS
   ============================================ */
.earn-success {
    padding: 40px 20px;
    text-align: center;
    animation: successIn 0.5s var(--spring);
}

@keyframes successIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.earn-success .success-icon-big {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--brand-subtle);
    border: 2px solid var(--brand-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--brand-bright);
    animation: bounce 0.6s ease-out;
}
.earn-success .success-icon-big svg { width: 36px; height: 36px; stroke-width: 1.5; }

@keyframes bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.earn-success .points-earned {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--brand-bright);
    margin-bottom: 6px;
}
.earn-success .earn-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}
.earn-success .earn-activity {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.new-balance-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
}

.new-balance-card .accent { color: var(--brand-bright); }

.mt-20 { margin-top: 20px; }

/* ============================================
   SHOP
   ============================================ */
.shop-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
}
.product-card:active { transform: scale(0.97); }

.product-img {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}
.product-img .icon svg { width: 48px; height: 48px; stroke-width: 1; }

.product-info { padding: 14px; }
.product-name {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    line-height: 1.3;
}
.product-price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--brand-subtle);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-bright);
}
.product-stock {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin-top: 6px;
    font-weight: 500;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
}
.modal-overlay.visible { display: flex; animation: fadeIn 0.2s ease-out; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-sheet {
    width: 100%;
    max-width: 430px;
    background: var(--bg-card);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 12px 24px 40px;
    animation: slideUp 0.35s var(--spring);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-handle {
    width: 36px; height: 4px;
    border-radius: 2px;
    background: var(--bg-elevated);
    margin: 0 auto 20px;
}

.modal-product-img {
    width: 100%; height: 200px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--text-tertiary);
}
.modal-product-img .icon svg { width: 64px; height: 64px; stroke-width: 0.8; }

.modal-product-name {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.modal-product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-bright);
    margin-bottom: 16px;
}
.modal-balance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    font-size: 0.9rem;
}
.modal-balance-row .label { color: var(--text-tertiary); font-weight: 500; }
.modal-balance-row .value { font-weight: 700; }
.modal-balance-row .value.enough { color: var(--success); }

/* ============================================
   HISTORY
   ============================================ */
.history-list { padding: 0 20px; }
.history-day { margin-bottom: 24px; }
.history-day-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 0 10px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.history-item:last-child { border-bottom: none; }

.history-item--cancelled {
    opacity: 0.62;
}
.history-item--cancelled .history-points {
    text-decoration: line-through;
}
.history-cancel-badge {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary, #888);
    vertical-align: middle;
}

.history-icon {
    width: 42px; height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-primary);
}
.history-icon.earn { background: var(--brand-subtle); }
.history-icon.spend { background: var(--danger-bg); }
.history-icon.manual { background: var(--warning-bg); }

.history-icon--product {
    padding: 0;
    overflow: hidden;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}
.history-icon--product.history-icon.earn,
.history-icon--product.history-icon.spend,
.history-icon--product.history-icon.manual {
    background: var(--bg-elevated);
}
.history-product-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.history-details { flex: 1; min-width: 0; }
.history-title {
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.history-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-top: 2px;
}

.history-points {
    font-size: 0.95rem;
    font-weight: 700;
    flex-shrink: 0;
}
.history-points.positive { color: var(--success); }
.history-points.negative { color: var(--danger); }

/* ============================================
   INFO / SCHEDULE
   ============================================ */
.info-content { padding: 24px 20px; }

.info-event-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    line-height: 1.2;
    color: var(--text-primary);
}
.info-event-datetime {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin: 0 0 18px;
    font-weight: 500;
}
.program-map-jump-btn {
    display: block;
    width: 100%;
    margin: 12px 0 8px;
    text-align: center;
}
.program-event-map-block {
    margin-top: 20px;
    outline: none;
}
.program-event-map-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.program-event-map-toolbtn {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.program-event-map-toolbtn:disabled {
    opacity: 0.45;
    cursor: default;
}
.program-event-map-toolbtn--wide {
    flex: 1 1 auto;
    font-size: 0.9rem;
    font-weight: 600;
}
.program-event-map-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    touch-action: pan-y;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: grab;
}
.program-event-map-preload {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px;
    text-align: center;
    background: var(--surface);
    transition: opacity 0.28s ease, visibility 0.28s ease;
}
.program-event-map-viewport--map-ready .program-event-map-preload {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.program-event-map-preload__spinner {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--brand, var(--text-primary));
    animation: program-event-map-spin 0.75s linear infinite;
}
.program-event-map-preload__text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}
@keyframes program-event-map-spin {
    to {
        transform: rotate(360deg);
    }
}
.program-event-map-viewport:active {
    cursor: grabbing;
}
.program-event-map-inner {
    transform-origin: 0 0;
    will-change: transform;
}
/* Перебиваем .info-content img { max-width: 100% } в guest.css — иначе растр пляшет
   (layout уже «100% вьюпорта»), и scale(fit) даёт карту ~20% ширины. */
.info-content .program-event-map-block .program-event-map-img,
.program-event-map-img {
    display: block;
    max-width: none;
    width: auto;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

/* HTML «Информация» в программе — без переполнения экрана */
.info-richtext {
    padding: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.info-richtext img,
.info-richtext video {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}
.info-richtext figure {
    margin: 12px 0;
    max-width: 100%;
}
.info-richtext figure img {
    margin: 0 auto;
}
.info-richtext table {
    display: block;
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.info-richtext pre,
.info-richtext code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}
.info-richtext pre {
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--surface-elevated, rgba(0, 0, 0, 0.04));
    border: 1px solid var(--border);
}
.info-richtext a {
    color: var(--brand-bright);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.info-section-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    padding-top: 20px;
}

.info-detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.info-detail-row .icon { color: var(--text-tertiary); }

.schedule-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.schedule-time {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-bright);
    min-width: 50px;
    padding-top: 2px;
}
.schedule-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}
.schedule-speaker {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Гостевая «Программа» — расписание по дням */
.schedule-program {
    margin-bottom: 8px;
}
.schedule-day-group {
    margin-bottom: 18px;
}
.schedule-day-group:last-child {
    margin-bottom: 0;
}
.schedule-day-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--brand-bright);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    padding-top: 4px;
}
.schedule-item--program {
    align-items: flex-start;
    padding: 14px 0;
}
.schedule-item-body {
    flex: 1;
    min-width: 0;
}
.schedule-venue {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 4px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.schedule-venue .bi {
    margin-top: 2px;
    flex-shrink: 0;
    color: var(--text-tertiary);
}
.schedule-desc {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    line-height: 1.45;
    margin-top: 8px;
}

/* Кнопка-ссылка: организатор / партнёр в пункте расписания */
.schedule-guest-link {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    margin-top: 6px;
    padding: 8px 0;
    border: none;
    border-radius: var(--radius-md, 8px);
    background: var(--bg-elevated, rgba(255,255,255,0.06));
    text-align: left;
    font: inherit;
    color: var(--text-secondary, #ccc);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.schedule-guest-link__name {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--brand-bright, #6ea8fe);
    flex: 1;
    min-width: 0;
    padding: 4px 6px 4px 10px;
    line-height: 1.4;
    box-sizing: border-box;
}
.schedule-guest-link__icon {
    color: var(--text-tertiary);
    font-size: 1.1rem;
    line-height: 1;
    margin-left: auto;
}

/* Модальное окно расписания: партнёр (как карточка) */
.schedule-link-modal-sheet { max-width: 430px; }
.schedule-link-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    line-height: 1.3;
    color: var(--text-primary, #fff);
}
.schedule-link-modal-body { margin-bottom: 8px; }
.schedule-link-modal-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    padding: 8px 0;
}
.schedule-link-modal-logo {
    max-width: 100%;
    max-height: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md, 8px);
}
.schedule-link-modal-status {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin: 0 0 8px;
    font-weight: 500;
}
.schedule-link-modal-desc {
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0 0 12px;
}
.schedule-link-modal-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}
.schedule-link-modal-external--row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--brand-bright);
    text-decoration: none;
    line-height: 1.35;
}
.schedule-link-modal-external--row:hover,
.schedule-link-modal-external--row:focus {
    text-decoration: underline;
    text-underline-offset: 2px;
}
.schedule-link-modal-external__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.5rem;
    color: currentColor;
    opacity: 0.9;
}
.schedule-link-modal-external__icon svg {
    width: 1.1rem;
    height: 1.1rem;
    display: block;
}
.schedule-link-modal-external__text {
    flex: 1;
    min-width: 0;
    text-align: left;
}
.schedule-link-modal-empty {
    font-size: 0.86rem;
    color: var(--text-tertiary);
    margin: 0;
}

/* ============================================
   PROFILE
   ============================================ */
.profile-section {
    padding: 32px 20px;
    text-align: center;
}

.profile-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-dim), var(--brand-bright));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    margin: 0 auto 16px;
}
.profile-avatar--photo {
    padding: 0;
    background: var(--bg-card);
    overflow: hidden;
}
.profile-avatar--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.profile-fill-hint {
    margin: 0;
    padding: 10px 20px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.45;
    color: var(--text-secondary);
    background: color-mix(in srgb, var(--brand) 8%, transparent);
    border-bottom: 1px solid var(--border);
}
.profile-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}
.profile-phone {
    font-size: 0.88rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-bottom: 28px;
}

.profile-qr-wrap {
    display: inline-block;
    padding: 20px;
    background: white;
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
}
.profile-qr-wrap svg { display: block; }

.profile-qr-hint {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-bottom: 32px;
}

.profile-events-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    margin-bottom: 10px;
    padding: 0 20px;
}

.profile-event-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
    color: inherit;
}
.profile-event-item:active { background: var(--bg-card); }
.profile-event-name { font-size: 0.9rem; font-weight: 600; }
.profile-event-balance { font-size: 0.85rem; font-weight: 700; color: var(--brand-bright); }

.profile-event-block--past .profile-event-name,
.profile-event-block--past .profile-event-balance,
.profile-event-block--past .profile-event-balance .text-warning {
    color: var(--text-tertiary) !important;
}
.profile-event-block--past .profile-event-balance {
    font-weight: 600;
}

.profile-event-team-wrap {
    padding: 0 20px 14px;
    margin-top: -4px;
}

.profile-team-balance-line {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.35;
}

.profile-team-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-team-members-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    background: var(--brand-subtle);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}

.profile-team-members-btn:active {
    background: var(--bg-card-hover);
}

.profile-team-qr-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--brand-bright);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}

.profile-team-qr-btn:active {
    background: var(--bg-card-hover);
}

.profile-edit-shell .profile-edit-inner {
    padding: 16px 20px 32px;
}
.profile-edit-page-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 8px 0 8px;
}
.profile-edit-lead {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    line-height: 1.45;
    margin: 0 0 20px;
}
.profile-edit-photo-block {
    margin-bottom: 22px;
}
.profile-edit-photo-preview-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}
.profile-edit-photo-preview {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.profile-edit-photo-preview.has-image {
    border-color: var(--brand-border);
}
.profile-edit-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.profile-edit-photo-placeholder {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-tertiary);
}
.profile-edit-photo-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.profile-edit-photo-btn { margin-top: 0 !important; }
.profile-edit-photo-actions label.profile-edit-photo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    cursor: pointer;
    box-sizing: border-box;
}
.visually-hidden-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.profile-edit-password-block {
    margin: 24px 0 12px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.profile-edit-password-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.profile-edit-password-hint {
    font-size: 0.76rem;
    color: var(--text-tertiary);
    line-height: 1.4;
    margin: 0 0 12px;
}
.profile-edit-select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}
.profile-edit-selfie-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.profile-edit-alerts {
    margin: 4px 0 14px;
}
.profile-edit-alerts:empty {
    display: none;
}

.contact-exchange-wrap {
    padding-top: 4px;
    margin-bottom: 20px;
}

.contact-exchange-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: background var(--transition), border-color var(--transition);
}

.contact-exchange-btn:active {
    background: var(--bg-card-hover);
}

.contact-exchange-btn__icon {
    flex-shrink: 0;
    color: var(--brand-bright, var(--brand));
}

.contact-exchange-btn__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.contact-exchange-btn__title {
    font-size: 0.92rem;
    font-weight: 700;
}

.contact-exchange-btn__sub {
    font-size: 0.76rem;
    color: var(--text-tertiary);
    line-height: 1.35;
}

.guest-peer-card-sheet {
    max-height: min(90vh, 640px);
}

.guest-peer-card-sheet--layout {
    display: flex;
    flex-direction: column;
    max-height: min(90vh, 640px);
}

.guest-peer-card-inner {
    text-align: left;
    padding: 0 4px 12px;
}

.guest-peer-card-inner--scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(52vh, 360px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.guest-peer-card-footer {
    flex-shrink: 0;
    padding-top: 4px;
}

.guest-peer-card-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 18px;
}

.guest-peer-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-dim), var(--brand-bright));
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
img.guest-peer-card-avatar-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin-bottom: 10px;
    border: 2px solid var(--brand-border);
}

.guest-peer-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
}

.guest-peer-card-empty {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    margin-bottom: 14px;
    text-align: center;
}

.guest-peer-card-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 12px;
}

.guest-peer-card-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.guest-peer-card-value {
    font-size: 0.88rem;
    font-weight: 500;
    word-break: break-word;
}

a.guest-peer-card-link {
    color: var(--brand-bright, var(--brand));
    text-decoration: none;
}

a.guest-peer-card-link:active {
    opacity: 0.85;
}

.guest-peer-card-actions {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.guest-peer-card-actions .guest-peer-add-contact {
    margin-bottom: 8px;
}

.guest-peer-card-actions-hint {
    font-size: 0.74rem;
    color: var(--text-tertiary);
    line-height: 1.35;
    margin: 0;
    text-align: center;
}

.guest-peer-add-contact.guest-peer-add-contact--saved {
    opacity: 0.65;
    cursor: default;
}

.header-earn-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

a.header-saved-chip-wrap {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--brand-border);
    background: var(--brand-subtle);
    color: var(--brand-bright);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    transition: opacity var(--transition), transform var(--transition);
}

a.header-saved-chip-wrap:active {
    opacity: 0.85;
    transform: scale(0.96);
}

.header-saved-chip-wrap__icon {
    display: flex;
    opacity: 0.95;
}

.guest-app-toast {
    position: fixed;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%);
    max-width: min(92vw, 360px);
    padding: 12px 16px;
    background: rgba(22, 22, 28, 0.94);
    color: #fff;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.4;
    z-index: 12000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    pointer-events: none;
    text-align: center;
}

.guest-app-toast.guest-app-toast--visible {
    opacity: 1;
    visibility: visible;
}

.saved-contacts-list {
    padding: 0 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.saved-contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
}

.saved-contact-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.saved-contact-card__photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand-border);
    flex-shrink: 0;
}

.saved-contact-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-dim), var(--brand-bright));
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.saved-contact-card__title-wrap {
    flex: 1;
    min-width: 0;
}

.saved-contact-card__name {
    font-size: 0.95rem;
    font-weight: 700;
    word-break: break-word;
}

.saved-contact-card__date {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.saved-contact-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.saved-contact-card__row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.saved-contact-card__label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.saved-contact-card__value {
    font-size: 0.86rem;
    font-weight: 500;
    word-break: break-word;
}

a.saved-contact-card__link {
    color: var(--brand-bright, var(--brand));
    text-decoration: none;
}

a.saved-contact-card__link:active {
    opacity: 0.85;
}

/* ============================================
   REGISTRATION
   ============================================ */
.reg-screen {
    padding: max(44px, env(safe-area-inset-top, 0px) + 24px) 24px max(32px, env(safe-area-inset-bottom, 0px) + 16px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100dvh;
}

.reg-logo {
    display: block;
    width: fit-content;
    margin: 0 auto 20px;
}
.reg-logo-svg {
    display: block;
    height: 50px;
    width: auto;
}
.reg-logo__go {
    transition: fill 0.45s ease;
}

.reg-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-align: center;
    margin-bottom: 6px;
}
.reg-subtitle {
    font-size: 0.88rem;
    color: var(--text-tertiary);
    text-align: center;
    font-weight: 500;
    margin-bottom: 36px;
}
.reg-participation-block {
    margin-bottom: 36px;
}
.reg-participation-block > .reg-subtitle {
    margin-bottom: 0;
}
.reg-event-resolved {
    margin-top: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
    line-height: 1.35;
}

.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
}
.field input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition);
}
.field input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}
.field input::placeholder { color: var(--text-tertiary); }

.field-with-addon { position: relative; }
.field-with-addon input { padding-right: 56px; }
.field .scan-addon {
    position: absolute;
    right: 6px; top: 50%;
    transform: translateY(-50%);
    background: var(--brand-subtle);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.field .scan-addon:active { transform: translateY(-50%) scale(0.9); }
.field .scan-addon svg { width: 18px; height: 18px; }

.field-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.82rem;
    color: var(--text-tertiary);
}
.field-check .icon { color: var(--success); }

/* ============================================
   BOTTOM NAV
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: rgba(9, 9, 11, 0.85);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-start;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 100;
}

.bottom-nav > .nav-item {
    flex: 1 1 0;
    min-width: 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    transition: color var(--transition);
}
.nav-item .nav-icon { transition: transform var(--transition); }
.nav-item .nav-icon svg { width: 22px; height: 22px; stroke-width: 1.8; }

.nav-item .nav-label {
    font-size: 0.65rem;
    font-weight: 600;
}

.nav-item.active { color: var(--brand-bright); }
.nav-item:active .nav-icon { transform: scale(0.85); }

/* ============================================
   SECTION HELPERS
   ============================================ */
.section-pad { padding: 0 20px; }

/* ============================================
   THEME PICKER (demo only вЂ” remove in prod)
   ============================================ */
.theme-picker {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 999;
    display: flex;
    gap: 6px;
    padding: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
}

.theme-dot {
    width: 24px; height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
}
.theme-dot:hover { transform: scale(1.15); }
.theme-dot.active { border-color: var(--text-primary); }

/* Registration alerts & nav links */
.reg-alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.reg-alert.alert-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(248, 113, 113, 0.2); }
.reg-alert.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(251, 191, 36, 0.2); }
.reg-alert.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(52, 211, 153, 0.2); }
.bottom-nav .nav-item { text-decoration: none; color: inherit; }
.bottom-nav .nav-item.active { color: var(--brand-bright); }

/* ============================================
   PARTNERS PAGE (guest)
   ============================================ */
.partners-page {
    padding: 8px 20px 24px;
}

.partners-page__lead {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.partners-page__event-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.partners-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.partner-card {
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, var(--bg-card) 0%, color-mix(in srgb, var(--bg-card) 92%, var(--brand) 8%) 100%);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.partner-card__inner {
    display: flex;
    flex-direction: column;
}

.partner-card__logo-wrap {
    padding: 20px 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
}

.partner-card__logo {
    max-width: 100%;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.partner-card__body {
    padding: 16px 20px 20px;
}

.partner-card__name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.partner-card__name--with-status {
    margin-bottom: 4px;
}

.partner-card__status {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--brand-bright);
    margin: 0 0 10px;
    line-height: 1.35;
}

.partner-card__desc {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.partner-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.partner-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary);
    background: color-mix(in srgb, var(--brand) 18%, var(--bg-elevated));
    border: 1px solid var(--brand-border);
    transition: transform var(--transition), background var(--transition);
}

.partner-card__link:active {
    transform: scale(0.98);
}

.partner-card__link-icon {
    display: inline-flex;
    opacity: 0.9;
}

.partner-card__link--ig {
    background: linear-gradient(135deg, color-mix(in srgb, #E1306C 35%, var(--bg-elevated)), var(--bg-elevated));
    border-color: color-mix(in srgb, #E1306C 40%, transparent);
}
