:root {
    --page-accent: #d95a0f;
    --page-bg: #eef2f6;
    --ink: #1c2430;
    --muted: #5b6675;
    --panel: rgba(255, 255, 255, 0.78);
    --line: rgba(28, 36, 48, 0.12);
    --caption-bg: linear-gradient(180deg, rgba(18, 24, 34, 0.18), rgba(18, 24, 34, 0.78) 55%, rgba(18, 24, 34, 0.92));
    --radius: 18px;
    --shadow: 0 14px 36px rgba(28, 36, 48, 0.12);
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--ink);
    background:
        radial-gradient(1100px 520px at 8% -8%, color-mix(in srgb, var(--page-accent) 16%, transparent), transparent 58%),
        radial-gradient(900px 480px at 100% 0%, rgba(255, 255, 255, 0.7), transparent 52%),
        linear-gradient(180deg, #f7f9fb 0%, var(--page-bg) 45%, #e7edf3 100%);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    padding: 0;
    box-shadow: 0 2px 10px rgba(28, 36, 48, 0.12);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--page-accent);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-text {
    font-family: var(--font-display);
    font-size: 1.45rem;
    letter-spacing: 0.04em;
}

.topbar-tools {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.theme-toggle {
    appearance: none;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.7);
    color: var(--muted);
    border-radius: 8px;
    padding: 5px 3px;
    min-width: 14px;
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.05;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    cursor: pointer;
    opacity: 0.7;
}

.theme-toggle:hover {
    opacity: 1;
    color: var(--ink);
}

.quick-duo {
    display: inline-flex;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.85);
}

.duo-link {
    text-decoration: none;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
}

.duo-link + .duo-link {
    border-left: 1px solid var(--line);
    background: color-mix(in srgb, var(--page-accent) 90%, #fff);
    color: #fff;
}

.duo-link:first-child:hover,
.duo-link:last-child:hover {
    filter: brightness(1.04);
}

/* Discreet admin gear */
.admin-gear {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 40;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-decoration: none;
    color: rgba(28, 36, 48, 0.45);
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(28, 36, 48, 0.08);
    box-shadow: none;
    opacity: 0.35;
    transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.admin-gear:hover {
    opacity: 0.7;
    color: rgba(28, 36, 48, 0.7);
    background: rgba(255, 255, 255, 0.55);
    transform: none;
}

.circle-nav {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 50;
}

.circle-toggle {
    width: 72px;
    height: 72px;
    border: 0;
    border-radius: 50%;
    background:
        var(--logo-url, none) center / cover no-repeat,
        var(--page-accent);
    color: #fff;
    box-shadow: var(--shadow);
    cursor: pointer;
    position: relative;
    display: grid;
    place-items: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.circle-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 16px 34px rgba(28, 36, 48, 0.28);
}

.circle-toggle[aria-expanded="true"] {
    transform: rotate(45deg) scale(1.04);
}

.circle-toggle[aria-expanded="true"] .circle-toggle-label {
    transform: rotate(-45deg);
}

.circle-toggle-rings::before,
.circle-toggle-rings::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--page-accent) 55%, transparent);
    animation: pulseRing 2.4s ease-out infinite;
}

.circle-toggle-rings::after { inset: -16px; animation-delay: 0.7s; }

@keyframes pulseRing {
    0% { opacity: 0.7; transform: scale(0.85); }
    100% { opacity: 0; transform: scale(1.25); }
}

.circle-toggle-label {
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.72rem;
    text-shadow:
        0 0 6px rgba(0, 0, 0, 0.85),
        0 1px 2px rgba(0, 0, 0, 0.9);
    transition: transform 0.25s ease;
}

.circle-panel {
    position: absolute;
    right: 0;
    bottom: 88px;
    width: min(320px, calc(100vw - 36px));
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 14px;
    transform-origin: bottom right;
    animation: popIn 0.22s ease;
}

.circle-panel[hidden] { display: none; }

@keyframes popIn {
    from { opacity: 0; transform: scale(0.85) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.circle-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.circle-list a {
    display: block;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #fff;
}

.circle-list a.nav-tone:hover,
.circle-list a.nav-tone.is-active {
    filter: brightness(1.08);
    box-shadow: 0 8px 18px rgba(28, 36, 48, 0.18);
    transform: translateY(-1px);
}

.circle-list a.nav-inicio { background: #d95a0f; }
.circle-list a.nav-escuela { background: #0f7a58; }
.circle-list a.nav-oferta { background: #1f5f9e; }
.circle-list a.nav-comunidad { background: #b45309; }
.circle-list a.nav-transparencia { background: #3f566e; }
.circle-list a.nav-calificaciones { background: #475569; }
.circle-list a.nav-moodle { background: #0f766e; }

.circle-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}

.circle-duo a {
    text-align: center;
}

.site-main { padding-bottom: 96px; }

.sae-in-news {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

@media (min-width: 760px) {
    .sae-in-news { grid-template-columns: repeat(2, 1fr); }
}

.sae-chip {
    display: grid;
    gap: 4px;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    color: var(--ink);
    box-shadow: 0 8px 20px rgba(28, 36, 48, 0.06);
}

.sae-chip strong {
    color: var(--page-accent);
    letter-spacing: 0.04em;
}

.sae-chip span {
    color: var(--muted);
}

.sae-ni { border-left: 4px solid #3b82f6; }
.sae-e { border-left: 4px solid #0f766e; }
.sae-i { border-left: 4px solid #22c55e; }
.sae-r { border-left: 4px solid #f59e0b; }

.hero {
    position: relative;
    min-height: min(78vh, 720px);
    margin: 12px 12px 0;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-track {
    display: flex;
    height: 100%;
    min-height: min(78vh, 720px);
    transition: transform 0.45s ease;
}

.hero-slide {
    min-width: 100%;
    position: relative;
    background:
        var(--caption-bg),
        radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--page-accent) 28%, transparent), transparent 45%),
        linear-gradient(135deg, #6d7f96, #4a5a70 55%, #3d4d63);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.hero-slide.has-image {
    background-color: #4a5a70;
}

.hero-caption {
    width: min(720px, 100%);
    padding: clamp(28px, 6vw, 56px);
    color: #fff;
}

.hero-caption h1 {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    line-height: 1.15;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.hero-caption p {
    margin: 0 0 18px;
    max-width: 42ch;
    font-size: 1.05rem;
    color: #f4f7fb;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: 1px solid transparent;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(28, 36, 48, 0.16);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--page-accent);
    color: #fff;
}

.btn-primary:hover {
    filter: brightness(1.08);
    color: #fff;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--line);
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: color-mix(in srgb, var(--page-accent) 55%, #fff);
    background: #fff;
    color: var(--page-accent);
}

.hero .btn-ghost {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.hero .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.duo-link,
.sae-chip,
.circle-list a,
.admin-nav a,
.theme-toggle {
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.duo-link:hover,
.sae-chip:hover {
    transform: translateY(-1px);
}

.news-image {
    width: 100%;
    border-radius: 12px;
    margin: 8px 0 12px;
    border: 1px solid var(--line);
}

.readable-panel {
    backdrop-filter: blur(4px);
}

.rich-text p { margin: 0 0 12px; color: var(--muted); }
.rich-text ul { margin: 0 0 12px; padding-left: 1.2rem; color: var(--muted); }
.rich-text li { margin-bottom: 6px; }
.rich-text a { color: var(--page-accent); font-weight: 700; }
.rich-text h3 { margin: 0 0 10px; color: var(--ink); }

.hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.hero-dots button.is-active { background: var(--page-accent); }

.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 42px 18px 12px;
}

.section-head {
    margin-bottom: 22px;
}

.section-head h2 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--page-accent);
}

.section-head p {
    margin: 0;
    color: var(--muted);
    max-width: 55ch;
}

.news-grid,
.info-grid {
    display: grid;
    gap: 16px;
}

@media (min-width: 760px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .info-grid { grid-template-columns: repeat(2, 1fr); }
}

.card-soft {
    padding: 18px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    box-shadow: 0 8px 22px rgba(28, 36, 48, 0.05);
}

.card-soft h3 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--ink);
}

.card-soft p { margin: 0 0 12px; color: var(--muted); }

.mission {
    display: grid;
    gap: 16px;
}

@media (min-width: 860px) {
    .mission { grid-template-columns: 1.2fr 1fr; }
}

.page-hero-mini {
    padding: 48px 18px 18px;
    max-width: 1100px;
    margin: 0 auto;
}

.page-hero-mini h1 {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
}

.page-hero-mini p {
    margin: 0;
    color: var(--muted);
    max-width: 50ch;
}

.album-shell {
    position: relative;
}

.album-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 8px 2px 18px;
    scrollbar-width: thin;
}

.album-card {
    position: relative;
    flex: 0 0 min(82vw, 320px);
    scroll-snap-align: center;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(28, 36, 48, 0.06);
    cursor: pointer;
}

.album-card img,
.album-card video {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: #111;
}

.album-card figcaption {
    padding: 12px 14px 16px;
    color: var(--muted);
}

.album-card strong {
    display: block;
    color: var(--ink);
    margin-bottom: 4px;
}

.album-zoom {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(12, 14, 18, 0.55);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    z-index: 2;
}

.album-zoom:hover {
    background: rgba(12, 14, 18, 0.8);
}

.media-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(12, 14, 18, 0.65);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.album-lightbox {
    width: min(100vw, 100%);
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    padding: 12px;
    border: 0;
    background: rgba(8, 10, 14, 0.96);
    color: #fff;
}

.album-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.85);
}

.album-lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.album-lightbox-title {
    margin: 0;
    font-weight: 700;
}

.album-lightbox-stage {
    height: calc(100vh - 150px);
    display: grid;
    place-items: center;
    touch-action: pan-y;
    user-select: none;
}

.album-lightbox-stage img,
.album-lightbox-stage video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}

.album-lightbox-caption {
    margin: 8px 0;
    color: #d7d8db;
    min-height: 1.2em;
}

.album-lightbox-nav {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.album-lightbox .btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.upload-box,
.form-panel {
    padding: 18px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    border: 1px dashed rgba(28, 36, 48, 0.22);
}

.form-row {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.form-row label {
    font-size: 0.9rem;
    color: var(--muted);
}

.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.event-list {
    display: grid;
    gap: 16px;
}

.event-item {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(28, 36, 48, 0.05);
}

@media (min-width: 720px) {
    .event-item.has-image {
        grid-template-columns: 220px 1fr;
        align-items: center;
    }
}

.event-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.site-footer {
    margin-top: 40px;
    padding: 36px 18px 110px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.65);
}

.footer-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    gap: 22px;
}

@media (min-width: 800px) {
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

.site-footer h2 {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--page-accent);
}

.site-footer p { margin: 0 0 8px; color: var(--muted); }
.site-footer a { color: var(--ink); font-weight: 600; }
.footer-duo { display: flex; gap: 12px; flex-wrap: wrap; }

.footer-brand {
    margin: 14px 0 0;
    display: flex;
    justify-content: flex-end;
}

.brand-registered {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--muted);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.site-footer a.brand-registered {
    font-weight: 700;
    color: var(--muted);
}

.brand-registered--footer::after {
    content: attr(title);
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    padding: 6px 10px;
    border-radius: 8px;
    background: #1f2a23;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    z-index: 2;
}

.brand-registered--footer:hover::after,
.brand-registered--footer:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-footer .brand-registered:hover,
.site-footer .brand-registered:focus-visible {
    color: var(--ink);
}
.muted { color: var(--muted); font-size: 0.9rem; }

.flash {
    max-width: 1100px;
    margin: 14px auto 0;
    padding: 12px 14px;
    border-radius: 12px;
}

.flash.ok { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.4); }
.flash.err { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.4); }

.list-plain {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
}

.list-plain li { margin-bottom: 6px; }

/* Admin */
.admin-body {
    background: #eef2f6;
    color: #1c2430;
    font-family: var(--font-body);
    margin: 0;
}

.admin-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.admin-nav a {
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    color: #1c2430;
    border: 1px solid rgba(28, 36, 48, 0.12);
    font-size: 0.9rem;
}

.admin-nav a.is-active,
.admin-nav a:hover {
    background: var(--page-accent, #e85d04);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid rgba(28, 36, 48, 0.12);
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.thumb {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
}

@media (max-width: 640px) {
    .brand-text { font-size: 1.2rem; }
    .duo-link { padding: 9px 10px; font-size: 0.72rem; }
    .theme-toggle { padding: 4px 2px; font-size: 0.48rem; min-width: 12px; }
    .circle-toggle { width: 66px; height: 66px; }
    .hero { margin: 10px 10px 0; border-radius: 22px; min-height: 70vh; }
    .hero-track, .hero-slide { min-height: 70vh; }
}

/* Dark theme (previous palette) */
html.theme-dark {
    --ink: #f4f1ea;
    --muted: #b7b3aa;
    --panel: rgba(10, 12, 16, 0.72);
    --line: rgba(255, 255, 255, 0.12);
    --caption-bg: linear-gradient(180deg, rgba(8, 10, 14, 0.15), rgba(8, 10, 14, 0.88) 55%, rgba(8, 10, 14, 0.96));
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    --page-bg: var(--page-bg-dark, #12151c);
}

html.theme-dark body {
    background:
        radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--page-accent) 28%, transparent), transparent 60%),
        radial-gradient(900px 500px at 100% 0%, rgba(255, 255, 255, 0.05), transparent 50%),
        var(--page-bg);
}

html.theme-dark .topbar {
    background: rgba(10, 12, 16, 0.55);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

html.theme-dark .brand-logo {
    background: rgba(255, 255, 255, 0.92);
}

html.theme-dark .content-section .readable-panel,
html.theme-dark .readable-panel {
    background: rgba(12, 14, 18, 0.82);
}

html.theme-dark .theme-toggle {
    background: rgba(255, 255, 255, 0.06);
    color: #c7c3ba;
    border-color: rgba(255, 255, 255, 0.16);
}

html.theme-dark .theme-toggle:hover {
    color: #fff;
}

html.theme-dark .quick-duo {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.18);
}

html.theme-dark .duo-link {
    color: #fff;
}

html.theme-dark .duo-link + .duo-link {
    border-left-color: rgba(255, 255, 255, 0.18);
    background: color-mix(in srgb, var(--page-accent) 85%, #000);
}

html.theme-dark .admin-gear {
    color: rgba(255, 255, 255, 0.45);
    background: rgba(20, 24, 32, 0.35);
    border-color: rgba(255, 255, 255, 0.1);
}

html.theme-dark .admin-gear:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(20, 24, 32, 0.55);
}

html.theme-dark .circle-panel {
    background: rgba(12, 14, 18, 0.94);
    border-color: rgba(255, 255, 255, 0.1);
}

html.theme-dark .circle-list a.nav-tone {
    color: #fff;
}

html.theme-dark .circle-list a.nav-inicio { background: #d95a0f; }
html.theme-dark .circle-list a.nav-escuela { background: #0f7a58; }
html.theme-dark .circle-list a.nav-oferta { background: #1f5f9e; }
html.theme-dark .circle-list a.nav-comunidad { background: #b45309; }
html.theme-dark .circle-list a.nav-transparencia { background: #3f566e; }
html.theme-dark .circle-list a.nav-calificaciones { background: #475569; }
html.theme-dark .circle-list a.nav-moodle { background: #0f766e; }

html.theme-dark .sae-chip,
html.theme-dark .card-soft,
html.theme-dark .event-item,
html.theme-dark .upload-box,
html.theme-dark .form-panel {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    color: var(--ink);
}

html.theme-dark .sae-chip span,
html.theme-dark .card-soft p {
    color: var(--muted);
}

html.theme-dark .card-soft h3,
html.theme-dark .album-card strong {
    color: #fff;
}

html.theme-dark .btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

html.theme-dark .hero .btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

html.theme-dark .hero-slide {
    background:
        var(--caption-bg),
        radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--page-accent) 35%, transparent), transparent 45%),
        linear-gradient(135deg, #1a1f2b, #0d1118 60%, #1b2433);
}

html.theme-dark .hero-slide.has-image {
    background-color: #0d1118;
}

html.theme-dark .album-card {
    background: #0b0d12;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

html.theme-dark .form-row input,
html.theme-dark .form-row textarea,
html.theme-dark .form-row select {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
}

html.theme-dark .site-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.28);
}

html.theme-dark .site-footer a {
    color: #fff;
}

html.theme-dark .admin-body {
    background: #11151c;
    color: #e8eaed;
}

html.theme-dark .admin-nav a {
    background: #1b2130;
    color: #fff;
    border-color: transparent;
}

html.theme-dark .admin-table th,
html.theme-dark .admin-table td {
    border-bottom-color: #2a3142;
}
