:root {
    --bg-main: #e8f4ea;
    --bg-main-alt: #dcefe0;
    --bg-card: #ffffff;
    --bg-card-hover: #f4fbf5;
    --accent: #2e9b4a;
    --accent-bright: #3ecf5c;
    --accent-deep: #1e7a38;
    --accent-hover: #268a3e;
    --pitch: #5cb86a;
    --pitch-dark: #4a9e58;
    --pitch-stripe-a: #d4ecd9;
    --pitch-stripe-b: #c5e4cc;
    --text-dark: #1a3d24;
    --text-body: #2d5a3a;
    --text-muted: #5a7d66;
    --border: #b8dcc4;
    --border-soft: rgba(46, 155, 74, 0.22);
    --link-bg: #e6f7ea;
    --shadow-card: 0 8px 28px rgba(30, 122, 56, 0.1);
    --shadow-hover: 0 12px 32px rgba(30, 122, 56, 0.16);
    --radius-lg: 16px;
    --radius-md: 10px;
}

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    color: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-color: var(--pitch-stripe-a);
    background-image:
        radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.55) 0, transparent 42%),
        radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.35) 0, transparent 38%),
        repeating-linear-gradient(
            0deg,
            var(--pitch-stripe-a),
            var(--pitch-stripe-a) 56px,
            var(--pitch-stripe-b) 56px,
            var(--pitch-stripe-b) 112px
        );
    background-attachment: fixed;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; transition: 0.25s; }
.hidden { display: none !important; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.25s;
    font-family: inherit;
}
.btn-primary {
    background: linear-gradient(145deg, var(--accent-bright), var(--accent));
    color: #fff;
    box-shadow: 0 4px 14px rgba(46, 155, 74, 0.35);
}
.btn-primary:hover {
    background: linear-gradient(145deg, var(--accent), var(--accent-deep));
    box-shadow: 0 6px 18px rgba(30, 122, 56, 0.4);
    transform: translateY(-1px);
}
.btn-secondary {
    background: #fff;
    border: 2px solid var(--border);
    color: var(--text-body);
}
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent-deep);
}
.btn-small { padding: 6px 16px; font-size: 0.9rem; }

.site-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
    box-shadow: 0 4px 20px rgba(30, 122, 56, 0.06);
}
.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.gender-switch {
    display: inline-flex;
    border: 2px solid var(--border-soft);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
}
.gender-switch__btn {
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
}
.gender-switch__btn.is-active {
    background: linear-gradient(145deg, var(--accent-bright), var(--pitch-dark));
    color: #fff;
}
.gender-switch__btn:not(.is-active):hover {
    background: var(--link-bg);
    color: var(--accent-deep);
}
.logo {
    font-size: clamp(0.92rem, 2.8vw, 1.12rem);
    font-weight: 800;
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--text-dark);
    text-decoration: none;
}
.logo:hover { color: var(--accent-deep); }
.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--accent-bright), var(--pitch-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(46, 155, 74, 0.35);
}
.nav-menu {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav-menu a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 999px;
}
.nav-menu a:hover {
    color: var(--accent-deep);
    background: var(--link-bg);
}
.header-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
    flex: 1 1 auto;
    min-width: 0;
}
@media (max-width: 720px) {
    .header-nav {
        flex: 1 1 100%;
        width: 100%;
    }
}
.btn-prefs-gear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.05rem;
    box-shadow: 0 2px 8px rgba(30, 122, 56, 0.08);
    transition: color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn-prefs-gear:hover {
    color: var(--accent-deep);
    border-color: var(--accent-bright);
    transform: rotate(45deg);
}
.nav-menu li.pref-hidden { display: none; }
.links-section.pref-empty { display: none; }
.pref-hidden { display: none !important; }

.hero {
    padding: 36px 0 40px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-main-alt) 100%);
    border-bottom: 3px solid var(--border);
}
.hero-stage {
    position: relative;
    min-height: 188px;
    padding: 36px 20px 32px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.08) 100%),
        repeating-linear-gradient(
            90deg,
            rgba(123, 201, 138, 0.55) 0,
            rgba(123, 201, 138, 0.55) 56px,
            rgba(107, 185, 122, 0.5) 56px,
            rgba(107, 185, 122, 0.5) 112px
        );
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), var(--shadow-card);
}
.hero-pitch-markings {
    position: absolute;
    inset: 10px 16px 12px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.38;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-pitch-svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 100%;
    aspect-ratio: 105 / 68;
}
.hero-pitch-lines {
    opacity: 1;
    filter: drop-shadow(0 0 0.5px rgba(30, 90, 50, 0.2));
}
.hero-content {
    position: relative;
    z-index: 1;
}
.hero h1 {
    font-size: clamp(1.85rem, 4vw, 2.65rem);
    margin: 12px 0 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: var(--text-dark);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
.hero .subtitle {
    color: var(--text-body);
    max-width: 580px;
    margin: 0 auto;
    font-size: 1.05rem;
}
.hero .subtitle code {
    background: rgba(255, 255, 255, 0.75);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.88em;
    color: var(--accent-deep);
    border: 1px solid var(--border-soft);
}
.badge {
    background: #fff;
    color: var(--accent-deep);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 2px solid var(--accent-bright);
    box-shadow: 0 2px 8px rgba(46, 155, 74, 0.15);
}
.hero-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}
.gender-switch--hero {
    box-shadow: var(--shadow-card);
}
.gender-switch--hero .gender-switch__btn {
    padding: 9px 22px;
    font-size: 0.88rem;
}
.season-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    padding: 8px 16px 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
    box-shadow: var(--shadow-card);
}
.season-tag__label {
    font-weight: 600;
    color: #9a7b4f;
    margin: 0;
}
.season-select {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--accent-deep);
    cursor: pointer;
    padding: 2px 4px 2px 0;
    min-width: 6.5rem;
}
.season-select:focus {
    outline: 2px solid var(--accent-bright);
    outline-offset: 2px;
    border-radius: 4px;
}

.section-pad { padding: 48px 0 56px; }
.links-section:nth-child(even) {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(220, 239, 224, 0.55) 100%);
}
.section-head { margin-bottom: 28px; }
.section-title {
    text-align: center;
    font-size: 1.75rem;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-dark);
}
.section-title i { color: var(--accent); }
.section-desc { text-align: center; color: var(--text-muted); margin: 0; font-size: 0.95rem; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 22px;
    align-items: start;
}

/* Rejilla 2 columnes: amateur (Elit|Federació…) i Futbol 11 (Cadet S16|S15…) */
.category-grid--paired {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 26px;
    column-gap: 22px;
}
.category-grid--paired .category-box--catalanes,
.category-grid--paired .category-box--full-row {
    grid-column: 1 / -1;
}
.category-box--stacked .category-box-body--main,
.category-box--stacked .category-box-body--extra:not(.is-collapsed) {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.category-box--stacked .competition-block {
    margin-bottom: 14px;
}
/* Sala Nacional: totes les divisions visibles en 2 columnes */
.category-box--comp-grid-2 .category-box-body--main,
.category-box--comp-grid-2 .category-box-body--extra:not(.is-collapsed) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 22px;
    align-items: start;
}
.category-box--comp-grid-2 .competition-block {
    margin-bottom: 0;
}
@media (max-width: 720px) {
    .category-box--comp-grid-2 .category-box-body--main,
    .category-box--comp-grid-2 .category-box-body--extra:not(.is-collapsed) {
        grid-template-columns: 1fr;
    }
}
.juvenil-top-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 22px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px dashed var(--border);
}
.juvenil-top-row .competition-block {
    margin-bottom: 0;
}
@media (max-width: 800px) {
    .juvenil-top-row {
        grid-template-columns: 1fr;
    }
}
.category-grid--paired .category-box--catalanes {
    margin-top: 4px;
}
.category-box--catalanes .catalanes-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px 28px;
    align-items: start;
}
.category-box--catalanes .catalanes-col .competition-block:last-child {
    margin-bottom: 0;
}
.category-grid--paired .category-box--copes-only .category-box-body--extra:not(.is-collapsed) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px 20px;
}
@media (max-width: 720px) {
    .category-grid--paired {
        grid-template-columns: 1fr;
    }
    .category-box--catalanes .catalanes-columns {
        grid-template-columns: 1fr;
    }
}
.category-box {
    background: var(--bg-card);
    border: 2px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 22px 20px 20px;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
    box-shadow: var(--shadow-card);
}
.category-box-foot {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 2px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.category-box-foot .category-box-body--extra {
    width: 100%;
    align-self: stretch;
}
.category-box-foot--solo {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.category-box-body--extra.is-collapsed {
    display: none;
}
.extra-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.25s;
}
.extra-toggle span {
    text-decoration: underline;
    text-decoration-color: rgba(90, 125, 102, 0.45);
    text-underline-offset: 3px;
}
.extra-toggle:hover {
    color: var(--accent-deep);
}
.extra-toggle:hover span {
    text-decoration-color: var(--accent);
}
.extra-toggle.is-open {
    color: var(--accent-deep);
}
.extra-toggle.is-open i {
    transform: rotate(180deg);
}
.extra-toggle i {
    font-size: 0.72rem;
    transition: transform 0.25s;
    color: var(--accent);
    text-decoration: none;
}
.category-box-body--extra:not(.is-collapsed) {
    margin-top: 12px;
}
.category-box--copes-only .category-box-foot--solo .extra-toggle {
    margin-top: 2px;
}
.category-box:hover {
    border-color: var(--accent-bright);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.category-title {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent-bright);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-dark);
}
.competition-block { margin-bottom: 14px; }
.competition-block:last-child { margin-bottom: 0; }
.competition-block h4 {
    margin: 0 0 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.group-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.group-link-wrap {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(30, 122, 56, 0.08);
}
.group-link-wrap .group-link {
    box-shadow: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right-width: 0;
}
.group-fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 0 10px;
    border: 2px solid var(--border);
    border-left: 1px solid var(--border-soft);
    background: #fff;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}
.group-fav:hover {
    color: #c9a227;
    background: #fffbeb;
    border-color: #e8c547;
}
.group-link-wrap.is-favorite .group-fav {
    color: #b8860b;
    background: linear-gradient(180deg, #fff9e6 0%, #ffeaa0 100%);
    border-color: #d4af37;
}
.group-link-wrap.is-favorite .group-fav i {
    color: #c9a227;
}
.group-link-wrap.is-favorite .group-link {
    border-color: #d4af37;
    background: linear-gradient(180deg, #fffef5 0%, #fff6d6 100%);
}
.group-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 8px 13px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #f0fdf2 0%, var(--link-bg) 100%);
    border: 2px solid var(--border);
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--accent-deep);
    box-shadow: 0 2px 6px rgba(30, 122, 56, 0.08);
}
.group-link:hover {
    background: linear-gradient(145deg, var(--accent-bright), var(--accent));
    border-color: var(--accent-deep);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(46, 155, 74, 0.35);
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    border-top: 3px solid var(--accent-bright);
    padding: 20px;
    z-index: 2000;
    box-shadow: 0 -8px 30px rgba(30, 122, 56, 0.12);
}
.cookie-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
@media (min-width: 768px) {
    .cookie-content { flex-direction: row; align-items: center; justify-content: space-between; }
    .cookie-text { max-width: 60%; }
}
.cookie-text h3 { margin-bottom: 5px; color: var(--text-dark); font-size: 1.1rem; }
.cookie-text p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.cookie-btns-group { display: flex; gap: 10px; flex-wrap: wrap; }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 61, 36, 0.45);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}
.modal-window {
    background: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-hover);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}
.modal-header {
    padding: 20px;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--link-bg);
}
.modal-header h3 { font-size: 1.2rem; margin: 0; color: var(--text-dark); }
.close-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.close-icon:hover { color: var(--accent-deep); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-desc { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 25px; }
.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}
.cookie-option:last-child { border-bottom: none; }
.option-text h4 { font-size: 1rem; color: var(--text-dark); margin-bottom: 5px; }
.option-text p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.modal-footer {
    padding: 20px;
    background: var(--bg-main-alt);
    border-top: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.modal-window--prefs { max-width: 780px; }
.modal-footer--prefs { justify-content: flex-end; flex-wrap: wrap; }
.prefs-tree-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.prefs-section-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: #fff;
    border: 2px solid var(--border-soft);
}
.prefs-section-filters .pref-filter-btn {
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 7px 14px;
}
.prefs-section-filters .pref-filter-btn.is-active {
    background: linear-gradient(145deg, var(--accent-bright), var(--accent));
    border-color: var(--accent-deep);
    color: #fff;
    box-shadow: 0 3px 10px rgba(46, 155, 74, 0.3);
}
.pref-tree-section--filtered-out {
    display: none !important;
}
.prefs-tree {
    max-height: min(52vh, 420px);
    overflow-y: auto;
    border: 2px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    background: var(--bg-main-alt);
    font-size: 0.9rem;
}
.prefs-tree-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-soft);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.prefs-tree-legend__sep {
    opacity: 0.45;
    font-weight: 400;
}
.prefs-tree-legend__item--section { color: var(--accent-deep); }
.prefs-tree-legend__item--category { color: #3d6b4a; }
.prefs-tree-legend__item--division { color: var(--text-muted); }
.pref-tree-section {
    margin-bottom: 16px;
    padding: 12px 12px 14px;
    border: 2px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: #fff;
}
.pref-tree-section:last-child { margin-bottom: 0; }
.pref-tree-categories {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    padding-left: 4px;
    border-left: 3px solid var(--accent-bright);
}
.pref-tree-category {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--bg-main-alt);
    border: 1px solid var(--border-soft);
}
.pref-tree-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 2px 0;
    cursor: pointer;
    color: var(--text-dark);
    font-weight: 500;
    box-sizing: border-box;
}
.pref-tree-row__text {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
    word-break: break-word;
}
.pref-tree-row--section {
    font-weight: 800;
    font-size: 1rem;
    color: var(--accent-deep);
    padding-bottom: 4px;
}
.pref-tree-row--category {
    font-weight: 700;
    font-size: 0.92rem;
}
.pref-tree-divisions {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}
.pref-tree-divisions__title {
    margin: 0 0 6px;
    padding-left: 28px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.pref-tree-divisions__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pref-tree-divisions__list li {
    margin: 0;
    padding: 0;
}
.pref-tree-row--division {
    font-size: 0.84rem;
    color: var(--text-muted);
    font-weight: 500;
    padding-left: 18px;
}
.pref-tree-row input {
    margin-top: 4px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}
.pref-tree-row:has(input:disabled) {
    opacity: 0.55;
    cursor: not-allowed;
}
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #c5dcc9;
    transition: 0.4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
input:checked + .slider { background-color: var(--accent-bright); }
input:checked + .slider:before { transform: translateX(24px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }
input:disabled + .slider { background-color: #dfece2; cursor: not-allowed; opacity: 0.8; }
input:disabled:checked + .slider { background-color: var(--accent); opacity: 0.65; }

footer {
    padding: 28px 0;
    border-top: 2px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    color: var(--text-muted);
}
.footer-simple { text-align: center; }
.footer-simple p {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.footer-simple a,
.btn-link {
    color: var(--accent-deep);
    text-decoration: none;
    transition: 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
}
.footer-simple a:hover,
.btn-link:hover { text-decoration: underline; color: var(--accent); }
.sep { color: var(--border); }

.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    color: var(--text-body);
}
.legal-header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 40px;
}
.legal-header h1 { color: var(--accent-deep); font-size: 2.2rem; margin-bottom: 10px; }
.legal-content h2 { color: var(--text-dark); margin-top: 36px; margin-bottom: 16px; font-size: 1.4rem; }
.legal-content p { margin-bottom: 14px; line-height: 1.7; }
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-deep);
    margin: 20px 0;
    font-weight: 600;
}
.back-btn:hover { color: var(--accent); }

@media (max-width: 640px) {
    .nav-menu { width: 100%; justify-content: center; }
}
