/* ==========================================================================
   NOESIS · Sistema de diseño
   Editorial, sobrio, contemporáneo. Inspiración clásica discreta.
   ========================================================================== */

/* Fuentes autoalojadas (sin dependencias externas) ------------------------- */
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* Tokens ------------------------------------------------------------------- */
:root {
  --ivory: #F7F5F0;
  --white: #FFFFFF;
  --charcoal: #242522;
  --olive: #777B61;
  --bronze: #A78659;
  --stone: #DCD9D1;

  --bg: var(--ivory);
  --surface: var(--white);
  --surface-2: #EFECE5;
  --text: var(--charcoal);
  --text-muted: #5E5F58;          /* 6.1:1 sobre marfil */
  --text-soft: #75766E;           /* 4.6:1 sobre marfil */
  --accent: var(--olive);
  --accent-strong: #5C604A;       /* oliva legible como texto */
  --bronze-text: #7E6340;         /* bronce con contraste AA para texto pequeño */
  --line: var(--stone);
  --line-strong: #C9C5BB;
  --focus: #5C604A;
  --danger: #8E3B2E;
  --danger-bg: #F6E9E4;
  --ok-bg: #ECEEE4;

  --font-serif: "Instrument Serif", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 16px;
  --shadow: 0 1px 2px rgba(36, 37, 34, .04), 0 2px 8px rgba(36, 37, 34, .03);
  --shadow-raised: 0 8px 28px rgba(36, 37, 34, .08);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t: 160ms;

  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 4.5rem; --space-9: 7rem;

  --content: 1120px;
  --sidebar: 252px;

  --meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12' viewBox='0 0 20 12'%3E%3Cpath d='M0 11.5H20M14.5 11.5V.5H4.5v8h6v-4h-3' fill='none' stroke='%23A78659' stroke-width='1'/%3E%3C/svg%3E");

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #1A1B19;
  --surface: #222320;
  --surface-2: #2A2B27;
  --text: #EDEAE2;
  --text-muted: #B7B4AB;
  --text-soft: #9C998F;
  --accent: #9A9E83;
  --accent-strong: #B4B89C;
  --bronze-text: #C7A97C;
  --line: #34352F;
  --line-strong: #45463F;
  --focus: #B4B89C;
  --danger: #E4A08F;
  --danger-bg: #3A2522;
  --ok-bg: #2B2D25;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25);
  --shadow-raised: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --bg: #1A1B19; --surface: #222320; --surface-2: #2A2B27; --text: #EDEAE2; --text-muted: #B7B4AB;
    --text-soft: #9C998F; --accent: #9A9E83; --accent-strong: #B4B89C; --bronze-text: #C7A97C;
    --line: #34352F; --line-strong: #45463F; --focus: #B4B89C; --danger: #E4A08F; --danger-bg: #3A2522; --ok-bg: #2B2D25;
    --shadow: 0 1px 2px rgba(0, 0, 0, .25); --shadow-raised: 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

/* Base --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 1rem; line-height: 1.6;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: .18em; text-decoration-thickness: 1px; transition: color var(--t) var(--ease), text-decoration-color var(--t) var(--ease); }
a:hover { text-decoration-color: currentColor; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.12; letter-spacing: -.005em; }
h1, h2, h3, .serif { font-family: var(--font-serif); }
h1 { font-size: clamp(2.3rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h3 { font-size: 1.45rem; line-height: 1.2; }
.h3 { font-family: var(--font-serif); font-size: 1.45rem; line-height: 1.2; }
h4 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; }
em, i { font-style: italic; }
small, .small { font-size: .875rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-6) 0; }
::selection { background: rgba(167, 134, 89, .22); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute !important; 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: var(--space-4); top: -60px; z-index: 100; background: var(--text); color: var(--bg); padding: .6rem 1rem; border-radius: var(--radius-s); text-decoration: none; }
.skip-link:focus { top: var(--space-4); }

.icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.icon-s { width: 1rem; height: 1rem; flex-shrink: 0; }

/* Tipografía editorial ----------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-sans); font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent-strong);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--bronze); }
.eyebrow--plain::before { display: none; }
.lead { font-size: 1.125rem; color: var(--text-muted); line-height: 1.65; max-width: 38rem; }
.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.display { font-family: var(--font-serif); font-size: clamp(3rem, 8vw, 6.2rem); line-height: .98; letter-spacing: -.015em; }
.display em, h1 em, h2 em { font-style: italic; color: var(--accent-strong); }
.meta { font-size: .875rem; color: var(--text-muted); }
.prose { max-width: 40rem; font-size: 1.0625rem; line-height: 1.75; }
.prose p { margin-bottom: 1.1em; }
.quote-mark { font-family: var(--font-serif); font-size: 3rem; line-height: .6; color: var(--bronze); }

/* Ornamentos clásicos (discretos) ------------------------------------------ */
.meander { height: 12px; background-image: var(--meander); background-repeat: repeat-x; opacity: .55; }
.meander--short { width: 120px; }
.rule { display: flex; align-items: center; gap: var(--space-4); color: var(--text-soft); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.numeral { font-family: var(--font-serif); font-style: italic; color: var(--bronze-text); font-size: 1.1rem; }

/* Botones ------------------------------------------------------------------ */
.btn {
  --btn-bg: var(--text); --btn-fg: var(--bg); --btn-bd: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .65rem 1.2rem; border-radius: 999px;
  border: 1px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg);
  font: 500 .9375rem/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease);
  white-space: nowrap;
}
.btn:hover { --btn-bg: #3A3B37; --btn-bd: #3A3B37; }
[data-theme="dark"] .btn:hover { --btn-bg: #fff; --btn-bd: #fff; }
.btn:active { transform: translateY(1px); }
.btn--secondary { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--line-strong); }
.btn--secondary:hover { --btn-bg: var(--surface); --btn-bd: var(--text); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: transparent; padding-inline: .8rem; }
.btn--ghost:hover { --btn-bg: var(--surface-2); --btn-bd: transparent; }
.btn--danger { --btn-bg: transparent; --btn-fg: var(--danger); --btn-bd: var(--danger); }
.btn--danger:hover { --btn-bg: var(--danger-bg); --btn-bd: var(--danger); }
.btn--small { min-height: 36px; padding: .4rem .9rem; font-size: .875rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; font-size: .9375rem; text-decoration: none; color: var(--text); }
.link-arrow .icon { width: 1rem; height: 1rem; transition: transform var(--t) var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; transition: background var(--t) var(--ease), color var(--t) var(--ease); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn[aria-pressed="true"] { color: var(--bronze-text); }
.icon-btn[aria-pressed="true"] svg { fill: currentColor; fill-opacity: .18; }
.inline-form { display: inline; margin: 0; }

/* Formularios -------------------------------------------------------------- */
.field { display: grid; gap: .4rem; margin-bottom: var(--space-5); }
.field > label, .label { font-size: .875rem; font-weight: 500; color: var(--text); }
.hint { font-size: .8125rem; color: var(--text-soft); margin: 0; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: .65rem .85rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); color: var(--text);
  font: 400 1rem/1.45 var(--font-sans); transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.textarea--tall { min-height: 220px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-soft); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(119, 123, 97, .18); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2375766E' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.4rem; }
.field-error { color: var(--danger); font-size: .8125rem; margin: 0; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-size: .9375rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: .2rem; accent-color: var(--charcoal); flex-shrink: 0; }
[data-theme="dark"] .check input { accent-color: var(--accent-strong); }
.form-row { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-top: var(--space-5); }
fieldset { border: 0; padding: 0; margin: 0 0 var(--space-5); }
legend { font-size: .875rem; font-weight: 500; margin-bottom: .6rem; padding: 0; }

/* Selector de chips (intereses) */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-option { position: relative; }
.chip-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-option span {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .45rem 1rem;
  border: 1px solid var(--line-strong); border-radius: 999px; font-size: .9rem; background: var(--surface);
  transition: all var(--t) var(--ease); user-select: none;
}
.chip-option input:hover + span { border-color: var(--text-soft); }
.chip-option input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-option input:checked + span::before { content: "✓"; font-size: .8rem; }
.chip-option input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Valoración con estrellas (radios, accesible) */
.stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { cursor: pointer; color: var(--line-strong); padding: 2px; }
.stars label svg { width: 22px; height: 22px; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: var(--bronze); }
.stars label:hover svg, .stars label:hover ~ label svg, .stars input:checked ~ label svg { fill: currentColor; }
.stars input:focus-visible + label { outline: 2px solid var(--focus); border-radius: 4px; }
.stars-static { display: inline-flex; gap: 1px; color: var(--bronze); }
.stars-static svg { width: 14px; height: 14px; }
.stars-static .on svg { fill: currentColor; }
.stars-static .off { color: var(--line-strong); }

/* Etiquetas e insignias ---------------------------------------------------- */
.tag { display: inline-flex; align-items: center; padding: .15rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); font-size: .78rem; line-height: 1.6; text-decoration: none; }
a.tag:hover { color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 500; padding: .2rem .6rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-muted); white-space: nowrap; }
.badge--olive { border-color: transparent; background: var(--ok-bg); color: var(--accent-strong); }
.badge--bronze { border-color: rgba(167, 134, 89, .45); color: var(--bronze-text); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.status--in_progress .status-dot { background: var(--bronze); }
.status--completed .status-dot { background: var(--olive); }
.status--pending .status-dot { background: var(--text-soft); }
.status--discarded .status-dot { background: transparent; border: 1px solid var(--text-soft); }

/* Avisos ------------------------------------------------------------------- */
.flash { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); margin-bottom: var(--space-5); font-size: .9375rem; }
.flash::before { content: ""; width: 3px; align-self: stretch; border-radius: 2px; background: var(--accent); flex-shrink: 0; }
.flash--error::before { background: var(--danger); }
.flash--error { background: var(--danger-bg); border-color: transparent; }
.flash--info::before { background: var(--bronze); }
.notice { padding: 1rem 1.15rem; border-radius: var(--radius); background: var(--surface-2); font-size: .9rem; color: var(--text-muted); }
.notice strong { color: var(--text); }

/* Tarjetas ----------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: var(--space-5); box-shadow: var(--shadow); }
.card--flat { box-shadow: none; }
.card--quiet { background: transparent; box-shadow: none; }
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); margin-bottom: var(--space-4); }
.card__title { font-family: var(--font-serif); font-size: 1.45rem; line-height: 1.2; }
.card__title a { text-decoration: none; }
.card__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.card-link { position: relative; transition: border-color var(--t) var(--ease), transform var(--t) var(--ease); }
.card-link:hover { border-color: var(--line-strong); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); margin-bottom: var(--space-5); flex-wrap: wrap; }
.section-head h2 { font-size: 1.75rem; }

/* Portada tipográfica de obra (sin imágenes protegidas) -------------------- */
.cover {
  --c-bg: #E9E5DC; --c-fg: var(--charcoal); --c-line: rgba(36, 37, 34, .25);
  position: relative; aspect-ratio: 2 / 3; border-radius: 3px 7px 7px 3px; overflow: hidden;
  background: var(--c-bg); color: var(--c-fg); padding: 1.6em 1.4em 1.4em;
  display: flex; flex-direction: column; justify-content: space-between;
  font-size: 11px; /* escala de la portada: todo se mide en em */
  box-shadow: inset 3px 0 0 rgba(0, 0, 0, .06), 0 1px 2px rgba(36, 37, 34, .08), 0 6px 18px rgba(36, 37, 34, .06);
}
.cover--film { border-radius: 6px; }
.cover--v1 { --c-bg: #E9E5DC; }
.cover--v2 { --c-bg: #777B61; --c-fg: #F7F5F0; --c-line: rgba(247, 245, 240, .35); }
.cover--v3 { --c-bg: #2C2D2A; --c-fg: #EDE8DD; --c-line: rgba(167, 134, 89, .55); }
.cover--v4 { --c-bg: #CDBB9C; --c-fg: #242522; --c-line: rgba(36, 37, 34, .3); }
.cover--v5 { --c-bg: #DCD9D1; --c-fg: #242522; }
.cover__top { display: flex; justify-content: space-between; gap: .8em; white-space: nowrap; font: 600 .62em/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; opacity: .8; padding-bottom: .9em; border-bottom: 1px solid var(--c-line); overflow: hidden; }
.cover__title { font-family: var(--font-serif); font-size: 1.85em; line-height: 1.04; letter-spacing: -.01em; margin: auto 0; padding: .6em 0; overflow-wrap: break-word; }
.cover__creator { font: 500 .7em/1.3 var(--font-sans); letter-spacing: .06em; padding-top: .9em; border-top: 1px solid var(--c-line); opacity: .85; }
.cover--s { font-size: 8px; }
.cover--l { font-size: 14.5px; }
.cover--xs { font-size: 5px; }

/* Rejillas ----------------------------------------------------------------- */
.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-works { grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); gap: var(--space-6) var(--space-5); }
.stack > * + * { margin-top: var(--space-4); }
.stack-l > * + * { margin-top: var(--space-6); }
.row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.spacer { flex: 1; }

/* Ficha de obra en rejilla */
.work-tile { display: grid; gap: .7rem; text-decoration: none; }
.work-tile__title { font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.2; }
.work-tile__meta { font-size: .8125rem; color: var(--text-muted); }
.work-tile__cover:hover .cover { transform: translateY(-2px); }
.work-tile__title a { text-decoration: none; }
.work-tile__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.work-tile .cover { transition: transform 220ms var(--ease); }
.reason { display: flex; gap: .45rem; font-size: .8125rem; color: var(--accent-strong); line-height: 1.45; }
.reason::before { content: "—"; color: var(--bronze); }

/* ==========================================================================
   Web pública
   ========================================================================== */
.container { width: min(100% - 2.5rem, var(--content)); margin-inline: auto; }
.container--narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid transparent; transition: border-color var(--t); }
.site-header.is-scrolled, .site-header--solid { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; gap: var(--space-6); height: 72px; }
.site-nav { display: flex; gap: var(--space-5); margin-left: auto; }
.site-nav a { font-size: .9rem; color: var(--text-muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); }
.site-header__actions { display: flex; gap: var(--space-3); align-items: center; }
.nav-toggle { display: none; }

.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); }
.logo__mark { width: 30px; height: 30px; flex-shrink: 0; }
.logo__word { font-family: var(--font-serif); font-size: 1.5rem; letter-spacing: .2em; line-height: 1; padding-top: 2px; margin-right: -.2em; }

.hero { position: relative; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3.5rem, 8vw, 6rem); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: var(--space-8); align-items: center; }
.hero h1 { margin: var(--space-5) 0 var(--space-5); }
.hero .lead { font-size: 1.2rem; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.hero__note { margin-top: var(--space-4); font-size: .8125rem; color: var(--text-soft); }
.hero__art { position: relative; justify-self: center; width: 100%; max-width: 360px; color: var(--text); }
.hero__art img { width: 100%; height: auto; }
.hero__caption { position: absolute; bottom: 4%; right: -2%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; box-shadow: var(--shadow-raised); max-width: 230px; }
.hero__caption .eyebrow { font-size: .62rem; }
.hero__caption p { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.25; margin: .35rem 0 0; }

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--tint { background: var(--surface-2); }
.section--dark { background: #242522; color: #EDEAE2; --text-muted: #B7B4AB; --line: #3A3B37; --surface: #2C2D2A; --text: #EDEAE2; }
.section__head { max-width: 640px; margin-bottom: var(--space-7); }
.section__head h2 { margin: var(--space-4) 0; }

.rhythm { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rhythm__item { padding: var(--space-6) var(--space-5) var(--space-6) 0; }
.rhythm__item + .rhythm__item { padding-left: var(--space-5); border-left: 1px solid var(--line); }
.rhythm__freq { font-family: var(--font-serif); font-size: clamp(2rem, 3.5vw, 2.8rem); line-height: 1; margin: var(--space-4) 0 var(--space-3); }
.rhythm__freq em { color: var(--bronze-text); }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: center; }
.feature--reverse .feature__media { order: -1; }
.feature__text h2 { margin: var(--space-4) 0; }
.feature__text ul { list-style: none; padding: 0; margin: var(--space-5) 0 0; display: grid; gap: .65rem; }
.feature__text li { display: flex; gap: .7rem; color: var(--text-muted); }
.feature__text li::before { content: ""; width: 14px; height: 1px; background: var(--bronze); margin-top: .8rem; flex-shrink: 0; }

/* Ejemplo de curiosidad (landing) */
.sample { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: var(--space-6); box-shadow: var(--shadow-raised); position: relative; }
.sample__label { position: absolute; top: -11px; left: var(--space-6); background: var(--bg); padding: 0 .6rem; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); }
.sample h3 { margin: var(--space-3) 0; }

.covers-fan { display: flex; justify-content: center; align-items: flex-end; gap: var(--space-4); }
.covers-fan .cover { width: 150px; font-size: 9.5px; }
.covers-fan .cover:nth-child(2) { width: 176px; font-size: 11px; transform: translateY(-14px); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); counter-reset: step; }
.step { padding-top: var(--space-5); border-top: 1px solid var(--line); }
.step__n { font-family: var(--font-serif); font-style: italic; font-size: 1.8rem; color: var(--bronze-text); line-height: 1; }
.step h3 { font-size: 1.3rem; margin: var(--space-3) 0 var(--space-2); }
.step p { font-size: .9375rem; color: var(--text-muted); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--space-5); max-width: 820px; }
.plan { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.plan--highlight { border-color: var(--text); }
.plan__price { font-family: var(--font-serif); font-size: 3rem; line-height: 1; margin: 0; }
.plan__price small { font-family: var(--font-sans); font-size: .875rem; color: var(--text-muted); }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .9375rem; }
.plan li { display: flex; gap: .6rem; }
.plan li svg { color: var(--accent-strong); margin-top: .2rem; }
.plan .btn { margin-top: auto; }

.faq { max-width: 760px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: var(--space-5) 2.5rem var(--space-5) 0; font-family: var(--font-serif); font-size: 1.3rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: .4rem; top: 50%; width: 11px; height: 11px; border-right: 1.5px solid var(--text-soft); border-bottom: 1.5px solid var(--text-soft); transform: translateY(-70%) rotate(45deg); transition: transform var(--t) var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--text-muted); padding-bottom: var(--space-5); margin: 0; max-width: 640px; }

.cta-final { text-align: center; }
.cta-final h2 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin: var(--space-5) auto var(--space-5); max-width: 14ch; }

.site-footer { padding: var(--space-8) 0 var(--space-6); border-top: 1px solid var(--line); font-size: .875rem; color: var(--text-muted); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--space-6); }
.site-footer h4 { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text); margin-bottom: var(--space-4); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer__bottom { display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--line); font-size: .8125rem; color: var(--text-soft); }

.footer-blurb { margin-top: 1rem; max-width: 22rem; }
.footer-motto { font-style: italic; font-size: 1rem; }

/* Páginas legales */
.legal { padding: var(--space-8) 0; }
.legal h1 { margin-bottom: var(--space-5); }
.legal h2 { font-size: 1.6rem; margin: var(--space-6) 0 var(--space-3); }
.placeholder { background: rgba(167, 134, 89, .14); padding: 0 .3rem; border-radius: 3px; }

/* ==========================================================================
   Autenticación
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth__art { position: relative; background: var(--surface-2); display: flex; flex-direction: column; justify-content: space-between; padding: var(--space-7); overflow: hidden; }
.auth__art blockquote { margin: 0; max-width: 26rem; font-family: var(--font-serif); font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.2; }
.auth__art figcaption { margin-top: var(--space-4); font-size: .875rem; color: var(--text-muted); }
.auth__art .auth__column { position: absolute; right: -40px; bottom: -30px; width: 300px; opacity: .55; }
.auth__quote { margin: 0; position: relative; z-index: 1; }
.auth__orn { position: relative; z-index: 1; }
.nav-mobile-logo { display: none; }
.auth__panel { display: flex; flex-direction: column; justify-content: center; padding: var(--space-7) var(--space-6); }
.auth__box { width: min(100%, 400px); margin-inline: auto; }
.auth__box h1 { font-size: 2.4rem; margin: var(--space-5) 0 var(--space-3); }
.auth__box .lead { font-size: 1rem; margin-bottom: var(--space-6); }
.auth__alt { margin-top: var(--space-6); font-size: .9rem; color: var(--text-muted); }
.demo-users { display: grid; gap: var(--space-3); }
.demo-user { display: flex; align-items: center; gap: var(--space-4); width: 100%; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color var(--t); }
.demo-user:hover { border-color: var(--text); }
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); color: var(--text); font-family: var(--font-serif); font-size: 1.15rem; flex-shrink: 0; border: 1px solid var(--line); }
.avatar--s { width: 30px; height: 30px; font-size: .95rem; }

/* ==========================================================================
   Aplicación privada
   ========================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: var(--space-5) var(--space-4); border-right: 1px solid var(--line); background: var(--bg); overflow-y: auto; }
.sidebar .logo { padding: var(--space-2) var(--space-3) var(--space-6); }
.nav { display: grid; gap: 2px; }
.nav__label { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-soft); padding: var(--space-5) var(--space-3) var(--space-2); }
.nav a { display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; border-radius: var(--radius-s); color: var(--text-muted); text-decoration: none; font-size: .9375rem; transition: background var(--t), color var(--t); }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); border: 1px solid var(--line); padding: calc(.55rem - 1px) calc(.75rem - 1px); }
.nav a[aria-current="page"] .icon { color: var(--bronze-text); }
.sidebar__foot { margin-top: auto; padding-top: var(--space-5); display: grid; gap: var(--space-3); }
.circle-switch { padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); font-size: .8125rem; }
.circle-switch__name { font-weight: 500; color: var(--text); display: block; margin-top: 2px; }
.user-chip { display: flex; align-items: center; gap: .65rem; padding: .4rem; border-radius: var(--radius); text-decoration: none; color: var(--text); font-size: .875rem; }
.user-chip:hover { background: var(--surface-2); }

.main { min-width: 0; padding: var(--space-6) clamp(1.25rem, 4vw, 3.5rem) var(--space-8); }
.main__inner { max-width: var(--content); margin-inline: auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-7); padding-bottom: var(--space-5); border-bottom: 1px solid var(--line); }
.page-head h1 { margin-top: var(--space-3); }
.page-head p { margin: var(--space-3) 0 0; color: var(--text-muted); max-width: 40rem; }
.topbar { display: none; }
.tabbar { display: none; }
.demo-banner { background: var(--charcoal); color: #EDEAE2; font-size: .8125rem; text-align: center; padding: .45rem 1rem; }
[data-theme="dark"] .demo-banner { background: #33342F; }

/* Hoy */
.today-hero { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: var(--space-4); margin-bottom: var(--space-6); }
.today-hero h1 { font-size: clamp(2.2rem, 4vw, 3rem); }
.today-date { font-size: .875rem; color: var(--text-muted); }
.today-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-5); }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }

.curiosity { position: relative; padding: clamp(1.5rem, 4vw, 2.75rem); overflow: hidden; }
.curiosity::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background-image: var(--meander); background-repeat: repeat-x; opacity: .35; }
.curiosity__title { font-family: var(--font-serif); font-size: clamp(1.75rem, 3.4vw, 2.6rem); line-height: 1.08; margin: var(--space-4) 0; max-width: 22ch; }
.curiosity__title a { text-decoration: none; }
.curiosity__body { font-size: 1.0625rem; line-height: 1.7; color: var(--text-muted); max-width: 44rem; }
.curiosity__question { display: flex; gap: .75rem; margin: var(--space-5) 0; padding: var(--space-4) 0 0; border-top: 1px solid var(--line); font-family: var(--font-serif); font-size: 1.25rem; font-style: italic; line-height: 1.35; }
.curiosity__question .icon { color: var(--bronze); margin-top: .25rem; }
.curiosity__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); justify-content: space-between; }
.curiosity__actions { display: flex; gap: .25rem; align-items: center; flex-wrap: wrap; }
.source-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .8125rem; color: var(--text-soft); }

.feature-work { display: grid; grid-template-columns: 120px 1fr; gap: var(--space-5); align-items: start; }
.feature-work h3 { font-size: 1.6rem; margin: var(--space-2) 0 var(--space-2); }
.feature-work h3 a { text-decoration: none; }
.feature-work p { font-size: .9375rem; color: var(--text-muted); margin-bottom: var(--space-3); }

.list { list-style: none; margin: 0; padding: 0; }
.list .numeral { width: 2.2rem; flex-shrink: 0; }
.list > li { display: flex; gap: var(--space-4); align-items: center; padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list__main { flex: 1; min-width: 0; }
.list__title { display: block; font-weight: 500; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list__sub { font-size: .8125rem; color: var(--text-muted); }
.date-tile { display: grid; place-items: center; width: 48px; height: 52px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg); line-height: 1; flex-shrink: 0; }
.date-tile b { font-family: var(--font-serif); font-size: 1.45rem; font-weight: 400; }
.date-tile span { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); }
.quick a { display: flex; align-items: center; gap: .65rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; font-size: .9rem; transition: border-color var(--t); }
.quick a:hover { border-color: var(--text-soft); }
.quick .icon { color: var(--accent-strong); }

.activity { list-style: none; padding: 0; margin: 0; }
.activity li { display: flex; gap: .75rem; padding: .6rem 0; font-size: .9rem; color: var(--text-muted); }
.activity li b { color: var(--text); font-weight: 500; }
.activity time { font-size: .75rem; color: var(--text-soft); white-space: nowrap; margin-left: auto; padding-left: var(--space-3); }

/* Estado vacío */
.empty { text-align: center; padding: var(--space-7) var(--space-5); border: 1px dashed var(--line-strong); border-radius: var(--radius-l); }
.empty__art { width: 64px; height: 64px; margin: 0 auto var(--space-4); color: var(--bronze); opacity: .8; }
.empty h3 { font-size: 1.5rem; margin-bottom: var(--space-2); }
.empty p { color: var(--text-muted); max-width: 30rem; margin: 0 auto var(--space-4); font-size: .9375rem; }
.empty--compact { padding: var(--space-5); text-align: left; }
.empty--compact p { margin: 0 0 var(--space-3); }

/* Filtros y pestañas */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-bottom: var(--space-6); }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.segmented a { padding: .4rem .95rem; border-radius: 999px; text-decoration: none; font-size: .875rem; color: var(--text-muted); white-space: nowrap; }
.segmented a[aria-current="true"] { background: var(--text); color: var(--bg); }
.filter-links { display: flex; gap: .35rem; flex-wrap: wrap; }
.filter-links a { padding: .35rem .8rem; border-radius: 999px; font-size: .8125rem; text-decoration: none; color: var(--text-muted); border: 1px solid transparent; }
.filter-links a:hover { color: var(--text); }
.filter-links a[aria-current="true"] { border-color: var(--line-strong); color: var(--text); background: var(--surface); }
.toolbar .select, .toolbar .input { min-height: 40px; width: auto; font-size: .875rem; padding-top: .45rem; padding-bottom: .45rem; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search .icon { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--text-soft); width: 1.1rem; height: 1.1rem; pointer-events: none; }
.search .input { padding-left: 2.4rem; width: 100%; }

/* Biblioteca */
.lib-table { width: 100%; border-collapse: collapse; }
.lib-row { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--space-4); align-items: center; padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.lib-row .cover { width: 56px; }
.lib-row .cover__top, .lib-row .cover__creator { display: none; }
.lib-row__title { font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.2; text-decoration: none; }
.lib-row__actions { display: flex; gap: .5rem; align-items: center; }
.lib-row__actions .select { min-height: 38px; width: auto; font-size: .8125rem; padding: .35rem 2.2rem .35rem .7rem; }
.counts { display: flex; gap: var(--space-5); flex-wrap: wrap; font-size: .875rem; color: var(--text-muted); }
.counts b { font-family: var(--font-serif); font-weight: 400; font-size: 1.5rem; color: var(--text); margin-right: .3rem; }

/* Ficha de obra */
.work-head { display: grid; grid-template-columns: 240px 1fr; gap: var(--space-7); margin-bottom: var(--space-7); align-items: start; }
.work-head h1 { margin: var(--space-3) 0 var(--space-2); }
.work-head .original { font-family: var(--font-serif); font-style: italic; font-size: 1.2rem; color: var(--text-muted); margin-bottom: var(--space-4); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-4) var(--space-5); margin: var(--space-5) 0; padding: var(--space-5) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); margin-bottom: .2rem; }
.facts dd { margin: 0; font-size: .9375rem; }
.level { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: .4rem; }
.level i { width: 14px; height: 4px; border-radius: 2px; background: var(--line-strong); }
.level i.on { background: var(--olive); }
.work-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-7); }
.work-body > *, .today-grid > *, .admin-form > * { min-width: 0; }
.work-body h2 { font-size: 1.6rem; margin: var(--space-6) 0 var(--space-3); }
.work-body h2:first-child { margin-top: 0; }
.questions { counter-reset: q; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); }
.questions li { counter-increment: q; display: grid; grid-template-columns: 2rem 1fr; font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.35; }
.questions li::before { content: counter(q, upper-roman) "."; font-style: italic; color: var(--bronze-text); font-size: 1rem; padding-top: .2rem; }
.sources { list-style: none; padding: 0; margin: 0; font-size: .875rem; color: var(--text-muted); display: grid; gap: .5rem; }
.sources li { padding-left: 1.2rem; position: relative; }
.sources li::before { content: "§"; position: absolute; left: 0; color: var(--bronze); }
.aside-box { padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.aside-box + .aside-box { margin-top: var(--space-4); }
.aside-box h3 { font-size: 1.2rem; margin-bottom: var(--space-3); }

/* Calendario */
.cal-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.cal-head h2 { font-size: 1.8rem; min-width: 10ch; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.cal__dow { padding: .55rem .6rem; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.cal__day { min-height: 108px; padding: .45rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.cal__day--out { background: var(--bg); }
.cal__day--out .cal__num { color: var(--text-soft); opacity: .6; }
.cal__num { font-size: .8125rem; color: var(--text-muted); padding: 2px 4px; align-self: flex-start; border-radius: 999px; min-width: 24px; text-align: center; }
.cal__day--today .cal__num { background: var(--text); color: var(--bg); }
.cal__ev { display: block; font-size: .75rem; line-height: 1.3; padding: 3px 6px; border-radius: 4px; background: var(--surface-2); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 2px solid var(--olive); }
.cal__ev--group { border-left-color: var(--bronze); }
.cal__ev:hover { background: var(--line); }
.cal-legend { display: flex; gap: var(--space-5); font-size: .8125rem; color: var(--text-muted); margin-top: var(--space-3); }
.cal-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.cal-legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--olive); }
.cal-legend i.g { background: var(--bronze); }

/* Diario */
.journal-entry { display: grid; grid-template-columns: 76px 1fr; gap: var(--space-5); padding: var(--space-5) 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.journal-entry:hover .journal-entry__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.journal-entry__date { font-size: .75rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: .1em; line-height: 1.3; }
.journal-entry__date b { display: block; font-family: var(--font-serif); font-size: 2rem; font-weight: 400; color: var(--text); letter-spacing: 0; }
.journal-entry__title { font-family: var(--font-serif); font-size: 1.45rem; line-height: 1.2; margin: .2rem 0 .35rem; }
.journal-entry__excerpt { color: var(--text-muted); font-size: .9375rem; margin: 0; }
.reflection { display: grid; gap: var(--space-5); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.reflection__q { font-family: var(--font-serif); font-size: 1.2rem; display: flex; gap: .6rem; }
.reflection__q .numeral { min-width: 1.6rem; }
.private-note { display: inline-flex; align-items: center; gap: .4rem; font-size: .8125rem; color: var(--text-soft); }

/* Círculo */
.members { list-style: none; padding: 0; margin: 0; }
.members li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.members li:last-child { border-bottom: 0; }
.invite-link { display: flex; gap: .5rem; }
.invite-link .input { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .8125rem; }

/* Más (móvil) y menús desplegables */
.more { position: relative; }
.more > summary { list-style: none; cursor: pointer; }
.more > summary::-webkit-details-marker { display: none; }

/* Paginación / volver */
.back { display: inline-flex; align-items: center; gap: .35rem; font-size: .875rem; color: var(--text-muted); text-decoration: none; margin-bottom: var(--space-4); }
.back:hover { color: var(--text); }

/* Errores */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: var(--space-8) var(--space-5); }
.error-page__code { font-family: var(--font-serif); font-style: italic; font-size: 1.2rem; color: var(--bronze-text); }
.error-page h1 { margin: var(--space-3) 0 var(--space-4); }
.error-page p { color: var(--text-muted); max-width: 32rem; margin: 0 auto var(--space-6); }

/* Enlaces sin subrayado en bloques navegables */
a.card-link, a:has(> .cover), .work-head h2 a, .cal__num, .feature-work a { text-decoration: none; }
a.card-link { display: block; color: inherit; }
.work-head h2 a:hover, .feature-work h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.filter-links a { display: inline-flex; align-items: center; gap: .3rem; }

[hidden] { display: none !important; }
.field > label.reflection__q { font-size: 1.15rem; font-weight: 400; }
.circle-switch, .user-chip { text-decoration: none; color: inherit; }
.circle-switch:hover { border-color: var(--line-strong); }


/* Comunidad (fase 3) */
.segmented--scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented--scroll::-webkit-scrollbar { display: none; }
.poll { display: grid; gap: var(--space-3); }
.poll__option { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-4); align-items: center; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; overflow: hidden; }
.poll__option:hover { border-color: var(--line-strong); }
.poll__option.is-mine { border-color: var(--text); }
.poll__option.is-winner { border-color: var(--bronze); }
.poll__option input { position: relative; z-index: 1; width: 18px; height: 18px; accent-color: var(--charcoal); }
.poll__bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--surface-2); z-index: 0; transition: width 300ms var(--ease); }
.poll__option.is-winner .poll__bar { background: rgba(167, 134, 89, .16); }
.poll__text, .poll__count { position: relative; z-index: 1; }
.poll__text { display: grid; gap: 2px; min-width: 0; }
.poll__text b { font-family: var(--font-serif); font-weight: 400; font-size: 1.2rem; }
.poll__count { font-size: .875rem; color: var(--text-muted); white-space: nowrap; }
fieldset[disabled] .poll__option { cursor: default; }
.w-0 { width: 0%; } .w-5 { width: 5%; } .w-10 { width: 10%; } .w-15 { width: 15%; } .w-20 { width: 20%; } .w-25 { width: 25%; } .w-30 { width: 30%; } .w-35 { width: 35%; } .w-40 { width: 40%; } .w-45 { width: 45%; } .w-50 { width: 50%; } .w-55 { width: 55%; } .w-60 { width: 60%; } .w-65 { width: 65%; } .w-70 { width: 70%; } .w-75 { width: 75%; } .w-80 { width: 80%; } .w-85 { width: 85%; } .w-90 { width: 90%; } .w-95 { width: 95%; } .w-100 { width: 100%; }
.comments { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); }
.comment { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: start; }
.comment__main { background: var(--surface); border: 1px solid var(--line); border-radius: 4px var(--radius) var(--radius) var(--radius); padding: var(--space-3) var(--space-4); font-size: .9375rem; }
.comment__meta { font-size: .8125rem; color: var(--text-muted); margin-bottom: .25rem; }
.comment__meta b { color: var(--text); font-weight: 500; }
.reflection-card { display: block; text-decoration: none; color: inherit; }
.reflection-card .h3 { margin: var(--space-3) 0; }
.progress-steps { display: flex; gap: 4px; flex-wrap: wrap; }
.progress-steps label { position: relative; }
.progress-steps input { position: absolute; opacity: 0; inset: 0; }
.progress-steps span { display: inline-block; padding: .3rem .7rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .8125rem; cursor: pointer; }
.progress-steps input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.progress-steps input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.month-group + .month-group { margin-top: var(--space-6); }
.w-auto { width: auto; }


/* Administración (fase 4) */
.admin-badge { margin: 0 var(--space-3) var(--space-4); align-self: flex-start; }
.admin .topbar .more { position: relative; }
.admin-more .more__panel { position: absolute; top: calc(100% + 10px); right: 0; left: auto; bottom: auto; width: min(320px, calc(100vw - 32px)); max-height: 75vh; overflow: auto; z-index: 50; }
.admin-more > summary { list-style: none; }
.admin-more > summary::-webkit-details-marker { display: none; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--space-4); }
.kpi { display: grid; gap: .3rem; padding: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); }
.kpi__label { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.kpi__value { font-family: var(--font-serif); font-size: 2.6rem; line-height: 1; }
.kpi__sub { font-size: .8125rem; color: var(--text-muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th { text-align: left; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); font-weight: 500; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: var(--bg); white-space: nowrap; }
.table td { padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table a { text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table .select, .table .input { min-height: 38px; font-size: .875rem; padding-top: .35rem; padding-bottom: .35rem; }
.badge--danger { border-color: transparent; background: var(--danger-bg); color: var(--danger); }
.badge--muted { opacity: .6; }
.pager { display: flex; align-items: center; justify-content: center; gap: var(--space-4); margin-top: var(--space-5); }
.admin-form { display: grid; grid-template-columns: 1fr 300px; gap: var(--space-6); align-items: start; }
.admin-form__main { display: grid; gap: var(--space-5); }
.admin-form__main legend { padding: 0; margin-bottom: var(--space-4); }
.admin-form__side { position: sticky; top: var(--space-5); }
.mono { overflow-wrap: anywhere; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.textarea.mono { font-size: .8125rem; }
.break { word-break: break-word; }
.input[type=file] { max-width: 100%; padding: .5rem; }
.list__main { min-width: 0; }
.card--error { border-color: var(--danger); }
.error-list { margin: 0; padding-left: 1.2rem; font-size: .875rem; color: var(--danger); display: grid; gap: .25rem; max-height: 320px; overflow: auto; }
.file-list { list-style: none; padding: 0; margin: 0; max-height: 300px; overflow: auto; }
.file-list .is-added { color: var(--accent-strong); } .file-list .is-removed { color: var(--danger); }
.log { white-space: pre-wrap; font: .75rem/1.6 ui-monospace, Menlo, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-s); padding: var(--space-3); max-height: 260px; overflow: auto; margin: 0; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: .45rem var(--space-4); margin: 0; font-size: .9rem; }
.dl dt { color: var(--text-muted); } .dl dd { margin: 0; }
details > summary { cursor: pointer; }
@media (max-width: 1100px) { .admin-form { grid-template-columns: 1fr; } .admin-form__side { position: static; } }


/* Uso juntos (listas, ideas, lecturas por tramos) · móvil primero */
.plain { text-decoration: none; color: inherit; }
.section-title { font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: var(--space-3); }
.choice-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.more-fields > summary { cursor: pointer; font-size: .9375rem; color: var(--text-muted); padding: .4rem 0; }
.textarea--short { min-height: 84px; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar__fill { display: block; height: 100%; background: var(--olive); border-radius: 3px; }
.late { color: var(--danger); }
.spoiler-note { display: inline-flex; gap: .4rem; align-items: center; font-size: .875rem; color: var(--text-muted); }
.add-row { display: flex; gap: var(--space-3); }
.add-row .select { flex: 1; min-width: 0; }

.tick { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); color: transparent; cursor: pointer; transition: all var(--t) var(--ease); flex-shrink: 0; }
.tick:hover { border-color: var(--olive); color: var(--olive); }
.tick[aria-pressed="true"] { background: var(--olive); border-color: var(--olive); color: #fff; }
.tick--l { width: 40px; height: 40px; }

.checklist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.checklist__item { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: center; padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.checklist__main { display: grid; gap: 2px; text-decoration: none; min-width: 0; padding: .2rem 0; }
.checklist__title { font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.2; }
.checklist__sub { font-size: .8125rem; color: var(--text-muted); }
.checklist__note { font-size: .8125rem; color: var(--text-soft); font-style: italic; }
.checklist__item.is-done .checklist__title { text-decoration: line-through; text-decoration-color: var(--line-strong); color: var(--text-muted); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 1px; background: var(--line); }
.timeline__item { position: relative; display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: start; padding: var(--space-3) 0; }
.timeline__item.is-current .timeline__main { background: var(--surface); border-color: var(--text); box-shadow: var(--shadow); }
.timeline__main { display: grid; gap: .25rem; padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--bg); min-width: 0; }
.timeline__title { font-family: var(--font-serif); font-size: 1.25rem; }
.timeline__sub { font-size: .8125rem; color: var(--text-muted); }
.timeline__who { display: flex; align-items: center; gap: .35rem; margin-top: .2rem; }
.timeline__item.is-done .timeline__title { color: var(--text-muted); }
.dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .68rem; border: 1px solid var(--line-strong); color: var(--text-soft); }
.dot.on { background: var(--olive); border-color: var(--olive); color: #fff; }

.people-progress { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); }
.person-progress { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.person-progress__main { flex: 1; display: grid; gap: .4rem; }

.opinions { display: grid; gap: var(--space-3); }
.opinion { padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: .4rem; font-size: .9375rem; }

.idea-card h2 a { text-decoration: none; }
.idea-card__foot { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); }

.plan-card { display: grid; grid-template-columns: 56px 1fr; gap: var(--space-4); align-items: center; }
.plan-card .cover { width: 56px; }
.plan-card .cover__top, .plan-card .cover__creator { display: none; }

.seg-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--space-4); }
.seg-card { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); }
.seg-card.is-late { border-color: rgba(142, 59, 46, .35); }
.seg-card__main { flex: 1; display: grid; gap: .2rem; text-decoration: none; min-width: 0; }
.seg-card__title { font-family: var(--font-serif); font-size: 1.4rem; line-height: 1.15; }

.h-scroll { display: flex; gap: var(--space-4); overflow-x: auto; padding-bottom: var(--space-3); scroll-snap-type: x mandatory; scrollbar-width: thin; }
.mini-work { flex: 0 0 120px; display: grid; gap: .35rem; text-decoration: none; scroll-snap-align: start; }
.mini-work .cover { width: 120px; }
.mini-work__title { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.2; }

@media (max-width: 640px) {
  .btn--block-mobile { width: 100%; min-height: 50px; font-size: 1rem; }
  .input, .select, .textarea { font-size: 16px; } /* evita el zoom automático de iOS al escribir */
  .page-head { gap: var(--space-3); }
  .page-head h1 { font-size: 2rem; }
  .page-head > .btn, .page-head > .row { width: 100%; }
  .seg-card { padding: var(--space-4); }
  .timeline__main { padding: var(--space-3); }
  .people-progress { grid-template-columns: 1fr; }
  .tick { width: 40px; height: 40px; }
  .chip-option span { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .add-row { flex-direction: column; }
  .work-head .cover { width: 140px; }
}

/* Utilidades */
.mt-0 { margin-top: 0 !important; } .mt-2 { margin-top: var(--space-2); } .mt-3 { margin-top: var(--space-3); } .mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); } .mt-6 { margin-top: var(--space-6); } .mt-7 { margin-top: var(--space-7); }
.mb-0 { margin-bottom: 0 !important; } .mb-3 { margin-bottom: var(--space-3); } .mb-4 { margin-bottom: var(--space-4); } .mb-5 { margin-bottom: var(--space-5); } .mb-6 { margin-bottom: var(--space-6); }
.text-center { text-align: center; } .mx-auto { margin-left: auto; margin-right: auto; } .justify-center { justify-content: center; } .w-full { width: 100%; } .maxw-prose { max-width: 40rem; }
.nowrap { white-space: nowrap; } .italic { font-style: italic; } .fs-s { font-size: .875rem; } .fs-xs { font-size: .8125rem; }
.cover-w-s { width: 120px; } .cover-w-m { width: 160px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .work-body { grid-template-columns: 1fr; }
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
}

@media (max-width: 1023px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 30; height: 60px; padding: 0 var(--space-4); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .topbar .logo__word { font-size: 1.3rem; }
  .topbar .logo__mark { width: 26px; height: 26px; }
  .main { padding: var(--space-5) var(--space-4) calc(88px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar summary { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; min-height: 52px; justify-content: center; text-decoration: none; font-size: .68rem; color: var(--text-soft); border-radius: var(--radius-s); }
  .tabbar a[aria-current="page"], .tabbar .more[open] > summary { color: var(--text); }
  .tabbar a[aria-current="page"] .icon { color: var(--bronze-text); }
  .tabbar .icon { width: 22px; height: 22px; }
  .more__panel { position: fixed; left: 8px; right: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-raised); padding: var(--space-3); display: grid; gap: 2px; }
  .more__panel a { flex-direction: row; justify-content: flex-start; gap: .8rem; font-size: .95rem; color: var(--text); padding: .8rem .9rem; min-height: 48px; }
  .page-head { margin-bottom: var(--space-6); }
  .today-hero { grid-template-columns: 1fr; }
  .work-head { grid-template-columns: 1fr; gap: var(--space-5); }
  .work-head .cover { width: 170px; }
}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-header__actions .btn--secondary { display: none; }
  .nav-toggle { display: inline-grid; }
  .site-nav.is-open { display: grid; position: absolute; top: 72px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: var(--space-4) 1.25rem var(--space-5); gap: 0; }
  .site-nav.is-open a { padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; color: var(--text); }
  .hero__grid, .feature { grid-template-columns: 1fr; gap: var(--space-7); }
  .feature--reverse .feature__media { order: 0; }
  .hero__art { max-width: 260px; }
  .hero__caption { right: -8%; }
  .rhythm { grid-template-columns: 1fr; }
  .rhythm__item, .rhythm__item + .rhythm__item { padding: var(--space-5) 0; border-left: 0; }
  .rhythm__item + .rhythm__item { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth__art { display: none; }
  .nav-mobile-logo { display: block; margin-bottom: var(--space-6); }
}

@media (max-width: 640px) {
  body { font-size: .975rem; }
  .steps { grid-template-columns: 1fr; }
  .covers-fan .cover { width: 104px; font-size: 6.6px; }
  .covers-fan .cover:nth-child(2) { width: 122px; font-size: 7.7px; }
  .feature-work { grid-template-columns: 88px 1fr; gap: var(--space-4); }
  .feature-work h3 { font-size: 1.35rem; }
  .card { padding: var(--space-4); border-radius: var(--radius); }
  .curiosity { padding: var(--space-5) var(--space-4) var(--space-6); }
  .lib-row { grid-template-columns: 44px 1fr; }
  .lib-row .cover { width: 44px; font-size: 4px; }
  .lib-row__actions { grid-column: 1 / -1; justify-content: flex-end; }
  .cal__day { min-height: 64px; padding: 3px; }
  .cal__dow { padding: .4rem .2rem; text-align: center; letter-spacing: .04em; }
  .cal__ev { font-size: 0; padding: 0; height: 6px; border-left: 0; background: var(--olive); border-radius: 3px; }
  .cal__ev--group { background: var(--bronze); }
  .journal-entry { grid-template-columns: 52px 1fr; gap: var(--space-4); }
  .journal-entry__date b { font-size: 1.6rem; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .hero__caption { position: static; margin-top: var(--space-4); max-width: none; }
  .grid-works { grid-template-columns: repeat(2, 1fr); gap: var(--space-5) var(--space-4); }
}

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

@media print {
  .sidebar, .tabbar, .topbar, .site-header, .site-footer, .btn, form { display: none !important; }
  .app { display: block; }
}

/* ==========================================================================
   v1.2 · Lo vuestro primero: propuestas, semanas, cineforum, notas y logros
   ========================================================================== */
:root { --who-a: #6E7358; --who-b: #A78659; --gold-1: #E9CF8A; --gold-2: #B38A3A; --silver-1: #E6E6E1; --silver-2: #9C9E97; --bronze-1: #E2B98F; --bronze-2: #9A6236; }

/* Carteles reales */
.cover--img { padding: 0; background: var(--surface-2); }
.cover--img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover--img .cover__title { position: absolute; inset: 0; display: grid; place-items: center; padding: 1em; text-align: center; margin: 0; font-size: 1.4em; color: var(--text-muted); }

/* Personas */
.who-dot { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font: 600 .78rem/1 var(--font-sans); color: #fff; flex-shrink: 0; box-shadow: 0 0 0 2px var(--bg); }
.who--a { background: var(--who-a); } .who--b { background: var(--who-b); } .who--x { background: var(--text-soft); }
.who-dot--s { width: 22px; height: 22px; font-size: .68rem; }
.who-dot--xs { width: 16px; height: 16px; font-size: .55rem; box-shadow: none; vertical-align: -3px; }
.who-dot--l { width: 52px; height: 52px; font-size: 1.3rem; font-family: var(--font-serif); font-weight: 400; }
.proposer { display: flex; align-items: center; gap: .5rem; color: var(--text-muted); margin: 0; }

/* Cabeceras compactas */
.bar-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.bar-head h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin: 0; }
.mini-title { font: 600 .72rem/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); margin-bottom: var(--space-3); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--space-4); }
.sec-head h2 { font-size: 1.6rem; margin: 0; }

/* Navegación */
.nav__cta { background: var(--text) !important; color: var(--bg) !important; margin-bottom: var(--space-3); justify-content: center; font-weight: 500; }
.nav__cta .icon { color: var(--bg) !important; }
.tabbar__add span { display: grid; place-items: center; width: 44px; height: 44px; margin-top: -18px; border-radius: 50%; background: var(--text); color: var(--bg); box-shadow: var(--shadow-raised); }
.tabbar__add span .icon { color: var(--bg) !important; }
.tabbar__add { color: var(--text) !important; }

/* Pastillas de filtro */
.filters { display: grid; gap: var(--space-3); margin-bottom: var(--space-5); }
.pills { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pills::-webkit-scrollbar { display: none; }
.pills a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: .875rem; color: var(--text-muted); white-space: nowrap; }
.pills a[aria-current="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.pills--quiet a { background: transparent; }

/* Muro de carteles */
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-5) var(--space-4); }
.ptile { min-width: 0; }
.ptile__cover { position: relative; display: block; text-decoration: none; }
.ptile__cover .cover { transition: transform 200ms var(--ease); }
.ptile__cover:hover .cover { transform: translateY(-2px); }
.ptile__cover .who-dot { position: absolute; top: 8px; left: 8px; }
.ptile__week { position: absolute; bottom: 8px; left: 8px; right: 8px; text-align: center; font-size: .7rem; font-weight: 600; letter-spacing: .02em; background: color-mix(in srgb, var(--charcoal) 82%, transparent); color: #fff; border-radius: 999px; padding: .25rem .5rem; }
.ptile__done { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--olive); color: #fff; }
.ptile__foot { display: flex; align-items: flex-start; justify-content: space-between; gap: .4rem; margin-top: .55rem; }
.ptile__title { font-size: .875rem; font-weight: 500; line-height: 1.3; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.want { display: inline-flex; align-items: center; gap: .2rem; min-width: 40px; min-height: 36px; justify-content: center; padding: 0 .4rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-soft); font-size: .75rem; cursor: pointer; }
.want.is-on { background: var(--bronze); border-color: var(--bronze); color: #fff; }
.want.is-on .icon { fill: currentColor; }

/* Proponer */
.propose-head { text-align: center; margin: var(--space-4) auto var(--space-5); max-width: 36rem; }
.propose-head h1 { font-size: clamp(2.2rem, 5vw, 3rem); margin-bottom: var(--space-2); }
.propose-search { max-width: 40rem; margin: 0 auto var(--space-5); display: grid; gap: var(--space-4); }
.type-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; border: 0; padding: 0; margin: 0; }
.type-switch label { position: relative; }
.type-switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.type-switch span { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .8rem .5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: .875rem; color: var(--text-muted); transition: all var(--t); }
.type-switch .icon { width: 26px; height: 26px; }
.type-switch input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.type-switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.search-big { display: flex; align-items: center; gap: .6rem; padding: .35rem .4rem .35rem 1rem; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
.search-big:focus-within { border-color: var(--text); }
.search-big > .icon { color: var(--text-soft); flex-shrink: 0; }
.search-big input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 1.15rem; padding: .55rem 0; color: var(--text); outline: none; }
.lookup { max-width: 40rem; margin: 0 auto; }
.lookup.is-loading { opacity: .55; transition: opacity 200ms; }
.lookup-hint { text-align: center; color: var(--text-muted); padding: var(--space-6) var(--space-4); }
.lookup-hint__art { display: flex; justify-content: center; gap: var(--space-4); color: var(--bronze); margin-bottom: var(--space-4); }
.lookup-hint__art .icon { width: 30px; height: 30px; }
.when { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; border: 0; padding: 0; margin: 0 0 var(--space-4); }
.when legend { float: left; font-size: .8125rem; color: var(--text-soft); margin-right: .5rem; padding: 0; }
.results { display: grid; gap: var(--space-3); }
.result { display: grid; grid-template-columns: 64px 1fr auto; gap: var(--space-4); align-items: center; width: 100%; text-align: left; padding: .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; transition: border-color var(--t), transform var(--t); }
.result:hover { border-color: var(--text); }
.result:active { transform: scale(.99); }
.result .cover { width: 64px; font-size: 5px; }
.result__body { display: grid; gap: .2rem; min-width: 0; }
.result__title { font-family: var(--font-serif); font-size: 1.3rem; line-height: 1.1; }
.result__meta { font-size: .8125rem; color: var(--text-muted); }
.result__syn { font-size: .8125rem; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result__go { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--text); color: var(--bg); }
.lookup-empty { padding: var(--space-5); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.lookup-note { margin-top: var(--space-4); font-size: .875rem; }
.lookup-note summary { cursor: pointer; color: var(--text-muted); display: inline-flex; gap: .4rem; align-items: center; }

/* Inicio */
.home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); margin-bottom: var(--space-6); }
.home-head h1 { font-size: clamp(2.1rem, 4vw, 2.8rem); margin: 0; }
.streak { display: grid; justify-items: center; text-decoration: none; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text-soft); line-height: 1.05; }
.streak b { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 400; color: var(--text); }
.streak span { font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }
.streak.is-on .icon { color: var(--bronze); }
.home-sec { margin-bottom: var(--space-7); }
.now-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--space-4); }
.now-card { display: grid; grid-template-columns: 110px 1fr; gap: var(--space-4); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow); }
.now-card.is-done { opacity: .75; }
.now-card .cover { font-size: 7.5px; }
.now-card__body { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.now-card__title { font-family: var(--font-serif); font-size: 1.55rem; line-height: 1.08; text-decoration: none; }
.now-card__actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.free-week { padding: var(--space-5); border: 1px dashed var(--line-strong); border-radius: var(--radius-l); }
.free-week p { margin-bottom: var(--space-4); }
.turn { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; border-radius: var(--radius); background: var(--ok-bg); text-decoration: none; font-size: .9rem; margin-bottom: .5rem; }
.turn > span:nth-child(2) { flex: 1; }
.h-scroll--posters { display: flex; gap: var(--space-4); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-3); scrollbar-width: thin; }
.h-scroll--posters > * { flex: 0 0 132px; scroll-snap-align: start; }
.add-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; aspect-ratio: 2 / 3; border: 1.5px dashed var(--line-strong); border-radius: 6px; text-decoration: none; color: var(--text-muted); font-size: .875rem; align-self: flex-start; }
.add-tile span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--text); color: var(--bg); }
.big-cta { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-5); border: 1.5px dashed var(--line-strong); border-radius: var(--radius-l); text-decoration: none; }
.big-cta > .icon { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--text); color: var(--bg); }
.big-cta > span { display: grid; gap: .2rem; }
.badges-strip { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); text-decoration: none; }
.badges-strip__medals { display: flex; }
.badges-strip__medals .medal + .medal { margin-left: -10px; }
.badges-strip__text { flex: 1; display: grid; gap: .25rem; min-width: 0; }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar__fill { display: block; height: 100%; background: linear-gradient(90deg, var(--bronze), var(--olive)); border-radius: 3px; }
.extras { border-top: 1px solid var(--line); padding-top: var(--space-4); margin-top: var(--space-6); }
.extras > summary { cursor: pointer; display: flex; align-items: center; gap: .5rem; color: var(--text-muted); font-size: .9rem; list-style: none; }
.extras > summary::-webkit-details-marker { display: none; }
.extras__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--space-3); margin-top: var(--space-4); }
.extra-card { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--surface); }
.extra-card .cover { width: 44px; flex-shrink: 0; }
.extra-card > span, .extra-card--text { display: grid; gap: .25rem; }
.extra-card b { font-weight: 500; font-size: .9rem; }

/* Semanas */
.unsched { margin-bottom: var(--space-6); padding: var(--space-4); border-radius: var(--radius-l); background: var(--surface-2); }
.h-scroll--cards { display: flex; gap: var(--space-3); overflow-x: auto; padding-bottom: var(--space-2); }
.ucard { flex: 0 0 150px; display: grid; gap: .4rem; align-content: start; }
.ucard__cover { position: relative; display: block; width: 92px; }
.ucard__cover .who-dot { position: absolute; top: 5px; left: 5px; }
.ucard__title { font-size: .8125rem; font-weight: 500; line-height: 1.25; }
.select--chip { min-height: 36px; padding: .3rem 1.8rem .3rem .7rem; font-size: .8125rem; border-radius: 999px; width: 100%; max-width: 220px; }
.week-picker, .span-picker { display: flex; gap: .3rem; align-items: center; }
.weeks { display: grid; gap: var(--space-3); }
.week { padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.week.is-now { border-color: var(--text); box-shadow: var(--shadow-raised); }
.week.is-past { opacity: .7; }
.week__head { display: flex; align-items: baseline; gap: .6rem; margin-bottom: var(--space-3); }
.week__rel { font-family: var(--font-serif); font-size: 1.35rem; }
.week__range { font-size: .8125rem; color: var(--text-soft); }
.week__items { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.witem { display: grid; grid-template-columns: 48px 1fr auto; gap: var(--space-3); align-items: center; }
.witem.is-done .witem__title { text-decoration: line-through; text-decoration-color: var(--line-strong); }
.witem__cover .cover { width: 48px; font-size: 4px; }
.witem__main { display: grid; gap: .25rem; min-width: 0; }
.witem__title { font-weight: 500; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.witem__meta { display: flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--text-muted); flex-wrap: wrap; }
.witem__actions { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: .2rem; }
.witem__actions .select--chip { max-width: 190px; }
.span-picker .select--chip { width: auto; }
.check-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: transparent; color: var(--text-soft); cursor: pointer; }
.check-btn:hover { border-color: var(--olive); color: var(--olive); }
.check-btn.is-on { background: var(--olive); border-color: var(--olive); color: #fff; }
.week__free { display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-decoration: none; color: var(--text-muted); font-size: .875rem; }

/* Ficha */
.whero { display: grid; grid-template-columns: 220px 1fr; gap: var(--space-6); align-items: start; margin-bottom: var(--space-6); }
.whero__body h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); margin: var(--space-2) 0; }
.whero__meta { color: var(--text-muted); font-size: .9375rem; }
.whero__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: var(--space-4); }
.whero .proposer { margin-top: var(--space-4); }
.wsec { margin-bottom: var(--space-7); max-width: 46rem; }
.wsec__title { font-size: 1.7rem; margin-bottom: var(--space-4); }
.synopsis { font-size: 1.0625rem; line-height: 1.7; }
.phase-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-bottom: var(--space-4); }
.phase-tabs a { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .7rem .4rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-size: .875rem; color: var(--text-muted); background: var(--surface); }
.phase-tabs a[aria-current="true"] { border-color: var(--text); color: var(--text); box-shadow: var(--shadow); }
.phase-tabs__n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); font-family: var(--font-serif); font-size: .95rem; }
.phase-tabs a[aria-current="true"] .phase-tabs__n { background: var(--bronze); color: #fff; }
.qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); counter-reset: q; }
.qcard { padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); counter-increment: q; }
.qcard__q { font-family: var(--font-serif); font-size: 1.3rem; line-height: 1.25; margin-bottom: var(--space-3); }
.qcard__q::before { content: counter(q, upper-roman) ". "; color: var(--bronze-text); }
.answer-form { display: grid; gap: .5rem; justify-items: end; }
.answer-form .textarea, .answer-form .input { width: 100%; }
.answer { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start; padding: .6rem .7rem; border-radius: var(--radius); background: var(--surface-2); margin-bottom: .4rem; }
.answer p { margin: 0; font-size: .9375rem; }
.answer--mine { background: var(--ok-bg); }
.hidden-answer { display: flex; align-items: center; gap: .4rem; font-size: .8125rem; color: var(--bronze-text); margin-bottom: .5rem; }
.answer-edit summary, .add-q summary { cursor: pointer; color: var(--text-soft); font-size: .8125rem; display: inline-flex; align-items: center; gap: .3rem; }
.add-q { margin-top: var(--space-4); }
.note-form { display: grid; gap: .6rem; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.note-form__top { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.kind-switch { display: flex; gap: .3rem; }
.kind-switch label { position: relative; }
.kind-switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.kind-switch span { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem .7rem; min-height: 36px; border: 1px solid var(--line); border-radius: 999px; font-size: .8125rem; color: var(--text-muted); }
.kind-switch input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.kind-switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.input--pos { flex: 1; min-width: 120px; max-width: 200px; min-height: 36px; padding: .35rem .8rem; border-radius: 999px; }
.notes { list-style: none; padding: 0; margin: var(--space-4) 0 0; border-left: 2px solid var(--line); }
.notes__item { display: grid; grid-template-columns: 68px 1fr auto; gap: var(--space-3); align-items: start; padding: .7rem 0 .7rem var(--space-3); position: relative; }
.notes__item::before { content: ""; position: absolute; left: -6px; top: 1.05rem; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--olive); }
.notes__item--quote::before { border-color: var(--bronze); }
.notes__item--question::before { border-color: var(--text); }
.notes__item--quote p { font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.3; }
.notes__pos { font-size: .75rem; font-weight: 600; color: var(--bronze-text); padding-top: .2rem; white-space: nowrap; }
.notes__body p { margin: 0 0 .2rem; }
.stars--big label .icon { width: 34px; height: 34px; }
.rate-form { display: grid; gap: .6rem; justify-items: start; }
.rate-form .textarea { width: 100%; }
.wmore { border-top: 1px solid var(--line); padding-top: var(--space-4); }
.wmore > summary { cursor: pointer; color: var(--text-muted); font-size: .9rem; }
.fab { display: none; }

/* Medallas */
.medal { position: relative; display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 32% 28%, var(--m1) 0 38%, var(--m2) 100%); color: #fff;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35), inset 0 -4px 8px rgba(0, 0, 0, .18), 0 3px 10px rgba(36, 37, 34, .18); }
.medal::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .55); }
.medal .icon { width: 44%; height: 44%; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.medal--gold { --m1: var(--gold-1); --m2: var(--gold-2); }
.medal--silver { --m1: var(--silver-1); --m2: var(--silver-2); }
.medal--bronze { --m1: var(--bronze-1); --m2: var(--bronze-2); }
.medal--s { width: 34px; height: 34px; box-shadow: 0 0 0 2px var(--surface), inset 0 -2px 4px rgba(0, 0, 0, .15); }
.medal--s::after { inset: 3px; }
.medal--l { width: 72px; height: 72px; }
.medal.is-locked { background: var(--surface-2); color: var(--text-soft); box-shadow: inset 0 0 0 2px var(--line-strong); }
.medal.is-locked::after { border-color: var(--line-strong); }
.medal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); }
.medal-card { display: grid; justify-items: center; text-align: center; gap: .35rem; padding: var(--space-4) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.medal-card.is-locked { background: transparent; }
.medal-card__name { font-family: var(--font-serif); font-weight: 400; font-size: 1.15rem; line-height: 1.1; margin-top: .3rem; }
.medal-card__desc { font-size: .78rem; color: var(--text-muted); }
.medal-card .bar { width: 80%; }
.medal-card__other { display: inline-flex; gap: .3rem; align-items: center; font-size: .7rem; color: var(--text-soft); }
.medal-toast { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4); margin-bottom: var(--space-4); border-radius: var(--radius-l); text-decoration: none;
  background: linear-gradient(120deg, color-mix(in srgb, var(--gold-1) 35%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--gold-2) 40%, transparent); box-shadow: var(--shadow-raised); animation: medal-in 600ms var(--ease); }
.medal-toast > span { display: grid; gap: .15rem; }
.medal-toast b { font-family: var(--font-serif); font-weight: 400; font-size: 1.5rem; line-height: 1.1; }
@keyframes medal-in { from { transform: translateY(-8px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.duel { display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--space-3); margin-bottom: var(--space-4); }
.duel__p, .duel__streak { display: grid; justify-items: center; gap: .3rem; padding: var(--space-4) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); text-align: center; }
.duel__n, .duel__streak b { font-family: var(--font-serif); font-size: 2.4rem; line-height: 1; font-weight: 400; }
.duel__streak .icon { color: var(--bronze); }

@media (max-width: 1023px) {
  .tabbar__add { font-size: .62rem; }
  .fab { display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); width: 52px; height: 52px; border-radius: 50%; background: var(--bronze); color: #fff; box-shadow: var(--shadow-raised); z-index: 35; }
}
@media (max-width: 640px) {
  .poster-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-5) var(--space-3); }
  .whero { grid-template-columns: 112px 1fr; gap: var(--space-4); }
  .whero .cover { font-size: 7px; }
  .whero__body h1 { font-size: 1.9rem; }
  .whero__actions { grid-column: 1 / -1; }
  .now-card { grid-template-columns: 92px 1fr; }
  .now-card__title { font-size: 1.35rem; }
  .duel { grid-template-columns: 1fr 1fr; }
  .duel__streak { grid-column: 1 / -1; grid-template-columns: auto auto 1fr; align-items: center; justify-items: start; }
  .duel__streak b { font-size: 1.8rem; }
  .medal-grid { grid-template-columns: repeat(2, 1fr); }
  .notes__item { grid-template-columns: 56px 1fr auto; }
  .bar-head h1 { font-size: 2rem; }
}
.medal.is-locked.medal--gold { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--gold-2) 55%, var(--line-strong)); }
.medal.is-locked.medal--silver { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--silver-2) 70%, var(--line-strong)); }
.medal.is-locked.medal--bronze { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--bronze-2) 45%, var(--line-strong)); }
.btn--danger-text { --btn-fg: var(--danger); padding-inline: .5rem; }
.btn--danger-text:hover { --btn-bg: var(--danger-bg); }
