:root { color-scheme: light; --ink: #202127; --muted: #71747e; --line: #e9eaee; --soft: #f6f7f9; --accent: #16181d; --red: #bb3030; --green: #247650; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #fff; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button, a, label.file-label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #8eb3ec; outline-offset: 3px; }
input { width: 100%; padding: 12px 13px; border: 1px solid #dcdfe5; border-radius: 10px; background: #fff; color: var(--ink); margin: 7px 0 17px; outline: none; }
input:focus { border-color: #8798ae; box-shadow: 0 0 0 3px #edf2fa; }
label { display: block; font-size: .89rem; font-weight: 600; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.7rem, 3vw, 2.1rem); letter-spacing: -.8px; margin-bottom: 10px; font-weight: 650; }
h2 { font-size: 1.5rem; letter-spacing: -.5px; margin-bottom: 0; }
h3 { font-size: 1.15rem; margin-bottom: 6px; font-weight: 650; }
.muted { color: var(--muted); line-height: 1.6; }
.eyebrow { font-size: .68rem; letter-spacing: 1.8px; font-weight: 700; color: #92959e; margin-bottom: 13px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; font-size: 1.65rem; letter-spacing: 3px; font-weight: 750; }
.brand-dot { width: 6px; height: 6px; background: #cc6052; border-radius: 50%; margin: 4px 0 0 3px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 11px 16px; border: 1px solid transparent; border-radius: 10px; line-height: 1.3; text-decoration: none; font-weight: 600; font-size: .87rem; }
.primary { color: #fff; background: var(--accent); }
.secondary { background: #fff; color: #444752; border-color: #e0e2e7; }
.compact { padding: 8px 12px; font-size: .82rem; }
.wide { width: 100%; }
.text-button { color: var(--muted); border: 0; background: transparent; padding: 7px 0; font-size: .84rem; }
.login-screen { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 20px; background: #fafbfc; }
.login-card { width: 100%; max-width: 420px; padding: 38px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.login-card .brand { margin-bottom: 44px; }
.login-card h1 { font-size: 1.8rem; }
.login-card .muted { margin-bottom: 28px; }
.initial-loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.workspace { min-height: 100vh; min-height: 100dvh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 254px; display: flex; flex-direction: column; background: #fafafb; border-right: 1px solid var(--line); padding: 30px 18px 18px; }
.sidebar > .brand { margin: 2px 16px 43px; }
.sidebar-caption { margin: 0 16px 12px; color: #a0a3ab; letter-spacing: 1.4px; font-size: .65rem; font-weight: 700; }
.navigation { display: grid; gap: 6px; }
.nav-button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 13px; border: 0; border-radius: 10px; background: transparent; color: #757984; text-align: left; font-size: .86rem; }
.nav-button > span { font-size: 1.25rem; width: 22px; text-align: center; line-height: 1; }
.nav-button[aria-current="page"] { color: #262a34; background: #eaecef; font-weight: 600; }
.sidebar-account { margin-top: auto; padding-top: 28px; }
.account-button { width: 100%; padding: 13px 9px; display: flex; gap: 11px; align-items: center; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.account-copy { min-width: 0; flex: 1; }
.account-copy strong, .account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: .86rem; font-weight: 600; }
.account-copy small { color: #9296a0; font-size: .75rem; margin-top: 4px; }
.account-chevron { color: #9296a0; font-size: 1.3rem; }
.logout { margin-left: 57px; }
.avatar { display: inline-flex; width: 35px; height: 35px; flex-shrink: 0; align-items: center; justify-content: center; background: #e8ebf0; border-radius: 50%; color: #647083; overflow: hidden; font-size: .78rem; font-weight: 650; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.large { width: 70px; height: 70px; font-size: 1.3rem; }
.main-content { flex: 1; min-width: 0; margin-left: 254px; padding: 48px clamp(24px, 5vw, 76px); max-width: 1450px; }
.page-header { display: flex; justify-content: space-between; align-items: start; gap: 22px; margin-bottom: 35px; }
.page-header .muted { margin-bottom: 0; max-width: 650px; }
.page-header > .button { flex-shrink: 0; margin-top: 30px; }
.page-message { padding: 13px 16px; border: 1px solid #dce9df; background: #f4faf5; border-radius: 10px; font-size: .88rem; line-height: 1.5; color: var(--green); margin-bottom: 22px; }
.page-message.error, .form-message.error { color: var(--red); background: #fff6f5; border-color: #f1d9d6; }
.form-message { border: 1px solid; padding: 11px 12px; border-radius: 9px; font-size: .85rem; line-height: 1.5; }
.plugin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 20px; max-width: 950px; }
.plugin-card { padding: 25px; border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; background: #fff; }
.plugin-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 17px; }
.plugin-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; }
.plugin-icon img { width: 31px; height: 31px; }
.plugin-description { color: var(--muted); line-height: 1.65; font-size: .89rem; flex: 1; margin-bottom: 25px; }
.configuration-notice { margin: -12px 0 18px; color: #9b6f35; }
.badge { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border-radius: 6px; color: #868b94; background: #f1f3f6; font-size: .7rem; font-weight: 600; }
.badge.installed { color: var(--green); background: #eef7f0; }
.plugin-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plugin-actions .primary { flex: 1; }
.plugin-management { display: grid; gap: 10px; padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line); }
.management-caption { margin: 0 0 2px; color: #8b909a; font-size: .62rem; font-weight: 700; letter-spacing: 1.2px; }
.plugin-management .button { width: 100%; min-height: 42px; text-align: center; }
.store-visibility { font-size: .78rem; line-height: 1.45; }
.danger-subtle { color: #a52c32; background: #fff5f4; border-color: #f2d9d7; }
.danger { color: #fff; background: #b83139; border-color: #b83139; }
.removal-dialog { width: min(540px, calc(100% - 30px)); overscroll-behavior: contain; }
/* La tienda no se deja estirar ni «recargar» tirando de ella hacia abajo. */
html, body { overscroll-behavior: none; }
.removal-dialog .dialog-heading { margin-bottom: 23px; }
.removal-dialog .icon-button { flex: 0 0 32px; padding: 0; }
.removal-identity { display: flex; gap: 13px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; }
.removal-identity strong { min-width: 0; overflow-wrap: anywhere; font-size: 1rem; }
.removal-identity .plugin-icon { flex: 0 0 42px; width: 42px; height: 42px; }
.removal-warning { background: #fff5f3; border: 1px solid #f3d8d3; border-radius: 11px; padding: 16px; color: #923c38; font-size: .85rem; line-height: 1.55; }
.removal-warning strong { display: block; margin-bottom: 5px; }
.removal-warning p { margin: 0; }
.removal-scope { margin-top: 18px; }
.removal-scope h3 { font-size: .84rem; margin: 18px 0 9px; }
.removal-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.removal-counts > div { min-width: 0; padding: 13px 10px; background: var(--soft); border-radius: 10px; }
.removal-counts strong, .removal-counts span { display: block; }
.removal-counts strong { font-size: 1.15rem; letter-spacing: -.4px; }
.removal-counts span { color: var(--muted); font-size: .7rem; line-height: 1.4; margin-top: 4px; }
@media (max-width: 620px) { .removal-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.removal-list { margin: 0; padding-left: 18px; color: #636a76; font-size: .82rem; line-height: 1.6; }
.removal-list li + li { margin-top: 5px; }
.removal-note { margin: 12px 0 0; padding-left: 11px; border-left: 2px solid #d7dce4; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.removal-confirmation { margin-top: 21px; }
.removal-confirmation input { margin-bottom: 0; font-size: 16px; }
.removal-busy { display: flex; gap: 10px; align-items: center; margin: 18px 0; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.removal-busy::before { content: ''; display: block; flex: 0 0 17px; width: 17px; height: 17px; border: 2px solid #e1e4e9; border-top-color: #6d7786; border-radius: 50%; animation: removal-spin .9s linear infinite; }
.removal-dialog .form-message { margin: 17px 0 0; }
.removal-dialog .dialog-actions { flex-wrap: wrap; margin-top: 24px; }
.removal-dialog .button:disabled { cursor: not-allowed; }
@keyframes removal-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .removal-busy::before { animation: none; } }
.activation-control { display: flex; align-items: start; gap: 10px; border-top: 1px solid var(--line); margin-top: 23px; padding-top: 18px; color: #6b707b; font-weight: 400; line-height: 1.5; font-size: .8rem; }
.activation-control input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: #20242c; flex-shrink: 0; }
.admin-config { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.admin-config summary { font-size: .79rem; color: #69717e; cursor: pointer; }
.admin-config form { padding-top: 18px; }
.admin-config input { font-size: .85rem; }
.admin-config label { font-size: .79rem; }
.admin-config .hint { margin: -9px 0 17px; }
.empty-state { padding: 54px 24px; color: var(--muted); background: #fafbfc; border: 1px dashed #e0e3e9; border-radius: 14px; text-align: center; line-height: 1.7; }
.users-panel { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.users-toolbar { padding: 17px 20px; background: #fafbfc; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.users-table { width: 100%; border-collapse: collapse; text-align: left; }
.users-table th { padding: 13px 20px; color: #979ba5; font-size: .69rem; font-weight: 600; background: #fdfdfe; }
.users-table td { padding: 17px 20px; border-top: 1px solid #f0f1f4; font-size: .87rem; }
.users-table th:last-child, .users-table td:last-child { text-align: right; }
.user-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.user-identity strong { display: block; font-size: .86rem; font-weight: 600; overflow-wrap: anywhere; }
.user-identity small { display: block; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.profile-dialog { width: min(480px, calc(100% - 30px)); max-height: calc(100dvh - 38px); border: 1px solid var(--line); border-radius: 19px; padding: 28px; box-shadow: 0 25px 90px #0002; }
.profile-dialog::backdrop { background: #19212e66; }
.dialog-heading { display: flex; justify-content: space-between; gap: 15px; align-items: start; margin-bottom: 26px; }
.dialog-heading .eyebrow { margin-bottom: 8px; }
.icon-button { width: 32px; height: 32px; color: #969ba4; border: 0; background: #f5f6f8; border-radius: 50%; font-size: 1.4rem; }
.photo-editor { display: flex; align-items: center; gap: 19px; margin-bottom: 24px; }
.file-label { display: inline-flex; margin-right: 11px; }
.file-input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; overflow: hidden; }
.file-label:focus-within, .file-input:focus-visible + label { outline: 3px solid #8eb3ec; }
.hint { font-size: .74rem; color: #969aa4; line-height: 1.5; margin: 7px 0 0; }
.optional { margin-left: 5px; color: #a1a5ae; font-size: .75rem; font-weight: 400; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.removal-operations { margin-bottom: 28px; display: grid; gap: 12px; }
.removal-operations-heading h2 { margin: 0; font-size: 1.02rem; letter-spacing: -.02em; }
.removal-operation { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 19px 21px; background: var(--white, #fff); border: 1px solid var(--line); border-radius: 16px; }
.removal-operation-copy { min-width: 0; }
.removal-operation-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.removal-operation-name h3 { margin: 0; font-size: .95rem; }
.removal-operation-copy .hint { max-width: 580px; color: var(--muted); overflow-wrap: anywhere; }
.removal-operation-actions { display: flex; flex-shrink: 0; gap: 8px; flex-wrap: wrap; }
.badge.removal-state { background: #fff4dc; color: #856217; }
.badge.removal-state.failed { background: #fff0ed; color: #a2353e; }
@media (max-width: 620px) {
  .removal-operation { align-items: stretch; flex-direction: column; gap: 15px; padding: 18px; }
  .removal-operation-actions > button { flex: 1; }
}
.noscript { padding: 20px; text-align: center; }
@media (max-width: 850px) {
  .sidebar { width: 218px; padding-left: 12px; padding-right: 12px; }
  .main-content { margin-left: 218px; padding: 38px 25px; }
  .users-table th, .users-table td { padding: 13px; }
  .users-table .role-column { display: none; }
}
@media (max-width: 620px) {
  .workspace { display: block; }
  .sidebar { position: static; width: 100%; padding: 18px 19px 13px; border-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 17px 8px; }
  .sidebar > .brand { margin: 0; font-size: 1.4rem; align-self: center; }
  .sidebar-caption { display: none; }
  .navigation { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 5px; }
  .nav-button { width: auto; padding: 10px; font-size: .77rem; }
  .nav-button > span { font-size: 1.15rem; width: 18px; }
  .sidebar-account { grid-column: 2; grid-row: 1; margin: 0; padding: 0; display: flex; align-items: center; gap: 9px; }
  .account-button { width: auto; border: 0; padding: 0; }
  .account-copy, .account-chevron { display: none; }
  .logout { margin: 0; font-size: .73rem; }
  .main-content { margin-left: 0; padding: 29px 20px; }
  .page-header { margin-bottom: 25px; gap: 12px; }
  .page-header > .button { margin-top: 26px; font-size: .7rem; padding: 8px; }
  .page-header .muted { font-size: .86rem; }
  .eyebrow { font-size: .62rem; letter-spacing: 1.4px; }
  h1 { font-size: 1.52rem; }
  .plugin-card { padding: 23px; }
  .login-card { padding: 29px 24px; }
  .profile-dialog { padding: 24px 21px; }
  .users-table th, .users-table td { padding: 12px 10px; }
  .user-identity { gap: 8px; }
  .user-identity .avatar { width: 29px; height: 29px; font-size: .65rem; }
}

.plugin-page { max-width: 1100px; margin: auto; padding: 28px 20px; }
.plugin-page > a { display: inline-block; margin-bottom: 20px; color: var(--muted); }
.inline-player .plugin-page { max-width: none; padding: 0; }
.inline-player .plugin-page > a, .inline-player .plugin-page > h1 { display: none; }
.inline-player #youtube-notice:empty { display: none; }

/* Chat embeds keep only the official player and a compact external action.
   The complete store widget keeps its existing presentation. */
body.inline-player { min-height: 0; height: auto; background: transparent; }
body.inline-player .plugin-page { width: 100%; max-width: none; margin: 0; padding: 0; }
body.inline-player #youtube-stage { width: 100%; margin: 0; padding: 0; }
body.inline-player #youtube-stage > .tau-youtube {
  display: flex; flex-direction: column; align-items: flex-start;
  width: 100%; min-width: 0; min-height: 0; max-height: none; height: auto;
  margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
  box-shadow: none; overflow: visible;
}
body.inline-player #youtube-stage > .tau-youtube > :not(.yt-screen):not(.yt-external) { display: none !important; }
body.inline-player #youtube-stage > .tau-youtube > .yt-screen {
  width: 100%; aspect-ratio: 16 / 9; min-width: 200px; min-height: 200px;
  margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; overflow: visible;
}
body.inline-player #youtube-stage > .tau-youtube > .yt-screen iframe {
  display: block; width: 100%; height: 100%; min-height: 200px; border: 0;
}
body.inline-player #youtube-stage > .tau-youtube > .yt-external {
  align-self: flex-start; margin: 0; padding: 6px 8px; border: 0; border-radius: 0;
  background: #fff; color: #30343b; font-size: 13px; line-height: 1.4; text-decoration: underline;
}
/* Before a player exists, failures remain readable without exposing settings. */
body.inline-player #youtube-stage > .tau-youtube:not(:has(iframe)) > .yt-status:not(:empty) {
  display: block !important; margin: 0; padding: 8px; color: #30343b; background: transparent;
}
body.inline-player #youtube-notice { margin: 0; color: #30343b; font-size: 13px; line-height: 1.5; }
body.inline-player:has(#youtube-stage iframe) #youtube-notice { display: none; }

/* Full-page plugin hosts keep only their own controls. Inline video retains its compact layout. */
body.plugin-view:not(.inline-player) .plugin-page{width:100%;max-width:none;min-height:100dvh;margin:0;padding:0}
body.plugin-view:not(.inline-player) #youtube-notice{margin:0;padding:12px 16px}
body.plugin-view #youtube-notice:empty{display:none}
body.plugin-view:not(.inline-player) .tau-youtube{margin:0;border:0;border-radius:0;max-width:none;min-height:100dvh}

@media (hover: hover) and (pointer: fine) {
  .primary:hover { background: #35383e; }
  .secondary:hover { background: var(--soft); }
  .text-button:hover { color: var(--ink); }
  .danger-subtle:hover { background: #ffebe8; border-color: #e8bcb7; }
  .danger:hover { background: #9f252e; border-color: #9f252e; }
}

/* ===== Tienda de complementos (diseño de las capturas de referencia, iPhone de 430 pt; 1 px = 1 pt) ===== */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url("/panel/inter-regular.ttf") format("truetype"); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url("/panel/inter-medium.ttf") format("truetype"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url("/panel/inter-semibold.ttf") format("truetype"); }
.tienda, .hoja, .capa-menu { --texto: #0d0d0d; --gris: #8f8f8f; --borde-icono: #e6e6e6; --fondo-hoja: #f2f2f7; --raya: #e5e5ea;
  font-family: Inter, -apple-system, system-ui, sans-serif; color: var(--texto); letter-spacing: -0.2px; -webkit-font-smoothing: antialiased; }
.tienda { min-height: 100vh; min-height: 100dvh; background: #fff; padding-bottom: calc(110px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }
:where(.tienda, .hoja, .capa-menu) :where(button, input) { font: inherit; font-weight: 400; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.barra { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: max(env(safe-area-inset-top), 12px) 19.5px 4px 21.6px; min-height: 44px;
  background: linear-gradient(#fff 0, #fff 70%, rgba(255, 255, 255, 0)); }
.hoja .barra { background: linear-gradient(var(--fondo-hoja) 0, var(--fondo-hoja) 70%, rgba(242, 242, 247, 0)); }
.circulo { grid-column: 1; justify-self: start; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #fff; background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .08); display: grid; place-items: center; padding: 0; }
.circulo.derecha { grid-column: 3; justify-self: end; }
.circulo svg { width: 22px; height: 22px; fill: none; stroke: var(--texto); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rayas { display: grid; gap: 5.5px; justify-items: start; transform: translateX(-1.5px); }
.rayas i { display: block; height: 2.1px; border-radius: 2px; background: var(--texto); width: 14.5px; }
.rayas i:first-child { width: 9px; }
.titulo { grid-column: 2; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 8px 4px; margin: 0;
  font-size: 17px; font-weight: 600; letter-spacing: -0.3px; white-space: nowrap; }
.titulo svg { width: 18px; height: 18px; fill: none; stroke: #6e6e6e; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tienda .page-message { margin: 8px 16px 0; }
.vista { padding: 0 16px; }
.seccion { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; margin: 34px 0 0;
  font-size: 16px; font-weight: 600; color: var(--gris); letter-spacing: -0.2px; }
.seccion svg { width: 17px; height: 17px; fill: none; stroke: var(--gris); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.vista > .seccion:first-child { margin-top: 30px; }
.instalados { display: flex; gap: 12.6px; margin-top: 26px; overflow-x: auto; scrollbar-width: none; }
.instalados::-webkit-scrollbar { display: none; }
.icono-complemento { flex: 0 0 auto; width: 47.5px; height: 47.5px; border-radius: 13px; border: 1px solid var(--borde-icono); background: #fff;
  display: grid; place-items: center; overflow: hidden; padding: 0; }
.icono-complemento img { width: 72%; height: 72%; object-fit: contain; }
.icono-complemento.mas { border: 0; background: #efefef; font-size: 16px; font-weight: 500; color: var(--texto); }
.lista { margin-top: 9px; }
.vista > .lista:first-child { margin-top: 18px; }
.fila { display: flex; align-items: center; gap: 17px; min-height: 80px; width: 100%; border: 0; background: none; padding: 0; text-align: left; }
.fila .fila { flex: 1; min-width: 0; }
.fila-textos { flex: 1; min-width: 0; display: grid; gap: 4px; }
.fila-nombre { font-size: 16px; line-height: 21px; }
.fila-detalle { font-size: 14px; line-height: 19px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila.oculto .fila-nombre::after { content: " · oculto"; color: var(--gris); }
.accion-fila { flex: 0 0 auto; width: 44px; height: 44px; margin-right: -6px; border: 0; background: none; display: grid; place-items: center; padding: 0; }
.accion-fila svg { width: 24px; height: 24px; fill: none; stroke: #3c3c3c; stroke-width: 1.6; stroke-linecap: round; }
.accion-fila .puntos { display: flex; gap: 4px; }
.accion-fila .puntos i { width: 5px; height: 5px; border-radius: 50%; background: #3c3c3c; }
.vacio { color: var(--gris); font-size: 15px; text-align: center; padding: 90px 30px; line-height: 1.5; }
.buscador { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 22px 34px max(env(safe-area-inset-bottom), 12px);
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 45%); pointer-events: none; }
.pastilla-busqueda { pointer-events: auto; display: flex; align-items: center; gap: 12px; height: 47.5px; max-width: 492px; margin: 0 auto; padding: 0 20px;
  border-radius: 24px; background: #fafafa; border: 1px solid #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .08); }
.pastilla-busqueda svg { width: 21px; height: 21px; flex: 0 0 auto; fill: none; stroke: #6e6e6e; stroke-width: 2; stroke-linecap: round; }
.pastilla-busqueda input { flex: 1; min-width: 0; width: auto; margin: 0; box-shadow: none; border-radius: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--texto); padding: 0; -webkit-appearance: none; }
.pastilla-busqueda input, .pastilla-busqueda input::placeholder { font-weight: 400; }
.pastilla-busqueda input::placeholder { color: var(--gris); }
.pastilla-busqueda input::-webkit-search-cancel-button { -webkit-appearance: none; }
/* Hoja «Complementos ⌄» */
.hoja { position: fixed; inset: 0; z-index: 20; background: var(--fondo-hoja); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.hoja-contenido { max-width: 560px; margin: 0 auto; padding: 22px 20px calc(40px + env(safe-area-inset-bottom)); }
.seccion-hoja { margin: 26px 0 9px 20.5px; font-size: 15px; font-weight: 600; color: #8e8e93; }
.seccion-hoja:first-child { margin-top: 10px; }
.tarjeta-lista { background: #fff; border-radius: 26px; overflow: hidden; }
.fila-lista { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 49px; padding: 0 20px 0 18px; border: 0; background: none;
  text-align: left; text-decoration: none; color: var(--texto); font-size: 16px; }
.fila-lista[hidden] { display: none; }
.fila-lista:not([hidden]) ~ .fila-lista:not([hidden]) { background: linear-gradient(var(--raya), var(--raya)) no-repeat 53px 0 / calc(100% - 73px) 1px; }
.fila-lista .fila-texto { flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-lista .fila-texto strong { font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.fila-lista img, .fila-lista .icono-fila { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 6px; object-fit: contain; display: grid; place-items: center; font-size: 17px; }
.fila-lista .avatar { width: 24px; height: 24px; font-size: 10px; }
.fila-lista.peligro { color: #c4302b; }
.chevron { width: 9px; height: 9px; flex: 0 0 auto; border: solid #c4c4c6; border-width: 2px 2px 0 0; transform: rotate(45deg); margin-left: 8px; }
.fila-explorar { display: flex; align-items: center; gap: 15px; width: 100%; margin-top: 18px; padding: 14px 20px 14px 18px; border: 0; background: none; color: var(--gris); font-size: 16px; text-align: left; }
.fila-explorar svg { width: 24px; height: 24px; fill: none; stroke: var(--gris); stroke-width: 1.8; stroke-linecap: round; }
.fila-explorar .chevron { margin-left: auto; }
.hoja .buscador { padding-left: 28px; padding-right: 28px; background: linear-gradient(rgba(242, 242, 247, 0), var(--fondo-hoja) 45%); }
.hoja .pastilla-busqueda { background: #fff; }
.hoja-contenido { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.tienda.en-app ~ .hoja .cuenta-web { display: none; }
.lista-vacia { padding: 15px 20px; color: var(--gris); font-size: 15px; }
/* Menú «…» con el estilo de los menús del chat */
.capa-menu { position: fixed; inset: 0; z-index: 30; }
.tarjeta-menu { position: absolute; width: 278.6px; padding: 10.5px 0; border-radius: 34px; background: #f7f7f7; border: 1px solid #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, .14); }
.opcion-menu { display: flex; align-items: center; gap: 15.6px; width: 100%; height: 64.6px; padding: 0 0 0 21.4px; border: 0; background: none; text-align: left; font-size: 16px; }
.opcion-menu .icono-opcion { width: 44px; height: 44px; border-radius: 50%; background: #f0f0f0; display: grid; place-items: center; }
.opcion-menu svg { width: 21px; height: 21px; fill: none; stroke: var(--texto); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.opcion-menu.peligro { color: #c4302b; }
.opcion-menu.peligro svg { stroke: #c4302b; }
.opcion-menu:disabled { opacity: .35; }
#config-content .plugin-management, #config-content > * { margin-top: 12px; }
/* Gestión de borrados (solo administración desde el navegador) */
.tienda .removal-operations { margin-top: 30px; }
.etiqueta-pronto { flex: 0 0 auto; padding: 5px 10px; border-radius: 12px; background: #f0f0f0; color: var(--gris); font-size: 13px; font-weight: 500; }
.fila.proximo { cursor: default; }
/* Iconos sin cuadrado blanco ni borde: se ve el icono entero, ocupando todo su espacio. */
.icono-complemento { border: 0; background: none; border-radius: 0; overflow: visible; }
.icono-complemento img { width: 100%; height: 100%; object-fit: contain; }
.icono-complemento.mas { border-radius: 13px; background: #efefef; }

/* ===== Modo noche (estilo «Luces», 01-11-2026): solo se aplica cuando la app pide el esquema oscuro.
   El modo día de arriba queda exactamente igual. ===== */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --noche-luces: radial-gradient(circle 58vmax at 2% 55%, hsla(186,72%,36%,.55), hsla(186,72%,36%,0)),
      radial-gradient(circle 52vmax at 97% 16%, hsla(290,62%,32%,.45), hsla(290,62%,32%,0)),
      radial-gradient(circle 55vmax at 60% 86%, hsla(228,72%,40%,.35), hsla(228,72%,40%,0)),
      linear-gradient(180deg, #05081A 0%, #0A1532 60%, #070D24 100%);
    --noche-cristal: linear-gradient(135deg, hsla(190,70%,38%,.30), hsla(228,60%,22%,.42), hsla(285,55%,34%,.30)) padding-box,
      linear-gradient(rgba(10,21,50,.38), rgba(10,21,50,.38)) padding-box,
      linear-gradient(135deg, hsla(186,80%,70%,.45), hsla(228,70%,75%,.16), hsla(290,75%,75%,.40)) border-box;
  }
  /* Traducción automática de los colores de día */
  body { color: var(--ink); background: rgba(255,255,255,0.08) }
  button, a, label.file-label { -webkit-tap-highlight-color: transparent }
  a { color: inherit }
  button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #8eb3ec; outline-offset: 3px }
  input { border: 1px solid rgba(200,215,255,0.24); background: rgba(255,255,255,0.08); color: var(--ink); outline: none }
  input:focus { border-color: rgba(200,215,255,0.32); box-shadow: 0 0 0 3px #0E1736 }
  .muted { color: var(--muted) }
  .eyebrow { color: rgba(232,239,255,0.6) }
  .brand-dot { background: #cc6052 }
  .button { border: 1px solid transparent }
  .primary { color: #fff; background: var(--accent) }
  .secondary { background: rgba(255,255,255,0.08); color: rgba(232,239,255,0.78); border-color: rgba(200,215,255,0.14) }
  .text-button { color: var(--muted); border: 0; background: transparent }
  .login-screen { background: rgba(255,255,255,0.05) }
  .login-card { border: 1px solid var(--line); background: rgba(255,255,255,0.08) }
  .initial-loading { color: var(--muted) }
  .sidebar { background: #0E1736; border-right: 1px solid var(--line) }
  .sidebar-caption { color: rgba(232,239,255,0.6) }
  .nav-button { border: 0; background: transparent; color: rgba(232,239,255,0.6) }
  .nav-button[aria-current="page"] { color: #E8EFFF; background: rgba(255,255,255,0.05) }
  .account-button { border: 0; border-top: 1px solid var(--line); background: transparent }
  .account-copy small { color: rgba(232,239,255,0.6) }
  .account-chevron { color: rgba(232,239,255,0.6) }
  .avatar { background: rgba(255,255,255,0.05); color: rgba(232,239,255,0.78) }
  .page-message { border: 1px solid #486267; background: rgba(255,255,255,0.05); color: var(--green) }
  .page-message.error, .form-message.error { color: var(--red); background: rgba(255,255,255,0.05); border-color: #684757 }
  .form-message { border: 1px solid }
  .plugin-card { border: 1px solid var(--line); background: rgba(255,255,255,0.08) }
  .plugin-icon { background: var(--soft) }
  .plugin-description { color: var(--muted) }
  .configuration-notice { color: #E0C6A4 }
  .badge { color: rgba(232,239,255,0.6); background: rgba(255,255,255,0.05) }
  .badge.installed { color: var(--green); background: rgba(255,255,255,0.05) }
  .plugin-management { border-top: 1px solid var(--line) }
  .management-caption { color: rgba(232,239,255,0.6) }
  .danger-subtle { color: #a52c32; background: rgba(255,255,255,0.05); border-color: #684556 }
  .danger { color: #fff; background: #b83139; border-color: #b83139 }
  .removal-identity { border: 1px solid var(--line) }
  .removal-warning { background: rgba(255,255,255,0.05); border: 1px solid #6B4754; color: #DDA9A7 }
  .removal-counts > div { background: var(--soft) }
  .removal-counts span { color: var(--muted) }
  .removal-list { color: rgba(232,239,255,0.78) }
  .removal-note { border-left: 2px solid rgba(200,215,255,0.24); color: var(--muted) }
  .removal-busy { color: var(--muted) }
  .removal-busy::before { border: 2px solid rgba(200,215,255,0.14); border-top-color: rgba(200,215,255,0.32) }
  .activation-control { border-top: 1px solid var(--line); color: rgba(232,239,255,0.78) }
  .activation-control input { accent-color: #8FB4FF }
  .admin-config { border-top: 1px solid var(--line) }
  .admin-config summary { color: rgba(232,239,255,0.78) }
  .empty-state { color: var(--muted); background: rgba(255,255,255,0.05); border: 1px dashed rgba(200,215,255,0.14) }
  .users-panel { border: 1px solid var(--line) }
  .users-toolbar { background: rgba(255,255,255,0.05); border-bottom: 1px solid var(--line); color: var(--muted) }
  .users-table { border-collapse: collapse }
  .users-table th { color: rgba(232,239,255,0.6); background: rgba(255,255,255,0.08) }
  .users-table td { border-top: 1px solid rgba(200,215,255,0.14) }
  .user-identity small { color: var(--muted) }
  .profile-dialog { border: 1px solid var(--line); box-shadow: 0 25px 90px rgba(3,8,26,0.52) }
  .profile-dialog::backdrop { background: rgba(3,8,26,0.62) }
  .icon-button { color: rgba(232,239,255,0.6); border: 0; background: rgba(255,255,255,0.05) }
  .file-label:focus-within, .file-input:focus-visible + label { outline: 3px solid #8eb3ec }
  .hint { color: rgba(232,239,255,0.6) }
  .optional { color: rgba(232,239,255,0.6) }
  .removal-operation { background: var(--white, rgba(255,255,255,0.08)); border: 1px solid var(--line) }
  .removal-operation-copy .hint { color: var(--muted) }
  .badge.removal-state { background: rgba(255,255,255,0.05); color: #EDD197 }
  .badge.removal-state.failed { background: rgba(255,255,255,0.05); color: #a2353e }
  @media (max-width: 620px) {
    .sidebar { border-right: 0; border-bottom: 1px solid var(--line) }
    .account-button { border: 0 }
  }
  .plugin-page > a { color: var(--muted) }
  body.inline-player { background: transparent }
  body.inline-player #youtube-stage > .tau-youtube { border: 0; background: transparent; box-shadow: none }
  body.inline-player #youtube-stage > .tau-youtube > .yt-screen { border: 0; background: transparent }
  body.inline-player #youtube-stage > .tau-youtube > .yt-screen iframe { border: 0 }
  body.inline-player #youtube-stage > .tau-youtube > .yt-external { border: 0; background: #141E44; color: #E8EFFF }
  body.inline-player #youtube-stage > .tau-youtube:not(:has(iframe)) > .yt-status:not(:empty) { color: #E8EFFF; background: transparent }
  body.inline-player #youtube-notice { color: #E8EFFF }
  body.plugin-view:not(.inline-player) .tau-youtube { border: 0 }
  @media (hover: hover) and (pointer: fine) {
    .primary:hover { background: #35383e }
    .secondary:hover { background: var(--soft) }
    .text-button:hover { color: var(--ink) }
    .danger-subtle:hover { background: rgba(255,255,255,0.05); border-color: #694656 }
    .danger:hover { background: #9f252e; border-color: #9f252e }
  }
  .tienda, .hoja, .capa-menu { color: var(--texto) }
  .tienda { background: rgba(255,255,255,0.08) }
  :where(.tienda, .hoja, .capa-menu) :where(button, input) { color: inherit; -webkit-tap-highlight-color: transparent }
  .barra { background: linear-gradient(#141E44 0, #141E44 70%, rgba(7,13,36,0)) }
  .hoja .barra { background: linear-gradient(var(--fondo-hoja) 0, var(--fondo-hoja) 70%, rgba(7,13,36,0)) }
  .circulo { border: 1px solid rgba(200,215,255,0.14); background: rgba(255,255,255,0.08); box-shadow: 0 2px 12px rgba(3,8,26,0.36) }
  .circulo svg { fill: none; stroke: var(--texto) }
  .rayas i { background: var(--texto) }
  .titulo { border: 0; background: none }
  .titulo svg { fill: none; stroke: rgba(232,239,255,0.78) }
  .seccion { border: 0; background: none; color: var(--gris) }
  .seccion svg { fill: none; stroke: var(--gris) }
  .icono-complemento { border: 1px solid var(--borde-icono); background: rgba(255,255,255,0.08) }
  .icono-complemento.mas { border: 0; background: rgba(255,255,255,0.05); color: var(--texto) }
  .fila { border: 0; background: none }
  .fila-detalle { color: var(--gris) }
  .fila.oculto .fila-nombre::after { color: var(--gris) }
  .accion-fila { border: 0; background: none }
  .accion-fila svg { fill: none; stroke: rgba(232,239,255,0.78) }
  .accion-fila .puntos i { background: #3c3c3c }
  .vacio { color: var(--gris) }
  .buscador { background: linear-gradient(rgba(7,13,36,0), #141E44 45%) }
  .pastilla-busqueda { background: rgba(255,255,255,0.05); border: 1px solid rgba(200,215,255,0.14); box-shadow: 0 2px 12px rgba(3,8,26,0.36) }
  .pastilla-busqueda svg { fill: none; stroke: rgba(232,239,255,0.78) }
  .pastilla-busqueda input { box-shadow: none; border: 0; outline: 0; background: none; color: var(--texto) }
  .pastilla-busqueda input::placeholder { color: var(--gris) }
  .hoja { background: var(--fondo-hoja) }
  .seccion-hoja { color: rgba(232,239,255,0.6) }
  .tarjeta-lista { background: rgba(255,255,255,0.08) }
  .fila-lista { border: 0; background: none; color: var(--texto) }
  .fila-lista:not([hidden]) ~ .fila-lista:not([hidden]) { background: linear-gradient(var(--raya), var(--raya)) no-repeat 53px 0 / calc(100% - 73px) 1px }
  .fila-lista.peligro { color: #c4302b }
  .chevron { border: solid rgba(200,215,255,0.24); border-width: 2px 2px 0 0 }
  .fila-explorar { border: 0; background: none; color: var(--gris) }
  .fila-explorar svg { fill: none; stroke: var(--gris) }
  .hoja .buscador { background: linear-gradient(rgba(7,13,36,0), var(--fondo-hoja) 45%) }
  .hoja .pastilla-busqueda { background: #141E44 }
  .lista-vacia { color: var(--gris) }
  .tarjeta-menu { background: #0E1736; border: 1px solid rgba(200,215,255,0.14); box-shadow: 0 8px 30px rgba(3,8,26,0.54) }
  .opcion-menu { border: 0; background: none }
  .opcion-menu .icono-opcion { background: #0E1736 }
  .opcion-menu svg { fill: none; stroke: var(--texto) }
  .opcion-menu.peligro { color: #c4302b }
  .opcion-menu.peligro svg { stroke: #c4302b }
  .etiqueta-pronto { background: rgba(255,255,255,0.05); color: var(--gris) }
  .icono-complemento { border: 0; background: none }
  .icono-complemento.mas { background: rgba(255,255,255,0.05) }
  /* Ajustes a mano */
  :root { --ink: #E8EFFF; --muted: rgba(232,239,255,.62); --line: rgba(200,215,255,.14); --soft: rgba(255,255,255,.08); --accent: #E8EFFF; --green: #7FDCAA; }
  .tienda, .hoja, .capa-menu { --texto: #E8EFFF; --gris: rgba(232,239,255,.62); --borde-icono: rgba(200,215,255,.14); --fondo-hoja: #0E1736; --raya: rgba(200,215,255,.14); }
  /* Fondo: el vídeo incrustado en el chat (body.inline-player) sigue transparente */
  body { background: #070D24; }
  body.inline-player { background: transparent; }
  body.inline-player::before { content: none; }
  button:focus-visible, a:focus-visible, summary:focus-visible, .file-label:focus-within, .file-input:focus-visible + label { outline-color: #8FB4FF; }
  input:focus { border-color: #8FB4FF; box-shadow: 0 0 0 3px rgba(143,180,255,.22); }
  input::placeholder { color: rgba(232,239,255,.40); }
  .primary { color: #070D24; }
  .login-screen { background: transparent; }
  .login-card { }
  .sidebar { background: rgba(5,8,26,.55); }
  .nav-button[aria-current="page"], .icon-button { background: rgba(255,255,255,.14); }
  .avatar { background: rgba(255,255,255,.14); color: #E8EFFF; }
  .page-message { background: rgba(127,220,170,.10); border-color: rgba(127,220,170,.28); }
  .page-message.error, .form-message.error { background: rgba(242,139,130,.10); border-color: rgba(242,139,130,.30); }
  .badge.installed { background: rgba(127,220,170,.14); }
  .danger-subtle, .removal-warning { background: rgba(242,139,130,.10); }
  .removal-busy::before { border-top-color: #E8EFFF; }
  .profile-dialog { background: #0E1736; color: var(--ink); }
  .profile-dialog::backdrop { background: rgba(3,8,26,.6); }
  body.inline-player #youtube-stage > .tau-youtube > .yt-external { background: transparent; }
  @media (hover: hover) and (pointer: fine) {
    .primary:hover { background: #fff; }
    .secondary:hover { background: rgba(255,255,255,.14); }
  }
  /* Tienda de complementos */
  .tienda { background: transparent; }
  .barra { background: transparent; }
  .hoja .barra { background: linear-gradient(#0E1736 0, #0E1736 70%, rgba(14,23,54,0)); }
  .circulo { border: 1px solid transparent; background: var(--noche-cristal); color: #E8EFFF; box-shadow: 0 6px 18px rgba(3,8,26,.45); }
  .buscador { background: transparent; }
  .hoja .buscador { background: linear-gradient(rgba(14,23,54,0), #0E1736 45%); }
  .pastilla-busqueda, .hoja .pastilla-busqueda { background: rgba(255,255,255,.08); border-color: rgba(200,215,255,.16); box-shadow: 0 6px 18px rgba(3,8,26,.45); }
  .pastilla-busqueda input::placeholder { color: rgba(232,239,255,.40); }
  .accion-fila .puntos i { background: rgba(232,239,255,.8); }
  .tarjeta-lista { background: rgba(255,255,255,.08); }
  .tarjeta-menu { background: #141E44; }
  .opcion-menu .icono-opcion, .icono-complemento.mas, .etiqueta-pronto { background: rgba(255,255,255,.08); }
}
@media (prefers-color-scheme: dark) {
  /* Dentro de la app de TAU el fondo de luces lo pone la propia app, entero y de una pieza: la página es transparente
     y sin desenfoques (en Android cada parte desenfocada repintaba su propio trozo de fondo). */
  html, :root, body { background: transparent !important; }
  /* Sin franjas ni sombras oscuras sobre las luces de la app (se veían como paneles aparte): la cabecera y la búsqueda
     no llevan fondo ni sombra; la hoja «Complementos ⌄» lleva las mismas luces. */
  .tienda > .barra, .tienda > .buscador, .hoja .barra, .hoja .buscador { background: transparent; box-shadow: none; }
  .pastilla-busqueda, .hoja .pastilla-busqueda, .circulo { box-shadow: none; }
  .hoja { background: var(--noche-luces) !important; }
}

/* Menú lateral (02-11-2026): en el navegador, el menú (≡ y «Complementos ⌄») se abre desde la izquierda, como el menú
   del chat en las apps, en lugar de cubrir toda la pantalla. En las apps no cambia nada. */
.velo-hoja { position: fixed; inset: 0; z-index: 19; background: rgba(0, 0, 0, .28); opacity: 0; transition: opacity .28s ease; }
.velo-hoja.visible { opacity: 1; }
.hoja.lateral { inset: 0 auto 0 0; width: min(340px, 86vw); transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 0 40px rgba(0, 0, 0, .18); border-radius: 0 20px 20px 0; }
.hoja.lateral.abierta { transform: none; }
.hoja.lateral .hoja-contenido { max-width: none; padding-left: 16px; padding-right: 16px; }
.hoja.lateral .buscador { padding-left: 16px; padding-right: 16px; }
@media (prefers-color-scheme: dark) {
  .velo-hoja { background: rgba(0, 0, 0, .5); }
  .hoja.lateral { box-shadow: 0 0 40px rgba(0, 0, 0, .55); }
}

/* Gasto en API de cada usuario (02-11-2026). */
.users-table .gasto-column{min-width:150px;max-width:260px}
.users-table .gasto-total{display:block;font-size:15px;font-variant-numeric:tabular-nums}
.users-table .gasto-desglose{display:block;font-size:12px;line-height:1.35;opacity:.72;margin-top:2px}
/* YouTube a pantalla completa en la app (2026-11-03): empieza debajo de la cámara y de la hora, y termina sobre la raya de abajo. */
body.plugin-view:not(.inline-player) .plugin-page{box-sizing:border-box;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
body.plugin-view:not(.inline-player) .tau-youtube{min-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
