/* RE:CUENTO — estilos. Paleta: Petróleo, Profundo, Claro, Hueso, Piedra, Tinta. */
:root {
  --petroleo: #0B3A42;
  --profundo: #062A30;
  --claro: #2E6670;
  --hueso: #F2EEE6;
  --piedra: #D9D3C7;
  --tinta: #141414;
  --display: 'Anton', 'Impact', sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --read: 'Newsreader', Georgia, serif;
  --ui: 'Inter Tight', system-ui, sans-serif;
  --pad: clamp(20px, 4.5vw, 64px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--hueso); color: var(--tinta); font-family: var(--ui); -webkit-font-smoothing: antialiased; }
a { color: var(--petroleo); }
a:hover { color: var(--profundo); }
button, input, textarea, select { font: inherit; color: inherit; }
img, svg { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Cabecera */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px var(--pad); border-bottom: 1px solid var(--tinta); flex-wrap: wrap; }
.logo { font-family: var(--display); font-size: 26px; color: var(--petroleo); text-decoration: none; letter-spacing: 0.01em; }
.nav { display: flex; gap: clamp(14px, 2.5vw, 34px); flex-wrap: wrap; }
.nav a { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tinta); text-decoration: none; padding: 12px 0; }
.nav a.on { color: var(--petroleo); text-decoration: underline; text-underline-offset: 6px; }
.top-right { display: flex; align-items: center; gap: 12px; }
.lang-pill { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--tinta); border-radius: 999px; padding: 0 6px; min-height: 44px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }
.lang-pill button { border: 0; background: transparent; min-height: 40px; padding: 0 8px; cursor: pointer; color: var(--claro); font-weight: 600; }
.lang-pill button.on { color: var(--petroleo); font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.lang-pill button:hover { color: var(--petroleo); }
.lang-switch { border: 1px solid var(--tinta); border-radius: 999px; background: transparent; min-height: 44px; padding: 0 18px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.lang-switch:hover { background: var(--tinta); color: var(--hueso); }
.lang { display: flex; border: 1px solid var(--tinta); border-radius: 999px; overflow: hidden; }
.lang button { border: 0; background: transparent; padding: 0 16px; min-height: 44px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; cursor: pointer; }
.lang button.on { background: var(--tinta); color: var(--hueso); }

/* Tipografía */
.kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--claro); margin: 0; }
.display { font-family: var(--display); font-weight: 400; color: var(--petroleo); line-height: 0.86; letter-spacing: -0.01em; margin: 0; }
.serif { font-family: var(--serif); font-weight: 400; }
.italic { font-style: italic; }
.read { font-family: var(--read); font-size: 19px; line-height: 1.6; }
.hero-word { font-size: clamp(88px, 24vw, 344px); white-space: nowrap; margin-left: -0.04em; line-height: 0.84; }

/* Botones y chips */
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; background: var(--petroleo); color: var(--hueso); min-height: 52px; padding: 0 24px; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--profundo); color: var(--hueso); }
.btn.light { background: var(--hueso); color: var(--petroleo); }
.btn.ghost { background: transparent; color: var(--tinta); border: 1.5px solid var(--tinta); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { border: 1.5px solid var(--tinta); background: transparent; border-radius: 999px; padding: 0 14px; min-height: 40px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.chip.on { background: var(--petroleo); border-color: var(--petroleo); color: var(--hueso); }
.link { background: none; border: 0; padding: 0; min-height: 44px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--tinta); }
.link.on { text-decoration: underline; text-decoration-color: var(--petroleo); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.link.muted { color: var(--claro); }

/* Símbolos */
.badge { position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1.5px solid var(--petroleo); color: var(--petroleo); border-radius: 50%; text-decoration: none; background: transparent; padding: 0; }
.badge.sq { border-radius: 0; }
.badge.fill { background: var(--petroleo); color: var(--hueso); }
.badge.bone { border-color: var(--hueso); color: var(--hueso); }
.tagpill { position: absolute; right: -6px; bottom: -4px; background: var(--tinta); color: var(--hueso); font: 700 10px/1 var(--ui); letter-spacing: 0.04em; padding: 3px 5px; border-radius: 999px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--hueso); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 3px var(--petroleo), 0 0 0 5px var(--hueso); }
.sym.partly { background: var(--piedra); }
.symgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 12px; justify-items: start; }
.symwrap .badge, .symwrap .sym:not(.on) { color: var(--symc, var(--petroleo)); border-color: var(--symc, var(--petroleo)); transition: color 0.15s, border-color 0.15s, background 0.15s; }
.symwrap .sym.on { background: var(--symc, var(--petroleo)); border-color: var(--symc, var(--petroleo)); }
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.sym { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--petroleo); background: transparent; color: var(--petroleo); border-radius: 50%; cursor: pointer; padding: 0; min-height: 44px; }
.sym:nth-child(3n+2) { border-radius: 0; }
.sym.on { background: var(--petroleo); color: var(--hueso); box-shadow: 0 0 0 4px var(--hueso), 0 0 0 6px var(--petroleo); }
.sym:disabled { background: var(--piedra); border-color: var(--piedra); color: var(--claro); opacity: 0.6; cursor: not-allowed; }

/* Formularios */
label.lbl { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 8px; }
.field { width: 100%; border: 1.5px solid var(--tinta); background: transparent; padding: 14px 16px; font-size: 16px; }
textarea.field { min-height: 180px; resize: vertical; font-family: var(--read); font-size: 19px; line-height: 1.55; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.4; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--petroleo); }
.inline-form { display: flex; }
.inline-form .field { border-right: 0; }
.msg { font-family: var(--read); font-size: 16px; color: var(--petroleo); margin: 8px 0 0; }
.msg.err { color: #8A1F11; }

/* Secciones */
.sec { padding: 56px var(--pad) 0; }
.rule { border-bottom: 1px solid var(--tinta); padding-bottom: 16px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 36px; }
.step { padding: 40px 36px 44px 0; border-right: 1px solid var(--tinta); display: flex; flex-direction: column; gap: 18px; }
.step:last-child { border-right: 0; }
.petrol { background: var(--petroleo); color: var(--hueso); }
.petrol .kicker { color: var(--piedra); }
.petrol .display { color: var(--hueso); }
.deep { background: var(--profundo); color: var(--hueso); }
.stone { background: var(--piedra); }
.stone .kicker { color: var(--petroleo); }

/* Portada: página de cuaderno (renglones + margen rojo) */
.notebook { position: relative; background-color: var(--hueso); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 39px, rgba(46, 102, 112, 0.22) 39px, rgba(46, 102, 112, 0.22) 40px); border-bottom: 1.5px solid var(--tinta); }
.notebook::before { content: ''; position: absolute; top: 0; bottom: 0; left: calc(var(--pad) + 6px); width: 2px; background: #B5452B; }
.notebook-title { position: relative; padding: 40px var(--pad) 0 calc(var(--pad) + 30px); font-size: clamp(64px, 19vw, 300px); margin-left: 0; color: var(--petroleo); }
.notebook-title .colon { display: inline-block; position: relative; width: 0.14em; height: 0.53em; margin: 0 0.07em 0 0.06em; vertical-align: baseline; }
.notebook-title .colon::before, .notebook-title .colon::after { content: ''; position: absolute; left: 0; width: 0.14em; height: 0.14em; border-radius: 50%; background: var(--petroleo); }
.notebook-title .colon::before { top: 0; }
.notebook-title .colon::after { bottom: 0; }
.notebook-title .outline { color: transparent; -webkit-text-stroke: clamp(1.5px, 0.28vw, 3px) var(--petroleo); paint-order: stroke; }
@supports not (-webkit-text-stroke: 1px black) { .notebook-title .outline { color: var(--petroleo); } }
.notebook-sub { position: relative; margin: 14px 0 0; padding: 0 var(--pad) 0 calc(var(--pad) + 30px); font-size: clamp(13px, 1.4vw, 16px); color: var(--petroleo); }
.notebook-row { position: relative; padding: 32px var(--pad) 48px calc(var(--pad) + 30px); }
.notebook-card { background: var(--hueso); border: 1.5px solid var(--tinta); padding: 22px; box-shadow: 6px 6px 0 var(--tinta); }

/* Portada: secciones como tarjetas apiladas (tipo feed) */
.panel { margin: 32px var(--pad) 0; border: 1.5px solid var(--tinta); background: var(--hueso); box-shadow: 8px 8px 0 var(--tinta); scroll-margin-top: 24px; }
.panel.stone { background: var(--piedra); }
.panel.petrol { background: var(--petroleo); color: var(--hueso); }
.panel.petrol .kicker, .panel.petrol .panel-head { color: var(--piedra); }
.panel.petrol .display { color: var(--hueso); }
.panel.small .panel-body { padding: 24px clamp(20px, 3vw, 36px); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px clamp(20px, 3vw, 36px); border-bottom: 1.5px solid currentColor; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.panel-body { padding: clamp(24px, 4vw, 56px) clamp(20px, 3vw, 48px); }
.fam { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--tinta); }
.fam p { margin: 0; }

.qrow { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--tinta); }
@media (max-width: 640px) { .qrow { grid-template-columns: 40px minmax(0, 1fr); } .qrow .link { grid-column: 2; justify-self: start; } }

.filters .filters-toggle { display: none; }
table.members { min-width: 720px; }
.tap { display: inline-flex; align-items: center; min-height: 44px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 24px; }

/* Feed */
.filters { display: flex; flex-wrap: wrap; gap: 20px 28px; padding: 18px var(--pad); border-bottom: 1px solid var(--tinta); align-items: center; }
.filters .grp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters select { border: 1.5px solid var(--tinta); background: transparent; min-height: 40px; padding: 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.stage-head { position: relative; overflow: hidden; padding: 40px var(--pad) 0; min-height: clamp(150px, 22vw, 320px); }
.watermark { position: absolute; right: 2vw; top: -0.18em; font-family: var(--display); font-size: clamp(200px, 32vw, 460px); line-height: 1; color: var(--piedra); pointer-events: none; }
.stage-head .display { position: relative; font-size: clamp(64px, 16vw, 230px); }
.posts { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); padding: 0 var(--pad); border-top: 1px solid var(--tinta); }
.post { grid-column: span var(--span, 6); padding: 44px 40px 44px 0; border-bottom: 1px solid var(--tinta); border-right: 1px solid var(--tinta); display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.post + .post:not(.featured) { padding-left: 40px; }
.post.featured { grid-column: 1 / -1; margin: 0 calc(var(--pad) * -1); padding: 64px var(--pad); border-right: 0; position: relative; overflow: hidden; }
.post.is-hidden { opacity: 0.6; }
.post .quote { font-family: var(--serif); font-size: clamp(36px, 5vw, 72px); line-height: 1; margin: 0; overflow-wrap: anywhere; }
.post h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.02; margin: 0; }
.post .body { font-family: var(--read); font-size: 19px; line-height: 1.6; margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.post .meta { display: flex; align-items: center; gap: 14px; }
.post .acts { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: center; margin-top: auto; }
.post .acts .right { margin-left: auto; display: flex; gap: 18px; }
.empty { padding: 80px var(--pad); text-align: left; }

/* Perfil */
.profile { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.profile-side { padding: 56px var(--pad); }

/* Admin */
.case { border: 1px solid var(--tinta); padding: 24px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
table.members { width: 100%; border-collapse: collapse; font-size: 14px; }
table.members td, table.members th { border-bottom: 1px solid var(--piedra); padding: 10px 8px; text-align: left; }

/* Pie */
.foot { padding: 32px var(--pad) 24px; border-top: 1px solid var(--tinta); margin-top: 64px; display: flex; flex-direction: column; gap: 24px; }
.foot-note { max-width: 640px; }
.foot-note .field { padding: 12px 14px; font-size: 16px; }
.foot-note .btn { min-height: 48px; }
.foot-label { display: block; font-family: var(--serif); font-style: italic; font-size: 20px; margin-bottom: 10px; color: var(--tinta); }
.foot-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--claro); }
.fab { display: none; }

@media (max-width: 860px) {

  /* Móvil: menú en una sola fila que se desliza */
  .top { padding: 14px var(--pad); row-gap: 8px; }
  .top .nav { flex-wrap: nowrap; overflow-x: auto; gap: 18px; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); }
  .top .nav::-webkit-scrollbar { display: none; }
  .top .nav a { white-space: nowrap; flex-shrink: 0; }
  /* Símbolos de la portada: rejilla compacta */
  .symgrid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 10px; }
  /* ¿Te revelas?: bordes entre bloques apilados */
  .reveal > div { border-right: 0 !important; border-bottom: 1px solid var(--tinta); }
  .reveal > div:last-child { border-bottom: 0; }
  /* Filtros del feed plegables */
  .filters .filters-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .filters.closed .grp { display: none; }
  .panel { margin-top: 24px; box-shadow: 5px 5px 0 var(--tinta); }
  main { padding-bottom: 96px; }
  .panel-body { padding: 24px 18px; }
  .sec { padding-top: 40px; }
  .famrow { grid-template-columns: 1fr !important; }
  .grid3 { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--tinta); padding-right: 0; }
  .post, .post + .post:not(.featured) { grid-column: 1 / -1; border-right: 0 !important; padding: 32px 0; }
  .post.featured { padding: 44px var(--pad); }
  .profile { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr !important; }
  .top .nav { order: 3; width: 100%; }
  .fab { display: flex; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 10; box-shadow: 0 0 0 6px var(--hueso); }
  .hide-sm { display: none !important; }
}

/* Portada: accesos a Banda sonora y Biblioteca */
.media-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.media-tile { display: flex; flex-direction: column; gap: 14px; padding: 24px 28px; border: 1.5px solid var(--tinta); background: var(--hueso); color: var(--tinta); text-decoration: none; transition: background .2s, color .2s; }
.media-tile-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.media-tile-top .display { font-size: clamp(32px, 4vw, 48px); line-height: .95; color: var(--petroleo); }
.media-tile-txt { font-size: 16px; line-height: 1.45; max-width: 46ch; }
.media-tile .kicker { color: var(--petroleo); margin-top: auto; }
.media-tile:hover { background: var(--piedra); }
@media (max-width: 860px) {
  .media-tiles { grid-template-columns: 1fr; }
  .media-tile { padding: 20px; }
}

/* Lo que habita en el recuerdo */
.tl { display: block; line-height: .94; }
.tl2 { margin-top: .32em; }
.display .outline, h2 .outline { color: transparent; -webkit-text-stroke: clamp(1.5px, 0.2vw, 2.5px) var(--petroleo); paint-order: stroke; }
@supports not (-webkit-text-stroke: 1px black) { .display .outline { color: var(--petroleo); } }
.about-lead { margin: 0; font-size: clamp(26px, 2.8vw, 36px); line-height: 1.12; }
.about-big { display: block; font-size: clamp(48px, 5.4vw, 72px); line-height: 1; margin-bottom: 2px; }

/* Re:cuerdos — título del feed, más pequeño que RE:CUENTO */
.feed-title { font-size: clamp(44px, 6vw, 84px); line-height: .9; color: var(--petroleo); margin: 0; padding: 28px var(--pad) 4px; }

/* Título «Lo que queremos cultivar» */
.cult-title { font-size: clamp(36px, 4.6vw, 64px); line-height: 1.02; color: var(--petroleo); margin: 64px 0 0; }
/* Tres accesos: Preguntas al vacío, Banda sonora, Biblioteca */
.media-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 32px; }
.q-tile { background: var(--petroleo); color: var(--hueso); border-color: var(--petroleo); }
.q-tile .media-tile-top .display, .q-tile .kicker { color: var(--hueso); }
.q-tile:hover { background: var(--profundo); }
.q-mark { width: 48px; height: 48px; border: 1.5px solid var(--hueso); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 30px; line-height: 1; flex: none; }
@media (max-width: 1100px) and (min-width: 861px) { .media-tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .media-tiles { grid-template-columns: 1fr; } }
