/* Vintage Anime Club — anime de madrugada: tele de tubo, subtítulos de fansub y cels de acetato */
:root {
  --night: #1E1631;        /* violeta de trasnoche */
  --night-2: #2A2045;      /* paneles */
  --line: #3D2F63;
  --line-2: #5A4790;
  --cel: #F3EEFB;          /* papel / acetato */
  --ink: #ECE6F7;
  --ink-2: #B9AED3;
  --ink-3: #8C80AA;
  --ink-dark: #1E1631;
  --sub: #FFE45C;          /* amarillo de subtítulo de fansub */
  --accent: #FF4F9A;       /* botones */
  --accent-dark: #B8306C;
  --danger: #FF7A7A;
  /* socios: texto/acentos sobre fondo oscuro */
  --u-momo: #6AA8F0; --u-fabio: #F08A5D; --u-eujin: #3CC493; --u-nacho: #E6A93A; --u-demian: #EC7AA5;
  /* socios: marcas de gráficos (validadas sobre --night-2) */
  --m-momo: #3987E5; --m-fabio: #D95926; --m-eujin: #199E70; --m-nacho: #C98500; --m-demian: #D55181;
  /* escala de la planilla (Valores / Meaning) */
  --s-10: #69A64E; --s-9: #7AB046; --s-8: #92B93D; --s-7: #B1C335; --s-6: #CDC32C;
  --s-5: #D7AA24; --s-4: #E18A1B; --s-3: #EB6312; --s-2: #F53509; --s-1: #FF0000;
  --r: 10px;
  --display: 'Dela Gothic One', 'Arial Black', sans-serif;
  --body: 'Zen Maru Gothic', system-ui, sans-serif;
  /* contorno negro tipo subtítulo */
  --outline: 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000, 1.5px 1.5px 0 #000, -1.5px 1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px -1.5px 0 #000;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; color: var(--ink); font: 500 16px/1.6 var(--body);
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.13) 2px 3px),
    radial-gradient(120% 80% at 50% 0%, #2B1F48 0%, var(--night) 60%) fixed,
    var(--night);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--sub); outline-offset: 2px; border-radius: 4px; }
img { display: block; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); font-size: 14px; margin: 0; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  background: rgba(30,22,49,.92); backdrop-filter: blur(8px); border-bottom: 2px solid var(--line);
}
.logo { margin-right: auto; text-decoration: none; }
.logo b { font: 400 clamp(18px, 3.4vw, 26px)/1 var(--display); color: var(--sub); text-shadow: var(--outline); letter-spacing: .5px; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; padding: 7px 13px; border-radius: 999px; font-weight: 700; font-size: 15px; color: var(--ink-2); }
.nav a[aria-current="page"] { background: var(--cel); color: var(--ink-dark); }
.nav a:hover:not([aria-current="page"]) { color: var(--ink); background: var(--night-2); }
.who { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.who .dot { width: 10px; height: 10px; border-radius: 50%; }
.btn-text { background: none; border: 0; color: var(--ink-3); text-decoration: underline; padding: 4px; font-size: 14px; }
#installApp { color: var(--sub); }

main { max-width: 1240px; margin: 0 auto; padding: 24px 16px 96px; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--r); padding: 11px 18px; font-weight: 700; font-size: 15px; line-height: 1;
  background: var(--night-2); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line);
}
.btn:hover { box-shadow: inset 0 0 0 2px var(--line-2); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-dark); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-dark); }
.btn.danger { color: var(--danger); }
.btn[disabled] { opacity: .5; cursor: default; }
.fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 30;
  width: 62px; height: 62px; border-radius: 50%; border: 0; background: var(--accent); color: #fff;
  font: 400 30px/1 var(--display); box-shadow: 0 4px 0 var(--accent-dark), 0 10px 24px rgba(0,0,0,.4);
}

/* ---------- sello (hanko) con el puntaje ---------- */
.stamp {
  --c: var(--ink-3);
  display: inline-grid; place-items: center; align-content: center; text-align: center;
  width: 54px; aspect-ratio: 1; border-radius: 9px; background: var(--c); color: var(--ink-dark);
  box-shadow: inset 0 0 0 3px var(--c), inset 0 0 0 5px rgba(255,255,255,.55), 0 3px 0 rgba(0,0,0,.35);
  transform: rotate(-6deg);
}
.stamp b { font: 400 17px/1 var(--display); }
.stamp i { font: 700 9px/1.1 var(--body); font-style: normal; margin-top: 2px; }
.stamp.lg { width: 108px; border-radius: 16px; box-shadow: inset 0 0 0 5px var(--c), inset 0 0 0 8px rgba(255,255,255,.55), 0 5px 0 rgba(0,0,0,.35); }
.stamp.lg b { font-size: 36px; }
.stamp.lg i { font-size: 14px; margin-top: 4px; }
.stamp.none { --c: transparent; box-shadow: inset 0 0 0 2px var(--ink-3); color: var(--ink-3); }
.stamp.q10 { --c: var(--s-10); } .stamp.q9 { --c: var(--s-9); } .stamp.q8 { --c: var(--s-8); } .stamp.q7 { --c: var(--s-7); }
.stamp.q6 { --c: var(--s-6); } .stamp.q5 { --c: var(--s-5); } .stamp.q4 { --c: var(--s-4); } .stamp.q3 { --c: var(--s-3); }
.stamp.q2 { --c: var(--s-2); } .stamp.q1 { --c: var(--s-1); }

/* ---------- vistos ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 24px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 0; border-radius: 999px; padding: 7px 13px; font-weight: 700; font-size: 15px; line-height: 1; background: var(--night-2); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.chip[aria-pressed="true"] { background: var(--sub); color: var(--ink-dark); box-shadow: none; }
.search { flex: 1 1 200px; min-width: 0; padding: 9px 14px; border-radius: 999px; background: var(--night-2); border: 1.5px solid var(--line); }
.search::placeholder { color: var(--ink-3); }
select.sort { padding: 9px 12px; border-radius: 999px; background: var(--night-2); border: 1.5px solid var(--line); }

.season { margin: 0 0 44px; }
.season-head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 16px; }
.season-head h2 { margin: 0; font: 400 30px/1 var(--display); color: var(--sub); text-shadow: var(--outline); }
.season-head span { font-weight: 700; font-size: 15px; color: var(--ink-3); }
.cels { display: grid; gap: 28px 18px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
@media (max-width: 520px) { .cels { grid-template-columns: repeat(3, 1fr); gap: 22px 10px; } }

.cel { position: relative; display: flex; flex-direction: column; text-decoration: none; }
.cel-art {
  position: relative; aspect-ratio: 2/3; border-radius: 4px; overflow: hidden; background: #140F22;
  box-shadow: 0 0 0 5px rgba(243,238,251,.13), 0 10px 18px rgba(0,0,0,.45);
  margin-top: 14px;
}
.cel-art::before { /* barra con los agujeros de registro del cel */
  content: ''; position: absolute; left: 50%; top: -14px; transform: translateX(-50%); width: 64%; height: 10px; border-radius: 3px 3px 0 0;
  background:
    radial-gradient(circle at 12% 50%, var(--night) 0 3px, transparent 3.5px),
    radial-gradient(ellipse 9px 3.5px at 50% 50%, var(--night) 0 98%, transparent 100%),
    radial-gradient(circle at 88% 50%, var(--night) 0 3px, transparent 3.5px),
    rgba(243,238,251,.22);
}
.cel-art { overflow: visible; }
.cel-art img, .cel-art .blank { border-radius: 4px; }
.cel-art img { width: 100%; height: 100%; object-fit: cover; }
.cel .stamp { position: absolute; top: 2px; right: -8px; z-index: 2; }
.cel-title { margin-top: 10px; font-weight: 700; font-size: 15px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cel-meta { display: flex; justify-content: space-between; gap: 6px; margin-top: 3px; font-size: 13px; color: var(--ink-3); }
.cel .cel-art { transition: transform .18s ease; }
.cel:hover .cel-art { transform: translateY(-3px); }
@media (max-width: 520px) {
  .cel .stamp { width: 40px; right: -5px; } .cel .stamp b { font-size: 13px; } .cel .stamp i { display: none; }
  .cel-title { font-size: 13px; }
}

/* sin portada: tarjeta de título como placa de "eyecatch" */
.blank {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 8px, transparent 8px 16px), linear-gradient(160deg, #4B2C6E, var(--night) 75%);
}
.blank b { font: 400 15px/1.15 var(--display); color: var(--sub); text-shadow: var(--outline); word-break: break-word; }
.blank span { font-size: 12px; color: var(--ink-2); margin-top: 4px; }

/* ---------- próxima juntada ---------- */
.next {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin: 0 0 32px; padding: 16px;
  border-radius: var(--r); background: var(--cel); color: var(--ink-dark); box-shadow: 0 6px 0 var(--line);
}
.next img, .next .mini-blank { width: 64px; aspect-ratio: 2/3; object-fit: cover; border-radius: 3px; background: var(--night); }
.next p { margin: 0; font-weight: 700; font-size: 14px; color: #5E5180; }
.next h3 { margin: 2px 0 0; font: 400 22px/1.15 var(--display); }
.next .btn { background: var(--ink-dark); color: var(--cel); box-shadow: none; }
@media (max-width: 560px) { .next { grid-template-columns: auto 1fr; } .next .btn { grid-column: 1 / -1; } }

/* ---------- ficha ---------- */
.detail { position: relative; }
.backdrop {
  position: absolute; inset: -24px -16px auto; height: 360px; z-index: -1; background-size: cover; background-position: center;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.6), transparent); mask-image: linear-gradient(to bottom, rgba(0,0,0,.6), transparent);
}
.back { display: inline-block; margin-bottom: 18px; font-weight: 700; font-size: 15px; color: var(--ink-2); text-decoration: none; }
.back:hover { color: var(--ink); }
.detail-grid { display: grid; grid-template-columns: 270px 1fr; gap: 36px; align-items: start; }
@media (max-width: 760px) { .detail-grid { grid-template-columns: 1fr; } .detail-cover { max-width: 210px; } }
.detail-cover { position: relative; }
.detail-cover .cel-art { box-shadow: 0 0 0 7px rgba(243,238,251,.13), 0 0 0 8px var(--tint, transparent), 0 18px 32px rgba(0,0,0,.5); }
.detail-cover .stamp { position: absolute; right: -20px; top: -6px; z-index: 2; }
.detail h1 { margin: 0; font: 400 clamp(30px, 5vw, 50px)/1.05 var(--display); color: var(--sub); text-shadow: var(--outline); text-wrap: balance; }
.alt { margin: 6px 0 0; font-size: 18px; color: var(--ink-2); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.fact { padding: 5px 11px; border-radius: 999px; background: var(--night-2); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.overview { max-width: 66ch; margin: 12px 0 0; white-space: pre-line; }
.source { font-size: 13px; color: var(--ink-3); margin-top: 8px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 28px 0 0; }
.card { padding: 14px 16px 16px; border-radius: var(--r); background: var(--cel); color: var(--ink-dark); border-top: 8px solid var(--c, var(--ink-3)); }
.card h3 { margin: 0; font-size: 17px; font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; }
.card h3 small { font-size: 12px; color: #6E6290; }
.card .score { font: 400 38px/1 var(--display); margin: 8px 0 10px; }
.card .score span { font: 700 16px var(--body); color: #6E6290; margin-left: 6px; }
.rubros { display: grid; gap: 5px; }
.rubro { display: grid; grid-template-columns: 74px 1fr 20px; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; color: #4E4370; }
.rubro b { text-align: right; color: var(--ink-dark); }
.meter { height: 8px; border-radius: 4px; background: #DCD3EE; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--c); border-radius: 4px; }
.card .note { margin: 10px 0 0; font-style: italic; color: #3E345E; white-space: pre-wrap; }
.card .hidden-score { font: 400 22px/1.2 var(--display); margin: 10px 0 0; color: #6E6290; letter-spacing: 2px; }
.card p.hint { margin: 6px 0 0; font-size: 14px; color: #5E5180; }

.rate { margin-top: 28px; padding: 20px; border-radius: var(--r); background: var(--night-2); box-shadow: inset 0 0 0 2px var(--line); }
.rate h2 { margin: 0 0 4px; font-size: 21px; font-weight: 700; }
.rate .row { display: grid; grid-template-columns: 90px 1fr 32px; gap: 14px; align-items: center; margin-top: 12px; font-weight: 700; }
.rate .row.total { grid-template-columns: 90px auto; margin-top: 18px; }
.rate input[type=range] { accent-color: var(--accent); height: 28px; }
.rate output { font: 400 20px var(--display); color: var(--sub); text-align: right; }
.rate textarea { width: 100%; min-height: 70px; margin-top: 16px; padding: 10px 12px; border-radius: 8px; resize: vertical; background: var(--night); border: 1.5px solid var(--line); }
.rate .actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.manage { margin-top: 36px; padding-top: 18px; border-top: 2px dashed var(--line); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.manage label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.manage input { padding: 8px 10px; border-radius: 8px; background: var(--night-2); border: 1.5px solid var(--line); }

/* ---------- personajes y voces ---------- */
.voices { margin: 28px 0 0; }
.voices-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.voices-head h2 { margin: 0; font-size: 21px; font-weight: 700; }
.voices-head span { font-weight: 700; font-size: 14px; color: var(--ink-3); }
.voice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px 10px; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.voice { position: relative; }
.voice-btn { width: 100%; border: 0; background: none; padding: 4px 2px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.face { position: relative; width: 74px; height: 74px; flex: none; border-radius: 50%; background: var(--night-2); box-shadow: inset 0 0 0 2px var(--line); display: grid; place-items: center; margin-bottom: 6px; }
.face > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; border-radius: 50%; }
.face .ini { font: 400 20px/1 var(--display); color: var(--ink-3); }
.va-face { position: absolute; left: -4px; bottom: -4px; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px var(--night); background: var(--night-2); }
.va-face img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.voice.known .face { box-shadow: 0 0 0 3px var(--sub); }
.face .count { position: absolute; right: -6px; top: -4px; min-width: 24px; height: 24px; padding: 0 6px; display: grid; place-items: center; border-radius: 7px; background: var(--sub); color: var(--ink-dark); font: 400 13px/1 var(--display); box-shadow: 0 2px 0 rgba(0,0,0,.35); transform: rotate(8deg); }
.who-name { font-weight: 700; font-size: 14px; line-height: 1.15; }
.who-role { font-size: 12.5px; line-height: 1.15; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.voice-pop {
  display: none; position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: 290px; padding: 12px;
  border-radius: var(--r); background: var(--cel); color: var(--ink-dark); box-shadow: 0 6px 0 var(--line), 0 18px 36px rgba(0,0,0,.5);
}
.voice-pop::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
@media (hover: hover) { .voice:hover .voice-pop { display: block; } }
.voice:focus-within .voice-pop { display: block; }
.voice.active .voice-pop { display: none !important; }
.voice.active .voice-btn { background: var(--night-2); }
.voice.active .face { box-shadow: 0 0 0 3px var(--accent); }
.voice-pop p { margin: 0 0 8px; font-weight: 700; font-size: 14px; color: #5E5180; }
.voice-pop p.pop-first { margin: 0; }
.voice-pop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.voice-pop a { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; text-decoration: none; padding: 4px; border-radius: 6px; }
.voice-pop a:hover, .voice-pop a:focus-visible { background: rgba(30,22,49,.08); }
.pop-cover { width: 34px; aspect-ratio: 2/3; border-radius: 2px; overflow: hidden; background: var(--night); }
.pop-cover img { width: 100%; height: 100%; object-fit: cover; }
.pop-title b { display: block; font-size: 14.5px; line-height: 1.15; }
.pop-title small { font-size: 12.5px; color: #6E6290; }
.voice-pop .stamp { width: 36px; border-radius: 7px; transform: rotate(-6deg); }
.voice-pop .stamp b { font-size: 12px; }
.voice-pop .stamp i { display: none; }

.voice-recs { position: relative; margin-top: 18px; padding: 16px; border-radius: var(--r); background: var(--cel); color: var(--ink-dark); box-shadow: 0 6px 0 var(--line); }
.voice-recs::before { content: ''; position: absolute; top: -10px; left: calc(var(--notch, 40px) - 10px); border: 10px solid transparent; border-top: 0; border-bottom-color: var(--cel); }
.recs-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-bottom: 14px; }
.face.sm { width: 44px; height: 44px; margin: 0; box-shadow: 0 0 0 2px var(--accent); }
.recs-head h3 { margin: 0; font: 400 19px/1.2 var(--display); }
.recs-seen { margin: 4px 0 0; font-weight: 700; font-size: 14px; color: #5E5180; }
.recs-close { border: 0; background: none; font: 400 28px/1 var(--body); color: #6E6290; padding: 0 6px; }
.voice-recs .muted { color: #5E5180; }
.recs-grid { display: grid; gap: 16px 12px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.rec { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rec-box { position: relative; aspect-ratio: 2/3; border-radius: 3px; overflow: hidden; background: var(--night); box-shadow: 0 6px 12px rgba(30,22,49,.35); margin-bottom: 6px; }
.rec-box img { width: 100%; height: 100%; object-fit: cover; }
.rec-rating { position: absolute; top: 6px; right: 6px; padding: 3px 7px; border-radius: 999px; background: rgba(30,22,49,.85); color: var(--cel); font-weight: 700; font-size: 12px; line-height: 1; }
.rec-title { font-size: 14.5px; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rec-sub { font-size: 12.5px; line-height: 1.2; color: #6E6290; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rec-add, .rec-tag { margin-top: 6px; align-self: flex-start; border: 0; border-radius: 999px; padding: 6px 10px; font-weight: 700; font-size: 13px; line-height: 1; text-decoration: none; }
.rec-add { background: var(--ink-dark); color: var(--cel); }
.rec-add[disabled] { opacity: .6; }
.rec-tag { background: var(--accent); color: #fff; }
.rec.skeleton .rec-box { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
@media (max-width: 520px) { .recs-grid { grid-template-columns: repeat(3, 1fr); gap: 14px 8px; } }

/* ---------- para ver ---------- */
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font: 400 clamp(28px, 4.5vw, 44px)/1 var(--display); color: var(--sub); text-shadow: var(--outline); }
.page-head p { margin: 8px 0 0; color: var(--ink-2); max-width: 52ch; }
.queue { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.queue li { display: grid; grid-template-columns: 60px 1fr auto; gap: 16px; align-items: center; padding: 10px 12px; border-radius: var(--r); background: var(--night-2); }
.queue li.is-next { box-shadow: inset 0 0 0 3px var(--accent); }
.queue .thumb { width: 60px; aspect-ratio: 2/3; border-radius: 3px; overflow: hidden; background: #140F22; position: relative; }
.queue .thumb img { width: 100%; height: 100%; object-fit: cover; }
.queue h3 { margin: 0; font-size: 18px; line-height: 1.2; }
.queue h3 a { text-decoration: none; }
.queue .sub { font-size: 14px; color: var(--ink-3); }
.queue .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.queue .acts .btn { padding: 8px 12px; font-size: 14px; }
@media (max-width: 620px) { .queue li { grid-template-columns: 50px 1fr; } .queue .thumb { width: 50px; } .queue .acts { grid-column: 1 / -1; justify-content: flex-start; } }

.roulette { margin: 0 0 22px; padding: 16px; border-radius: var(--r); background: var(--night-2); box-shadow: inset 0 0 0 2px var(--line); }
.reel-window {
  position: relative; overflow: hidden; height: 196px; border-radius: 8px; display: flex; align-items: center;
  background: repeating-linear-gradient(to bottom, #1A1330 0 2px, #150F27 2px 4px);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.reel-strip { display: flex; gap: 12px; will-change: transform; }
.reel-item { position: relative; flex: none; width: 104px; aspect-ratio: 2/3; border-radius: 4px; overflow: hidden; background: var(--night); box-shadow: 0 6px 12px rgba(0,0,0,.5); transition: transform .35s cubic-bezier(.3,1.6,.5,1), box-shadow .35s; }
.reel-item img { width: 100%; height: 100%; object-fit: cover; }
.reel-item .blank b { font-size: 12px; }
.reel-item .win-tag { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%) rotate(-6deg) scale(0); padding: 4px 9px; border-radius: 6px; background: var(--sub); color: var(--ink-dark); font: 400 13px/1 var(--display); white-space: nowrap; box-shadow: 0 2px 0 rgba(0,0,0,.35); transition: transform .3s cubic-bezier(.3,1.8,.5,1) .15s; }
.reel-item.win { transform: scale(1.14); box-shadow: 0 0 0 3px var(--sub), 0 12px 26px rgba(0,0,0,.6); z-index: 1; }
.reel-item.win .win-tag { transform: translateX(-50%) rotate(-6deg) scale(1); }
.reel-marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: var(--sub); box-shadow: 0 0 10px var(--sub); z-index: 2; transition: background .3s, box-shadow .3s; }
.reel-marker::before, .reel-marker::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border: 9px solid transparent; }
.reel-marker::before { top: 0; border-top-color: var(--sub); }
.reel-marker::after { bottom: 0; border-bottom-color: var(--sub); }
.reel-window.landed .reel-marker { background: transparent; box-shadow: none; }
.reel-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.reel-result { flex: 1 1 220px; min-height: 32px; font: 400 clamp(18px, 3vw, 24px)/1.2 var(--display); color: var(--sub); text-shadow: var(--outline); }
.reel-result span { font: 700 16px var(--body); color: var(--ink-3); text-shadow: none; }
.reel-result.spinning { color: var(--ink-3); text-shadow: none; }
@media (max-width: 520px) { .reel-window { height: 166px; } .reel-item { width: 86px; } }

/* ---------- números ---------- */
.stats-hero { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; margin-bottom: 34px; }
.stats-hero h1 { margin: 0; font: 400 clamp(28px, 4.5vw, 44px)/1 var(--display); color: var(--sub); text-shadow: var(--outline); }
.stats-hero p { margin: 10px 0 0; color: var(--ink-2); max-width: 58ch; }
.duo { display: flex; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.duo div { font-weight: 700; font-size: 14px; color: var(--ink-2); }
.duo b { display: block; font: 400 28px/1.1 var(--display); }
@media (max-width: 560px) { .stats-hero { grid-template-columns: 1fr; } }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.panel { padding: 18px 18px 20px; border-radius: var(--r); background: var(--night-2); min-width: 0; }
.panel.wide { grid-column: 1 / -1; }
.panel h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.panel > p { margin: 0 0 14px; font-size: 14px; color: var(--ink-3); }
.rubro-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.rubro-card { padding: 14px; border-radius: 8px; background: var(--night); box-shadow: inset 0 0 0 1.5px var(--line); display: grid; gap: 2px; }
.rubro-card span { font-weight: 700; font-size: 14px; color: var(--ink-2); }
.rubro-card b { font: 400 34px/1.1 var(--display); color: var(--sub); text-shadow: var(--outline); }
.rubro-card a { font-size: 14px; color: var(--ink-2); }
.rank { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rank li { counter-increment: r; display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.rank li:last-child { border-bottom: 0; }
.rank li::before { content: counter(r); font: 400 16px/1 var(--display); color: var(--ink-3); }
.rank a { text-decoration: none; font-weight: 700; }
.rank a:hover { text-decoration: underline; }
.rank .v { font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 0 0 10px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; background: var(--c); vertical-align: -1px; }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: 56px 1fr 74px; gap: 10px; align-items: center; font-weight: 700; font-size: 14px; }
.hbar .lab { color: var(--ink-2); }
.hbar .track { height: 16px; position: relative; }
.hbar .fill { position: absolute; inset: 0 auto 0 0; background: var(--cel); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar .val { text-align: right; }
.hbar .val small { color: var(--ink-3); font-weight: 500; }
.cols { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 16px; border-bottom: 1px solid var(--ink-3); }
.col { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; }
.col .b { flex: 1; max-width: 14px; border-radius: 4px 4px 0 0; }
.col-x { display: flex; gap: 6px; margin-top: 6px; }
.col-x span { flex: 1; text-align: center; font-weight: 700; font-size: 13px; color: var(--ink-3); }
.ybars { display: flex; align-items: flex-end; gap: 2px; height: 150px; padding-top: 22px; border-bottom: 1px solid var(--ink-3); }
.yb { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; padding: 0; border: 0; background: none; cursor: default; }
button.yb { cursor: pointer; }
.yb i { position: relative; display: block; width: 100%; background: var(--cel); border-radius: 3px 3px 0 0; min-height: 3px; }
.yb.top i { background: var(--sub); }
.yb.sel i { background: var(--accent); }
.yb em { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 3px; font-weight: 700; font-size: 13px; font-style: normal; line-height: 1; }
.yaxis { position: relative; height: 20px; margin-top: 6px; }
.yaxis span { position: absolute; transform: translateX(-50%); font-weight: 700; font-size: 13px; color: var(--ink-3); }
.year-panel { margin-top: 18px; padding-top: 16px; border-top: 2px dashed var(--line); }
.year-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.year-head h3 { margin: 0; font: 400 22px/1.1 var(--display); color: var(--sub); text-shadow: var(--outline); }
.year-head span { font-weight: 700; font-size: 15px; color: var(--ink-3); flex: 1; }
.year-head .recs-close { color: var(--ink-3); }
.year-cels { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
@media (max-width: 560px) { .yb em { display: none; } .ybars { gap: 1px; } }

#tip { position: fixed; z-index: 100; pointer-events: none; opacity: 0; padding: 6px 9px; border-radius: 6px; background: var(--cel); color: var(--ink-dark); font-weight: 700; font-size: 13px; line-height: 1.3; box-shadow: 0 6px 16px rgba(0,0,0,.4); max-width: 260px; }
#tip.on { opacity: 1; }
#preview { position: fixed; z-index: 100; pointer-events: none; display: none; grid-template-columns: 96px 1fr; gap: 14px; width: 300px; padding: 12px; border-radius: var(--r); background: var(--cel); color: var(--ink-dark); box-shadow: 0 6px 0 var(--line), 0 18px 36px rgba(0,0,0,.5); }
#preview.on { display: grid; }
#preview .pv-cover { position: relative; aspect-ratio: 2/3; border-radius: 3px; overflow: hidden; background: var(--night); }
#preview .pv-cover img { width: 100%; height: 100%; object-fit: cover; }
#preview .blank b { font-size: 12px; }
#preview .pv-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#preview .pv-info b { font: 400 16px/1.2 var(--display); margin-bottom: 2px; }
#preview .pv-info span { font-weight: 700; font-size: 13px; color: #5E5180; }
#preview .pv-score { margin-top: auto; padding-top: 6px; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); }
.login-card { width: min(460px, 100%); text-align: center; }
.kicker { margin: 0 0 10px; font-weight: 700; letter-spacing: 3px; color: var(--ink-3); }
.login h1 { margin: 0; font: 400 clamp(36px, 10vw, 58px)/1 var(--display); color: var(--sub); text-shadow: var(--outline), 5px 5px 0 var(--accent); }
.login .sub { margin: 18px 0 26px; color: var(--ink-2); }
.members { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.member { flex: 1 1 140px; max-width: 200px; border: 0; padding: 16px 14px; border-radius: var(--r); background: var(--cel); color: var(--ink-dark); border-left: 8px solid var(--c); font: 400 22px/1 var(--display); text-align: left; }
.member[aria-pressed="true"] { outline: 3px solid var(--c); outline-offset: 3px; }
.login form { margin-top: 18px; display: grid; gap: 12px; }
.login input[type=password] { padding: 13px 14px; border-radius: var(--r); background: var(--night-2); border: 2px solid var(--line); text-align: center; font-size: 18px; }
.err { color: var(--danger); font-weight: 700; min-height: 1.5em; margin: 0; }
.guest-link { display: inline-block; margin-top: 22px; font-size: 15px; }

/* ---------- modal ---------- */
dialog { width: min(620px, calc(100% - 24px)); max-height: calc(100dvh - 40px); padding: 0; border: 0; border-radius: 14px; background: var(--night); color: var(--ink); box-shadow: 0 0 0 2px var(--line), 0 30px 60px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(14,10,26,.72); backdrop-filter: blur(3px); }
.dlg { padding: 20px; display: grid; gap: 14px; }
.dlg h2 { margin: 0; font: 400 24px/1 var(--display); color: var(--sub); text-shadow: var(--outline); }
.dlg .seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--night-2); border-radius: 999px; padding: 4px; }
.dlg .seg button { border: 0; background: none; padding: 9px; border-radius: 999px; font-weight: 700; font-size: 15px; line-height: 1; color: var(--ink-2); }
.dlg .seg button[aria-pressed="true"] { background: var(--cel); color: var(--ink-dark); }
.dlg input[type=text], .dlg input[type=search], .dlg input[type=number], .dlg input[type=date] { width: 100%; padding: 11px 13px; border-radius: 10px; background: var(--night-2); border: 1.5px solid var(--line); }
.dlg .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dlg label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.results { display: grid; gap: 6px; max-height: 300px; overflow: auto; margin: 0; padding: 0; list-style: none; }
.results button { width: 100%; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; text-align: left; padding: 6px; border: 0; border-radius: 8px; background: var(--night-2); }
.results button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.results img, .results .ph { width: 40px; aspect-ratio: 2/3; object-fit: cover; border-radius: 2px; background: #140F22; }
.results b { display: block; font-size: 15px; line-height: 1.2; }
.results span { font-size: 13px; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dlg .foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 200%); z-index: 90; visibility: hidden; padding: 11px 18px; border-radius: 999px; background: var(--cel); color: var(--ink-dark); font-weight: 700; font-size: 15px; box-shadow: 0 10px 24px rgba(0,0,0,.45); transition: transform .25s ease, visibility 0s .25s; max-width: calc(100% - 32px); }
#toast.on { transform: translate(-50%, 0); visibility: visible; transition: transform .25s ease; }

.empty { padding: 40px 16px; text-align: center; color: var(--ink-2); }
.empty b { display: block; font: 400 22px/1.2 var(--display); color: var(--sub); text-shadow: var(--outline); margin-bottom: 6px; }

@media (display-mode: standalone) { body { overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
