:root { color-scheme: light dark; --acento: #0a4ea8; --error: #b00020; }
@media (prefers-color-scheme: dark) { :root { --acento: #7fb2ff; --error: #ff8a80; } }
body { font-family: -apple-system, system-ui, sans-serif; font-size: 1.15rem; line-height: 1.5; margin: 0; }
main { max-width: 40rem; margin: 0 auto; padding: 1rem; }
h1 { font-size: 1.7rem; line-height: 1.25; }
label { display: block; font-weight: bold; margin: 1rem 0 0.4rem; }
input, textarea, button { font: inherit; }
input:not([type=file]), textarea { width: 100%; box-sizing: border-box; padding: 0.6rem; border: 2px solid #888; border-radius: 0.5rem; }
textarea { min-height: 6rem; }
button { padding: 0.75rem 1.2rem; border-radius: 0.6rem; border: 2px solid var(--acento); background: var(--acento); color: #fff; cursor: pointer; margin-top: 0.5rem; }
@media (prefers-color-scheme: dark) { button { color: #000; } }
button.enlace, button.secundario { background: transparent; color: var(--acento); }
button.enlace { border: none; padding: 0.3rem 0; text-decoration: underline; }
button:disabled { opacity: 0.5; }
:focus-visible { outline: 3px solid #f5a623; outline-offset: 2px; }
.error { color: var(--error); font-weight: bold; }
.error:empty, #estado-conexion:empty { display: none; }
.pequeno { font-size: 1rem; }
.archivo { border-top: 1px solid #8884; padding: 1rem 0; }
.archivo h2 { font-size: 1.25rem; margin: 0 0 0.5rem; }
.archivo img { max-width: 100%; max-height: 14rem; border-radius: 0.5rem; display: block; }
.archivo .estado { font-weight: bold; }
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.filtro button[aria-pressed="true"] { background: var(--acento); color: #fff; }
@media (prefers-color-scheme: dark) { .filtro button[aria-pressed="true"] { color: #000; } }
.galeria { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: 0.4rem; }
.galeria li { aspect-ratio: 1; }
.galeria button.foto { position: relative; width: 100%; height: 100%; background: #8883; overflow: hidden; }
.galeria img { width: 100%; height: 100%; object-fit: cover; display: block; }
.galeria button.video::after { content: '▶'; position: absolute; right: 0.4rem; bottom: 0.3rem; color: #fff; font-size: 1.4rem; text-shadow: 0 0 4px #000; }
dialog { border: 2px solid var(--acento); border-radius: 0.8rem; padding: 1.2rem; max-width: 30rem; }
dialog::backdrop { background: #0008; }
button.foto { display: block; width: 100%; padding: 0; margin: 0; border: none; background: none; border-radius: 0.5rem; }
#visor { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; box-sizing: border-box; border: none; border-radius: 0; }
#visor h2 { margin-top: 0; }
#visor img, #visor video { width: 100%; max-height: 55dvh; object-fit: contain; display: block; }
#visor a { color: var(--acento); }
.filtro { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.filtro button { margin-top: 0; }
