* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: #0d0d12; color: #e0e0e0; padding: 40px; }
h1 { color: #E84C88; margin-bottom: 20px; }
h2 { color: #ff6b9d; margin: 30px 0 10px; }
.card { background: rgba(30,28,36,0.95); border: 1px solid #333; border-radius: 12px; padding: 20px; margin: 15px 0; }
.status { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.ok { background: #1b4332; color: #95d5b2; }
.ko { background: #3d0000; color: #ff6b6b; }
code { background: #1a1a2e; padding: 3px 8px; border-radius: 4px; font-size: 14px; color: #a8dadc; }
pre { background: #1a1a2e; padding: 15px; border-radius: 8px; overflow-x: auto; font-size: 13px; color: #a8dadc; }
a { color: #E84C88; text-decoration: none; }
a:hover { text-decoration: underline; }
input { background: #1a1a2e; border: 1px solid #444; color: #e0e0e0; padding: 10px 14px; border-radius: 8px; width: 500px; font-size: 14px; }
button { background: #E84C88; color: #111119; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; }
button:hover { background: #ff6b9d; }
button:disabled { cursor: not-allowed; opacity: 0.6; }
.endpoint { margin: 8px 0; overflow-wrap: anywhere; }
.method { color: #95d5b2; font-weight: 700; margin-right: 8px; }
.search-field-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}
.search-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.search-field > label { color: #d4f0f1; font-size: 13px; font-weight: 650; }
.search-field small { color: #aaa7b3; font-size: 11px; line-height: 1.4; }
.search-control { position: relative; min-width: 0; }
.searchable-input {
    width: 100%;
    min-width: 0;
    background: #1a1a2e;
    border: 1px solid #555363;
    color: #f1f0f4;
    padding: 11px 13px;
    border-radius: 8px;
    font-size: 13px;
    transition: border-color 180ms ease, background-color 180ms ease;
}
.searchable-input:hover { border-color: #777485; }
.searchable-input:focus {
    outline: 3px solid rgba(232,76,136,0.24);
    outline-offset: 1px;
    border-color: #E84C88;
    background: #20203a;
}
.searchable-input:disabled { color: #8c8995; cursor: not-allowed; opacity: 0.72; }
.search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 20;
    max-height: 264px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #555363;
    border-radius: 9px;
    background: #171722;
}
.search-suggestions[hidden] { display: none; }
.search-suggestion {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #e9e7ee;
    text-align: left;
    font-size: 12px;
    font-weight: 550;
}
.search-suggestion:hover,
.search-suggestion.is-active {
    background: rgba(232,76,136,0.14);
    color: #ffffff;
}
.search-suggestion-value { min-width: 0; overflow-wrap: anywhere; }
.search-suggestion-value mark {
    border-radius: 2px;
    background: rgba(255,141,182,0.22);
    color: #ffb3ce;
}
.search-suggestion-meta { flex: 0 0 auto; color: #aaa7b3; font-size: 10px; white-space: nowrap; }
.search-suggestion-empty { padding: 13px 11px; color: #aaa7b3; font-size: 12px; line-height: 1.45; }
.auth-code-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}
.auth-code-form input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 auto;
}
.auth-code-form button { flex: 0 0 auto; }
.auth-account { overflow-wrap: anywhere; }
.country-admin {
    overflow: hidden;
    padding: 0;
    border-color: #3d3846;
    background: #17161d;
}
.country-admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    border-bottom: 1px solid #393641;
}
.country-admin-heading { max-width: 70ch; }
.country-admin-heading h2 {
    margin: 0 0 7px;
    color: #ff78aa;
    font-size: clamp(21px, 3vw, 28px);
    letter-spacing: -0.02em;
    text-wrap: balance;
}
.country-admin-heading p {
    color: #c9c5d0;
    font-size: 14px;
    line-height: 1.55;
    text-wrap: pretty;
}
.country-admin-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    flex-wrap: wrap;
}
.country-admin-link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 8px;
    background: #2d2a34;
    color: #f3eff5;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.country-admin-link.is-primary { background: #397b64; color: #ffffff; }
.country-admin-link:hover { background: #3a3643; color: #ffffff; text-decoration: none; }
.country-admin-link.is-primary:hover { background: #306a56; }
.country-admin-link:focus-visible,
.country-admin-button:focus-visible {
    outline: 3px solid rgba(255,120,170,0.48);
    outline-offset: 2px;
}
.country-admin-meta {
    display: flex;
    gap: 0;
    overflow-x: auto;
    border-bottom: 1px solid #393641;
    background: #111017;
    font-variant-numeric: tabular-nums;
}
.country-admin-meta-item {
    min-width: 150px;
    padding: 12px 18px;
}
.country-admin-meta-item + .country-admin-meta-item { border-left: 1px solid #34313b; }
.country-admin-meta-value {
    display: block;
    color: #f4f1f6;
    font-size: 16px;
    font-weight: 750;
}
.country-admin-meta-label {
    display: block;
    margin-top: 2px;
    color: #aaa5b2;
    font-size: 11px;
}
.country-admin-workspace {
    display: grid;
    grid-template-columns: minmax(300px, 0.92fr) minmax(340px, 1.08fr);
    min-height: 370px;
}
.country-admin-controls {
    padding: 24px;
    border-right: 1px solid #393641;
}
.country-admin-field { margin-bottom: 17px; }
.country-admin-field-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}
.country-admin-field label {
    display: block;
    margin-bottom: 7px;
    color: #e2dee7;
    font-size: 13px;
    font-weight: 700;
}
.country-admin-field-heading label { margin-bottom: 0; }
.country-admin-field small {
    display: block;
    margin-top: 6px;
    color: #aaa5b2;
    font-size: 12px;
    line-height: 1.45;
}
.country-admin-input,
.country-admin-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #514c5a;
    border-radius: 8px;
    background: #0f0e14;
    color: #f3eff5;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
}
.country-admin-input.is-data { font-family: Consolas, 'Courier New', monospace; }
.country-admin-input:hover,
.country-admin-select:hover { border-color: #716a7b; }
.country-admin-input:focus,
.country-admin-select:focus {
    outline: 3px solid rgba(232,76,136,0.23);
    outline-offset: 1px;
    border-color: #e84c88;
}
.country-admin-select:disabled { color: #77717f; cursor: not-allowed; opacity: 0.7; }
.country-picker { position: relative; }
.country-picker-input {
    padding-right: 42px;
    background-image:
        linear-gradient(45deg, transparent 50%, #b7b1bf 50%),
        linear-gradient(135deg, #b7b1bf 50%, transparent 50%);
    background-position:
        calc(100% - 19px) 20px,
        calc(100% - 14px) 20px;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
}
.country-picker-input::-webkit-search-cancel-button { margin-right: 10px; }
.country-picker-results {
    position: relative;
    z-index: 25;
    max-height: min(310px, 45vh);
    margin-top: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 6px;
    border: 1px solid #55505f;
    border-radius: 10px;
    background: #15141b;
    box-shadow: 0 18px 42px rgba(0,0,0,0.38);
}
.country-picker-results[hidden] { display: none; }
.country-picker-option {
    display: grid;
    width: 100%;
    min-height: 52px;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 8px 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #f1edf3;
    text-align: left;
}
.country-picker-option:hover,
.country-picker-option.is-active {
    background: rgba(232,76,136,0.14);
    color: #ffffff;
}
.country-picker-option img {
    width: 34px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    outline: 1px solid rgba(255,255,255,0.12);
    background: #28252f;
}
.country-picker-option-copy { min-width: 0; }
.country-picker-option-name {
    display: block;
    font-size: 13px;
    font-weight: 720;
}
.country-picker-option-code {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: #a9a3b1;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.country-picker-empty {
    padding: 14px 12px;
    color: #b9b3c0;
    font-size: 12px;
    line-height: 1.5;
}
.country-admin-inline-action {
    min-height: 44px;
    flex: 0 0 auto;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: #ff8db6;
    font-size: 12px;
    font-weight: 750;
    text-decoration: underline;
    text-decoration-color: rgba(255,141,182,0.42);
    text-underline-offset: 3px;
}
.country-admin-inline-action:hover { color: #ffc0d6; }
.country-admin-inline-action:focus-visible {
    border-radius: 4px;
    outline: 3px solid rgba(255,120,170,0.42);
    outline-offset: 3px;
}
.country-import-panel {
    margin: -3px 0 18px;
    padding: 16px;
    border: 1px solid #443f4b;
    border-radius: 10px;
    background: #111017;
}
.country-import-panel[hidden] { display: none; }
.country-import-heading {
    margin-bottom: 14px;
}
.country-import-heading strong {
    display: block;
    color: #f2eef4;
    font-size: 14px;
}
.country-import-heading span {
    display: block;
    margin-top: 4px;
    color: #aaa5b2;
    font-size: 12px;
    line-height: 1.45;
}
.country-import-file {
    width: 100%;
    min-height: 46px;
    padding: 8px;
    border: 1px dashed #5a5462;
    border-radius: 8px;
    background: #0d0c11;
    color: #cfc9d3;
    font-size: 11px;
}
.country-import-file::file-selector-button {
    min-height: 30px;
    margin-right: 10px;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    background: #35313d;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
}
.country-import-preview {
    display: flex;
    min-height: 54px;
    align-items: center;
    gap: 11px;
    margin-top: 10px;
    padding: 9px;
    border-radius: 8px;
    background: #1b1921;
}
.country-import-preview img {
    width: 48px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 5px;
    object-fit: cover;
    outline: 1px solid rgba(255,255,255,0.1);
}
.country-import-preview-copy {
    min-width: 0;
    color: #bcb6c3;
    font-size: 11px;
    line-height: 1.4;
}
.country-import-preview-copy strong {
    display: block;
    overflow: hidden;
    color: #eeeaf0;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.country-import-status {
    min-height: 18px;
    margin-top: 9px;
    color: #aaa5b2;
    font-size: 12px;
    line-height: 1.45;
}
.country-import-status[data-state="error"] { color: #ffb4c2; }
.country-import-status[data-state="success"] { color: #a9e5c6; }
.country-import-actions {
    display: flex;
    gap: 8px;
    margin-top: 13px;
}
.country-admin-button-row { display: flex; gap: 9px; }
.country-admin-button {
    min-height: 44px;
    flex: 1;
    border-radius: 8px;
    padding: 10px 15px;
    transition: background-color 160ms ease, opacity 160ms ease, transform 120ms ease;
}
.country-admin-button:active:not(:disabled) { transform: scale(0.96); }
.country-admin-button.is-secondary { background: #35313d; color: #ffffff; }
.country-admin-button.is-secondary:hover { background: #433e4b; }
.country-admin-button.is-saving { background: #e84c88; color: #111119; }
.country-admin-status {
    min-height: 42px;
    margin-top: 16px;
    padding: 11px 12px;
    border-radius: 8px;
    background: #23202a;
    color: #cac5d1;
    font-size: 13px;
    line-height: 1.45;
}
.country-admin-status[data-state="success"] { background: #173c2e; color: #b9ebd1; }
.country-admin-status[data-state="warning"] { background: #453516; color: #ffe5a6; }
.country-admin-status[data-state="error"] { background: #4b1d27; color: #ffd0d8; }
.country-admin-dialog {
    width: min(440px, calc(100vw - 32px));
    max-width: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid #4a4552;
    border-radius: 12px;
    background: #17161d;
    color: #f3eff5;
    box-shadow: 0 22px 70px rgba(0,0,0,0.48);
}
.country-admin-dialog::backdrop { background: rgba(6,5,9,0.78); }
.country-admin-dialog-header {
    padding: 20px 20px 12px;
    border-bottom: 1px solid #393641;
}
.country-admin-dialog-header h3 {
    margin: 0 0 6px;
    color: #ff78aa;
    font-size: 19px;
}
.country-admin-dialog-header p {
    color: #bdb8c5;
    font-size: 12px;
    line-height: 1.5;
}
.country-admin-dialog-body { padding: 18px 20px 20px; }
.country-admin-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}
.country-admin-dialog-actions button { min-height: 42px; }
.country-admin-dialog-hint {
    display: block;
    min-height: 18px;
    margin-top: 6px;
    color: #aaa5b2;
    font-size: 11px;
}
.country-admin-dialog-hint[data-state="error"] { color: #ffb4c2; }
.country-admin-preview {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    background: #121118;
}
.country-admin-empty {
    max-width: 44ch;
    color: #aaa5b2;
    font-size: 13px;
    line-height: 1.6;
}
.country-admin-empty strong {
    display: block;
    margin-bottom: 6px;
    color: #eeebf1;
    font-size: 17px;
}
.country-player-view[hidden],
.country-admin-empty[hidden] { display: none; }
.country-player-identity {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}
.country-player-flag {
    width: 84px;
    height: 60px;
    flex: 0 0 auto;
    border-radius: 10px;
    object-fit: cover;
    outline: 1px solid rgba(255,255,255,0.1);
    background: #24212b;
}
.country-player-name {
    color: #ffffff;
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 780;
    letter-spacing: -0.025em;
    line-height: 1.1;
    overflow-wrap: anywhere;
}
.country-player-country {
    margin-top: 5px;
    color: #ff9fc2;
    font-size: 14px;
    font-weight: 650;
}
.country-player-data {
    display: grid;
    gap: 0;
    border-top: 1px solid #393641;
}
.country-player-data-row {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid #302d36;
}
.country-player-data-row[hidden] { display: none; }
.country-player-data-label { color: #aaa4b2; font-size: 12px; }
.country-player-data-value {
    color: #ddd8e2;
    font-size: 13px;
    overflow-wrap: anywhere;
}
.country-player-data-value.is-code {
    font-family: Consolas, 'Courier New', monospace;
    font-variant-numeric: tabular-nums;
}
.find-form {
    background: rgba(20,18,24,0.5);
    padding: 20px;
    border-radius: 10px;
}
.find-input-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 8px;
}
.find-input-header label { color: #d4f0f1; font-weight: 650; }
.find-input-count { color: #aaa7b3; font-size: 12px; font-variant-numeric: tabular-nums; }
.find-textarea {
    background: #1a1a2e;
    border: 1px solid #555363;
    color: #f1f0f4;
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    font-size: 13px;
    min-height: 150px;
    font-family: Consolas, 'Courier New', monospace;
    resize: vertical;
}
.find-textarea:focus {
    outline: 3px solid rgba(232,76,136,0.24);
    outline-offset: 1px;
    border-color: #E84C88;
}
.find-results-panel {
    background: #1a1a2e;
    border-radius: 10px;
    padding: 16px;
}
.find-results-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}
.find-title-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.find-title-group h3 { color: #E84C88; margin: 0; }
.find-results-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.find-export-button {
    min-height: 40px;
    border: 0;
    border-radius: 7px;
    padding: 8px 14px;
    color: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
}
.find-export-button.export-all { background: #357d65; }
.find-export-button.export-missing { background: #8a2940; }
.find-export-button:disabled { opacity: 0.45; cursor: not-allowed; }
.find-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,217,125,0.12);
    color: #ffe29a;
    font-size: 12px;
    font-weight: 650;
}
.find-progress-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #0a0a0f;
    margin-bottom: 8px;
}
.find-progress-bar {
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: #E84C88;
    transition: transform 200ms cubic-bezier(0.25, 1, 0.5, 1);
}
.find-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #c4c1cc;
    font-size: 12px;
    margin-bottom: 14px;
    font-variant-numeric: tabular-nums;
}
.find-stats {
    display: flex;
    align-items: stretch;
    background: #111119;
    border-radius: 8px;
    margin-bottom: 14px;
    overflow: hidden;
}
.find-stat { flex: 1; min-width: 0; padding: 10px 14px; text-align: center; }
.find-stat + .find-stat { border-left: 1px solid #33313c; }
.find-stat-value { display: block; font-size: 21px; font-weight: 750; font-variant-numeric: tabular-nums; }
.find-stat-label { display: block; margin-top: 2px; color: #aaa7b3; font-size: 11px; }
.find-table-wrap {
    max-height: 520px;
    overflow: auto;
    border: 1px solid #373541;
    border-radius: 8px;
    background: #0d0d12;
}
.find-table { width: 100%; min-width: 880px; border-collapse: collapse; font-size: 12px; }
.find-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 12px;
    background: #171722;
    color: #c9c7d0;
    text-align: left;
    font-weight: 650;
    border-bottom: 1px solid #373541;
}
.find-table td { padding: 10px 12px; border-bottom: 1px solid #292833; vertical-align: middle; }
.find-table tbody tr:last-child td { border-bottom: 0; }
.find-table tbody tr:hover { background: #15151d; }
.find-flag { width: 70px; text-align: center; }
.flag-image { display: block; width: 36px; height: 26px; margin: 0 auto; border-radius: 4px; object-fit: cover; }
.flag-symbol { display: block; font-size: 24px; line-height: 1; }
.flag-country { display: block; color: #aaa7b3; font-size: 10px; margin-top: 5px; white-space: nowrap; }
.epic-username { color: #f1f0f4; font-weight: 700; font-size: 13px; }
.unknown-value { color: #ff8d8d; font-style: italic; }
.epic-id-cell { min-width: 300px; max-width: 360px; }
.epic-id-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #3d3a46;
    border-radius: 8px;
    background: #18171f;
}
.epic-id-result.is-absent {
    border-color: #8b3a4e;
    background: #4b1c28;
}
.epic-id-main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}
.epic-id-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffc1ce;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
}
.epic-id-status::before {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #ff718d;
    content: '';
}
.epic-id-value {
    max-width: 100%;
    color: #b8b4c0;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.epic-id-result.is-absent .epic-id-value {
    color: #fff5f7;
    font-weight: 700;
}
.epic-id-copy {
    min-height: 32px;
    padding: 6px 9px;
    border: 1px solid #56525e;
    border-radius: 6px;
    background: #24222b;
    color: #dcd8e1;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}
.epic-id-result.is-absent .epic-id-copy {
    border-color: #a84a61;
    background: #32141c;
    color: #ffd6df;
}
.epic-id-copy:hover {
    border-color: #ff78aa;
    background: #302d37;
}
.epic-id-copy:focus-visible {
    outline: 3px solid rgba(232,76,136,0.28);
    outline-offset: 2px;
}
.country-token { color: #b9e3e5; font-family: Consolas, monospace; word-break: break-word; }
.tracker-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 11px;
    border: 1px solid #E84C88;
    border-radius: 7px;
    color: #ff8db6;
    font-weight: 700;
    white-space: nowrap;
}
.tracker-link:hover { background: rgba(232,76,136,0.12); text-decoration: none; }
.tracker-unavailable { color: #8c8995; }
.find-empty { padding: 28px 16px; color: #aaa7b3; text-align: center; }
@media (max-width: 720px) {
    .find-results-panel { padding: 12px; }
    .find-results-header { align-items: stretch; flex-direction: column; }
    .find-results-actions { display: grid; grid-template-columns: 1fr; }
    .find-export-button { width: 100%; }
    .find-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border: 1px solid #33313c;
    }
    .find-stat + .find-stat { border-left: 0; }
    .find-stat:nth-child(even) { border-left: 1px solid #33313c; }
    .find-stat:nth-child(n + 3) { border-top: 1px solid #33313c; }
    .find-table-wrap {
        max-height: none;
        overflow: visible;
        border: 0;
        background: transparent;
    }
    .find-table {
        display: block;
        min-width: 0;
    }
    .find-table thead { display: none; }
    .find-table tbody {
        display: grid;
        gap: 12px;
    }
    .find-table tbody tr {
        display: block;
        overflow: hidden;
        border: 1px solid #373541;
        border-radius: 10px;
        background: #111119;
    }
    .find-table tbody tr:hover { background: #111119; }
    .find-table td {
        display: grid;
        grid-template-columns: minmax(92px, 0.38fr) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 10px 12px;
    }
    .find-table td::before {
        grid-column: 1;
        color: #8f8997;
        content: attr(data-label);
        font-size: 11px;
        font-weight: 650;
        line-height: 1.4;
    }
    .find-table td > * { grid-column: 2; }
    .find-table td:last-child { border-bottom: 0; }
    .find-flag {
        width: auto;
        text-align: left;
    }
    .flag-image,
    .flag-symbol { margin: 0; }
    .flag-country {
        margin-top: 4px;
        white-space: normal;
    }
    .epic-id-cell {
        min-width: 0;
        max-width: none;
    }
    .epic-id-result {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
    }
    .epic-id-copy { width: 100%; }
}
.live-progress-track {
    position: relative;
    height: 25px;
    overflow: hidden;
    border-radius: 8px;
    background: #09090d;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.live-progress-track.is-tall { height: 30px; }
.live-progress-fill {
    position: absolute;
    inset: 0;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    overflow: hidden;
    background: linear-gradient(90deg, #d93f7d 0%, #E84C88 45%, #ff7aaa 100%);
    transition: transform 700ms cubic-bezier(0.2, 0, 0, 1);
}
.live-progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 35%;
    transform: translateX(-120%) skewX(-18deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.32), transparent);
}
.live-progress-track.is-running .live-progress-fill::after {
    animation: live-progress-sheen 1.8s ease-in-out infinite;
}
.live-progress-track.is-resetting .live-progress-fill { transition-duration: 0s; }
.live-progress-label {
    position: relative;
    z-index: 1;
    display: flex;
    width: max-content;
    min-width: 44px;
    height: 100%;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0 7px;
    border-radius: 999px;
    background: transparent;
    color: #ffffff;
    font-size: 12px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}
@keyframes live-progress-sheen {
    0%, 18% { transform: translateX(-120%) skewX(-18deg); }
    72%, 100% { transform: translateX(390%) skewX(-18deg); }
}
.resolver-copy {
    max-width: 72ch;
    margin: -8px 0 18px;
    color: #c4c1cc;
    font-size: 13px;
    line-height: 1.55;
}
.resolver-form {
    padding: 20px;
    border-radius: 10px;
    background: rgba(20,18,24,0.5);
}
.resolver-dropzone {
    display: flex;
    min-height: 154px;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 1px dashed #656170;
    border-radius: 10px;
    background: #171722;
    color: #e9e7ee;
    cursor: pointer;
    text-align: center;
    transition: border-color 180ms ease, background-color 180ms ease;
}
.resolver-dropzone:hover,
.resolver-dropzone.is-dragging {
    border-color: #E84C88;
    background: rgba(232,76,136,0.09);
}
.resolver-dropzone:focus-within {
    outline: 3px solid rgba(232,76,136,0.24);
    outline-offset: 2px;
    border-color: #E84C88;
}
.resolver-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}
.resolver-drop-title {
    display: block;
    margin-bottom: 7px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}
.resolver-drop-hint {
    display: block;
    color: #b8b5c1;
    font-size: 12px;
    line-height: 1.5;
}
.resolver-selection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0 10px;
    color: #c4c1cc;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.resolver-selection strong { color: #f1f0f4; }
.resolver-file-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 16px;
}
.resolver-file-list:empty { display: none; }
.resolver-file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 9px 11px;
    border-radius: 8px;
    background: #111119;
}
.resolver-file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: #e9e7ee;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.resolver-file-size { flex: 0 0 auto; color: #aaa7b3; font-size: 11px; }
.resolver-file-remove {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    border: 1px solid #555363;
    border-radius: 6px;
    background: transparent;
    color: #d7d4dd;
    font-size: 15px;
    line-height: 1;
}
.resolver-file-remove:hover { border-color: #ff8d8d; background: rgba(255,107,107,0.1); color: #ffb2b2; }
.resolver-actions { display: flex; gap: 10px; }
.resolver-actions button { min-height: 42px; }
.resolver-start { flex: 1; color: #111119; }
.resolver-start:hover { color: #111119; }
.resolver-reset {
    border: 1px solid #555363;
    background: transparent;
    color: #d7d4dd;
}
.resolver-reset:hover { border-color: #777485; background: #24232c; }
.resolver-selection-notice {
    min-height: 18px;
    margin-top: 9px;
    color: #ffb2b2;
    font-size: 12px;
    line-height: 1.45;
}
.resolver-results {
    margin-top: 20px;
    padding: 17px;
    border-radius: 10px;
    background: #1a1a2e;
}
.resolver-results[hidden] { display: none; }
.resolver-results-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.resolver-results-title { margin: 0 0 7px; color: #f5f3f7; font-size: 17px; }
.resolver-live-message { color: #c4c1cc; font-size: 12px; line-height: 1.5; }
.resolver-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255,217,125,0.12);
    color: #ffe29a;
    font-size: 12px;
    font-weight: 700;
}
.resolver-status[data-state="done"] { background: rgba(149,213,178,0.12); color: #b4e8cb; }
.resolver-status[data-state="warning"] { background: rgba(255,217,125,0.12); color: #ffe29a; }
.resolver-status[data-state="error"] { background: rgba(255,107,107,0.12); color: #ffb2b2; }
.resolver-progress-track {
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #09090d;
}
.resolver-progress-bar {
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: #E84C88;
    transition: transform 200ms cubic-bezier(0.25, 1, 0.5, 1);
}
.resolver-progress-track.is-indeterminate .resolver-progress-bar {
    width: 38%;
    transform: translateX(-110%);
    animation: resolver-indeterminate 1.15s ease-in-out infinite;
}
@keyframes resolver-indeterminate {
    0% { transform: translateX(-110%); }
    100% { transform: translateX(365%); }
}
.resolver-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 15px;
    color: #c4c1cc;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.resolver-progress-meta strong { color: #f1f0f4; }
.resolver-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 1px;
    margin-bottom: 14px;
    border-radius: 8px;
    background: #33313c;
}
.resolver-stat { min-width: 0; padding: 11px 12px; background: #111119; text-align: center; }
.resolver-stat-value {
    display: block;
    color: #f1f0f4;
    font-size: 20px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}
.resolver-stat-label { display: block; margin-top: 2px; color: #aaa7b3; font-size: 10px; }
.resolver-log {
    max-height: 156px;
    overflow-y: auto;
    padding: 10px 12px;
    border-radius: 8px;
    background: #0d0d12;
    color: #b9e3e5;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.55;
}
.resolver-log-entry + .resolver-log-entry { margin-top: 4px; }
.resolver-log-entry[data-state="success"] { color: #a8e5c2; }
.resolver-log-entry[data-state="warning"] { color: #ffe29a; }
.resolver-log-entry[data-state="error"] { color: #ffb2b2; }
.resolver-download {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 14px;
    border-radius: 8px;
    background: #2f7059;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}
.resolver-download:hover { background: #285f4c; color: #ffffff; text-decoration: none; }
.resolver-download[hidden] { display: none; }
@media (max-width: 980px) {
    .country-admin-header { flex-direction: column; }
    .country-admin-actions { width: 100%; }
    .country-admin-workspace { grid-template-columns: 1fr; }
    .country-admin-controls { border-right: 0; border-bottom: 1px solid #393641; }
}
@media (max-width: 760px) {
    body { padding: 18px; }
    .auth-code-form { align-items: stretch; flex-direction: column; }
    .auth-code-form button { width: 100%; }
    .search-field-grid { grid-template-columns: 1fr; }
    .radio-option-grid { flex-direction: column; }
    .country-admin-header,
    .country-admin-controls,
    .country-admin-preview { padding: 19px; }
    .country-admin-actions { flex-direction: column; }
    .country-admin-actions a { width: 100%; }
    .country-admin-meta {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }
    .country-admin-meta-item { min-width: 0; padding: 12px 14px; }
    .country-admin-meta-item + .country-admin-meta-item { border-left: 0; }
    .country-admin-meta-item:nth-child(even) { border-left: 1px solid #34313b; }
    .country-admin-meta-item:nth-child(n+3) { border-top: 1px solid #34313b; }
    .country-admin-button-row { flex-direction: column; }
    .country-import-actions { flex-direction: column-reverse; }
    .country-import-actions button { width: 100%; }
    .country-admin-dialog-actions { flex-direction: column-reverse; }
    .country-admin-dialog-actions button { width: 100%; }
    .country-player-identity { align-items: flex-start; }
    .country-player-data-row { grid-template-columns: 1fr; gap: 5px; }
    .find-results-header { align-items: flex-start; flex-direction: column; }
    .find-results-actions { width: 100%; flex-direction: column; }
    .find-results-actions button { width: 100%; }
    .find-progress-meta { flex-direction: column; gap: 3px; }
    .resolver-dropzone { min-height: 132px; padding: 19px; }
    .resolver-actions { flex-direction: column; }
    .resolver-actions button { width: 100%; }
    .resolver-results-header { flex-direction: column; }
    .resolver-progress-meta { flex-direction: column; gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    .searchable-input,
    .country-admin-button,
    .find-progress-bar,
    .live-progress-fill,
    .resolver-dropzone,
    .resolver-progress-bar,
    .radio-option,
    .submit-btn {
        transition: none !important;
    }
    .radio-option:hover,
    .submit-btn:hover {
        transform: none !important;
    }
    .live-progress-track.is-running .live-progress-fill::after {
        display: none;
        animation: none;
    }
    .resolver-progress-track.is-indeterminate .resolver-progress-bar {
        width: 38%;
        transform: none;
        animation: none;
    }
}
/* ══════════════════════════════════════════════════════════════════════════
   Système commun : tokens, shell, navigation, composants partagés
   ══════════════════════════════════════════════════════════════════════════ */
:root {
    color-scheme: dark;
    --bg: #0d0d12;
    --surface: #17161d;
    --surface-raised: #1e1c25;
    --surface-sunken: #111017;
    --line: #2d2a34;
    --line-strong: #46414f;
    --text: #f1eef4;
    --text-muted: #b3aebb;
    --text-faint: #8f8a98;
    --accent: #e84c88;
    --accent-hover: #ff6b9d;
    --accent-soft: rgba(232, 76, 136, 0.14);
    --accent-text: #ff8db6;
    --on-accent: #16131a;
    --ok: #74d3a4;
    --ok-soft: rgba(116, 211, 164, 0.13);
    --warn: #ffd97d;
    --warn-soft: rgba(255, 217, 125, 0.12);
    --danger: #ff8080;
    --danger-soft: rgba(255, 107, 107, 0.13);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

html { scroll-padding-top: 96px; }
[hidden] { display: none !important; }
.btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
body {
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(232, 76, 136, 0.38); color: #ffffff; }
:focus-visible { outline: 3px solid rgba(255, 120, 170, 0.55); outline-offset: 2px; }
* { scrollbar-color: #3a3642 transparent; scrollbar-width: thin; }
a { text-underline-offset: 3px; }
code, pre, .mono { font-family: var(--mono); }
.card {
    margin: 16px 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}
.card > h2:first-child, .card-header h2 { margin-top: 0; }
.card h2 { color: var(--accent-text); font-size: 21px; letter-spacing: -0.015em; }
.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.card-header h2 { margin-bottom: 4px; }
.card-lead { max-width: 70ch; color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.status { font-variant-numeric: tabular-nums; }
.ok { background: var(--ok-soft); color: var(--ok); }
.ko { background: var(--danger-soft); color: var(--danger); }

/* ── En-tête et navigation centrée ── */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(13, 13, 18, 0.9);
    backdrop-filter: saturate(150%) blur(12px);
}
.app-header-inner,
.app-main { max-width: 1240px; margin: 0 auto; padding-right: 32px; padding-left: 32px; }
.app-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    min-height: 68px;
}
.app-brand { display: flex; align-items: center; gap: 11px; min-width: 0; color: var(--text); justify-self: start; }
.app-brand:hover { text-decoration: none; }
.app-brand img { width: 32px; height: 32px; border-radius: 8px; flex: 0 0 auto; }
.app-brand h1 {
    margin: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.app-header-end { display: flex; align-items: center; gap: 2px; justify-self: end; min-width: 0; }
.app-session {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 160ms ease;
}
.app-session:hover { background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.app-session-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--danger); }
.app-session.is-ok .app-session-dot { background: var(--ok); }
.app-session.is-partial .app-session-dot { background: var(--warn); }
.app-session-name { max-width: 160px; overflow: hidden; color: var(--text-faint); font-weight: 500; text-overflow: ellipsis; }
.app-logout button {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-faint);
    transition: background-color 160ms ease, color 160ms ease;
}
.app-logout button:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.app-logout svg { width: 17px; height: 17px; }

.app-tabs {
    display: flex;
    gap: 4px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}
.app-tabs::-webkit-scrollbar { display: none; }
.app-tab {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 7px 13px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-faint);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 160ms ease, color 160ms ease;
}
.app-tab:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.app-tab[aria-selected="true"] { background: rgba(255, 255, 255, 0.09); color: #ffffff; }
.app-tab svg { width: 16px; height: 16px; flex: 0 0 auto; opacity: 0.85; }
.app-tab[aria-selected="true"] svg { color: var(--accent-text); opacity: 1; }
.app-tab-busy {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--warn);
    animation: app-pulse 1.4s ease-in-out infinite;
}
.app-tab-busy[hidden] { display: none; }
@keyframes app-pulse { 50% { opacity: 0.35; } }

.app-main { padding-top: 32px; padding-bottom: 72px; }
.app-view-intro { margin: 0 0 8px; }
.app-view-intro h2 { margin: 0 0 6px; color: var(--text); font-size: 26px; letter-spacing: -0.025em; text-wrap: balance; }
.app-view-intro p { max-width: 72ch; color: var(--text-muted); font-size: 14px; line-height: 1.55; text-wrap: pretty; }
[data-view][hidden] { display: none !important; }
.view-enter { animation: view-enter 260ms var(--ease-out); }
@keyframes view-enter { from { opacity: 0; transform: translateY(6px); } }

.app-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 16px 0;
    padding: 14px 18px;
    border: 1px solid #5b4a2a;
    border-radius: var(--radius);
    background: #1f1a12;
    color: #f1dfb8;
    font-size: 14px;
    line-height: 1.45;
}
.app-notice a {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 700;
}
.app-notice a:hover { background: var(--accent-hover); text-decoration: none; }

/* ── Champs ── */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { color: var(--text); font-size: 13px; font-weight: 650; }
.field-optional { margin-left: 4px; color: var(--text-faint); font-weight: 500; }
.field-hint { color: var(--text-faint); font-size: 12px; line-height: 1.45; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-row-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-sunken);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    transition: border-color 160ms ease, background-color 160ms ease;
}
.input::placeholder { color: #7f7a88; }
.input:hover { border-color: #625b6e; }
.input:focus { border-color: var(--accent); outline: 3px solid rgba(232, 76, 136, 0.22); outline-offset: 1px; }
.input:disabled { cursor: not-allowed; opacity: 0.6; }
textarea.input { min-height: 120px; font-family: var(--mono); font-size: 13px; line-height: 1.5; resize: vertical; }

/* ── Boutons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--surface-raised);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 120ms ease;
}
.btn:hover { background: #2a2731; color: #ffffff; text-decoration: none; }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { cursor: not-allowed; opacity: 0.5; }
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { border-color: var(--line-strong); background: transparent; }
.btn-secondary:hover { border-color: #625b6e; background: rgba(255, 255, 255, 0.04); }
.btn-danger { border-color: rgba(255, 128, 128, 0.45); background: transparent; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); color: #ffb0b0; }
.btn-ok { background: #397b64; color: #ffffff; }
.btn-ok:hover { background: #438c73; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Choix segmentés (radio) ── */
.choice-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; border: 0; }
.choice-group legend { margin-bottom: 8px; color: var(--text); font-size: 13px; font-weight: 650; }
.choice {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-sunken);
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease;
}
.choice:hover { border-color: #625b6e; }
.choice input {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--accent);
}
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice:has(input:focus-visible) { outline: 3px solid rgba(255, 120, 170, 0.55); outline-offset: 2px; }
.choice-title { color: var(--text); font-size: 14px; font-weight: 650; }
.choice-desc { color: var(--text-muted); font-size: 12px; line-height: 1.4; }

/* ── Disclosure ── */
.disclosure { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-sunken); }
.disclosure summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    color: var(--text);
    font-size: 13px;
    font-weight: 650;
    list-style: none;
    cursor: pointer;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 180ms var(--ease-out);
}
.disclosure[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.disclosure-summary-meta { margin-left: auto; color: var(--text-faint); font-weight: 500; }
.disclosure-body { padding: 4px 14px 16px; }

/* ── Statuts, statistiques, journal ── */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--warn-soft);
    color: var(--warn);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill[data-state="done"] { background: var(--ok-soft); color: var(--ok); }
.status-pill[data-state="error"] { background: var(--danger-soft); color: var(--danger); }
.status-pill[data-state="idle"] { background: rgba(255, 255, 255, 0.06); color: var(--text-muted); }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--line); }
.stat { padding: 12px 14px; background: var(--surface-sunken); }
.stat-value { display: block; color: var(--text); font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-label { display: block; margin-top: 2px; color: var(--text-faint); font-size: 12px; }
.run-panel { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #131218; }
.run-panel[hidden] { display: none; }
.run-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.run-panel-header h3 { color: var(--text); font-size: 15px; }
.run-summary { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.run-summary strong { color: var(--text); }
.log {
    max-height: 240px;
    overflow-y: auto;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #0a0a0f;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.6;
}
.log-line { color: #a8c7d8; }
.log-line[data-type="success"] { color: var(--ok); }
.log-line[data-type="warn"] { color: var(--warn); }
.log-line[data-type="error"] { color: var(--danger); }
.log-time { margin-right: 8px; color: #5f5a68; }

/* ── Leaderboards ── */
.tournament-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tournament-picker .search-field > label { color: var(--text); }
.link-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 8px 8px 13px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-sunken);
}
.link-preview code { flex: 1 1 auto; min-width: 0; padding: 0; background: none; color: #a8c7d8; font-size: 12px; overflow-wrap: anywhere; }
.link-preview.is-empty code { color: var(--text-faint); font-family: var(--font); }
.history-empty { padding: 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--text-faint); font-size: 13px; text-align: center; }
.history-list { display: flex; flex-direction: column; list-style: none; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.history-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 16px;
    padding: 12px 14px;
}
.history-item + .history-item { border-top: 1px solid var(--line); }
.history-title { min-width: 0; overflow: hidden; color: var(--text); font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.history-meta { color: var(--text-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.history-meta b { color: var(--text-muted); font-weight: 600; }
.history-actions { display: flex; grid-row: span 2; gap: 8px; }

/* ── Comptes / API ── */
.auth-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.auth-item { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-sunken); }
.auth-item-label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 12px; }
.auth-item-hint { display: block; margin-top: 8px; color: var(--text-faint); font-size: 12px; line-height: 1.4; }
.auth-account-id { color: var(--text-faint); }
.auth-steps { margin: 4px 0 16px 20px; color: var(--text-muted); line-height: 1.9; }
.auth-code-form input { min-height: 44px; }
.endpoint {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 4px 12px;
    margin: 0;
    padding: 10px 0;
    border-top: 1px solid var(--line);
    font-size: 14px;
    overflow-wrap: anywhere;
}
.endpoint .method { padding-top: 2px; font-size: 12px; letter-spacing: 0.04em; }
.endpoint-group { margin: 22px 0 6px; color: var(--text); font-size: 15px; }

/* ── Liens entre outils dans le tableau de résultats ── */
.find-row-action {
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent-text);
    font-size: 12px;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.find-row-action:hover { background: none; color: #ffffff; }
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    z-index: 80;
    padding: 11px 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-raised);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    color: var(--text);
    font-size: 14px;
    transform: translateX(-50%);
    animation: toast-in 240ms var(--ease-out);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ── Page d'accès ── */
.access-body { display: grid; min-height: 100vh; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(232, 76, 136, 0.12), transparent 70%), var(--bg); }
.access-shell { width: 100%; max-width: 380px; }
.access-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 32px 28px 26px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    text-align: center;
}
.access-logo { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 14px; }
.access-card h1 { margin: 0 0 6px; color: var(--text); font-size: 20px; letter-spacing: -0.02em; }
.access-lead { margin-bottom: 22px; color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.access-label { margin-bottom: 8px; color: var(--text); font-size: 13px; font-weight: 650; text-align: left; }
.access-input {
    width: 100%;
    min-height: 54px;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface-sunken);
    color: var(--text);
    font-family: var(--mono);
    font-size: 22px;
    letter-spacing: 0.4em;
    text-align: center;
}
.access-input:focus { border-color: var(--accent); outline: 3px solid rgba(232, 76, 136, 0.22); outline-offset: 1px; }
.access-input[aria-invalid="true"] { border-color: var(--danger); }
.access-error { margin-top: 10px; color: var(--danger); font-size: 13px; text-align: left; }
.access-submit {
    min-height: 48px;
    margin-top: 18px;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--on-accent);
    font-size: 15px;
    font-weight: 700;
}
.access-submit:hover { background: var(--accent-hover); }
.access-note { margin-top: 16px; color: var(--text-faint); font-size: 12px; }

/* ── Responsive ── */
@media (max-width: 1080px) {
    .app-header-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px 16px;
        padding-top: 12px;
        padding-bottom: 10px;
    }
    .app-tabs { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
    html { scroll-padding-top: 130px; }
}
@media (max-width: 760px) {
    .app-header-inner,
    .app-main { padding-right: 16px; padding-left: 16px; }
    .app-tabs { justify-self: stretch; }
    .app-tab { padding: 8px 11px; }
    .app-session-name { display: none; }
    .app-main { padding-top: 20px; }
    .app-view-intro h2 { font-size: 22px; }
    .card { padding: 18px; }
    .card-header { flex-direction: column; }
    .field-row, .field-row-4, .tournament-picker, .choice-group { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .auth-grid { grid-template-columns: 1fr; }
    .app-notice { align-items: stretch; flex-direction: column; }
    .app-notice a { text-align: center; }
    .endpoint { grid-template-columns: 1fr; }
    .btn-row > .btn { flex: 1 1 auto; }
    .history-item { grid-template-columns: 1fr; }
    .history-actions { grid-row: auto; }
    .history-actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .app-tab, .app-tab svg, .btn, .choice, .disclosure summary::after { transition: none; }
    .app-tab-busy, .view-enter, .toast { animation: none; }
}

/* ── Couleurs sémantiques des statistiques ── */
.find-stat-value, .resolver-stat-value { color: var(--text); }
.is-accent.find-stat-value, .is-accent.resolver-stat-value { color: var(--accent-text); }
.is-ok.find-stat-value, .is-ok.resolver-stat-value { color: var(--ok); }
.is-info.resolver-stat-value { color: #a8c7d8; }
.is-warn.find-stat-value, .is-warn.resolver-stat-value { color: var(--warn); }
.is-danger.find-stat-value, .is-danger.resolver-stat-value { color: var(--danger); }
.pre-follow { margin-top: 8px; }
.field-hint-spaced { margin-top: 10px; }
.field-spaced { margin-bottom: 16px; }
.find-results { margin-top: 20px; }
.find-results[hidden] { display: none; }
.card h2 { margin-bottom: 14px; }
.card-header h2 { margin-bottom: 4px; }
.form-error { color: var(--danger); font-size: 13px; }
.card.country-admin { padding: 0; overflow: hidden; }
.app-brand { max-width: 100%; overflow: hidden; }
@media (max-width: 480px) {
    .app-brand h1 { font-size: 15px; }
    .app-session { padding: 7px 9px; }
    .app-session > span:not(.app-session-dot) { display: none; }
}
.endpoint-desc { display: block; margin-top: 3px; color: var(--text-muted); font-size: 13px; }

/* ── Navigation mobile : 5 onglets égaux, icône au-dessus du libellé ── */
.app-tab-label-short { display: none; }
@media (max-width: 600px) {
    .app-header-inner { padding-bottom: 8px; }
    .app-tabs {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 2px;
        width: 100%;
        overflow: visible;
    }
    .app-tab {
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        min-height: 50px;
        padding: 6px 2px;
        border-radius: 10px;
        font-size: 11px;
        line-height: 1.1;
    }
    .app-tab svg { width: 18px; height: 18px; }
    .app-tab-label { display: none; }
    .app-tab-label,
    .app-tab-label-short { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
    .app-tab-label-short { display: block; }
    .app-tab .app-tab-label:not(:has(+ .app-tab-label-short)) { display: block; }
    .app-tab-busy { position: absolute; top: 6px; right: calc(50% - 16px); }
}
#copyUsernamesBtn { border: 1px solid var(--line-strong); background: transparent; color: var(--text); }
#copyUsernamesBtn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.05); }
@media (max-width: 760px) {
    .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stat { padding: 10px; }
    .stat-value { font-size: 18px; }
}
