:root {
          
    --bg-black: #0D0D0D; 
    --panel-dark: #222222;
    /* чуть светлее основной панели — как у .user-avatar, для карточек списка вакансий */
    --panel-elevated: #333333;
    --accent-neon: #CCFF00;
    --accent-danger: #FF5E5E;

    --text-light: #F0F0F0;
    --text-muted: #888888;
    --text-dark: #0D0D0D;
    --font-family: 'Inter', sans-serif;
    
    
    --radius-main: 24px;
    --radius-pill: 99px;
    --radius-small: 12px;
    --grout-thickness: 6px;
    --overlay-scrim: rgba(13, 13, 13, 0.85);
    --nav-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --nav-ease-soft: cubic-bezier(0.32, 0.72, 0.28, 1);
    --nav-dur: 0.3s;
    --nav-dur-label: 0.34s;
    --tab-dur: 0.26s;

    /* Telegram WebApp (задаются из JS из safeAreaInset / contentSafeAreaInset) */
    --tg-safe-area-inset-top: 0px;
    --tg-safe-area-inset-bottom: 0px;
    --tg-safe-area-inset-left: 0px;
    --tg-safe-area-inset-right: 0px;
    --tg-content-safe-area-inset-top: 0px;
    --tg-content-safe-area-inset-bottom: 0px;
    --tg-content-safe-area-inset-left: 0px;
    --tg-content-safe-area-inset-right: 0px;

    /* Единый отступ под вырез / Telegram UI: env в браузере, tg-* в Mini App */
    --app-safe-inset-top: max(
        env(safe-area-inset-top, 0px),
        calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px))
    );
    --app-safe-inset-bottom: max(
        env(safe-area-inset-bottom, 0px),
        calc(var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px))
    );
    --app-safe-inset-left: max(
        env(safe-area-inset-left, 0px),
        calc(var(--tg-safe-area-inset-left, 0px) + var(--tg-content-safe-area-inset-left, 0px))
    );
    --app-safe-inset-right: max(
        env(safe-area-inset-right, 0px),
        calc(var(--tg-safe-area-inset-right, 0px) + var(--tg-content-safe-area-inset-right, 0px))
    );
}

html {
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow-x: hidden;
    overflow-x: clip;
    background-color: var(--bg-black);
}

html::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Неподвижный фон: слой под контентом, не едет при скролле документа */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-color: var(--bg-black);
    pointer-events: none;
}

body {
    font-family: var(--font-family);
    background-color: transparent;
    color: var(--text-light);
    /* Плашки на всю ширину экрана; бар меню (.bottom-nav-container) не трогаем. */
    padding-top: calc(var(--grout-thickness) + var(--app-safe-inset-top));
    padding-left: var(--app-safe-inset-left);
    padding-right: var(--app-safe-inset-right);
    padding-bottom: calc(100px + var(--app-safe-inset-bottom));
    min-height: 100vh;
    min-height: 100dvh;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness);
}


.panel {
    background-color: var(--panel-dark);
    border-radius: var(--radius-main);
    padding: 24px;
    overflow: hidden;
    position: relative;
}

.panel-neon {
    background-color: var(--accent-neon);
    color: var(--text-dark);
}


.header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 24px;
}

/* Иначе .header { display: flex } перебивает стандартное [hidden] — шапка остаётся на экране редактора */
#app-header[hidden] {
    display: none !important;
}

.header-default {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

.header-default[hidden],
.header-hr-edit[hidden] {
    display: none !important;
}

.header-hr-edit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr);
    align-items: center;
    width: 100%;
    column-gap: 8px;
}

.header-hr-back-btn {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: -8px -6px -8px -10px;
    padding: 8px 10px 8px 8px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.3px;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.15s;
}

.header-hr-back-btn:active {
    background: rgba(255, 255, 255, 0.06);
}

.header-hr-back-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2.25;
    color: var(--accent-neon);
    flex-shrink: 0;
}

.header-hr-edit-title {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.35px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-light);
}

.header-hr-edit-spacer {
    justify-self: end;
    width: 44px;
    height: 1px;
}

body.hr-editor-active .bottom-nav-container {
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

body.hr-editor-active #app-header {
    display: none !important;
}

/* Маска небезопасных зон (верх + бока): контент при скролле не просвечивает под вырез / по краям */
body.hr-editor-active::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 65;
    pointer-events: none;
    background-repeat: no-repeat;
    background-image:
        linear-gradient(var(--bg-black), var(--bg-black)),
        linear-gradient(var(--bg-black), var(--bg-black)),
        linear-gradient(var(--bg-black), var(--bg-black));
    background-size:
        100% var(--app-safe-inset-top),
        var(--app-safe-inset-left) 100%,
        var(--app-safe-inset-right) 100%;
    background-position:
        top left,
        top left,
        top right;
}

.header-default .logo {
    min-width: 0;
    flex: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.5px;
    min-width: 0;
}

.logo-brand-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logo-dot {
    width: 24px;
    height: 24px;
    background-color: var(--accent-neon);
    color: var(--text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.lucide-icon {
    flex-shrink: 0;
    stroke-width: 2;
}

.lucide-icon--logo {
    width: 12px;
    height: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background-color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 15px;
}

.lucide-icon--avatar {
    width: 18px;
    height: 18px;
}


.hero-action {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    cursor: pointer;
}

.hero-title {
    font-size: 32px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: auto;
}

.hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 32px;
}

.tag {
    background-color: rgba(0,0,0,0.1);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
}

.play-btn-wrapper {
    width: 48px;
    height: 48px;
    background-color: var(--text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-neon);
}

.lucide-icon--play {
    width: 22px;
    height: 22px;
    margin-left: 3px;
}


.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--grout-thickness);
    
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.stat-card {
    background-color: var(--panel-dark);
    border-radius: var(--radius-main);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-value {
    font-size: 36px;
    font-weight: 500;
    letter-spacing: -1px;
    color: var(--text-light);
}

.stat-value.highlight {
    color: var(--accent-neon);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.3;
}

.stat-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.lucide-icon--stat {
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    opacity: 0.85;
}

.stat-card:first-child .lucide-icon--stat {
    color: var(--accent-neon);
    opacity: 1;
}


.section-header {
    padding: 16px 18px 8px 18px;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-all {
    font-size: 13px;
    color: var(--accent-neon);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lucide-icon--view {
    width: 12px;
    height: 12px;
    opacity: 0.9;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness);
}

.history-empty-msg {
    text-align: center;
    padding: 24px 16px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.45;
}

.history-item {
    background-color: var(--panel-dark);
    border-radius: var(--radius-main);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    min-height: 92px;
}

.history-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.lucide-icon--history {
    width: 13px;
    height: 13px;
    color: var(--text-muted);
    opacity: 0.7;
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.history-title {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.history-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
}

.history-meta .status-dot {
    flex-shrink: 0;
}

.history-meta-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-neon);
}

.status-dot.needs-work {
    background-color: #FF5E5E; 
}

.history-score {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.5px;
    background: rgba(255,255,255,0.05);
    padding: 8px 12px;
    border-radius: var(--radius-small);
}


.bottom-nav-container {
    position: fixed;
    bottom: calc(24px + var(--app-safe-inset-bottom));
    left: calc(24px + var(--app-safe-inset-left));
    right: calc(24px + var(--app-safe-inset-right));
    display: flex;
    justify-content: center;
    z-index: 100;
}

.bottom-nav {
    background-color: var(--accent-neon);
    padding: 8px;
    border-radius: var(--radius-pill);
    display: flex;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.bottom-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 0;
    min-width: 0;
    justify-content: center;
    padding: 10px 10px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    /* Фон и цвет активной вкладки — без задержки, чтобы бар сразу показывал выбор */
    transition:
        background-color 0s linear,
        color 0s linear,
        box-shadow 0s linear,
        transform 0.26s var(--nav-ease-soft),
        padding var(--nav-dur) var(--nav-ease),
        gap var(--nav-dur) var(--nav-ease),
        flex-grow var(--nav-dur) var(--nav-ease-soft),
        min-width var(--nav-dur) var(--nav-ease-soft);
}

.nav-item .nav-label {
    display: inline-block;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    white-space: nowrap;
    vertical-align: middle;
    order: 1;
    transform: translate3d(-3px, 0, 0);
    transition:
        max-width var(--nav-dur-label) var(--nav-ease-soft),
        opacity calc(var(--nav-dur) + 0.05s) var(--nav-ease),
        transform var(--nav-dur-label) var(--nav-ease-soft);
}

.nav-item.active .nav-label {
    max-width: 20rem;
    opacity: 1;
    overflow: visible;
    flex-shrink: 0;
    transform: translate3d(0, 0, 0);
    transition-delay: 0s;
}

.nav-item:active {
    transform: scale(0.985);
}

.nav-item.active {
    background-color: var(--text-dark);
    color: var(--accent-neon);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.32);
    padding: 10px 12px;
    gap: 6px;
    flex-grow: 1.35;
    flex-basis: auto;
    flex-shrink: 1;
    min-width: min-content;
}

.lucide-icon--nav {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    flex-shrink: 0;
    order: -1;
    transition:
        transform 0.18s var(--nav-ease-soft),
        color 0s linear;
}

.nav-item.active .lucide-icon--nav {
    transform: scale(1.05);
}


.ai-feedback {
    border-radius: var(--radius-main);
    padding: 24px 18px;
    background-color: var(--panel-dark);
    position: relative;
}

.ai-feedback::before {
    content: '';
    position: absolute;
    left: 0;
    top: 24px;
    bottom: 24px;
    width: 4px;
    background-color: var(--accent-neon);
    border-radius: 0 4px 4px 0;
}

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

.ai-avatar {
    width: 24px;
    height: 24px;
    background-color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lucide-icon--ai {
    width: 14px;
    height: 14px;
    color: var(--text-dark);
}

.feedback-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.feedback-text {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-light);
}

.home-sessions {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.home-sessions .history-empty-msg {
    padding-left: 18px;
    padding-right: 18px;
}

.home-sessions-empty {
    margin: 0;
}

.tab-panels {
    width: 100%;
    overflow: visible;
}

.tab-panel {
    width: 100%;
    display: none;
    flex-direction: column;
    gap: var(--grout-thickness);
    overflow: visible;
    min-height: 0;
}

.tab-panel.active {
    display: flex;
    animation: tabFadeIn var(--tab-dur) var(--nav-ease) both;
}

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

@media (prefers-reduced-motion: reduce) {
    .tab-panel {
        animation: none;
    }
    .nav-item,
    .nav-item .lucide-icon--nav,
    .nav-item .nav-label {
        transition-duration: 0.01ms;
    }
    .nav-item:active {
        transform: none;
    }
    #tab-profile .profile-badge-icon {
        transition: none;
    }
    #tab-profile .profile-badge-icon:hover {
        transform: none;
        box-shadow: none;
    }
    #tab-profile .profile-ach-bar-fill {
        transition: none;
    }
}

.nav-item {
    border: none;
    cursor: pointer;
    font-family: inherit;
    background: transparent;
}

.nav-item:focus-visible {
    outline: 2px solid var(--text-dark);
    outline-offset: 2px;
}

.hr-field-panel {
    background-color: var(--panel-dark);
    border-radius: var(--radius-main);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hr-field-num {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-neon);
    letter-spacing: 0.02em;
}

.hr-field-label {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.hr-field-hint {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.hr-field-hint em {
    font-style: normal;
    color: var(--text-light);
    opacity: 0.85;
}

.hr-input,
.hr-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-light);
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}

.hr-input {
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    resize: none;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    line-height: 1.35;
}

.hr-textarea {
    height: 118px;
    min-height: 118px;
    max-height: 118px;
    resize: none;
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 1.45;
    -webkit-overflow-scrolling: touch;
}

.hr-textarea--tall {
    height: 168px;
    min-height: 168px;
    max-height: 168px;
}

.hr-input::placeholder,
.hr-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.9;
}

.hr-input:focus,
.hr-textarea:focus {
    outline: none;
    border-color: var(--accent-neon);
    background: rgba(204, 255, 0, 0.06);
}

.hr-saved {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 8px;
}

.hr-saved.visible {
    color: var(--accent-neon);
}

/* Подсказка сохранения не занимает место, пока пустая */
#hr-saved-hint.hr-saved--edit:not(.visible) {
    display: none;
    margin: 0;
    padding: 0;
    min-height: 0;
}

#tab-profile {
    gap: var(--grout-thickness);
}

#tab-profile .profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 32px 24px;
}

#tab-profile .profile-avatar-large {
    position: relative;
    width: 100px;
    height: 100px;
    background-color: #333;
    border-radius: 50%;
    border: 4px solid var(--accent-neon);
    overflow: hidden;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23888"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center bottom;
}

#tab-profile .profile-avatar-large.has-photo {
    background-image: none;
}

#tab-profile .profile-avatar-large__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

#tab-profile .user-name {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-light);
}

#tab-profile .target-role-badge {
    display: inline-block;
    background-color: var(--accent-neon);
    color: var(--text-dark);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

#tab-profile .profile-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--grout-thickness);
}

#tab-profile .profile-stat-item {
    background-color: var(--panel-dark);
    border-radius: var(--radius-main);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#tab-profile .profile-stat-num {
    font-size: 28px;
    font-weight: 600;
    color: var(--accent-neon);
    letter-spacing: -0.5px;
}

#tab-profile .profile-stat-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.2;
}

#tab-profile .profile-heatmap-panel {
    padding: 20px 24px 22px;
}

#tab-profile .profile-heatmap-wrap {
    width: 100%;
    margin: 4px 0 0;
    padding: 0 0 6px;
    box-sizing: border-box;
}

#tab-profile .profile-heatmap-grid {
    --heatmap-gap: 3px;
    display: grid;
    width: 100%;
    box-sizing: border-box;
    grid-template-rows: repeat(7, minmax(0, 1fr));
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: var(--heatmap-gap);
    /* высота: см. aspect-ratio в JS = число_недель / 7 */
    margin: 0;
}

#tab-profile .profile-heatmap-cell {
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background-color: #333;
    border-radius: 3px;
}

#tab-profile .profile-heatmap-grid .profile-heatmap-cell {
    cursor: pointer;
}

#tab-profile .profile-heatmap-cell:focus-visible {
    outline: 2px solid var(--accent-neon);
    outline-offset: 2px;
}

#tab-profile .profile-heatmap-cell--out {
    background-color: #282828;
    opacity: 0.35;
}

/* Мини-пузырёк сбоку от клетки — как карточка сайта (.panel): сплошной фон, без обводки */
#tab-profile .profile-heatmap-popover {
    position: fixed;
    z-index: 4000;
    min-width: 0;
    max-width: min(88px, calc(100vw - 16px));
    padding: 2px 5px 3px;
    box-sizing: border-box;
    background-color: var(--panel-elevated);
    border: none;
    border-radius: var(--radius-small);
    box-shadow: none;
    text-align: center;
    pointer-events: none;
}

#tab-profile .profile-heatmap-popover-num {
    font-size: 10px;
    font-weight: 700;
    line-height: 1.05;
    color: var(--accent-neon);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

#tab-profile .profile-heatmap-popover-line {
    margin-top: 0;
    font-size: 7px;
    color: var(--text-muted);
    line-height: 1.12;
    letter-spacing: 0.01em;
}

#tab-profile .profile-heatmap-popover-meta {
    margin-top: 1px;
    padding-top: 1px;
    border-top: 1px solid var(--panel-dark);
    font-size: 6px;
    color: var(--text-muted);
    line-height: 1.15;
}

#tab-profile .profile-heatmap-cell.level-1 {
    background-color: #4d5c00;
}

#tab-profile .profile-heatmap-cell.level-2 {
    background-color: #8aa600;
}

#tab-profile .profile-heatmap-cell.level-3 {
    background-color: var(--accent-neon);
}

#tab-profile .profile-heatmap-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 14px;
    padding-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

#tab-profile .profile-heatmap-legend-scale {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

#tab-profile .profile-heatmap-legend-cell {
    width: 11px;
    height: 11px;
    min-width: 11px;
    flex-shrink: 0;
    border-radius: 3px;
}

#tab-profile .profile-section-title {
    padding: 12px 8px 8px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#tab-profile .profile-badges-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#tab-profile .profile-badges-container::-webkit-scrollbar {
    display: none;
}

#tab-profile .profile-badge-icon {
    flex: 0 0 64px;
    height: 64px;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.07) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(204, 255, 0, 0.22);
    color: var(--accent-neon);
    transition:
        transform 0.28s var(--nav-ease-soft),
        box-shadow 0.28s var(--nav-ease-soft),
        border-color 0.28s var(--nav-ease-soft),
        background 0.28s var(--nav-ease-soft);
}

#tab-profile .profile-badge-icon:hover {
    transform: translateY(-2px);
    border-color: rgba(204, 255, 0, 0.45);
    box-shadow:
        0 0 0 1px rgba(204, 255, 0, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 0 28px rgba(204, 255, 0, 0.18);
}

#tab-profile .profile-badge-icon .profile-badge-svg {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 10px rgba(204, 255, 0, 0.25));
}

#tab-profile .profile-badge-icon:active {
    transform: translateY(0);
}

#tab-profile .profile-achievements-panel {
    padding: 20px 20px 22px;
}

#tab-profile .profile-achievement-details {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#tab-profile .profile-ach-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

#tab-profile .profile-ach-icon-wrap {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(204, 255, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-neon);
}

#tab-profile .profile-ach-icon-wrap .profile-badge-svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 0 6px rgba(204, 255, 0, 0.2));
}

#tab-profile .profile-ach-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#tab-profile .profile-ach-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

#tab-profile .profile-ach-name {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: var(--text-light);
}

#tab-profile .profile-ach-pct {
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent-neon);
    flex-shrink: 0;
}

#tab-profile .profile-ach-bar {
    height: 5px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

#tab-profile .profile-ach-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8aa600, var(--accent-neon));
    transition: width 0.5s var(--nav-ease-soft);
}

#tab-profile .profile-ach-reward {
    font-size: 12px;
    line-height: 1.35;
    color: var(--text-muted);
}

#tab-profile .profile-ach-reward strong {
    color: var(--text-light);
    font-weight: 600;
}

#tab-profile .profile-settings-group {
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness);
}

#tab-profile .profile-settings-item {
    background-color: var(--panel-dark);
    border-radius: var(--radius-main);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    color: inherit;
}

#tab-profile .profile-settings-item:focus-visible {
    outline: 2px solid var(--accent-neon);
    outline-offset: 2px;
}

#tab-profile .profile-settings-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-light);
}

#tab-profile .profile-settings-value {
    color: var(--accent-neon);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#tab-profile .lucide-icon--profile-chevron {
    width: 16px;
    height: 16px;
    opacity: 0.95;
}

#tab-profile .profile-toggle {
    width: 44px;
    height: 24px;
    background: #333;
    border-radius: 12px;
    position: relative;
    transition: background 0.3s ease;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}

#tab-profile .profile-toggle::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.3s ease, background 0.3s ease;
}

#tab-profile .profile-toggle.is-on {
    background: var(--accent-neon);
}

#tab-profile .profile-toggle.is-on::after {
    left: 22px;
    background: var(--text-dark);
}

#tab-profile .profile-toggle:focus-visible {
    outline: 2px solid var(--accent-neon);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    #tab-profile .profile-toggle,
    #tab-profile .profile-toggle::after {
        transition-duration: 0.01ms;
    }
}

/* —— Нижний шит: выбор вакансии перед тренировкой —— */
.training-vacancy-sheet {
    position: fixed;
    inset: 0;
    z-index: 240;
    pointer-events: none;
    visibility: hidden;
}

.training-vacancy-sheet.is-open {
    pointer-events: auto;
    visibility: visible;
}

.training-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.28s var(--nav-ease, ease);
}

.training-vacancy-sheet.is-open .training-sheet-backdrop {
    opacity: 1;
}

.training-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(88vh, 640px);
    display: flex;
    flex-direction: column;
    background: var(--panel-dark);
    border-radius: var(--radius-main) var(--radius-main) 0 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.45);
    padding-bottom: calc(var(--app-safe-inset-bottom, 0px) + 12px);
    transform: translate3d(0, 105%, 0);
    transition: transform 0.32s var(--nav-ease-soft, cubic-bezier(0.32, 0.72, 0.28, 1));
}

.training-vacancy-sheet.is-open .training-sheet-panel {
    transform: translate3d(0, 0, 0);
}

.training-sheet-handle {
    width: 40px;
    height: 5px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.18);
    margin: 10px auto 4px;
    flex-shrink: 0;
}

.training-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 20px 12px;
    flex-shrink: 0;
}

.training-sheet-head-text {
    min-width: 0;
    text-align: left;
}

.training-sheet-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text-light);
    margin: 0;
}

.training-sheet-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0 0;
    line-height: 1.35;
}

.training-sheet-close {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.training-sheet-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.training-sheet-close-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.25;
}

.training-sheet-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 16px 8px;
}

.training-sheet-loading {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    padding: 24px 12px;
}

.training-sheet-empty {
    text-align: center;
    padding: 16px 8px 24px;
}

.training-sheet-empty-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0 0 16px;
}

.training-sheet-cta {
    width: 100%;
    max-width: 280px;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--accent-neon);
    color: var(--text-dark);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.training-sheet-cta:active {
    opacity: 0.92;
}

.training-sheet-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 8px;
}

.training-sheet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border: none;
    border-radius: var(--radius-main);
    background: var(--bg-black);
    color: var(--text-light);
    font: inherit;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.12s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.training-sheet-item:active {
    transform: scale(0.992);
}

.training-sheet-item-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.training-sheet-item-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--accent-neon);
}

.training-sheet-item-job {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.training-sheet-item-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.training-sheet-item-chevron {
    flex-shrink: 0;
    opacity: 0.5;
}

.training-sheet-chevron {
    width: 20px;
    height: 20px;
    stroke-width: 2.25;
    color: var(--accent-neon);
}

@media (prefers-reduced-motion: reduce) {
    .training-sheet-backdrop,
    .training-sheet-panel {
        transition-duration: 0.01ms;
    }
}

.training-overlay {
    position: fixed;
    inset: 0;
    z-index: 250;
    background-color: var(--bg-black);
    display: none;
    flex-direction: column;
    gap: var(--grout-thickness);
    padding-top: calc(var(--grout-thickness) + var(--app-safe-inset-top));
    padding-left: calc(var(--grout-thickness) + var(--app-safe-inset-left));
    padding-right: calc(var(--grout-thickness) + var(--app-safe-inset-right));
    padding-bottom: calc(var(--grout-thickness) + var(--app-safe-inset-bottom));
    overflow: hidden;
    box-sizing: border-box;
}

.training-overlay.is-open {
    display: flex;
    flex-direction: column;
    /* Не задавать position: relative — ломает fullscreen: оверлей уходит в поток под контент (гостевая страница). */
}

.training-overlay > [hidden] {
    display: none !important;
}

.training-pause-overlay {
    position: absolute;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    background: var(--overlay-scrim);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-sizing: border-box;
}

.training-pause-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    width: 100%;
    max-width: 300px;
}

.lucide-icon--training-pause-large {
    width: 56px;
    height: 56px;
    color: var(--accent-neon);
    flex-shrink: 0;
}

.training-pause-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text-light);
    line-height: 1.25;
}

.training-pause-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.training-pause-primary {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--accent-neon);
    color: var(--text-dark);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.training-pause-secondary {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.training-pause-primary:active,
.training-pause-secondary:active {
    opacity: 0.92;
}

.training-overlay .training-pause-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-neon);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.training-overlay .training-pause-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.lucide-icon--training-pause {
    width: 18px;
    height: 18px;
}

.training-flow--active.training-flow--paused .ai-orb {
    animation: none;
    opacity: 0.45;
    filter: grayscale(0.25);
}

.training-flow--active.training-flow--paused .ai-chat-area {
    opacity: 0.45;
}

.training-flow--active.training-flow--paused .interaction-area {
    opacity: 0.32;
    pointer-events: none;
}

.training-overlay .training-flow {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness);
}

.training-overlay .training-flow--done {
    justify-content: center;
    align-items: stretch;
    padding: 0 var(--grout-thickness) var(--grout-thickness);
}

.training-done-card {
    text-align: center;
    padding: 32px 24px 28px;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.training-done-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(204, 255, 0, 0.15);
    color: var(--accent-neon);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lucide-icon--training-done {
    width: 32px;
    height: 32px;
}

.training-done-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.4px;
    margin-bottom: 12px;
    color: var(--text-light);
}

.training-done-text {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.training-done-btn {
    width: 100%;
    max-width: 280px;
    padding: 16px 24px;
    border-radius: var(--radius-pill);
    border: none;
    background: var(--accent-neon);
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.training-done-btn:active {
    opacity: 0.9;
}

.training-overlay .training-flow--active > .session-header {
    flex-shrink: 0;
}

.training-overlay .session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.training-overlay .exit-btn {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.training-overlay .exit-btn:focus-visible {
    outline: 2px solid var(--accent-neon);
    outline-offset: 2px;
    border-radius: 4px;
}

.training-overlay .timer-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--accent-neon);
}

.training-overlay .timer-badge.timer-badge--at-limit {
    color: var(--accent-danger);
    box-shadow: 0 0 0 1px rgba(255, 94, 94, 0.45);
}

.training-overlay .training-header-avatar {
    width: 28px;
    height: 28px;
    background-color: var(--accent-neon);
    color: var(--text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.training-overlay .lucide-icon--training-header {
    width: 14px;
    height: 14px;
}

/* ─── Чат-область: прокручивается, занимает всё свободное место ─── */
.training-overlay .ai-chat-area {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    padding: 20px 16px 8px;
    position: relative;
}

/* Fade-градиент сверху — оверлей снаружи скролл-зоны, чтобы не «висел в воздухе» */
.training-overlay .ai-chat-area::before {
    content: none;
}

.training-overlay .ai-message-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.training-overlay .ai-message-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.training-overlay .ai-orb {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    flex-shrink: 0;
    background: radial-gradient(circle, var(--accent-neon) 0%, rgba(204, 255, 0, 0.25) 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 18px rgba(204, 255, 0, 0.22);
    animation: training-pulse 2.4s infinite ease-in-out;
    color: var(--text-dark);
}

.training-overlay .lucide-icon--training-orb {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.training-overlay .ai-message-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-neon);
    letter-spacing: 0.2px;
}

@keyframes training-pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.04); opacity: 1; }
}

.training-overlay .question-text {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: -0.3px;
    color: var(--text-light);
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

/* ─── Waveform: виден только во время записи ─── */
.training-overlay .session-waveform {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 36px;
    flex-shrink: 0;
}

.training-overlay .training-flow--active.is-recording .session-waveform {
    display: flex;
}

.training-overlay .wave-bar {
    width: 4px;
    height: 8px;
    background: #E53935;
    border-radius: 2px;
    animation: training-wave 1.1s infinite ease-in-out;
}

@keyframes training-wave {
    0%, 100% { height: 6px; }
    50% { height: 28px; }
}

/* ─── Зона взаимодействия (нижняя, не скроллится) ─── */
.training-overlay .interaction-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    padding: 0 0 8px;
}

/* Прогресс-бар интервью */
.training-overlay .interview-progress {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 4px;
}

.training-overlay .interview-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
    overflow: hidden;
}

.training-overlay .interview-progress-fill {
    height: 100%;
    background: var(--accent-neon);
    border-radius: 2px;
    transition: width 0.6s ease;
    width: 5%;
}

.training-overlay .interview-progress-label {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.3px;
}

.training-overlay .mic-btn-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    width: 100%;
}

.training-overlay .mic-btn {
    width: 80px;
    height: 80px;
    background-color: var(--accent-neon);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    border: none;
    cursor: pointer;
    transition:
        background-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.2s ease;
}

.training-overlay .mic-btn.is-recording {
    background-color: #E53935;
    animation: mic-recording-glow 1.2s ease-in-out infinite;
}

@keyframes mic-recording-glow {
    0%, 100% {
        box-shadow:
            0 8px 24px rgba(0,0,0,0.4),
            0 0 0 0 rgba(229, 57, 53, 0.55);
    }
    50% {
        box-shadow:
            0 8px 28px rgba(229, 57, 53, 0.45),
            0 0 0 14px rgba(229, 57, 53, 0);
    }
}

.training-overlay .mic-btn:focus-visible {
    outline: 2px solid var(--text-light);
    outline-offset: 3px;
}

.training-overlay .mic-btn .lucide-icon--mic-btn {
    width: 32px;
    height: 32px;
    color: var(--text-dark);
}

.training-overlay .mic-btn.is-recording .lucide-icon--mic-btn {
    color: #fff;
}

/* Состояние обработки: спиннер, кнопка блекнет */
.training-overlay .mic-btn.is-sending {
    background-color: rgba(204, 255, 0, 0.45);
    animation: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    cursor: wait;
}

.training-overlay .mic-btn.is-sending .lucide-icon--mic-btn {
    color: var(--text-dark);
    animation: mic-spin 0.9s linear infinite;
}

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

/* Подсказка под кнопкой */
.training-overlay .mic-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.2px;
    min-height: 16px;
    transition: opacity 0.2s;
}

.training-overlay .step-name.active {
    color: var(--accent-neon);
}

.training-overlay .step-name.done {
    color: rgba(204, 255, 0, 0.55);
}

/* Адаптация для маленьких экранов (телефоны ≤ 640px высотой) */
@media (max-height: 640px) {
    .training-overlay .ai-chat-area {
        padding: 12px 16px 6px;
    }
    .training-overlay .question-text {
        font-size: 18px;
        line-height: 1.4;
    }
    .training-overlay .ai-orb {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }
    .training-overlay .mic-btn {
        width: 68px;
        height: 68px;
    }
    .training-overlay .session-header {
        padding: 12px 20px;
    }
    .training-overlay .interaction-area {
        gap: 6px;
        padding-bottom: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .training-overlay .ai-orb {
        animation: none;
    }
    .training-overlay .wave-bar {
        animation: none;
    }
    .training-overlay .mic-btn.is-recording {
        animation: none;
    }
}

/* —— Профили вакансий: список + экран редактирования —— */
#tab-hr.tab-panel {
    overflow: visible;
}

.hr-screen--list,
.hr-screen--edit {
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness);
    overflow: visible;
    min-height: 0;
}

.hr-screen--edit[hidden],
.hr-screen--list[hidden] {
    display: none !important;
}

/* Жёстко убираем «хвост» экрана списка над редактором (пустая серая полоса) */
#hr-screen-list[hidden] {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    visibility: hidden;
    pointer-events: none;
    border: none;
}

body.hr-editor-active #tab-hr.tab-panel {
    gap: 0;
}

.vacancies-list-panel.panel {
    padding: 12px 0 16px;
    margin-bottom: var(--grout-thickness, 6px);
    overflow: visible;
}

.vacancies-empty {
    padding: 8px 0 4px;
}

.vacancies-empty-text {
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-align: center;
}

.vacancies-add-cta {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border: none;
    border-radius: var(--radius-main);
    cursor: pointer;
    font: inherit;
    text-align: left;
    background: var(--accent-neon);
    color: var(--text-dark);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.vacancies-add-cta:active {
    transform: scale(0.99);
}

.vacancies-add-cta-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vacancies-add-cta-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2.25;
}

.vacancies-add-cta-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.vacancies-add-cta-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.vacancies-add-cta-sub {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.82;
    line-height: 1.35;
}

.hr-vacancies-list-block[hidden] {
    display: none !important;
}

.hr-vacancies-list-block {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 0 12px;
    overflow: visible;
}

.vacancy-list-top-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 var(--grout-thickness);
    padding: 14px 18px;
    border: none;
    border-radius: var(--radius-main);
    background: var(--panel-elevated);
    color: var(--accent-neon);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.3px;
    cursor: pointer;
    transition: opacity 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.vacancy-list-top-add:focus,
.vacancy-list-top-add:focus-visible {
    outline: none;
}

.vacancy-list-top-add:active {
    opacity: 0.8;
}

.vacancy-list-top-add-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
    flex-shrink: 0;
}

/* Липкая шапка: top = safe area, иначе при скролле прилипает к верху вьюпорта и заезжает под вырез.
   Safe area сверху также в padding body — здесь только «шов» между зоной контента и карточкой. */
.vacancy-edit-sticky-cluster {
    position: -webkit-sticky;
    position: sticky;
    top: var(--app-safe-inset-top);
    z-index: 70;
    margin: 0 0 10px;
    padding-top: var(--grout-thickness);
    box-sizing: border-box;
}

.vacancy-edit-sticky-cluster::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    /* Короче, чем раньше с «жёстким» вариантом — вырез закрывает body.hr-editor-active::before */
    height: calc(var(--grout-thickness) + 56px + 28px);
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        var(--bg-black) 0%,
        rgba(13, 13, 13, 0.95) 42%,
        rgba(13, 13, 13, 0.35) 74%,
        rgba(13, 13, 13, 0) 100%
    );
}

.vacancy-edit-sticky-head {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    background: var(--panel-dark);
    border-radius: var(--radius-main);
}

.vacancy-edit-sticky-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    min-width: 44px;
    min-height: 44px;
    padding: 0 6px 0 2px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-light);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.25px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.vacancy-edit-sticky-back:focus,
.vacancy-edit-sticky-back:focus-visible {
    outline: none;
}

.vacancy-edit-sticky-back-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2.25;
    flex-shrink: 0;
    color: var(--accent-neon);
}

.vacancy-edit-sticky-title {
    justify-self: center;
    min-width: 0;
    max-width: 100%;
    padding: 0 4px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.35px;
    color: var(--text-light);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vacancy-edit-sticky-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    min-width: 44px;
    min-height: 44px;
    padding: 0 4px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--accent-neon);
    font: inherit;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.vacancy-edit-sticky-new:focus,
.vacancy-edit-sticky-new:focus-visible {
    outline: none;
}

.vacancy-edit-sticky-new:active {
    opacity: 0.75;
}

.vacancy-edit-sticky-new-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
    flex-shrink: 0;
}

.vacancy-list {
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness);
    padding: 0;
}

/* Карточка вакансии в списке — светлее основной панели (#333 как в аватаре) */
.vacancy-list-row.panel {
    padding: 0;
    margin: 0;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    background-color: var(--panel-elevated);
    border-radius: var(--radius-main);
    border: none;
    box-shadow: none;
}

.vacancy-list-row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 20px 20px 24px;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.vacancy-list-row-main:active {
    background: rgba(255, 255, 255, 0.04);
}

.vacancy-list-row-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vacancy-list-row-title {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.35px;
    line-height: 1.3;
}

.vacancy-list-row-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.vacancy-list-row-dot {
    font-size: 9px;
    color: var(--accent-neon);
    line-height: 1;
}

.vacancy-list-icon-plate {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    border-radius: 0;
}

.vacancy-list-icon-plate--chevron {
    width: auto;
    height: auto;
    padding: 8px 6px 8px 10px;
}

.vacancy-list-row-chevron {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    opacity: 0.85;
    flex-shrink: 0;
}

.vacancy-list-row-delete {
    flex-shrink: 0;
    align-self: stretch;
    width: 52px;
    min-height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.vacancy-list-row-delete:focus,
.vacancy-list-row-delete:focus-visible {
    outline: none;
}

.vacancy-list-row-delete:active {
    background: rgba(255, 255, 255, 0.07);
    color: var(--accent-danger);
}

.vacancy-list-row-delete-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.25;
}

.hr-saved--edit {
    margin: 0 0 2px;
    min-height: 1.25em;
    padding: 0 4px;
}

.vacancies-editor {
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness, 6px);
}

.toggles-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 4px 0;
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.toggle-title {
    font-size: 15px;
    font-weight: 500;
}

.toggle-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.35;
}

.toggle-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 8px 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    border-radius: 34px;
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: var(--text-muted);
    transition: 0.3s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: var(--accent-neon);
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
    background-color: var(--bg-black);
}

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

.btn-save-vacancy {
    width: 100%;
    padding: 18px;
    border-radius: var(--radius-pill, 99px);
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    background: var(--accent-neon);
    color: var(--text-dark);
}

.btn-save-vacancy:active {
    opacity: 0.9;
}

.hr-saved.hr-saved--error {
    color: var(--accent-danger, #ff5e5e);
}

/* —— Страница /interview/report (Telegram Mini App + те же отступы, что у приложения) —— */
body.report-page {
    padding-top: calc(var(--grout-thickness) + var(--app-safe-inset-top));
    padding-left: var(--app-safe-inset-left);
    padding-right: var(--app-safe-inset-right);
    padding-bottom: calc(var(--grout-thickness) + var(--app-safe-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness);
    min-height: 100vh;
    min-height: 100dvh;
}

body.report-page .report-page-header {
    width: 100%;
    flex-shrink: 0;
}

a.header-hr-back-btn {
    text-decoration: none;
    color: inherit;
}

.report-page-inner {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness);
    min-height: 0;
}

.report-page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
}

.report-page-header-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--text-light);
    text-align: right;
    min-width: 0;
    flex-shrink: 0;
}

.report-page #report-main:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness);
    width: 100%;
}

.report-loading {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.report-vacancy-strip {
    padding: 18px 22px;
}

.report-vacancy-strip-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 6px;
}

.report-vacancy-strip-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.35px;
    line-height: 1.35;
    color: var(--text-light);
}

.report-page .hero-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 24px;
}

.report-page .score-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 8px solid var(--text-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.report-page .score-number {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1;
}

.report-page .score-label {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.7;
    margin-top: 4px;
}

.report-page .hero-result .hero-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.report-page .hero-result .hero-subtitle {
    font-size: 15px;
    font-weight: 500;
    opacity: 0.8;
    max-width: 280px;
}

.report-page .report-duration {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: -0.2px;
    max-width: 320px;
}

.report-page .section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.report-section-title-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-neon);
}

.report-page .skills-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-page .skill-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-page .skill-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
}

.report-page .skill-score {
    color: var(--accent-neon);
    font-weight: 600;
}

.report-page .progress-bg {
    height: 8px;
    background-color: #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
}

.report-page .progress-fill {
    height: 100%;
    background-color: var(--accent-neon);
    border-radius: 4px;
}

.report-page .progress-fill.warning {
    background-color: var(--accent-danger);
}

.report-page .feedback-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.report-page .feedback-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background-color: rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: var(--radius-small);
    font-size: 14px;
    line-height: 1.5;
}

.report-page .feedback-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.report-page .feedback-icon svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.report-page .icon-good {
    background-color: rgba(204, 255, 0, 0.2);
    color: var(--accent-neon);
}

.report-page .icon-bad {
    background-color: rgba(255, 94, 94, 0.2);
    color: var(--accent-danger);
}

.report-page .ai-text-report {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.report-page .ai-text-report p {
    margin-bottom: 16px;
}

.report-page .ai-text-report p:last-child {
    margin-bottom: 0;
}

.report-actions {
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness);
}

.report-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    border-radius: var(--radius-pill);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

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

.report-btn-primary {
    background-color: var(--accent-neon);
    color: var(--text-dark);
}

.report-btn-secondary {
    background-color: var(--panel-dark);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.report-modal[hidden] {
    display: none !important;
}

/* Нижний шит, как у выбора вакансии перед тренировкой */
.report-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    pointer-events: none;
    visibility: hidden;
    box-sizing: border-box;
}

.report-modal.is-open {
    pointer-events: auto;
    visibility: visible;
}

.report-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.28s var(--nav-ease, ease);
}

.report-modal.is-open .report-modal-backdrop {
    opacity: 1;
}

.report-modal-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(88vh, 640px);
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--panel-dark);
    border-radius: var(--radius-main) var(--radius-main) 0 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.45);
    padding-bottom: calc(var(--app-safe-inset-bottom, 0px) + 12px);
    overflow: hidden;
    transform: translate3d(0, 105%, 0);
    transition: transform 0.32s var(--nav-ease-soft, cubic-bezier(0.32, 0.72, 0.28, 1));
}

.report-modal.is-open .report-modal-panel {
    transform: translate3d(0, 0, 0);
}

.report-modal-panel .training-sheet-body.report-transcript-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
    padding-bottom: 12px;
}

.report-modal-panel .report-transcript-turn {
    margin-bottom: 0;
    padding: 14px 16px;
    border-radius: var(--radius-main);
    background: var(--bg-black);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
}

.report-transcript-role {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-neon);
    margin-bottom: 6px;
}

.report-transcript-turn--user .report-transcript-role {
    color: var(--text-muted);
}

.report-transcript-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-light);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

body.report-modal-open {
    overflow: hidden;
}

/* Приглашение: только экран старта (скрываем шапку, вкладки, навигацию) */
body.hr-invite-only #app-header,
body.hr-invite-only #tab-panels,
body.hr-invite-only .bottom-nav-container {
    display: none !important;
}

.invite-only-gate {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    z-index: 10000;
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(24px + var(--tg-safe-area-inset-top, 0px)) 20px
        calc(24px + var(--tg-safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-root, #0a0a0c);
}

/* Иначе display:flex перебивает нативное скрытие по [hidden] — заглушка висит на весь экран всегда */
.invite-only-gate[hidden] {
    display: none !important;
}

.invite-only-inner {
    width: 100%;
    max-width: 400px;
    text-align: center;
    padding: 28px 22px;
}

.invite-only-title {
    margin: 0 0 12px;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
}

.invite-only-vacancy-label {
    margin: 0 0 20px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--text-muted, rgba(255, 255, 255, 0.65));
}

.invite-only-error {
    margin: 0 0 14px;
    font-size: 0.88rem;
    color: #ff6b6b;
}

/* —— Отчёт: паспорт кандидата —— */
.rep-passport-panel {
    border: 1px solid rgba(204, 255, 0, 0.15);
}

.rep-passport-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.rep-passport-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.rep-passport-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 90px;
}

.rep-passport-value {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

.rep-self-presentation {
    margin-top: 14px;
    padding: 12px 14px;
    border-left: 2px solid var(--accent-neon);
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 8px 8px 0;
}

/* —— Отчёт: несоответствия —— */
.rep-red-flags-panel {
    border: 1px solid rgba(255, 94, 94, 0.25);
}

/* —— Отчёт: плашка для кандидата —— */
.rep-candidate-note {
    border: 1px solid rgba(204, 255, 0, 0.15);
}

.invite-only-error[hidden] {
    display: none !important;
}

.invite-only-start {
    width: 100%;
    margin-top: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-main, 12px);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent-neon, #7cffb6), #4ade80);
    color: #0a0a0c;
}

.invite-only-start:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.hr-invite-block {
    margin-bottom: var(--grout-thickness, 6px);
}

.hr-invite-block[hidden] {
    display: none !important;
}

.hr-invite-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

@media (min-width: 480px) {
    .hr-invite-row {
        flex-direction: row;
        align-items: stretch;
    }

    .hr-invite-row .hr-input {
        flex: 1;
        min-width: 0;
    }

    .hr-invite-copy-btn {
        flex-shrink: 0;
        align-self: stretch;
    }
}

.hr-invite-revoke {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-main, 12px);
    background: transparent;
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
    font-size: 0.9rem;
    cursor: pointer;
}

.hr-invite-revoke:active {
    opacity: 0.85;
}

/* ——— Страница приглашения /guest ——— */
.guest-page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Нижняя навигация только на главном приложении; у гостя убираем запас 100px — не жмёт вёрстку под WebView. */
body.guest-page {
    padding-bottom: calc(var(--grout-thickness) + var(--app-safe-inset-bottom));
}

.guest-header .header-default,
.guest-header-inner {
    justify-content: center;
}

/* Как #tab-home: на всю ширину контента, только отступы body (safe area + grout). */
.guest-shell {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness);
    min-height: 0;
    padding-bottom: calc(var(--grout-thickness) + var(--app-safe-inset-bottom));
    box-sizing: border-box;
}

.guest-loading-panel,
.guest-error-panel {
    padding: 24px 20px;
    text-align: center;
}

.guest-error-panel {
    border: 1px solid rgba(239, 68, 68, 0.35);
}

#guest-content {
    display: flex;
    flex-direction: column;
    gap: var(--grout-thickness);
    width: 100%;
    min-height: 0;
}

.guest-loading-text,
.guest-error-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--text-muted, rgba(255, 255, 255, 0.72));
}

.guest-error-panel .guest-error-text {
    color: var(--text-main, rgba(255, 255, 255, 0.92));
}

#guest-hero {
    cursor: default;
}

.guest-shell .stats-grid .stat-card:last-child .lucide-icon--stat {
    color: var(--text-muted);
    opacity: 0.85;
}

/* ── Guest invite hero ── */
.guest-invite-hero {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.guest-invite-intro {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.85;
    margin: 0;
}

.guest-invite-conditions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.guest-invite-cond-item {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.guest-start-cta {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background-color: var(--text-dark);
    color: var(--accent-neon);
    border: none;
    border-radius: var(--radius-pill);
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    text-align: center;
    margin-top: 2px;
    -webkit-tap-highlight-color: transparent;
}

.guest-start-cta:active {
    opacity: 0.85;
}
