/* =====================================================================
   Reglas del servidor (/server.php) — v22.20, diseño «Portal».
   Contenido principal (modo, horarios en línea de tiempo y un bloque por grupo de ajustes) + columna lateral con la hora y el estado
   del raideo y un índice de la página. Familia «placa Exiles» (DESIGN.md §27). Adaptativo por contenedor (@container sobre .rv).
   Las cifras van en la fuente de lectura (Marcellus dibuja el 0 como «O» y el 1 como «I»). Sin style="" (CSP): la línea de tiempo
   es un <svg> con atributos.
   ===================================================================== */
.rv { container: rv / inline-size; max-width: 1320px; margin: 0 auto; padding-bottom: 2.5rem; }
.rv-head h1 { margin: 0; font: 400 calc(var(--fs-h1) * .85)/1.2 var(--font-title); letter-spacing: .03em; -webkit-text-stroke: .03em currentColor; text-transform: uppercase; color: var(--text-strong); }
.rv-rule { display: flex; align-items: center; gap: .7rem; margin: .8rem 0 1rem; max-width: 22rem; }
.rv-rule::before, .rv-rule::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border-accent)); }
.rv-rule::after { transform: scaleX(-1); }
.rv-rule i { flex: none; width: 9px; height: 9px; rotate: 45deg; background: var(--accent); }
.rv-lead { margin: 0; max-width: 66ch; color: var(--muted); }
.rv-lead strong { color: var(--text); }
.rv-hint { margin: .5rem 0 0; font-size: var(--fs-sm); color: var(--muted); }

/* Placa con esquinas doradas y tarjeta con pestaña dorada (la firma de la familia) */
.rv-plate { position: relative; background: linear-gradient(180deg, rgba(38, 29, 21, .96), rgba(22, 16, 12, .98)); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 233, 200, .06); }
.rv-plate::before, .rv-plate::after { content: ''; position: absolute; width: 18px; height: 18px; border: 2px solid var(--border-accent); pointer-events: none; }
.rv-plate::before { top: 7px; left: 7px; border-right: 0; border-bottom: 0; }
.rv-plate::after { bottom: 7px; right: 7px; border-left: 0; border-top: 0; }
.rv-card { position: relative; padding: 1.4rem 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.rv-tab::before { content: ''; position: absolute; left: 1.2rem; top: -1px; width: 54px; height: 3px; background: var(--accent); }
.rv-h { margin: 0 0 .85rem; font: 400 var(--fs-h3)/1.2 var(--font-display); color: var(--text-strong); }
.rv-d { margin: 0 0 1rem; max-width: 70ch; font-size: var(--fs-sm); color: var(--muted); }
.rv-note { margin: 0 0 .5rem; font-size: var(--fs-sm); color: var(--muted); }
.rv-note strong { color: var(--text-strong); }
.rv-empty-t { margin: 0; }
.rv-note.rv-empty-n { margin: .6rem 0 0; }

/* Cuerpo: principal + lateral */
.rv-body { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1.4rem; margin-top: 1.4rem; align-items: start; }
.rv-main { display: grid; gap: 1.3rem; min-width: 0; }
.rv-aside { display: grid; gap: 1.2rem; position: sticky; top: 4.2rem; min-width: 0; }

/* Modo de juego */
.rv-mode { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.rv-mode p { margin: 0; color: var(--text); }

/* Ajustes: etiqueta · puntos guía · valor. Lo que cambia respecto al juego base (×N ≠ 1) va en dorado y los ×1 se atenúan */
.rv-dl { margin: 0; display: grid; }
.rv-row { display: flex; align-items: baseline; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid rgba(74, 58, 46, .45); }
.rv-row dt { flex: 0 1 auto; max-width: 68%; color: var(--text); }
.rv-row i { flex: 1; min-width: .6rem; border-bottom: 1px dotted var(--border-strong); translate: 0 -.25em; }
.rv-row dd { margin: 0; flex: none; font-weight: 700; color: var(--text-strong); text-align: right; font-variant-numeric: lining-nums; }
.rv-row dd.is-no { color: var(--muted); font-weight: 600; }
.rv-row dd.is-same { color: var(--muted); font-weight: 600; }
.rv-row dd.is-diff { color: var(--accent-hover); }

/* Horarios: 7 días × 24 h. Dos pistas por día (PvP arriba, raideo abajo) y una línea con la hora actual del servidor */
.rv-tl { position: relative; display: grid; gap: .35rem; }
.rv-day { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr) minmax(0, 15rem); gap: .8rem; align-items: center; padding: .3rem 0; }
.rv-dname { font-weight: 700; color: var(--text); }
.rv-day.is-today .rv-dname { color: var(--accent-hover); }
.rv-dname em { display: inline-block; margin-left: .35rem; font-style: normal; font-size: var(--fs-2xs); font-weight: 700; color: var(--accent); }
.rv-tracks { display: grid; gap: 3px; }
.rv-tr { display: block; width: 100%; height: 9px; border-radius: 5px; background: var(--surface-3); }
.rv-tr .p { fill: var(--accent); }
.rv-tr .r { fill: var(--tone-red); }
.rv-tr .t { fill: rgba(255, 255, 255, .06); }
.rv-txt { font-size: var(--fs-sm); line-height: 1.35; color: var(--muted); font-variant-numeric: lining-nums; }
.rv-txt b { color: var(--text-strong); font-weight: 600; }
.rv-txt .me { display: block; font-size: var(--fs-xs); color: var(--accent-hover); }
.rv-axis { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr) minmax(0, 15rem); gap: .8rem; font-size: var(--fs-2xs); color: var(--muted-dark); }
.rv-axis div { display: flex; justify-content: space-between; }
.rv-now { position: absolute; top: 0; bottom: 0; left: calc(5.2rem + .8rem); right: calc(15rem + .8rem); pointer-events: none; }
.rv-now svg { display: block; width: 100%; height: 100%; }
.rv-now line { stroke: var(--text-strong); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.rv-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: .9rem 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--muted); }
.rv-legend li::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: .4rem; border-radius: 2px; background: var(--k); }
.rv-legend .p { --k: var(--accent); }
.rv-legend .r { --k: var(--tone-red); }
.rv-legend .n { --k: var(--text-strong); }

/* Lateral */
.rv-clock { display: grid; gap: .5rem; padding: 1.3rem 1.4rem; }
.rv-clock .rv-h { margin: 0; }
.rv-status { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; color: #bfe3b2; }
.rv-ember { position: relative; flex: none; width: 11px; height: 11px; border-radius: 50%; background: #ff9d3c; }
.rv-ember::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: rgba(255, 157, 60, .55); animation: rv-ember 2.4s ease-out infinite; }
@keyframes rv-ember { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(2.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rv-ember::after { animation: none; } }
.rv-clock time { font-weight: 700; font-size: 1.5rem; line-height: 1.1; color: var(--text-strong); font-variant-numeric: lining-nums tabular-nums; }
.rv-clock .me { font-size: 1.15rem; color: var(--accent-hover); }
.rv-clock small { font-size: var(--fs-xs); color: var(--muted); }
.rv-clock small strong { color: var(--text-strong); }
.rv-raid { display: grid; gap: .35rem; justify-items: start; margin-top: .3rem; }
.rv-idx { display: grid; gap: .1rem; margin: 0; padding: 0; list-style: none; }
.rv-idx a:not(.btn) { display: flex; justify-content: space-between; gap: .6rem; padding: .5rem .7rem; border-radius: var(--radius-sm); color: var(--muted); font-size: var(--fs-sm); text-decoration: none; }
.rv-idx a:not(.btn):hover, .rv-idx a:not(.btn):focus-visible { background: rgba(255, 255, 255, .05); color: var(--text-strong); }
.rv-idx a:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: -2px; }
.rv-idx small { color: var(--muted-dark); }
.rv-empty { padding: 1.6rem 1.5rem; }
.rv-foot { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.rv-links { margin: 1.4rem 0 0; font-size: var(--fs-sm); color: var(--muted); }

/* ====================== Adaptativo por contenedor ====================== */
@container rv (max-width: 1000px) {
  .rv-body { grid-template-columns: 1fr; }
  .rv-aside { position: static; order: -1; }
  .rv-idx { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
}
@container rv (max-width: 760px) {
  .rv-day { grid-template-columns: 4.4rem minmax(0, 1fr); row-gap: .2rem; }
  .rv-day .rv-txt { grid-column: 1 / -1; padding-left: 5.2rem; }
  .rv-axis { grid-template-columns: 4.4rem minmax(0, 1fr); }
  .rv-axis div:last-child { display: none; }
  .rv-now { left: calc(4.4rem + .8rem); right: 0; }
  .rv-row dt { max-width: 62%; }
}
@container rv (max-width: 520px) {
  .rv-card { padding: 1.15rem 1.1rem; }
  .rv-day .rv-txt { padding-left: 0; }
}
