.office-link { flex-basis: 100%; min-width: 0; width: 100%; }
.office-link label { display: block; }
.office-link select { display: block; box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; margin: 8px 0; padding: 10px; color: inherit; background: #102333; border: 1px solid #294b61; border-radius: 8px; }
:root {
    --bg-1: #08111f;
    --bg-2: #11233d;
    --panel: rgba(8, 17, 31, 0.72);
    --panel-2: rgba(17, 35, 61, 0.88);
    --card: rgba(255,255,255,0.06);
    --line: rgba(255,255,255,0.10);
    --text: #ffffff;
    --muted: #c9d4e3;
    --accent: #1192e8;
    --accent-hover: #0f7ac3;
    --accent-2: #1f6feb;
    --shadow: 0 10px 28px rgba(0,0,0,0.28);
    --gold: #ffd34d;

    --queue-bg: #0b1220;
    --queue-panel: #121c2f;
    --queue-panel-2: #18253d;
    --queue-border: #294061;
    --queue-text: #edf3ff;
    --queue-muted: #a8b7d1;
    --queue-accent: #5cc8ff;
    --queue-accent-2: #8b5cf6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        linear-gradient(rgba(5, 12, 22, 0.72), rgba(5, 12, 22, 0.86)),
        linear-gradient(135deg, var(--bg-1), var(--bg-2));
}

/* Centralny portal JudoLive: wejscie, logowanie i lista turniejow. */
[hidden] {
    display: none !important;
}

.portal-shell {
    min-height: 100dvh;
    padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    background:
        radial-gradient(circle at 12% 5%, rgba(17, 146, 232, 0.22), transparent 32rem),
        radial-gradient(circle at 88% 20%, rgba(139, 92, 246, 0.16), transparent 28rem),
        linear-gradient(145deg, #07101d, #10233e 58%, #08111f);
}

.portal-topbar {
    width: min(1120px, 100%);
    margin: 0 auto;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.portal-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #fff;
    text-decoration: none;
}

.portal-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #20a8f5, #1559c7);
    box-shadow: 0 12px 28px rgba(17, 146, 232, 0.30);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.portal-brand strong,
.portal-brand small {
    display: block;
}

.portal-brand strong {
    font-size: 18px;
    line-height: 1.1;
}

.portal-brand small {
    margin-top: 3px;
    color: #9fb5d0;
    font-size: 11px;
    font-weight: 600;
}

.portal-account {
    position: relative;
    z-index: 40;
    min-width: 0;
}

.portal-user-menu-toggle {
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 9px 5px 6px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    background: rgba(4, 13, 25, 0.58);
    color: #e7f2ff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
}

.portal-user-menu-toggle:hover,
.portal-user-menu-toggle:focus-visible,
.portal-account.is-open .portal-user-menu-toggle {
    border-color: rgba(96, 199, 255, 0.45);
    background: rgba(13, 35, 60, 0.96);
}

.portal-user-menu-toggle:focus-visible {
    outline: 2px solid #7fc7ff;
    outline-offset: 2px;
}

.portal-account-avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #1192e8, #1f6feb);
    color: #fff;
    font-size: 11px;
    letter-spacing: 0.03em;
}

.portal-account-label {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-user-menu-chevron {
    color: #9db1c8;
    font-size: 18px;
    line-height: 1;
    transition: transform 150ms ease;
}

.portal-account.is-open .portal-user-menu-chevron {
    transform: rotate(180deg);
}

.portal-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(230px, calc(100vw - 36px));
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 15px;
    background: #0b1a2d;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
}

.portal-user-menu-item {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #eaf4ff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
}

.portal-user-menu-item:hover,
.portal-user-menu-item:focus-visible {
    outline: none;
    background: rgba(96, 199, 255, 0.12);
}

.portal-user-menu-exit {
    color: #ffb1b1;
}

.portal-main {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: clamp(34px, 7vh, 80px) 0 48px;
}

.portal-card {
    width: min(620px, 100%);
    margin: 0 auto;
    padding: clamp(24px, 5vw, 46px);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 28px;
    background: linear-gradient(160deg, rgba(18, 37, 63, 0.94), rgba(7, 17, 31, 0.92));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(16px);
}

.portal-loading-card {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #c8d6e7;
}

.portal-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: #43b9ff;
    border-radius: 50%;
    animation: portal-spin 0.9s linear infinite;
}

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

.portal-eyebrow {
    color: #60c7ff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.portal-card h1,
.portal-list-heading h1 {
    margin: 8px 0 0;
    color: #fff;
    font-size: clamp(28px, 6vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.portal-lead {
    margin: 14px 0 0;
    color: #bdcce0;
    font-size: 15px;
    line-height: 1.55;
}

.portal-entry-actions {
    display: grid;
    gap: 12px;
    margin-top: 30px;
}

.portal-action {
    width: 100%;
    min-height: 74px;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    color: #f6faff;
    text-align: left;
    cursor: pointer;
    transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.portal-action:hover,
.portal-action:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(96, 199, 255, 0.42);
    background: rgba(96, 199, 255, 0.10);
}

.portal-action-primary {
    border-color: rgba(96, 199, 255, 0.34);
    background: linear-gradient(135deg, rgba(17, 146, 232, 0.34), rgba(31, 111, 235, 0.24));
}

.portal-action-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.09);
    color: #92d9ff;
    font-size: 22px;
}

.portal-action strong,
.portal-action small {
    display: block;
}

.portal-action strong {
    font-size: 16px;
}

.portal-action small {
    margin-top: 4px;
    color: #acbed3;
    font-size: 12px;
}

.portal-form {
    margin-top: 24px;
}

.portal-compact-form {
    width: min(100%, 430px);
    margin: 24px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(151, 175, 203, 0.18);
    text-align: left;
}

.portal-form label:not(.portal-consent) {
    display: block;
    margin-top: 15px;
}

.portal-form label > span {
    display: block;
    margin-bottom: 7px;
    color: #dce8f5;
    font-size: 13px;
    font-weight: 700;
}

.portal-form input[type="email"],
.portal-form input[type="password"],
.portal-form input[type="text"] {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    outline: none;
    background: rgba(4, 11, 21, 0.56);
    color: #fff;
    font: inherit;
}

.portal-form input:focus {
    border-color: #55c2ff;
    box-shadow: 0 0 0 3px rgba(85, 194, 255, 0.13);
}

.portal-form label small {
    display: block;
    margin-top: 6px;
    color: #8fa4bc;
    font-size: 11px;
    line-height: 1.4;
}

.portal-consent {
    margin-top: 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #bdcce0;
    font-size: 12px;
    line-height: 1.45;
}

.portal-consent input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    flex: 0 0 18px;
}

.portal-submit,
.portal-secondary-button,
.tournament-list-button {
    appearance: none;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.portal-submit {
    width: 100%;
    min-height: 50px;
    margin-top: 20px;
    padding: 12px 18px;
    color: #fff;
    background: linear-gradient(135deg, #1192e8, #1f6feb);
    box-shadow: 0 12px 25px rgba(17, 146, 232, 0.24);
}

.portal-submit:disabled {
    cursor: progress;
    opacity: 0.62;
}

.portal-link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.portal-text-button {
    appearance: none;
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: #91d7ff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.portal-text-button-centered {
    display: block;
    margin: 14px auto 0;
}

.portal-form-message,
.portal-list-message {
    min-height: 20px;
    margin-top: 14px;
    color: #ffb6b6;
    font-size: 13px;
    line-height: 1.45;
}

.portal-form-message[data-kind="success"],
.portal-list-message[data-kind="success"] {
    color: #8ff0c0;
}

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

.portal-verification-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: rgba(17, 146, 232, 0.16);
    color: #8dd8ff;
    font-size: 28px;
}

.portal-tournaments {
    width: 100%;
}

.portal-list-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    padding: 8px 0 20px;
}

.portal-secondary-button,
.tournament-list-button {
    min-height: 42px;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #eaf4ff;
}

.portal-tournament-groups {
    display: grid;
    gap: 28px;
}

.portal-tournament-group h2 {
    margin: 0 0 12px;
    color: #dcecff;
    font-size: 15px;
}

.portal-tournament-group--finished {
    overflow: hidden;
    border: 1px solid rgba(96, 199, 255, 0.24);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(22, 48, 79, 0.86), rgba(8, 21, 37, 0.92));
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.22);
}

.portal-tournament-group-summary {
    min-height: 96px;
    padding: 24px 26px;
    display: flex;
    align-items: center;
    gap: 14px;
    list-style: none;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.portal-tournament-group-summary::-webkit-details-marker {
    display: none;
}

.portal-tournament-group-summary::marker {
    content: '';
}

.portal-tournament-group-summary:hover {
    background: rgba(96, 199, 255, 0.07);
}

.portal-tournament-group-summary:focus-visible {
    outline: 2px solid #7fc7ff;
    outline-offset: -3px;
}

.portal-tournament-group-summary h2 {
    margin: 0;
    color: #fff;
    font-size: 21px;
}

.portal-tournament-group-count {
    margin-left: auto;
    padding: 7px 11px;
    border: 1px solid rgba(169, 222, 251, 0.22);
    border-radius: 999px;
    background: rgba(96, 199, 255, 0.10);
    color: #bfe7ff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.portal-tournament-group-chevron {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    color: #bfe7ff;
    font-size: 29px;
    line-height: 1;
    transform: rotate(90deg);
    transition: transform .18s ease, background .18s ease;
}

.portal-tournament-group--finished[open] .portal-tournament-group-chevron {
    transform: rotate(-90deg);
    background: rgba(96, 199, 255, 0.13);
}

.portal-tournament-group--finished:not([open]) > .portal-tournament-grid {
    display: none;
}

.portal-tournament-group--finished > .portal-tournament-grid {
    padding: 0 22px 22px;
}

.portal-tournament-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.portal-tournament-card {
    position: relative;
    display: block;
    min-width: 0;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 21px;
    background: linear-gradient(155deg, rgba(23, 43, 71, 0.88), rgba(8, 19, 34, 0.88));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.20);
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.portal-tournament-card::after {
    content: '›';
    position: absolute;
    top: 17px;
    right: 20px;
    color: rgba(169, 222, 251, 0.72);
    font-size: 28px;
    line-height: 1;
}

.portal-tournament-card:hover,
.portal-tournament-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(96, 199, 255, 0.42);
    background: linear-gradient(155deg, rgba(27, 54, 88, 0.92), rgba(9, 24, 43, 0.92));
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.26);
}

.portal-tournament-card:focus-visible {
    outline: 2px solid #7fc7ff;
    outline-offset: 3px;
}

.portal-tournament-card[data-status="live"] {
    border-color: rgba(54, 222, 146, 0.42);
    box-shadow: inset 0 0 0 1px rgba(54, 222, 146, 0.09), 0 18px 42px rgba(0, 0, 0, 0.20);
}

.portal-tournament-card[data-status="today"],
.portal-tournament-card[data-status="tomorrow"] {
    border-color: rgba(255, 199, 88, 0.55);
}

.portal-tournament-card[data-status="today"] .portal-tournament-status,
.portal-tournament-card[data-status="tomorrow"] .portal-tournament-status {
    background: rgba(255, 199, 88, 0.14);
    color: #ffda83;
}

.portal-tournament-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(96, 199, 255, 0.12);
    color: #a9defb;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-tournament-card[data-status="live"] .portal-tournament-status {
    background: rgba(54, 222, 146, 0.13);
    color: #8ff0c0;
}

.portal-tournament-title {
    margin: 14px 0 0;
    color: #fff;
    font-size: 20px;
    line-height: 1.25;
}

.portal-tournament-meta {
    margin-top: 10px;
    display: grid;
    gap: 5px;
    color: #afc0d5;
    font-size: 13px;
}

.portal-tournament-open {
    min-height: 42px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.portal-tournament-open {
    flex: 1 1 150px;
    border: 0;
    background: linear-gradient(135deg, #1192e8, #1f6feb);
    color: #fff;
    cursor: pointer;
}

.portal-empty {
    padding: 28px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    color: #afc0d5;
    text-align: center;
}

.tournament-shell-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.tournament-list-button {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 12px;
}

.decoration-mode-switch {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-left: auto;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(3, 13, 24, 0.68);
}

.decoration-mode-button {
    min-height: 34px;
    padding: 7px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.decoration-mode-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.decoration-mode-button.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(34, 136, 227, 0.96), rgba(20, 95, 194, 0.96));
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.decoration-mode-button:focus-visible {
    outline: 2px solid #7fc7ff;
    outline-offset: 2px;
}

@media (max-width: 720px) {
    .portal-shell {
        padding-left: 12px;
        padding-right: 12px;
    }

    .decoration-mode-switch {
        flex: 1 0 100%;
        width: 100%;
        margin-left: 0;
    }

    .portal-main {
        padding-top: 28px;
    }

    .portal-card {
        padding: 23px 18px;
        border-radius: 22px;
    }

    .portal-card h1,
    .portal-list-heading h1 {
        font-size: 31px;
    }

    .portal-list-heading {
        align-items: flex-start;
    }

    .portal-tournament-grid {
        grid-template-columns: 1fr;
    }

    .portal-tournament-card {
        padding: 17px;
    }

    .portal-tournament-group-summary {
        min-height: 84px;
        padding: 20px 18px;
        gap: 10px;
    }

    .portal-tournament-group-summary h2 {
        font-size: 19px;
    }

    .portal-tournament-group-count {
        padding: 6px 9px;
        font-size: 11px;
    }

    .portal-tournament-group-chevron {
        width: 32px;
        height: 32px;
        font-size: 25px;
    }

    .portal-tournament-group--finished > .portal-tournament-grid {
        padding: 0 14px 14px;
    }
}

@media (max-width: 390px) {
    .portal-brand small {
        display: none;
    }

    .portal-main {
        padding-top: 20px;
    }

    .portal-action {
        min-height: 68px;
        padding: 11px 12px;
    }

    .portal-action-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .portal-list-heading {
        gap: 12px;
    }

    .portal-secondary-button {
        padding: 8px 11px;
        font-size: 12px;
    }
}

/* Mobilne akcje PWA na ekranie startowym portalu. */
.portal-topbar-end {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.portal-start-actions {
    display: none;
    align-items: center;
    gap: 8px;
}

.portal-start-action {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.16);
    color: #dcecff;
    box-shadow: none;
    flex: 0 0 42px;
}

.portal-start-action.install-btn:hover,
.portal-start-action.notify-btn:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(127, 199, 255, 0.42);
}

.portal-start-action-icon {
    width: 21px;
    height: 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.portal-start-action-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.portal-start-action:focus-visible {
    outline: 2px solid #7fc7ff;
    outline-offset: 2px;
}

.portal-pwa-state {
    margin: 16px 0 -10px;
}

@media (max-width: 720px) {
    body[data-portal-view="welcome"] .portal-start-actions {
        display: flex;
    }

    .portal-start-action.install-btn,
    .portal-start-action.notify-btn {
        width: 42px;
        max-width: 42px;
        min-height: 42px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.055);
        border-color: rgba(255, 255, 255, 0.16);
        color: #dcecff;
        box-shadow: none;
        font-size: 19px;
    }

    .portal-start-action.install-btn.is-active,
    .portal-start-action.notify-btn.is-active {
        border-color: rgba(36, 179, 126, 0.5);
        background: rgba(36, 179, 126, 0.18);
        color: #aaf0d3;
        box-shadow: none;
    }
}

@media (max-width: 390px) {
    .portal-topbar {
        gap: 10px;
    }

    .portal-brand {
        gap: 8px;
    }

    .portal-brand-mark {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .portal-start-actions {
        gap: 6px;
    }

    .portal-start-action,
    .portal-start-action.install-btn,
    .portal-start-action.notify-btn {
        width: 40px;
        max-width: 40px;
        height: 40px;
        min-height: 40px;
        flex-basis: 40px;
    }
}

body { min-height: 100vh; }

.wrapper {
    width: min(1200px, calc(100% - 24px));
    margin: 0 auto;
    padding: 10px 0 90px;
}

.header {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 12px 16px 12px;
    text-align: center;
    backdrop-filter: blur(8px);
}

.header-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.header-top {
    display: none;
}

.header-copy {
    width: 100%;
}

.header-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.creator-logo {
    display: none !important;
    width: min(170px, 44vw);
    height: auto;
    margin: 0 auto;
}

.title {
    font-size: clamp(24px, 4.2vw, 46px);
    font-weight: 800;
    line-height: 1.08;
    margin: 2px 0 4px;
    letter-spacing: -0.02em;
    text-align: center;
}

.title-meta {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.title-meta-sep { opacity: 0.5; }

.install-btn {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.18);
    padding: 0;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(17, 146, 232, 0.22), rgba(31, 111, 235, 0.30));
    color: #f4fbff;
    cursor: pointer;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease, background .15s ease, opacity .15s ease;
}

.install-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(17, 146, 232, 0.32), rgba(31, 111, 235, 0.40));
}

.install-btn:disabled {
    cursor: default;
    opacity: 0.75;
    transform: none;
}

.install-btn.is-active {
    box-shadow: 0 0 0 1px rgba(146, 214, 255, 0.32), 0 0 14px rgba(17, 146, 232, 0.25);
}

.install-state {
    max-width: 720px;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    text-align: left;
    font-size: 13px;
    color: var(--muted);
}

.install-state[data-kind="info"] {
    color: #d7ecff;
    border-color: rgba(17, 146, 232, 0.28);
    background: rgba(17, 146, 232, 0.10);
}

.install-state[data-kind="success"] {
    color: #dcfff0;
    border-color: rgba(24,195,126,0.34);
    background: rgba(24,195,126,0.12);
}

.install-state[data-kind="warning"] {
    color: #ffe7b2;
    border-color: rgba(255, 184, 76, 0.34);
    background: rgba(255, 184, 76, 0.12);
}

.status {
    display: inline-block;
    margin-top: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(17, 146, 232, 0.14);
    border: 1px solid rgba(17, 146, 232, 0.35);
    color: #d7ecff;
    font-size: 13px;
    font-weight: 600;
}

.install-tip {
    margin-top: 4px;
    font-size: 13px;
    color: #d7ecff;
    opacity: 0.9;
    display: none;
}

.office-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.office-heading h2 { margin:0 0 8px; }
.office-heading p, .office-source { color:var(--muted, #b9c5d5); line-height:1.5; }
.office-tabs { display:flex; flex-wrap:wrap; gap:10px; margin:18px 0; }
.office-button { padding:10px 14px; min-height:44px; border:1px solid #61748c; border-radius:10px; background:#1b304a; color:#f5f8ff; cursor:pointer; font:inherit; }
.office-button:hover { background:#254766; }
.office-button.active, .office-confirm { background:#145c83; border-color:#37a8e3; }
.office-report { background:#643126; border-color:#c88c6c; }
.office-button:disabled { opacity:.55; cursor:wait; }
.office-button:focus-visible, #office-search:focus-visible { outline:3px solid #65c5ff; outline-offset:3px; }
.office-search-label { display:block; margin:16px 0 8px; }
#office-search { display:block; width:100%; box-sizing:border-box; min-height:46px; padding:12px; border:1px solid #61748c; border-radius:10px; background:#101c2e; color:#fff; font:inherit; }
.office-row { display:flex; flex-wrap:wrap; align-items:center; gap:14px; padding:16px; margin:10px 0; border:1px solid #35465d; border-radius:12px; background:#101c2e; }
.office-person { display:grid; gap:5px; min-width:0; flex:1 1 260px; overflow-wrap:anywhere; }
.office-person small { color:#b9c5d5; }
.office-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.office-status { padding:8px 12px; border-radius:20px; font-size:.9em; }
.office-status.pending { color:#ffe2b4; background:#65451e; }
.office-status.removed { color:#d0f7dd; background:#204734; }
.office-group { border-bottom:1px solid #42516a; padding-bottom:8px; margin-top:24px; }
.office-history { flex-basis:100%; color:#b9c5d5; font-size:.9em; }
.office-history summary { cursor:pointer; padding:6px 0; }
.office-archive-heading { margin-top:36px; }
.office-error { color:#ffd0c7; padding:12px; background:#5f2929; margin-top:12px; border-radius:8px; }
.office-confirmation { padding:16px; margin:16px 0; border:2px solid #4dabdf; background:#17334b; border-radius:12px; }
.office-confirmation p { margin:0 0 12px; }
#biuro { padding-bottom:140px; }
@media(max-width:600px) {
    .office-heading { flex-direction:column; }
    .office-row { padding:12px; }
    .office-actions { width:100%; }
    .office-actions .office-button { flex:1 1 140px; }
    .office-tabs .office-button { flex:1 1 130px; }
}

.notify-bar {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.finished-tournament-mode .notify-bar {
    justify-content: flex-end;
}

.header-action-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 52px;
    height: 52px;
    padding: 4px 3px;
}

.header-action-btn.active {
    background: linear-gradient(180deg, rgba(92,200,255,.18), rgba(139,92,246,.14));
    border-color: rgba(92,200,255,.42);
    box-shadow: 0 0 0 1px rgba(92,200,255,.16), 0 10px 20px rgba(0,0,0,.14);
}

.header-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    line-height: 1;
}

.header-action-label {
    font-size: 9px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--muted);
    text-align: center;
    white-space: nowrap;
}

.announcements-title {
    margin: 0 0 18px;
}

.announcements-list {
    display: grid;
    gap: 12px;
}

.announcement-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(92, 200, 255, 0.24);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(17, 35, 61, 0.94), rgba(10, 24, 42, 0.96));
    color: #ffffff;
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.announcement-link:hover,
.announcement-link:focus-visible {
    border-color: rgba(92, 200, 255, 0.72);
    background: linear-gradient(135deg, rgba(22, 49, 82, 0.98), rgba(12, 31, 53, 0.98));
    transform: translateY(-1px);
    outline: none;
}

.announcement-link-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(17, 146, 232, 0.16);
    border: 1px solid rgba(92, 200, 255, 0.34);
    color: #8fd0ff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
}

.announcement-link-title {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 800;
}

.announcement-link-action {
    color: #8fd0ff;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

@media (max-width: 580px) {
    .announcement-link {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .announcement-link-action {
        grid-column: 2;
    }
}

.notify-btn {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    color: rgba(220, 255, 240, 0.82);
    cursor: pointer;
    font-weight: 700;
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notify-btn.is-active {
    background: rgba(24,195,126,0.18);
    border-color: rgba(24,195,126,0.45);
    color: #dcfff0;
    box-shadow: 0 0 0 1px rgba(24,195,126,0.18), 0 0 18px rgba(24,195,126,0.28);
}

.notify-btn.is-blocked {
    background: rgba(255, 107, 107, 0.12);
    border-color: rgba(255, 107, 107, 0.38);
    color: #ffd9d9;
}

.notify-state {
    display: none;
}

.search-shortcut-btn {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    color: #e7f2ff;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stats-shortcut-btn {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    color: #e7f2ff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stats-shortcut-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
}

.stats-shortcut-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.nav {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin: 16px 0 18px;
    width: 100%;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
}

.nav button {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.08);
    min-height: 46px;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    color: #eef6ff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0,0,0,0.16);
    transition: transform .15s ease, background .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-align: center;
    line-height: 1.2;
}

.nav button:hover {
    background: rgba(34, 136, 227, 0.22);
    transform: translateY(-1px);
}

.nav button.active {
    background: linear-gradient(135deg, rgba(34, 136, 227, 0.92), rgba(20, 95, 194, 0.92));
    border-color: rgba(117, 191, 255, 0.32);
}

.nav .nav-bracket-icon {
    width: 14px;
    height: 14px;
    margin: 0;
    vertical-align: 0;
    flex: 0 0 auto;
}

.mobile-bottom-nav {
    display: none;
}

.mobile-nav-toggle {
    display: none;
}

.mobile-nav-toggle-bars {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.mobile-nav-toggle-bars span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.mobile-quick-actions {
    display: none;
}

.mobile-home-hub {
    display: none;
}

@media (min-width: 1100px) {
    .mobile-quick-actions,
    .mobile-home-hub,
    .mobile-bottom-nav {
        display: none !important;
    }

    #primary-nav {
        display: flex !important;
    }
}

.mobile-nav-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(226, 239, 255, 0.72);
}

.mobile-sticky-strip {
    position: sticky;
    top: 8px;
    z-index: 30;
    padding: 10px;
    margin: -4px -4px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(10, 19, 34, 0.96), rgba(10, 19, 34, 0.84));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 24px rgba(0,0,0,0.22);
    backdrop-filter: blur(10px);
}

.section { display: none; }
.section.active { display: block; }

.panel {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 16px;
    backdrop-filter: blur(8px);
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    margin: 10px 0;
    padding: 14px 16px;
    border-radius: 14px;
}

.card a {
    color: #9fd5ff;
    text-decoration: none;
    font-weight: 600;
}

.card a:hover { text-decoration: underline; }

.category-link-card {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    margin: 10px 0;
    padding: 14px 16px;
    border-radius: 14px;
    color: #9fd5ff;
    text-decoration: none;
    font-weight: 600;
    transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

button.category-link-card {
    width: 100%;
    appearance: none;
    cursor: pointer;
    color: inherit;
    text-align: left;
}

.category-link-card:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-1px);
}

.category-competitor-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-accordion-card {
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.category-competitor-card:hover {
    transform: none;
}

.category-competitor-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
}

.category-competitor-summary::-webkit-details-marker {
    display: none;
}

.category-competitor-title {
    font-weight: 800;
    color: #f3f8ff;
    font-size: 15px;
    line-height: 1.3;
}

.category-competitor-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #95adc9;
    transition: transform .18s ease;
}

.category-accordion-card[open] .category-competitor-chevron {
    transform: rotate(180deg);
}

.category-competitors-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px 14px;
}

.category-competitor-item {
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.category-competitor-item:first-child {
    padding-top: 0;
    border-top: 0;
}

.category-competitor-name {
    min-width: 0;
    flex: 1 1 auto;
    overflow-wrap: anywhere;
    font-weight: 700;
    color: #dff0ff;
    line-height: 1.3;
}

.category-competitor-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.listy-favorite-toggle {
    appearance: none;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 211, 77, 0.28);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.68);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.listy-favorite-toggle:hover,
.listy-favorite-toggle:focus-visible {
    border-color: rgba(255, 211, 77, 0.68);
    color: #ffffff;
    outline: none;
}

.listy-favorite-toggle.active {
    border-color: rgba(255, 211, 77, 0.58);
    background: rgba(255, 211, 77, 0.14);
    color: var(--gold);
}

.category-competitor-club {
    margin-top: 2px;
    font-size: 12px;
    color: #95adc9;
    line-height: 1.35;
}

.category-competitors-empty {
    font-size: 13px;
    color: #9db4cf;
}

.active-bracket-link {
    background: rgba(17,146,232,0.18);
    border-color: rgba(17,146,232,0.40);
    color: #d7ecff;
}

.finished-bracket-link {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.28);
}

.finished-bracket-link:hover {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(74, 222, 128, 0.36);
}

.category-link-card.active-bracket-link.finished-bracket-link {
    background:
        linear-gradient(135deg, rgba(34, 197, 94, 0.26), rgba(16, 185, 129, 0.18)),
        rgba(17,146,232,0.16);
    border-color: rgba(120, 229, 166, 0.68);
    box-shadow: inset 0 0 0 1px rgba(187, 247, 208, 0.22);
    color: #ecfdf5;
}
.board-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    touch-action: pan-x pan-y;
    cursor: grab;
}

.board-snap-anchor {
    position: absolute;
    top: 0;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.board-scroll-sync[data-pinch-zoom="1"] {
    touch-action: pan-x pan-y;
}

.board-scroll-sync {
    cursor: grab;
}

.board-scroll.dragging-scroll,
.board-scroll-sync.dragging-scroll {
    cursor: grabbing;
}

body.dragging-board-scroll {
    cursor: grabbing !important;
    user-select: none;
}

.board {
    position: relative;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 18px;
    min-height: 200px;
    overflow: hidden;
}

.board-scale-layer {
    will-change: transform;
    transition: transform 220ms ease;
}

.board-adaptive {
    transition: height 220ms ease, width 220ms ease, min-width 220ms ease;
}

.svg-lines {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
}

.bracket-line {
    stroke: #6f8fc8;
    stroke-width: 2;
    fill: none;
}

.column-title {
    position: absolute;
    top: 4px;
    width: 250px;
    color: #9fd5ff;
    font-weight: 800;
    font-size: 18px;
}

.card-wrap {
    position: absolute;
}

.match-card {
    width: 100%;
    height: 100%;
    background: #0f1728;
    border: 1px solid #22314f;
    border-radius: 12px;
    padding: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.match-number {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 6px;
    text-align: right;
}
.person {
    padding: 7px 8px;
    border-radius: 8px;
    background: #18233b;
    border: 1px solid #263757;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.2;
    min-height: 36px;
}

.person:last-of-type {
    margin-bottom: 0;
}

.match-card .bracket-person-content {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    width: 100%;
}

.match-card .bracket-person-label {
    min-width: 0;
    flex: 1;
    overflow-wrap: anywhere;
}

.match-card .bracket-person-club {
    display: block;
    margin-top: 3px;
    color: #b9cbe0;
    font-size: max(10px, 0.82em);
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-card .bracket-place-badge {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid currentColor;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    background: #152238;
}

.match-card .bracket-place-badge svg {
    width: 16px;
    height: 16px;
}

.match-card .bracket-place-gold { color: #f7c948; background: #42330b; }
.match-card .bracket-place-silver { color: #dbe4f0; background: #354155; }
.match-card .bracket-place-bronze { color: #e7a26b; background: #493022; }
.match-card .bracket-place-fifth { color: #d8e8fa; background: #29435f; }
.match-card .bracket-place-seventh { color: #d8e8fa; background: #29435f; }

.match-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 8px;
    align-items: stretch;
    flex: 1;
}

.match-card-fighters {
    min-width: 0;
}

.match-card-score-side {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: #dfeaff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: center;
    padding: 8px 6px;
    min-height: 78px;
}

.person.blue {
    background: rgba(64, 116, 255, 0.16);
}

.person.white {
    background: rgba(255, 255, 255, 0.08);
}

.person.winner {
    background: #16351f;
    border-color: #2d6a3c;
    font-weight: bold;
}

.person.bye {
    background: #3a2f17;
    color: #f6d28b;
}

.person.tbd {
    background: #2a2a2a;
    color: #b9b9b9;
}

.category-block {
    margin-bottom: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line);
    padding: 14px;
    border-radius: 16px;
    scroll-margin-top: 16px;
}

.category-title {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.category-title h3 {
    margin: 0;
    font-size: 19px;
    color: white;
}

.pdf-link {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(17,146,232,0.16);
    border: 1px solid rgba(17,146,232,0.35);
    color: #cceaff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.info-badge {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    color: #d7ecff;
    font-size: 14px;
    font-weight: 700;
    user-select: none;
    pointer-events: none;
    cursor: default;
}

span.pdf-link {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    color: #d7ecff;
    user-select: none;
    pointer-events: none;
    cursor: default;
}

a.pdf-link {
    pointer-events: auto;
    cursor: pointer;
}

button.pdf-link {
    appearance: none;
    cursor: pointer;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 14px;
}

.club-standings-wrap {
    border: 1px solid rgba(217, 226, 236, 0.18);
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.club-standings-title {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
}

.club-standings-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border-radius: 0;
    overflow: hidden;
}

.club-standings-table col.club-col-rank {
    width: 10%;
}

.club-standings-table col.club-col-name {
    width: 42%;
}

.club-standings-table col.club-col-metric {
    width: 9%;
}

.club-standings-table col.club-col-total {
    width: 12%;
}

.club-standings-table thead th {
    padding: 8px 6px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
}

.club-standings-table td {
    padding: 8px 6px;
    font-size: 12px;
    white-space: normal;
    line-height: 1.2;
}

.club-standings-table .club-col-rank {
    text-align: center;
    font-weight: 800;
}

.club-standings-table .club-col-name {
    text-align: left;
    font-weight: 700;
    word-break: break-word;
}

.club-standings-table .club-col-metric,
.club-standings-table .club-col-total {
    text-align: center;
    font-weight: 800;
    white-space: nowrap;
}

.stats-header-card {
    padding: 16px 18px;
    border: 1px solid rgba(217, 226, 236, 0.18);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.stats-header-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8fc6ff;
}

.stats-header-title {
    margin-top: 6px;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.stats-header-meta {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.stats-overview-card,
.stats-summary-card {
    padding: 14px 12px;
    border-radius: 14px;
    border: 1px solid rgba(217, 226, 236, 0.14);
    background: rgba(255,255,255,0.04);
}

.stats-overview-value {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.stats-overview-label {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #e9f3ff;
}

.stats-overview-hint {
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.35;
}

.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.stats-summary-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stats-summary-card span {
    font-size: 12px;
    color: var(--muted);
}

.stats-summary-card strong {
    font-size: 22px;
    line-height: 1;
    color: #fff;
}

.stats-table-wrap {
    margin-top: 12px;
    border: 1px solid rgba(217, 226, 236, 0.18);
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.stats-table th,
.stats-table td {
    padding: 9px 6px;
    font-size: 12px;
    text-align: center;
}

.stats-table th:first-child,
.stats-table td:first-child {
    text-align: left;
    font-weight: 800;
}

.desktop-only { display: block; }
.result-card-mobile { display: none; }

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    color: #111827;
    border-radius: 14px;
    overflow: hidden;
}

thead th {
    background: #eaf4ff;
    color: #0f2747;
    font-size: 14px;
    text-align: left;
}

td, th {
    border: 1px solid #d9e2ec;
    padding: 10px;
    white-space: nowrap;
}

tbody tr:nth-child(even) { background: #f8fbff; }

.empty {
    padding: 18px;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--line);
    color: var(--muted);
}

.group-block {
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    overflow: hidden;
    scroll-margin-top: 16px;
}

.group-header {
    width: 100%;
    border: 0;
    cursor: pointer;
    background: rgba(17,146,232,0.14);
    color: #fff;
    text-align: left;
    padding: 14px 16px;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.group-header:hover {
    background: rgba(17,146,232,0.22);
}

.group-count {
    font-size: 13px;
    font-weight: 700;
    color: #d7ecff;
    opacity: 0.95;
}

.group-content {
    display: none;
    padding: 12px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

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

.result-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.result-category-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.result-category-detail {
    display: block;
}

.result-category-link {
    margin: 0;
    padding: 10px 12px;
}

.result-category-link-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 0;
}

.result-category-link-label {
    font-size: 15px;
}

.result-category-link-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    color: #dfeaff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.result-category-link-meta {
    display: none;
}

.finished-result-category {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.24);
}

.result-row-card {
    font-size: 14px;
}

.result-row-card .place {
    font-size: 14px;
}

.result-row-card .name {
    font-size: 16px;
}

.result-row-card .club {
    font-size: 13px;
}

.favorite-result-highlight {
    background: rgba(255, 216, 77, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 216, 77, 0.42);
}

.age-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.age-tab {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #dfeaff;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.age-tab.active {
    background: rgba(17,146,232,0.22);
    border-color: rgba(17,146,232,0.40);
    color: #ffffff;
}

.bracket-age-panel {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    padding: 12px;
}

.bracket-age-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.bracket-age-title h3 {
    margin: 0;
    font-size: 20px;
    color: #ffffff;
}

.bracket-age-subtitle {
    color: var(--muted);
    font-size: 13px;
}

.bracket-weight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.group-block.open .group-content { display: block; }

.chevron {
    transition: transform .18s ease;
    flex-shrink: 0;
}

.group-block.open .chevron {
    transform: rotate(180deg);
}

.scroll-top-btn {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 999px;
    background: rgba(17,146,232,0.72);
    color: white;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.28);
    cursor: pointer;
    display: none;
    z-index: 999;
    font-size: 22px;
    font-weight: 800;
}

.scroll-top-btn.visible { display: block; }

.search-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 240px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: white;
    font-size: 16px;
    outline: none;
}

.search-input::placeholder { color: #c5d2e4; }

.btn {
    appearance: none;
    border: 0;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.btn:hover { background: var(--accent-hover); }

.search-result-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.favorite-actions-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

.favorite-action-link {
    min-width: 0;
    text-align: center;
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
}

.action-link-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.person-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.04));
}

.person-card-main {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.search-person-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.search-person-name {
    display: block;
    flex: 1 1 auto;
}

.search-person-head .queue-favorite-toggle {
    margin-top: -2px;
}

.person-card-name {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
}

.person-card-club {
    color: #e8f1ff;
    margin-bottom: 4px;
}

.person-card-meta {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 14px;
}

.person-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.person-card-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.person-meta-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.10);
    color: #dceaff;
    font-size: 13px;
    font-weight: 700;
}

.fav-btn {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: white;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
}

.fav-btn.active {
    background: rgba(255,211,77,0.18);
    border-color: rgba(255,211,77,0.45);
    color: #ffe58a;
}

.favorite-star {
    color: var(--gold);
    font-weight: 900;
    margin-right: 6px;
}

.favorite-chip-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

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

.favorites-empty-card {
    display: flex;
    justify-content: center;
    padding: 10px 0 4px;
}

.favorites-results-lead {
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--muted);
}

.decoration-header-card {
    margin-bottom: 14px;
}

.decoration-group-block {
    margin-bottom: 16px;
}

.decoration-group-title {
    align-items: center;
}

.decoration-category-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.decoration-card {
    background: rgba(255,255,255,0.04);
    width: 100%;
}

.decoration-finished {
    border-color: rgba(24,195,126,0.45);
    background: linear-gradient(180deg, rgba(24,195,126,0.16), rgba(255,255,255,0.04));
    box-shadow: inset 0 0 0 1px rgba(24,195,126,0.18);
}

.decoration-summary {
    align-items: center;
}

.decoration-summary-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.decoration-summary-copy {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.decoration-checkbox {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: #18c37e;
    cursor: pointer;
    flex: 0 0 auto;
}

.decoration-places-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.decoration-place-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.decoration-place-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.decoration-place-rank {
    min-width: 34px;
    font-size: 14px;
    font-weight: 800;
    color: #dcfff0;
}

.decoration-place-main {
    min-width: 0;
}

.decoration-place-name {
    font-weight: 700;
    color: #ffffff;
}

.decoration-place-club {
    margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
}

[hidden] {
    display: none !important;
}

.decoration-operator-mode #primary-nav,
.decoration-operator-mode #mobile-quick-actions,
.decoration-operator-mode #mobile-home-hub,
.decoration-operator-mode #notify-btn,
.decoration-operator-mode #search-shortcut-btn,
.decoration-operator-mode #stats-shortcut-btn,
.decoration-operator-mode #medals-shortcut-btn,
.decoration-operator-mode #announcements-shortcut-btn,
.decoration-operator-mode #notify-state,
.decoration-operator-mode .mobile-bottom-nav {
    display: none !important;
}

.decoration-work-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.decoration-work-title p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.decoration-queue-count {
    min-width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(24,195,126,0.18);
    border: 1px solid rgba(24,195,126,0.4);
    color: #dcfff0;
    font-size: 22px;
    font-weight: 900;
}

.decoration-work-section {
    margin-top: 18px;
}

.decoration-work-section h3 {
    margin: 0 0 10px;
    font-size: 17px;
}

.decoration-work-list,
.decoration-history-list {
    display: grid;
    gap: 12px;
}

.decoration-work-card,
.decoration-history-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,0.045);
    padding: 16px;
}

.decoration-work-card.decoration-pending {
    border-color: rgba(245,184,66,0.48);
    background: linear-gradient(180deg, rgba(245,184,66,0.12), rgba(255,255,255,0.035));
}

.decoration-work-card.decoration-changed {
    border-color: rgba(255,89,100,0.72);
    background: linear-gradient(180deg, rgba(198,42,58,0.24), rgba(255,255,255,0.035));
    box-shadow: inset 0 0 0 1px rgba(255,89,100,0.15);
}

.decoration-work-header,
.decoration-history-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.decoration-work-header > div {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.decoration-order {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: rgba(255,255,255,0.09);
    color: #fff;
    font-weight: 900;
}

.decoration-category-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.decoration-category-copy strong {
    color: #fff;
    font-size: 17px;
}

.decoration-category-copy small,
.decoration-history-help {
    color: var(--muted);
    font-size: 12px;
}

.decoration-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.decoration-status-badge.pending {
    background: rgba(245,184,66,0.18);
    color: #ffe4a3;
}

.decoration-status-badge.changed {
    background: rgba(255,89,100,0.22);
    color: #ffd3d6;
}

.decoration-status-badge.written {
    background: rgba(24,195,126,0.2);
    color: #caffea;
}

.decoration-change-alert {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,89,100,0.16);
    color: #ffdadd;
    font-size: 13px;
    font-weight: 700;
}

.decoration-work-card .decoration-places-list {
    margin-top: 14px;
}

.decoration-written-btn {
    width: 100%;
    min-height: 46px;
    margin-top: 14px;
    border: 0;
    border-radius: 13px;
    background: #18c37e;
    color: #061a13;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.decoration-written-btn:hover {
    background: #35d696;
}

.decoration-written-btn:disabled {
    cursor: wait;
    opacity: 0.65;
}

.decoration-history-section {
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.decoration-history-help {
    margin: -4px 0 12px;
}

.decoration-history-card {
    padding: 0;
    border-color: rgba(24,195,126,0.42);
    background: linear-gradient(180deg, rgba(24,195,126,0.13), rgba(255,255,255,0.035));
}

.decoration-history-card summary {
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}

.decoration-history-card summary::-webkit-details-marker {
    display: none;
}

.decoration-history-card > .decoration-places-list {
    padding: 0 16px 16px;
}

.decoration-queue-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 22px 16px;
    border: 1px dashed rgba(24,195,126,0.45);
    border-radius: 16px;
    color: var(--muted);
    text-align: center;
}

.decoration-queue-empty strong {
    color: #caffea;
    font-size: 17px;
}

.decoration-work-message.error,
.decoration-load-error {
    color: #ffd3d6;
}

.favorites-empty-btn {
    min-width: 220px;
}

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

.favorite-queue-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.favorite-queue-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.favorite-queue-main {
    min-width: 0;
    flex: 1 1 260px;
}

.favorite-queue-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.favorite-queue-star {
    color: var(--gold);
    line-height: 1;
}

.favorite-queue-meta {
    color: var(--muted);
    font-size: 14px;
    margin-top: 4px;
    line-height: 1.45;
}

.favorite-queue-status {
    display: flex;
    justify-content: flex-end;
    align-self: flex-start;
}

.favorite-queue-badge {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.08);
    color: #fff;
    white-space: nowrap;
}

.favorite-queue-badge.now {
    background: rgba(24,195,126,0.18);
    border-color: rgba(24,195,126,0.35);
    color: #dcfff0;
}

.favorite-queue-badge.soon {
    background: rgba(17,146,232,0.18);
    border-color: rgba(17,146,232,0.35);
    color: #d7ecff;
}

.favorite-queue-actions {
    margin-top: 2px;
}

.muted-line {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.queue-status-line {
    margin-top: 6px;
    font-size: 13px;
    color: #cfe7ff;
}

.section-anchor {
    height: 1px;
    margin-top: -4px;
}

.pending-age-block {
    margin-top: 12px;
}

.pending-competitor-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 12px;
    padding: 10px 12px;
    margin: 8px 0;
}

.preliminary-registration-badge {
    display: inline-flex;
    width: fit-content;
    margin: 0 0 6px;
    padding: 3px 8px;
    border: 1px solid rgba(255, 193, 7, 0.38);
    border-radius: 999px;
    background: rgba(255, 193, 7, 0.14);
    color: #ffe29a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.pending-competitor-name {
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.pending-competitor-club,
.pending-competitor-category {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.4;
}

/* =========================
   KOLEJKA WALK - inline
   ========================= */
.queue-wrap {
    color: var(--queue-text);
}

.queue-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 18px;
    background: rgba(18, 28, 47, 0.92);
    border: 1px solid var(--queue-border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.queue-title {
    font-size: 28px;
    font-weight: 800;
}

.queue-subtitle {
    font-size: 14px;
    color: var(--queue-muted);
    margin-top: 5px;
}

.queue-updated {
    color: var(--queue-muted);
    font-size: 13px;
    text-align: right;
}

.queue-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    margin-bottom: 12px;
    scrollbar-width: thin;
}

.queue-tabs::-webkit-scrollbar { height: 8px; }
.queue-tabs::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.2);
    border-radius: 999px;
}

.queue-mat-tab {
    flex: 0 0 auto;
    color: var(--queue-text);
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.queue-mat-tab.active {
    background: rgba(92,200,255,.18);
    border-color: rgba(92,200,255,.5);
}

.queue-grid-scroll {
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.queue-grid-scroll::-webkit-scrollbar { height: 10px; }
.queue-grid-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.2);
    border-radius: 999px;
}

.queue-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(320px, 1fr);
    gap: 16px;
    align-items: start;
}

.queue-grid.desktop-grid {
    grid-auto-flow: unset;
    grid-auto-columns: unset;
}

.queue-grid-scroll.desktop-scroll {
    overflow-x: auto;
}

.queue-mat-column {
    background: linear-gradient(180deg, rgba(24,37,61,.98), rgba(15,24,41,.98));
    border: 1px solid var(--queue-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    min-height: 200px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.queue-mat-header {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(180deg, rgba(92,200,255,.12), rgba(139,92,246,.06));
}

.queue-mat-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.queue-mat-subtitle {
    color: var(--queue-muted);
    font-size: 13px;
}

.queue-mat-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.queue-match-card {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 11px;
}

.queue-match-card.current {
    border: 1px solid rgba(92,200,255,.5);
    box-shadow: inset 0 0 0 1px rgba(92,200,255,.18);
    background: linear-gradient(180deg, rgba(92,200,255,.08), rgba(255,255,255,.03));
}

.queue-match-card-target {
    border-color: rgba(255,211,77,.78);
    box-shadow:
        inset 0 0 0 1px rgba(255,211,77,.24),
        0 0 0 2px rgba(255,211,77,.16);
}

.queue-match-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.queue-category-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(139,92,246,.18);
    border: 1px solid rgba(139,92,246,.35);
    color: #efe8ff;
    font-weight: 800;
    font-size: 12px;
}

.queue-category-link {
    appearance: none;
    cursor: pointer;
}

.queue-position-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.06);
    color: #e4f0ff;
    white-space: nowrap;
}

.queue-position-badge.now {
    background: rgba(24,195,126,0.18);
    border-color: rgba(24,195,126,0.34);
    color: #dcfff0;
}

.queue-position-badge.next {
    background: rgba(245,158,11,0.18);
    border-color: rgba(245,158,11,0.34);
    color: #fff3cd;
}

.queue-position-badge.waiting {
    background: rgba(17,146,232,0.16);
    border-color: rgba(17,146,232,0.30);
    color: #d7ecff;
}

.bracket-panel-section {
    display: block;
    margin-top: 12px;
}

.bracket-panel-section h3 {
    margin: 0 0 12px;
    font-size: 20px;
    color: #ffffff;
}

.mobile-bracket-board {
    display: grid;
    gap: 10px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.mobile-bracket-dynamic {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.mobile-bracket-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
}

.mobile-bracket-tab {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    color: #dfeaff;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.mobile-bracket-tab.active {
    background: rgba(17,146,232,0.18);
    border-color: rgba(17,146,232,0.35);
    color: #ffffff;
}

.mobile-bracket-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y pinch-zoom;
    padding: 2px 2px 8px;
    cursor: grab;
    overscroll-behavior-x: contain;
    scroll-behavior: auto;
}

.mobile-bracket-track {
    position: relative;
    display: grid;
    grid-auto-flow: column;
    align-items: start;
    min-width: 100%;
    padding-right: 40px;
    box-sizing: border-box;
}

.mobile-bracket-line-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.mobile-bracket-title {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: #dfeaff;
}

.mobile-bracket-anchor {
    scroll-snap-align: start;
}

.mobile-bracket-column {
    position: relative;
    height: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    box-sizing: border-box;
    z-index: 1;
    min-width: 0;
}

.mobile-bracket-card-wrap {
    position: absolute;
    left: 0;
    transition: top 280ms cubic-bezier(0.22, 1, 0.36, 1), height 280ms cubic-bezier(0.22, 1, 0.36, 1), width 280ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: top, height, width;
}

.mobile-bracket-board[data-no-anim="1"] .mobile-bracket-card-wrap {
    transition: none !important;
}

.mobile-bracket-card-wrap .match-card {
    height: 100%;
}

.mobile-bracket-card-wrap .person {
    min-height: 40px;
}

.mixed-pool-mini-tree .person {
    font-size: 9px;
    line-height: 1.05;
    min-height: 34px;
}

.mixed-pool-mini-tree .match-card-score-side {
    font-size: 9px;
    line-height: 1.05;
}

.mobile-board-line {
    position: absolute;
    background: rgba(143, 179, 255, 0.82);
    pointer-events: none;
}

.mobile-board-line.h {
    height: 2px;
}

.mobile-board-line.v {
    width: 2px;
}

.queue-round-label {
    color: var(--queue-muted);
    font-size: 11px;
    margin-bottom: 8px;
}

.queue-fighter {
    border-radius: 14px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.08);
}

.queue-fighter-blue { background: rgba(37, 99, 235, .14); }
.queue-fighter-white { background: rgba(255,255,255,.08); }

.queue-side-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--queue-muted);
    margin-bottom: 4px;
    letter-spacing: .7px;
}

.queue-fighter-name {
    font-size: 16px;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 4px;
    word-break: break-word;
}

.queue-fighter-link {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    padding: 0;
    cursor: pointer;
}

.queue-fighter-link:hover,
.queue-category-link:hover {
    filter: brightness(1.08);
}

.queue-fighter-link:focus-visible,
.queue-category-link:focus-visible {
    outline: 2px solid rgba(255,211,77,0.9);
    outline-offset: 2px;
}

.queue-fighter-name-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.queue-fighter-name-row .queue-fighter-name {
    flex: 1 1 auto;
    margin-bottom: 0;
}

.queue-favorite-toggle {
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.72);
    font-size: 22px;
    line-height: 1;
    padding: 0;
    margin: 0;
    cursor: pointer;
    flex: 0 0 auto;
}

.queue-favorite-toggle:hover {
    color: #ffffff;
}

.queue-favorite-toggle.active {
    color: var(--gold);
}

.bracket-person-name {
    display: inline-block;
    border-radius: 8px;
    transition: background-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.bracket-person-name-target {
    background: rgba(255,211,77,0.2);
    box-shadow: 0 0 0 1px rgba(255,211,77,0.45);
    color: #fff6cf;
    padding: 2px 6px;
}

.queue-fighter-club {
    color: var(--queue-muted);
    font-size: 12px;
    line-height: 1.35;
    word-break: break-word;
}

.queue-vs {
    text-align: center;
    font-weight: 900;
    font-size: 11px;
    color: var(--queue-accent);
    margin: 7px 0;
    letter-spacing: 1.4px;
}

.queue-empty-mat {
    padding: 24px 16px;
    text-align: center;
    color: var(--queue-muted);
}

.queue-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--queue-text);
    margin-bottom: 6px;
}

.queue-empty-subtitle { font-size: 13px; }

@media (max-width: 960px) {
    .decoration-work-title {
        align-items: flex-start;
        text-align: left;
    }

    .decoration-work-card,
    .decoration-history-card {
        border-radius: 14px;
    }

    .decoration-work-card {
        padding: 13px;
    }

    .decoration-work-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .decoration-status-badge {
        margin-left: 44px;
    }

    .decoration-history-card .decoration-status-badge {
        margin-left: auto;
    }

    .wrapper {
        width: min(100% - 14px, 1200px);
        padding-top: calc(env(safe-area-inset-top, 0px) + 4px);
        padding-bottom: 122px;
    }

    .header {
        padding: 10px 10px 10px;
        border-radius: 18px;
        text-align: center;
    }

    .header-main {
        display: block;
    }

    .header-copy {
        min-width: 0;
    }

    .header-actions {
        margin-top: 8px;
        gap: 6px;
    }

    .panel {
        padding: 12px;
        border-radius: 16px;
    }

    .title {
        font-size: clamp(18px, 5.4vw, 28px);
        margin: 0 0 2px;
    }

    .title-meta {
        font-size: 12px;
        gap: 6px;
        justify-content: center;
        margin-bottom: 0;
    }

    .install-btn,
    .notify-btn,
    .search-shortcut-btn,
    .stats-shortcut-btn {
        width: 52px;
        max-width: none;
        min-height: 52px;
        padding: 4px 3px;
        font-size: 20px;
    }

    .install-state {
        font-size: 12px;
    }

    .notify-bar {
        margin-top: 8px;
        gap: 6px;
        justify-content: flex-start;
        display: flex;
        align-items: center;
    }

    .header-action-label {
        font-size: 8px;
    }

    .install-tip {
        margin-top: 2px;
        font-size: 12px;
    }

    .search-row {
        flex-direction: column;
        position: sticky;
        top: 8px;
        z-index: 24;
        margin: -4px -4px 12px;
        padding: 10px;
        border-radius: 16px;
        background: linear-gradient(180deg, rgba(10, 19, 34, 0.96), rgba(10, 19, 34, 0.84));
        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 10px 24px rgba(0,0,0,0.22);
        backdrop-filter: blur(10px);
    }

    #szukaj {
        min-height: 120svh;
    }

    #szukaj .panel {
        min-height: calc(100svh - 110px);
        display: flex;
        flex-direction: column;
    }

    .search-input {
        min-width: 0;
        width: 100%;
    }

    .nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 2px 2px 8px;
        margin: 14px 0 16px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        appearance: none;
        border: 1px solid rgba(255,255,255,0.08);
        background: linear-gradient(180deg, rgba(17, 35, 61, 0.92), rgba(10, 18, 32, 0.92));
        color: #ffffff;
        padding: 0;
        border-radius: 14px;
        margin: 0;
        box-shadow: 0 10px 22px rgba(0,0,0,0.20);
        flex-shrink: 0;
    }

    .nav.mobile-collapsed {
        display: none;
    }

    #primary-nav {
        justify-content: flex-start;
    }

    #primary-nav {
        display: none;
    }

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

    .nav button {
        width: auto;
        flex: 0 0 auto;
        font-size: 15px;
        padding: 11px 14px;
        box-shadow: none;
        scroll-snap-align: start;
    }

    .btn {
        width: 100%;
        font-size: 15px;
        padding: 13px 16px;
    }

    .category-title {
        flex-direction: column;
        align-items: stretch;
    }

    .category-title h3 { font-size: 18px; }

    .pdf-link { text-align: center; }

    .favorite-actions-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .table-wrap.desktop-only { display: none; }
    .result-card-mobile { display: block; }

    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

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

    .result-row-card {
        background: white;
        color: #111827;
        border-radius: 12px;
        padding: 8px 9px;
        margin-bottom: 5px;
        border: 1px solid #d9e2ec;
        font-size: 13px;
    }

    .result-row-card .place {
        font-weight: 800;
        color: #0f2747;
        margin-bottom: 3px;
        font-size: 13px;
    }

    .result-row-card .name {
        font-weight: 700;
        margin-bottom: 3px;
        font-size: 15px;
    }

    .result-row-card .club {
        color: #374151;
        font-size: 12px;
    }

    .group-header {
        font-size: 16px;
        padding: 12px 13px;
    }

    .group-block {
        margin-bottom: 10px;
        border-radius: 14px;
    }

    .group-content {
        padding: 8px;
    }

    #wyniki-content .group-content {
        padding: 6px;
        background: rgba(255,255,255,0.02);
    }

    #wyniki-content .category-block {
        margin-bottom: 8px;
        padding: 9px;
        border-radius: 14px;
        background: rgba(255,255,255,0.025);
    }

    #wyniki-content .category-title {
        gap: 8px;
        margin-bottom: 8px;
    }

    #wyniki-content .category-title > div:last-child {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 6px !important;
    }

    #wyniki-content .pdf-link {
        min-height: 34px;
        padding: 7px 9px;
        font-size: 12px;
        border-radius: 12px;
    }

    #wyniki-content .result-card-mobile {
        display: grid;
        gap: 5px;
    }

    #wyniki-content .result-category-picker {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        margin-bottom: 8px;
    }

    #wyniki-content .result-category-link {
        padding: 9px 10px;
        border-radius: 12px;
    }

    #wyniki-content .result-category-link-label {
        font-size: 14px;
    }

    #wyniki-content .result-category-link-count {
        min-width: 0;
        height: 24px;
        font-size: 11px;
        padding: 0 7px;
    }

    .club-standings-wrap {
        border-radius: 14px;
    }

    .club-standings-table thead th {
        padding: 7px 4px;
        font-size: 10px;
    }

    .club-standings-table td {
        padding: 7px 4px;
        font-size: 10px;
    }

    .club-standings-table col.club-col-rank {
        width: 10%;
    }

    .club-standings-table col.club-col-name {
        width: 44%;
    }

    .club-standings-table col.club-col-metric {
        width: 9%;
    }

    .club-standings-table col.club-col-total {
        width: 19%;
    }

    .stats-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-table th,
    .stats-table td {
        padding: 7px 4px;
        font-size: 10px;
    }

    #drabinki-content .bracket-age-panel {
        padding: 10px;
        border-radius: 14px;
        background: rgba(255,255,255,0.02);
    }

    #drabinki-content .bracket-age-title {
        margin-bottom: 8px;
        gap: 6px;
    }

    #drabinki-content .bracket-age-title h3 {
        font-size: 17px;
    }

    #drabinki-content .bracket-age-subtitle {
        font-size: 12px;
    }

    #drabinki-content .bracket-weight-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    #drabinki-content .category-link-card {
        margin: 0;
        padding: 11px 12px;
        border-radius: 12px;
        text-align: left;
    }

    #drabinki-content .card {
        margin-top: 10px !important;
        padding: 10px;
        border-radius: 14px;
        background: rgba(255,255,255,0.03);
    }

    .age-tabs {
        position: sticky;
        top: 8px;
        z-index: 25;
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: -4px -4px 14px;
        padding: 10px;
        border-radius: 16px;
        background: linear-gradient(180deg, rgba(10, 19, 34, 0.96), rgba(10, 19, 34, 0.84));
        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 10px 24px rgba(0,0,0,0.22);
        backdrop-filter: blur(10px);
        scrollbar-width: none;
    }

    .age-tabs::-webkit-scrollbar {
        display: none;
    }

    .age-tab {
        flex: 0 0 auto;
    }

    #wyniki-content .group-header {
        position: relative;
        top: auto;
        z-index: auto;
    }

    td, th {
        font-size: 13px;
        padding: 8px;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
        padding: 8px;
        border-radius: 22px;
        background: rgba(8, 17, 31, 0.92);
        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 16px 36px rgba(0,0,0,0.35);
        backdrop-filter: blur(12px);
        z-index: 60;
    }

    .mobile-nav-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 58px;
        padding: 6px 4px;
        border-radius: 16px;
        font-weight: 700;
        line-height: 1.1;
        transition: background .15s ease, color .15s ease, transform .15s ease;
    }

    .mobile-nav-btn.active {
        color: #ffffff;
        background: linear-gradient(180deg, rgba(17,146,232,0.28), rgba(17,146,232,0.14));
        box-shadow: inset 0 0 0 1px rgba(146, 214, 255, 0.28);
    }

    .mobile-nav-icon {
        font-size: 18px;
    }

    .nav-bracket-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.1em;
        height: 1.1em;
        vertical-align: -0.14em;
        flex: 0 0 auto;
    }

    .nav-bracket-icon svg {
        width: 100%;
        height: 100%;
        display: block;
    }

    .mobile-nav-label {
        font-size: 11px;
        white-space: nowrap;
    }

    .mobile-quick-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 10px 0 16px;
    }

    .quick-action-card {
        appearance: none;
        border: 1px solid rgba(255,255,255,0.08);
        background: linear-gradient(180deg, rgba(17, 35, 61, 0.92), rgba(10, 18, 32, 0.92));
        color: #ffffff;
        padding: 14px 12px;
        border-radius: 18px;
        text-align: left;
        box-shadow: 0 12px 26px rgba(0,0,0,0.25);
    }

    .quick-action-label {
        display: block;
        font-size: 12px;
        color: #9fc8ec;
        margin-bottom: 8px;
        font-weight: 700;
        text-transform: none;
        letter-spacing: 0;
    }

    .quick-action-star {
        color: #ffd84d;
        font-size: 15px;
        margin-right: 6px;
        line-height: 1;
        vertical-align: -1px;
    }

    .quick-action-value {
        display: block;
        font-size: 20px;
        font-weight: 800;
        line-height: 1.1;
        margin-bottom: 4px;
    }

    .quick-action-hint {
        display: none;
    }

    .mobile-home-hub {
        display: grid;
        gap: 12px;
        margin: 0 0 16px;
    }

    .mobile-home-section {
        background: linear-gradient(180deg, rgba(13, 24, 42, 0.94), rgba(9, 17, 31, 0.94));
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 20px;
        padding: 14px 12px;
        box-shadow: 0 12px 28px rgba(0,0,0,0.24);
    }

    .mobile-home-title {
        font-size: 13px;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: #9fc8ec;
        margin-bottom: 10px;
    }

    .mobile-home-priority-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mobile-home-priority {
        appearance: none;
        border: 1px solid rgba(255,255,255,0.08);
        background: rgba(255,255,255,0.05);
        color: #fff;
        border-radius: 18px;
        padding: 14px 12px;
        text-align: left;
    }

    .mobile-home-priority-label {
        display: block;
        font-size: 12px;
        color: #9fc8ec;
        margin-bottom: 6px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .mobile-home-priority-value {
        display: block;
        font-size: 18px;
        line-height: 1.15;
        font-weight: 800;
        margin-bottom: 4px;
    }

    .mobile-home-priority-hint {
        display: block;
        font-size: 12px;
        color: var(--muted);
    }

    .mobile-home-empty {
        padding: 12px;
        border-radius: 16px;
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.07);
        color: var(--muted);
        font-size: 13px;
    }

    .scroll-top-btn {
        right: 12px;
        bottom: 88px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .queue-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .queue-updated {
        text-align: left;
    }

    .queue-title {
        font-size: 24px;
    }

    .queue-tabs {
        position: sticky;
        top: 8px;
        z-index: 22;
        margin: -4px -4px 12px;
        padding: 10px;
        border-radius: 16px;
        background: linear-gradient(180deg, rgba(10, 19, 34, 0.96), rgba(10, 19, 34, 0.84));
        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 10px 24px rgba(0,0,0,0.22);
        backdrop-filter: blur(10px);
    }

    .queue-grid-scroll {
        margin: 0 -2px;
        padding: 0 2px 10px;
        scroll-snap-type: x mandatory;
    }

    .queue-grid {
        grid-auto-columns: calc(100vw - 42px);
        gap: 12px;
    }

    .person-card {
        padding: 12px 12px 14px;
        border-radius: 16px;
    }

    .person-card-main {
        flex-direction: column;
        align-items: stretch;
    }

    .person-card-name {
        font-size: 17px;
    }

    .person-card-club {
        font-size: 14px;
    }

    .person-card-actions {
        margin-top: 10px;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .person-card-actions .btn,
    .person-card-actions .fav-btn,
    .person-card-actions .pdf-link {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .favorite-action-link {
        min-height: 38px;
        padding: 9px 6px;
        font-size: 12px;
        border-radius: 12px;
    }

    .person-card-badges {
        display: grid;
        grid-template-columns: 1fr;
    }
}
.portal-list-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}

.portal-account-menu {
    min-width: 0;
}

.portal-account-menu[hidden] {
    display: none !important;
}

.portal-account-menu-toggle {
    display: none;
}

.portal-account-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin: 2px 0 20px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 17px;
    background: rgba(4, 13, 25, 0.66);
}

.portal-account-nav[hidden],
.portal-account-section[hidden] {
    display: none !important;
}

.portal-account-nav-button {
    min-width: 0;
    min-height: 46px;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #aebfd4;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
}

.portal-account-nav-button:hover,
.portal-account-nav-button:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.portal-account-nav-button.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(17, 146, 232, 0.96), rgba(31, 111, 235, 0.96));
    box-shadow: 0 8px 20px rgba(13, 91, 176, 0.25);
}

.portal-tournament-year-filter {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    margin: 0 0 20px;
    padding: 13px 15px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 16px;
    background: rgba(4, 13, 25, 0.52);
}

.portal-tournament-year-filter[hidden] {
    display: none !important;
}

.portal-tournament-year-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aebfd4;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.portal-tournament-year-label select {
    min-width: 190px;
    min-height: 42px;
    padding: 8px 36px 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    background: #0a1a2d;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
}

.portal-tournament-year-label select:hover,
.portal-tournament-year-label select:focus-visible {
    border-color: rgba(96, 199, 255, 0.52);
    outline: 2px solid rgba(96, 199, 255, 0.24);
    outline-offset: 1px;
}

.portal-history-content {
    min-width: 0;
}

.portal-ranking-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 13px 15px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 16px;
    background: rgba(4, 13, 25, 0.52);
}

.portal-ranking-year-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aebfd4;
    font-size: 13px;
    font-weight: 800;
}

.portal-ranking-year-label select {
    min-height: 42px;
    padding: 8px 36px 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    background: #0a1a2d;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
}

.portal-ranking-year-label select:hover,
.portal-ranking-year-label select:focus-visible {
    border-color: rgba(96, 199, 255, 0.52);
    outline: 2px solid rgba(96, 199, 255, 0.24);
    outline-offset: 1px;
}

.portal-ranking-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 4px;
    border-radius: 13px;
    background: rgba(1, 8, 16, 0.54);
}

.portal-ranking-tab {
    min-height: 38px;
    padding: 8px 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #aebfd4;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
}

.portal-ranking-tab:hover,
.portal-ranking-tab:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.portal-ranking-tab.active {
    color: #fff;
    background: rgba(31, 111, 235, 0.88);
}

.portal-ranking-search {
    display: grid;
    grid-template-columns: minmax(240px, 460px) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.portal-ranking-search-field {
    position: relative;
    min-width: 0;
}

.portal-ranking-search input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 44px 10px 13px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(3, 12, 23, 0.74);
    color: #fff;
    font: inherit;
}

.portal-ranking-search input:focus {
    border-color: rgba(96, 199, 255, 0.58);
    outline: 2px solid rgba(96, 199, 255, 0.24);
    outline-offset: 1px;
}

.portal-ranking-search input::-webkit-search-cancel-button {
    display: none;
}

.portal-ranking-search-clear {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 32px;
    height: 32px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    color: #b9cce1;
    cursor: pointer;
    font: inherit;
    font-size: 23px;
    line-height: 1;
}

.portal-ranking-search-clear:hover,
.portal-ranking-search-clear:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    outline: 2px solid rgba(96, 199, 255, 0.32);
}

.portal-ranking-search-clear[hidden] {
    display: none;
}

.portal-ranking-search-status {
    color: #91a8c2;
    font-size: 12px;
}

.portal-ranking-table {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.portal-ranking-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 58px minmax(180px, 1fr) repeat(4, 64px);
    gap: 8px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.portal-ranking-header {
    padding-top: 8px;
    padding-bottom: 8px;
    border-color: rgba(96, 199, 255, 0.20);
    background: rgba(31, 111, 235, 0.10);
    color: #91a8c2;
    font-size: 11px;
    font-weight: 850;
}

.portal-ranking-header > span:not(:nth-child(2)) {
    text-align: center;
}

.portal-ranking-position,
.portal-ranking-count {
    text-align: center;
    font-size: 17px;
}

.portal-ranking-position {
    color: #78ccff;
}

.portal-ranking-count {
    color: #eaf4ff;
}

.portal-ranking-gold { color: #ffe38a; }
.portal-ranking-silver { color: #dce6f2; }
.portal-ranking-bronze { color: #f1b77d; }

.portal-ranking-identity {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.portal-ranking-identity strong,
.portal-ranking-identity small {
    overflow-wrap: anywhere;
}

.portal-ranking-identity strong {
    color: #fff;
    font-size: 14px;
}

.portal-ranking-identity small {
    color: #91a8c2;
    font-size: 10px;
}

.portal-athlete-search-panel {
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid rgba(96, 199, 255, 0.20);
    border-radius: 20px;
    background: linear-gradient(155deg, rgba(16, 43, 70, 0.82), rgba(7, 17, 31, 0.82));
}

.portal-athlete-search-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 18px;
    align-items: end;
}

.portal-athlete-search-heading h2 {
    margin: 0;
    color: #fff;
    font-size: 19px;
}

.portal-athlete-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.portal-athlete-search-form input {
    min-width: 0;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(3, 12, 23, 0.74);
    color: #fff;
    font: inherit;
}

.portal-athlete-search-form input:focus {
    outline: 2px solid #36adf5;
    outline-offset: 1px;
}

.portal-athlete-search-form button,
.portal-favorite-toggle {
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid rgba(96, 199, 255, 0.30);
    border-radius: 12px;
    background: rgba(31, 111, 235, 0.18);
    color: #eaf6ff;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
}

.portal-athlete-search-form button:hover,
.portal-athlete-search-form button:focus-visible,
.portal-favorite-toggle:hover,
.portal-favorite-toggle:focus-visible {
    border-color: rgba(96, 199, 255, 0.65);
    background: rgba(31, 111, 235, 0.30);
}

.portal-favorite-toggle.active {
    border-color: rgba(255, 207, 64, 0.45);
    background: rgba(255, 207, 64, 0.13);
    color: #ffe38a;
}

.portal-athlete-search-form button:disabled,
.portal-favorite-toggle:disabled {
    cursor: wait;
    opacity: 0.62;
}

.portal-athlete-search-status {
    min-height: 19px;
    margin-top: 12px;
    color: #9eb4cc;
    font-size: 12px;
}

.portal-athlete-search-status.error {
    color: #ffb6b6;
}

.portal-athlete-bulk-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 12px;
}

.portal-athlete-bulk-add {
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 207, 64, 0.42);
    border-radius: 12px;
    background: rgba(255, 207, 64, 0.13);
    color: #ffe38a;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.portal-athlete-bulk-add:hover,
.portal-athlete-bulk-add:focus-visible {
    border-color: rgba(255, 221, 102, 0.75);
    background: rgba(255, 207, 64, 0.22);
    outline: 2px solid rgba(255, 221, 102, 0.32);
    outline-offset: 2px;
}

.portal-athlete-bulk-add:disabled {
    cursor: wait;
    opacity: 0.62;
}

.portal-athlete-search-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 520px;
    margin-top: 8px;
    padding-right: 4px;
    overflow: auto;
}

.portal-athlete-search-result {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.portal-athlete-search-result:hover,
.portal-athlete-search-result:focus-within {
    border-color: rgba(96, 199, 255, 0.42);
    background: rgba(96, 199, 255, 0.08);
}

.portal-athlete-search-profile {
    appearance: none;
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 3px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.portal-athlete-search-profile:focus-visible {
    border-radius: 6px;
    outline: 2px solid #7fc7ff;
    outline-offset: 3px;
}

.portal-athlete-search-result strong,
.portal-athlete-search-result span,
.portal-athlete-search-result small {
    overflow-wrap: anywhere;
}

.portal-athlete-search-result strong {
    color: #fff;
    font-size: 14px;
}

.portal-athlete-search-result span {
    color: #b8cbe0;
    font-size: 11px;
}

.portal-athlete-search-result small {
    color: #8198b2;
    font-size: 10px;
}

.portal-athlete-search-empty {
    margin-top: 10px;
}

.portal-athletes-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.portal-athlete-list,
.portal-athlete-detail,
.portal-statistics-breakdown {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.portal-athlete-list h2,
.portal-statistics-breakdown h2 {
    margin: 0 0 4px;
    color: #dcecff;
    font-size: 15px;
}

.portal-athlete-card,
.portal-statistics-athlete,
.portal-athlete-result {
    appearance: none;
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #edf6ff;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.portal-athlete-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
}

.portal-athlete-card:hover,
.portal-athlete-card:focus-within,
.portal-athlete-card.active {
    border-color: rgba(96, 199, 255, 0.45);
    background: rgba(31, 111, 235, 0.13);
}

.portal-athlete-card-select {
    appearance: none;
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 14px 54px 14px 14px;
    border: 0;
    background: transparent;
    color: #edf6ff;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.portal-athlete-card-select:focus-visible {
    outline: 2px solid #7fc7ff;
    outline-offset: -3px;
}

.portal-athlete-card-select strong,
.portal-statistics-athlete strong {
    color: #fff;
    font-size: 16px;
    overflow-wrap: anywhere;
}

.portal-athlete-card-select > span,
.portal-statistics-athlete > span > span {
    color: #aebfd4;
    font-size: 12px;
}

.portal-favorite-star {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 207, 64, 0.42);
    border-radius: 12px;
    background: rgba(255, 207, 64, 0.13);
    color: #ffd84d;
    cursor: pointer;
    font: inherit;
    font-size: 24px;
    line-height: 1;
}

.portal-favorite-star:hover,
.portal-favorite-star:focus-visible {
    border-color: rgba(255, 221, 102, 0.82);
    background: rgba(255, 207, 64, 0.22);
    outline: 2px solid rgba(255, 221, 102, 0.42);
    outline-offset: 2px;
}

.portal-favorite-star:disabled {
    cursor: wait;
    opacity: 0.55;
}

.portal-place-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.portal-place-badge {
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(96, 199, 255, 0.11);
    color: #b9e6ff;
    font-size: 10px;
    font-weight: 800;
}

.portal-place-badge[data-place="1"] { background: rgba(255, 207, 64, 0.16); color: #ffe38a; }
.portal-place-badge[data-place="2"] { background: rgba(211, 221, 235, 0.14); color: #dce6f2; }
.portal-place-badge[data-place="3"] { background: rgba(213, 139, 74, 0.16); color: #f1b77d; }
.portal-place-badge-empty { color: #91a5bd; }

.portal-athlete-detail {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    background: linear-gradient(155deg, rgba(20, 39, 65, 0.82), rgba(7, 17, 31, 0.82));
}

.portal-athlete-detail-back {
    display: none;
    width: fit-content;
    min-height: 40px;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid rgba(96, 199, 255, 0.28);
    border-radius: 12px;
    background: rgba(96, 199, 255, 0.08);
    color: #b9e6ff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
}

.portal-athlete-detail-back:hover,
.portal-athlete-detail-back:focus-visible {
    border-color: rgba(96, 199, 255, 0.54);
    background: rgba(96, 199, 255, 0.14);
    color: #fff;
}

.portal-athlete-detail-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.portal-athlete-detail-heading h2 {
    margin: 0;
    color: #fff;
    font-size: 25px;
    overflow-wrap: anywhere;
}

.portal-athlete-detail-heading p {
    margin: 6px 0 0;
    color: #aebfd4;
    font-size: 13px;
}

.portal-athlete-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 5px 0 4px;
}

.portal-athlete-summary-card {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 4px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.045);
}

.portal-athlete-summary-card > span {
    color: #aebfd4;
    font-size: 11px;
    font-weight: 800;
}

.portal-athlete-summary-card > strong {
    color: #fff;
    font-size: 24px;
    line-height: 1;
}

.portal-athlete-summary-card:nth-child(2) > strong { color: #ffe38a; }
.portal-athlete-summary-card:nth-child(3) > strong { color: #dce6f2; }
.portal-athlete-summary-card:nth-child(4) > strong { color: #f1b77d; }
.portal-athlete-summary-card:nth-child(5) > strong { color: #78ccff; }

.portal-athlete-history-title {
    margin: 8px 0 0;
    color: #dcecff;
    font-size: 15px;
}

.portal-identity-warning {
    padding: 12px 14px;
    border: 1px solid rgba(255, 184, 76, 0.34);
    border-radius: 14px;
    background: rgba(255, 184, 76, 0.10);
    color: #ffe2aa;
    font-size: 12px;
    line-height: 1.45;
}

.portal-athlete-results {
    display: grid;
    gap: 8px;
}

.portal-athlete-result {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 24px;
    gap: 11px;
    align-items: center;
    padding: 12px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.045);
}

.portal-athlete-result:hover,
.portal-athlete-result:focus-visible {
    border-color: rgba(96, 199, 255, 0.44);
    background: rgba(96, 199, 255, 0.09);
}

.portal-athlete-result-place {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(96, 199, 255, 0.12);
    color: #b9e6ff;
    font-size: 18px;
    font-weight: 900;
}

.portal-athlete-result-place[data-place="1"] { background: rgba(255, 207, 64, 0.16); color: #ffe38a; }
.portal-athlete-result-place[data-place="2"] { background: rgba(211, 221, 235, 0.14); color: #dce6f2; }
.portal-athlete-result-place[data-place="3"] { background: rgba(213, 139, 74, 0.16); color: #f1b77d; }

.portal-athlete-result-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.portal-athlete-result-copy strong {
    color: #fff;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.portal-athlete-result-copy span {
    color: #aebfd4;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.portal-athlete-result-arrow {
    color: #78ccff;
    font-size: 20px;
}

.portal-statistics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.portal-statistic-card {
    min-width: 0;
    padding: 17px 13px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.045);
}

.portal-statistic-card span {
    display: block;
    color: #aebfd4;
    font-size: 11px;
    font-weight: 800;
}

.portal-statistic-card strong {
    display: block;
    margin-top: 7px;
    color: #fff;
    font-size: 30px;
    line-height: 1;
}

.portal-statistic-card[data-place="1"] { border-color: rgba(255, 207, 64, 0.30); }
.portal-statistic-card[data-place="2"] { border-color: rgba(211, 221, 235, 0.24); }
.portal-statistic-card[data-place="3"] { border-color: rgba(213, 139, 74, 0.30); }

.portal-statistics-breakdown {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    background: rgba(7, 17, 31, 0.68);
}

.portal-statistics-athlete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.portal-statistics-athlete:hover,
.portal-statistics-athlete:focus-visible {
    border-color: rgba(96, 199, 255, 0.42);
}

.portal-statistics-athlete > span:first-child {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.portal-statistics-athlete .portal-place-badges {
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-top: 0;
}

.portal-history-empty strong {
    display: block;
    color: #fff;
    font-size: 17px;
}

.portal-history-empty p {
    margin: 9px auto 16px;
    max-width: 560px;
    line-height: 1.5;
}

.portal-history-empty-button {
    width: auto;
    flex: none;
}

.portal-history-error {
    border-color: rgba(255, 120, 120, 0.3);
    color: #ffb6b6;
}

.portal-consent a,
.portal-account-links a,
.legal-footer a {
    color: #73bfff;
    text-underline-offset: 3px;
}

.portal-account-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.portal-account-card {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 18px;
    background: rgba(4, 13, 25, 0.58);
}

.portal-account-card h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.portal-account-form {
    margin-top: 0;
}

.portal-account-form .portal-submit {
    width: auto;
    min-width: 150px;
}

.portal-account-form input[readonly] {
    color: #aebfd4;
    cursor: default;
    opacity: 0.82;
}

.portal-account-links {
    margin-top: 20px;
}

.portal-account-details {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

.portal-account-details div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-account-details dt {
    color: #9eb0c7;
    font-weight: 700;
}

.portal-account-details dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.portal-account-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.portal-danger-zone {
    border-color: rgba(255, 100, 100, 0.38);
    background: rgba(79, 15, 23, 0.23);
}

.portal-account-danger {
    grid-column: 1 / -1;
}

.portal-danger-zone > p {
    color: #d9c1c4;
    line-height: 1.55;
}

.portal-danger-button {
    min-height: 46px;
    padding: 11px 18px;
    border: 1px solid #ff7777;
    border-radius: 12px;
    background: #a62432;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.portal-danger-button:hover,
.portal-danger-button:focus-visible {
    background: #c82d3e;
}

.portal-danger-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.legal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 22px;
    padding: 28px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    background: #07111f;
    color: #aebfd4;
    font-size: 13px;
}

@media (max-width: 760px) {
    .portal-list-heading {
        flex-wrap: wrap;
    }

    .portal-account-menu {
        margin: 2px 0 15px;
    }

    .portal-account-menu-toggle {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 50px;
        gap: 12px;
        padding: 10px 14px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 15px;
        background: rgba(4, 13, 25, 0.82);
        color: #d7e6f7;
        cursor: pointer;
        font: inherit;
        font-size: 13px;
        font-weight: 800;
        text-align: left;
    }

    .portal-account-menu-toggle:hover,
    .portal-account-menu-toggle:focus-visible,
    .portal-account-menu.is-open .portal-account-menu-toggle {
        border-color: rgba(90, 180, 255, 0.42);
        background: rgba(11, 32, 57, 0.96);
        color: #fff;
    }

    .portal-account-menu-toggle strong {
        min-width: 0;
        margin: 0;
        overflow: hidden;
        color: #fff;
        font-size: 14px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .portal-account-menu-bars {
        display: inline-flex;
        flex: 0 0 22px;
        flex-direction: column;
        gap: 4px;
        margin-left: auto;
    }

    .portal-account-menu-bars span {
        display: block;
        width: 22px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform 160ms ease, opacity 160ms ease;
    }

    .portal-account-menu.is-open .portal-account-menu-bars span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .portal-account-menu.is-open .portal-account-menu-bars span:nth-child(2) {
        opacity: 0;
    }

    .portal-account-menu.is-open .portal-account-menu-bars span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .portal-account-nav {
        display: none;
        grid-template-columns: 1fr;
        gap: 4px;
        margin: 8px 0 0;
        padding: 4px;
    }

    .portal-account-menu.is-open .portal-account-nav {
        display: grid;
    }

    .portal-account-nav-button {
        min-height: 44px;
        padding: 10px 12px;
        font-size: 13px;
        line-height: 1.2;
        text-align: left;
    }

    .portal-account-settings {
        grid-template-columns: 1fr;
    }

    .portal-account-danger {
        grid-column: auto;
    }

    .portal-account-card {
        padding: 17px;
    }

    .legal-footer {
        padding-bottom: 96px;
    }

    .portal-ranking-controls {
        display: grid;
        align-items: stretch;
        padding: 12px;
    }

    .portal-ranking-year-label {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-ranking-year-label select {
        width: 100%;
    }

    .portal-ranking-row {
        grid-template-columns: 38px minmax(0, 1fr) repeat(3, 38px);
        gap: 5px;
        padding: 10px 8px;
    }

    .portal-ranking-search {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .portal-ranking-row > :last-child {
        display: none;
    }

    .portal-ranking-position,
    .portal-ranking-count {
        font-size: 15px;
    }

    .portal-tournament-year-filter {
        align-items: stretch;
        margin-bottom: 15px;
        padding: 12px;
    }

    .portal-tournament-year-label {
        align-items: stretch;
        flex-direction: column;
        white-space: normal;
    }

    .portal-tournament-year-label select {
        width: 100%;
        min-width: 0;
    }

    .portal-athlete-search-heading,
    .portal-athlete-search-results {
        grid-template-columns: 1fr;
    }

    .portal-athlete-search-heading {
        align-items: stretch;
    }

    .portal-athlete-search-results {
        max-height: 440px;
    }

    .portal-athlete-bulk-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-athlete-bulk-add {
        width: 100%;
    }

    .portal-athletes-layout {
        grid-template-columns: 1fr;
    }

    .portal-history-content.has-athlete-detail > .portal-athlete-search-panel,
    .portal-history-content.has-athlete-detail .portal-athlete-list {
        display: none;
    }

    .portal-athlete-detail {
        padding: 14px;
    }

    .portal-athlete-detail-back {
        display: inline-flex;
    }

    .portal-athlete-detail-heading {
        display: grid;
        gap: 8px;
    }

    .portal-athlete-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-athlete-summary-card:last-child {
        grid-column: 1 / -1;
    }

    .portal-statistics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-statistic-card:last-child {
        grid-column: 1 / -1;
    }

    .portal-statistics-athlete {
        display: grid;
    }

    .portal-statistics-athlete .portal-place-badges {
        justify-content: flex-start;
    }
}

@media (max-width: 390px) {
    .portal-account-label {
        max-width: 88px;
    }

    .portal-user-menu-toggle {
        gap: 6px;
        padding-right: 7px;
    }

    .portal-account-nav-button {
        font-size: 11px;
    }

    .portal-athlete-search-panel {
        padding: 14px;
    }

    .portal-athlete-search-form {
        grid-template-columns: 1fr;
    }

    .portal-athlete-search-form button,
    .portal-favorite-toggle {
        width: 100%;
    }

    .portal-athlete-search-result {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-athlete-result {
        grid-template-columns: 42px minmax(0, 1fr) 18px;
        gap: 8px;
        padding: 10px;
    }

    .portal-athlete-result-place {
        width: 40px;
        height: 40px;
    }
}

/* Desktop: keep long qualification labels separate from the athlete count. */
@media (min-width: 961px) {
    #wyniki-content .result-category-picker {
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
        gap: 10px;
    }

    #wyniki-content .result-category-link-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    #wyniki-content .result-category-link-label {
        display: block;
        min-width: 0;
        min-height: 2.7em;
        line-height: 1.35;
        text-align: left;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    #wyniki-content .result-category-link-count {
        flex-shrink: 0;
    }
}

/* Keep the favorite control separate from the athlete navigation button. */
.portal-favorite-star{width:44px;height:44px}
.portal-athlete-card-select{padding-right:64px;min-height:64px}
.portal-statistics-athlete-card{position:relative;min-width:0}
.portal-statistics-athlete-card .portal-statistics-athlete{padding-right:64px;min-height:64px}
.portal-statistics-athlete-card .portal-favorite-star{top:10px;right:10px}

#listy-content .registration-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-width: 0;
    overflow-wrap: anywhere;
}

#listy-content .registration-count {
    display: inline-block;
    color: inherit;
    font: inherit;
    white-space: nowrap;
}
