:root {
    /* Фирменная тема SportTourMaster.ru (по умолчанию) */
    --bg: #081625;
    --panel: #0f2440;
    --panel-2: #153458;
    --line: #28517f;
    --text: #eaf2ff;
    --muted: #9db2cc;
    --blue: #1e6bff;
    --accent: #1e6bff;
}

/* Тёмная тема — прежняя палитра. */
[data-theme="dark"] {
    --bg: #0e1319;
    --panel: #161d26;
    --panel-2: #1d2733;
    --line: #2b3846;
    --text: #e6edf3;
    --muted: #8b9bad;
    --blue: #4b8ff0;
    --accent: #4b8ff0;
}

[data-theme="light"] {
    --bg: #e2e7ee;
    --panel: #f6f8fb;
    --panel-2: #e8ecf2;
    --line: #c6cfda;
    --text: #17202a;
    --muted: #52606f;
    --blue: #235a9f;
    --accent: #235a9f;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 "Segoe UI", Roboto, system-ui, sans-serif;
}

.portal-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 32px 24px;
}

.portal-head { text-align: center; }

.portal-title {
    margin: 0;
    font-size: clamp(24px, 4.6vw, 44px);
    font-weight: 700;
    letter-spacing: .01em;
    text-transform: none;
}

.portal-sub {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.portal-hint {
    margin: 18px 0 0;
    font-size: 15px;
}

.portal-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 24px;
    width: 100%;
    max-width: 900px;
}

.sport-card {
    --accent: var(--blue);
    flex: 1 1 240px;
    max-width: 320px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px 22px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
    text-align: center;
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.sport-card:hover,
.sport-card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
    outline: none;
}

.sport-card.is-last { border-color: var(--accent); }

.sport-logo {
    width: clamp(90px, 18vw, 150px);
    height: auto;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .4));
}

.sport-name {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.sport-badge {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 2px 10px;
}

.sport-enter {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.portal-empty { color: var(--muted); }

.portal-section-title {
    margin: 10px 0 0;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

.portal-hint-tight { margin: 4px 0 0; font-size: 14px; }

.my-events {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.my-events-sport {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.my-events-sport-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
}

.my-events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.my-event-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    transition: border-color .12s ease, transform .12s ease;
}

.my-event-card:hover,
.my-event-card:focus-visible {
    border-color: var(--accent, var(--blue));
    transform: translateY(-1px);
    outline: none;
}

.my-event-name { font-weight: 600; font-size: 14px; line-height: 1.3; }

.my-event-meta { font-size: 12px; color: var(--muted); }

[data-theme="light"] .sport-card { --accent: var(--accent-light, var(--accent)) !important; }

[data-theme="light"] .sport-card:hover,
[data-theme="light"] .sport-card:focus-visible {
    box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
}

.portal-foot {
    color: var(--muted);
    font-size: 13px;
}

.portal-foot a { color: var(--blue); text-decoration: none; }
.portal-foot a:hover { text-decoration: underline; }

.cabinet-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 16px;
    width: 100%;
    max-width: 900px;
    padding: 12px 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.cabinet-who { color: var(--muted); font-size: 14px; }
.cabinet-who b { color: var(--text); font-weight: 600; }
.cabinet-role {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 2px 10px;
}
.cabinet-spacer { flex: 1 1 auto; }
.cabinet-link {
    color: var(--blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.cabinet-link:hover { text-decoration: underline; }

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 32px 24px;
}
.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 26px 24px;
}
.auth-card h2 { margin: 0 0 4px; font-size: 20px; }
.auth-card h2.auth-title { font-size: 18px; line-height: 1.3; }
.auth-sub { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.auth-field { display: block; margin-bottom: 12px; }
.auth-field span { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.auth-field input {
    width: 100%;
    padding: 9px 11px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
}
.auth-field input:focus { outline: none; border-color: var(--blue); }
.auth-btn {
    width: 100%;
    margin-top: 8px;
    padding: 10px 14px;
    background: var(--blue);
    border: 1px solid var(--blue);
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.auth-btn:hover { filter: brightness(1.08); }
.auth-error {
    color: #ffd9d6;
    background: #47212a;
    border: 1px solid #b4453f;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 12px;
}
.auth-note {
    color: #d8ecff;
    background: #17324a;
    border: 1px solid #3a6f9e;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 12px;
}
.auth-links { margin: 14px 0 0; text-align: center; font-size: 14px; }
.auth-links a { color: var(--blue); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-foot { color: var(--muted); font-size: 13px; }
.auth-foot a { color: var(--blue); text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

.admin-page {
    min-height: 100vh;
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.admin-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 18px; }
.admin-head h1 { margin: 0; font-size: 26px; }
.admin-head .admin-sub { color: var(--muted); font-size: 14px; }
.admin-head .admin-back { margin-left: auto; color: var(--blue); text-decoration: none; font-weight: 600; }
.admin-head .admin-back:hover { text-decoration: underline; }
.admin-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.admin-stat {
    flex: 1 1 160px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
}
.admin-stat b { display: block; font-size: 24px; }
.admin-stat span { color: var(--muted); font-size: 13px; }
.admin-note {
    color: #ffd9d6;
    background: #47212a;
    border: 1px solid #b4453f;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
}
.admin-note.ok {
    color: #cfeedd;
    background: #16341f;
    border-color: #2e7d4f;
}
.admin-delete-form { margin-left: auto; display: flex; }
.admin-user {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
}
.admin-user-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.admin-user-login { font-size: 17px; font-weight: 700; }
.admin-user-meta { color: var(--muted); font-size: 13px; }
.admin-user-count { margin-left: auto; color: var(--muted); font-size: 13px; }
.admin-collapse-btn {
    width: 27px;
    height: 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel-2);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}
.admin-collapse-btn:hover { border-color: var(--blue); color: var(--blue); }
.admin-user-body[hidden] { display: none; }
.admin-role {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-radius: 999px;
    padding: 2px 10px;
    border: 1px solid var(--line);
    color: var(--muted);
}
.admin-role.super { color: #f0c66b; border-color: #f0c66b; }
.admin-role.demo { color: #9fd0a0; border-color: #9fd0a0; }
.admin-role.pending { color: #f0c66b; border-color: #9a7a2e; background: rgba(240, 198, 107, .08); }
.admin-role.banned { color: #ff8f86; border-color: #b4453f; background: rgba(180, 69, 63, .12); }
.admin-approve-form { display: flex; }
.admin-ban-form { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.admin-ban {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}
.admin-ban input { cursor: pointer; accent-color: #b4453f; }
.admin-tournaments { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.admin-tournament {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    padding: 8px 12px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-left: 3px solid var(--sport-accent, var(--line));
    border-radius: 8px;
    font-size: 14px;
}
.admin-sport {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--sport-accent, var(--blue));
    border: 1px solid var(--sport-accent, var(--blue));
    border-radius: 999px;
    padding: 1px 8px;
}
.admin-tournament .admin-dates { color: var(--muted); font-size: 13px; }
.admin-tournament .admin-name { color: var(--text); text-decoration: none; font-weight: 600; }
.admin-tournament .admin-name:hover { color: var(--sport-accent, var(--blue)); text-decoration: underline; }
.admin-tournament .admin-id { margin-left: auto; color: var(--muted); font-size: 12px; }
.admin-tournament .admin-access { color: var(--blue); text-decoration: none; font-size: 13px; font-weight: 600; }
.admin-tournament .admin-access:hover { text-decoration: underline; }
.admin-access-kind {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 1px 8px;
    color: var(--muted);
    white-space: nowrap;
}
.admin-access-kind.owner { color: #f0c66b; border-color: #9a7a2e; }
.admin-access-kind.shared { color: #8fc7ff; border-color: #4b82b8; }
.admin-access-kind.pult { color: #8fc7ff; border-color: #4b82b8; }
.admin-access-kind.admission { color: #9fd0a0; border-color: #4a8a55; }
.admin-access-kind.weighing { color: #f0c66b; border-color: #9a7a2e; }
.admin-owner { color: var(--muted); font-size: 12px; }
.admin-empty { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.admin-orphans { color: var(--muted); font-size: 13px; }

/* Вкладки админ-панели */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-tab {
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    background: var(--panel);
}
.admin-tab:hover { color: var(--text); border-color: var(--blue); }
.admin-tab.active { color: #fff; background: var(--blue); border-color: var(--blue); }

/* Дубликаты участников */
.dup-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.dup-form {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    background: var(--panel-2);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dup-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.dup-badge {
    font-size: 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 1px 8px;
    color: var(--muted);
    white-space: nowrap;
}
.dup-badge.warn { color: #f0c66b; border-color: #9a7a2e; background: rgba(240, 198, 107, .08); }
.dup-table-wrap { overflow: auto; }
.dup-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dup-table th, .dup-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.dup-table th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.dup-table tr:last-child td { border-bottom: 0; }
.dup-table input[type="checkbox"] { accent-color: var(--blue); cursor: pointer; }
.dup-events { color: var(--muted); max-width: 340px; }
.dup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dup-actions button { width: auto; }
.dup-merged { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.dup-merged-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 9px 12px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
}
.dup-id {
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--blue);
    color: var(--blue);
    border-radius: 999px;
    padding: 1px 8px;
}
.dup-merged-name { font-weight: 600; }
.dup-merged-members { color: var(--muted); }
.dup-merged-row form { margin-left: auto; }
.dup-merged-row button { width: auto; }

@media (max-width: 560px) {
    .portal-grid { gap: 16px; }
    .sport-card { min-height: 200px; padding: 22px 16px; }
}

/* ------------------------------------------------- публичный просмотр */
.watch-list { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 720px; margin: 0 auto; }
.watch-event {
    display: flex; align-items: center; gap: 12px;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 10px; padding: 14px 16px;
    text-decoration: none; color: var(--text);
}
.watch-event:hover, .watch-event:focus-visible { border-color: var(--accent); }
.watch-event-name { flex: 1; font-weight: 600; }
.watch-event-meta { color: var(--muted); font-size: 13px; }
.watch-event-go { color: var(--accent); font-weight: 600; white-space: nowrap; }
.watch-empty { color: var(--muted); text-align: center; margin: 8px 0; }
.watch-back { text-align: center; margin-top: 16px; }
.watch-back a { color: var(--accent); text-decoration: none; }
.watch-back a:hover { text-decoration: underline; }

.auth-watch {
    display: block; width: 100%; box-sizing: border-box; text-align: center;
    margin-top: 10px; padding: 10px 14px;
    border: 1px solid var(--line); border-radius: 8px;
    color: var(--accent); text-decoration: none; font-weight: 600;
}
.auth-watch:hover { border-color: var(--accent); }

.auth-public {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 26px;
    border: 1px solid #d7dee6;
    border-radius: 12px;
    background: linear-gradient(110deg, #9aa6b2 0%, #eef3f7 18%, #c4ced8 32%, #ffffff 48%, #aab5c0 62%, #f2f6f9 78%, #9aa6b2 100%);
    background-size: 220% 100%;
    color: #1a2433;
    font-size: clamp(18px, 2.6vw, 24px);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .65);
    box-shadow: 0 6px 18px rgba(10, 18, 30, .35), inset 0 1px 0 rgba(255, 255, 255, .85);
    animation: auth-silver-shine 4.5s linear infinite;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

.auth-public:hover {
    border-color: #ffffff;
    box-shadow: 0 8px 24px rgba(10, 18, 30, .45), 0 0 0 3px rgba(200, 212, 224, .25), inset 0 1px 0 rgba(255, 255, 255, .9);
    transform: translateY(-1px);
}

@keyframes auth-silver-shine {
    0% { background-position: 0% 50%; }
    100% { background-position: 220% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-public { animation: none; }
}

/* ------------------------------------------------ уведомления супер-админа */
.notif-panel[hidden],
.notif-bell[hidden] { display: none !important; }
.notif-panel {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    width: min(380px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.notif-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}
.notif-head strong { display: block; font-size: 16px; }
.notif-head small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.notif-close {
    margin-left: auto;
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.notif-close:hover { color: var(--text); border-color: var(--accent); }
.notif-body { overflow: auto; padding: 2px 0 10px; }
.notif-section { padding: 10px 16px 6px; border-top: 1px solid var(--line); }
.notif-section:first-child { border-top: none; }
.notif-section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.notif-section-head h3 {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.notif-count {
    margin-left: auto;
    min-width: 22px;
    padding: 1px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}
.notif-collapse {
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 11px;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: underline;
}
.notif-collapse:hover { color: var(--text); }
.notif-history-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    font-size: 11px;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: underline;
}
.notif-history-btn:hover { color: var(--text); }
.notif-section.collapsed .notif-list { display: none; }
.notif-list { display: flex; flex-direction: column; gap: 4px; }
.notif-row { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; min-width: 0; }
.notif-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--muted);
}
.notif-dot.online { background: #45b96b; box-shadow: 0 0 0 3px rgba(69, 185, 107, .16); }
.notif-dot.pending { background: #e0ae45; box-shadow: 0 0 0 3px rgba(224, 174, 69, .14); }
.notif-main { flex: 1 1 auto; min-width: 0; }
.notif-login { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.notif-role {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}
.notif-meta { color: var(--muted); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.notif-exact { color: var(--muted); font-size: 11px; white-space: nowrap; margin-left: auto; padding-top: 2px; }
.notif-link { color: var(--accent); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.notif-link:hover { text-decoration: underline; }
.notif-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 3px; }
.notif-item-close, .notif-item-forever {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 11px;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: underline;
}
.notif-item-close { color: var(--muted); }
.notif-item-close:hover { color: var(--text); }
.notif-item-forever { color: var(--accent); }
.notif-item-forever:hover { color: var(--text); }
.notif-item-close:disabled, .notif-item-forever:disabled { opacity: .5; cursor: default; }
.notif-event-name {
    display: block;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.notif-event-name:hover { color: var(--accent); }
.notif-empty { margin: 4px 0; color: var(--muted); font-size: 12px; }
.notif-bell {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 901;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.notif-bell:hover { border-color: var(--accent); color: var(--accent); }
.notif-toasts {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}
.notif-toast {
    padding: 11px 14px;
    border: 1px solid #3a6f9e;
    border-radius: 10px;
    background: #17324a;
    color: #e8f4ff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
    font-size: 13px;
    line-height: 1.35;
    animation: notif-in .2s ease-out;
}
.notif-toast.out { opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .3s; }
@keyframes notif-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.notif-history {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 5vh 16px;
    overflow: auto;
    background: rgba(5, 10, 18, .62);
}
.notif-history[hidden] { display: none; }
.notif-history-card {
    display: flex;
    flex-direction: column;
    width: min(680px, 100%);
    max-height: calc(100vh - 10vh);
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
}
.notif-history-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}
.notif-history-head strong { font-size: 16px; }
.notif-history-head .notif-close { margin-left: auto; }
.notif-history-body { overflow: auto; padding: 8px 18px 14px; }
.notif-history-row { border-top: 1px solid var(--line); padding: 10px 0; }
.notif-history-row:first-child { border-top: 0; }
.notif-history-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid var(--line);
}
.notif-history-clear, .notif-history-close {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-2);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.notif-history-clear { color: #ffb4ae; border-color: #7a3a3a; }
.notif-history-clear:hover { border-color: #b4453f; color: #ffd9d6; }
.notif-history-close:hover { border-color: var(--accent); color: var(--accent); }
.notif-history-clear:disabled { opacity: .55; cursor: default; }
@media (max-width: 560px) {
    .notif-panel { top: 8px; right: 8px; width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
    .notif-bell { top: 8px; right: 8px; }
    .notif-toasts { top: 8px; right: 8px; width: calc(100vw - 16px); }
}


/* Новый знак SportTourMaster.ru */
.portal-emblem {
    display: block;
    width: clamp(64px, 9vw, 96px);
    height: auto;
    margin: 0 auto 14px;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35));
}
.auth-page .portal-emblem { width: clamp(56px, 12vw, 80px); }
