/* diseno-ignorar-archivo: SD2 K4 -- el lima es el color del logo; la franja lateral es el ítem activo del menú móvil, no una tarjeta */
:root {
    --bg: #0a0a0b;
    --panel: #131315;
    --panel-hover: #1a1a1d;
    --border: #26262a;
    --border-strong: #34343a;
    --text: #ededef;
    --muted: #8b8b93;
    /* Acento sólo en: botón principal, ítem activo del nav, etiqueta EXCLUSIVE y foco de inputs */
    --accent: #c6f36b;
    --accent-hover: color-mix(in srgb, var(--accent) 85%, #fff);
    --accent-ink: #0f1405; /* texto sobre fondo de acento */
    /* Etiquetas de plan: sólo EXCLUSIVE lleva el acento */
    --tier-basic: var(--muted);
    --tier-pro: var(--text);
    --tier-exclusive: var(--accent);
    /* Ancho y margen lateral del contenido (barra superior y .page) */
    --page-width: 1160px;
    --page-pad: 24px;
    /* Alto de la barra superior fija: los saltos a #result / #tools no quedan tapados */
    --topbar-h: 57px;
    /* Satoshi para títulos e interfaz; JetBrains Mono sólo para datos y etiquetas técnicas */
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
    --font-body: "Satoshi", system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* Reserva siempre el hueco de la barra de scroll: sin esto, en las páginas cortas
   (sin barra) todo el contenido centrado se desplaza unos px respecto a las largas.
   color-scheme: barras de scroll y controles nativos en oscuro. scroll-padding-top: la
   barra fija no tapa los saltos a anclas ni el elemento con foco al tabular hacia arriba */
html { scrollbar-gutter: stable; color-scheme: dark; scroll-padding-top: calc(var(--topbar-h) + 16px); }
/* Sin el retardo de doble toque en móvil */
a, button, summary, select, input, label { touch-action: manipulation; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
    /* Red de seguridad: un anuncio automático con ancho fijo no saca barra horizontal
       (clip y no hidden: no crea contenedor de scroll y la barra superior sigue sticky) */
    overflow-x: clip;
}

a { color: inherit; }

/* Barra superior: fondo y borde a todo el ancho; el contenido con el mismo ancho y
   padding que .page (--page-width / --page-pad) para que el logo quede alineado */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    /* Ancla del panel móvil, que como popover va en la capa superior, fuera de la barra */
    anchor-name: --topbar;
}
.topbar-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 14px var(--page-pad);
}
.topbar .brand { display: flex; flex-shrink: 0; font-weight: 700; font-size: 18px; text-decoration: none; }
.topbar .brand img { display: block; width: auto; height: 28px; }
.topbar-menu { display: flex; flex: 1; align-items: center; gap: 20px; min-width: 0; }

/* Navegación principal: las secciones a la izquierda; Planes y Discord (.nav-aside) a la
   derecha, junto a la cuenta */
.main-nav { display: flex; flex: 1; align-items: center; gap: 18px; min-width: 0; font: 500 14px/1.4 var(--font-body); }
/* El primero de los de la derecha (el que sigue a una sección) empuja el grupo */
.main-nav a:not(.nav-aside) + .nav-aside { margin-left: auto; }
.main-nav a {
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.main-nav a:hover { color: var(--text); }
.main-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

/* Enlace "Saltar al contenido": fuera de la vista hasta que recibe el foco con el teclado */
.skip-link {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 40;
    padding: 8px 14px;
    background: var(--text);
    border-radius: 4px;
    color: var(--bg);
    font: 600 14px/1.4 var(--font-body);
    text-decoration: none;
    transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }
#main-start:focus { outline: none; }

/* Cuenta */
.topbar-account { display: flex; align-items: center; gap: 16px; margin-left: 8px; font: 500 14px/1.4 var(--font-body); }
.topbar-link { color: var(--muted); text-decoration: none; white-space: nowrap; transition: color .15s; }
.topbar-link:hover { color: var(--text); }
.topbar-link[aria-current="page"] { color: var(--text); }
.topbar .btn { padding: 7px 14px; border-radius: 4px; font: 600 13px/1.4 var(--font-body); white-space: nowrap; }
.user-menu { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-toggle {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 280px;
    padding: 5px 8px;
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--text);
    font: inherit;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    anchor-name: --user-toggle;
}
.user-toggle:hover, .user-toggle[aria-expanded="true"] { background: var(--panel-hover); border-color: var(--border); }
.user-toggle:disabled { cursor: default; }
/* En la página de la cuenta, el usuario hace de enlace activo (como "tools" / "pricing") */
.user-toggle.is-current { border-color: var(--border); }
.user-toggle.is-current .user-name { color: var(--text); }
.user-name { overflow: hidden; font-family: var(--font-mono); min-width: 0; text-overflow: ellipsis; white-space: nowrap; }
.user-toggle { gap: 10px; }
.user-caret { color: var(--muted); font-size: 11px; transition: transform .15s; }
.user-toggle[aria-expanded="true"] .user-caret { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) {
    .user-caret { transition: none; }
}
/* Lista del usuario. Sin popover (sin JS o navegador antiguo), absoluta bajo su botón */
.user-menu-list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    min-width: 210px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 5px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
    color: var(--text);
}
/* Cerrada en escritorio: con popover la oculta el navegador; sin él, falta la clase .is-open */
@media (min-width: 768px) {
    .user-menu-list:not([popover]):not(.is-open) { display: none; }
}
/* Como popover va a la capa superior: bajo su botón, alineada a su borde derecho, con
   anclas (sin ellas, el script la coloca). height: auto, para que Safari no la estire */
.user-menu-list[popover] {
    position: fixed;
    inset: auto;
    height: auto;
    margin: 8px 0 0;
    overflow: visible;
    position-anchor: --user-toggle;
    position-area: block-end span-inline-start;
    position-try-fallbacks: flip-block;
}
.user-menu-list a, .user-menu-list button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    background: none;
    border: 0;
    border-radius: 3px;
    color: var(--text);
    font: 500 13px/1.4 var(--font-body);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.user-menu-list a:hover, .user-menu-list button:hover { background: var(--panel-hover); }
.user-menu-list a[aria-current="page"] { color: var(--text); font-weight: 700; }
.user-menu-list :focus-visible { outline-offset: -2px; }
/* Idioma dentro del menú de cuenta */
.user-menu-lang { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 4px 6px 10px; color: var(--muted); font: 500 13px/1.4 var(--font-body); }
/* El enlace del idioma con la letra del selector, no la de los enlaces del menú: si no, EN y
   ES cambian de letra (y de altura) según cuál esté activo */
.user-menu-lang .lang-switch a { display: inline; width: auto; padding: 4px 6px; font: inherit; }
.user-menu-lang .lang-switch a:hover { background: none; }
.user-menu-logout { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.user-menu-logout form { margin: 0; }
.user-menu-logout button { color: var(--muted); }
.user-menu-logout button:hover { color: var(--text); }

/* Idioma: discreto (sin caja), para no competir con "Registrarse"; el activo en blanco */
.lang-switch {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    font: 500 12px/1.4 var(--font-mono);
    letter-spacing: .04em;
}
.lang-switch a, .lang-switch span {
    padding: 4px 6px;
    border-radius: 3px;
    text-decoration: none;
}
.lang-switch .lang-sep { padding: 0 2px; color: var(--border-strong); }
.lang-switch a { color: var(--muted); transition: color .15s; }
.lang-switch a:hover { color: var(--text); }
.lang-switch .active { color: var(--text); }

/* Botón del panel móvil: ≡ decorativo y el texto "Menú" visible (su nombre accesible) */
.menu-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    height: 36px;
    margin-left: auto;
    padding: 0 12px 0 10px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font: 500 14px/1 var(--font-body);
    cursor: pointer;
}
.menu-toggle-icon { font: 700 22px/1 var(--font-mono); }
.menu-toggle:hover, .menu-toggle[aria-expanded="true"] { border-color: var(--border-strong); }

/* Alto contraste (Windows): los colores se sustituyen, así que la página actual se marca con
   un subrayado de texto en vez del borde lima, y el idioma activo igual */
@media (forced-colors: active) {
    .main-nav a { border-bottom: 0; }
    .main-nav a[aria-current="page"] { text-decoration: underline 2px; text-underline-offset: 6px; }
    .lang-switch .active { text-decoration: underline; text-underline-offset: 3px; }
}

/* Selector de idioma suelto (sin sesión): en escritorio sólo el selector */
.topbar-lang { display: contents; }

@media (max-width: 767px) {
    :root { --topbar-h: 61px; }
    .topbar-inner { flex-wrap: wrap; gap: 0 12px; padding-top: 12px; padding-bottom: 12px; }
    .topbar .brand img { height: 24px; }
    .menu-toggle { display: inline-flex; }
    .main-nav { flex: none; }
    .main-nav a:not(.nav-aside) + .nav-aside { margin-left: 0; }

    /* Panel en secciones con título: Menú · Cuenta · Idioma */
    .topbar-menu { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; margin-top: 12px; padding-bottom: 6px; border-top: 1px solid var(--border); }
    /* Con JS el panel es un popover (o lleva .is-open en navegadores sin popover): cerrado no
       se ve, también antes de que el script le ponga el atributo. Sin JS se queda en la barra */
    .js .topbar-menu:not(:is(:popover-open, .is-open)) { display: none; }
    /* Abierto: superpuesto a todo el ancho bajo la barra (anclado a ella; sin anclas, a su
       altura), desplazándose por dentro si no cabe en la pantalla */
    .topbar-menu:is(:popover-open, .is-open) {
        position: fixed;
        z-index: 35; /* sólo cuenta con .is-open: el popover ya va en la capa superior */
        inset: auto 0;
        top: var(--topbar-h);
        top: anchor(--topbar bottom);
        width: auto;
        max-width: none;
        height: auto;
        max-height: calc(100dvh - var(--topbar-h));
        margin: 0;
        padding: 0 var(--page-pad) 6px;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--bg);
        color: var(--text);
        border: 0;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 12px 24px rgba(0, 0, 0, .35);
    }
    /* Velo bajo el panel, sin tapar la barra (su botón sigue a mano para cerrar). Un clic en
       él cierra el panel (ver el script de la barra) */
    .topbar-menu::backdrop { inset: var(--topbar-h) 0 0; background: rgba(0, 0, 0, .6); }
    .main-nav, .topbar-account, .topbar-lang { display: flex; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 16px 0 12px; }
    .topbar-account, .topbar-lang { border-top: 1px solid var(--border); }
    .main-nav::before, .topbar-account::before, .topbar-lang::before {
        content: attr(data-label);
        margin-bottom: 6px;
        color: var(--muted);
        font: 500 13px/1.4 var(--font-body);
    }
    .main-nav a { padding: 10px 0; border: 0; font-size: 16px; }
    /* Página actual: marca a la izquierda en vez de subrayado */
    .main-nav a[aria-current="page"] { margin-left: -12px; padding-left: 10px; border-left: 2px solid var(--accent); }

    /* Sin sesión: Iniciar sesión y Registrarse lado a lado */
    .topbar-account:not(:has(.user-menu)) { flex-flow: row wrap; gap: 10px; }
    .topbar-account:not(:has(.user-menu))::before { flex-basis: 100%; margin-bottom: 0; }
    .topbar-account .topbar-link, .topbar-account > .btn:not(.btn-upgrade) { flex: 1; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 8px; text-align: center; }
    .topbar-account > .btn:not(.btn-upgrade) { border-color: transparent; }

    /* Con sesión: usuario y plan, Mejorar, enlaces de la cuenta; idioma y cerrar sesión aparte */
    .user-menu { display: contents; }
    .user-toggle { order: 0; max-width: 100%; margin: 0 0 4px; padding: 6px 0; }
    .user-toggle:hover { background: none; border-color: transparent; }
    .user-toggle:disabled { opacity: 1; color: var(--text); }
    .user-caret { display: none; }
    .topbar-account .btn-upgrade { order: 1; margin: 6px 0 8px; padding: 10px 14px; text-align: center; }
    .user-menu-list { order: 2; position: static; display: block; min-width: 0; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
    .user-menu-list a, .user-menu-list button { padding: 10px 0; font-size: 16px; }
    .user-menu-list a:hover, .user-menu-list button:hover { background: none; }
    .user-menu-lang { margin: 8px 0 0; padding: 14px 0 6px; border-top: 1px solid var(--border); font-size: 16px; }
    .user-menu-logout { margin-top: 8px; padding-top: 6px; }

    /* Sin sesión: idioma en su sección */
    .topbar-lang { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
    .topbar-lang::before { margin-bottom: 0; }
}

/* width: en el flex del body, los márgenes auto (centrado) harían que se encogiera al contenido */
.page { width: 100%; max-width: var(--page-width); margin: 0 auto; padding: 32px var(--page-pad); }
.legal-page { max-width: 760px; }
.status-page { max-width: 560px; padding-top: 72px; text-align: center; }
.status-page .subtitle { margin-bottom: 24px; }
.status-code { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .2em; }
.maintenance-bar { padding: 8px 16px; background: #3a2f12; color: #f0d79a; font-size: 13px; text-align: center; }
.legal-page h2 { margin: 28px 0 8px; font-size: 18px; }
.legal-page p { color: var(--muted); }
.legal-page a { color: var(--text); text-underline-offset: 3px; }
.site-footer {
    margin-top: auto;
    padding: 24px 16px 32px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}
.site-footer p { margin: 10px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-size: 13px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.legal-table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 14px; }
.legal-table th, .legal-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.legal-table th { color: var(--text); }
.legal-table td { color: var(--muted); }

/* Página de una app (src/site/app_info.php). Acento sólo en el botón principal y el foco del input */
.page:has(> .app-hero) { padding-top: 0; }
/* Columnas con minmax(0, 1fr): con 1fr, algo muy ancho (lo que inserta AdSense, como los "Ad intents")
   ensancha su columna y deja la otra con el ancho de una palabra */
.app-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    padding-top: 48px;
}
/* Cualquier otro elemento que se cuele en la cabecera (anuncios automáticos, que AdSense mete
   entre el buscador y la vista previa): en su propia fila al final (order), no en medio, y
   ajustado al ancho aunque traiga uno fijo en px (style en línea: de ahí !important) */
.app-hero > :not(.app-hero-main, .app-preview) {
    order: 1;
    grid-column: 1 / -1;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}
.app-hero > :not(.app-hero-main, .app-preview) :is(div, ins, iframe) { max-width: 100% !important; }
.app-hero-main, .app-hero-head { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.app-hero-head > *, .app-hero-main > * { max-width: 100%; }
/* Con resultados no hay vista previa: título a la izquierda, buscador (y filtros) a la derecha */
.app-hero.is-searched { grid-template-columns: minmax(0, 1fr); }
.app-hero.is-searched .app-hero-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 48px; align-items: start; }
.app-hero.is-searched .app-hero-main > * { grid-column: 2; }
.app-hero.is-searched .app-hero-head { grid-column: 1; grid-row: 1 / span 4; align-self: center; }
.app-hero h1 { margin: 0; font-family: var(--font-body); font-size: 40px; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.app-hero-lead { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; text-wrap: pretty; }
.app-hero .look-tabs, .app-hero .room-help, .app-hero .search-status { margin: 0; }
.app-hero .chip.active { background: var(--text); border-color: var(--text); color: var(--bg); }

.search.app-search { flex-direction: column; gap: 10px; margin: 0; }
.search.app-search input,
.search.app-search select {
    width: 100%;
    max-width: none;
    padding: 16px 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: 15px var(--font-body);
}
.search.app-search > * { flex: none; }
.search.app-search input::placeholder { color: var(--muted); }
.search.app-search input:hover, .search.app-search select:hover { border-color: var(--border-strong); }
.search.app-search input:focus, .search.app-search select:focus { border-color: var(--accent); outline: none; box-shadow: none; }
.search.app-search button {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    border-radius: 8px;
    color: var(--accent-ink);
    font: 700 15px var(--font-body);
}
.search.app-search button:hover { background: var(--accent-hover); }

/* Vista previa de resultados (app_preview_html()): siluetas atenuadas, sólo sin búsqueda */
.app-preview {
    height: 280px;
    padding: 20px;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.app-preview > * { height: 100%; opacity: .5; }
.pvw-lines { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pvw-lines i { display: block; height: 6px; background: var(--border-strong); border-radius: 3px; }
.pvw-lines i:nth-child(2) { width: 60%; }
.pvw-lines i:nth-child(3) { width: 40%; }
.pvw-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pvw-product, .pvw-look { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.pvw-thumb, .pvw-fig { flex: 1; min-height: 0; background: var(--panel-hover); border: 1px solid var(--border); border-radius: 6px; }
.pvw-looks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pvw-fig { border-radius: 40px 40px 6px 6px; }
.pvw-mini { display: flex; gap: 5px; }
.pvw-mini i { display: block; width: 16px; height: 16px; background: var(--border-strong); border-radius: 4px; }
.pvw-badges { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-content: center; gap: 12px; }
.pvw-badges i { display: block; aspect-ratio: 1; background: var(--panel-hover); border: 1px solid var(--border-strong); border-radius: 6px; }
.pvw-card { display: grid; grid-template-columns: 88px 1fr; align-content: center; gap: 18px 20px; }
.pvw-photo { height: 88px; background: var(--panel-hover); border: 1px solid var(--border); border-radius: 8px; }
.pvw-card .pvw-lines { justify-content: center; gap: 10px; }
.pvw-card .pvw-lines i { height: 8px; }
.pvw-card .pvw-mini { grid-column: 1 / -1; gap: 10px; }
.pvw-card .pvw-mini i { width: 36px; height: 36px; border-radius: 6px; }
.pvw-tree { display: flex; align-items: center; justify-content: center; }
.pvw-tree .pvw-thumb { flex: none; width: 72px; height: 72px; }
.pvw-tree b { width: 36px; height: 1px; background: var(--border-strong); }
.pvw-rows { display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.pvw-row { display: flex; align-items: center; gap: 14px; }
.pvw-row .pvw-lines { flex: 1; }
.pvw-dot { flex: none; width: 30px; height: 30px; background: var(--panel-hover); border: 1px solid var(--border); border-radius: 50%; }

.app-result { margin-top: 40px; scroll-margin-top: var(--topbar-h); }
.app-sep { margin: 48px 0; border: 0; border-top: 1px solid var(--border); }

/* Cómo funciona (timeline) y preguntas frecuentes (app_info_render()) */
.app-info { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 56px; }
/* diseno-ignorar: SD4 (etiquetas en mayúsculas pedidas en el diseño de la página de apps) */
.app-label { margin: 0 0 16px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.app-steps { margin: 0 0 0 6px; padding: 0; border-left: 1px solid var(--border-strong); list-style: none; }
.app-steps li {
    display: flex;
    align-items: flex-start;
    margin-left: -7px;
    padding-bottom: 20px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}
.app-steps li:last-child { padding-bottom: 0; }
.app-steps li::before {
    content: "";
    flex: none;
    box-sizing: border-box;
    width: 13px;
    height: 13px;
    margin: 5px 16px 0 0;
    background: var(--bg);
    border: 2px solid var(--border-strong);
    border-radius: 50%;
}
.app-steps li:first-child::before { background: var(--text); border-color: var(--text); }
.app-step-num { flex: none; margin-right: 10px; color: var(--muted); font: 500 13px/22px var(--font-mono); }
.app-faq details { padding: 18px 0; border-top: 1px solid var(--border); }
.app-faq details:last-child { border-bottom: 1px solid var(--border); }
.app-faq summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.app-faq summary::-webkit-details-marker { display: none; }
.app-faq-icon { flex: none; color: var(--muted); font-size: 20px; font-weight: 400; line-height: 1; }
@media (prefers-reduced-motion: no-preference) {
    .app-faq-icon { transition: transform .2s, color .2s; }
}
.app-faq summary:hover .app-faq-icon { color: var(--text); }
.app-faq details[open] .app-faq-icon { transform: rotate(45deg); color: var(--text); }
.app-faq details p { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

@media (max-width: 767px) {
    .app-hero, .app-hero.is-searched, .app-info { grid-template-columns: minmax(0, 1fr); }
    .app-hero.is-searched .app-hero-main { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .app-hero.is-searched .app-hero-main > *, .app-hero.is-searched .app-hero-head { grid-column: auto; grid-row: auto; }
    .app-hero { gap: 32px; }
    .app-info { gap: 40px; }
}

h1 { margin: 0 0 6px; font-family: var(--font-body); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.subtitle { margin: 0 0 28px; color: var(--muted); }

/* Foco de teclado: siempre visible (neutro; el acento queda para el foco de los inputs) */
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Portada: buscador universal */
.page.home { padding: 56px var(--page-pad) 48px; }
/* Titular a la izquierda: la búsqueda es el contenido principal de la portada */
.hero { max-width: 820px; margin: 0 0 64px; }
.hero h1 {
    max-width: 15em;
    margin: 0 0 16px;
    font-size: clamp(34px, 5.6vw, 60px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -.035em;
    text-wrap: balance;
}
.hero .subtitle { max-width: 34em; margin: 0 0 32px; font-size: 18px; }
/* Portada del sitio: elegir juego (IMVU / Roblox), cada uno con sus herramientas destacadas */
.game-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.game-pick-card { display: flex; flex-direction: column; gap: 18px; padding: 24px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; }
.game-pick-head { display: flex; flex-direction: column; gap: 6px; color: var(--text); text-decoration: none; }
.game-pick-name { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.game-pick-head:hover .game-pick-name { text-decoration: underline; text-underline-offset: 4px; }
.game-pick-desc { color: var(--muted); font-size: 15px; line-height: 1.5; }
.game-pick-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.game-pick-tools a { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; }
.game-pick-tools a:hover { background: var(--panel-hover); border-color: var(--border-strong); }
.game-pick-tools strong { font-size: 15px; }
/* Descripción en hasta 2 líneas: en una sola se cortaba a media palabra ("pega un e…") */
.game-pick-tools span {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    text-wrap: pretty;
}
.game-pick-all { align-self: flex-start; margin-top: auto; }
@media (max-width: 720px) {
    .game-pick { grid-template-columns: minmax(0, 1fr); }
    .game-pick-card { padding: 18px; }
}
.search.lookup { margin: 0; }
.search.lookup input { padding: 18px 20px; border-radius: 12px; font: 400 17px/1.3 var(--font-body); }
.search.lookup input::placeholder { color: #6b6b73; }
.search.lookup button { padding: 0 28px; border-radius: 12px; font: 600 16px/1 var(--font-body); }

/* Lectura en vivo: formato reconocido y herramientas que abrirá (index.php) */
/* Las dos filas comparten columnas: la etiqueta mide lo que el texto más largo */
.lookup-read { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; gap: 10px 16px; margin: 16px 0 0; font-size: 14px; }
.lookup-read-row { display: contents; }
.lookup-read-row[hidden] { display: none; }
.lookup-read dt { color: var(--muted); }
.lookup-read dd { margin: 0; }
.lookup-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lookup-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px 4px 9px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font: 500 13px/1.4 var(--font-body);
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
/* Punto vacío / lleno: el formato reconocido no depende sólo del color */
.lookup-chip::before {
    content: "";
    width: 7px;
    height: 7px;
    border: 1px solid currentColor;
    border-radius: 50%;
    transition: background .15s, border-color .15s;
}
.lookup-chip:hover { border-color: var(--muted); color: var(--text); }
.lookup-chip.is-match {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border-color: color-mix(in srgb, var(--accent) 55%, transparent);
    color: var(--text);
}
.lookup-chip.is-match::before { background: var(--accent); border-color: var(--accent); }
.lookup-opens dd { color: var(--text); }
.lookup-opens dd[data-kind="unknown"] { color: var(--muted); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
/* overflow-x: clip: los anuncios automáticos de AdSense entre secciones a veces se
   salen unos píxeles (anchos con 100vw) y sacaban una barra de scroll horizontal */
.tools { overflow-x: clip; scroll-margin-top: calc(var(--topbar-h) + 24px); }

/* Búsqueda de un producto: accesos a sus herramientas */
.lookup-product { margin-top: 16px; }
.lookup-product > p { margin: 0 0 12px; color: var(--muted); }
.lookup-product-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.lookup-product-tools a {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 16px 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    transition: border-color .15s, background .15s;
}
.lookup-product-tools a:hover { background: var(--panel-hover); border-color: var(--border-strong); }
.lookup-product-tools strong { font: 600 16px/1.35 var(--font-body); }
.lookup-product-tools span:not(.plan-tag) { flex-basis: 100%; color: var(--muted); font-size: 14px; }

/* Portada: resultado de un usuario (datos, pestañas y la herramienta activa) */
.lookup-result { margin: 0 0 64px; scroll-margin-top: calc(var(--topbar-h) + 24px); }
.lookup-user {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
}
.lookup-photo { flex-shrink: 0; width: 72px; height: 72px; background: var(--bg); border-radius: 10px; object-fit: cover; }
.lookup-identity { flex: 1; min-width: 0; }
.lookup-identity .lookup-name { margin: 0 0 4px; font: 700 20px/1.3 var(--font-body); letter-spacing: -.01em; overflow-wrap: anywhere; }
.lookup-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0; color: var(--muted); font-size: 13px; }
.meta-tag { padding: 0 6px; border: 1px solid var(--border); border-radius: 4px; color: var(--text); font: 700 11px/1.6 var(--font-mono); letter-spacing: .06em; }
/* Pestañas en una línea que se desliza (sin barra visible); si no caben, flechas en los extremos */
.lookup-tabs-wrap { position: relative; }
.lookup-tabs {
    display: flex;
    gap: 0 4px;
    overflow-x: auto;
    padding: 0 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-top: 0;
    scrollbar-width: none;
}
.lookup-tabs::-webkit-scrollbar { display: none; }
.tabs-arrow {
    position: absolute;
    top: 0;
    bottom: 1px;
    z-index: 1;
    display: none;
    width: 40px;
    padding: 0;
    background: var(--panel);
    border: 0;
    color: var(--text);
    font: 500 22px/1 var(--font-mono);
    cursor: pointer;
    transition: color .15s;
}
.tabs-arrow:hover { color: var(--muted); }
.tabs-prev { left: 1px; border-right: 1px solid var(--border); }
.tabs-next { right: 1px; border-left: 1px solid var(--border); }
.lookup-tabs-wrap.can-prev .tabs-prev, .lookup-tabs-wrap.can-next .tabs-next { display: block; }
.lookup-tabs a {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
    padding: 13px 8px 11px;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font: 500 14px/1.3 var(--font-body);
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.lookup-tabs a:hover { color: var(--text); }
.lookup-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--text); }
.lookup-tabs a:focus-visible { outline-offset: -2px; }
.lookup-panel { padding: 24px 20px 20px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 12px 12px; }
.lookup-locked {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    padding: 18px 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.lookup-locked p { margin: 0; color: var(--muted); }
.lookup-open { display: inline-block; margin-top: 20px; color: var(--muted); font: 500 14px/1.4 var(--font-body); text-decoration: none; }
.lookup-open:hover { color: var(--text); }
/* Debajo de Avatar Card (tarjeta centrada), centrado con ella */
.lookup-panel .result + .lookup-open { display: table; margin-inline: auto; }

/* Portada: todas las herramientas, en una grilla de 12 columnas (tamaños en HOME_LAYOUT) */
.tools-title { margin: 0; font: 600 22px/1.3 var(--font-body); letter-spacing: -.01em; }
.tool-section { margin-top: 32px; }
.section-head { margin: 0 0 14px; color: var(--muted); font: 500 15px/1.4 var(--font-body); }
.tool-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 16px;
}
.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    grid-column: span var(--span, 4);
    grid-row: span var(--rows, 1);
    overflow: hidden;
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    transition: border-color .15s, background .15s;
}
a.tool-card:hover { background: var(--panel-hover); border-color: var(--border-strong); }
/* PRO: borde algo más marcado, sin acento */
.tool-card.is-pro { border-color: var(--border-strong); }
.tool-card:focus-visible { outline-offset: 3px; }
.tool-tags { position: absolute; top: 12px; right: 12px; z-index: 1; display: flex; gap: 6px; }
.tool-preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 128px;
    overflow: hidden;
    padding: 16px 20px;
    background: color-mix(in srgb, var(--bg) 60%, var(--panel));
    border-bottom: 1px solid var(--border);
}
.tool-card.tall .tool-preview { flex: 1; height: auto; min-height: 220px; }
/* Con etiquetas en la esquina, la vista previa empieza debajo para no quedar tapada */
.tool-card:has(.tool-tags) .tool-preview { padding-top: 40px; }
.tool-body { padding: 16px 44px 18px 18px; }
.tool-body .tool-name { margin: 0 0 4px; font: 600 16px/1.35 var(--font-body); }
.tool-body .tool-desc { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.tool-arrow {
    position: absolute;
    right: 18px;
    bottom: 17px;
    color: var(--text);
    font-size: 16px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .15s, transform .15s;
}
a.tool-card:hover .tool-arrow, a.tool-card:focus-visible .tool-arrow { opacity: 1; transform: none; }
/* En mantenimiento: sin enlace ni hover */
.tool-card.maintenance { cursor: default; border-style: dashed; }
.tool-card.maintenance .tool-preview, .tool-card.maintenance .tool-body { opacity: .55; }

/* Vistas previas dibujadas (decorativas): bloques neutros con la forma del resultado */
.tool-preview { --pv: #1a1a1d; --pv-2: #26262a; }
.pv-tiles { display: flex; gap: 8px; }
.pv-tiles i { position: relative; display: block; flex-shrink: 0; width: 44px; height: 44px; background: var(--pv-2); border-radius: 6px; }
.pv-tiles.pv-sm i { width: 22px; height: 22px; border-radius: 4px; }
.pv-tiles i.pv-dot { border-radius: 50%; }
.pv-tiles i.is-hidden { background: transparent; border: 1px dashed #4a4a52; }
/* diseno-ignorar: SD4 -- rótulo diminuto dentro del dibujo de la vista previa */
.pv-tiles i.is-hidden b {
    position: absolute;
    bottom: -8px;
    left: 50%;
    padding: 0 4px;
    background: color-mix(in srgb, var(--bg) 60%, var(--panel));
    color: var(--muted);
    font: 700 8px/1.6 var(--font-mono);
    letter-spacing: .06em;
    text-transform: uppercase;
    transform: translateX(-50%);
}
.pv-room { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; width: 100%; max-width: 520px; }
.pv-av { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pv-fig { display: block; flex-shrink: 0; width: 38px; height: 96px; background: var(--pv-2); border-radius: 19px 19px 8px 8px; }
.pv-av .pv-tiles i { width: 22px; height: 22px; border-radius: 4px; }
.pv-list { display: flex; flex-direction: column; gap: 9px; width: 100%; max-width: 300px; }
.pv-row { display: flex; align-items: center; gap: 12px; }
.pv-date { flex-shrink: 0; width: 80px; color: var(--muted); font: 500 11px/1 var(--font-mono); }
.pv-lines { display: flex; flex: 1; flex-direction: column; gap: 7px; }
.pv-lines i { display: block; height: 7px; background: var(--pv-2); border-radius: 4px; }
.pv-lines i:nth-child(2) { width: 75%; }
.pv-lines i:nth-child(3) { width: 50%; }
.pv-lines-lg { max-width: 220px; }
.pv-card { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 230px; padding: 12px; background: var(--pv); border: 1px solid var(--border); border-radius: 8px; }
.pv-photo { flex-shrink: 0; width: 44px; height: 44px; background: var(--pv-2); border-radius: 6px; }
.pv-card-room .pv-photo { width: 64px; }
/* Una sola fila: si no caben, se corta en el borde en vez de dejar un cuadro suelto debajo */
.pv-badges { display: flex; justify-content: center; gap: 8px; overflow: hidden; }
.pv-badges i { flex-shrink: 0; width: 34px; height: 34px; background: var(--pv-2); border: 1px solid var(--border-strong); border-radius: 6px; }
.pv-outfit { display: flex; align-items: center; gap: 16px; }
.pv-outfit .pv-fig { width: 32px; height: 80px; }
.pv-tiles.pv-grid { display: grid; grid-template-columns: repeat(3, 26px); gap: 6px; }
.pv-tiles.pv-grid i { width: 26px; height: 26px; border-radius: 5px; }
.pv-report { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 260px; }
.pv-bar { flex: 1; height: 8px; overflow: hidden; background: var(--pv-2); border-radius: 999px; }
.pv-bar i { display: block; width: 70%; height: 100%; background: var(--text); }
.pv-count { color: var(--muted); font: 500 12px/1 var(--font-mono); }
.pv-tree { display: flex; align-items: center; }
.pv-tree i { width: 36px; height: 36px; background: var(--pv-2); border-radius: 6px; }
.pv-tree b { width: 28px; height: 1px; background: var(--border-strong); }
.pv-tree i.is-current { box-shadow: inset 0 0 0 1px var(--muted); }
.pv-ext { flex-shrink: 0; width: 48px; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font: 700 10px/1.8 var(--font-mono); text-align: center; }
.pv-play { display: grid; flex-shrink: 0; place-items: center; width: 22px; height: 22px; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); font-size: 8px; }

/* Etiquetas de plan y estado. Sólo EXCLUSIVE lleva el acento */
/* diseno-ignorar: SD4 -- chips de nivel (PRO, EXCLUSIVE) y de estado: la mayúscula es el formato del dato */
.plan-tag, .maintenance-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 20px;
    padding: 0 7px;
    border: 1px solid currentColor;
    border-radius: 5px;
    font: 700 10.5px/1 var(--font-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.plan-tag { color: var(--muted); border-color: var(--border); }
.plan-tag.plan-basic { color: var(--tier-basic); border-color: var(--border-strong); }
.plan-tag.plan-pro { color: var(--tier-pro); border-color: var(--border-strong); }
.plan-tag.plan-exclusive { color: var(--tier-exclusive); border-color: var(--tier-exclusive); }
.maintenance-tag { color: #ffb84d; border-color: rgba(255, 184, 77, .45); }

.locked-app {
    max-width: 520px;
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.locked-app p { margin: 12px 0 0; }
.locked-actions { display: flex; gap: 10px; margin-top: 18px; }

/* Aviso de bloqueador de anuncios (ver ads_adblock_wall()): tapa la página */
.adblock-locked, .adblock-locked body { overflow: hidden; }
.adblock-wall {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 16px;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    /* diseno-ignorar: K3 (modal encima de la página: superposición real) */
    backdrop-filter: blur(8px);
}
.adblock-card {
    max-width: 440px;
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.adblock-card h2 { margin: 0; font-size: 20px; }
.adblock-card > p { margin: 12px 0 0; color: var(--muted); line-height: 1.5; }
.adblock-card .adblock-login { font-size: 13px; }
.adblock-card .adblock-login a { color: var(--text); }

@media (max-width: 959px) {
    .tool-card { grid-column: span var(--span-md, 6); }
    .tool-card.tall { grid-row: auto; }
    .tool-card.tall .tool-preview { min-height: 180px; }
}
@media (max-width: 599px) {
    :root { --page-pad: 16px; }
    .page.home { padding-top: 36px; padding-bottom: 32px; }
    .hero { margin-bottom: 44px; }
    .hero .subtitle { font-size: 16px; }
    .lookup-read { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .lookup-opens dt { margin-top: 6px; }
    .search.lookup { flex-direction: column; }
    .search.lookup button { padding: 14px; }
    .lookup-user { flex-wrap: wrap; padding: 16px; }
    .lookup-user .btn { width: 100%; text-align: center; }
    .lookup-panel { padding: 20px 16px 16px; }
    .tool-card { grid-column: span 12; }
    .pv-room { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pv-room .pv-av:nth-child(4) { display: none; }
}

/* Formulario de una app */
.search {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}
.search input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 15px;
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.search button {
    padding: 12px 22px;
    background: var(--accent);
    border: 0;
    border-radius: 10px;
    color: var(--accent-ink);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.search button:hover { background: var(--accent-hover); }
.search button:disabled { opacity: .7; cursor: progress; }
.search.is-loading input { opacity: .7; }
.search.is-loading button::before {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 8px;
    vertical-align: -2px;
    border: 2px solid color-mix(in srgb, currentColor 35%, transparent);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.search-status { margin: -12px 0 24px; color: var(--muted); font-size: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

.result {
    display: flex;
    justify-content: center;
}

/* Outfit Viewer */
.outfit {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 20px;
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.outfit-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}
.outfit-label {
    padding: 2px 10px;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--muted);
    font: 500 12px/1.6 var(--font-body);
}
.outfit-name { margin: 0; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.outfit-look {
    width: 165px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 165 / 480;
    background: #1b1f2a;
    border-radius: 8px;
    object-fit: contain;
}
.outfit-side .btn { width: 100%; text-align: center; }
.outfit-count { margin-bottom: 4px; color: var(--muted); font-size: 14px; }

.product-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px 0 10px;
    font-size: 15px;
    font-weight: 600;
}
.product-group-title span {
    padding: 1px 8px;
    background: var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0;
}
.product-group-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.product-card {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color .15s;
}
.product-card:hover { border-color: var(--border-strong); }
.product-thumb {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 5 / 4;
    background: #fff;
}
.product-thumb img { max-width: 100%; max-height: 100%; }

/* Contenido AP (veil_img()): difuminado con etiqueta 18+ hasta confirmar la edad */
.veil { position: relative; overflow: hidden; }
/* Texto provisional de un texto AP (veil_text()): sólo hasta confirmar */
.veil-placeholder { color: var(--muted); font-style: italic; }
html.veil-off .veil-placeholder { display: none; }
/* El texto revelado llega sin <br>: conservar sus saltos de línea */
.room-desc.is-veiled { white-space: pre-line; }
.outfit-look-wrap { display: block; border-radius: 8px; }
html:not(.veil-off) .veil { cursor: pointer; }
html:not(.veil-off) .veil img { filter: blur(18px) saturate(.6); transform: scale(1.1); transition: filter .2s; }
html:not(.veil-off) .veil:hover img, html:not(.veil-off) .veil:focus-visible img { filter: blur(14px) saturate(.7); }
/* Toda una tarjeta AP (Room Card): difuminada entera, no sólo su imagen, y sin poder pulsar
   sus enlaces hasta confirmar (el clic va a la tarjeta, que pregunta) */
.veil.veil-all { overflow: visible; }
/* Las tarjetas de producto recortan por sus esquinas redondeadas */
.product-card.veil-all { overflow: hidden; }
html:not(.veil-off) .veil-all > :not(.veil-hint) { filter: blur(8px); pointer-events: none; user-select: none; }
html:not(.veil-off) .veil-all:hover > :not(.veil-hint) { filter: blur(6px); }
html:not(.veil-off) .veil-all img { filter: none; transform: none; }
.veil-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 16px);
    padding: 7px 12px;
    background: rgba(0, 0, 0, .72);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    transition: background .15s, border-color .15s;
}
.veil-hint .icon { flex: none; }
html:not(.veil-off) .veil:hover .veil-hint, html:not(.veil-off) .veil:focus-visible .veil-hint {
    background: rgba(0, 0, 0, .88);
    border-color: var(--accent);
}
.veil-off .veil-hint { display: none; }
/* <dialog> a pantalla completa (sin los márgenes y bordes del navegador): el fondo es
   el propio dialog, así un clic fuera de la tarjeta cae en él y lo cierra */
.veil-dialog {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 16px;
    border: 0;
    background: color-mix(in srgb, var(--bg) 75%, transparent);
    color: var(--text);
    /* diseno-ignorar: K3 (modal encima de la página: superposición real) */
    backdrop-filter: blur(6px);
}
.veil-dialog[open] { display: grid; place-items: center; }
.veil-dialog::backdrop { background: transparent; }
.veil-card {
    max-width: 420px;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.veil-card h2 { margin: 0; font-size: 19px; }
.veil-card p { margin: 10px 0 0; color: var(--muted); line-height: 1.5; }
.product-ap {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 1px 6px;
    background: #e5484d;
    border-radius: 4px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}
.product-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 10px 0;
    min-width: 0;
}
.product-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}
.product-name:hover { color: var(--text); text-decoration: underline; }
.product-creator {
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-creator:hover { color: var(--text); }
.product-price { margin-top: 4px; color: #f5c451; font-size: 13px; font-weight: 600; }
.product-price.hidden-price { color: var(--muted); font-weight: 500; }
.product-actions {
    display: flex;
    gap: 6px;
    margin-top: auto;
    padding: 10px;
}
.product-actions .btn { flex: 1; padding: 6px 8px; font-size: 13px; text-align: center; }

@media (max-width: 640px) {
    .outfit { grid-template-columns: 1fr; }
    .outfit-look { width: 120px; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Derivation Tree: cadena vertical de productos */
.tree-chain {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tree-node { width: 100%; max-width: 220px; }
.tree-node.is-current .product-card { border-color: var(--text); }
.tree-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 0;
    color: var(--muted);
    font-size: 12px;
    font-style: italic;
}
.tree-link::before,
.tree-link::after {
    content: "";
    width: 2px;
    height: 14px;
    background: var(--border);
}
.tree-link span { padding: 4px 0; }

/* Current Outfit: pestañas "ahora / perfil" */
.look-tabs { margin: -8px 0 20px; }
/* Room Outfits: de dónde copiar el enlace en el cliente elegido */
.room-help { margin: -8px 0 24px; color: var(--muted); font-size: 14px; }

/* Outfit History */
.look-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}
.look-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color .15s, transform .15s;
}
.look-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.look-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}
.look-card .btn { width: 100%; text-align: center; }
/* Bloqueado: candado y texto en una línea; la etiqueta del plan baja si no cabe */
.look-card .btn-locked { flex-wrap: wrap; justify-content: center; row-gap: 4px; }
.look-card .btn-locked > span:first-child { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

@media (max-width: 480px) {
    .look-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* Apps de Roblox: mismas piezas que Outfit Viewer / Outfit History; el avatar de Roblox es cuadrado */
.rbx-look {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 1;
    background: #1b1f2a;
    border-radius: 8px;
    object-fit: contain;
}
.rbx-username { margin-top: -8px; color: var(--muted); font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.rbx-username:hover { color: var(--text); }
.rbx-total {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.rbx-total span, .rbx-total small { color: var(--muted); font-size: 12px; }
.rbx-total strong { color: #f5c451; font-size: 18px; }
.rbx-limited { background: #2f9e6e; }
.rbx-pager { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.rbx-back { display: inline-block; margin-bottom: 16px; color: var(--muted); font-size: 14px; text-decoration: none; }
.rbx-back:hover { color: var(--text); }
@media (max-width: 640px) {
    .outfit-side .rbx-look { max-width: 160px; }
}

/* Roblox Profile Card */
.rbx-card {
    margin-bottom: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.rbx-card-head { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 20px; }
.rbx-card-identity { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rbx-card-identity .rbx-username { margin-top: -6px; }
.rbx-card-name { display: flex; align-items: center; gap: 8px; font: 700 22px/1.25 var(--font-body); letter-spacing: -.01em; overflow-wrap: anywhere; }
.rbx-verified {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    color: #fff;
}
.rbx-banned { padding: 1px 8px; background: #b42318; border-radius: 999px; color: #fff; font-weight: 600; }
.rbx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 4px 0 0; }
.rbx-stats div { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.rbx-stats dt { color: var(--muted); font-size: 12px; }
.rbx-stats dd { margin: 2px 0 0; font: 700 18px/1.3 var(--font-body); font-variant-numeric: tabular-nums; }
.rbx-card-block { padding: 18px 20px; border-top: 1px solid var(--border); }
.rbx-card-block:first-child { border-top: 0; }
.rbx-card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 15px; font-weight: 700; }
.rbx-card-title span { color: var(--muted); font-weight: 500; }
.rbx-about { color: var(--text); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.rbx-names, .rbx-badges, .rbx-groups { margin: 0; padding: 0; list-style: none; }
.rbx-names { display: flex; flex-wrap: wrap; gap: 8px; }
.rbx-names li { padding: 4px 12px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 14px; }
.rbx-names span { color: var(--muted); font-size: 12px; }
.rbx-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.rbx-badges li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; text-align: center; }
.rbx-badges img { width: 56px; height: 56px; object-fit: contain; }
.rbx-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.rbx-groups a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}
.rbx-groups a:hover { background: var(--panel-hover); border-color: var(--border-strong); }
.rbx-groups img, .rbx-group-icon { flex-shrink: 0; width: 48px; height: 48px; background: #1b1f2a; border-radius: 6px; }
.rbx-group-info { display: flex; flex-direction: column; min-width: 0; }
.rbx-group-info strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.rbx-group-info span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.rbx-more { margin-top: 10px; color: var(--muted); font-size: 13px; }

/* Roblox Game Tracker. Gráfica: una serie en verde (#74a62d, validado contra --panel con
   el validador de dataviz), área al 10 %, rejilla de 1 px; textos con los colores de texto */
.rbx-game-head { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 20px; }
.rbx-game-icon { display: block; width: 150px; height: 150px; background: #1b1f2a; border-radius: 16px; object-fit: cover; }
.rbx-game-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 4px; }
.rbx-game-fresh { color: var(--muted); font-size: 12px; }
.rbx-game-desc { display: -webkit-box; max-height: 12.8em; overflow: hidden; -webkit-line-clamp: 8; -webkit-box-orient: vertical; }
.rbx-chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.rbx-chart-head .rbx-card-title { margin: 0; }
.rbx-ranges { margin: 0; }
.rbx-chart-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 16px; }
.rbx-chart-stats dt { color: var(--muted); font-size: 12px; }
.rbx-chart-stats dd { margin: 2px 0 0; font: 700 18px/1.3 var(--font-body); font-variant-numeric: tabular-nums; }
.rbx-chart-stats small { color: var(--muted); font-size: 12px; font-weight: 500; }
.rbx-chart { margin: 0; padding: 0 0 26px 48px; }
.rbx-chart-plot { position: relative; height: 240px; touch-action: pan-y; }
.rbx-chart-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rbx-chart-grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rbx-chart-area { fill: #74a62d; fill-opacity: .1; stroke: none; }
.rbx-chart-line { fill: none; stroke: #74a62d; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.rbx-chart-y, .rbx-chart-x { position: absolute; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }
.rbx-chart-y { right: calc(100% + 8px); transform: translateY(-50%); }
.rbx-chart-x { top: calc(100% + 8px); transform: translateX(-50%); }
.rbx-chart-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--muted); pointer-events: none; }
.rbx-chart-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    margin: -7px 0 0 -7px;
    background: #74a62d;
    border: 2px solid var(--panel);
    border-radius: 50%;
    box-sizing: content-box;
    pointer-events: none;
}
.rbx-chart-tip {
    position: absolute;
    top: -8px;
    display: flex;
    flex-direction: column;
    padding: 6px 10px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    transform: translateY(-100%);
}
.rbx-chart-tip strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.rbx-chart-tip span { color: var(--muted); }
.rbx-chart-tip span:empty { display: none; }
.rbx-chart-cross[hidden], .rbx-chart-dot[hidden], .rbx-chart-tip[hidden] { display: none; }
/* Comparador: un color por juego (validados con dataviz contra --panel; el 3.º y el 4.º sólo
   llegan al mínimo para daltónicos, así que cada línea lleva además su trazo y su nombre) */
.rbx-line-0 { --line: #74a62d; }
.rbx-line-1 { --line: #5b7cff; --dash: 7 4; }
.rbx-line-2 { --line: #d24f8a; --dash: 2 3; }
.rbx-line-3 { --line: #29a7b6; --dash: 10 3 2 3; }
.rbx-chart-line[class*="rbx-line-"] { stroke: var(--line); stroke-dasharray: var(--dash, none); }
.rbx-chart-dot[class*="rbx-line-"] { background: var(--line); }
.rbx-tip-row { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.rbx-tip-row b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.rbx-tip-key { display: inline-block; flex-shrink: 0; width: 16px; height: 0; border-top: 2px solid var(--line); vertical-align: middle; }
.rbx-tip-key.rbx-line-1 { border-top-style: dashed; }
.rbx-tip-key.rbx-line-2 { border-top-style: dotted; }
.rbx-tip-key.rbx-line-3 { border-top: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 8px, var(--line) 8px 9px, transparent 9px 11px); }
/* Actualizaciones: línea vertical discontinua (del color del juego en el comparador) */
.rbx-chart-update { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--line, var(--muted)); opacity: .8; }
.rbx-chart-update::before { content: ''; position: absolute; top: -3px; left: -4px; width: 7px; height: 7px; background: var(--line, var(--muted)); border-radius: 50%; }
.rbx-chart-updates { display: flex; align-items: baseline; gap: 8px; margin-top: 34px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.rbx-chart-update-key { flex-shrink: 0; width: 0; height: 12px; border-left: 1px dashed var(--muted); }
.rbx-compare-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.rbx-compare-legend li { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; padding: 6px 6px 6px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.rbx-compare-legend img { flex-shrink: 0; border-radius: 6px; }
.rbx-compare-legend a { overflow: hidden; color: var(--text); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.rbx-compare-legend a:hover { text-decoration: underline; }
.rbx-compare-legend .rbx-compare-remove { flex-shrink: 0; padding: 0 6px; color: var(--muted); font-size: 18px; line-height: 1; }
.rbx-compare-legend .rbx-compare-remove:hover { color: var(--text); text-decoration: none; }
.rbx-compare-add { max-width: 560px; margin-top: 14px; }
.rbx-compare-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.rbx-compare-table { min-width: 480px; }
.rbx-compare-table thead th { color: var(--text); font-weight: 600; white-space: nowrap; }
.rbx-compare-table td.rbx-best { color: var(--text); }
.rbx-compare-table td.rbx-best svg { color: #74a62d; vertical-align: -1px; }
.rbx-compare .rbx-table-wrap { max-height: none; }
.rbx-chart-table { margin-top: 12px; font-size: 13px; }
.rbx-chart-table summary { color: var(--muted); cursor: pointer; }
.rbx-table-wrap { max-height: 320px; margin-top: 10px; overflow: auto; }
.rbx-table-wrap table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rbx-table-wrap th, .rbx-table-wrap td { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: right; }
.rbx-table-wrap th:first-child, .rbx-table-wrap td:first-child { text-align: left; }
.rbx-table-wrap th { color: var(--muted); font-weight: 500; }
/* Misma separación del buscador que los resultados (.app-result) */
.rbx-top { margin-top: 40px; }
.rbx-top-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rbx-top-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}
.rbx-top-list li { min-width: 0; }
.rbx-top { scroll-margin-top: calc(var(--topbar-h) + 16px); }
.rbx-lists { margin: 0 0 14px; }
.rbx-list-note { margin: -4px 0 12px; }
.rbx-top-list a:hover { background: var(--panel-hover); border-color: var(--border-strong); }
.rbx-top-list img { flex-shrink: 0; width: 48px; height: 48px; border-radius: 8px; }
.rbx-top-list .rbx-group-info { flex: 1; }
.rbx-top-rank { flex-shrink: 0; width: 24px; color: var(--muted); font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.rbx-top-playing { flex-shrink: 0; text-align: right; font-variant-numeric: tabular-nums; }
.rbx-top-playing span { display: block; color: var(--muted); font-size: 12px; }
/* Pestañas dentro de la ficha: las de la portada, sin su marco (ya lo pone la tarjeta) */
.rbx-game-tabs { padding: 0 8px; background: transparent; border: 0; border-top: 1px solid var(--border); scroll-margin-top: calc(var(--topbar-h) + 16px); }
.rbx-game-tabs + .rbx-card-block { border-top: 1px solid var(--border); }
/* Insignias y game passes: filas con icono, nombre y dato a la derecha */
.rbx-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.rbx-items a {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 8px 12px 8px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}
.rbx-items a:hover { background: var(--panel-hover); border-color: var(--border-strong); }
.rbx-items img, .rbx-item-icon { flex-shrink: 0; width: 56px; height: 56px; background: #1b1f2a; border-radius: 8px; object-fit: cover; }
.rbx-items .rbx-group-info { flex: 1; }
.rbx-item-side { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; gap: 2px; text-align: right; font-variant-numeric: tabular-nums; }
.rbx-item-side > span { color: var(--muted); font-size: 12px; }
.rbx-robux { color: #f5c451; }
/* Dificultad: sólo una etiqueta de texto con borde; el color no lleva el significado solo */
.rbx-difficulty { padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 11px; line-height: 1.6; }
.rbx-difficulty-impossible, .rbx-difficulty-insane, .rbx-difficulty-extreme { border-color: #b4233a; }
.rbx-difficulty-hard, .rbx-difficulty-challenging { border-color: #b26b1f; }
/* Roblox Limiteds: el cambio de precio lleva flecha y signo; el color sólo lo refuerza */
.rbx-change.is-up { color: #74a62d; }
.rbx-change.is-down { color: #e0566f; }
.rbx-top-playing .rbx-change { font-size: 12px; font-weight: 600; }
/* Roblox Robux Calculator */
/* Sólo 3 calculadoras: en varias líneas en móvil, que la marcada no quede fuera de la vista */
.rbx-calc .rbx-lists { flex-wrap: wrap; overflow: visible; margin-bottom: 16px; }
.rbx-calc-form { display: grid; gap: 16px; margin-top: 12px; }
.rbx-calc-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.rbx-calc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rbx-calc-field > span { font-size: 13px; font-weight: 600; }
.rbx-calc-field input, .rbx-calc-field select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}
.rbx-calc-field input:focus, .rbx-calc-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.rbx-calc-field small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.rbx-calc-result { display: flex; flex-direction: column; gap: 2px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; }
.rbx-calc-result span, .rbx-calc-result small { color: var(--muted); font-size: 13px; }
.rbx-calc-result strong { font-size: 34px; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rbx-calc-submit { justify-self: start; }
.js .rbx-calc-submit { display: none; }
.rbx-calc-table { width: 100%; font-variant-numeric: tabular-nums; }
.rbx-calc-table th[scope="row"] { font-weight: 600; text-align: left; }
.pv-calc { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pv-calc span { padding: 8px 14px; background: var(--pv-2); border-radius: 8px; }
@media (max-width: 640px) {
    .rbx-calc-field.is-wide { grid-column: 1 / -1; }
}
/* Roblox Free Items: barra de unidades que quedan (con el número al lado) y el juego */
.rbx-free-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.rbx-stock { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.rbx-stock-bar { display: block; height: 4px; overflow: hidden; background: var(--border); border-radius: 2px; }
.rbx-stock-bar i { display: block; height: 100%; background: #74a62d; border-radius: 2px; }
.rbx-free-game {
    margin-top: 4px;
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rbx-free-game:hover { text-decoration: underline; }
.rbx-free-meta { margin-top: 2px; color: var(--muted); font-size: 12px; }
/* Roblox Username Checker: una fila por nombre; el estado lleva icono y texto, no sólo color */
.rbx-name-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rbx-name-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 2px 16px; align-items: baseline; padding: 14px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
.rbx-name-state { display: inline-flex; align-items: center; gap: 6px; grid-row: span 2; align-self: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.rbx-name-free .rbx-name-state { color: #74a62d; }
.rbx-name-free { border-color: #3d5a1a; }
.rbx-name-value { font-size: 17px; overflow-wrap: anywhere; }
.rbx-name-detail { color: var(--muted); font-size: 13px; }
.rbx-name-detail a { color: var(--text); }
.rbx-name-variants { margin-top: 20px; padding: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
.rbx-names-result > .rbx-more { margin-top: 14px; }
.pv-row > .pv-dot { flex-shrink: 0; width: 12px; height: 12px; background: var(--pv-2); border-radius: 50%; }
.pv-dot.is-free { background: #74a62d; }
@media (max-width: 640px) {
    .rbx-name-row { grid-template-columns: minmax(0, 1fr); }
    .rbx-name-state { grid-row: auto; }
}
/* Roblox Creator Stats: la cara del usuario redonda (el icono de un grupo, como el de un juego) */
.rbx-game-icon.rbx-creator-user { border-radius: 50%; }
.rbx-stats .rbx-stat-note { margin: 2px 0 0; color: var(--muted); font: 400 12px/1.4 var(--font-body); }
.pv-chart svg { width: 80%; height: 64px; overflow: visible; }
.tool-card.tall .pv-chart svg { height: 150px; }
.pv-chart polyline { fill: none; stroke: var(--muted); stroke-width: 2; vector-effect: non-scaling-stroke; }
@media (max-width: 640px) {
    .rbx-card-head { grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 16px; }
    .rbx-card-head .rbx-look { max-width: 160px; }
    .rbx-card-identity { width: 100%; }
    .rbx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rbx-card-block { padding: 16px; }
    .rbx-game-head { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 16px; }
    .rbx-game-icon { width: 72px; height: 72px; border-radius: 12px; }
    .rbx-chart { padding-left: 40px; }
    .rbx-chart-plot { height: 200px; }
}

/* Product Files */
.files-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding: 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.files-thumb {
    width: 100px;
    height: 80px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}
.files-info { flex: 1; min-width: 0; }
.files-info h2 { margin: 0 0 4px; font-size: 17px; overflow-wrap: anywhere; }
.files-info p { margin: 0; color: var(--muted); font-size: 14px; }
.files-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.files-actions .btn.busy { opacity: .6; cursor: progress; }

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}
.file-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color .15s;
}
.file-card:hover { border-color: var(--border-strong); }
.file-preview {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    background: #1b1f2a;
    border-radius: 6px;
    overflow: hidden;
}
.file-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
/* diseno-ignorar: SD4 -- extensiones de archivo (ZIP, PNG) */
.file-ext {
    padding: 4px 10px;
    background: var(--border);
    border-radius: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}
.file-name {
    font-size: 12px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 640px) {
    .files-head { flex-direction: column; align-items: stretch; text-align: center; }
    .files-thumb { align-self: center; }
    .files-actions { justify-content: center; }
    .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Room Card: #dialog tiene alto fijo (550px) y la barra inferior se sale;
   se reserva su espacio. El botón de cerrar queda fuera y no hace nada. */
.roomcard { padding-bottom: 45px; }
.roomcard #close_button { display: none; }

/* Error dentro de las tarjetas de Avatar Card y Room Card */
.avicard .avicard-error,
.roomcard .roomcard-error {
    padding: 24px 16px;
    font-weight: bold;
    text-align: center;
}

/* Componentes compartidos por las apps */
.notice {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border-strong);
    border-radius: 8px;
}
.notice.error { border-left-color: #e5484d; }

.btn {
    display: inline-block;
    padding: 8px 14px;
    background: var(--accent);
    border: 0;
    border-radius: 8px;
    color: var(--accent-ink);
    font: inherit;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { background: var(--border); color: var(--muted); cursor: default; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn.ghost:hover { border-color: var(--border-strong); background: var(--panel-hover); }
/* Función de pago sin el plan: lleva a planes en lugar de a la función */
.btn.btn-locked { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.btn.btn-locked:hover { color: var(--text); }

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 20px;
}
.pagination a, .pagination span {
    padding: 8px 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
}
.pagination a:hover { border-color: var(--border-strong); }
.pagination .active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pagination .disabled { color: var(--muted); }

/* Badge List */
.badge-filters {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    padding: 6px 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-top: 4px;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}
.toggle:hover, .toggle.on { color: var(--text); }
.toggle-track {
    position: relative;
    width: 34px;
    height: 20px;
    background: var(--border);
    border-radius: 999px;
    transition: background .15s;
}
.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform .15s;
}
.toggle.on .toggle-track { background: #30a46c; }
.toggle.on .toggle-thumb { transform: translateX(14px); }

@media (max-width: 640px) {
    .badge-filters { flex-direction: column-reverse; gap: 12px; }
    .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; }
}

.badge-summary { margin-bottom: 16px; color: var(--muted); font-size: 14px; }

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}
.badge-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 12px 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color .15s, transform .15s;
}
.badge-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }

/* Los badges de IMVU son de 20x20: se amplían sin suavizar para que se vean nítidos */
.badge-frame {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    background: var(--panel-hover);
    border-radius: 50%;
}
.badge-frame img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    image-rendering: pixelated;
}

.badge-name {
    width: 100%;
    min-height: 2.6em;
    font-size: 14px;
    line-height: 1.3;
    text-align: center;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* diseno-ignorar: SD4 -- chip de estado (público / privado) */
.badge-status {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.badge-status.public { color: #6fbf98; }

.badge-actions {
    display: flex;
    gap: 6px;
    width: 100%;
    margin-top: auto;
}
.badge-actions .btn {
    flex: 1;
    padding: 7px 8px;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* Room History */
.room-card {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    margin-bottom: 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.room-cover { background: #1b1f2a; min-height: 160px; }
.room-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.room-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 18px; min-width: 0; }
.room-body h2 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.room-desc {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.room-meta { margin: 0; color: var(--muted); font-size: 13px; }
.room-dates { display: flex; flex-wrap: wrap; gap: 8px; }
.room-dates select {
    min-width: 80px;
    padding: 6px 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
}
.room-dates select:disabled { color: var(--muted); }
.room-visitors { width: 100%; transition: opacity .15s; }
.room-visitors.loading { opacity: .5; }
.room-visitors-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 14px; }
.room-visitors-head .btn { padding: 5px 10px; font-size: 13px; }
.visitor-list { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.visitor { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.visitor img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #1b1f2a; }
/* Visitante oculto (tabla hidden): círculo con "?" en lugar de la foto */
.visitor-avatar { display: grid; flex-shrink: 0; place-items: center; width: 32px; height: 32px; background: #1b1f2a; border: 1px dashed var(--border-strong); border-radius: 50%; color: var(--muted); font: 600 14px/1 var(--font-body); }
.visitor.is-hidden { color: var(--muted); }

@media (max-width: 640px) {
    .room-card { grid-template-columns: 1fr; }
    .room-cover { aspect-ratio: 16 / 9; min-height: 0; }
}

/* Bulk Report */
.report-progress {
    height: 10px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
}
.report-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--text);
    transition: width .3s;
}
.report-status { margin: 10px 0 18px; color: var(--muted); font-size: 14px; text-align: center; }
.report-log { display: flex; flex-direction: column; gap: 10px; }
.report-entry {
    padding: 12px 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
}
.report-line { display: flex; align-items: baseline; gap: 8px; overflow-wrap: anywhere; }
.report-line::before {
    content: "";
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted);
}
.report-line.ok::before { background: #30a46c; }
.report-line.fail::before, .report-line.flag::before { background: #e5484d; }
.report-line.muted { color: var(--muted); }
.report-line.muted::before { background: var(--muted); }

/* Páginas de cuenta */
.auth-page { max-width: 460px; }
.auth-page h2 { margin: 32px 0 12px; font-size: 18px; }
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.auth-form small { color: var(--muted); font-size: 12px; }
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
}
.auth-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.auth-form .auth-check { flex-direction: row; align-items: center; gap: 8px; color: var(--muted); }
.auth-form .auth-check a { color: var(--text); text-decoration: underline; }
.auth-form .btn { padding: 11px 14px; font-size: 15px; font-weight: 600; }
.auth-inline { margin: 0 0 16px; }
.auth-links { margin-top: 16px; color: var(--muted); font-size: 14px; }
.auth-links a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.auth-links a:hover { text-decoration: underline; }
.auth-details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 16px;
    margin: 0;
    padding: 20px 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.auth-details dt { color: var(--muted); }
.auth-details dd { margin: 0; overflow-wrap: anywhere; }

/* Mi cuenta */
.account-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 20px 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.account-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border: 2px solid currentColor;
    border-radius: 50%;
    background: color-mix(in srgb, currentColor 10%, var(--bg));
    color: var(--muted);
    font-size: 22px;
    font-weight: 600;
}
/* Mismo color que la etiqueta del plan */
.account-avatar.plan-basic { color: var(--tier-basic); }
.account-avatar.plan-pro { color: var(--tier-pro); }
.account-avatar.plan-exclusive { color: var(--tier-exclusive); }
.account-identity { flex: 1; min-width: 0; }
.account-identity h1 { margin: 0; font-size: 22px; overflow-wrap: anywhere; }
.account-meta { display: flex; flex-wrap: wrap; gap: 2px 16px; color: var(--muted); font-size: 13px; }
.account-meta span { overflow-wrap: anywhere; }
.account-header .plan-tag { flex-shrink: 0; height: 24px; padding: 0 10px; }
.account-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 20px;
    align-items: start;
}
.account-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.account-card {
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.account-card h2 { margin: 0 0 12px; font-size: 17px; }
.account-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.account-card-head h2 { margin: 0; }
.account-card-head .btn { padding: 6px 12px; font-size: 13px; white-space: nowrap; }
.account-hint { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.account-hint a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.account-hint a:hover { text-decoration: underline; }
.account-card .subscription-item { background: var(--bg); }
.account-card .subscription-item + .account-inline-form { margin-top: 16px; }
.account-history { margin-top: 14px; }
.account-history summary { color: var(--muted); font-size: 14px; cursor: pointer; user-select: none; }
.account-history summary:hover { color: var(--text); }
.account-history .subscription-list {
    max-height: 280px;
    margin-top: 10px;
    padding-right: 4px;
    overflow-y: auto;
}
.account-form { display: flex; flex-direction: column; gap: 14px; }
.account-inline-form { display: flex; flex-direction: column; gap: 6px; }
.account-form label, .account-inline-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.account-inline-row { display: flex; gap: 8px; }
.account-inline-row input { flex: 1; min-width: 0; }
.account-form small, .account-inline-form small { color: var(--muted); font-size: 12px; }
.account-form input, .account-inline-row input {
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 15px;
}
.account-form input:focus, .account-inline-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.account-form .btn { padding: 10px 14px; font-weight: 600; }
.btn.btn-danger { background: #e5484d; color: #fff; }
.btn.btn-danger:hover { background: #cd3b40; }
.account-danger { border-color: color-mix(in srgb, #e5484d 40%, var(--border)); }
.account-delete summary { color: #e5484d; font-size: 14px; cursor: pointer; user-select: none; }
.account-delete .account-form { margin-top: 14px; }
.account-deletion-pending { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.account-deletion-pending p { margin: 0; }
@media (max-width: 800px) {
    .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .account-header { flex-wrap: wrap; padding: 16px; }
    .account-avatar { width: 48px; height: 48px; font-size: 20px; }
    .account-identity { flex-basis: calc(100% - 64px); }
    .account-header .plan-tag { margin: -8px 0 0 64px; }
    .account-card { padding: 16px; }
    .account-inline-row { flex-direction: column; }
    .account-card .subscription-item { flex-direction: column; align-items: flex-start; }
}

/* Suscripción y planes */
.subscription-plan { margin: 0 0 12px; }
.subscription-plan a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.subscription-list { display: flex; flex-direction: column; gap: 10px; }
.subscription-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.subscription-item form { margin: 0; }
.subscription-meta { margin-top: 4px; color: var(--muted); font-size: 13px; }
.subscription-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}
.subscription-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.subscription-status.status-active { color: #6fbf98; }
.subscription-status.status-past_due, .subscription-status.status-suspended { color: #d8b25e; }
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    scroll-margin-top: calc(var(--topbar-h) + 24px);
}
/* Plan destacado: un tono más claro y la etiqueta encastrada en el borde; su botón
   es el único principal (con acento) de la página */
.plan-card.featured { background: var(--panel-hover); border-color: color-mix(in srgb, var(--text) 45%, transparent); }
.plan-card.current { border-color: var(--text); }
/* Llegada desde un aviso (/plans#basic): el plan que lo resuelve, marcado */
.plan-card:target { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.plan-badge {
    position: absolute;
    top: -11px;
    left: 20px;
    padding: 2px 10px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}
.plans-hero h1 { font-size: 32px; }
.plans-hero .subtitle { max-width: 560px; margin-bottom: 36px; font-size: 16px; }
.plan-trust { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 4px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.plan-trust li { display: inline-flex; align-items: center; gap: 7px; }
.plan-compare-scroll { overflow-x: auto; }
/* Ancho fijo por columna: la de funciones no se come la mitad de la tabla */
.plan-compare table { width: 100%; min-width: 640px; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.plan-compare-label { width: 30%; }
.plan-compare th, .plan-compare td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: center; vertical-align: middle; }
.plan-compare thead th { padding-bottom: 14px; color: var(--text); font-size: 15px; font-weight: 700; vertical-align: bottom; }
.plan-compare-price { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; font-weight: 500; }
.plan-compare tbody th { color: var(--text); font-weight: 500; text-align: left; }
.plan-compare td { color: var(--muted); }
/* Subtítulo de grupo (Todo el sitio / IMVU / Roblox) */
.plan-compare .plan-compare-group th { padding-top: 22px; padding-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 600; text-align: left; }
.plan-compare tfoot td { padding-top: 18px; border-bottom: 0; }
.plan-compare tfoot .btn { width: 100%; padding: 9px 10px; font-weight: 600; white-space: nowrap; }
.plan-compare tfoot form { margin: 0; }
.plan-compare .featured { background: var(--panel); }
.plan-yes { color: var(--text); }
.plan-no { color: var(--border-strong); }
.plan-value { color: var(--text); font-weight: 600; }
.plan-limit { color: var(--muted); }
/* Botones para elegir el plan de la tabla: sólo en móvil y con JS (ver abajo) */
.plan-compare-tabs { display: none; }
.plan-compare-tabs .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
/* Móvil sin JS: la columna de funciones se queda fija al desplazar la tabla hacia los lados */
@media (max-width: 767px) {
    .plan-compare table { min-width: 600px; }
    .plan-compare-label { width: 150px; }
    .plan-compare tbody th, .plan-compare thead th:first-child, .plan-compare tfoot td:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        background: var(--bg);
    }
    .plan-compare .plan-compare-group th { position: static; }

    /* Móvil con JS: un plan a la vez (table[data-col], que cambian los botones), en dos
       columnas, función y valor, sin desplazamiento lateral */
    .js .plan-compare-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
    .js .plan-compare table { min-width: 0; table-layout: auto; }
    .js .plan-compare-label { width: auto; }
    .js .plan-compare tbody th, .js .plan-compare thead th:first-child, .js .plan-compare tfoot td:first-child { position: static; }
    .js .plan-compare table[data-col] :is(thead th, tbody td, tfoot td):not(:first-child) { display: none; }
    .js .plan-compare table[data-col="2"] :is(thead th, tbody td, tfoot td):nth-child(2),
    .js .plan-compare table[data-col="3"] :is(thead th, tbody td, tfoot td):nth-child(3),
    .js .plan-compare table[data-col="4"] :is(thead th, tbody td, tfoot td):nth-child(4),
    .js .plan-compare table[data-col="5"] :is(thead th, tbody td, tfoot td):nth-child(5),
    .js .plan-compare table[data-col="6"] :is(thead th, tbody td, tfoot td):nth-child(6) { display: table-cell; width: 40%; }
}
.plan-yes svg, .plan-no svg { vertical-align: middle; }
.plan-help { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.plan-help a { color: var(--text); text-underline-offset: 3px; }
.plan-amount { font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.plan-period { color: var(--muted); font-size: 15px; font-weight: 500; }
.plan-perk-detail { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.plan-card h2 { margin: 0; font-size: 20px; }
.plan-card form { margin: 0; }
.plan-card .btn { width: 100%; padding: 10px 14px; font-weight: 600; }
.plan-price { margin: 4px 0 0; line-height: 1.1; }
.plan-perks { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 8px; padding: 0; list-style: none; font-size: 14px; line-height: 1.45; }
.plan-perks li { display: flex; gap: 8px; align-items: flex-start; }
.plan-perks li svg { flex-shrink: 0; margin-top: 3px; color: var(--muted); }
/* Juego de la app a la que se refiere una ventaja (IMVU / Roblox) */
.game-tag { margin-left: 4px; color: var(--muted); font-size: 10px; vertical-align: 1px; white-space: nowrap; }
.plan-daily { margin: -2px 0 0; color: var(--muted); font-size: 13px; }
/* El botón de pago abajo, alineado entre tarjetas con listas de distinto largo */
.plan-card > form, .plan-card > .btn { margin-top: auto; }
.quota-reached { margin: 0; }
.plan-current {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

/* Radio Directory */
.radio-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}
.radio-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color .15s;
}
.radio-card:hover { border-color: var(--border-strong); }
.radio-head { display: flex; gap: 12px; min-width: 0; }
.radio-play {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--accent);
    border: 0;
    border-radius: 50%;
    color: var(--accent-ink);
    cursor: pointer;
}
.radio-play:hover { background: var(--accent-hover); }
.radio-play:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }
.radio-play.playing { background: #30a46c; }
.radio-info { flex: 1; min-width: 0; }
/* Hay emisoras con nombres de varias líneas: se cortan a 2 (el completo va en el title) */
.radio-name {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.radio-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 12px; }
.radio-tag {
    padding: 0 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: .04em;
}
.radio-tag.secure { border-color: #30a46c; color: #6fbf98; }
.radio-genre { overflow: hidden; max-width: 160px; text-overflow: ellipsis; white-space: nowrap; }
.radio-track {
    overflow: hidden;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.radio-url { display: flex; gap: 8px; }
.radio-url input {
    flex: 1;
    min-width: 0;
    padding: 7px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: 12px ui-monospace, SFMono-Regular, Consolas, monospace;
}
.radio-url input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.radio-url .btn { padding: 6px 12px; font-size: 13px; }
.radio-logo { margin-right: 4px; border-radius: 4px; vertical-align: -3px; object-fit: contain; }
.search select {
    max-width: 200px;
    padding: 0 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
}
.search select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }

.radio-player {
    position: sticky;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 10px 14px;
    background: var(--panel-hover);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.radio-player[hidden] { display: none; }
.radio-player .radio-play { background: #30a46c; }
.radio-player-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.radio-player-name { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.radio-player-status { color: var(--muted); font-size: 12px; }
.radio-player input[type="range"] { width: 110px; accent-color: var(--accent); }

@media (max-width: 480px) {
    .radio-list { grid-template-columns: 1fr; }
    .radio-player input[type="range"] { display: none; }
    .search:has(select) { flex-wrap: wrap; }
    .search:has(select) input { flex-basis: 100%; }
    .search select { flex: 1; max-width: none; padding: 10px 12px; }
}

.result { flex-wrap: wrap; }

/* Pantallas táctiles: en iPhone, un campo con letra de menos de 16 px amplía la página al
   tocarlo y la deja ampliada. Los campos del sitio (12-15 px en escritorio) suben a 16 px.
   Al final del archivo y con los mismos selectores: así ganan a los de arriba */
@media (pointer: coarse) {
    .search input, .search select,
    .search.app-search input, .search.app-search select,
    .auth-form input[type], .account-form input, .account-inline-row input,
    .rbx-calc-field input, .rbx-calc-field select,
    .room-dates select, .radio-url input { font-size: 16px; }
}
