/* Amarettos — etiqueta de licorería: papel crema, bordó, ámbar y lacre */
:root {
  --paper: #F3E7D3;
  --card: #FBF3E4;
  --ink: #2B1810;
  --ink-2: #6B4A2E;
  --label: #8A4B12;
  --wine: #6E1E24;
  --wine-dark: #561419;
  --amber: #C8741A;
  --amber-soft: #E8B878;
  --bottle: #1F4D3A;
  --line: #D9C4A0;
  --cream: #F3E7D3;       /* texto sobre rellenos bordó, verde o tinta: igual en los dos temas */
  --ink-fixed: #2B1810;
  --wine-text: #6E1E24;   /* bordó usado como texto o filete */
  --bottle-text: #1F4D3A;
  --field: #fff;
  --track: #E6D3B3;
  --faint: #746050;
  --wine-wash: #F6DEDC;
  --over: #FFF8E8;
  --u-fabio: #A85A14;
  --u-demian: #1F4D3A;
  --u-gabriel: #6E1E24;
  --u-nico: #2F5D73;
  --u-martin: #7A6A1F;
  --u-yankee: #6B3A5B;
  --serif: 'Fraunces', Georgia, serif;
  --mono: 'DM Mono', ui-monospace, Menlo, Consolas, monospace;
}

/* modo noche (bodega): se prende a mano desde el pie de la página */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1A110D;
  --card: #261912;
  --ink: #F1E4CF;
  --ink-2: #C7B29A;
  --label: #E0A25C;
  --amber: #D98A2B;
  --line: #4D392C;
  --wine-text: #EC8F95;
  --bottle-text: #86CBAA;
  --field: #120B08;
  --track: #3B2A20;
  --faint: #A08A76;
  --wine-wash: #45191D;
  --over: #33241A;
  --u-fabio: #DE9440;
  --u-demian: #4FA07C;
  --u-gabriel: #CC5A62;
  --u-nico: #5FA3BF;
  --u-martin: #BBA94A;
  --u-yankee: #B076A0;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 14px/1.5 var(--mono);
  min-height: 100dvh;
}
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--ink-2); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- piezas ---------- */
/* etiqueta: doble filete, como las de las botellas */
.label {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--ink);
  margin: 4px;
}
.lbl { font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--label); margin-bottom: 12px; }
.title { font: 600 22px/1.15 var(--serif); }
.empty { color: var(--ink-2); padding: 14px; border: 1.5px dashed var(--line); border-radius: 4px; }
.err { color: var(--wine-text); min-height: 1.5em; }
.link { background: none; border: 0; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.btn {
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 4px;
  padding: 10px 14px; min-height: 44px; cursor: pointer; letter-spacing: .02em;
}
.btn:hover { background: var(--field); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--wine); border-color: var(--wine); color: var(--cream); }
.btn.primary:hover { background: var(--wine-dark); }
.btn.danger { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* lacre: sello de cera con la nota */
.seal {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px;
  border-radius: 47% 53% 50% 50% / 52% 48% 53% 47%;
  background: radial-gradient(circle at 34% 30%, #8E2C34, var(--wine) 58%, var(--wine-dark));
  box-shadow: inset 0 0 0 3px var(--wine), inset 0 0 0 4px rgba(232, 184, 120, .7), 0 1px 2px rgba(43, 24, 16, .35);
  color: var(--cream); font: 600 17px/1 var(--serif); letter-spacing: -.02em;
}
.seal.xl { width: 68px; height: 68px; font-size: 26px; }
.seal.locked { background: var(--card); color: var(--wine-text); box-shadow: inset 0 0 0 1.5px var(--wine-text); border: 1.5px dashed var(--wine-text); font-size: 18px; }
.seal.empty { background: none; box-shadow: none; border: 1.5px dashed var(--line); }

.cover {
  position: relative; display: block; aspect-ratio: 2 / 3;
  background: var(--bottle); border: 1.5px solid var(--ink); border-radius: 2px;
}
.cover { overflow: visible; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 1px; }
.cover .blank {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 8px; text-align: center; color: var(--cream); overflow: hidden;
  box-shadow: inset 0 0 0 3px var(--bottle), inset 0 0 0 4px var(--amber-soft);
}
.cover .blank b { font: 600 13px/1.15 var(--serif); overflow-wrap: break-word; hyphens: auto; }
.table .cover .blank b, .pick .cover .blank b { font-size: 11px; }
.table .cover .blank i, .pick .cover .blank i { display: none; }
.cover .blank i { font: italic 400 11px/1.2 var(--serif); color: var(--amber-soft); }
.cover .seal { position: absolute; top: -10px; right: -10px; transform: rotate(8deg); }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--wine); }
.login-card { width: 100%; max-width: 380px; padding: 28px 20px 20px; text-align: center; box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--amber); border-color: var(--amber); }
.kicker { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--label); }
.logo-xl { font: italic 600 52px/1 var(--serif); color: var(--wine-text); letter-spacing: -.02em; margin: 6px 0 2px; }
.orn { color: var(--amber); letter-spacing: .5em; font-size: 11px; margin-bottom: 18px; }
.sub { margin-bottom: 12px; color: var(--ink-2); }
.members { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.member {
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 4px; cursor: pointer;
  padding: 12px 8px; min-height: 48px; font: 600 18px/1.1 var(--serif);
}
.member:hover { background: var(--field); }
.member[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
#loginForm { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.login-card .link { color: var(--ink-2); }

input, select, textarea {
  width: 100%; background: var(--field); border: 1.5px solid var(--ink); border-radius: 4px; padding: 10px 12px; min-height: 44px;
  font-size: 16px; /* 16px: iOS no hace zoom al enfocar */
}
input, select, textarea { min-width: 0; max-width: 100%; }
textarea { resize: vertical; line-height: 1.4; }

/* ---------- cabecera ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--wine); color: var(--cream);
  border-bottom: 4px double var(--amber);
}
.logo { font: italic 600 26px/1 var(--serif); text-decoration: none; letter-spacing: -.01em; }
.who { font-size: 12px; color: var(--amber-soft); white-space: nowrap; display: flex; align-items: baseline; gap: 10px; }
.who .link { color: var(--cream); }
.top-nav { display: none; }
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; display: flex;
  background: var(--card); border-top: 1.5px solid var(--ink); padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1; text-align: center; text-decoration: none; padding: 14px 4px 12px; min-height: 48px;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
}
.bottom-nav a + a { border-left: 1.5px solid var(--line); }
.bottom-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

#main { max-width: 960px; margin: 0 auto; padding: 20px 16px calc(150px + env(safe-area-inset-bottom)); }
section + section { margin-top: 28px; }

/* ---------- estante ---------- */
.table { display: flex; gap: 14px; padding: 12px; text-decoration: none; max-width: 520px; }
.table .cover { width: 84px; flex: none; }
.table-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; justify-content: center; }

.tabs { display: flex; gap: 0; border: 1.5px solid var(--ink); border-radius: 4px; overflow: hidden; margin-bottom: 18px; max-width: 360px; }
.tabs button { flex: 1; background: var(--card); border: 0; padding: 10px 8px; min-height: 44px; cursor: pointer; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }
.tabs button + button { border-left: 1.5px solid var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tabs span { opacity: .7; }

.year { font: 600 28px/1 var(--serif); margin: 22px 0 16px; display: flex; align-items: baseline; gap: 10px; }
.year:first-of-type { margin-top: 0; }
.year span { font: 400 12px/1 var(--mono); color: var(--ink-2); }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 22px 16px; }
.book { display: flex; flex-direction: column; gap: 3px; text-decoration: none; min-width: 0; }
.book .cover { margin-bottom: 5px; }
.book > b { font: 600 14px/1.2 var(--serif); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book > span:last-child { font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fab {
  position: fixed; right: 18px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 6;
  width: 58px; height: 58px; border: 0; cursor: pointer;
  border-radius: 47% 53% 50% 50% / 52% 48% 53% 47%;
  background: radial-gradient(circle at 34% 30%, #8E2C34, var(--wine) 58%, var(--wine-dark));
  box-shadow: inset 0 0 0 4px var(--wine), inset 0 0 0 5px rgba(232, 184, 120, .7), 0 3px 8px rgba(43, 24, 16, .4);
  color: var(--cream); font: 400 32px/1 var(--serif);
}

/* ---------- libro ---------- */
.back { display: inline-block; margin-bottom: 14px; padding: 6px 0; text-underline-offset: 3px; }
.book-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.cover.big { width: 116px; flex: none; }
.book-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.book-info .title { font-size: 26px; overflow-wrap: anywhere; }
.status { align-self: flex-start; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 2px 8px; border: 1.5px solid currentColor; border-radius: 3px; }
.s-read { color: var(--bottle-text); }
.s-reading { color: var(--wine-text); }
.s-queue { color: var(--label); }
.book-page > section { margin-top: 28px; }

.rate { padding: 16px; margin-bottom: 22px; display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.rate h3 { font: 600 20px/1 var(--serif); }
.rate-row { display: flex; align-items: center; gap: 16px; }
.rate label { font-size: 12px; color: var(--ink-2); }
.warn { font-size: 12px; color: var(--wine-text); }
input[type="range"] { flex: 1; min-height: 44px; padding: 0; border: 0; background: none; accent-color: var(--wine); }

.avg { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; font: 600 18px/1.3 var(--serif); }
.avg .muted { font: 400 12px/1.4 var(--mono); }
.ratings { display: grid; gap: 14px; max-width: 620px; }
.rating { display: flex; gap: 12px; align-items: flex-start; }
.rating > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 2px; }
.rating.none b { color: var(--ink-2); font-weight: 400; }
.rating q { font: italic 400 16px/1.4 var(--serif); quotes: '“' '”'; overflow-wrap: anywhere; }

/* ---------- diálogo ---------- */
dialog {
  width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto;
  background: var(--card); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 4px; padding: 18px 16px;
  box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--ink);
}
dialog::backdrop { background: rgba(43, 24, 16, .6); }
dialog h2 { font: 600 24px/1 var(--serif); margin-bottom: 14px; }
.search { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 12px; }
#results { margin-bottom: 14px; }
.results { display: grid; gap: 6px; }
.results button {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; cursor: pointer;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 4px; padding: 8px;
}
.results button:hover { border-color: var(--ink); }
.results button > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.results b { font: 600 15px/1.2 var(--serif); }
.results .muted { font-size: 12px; }
.cover.mini { width: 40px; flex: none; }
.fields { display: grid; gap: 12px; }
.fields label { display: grid; gap: 4px; font-size: 12px; color: var(--ink-2); min-width: 0; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

#toast {
  position: fixed; left: 50%; bottom: calc(140px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 20;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 4px; max-width: calc(100vw - 32px);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 720px) {
  .logo { font-size: 32px; }
  .bottom-nav { display: none; }
  .top-nav { display: flex; gap: 4px; margin-right: auto; margin-left: 20px; }
  .top-nav a { text-decoration: none; padding: 6px 12px; border-radius: 3px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-soft); }
  .top-nav a:hover { color: var(--cream); }
  .top-nav a[aria-current="page"] { background: var(--cream); color: var(--wine); }
  #main { padding-bottom: 80px; }
  .fab { bottom: 24px; right: max(18px, calc((100vw - 960px) / 2)); }
  #toast { bottom: 40px; }
  .top { padding-left: max(16px, calc((100vw - 960px) / 2 + 16px)); padding-right: max(16px, calc((100vw - 960px) / 2 + 16px)); }
  .shelf { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 28px 22px; }
  .cover.big { width: 180px; }
  .book-info .title { font-size: 36px; }
  .book-head { gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ================= piezas compartidas de las pantallas nuevas ================= */
.after { margin-top: 12px; }
.hint { font-size: 12px; margin: 0 0 12px; }
.loading { padding: 14px 0; }
.notice { display: flex; align-items: center; gap: 8px; color: var(--wine-text); margin-bottom: 16px; font-size: 13px; }
.rowlink { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; text-decoration: none; max-width: 520px; }
.rowlink b { font: 600 18px/1.2 var(--serif); }
.rowlink .muted { font-size: 12px; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%; color: #fff; font: 600 15px/1 var(--serif);
}
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pills button {
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 3px; cursor: pointer;
  padding: 8px 12px; min-height: 40px; font-size: 12px; letter-spacing: .04em;
}
.pills button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.tabs.mode button { text-transform: none; letter-spacing: .02em; }
.tabs.mode button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.link.danger { color: var(--wine-text); }
.banner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px; margin-bottom: 24px; }
.banner > div:first-child { flex: 1 1 240px; }
.banner b { font: 600 18px/1.2 var(--serif); }
.banner p { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.banner p b { font: 500 13px/1.4 var(--mono); color: var(--ink); }
.ios-share { vertical-align: -3px; }

/* ================= avance ================= */
.prog-me { padding: 14px; margin-bottom: 18px; max-width: 520px; }
.prog-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; color: var(--ink-2); font-size: 12px; }
.prog-big b { font: 600 44px/1 var(--serif); color: var(--wine-text); min-width: 1.2ch; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper .btn { width: 48px; min-height: 48px; padding: 0; font: 400 26px/1 var(--serif); flex: none; }
.prog { display: grid; gap: 8px; max-width: 520px; }
.prog-row { display: grid; grid-template-columns: 68px 1fr 34px; align-items: center; gap: 10px; }
.prog-row.me .prog-name { font-weight: 500; }
.prog-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog-n { text-align: right; }
.bar { display: block; height: 10px; background: var(--track); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--amber); border-radius: 2px; transition: width .3s; }

/* ================= capítulos ================= */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; margin-bottom: 16px; }
.chip {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px;
  background: none; border: 1.5px dashed var(--line); border-radius: 3px; color: var(--ink-2);
  text-decoration: none; cursor: pointer; font-size: 13px;
}
.chip.open { background: var(--card); border: 1.5px solid var(--ink); color: var(--ink); }
.chip.open.has { background: var(--bottle); border-color: var(--bottle); color: var(--cream); }
.chip i {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--wine); color: var(--cream); font: 500 11px/18px var(--mono); font-style: normal; text-align: center;
}
.chip:not(.open) i { background: var(--paper); color: var(--wine-text); box-shadow: inset 0 0 0 1.5px var(--wine-text); }
.threads { display: grid; gap: 6px; max-width: 520px; }
.thread-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 4px; text-decoration: none; }
.thread-row.open { border: 1.5px solid var(--bottle-text); color: var(--bottle-text); justify-content: space-between; }
.thread-row.open b { font: 600 16px/1.2 var(--serif); }
.thread-row.locked { border: 1.5px dashed var(--wine-text); color: var(--wine-text); }

.chapter-title { font-size: 32px; margin-bottom: 18px; }
.chapter-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 24px; }
.chapter-nav .btn { text-decoration: none; display: inline-flex; align-items: center; }
.lacrado { padding: 28px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 520px; border-color: var(--wine-text); box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--wine-text); }
.lacrado .title { color: var(--wine-text); font-style: italic; font-size: 28px; }

.comments { display: grid; gap: 18px; max-width: 680px; }
.comments.replies { margin-top: 14px; gap: 14px; border-left: 1.5px solid var(--line); padding-left: 12px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment.reply .avatar { width: 26px; height: 26px; font-size: 13px; }
.c-main { min-width: 0; flex: 1; }
.c-head { font-size: 12px; }
.c-head b { font-size: 14px; }
.c-body { font: 400 16px/1.45 var(--serif); white-space: pre-wrap; overflow-wrap: anywhere; margin: 2px 0 4px; }
.c-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; }
.c-tools .link { color: var(--ink-2); min-height: 32px; }
.react {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer;
  padding: 2px 9px; min-height: 30px; font-size: 14px; line-height: 1;
}
.react b { font: 500 12px/1 var(--mono); }
.react.on { border-color: var(--wine-text); background: var(--wine-wash); }
.react-pick { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.react-pick .react { min-height: 40px; min-width: 40px; font-size: 18px; }
.composer { display: grid; gap: 8px; margin-top: 22px; max-width: 680px; }
.composer .btn { justify-self: start; }
.composer.small { margin-top: 12px; }

/* ================= agenda ================= */
.ticket {
  display: flex; gap: 14px; align-items: center; padding: 12px 14px; margin: 0 4px 12px; max-width: 512px;
  background: var(--wine); color: var(--cream); border-radius: 4px;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--wine);
}
.ticket.past { opacity: .6; }
.ticket-date { text-align: center; flex: none; text-decoration: none; padding-right: 14px; border-right: 1.5px dashed var(--amber-soft); min-width: 62px; }
.ticket-date b { display: block; font: 600 34px/1 var(--serif); }
.ticket-date span { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--amber-soft); }
.ticket-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.ticket-txt > b { font: 600 18px/1.25 var(--serif); }
.ticket-when { font: 400 11px/1 var(--mono); letter-spacing: .06em; color: var(--amber-soft); margin-left: 6px; white-space: nowrap; }
.ticket-who { color: var(--amber-soft); font-size: 12px; }
.ticket-tools { display: flex; gap: 14px; }
.ticket-tools .link { color: var(--cream); font-size: 12px; }

.cal { max-width: 520px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head b { font: 600 22px/1 var(--serif); }
.cal-head .btn { min-width: 44px; padding: 0 12px; }
.cal-head .btn:disabled { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-grid.wk { margin-bottom: 4px; text-align: center; font-size: 11px; color: var(--ink-2); }
.day {
  position: relative; aspect-ratio: 1; min-height: 44px; padding: 4px 2px 3px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 3px;
}
.day.off { visibility: hidden; }
.day b { font: 500 14px/1 var(--mono); }
.day.past { background: none; color: var(--faint); border-style: dashed; }
.day.today b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.day.most { background: var(--amber-soft); border-color: var(--amber); color: var(--ink-fixed); }
.day.all { background: var(--bottle); border-color: var(--bottle); color: var(--cream); }
.day.meet { border-color: var(--wine-text); box-shadow: inset 0 0 0 2px var(--wine-text); }
.day.meet b::after { content: '●'; color: var(--wine-text); font-size: 8px; vertical-align: 4px; margin-left: 2px; }
.day.all.meet b::after { color: var(--amber-soft); }
.day.sel { outline: 2.5px solid var(--ink); outline-offset: 1px; }
.dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 6px; max-width: 30px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; }
.day.all .dots i { box-shadow: 0 0 0 1px rgba(243, 231, 211, .7); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 14px; height: 14px; border-radius: 2px; border: 1.5px solid var(--line); display: inline-block; }
.lg.all { background: var(--bottle); border-color: var(--bottle); }
.lg.most { background: var(--amber-soft); border-color: var(--amber); }
.lg.meet { background: var(--card); border-color: var(--wine-text); box-shadow: inset 0 0 0 1.5px var(--wine-text); }
.day-panel { padding: 14px; max-width: 512px; display: grid; gap: 8px; }
.day-panel h3 { font: 600 20px/1.2 var(--serif); }
.who-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.who-list li { display: inline-flex; align-items: center; gap: 6px; }
.who-list i { width: 10px; height: 10px; border-radius: 50%; }
.who-list .no { color: var(--faint); text-decoration: line-through; }
.who-list .no i { background: none !important; box-shadow: inset 0 0 0 1.5px var(--faint); }
.best { display: grid; gap: 6px; max-width: 520px; }
.best button {
  display: flex; align-items: baseline; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line); border-left-width: 8px; border-radius: 3px; padding: 10px 12px; min-height: 44px;
}
.best .all button { border-color: var(--bottle); }
.best .most button { border-color: var(--amber); }
.best b { font: 600 16px/1.2 var(--serif); white-space: nowrap; }
.best span { font-size: 12px; color: var(--ink-2); }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* ================= tier list ================= */
.tierlist { display: grid; gap: 6px; }
.tier { display: flex; align-items: stretch; min-height: 92px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 4px; overflow: hidden; }
.tier-l { width: 44px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--cream); font: italic 600 26px/1 var(--serif); }
.t-S .tier-l { background: var(--wine); }
.t-A .tier-l { background: #A8431C; }
.t-B .tier-l { background: #B5651D; }
.t-C .tier-l { background: #8C7A3C; }
.t-D .tier-l { background: var(--bottle); }
.toks { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; padding: 6px; flex: 1; min-width: 0; }
[data-zone].over { background: var(--over); box-shadow: inset 0 0 0 2px var(--amber); }
.pool { margin-bottom: 14px; padding: 10px; border: 1.5px dashed var(--ink-2); border-radius: 4px; min-height: 96px; }
.pool .lbl { margin-bottom: 6px; }
.pool .toks { padding: 0; }
.pool-empty { font-size: 12px; padding: 8px 0; }
.tok {
  display: flex; flex-direction: column; align-items: center; gap: 3px; width: 64px; padding: 0; cursor: pointer;
  background: none; border: 0; text-align: center; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.tok[data-drag] { touch-action: none; cursor: grab; }
.tok-img {
  display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; flex: none; overflow: hidden;
  background: var(--bottle); color: var(--cream); border: 1.5px solid var(--ink); border-radius: 3px;
}
.tok-img img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.tok-img b { font: 600 26px/1 var(--serif); }
.tok-img.big { width: 84px; height: 84px; }
.tok-img.big b { font-size: 36px; }
.tok-name { font-size: 11px; line-height: 1.15; max-width: 64px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.tok-note { font-size: 11px; color: var(--label); }
.tok.sel .tok-img { outline: 2.5px solid var(--amber); outline-offset: 1px; }
.tok.dragging { opacity: .25; }
.tok.ghost { position: fixed; z-index: 50; pointer-events: none; margin: 0; filter: drop-shadow(0 6px 8px rgba(43, 24, 16, .45)); }
.tok.ghost .tok-img { transform: rotate(-4deg) scale(1.08); }
.tok-slot { width: 6px; height: 60px; border-radius: 3px; background: var(--amber); flex: none; }
body.dragging-tok { cursor: grabbing; -webkit-user-select: none; user-select: none; }
.char-card { display: flex; gap: 14px; padding: 12px; margin-bottom: 14px; max-width: 560px; }
.char-txt { min-width: 0; display: grid; gap: 6px; align-content: start; }
.char-txt h3 { font: 600 20px/1.2 var(--serif); }
.char-txt p { font-size: 13px; }
.char-tools { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.pills.move { margin: 0; }
.pills.move button { min-width: 40px; padding: 8px 10px; }
.char-photo { display: flex; gap: 12px; align-items: flex-start; }
.char-photo .fields { flex: 1; min-width: 0; }
input[type="file"] { padding: 8px; font-size: 13px; }

/* ================= números ================= */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 10px; }
.tile { background: var(--card); border: 1.5px solid var(--ink); border-radius: 4px; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.tile b { font: 600 34px/1 var(--serif); color: var(--wine-text); }
.tile span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.tiles + .hint { margin-top: 10px; }
.years { display: grid; gap: 8px; max-width: 620px; }
.years li { display: grid; grid-template-columns: 76px 1fr; grid-template-areas: 'y bar' 'y n'; column-gap: 12px; row-gap: 3px; align-items: center; }
.years .y { grid-area: y; font: 600 22px/1 var(--serif); }
.years .bar { grid-area: bar; height: 14px; }
.years .bar i { background: var(--wine); }
.years .yn { grid-area: n; font-size: 12px; color: var(--ink-2); }
.years .yn b { color: var(--ink); }
.means { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 20px; }
.means li { display: flex; align-items: center; gap: 10px; }
.mean-name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mean-name .muted { font-size: 12px; }
.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.pick { display: flex; gap: 12px; align-items: center; padding: 10px; text-decoration: none; }
.pick .cover { width: 54px; flex: none; }
.pick-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pick-txt .lbl { margin: 0; }
.pick-txt .title { font-size: 17px; }
.pick-txt .muted { font-size: 12px; }
.pick .seal { font-size: 15px; }
.authors { display: grid; gap: 10px; max-width: 680px; }
.authors li { display: flex; flex-direction: column; gap: 2px; padding-left: 12px; border-left: 3px solid var(--amber); }
.authors b { font: 600 18px/1.2 var(--serif); }
.authors .muted { font-size: 12px; }

@media (min-width: 720px) {
  .tok { width: 76px; }
  .tok-img { width: 72px; height: 72px; }
  .tok-name { max-width: 76px; }
  .tok-slot { height: 72px; }
  .tier { min-height: 106px; }
  .tier-l { width: 60px; font-size: 32px; }
}

/* ================= pool de "Por leer" y sorteo ================= */
.pool-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px 20px; }
.pool-item { display: flex; gap: 12px; align-items: flex-start; }
.pool-item .cover { width: 72px; flex: none; }
.pool-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; align-items: flex-start; }
.pool-txt a { text-decoration: none; }
.pool-txt .title { font-size: 17px; }
.pool-txt > span { font-size: 12px; }
.vote {
  margin-top: 4px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 3px; cursor: pointer;
  padding: 8px 10px; min-height: 40px; font-size: 12px; display: inline-flex; align-items: center; gap: 8px;
}
.vote b { font: 600 15px/1 var(--serif); }
.vote.on { background: var(--bottle); border-color: var(--bottle); color: var(--cream); }
.draw-row { margin-top: 20px; }
.draw { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 300px; padding: 6px 0 14px; text-align: center; }
.draw-face { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.draw-face .cover { width: 130px; }
.draw-face .title { font-size: 18px; }
.draw-face.won .cover { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--amber); }
.draw-msg { font-size: 13px; color: var(--ink-2); }
.tok-name { overflow-wrap: break-word; hyphens: auto; }

/* meta de la próxima juntada sobre las barras de avance */
.bar-wrap { position: relative; display: block; }
.goal { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2.5px dotted var(--ink); margin-left: -1px; }
.goal-key { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; }
.goal-key .goal { position: static; display: inline-block; height: 16px; margin: 0; }
.goal-txt { margin-top: 12px; font-size: 13px; color: var(--wine-text); }
.goal-txt.done { color: var(--bottle-text); }

/* ================= lectura libre ================= */
.tabs.three { max-width: 480px; }
.tabs.three button { padding-left: 4px; padding-right: 4px; letter-spacing: .04em; }
.free-new { margin-bottom: 8px; }
.free-round { margin-top: 26px; }
.free-round .year { font-size: 24px; margin-bottom: 12px; }
.free-list { display: grid; gap: 12px; max-width: 620px; }
.free-read { display: flex; gap: 10px; align-items: flex-start; }
.free-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.free-txt span { font: 400 16px/1.35 var(--serif); overflow-wrap: anywhere; }
.free-tools { font-size: 12px; color: var(--ink-2); display: flex; gap: 10px; flex: none; }

/* ================= pie: modo noche ================= */
.foot { margin-top: 40px; padding-top: 14px; border-top: 1.5px dashed var(--line); font-size: 12px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot .link { color: var(--ink-2); min-height: 32px; }
:root[data-theme="dark"] .avatar { color: #1A110D; }
:root[data-theme="dark"] .day.all .dots i { box-shadow: 0 0 0 1px rgba(26, 17, 13, .6); }
:root[data-theme="dark"] .cover img { filter: brightness(.92); }
:root[data-theme="dark"] .label { box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--line); border-color: var(--line); }
:root[data-theme="dark"] .login-card { border-color: var(--amber); box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--amber); }
:root[data-theme="dark"] .lacrado { border-color: var(--wine-text); box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--wine-text); }
:root[data-theme="dark"] .btn, :root[data-theme="dark"] .tabs, :root[data-theme="dark"] .pills button, :root[data-theme="dark"] .vote,
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea,
:root[data-theme="dark"] .tile, :root[data-theme="dark"] .tier, :root[data-theme="dark"] .chip.open, :root[data-theme="dark"] dialog { border-color: #7A6250; }
:root[data-theme="dark"] .btn.primary { border-color: var(--wine); }
:root[data-theme="dark"] .vote.on, :root[data-theme="dark"] .chip.open.has { border-color: var(--bottle); }
:root[data-theme="dark"] dialog { box-shadow: 0 0 0 3px var(--card), 0 0 0 4px #7A6250; }
:root[data-theme="dark"] .goal { border-left-color: var(--ink); }

/* ================= recap del año ================= */
body.recap-open { background: var(--wine); }
.recap-pills .btn { text-decoration: none; display: inline-flex; align-items: center; }
.recap {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center;
  background: var(--wine); color: var(--cream); padding: calc(46px + env(safe-area-inset-top)) 20px calc(50px + env(safe-area-inset-bottom));
}
.recap .loading { color: var(--amber-soft); }
.r-bars { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 14px; right: 14px; display: flex; gap: 4px; }
.r-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(243, 231, 211, .28); }
.r-bars i.done, .r-bars i.now { background: var(--cream); }
.r-close { position: absolute; top: calc(22px + env(safe-area-inset-top)); right: 12px; z-index: 3; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--cream); font: 400 32px/1 var(--serif); }
.r-slide {
  width: min(440px, 100%); max-height: 100%; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  background: #FBF3E4; color: #2B1810; border: 1.5px solid var(--amber); border-radius: 4px; padding: 30px 22px;
  box-shadow: 0 0 0 4px #FBF3E4, 0 0 0 5.5px var(--amber);
  animation: r-in .35s ease-out;
}
@keyframes r-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.r-kicker { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: #8A4B12; margin-bottom: 6px; }
.r-logo { font: italic 600 50px/1 var(--serif); color: #6E1E24; }
.r-year { font: 600 76px/1 var(--serif); color: #6E1E24; letter-spacing: -.02em; }
.r-num { font: 600 92px/.9 var(--serif); color: #6E1E24; letter-spacing: -.03em; }
.r-big { font: 600 28px/1.15 var(--serif); overflow-wrap: anywhere; }
.r-gap { margin-top: 16px; }
.r-title { font: 600 24px/1.15 var(--serif); overflow-wrap: anywhere; }
.r-sub { font-size: 13px; line-height: 1.55; color: #6B4A2E; }
.r-sub b { color: #2B1810; font-weight: 500; }
.r-slide > .cover { width: 132px; flex: none; border-color: #2B1810; }
.r-slide .seal.xl { margin-top: 4px; }
.r-seal { width: 96px; height: 96px; font: italic 600 54px/1 var(--serif); margin-bottom: 8px; }
.r-mosaic { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; width: 100%; margin-top: 10px; }
.r-mosaic .cover { width: calc((100% - 25px) / 6); }
.r-mosaic .cover { border-color: #2B1810; }
.r-tap { position: absolute; top: 70px; bottom: 0; width: 34%; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.r-tap.prev { left: 0; }
.r-tap.next { right: 0; width: 66%; }
.r-tap:disabled { cursor: default; }
.r-tap:focus-visible { outline-offset: -6px; }
.r-hint { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--amber-soft); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .r-slide { animation: none; } }

/* ================= últimos movimientos ================= */
.feed { display: grid; gap: 4px; max-width: 620px; }
.feed a { display: flex; gap: 10px; align-items: flex-start; text-decoration: none; padding: 7px 0; }
.feed .avatar { width: 28px; height: 28px; font-size: 13px; }
.feed-txt { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.4; }
.feed-txt b { font-weight: 500; }
.feed-txt > span:first-child { overflow-wrap: anywhere; }
.feed-txt .muted { font-size: 11px; }

/* ================= pantalla principal en dos columnas (compu) ================= */
.cols > div + div { margin-top: 28px; }
.cols section:empty { display: none; }
@media (min-width: 900px) {
  .cols { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: 0 48px; align-items: start; }
  .cols > div + div { margin-top: 0; }
}

/* ================= zonas táctiles cómodas ================= */
.logo { display: inline-block; padding: 4px 0; }
.pool-txt a { display: block; padding: 5px 0; }
.login-card .link { min-height: 40px; }

/* ================= "no lo leí" y notas pendientes ================= */
.skip-row { font-size: 12px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; border-top: 1.5px dashed var(--line); padding-top: 8px; }
.skip-row .link { color: var(--ink-2); min-height: 32px; }
.notice a { color: inherit; white-space: nowrap; }
.next-owed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 20px; }
.next-owed .btn { text-decoration: none; display: inline-flex; align-items: center; }
.next-owed .muted { font-size: 12px; }
.seal.empty { color: var(--ink-2); font-size: 18px; }

/* ================= buscador del estante ================= */
.shelf-search { max-width: 480px; margin-bottom: 18px; }

/* ================= atajos: calendario por día de la semana, Goodreads ================= */
.wk-btn { background: var(--card); border: 1.5px solid var(--ink); border-radius: 3px; min-height: 36px; cursor: pointer; font: inherit; font-size: 12px; color: var(--ink); padding: 0; }
.ticket-tools a.link { color: var(--cream); font-size: 12px; }
.ext { font-size: 12px; }
.ext .link { color: var(--ink-2); padding: 0; }

/* ================= ficha de un socio ================= */
.means li > a { display: flex; align-items: center; gap: 10px; text-decoration: none; width: 100%; padding: 4px 0; }
.member-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.member-head .title { font-size: 30px; }
.avatar.xl { width: 60px; height: 60px; font-size: 28px; }
.member-ratings { display: grid; gap: 14px; max-width: 680px; }
.member-ratings a { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; }
.member-ratings .cover { width: 52px; flex: none; }
.mr-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mr-txt .title { font-size: 17px; }
.mr-txt .muted { font-size: 12px; }
.mr-txt q { font: italic 400 15px/1.4 var(--serif); quotes: '“' '”'; overflow-wrap: anywhere; margin-top: 2px; }
.authors a { text-decoration: none; }

/* ================= cómo se usa ================= */
.help { display: grid; gap: 18px; max-width: 680px; }
.help h3 { font: 600 19px/1.2 var(--serif); margin-bottom: 4px; }
.help p { font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.help-lbl { margin-top: 30px; }
.foot a.link { color: var(--ink-2); min-height: 32px; display: inline-flex; align-items: center; }

/* ================= ajustes de la crítica de diseño ================= */
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.sub-lbl { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 20px 0 10px; }
.threads + .sub-lbl { margin-top: 22px; }

/* cartel de avisos: en el celular, una línea con sus botones (el de iPhone conserva la explicación) */
@media (max-width: 719px) {
  .banner { padding: 10px 12px; gap: 8px 10px; margin-bottom: 18px; }
  .banner b { font-size: 16px; }
  .banner.ask p { display: none; }
  .banner .btn { min-height: 40px; padding: 8px 12px; }
}

/* estante: lo pendiente es un candado chico dentro de la tapa; el lacre queda para la nota del club */
.owed {
  position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  background: var(--card); color: var(--wine-text); border: 1.5px solid var(--wine-text);
}
.cover .seal { top: -8px; right: -6px; }
.book > b { -webkit-line-clamp: 3; }
@media (max-width: 719px) { .book > span:last-child { display: none; } }
.fab {
  width: auto; height: auto; min-height: 46px; padding: 0 16px; border-radius: 4px;
  background: var(--wine); box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--wine), 0 4px 10px rgba(43, 24, 16, .35);
  font: 500 13px/1 var(--mono); letter-spacing: .04em;
}
.shelf-top { display: flex; flex-wrap: wrap; gap: 0 16px; align-items: flex-start; }
.shelf-top .tabs { flex: 1 1 320px; }
.shelf-top .shelf-search { flex: 1 1 260px; max-width: 480px; }

/* ficha del libro */
.waiting { margin-top: 14px; font-size: 13px; }
.next-owed { align-items: center; }
.next-owed .muted { display: block; min-width: 0; }
.next-owed .muted b { font-weight: 500; color: var(--ink); }

/* pool */
.vote-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; }
.vote { margin-top: 0; }
.vote-n { font-size: 12px; }

/* tier list: ficha sin foto en papel y con letras de máquina, para que no parezca una letra de tier */
.tok { width: 72px; }
.tok-img { width: 66px; height: 66px; }
.tok-img.blank { background: var(--paper); color: var(--ink); }
.tok-img.blank b { font: 500 15px/1 var(--mono); letter-spacing: -.02em; }
.tok-img.big.blank b { font-size: 20px; }
.tok-name { max-width: 72px; letter-spacing: -.02em; overflow-wrap: break-word; }
.tok-slot { height: 66px; }
.tier { min-height: 100px; }

/* hilo: acciones un poco más grandes y "Borrar" separado */
.c-tools { font-size: 13px; gap: 4px 18px; }
.c-del { margin-left: auto; display: inline-flex; gap: 12px; }

/* tarjeta de la juntada */
.ticket-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.ticket-when { margin-left: 0; }
.ticket-tools { align-items: center; flex-wrap: wrap; margin-top: 6px; }
.ticket-btn { color: var(--cream); border: 1.5px solid var(--amber-soft); border-radius: 3px; padding: 6px 10px; font-size: 12px; text-decoration: none; }

/* números */
.gap { font-size: 11px; color: var(--ink-2); text-align: center; flex: none; max-width: 76px; line-height: 1.3; }
.gap b { display: block; font: 600 22px/1 var(--serif); color: var(--wine-text); }

/* recap: la etiqueta ocupa más y se lee mejor */
.r-slide { min-height: min(62dvh, 560px); justify-content: center; }
.r-sub { font-size: 15px; }
.r-kicker { font-size: 12px; }

/* controles del sistema con el aspecto de la app */
input[type="file"]::file-selector-button {
  font: inherit; font-size: 13px; background: var(--card); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 4px;
  padding: 6px 10px; margin-right: 10px; cursor: pointer;
}
input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(to right, var(--wine) var(--fill, 0%), var(--track) var(--fill, 0%)); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%; cursor: grab;
  background: radial-gradient(circle at 34% 30%, #8E2C34, var(--wine) 58%, var(--wine-dark));
  box-shadow: inset 0 0 0 2px var(--wine), inset 0 0 0 3px rgba(232, 184, 120, .8), 0 1px 3px rgba(43, 24, 16, .4);
}
input[type="range"]::-moz-range-track { height: 8px; border-radius: 4px; background: var(--track); }
input[type="range"]::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--wine); }
input[type="range"]::-moz-range-thumb {
  width: 30px; height: 30px; border: 0; border-radius: 50%; cursor: grab;
  background: radial-gradient(circle at 34% 30%, #8E2C34, var(--wine) 58%, var(--wine-dark));
  box-shadow: inset 0 0 0 2px var(--wine), inset 0 0 0 3px rgba(232, 184, 120, .8), 0 1px 3px rgba(43, 24, 16, .4);
}

/* compu: agenda y números en dos columnas */
@media (min-width: 900px) {
  .agenda-grid { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); grid-template-areas: 'cal meet' 'cal best'; gap: 0 48px; align-items: start; grid-template-rows: auto 1fr; }
  .agenda-grid > .ag-cal { grid-area: cal; margin-top: 0; }
  .agenda-grid > .ag-meet { grid-area: meet; }
  .agenda-grid > .ag-best { grid-area: best; }
  .stats-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 48px; align-items: start; margin-top: 28px; }
  .stats-pair > section + section { margin-top: 0; }
  .stats-pair .means { grid-template-columns: 1fr; }
}
.agenda-grid > section + section, .stats-pair > section + section { margin-top: 28px; }
.stats-pair { margin-top: 28px; }
