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

:root {
    --bg-dark: #3a0810;
    --bg-card: #ffffff;
    --gold: #e8b923;
    --gold-light: #ffe566;
    --gold-dark: #c8940a;
    --red: #a01515;
    --red-bright: #e82828;
    --red-deep: #6a0a0a;
    --cream: #fff5e0;
    --text: #1a0808;
    --text-muted: #5a3828;
    --border: rgba(232, 185, 35, 0.55);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
    --cta-height: 120px;
    --sidebar-width: 320px;
}

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

html, body {
    min-height: 100%;
    font-family: "Montserrat", system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
}

/* ===== ЭКРАНЫ ===== */

.screen {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.screen.active {
    display: block;
    opacity: 1;
}

/* ===== ФОН ===== */

.screen-invite {
    position: relative;
    min-height: 100dvh;
    overflow-x: hidden;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 110% 70% at 50% -8%, rgba(232, 40, 40, 0.65) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 0% 60%, rgba(255, 220, 80, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 100% 70%, rgba(255, 180, 60, 0.2) 0%, transparent 50%),
        linear-gradient(165deg, #5a1018 0%, #3a0810 40%, #280608 100%);
}

.page-bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.page-bg-glow--1 {
    width: 560px;
    height: 440px;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 60, 60, 0.4);
}

.page-bg-glow--2 {
    width: 400px;
    height: 400px;
    bottom: 5%;
    left: -100px;
    background: rgba(255, 220, 80, 0.28);
}

.page-bg-glow--3 {
    width: 320px;
    height: 320px;
    top: 35%;
    right: -80px;
    background: rgba(255, 160, 60, 0.22);
}

.page-bg-rays {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background: repeating-conic-gradient(
        from 0deg at 50% 15%,
        transparent 0deg 7deg,
        rgba(255, 230, 120, 0.7) 7deg 8deg
    );
}

/* Блёстки */

.sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.sparkles span {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold-light);
    box-shadow: 0 0 10px var(--gold-light), 0 0 20px rgba(255, 230, 100, 0.5);
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.6); }
}

.sparkles span:nth-child(1)  { top: 12%; left: 8%;  animation-delay: 0s; }
.sparkles span:nth-child(2)  { top: 22%; left: 85%; animation-delay: 0.8s; width: 4px; height: 4px; }
.sparkles span:nth-child(3)  { top: 45%; left: 15%; animation-delay: 1.6s; }
.sparkles span:nth-child(4)  { top: 60%; left: 92%; animation-delay: 2.2s; width: 6px; height: 6px; }
.sparkles span:nth-child(5)  { top: 75%; left: 25%; animation-delay: 0.4s; }
.sparkles span:nth-child(6)  { top: 8%;  left: 55%; animation-delay: 1.2s; width: 4px; height: 4px; }
.sparkles span:nth-child(7)  { top: 35%; left: 72%; animation-delay: 2.8s; }
.sparkles span:nth-child(8)  { top: 88%; left: 60%; animation-delay: 1.8s; }
.sparkles span:nth-child(9)  { top: 50%; left: 48%; animation-delay: 3.2s; width: 3px; height: 3px; }
.sparkles span:nth-child(10) { top: 18%; left: 32%; animation-delay: 2.4s; }

/* ===== КАРКАС ===== */

.page-shell {
    position: relative;
    z-index: 1;
    max-width: 1140px;
    margin: 0 auto;
    padding:
        calc(24px + var(--safe-top))
        20px
        calc(var(--cta-height) + var(--safe-bottom) + 24px);
}

.site-header {
    text-align: center;
    margin-bottom: 32px;
}

.site-emblem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 12px;
    border-radius: 50%;
    font-size: 32px;
    color: #fff;
    background: linear-gradient(145deg, #e82828, #a01515);
    border: 3px solid var(--gold-light);
    box-shadow: 0 0 40px rgba(255, 220, 80, 0.45), 0 8px 24px rgba(0, 0, 0, 0.3);
    animation: emblemGlow 2.5s ease-in-out infinite;
}

@keyframes emblemGlow {
    0%, 100% { box-shadow: 0 0 40px rgba(255, 220, 80, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 60px rgba(255, 230, 100, 0.65); transform: scale(1.04); }
}

.site-org {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--gold-light);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

.page-main {
    min-width: 0;
}

/* ===== ГЕРОЙ ===== */

.hero-card {
    position: relative;
    margin-bottom: 24px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff 0%, #fff8e8 100%);
    border: 3px solid var(--gold);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(255, 220, 80, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hero-ribbon {
    background: linear-gradient(90deg, #8a1010, #e82828, #ff4444, #e82828, #8a1010);
    background-size: 200% 100%;
    animation: ribbonShine 4s linear infinite;
    color: #fff;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 12px 16px;
    border-bottom: 3px solid var(--gold-light);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

@keyframes ribbonShine {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.hero-inner {
    text-align: center;
    padding: 36px 28px 32px;
    background:
        radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 55%);
}

.hero-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--red-deep);
    background: linear-gradient(135deg, rgba(255, 230, 100, 0.5), rgba(255, 200, 60, 0.3));
    border: 2px solid var(--gold);
    border-radius: 999px;
    padding: 8px 22px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(232, 185, 35, 0.3);
}

.hero-title {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #6a0a0a 0%, #c41e1e 40%, #e82828 60%, #6a0a0a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(232, 40, 40, 0.2));
}

.hero-lead {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(17px, 2.5vw, 22px);
    font-style: italic;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto;
}

.hero-ornament {
    margin-top: 20px;
    font-size: 14px;
    letter-spacing: 12px;
    color: var(--gold);
    opacity: 0.7;
}

/* ===== ИНФО-КАРТОЧКИ ===== */

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.info-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 18px;
    background: linear-gradient(160deg, #ffffff 0%, #fff9ee 100%);
    border: 2px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.15), 0 0 20px rgba(255, 220, 80, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2), 0 0 30px rgba(255, 220, 80, 0.2);
    border-color: var(--gold-light);
}

.info-card--wide {
    grid-column: auto;
}

.info-icon {
    font-size: 26px;
    line-height: 1;
    margin-bottom: 2px;
}

.info-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--red-bright);
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
}

/* ===== КОЛОНКИ КОНТЕНТА ===== */

.content-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.block {
    background: linear-gradient(160deg, #ffffff 0%, #fffaf0 100%);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 24px 22px;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.12);
    height: 100%;
}

.block--notice {
    background: linear-gradient(135deg, #fffef8 0%, #fff0cc 100%);
    border-color: rgba(232, 40, 40, 0.2);
    margin-bottom: 0;
}

.block-title {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
}

.block-title::before {
    content: "✦";
    font-size: 14px;
    color: var(--gold);
}

.block-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.block-text:last-child {
    margin-bottom: 0;
}

.block-text--accent {
    color: var(--text);
    font-weight: 600;
    padding: 14px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 230, 100, 0.35), rgba(255, 200, 60, 0.2));
    border-left: 4px solid var(--red-bright);
}

/* Программа */

.program-list {
    list-style: none;
}

.program-list li {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 14px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.25);
}

.program-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.program-time {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold-dark);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.08));
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    padding: 7px 6px;
    text-align: center;
    line-height: 1.2;
}

.program-desc {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--text);
    padding-top: 3px;
}

/* Важно */

.notice-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 20px;
}

.notice-list li {
    position: relative;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-muted);
    padding: 10px 0 10px 20px;
}

.notice-list li::before {
    content: "★";
    position: absolute;
    left: 0;
    top: 10px;
    font-size: 10px;
    color: var(--gold);
}

/* Подвал */

.site-footer {
    text-align: center;
    padding: 28px 8px 0;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 230, 150, 0.75);
}

.site-footer-copy {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.75;
}

/* ===== БОКОВАЯ КАРТОЧКА БИЛЕТА (ДЕСКТОП) ===== */

.ticket-sidebar {
    display: none;
}

.ticket-card {
    position: relative;
    overflow: hidden;
    padding: 28px 24px;
    border-radius: 22px;
    background: linear-gradient(160deg, #ffffff 0%, #ffe8a0 100%);
    border: 3px solid var(--gold-light);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.25),
        0 0 50px rgba(255, 220, 80, 0.25);
}

.ticket-card-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 60%
    );
    animation: cardShine 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes cardShine {
    0%, 100% { transform: translateX(-30%) rotate(25deg); }
    50% { transform: translateX(30%) rotate(25deg); }
}

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

.ticket-card-star {
    font-size: 20px;
    color: var(--gold);
}

.ticket-card-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--red);
}

.ticket-card-title {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--red-deep);
    margin-bottom: 8px;
    line-height: 1.2;
}

.ticket-card-desc {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.ticket-card-meta {
    list-style: none;
    margin-bottom: 22px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px dashed rgba(212, 175, 55, 0.4);
}

.ticket-card-meta li {
    font-size: 13px;
    color: var(--text-muted);
    padding: 4px 0;
}

.ticket-card-meta strong {
    color: var(--text);
    font-weight: 600;
}

.btn-download--sidebar {
    width: 100%;
}

/* ===== КНОПКА СКАЧИВАНИЯ ===== */

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 15px 24px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(180deg, #ff3333 0%, #cc1010 50%, #990808 100%);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow:
        0 10px 32px rgba(200, 20, 20, 0.5),
        0 0 24px rgba(255, 60, 60, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 40px rgba(200, 20, 20, 0.6),
        0 0 32px rgba(255, 80, 80, 0.35);
}

.btn-download:active {
    transform: translateY(0) scale(0.98);
}

.btn-download-icon {
    flex-shrink: 0;
}

/* Мобильная панель CTA */

.cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 14px 16px calc(14px + var(--safe-bottom));
    background: linear-gradient(180deg, transparent 0%, rgba(58, 8, 16, 0.92) 35%, rgba(58, 8, 16, 0.99) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 2px solid rgba(255, 220, 80, 0.25);
}

.cta-inner {
    max-width: 560px;
    margin: 0 auto;
}

.cta-note {
    margin-top: 8px;
    text-align: center;
    font-size: 11px;
    color: rgba(240, 216, 120, 0.55);
}

/* ===== АНИМАЦИЯ / СКАЧИВАНИЕ ===== */

body.animation-mode {
    overflow: hidden;
}

body.animation-mode #screen-invite,
body.locked #screen-invite {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.locked {
    overflow: hidden;
}

.download-toast {
    position: fixed;
    top: calc(16px + var(--safe-top));
    right: 16px;
    z-index: 220;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: min(300px, calc(100vw - 32px));
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(18, 22, 32, 0.96);
    border: 1px solid rgba(126, 245, 199, 0.22);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    color: #e8fff4;
    opacity: 0;
    transform: translateY(-8px) translateX(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.download-toast.is-visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

.download-toast.is-done { border-color: rgba(22, 255, 125, 0.35); }
.download-toast.is-error { border-color: rgba(255, 90, 90, 0.45); }

.download-toast-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(22, 255, 125, 0.12);
    color: #16ff7d;
}

.download-toast-body { flex: 1; min-width: 0; }

.download-toast-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.download-toast-status {
    display: block;
    font-size: 11px;
    color: rgba(126, 245, 199, 0.8);
    margin-bottom: 8px;
}

.download-toast-bar {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.download-toast-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #16ff7d, #7ef5c7);
    transition: width 0.2s ease;
}

#screen3.screen.active {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-top: calc(20px + var(--safe-top));
    padding-bottom: calc(20px + var(--safe-bottom));
    background: #020711;
    z-index: 200;
}

.hack-wrapper {
    max-width: 960px;
    width: 100%;
    max-height: 100%;
    background: #020711;
    color: #16ff7d;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    padding: 18px;
    font-family: "SF Mono", "Fira Code", Consolas, monospace;
    display: flex;
    flex-direction: column;
}

#hack-header {
    font-size: 14px;
    color: #7ef5c7;
    margin-bottom: 12px;
    flex-shrink: 0;
}

#code-area {
    flex: 1;
    min-height: 0;
    height: clamp(280px, 50vh, 480px);
    overflow-y: auto;
    background: #000309;
    border-radius: 10px;
    padding: 14px;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

#final-status {
    margin-top: 16px;
    color: #16ff7d;
    font-size: clamp(16px, 2vw, 24px);
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    flex-shrink: 0;
}

#final-status.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Биометрия */

.bio-overlay {
    position: fixed;
    inset: 0;
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 4, 12, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.bio-overlay.is-denied .bio-title { color: #ffd2d2; }
.bio-overlay.is-denied .bio-sub { color: #ffb4b4; }
.bio-overlay.is-denied .bio-card {
    border-color: rgba(255, 120, 120, 0.35);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 90, 90, 0.12);
}

.bio-overlay.is-visible { opacity: 1; pointer-events: auto; }
.bio-overlay.is-hiding { opacity: 0; }

.bio-card {
    width: min(360px, 92vw);
    text-align: center;
    padding: 32px 26px 28px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(12, 24, 42, 0.96) 0%, rgba(4, 10, 20, 0.98) 100%);
    border: 1px solid rgba(22, 255, 125, 0.28);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(22, 255, 125, 0.12);
    transform: translateY(16px) scale(0.94);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.bio-overlay.is-visible .bio-card {
    transform: translateY(0) scale(1);
}

.bio-scan {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
}

.bio-camera-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 4;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.bio-overlay.is-scanning .bio-camera-preview {
    opacity: 1;
    transform: scale(1);
}

.bio-overlay.is-success .bio-camera-preview,
.bio-overlay.is-hiding .bio-camera-preview {
    opacity: 0;
}

.bio-ring {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 2px solid rgba(22, 255, 125, 0.25);
    opacity: 0;
}

.bio-overlay.is-scanning .bio-ring {
    animation: bioPulse 2s ease-out infinite;
}

.bio-ring-2 { animation-delay: 0.45s !important; inset: 0; }
.bio-ring-3 { animation-delay: 0.9s !important; inset: -8px; }

.bio-face {
    position: relative;
    z-index: 2;
    color: #16ff7d;
    filter: drop-shadow(0 0 10px rgba(22, 255, 125, 0.45));
}

.bio-overlay.is-scanning .bio-face {
    animation: bioGlow 1.2s ease-in-out infinite;
}

.bio-overlay.is-scanning .bio-face svg {
    opacity: 0;
}

.bio-scanline-path { stroke: #7ef5c7; opacity: 0.9; }

.bio-overlay.is-scanning .bio-scanline-path {
    animation: bioScanLine 1.1s ease-in-out infinite;
}

.bio-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16ff7d;
    opacity: 0;
    transform: scale(0.6);
    z-index: 3;
}

.bio-overlay.is-success .bio-face { opacity: 0; transition: opacity 0.2s ease; }
.bio-overlay.is-success .bio-ring { animation: none; opacity: 0; }

.bio-overlay.is-success .bio-check {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.bio-title {
    font-size: 22px;
    font-weight: 800;
    color: #f4fff8;
    margin-bottom: 6px;
}

.bio-sub {
    font-size: 13px;
    color: rgba(126, 245, 199, 0.85);
}

@keyframes bioPulse {
    0% { opacity: 0.7; transform: scale(0.85); }
    100% { opacity: 0; transform: scale(1.25); }
}

@keyframes bioGlow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(22, 255, 125, 0.35)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 16px rgba(22, 255, 125, 0.7)); transform: scale(1.04); }
}

@keyframes bioScanLine {
    0% { transform: translateY(-14px); opacity: 0.15; }
    50% { opacity: 1; }
    100% { transform: translateY(14px); opacity: 0.15; }
}

/* ===== ДЕСКТОП ===== */

@media (min-width: 900px) {
    .page-shell {
        padding-bottom: calc(40px + var(--safe-bottom));
    }

    .page-layout {
        grid-template-columns: 1fr var(--sidebar-width);
        gap: 32px;
    }

    .ticket-sidebar {
        display: block;
        position: sticky;
        top: 24px;
    }

    .cta-bar {
        display: none;
    }

    .content-columns {
        gap: 20px;
    }

    .hero-inner {
        padding: 44px 40px 36px;
    }

    #code-area {
        font-size: 13px;
        height: clamp(320px, 55vh, 520px);
    }
}

@media (min-width: 1100px) {
    .page-shell {
        padding-left: 32px;
        padding-right: 32px;
    }

    .info-grid {
        gap: 18px;
    }
}

/* ===== ПЛАНШЕТ ===== */

@media (max-width: 899px) {
    .info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .info-card--wide {
        grid-column: 1 / -1;
    }

    .content-columns {
        grid-template-columns: 1fr;
    }

    .notice-list {
        grid-template-columns: 1fr;
    }
}

/* ===== МОБИЛЬНЫЙ ===== */

@media (max-width: 480px) {
    .page-shell {
        padding-left: 14px;
        padding-right: 14px;
        padding-top: calc(16px + var(--safe-top));
    }

    .hero-inner {
        padding: 28px 18px 24px;
    }

    .hero-ornament {
        letter-spacing: 8px;
        font-size: 12px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-card--wide {
        grid-column: auto;
    }

    .block {
        padding: 20px 16px;
    }

    #code-area {
        font-size: 10px;
        height: clamp(220px, 48dvh, 360px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
