/* Synkrone — coquille unique (salle machines). Chargé en dernier. */
/* Polices : lien async dans le HTML, pas d'@import (bloque le premier rendu). */

:root {
    --pierre: #eef0ea;
    --pierre-2: #e3e6dd;
    --basalte: #1b211e;
    --basalte-80: #1b211ecc;
    --blanc: #ffffff;
    --mousse: #3f6b52;
    --mousse-fonce: #2e5039;
    --mousse-clair: #e4ece4;
    --ambre: #b8823d;
    --ambre-clair: #f3e7d3;
    --brique: #a8462f;
    --brique-clair: #f5e2dc;
    --ardoise: #5c6a66;
    --ardoise-30: #5c6a6640;
    --ardoise-15: #5c6a661f;

    --sk-bg: var(--pierre);
    --sk-bg-elevated: var(--pierre-2);
    --sk-surface: var(--blanc);
    --sk-surface-2: var(--pierre-2);
    --sk-surface-hover: #d8dcd3;
    --sk-border: var(--ardoise-15);
    --sk-border-strong: var(--ardoise-30);
    --sk-text: var(--basalte);
    --sk-text-muted: var(--ardoise);
    --sk-text-faint: #7a8884;
    --sk-accent: var(--mousse);
    --sk-accent-hover: var(--mousse-fonce);
    --sk-accent-soft: var(--mousse-clair);
    --sk-accent-ring: #3f6b5280;
    --sk-success: var(--mousse);
    --sk-warning: var(--ambre);
    --sk-danger: var(--brique);
    --sk-info: var(--ardoise);
    --sk-discord: #5865f2;
    --sk-gold: var(--ambre);
    --sk-font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --sk-serif: "Zilla Slab", Georgia, serif;
    --sk-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;
    --sk-radius: 4px;
    --sk-radius-lg: 6px;
    --sk-shadow: 0 2px 12px rgba(27, 33, 30, 0.08);
    --sk-header-h: 72px;
    --sk-nav-h: 64px;
    --sk-subnav-h: 56px;
    --sk-footer-h: 40px;
    --sk-fs: 16px;
    --sk-fs-sm: 14px;
    --sk-fs-xs: 13px;
    --sk-fs-lg: 17px;
    --sk-fs-xl: 21px;
    --sk-fs-2xl: 26px;
    --sk-fs-3xl: 32px;
    --sk-space: 8px;

    --bg-main: var(--sk-bg);
    --bg-alt: var(--sk-bg-elevated);
    --bg: var(--sk-bg);
    --bg-panel: var(--sk-surface);
    --bg-panel-strong: var(--sk-surface-2);
    --bg-panel-hover: var(--sk-surface-hover);
    --panel: var(--sk-surface);
    --card: var(--sk-surface-2);
    --surface: var(--sk-surface);
    --surface-hover: var(--sk-surface-hover);
    --text-main: var(--sk-text);
    --text: var(--sk-text);
    --text-muted: var(--sk-text-muted);
    --text-dim: var(--sk-text-muted);
    --muted: var(--sk-text-muted);
    --accent: var(--sk-accent);
    --accent-soft: var(--sk-accent-soft);
    --accent-hover: var(--sk-accent-hover);
    --accent-glow: var(--sk-accent-soft);
    --accent-2: var(--sk-info);
    --accent-alt: var(--sk-discord);
    --accentBlue: var(--sk-info);
    --accentGold: var(--sk-gold);
    --accent-gold: var(--sk-gold);
    --krones: var(--sk-gold);
    --border: var(--sk-border);
    --border-soft: var(--sk-border);
    --border-hover: var(--sk-border-strong);
    --line: var(--sk-border);
    --line-strong: var(--sk-border-strong);
    --sysBorder: var(--sk-border);
    --font-family: var(--sk-font);
    --radius: var(--sk-radius);
    --radius-sm: var(--sk-radius);
    --radius-md: var(--sk-radius);
    --radius-lg: var(--sk-radius-lg);
    --mosaic-bg: var(--sk-bg);
    --mosaic-opacity: 0;
    --mosaic-filter: grayscale(1);

    --hall-bg: var(--sk-bg);
    --hall-elev: var(--sk-surface);
    --hall-ink: var(--sk-text);
    --hall-mute: var(--sk-text-muted);
    --hall-faint: var(--sk-text-faint);
    --hall-line: var(--sk-border);
    --hall-line-strong: var(--sk-border-strong);
    --hall-red: var(--sk-accent);
    --hall-red-soft: var(--sk-accent-soft);
    --hall-gold: var(--sk-gold);
}

html[data-theme="dark"] {
    --sk-bg: #1b211e;
    --sk-bg-elevated: #1f2622;
    --sk-surface: #232b27;
    --sk-surface-2: #2a332e;
    --sk-surface-hover: #333e38;
    --sk-border: #333e38;
    --sk-border-strong: #3d4a44;
    --sk-text: #eef0ea;
    --sk-text-muted: #8fa096;
    --sk-text-faint: #6d7c76;
    --sk-accent: #6b9d7e;
    --sk-accent-hover: #9ecfb0;
    --sk-accent-soft: rgba(107, 157, 126, 0.32);
    --sk-accent-ring: rgba(107, 157, 126, 0.7);
    --sk-success: #9ad1af;
    --sk-warning: #e3b675;
    --sk-danger: #c56a55;
    --sk-info: #8fa096;
    --sk-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    --pierre-2: #2a332e;
    --ardoise: #8fa096;
    --ardoise-30: #8fa09666;
    --ardoise-15: #8fa09633;
    --mousse: #6b9d7e;
    --mousse-fonce: #9ecfb0;
    --mousse-clair: rgba(107, 157, 126, 0.28);
    --ambre-clair: rgba(184, 130, 61, 0.22);
    --brique-clair: rgba(168, 70, 47, 0.22);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    background: var(--sk-bg);
}

html[data-theme="dark"] {
    color-scheme: dark;
}

body {
    margin: 0;
    font-family: var(--sk-font);
    font-size: var(--sk-fs);
    line-height: 1.45;
    color: var(--sk-text);
    background-color: var(--sk-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--sk-serif);
    font-weight: 700;
}

html:has(.sk-center-page),
html:has(.sk-center-page) body {
    height: 100%;
}
.sk-center-page {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px 48px;
    background: var(--sk-bg);
}
.sk-center-page > .sk-card {
    width: min(28rem, 100%);
    padding: 28px 24px 32px;
    box-shadow: var(--sk-shadow);
}
.sk-center-page.sk-center-wide > .sk-card {
    width: min(36rem, 100%);
}
.sk-center-page.sk-center-config > .sk-card {
    width: min(72rem, 100%);
}
.sk-center-page .sk-kicker {
    margin: 0 0 10px;
    font-family: var(--sk-mono);
    font-size: var(--sk-fs-xs);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--sk-text-faint);
}
.sk-center-page h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin: 0 0 8px;
}
.sk-center-page .lede {
    color: var(--sk-text-muted);
    margin: 0 0 20px;
    max-width: 42ch;
}
.sk-center-page .sk-stack {
    display: grid;
    gap: 12px;
}
.sk-center-page .sk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.sk-center-page .sk-actions a,
.sk-center-page .sk-actions button {
    flex: 1 1 auto;
}
.sk-center-page .err {
    color: var(--sk-danger);
}
.sk-center-page .note {
    color: var(--sk-text-muted);
    font-size: var(--sk-fs-sm);
}

.mosaic-layer {
    display: none !important;
}

code,
kbd,
samp,
pre,
.sk-mono,
.font-mono {
    font-family: var(--sk-mono);
}

a:not([class]) {
    color: var(--sk-text);
}

a:not([class]):hover {
    color: var(--sk-accent);
}

:focus-visible {
    outline: 2px solid var(--sk-accent);
    outline-offset: 2px;
}

::selection {
    background: var(--sk-accent);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--sk-border-strong);
    border-radius: 8px;
}

/* ——— Components ——— */
.sk-btn,
.btn,
button.primary,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: var(--sk-radius);
    border: 1px solid var(--sk-border-strong);
    background: var(--sk-surface-2);
    color: var(--sk-text);
    font-family: inherit;
    font-size: var(--sk-fs-sm);
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sk-btn:hover,
.btn:hover {
    background: var(--sk-surface-hover);
    color: var(--sk-text);
    border-color: var(--sk-border-strong);
}

.sk-btn-primary,
.btn.primary,
.btn-primary,
button.primary {
    background: var(--sk-accent);
    border-color: transparent;
    color: #fff;
}

.sk-btn-primary:hover,
.btn.primary:hover,
.btn-primary:hover,
button.primary:hover {
    background: var(--sk-accent-hover);
    color: #fff;
}

.sk-btn-ghost,
.btn-outline {
    background: transparent;
    color: var(--sk-text-muted);
}

.sk-btn-discord {
    background: var(--sk-discord);
    border-color: transparent;
    color: #fff;
}

.sk-btn-discord:hover {
    background: #4752c4;
    color: #fff;
}

.btn-login,
.btn-login-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    background: var(--sk-accent);
    border: 1px solid transparent;
    border-radius: var(--sk-radius);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn-login:hover,
.btn-login-small:hover {
    background: var(--sk-accent-hover);
    color: #fff;
}

.btn-krones {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 0 12px 0 10px;
    background: var(--sk-surface);
    border: 1px solid var(--sk-border-strong);
    border-radius: var(--sk-radius);
    color: var(--sk-text);
    cursor: pointer;
    font-family: inherit;
}

.btn-krones:hover {
    border-color: var(--ambre);
    background: var(--ambre-clair);
}

.btn-krones-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--sk-text-muted);
    letter-spacing: 0;
}

.btn-krones-value {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding-left: 10px;
    border-left: 1px solid var(--ardoise-15);
}

.btn-krones-amount {
    font-family: var(--sk-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
}

.btn-krones-unit {
    font-family: var(--sk-mono);
    font-size: 12px;
    color: var(--ambre);
    font-weight: 500;
}

button:disabled,
.btn:disabled,
.sk-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]),
select,
.sk-input,
.form-control {
    max-width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: var(--sk-radius);
    border: 1px solid var(--sk-border-strong);
    background: var(--sk-bg);
    color: var(--sk-text);
    font-family: inherit;
    font-size: var(--sk-fs);
}
textarea {
    max-width: 100%;
    padding: 8px 10px;
    border-radius: var(--sk-radius);
    border: 1px solid var(--sk-border-strong);
    background: var(--sk-bg);
    color: var(--sk-text);
    font-family: inherit;
    font-size: var(--sk-fs);
    resize: vertical;
}
.sk-input,
.form-control,
#login-view input,
#auth-overlay input,
.auth-box input,
.login-box input {
    width: 100%;
}

input::placeholder,
textarea::placeholder {
    color: var(--sk-text-faint);
}

input:focus,
select:focus,
textarea:focus,
.sk-input:focus,
.form-control:focus {
    outline: none;
    border-color: var(--sk-accent);
    box-shadow: 0 0 0 3px var(--sk-accent-soft);
}

label,
.sk-label {
    display: block;
    font-size: var(--sk-fs-sm);
    font-weight: 600;
    color: var(--sk-text-muted);
    margin-bottom: 4px;
}

.sk-card,
.panel,
.panel-glass {
    background: var(--sk-surface);
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-radius-lg);
    box-shadow: none;
}

.sk-title {
    margin: 0;
    font-family: var(--sk-serif);
    font-size: var(--sk-fs-xl);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--sk-text);
}

.sk-meta {
    margin: 4px 0 0;
    font-size: var(--sk-fs-sm);
    color: var(--sk-text-muted);
}

.sk-badge,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    border: 1px solid var(--sk-border);
    background: var(--sk-surface-2);
    color: var(--sk-text-muted);
}

.sk-table,
table.sk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--sk-fs-sm);
}

.sk-table th,
.sk-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--sk-border);
}

.sk-table th {
    color: var(--sk-text-muted);
    font-weight: 600;
    font-size: var(--sk-fs-xs);
}

.sk-modal,
.modal,
.roulette-modal {
    background: rgba(27, 33, 30, 0.45);
}

.sk-modal-card,
.modal-content,
.modal-box,
.auth-box,
.login-box {
    background: var(--sk-surface);
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-radius-lg);
    box-shadow: var(--sk-shadow);
}

.sk-toast,
.upload-toast {
    background: var(--sk-surface-2);
    border: 1px solid var(--sk-border-strong);
    color: var(--sk-text);
    border-radius: var(--sk-radius-lg);
    box-shadow: var(--sk-shadow);
}

.sk-error,
#auth-err,
.field-error {
    color: var(--sk-danger);
    font-size: var(--sk-fs-sm);
}

/* ——— Shell SPA ——— */
.app-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    background: var(--sk-bg);
}

.chrome {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    min-height: var(--sk-header-h);
    height: auto;
    padding: 12px 20px;
    column-gap: 16px;
    background: var(--sk-bg);
    border-bottom: 1px solid var(--sk-border);
    z-index: 30;
    flex-shrink: 0;
    position: relative;
    overflow: visible;
}

header#app-header,
#app-header {
    display: contents;
    background: transparent;
    border: 0;
    padding: 0;
    height: auto;
    min-height: 0;
}

.header-top {
    grid-column: 1;
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.header-bottom {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    min-width: 0;
}

#menu-container {
    grid-column: 2;
    position: relative;
    z-index: 15;
}

.header-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-weight: 700;
    font-size: 18px;
    color: var(--sk-text);
    letter-spacing: -0.01em;
    white-space: nowrap;
    cursor: pointer;
    font-family: var(--sk-serif);
}

.brand-title { font-style: normal; }
.brand-tld {
    color: var(--sk-text-faint);
    font-weight: 500;
    font-family: var(--sk-mono);
    font-size: 13px;
    letter-spacing: 0.04em;
}

.header-brand img {
    width: 30px;
    height: 30px;
    border-radius: 2px;
    object-fit: cover;
}

.header-user {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    overflow: visible;
}

.user-left-section {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.user-account-link {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    min-width: 0;
}
.user-account-link:hover .user-name { text-decoration: underline; }

.avatar-wrapper { display: flex; align-items: center; gap: 8px; }

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--sk-border-strong);
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--sk-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-role {
    background: var(--sk-surface-2);
    border: 1px solid var(--sk-border-strong);
    color: var(--sk-text-muted);
    padding: 3px 8px;
    font-size: 11px;
}

.badge-admin {
    background: var(--brique-clair);
    border: 1px solid transparent;
    color: var(--brique);
    padding: 3px 8px;
    font-size: 11px;
}

.badge-krone {
    gap: 6px;
    background: var(--sk-surface);
    border: 1px solid var(--sk-border-strong);
    color: var(--sk-text);
    padding: 0 12px;
    min-height: 36px;
    font-size: 13px;
    border-radius: var(--sk-radius);
    font-family: var(--sk-mono);
}

.header-actions { display: flex; gap: 6px; flex-shrink: 0; }

.btn-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-height: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-radius);
    cursor: pointer;
    color: var(--sk-text-muted);
}

.btn-symbol.logout { color: var(--sk-danger); }
.btn-symbol.logout:hover { background: var(--brique-clair); color: var(--brique); }
html[data-theme="dark"] .btn-symbol.logout:hover {
    background: rgba(168, 70, 47, 0.2);
    color: var(--sk-danger);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-radius);
    background: var(--sk-surface-2);
}
.theme-opt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 8px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--sk-text-muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.theme-opt svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.theme-opt[aria-pressed="true"] {
    background: var(--sk-accent);
    color: #fff;
}
.theme-opt:hover:not([aria-pressed="true"]) {
    color: var(--sk-text);
}
@media (max-width: 720px) {
    .theme-opt span { display: none; }
}

.btn-roulette {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-radius);
    background: transparent;
    color: var(--sk-text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-roulette:hover { border-color: var(--sk-accent); color: var(--sk-text); }

.discord-icon { width: 14px; height: 14px; object-fit: contain; }

nav#app-nav,
#app-nav,
.sk-nav,
nav.sk-nav {
    display: flex;
    align-items: center;
    width: auto;
    min-height: 0;
    height: auto;
    background: transparent;
    border: 0;
    padding: 0;
    overflow: visible;
}

.sk-nav .nav-tabs,
#app-nav .nav-tabs,
.nav-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    height: auto;
    width: auto;
}

.sk-nav .nav-tab,
.nav-tab,
.sub-nav-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: auto;
    min-height: 48px;
    padding: 12px 18px;
    color: var(--sk-text-muted);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: none;
    cursor: pointer;
    border: 0;
    border-bottom: 0;
    background: transparent;
    background-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    white-space: nowrap;
    font-family: inherit;
    border-radius: var(--sk-radius);
}

.nav-tab-icon,
.nav-tab-emoji { display: none; }

.nav-tab:hover,
.sub-nav-tab:hover {
    color: var(--sk-text);
    background: var(--sk-surface-2);
}

a.nav-tab {
    text-decoration: none;
}

.nav-tab.active,
.sub-nav-tab.active {
    color: var(--sk-text);
    background: transparent;
    box-shadow: inset 0 -1px 0 var(--sk-accent);
    border-bottom: 0;
}

html[data-theme="dark"] .sub-nav {
    background: var(--sk-bg);
}

html[data-theme="dark"] .nav-tab,
html[data-theme="dark"] .sub-nav-tab {
    color: var(--sk-text-muted);
    background: transparent;
    background-color: transparent;
}

html[data-theme="dark"] .nav-tab.active,
html[data-theme="dark"] .sub-nav-tab.active {
    color: var(--sk-text);
    background: transparent;
    background-color: transparent;
    box-shadow: inset 0 -1px 0 var(--sk-accent);
}

.tab-btn.active {
    color: var(--sk-text);
    border-color: var(--sk-accent);
    background: var(--sk-accent-soft);
}

#section-menu-container {
    flex: 0 0 auto;
    min-height: 0;
}

#section-menu-container .sub-nav,
.sub-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    height: auto;
    min-height: var(--sk-subnav-h);
    padding: 8px 18px;
    background: var(--sk-bg);
    border-bottom: 1px solid var(--sk-border);
    overflow-x: auto;
    overflow-y: visible;
}

.app-container > main {
    flex: 1;
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.content-stage {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    height: 0;
    width: 100%;
    max-width: 100%;
}

.content-frame {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    height: 100%;
    border: 0;
    background: var(--sk-bg);
    overflow: auto;
}

.content-stage > .content-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

iframe.content-frame {
    overflow: auto;
}

.content-frame.with-section-menu {
    height: 100%;
}

.app-container > footer,
.sk-footer,
footer.sk-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
    min-height: var(--sk-footer-h);
    height: auto;
    width: 100%;
    padding: 10px 18px;
    background: var(--sk-bg);
    border-top: 1px solid var(--sk-border);
    flex-shrink: 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--sk-mono);
    font-size: 11px;
    letter-spacing: 0.02em;
    color: var(--sk-text-faint);
}

.footer-brand img { width: 12px; height: 12px; border-radius: 2px; }

.footer-links { display: flex; align-items: center; gap: 14px; }

.footer-legal {
    width: 100%;
    margin: 4px 0 0;
    font-family: var(--sk-mono);
    font-size: 11px;
    color: var(--sk-text-faint);
}

.footer-link {
    color: var(--sk-text-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.footer-link:hover { color: var(--sk-text); }

.footer-separator { color: var(--sk-text-faint); }

.sk-app-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
}

.sk-app-nav a {
    color: var(--sk-text-faint);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 6px 10px;
    border-radius: var(--sk-radius);
}

.sk-app-nav a:hover,
.sk-app-nav a.is-active {
    color: var(--sk-text);
    background: var(--sk-surface-2);
}

.sk-app-nav a.is-active {
    box-shadow: inset 0 -1px 0 var(--sk-accent);
}

.sk-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--sk-text);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
    font-family: var(--sk-serif);
    text-decoration: none;
    white-space: nowrap;
}

.sk-brand img {
    width: 30px;
    height: 30px;
    border-radius: 2px;
    object-fit: cover;
}

.sk-page {
    max-width: 1480px;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sk-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 32px;
    margin: 0;
    border: 1px solid var(--sk-border);
    background: transparent;
    color: var(--sk-text);
    border-radius: var(--sk-radius);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}

.hidden { display: none !important; }

/* Nested frame tabs (bots, modpacks) */
nav.tabs {
    display: flex;
    gap: 4px;
    align-items: center;
    background: var(--sk-bg);
    border-bottom: 1px solid var(--sk-border);
    padding: 8px 16px;
    overflow-x: auto;
    overflow-y: visible;
    min-height: var(--sk-subnav-h);
    height: auto;
    flex-shrink: 0;
}

button.tab-btn {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: var(--sk-text-muted);
    border: 0;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--sk-radius);
    font-family: inherit;
}

button.tab-btn img {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
}

button.tab-btn:hover {
    color: var(--sk-text);
    background: var(--sk-surface-2);
}

button.tab-btn.active {
    color: var(--sk-text);
    background: transparent;
    box-shadow: inset 0 -1px 0 var(--sk-accent);
    border: 0;
}

.roulette-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    align-items: stretch;
    justify-content: stretch;
}

.roulette-modal.open { display: flex; }

.roulette-modal-card {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--sk-bg);
}

.roulette-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 40px;
    min-height: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--sk-border-strong);
    border-radius: var(--sk-radius);
    background: var(--sk-surface);
    color: var(--sk-text);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.roulette-modal-frame { width: 100%; height: 100%; border: 0; background: var(--sk-bg); }

@media (max-width: 860px) {
    .chrome {
        display: grid;
        grid-template-columns: minmax(0, auto) auto minmax(0, 1fr);
        align-items: center;
        height: auto;
        min-height: 52px;
        padding: 8px 10px;
        padding-top: max(8px, env(safe-area-inset-top));
        column-gap: 8px;
        overflow: visible;
    }

    header#app-header,
    #app-header {
        display: contents;
        width: auto;
        min-height: 0;
    }

    .header-top {
        grid-column: 1;
        justify-self: start;
        min-width: 0;
    }

    #menu-container {
        grid-column: 2;
        width: auto;
        position: relative;
        z-index: 50;
    }

    .header-bottom {
        grid-column: 3;
        justify-self: end;
        min-width: 0;
    }

    .header-brand .brand-tld { display: none; }
    .header-brand { gap: 8px; font-size: 16px; }
    .header-brand img { width: 26px; height: 26px; }

    .header-user {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .btn-roulette,
    .user-name,
    .badge-role,
    .badge-admin,
    .sk-app-nav { display: none; }

    .btn-krones {
        min-height: 36px;
        padding: 0 8px 0 8px;
        gap: 6px;
    }

    .btn-krones-label { display: none; }
    .btn-krones-value { padding-left: 0; border-left: 0; }

    .sk-nav-toggle { display: inline-flex; }

    #app-nav .nav-tabs {
        display: none;
        flex-direction: column;
        height: auto;
        position: fixed;
        left: 10px;
        right: 10px;
        top: calc(env(safe-area-inset-top) + 56px);
        z-index: 60;
        background: var(--sk-surface);
        border: 1px solid var(--sk-border);
        box-shadow: var(--sk-shadow);
        padding: 6px;
        width: auto;
        max-height: min(70dvh, 480px);
        overflow-y: auto;
    }

    #menu-container.nav-open #app-nav .nav-tabs,
    #app-nav.nav-open .nav-tabs {
        display: flex;
    }

    #app-nav .nav-tab {
        justify-content: flex-start;
        height: 44px;
        width: 100%;
        box-shadow: none;
    }

    #app-nav .nav-tab.active {
        box-shadow: inset 3px 0 0 var(--sk-accent);
        background: var(--sk-accent-soft);
    }

    .roulette-text { display: none; }

    #section-menu-container .sub-nav,
    .sub-nav {
        padding: 6px 10px;
        min-height: 44px;
        justify-content: center;
    }

    .app-container > footer,
    .sk-footer,
    footer.sk-footer {
        flex-wrap: wrap;
        height: auto;
        min-height: 36px;
        padding: 6px 10px;
        padding-bottom: max(6px, env(safe-area-inset-bottom));
        gap: 8px;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px 12px;
    }

    body.hide-brand-mobile #app-header .header-top { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Standardisation header : roulette et theme en symboles seuls (bandeau cookies + UI) */
.btn-roulette-icon { padding: 0; width: 36px; justify-content: center; }
.btn-roulette-icon svg { width: 18px; height: 18px; flex-shrink: 0; }
.theme-single {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-height: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-radius);
    background: var(--sk-surface-2);
    color: var(--sk-text-muted);
    cursor: pointer;
}
.theme-single:hover { color: var(--sk-text); }
.theme-single svg { width: 16px; height: 16px; }
.sk-nav-toggle svg { flex-shrink: 0; }
@media (max-width: 860px) {
    .btn-roulette { display: inline-flex; }
    .header-user { flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; min-width: 0; }
    #menu-container { min-width: 0; }
    .header-top { overflow: hidden; }
}
