/* ==========================================================================
   RaidPlanner – design system (alianční téma)
   Jeden CSS soubor pro celou aplikaci.

    1. Tokeny             7. Notifikace          13. Sestava raidu
    2. Základ             8. Modální okna        14. Ostatní stránky
    3. Layout             9. Dashboard           15. O guildě + nábor
    4. Komponenty        10. Postavy             16. Přihlášky
    5. Tlačítka          11. Seznam raidů        17. Správa
    6. Formuláře         12. Detail raidu        18. Responzivita / a11y
   ========================================================================== */

/* 1. TOKENY ================================================================ */
:root {
    /* Plochy – tmavá aliance modrá */
    --bg: #0a0f1a;
    --bg-elev: #0f1626;
    --surface: #131b2d;
    --surface-2: #1a2338;
    --surface-hover: #202b44;

    --border: #223050;
    --border-strong: #2f3f66;

    --text: #e9ecf3;
    --text-muted: #9aa6bf;
    --text-subtle: #66728c;

    /* Alianční zlatá */
    --accent: #d9b25f;
    --accent-hover: #ebc97e;
    --accent-soft: rgba(217, 178, 95, 0.12);
    --accent-border: rgba(217, 178, 95, 0.34);
    --on-accent: #1a150b;

    /* Alianční modrá – jen jemné zvýraznění */
    --alliance: #3a6fd8;
    --alliance-hover: #5385e6;
    --alliance-soft: rgba(58, 111, 216, 0.15);
    --alliance-border: rgba(58, 111, 216, 0.4);

    /* Stavy */
    --success: #4fc28a;
    --success-soft: rgba(79, 194, 138, 0.12);
    --success-border: rgba(79, 194, 138, 0.32);
    --warning: #e3b94f;
    --warning-soft: rgba(227, 185, 79, 0.12);
    --warning-border: rgba(227, 185, 79, 0.32);
    --danger: #e56f6f;
    --danger-soft: rgba(229, 111, 111, 0.12);
    --danger-border: rgba(229, 111, 111, 0.32);
    --info: #5ea9ea;
    --info-soft: rgba(94, 169, 234, 0.12);
    --info-border: rgba(94, 169, 234, 0.32);

    /* Raidové role */
    --tank: #5ea9ea;
    --healer: #4fc28a;
    --dps: #e6934f;

    --discord: #5865f2;
    --discord-hover: #4752c4;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.5);

    --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui,
            -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --container: 1200px;
    --header-h: 64px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* 2. ZÁKLAD ================================================================ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; color-scheme: dark; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }
strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(217, 178, 95, 0.35); }

.icon {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    vertical-align: middle;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 1000;
    padding: 10px 16px; border-radius: var(--radius-sm);
    background: var(--accent); color: var(--on-accent); font-weight: 600;
}
.skip-link:focus { top: 12px; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.min-w-0 { min-width: 0; }
.muted { color: var(--text-muted); }
.text-sm { font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.mt-16 { margin-top: 16px; }

.eyebrow {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

/* 3. LAYOUT ================================================================ */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 32px);
}

.page { flex: 1; padding-block: 32px 64px; }

.app-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10, 15, 26, 0.86);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--border);
}
/* jemná alianční linka pod hlavičkou */
.app-header::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: none;
    pointer-events: none;
}

.app-header__inner { height: var(--header-h); display: flex; align-items: center; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand__mark {
    width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--accent-border);
    color: var(--accent-hover);
}
.brand__mark .icon { width: 20px; height: 20px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.brand__accent { color: var(--accent); }
.brand__sub { font-size: 12px; color: var(--text-muted); }

.app-nav { display: flex; align-items: center; gap: 2px; }

.nav-link {
    position: relative;
    display: inline-flex; align-items: center; gap: 8px;
    height: 36px; padding: 0 12px; border-radius: 8px;
    color: var(--text-muted); font-size: 14px; font-weight: 500;
    transition: color 0.15s, background-color 0.15s;
    white-space: nowrap;
}
.nav-link .icon { width: 16px; height: 16px; }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.is-active { color: var(--text); background: var(--alliance-soft); }
.nav-link.is-active .icon { color: var(--accent); }

.nav-count {
    min-width: 20px; height: 20px; padding: 0 6px;
    display: inline-grid; place-items: center; border-radius: 999px;
    background: var(--accent); color: var(--on-accent);
    font-size: 11px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums;
}

.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; cursor: pointer; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu__caret { width: 14px !important; height: 14px !important; margin-left: 2px; transition: transform 0.15s; }
.nav-menu[open] .nav-menu__caret { transform: rotate(180deg); }
.nav-menu__panel {
    position: absolute; left: 0; top: calc(100% + 10px); z-index: 150; min-width: 230px; padding: 6px;
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    background: var(--surface-2); box-shadow: var(--shadow-lg);
}
.nav-menu__heading {
    margin: 8px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--text-muted, var(--muted));
}
.nav-menu__heading:first-child { margin-top: 4px; }
.nav-menu__item {
    display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px;
    border-radius: var(--radius-sm, 6px); font-size: 14px; color: var(--text); text-decoration: none;
}
.nav-menu__item .icon { width: 16px; height: 16px; color: var(--text-muted, var(--muted)); }
.nav-menu__item:hover { background: var(--surface); }
.nav-menu__item.is-active { background: var(--alliance-soft); }
.nav-menu__item.is-active .icon { color: var(--accent); }
@media (max-width: 1080px) {
    .nav-menu__panel { position: static; min-width: 0; margin-top: 4px; box-shadow: none; }
}
.app-nav__divider { width: 1px; height: 24px; margin: 0 8px; background: var(--border); }
.nav-login-form, .user-menu form { margin: 0; }

.notif + .user-menu { margin-left: 12px; }
.user-menu { display: flex; align-items: center; gap: 12px; }
.avatar {
    width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center;
    border-radius: 50%; object-fit: cover; background: var(--surface-2);
    border: 2px solid var(--accent-border); color: var(--accent); font-weight: 600; font-size: 14px;
}
.avatar--sm { width: 28px; height: 28px; font-size: 12px; border-width: 1px; }
.user-menu__info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-menu__name { max-width: 140px; font-size: 14px; font-weight: 600; }
.user-menu__role { font-size: 12px; color: var(--accent); }

.nav-toggle {
    display: none; width: 40px; height: 40px; align-items: center; justify-content: center;
    border: 1px solid var(--border-strong); border-radius: 8px; background: transparent; cursor: pointer;
}

.app-footer { border-top: 1px solid var(--border); padding-block: 24px; color: var(--text-subtle); font-size: 13px; }
.app-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.app-footer__brand { color: var(--text-muted); font-weight: 500; }
.app-footer__link { color: var(--text-muted); }
.app-footer a:hover { color: var(--text); }

.page-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    flex-wrap: wrap; gap: 16px 24px; margin-bottom: 32px; margin-top: 40px;
}
.page-header__title { margin-top: 4px; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.15; }
.page-header__subtitle { margin-top: 8px; max-width: 62ch; color: var(--text-muted); }
.page-header__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.back-link {
    display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px;
    color: var(--text-muted); font-size: 14px; transition: color 0.15s;
}
.back-link:hover { color: var(--text); }
.back-link .icon { width: 16px; height: 16px; }
.back-link + .page-header { margin-top: 8px; }

.section { margin-top: 48px; }
.section__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section__title { display: flex; align-items: center; gap: 12px; margin-top: 4px; font-size: 20px; }

/* 4. KOMPONENTY ============================================================ */
.card { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card--narrow { max-width: 760px; }
.card--accent {
    border-color: var(--border-strong);
    background: var(--surface);
}
.card--alliance {
    border-color: var(--alliance-border);
    background: var(--surface);
}
.card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card__title { margin-top: 4px; font-size: 18px; }

.badge {
    display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px;
    border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-2);
    color: var(--text-muted); font-size: 12px; font-weight: 500; white-space: nowrap;
}
.badge .icon { width: 13px; height: 13px; }
.badge--accent { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-hover); }
.badge--alliance { background: var(--alliance-soft); border-color: var(--alliance-border); color: #a9c4f5; }
.badge--open, .badge--confirmed, .badge--approved, .badge--success {
    background: var(--success-soft); border-color: var(--success-border); color: var(--success);
}
.badge--tentative, .badge--needs_info, .badge--warning {
    background: var(--warning-soft); border-color: var(--warning-border); color: var(--warning);
}
.badge--closed, .badge--not_attending, .badge--cancelled, .badge--rejected, .badge--locked {
    background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger);
}
.badge--submitted, .badge--in_review, .badge--info {
    background: var(--info-soft); border-color: var(--info-border); color: var(--info);
}
.badge--withdrawn { color: var(--text-subtle); }

.role-badge {
    display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 500; white-space: nowrap;
    color: var(--text-muted); background: var(--surface-2);
}
.role-badge--tank   { color: var(--tank);   background: rgba(94, 169, 234, 0.13); }
.role-badge--healer { color: var(--healer); background: rgba(79, 194, 138, 0.13); }
.role-badge--dps    { color: var(--dps);    background: rgba(230, 147, 79, 0.13); }

/* Počet – tiché číslo bez rámečku */
.count-pill {
    display: inline-block; color: var(--text-subtle); font-family: var(--font);
    font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums;
}

.dot { display: inline-block; width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--text-subtle); }
.dot--tank { background: var(--tank); }
.dot--healer { background: var(--healer); }
.dot--dps { background: var(--dps); }

.status-dot { width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; box-shadow: 0 0 0 3px var(--surface); }
.status-dot--confirmed { background: var(--success); }
.status-dot--tentative { background: var(--warning); }
.status-dot--not_attending { background: var(--danger); }

.meta-item { display: inline-flex; align-items: center; gap: 6px; }
.meta-item .icon { width: 16px; height: 16px; color: var(--text-subtle); }

.link-arrow {
    display: inline-flex; align-items: center; gap: 8px; color: var(--text);
    font-size: 14px; font-weight: 500; transition: color 0.15s;
}
.link-arrow:hover { color: var(--accent-hover); }
.link-arrow .icon { width: 16px; height: 16px; color: var(--text-muted); transition: color 0.15s; }
.link-arrow:hover .icon { color: var(--accent-hover); }

.date-tile {
    width: 58px; flex-shrink: 0; display: flex; flex-direction: column; overflow: hidden; text-align: center;
    border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface-2);
}
.date-tile__month {
    padding: 4px 0; background: var(--bg-elev); border-bottom: 1px solid var(--border);
    color: var(--text-muted); font-size: 12px; font-weight: 500;
}
.date-tile__day { padding: 8px 0; font-size: 22px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.date-tile--lg { width: 74px; }
.date-tile--lg .date-tile__day { padding: 12px 0; font-size: 30px; }

.countdown { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-hover); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.countdown:empty { display: none; }
.countdown.is-soon { color: var(--success); }
.countdown.is-started { color: var(--text-muted); }

.class-icon {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; object-fit: cover; background: var(--surface-2);
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border-strong);
}
.class-icon--sm { width: 26px; height: 26px; }
.class-icon--lg { width: 52px; height: 52px; }
.class-icon--fallback { display: grid; place-items: center; color: var(--accent); font-weight: 600; font-size: 15px; }

.composition { min-width: 0; }
.comp-bar { display: flex; gap: 2px; height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.comp-bar span { flex-basis: 0; min-width: 0; transition: flex-grow 0.4s var(--ease); }
.comp-bar__tank { background: var(--tank); }
.comp-bar__healer { background: var(--healer); }
.comp-bar__dps { background: var(--dps); }
.comp-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; color: var(--text-muted); font-size: 13px; }
.comp-legend__item { display: inline-flex; align-items: center; gap: 8px; }
.comp-legend__item b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.comp-bar__open { background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, 0.08) 4px 6px); }
.comp-legend__target { color: var(--text-subtle); font-weight: 500; }
.comp-legend__item.is-short b { color: var(--warning); }

.empty-state {
    display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 24px; text-align: center;
    background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
}
.empty-state--compact { padding: 32px 24px; }
.empty-state__icon {
    width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 4px;
    border-radius: 12px; background: var(--accent-soft); color: var(--accent);
}
.empty-state__icon .icon { width: 24px; height: 24px; }
.empty-state__title { font-size: 18px; }
.empty-state__text { max-width: 52ch; color: var(--text-muted); }
.empty-state .btn { margin-top: 8px; }

.disclosure { margin-top: 16px; }
.disclosure > summary {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 4px;
    color: var(--text-muted); font-size: 14px; font-weight: 600; list-style: none; cursor: pointer;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary .icon { width: 16px; height: 16px; transition: transform 0.2s; }
.disclosure[open] > summary .icon { transform: rotate(90deg); }
.disclosure > summary:hover { color: var(--text); }
.disclosure__content { margin-top: 12px; }

/* Lišta záložek (filtry, správa) */
.tabs {
    display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 20px;
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; width: fit-content; max-width: 100%;
}
.tab {
    display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 8px;
    color: var(--text-muted); font-size: 14px; font-weight: 500; transition: color 0.15s, background-color 0.15s;
}
.tab:hover { color: var(--text); background: var(--surface); }
.tab.is-active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.tab .icon { width: 16px; height: 16px; }
.tab__count { color: var(--text-subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.tab.is-active .tab__count { color: var(--accent); }

/* Info blok */
.callout {
    display: flex; gap: 12px; align-items: flex-start; padding: 16px;
    border: 1px solid var(--info-border); border-radius: var(--radius); background: var(--info-soft);
}
.callout .icon { width: 20px; height: 20px; color: var(--info); margin-top: 2px; }
.callout__title { font-weight: 600; }
.callout__text { margin-top: 4px; color: var(--text-muted); font-size: 14px; white-space: pre-line; }
.callout--warning { border-color: var(--warning-border); background: var(--warning-soft); }
.callout--warning .icon { color: var(--warning); }
.callout--success { border-color: var(--success-border); background: var(--success-soft); }
.callout--success .icon { color: var(--success); }
.callout--danger { border-color: var(--danger-border); background: var(--danger-soft); }
.callout--danger .icon { color: var(--danger); }

/* 5. TLAČÍTKA ============================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 8px;
    font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer; user-select: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn .icon { width: 16px; height: 16px; }

.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn--secondary { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.btn--secondary:hover:not(:disabled) { background: var(--surface-hover); border-color: #3d5080; }
.btn--ghost { background: transparent; color: var(--text-muted); }
.btn--ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn--danger { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
.btn--danger:hover:not(:disabled) { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--success { background: var(--success-soft); border-color: var(--success-border); color: var(--success); }
.btn--success:hover:not(:disabled) { background: var(--success); border-color: var(--success); color: #0b1a12; }
.btn--warning { background: var(--warning-soft); border-color: var(--warning-border); color: var(--warning); }
.btn--warning:hover:not(:disabled) { background: var(--warning); border-color: var(--warning); color: #1f1806; }
.btn--discord { background: var(--discord); color: #fff; }
.btn--discord:hover:not(:disabled) { background: var(--discord-hover); }

.btn--sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn--lg { min-height: 48px; padding: 0 24px; font-size: 15px; }
.btn--lg .icon { width: 20px; height: 20px; }
.btn--icon { width: 40px; padding: 0; }
.btn--sm.btn--icon { width: 32px; }
.btn--block { width: 100%; }

.att-btn {
    --att-color: var(--text-muted); --att-bg: var(--surface-2); --att-border: var(--border-strong);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 34px; height: 34px; padding: 0; border: 1px solid var(--att-border); border-radius: 8px;
    background: var(--att-bg); color: var(--att-color); font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background-color 0.15s, color 0.15s, transform 0.1s;
}
.att-btn .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.att-btn.is-confirmed { --att-color: var(--success); --att-bg: var(--success-soft); --att-border: var(--success-border); }
.att-btn.is-tentative { --att-color: var(--warning); --att-bg: var(--warning-soft); --att-border: var(--warning-border); }
.att-btn.is-not-attending { --att-color: var(--danger); --att-bg: var(--danger-soft); --att-border: var(--danger-border); }
.att-btn:hover:not(:disabled) { background: var(--att-color); color: #111; }
.att-btn:active:not(:disabled) { transform: scale(0.97); }
.att-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.att-btn.is-selected { background: var(--att-color); color: #111; }
.att-btn.is-selected:disabled { opacity: 1; cursor: default; }
.att-btn--lg { flex: 1; width: auto; height: 46px; padding: 0 14px; }
.att-btn--lg .icon { width: 18px; height: 18px; }

/* 6. FORMULÁŘE ============================================================= */
:where(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="submit"], [type="button"])),
:where(select),
:where(textarea) {
    width: 100%; min-height: 44px; padding: 10px 12px;
    background: var(--bg); border: 1px solid var(--border-strong); border-radius: 8px;
    color: var(--text); font-size: 15px; transition: border-color 0.15s, box-shadow 0.15s;
}
:where(input, select, textarea):hover:not(:disabled) { border-color: #3d5080; }
:where(input, select, textarea):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
:where(input, select, textarea):disabled { opacity: 0.55; cursor: not-allowed; }
:where(textarea) { min-height: 110px; resize: vertical; line-height: 1.55; }
:where(select) {
    appearance: none; -webkit-appearance: none; padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa6bf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; cursor: pointer;
}
:where(input)::placeholder, :where(textarea)::placeholder { color: var(--text-subtle); }
input[type="date"], input[type="time"] { color-scheme: dark; }

.form { display: flex; flex-direction: column; gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.form-grid > .field { grid-column: 1 / -1; }
.form-grid > .field--game_class,
.form-grid > .field--specialization,
.form-grid > .field--start_date,
.form-grid > .field--start_time,
.form-grid > .field--target_group,
.form-grid > .field--status,
.form-grid > .field--role,
.form-grid > .field--priority,
.form-grid > .field--application_cooldown_days,
.form-grid > .field--signup_lock_minutes { grid-column: auto; }

.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field__label { color: var(--text); font-size: 14px; font-weight: 500; }
.field__labelrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.field__info summary {
    display: inline-flex; align-items: center; cursor: pointer; list-style: none;
    color: var(--text-muted); border-radius: 50%;
}
.field__info summary::-webkit-details-marker { display: none; }
.field__info summary:hover, .field__info[open] summary { color: var(--accent); }
.field__info summary .icon { width: 16px; height: 16px; }
.field__info[open] { flex-basis: 100%; }
.field__info-text {
    margin: 6px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--surface-hover);
    color: var(--text-muted); font-size: 13px; line-height: 1.45;
}
.field-group { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field-group > legend { padding: 0; margin-bottom: 0; }
.field-group__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 4px; }
.field__required { color: var(--accent); }
.field__help { color: var(--text-muted); font-size: 13px; }
.field__error { color: var(--danger); font-size: 13px; font-weight: 500; }
.field.has-error :where(input, select, textarea) { border-color: var(--danger); }
.field__static {
    display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px;
    background: var(--bg-elev); border: 1px dashed var(--border-strong); border-radius: 8px; color: var(--text-muted);
}
.field__static strong { color: var(--text); }

.field--checkbox { padding: 16px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; cursor: pointer; }
.checkbox input {
    appearance: none; -webkit-appearance: none; width: 20px; height: 20px; flex-shrink: 0;
    display: grid; place-content: center; margin: 0; border: 1px solid var(--border-strong); border-radius: 6px;
    background: var(--bg); cursor: pointer; transition: background-color 0.15s, border-color 0.15s;
}
.checkbox input::before {
    content: ""; width: 10px; height: 6px; margin-top: -2px;
    border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent);
    transform: rotate(-45deg) scale(0); transition: transform 0.12s var(--ease);
}
.checkbox input:checked { background: var(--accent); border-color: var(--accent); }
.checkbox input:checked::before { transform: rotate(-45deg) scale(1); }
.checkbox input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.checkbox--sm { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.checkbox--sm input { width: 18px; height: 18px; }

/* Výběr kartami (radio) */
.choice-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.choice-cards > div, .choice-cards label { min-width: 0; }
.choice-card {
    position: relative; display: flex; align-items: center; gap: 12px; height: 100%; padding: 16px;
    background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius);
    font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color 0.15s, background-color 0.15s;
}
.choice-card:hover { border-color: #3d5080; }
.choice-card input {
    appearance: none; -webkit-appearance: none; width: 18px; height: 18px; flex-shrink: 0; margin: 0;
    border: 2px solid var(--border-strong); border-radius: 50%; display: grid; place-content: center;
}
.choice-card input::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--on-accent);
    transform: scale(0); transition: transform 0.12s var(--ease);
}
.choice-card input:checked { background: var(--accent); border-color: var(--accent); }
.choice-card input:checked::before { transform: scale(1); }
.choice-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.form-actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    padding-top: 20px; border-top: 1px solid var(--border);
}
.form-section-title {
    grid-column: 1 / -1; display: flex; align-items: center; gap: 10px;
    padding-top: 8px; color: var(--text); font-size: 15px; font-weight: 600;
}
.form-section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.form-section-title:first-child { padding-top: 0; }

.alert, .error-message {
    display: flex; flex-direction: column; gap: 4px; padding: 12px 16px;
    border: 1px solid var(--danger-border); border-radius: var(--radius); background: var(--danger-soft);
    color: #f3b0b0; font-size: 14px;
}
.alert ul, .error-message ul { margin: 0; padding-left: 18px; }

/* 7. NOTIFIKACE ============================================================ */
.global-notifications {
    position: fixed; top: calc(var(--header-h) + 14px); right: 16px; z-index: 200;
    width: min(420px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 12px; pointer-events: none;
}
.global-notification {
    --level-color: var(--info);
    position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 12px 16px 16px; border: 1px solid var(--border-strong); border-left: 3px solid var(--level-color);
    border-radius: var(--radius); background: var(--surface-2); box-shadow: var(--shadow-lg);
    color: var(--text); font-size: 14px; pointer-events: auto;
    animation: toast-in 0.3s var(--ease); transition: opacity 0.35s, transform 0.35s var(--ease);
}
.global-notification[data-level="success"] { --level-color: var(--success); }
.global-notification[data-level="error"] { --level-color: var(--danger); }
.global-notification[data-level="warning"] { --level-color: var(--warning); }
.global-notification__icon { color: var(--level-color); margin-top: 1px; }
.global-notification-message { flex: 1; line-height: 1.5; }
.notification-close {
    width: 26px; height: 26px; display: grid; place-items: center; flex-shrink: 0; border: 0; border-radius: 6px;
    background: transparent; color: var(--text-muted); cursor: pointer;
}
.notification-close:hover { background: var(--surface-hover); color: var(--text); }
.notification-close .icon { width: 16px; height: 16px; }
.notification-progress {
    position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--level-color); opacity: 0.6;
    transform-origin: left; animation: notification-countdown 5s linear forwards;
}
.global-notification.is-hiding { opacity: 0; transform: translateX(24px); }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes notification-countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.login-progress-overlay {
    position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
    background: rgba(5, 8, 14, 0.85); backdrop-filter: blur(6px);
}
.login-progress-card {
    width: min(380px, 90%); padding: 32px 24px; text-align: center; background: var(--bg-elev);
    border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.login-progress-card h2 { margin: 20px 0 8px; font-size: 20px; }
.login-progress-card p { color: var(--text-muted); font-size: 14px; }
.login-spinner {
    width: 44px; height: 44px; margin: auto; border: 3px solid var(--border-strong);
    border-top-color: var(--discord); border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 8. MODÁLNÍ OKNA ========================================================== */
.modal {
    width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 48px); margin: auto; padding: 0; overflow: auto;
    border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--bg-elev);
    color: var(--text); box-shadow: var(--shadow-lg);
}
.modal[open] { animation: modal-in 0.2s var(--ease); }
.modal::backdrop { background: rgba(4, 7, 13, 0.72); backdrop-filter: blur(4px); }
.modal__panel { padding: 24px; }
.modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.modal__title { margin-top: 4px; font-size: 20px; }
.modal .error-message { margin-bottom: 16px; }
.bnet-disconnect { display: flex; flex-direction: column; gap: 16px; }

/* Okno po odeslání přihlášky */
.modal--sent { width: min(520px, calc(100% - 32px)); }
.application-sent { display: flex; flex-direction: column; gap: 20px; }
.application-sent__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.application-sent__character {
    color: var(--class-color, var(--text-muted)); font-size: 14px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere;
}
.application-sent .modal__title { margin-top: 4px; font-size: 24px; line-height: 1.25; }
.application-sent__close { margin: -8px -8px 0 0; color: var(--text-muted); }
.application-sent__close:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.application-sent__steps { margin: 0; padding: 12px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.application-sent__steps .timeline__line { margin: 0 8px; }
.application-sent__text { margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.application-sent__actions { display: flex; justify-content: flex-end; margin-top: 4px; }
.bnet-disconnect .modal__header { margin-bottom: 0; }
.bnet-disconnect__list { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); }
.bnet-disconnect__list .muted { font-weight: 400; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* 9. DASHBOARD ============================================================= */
.hero {
    position: relative; overflow: hidden; margin-bottom: 28px; padding: clamp(28px, 5vw, 56px);
    border: 1px solid var(--alliance-border); border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #15203a, #0e1424);
}
.hero__title { max-width: 20ch; margin-top: 10px; font-size: clamp(30px, 4.6vw, 46px); line-height: 1.1; }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__text { max-width: 56ch; margin-top: 16px; color: var(--text-muted); font-size: 17px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero__art {
    position: absolute; right: -10px; bottom: -40px; width: 280px; height: 280px;
    color: var(--accent); opacity: 0.08; stroke-width: 1.2; pointer-events: none;
}
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 20px; align-items: start; }

.featured { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.featured__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.featured__title { margin-top: 4px; font-size: clamp(22px, 2.6vw, 28px); }
.featured__title a:hover { color: var(--accent-hover); }
.featured__group { margin-top: 12px; }
.featured__when { display: flex; align-items: center; gap: 16px; }
.featured__weekday { font-size: 18px; font-weight: 500; }
.featured__when-sub {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 4px;
    color: var(--text-muted); font-size: 14px;
}
.featured__stats {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 24px;
    padding: 20px 0; border-block: 1px solid var(--border);
}
.big-number { font-size: 34px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.big-number__label { margin-top: 4px; color: var(--text-muted); font-size: 13px; }

.my-signup {
    display: flex; align-items: center; gap: 12px; padding: 16px;
    border: 1px solid var(--success-border); border-radius: var(--radius); background: var(--success-soft);
}
.my-signup--tentative { border-color: var(--warning-border); background: var(--warning-soft); }
.my-signup--not_attending { border-color: var(--danger-border); background: var(--danger-soft); }
.my-signup--none {
    border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent-hover);
    font-size: 14px; font-weight: 500;
}
.my-signup__info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.my-signup__label { color: var(--text-muted); font-size: 13px; font-weight: 500; }
.my-signup__name { font-weight: 500; }
.my-signup__spec { color: var(--text-muted); font-size: 13px; }
.featured__footer { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; }
.featured--empty { align-items: flex-start; justify-content: center; min-height: 280px; }

.upcoming { display: flex; flex-direction: column; min-width: 0; }
.upcoming__list { display: flex; flex-direction: column; gap: 2px; }
.upcoming__item {
    display: flex; align-items: center; gap: 12px; margin-inline: -12px; padding: 12px;
    border-radius: var(--radius); transition: background-color 0.15s;
}
.upcoming__item:hover { background: var(--surface-2); }
.upcoming__info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.upcoming__title { font-weight: 500; }
.upcoming__meta { color: var(--text-muted); font-size: 13px; }
.upcoming__arrow { color: var(--text-subtle); transition: transform 0.15s, color 0.15s; }
.upcoming__item:hover .upcoming__arrow { color: var(--accent); transform: translateX(2px); }
.upcoming__empty { padding: 24px 0; color: var(--text-muted); font-size: 14px; }
.upcoming__footer { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

.notice { display: flex; align-items: flex-start; gap: 16px; }
.notice__icon {
    width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center;
    border-radius: 12px; background: var(--accent-soft); color: var(--accent);
}
.notice__body { flex: 1; min-width: 0; }
.notice__title { margin-top: 4px; font-size: 20px; }
.notice__text { margin-top: 8px; color: var(--text-muted); }
.notice__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.stat {
    display: flex; flex-direction: column; gap: 4px; padding: 20px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.stat__value { font-size: 28px; font-weight: 500; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat__label { color: var(--text-muted); font-size: 13px; }
.page .stat-grid.stat-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat--link { transition: border-color 0.15s, background-color 0.15s; }
.stat--link:hover { border-color: var(--border-strong); }
.stat--attention .stat__value { color: var(--accent); }

.upcoming__status { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; }
.upcoming__status .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.upcoming__status--confirmed { color: var(--success); }
.upcoming__status--tentative { color: var(--warning); }
.upcoming__status--not_attending { color: var(--danger); }

/* 10. POSTAVY ============================================================== */
.profile-delete-form {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border);
}
.profile-delete-form__title { font-weight: 600; color: var(--danger); }

/* Battle.net – propojení a import postav */
.btn--alliance { background: var(--alliance); border-color: var(--alliance); color: #fff; }
.btn--alliance:hover:not(:disabled) { background: var(--alliance-hover); border-color: var(--alliance-hover); }
.bnet-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.bnet-actions form { margin: 0; }
.bnet-status { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; font-size: 0.875rem; color: var(--text-muted); }
.bnet-status .icon { color: #148eff; }
.bnet-status strong { color: var(--text); }
.bnet-status__state { color: var(--success); font-weight: 600; }
.btn--bnet { background: #148eff; border-color: #148eff; color: #fff; }
.btn--bnet:hover { background: #0074e0; border-color: #0074e0; color: #fff; }
.icon--fill { fill: currentColor; stroke: none; }
.member-groups-list { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.member-groups { position: relative; max-width: 240px; }
.member-groups > summary { max-width: 100%; }
.member-groups__label { max-width: 190px; }
.member-groups > summary { list-style: none; cursor: pointer; }
.member-groups > summary::-webkit-details-marker { display: none; }
.member-groups__row { display: flex; align-items: center; gap: 8px; }
.member-groups__row select { flex: 1; min-width: 0; }
.member-groups__name { display: block; margin-bottom: 8px; font-size: 14px; color: var(--text-muted); }
.member-groups__panel {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 320px; max-width: calc(100vw - 32px); padding: 12px;
    border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface-2); box-shadow: var(--shadow-lg);
}
.bnet-panel { margin-bottom: 16px; }
.bnet-pick { grid-column: 1 / -1; gap: 10px; }
.bnet-pick__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.bnet-pick__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.bnet-pick__item {
    display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px 12px 12px 16px; color: inherit;
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: inset 3px 0 0 var(--class-color, var(--border-strong));
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
a.bnet-pick__item:hover { border-color: var(--border-strong); }
.bnet-pick__item.is-selected {
    border-color: var(--accent);
    box-shadow: inset 3px 0 0 var(--class-color, var(--accent)), inset 0 0 0 1px var(--accent);
}
.bnet-pick__item.is-taken { cursor: not-allowed; }
.bnet-panel__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; }
.bnet-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.bnet-panel__head + p { margin: 0 0 12px; }
.bnet-list { gap: 8px; }
.bnet-list__item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 56px; padding: 8px 12px 8px 16px;
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: inset 3px 0 0 var(--class-color, var(--border-strong));
}

/* Postava z Battle.netu – jméno v barvě classy, údaje neutrálně */
.bnet-char__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bnet-char__name { color: var(--class-color, var(--text)); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.bnet-char__meta { display: flex; flex-wrap: wrap; align-items: baseline; color: var(--text-muted); font-size: 13px; line-height: 1.4; }
.bnet-char__meta > :not(:last-child)::after { content: "·"; margin: 0 6px; color: var(--text-subtle); }
.bnet-char__level { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.bnet-char__taken { color: var(--text-subtle); }
.bnet-char__hint { color: var(--text-subtle); font-size: 13px; }
.bnet-char.is-taken { box-shadow: inset 3px 0 0 var(--border-strong); }
.bnet-char.is-taken .bnet-char__name { color: var(--text-muted); }

.character-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.character-card {
    position: relative; display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 20px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    transition: border-color 0.15s;
}
.character-card:hover { border-color: var(--border-strong); }
.character-card.is-main { border-color: var(--border-strong); }
.character-card__head { display: flex; align-items: center; gap: 12px; min-width: 0; padding-right: 36px; }
.character-card__name { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.character-card__sub { color: var(--text-muted); font-size: 14px; }
.character-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.character-card__footer { display: flex; gap: 8px; margin-top: auto; }
.character-card--add {
    align-items: center; justify-content: center; gap: 12px; min-height: 168px;
    border-style: dashed; color: var(--text-muted); font-weight: 600;
}
.character-card--add:hover { border-color: var(--accent-border); color: var(--accent-hover); background: var(--accent-soft); }
.character-card__add-icon {
    width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px dashed currentColor;
}
.main-toggle { position: absolute; top: 12px; right: 12px; }
.main-toggle form { margin: 0; }
.star-btn {
    width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px;
    background: transparent; color: var(--text-subtle); cursor: pointer; transition: color 0.15s, background-color 0.15s;
}
.star-btn:hover { color: var(--accent); background: var(--accent-soft); }
.star-btn.is-main { color: var(--accent); cursor: default; }
.star-btn.is-main:hover { background: transparent; }
.star-btn.is-main .icon { fill: currentColor; }
.star-btn .icon { width: 19px; height: 19px; }

/* 11. SEZNAM RAIDŮ ========================================================= */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.search { position: relative; flex: 1 1 240px; max-width: 360px; }
.search .icon {
    position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%);
    color: var(--text-subtle); pointer-events: none;
}
.search input { min-height: 40px; padding-left: 38px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
    border: 1px solid var(--border-strong); border-radius: 999px; background: transparent;
    color: var(--text-muted); font-size: 13px; font-weight: 500; cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.chip:hover { color: var(--text); border-color: var(--text-subtle); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-hover); }
.chip__count { color: var(--text-subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .chip__count { color: inherit; opacity: 0.8; }

.raid-list { display: flex; flex-direction: column; gap: 12px; }
.raid-row {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 16px;
    padding: 12px 16px; background: var(--surface); border: 1px solid var(--border);
    border-left: 3px solid var(--border); border-radius: var(--radius-lg);
    transition: border-color 0.15s, background-color 0.15s;
}
.raid-row:hover { background: #172036; border-color: var(--border-strong); }
.raid-row--confirmed, .raid-row--confirmed:hover { border-left-color: var(--success); }
.raid-row--tentative, .raid-row--tentative:hover { border-left-color: var(--warning); }
.raid-row--not_attending, .raid-row--not_attending:hover { border-left-color: var(--danger); }
.raid-row__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.raid-row__title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.raid-row__title { font-size: 16px; }
.raid-row__title a:hover { color: var(--accent-hover); }
.raid-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--text-muted); font-size: 13px; }
.raid-row__side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }

.raid-list-quick-signup { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.raid-list-player-select, .raid-list-role-select {
    width: auto; min-height: 34px; height: 34px; padding: 0 30px 0 10px; background-position: right 8px center; font-size: 13px;
}
.raid-list-player-select { max-width: 180px; }
.raid-list-role-select { max-width: 110px; }
.raid-list-status-buttons { display: inline-flex; gap: 4px; }

.signup-chip {
    display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 4px;
    border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-2); font-size: 13px;
}
.signup-chip__name { max-width: 150px; font-weight: 600; }
.signup-chip__status { width: 15px; height: 15px; stroke-width: 2.6; }
.signup-chip--confirmed .signup-chip__status { color: var(--success); }
.signup-chip--tentative .signup-chip__status { color: var(--warning); }
.signup-chip--not_attending .signup-chip__status { color: var(--danger); }
.locked-note { display: inline-flex; align-items: center; gap: 6px; color: var(--text-subtle); font-size: 13px; }
.locked-note .icon { width: 15px; height: 15px; }

/* 12. DETAIL RAIDU ========================================================= */
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; color: var(--text-muted); font-size: 14px; }
.detail-meta strong { color: var(--text); }
.summary-grid {
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 1.35fr);
    gap: 16px; margin-bottom: 20px;
}
.summary-card {
    display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 20px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.summary-card__label {
    display: flex; align-items: center; gap: 8px; color: var(--text-muted);
    font-size: 13px; font-weight: 500;
}
.summary-card__label .icon { width: 16px; height: 16px; }
.summary-card__value { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 500; line-height: 1.25; }
.summary-card__value .icon { width: 18px; height: 18px; color: var(--text-muted); }
.summary-card__value.is-open .icon { color: var(--success); }
.summary-card__sub { color: var(--text-muted); font-size: 14px; }

.detail-columns { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr); gap: 20px; align-items: stretch; }
.timeline__note { margin: 16px 0 0; }
.detail-columns--single { grid-template-columns: minmax(0, 1fr); }
.notes { color: var(--text-muted); line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.signup-panel { display: flex; flex-direction: column; gap: 16px; }
.quick-signup-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.raid-signup-status-actions { display: flex; gap: 8px; }
.current-signup {
    display: flex; flex-direction: column; gap: 12px; padding: 16px;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev);
}
.current-signup__status { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.current-signup__status .icon { width: 18px; height: 18px; stroke-width: 2.4; }
.current-signup__status--confirmed { color: var(--success); }
.current-signup__status--tentative { color: var(--warning); }
.current-signup__status--not_attending { color: var(--danger); }
.current-signup__character { display: flex; align-items: center; gap: 12px; min-width: 0; }
.current-signup__info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.character-name { color: var(--class-color, var(--text)); font-weight: 500; overflow-wrap: anywhere; }
.current-signup__cancel { margin: 0 0 0 auto; }
.signup-panel__note { color: var(--text-muted); font-size: 14px; }

/* 13. SESTAVA RAIDU ======================================================== */
.roster-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 12px; }
.roster-group { overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.roster-group--unassigned { margin-top: 12px; }
.roster-group__header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px;
    background: var(--bg-elev); border-bottom: 1px solid var(--border);
}
.roster-group__title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.roster-group__empty { padding: 10px 12px; color: var(--text-subtle); font-size: 13px; }
.count-pill.is-short { color: var(--warning); }
.roster-row {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 4px 10px;
    padding: 6px 12px; border-top: 1px solid var(--border);
}
.roster-group__header + .roster-row, .roster-group > .roster-row:first-child { border-top: 0; }
.roster-row:hover { background: rgba(255, 255, 255, 0.03); }
.roster-row .class-icon { width: 24px; height: 24px; }
.roster-row__info { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.roster-row__name { color: var(--class-color, var(--text)); font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.roster-row__spec { overflow: hidden; color: var(--text-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.roster-row__badges { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; }
.roster-row__badges .badge, .roster-row__badges .role-badge { padding: 1px 6px; font-size: 11px; }
.roster-row-edit > summary { list-style: none; }
.roster-row-edit > summary::-webkit-details-marker { display: none; }
.roster-row-edit[open] { grid-column: 1 / -1; }
.roster-edit-form {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; gap: 12px;
    margin: 12px 0 4px; padding: 16px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
}
.edit-field label { display: flex; flex-direction: column; gap: 6px; }
.edit-field__label { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.roster-edit-form select { min-height: 38px; font-size: 14px; }
.roster-edit-form .save-player-button { min-height: 38px; }
.not-attending-disclosure .roster-group { opacity: 0.85; }
@media (max-width: 900px) {
    .roster-columns { grid-template-columns: minmax(0, 1fr); }
}

/* 14. OSTATNÍ STRÁNKY ====================================================== */
.center-card { max-width: 560px; margin: 40px auto; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.center-card h1 { font-size: 26px; }
.center-card .btn { margin-top: 8px; }
.role-callout {
    margin: 8px 0; padding: 12px 16px; border: 1px solid var(--accent-border); border-radius: var(--radius);
    background: var(--accent-soft); color: var(--accent-hover); font-size: 14px;
}
.popup-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

/* 15. O GUILDĚ + NÁBOR ===================================================== */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.prose { color: #c9d1e2; font-size: 16px; line-height: 1.75; }
.prose p + p { margin-top: 14px; }
.prose strong { color: var(--text); }
.prose .lead { color: var(--text); font-size: 20px; font-weight: 500; }

/* Ochrana soukromí – jeden sloupec textu, sekce oddělené linkou */
.privacy { max-width: 760px; }
.privacy__section + .privacy__section { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.privacy__title { margin-bottom: 8px; color: var(--text); font-size: 20px; font-weight: 600; line-height: 1.3; }
.privacy__updated { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-subtle); font-size: 13px; }

.facts { display: flex; flex-direction: column; }
.fact { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); }
.fact:first-child { border-top: 0; padding-top: 0; }
.fact__icon {
    width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center;
    border-radius: 10px; border: 1px solid var(--border); color: var(--text-muted);
}
.fact__label { color: var(--text-muted); font-size: 13px; font-weight: 500; }
.fact__value { font-weight: 600; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 24px 20px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.step::before {
    counter-increment: step; content: counter(step);
    width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 50%;
    background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums;
}
.step__title { font-size: 16px; }
.step__text { margin-top: 8px; color: var(--text-muted); font-size: 14px; }

.recruit-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.recruit {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-width: 0;
    background: var(--bg-elev); border: 1px solid var(--border); border-left: 3px solid var(--text-subtle); border-radius: var(--radius);
}
.recruit--high { border-left-color: var(--success); }
.recruit--medium { border-left-color: var(--warning); }
.recruit--low { border-left-color: var(--text-subtle); }
.recruit.is-inactive { opacity: 0.5; }
.recruit__info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.recruit__title { font-weight: 500; }
.recruit__note { color: var(--text-muted); font-size: 13px; }
.recruit__priority { font-size: 12px; font-weight: 500; color: var(--text-subtle); }
.recruit--high .recruit__priority { color: var(--success); }
.recruit--medium .recruit__priority { color: var(--warning); }
.recruit__actions { display: flex; gap: 4px; }
.recruit__actions form { margin: 0; }
.role-glyph {
    width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%;
    background: var(--surface-2); color: var(--text-muted); font-size: 11px; font-weight: 600;
}
.role-glyph--tank { color: var(--tank); background: rgba(94, 169, 234, 0.13); }
.role-glyph--healer { color: var(--healer); background: rgba(79, 194, 138, 0.13); }
.role-glyph--dps { color: var(--dps); background: rgba(230, 147, 79, 0.13); }

/* 16. PŘIHLÁŠKY ============================================================ */
.apply-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.apply-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }

.timeline { display: flex; align-items: center; gap: 0; margin: 6px 0 2px; }
.timeline__step { display: flex; align-items: center; gap: 8px; color: var(--text-subtle); font-size: 14px; font-weight: 600; white-space: nowrap; }
.timeline__dot {
    width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%;
    border: 2px solid var(--border-strong); background: var(--bg); color: var(--text-subtle);
}
.timeline__dot .icon { width: 14px; height: 14px; stroke-width: 3; }
.timeline__line { flex: 1; min-width: 20px; height: 2px; margin: 0 12px; background: var(--border-strong); }
.timeline__step.is-done { color: var(--text); }
.timeline__step.is-done .timeline__dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.timeline__step.is-current { color: var(--text); }
.timeline__step.is-current .timeline__dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline__line.is-done { background: var(--accent); }
.timeline--approved .timeline__step:last-child .timeline__dot { background: var(--success); border-color: var(--success); color: #0b1a12; }
.timeline--rejected .timeline__step:last-child .timeline__dot { background: var(--danger); border-color: var(--danger); color: #fff; }
.timeline--withdrawn .timeline__step:last-child .timeline__dot { background: var(--text-subtle); border-color: var(--text-subtle); }

.applicant { display: flex; align-items: center; gap: 16px; }
.applicant__name { font-size: 22px; font-weight: 600; color: var(--class-color, var(--text)); }
.applicant__sub { color: var(--text-muted); }
.applicant__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.dl { display: grid; grid-template-columns: 1fr; gap: 20px; }
.dl__label { color: var(--text-muted); font-size: 13px; font-weight: 500; }
.dl__value { margin-top: 8px; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.65; }

.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 12px; }
.msg__body {
    flex: 1; min-width: 0; padding: 12px 16px; background: var(--bg-elev);
    border: 1px solid var(--border); border-radius: 4px var(--radius) var(--radius) var(--radius);
}
.msg__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 4px; font-size: 13px; }
.msg__author { font-weight: 600; }
.msg__time { color: var(--text-subtle); }
.msg__text { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.6; font-size: 15px; }
.msg--own .msg__body { border-color: var(--alliance-border); background: rgba(58, 111, 216, 0.07); }
.msg--internal .msg__body { border-style: dashed; border-color: var(--warning-border); background: rgba(227, 185, 79, 0.05); }
.msg--system { align-items: center; gap: 12px; padding-left: 8px; color: var(--text-subtle); font-size: 14px; }
.msg--system .icon { width: 15px; height: 15px; }
.msg--system .msg__time { margin-left: auto; font-size: 12px; }

.comment-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.comment-form__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

.tally { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tally__item {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px;
    border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border);
}
.tally__value { font-size: 22px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tally__label { color: var(--text-muted); font-size: 12px; }
.tally__item--approve .tally__value { color: var(--success); }
.tally__item--neutral .tally__value { color: var(--warning); }
.tally__item--reject .tally__value { color: var(--danger); }

.vote-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.vote { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; }
.vote__icon {
    width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%;
}
.vote__icon .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.vote--approve .vote__icon { background: var(--success-soft); color: var(--success); }
.vote--neutral .vote__icon { background: var(--warning-soft); color: var(--warning); }
.vote--reject .vote__icon { background: var(--danger-soft); color: var(--danger); }
.vote__who { font-weight: 600; }
.vote__comment { color: var(--text-muted); font-size: 14px; }

.vote-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.vote-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.vote-buttons .att-btn { width: 100%; height: 40px; font-size: 13px; }

.decision-form { display: flex; flex-direction: column; gap: 12px; }
.decision-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.decision-buttons .btn--success { grid-column: 1 / -1; }

.app-list { display: flex; flex-direction: column; gap: 12px; }
.app-row {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px 20px;
    padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    transition: border-color 0.15s, background-color 0.15s;
}
.app-row:hover { background: #172036; border-color: var(--border-strong); }
.app-row__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.app-row__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.app-row__name { font-size: 16px; font-weight: 600; color: var(--class-color, var(--text)); }
.app-row__discord { color: var(--text-subtle); font-size: 13px; }
.app-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--text-muted); font-size: 13px; }
.app-row__votes { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.app-row__votes span { display: inline-flex; align-items: center; gap: 4px; }
.app-row__votes .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.v-approve { color: var(--success); }
.v-neutral { color: var(--warning); }
.v-reject { color: var(--danger); }
.my-vote-tag { color: var(--text-subtle); font-size: 12px; font-weight: 500; }

/* 17. SPRÁVA =============================================================== */
.members { display: flex; flex-direction: column; }
.card--flush { padding: 0; }
.roster-table { display: flex; flex-direction: column; }
.guild-roster-row {
    display: grid; grid-template-columns: minmax(0, 2fr) 64px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr);
    align-items: center; gap: 12px 20px; min-height: 48px; padding: 8px 20px; border-top: 1px solid var(--border);
}
.guild-roster-row:first-child { border-top: 0; }
.guild-roster-row--head { min-height: 40px; color: var(--text-subtle); font-size: 13px; }
.roster-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; transition: color 0.15s; }
.guild-roster-row__num.roster-sort { justify-content: flex-end; }
.roster-sort:hover, .roster-sort.is-active { color: var(--text); }
.roster-sort__arrow { width: 14px; height: 14px; }
.roster-sort__arrow.is-asc { transform: rotate(180deg); }
.guild-roster-row__name { font-weight: 500; }
.guild-roster-row__num { text-align: right; font-variant-numeric: tabular-nums; }
.guild-roster-row__class { color: var(--class-color, var(--text)); }
.guild-roster-row__rank { color: var(--text-muted); }
.guild-roster-row__owner { min-width: 0; }
@media (max-width: 720px) {
    .guild-roster-row { grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); padding: 8px 16px; }
    .guild-roster-row__rank, .guild-roster-row__owner { grid-column: span 1; }
    .guild-roster-row--head > :nth-child(n+4) { display: none; }
}
.member-row {
    display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 12px 20px;
    min-height: 64px; padding: 12px 20px; border-top: 1px solid var(--border);
}
.member-row:first-child { border-top: 0; }
.member-row__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.member-row__name { font-weight: 500; }
.member-row__sub { color: var(--text-subtle); font-size: 13px; }
.member-row__chars { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; color: var(--text-muted); font-size: 14px; }
.member-char { display: inline-flex; align-items: center; gap: 8px; padding: 2px 8px 2px 2px; border-radius: 6px; background: var(--bg-elev); border: 1px solid var(--border); }
.member-char.is-main { box-shadow: inset 2px 0 0 var(--accent); }
.member-char__name { color: var(--class-color, var(--text)); font-weight: 500; font-size: 13px; }
.member-row__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.role-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.role-form select { width: auto; min-height: 34px; height: 34px; padding: 0 32px 0 12px; font-size: 14px; background-position: right 8px center; }
.role-tag {
    display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px;
    font-size: 12px; font-weight: 500; color: var(--text-muted); border: 1px solid var(--border);
}
.role-tag--admin { color: var(--accent-hover); border-color: var(--accent-border); }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 820px; }
.settings-section__head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.settings-section__head .fact__icon { margin-top: 2px; }
.settings-section__desc { margin-top: 4px; color: var(--text-muted); font-size: 14px; }
.soon-tag {
    display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-left: 8px; border-radius: 999px;
    background: var(--surface-2); color: var(--text-subtle); font-size: 12px; font-weight: 500;
    vertical-align: middle;
}

/* 18. RESPONZIVITA A PŘÍSTUPNOST =========================================== */
@media (max-width: 960px) {
    .dashboard-grid, .detail-columns, .about-grid, .apply-layout { grid-template-columns: minmax(0, 1fr); }
    .apply-aside { position: static; }
    /* Vedení: hlasování a rozhodnutí hned pod profilem uchazeče, komentáře až po nich. */
    .detail-columns--review .detail-main { display: contents; }
    .detail-columns--review .detail-side { order: 1; }
    .detail-columns--review .detail-comments { order: 2; }
    .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .summary-card--wide { grid-column: 1 / -1; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .raid-row { grid-template-columns: auto minmax(0, 1fr); }
    .raid-row__side { grid-column: 1 / -1; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border); }
    .app-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .app-row__votes { grid-column: 2; }
    .member-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .member-row__chars { grid-column: 2 / -1; }
}

@media (max-width: 1080px) {
    .nav-toggle { display: inline-flex; }
    .app-nav {
        position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px;
        padding: 12px clamp(16px, 4vw, 32px) 16px; background: var(--bg-elev); border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-6px);
        transition: opacity 0.18s, transform 0.18s var(--ease), visibility 0.18s;
    }
    .app-nav.is-open { opacity: 1; visibility: visible; transform: none; }
    .nav-link { height: 44px; font-size: 15px; }
    .app-nav__divider { width: auto; height: 1px; margin: 8px 0; }
    .notif + .user-menu { margin-left: 0; }
    .user-menu { justify-content: space-between; }
    .user-menu__name { max-width: none; }
    .nav-login-form .btn { width: 100%; }
}

@media (max-width: 640px) {
    .page { padding-top: 24px; }
    .card { padding: 20px; }
    .page-header__actions, .page-header__actions .btn { width: 100%; }
    .summary-grid { grid-template-columns: minmax(0, 1fr); }
    .featured__top { flex-direction: column; }
    .featured__stats { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .form-grid > .field { grid-column: 1 / -1 !important; }
    .raid-list-quick-signup { width: 100%; }
    .raid-list-player-select { flex: 1 1 140px; max-width: none; }
    .raid-row__enter { display: none; }
    .raid-signup-status-actions { flex-wrap: wrap; }
    .steps, .choice-cards { grid-template-columns: minmax(0, 1fr); }
    .page .stat-grid.stat-grid--3 { grid-template-columns: minmax(0, 1fr); }
    .vote-buttons { grid-template-columns: minmax(0, 1fr); }
    .timeline__step span:last-child { display: none; }
    .timeline__step.is-current span:last-child { display: inline; }
    .app-row { grid-template-columns: auto minmax(0, 1fr); }
    .app-row > :last-child { display: none; }
    .app-row__votes { grid-column: 2; }
    .member-row { grid-template-columns: auto minmax(0, 1fr); padding: 12px 16px; }
    .member-row__chars, .member-row > :last-child { grid-column: 2; }
    .member-row__actions { justify-content: flex-start; }
    .member-groups__panel { left: 0; right: auto; }
    .member-groups-list { align-items: flex-start; }
    .tabs { width: 100%; }
}

@media (max-width: 420px) {
    .stat-grid { grid-template-columns: minmax(0, 1fr); }
    .brand__sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important;
    }
}

/* 8. ZVONEK S UPOZORNENIMI ================================================= */
.notif { position: relative; }
.notif__toggle {
    position: relative; width: 36px; height: 36px; display: grid; place-items: center;
    border: 1px solid var(--border); border-radius: 50%; background: var(--surface);
    color: var(--text-muted); cursor: pointer;
}
.notif__toggle:hover { color: var(--text); background: var(--surface-hover); }
.notif__toggle .icon { width: 18px; height: 18px; }
.notif__badge { position: absolute; top: -6px; right: -6px; }
.notif__badge[hidden] { display: none; }
.notif__panel {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 150;
    width: min(360px, calc(100vw - 32px)); border: 1px solid var(--border-strong);
    border-radius: var(--radius); background: var(--surface-2); box-shadow: var(--shadow-lg);
}
.notif__panel[hidden] { display: none; }
.notif__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px;
}
.notif__readall { border: 0; background: transparent; color: var(--accent); font-size: 12px; cursor: pointer; }
.notif__readall[hidden] { display: none; }
.notif__readall:hover { color: var(--accent-hover); }
.notif__list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.notif__item {
    display: flex; flex-direction: column; gap: 2px; padding: 12px 16px;
    border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 14px; text-decoration: none;
}
.notif__item:hover { background: var(--surface-hover); }
.notif__item.is-unread { color: var(--text); border-left: 3px solid var(--accent); padding-left: 13px; }
.notif__time { font-size: 12px; color: var(--text-subtle); }
.notif__empty { margin: 0; padding: 16px; font-size: 14px; color: var(--text-muted); }
.notif__empty[hidden] { display: none; }

@media (max-width: 900px) {
    .notif__panel { right: auto; left: 0; }
}

/* =====================================
   KALENDAR RAIDU
   ===================================== */
.cal__nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cal__month { font-size: 20px; }
.cal__month::first-letter { text-transform: uppercase; }
.cal__nav-actions { display: flex; align-items: center; gap: 6px; }
.cal__grid {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; overflow: hidden;
    background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.cal__weekday {
    padding: 10px 4px; background: var(--bg-elev); color: var(--text-muted);
    font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-align: center;
}
.cal__weekday.is-weekend { color: var(--accent); }

/* Buňka dne */
.cal__day {
    position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 124px;
    padding: 8px; background: var(--surface);
}
.cal__day.is-weekend { background: color-mix(in srgb, var(--surface) 82%, var(--surface-2)); }
.cal__day.is-past:not(.is-today) .cal__date { color: var(--text-subtle); }
.cal__day.is-outside { background: var(--bg); }
.cal__day.is-outside .cal__date { opacity: 0.5; }
.cal__day.is-outside .cal__events { opacity: 0.6; }
.cal__day.is-today { background: color-mix(in srgb, var(--surface) 88%, var(--accent)); box-shadow: inset 0 0 0 1px var(--accent-border); }
.cal__day-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 24px; }
.cal__date { color: var(--text); font-size: 13px; font-weight: 600; line-height: 24px; font-variant-numeric: tabular-nums; }
.cal__day.is-today .cal__date {
    display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
    background: var(--accent); color: var(--on-accent);
}

/* Založení raidu na den – na myši se ukáže při najetí, na dotyku je vidět stále */
.cal__add {
    display: inline-grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0;
    border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--text-muted);
    opacity: 0; transition: opacity 0.15s, color 0.15s, border-color 0.15s, background-color 0.15s;
}
.cal__add .icon { width: 14px; height: 14px; }
.cal__day:hover .cal__add, .cal__add:focus-visible { opacity: 1; }
.cal__add:hover { border-style: solid; border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent); }
@media (hover: none) { .cal__add { opacity: 0.7; } }

/* Raid */
.cal__events { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cal-event {
    --ev-color: var(--text-subtle); --ev-bg: var(--surface-2); --ev-border: var(--border-strong);
    display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 5px 7px 6px 8px;
    background: var(--ev-bg); border: 1px solid var(--ev-border); border-left: 3px solid var(--ev-color);
    border-radius: var(--radius-sm); color: var(--text); font-size: 12px; line-height: 1.3;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: border-color 0.15s, background-color 0.15s, transform 0.15s;
}
.cal-event:hover { background: color-mix(in srgb, var(--ev-bg) 70%, var(--surface-hover)); border-color: var(--ev-color); transform: translateY(-1px); }
.cal-event__meta { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-muted); font-size: 11px; }
.cal-event__time { flex-shrink: 0; color: var(--ev-color); font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-event:not(.cal-event--confirmed):not(.cal-event--tentative):not(.cal-event--not_attending) .cal-event__time { color: var(--text); }
.cal-event__group { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event__end { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: auto; }
.cal-event__count { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.cal-event__count .icon, .cal-event__icon { width: 11px; height: 11px; }
.cal-event__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.cal-event--confirmed { --ev-color: var(--success); --ev-bg: var(--success-soft); --ev-border: var(--success-border); }
.cal-event--tentative { --ev-color: var(--warning); --ev-bg: var(--warning-soft); --ev-border: var(--warning-border); }
.cal-event--not_attending { --ev-color: var(--danger); --ev-bg: var(--danger-soft); --ev-border: var(--danger-border); }
.cal-event--completed { opacity: 0.55; box-shadow: none; }
.cal-event--cancelled { opacity: 0.5; box-shadow: none; border-style: dashed; border-left-style: solid; }
.cal-event--cancelled .cal-event__title { text-decoration: line-through; }
.cal__empty { margin-top: 12px; text-align: center; }
.cal__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; color: var(--text-muted); font-size: 12px; }
.cal__legend > span { display: inline-flex; align-items: center; gap: 6px; }
.cal__legend .icon { width: 12px; height: 12px; }
.cal__swatch {
    display: inline-block; width: 14px; height: 12px; border-radius: 3px;
    background: var(--surface-2); border: 1px solid var(--border-strong); border-left: 3px solid var(--text-subtle);
}
.cal__swatch--confirmed { background: var(--success-soft); border-color: var(--success-border); border-left-color: var(--success); }
.cal__swatch--tentative { background: var(--warning-soft); border-color: var(--warning-border); border-left-color: var(--warning); }
.cal__swatch--not_attending { background: var(--danger-soft); border-color: var(--danger-border); border-left-color: var(--danger); }
.cal__legend-cancelled { text-decoration: line-through; }

.cal__agenda { display: none; flex-direction: column; gap: 16px; margin: 20px 0 0; padding: 0; list-style: none; }
.cal__agenda-day { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 8px; }
.cal__agenda-date { font-weight: 600; }
.cal__agenda-date.is-today { color: var(--accent); }
.cal__agenda-num { color: var(--text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.cal__agenda-list { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.cal__agenda-list .cal-event { padding: 8px 12px; font-size: 14px; }

@media (max-width: 640px) {
    .cal__agenda { display: flex; }
    .cal__day { min-height: 68px; gap: 3px; padding: 4px 3px; }
    .cal__day-head { min-height: 20px; }
    .cal__date { font-size: 12px; line-height: 20px; }
    .cal__day.is-today .cal__date { min-width: 20px; height: 20px; padding: 0 4px; }
    .cal__add { width: 18px; height: 18px; }
    .cal__add .icon { width: 11px; height: 11px; }
    .cal__events { gap: 3px; }
    .cal__weekday { padding: 6px 2px; font-size: 11px; }
    .cal__grid .cal-event { align-items: center; padding: 2px 1px; border-left-width: 2px; box-shadow: none; }
    .cal__grid .cal-event__meta { justify-content: center; }
    .cal__grid .cal-event__time { font-size: 10px; }
    .cal__grid .cal-event__group, .cal__grid .cal-event__end, .cal__grid .cal-event__title { display: none; }
    .cal__agenda .cal-event { padding: 8px 12px; }
}

/* Formulář přihlášky: pole, která se zobrazují podle volby „Hlásím se jako“ */
.form-grid > .apply-conditional { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 20px; }
.apply-conditional[hidden] { display: none; }
