/* Los tokens de marca (assets/brand/be1play-tokens.css) ya definen la paleta,
   los temas claro/oscuro, la tipografia y los focos. Aqui solo se ajustan los
   detalles propios del shell. */

:root {
  --pad: 14px;
  --gap: 10px;
}

/* Negro puro (OLED): sin superficies elevadas ni degradados de fondo. */
html[data-skin="black"] {
  --b1-bg: #000000;
  --b1-surface: #0a0a0a;
  --b1-surface-raised: #111d3b;
  --b1-border: #263a60;
  --b1-text: #ffffff;
  --b1-text-muted: #b5c9e8;
  --b1-action: #06dcf2;
  --b1-focus: #ffe16e;
  --b1-shadow: none;
  color-scheme: dark;
}

/* Cristal: vidrio claro. Superficies blancas translucidas sobre un fondo suave. */
html[data-skin="glass"] {
  --b1-bg: #eef3fb;
  --b1-surface: rgba(255, 255, 255, 0.62);
  --b1-surface-raised: #edf4ff;
  --b1-border: rgba(255, 255, 255, 0.9);
  --b1-text: #101b39;
  --b1-text-muted: #475676;
  --b1-action: #075eca;
  --b1-focus: #4c3eff;
  color-scheme: light;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: radial-gradient(120% 64% at 50% 0%, var(--b1-surface) 0%, var(--b1-bg) 58%);
  color: var(--b1-text);
  font-family: var(--b1-font);
  font-size: 14.5px;
  line-height: 1.35;
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

img {
  -webkit-user-drag: none;
}

/* Iconos de la biblioteca de marca: heredan el color del contexto. */
[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

[data-icon] svg {
  display: block;
}

/* `hidden` debe ganar a los display de los componentes (drawer, scrim, toast). */
[hidden] {
  display: none !important;
}

/* splash ------------------------------------------------------------------ */

.splash {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  background: radial-gradient(120% 70% at 50% 20%, #111d3b 0%, var(--b1-bg) 70%);
  background-color: var(--b1-bg);
  z-index: 50;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

.splash.hide {
  opacity: 0;
  visibility: hidden;
}

.splash-logo {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.42));
}

.splash-name {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--b1-text);
}

.splash-tag {
  margin: 0;
  color: var(--b1-text-muted);
  letter-spacing: 3px;
  font-size: 10px;
  text-transform: uppercase;
}

.splash-bar {
  margin-top: 12px;
  width: 124px;
  height: 3px;
  border-radius: 999px;
  background: var(--b1-border);
  overflow: hidden;
}

.splash-bar i {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: var(--b1-brand-gradient);
  animation: slide 1.1s ease-in-out infinite;
}

@keyframes slide {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(340%);
  }
}

/* layout ------------------------------------------------------------------ */

.shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: env(safe-area-inset-top);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px var(--pad) 7px;
}

/* El banner es el unico canal de mensajes: aviso a todo el ancho bajo la marca. */
.topbar .notice {
  flex: 1 0 100%;
  margin: 5px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar .notice .btn.small {
  margin-left: auto;
}

/* Objetivo tactil minimo 44x44 (la guia pide 44 minimo, 48 recomendado). */
.icon-btn {
  width: var(--b1-touch-min);
  height: var(--b1-touch-min);
  display: grid;
  place-items: center;
  border-radius: var(--b1-radius-md);
  border: 1px solid var(--b1-border);
  background: var(--b1-surface);
  color: var(--b1-text);
  line-height: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.brand-logo {
  width: 34px;
  height: 34px;
  display: block;
}

.brand strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.brand small {
  color: var(--b1-text-muted);
  font-size: 10.5px;
}

.avatar {
  width: var(--b1-touch-min);
  height: var(--b1-touch-min);
  border-radius: 50%;
  border: 1px solid var(--b1-border);
  background: var(--b1-surface);
  color: var(--b1-text);
  font-weight: 600;
  font-size: 13px;
  display: grid;
  place-items: center;
}

.view {
  flex: 1;
  overflow-y: auto;
  padding: 2px var(--pad) 14px;
  -webkit-overflow-scrolling: touch;
}

/* menu lateral ------------------------------------------------------------ */

.scrim {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  z-index: 30;
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 288px;
  max-width: 84vw;
  z-index: 31;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: calc(14px + env(safe-area-inset-top)) 12px 14px;
  background: var(--b1-surface);
  border-right: 1px solid var(--b1-border);
  box-shadow: 24px 0 60px rgba(0, 0, 0, 0.35);
  overflow-y: auto;
}

.drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px 10px;
  border-bottom: 1px solid var(--b1-border);
}

.drawer-head > div {
  min-width: 0;
}

/* Acceso y cierre de sesion a la derecha del lockup, nunca al pie del menu. */
.drawer-head #drawer-session {
  margin-left: auto;
  flex: 0 0 auto;
}

.drawer-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--b1-radius-sm);
}

.drawer-head strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.drawer-head small {
  color: var(--b1-text-muted);
  font-size: 10.5px;
}

.drawer-nav {
  display: grid;
  gap: 2px;
}

.drawer-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--b1-touch-min);
  padding: 9px 10px;
  border: 0;
  border-radius: var(--b1-radius-sm);
  background: none;
  text-align: left;
  font-size: 13.5px;
  font-weight: 500;
}

.drawer-nav button span {
  width: 22px;
  display: inline-flex;
  justify-content: center;
  color: var(--b1-text-muted);
}

.drawer-nav button:hover,
.drawer-nav button[aria-current="page"] {
  background: color-mix(in srgb, var(--b1-action) 14%, transparent);
  color: var(--b1-text);
}

.drawer-nav button[aria-current="page"] span {
  color: var(--accent-ink);
}

.drawer-sep {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--b1-text-muted);
  padding: 0 6px;
}

.drawer-apps {
  display: grid;
  gap: 2px;
}

.drawer-app {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px;
  border: 0;
  border-radius: var(--b1-radius-sm);
  background: none;
  text-align: left;
  font-size: 13px;
}

.drawer-app:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.drawer-app .mini {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 800;
}

.drawer-app small {
  margin-left: auto;
  color: var(--b1-text-muted);
  font-size: 10px;
}

.drawer-foot {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--b1-border);
}

.drawer-foot small {
  color: var(--b1-text-muted);
  font-size: 10px;
  text-align: center;
}

/* segmented + secciones --------------------------------------------------- */

.segmented {
  display: flex;
  gap: 4px;
  padding: 3px;
  margin: 4px 0 10px;
  border-radius: 999px;
  background: var(--b1-surface);
  border: 1px solid var(--b1-border);
}

.segmented button {
  flex: 1;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--b1-text-muted);
  font-size: 12.5px;
  font-weight: 600;
}

.segmented button[aria-current="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 10px 2px 7px;
}

.section-head h2 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--b1-text-muted);
  font-weight: 600;
}

.section-head small {
  color: var(--b1-text-muted);
  font-size: 10.5px;
}

/* tarjetas con portada ---------------------------------------------------- */

.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  text-align: left;
  border-radius: var(--b1-radius-md);
  border: 1px solid var(--b1-border);
  background: var(--b1-surface);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.card.sortable {
  cursor: grab;
}

.card:active {
  transform: scale(0.988);
}

.card.editing {
  outline: 3px solid var(--b1-focus);
  outline-offset: 1px;
}

.card.dragging {
  z-index: 20;
  cursor: grabbing;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.4);
  opacity: 0.97;
  will-change: transform;
}

.card-remove {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 26px;
  height: 26px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
  z-index: 3;
  cursor: pointer;
}

.card.editing .card-remove {
  display: grid;
}

body.dragging-app {
  -webkit-user-select: none;
  user-select: none;
  cursor: grabbing;
}

.card-cover {
  position: relative;
  height: 82px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 16% 8%, color-mix(in srgb, var(--card-accent) 52%, transparent), transparent 62%),
    linear-gradient(150deg, color-mix(in srgb, var(--card-accent) 26%, #111d3b), #030b1f 78%);
}

html[data-skin="light"] .card-cover {
  background:
    radial-gradient(120% 90% at 16% 8%, color-mix(in srgb, var(--card-accent) 46%, transparent), transparent 62%),
    linear-gradient(150deg, color-mix(in srgb, var(--card-accent) 22%, #ffffff), #f5f8ff 80%);
}

.card-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-cover .cover-glyph {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -1px;
  color: color-mix(in srgb, var(--card-accent) 68%, #ffffff);
}

.card-cover .cover-ring {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--card-accent) 55%, transparent);
}

.card-cover .badge {
  position: absolute;
  top: 7px;
  right: 7px;
  background: color-mix(in srgb, var(--b1-bg) 76%, transparent);
  border-color: color-mix(in srgb, var(--b1-border) 70%, transparent);
  backdrop-filter: blur(6px);
}

.card-body {
  display: grid;
  gap: 3px;
  padding: 8px 10px 9px;
}

.card-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.card-line h3 {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.2;
}

.card-action {
  color: var(--accent-ink);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.card-body p {
  margin: 0;
  color: var(--b1-text-muted);
  font-size: 11.5px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card.locked {
  opacity: 0.78;
}

.card.locked .card-action {
  color: var(--b1-text-muted);
}

.badge {
  border-radius: 999px;
  border: 1px solid var(--b1-border);
  padding: 1px 7px;
  font-size: 9px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge.installed {
  color: var(--accent-ink);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.badge.locked {
  color: #e0b95f;
  border-color: color-mix(in srgb, #e0b95f 42%, transparent);
}

.badge.available {
  color: var(--b1-text);
}

.empty {
  padding: 16px;
  border-radius: var(--b1-radius-md);
  border: 1px dashed var(--b1-border);
  color: var(--b1-text-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.hint {
  color: var(--b1-text-muted);
  font-size: 11.5px;
  line-height: 1.45;
  margin: 10px 2px 0;
}

/* botones y formularios --------------------------------------------------- */

.btn {
  border-radius: var(--b1-radius-sm);
  border: 1px solid var(--b1-border);
  background: var(--b1-surface);
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn.ghost {
  background: transparent;
}

.btn.danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, var(--b1-border));
}

.btn.small {
  padding: 6px 10px;
  font-size: 11.5px;
}

.btn.block {
  display: block;
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.panel {
  border-radius: var(--b1-radius-md);
  border: 1px solid var(--b1-border);
  background: var(--b1-surface);
  padding: 12px;
  margin-top: 10px;
}

.panel h2 {
  margin: 0 0 8px;
  font-size: 13.5px;
}

.panel .logo-md {
  width: 46px;
  height: 46px;
  display: block;
  margin: 2px auto 8px;
}

/* --- entrada de be1play (pantalla de Cuenta sin sesion) ------------------- */

/* Movil: una columna. El arte abre la pagina y va completo (3:2, sin recorte). */
.entry__art {
  margin: 0 calc(var(--pad) * -1);
  overflow: hidden;
  line-height: 0;
}

.entry__img,
.entry__banner {
  display: block;
  width: 100%;
  height: auto;
}

.entry__img {
  aspect-ratio: 3 / 2;
}

/* El banner solo tiene sentido como panel lateral de escritorio. */
.entry__banner {
  display: none;
}

.entry__brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.entry__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* --- bandas de la entrada: ecosistema y universos ------------------------- */

.band {
  --band-pad: var(--pad);
  min-width: 0;
  margin: 16px calc(var(--band-pad) * -1) 0;
  padding: 0 var(--band-pad);
}

.band__head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin: 0 0 8px;
}

.band__title {
  margin: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--b1-text);
}

.band__rule {
  flex: 0 1 48px;
  min-width: 14px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.band__sub {
  margin: 0;
  overflow: hidden;
  font-size: 10px;
  color: var(--b1-text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* En pantallas estrechas el subtitulo se corta: mejor dejarlo fuera. */
@media (max-width: 560px) {
  .band__sub {
    display: none;
  }
}

/* --- carrusel del ecosistema --------------------------------------------- */

.eco-rail {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 84%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 84%, transparent);
}

.eco-rail__track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: eco-scroll 54s linear infinite;
}

/* Se detiene al interactuar para poder mirar una tarjeta. */
.eco-rail:hover .eco-rail__track,
.eco-rail:focus-within .eco-rail__track {
  animation-play-state: paused;
}

@keyframes eco-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-50% - 5px));
  }
}

/* `height: auto` deja mandar al aspect-ratio sobre el atributo del <img>. */
.eco-card {
  flex: 0 0 auto;
  width: 272px;
  height: auto;
  aspect-ratio: 320 / 184;
  border-radius: 14px;
  border: 1px solid var(--b1-border);
  background: var(--b1-surface);
}

/* --- universos de juego --------------------------------------------------- */

.uni-rail {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  /* Se corta a la derecha porque hay mas: el degradado lo dice sin romperlo. */
  mask-image: linear-gradient(90deg, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
}

.uni-rail::-webkit-scrollbar {
  display: none;
}

.uni-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.uni-card {
  display: block;
  width: 176px;
  height: auto;
  aspect-ratio: 352 / 247;
  border-radius: 12px;
  border: 1px solid var(--b1-border);
  background: var(--b1-surface);
}

@media (prefers-reduced-motion: reduce) {
  .eco-rail {
    overflow-x: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .eco-rail__track {
    animation: none;
  }
}

/* Cajas del acceso: mas aire y objetivos tactiles de la guia (48). */
.panel--auth {
  padding: 16px 14px;
  margin-top: 12px;
}

.panel--auth h2 {
  font-size: 15.5px;
}

.panel--auth .logo-md {
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
}

.panel--auth .field {
  margin-bottom: 11px;
}

.panel--auth .field input {
  min-height: var(--b1-touch-comfort);
  font-size: 14.5px;
}

.panel--auth .btn {
  min-height: var(--b1-touch-min);
  padding: 10px 16px;
  font-size: 13.5px;
}

@media (min-width: 720px) {
  .entry__art {
    margin: 6px 0 0;
    border-radius: var(--b1-radius-lg);
    border: 1px solid var(--b1-border);
    box-shadow: var(--b1-shadow);
  }

  .entry__img {
    aspect-ratio: 3 / 2;
  }

  .panel--auth {
    padding: 18px 22px;
    margin-top: 12px;
  }

  .panel--auth h2 {
    font-size: 17px;
  }

  .panel--auth .logo-md {
    width: 62px;
    height: 62px;
  }
}

/* --- acceso de escritorio: formulario | banner ---------------------------- */

@media (min-width: 900px) {
  /* La entrada ocupa la ventana: la columna del shell no aplica aqui. */
  .shell:has(> .view > .entry) {
    max-width: none;
    border-left: 0;
    border-right: 0;
  }

  /* Una pagina de acceso no lleva la barra superior. */
  .shell:has(> .view > .entry) .topbar {
    display: none;
  }

  .view:has(> .entry) {
    padding: 0;
  }

  .entry {
    --band-pad: clamp(20px, 2.6vw, 44px);
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    min-height: 100%;
  }

  /* Columna izquierda: el banner de marca y, debajo, el ecosistema y los
     universos; el conjunto va centrado en la columna. */
  .entry__brand {
    grid-area: 1 / 1;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 2.4vh, 30px);
    overflow: hidden;
    padding: clamp(16px, 2.4vh, 40px) var(--band-pad);
    border-right: 1px solid var(--b1-border);
    background:
      radial-gradient(
        90% 60% at 50% 6%,
        color-mix(in srgb, var(--accent) 12%, transparent),
        transparent 70%
      ),
      linear-gradient(180deg, var(--b1-surface), var(--b1-bg) 62%);
  }

  /* Las bandas acompanan al banner, con su mismo ancho y centradas con el. */
  .entry__strips {
    flex: 0 1 auto;
    align-content: start;
    display: grid;
    gap: clamp(12px, 1.8vh, 20px);
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
  }

  .entry__panel .panel--auth {
    margin-top: 0;
  }

  .entry .band {
    margin-inline: 0;
    padding-inline: 0;
  }

  .entry .band:first-of-type {
    margin-top: 0;
  }

  .entry .band:last-of-type {
    margin-top: clamp(12px, 1.8vh, 20px);
  }

  /* El banner abre la columna como tarjeta, entero y sin recortar. */
  .entry__art {
    grid-area: auto;
    flex: 0 0 auto;
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
    line-height: 0;
    border: 1px solid var(--b1-border);
    border-radius: var(--b1-radius-lg);
    box-shadow: var(--b1-shadow);
  }

  .entry__img {
    display: none;
  }

  .entry__banner {
    display: block;
    width: 100%;
    height: auto;
  }

  /* Columna derecha: el acceso, centrado. */
  .entry__main {
    grid-area: 1 / 2;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 2vh, 24px);
    padding: clamp(16px, 2.6vh, 44px) var(--band-pad);
  }

  .entry__panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 460px;
  }
}

/* Portatiles bajos: las bandas se comprimen para no dejar la columna a medias. */
@media (min-width: 900px) and (max-height: 960px) {
  .entry .eco-card {
    width: 224px;
  }

  .entry .uni-card {
    width: 148px;
  }
}

/* --- entrada en movil: compacta y sin universos --------------------------- */
/* En el telefono manda caber: la banda de universos no se pinta, el arte se
   recorta a una franja y las cajas del acceso van a lo justo para que el
   formulario entre sin desplazar la pagina. */

@media (max-width: 899px) {
  .entry .band--uni {
    display: none;
  }

  .entry__brand {
    gap: 8px;
  }

  .entry__img {
    height: clamp(120px, 33vw, 164px);
    object-fit: cover;
    object-position: center 40%;
  }

  .entry .band {
    margin-top: 8px;
  }

  .entry .band__head {
    margin-bottom: 5px;
  }

  .entry .band__title {
    font-size: 9.5px;
  }

  .entry .eco-card {
    width: 152px;
    border-radius: 12px;
  }

  .entry__main {
    gap: 7px;
  }

  .entry .panel--auth {
    margin-top: 0;
    padding: 11px 12px 12px;
  }

  .entry .panel--auth .logo-md {
    width: 34px;
    height: 34px;
    margin: 0 auto 3px;
  }

  .entry .panel--auth h2 {
    margin-bottom: 2px;
    font-size: 13px;
  }

  .entry .panel--auth .hint {
    margin: 0 0 6px;
    font-size: 10.5px;
    line-height: 1.35;
  }

  .entry .panel--auth .field {
    gap: 3px;
    margin-bottom: 5px;
  }

  .entry .panel--auth .field label {
    font-size: 10px;
  }

  .entry .panel--auth .field input {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 14px;
  }

  .entry .panel--auth .btn {
    min-height: 38px;
    padding: 7px 14px;
    font-size: 12.5px;
  }

  .entry__panel > .hint {
    margin: 0;
    font-size: 10px;
    line-height: 1.3;
  }
}

/* Telefonos bajos (<= 760 px de alto): el arte y las tarjetas del ecosistema se
   recortan mas para que el acceso entero siga a la vista. */
@media (max-width: 899px) and (max-height: 760px) {
  .entry__img {
    height: 84px;
  }

  .entry .eco-card {
    width: 124px;
  }

  .entry .band {
    margin-top: 6px;
  }

  .entry .panel--auth .logo-md {
    width: 28px;
    height: 28px;
  }

  .entry .panel--auth .field input {
    min-height: 34px;
  }

  .entry .panel--auth .btn {
    min-height: 36px;
  }
}

.field {
  display: grid;
  gap: 4px;
  margin-bottom: 9px;
}

.field label {
  font-size: 11px;
  color: var(--b1-text-muted);
  letter-spacing: 0.3px;
}

.field input,
.field select {
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--b1-radius-sm);
  border: 1px solid var(--b1-border);
  background: color-mix(in srgb, var(--b1-bg) 70%, var(--b1-surface));
  color: var(--b1-text);
  font: inherit;
  font-size: 13px;
}

.field input:focus,
.field select:focus {
  outline: 3px solid var(--b1-focus);
  outline-offset: 2px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--b1-border) 60%, transparent);
}

.row:last-child {
  border-bottom: 0;
}

.row strong {
  font-size: 12.5px;
}

.row small {
  display: block;
  color: var(--b1-text-muted);
  font-size: 10.5px;
  margin-top: 1px;
}

.kv {
  font-size: 11px;
  color: var(--b1-text-muted);
  word-break: break-all;
  line-height: 1.45;
  margin: 6px 0 0;
}

/* apariencia -------------------------------------------------------------- */

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 8px;
}

.swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
}

.swatch[aria-current="true"] {
  border-color: var(--b1-text);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent);
}

/* feedback ---------------------------------------------------------------- */

.notice {
  margin: 2px var(--pad) 0;
  padding: 8px 11px;
  border-radius: var(--b1-radius-sm);
  background: color-mix(in srgb, #e0b95f 14%, transparent);
  border: 1px solid color-mix(in srgb, #e0b95f 38%, transparent);
  color: color-mix(in srgb, #e0b95f 70%, var(--b1-text));
  font-size: 11.5px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%);
  max-width: calc(100% - 28px);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--b1-surface);
  border: 1px solid var(--b1-border);
  font-size: 11.5px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
  z-index: 40;
}

.toast.error {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--b1-border));
  color: var(--danger);
}

/* --- variantes de skin --------------------------------------------------- */

html[data-skin="black"] body,
html[data-skin="black"] .splash {
  background: #000;
}

html[data-skin="black"] .card-cover {
  background: linear-gradient(150deg, color-mix(in srgb, var(--card-accent) 16%, #000), #060606 82%);
}

html[data-skin="black"] .drawer {
  background: #050505;
}

html[data-skin="black"] .panel,
html[data-skin="black"] .card {
  box-shadow: none;
}

html[data-skin="glass"] body {
  background:
    radial-gradient(70% 52% at 8% 0%, color-mix(in srgb, var(--accent) 26%, #ffffff), transparent 60%),
    radial-gradient(58% 44% at 92% 6%, #d7e6ff, transparent 58%),
    radial-gradient(90% 60% at 50% 104%, #f0e7ff, transparent 64%),
    linear-gradient(180deg, #fafcfe, #e7eef6 72%);
  background-attachment: fixed;
}

html[data-skin="glass"] .splash {
  background: linear-gradient(180deg, #fafcfe, #e7eef6 72%);
}

html[data-skin="glass"] .card,
html[data-skin="glass"] .panel,
html[data-skin="glass"] .segmented,
html[data-skin="glass"] .drawer,
html[data-skin="glass"] .notice,
html[data-skin="glass"] .toast,
html[data-skin="glass"] .icon-btn,
html[data-skin="glass"] .avatar,
html[data-skin="glass"] .field input,
html[data-skin="glass"] .field select {
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-color: var(--b1-border);
  box-shadow: 0 10px 26px rgba(23, 53, 77, 0.1);
}

html[data-skin="glass"] .field input,
html[data-skin="glass"] .field select {
  background: rgba(255, 255, 255, 0.78);
  color: var(--b1-text);
}

html[data-skin="glass"] .card-cover {
  background:
    radial-gradient(120% 90% at 16% 8%, color-mix(in srgb, var(--card-accent) 30%, transparent), transparent 62%),
    linear-gradient(150deg, color-mix(in srgb, var(--card-accent) 20%, #ffffff), #f2f7fb 80%);
}

html[data-skin="glass"] .card-cover .cover-glyph {
  color: color-mix(in srgb, var(--card-accent) 62%, #0e2230);
}

html[data-skin="glass"] .card-cover .badge {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.95);
  color: var(--b1-text);
}

html[data-skin="glass"] .drawer {
  background: rgba(255, 255, 255, 0.66);
  border-right-color: rgba(255, 255, 255, 0.9);
  box-shadow: 24px 0 60px rgba(23, 53, 77, 0.16);
}

html[data-skin="glass"] .drawer-nav button[aria-current="page"] {
  background: color-mix(in srgb, var(--accent) 18%, rgba(255, 255, 255, 0.5));
}

@media (min-width: 720px) {
  .shell {
    max-width: 760px;
    margin: 0 auto;
    border-left: 1px solid var(--b1-border);
    border-right: 1px solid var(--b1-border);
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

