.is-hidden {
    display: none !important;
}

.modal-api-loading {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 100%;
    padding: 20px;
    border-radius: inherit;
    background: var(--surface);
    color: var(--text);
    opacity: 0.95;
    font-size: 13px;
    cursor: wait;
}

.legal-panel {
    width: min(720px, calc(100% - 32px));
}

.legal-panel p {
    color: var(--muted);
    line-height: 1.9;
}

.admin-limit-section {
    margin-top: 24px;
    max-width: 620px;
}

.admin-limit-section .button {
    margin-top: 16px;
}

.form-message.success {
    color: var(--green);
}

[data-profile-agent] {
    object-fit: cover;
}

.history-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.history-delete {
    color: var(--red);
}

.result-shell .player-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 9px;
}

.result-shell .player-name-row h1 {
    min-width: 0;
    margin: 0;
}

.player-favorite-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--muted);
    font: 500 13px/1.4 var(--body-font);
    white-space: nowrap;
    flex-shrink: 0;
}

.player-favorite-button.icon-only {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 10px;
}

.player-favorite-button .icon {
    width: 16px;
    height: 16px;
}

.player-favorite-button.is-favorite {
    color: #f0bd4f;
    background: #27251f;
    border-color: #3d3829;
}

.player-favorite-button.is-favorite .icon {
    fill: currentColor;
}

.player-favorite-button:not(:disabled):hover {
    color: var(--blue);
    background: var(--blue-soft);
    border-color: var(--blue);
}

.player-favorite-button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.player-favorite-button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.saved-players-note {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

@media (max-width: 720px) {
    .player-favorite-button {
        min-height: 44px;
    }

    .player-favorite-button.icon-only {
        width: 44px;
        height: 44px;
        min-height: 44px;
    }

    .legal-panel {
        width: calc(100% - 24px);
    }
}

@media (max-width: 780px) {
    html,
    body {
        width: 100vw;
        max-width: 100vw;
    }

    body {
        overflow-x: hidden;
    }

    .site-header {
        overflow: hidden;
    }

    .header-inner {
        position: relative;
        display: block;
        width: 100vw !important;
        max-width: 100vw !important;
        padding: 0 18px;
    }

    .brand {
        position: absolute;
        top: 21px;
        left: 18px;
    }

    .header-actions {
        position: fixed;
        top: 19px;
        right: 18px !important;
        width: auto;
        height: 38px;
        display: flex;
        justify-content: flex-end;
        gap: 6px;
        margin: 0;
    }

    .header-actions .button-small {
        width: auto;
        min-height: 36px;
        padding: 0 10px;
        overflow: hidden;
        font-size: 12px;
        white-space: nowrap;
    }

    .header-actions .button-small::before {
        content: none;
    }

    .search-input {
        position: relative;
        display: grid;
        grid-template-columns: 18px minmax(0, 1fr) 72px !important;
        width: calc(100vw - 36px) !important;
        max-width: calc(100vw - 36px) !important;
        min-width: 0;
        overflow: hidden;
    }

    .search-input > .icon {
        grid-column: 1;
    }

    .search-input input {
        grid-column: 2;
        width: 100%;
        min-width: 0;
        padding-right: 76px;
    }

    .search-input .button {
        position: absolute;
        top: 6px;
        right: 6px;
        width: 72px;
        min-width: 72px;
        padding: 10px 8px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .home-main,
    .page-shell {
        width: calc(100vw - 36px) !important;
        max-width: none;
    }

    .feature-card {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }

    .feature-grid,
    .search-form {
        width: calc(100vw - 36px) !important;
        max-width: calc(100vw - 36px) !important;
    }
}
