/* Estilos de las vistas interiores (plano/cómic). Solo variables de tokens.css; clases propias con prefijo p- / a-. */
.p-page { width: min(1200px, 100%); margin: 0 auto; padding: 16px 0 48px; display: grid; gap: 24px; }
.p-head { display: grid; gap: 8px; justify-items: start; }
.p-head h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem); color: var(--text);
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill;
  text-shadow: 5px 5px 0 var(--amber-lo), 7px 7px 0 var(--ink);
}
.p-head .script { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.05; text-shadow: 2px 2px 0 var(--ink); }
.p-head p { max-width: 62ch; line-height: 1.6; }
.p-note { font-size: .8rem; }

/* Premios */
.p-prize { display: grid; gap: 12px; align-content: start; }
.p-prize-art { aspect-ratio: 16 / 10; border-radius: var(--r-md); display: grid; place-items: center; overflow: hidden;
  background: var(--halftone), linear-gradient(160deg, var(--rock) 0 35%, #241d15 35%); border: 2.5px solid var(--ink); }
.p-prize-art img { width: 100%; height: 100%; object-fit: cover; }
.p-prize-art img.is-rata { width: 46%; height: auto; aspect-ratio: 1; border-radius: 50%; object-position: 62% 30%; border: 3px solid var(--ink); box-shadow: 0 0 0 3px var(--amber), 4px 4px 0 3px var(--ink); }
.p-prize h2, .p-mission h2, .p-clip h2, .p-step h2 { font: 800 1.05rem var(--font-display); }
.p-page p a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--amber); color: var(--text); }
.p-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Clips */
.p-clip { display: grid; gap: 10px; padding: 14px; transition: transform .15s; }
.p-clip:hover { transform: translate(-2px, -2px); }
.p-thumb { display: grid; place-items: center; }
.p-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.p-thumb .chip { position: absolute; right: 10px; bottom: 10px; }

/* Ranking */
.p-podium { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); align-items: end; }
.p-podium .card { text-align: center; display: grid; gap: 6px; justify-items: center; }
.p-podium .p-first { padding-block: 34px; }
.p-podium .p-first::before { background: var(--halftone), linear-gradient(155deg, var(--rock) 0 34%, #2a2219 34%); }
.p-medal { font: 400 2.4rem var(--font-display); color: var(--amber); text-shadow: 3px 3px 0 var(--ink); }
.p-table { width: 100%; border-collapse: collapse; }
.p-table th { text-align: left; font: 800 .65rem var(--font-body); letter-spacing: .15em; text-transform: uppercase; color: var(--muted); padding: 0 12px 10px; }
.p-table td { padding: 12px; border-top: 2px solid var(--ink); }
.p-table tbody tr:nth-child(odd) td { background: rgba(0, 0, 0, .18); }
.p-table td:first-child { font-family: var(--font-display); color: var(--amber); width: 3.5rem; }
.p-table td:last-child, .p-table th:last-child { text-align: right; }

/* Directo */
.p-live { display: grid; gap: 24px; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); }
.p-player { padding: 12px; }
.p-player iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 2.5px solid var(--ink); border-radius: var(--r-md); background: var(--panel-lo); }
.p-side { display: grid; gap: 18px; align-content: start; }
.p-side .btn { width: 100%; }

/* Misiones */
.p-mission { display: grid; gap: 12px; align-content: start; }
.p-mission p { line-height: 1.5; }

/* Apoyos */
.p-support { display: grid; gap: 12px; align-content: start; }
.p-support .display { text-shadow: 3px 3px 0 var(--amber-lo); }
.p-support .btn { justify-self: start; }

/* Info: pasos, FAQ */
.p-steps { counter-reset: p-step; }
.p-step { display: grid; gap: 8px; align-content: start; }
.p-step > h2::before { counter-increment: p-step; content: counter(p-step, decimal-leading-zero); display: block; margin-bottom: 8px; font: 400 2.2rem var(--font-display); color: var(--amber); text-shadow: 3px 3px 0 var(--ink); }
.p-faq details { border-top: 2px solid var(--ink); padding: 14px 0; }
.p-faq details:first-of-type { border-top: 0; }
.p-faq summary { cursor: pointer; font-weight: 800; list-style-position: outside; }
.p-faq summary::marker { color: var(--amber); }
.p-faq details p { margin-top: 10px; line-height: 1.6; }

/* Texto largo (privacidad) */
.p-prose { max-width: 75ch; display: grid; gap: 14px; line-height: 1.7; }
.p-prose h2 { font: 800 1.1rem var(--font-display); color: var(--amber); margin-top: 8px; }
.p-prose a { color: var(--amber-hi); text-decoration: underline; }

/* Estados vacío / cargando / error con la rata (imagen sin filtros) */
.p-state { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 28px 16px; border-radius: var(--r-md);
  background: var(--halftone); border: 2.5px dashed var(--rock-hi); }
.p-state img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; object-position: 62% 30%; margin-bottom: 8px;
  border: 3px solid var(--ink); box-shadow: 0 0 0 3px var(--amber), 4px 4px 0 3px var(--ink); }
.p-state-title { font: 800 1.05rem var(--font-body); }
.p-state .muted { max-width: 44ch; line-height: 1.5; font-size: .9rem; }
.p-state .btn, .p-state-actions { margin-top: 8px; }
.p-state-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.p-state-loading img { animation: p-bob 1.2s ease-in-out infinite; }
.p-state-loading .p-state-title { color: var(--muted); font-weight: 600; }
.p-state-error { border-color: var(--danger); }
.p-state-error img { box-shadow: 0 0 0 3px var(--danger), 4px 4px 0 3px var(--ink); }
.p-state-error .p-state-title { color: var(--danger); }
.p-state-locked img { box-shadow: 0 0 0 3px var(--rock-hi), 4px 4px 0 3px var(--ink); }
@keyframes p-bob { 50% { transform: translateY(-6px); } }
.bento .p-state { padding: 16px 10px; }
.bento .p-state img { width: 60px; height: 60px; }

/* Formularios */
.p-form { display: grid; gap: 14px; align-content: start; }
.p-form label { display: grid; gap: 6px; font: 800 .7rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.p-form input:not([type="checkbox"]), .p-form select, .p-form textarea {
  font: 400 .95rem var(--font-body); color: var(--text); text-transform: none; letter-spacing: 0;
  padding: 10px 14px; border: 2.5px solid var(--edge); border-radius: 13px; background: var(--panel-lo); box-shadow: 3px 3px 0 var(--ink); width: 100%; }
.p-form input::placeholder, .p-form textarea::placeholder { color: #8c8678; }
.p-form input:focus-visible, .p-form select:focus-visible, .p-form textarea:focus-visible { outline: 3px solid var(--cyan); outline-offset: 1px; border-color: var(--ink); }
.p-form select option { background: var(--bg-2); }
.p-form .p-check { display: flex; align-items: center; gap: 8px; color: var(--text); }
.p-form .p-check input { width: 18px; height: 18px; accent-color: var(--amber); }
.p-form .btn { justify-self: start; }
.p-form .btn:disabled { opacity: .6; cursor: wait; transform: none; }
.p-form-msg { min-height: 1.2em; font-size: .85rem; font-weight: 600; color: var(--amber-hi); }
.p-form-msg:empty { display: none; }
.p-form-card .p-form { max-width: 560px; }
.p-form-card > .muted { margin-bottom: 4px; }
.p-form-card .p-state-actions { justify-content: flex-start; }

/* Datos reales: avatar, mes, recompensa */
.p-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: 62% 30%; border: 2px solid var(--ink); box-shadow: 0 0 0 2px var(--amber-lo); }
.p-podium .p-avatar { width: 56px; height: 56px; border-width: 3px; box-shadow: 0 0 0 3px var(--amber); }
.p-who { display: inline-flex; align-items: center; gap: 10px; }
.p-month { display: inline-flex; align-items: center; gap: 10px; font: 800 .7rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.p-month input { font: 600 .9rem var(--font-body); color: var(--text); color-scheme: dark; padding: 7px 12px; border: 2.5px solid var(--edge); border-radius: var(--r-pill); background: var(--panel-lo); box-shadow: 3px 3px 0 var(--ink); }
.p-reward { display: flex; align-items: baseline; gap: 10px; font-weight: 800; flex-wrap: wrap; }
.p-reward .card-title { margin: 0; }

/* Perfil */
.p-profile { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.p-profile-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: 62% 30%; border: 3px solid var(--ink); box-shadow: 0 0 0 3px var(--amber), 5px 5px 0 3px var(--ink); }
.p-profile-info { display: grid; gap: 10px; flex: 1 1 200px; min-width: 0; }
.p-profile-info h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); overflow-wrap: anywhere; text-shadow: 3px 3px 0 var(--amber-lo); }
.p-profile-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Admin */
.a-grid { display: grid; gap: 24px; }
.a-section .card-title { margin-bottom: 16px; }
.a-cols { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
.a-form-title { font-weight: 800; color: var(--amber-hi); }
.a-rows { list-style: none; padding: 0; display: grid; gap: 10px; }
.a-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--r-md);
  background: var(--panel-lo); border: 2.5px solid var(--ink); }
.a-row > span:first-child { display: grid; gap: 2px; min-width: 0; flex: 1 1 200px; }
.a-row small { font-size: .78rem; overflow-wrap: anywhere; }
.a-row small a { color: var(--amber-hi); text-decoration: underline; }
.a-row.is-off { opacity: .6; }
.a-actions { display: flex; gap: 8px; }
.a-actions .btn { padding: 7px 14px; font-size: .68rem; }
.btn.a-danger { color: var(--danger); }
.a-inline { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.a-inline .p-form-msg { grid-column: 1 / -1; }

.p-page a:focus-visible, .p-page summary:focus-visible, .p-page button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

@media (max-width: 860px) {
  .p-live { grid-template-columns: 1fr; }
  .p-podium { grid-template-columns: 1fr; }
  .p-podium .p-first { order: -1; }
  .p-table th:nth-child(3), .p-table td:nth-child(3) { display: none; }
  .a-cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .p-clip:hover { transform: none; } }
