/* 4.47 · Acabado visual.
   Se carga la última en todas las páginas. Solo cambia el aspecto (tarjetas, cabecera,
   botones, menús y barra inferior) usando los colores de cada tema; no quita funciones.
   Cada color mezclado lleva antes un valor simple por si el WebView es antiguo. */

:root {
  --a-r: calc(var(--t-radius, 12px) + 4px);
  --a-r-sm: calc(var(--t-radius, 12px) + 0px);
  --a-line: var(--t-edge, #527181);
  --a-tint: var(--t-raised, #193b4e);
  --a-shadow: 0 1px 0 #ffffff0d inset, 0 6px 18px #00000038;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root {
    --a-line: color-mix(in srgb, var(--t-edge, #527181) 60%, transparent);
    --a-tint: color-mix(in srgb, var(--t-accent, #e9c46a) 16%, transparent);
  }
}
:root[data-liga-theme='prensa'],
:root[data-liga-theme='arena'] {
  --a-shadow: 0 1px 2px #17364a14, 0 6px 16px #17364a12;
}
:root[data-liga-theme='pizarra'] {
  --a-shadow: none;
}

body {
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h2,
h3 {
  letter-spacing: -0.01em;
}

/* Pulsación: respuesta inmediata al tocar */
button,
.pill,
.private-tile,
nav.bottom445 a,
.nav button,
a.guest445,
a.update446-get {
  transition:
    transform 0.08s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}
button:active:not(:disabled),
.private-tile:active,
nav.bottom445 a:active,
.nav button:active {
  transform: scale(0.97);
}

/* ---------- Zona privada: cabecera tipo aplicación ---------- */
body[data-page='acceso_seguro'] main > header {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 0 12px;
  margin: 0 0 10px;
  padding: 12px 14px;
  text-align: left;
  background: var(--t-hero, var(--t-surface, #10283b));
  border: 1px solid var(--a-line);
  border-radius: var(--a-r);
  box-shadow: var(--a-shadow);
}
body[data-page='acceso_seguro'] main > header::before {
  content: '';
  grid-row: 1 / span 2;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: url('../icono.jpg') center / cover;
  box-shadow: 0 3px 10px #0005;
}
body[data-page='acceso_seguro'] main > header h1 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0.02em;
}
body[data-page='acceso_seguro'] main > header p {
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  font-size: 13px;
  color: var(--t-muted, #b9cbd8);
}
body[data-page='acceso_seguro'] #liveStatus428 {
  display: inline-block;
  float: left;
  max-width: 58%;
  margin: 6px 0 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--t-raised, #193b4e);
  color: var(--t-muted, #b9cbd8);
  font-size: 12px;
}
body[data-page='acceso_seguro'] .theme-bar433 {
  float: right;
  margin: 0 0 6px 8px;
}
body[data-page='acceso_seguro'] .theme-bar433 button {
  min-height: 34px;
  padding: 4px 12px;
  font-size: 13px;
  border-radius: 999px;
}
body[data-page='acceso_seguro'] .private-toolbar {
  clear: both;
  margin-top: 0;
}
body[data-page='acceso_seguro'] main > header + * {
  margin-top: 0;
}

/* Mensajes de estado: abajo, como en las apps de Android, sin tapar la cabecera */
body[data-page='acceso_seguro'] #status {
  top: auto;
  bottom: calc(18px + env(safe-area-inset-bottom));
}
body.has-bottom445[data-page='acceso_seguro'] #status {
  bottom: calc(86px + env(safe-area-inset-bottom));
}

/* ---------- Tarjetas ---------- */
body[data-page='acceso_seguro'] main > section,
body[data-page='acceso_seguro'] .private-page,
body[data-page='acceso_seguro'] #profilesRoot427 > section {
  border-radius: var(--a-r);
  border-color: var(--a-line);
  box-shadow: var(--a-shadow);
}
.role,
.home444-item,
.update446,
.teamcode446,
.join446 {
  border-radius: var(--a-r-sm);
}
#dashboard > h2 {
  margin-bottom: 10px;
}

/* Avisos pendientes: tarjeta compacta */
#alerts428 details {
  border-radius: var(--a-r-sm);
}

/* Rol con el que entras: etiqueta */
.rolebar445 p {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--a-tint);
  border: 1px solid var(--a-line);
  font-size: 15px;
}

/* ---------- Funciones principales del rol: tarjetas con icono ---------- */
#roleMain445 .main445 {
  gap: 10px !important;
}
html body #roleMain445 .nav-tile434 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 108px;
  padding: 14px;
  text-align: left;
  background: linear-gradient(160deg, var(--t-raised, #193b4e), var(--t-surface, #10283b));
  border: 1px solid var(--a-line);
  border-radius: var(--a-r);
  box-shadow: var(--a-shadow);
  color: var(--t-text, #f5f1e8);
}
html body #roleMain445 .nav-tile434 span:first-child {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--a-tint);
  font-size: 24px;
  line-height: 1;
}
html body #roleMain445 .nav-tile434 span:nth-child(2) {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.25;
}

/* ---------- Más funciones: lista con flecha ---------- */
h3.more445 {
  margin: 22px 2px 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
}
html body #dashboard > nav.private-menu {
  display: block;
  margin-top: 0;
  overflow: hidden;
  background: var(--t-surface, #10283b);
  border: 1px solid var(--a-line);
  border-radius: var(--a-r);
  box-shadow: var(--a-shadow);
}
html body #dashboard > nav.private-menu .private-tile {
  display: grid;
  grid-template-columns: 40px 1fr 18px;
  grid-auto-rows: auto;
  align-items: center;
  justify-items: start;
  column-gap: 12px;
  row-gap: 0;
  width: 100%;
  min-height: 62px;
  margin: 0;
  padding: 10px 14px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--a-line);
  border-radius: 0;
  box-shadow: none;
  color: var(--t-text, #f5f1e8);
}
html body #dashboard > nav.private-menu .private-tile:last-child {
  border-bottom: 0;
}
html body #dashboard > nav.private-menu .private-tile::after {
  content: '›';
  grid-column: 3;
  grid-row: 1 / span 2;
  font-size: 24px;
  line-height: 1;
  color: var(--t-muted, #b9cbd8);
}
html body #dashboard > nav.private-menu .private-tile span:first-child {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--a-tint);
  font-size: 20px;
}
html body #dashboard > nav.private-menu .private-tile span:nth-child(2) {
  grid-column: 2;
  font-size: 16px;
  font-weight: 700;
}
html body #dashboard > nav.private-menu .private-tile small {
  grid-column: 2;
  font-size: 13px;
  color: var(--t-muted, #b9cbd8);
}

/* ---------- Respuestas Voy / No voy / Duda con color ---------- */
.poll441-btn {
  border-radius: 999px;
  border-width: 1.5px;
  font-weight: 700;
}
.poll441-btn[data-answer='yes'][aria-pressed='true'] {
  background: #1f8a4c;
  border-color: #1f8a4c;
  color: #fff;
}
.poll441-btn[data-answer='no'][aria-pressed='true'] {
  background: #b3362f;
  border-color: #b3362f;
  color: #fff;
}
.home444-item {
  box-shadow: var(--a-shadow);
}

/* ---------- Acceso ---------- */
.welcome445 img {
  border-radius: 24px;
}
#login #signup,
#login #recover {
  width: calc(50% - 6px);
  margin-right: 0;
}
#login #signup {
  margin-right: 8px;
}
a.guest445 {
  border-style: solid;
  border-color: var(--a-line);
  background: var(--a-tint);
}

/* ---------- Barras inferiores (liga y zona privada) ---------- */
nav.bottom445,
.nav {
  border-top: 1px solid var(--a-line) !important;
  box-shadow: 0 -8px 24px #0000004d !important;
}
@supports ((-webkit-backdrop-filter: blur(4px)) or (backdrop-filter: blur(4px))) {
  @supports (color: color-mix(in srgb, red 50%, blue)) {
    nav.bottom445,
    .nav {
      background: color-mix(in srgb, var(--t-nav, #091c32) 88%, transparent) !important;
      -webkit-backdrop-filter: blur(12px);
      backdrop-filter: blur(12px);
    }
  }
}
nav.bottom445 a,
.nav button {
  background: transparent !important;
  font-size: 11.5px;
}
nav.bottom445 a .nav-icon,
.nav button .nav-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  filter: none !important;
}
nav.bottom445 a.active .nav-icon,
.nav button.active .nav-icon {
  background: var(--a-tint);
  box-shadow: 0 0 0 1px var(--a-line) inset;
}
nav.bottom445 a.active,
.nav button.active {
  color: var(--t-accent, #ffd46c) !important;
  font-weight: 800;
}

/* ---------- Liga pública ---------- */
.tabs {
  border-radius: 999px !important;
  overflow: hidden;
  padding: 4px !important;
}
.tabs button {
  border-radius: 999px !important;
}
#content > section,
#content > .card,
#content .card {
  border-radius: var(--a-r);
}

/* Ajustes finos */
main .poll441 .poll441-btn {
  margin: 0;
}
#login #signup,
#login #recover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: top;
  height: 52px;
  line-height: 1.15;
}

/* Tema Prensa: funciones principales en lista, con el icono a la izquierda */
html:root[data-liga-theme='prensa'] body #roleMain445 .nav-tile434 {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-height: 68px;
  padding: 10px 14px;
}

main .poll441 .poll441-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 6px;
  white-space: nowrap;
  font-size: 15px;
}

/* 4.53 · Jugador del partido en Mi cuenta */
.mvp453-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}
.mvp453-card:first-of-type {
  border-top: 0;
}
.mvp453-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.mvp453-list button {
  flex: 1 1 140px;
  min-height: 44px;
  margin: 0;
}
.mvp453-title,
.mvp453-when {
  display: block;
}
.mvp453-title {
  font-size: 1.05em;
}

/* 4.55 · Portada más sencilla: frase bajo cada botón, guía y ajustes, «Más funciones» plegable */
#roleMain445 .main445 .private-tile small {
  display: block;
  margin-top: 2px;
  font-size: 0.8em;
  font-weight: 500;
  line-height: 1.25;
  opacity: 0.8;
}
.main455-title {
  margin: 14px 0 8px;
}
.help455 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 4px;
}
.help455 button {
  min-height: 48px;
  margin: 0;
}
button.more455 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  margin: 14px 0 8px;
  padding: 0 14px;
  border-radius: 12px;
  background: transparent;
  border: 1px dashed color-mix(in srgb, currentColor 35%, transparent);
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
}
button.more455::after {
  content: '▾';
  transition: transform 0.2s;
}
button.more455[aria-expanded='true']::after {
  transform: rotate(180deg);
}
.pushhint455 {
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--t-accent, #e9c46a);
  background: color-mix(in srgb, var(--t-accent, #e9c46a) 12%, transparent);
}
.pushhint455 p {
  margin: 0 0 10px;
}
.pushhint455 div {
  display: flex;
  gap: 8px;
}
.pushhint455 button {
  flex: 1;
  min-height: 44px;
  margin: 0;
}
/* Guía */
.guide455-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}
.guide455-tabs button {
  margin: 0;
  min-height: 40px;
  padding: 6px 12px;
}
.guide455-task {
  margin: 0 0 8px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}
.guide455-task summary {
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
}
.guide455-task ol {
  margin: 0;
  padding: 0 16px 12px 34px;
  line-height: 1.45;
}
.guide455-task li {
  margin-bottom: 6px;
}
.guide455-again {
  margin-top: 8px;
}
/* Bienvenida */
dialog.welcome455 {
  width: min(400px, calc(100vw - 32px));
  padding: 24px 20px 18px;
  border: 0;
  border-radius: 22px;
  background: var(--t-surface, #10283b);
  color: var(--t-text, #f5f1e8);
  text-align: center;
  box-shadow: 0 20px 60px #0009;
}
dialog.welcome455::backdrop {
  background: #000a;
}
.welcome455-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 8px;
}
dialog.welcome455 h2 {
  margin: 8px 0;
}
dialog.welcome455 p {
  margin: 0 0 16px;
  line-height: 1.45;
}
.welcome455-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}
.welcome455-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
}
.welcome455-dots span.on {
  opacity: 1;
  width: 22px;
  border-radius: 4px;
}
.welcome455-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.welcome455-actions button {
  margin: 0;
  min-height: 48px;
}

/* 4.56 · Entrar con huella (Ajustes) */
.lock456 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}
.lock456 p {
  margin: 0;
  font-weight: 700;
}
.lock456 button {
  align-self: flex-start;
  min-height: 46px;
  margin: 4px 0 0;
}

/* 4.60 · Ajustes en tarjetas, elegir avisos y «Tengo un problema» */
#accountDetails434 .card460 {
  margin: 14px 0;
  padding: 14px 14px 16px;
  border: 1px solid var(--t-edge, rgba(127, 127, 127, 0.4));
  border-radius: var(--t-radius, 12px);
  background: var(--t-raised, rgba(127, 127, 127, 0.08));
  color: var(--t-text, inherit);
}
#accountDetails434 .card460[hidden] {
  display: none;
}
#accountDetails434 .card460 > h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
#accountDetails434 .card460 button {
  display: block;
  margin: 8px 0 0;
  min-height: 46px;
}
#accountDetails434 .card460 #pushRoot433 {
  margin-top: 0;
}
#accountDetails434 .card460 #pushRoot433 > p {
  margin: 0;
  font-weight: 700;
}
#accountDetails434 .card460 #pushRoot433 small,
#accountDetails434 .card460 > small {
  display: block;
  margin-top: 6px;
  line-height: 1.4;
}
#accountDetails434 .card460 .lock456 {
  margin: 0;
}
.prefs460-title {
  margin: 16px 0 6px;
  font-weight: 700;
}
.prefs460-list {
  display: grid;
  gap: 2px;
}
.pref460 {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 6px 0;
  border-top: 1px solid var(--t-edge, rgba(127, 127, 127, 0.3));
  cursor: pointer;
}
.pref460 input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--t-accent, #e9c46a);
}
.pref460 span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pref460 small,
.prefs460-note,
.prefs460-status {
  display: block;
  opacity: 0.85;
  line-height: 1.35;
}
.prefs460-note {
  margin-top: 8px;
}
.problem460 label {
  display: block;
  margin-top: 10px;
  font-weight: 700;
}
.problem460 textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  font: inherit;
}
.problem460 small,
.problem460-status {
  display: block;
  margin-top: 6px;
  line-height: 1.4;
}
.problem460-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
#accountDetails434 .problem460-row button {
  margin-top: 10px;
}
