.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #e5002b;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* =========================================================================
   EyeGO / EyePad2 — tema claro cálido (spec EyeGO v.22)
   Paleta: rojo/crimson de acento + gradiente cálido rosa→naranja→dorado.
   ========================================================================= */
:root {
    --bg: #f4f4f6;          /* fondo general */
    --panel: #ffffff;       /* tarjetas / superficies */
    --panel-2: #f5f5f8;
    --border: #e7e7ec;
    --text: #2a2a30;        /* texto principal */
    --muted: #8a8a93;
    /* nombres heredados reapuntados a la paleta EyeGO para que la app entera siga */
    --navy: #e5002b;        /* barra de selección (antes azul marino) → rojo EyeGO */
    --blue: #e5002b;        /* títulos de tarjeta → rojo EyeGO */
    --pink: #e5002b;        /* acento (antes magenta) → rojo/crimson EyeGO */
    --purple: #9c2a90;      /* púrpura del iso (acento secundario) */
    --accent: var(--pink);
    /* gradiente cálido de marca (degradado.jpg): rosa-rojo → naranja → dorado */
    --warm1: #e73e5d;
    --warm2: #f07d4e;
    --warm3: #f5b93f;
    --grad: linear-gradient(135deg, var(--warm1), var(--warm2) 55%, var(--warm3));
    --grad-h: linear-gradient(90deg, var(--warm1), var(--warm2) 55%, var(--warm3));
    --radius: 16px;
    font-synthesis: none;
}

/* Tema MyBuy Pro: reapunta la paleta a azul-marino / magenta / púrpura (la app entera
   usa estos mismos nombres de variable, así que basta con reasignarlos). */
:root.brand-mybuy {
    --navy: #232f55;   /* barra de selección */
    --blue: #4a8fd4;   /* títulos de tarjeta */
    --pink: #e0218a;   /* acento magenta */
    --purple: #7b2ff7;
    --warm1: #e0218a;
    --warm2: #9b30c9;
    --warm3: #7b2ff7;
    --grad: linear-gradient(135deg, #e0218a, #7b2ff7);
    --grad-h: linear-gradient(90deg, #e0218a, #7b2ff7);
}

* { box-sizing: border-box; }

html, body, #app { height: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.app-main { height: 100%; }

/* ---- logotipo (iso-tipo iris EyeGO) ---- */
.brand { display: inline-block; width: 2.1em; height: 2.1em; user-select: none; vertical-align: middle; }

/* ---- wordmark "mybuy pro" (calcado de la app real): dos círculos solapados
   (azul-violeta + rosa), "my" gris oscuro, "buy" rosa orquídea y pastilla "pro"
   oscura DEBAJO del wordmark. Colores fijos (no siguen el tema). ---- */
.wm {
    display: inline-flex; align-items: center; gap: 1px; line-height: 1;
    user-select: none; vertical-align: middle; font-size: 1rem;
    position: relative; padding-bottom: 0.72em;   /* hueco para la pastilla "pro" */
}
.wm__dot { width: 0.92em; height: 0.92em; border-radius: 50%; display: inline-block; }
.wm__dot--blue { background: #6b7be2; opacity: 0.92; margin-right: -0.42em; }
.wm__dot--pink { background: #e768cc; opacity: 0.88; margin-right: 0.10em; }
.wm__my  { font-weight: 800; font-size: 1.5em; color: #3a3a3f; letter-spacing: -0.02em; }
.wm__buy { font-weight: 800; font-size: 1.5em; color: #df63c5; letter-spacing: -0.02em; }
.wm__pro {
    position: absolute; top: 100%; margin-top: -0.68em; left: 52%;
    font-weight: 700; font-size: 0.62em; color: #fff;
    background: #3a3a3f; border-radius: 5px; padding: 2px 8px;
}
.wm--big { font-size: 1.7rem; }

/* ---- portada (réplica) ---- */
.portada {
    position: relative;
    height: 100%;
    display: flex; flex-direction: column;
    padding: 22px 30px;
    overflow: auto;
    /* Original EyePad textures: preserve petal geometry at every aspect ratio. */
    background:
        url('../img/eyepad-home-background.png') right bottom / auto 100% no-repeat,
        url('../img/eyepad-home-background-left.png') left top / 100% 100% no-repeat,
        #eee;
}
/* Portada MyBuy Pro: halos magenta / azul / púrpura (los cálidos son de EyeGO). */
.brand-mybuy .portada {
    /* blobs difusos rosa/azul abajo-derecha (main.png 2.1.2) */
    background:
        radial-gradient(circle 340px at 88% 84%, rgba(233, 92, 190, 0.34), transparent 68%),
        radial-gradient(circle 250px at 70% 92%, rgba(110, 150, 220, 0.30), transparent 68%),
        radial-gradient(42% 50% at 12% 88%, rgba(224, 33, 138, 0.07), transparent 70%),
        #eeeef0;
}
.portada__top {
    display: flex; align-items: flex-start; justify-content: space-between;
    font-size: 1.25rem;
}
.portada__tools { display: flex; gap: 26px; }
.portada__tool {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: none; cursor: pointer; text-decoration: none;
    color: #3a3a42; font-size: 0.8rem;
}
.portada__tool svg { width: 22px; height: 22px; }
.portada__toolimg { width: 24px; height: 24px; object-fit: contain; }
.portada__tool:hover { color: var(--pink); }

.portada__showinfo {
    position: absolute; right: 22px; bottom: 34px;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: none; cursor: pointer;
    color: #3a3a42; font-size: 0.8rem; z-index: 5;
}
.portada__showinfo svg { width: 26px; height: 26px; }
.portada__showinfo-img { width: 26px; height: 26px; object-fit: contain; }
.portada__showinfo:hover { color: var(--pink); }

.info-pop {
    position: fixed; inset: 0; z-index: 50;
    display: flex; align-items: center; justify-content: center;
    background: rgba(30, 24, 24, 0.3);
}
.info-pop__card {
    background: #fff; border-radius: 14px; padding: 22px 26px;
    box-shadow: 0 20px 60px rgba(40, 30, 30, 0.25);
    max-width: 360px; text-align: center;
}
.info-pop__card strong { color: var(--pink); }
.info-pop__card p { color: var(--text); margin: 8px 0 0; }

.portada__grid {
    flex: 1;
    display: flex; flex-direction: column; justify-content: center;
    gap: 22px;
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 0;
}
.portada__grid::before, .portada__grid::after { content: none; }

/* EyePad's approved four-card home; scoped to keep MyBuy's layout intact. */
.portada--eyepad .portada__grid {
    max-width: 760px;
    gap: 18px;
    padding: 28px 0 90px;
}
.portada__heading {
    margin: 0 0 26px;
    color: var(--blue);
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 650;
    text-transform: uppercase;
}
.portada--eyepad .portada__row { gap: 18px; }
.portada--eyepad .pcard {
    flex: 1 1 0 !important;
    padding: 22px 24px;
    border: 1px solid rgba(90, 64, 64, .18);
    min-height: 190px;
}
.portada--eyepad .pcard__title {
    text-transform: uppercase;
    font-weight: 650;
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    margin-bottom: 24px;
}
.portada--eyepad .pcard__items { justify-content: flex-start; gap: 8px; }
.portada--eyepad .pitem { width: calc(50% - 4px); padding: 6px 0; }
.portada--eyepad .portada__tool { max-width: 110px; text-align: center; text-transform: uppercase; }
@media (max-width: 680px) {
    .portada--eyepad .portada__grid { padding-top: 24px; }
    .portada--eyepad .portada__heading { margin-bottom: 6px; }
    .portada--eyepad .pcard { min-height: 165px; }
}
@media (max-width: 620px) {
    .portada--eyepad .portada__grid { flex: none; padding-bottom: 24px; }
    .portada--eyepad .portada__showinfo,
    .portada--eyepad .rxdock {
        position: static;
        align-self: flex-end;
        flex-shrink: 0;
        margin-bottom: 10px;
    }
    .portada--eyepad .portada__version { position: static; align-self: flex-end; }
}
/* EyePad 3.0 adds Personalizada, HOA and the frames comparison to that home: each card
   takes a width proportional to its items, which share the card evenly. */
.portada--eyepad3 .portada__grid { max-width: 960px; }
.portada--eyepad3 .pcard { flex: var(--pcard-items, 1) 1 0 !important; padding: 22px 20px; }
.portada--eyepad3 .pcard__items { gap: 6px; }
.portada--eyepad3 .pitem { flex: 1 1 0; width: auto; min-width: 0; }
.portada__row { display: flex; gap: 22px; }

.pcard {
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(35, 47, 85, 0.10);
    padding: 20px 26px 22px;
    min-width: 0;
}
/* Negrilla como la pantalla inicial real (Tipos de lentes, Espesor / Diseño…) */
.pcard__title { margin: 0 0 14px; font-size: 1.22rem; font-weight: 800; color: var(--blue); }
.pcard__items { display: flex; justify-content: space-around; gap: 10px; }

.pitem {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    background: none; border: none; cursor: pointer;
    color: var(--text); font-size: 0.92rem;
    padding: 6px 10px; border-radius: 12px;
    transition: transform .15s, background .15s;
}
.pitem:hover { transform: translateY(-3px); background: rgba(229, 0, 43, 0.06); }
.demo-icon {
    display: block;
    width: 56px;
    height: 56px;
    overflow: visible;
}
.demo-icon__primary { stroke: var(--warm1); }
.demo-icon__accent { stroke: var(--warm3); }
.demo-icon__fill-accent { fill: var(--warm3); }
.circle-btn__img { width: 32px; height: 24px; object-fit: contain; }
.pitem__label { color: #4b5365; }

.portada__version {
    position: absolute; right: 18px; bottom: 12px;
    font-size: 0.78rem; color: var(--muted);
}

/* panel de graduación por ojo (Mostrar Info, app real 2.1.2) */
.rxpanel {
    position: absolute; left: 50%; bottom: 26px;
    transform: translateX(-50%);
    z-index: 8;
    display: flex; gap: 34px;
    background: #fff; border-radius: 6px;
    box-shadow: 0 12px 40px rgba(40, 30, 30, 0.18);
    padding: 16px 22px 20px;
}
.rxpanel__eye h3 {
    margin: 0 0 12px;
    background: #5a5a5e; color: #fff;
    font-size: 0.78rem; font-weight: 600;
    padding: 5px 12px;
}
.rxpanel__grid {
    display: grid;
    grid-template-columns: auto auto auto auto;
    gap: 12px 10px; align-items: center;
}
.rxpanel__grid label { font-size: 0.82rem; color: #4a4a4e; text-align: right; }
.rxchip {
    display: inline-block; min-width: 62px; text-align: center;
    border: 1px solid #c8c8cc; border-radius: 999px;
    background: #f2f2f4;
    padding: 5px 12px; font-size: 0.85rem; font-weight: 600; color: #3a3a3f;
}
.rxpanel__reset {
    position: absolute; right: 30px; bottom: 150px;
    z-index: 8;
    width: 58px; height: 58px; border-radius: 50%;
    border: none; background: #fff; color: #e5002b;
    box-shadow: 0 8px 26px rgba(40, 30, 30, 0.2);
    cursor: pointer;
}
.rxpanel__reset svg { width: 26px; height: 26px; }

/* Graduación por ojo (EyePad «Mostrar Info» y Ajustes), copiada de la app real 2.1.2:
   barra gris oscura con el ojo, pares etiqueta + píldora y lista de valores al pulsar. */
.prescription-editor { position: relative; display: flex; flex-wrap: wrap; gap: 16px 34px; }
.prescription-editor__eye { min-width: 0; flex: 1 1 360px; }
.prescription-editor__head {
    margin: 0 0 12px; padding: 4px 12px;
    background: #5a5a5e; color: #fff;
    font-size: .8rem; font-weight: 500;
}
.prescription-editor__grid { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 30px; justify-content: start; }
.rxpanel--eyepad .prescription-editor { flex-wrap: nowrap; }
.rxpanel--eyepad .prescription-editor__eye { flex: 0 0 auto; }
.rxfield { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.rxfield__label { font-size: .86rem; color: #4a4a4e; white-space: nowrap; }
.rxpill {
    min-width: 72px; height: 32px; padding: 0 12px;
    border: 1px solid #c3c3c8; border-radius: 999px;
    background: #ececef; color: #3a3a3f;
    font: inherit; font-size: .95rem; cursor: pointer;
}
.rxfield--open .rxfield__label { color: var(--pink); font-weight: 600; }
.rxfield--open .rxpill { border: 2px solid var(--pink); background: #fff; }
.rxpick {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 3;
    width: 116px; max-height: min(420px, 55vh); overflow-y: auto;
    background: #fff; border: 1.5px solid var(--pink); border-radius: 8px;
    box-shadow: 0 14px 36px rgba(40, 30, 30, .22);
}
.prescription-editor--up .rxpick { top: auto; bottom: calc(100% + 6px); }
.rxpick__item {
    position: relative; display: block; width: 100%;
    padding: 9px 0; border: 0; border-bottom: 1px solid #e3e3e7;
    background: none; color: #3a3a3f; font: inherit; font-size: 1rem; cursor: pointer;
}
.rxpick__item:hover { background: #f6f6f8; }
.rxpick__item[aria-selected="true"] { font-weight: 700; }
.rxpick__item[aria-selected="true"]::before {
    content: ""; position: absolute; left: 12px; top: 50%;
    width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--pink);
}
.rxpick-backdrop { position: fixed; inset: 0; z-index: 2; }
/* Panel de la portada: banda baja centrada (sin transform: la lista y su fondo de cierre
   usan position:fixed/absolute y un transform los recortaría al panel). */
.rxpanel.rxpanel--eyepad {
    left: 0; right: 0; bottom: 22px; transform: none;
    width: fit-content; max-width: calc(100vw - 32px); margin: 0 auto; box-sizing: border-box;
    display: block; padding: 14px 14px 16px; border-radius: 2px;
}
.rxpanel-backdrop { position: fixed; inset: 0; z-index: 7; }
/* «Mostrar Info» de EyePad: abierto, un marco translúcido reúne reinicio y botón en rojo. */
.rxdock {
    position: absolute; right: 18px; bottom: 30px; z-index: 9;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 12px 10px 10px; border-radius: 22px;
}
.rxdock--on { background: rgba(240, 240, 242, .82); box-shadow: 0 6px 22px rgba(40, 30, 30, .10); }
.rxdock__reset { width: 56px; height: 56px; padding: 0; border: 0; background: none; color: var(--pink); cursor: pointer; }
.rxdock__reset svg { width: 46px; height: 46px; }
.rxdock__info {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 0; border: 0; background: none; cursor: pointer;
    color: #3a3a42; font-size: .8rem;
}
.rxdock__info[aria-pressed="true"] { color: var(--pink); }
.rxdock__icon {
    width: 30px; height: 30px; background: currentColor;
    -webkit-mask: url("../img/ui/top/showinfo.png") center / contain no-repeat;
    mask: url("../img/ui/top/showinfo.png") center / contain no-repeat;
}
.rx-eye-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 6px; }
.rx-eye-picker button { border: 1px solid #d2d4d8; border-radius: 5px; padding: 3px 10px; background: #fff; color: #34343b; font-size: .75rem; cursor: pointer; }
.rx-eye-picker button[aria-pressed="true"] { background: var(--warm1); color: #fff; border-color: var(--warm1); }
.rx-eye-picker small { grid-column: 1 / -1; color: #575963; font-size: .65rem; text-align: center; }
.aj__body > .prescription-editor { max-width: 740px; margin: 0 auto 24px; padding: 20px; background: #fff; border-radius: 8px; }
@media (max-width: 1000px) {
    .sim2__header:has(.rx-eye-picker) { grid-template-columns: auto 1fr; }
    .sim2__header:has(.rx-eye-picker) .sim2__actions { grid-column: 1 / -1; margin-top: 6px; justify-self: center; }
    .rx-eye-picker small { max-width: 270px; }
}
@media (max-width: 860px) {
    /* Tableta vertical / móvil: los dos ojos se apilan; el marco deja sitio a la derecha. */
    .rxpanel.rxpanel--eyepad { width: min(440px, calc(100vw - 140px)); margin: 0 0 0 16px; }
    .rxpanel--eyepad .prescription-editor { flex-wrap: wrap; }
    .prescription-editor__eye,
    .rxpanel--eyepad .prescription-editor__eye { flex: 1 1 100%; }
}

/* ---- splash (iso-tipo EyeGO) ---- */
.splash {
    height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(60% 60% at 50% 45%, #ffffff 0%, #ececef 100%);
}
.splash__logo {
    display: inline-flex; align-items: center; justify-content: center;
    animation: splashPulse 1.4s ease-in-out infinite;
}
.splash__logo .brand { width: 140px; height: 140px; }
.splash__logo .wm { font-size: 3rem; }
@keyframes splashPulse {
    0%, 100% { transform: scale(1); opacity: 0.92; }
    50% { transform: scale(1.06); opacity: 1; }
}

/* ---- login (ID + contraseña) ---- */
.login {
    height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    background: radial-gradient(60% 60% at 50% 40%, #ffffff 0%, #ececef 100%);
    padding: 16px;
}
.login__logo { display: inline-flex; align-items: center; justify-content: center; height: 74px; }
.login__logo .brand { width: 72px; height: 72px; }
.login__logo .wm { font-size: 1.7rem; }
.login__card {
    width: min(560px, 94vw);
    background: var(--panel);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(40, 30, 30, 0.16);
    padding: 40px clamp(28px, 7vw, 90px) 48px;
}
.login__title { margin: 0 0 26px; font-size: 1.5rem; font-weight: 800; color: var(--text); }
.login__input {
    display: block; width: 100%;
    font-size: 1rem; color: var(--text);
    background: #fff;
    border: 1.5px solid var(--border); border-radius: 999px;
    padding: 14px 22px; margin-bottom: 16px; outline: none;
    transition: border-color .15s;
}
.login__input::placeholder { color: var(--muted); }
.login__input:focus { border-color: var(--warm2); }
/* el campo de contraseña lleva un borde con gradiente cálido (como el mockup) */
.login__input--pwd {
    border: 1.5px solid transparent;
    background:
        linear-gradient(#fff, #fff) padding-box,
        var(--grad-h) border-box;
}
.login__input--error { box-shadow: 0 0 0 2px #ef4444; }
.login__error { color: #dc2626; font-size: 0.86rem; margin: -6px 0 14px; }
.login__btn { width: 100%; margin-top: 8px; border-radius: 999px; padding: 14px; font-size: 1.05rem; }
/* glifo neutro del login: la app aún no se conoce (la decide la inicial del ID) */
.login__glyph { width: 110px; height: auto; color: #b9b9c2; }

.btn-primary {
    display: inline-block;
    background: var(--grad);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: filter .15s, transform .15s;
    font-size: 1rem;
}
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }

/* ---- simulador (estructura app real) ---- */
.sim2 { display: flex; flex-direction: column; height: 100%; }

.sim2__header {
    flex: 0 0 auto;
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background: #fff;
    padding: 10px 22px;
    font-size: 1.05rem;
}
.sim2__brand { justify-self: start; text-decoration: none; }
.sim2__title {
    margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--pink);
    justify-self: center;
}
/* MyBuy Pro: el título del simulador es oscuro (el rojo/rosa es de EyeGO). */
.brand-mybuy .sim2__title { color: #1e222c; }
.sim2__actions { justify-self: end; display: flex; align-items: center; gap: 14px; }
.sim2__pen {
    background: none; border: none; cursor: pointer; padding: 4px;
    color: #444c5e; display: flex;
}
.sim2__pen svg { width: 24px; height: 24px; }
.sim2__pen:hover { color: var(--pink); }
.sim2__burger {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 6px;
}
.sim2__burger span { width: 26px; height: 2.5px; background: #444c5e; border-radius: 2px; }

/* barra (roja EyeGO) de selección de lente */
.selbar {
    flex: 0 0 auto;
    display: flex;
    background: var(--navy);
    color: #fff;
    min-height: 44px;
}
.selbar__half {
    flex: 1;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.selbar__half + .selbar__half { border-left: 1px solid rgba(255,255,255,0.18); }
.selbar__icon { font-size: 1.05rem; opacity: 0.9; }
.selbar__select {
    background: transparent;
    color: #fff;
    border: none;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    max-width: 70vw;
}
.selbar__select option { color: var(--text); background: #fff; }

/* desplegable propio de la barra (panel oscuro translúcido, como la app real) */
.sbdd { position: relative; display: flex; align-items: center; }
.sbdd__btn {
    display: flex; align-items: center; gap: 12px;
    background: none; border: none; color: #fff; cursor: pointer;
    font: inherit; font-weight: 600; font-size: 0.98rem;
    padding: 4px 6px;
}
.sbdd__label {
    max-width: 40vw;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sbdd__caret {
    width: 0; height: 0; margin-left: 16px;
    border-left: 6px solid transparent; border-right: 6px solid transparent;
    border-top: 7px solid #fff;
}
.sbdd__backdrop { position: fixed; inset: 0; z-index: 28; }
.sbdd__panel {
    position: absolute; top: calc(100% + 12px); left: 50%;
    transform: translateX(-50%);
    z-index: 29;
    min-width: 340px;
    background: rgba(74, 74, 78, 0.88);
    border-radius: 4px;
    box-shadow: 0 18px 50px rgba(20, 16, 16, 0.35);
    padding: 6px 0;
    backdrop-filter: blur(3px);
}
.sbdd__opt {
    display: flex; align-items: center; gap: 15px;
    width: 100%; padding: 13px 24px;
    background: none; border: none; cursor: pointer;
    color: #fff; font: inherit; font-size: 0.95rem; text-align: left;
}
.sbdd__opt .selbar__icon-svg { color: #fff; }
.sbdd__opt--sel { color: var(--pink); }
.sbdd__opt--sel .selbar__icon-svg { color: var(--pink); }
.sbdd__opt--dis { opacity: 0.4; cursor: default; }
.sbdd__opt:hover:not(:disabled):not(.sbdd__opt--sel) { background: rgba(255, 255, 255, 0.07); }

/* escenario */
.sim2__stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    background: #dfe3ea;
    overflow: hidden;
}

.lens-canvas-host { position: relative; width: 100%; height: 100%; }
.lens-canvas { display: block; width: 100%; height: 100%; }

.lens-overlay {
    position: absolute; inset: 0;
    z-index: 20;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; text-align: center; padding: 24px;
    background: rgba(246, 247, 249, 0.94); color: var(--text);
}
.lens-overlay--scene-loading { background: #dfe3ea; }
.lens-overlay--error h3 { margin: 4px 0; }
.lens-overlay__icon { font-size: 2.4rem; }
.lens-overlay__hint { color: var(--muted); font-size: 0.84rem; max-width: 520px; word-break: break-word; }
.lens-spinner {
    width: 38px; height: 38px; border-radius: 50%;
    border: 3px solid var(--border); border-top-color: var(--pink);
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.lens-fps {
    position: absolute; top: 10px; right: 12px;
    font-size: 0.72rem; color: #16a34a;
    background: rgba(255,255,255,0.7); border: 1px solid var(--border);
    padding: 3px 8px; border-radius: 7px; font-variant-numeric: tabular-nums;
}
.lens-toast {
    position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
    max-width: 80%;
    font-size: 0.8rem; color: #991b1b;
    background: #fee2e2; border: 1px solid #fca5a5;
    padding: 7px 13px; border-radius: 9px;
}

/* ---- camera notice (CameraNotice): there is a camera but it cannot be used right now ---- */
.cam-notice {
    position: absolute; inset: 0; z-index: 30;
    display: grid; place-items: center; padding: 18px;
    background: rgba(24, 22, 26, 0.36);
    animation: cam-notice-in .18s ease-out;
}
@keyframes cam-notice-in { from { opacity: 0; } }
.cam-notice__card {
    width: min(100%, 390px);
    background: #fff; border-radius: 18px;
    padding: 26px 26px 22px; text-align: center;
    box-shadow: 0 20px 60px rgba(40, 30, 30, 0.28);
}
.cam-notice__icon {
    display: grid; place-items: center;
    width: 64px; height: 64px; margin: 0 auto 14px;
    border-radius: 50%; background: var(--grad); color: #fff;
}
.cam-notice__icon svg { width: 36px; height: 36px; }
.cam-notice__card h3 { margin: 0 0 8px; font-size: 1.15rem; color: var(--pink); }
.cam-notice__card p { margin: 0; color: var(--text); font-size: 0.95rem; line-height: 1.45; }
.cam-notice__actions { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.cam-notice__actions button { font: inherit; font-size: 0.92rem; font-weight: 700; padding: 11px 22px; }
.cam-notice__close {
    border-radius: 12px; border: 1px solid #d8dde6;
    background: #fff; color: #4b5365; cursor: pointer;
}
.cam-notice__close:hover { background: #f5f6f8; }
.cam-notice__actions button:disabled { opacity: 0.55; cursor: default; }

/* indicador central de arrastre */
.drag-hint {
    position: absolute; left: 50%; top: 50%;
    width: 150px; height: 150px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(20, 24, 34, 0.45);
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.drag-hint svg { width: 70%; height: 70%; }

/* botones circulares (abajo izquierda) */
.circles {
    position: absolute; bottom: 16px;
    display: flex; gap: 12px;
    z-index: 2;   /* por encima de la capa de arrastre del aspa (diseño) */
}

/* Diseño: el capturador normal coincide con la lente; el resto del escenario
   queda libre para el paneo 360. Al arrastrar se amplía hasta los bordes. */
.cross-capture {
    position: absolute;
    z-index: 1; cursor: grab;
    touch-action: none;
}
.cross-capture--lens { border-radius: 50%; }
.cross-capture--dragging { inset: 0; cursor: grabbing; }
.circles--left { left: 16px; }
.circles--right { right: 16px; }

.circle-btn {
    width: 72px; height: 72px; border-radius: 50%;
    background: #fff;
    border: 2px solid transparent;
    box-shadow: 0 4px 14px rgba(35, 47, 85, 0.18);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    cursor: pointer;
    color: #4b5365;
    font-size: 0.56rem; line-height: 1.15; text-align: center;
    padding: 4px;
    transition: border-color .15s, color .15s;
}
.circle-btn__icon { font-size: 1.25rem; line-height: 1; }
.circle-btn__svg { width: 26px; height: 26px; flex: 0 0 auto; }
.action-icon { overflow: visible; }
.action-icon__primary { stroke: var(--warm1); }
.action-icon__accent { stroke: var(--warm3); }
.action-icon__fill-accent { fill: var(--warm3); }
.action-icon__fill-bg { fill: #fff; }
.action-icon__swatch { stroke: #fff; }
.action-icon__swatch--gray { fill: #7b818c; }
.action-icon__swatch--brown { fill: #8b5b3f; }
.action-icon__swatch--green { fill: #49735d; }
.circle-btn--on .action-icon { transform: scale(1.04); }
.circle-btn:hover { border-color: #d8dde6; }
.circle-btn--on { border-color: var(--pink); color: var(--pink); }

.circles--right { align-items: flex-start; }
.value-control { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.value-chip {
    width: 72px; height: 72px; border-radius: 50%;
    background: #fff;
    border: 2px solid transparent;
    box-shadow: 0 4px 14px rgba(35, 47, 85, 0.18);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #4b5365;
    font-size: 0.6rem;
    cursor: pointer;
    transition: border-color .15s;
}
.value-chip:hover { border-color: #e8b6d2; }
.value-chip--active { border-color: var(--pink); color: var(--pink); }
.value-chip--active strong { color: var(--pink); }
.value-chip strong { font-size: 1.02rem; color: #20283c; font-variant-numeric: tabular-nums; }

/* botones −/+ bajo el círculo de valor seleccionado */
.value-step { display: flex; gap: 10px; }
.value-step button {
    width: 52px; height: 52px; border-radius: 50%;
    background: #fff; border: none;
    box-shadow: 0 4px 14px rgba(35, 47, 85, 0.18);
    color: #20283c; font-size: 1.5rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s;
}
.value-step button:hover { background: var(--pink); color: #fff; }
.value-step--row { gap: 12px; }

/* círculos centrales (Tradicional/Conducción, escenas de diseño, escenarios de tratamiento) */
.circles--center {
    position: absolute; left: 50%; bottom: 14px;
    transform: translateX(-50%);
    display: flex; gap: 10px;
    z-index: 3;
}

/* barra de selección: iconos SVG (trazo rosa) y etiquetas fijas (comparar sin opciones) */
.selbar__icon-svg { width: 22px; height: 22px; color: var(--pink); flex: none; }
.selbar__fixed { color: #fff; font-weight: 600; font-size: 0.92rem; }

/* tratamiento: columna derecha (Sin/Con arriba, modos Película/Interactivo debajo) */
.circles--treat { flex-direction: column; align-items: flex-end; gap: 10px; }
.treat-modes { display: flex; gap: 10px; }

/* conmutador Sin/Con tratamiento sobre el escenario */
.seg--stage {
    background: #fff; border-radius: 999px; padding: 4px;
    box-shadow: 0 4px 14px rgba(35, 47, 85, 0.18);
    display: flex; gap: 4px;
}
.seg--stage .seg__btn { border-radius: 999px; padding: 8px 14px; font-size: 0.8rem; }

/* rótulos de ejes ESF/CIL sobre la lente redonda (demo diseño) */
.axis-pill {
    position: absolute; z-index: 3;
    transform: translate(-50%, -50%);
    background: #232f55; color: #fff;
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em;
    padding: 4px 9px; border-radius: 999px;
    pointer-events: none;
}

/* menú de navegación (hamburguesa, como la app real): secciones + demos */
.drawer--nav {
    padding: 26px 8px 26px 22px;
    border-left: 3px solid var(--pink);
    overflow-y: auto;
}
.navmenu__section { margin-bottom: 20px; }
.navmenu__title {
    margin: 0 0 6px;
    color: var(--pink);
    font-size: 1.02rem; font-weight: 700;
}
.navmenu__item {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 7px 10px;
    background: none; border: none; border-radius: 10px;
    cursor: pointer; font: inherit; font-size: 0.92rem; color: var(--text);
    text-align: left;
}
.navmenu__item .demo-icon { width: 30px; height: 30px; flex: none; }
.navmenu__item:hover { background: rgba(0, 0, 0, 0.05); }
.navmenu__item--on { background: rgba(0, 0, 0, 0.06); font-weight: 600; }

/* vista Modelo de la fotocromática: foto real con lentes teñidas por lado */
.fmodel {
    position: absolute; inset: 0;
    z-index: 2;
    display: flex;
    background: #101012;
}
.fmodel__half { position: relative; flex: 1; overflow: hidden; }
.fmodel__half + .fmodel__half { border-left: 2px solid rgba(255, 255, 255, 0.85); }
.fmodel__half img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
/* capa tintada del fundido gradual (opacidad = activación fotocromática) */
.fmodel__tinted { position: absolute; inset: 0; }

/* anillo giratorio sobre el botón Interior/Exterior mientras dura la transición
   (círculos GRANDES y bien visibles, como la app real) */
.circle-btn--ring { position: relative; }
.circle-btn--ring::after {
    content: ""; position: absolute; inset: -16px; border-radius: 50%;
    border: 8px dotted rgba(214, 214, 219, 0.95);
    animation: mbp-ringspin 1.6s linear infinite;
    pointer-events: none;
}
@keyframes mbp-ringspin { to { transform: rotate(360deg); } }
.fmodel__half svg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}
.fmodel__half polygon { mix-blend-mode: multiply; }

/* aspas S/C rotables sobre la lente redonda (demo HOA 1, como la app real) */
.aspas {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    z-index: 3;
    pointer-events: none;
}
.aspas line { stroke: #ef4f9d; stroke-width: 1.6; }
.aspas__knob {
    fill: #232f55; stroke: #fff; stroke-width: 1.5;
    pointer-events: auto; cursor: grab;
}
/* EyePad: the red-orange of its ESF/CIL cross instead of MyBuy's pink and navy. */
.brand-eyego .aspas line { stroke: #f5450d; }
.brand-eyego .aspas__knob { fill: #4a4a4e; }
.aspas text {
    fill: #fff; font-size: 13px; font-weight: 700;
    text-anchor: middle; pointer-events: none; user-select: none;
}
.aspas__capture {
    position: absolute; inset: 0;
    z-index: 4; cursor: grabbing;
    touch-action: none;
}

/* chips de personalización v2 (EyePad): círculos con icono, +/− al lado del activo */
.fit-item { position: relative; display: flex; align-items: center; }
.value-chip--fit .fit-ico { width: 26px; height: 26px; margin-bottom: 1px; }
.value-chip--fit .fit-lab {
    font-size: 0.56rem; line-height: 1.05; text-align: center;
    max-width: 64px; overflow: hidden;
}
.fit-step {
    position: absolute; left: calc(100% + 6px); top: 50%;
    transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 8px;
}
.fit-step button {
    width: 30px; height: 30px; border-radius: 50%;
    border: none; background: #fff; color: #3a3a3f;
    font-size: 1.05rem; font-weight: 600; cursor: pointer;
    box-shadow: 0 4px 12px rgba(35, 30, 30, 0.22);
}

/* chips de personalización (demo Personalizada): columna vertical al lado derecho */
.fit-chips {
    position: absolute; right: 50px; top: 46%;
    transform: translateY(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    z-index: 3;
}
.value-chip--fit { width: 86px; height: 86px; flex-direction: column; gap: 0; }
.value-chip--fit strong { font-size: 1.02rem; }

/* etiquetas del modo comparar */
.compare-label {
    position: absolute; top: 12px;
    font-size: 0.78rem; font-weight: 600; color: var(--text);
    background: rgba(255,255,255,0.85); border: 1px solid var(--border);
    padding: 5px 12px; border-radius: 999px;
    pointer-events: none;
}
.compare-label--left  { left: 25%; transform: translateX(-50%); }
.compare-label--right { left: 75%; transform: translateX(-50%); border-color: var(--pink); color: var(--pink); }

/* ---- cajón de opciones (drawer) ---- */
.drawer-scrim {
    position: fixed; inset: 0;
    background: rgba(25, 30, 44, 0.35);
    z-index: 40;
}
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(380px, 92vw);
    background: #fff;
    box-shadow: -12px 0 40px rgba(25, 30, 44, 0.25);
    z-index: 41;
    display: flex; flex-direction: column;
    overflow-y: auto;
    animation: drawerIn 0.2s ease-out;
}
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 1.02rem;
}
.drawer__close {
    background: none; border: none; cursor: pointer;
    font-size: 1rem; color: var(--muted);
}
.drawer__section { padding: 14px 18px 4px; display: flex; flex-direction: column; gap: 8px; }
.drawer__scenes { display: flex; flex-wrap: wrap; gap: 7px; }

.btn-reset {
    margin: 14px 18px 20px;
    padding: 10px;
    background: var(--panel-2);
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
}
.btn-reset:hover { color: var(--text); border-color: var(--pink); }

/* ---- chips de escena ---- */
.chip {
    position: relative;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.82rem; color: var(--muted);
    background: var(--panel-2); border: 1px solid var(--border);
    padding: 6px 11px; border-radius: 9px; cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}
.chip:hover { color: var(--text); }
.chip--active { color: #fff; background: var(--pink); border-color: var(--pink); font-weight: 600; }
.chip__icon { font-size: 1rem; }
.chip__file { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---- menú de paneles (dentro del drawer) ---- */
.menu { display: flex; flex-direction: column; border-top: 1px solid var(--border); margin-top: 8px; }
.menu__tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--border); }
.menu__tab {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: transparent; border: none; cursor: pointer;
    color: var(--muted); padding: 11px 4px; font-size: 0.66rem; line-height: 1.2;
    border-bottom: 2px solid transparent;
}
.menu__tab-icon { font-size: 1.1rem; }
.menu__tab-text { text-align: center; }
.menu__tab:hover { color: var(--text); }
.menu__tab--active { color: var(--pink); border-bottom-color: var(--pink); background: var(--panel-2); }

.menu__body { padding: 4px; }

/* ---- paneles / controles ---- */
.panel { padding: 14px; display: flex; flex-direction: column; gap: 16px; }
.panel__intro { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.panel__intro em { color: var(--pink); font-style: normal; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 0.82rem; font-weight: 600; display: flex; justify-content: space-between; align-items: center; color: var(--text); }
.field__value { color: var(--pink); font-variant-numeric: tabular-nums; font-weight: 700; }
.field__hint { color: var(--muted); font-size: 0.74rem; line-height: 1.4; }

.range {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px; border-radius: 999px;
    background: #e6e9f0; outline: none; cursor: pointer;
}
.range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--pink); border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25); cursor: pointer;
}
.range::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--pink); border: 2px solid #fff; cursor: pointer;
}

.seg { display: flex; gap: 6px; }
.seg--stacked { flex-direction: column; }
.seg__btn {
    flex: 1;
    display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
    text-align: left;
    background: #fff; color: var(--text);
    border: 1px solid var(--border); border-radius: 10px;
    padding: 9px 12px; cursor: pointer; font-size: 0.85rem;
    transition: border-color .15s, background .15s;
}
.seg__btn small { color: var(--muted); font-size: 0.72rem; font-weight: 400; }
.seg:not(.seg--stacked) .seg__btn { align-items: center; }
.seg__btn:hover { border-color: var(--pink); }
.seg__btn--active { border-color: var(--pink); background: rgba(229, 0, 43, 0.06); box-shadow: inset 0 0 0 1px var(--pink); }

.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle__track {
    flex: 0 0 auto; position: relative;
    width: 42px; height: 24px; border-radius: 999px;
    background: #dfe3ec; border: 1px solid var(--border); transition: background .15s;
}
.toggle__track::after {
    content: ""; position: absolute; top: 2px; left: 2px;
    width: 18px; height: 18px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: transform .15s;
}
.toggle input:checked + .toggle__track { background: var(--pink); border-color: var(--pink); }
.toggle input:checked + .toggle__track::after { transform: translateX(18px); }
.toggle__label { font-size: 0.86rem; display: flex; flex-direction: column; color: var(--text); }
.toggle__label small { color: var(--muted); font-size: 0.73rem; }

.swatches { display: flex; gap: 8px; }
.swatch {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--c); border: 2px solid var(--border); cursor: pointer;
    transition: transform .12s, border-color .12s;
}
.swatch:hover { transform: scale(1.08); }
.swatch--active { border-color: var(--pink); box-shadow: 0 0 0 2px var(--pink); }

.thickness-viz { display: flex; flex-direction: column; gap: 8px; }
.thickness-bar { height: 12px; border-radius: 999px; background: #e6e9f0; overflow: hidden; }
.thickness-bar__fill {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, #34d399, #f59e0b, #ef4444);
    transition: width .2s;
}

/* ---- vista de gafa (demo espesor) ---- */
.glasses-view {
    position: absolute; inset: 0;
    pointer-events: none;
}
.glasses-view svg { width: 100%; height: 100%; }

/* gafa 3D (Three.js): canvas a pantalla completa, arrastrable para rotar */
.glasses3d { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.glasses3d:active { cursor: grabbing; }
.glasses3d__canvas { width: 100%; height: 100%; display: block; }

/* vista "cara real" (perfil + menisco con grosor real) */
.glasses-face { position: absolute; inset: 0; width: 100%; height: 100%; }

/* vista cenital (alcance visual por lente) — cubre el escenario; la lámina original va
   entera (sin recortar ni deformar) sobre un fondo liso del tono de su suelo */
.cenital-view { position: absolute; inset: 0; overflow: hidden; background: #6f4b33; }
.cenital-view__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* conmutador Gafa 3D / Cara real (arriba-centro de la escena) */
.esp-viewswitch {
    position: absolute; left: 50%; top: 52px; transform: translateX(-50%);
    display: flex; align-items: center; gap: 10px; z-index: 25;
    background: rgba(255,255,255,0.92); border: 1px solid var(--border);
    padding: 6px 14px; border-radius: 999px;
    font-size: 0.82rem; color: var(--muted);
}
.esp-viewswitch--on { color: var(--pink); font-weight: 700; }
.vswitch {
    width: 44px; height: 24px; border-radius: 999px;
    background: #dfe1e6; border: none; cursor: pointer; position: relative; padding: 0;
    transition: background .15s;
}
.vswitch--on { background: var(--pink); }
.vswitch__knob {
    position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: transform .15s;
}
.vswitch--on .vswitch__knob { transform: translateX(20px); }

/* leyenda de espesor (borde / centro en mm): arriba y siempre visible, también con
   el panel de ajustes abierto, para que el número cambie a la vista al ajustar. */
.thk-readout {
    position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
    pointer-events: none; z-index: 25;
    background: rgba(20, 24, 34, 0.6);
    color: #fff; font-size: 0.92rem;
    padding: 7px 16px; border-radius: 999px;
    white-space: nowrap;
}
.thk-readout strong { font-variant-numeric: tabular-nums; }

/* panel inferior de ajustes de la demo espesor (Diseño / Índice) */
.esp-sheet {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -10px 30px rgba(35, 47, 85, 0.18);
    border-top-left-radius: 16px; border-top-right-radius: 16px;
    z-index: 20;
    animation: sheetUp 0.2s ease-out;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.esp-sheet__tabs {
    display: flex; align-items: center; gap: 4px;
    padding: 8px 12px 0;
    border-bottom: 1px solid var(--border);
}
.esp-tab {
    background: none; border: none; cursor: pointer;
    color: var(--muted); font-size: 0.92rem; font-weight: 600;
    padding: 8px 16px; border-bottom: 3px solid transparent;
}
.esp-tab--on { color: var(--pink); border-bottom-color: var(--pink); }
.esp-sheet__close {
    margin-left: auto; background: none; border: none; cursor: pointer;
    color: var(--muted); font-size: 1rem; padding: 6px 10px;
}
.esp-sheet__body { display: flex; gap: 36px; padding: 16px 22px 20px; flex-wrap: wrap; }
.esp-col { min-width: 150px; }
.esp-col__title {
    font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    color: #fff; background: #6b7384; border-radius: 6px;
    padding: 3px 10px; margin-bottom: 8px; display: inline-block;
}
.esp-opt {
    display: flex; align-items: center; gap: 9px; width: 100%;
    background: none; border: none; cursor: pointer; text-align: left;
    color: var(--text); font-size: 0.92rem; padding: 5px 2px;
}
.esp-opt__dot {
    width: 17px; height: 17px; border-radius: 50%;
    border: 2px solid #c2c9d4; flex: 0 0 auto;
    display: inline-block; position: relative;
}
.esp-opt--on { color: var(--pink); font-weight: 600; }
.esp-opt--on .esp-opt__dot { border-color: var(--pink); }
.esp-opt--on .esp-opt__dot::after {
    content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--pink);
}
.esp-col--value { display: flex; flex-direction: column; }
.esp-uval { display: flex; align-items: center; gap: 18px; margin: 4px 0; }
.esp-uval strong { font-size: 1.3rem; color: #20283c; font-variant-numeric: tabular-nums; }
.esp-col__hint { color: var(--muted); font-size: 0.8rem; max-width: 320px; margin: 6px 0 0; }

/* ---- página de ajustes ---- */
.aj {
    height: 100%;
    display: flex; flex-direction: column;
    /* mismos pétalos cálidos que la portada (app real) */
    background:
        radial-gradient(circle 300px at 104% 108%, rgba(238, 120, 66, 0.36), transparent 71%),
        radial-gradient(circle 260px at 88% 118%, rgba(224, 96, 120, 0.28), transparent 71%),
        radial-gradient(circle 230px at 112% 80%, rgba(206, 106, 138, 0.26), transparent 71%),
        radial-gradient(42% 50% at 12% 88%, rgba(231, 62, 93, 0.07), transparent 70%),
        #f2f2f3;
}
.aj .sim2__header { background: transparent; border-bottom: none; box-shadow: none; }
.aj__tabs {
    display: flex; justify-content: center; gap: 26px;
    padding: 14px 0 10px;
}
.aj__tab {
    width: 44px; height: 44px;
    background: none; border: none; cursor: pointer;
    color: #3a4252; padding: 6px; border-radius: 10px;
}
.aj__tab svg { width: 100%; height: 100%; }
.aj__tab:hover { background: rgba(229, 0, 43, 0.07); }
.aj__tab--on { color: var(--pink); }

.aj__body {
    flex: 1; overflow: auto;
    width: 100%; max-width: 980px; margin: 0 auto;
    padding: 10px 24px 16px;
}
.aj__heading { color: var(--blue); font-size: 1.15rem; font-weight: 600; margin: 8px 0 14px; text-align: center; }
.aj__note { text-align: center; color: var(--muted); font-size: 0.84rem; }

.aj__langs { display: flex; justify-content: center; gap: 22px; margin-top: 36px; }
.lang {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.9); border: 2px solid transparent; border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(35,47,85,0.10);
    padding: 26px 38px; cursor: pointer; font-size: 1rem; color: var(--text);
}
.lang__flag { width: 64px; height: 42px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
.lang:hover { border-color: #e8b6d2; }
.lang--on { border-color: var(--pink); color: var(--pink); }

.aj__cols { display: flex; gap: 18px; }
.aj__card {
    flex: 1;
    background: rgba(255,255,255,0.92);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(35,47,85,0.10);
    padding: 16px 22px 18px;
    margin-bottom: 16px;
}
.aj__row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 7px 0;
}
.aj__row label { color: var(--text); font-size: 0.95rem; }
.aj__row input {
    width: 110px; text-align: right;
    font-size: 1rem; color: var(--text);
    background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px;
    padding: 7px 10px; outline: none;
}
.aj__row input:focus { border-color: var(--pink); }

.aj__card--slider { padding: 20px 26px; }
.aj__sliderline { display: flex; align-items: center; gap: 16px; font-variant-numeric: tabular-nums; color: var(--text); }
.aj__sliderline .range { flex: 1; }
.aj__chips { display: flex; gap: 10px; margin-top: 16px; justify-content: center; flex-wrap: wrap; }
.aj__chips .chip { min-width: 64px; justify-content: center; border-radius: 999px; }

.aj__products { display: flex; flex-direction: column; gap: 10px; }
.aj__product {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.92); border-radius: 12px;
    box-shadow: 0 4px 14px rgba(35,47,85,0.08);
    padding: 10px 14px;
}
.aj__product-name { flex: 0 0 220px; font-size: 0.92rem; color: var(--text); font-weight: 600; }
.aj__product-input {
    flex: 1;
    font-size: 0.9rem; color: var(--text); font-style: italic;
    background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
    padding: 8px 16px; outline: none;
}
.aj__product-input:focus { border-color: var(--pink); font-style: normal; }
.aj__product-clear {
    background: none; border: none; cursor: pointer;
    color: var(--muted); font-size: 0.95rem; padding: 6px;
}
.aj__product-clear:hover { color: var(--pink); }

.aj__menus {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
    background: rgba(156, 42, 144, 0.05);
    border-radius: var(--radius); padding: 18px;
}
.aj__menuitem {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    background: #fff; border: 2px solid transparent; border-radius: 12px;
    box-shadow: 0 4px 12px rgba(35,47,85,0.08);
    padding: 14px 6px 10px; cursor: pointer;
    color: var(--text); font-size: 0.82rem;
}
.aj__menuitem small { color: #16a34a; font-size: 0.68rem; }
/* desactivado (app real): el icono pasa a GRIS oscuro, la tesela sigue visible */
.aj__menuitem--off .demo-icon { filter: grayscale(1) brightness(0.5); }
.aj__menuitem--off span { color: var(--muted); }
.aj__menuitem:hover { border-color: var(--pink); }

/* valores: filas seleccionables (campo activo con subrayado) */
.aj__vrow {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 9px 4px;
    background: none; border: none; cursor: pointer;
    font: inherit; color: var(--text);
}
.aj__vrow label { font-size: 0.95rem; cursor: pointer; }
.aj__vrow strong { font-size: 1.05rem; min-width: 84px; text-align: center; padding-bottom: 2px; }
.aj__vrow--on strong { border-bottom: 2px solid #555; }

/* nombres de producto: panel Menu (crema) + panel Producto (rosa) */
.aj__nombres { display: flex; gap: 20px; align-items: flex-start; }
.aj__panel { border-radius: 10px; padding: 0 0 14px; overflow: hidden; }
.aj__panel h3 {
    margin: 0 0 14px; padding: 12px 18px;
    font-size: 0.95rem; text-align: center; color: var(--text);
    display: flex; align-items: center; justify-content: center; gap: 14px;
}
.aj__panel--menu { background: #f8f4e1; flex: 0 0 380px; }
.aj__panel--menu h3 { background: #efe9cd; }
.aj__panel--prod { background: #f7e3df; flex: 1; }
.aj__panel--prod h3 { background: #efd2cc; position: relative; }
.aj__clearall {
    position: absolute; right: 12px; top: 6px;
    display: flex; flex-direction: column; align-items: center;
    background: none; border: none; cursor: pointer;
    color: #6a6a6e; font-size: 1rem; line-height: 1;
}
.aj__clearall small { font-size: 0.56rem; }
.aj__menugrid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 12px 6px; padding: 0 14px;
}
.aj__mitem {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    background: none; border: 2px solid transparent; border-radius: 10px;
    padding: 8px 2px; cursor: pointer;
    font-size: 0.62rem; color: var(--text);
}
.aj__mitem .demo-icon { width: 40px; height: 40px; filter: grayscale(1) brightness(0.45); }
.aj__mitem--on .demo-icon { filter: none; }
.aj__mitem--on { border-color: rgba(229, 0, 43, 0.35); }
.aj__prow {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 16px;
}
.aj__pname {
    flex: 0 0 220px;
    background: #fbeae6; border: 1px solid #e4b8b0; border-radius: 999px;
    padding: 8px 14px; font-size: 0.85rem; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aj__parrow { color: #8a8a8e; font-size: 0.7rem; }

.aj__footer { padding: 12px 0 20px; display: flex; justify-content: center; }

/* ---- responsive ---- */
/* tablet / móvil grande */
@media (max-width: 900px) {
    .aj__menus { grid-template-columns: repeat(3, 1fr); }
    .esp-sheet__body { gap: 22px; }
    .portada__grid { max-width: none; }
}

/* móviles (vertical) */
@media (max-width: 620px) {
    /* portada */
    .portada { padding: 14px; }
    .portada__top { font-size: 1.05rem; }
    .portada__grid { padding: 12px 0; gap: 14px; }
    .portada__row { flex-direction: column; gap: 14px; }
    .pcard { padding: 15px 18px 16px; }
    .pcard__title { font-size: 1.05rem; margin-bottom: 10px; }
    .pcard__items { flex-wrap: wrap; gap: 6px; }
    .pitem { font-size: 0.82rem; padding: 6px 8px; }
    .demo-icon { width: 46px; height: 46px; }
    .portada__version { font-size: 0.7rem; }

    /* simulador: cabecera y barra de selección */
    .sim2__header { padding: 8px 12px; font-size: 0.95rem; }
    .sim2__title { font-size: 1.05rem; }
    .sim2__burger span { width: 22px; }
    .selbar { min-height: 40px; }
    .selbar__select { font-size: 0.88rem; max-width: 46vw; }
    .selbar__icon { font-size: 0.95rem; }

    /* controles circulares inferiores (evitar solape izq/der) */
    .circles { gap: 7px; }
    .circles--left { left: 10px; bottom: 12px; }
    .circles--right { right: 10px; bottom: 12px; }
    .circle-btn, .value-chip { width: 52px; height: 52px; font-size: 0.46rem; padding: 3px; line-height: 1.1; }
    .circle-btn__svg { width: 21px; height: 21px; }
    .circle-btn__icon { font-size: 1rem; }
    .value-chip strong { font-size: 0.86rem; }
    .value-control { gap: 7px; }
    .value-step { gap: 7px; }
    .value-step button { width: 44px; height: 44px; font-size: 1.3rem; }
    .drag-hint { width: 108px; height: 108px; }
    .thk-readout { font-size: 0.78rem; top: 10px; padding: 6px 12px; }
    .compare-label { font-size: 0.68rem; padding: 4px 9px; }

    /* cajón de opciones */
    .drawer { width: min(340px, 96vw); }

    /* página de ajustes */
    .aj__tabs { gap: 14px; }
    .aj__body { padding: 8px 14px 14px; }
    .aj__heading { font-size: 1.05rem; }
    .aj__cols { flex-direction: column; gap: 12px; }
    .aj__card { padding: 14px 16px; }
    .aj__menus { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px; }
    .aj__langs { gap: 12px; margin-top: 18px; }
    .lang { padding: 16px 18px; font-size: 0.9rem; }
    .lang__flag { width: 52px; height: 34px; }
    .aj__product { gap: 8px; padding: 9px 11px; }
    .aj__product-name { flex: 0 0 120px; font-size: 0.82rem; }
    .aj__product-input { font-size: 0.82rem; padding: 7px 12px; }

    /* hoja de espesor */
    .esp-sheet__body { gap: 16px; padding: 12px 14px 16px; }
    .esp-col { min-width: 0; flex: 1; }
    .esp-tab { padding: 8px 10px; font-size: 0.86rem; }

    /* pin */
    .pin-gate__card { padding: 30px 28px; font-size: 1.1rem; }
}

/* móviles estrechos */
@media (max-width: 400px) {
    .circles, .value-control, .value-step { gap: 5px; }
    .circle-btn, .value-chip { width: 46px; height: 46px; }
    .circle-btn__svg { width: 18px; height: 18px; }
    .value-step button { width: 38px; height: 38px; font-size: 1.2rem; }
    .pcard__items { gap: 4px; }
    .demo-icon { width: 42px; height: 42px; }
    .pitem { font-size: 0.78rem; }
}

/* móviles muy estrechos (≈320 px) — que los +/- no solapen los círculos */
@media (max-width: 345px) {
    .circle-btn, .value-chip { width: 42px; height: 42px; font-size: 0.42rem; }
    .circle-btn__svg { width: 16px; height: 16px; }
    .value-chip strong { font-size: 0.76rem; }
    .value-step button { width: 34px; height: 34px; font-size: 1.1rem; }
    .circles, .value-control, .value-step { gap: 4px; }
    .circles--left { left: 8px; }
    .circles--right { right: 8px; }
}

/* móvil apaisado: poca altura útil */
@media (max-height: 480px) and (orientation: landscape) {
    .circle-btn, .value-chip { width: 46px; height: 46px; font-size: 0.44rem; }
    .circle-btn__svg { width: 18px; height: 18px; }
    .circles--left, .circles--right { bottom: 8px; }
    .value-step button { width: 38px; height: 38px; }
    .drag-hint { width: 84px; height: 84px; }
    .esp-sheet__body { padding: 8px 16px 10px; }
    .esp-sheet__tabs { padding: 4px 12px 0; }
}

/* --- Comparador de Monturas: rejilla 2x2 de selfies (app real "Haz tus selfies") --- */
.frames__hint { margin: 0 auto; font-weight: 700; letter-spacing: 0.01em; }
/* EyePad 3.0 is the first EyePad app to show this screen: centre the hint in its bar.
   Scoped so MyBuy keeps its current rendering. */
.brand-eyego .frames__hint { align-self: center; }
.frames__grid {
    position: relative; flex: 1; min-height: 0;
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
    gap: 2px; background: #1c1c1c;
}
.frames__cell { position: relative; background: #e4e4e4; overflow: hidden; }
.frames__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frames__video {
    position: absolute; width: calc(50% - 1px); height: calc(50% - 1px);
    object-fit: cover; transform: scaleX(-1); background: #000; z-index: 1;
}
.frames__cam {
    position: absolute; right: 4.5%; bottom: 7%; width: 54px; height: 54px;
    border: 0; background: none; padding: 0; color: var(--pink); cursor: pointer; z-index: 2;
    transition: transform 0.12s ease;
}
.frames__cam svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.28)); }
.frames__cam:hover { transform: scale(1.08); }

/* Barra de control inferior (app real): REGRESAR + MI ELECCIÓN */
.frames__bar {
    display: flex; justify-content: center; gap: 14px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--panel, #fff);
}
.frames__ctr {
    appearance: none; border: 2px solid var(--pink); background: #fff; color: var(--pink);
    font: inherit; font-weight: 800; letter-spacing: 0.06em; font-size: 0.82rem;
    padding: 9px 22px; border-radius: 999px; cursor: pointer; text-decoration: none;
    display: inline-flex; align-items: center; line-height: 1;
}
.frames__ctr:hover { filter: brightness(0.96); }
.frames__ctr--on, .frames__ctr:not(:disabled):active { background: var(--pink); color: #fff; }
.frames__ctr:disabled { opacity: 0.4; cursor: default; }

/* Modo MI ELECCIÓN: las fotos se eligen tocándolas */
.frames__cell--pick { cursor: pointer; }
.frames__cell--pick:hover .frames__img { filter: brightness(1.06); }
.frames__cell--pick::after {
    content: ""; position: absolute; inset: 0; outline: 3px dashed var(--pink);
    outline-offset: -6px; pointer-events: none; opacity: 0.65;
}

/* Elección hecha: la foto elegida a pantalla completa con REGRESAR */
.frames__full {
    position: absolute; inset: 0; z-index: 5; background: #000;
    display: flex; flex-direction: column;
}
.frames__full img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.frames__full .frames__bar { background: rgba(255, 255, 255, 0.92); }
@media (max-width: 700px) {
    .frames__cam { width: 42px; height: 42px; }
    .frames__ctr { padding: 8px 16px; font-size: 0.76rem; }
}

/* Ajustes nombres: el panel Menu es crema en EyeGO y azul-gris en MyBuy (app real) */
.brand-mybuy .aj__panel--menu { background: #dbe1ee; }
.brand-mybuy .aj__panel--menu h3 { background: #c9d2e6; }

/* Cara real (espesor EyeGO): foto centrada + insignia anclada al borde izquierdo */
.glasses-face .gface__photo { position: absolute; inset: 0; width: 100%; height: 100%; }
.glasses-face .gface__badge {
    position: absolute; left: 16px; top: 12px;
    height: 38%; max-height: 420px; width: auto;
    filter: drop-shadow(0 1px 4px rgba(35, 47, 85, 0.12));
}

/* Glifos originales de la app en la barra/desplegable (blanco con alfa) */
.selbar__icon-img { width: 27px; height: 20px; object-fit: contain; flex: none; }
.sbdd__opt .selbar__icon-img { opacity: 0.95; }
.sbdd__opt--dis .selbar__icon-img { opacity: 0.45; }

/* EyePad annotations cover the current page; controls remain above the canvas. */
.pen-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 200; pointer-events: none; display: none; }
.pen-canvas--active { display: block; pointer-events: auto; touch-action: none; cursor: crosshair; }
.pen-tools { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 201; display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 12px; background: #fff; box-shadow: 0 3px 20px #0003; max-width: 96vw; }
.pen-tools button, .pen-launch { border: 1px solid #ddd; border-radius: 8px; background: #fff; color: #333; padding: 9px 12px; cursor: pointer; white-space: nowrap; }
.pen-tools .pen-color { border: 3px solid white; outline: 1px solid #ddd; width: 30px; height: 30px; padding: 0; background: var(--pen-color); border-radius: 50%; flex-shrink: 0; }
.pen-tools .pen-color--active { outline: 2px solid #333; }
.pen-launch { position: fixed; right: 70px; top: 10px; z-index: 90; }
.eyepad-thickness { position: absolute; inset: 0; display: flex; flex-direction: column; z-index: 8; }
.eyepad-thickness__view { flex: 1; min-height: 100px; position: relative; }
.eyepad-thickness__faces { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; background: white; }
.eyepad-thickness__face { position: relative; min-width: 0; border-right: 1px solid #ddd; }
.eyepad-thickness__readouts { position: absolute; top: 10px; left: 0; right: 0; display: flex; justify-content: space-around; gap: 8px; pointer-events: none; padding: 0 8px; }
.eyepad-thickness__readouts span { background: #fffE; color: #333; padding: 4px 10px; border-radius: 12px; font-size: 11px; }
.eyepad-thickness__options { background: #fffffff5; color: var(--text); max-height: 48%; overflow: auto; flex-shrink: 0; }
.eyepad-thickness__settings { display: grid; grid-template-columns: 1fr 1fr; }
.eyepad-thickness__eye { min-width: 0; border: 0; margin: 0; padding: 6px 18px 10px; }
.eyepad-thickness__eye + .eyepad-thickness__eye { border-left: 1px solid #ccc; }
.eyepad-thickness__eye legend { font-size: 12px; font-weight: 600; }
.eyepad-thickness__lens-options { display: grid; grid-template-columns: minmax(125px, 1fr) minmax(180px, 1.5fr); gap: 10px; }
.eyepad-thickness__indices { display: grid; grid-template-rows: repeat(3, auto); grid-auto-flow: column; }
.eyepad-thickness .esp-opt { font-size: 12px; gap: 5px; padding: 4px 0; }
.eyepad-thickness .esp-opt:disabled { opacity: .3; cursor: default; }
.eyepad-thickness .esp-col__title { width: 100%; border-radius: 0; margin-bottom: 4px; }
.eyepad-thickness__toolbar { display: flex; align-items: center; gap: 12px; padding: 8px 18px; background: #606978c9; }
.eyepad-thickness__toolbar .circle-btn { position: static; flex-shrink: 0; }
.eyepad-thickness__spacer { flex: 1; }
.eyepad-thickness__rx { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 12px; }
.eyepad-thickness__rx label, .eyepad-thickness__rx span { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.eyepad-thickness__rx input { width: 80px; border: 1px solid #aaa; border-radius: 14px; padding: 4px 8px; }
.eyepad-thickness__rx output { color: #777; }
.eyepad-thickness__frame { text-align: center; font-size: 12px; padding: 5px 10px 10px; }
@media (max-width: 760px) {
    .eyepad-thickness__lens-options { grid-template-columns: 1fr; gap: 6px; }
    .eyepad-thickness__eye { padding: 5px 10px; }
    .eyepad-thickness__rx { grid-template-columns: 1fr; }
    .eyepad-thickness__readouts span { font-size: 9px; padding: 3px; }
    .pen-tools { gap: 5px; }
    .pen-tools button { padding: 8px 6px; font-size: 12px; }
}

/* ---- panel de sesiones (/panel): sólo administración, fuera de la app y de sus marcas ---- */
.pnl-root { height: 100%; overflow-y: auto; background: var(--bg); }
.pnl {
    --pnl-surface: #ffffff;
    --pnl-ink: #0b0b0b;
    --pnl-ink-2: #52514e;
    --pnl-muted: #898781;
    --pnl-grid: #e1e0d9;
    --pnl-axis: #c3c2b7;
    --pnl-series: #2a78d6;
    --pnl-series-wash: rgba(42, 120, 214, 0.10);
    --pnl-track: #cde2fb;
    --pnl-warning: #fab219;
    --pnl-critical: #d03b3b;
    --pnl-nodata: #f0efec;
    max-width: 1080px; margin: 0 auto; padding: 24px 20px 48px;
    color: var(--pnl-ink);
    transition: opacity .2s;
}
.pnl--busy { opacity: .6; }
.pnl__bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.pnl__title { margin: 0; font-size: 1.5rem; font-weight: 700; }
.pnl__muted { color: var(--pnl-ink-2, #52514e); font-size: .9rem; margin: 4px 0; line-height: 1.45; }
.pnl__hint { margin-top: 14px; text-align: center; }
.pnl__actions { display: flex; align-items: center; gap: 8px; }
.pnl__btn {
    font: inherit; font-size: .88rem; color: var(--pnl-ink);
    background: var(--pnl-surface); border: 1px solid var(--pnl-axis); border-radius: 999px;
    padding: 6px 14px; cursor: pointer;
}
.pnl__btn:hover { border-color: var(--pnl-ink-2); }
.pnl__btn:disabled { opacity: .5; cursor: default; }
.pnl__btn--danger { background: var(--pnl-critical); border-color: var(--pnl-critical); color: #fff; }
.pnl__link { font: inherit; font-size: .85rem; background: none; border: 0; color: var(--pnl-ink-2); text-decoration: underline; cursor: pointer; }
.pnl__banner, .pnl__notice {
    margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; font-size: .9rem;
    background: var(--pnl-surface); border: 1px solid var(--pnl-grid);
}
.pnl__banner { border-left: 4px solid var(--pnl-warning); }
.pnl__notice { border-left: 4px solid var(--pnl-series); }
.pnl__card {
    background: var(--pnl-surface); border-radius: 14px; border: 1px solid rgba(11, 11, 11, .08);
    padding: 18px 20px; margin-bottom: 16px;
}
.pnl__h2 { margin: 0 0 12px; font-size: 1.05rem; font-weight: 700; }
.pnl__hero { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.pnl__hero-value { font-size: 56px; font-weight: 600; line-height: 1; }
.pnl__hero-label { color: var(--pnl-ink-2); margin-top: 6px; }
.pnl__hero-note { max-width: 520px; }
.pnl__row {
    display: grid; grid-template-columns: minmax(90px, 150px) minmax(120px, 1fr) 64px 190px 260px;
    align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--pnl-grid);
}
.pnl__row:first-of-type { border-top: 0; }
.pnl__who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pnl__login { font-weight: 600; overflow-wrap: anywhere; }
.pnl__tag {
    font-size: .72rem; color: var(--pnl-ink-2); border: 1px solid var(--pnl-axis); border-radius: 999px;
    padding: 1px 7px; margin-left: 4px; white-space: nowrap;
}
.pnl__meter { height: 10px; border-radius: 999px; background: var(--pnl-track); overflow: hidden; }
.pnl__meter-fill { height: 100%; border-radius: 999px; background: var(--pnl-series); }
.pnl__meter--high .pnl__meter-fill { background: var(--pnl-warning); }
.pnl__meter--full .pnl__meter-fill { background: var(--pnl-critical); }
.pnl__count { font-variant-numeric: tabular-nums; color: var(--pnl-ink-2); text-align: right; white-space: nowrap; }
.pnl__state { font-size: .85rem; color: var(--pnl-ink); }
.pnl__act { display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.pnl__confirm { font-size: .88rem; }
.pnl__admins { margin-top: 12px; }
.pnl__chart { padding: 12px 0 6px; border-top: 1px solid var(--pnl-grid); }
.pnl__chart:first-of-type { border-top: 0; }
.pnl__chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pnl__readout { font-size: .88rem; color: var(--pnl-ink-2); font-variant-numeric: tabular-nums; min-height: 1.3em; }
.pnl__svg { display: block; width: 100%; height: auto; margin-top: 4px; outline: none; }
.pnl__svg:focus-visible { box-shadow: 0 0 0 2px var(--pnl-series); border-radius: 6px; }
.pnl__svg text { font-family: inherit; font-size: 12px; }
.pnl__grid { stroke: var(--pnl-grid); stroke-width: 1; }
.pnl__axis { stroke: var(--pnl-axis); stroke-width: 1; }
.pnl__tick { fill: var(--pnl-muted); font-variant-numeric: tabular-nums; }
.pnl__nodata { fill: var(--pnl-nodata); }
.pnl__nodata-label { fill: var(--pnl-muted); }
.pnl__slot { fill: rgba(11, 11, 11, .04); }
.pnl__crosshair { stroke: var(--pnl-muted); stroke-width: 1; }
.pnl__area { fill: var(--pnl-series-wash); stroke: none; }
.pnl__line { fill: none; stroke: var(--pnl-series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pnl__limit { fill: none; stroke: var(--pnl-ink-2); stroke-width: 1; stroke-dasharray: 5 4; }
.pnl__dot { fill: var(--pnl-series); stroke: var(--pnl-surface); stroke-width: 2; }
.pnl__end { fill: var(--pnl-ink-2); font-variant-numeric: tabular-nums; }
.pnl__end--limit { fill: var(--pnl-muted); }
.pnl__hit { fill: transparent; pointer-events: all; }
.pnl__data { margin-top: 2px; font-size: .88rem; }
.pnl__data summary { cursor: pointer; color: var(--pnl-ink-2); }
.pnl__data .pnl__table { margin-top: 8px; max-width: 520px; }
.pnl__scroll { overflow-x: auto; }
.pnl__table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.pnl__table th { text-align: left; font-weight: 600; color: var(--pnl-ink-2); border-bottom: 1px solid var(--pnl-axis); padding: 6px 10px 6px 0; }
.pnl__table td { border-bottom: 1px solid var(--pnl-grid); padding: 7px 10px 7px 0; vertical-align: top; }
.pnl__table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 720px) {
    .pnl__row { grid-template-columns: 1fr auto; }
    .pnl__meter { grid-column: 1 / -1; }
    .pnl__state, .pnl__act { grid-column: 1 / -1; justify-content: flex-start; }
}
