/* Wspólne wykończenie nawigacji i strefy konta, w obu motywach. */
:where(button, input, select, textarea) { font: inherit; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

.page-title { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.2; overflow-wrap: anywhere; }
.page-desc { line-height: 1.7; }

/* Header account menu dropdown */
.header-account-menu { position: relative; }
.header-account-menu summary { list-style: none; min-height: 42px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.header-account-menu summary::-webkit-details-marker { display: none; }
.header-account-menu summary .fa-chevron-down { font-size: 10px; margin-left: 4px; transition: transform 0.2s ease; }
.header-account-menu[open] summary .fa-chevron-down { transform: rotate(180deg); }

.header-account-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 120;
    width: 250px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    box-shadow: var(--shadow-lg, 0 10px 25px -5px rgba(0,0,0,0.1));
}

.header-account-name {
    display: block;
    padding: 10px 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
    overflow-wrap: anywhere;
}

.header-account-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.header-account-dropdown a:hover,
.header-account-dropdown a:focus-visible {
    background: var(--primary-light);
    color: var(--primary);
}

.header-account-dropdown i {
    width: 18px;
    text-align: center;
    color: var(--primary);
}

.header-account-dropdown a:last-child {
    border-top: 1px solid var(--border);
    margin-top: 6px;
    color: var(--error, #ef4444);
}
.header-account-dropdown a:last-child i {
    color: var(--error, #ef4444);
}

/* Account area styling */
.account-overview { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.account-overview h2 { font-size: 24px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.account-overview p, .account-sync-note { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.account-sync-note { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }

.account-summary-grid > .card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; padding: 24px; }
.account-summary-grid .account-card-label { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.account-summary-grid h2 { font-size: 24px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.account-summary-grid p { color: var(--muted); font-size: 14px; line-height: 1.65; }
.account-summary-grid > .card > .btn, .account-summary-grid > .card > form { margin-top: auto; }
.account-summary-grid form { padding-top: 8px; }

.account-player { margin: 0; min-width: 0; display: flex; align-items: center; gap: 14px; }
.account-player > div { min-width: 0; }
.account-player img { flex-shrink: 0; border-radius: 8px; }

.account-creator-card { padding: 24px; }
.account-creator-content h2, .account-card-heading h2 { font-size: 23px; font-weight: 700; line-height: 1.35; }
.account-creator-content p { font-size: 14px; line-height: 1.7; }
.account-creator-content .account-card-label { display: block; margin-bottom: 4px; }
.account-creator-codes { gap: 8px; }

.account-section .alert { margin-bottom: 20px; }
.account-section .player-profile-stats > div { min-width: 0; }
.account-section .player-profile-stats dd { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; font-weight: 700; }
.account-section .ranking-table { font-size: 14px; }
.account-section .ranking-table td { vertical-align: middle; }
.account-section .account-amount { white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--primary); }
.account-section .account-empty { padding: 36px 24px; text-align: center; color: var(--muted); white-space: normal; }

.creator-dashboard-code-top { flex-wrap: wrap; gap: 10px; }
.creator-dashboard-code-card.is-disabled { opacity: 0.7; }
.creator-dashboard-code-card dd { overflow-wrap: anywhere; }
.creator-dashboard .table-responsive { overflow-x: auto; }
.creator-dashboard .creator-report-footnote { line-height: 1.7; }

@media (max-width: 1080px) { .header-account-menu { display: none; } }
@media (max-width: 760px) {
    .account-section { padding: 28px 0 48px; }
    .account-overview { align-items: flex-start; flex-direction: column; gap: 8px; }
    .account-summary-grid { gap: 14px; }
    .account-creator-card { padding: 20px; gap: 14px; }
    .account-creator-content h2, .account-card-heading h2 { font-size: 21px; }
    .account-card-heading { flex-wrap: wrap; gap: 14px; padding: 20px; }
    .account-section .btn { white-space: normal; text-align: center; }
    .account-section .player-profile-card header { gap: 14px; }
    .account-section .player-profile-card header > div { min-width: 0; }
    .account-section .player-profile-card h2 { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
