.kskm {
    --kskm-primary: #e92b5f;
    --kskm-primary-dark: #bf1746;
    --kskm-border: #e7e7e7;
    --kskm-muted: #666;
    --kskm-bg: #fff;
    --kskm-soft: #f8f8f8;
    max-width: 1100px;
    margin: 24px auto;
}

.kskm *, .kskm-box * {
    box-sizing: border-box;
}

.kskm-box,
.kskm-hero,
.kskm-stat {
    background: var(--kskm-bg);
    border: 1px solid var(--kskm-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.kskm-box,
.kskm-hero {
    padding: 24px;
    margin-bottom: 22px;
}

.kskm-hero h2,
.kskm-box h3,
.kskm-leaderboard h3 {
    margin-top: 0;
}

.kskm-rules {
    color: var(--kskm-muted);
    max-width: 760px;
}

.kskm-progress {
    height: 18px;
    background: #eee;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 20px;
}

.kskm-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--kskm-primary), #ff8a00);
    border-radius: inherit;
}

.kskm-progress-label,
.kskm-help {
    color: var(--kskm-muted);
    font-size: .95rem;
}

.kskm-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.kskm-stats-grid-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kskm-stat {
    padding: 20px;
    text-align: center;
}

.kskm-stat strong {
    display: block;
    font-size: clamp(1.35rem, 3vw, 2.1rem);
    line-height: 1.1;
    color: var(--kskm-primary-dark);
}

.kskm-stat span {
    display: block;
    margin-top: 8px;
    color: var(--kskm-muted);
    font-size: .95rem;
}

.kskm-button,
.kskm input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    background: var(--kskm-primary);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}

.kskm-button:hover,
.kskm input[type="submit"]:hover {
    background: var(--kskm-primary-dark);
    transform: translateY(-1px);
}

.kskm-form input[type="text"],
.kskm-form input[type="email"],
.kskm-form input[type="password"],
.kskm-form input[type="date"],
.kskm-copy-input {
    width: 100%;
    max-width: 460px;
    border: 1px solid var(--kskm-border);
    border-radius: 10px;
    padding: 11px 12px;
    background: #fff;
}

.kskm-entry-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.kskm-entry-form p {
    margin: 0;
}

.kskm-entry-form p:last-child {
    grid-column: 1 / -1;
}

.kskm-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--kskm-border);
    border-radius: 14px;
    background: #fff;
}

.kskm-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.kskm-table th,
.kskm-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--kskm-border);
    text-align: left;
}

.kskm-table th {
    background: var(--kskm-soft);
    font-weight: 700;
}

.kskm-table tr:last-child td {
    border-bottom: 0;
}

.kskm-message {
    border-radius: 12px;
    padding: 13px 15px;
    margin: 0 0 18px;
    border: 1px solid #bde5c8;
    background: #effaf2;
    color: #1b6b2a;
}

.kskm-message-error {
    border-color: #f1b8b8;
    background: #fff1f1;
    color: #9d1d1d;
}

.kskm-invite-info {
    border-radius: 12px;
    padding: 13px 15px;
    margin-bottom: 18px;
    background: #fff7e6;
    border: 1px solid #ffe0a3;
}

.kskm-badge,
.kskm-badge-warning {
    display: inline-block;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: .8rem;
    font-weight: 700;
}

.kskm-badge {
    background: #eef5ff;
    color: #1c5d99;
}

.kskm-badge-warning {
    background: #fff1d8;
    color: #9a5a00;
}

.kskm-members {
    margin-left: 1.2em;
}

@media (max-width: 800px) {
    .kskm-stats-grid,
    .kskm-stats-grid-compact,
    .kskm-entry-form {
        grid-template-columns: 1fr;
    }
}

/* Rozšířené fialové bloky, žebříčky a validace */
.kskm-purple-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.kskm-purple-card {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    padding: 22px;
    border-radius: 20px;
    color: #fff;
    background: radial-gradient(circle at top right, rgba(255,255,255,.24), transparent 34%), linear-gradient(135deg, #7b2cff, #b428c9 54%, #ec2f86);
    box-shadow: 0 16px 38px rgba(93, 31, 150, .22);
}

.kskm-purple-card::after {
    content: '';
    position: absolute;
    right: -36px;
    bottom: -52px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
}

.kskm-purple-card strong {
    display: block;
    position: relative;
    z-index: 1;
    font-size: clamp(1.35rem, 2.4vw, 2.25rem);
    line-height: 1.1;
}

.kskm-purple-card span {
    display: block;
    position: relative;
    z-index: 1;
    margin-top: 9px;
    font-weight: 700;
    opacity: .92;
}

.kskm-form-errors {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: #fff0f3;
    border: 1px solid #ffb8c8;
    color: #8d1633;
}

.kskm-form-errors.is-visible {
    display: block;
}

.kskm-form-errors ul {
    margin: 8px 0 0 20px;
}

.kskm .kskm-field-error {
    border-color: #e92b5f !important;
    box-shadow: 0 0 0 3px rgba(233,43,95,.14) !important;
    outline: 0;
}

.kskm-mini-button {
    border: 0;
    border-radius: 999px;
    padding: 7px 12px;
    background: #f0e8ff;
    color: #6226b6;
    font-weight: 700;
    cursor: pointer;
}

.kskm-mini-button:hover {
    background: #e3d3ff;
}

.kskm-rankings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.kskm-ranking-panel {
    margin: 0;
}
.kskm-standalone-ranking .kskm-ranking-panel {
    margin-bottom: 0;
}

.kskm-standalone-ranking .kskm-ranking-list {
    margin-bottom: 0;
}


.kskm-ranking-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: kskm-rank;
}

.kskm-ranking-list li {
    counter-increment: kskm-rank;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--kskm-border);
}

.kskm-ranking-list li:last-child {
    border-bottom: 0;
}

.kskm-ranking-list li::before {
    content: counter(kskm-rank) '.';
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #7b2cff, #ec2f86);
    color: #fff;
    font-weight: 800;
}

.kskm-ranking-list li > .kskm-ranking-main {
    flex: 1 1 auto;
}

.kskm-ranking-list li small {
    display: block;
    margin-top: 3px;
    color: var(--kskm-muted);
}

.kskm-ranking-list li b {
    white-space: nowrap;
    color: var(--kskm-primary-dark);
}

.kskm-ranking-list .kskm-empty-ranking::before {
    display: none;
}

.kskm-chart-box h3 {
    margin-top: 0;
}

.kskm-chart {
    display: flex;
    align-items: end;
    gap: 7px;
    min-height: 310px;
    padding: 48px 0 42px;
    overflow-x: auto;
    overflow-y: hidden;
}

.kskm-chart-item {
    position: relative;
    flex: 1 0 28px;
    min-width: 28px;
    height: 220px;
    display: flex;
    align-items: end;
    justify-content: center;
}

.kskm-chart-bar {
    width: 100%;
    max-width: 34px;
    min-height: 4px;
    border-radius: 10px 10px 3px 3px;
    background: linear-gradient(180deg, #ec2f86, #7b2cff);
    box-shadow: 0 10px 18px rgba(123, 44, 255, .22);
}

.kskm-chart-value {
    position: absolute;
    top: -42px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1;
    color: var(--kskm-primary-dark);
    white-space: nowrap;
}

.kskm-chart-number,
.kskm-chart-unit {
    display: block;
}

.kskm-chart-unit {
    font-size: .66em;
    font-weight: 700;
    line-height: 1;
    text-transform: lowercase;
}

.kskm-chart-label {
    position: absolute;
    bottom: -26px;
    left: 50%;
    transform: translateX(-50%) rotate(-38deg);
    transform-origin: top left;
    font-size: .76rem;
    color: var(--kskm-muted);
    white-space: nowrap;
}

@media (max-width: 900px) {
    .kskm-purple-grid,
    .kskm-rankings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .kskm-purple-grid,
    .kskm-rankings-grid {
        grid-template-columns: 1fr;
    }

    .kskm-chart-item {
        flex-basis: 34px;
    }
}

/* Profil účastníka a souhlasové checkboxy */
.kskm-profile-box {
    margin: 18px 0;
}

.kskm-checkbox-line label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 720px;
    line-height: 1.45;
}

.kskm-checkbox-line input[type="checkbox"] {
    width: auto;
    min-width: 18px;
    height: 18px;
    margin-top: .15em;
}

.kskm-checkbox-line a {
    color: var(--kskm-primary-dark);
    font-weight: 700;
}


.kskm-invite-email-form {
    margin-top: 12px;
    padding: 16px;
    border-radius: 16px;
    background: #faf7ff;
    border: 1px solid rgba(110, 58, 180, .18);
}

.kskm-invite-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.kskm-invite-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}


/* Verze 0.6.0 – osobní nástěnka, týmový detail a profilový plugin */
.kskm-account-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.kskm-account-hero-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.kskm-avatar,
.kskm img.kskm-avatar,
.kskm .avatar.kskm-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    object-fit: cover;
    flex: 0 0 auto;
    box-shadow: 0 5px 14px rgba(0,0,0,.12);
}

.kskm-account-hero .kskm-avatar,
.kskm-account-hero img.kskm-avatar,
.kskm-account-hero .avatar.kskm-avatar {
    width: 74px;
    height: 74px;
}

.kskm-avatar-empty,
.kskm-team-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, #7b2cff, #ec2f86);
    box-shadow: 0 5px 14px rgba(123, 44, 255, .22);
    flex: 0 0 auto;
}

.kskm-team-icon-large {
    width: 74px;
    height: 74px;
    font-size: 1.75rem;
}

.kskm-ranking-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.kskm-ranking-main strong a {
    color: inherit;
    text-decoration: none;
}

.kskm-ranking-main strong a:hover {
    text-decoration: underline;
}

.kskm-button-secondary {
    background: #f0e8ff !important;
    color: #6226b6 !important;
}

.kskm-button-secondary:hover {
    background: #e3d3ff !important;
    color: #4d168d !important;
}

.kskm-profile-layout,
.kskm-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.kskm-profile-core-plugin .ksupf-profile-wrap {
    margin: 0;
    max-width: none;
}

.kskm-profile-core-plugin .ksupf-section {
    border-radius: 16px;
}

.kskm-card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.kskm-mini-card {
    border: 1px solid var(--kskm-border);
    border-radius: 14px;
    padding: 14px;
    background: #fff;
}

.kskm-mini-card strong,
.kskm-mini-card span,
.kskm-mini-card small {
    display: block;
}

.kskm-mini-card span {
    margin-top: 4px;
    color: var(--kskm-primary-dark);
    font-weight: 800;
}

.kskm-mini-card small {
    margin-top: 4px;
    color: var(--kskm-muted);
}

.kskm-member-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.kskm-member-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--kskm-border);
    border-radius: 16px;
    padding: 14px;
    background: #fff;
}

.kskm-member-card small {
    display: block;
    margin-top: 3px;
    color: var(--kskm-muted);
}

.kskm-member-card b {
    color: var(--kskm-primary-dark);
    white-space: nowrap;
}

.kskm-empty-state {
    background: #fff8fb;
}

@media (max-width: 900px) {
    .kskm-profile-layout,
    .kskm-dashboard-grid,
    .kskm-member-cards,
    .kskm-card-list {
        grid-template-columns: 1fr;
    }

    .kskm-account-hero {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .kskm-member-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .kskm-member-card b {
        grid-column: 1 / -1;
    }
}


.kskm-inline-delete-form {
    display: inline-flex;
    margin-left: 6px;
}

.kskm-mini-button-danger {
    background: #fff1f1 !important;
    color: #9d1d1d !important;
    border-color: #f1b8b8 !important;
}


/* Verze 0.7.1 – profilový obrázek týmu a oprava ikon v žebříčku */
.kskm-team-avatar,
.kskm img.kskm-team-avatar {
    border-radius: 999px;
    object-fit: cover;
    flex: 0 0 auto;
    box-shadow: 0 5px 14px rgba(0,0,0,.12);
}

.kskm-ranking-main .kskm-team-icon,
.kskm-ranking-main .kskm-team-avatar,
.kskm-ranking-main img.kskm-team-avatar,
.kskm-ranking-main .kskm-avatar,
.kskm-ranking-main img.kskm-avatar {
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    max-width: 44px !important;
}

.kskm-ranking-list li::after,
.kskm-ranking-list li > .kskm-ranking-main::before,
.kskm-ranking-list li > .kskm-ranking-main::after,
.kskm-ranking-main .kskm-team-icon::before,
.kskm-ranking-main .kskm-team-icon::after,
.kskm-ranking-main .kskm-team-avatar::before,
.kskm-ranking-main .kskm-team-avatar::after {
    content: none !important;
    display: none !important;
}

.kskm-team-manage-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.kskm-team-manage-header h3 {
    margin-bottom: 4px;
}

.kskm-team-image-form-wrap {
    margin: 18px 0 20px;
    padding: 16px;
    border: 1px solid var(--kskm-border);
    border-radius: 16px;
    background: #faf8ff;
}

.kskm-team-image-form input[type="file"] {
    display: block;
    width: 100%;
    padding: 10px;
    border: 1px dashed var(--kskm-border);
    border-radius: 12px;
    background: #fff;
}

@media (max-width: 600px) {
    .kskm-team-manage-header {
        align-items: flex-start;
    }
}


/* Verze 0.7.2 – sjednocené nahrávání obrázku týmu s profilovým pluginem */
.kskm-team-image-form-wrap {
    background: #f8f8f8;
    border-color: var(--kskm-border);
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.kskm-team-picture-container {
    margin-top: 12px;
}

.kskm-team-picture-preview {
    width: 100px;
    height: 100px;
    margin-bottom: 12px;
}

.kskm-team-picture-preview .kskm-team-avatar,
.kskm-team-picture-preview img.kskm-team-avatar,
.kskm-team-picture-preview .kskm-team-icon {
    width: 100px !important;
    height: 100px !important;
    max-width: 100px !important;
    display: inline-flex;
    border-radius: 50%;
    object-fit: cover;
}

.kskm-team-file-upload {
    position: relative;
    display: inline-block;
    margin: 8px 10px 8px 0;
    padding: 9px 16px;
    border: 0;
    border-radius: 4px;
    background: var(--kskm-primary);
    color: #fff !important;
    cursor: pointer;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none !important;
    transition: background .2s ease, transform .08s ease;
}

.kskm-team-file-upload:hover,
.kskm-team-file-upload:focus {
    background: var(--kskm-primary-dark);
    color: #fff !important;
}

.kskm-team-file-upload:active {
    transform: translateY(1px);
}

.kskm-team-file-upload input[type="file"],
.kskm-team-image-form .kskm-team-picture-input {
    display: none !important;
}

.kskm-team-upload-progress {
    width: 100%;
    max-width: 420px;
    height: 8px;
    margin: 0 0 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #eee;
}

.kskm-team-upload-progress .bar {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: var(--kskm-primary);
    transition: width .25s ease;
}

.kskm-team-upload-message {
    min-height: 1.6em;
}

.kskm-upload-success,
.kskm-upload-error {
    display: inline-block;
    margin: 8px 0 10px;
    font-weight: 700;
}

.kskm-upload-success {
    color: #1d7f38;
}

.kskm-upload-error {
    color: #b00020;
}

.kskm-team-delete-image {
    display: none !important;
}

.kskm-js .kskm-team-delete-image:not(.is-hidden) {
    display: inline-block !important;
}

.kskm-team-delete-image.is-hidden {
    display: none !important;
}

.kskm-js .kskm-team-image-fallback {
    display: none !important;
}

@media (max-width: 600px) {
    .kskm-team-file-upload,
    .kskm-team-delete-image,
    .kskm-team-image-fallback {
        width: 100%;
        margin-right: 0;
        margin-bottom: 8px;
        text-align: center;
    }
}


/* Payments */
.kskm-payment-box .kskm-payment-status-row{margin:0 0 12px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}.kskm-badge-danger{display:inline-block;padding:3px 8px;border-radius:999px;background:#fee2e2;color:#991b1b;font-weight:700;font-size:.85em}.kskm-payment-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px;margin-top:16px}.kskm-payment-option{border:1px solid rgba(140,42,190,.16);border-radius:18px;padding:18px;background:#fff}.kskm-payment-option h4{margin-top:0}.kskm-bank-grid{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:start}.kskm-bank-grid code{font-size:1.05em}.kskm-bank-qr{text-align:center}.kskm-bank-qr img{display:block;max-width:240px;height:auto;border-radius:14px;background:#fff;padding:8px;border:1px solid #eee}@media(max-width:640px){.kskm-bank-grid{grid-template-columns:1fr}.kskm-bank-qr{text-align:left}}


/* Verze 0.8.6 – izolace frontendu od globálních stylů šablony Twenty Twenty a podobných šablon.
   Twenty Twenty nastavuje html { font-size: 62.5%; }, široká pravidla pro .entry-content, tabulky,
   seznamy a tlačítka. Plugin proto uvnitř .kskm používá vlastní typografický základ a u drobných
   prvků používá px místo rem, aby texty grafů a štítků nebyly nečekaně malé. */
.entry-content > .kskm,
.entry-content > .kskm:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.is-style-wide),
[class*="__inner-container"] > .kskm,
[class*="__inner-container"] > .kskm:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.is-style-wide) {
    max-width: 1100px;
    width: calc(100% - 40px);
}

.kskm,
.kskm *:not(svg):not(path),
.kskm-box,
.kskm-box *:not(svg):not(path) {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    letter-spacing: normal;
}

.kskm,
.kskm-box {
    font-size: 16px;
    line-height: 1.5;
    color: #1f1f1f;
    text-align: left;
}

.kskm p,
.kskm li,
.kskm label,
.kskm input,
.kskm select,
.kskm textarea,
.kskm button,
.kskm table,
.kskm th,
.kskm td,
.kskm small,
.kskm code,
.kskm-box p,
.kskm-box li,
.kskm-box label,
.kskm-box input,
.kskm-box select,
.kskm-box textarea,
.kskm-box button,
.kskm-box table,
.kskm-box th,
.kskm-box td,
.kskm-box small,
.kskm-box code {
    font-size: inherit;
    line-height: inherit;
    letter-spacing: normal;
}

.kskm p,
.kskm-box p {
    margin: 0 0 14px;
}

.kskm h1,
.kskm h2,
.kskm h3,
.kskm h4,
.kskm h5,
.kskm h6,
.kskm-box h1,
.kskm-box h2,
.kskm-box h3,
.kskm-box h4,
.kskm-box h5,
.kskm-box h6 {
    font-family: inherit;
    letter-spacing: normal;
    line-height: 1.18;
    font-weight: 800;
    color: inherit;
    margin: 0 0 16px;
}

.kskm h1,
.kskm-box h1 { font-size: 36px; }
.kskm h2,
.kskm-box h2 { font-size: 30px; }
.kskm h3,
.kskm-box h3 { font-size: 22px; }
.kskm h4,
.kskm-box h4 { font-size: 18px; }
.kskm h5,
.kskm-box h5 { font-size: 16px; }
.kskm h6,
.kskm-box h6 { font-size: 14px; text-transform: none; }

.kskm ul,
.kskm ol,
.kskm-box ul,
.kskm-box ol {
    margin: 0 0 16px 22px;
    padding: 0;
}

.kskm li,
.kskm-box li {
    margin: 4px 0 0;
}

.kskm a,
.kskm-box a {
    transition: color .15s ease, background-color .15s ease, transform .15s ease;
}

.kskm table,
.kskm-box table {
    font-size: 15px;
    line-height: 1.4;
    margin: 0;
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

.kskm th,
.kskm td,
.kskm-box th,
.kskm-box td {
    line-height: 1.4;
    padding: 13px 14px;
    text-align: left;
}

.kskm label,
.kskm-box label {
    display: block;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
    margin: 0 0 6px;
}

.kskm input[type="text"],
.kskm input[type="password"],
.kskm input[type="email"],
.kskm input[type="url"],
.kskm input[type="date"],
.kskm input[type="number"],
.kskm textarea,
.kskm select,
.kskm-box input[type="text"],
.kskm-box input[type="password"],
.kskm-box input[type="email"],
.kskm-box input[type="url"],
.kskm-box input[type="date"],
.kskm-box input[type="number"],
.kskm-box textarea,
.kskm-box select {
    font-size: 16px;
    line-height: 1.35;
    letter-spacing: normal;
    min-height: auto;
}

.kskm button,
.kskm .kskm-button,
.kskm .kskm-mini-button,
.kskm .kskm-team-file-upload,
.kskm input[type="button"],
.kskm input[type="submit"],
.kskm-box button,
.kskm-box .kskm-button,
.kskm-box .kskm-mini-button,
.kskm-box input[type="button"],
.kskm-box input[type="submit"] {
    font-family: inherit;
    font-size: 15px;
    line-height: 1.25;
    letter-spacing: normal;
    text-transform: none;
}

.kskm .kskm-mini-button,
.kskm-box .kskm-mini-button {
    font-size: 13px;
}

.kskm-progress-label,
.kskm-help {
    font-size: 15px;
}

.kskm-stat strong {
    font-size: clamp(22px, 3vw, 34px);
}

.kskm-stat span {
    font-size: 15px;
}

.kskm-badge,
.kskm-badge-warning,
.kskm-badge-danger {
    font-size: 13px;
    line-height: 1.3;
}

.kskm-purple-card strong {
    font-size: clamp(22px, 2.4vw, 36px);
}

.kskm-purple-card span {
    font-size: 15px;
    line-height: 1.35;
}

.kskm-ranking-list {
    margin: 0;
    padding: 0;
}

.kskm-ranking-list li {
    margin: 0;
    line-height: 1.35;
}

.kskm-ranking-list li small,
.kskm-mini-card small,
.kskm-member-card small {
    font-size: 13px;
    line-height: 1.35;
}

.kskm-chart {
    font-size: 16px;
    line-height: 1.2;
}

.kskm-chart-value {
    font-size: 12px;
    line-height: 1;
}

.kskm-chart-value .kskm-chart-unit {
    font-size: 9px;
    line-height: 1;
}

.kskm-chart-label {
    font-size: 12px;
    line-height: 1.15;
}

.kskm-team-icon-large {
    font-size: 28px;
}

.kskm code,
.kskm-box code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .92em;
    padding: 2px 5px;
}

@media (max-width: 700px) {
    .entry-content > .kskm,
    .entry-content > .kskm:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.is-style-wide),
    [class*="__inner-container"] > .kskm,
    [class*="__inner-container"] > .kskm:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.is-style-wide) {
        width: calc(100% - 24px);
    }

    .kskm h1,
    .kskm-box h1 { font-size: 30px; }
    .kskm h2,
    .kskm-box h2 { font-size: 26px; }
    .kskm h3,
    .kskm-box h3 { font-size: 20px; }
}


/* Verze 0.8.7 – karty vlastních zápisů a sjednocená správa týmu */
.kskm-section-heading,
.kskm-team-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.kskm-section-heading h3,
.kskm-team-panel-header h4 {
    margin: 0 0 4px;
}

.kskm-entry-history {
    margin-top: 22px;
}

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

.kskm-entry-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--kskm-border);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff, #fffafd);
    box-shadow: 0 8px 22px rgba(0,0,0,.035);
}

.kskm-entry-card.is-suspicious {
    border-color: #f4d39a;
    background: linear-gradient(180deg, #fff, #fff8ed);
}

.kskm-entry-date {
    width: 82px;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #f5efff;
    color: #5b229f;
    text-align: center;
}

.kskm-entry-date strong {
    display: block;
    font-size: 18px;
    line-height: 1.1;
}

.kskm-entry-date span {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    color: var(--kskm-muted);
}

.kskm-entry-main {
    min-width: 0;
}

.kskm-entry-km {
    display: flex;
    align-items: baseline;
    gap: 5px;
    color: var(--kskm-primary-dark);
}

.kskm-entry-km strong {
    font-size: 24px;
    line-height: 1;
}

.kskm-entry-km span {
    font-size: 14px;
    font-weight: 800;
}

.kskm-entry-note {
    margin: 7px 0 0;
    color: #333;
    line-height: 1.35;
}

.kskm-muted {
    color: var(--kskm-muted);
}

.kskm-entry-status {
    white-space: nowrap;
}

.kskm-entry-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.kskm-entry-actions .kskm-inline-delete-form {
    margin-left: 0;
}

.kskm-entry-empty,
.kskm-compact-empty {
    padding: 16px;
    border-radius: 14px;
    border: 1px dashed rgba(123, 44, 255, .25);
}

.kskm-team-sections {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 18px;
    margin-top: 22px;
}

.kskm-team-panel {
    padding: 18px;
    border: 1px solid var(--kskm-border);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #fffafd);
    box-shadow: 0 8px 22px rgba(0,0,0,.035);
}

.kskm-member-cards-manage {
    grid-template-columns: 1fr;
}

.kskm-member-cards-manage .kskm-member-card {
    border-radius: 15px;
    box-shadow: none;
}

.kskm-member-avatar .avatar,
.kskm-member-avatar img {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 999px;
}

.kskm-member-main {
    min-width: 0;
}

.kskm-member-main strong {
    display: block;
    color: #251229;
    overflow-wrap: anywhere;
}

.kskm-member-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.kskm-member-remove-form {
    margin: 0;
}

.kskm-team-note {
    margin: 12px 0 0;
}

.kskm-invite-email-form {
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.kskm-invite-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.kskm-invite-row label {
    margin: 0;
}

.kskm-invite-row .kskm-button {
    min-height: 44px;
}

.kskm-copy-card {
    margin-top: 14px;
    padding: 14px;
    border-radius: 14px;
    background: #faf7ff;
    border: 1px solid rgba(110,58,180,.16);
}

.kskm-copy-card label {
    margin: 0;
}

.kskm-copy-card .kskm-copy-input {
    margin-top: 7px;
    max-width: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 14px;
}

.kskm-invites-recent {
    margin-top: 16px;
}

.kskm-invites-recent h5 {
    margin: 0 0 8px;
    font-size: 16px;
}

.kskm-invite-list-modern li {
    align-items: center;
    margin: 0;
    padding: 9px 0;
}

@media (max-width: 820px) {
    .kskm-entry-card,
    .kskm-team-sections,
    .kskm-invite-row {
        grid-template-columns: 1fr;
    }

    .kskm-entry-card {
        align-items: stretch;
    }

    .kskm-entry-date {
        width: 100%;
        min-height: auto;
        align-items: flex-start;
        padding: 12px;
        text-align: left;
    }

    .kskm-entry-actions,
    .kskm-member-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .kskm-member-cards-manage .kskm-member-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .kskm-member-actions {
        grid-column: 1 / -1;
    }
}

/* Verze 0.8.9 – kompaktní správa obrázku týmu, kopírování pozvánky a jednodušší osobní nástěnka */
.kskm-team-image-inline {
    flex: 0 0 auto;
    width: 140px;
}

.kskm-team-image-form-inline {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: center;
}

.kskm-team-image-form-inline .kskm-team-picture-container,
.kskm-team-image-form-inline .kskm-team-picture-preview,
.kskm-team-image-form-inline .kskm-team-picture-preview-small {
    margin: 0 auto 8px;
}

.kskm-team-picture-preview-small,
.kskm-team-picture-preview-small .kskm-team-avatar,
.kskm-team-picture-preview-small img.kskm-team-avatar,
.kskm-team-picture-preview-small .kskm-team-icon {
    width: 74px !important;
    height: 74px !important;
    max-width: 74px !important;
}

.kskm-team-image-form-inline .kskm-team-upload-progress {
    max-width: 118px;
    height: 6px;
    margin: 8px auto;
}

.kskm-team-image-form-inline .kskm-team-upload-message {
    min-height: 0;
    font-size: 12px;
    line-height: 1.25;
}

.kskm-team-image-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.kskm-team-image-form-inline .kskm-team-file-upload,
.kskm-team-image-form-inline .kskm-team-delete-image,
.kskm-team-image-form-inline .kskm-team-image-fallback {
    width: 100%;
    max-width: 132px;
    margin: 0;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
}

.kskm-team-title-meta {
    min-width: 0;
}

.kskm-copy-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 8px;
    align-items: stretch;
    margin-top: 7px;
}

.kskm-copy-card .kskm-copy-field .kskm-copy-input {
    margin-top: 0;
}

.kskm-copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 44px;
    border: 1px solid rgba(110,58,180,.22);
    border-radius: 12px;
    background: #fff;
    color: #6226b6;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: background .15s ease, transform .15s ease, border-color .15s ease;
}

.kskm-copy-button:hover,
.kskm-copy-button:focus,
.kskm-copy-button.is-copied {
    background: #f0e8ff;
    border-color: rgba(110,58,180,.38);
    transform: translateY(-1px);
}

.kskm-copy-feedback {
    min-height: 18px;
    margin-top: 6px;
    color: #1d7f38;
    font-size: 13px;
    font-weight: 700;
}

.kskm-copy-feedback.is-error {
    color: #b00020;
}

@media (max-width: 640px) {
    .kskm-team-manage-header {
        display: grid;
        grid-template-columns: 1fr;
        text-align: left;
    }

    .kskm-team-image-inline,
    .kskm-team-image-form-inline .kskm-team-file-upload,
    .kskm-team-image-form-inline .kskm-team-delete-image,
    .kskm-team-image-form-inline .kskm-team-image-fallback {
        max-width: none;
        width: 100%;
    }

    .kskm-team-image-actions {
        align-items: stretch;
    }
}


.kskm-suspicious-tooltip {
    display: none;
    position: relative;
    margin-top: 10px;
    padding: 11px 13px 11px 40px;
    border: 1px solid rgba(255, 150, 0, 0.35);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff7df, #fff0f7);
    color: #5f3200;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    box-shadow: 0 10px 24px rgba(90, 44, 0, 0.08);
}

.kskm-suspicious-tooltip::before {
    content: "🏃";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    line-height: 1;
}

.kskm-suspicious-tooltip.is-visible {
    display: block;
}

/* Ochrana běžných textů pluginu před barevnými pravidly aktivní šablony. */
.kskm,
.kskm-box,
.kskm-hero,
.kskm-stat,
.kskm-ranking-panel,
.kskm-team-panel,
.kskm-entry-card,
.kskm-mini-card,
.kskm-member-card {
    color: #1f1f1f !important;
}

.kskm p,
.kskm li,
.kskm label,
.kskm legend,
.kskm th,
.kskm td,
.kskm caption,
.kskm small,
.kskm strong,
.kskm h1,
.kskm h2,
.kskm h3,
.kskm h4,
.kskm h5,
.kskm h6,
.kskm-box p,
.kskm-box li,
.kskm-box label,
.kskm-box legend,
.kskm-box th,
.kskm-box td,
.kskm-box caption,
.kskm-box small,
.kskm-box strong,
.kskm-box h1,
.kskm-box h2,
.kskm-box h3,
.kskm-box h4,
.kskm-box h5,
.kskm-box h6 {
    color: inherit !important;
}

.kskm a:not(.kskm-button),
.kskm-box a:not(.kskm-button) {
    color: var(--kskm-primary-dark) !important;
}

.kskm input:not([type="submit"]):not([type="button"]),
.kskm select,
.kskm textarea,
.kskm-box input:not([type="submit"]):not([type="button"]),
.kskm-box select,
.kskm-box textarea {
    color: #1f1f1f !important;
    background-color: #fff !important;
}

/* Zachování záměrných barev zvláštních prvků. */
.kskm-purple-card {
    color: #fff !important;
}

.kskm-stat strong,
.kskm-ranking-list li b,
.kskm-mini-card span,
.kskm-member-card b,
.kskm-entry-km {
    color: var(--kskm-primary-dark) !important;
}

.kskm-rules,
.kskm-progress-label,
.kskm-help,
.kskm-stat span,
.kskm-ranking-list li small,
.kskm-mini-card small,
.kskm-member-card small,
.kskm-entry-date span,
.kskm-muted {
    color: var(--kskm-muted) !important;
}

.kskm-message {
    color: #1b6b2a !important;
}

.kskm-message-error {
    color: #9d1d1d !important;
}

.kskm-form-errors {
    color: #8d1633 !important;
}

.kskm-entry-date {
    color: #5b229f !important;
}

.kskm-member-main strong {
    color: #251229 !important;
}

