/* Estilos compartidos de las páginas de cuenta, perfil y ajustes (misma estética oscura que el feed). */
:root {
  --radius: 14px;
}
* { box-sizing: border-box; }
/* mientras llegan las traducciones no se ve el texto provisional (si algo falla, la página se muestra igual a los 3 s) */
.i18n-pending body { visibility: hidden; animation: i18n-reveal 0s 3s forwards; }
@keyframes i18n-reveal { to { visibility: visible; } }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  padding-inline: max(16px, env(safe-area-inset-left));
}
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.link { color: var(--brand-ink); text-decoration: none; font-weight: 700; }
.link:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.brand { font-weight: 900; font-size: 17px; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; min-width: 0; overflow: hidden; }
@media (max-width: 400px) { .brand { font-size: 14px; } }
.brand b { color: var(--brand-ink); }

/* ---------- barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5; margin-inline: -16px; padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { flex: 1; margin: 0; font-size: 16px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-link {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--panel-2); border: 0; cursor: pointer; text-decoration: none; font-size: 17px;
}
.icon-link:hover { background: var(--line); }
/* el enlace del perfil puede llevar dentro la foto recortada, que se sale si no se recorta aquí */
.icon-link { position: relative; overflow: hidden; }

.page { max-width: 560px; margin: 0 auto; padding-bottom: 48px; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel-2); font-weight: 800; cursor: pointer; text-decoration: none;
  transition: transform .1s, background .15s, opacity .15s;
}
.btn:hover { background: var(--line); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #ff8f1f; }
.btn.danger { background: transparent; border-color: color-mix(in srgb, var(--err) 60%, transparent); color: var(--err); }
.btn.danger:hover { background: color-mix(in srgb, var(--err) 14%, transparent); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.glyph, .actions .btn.glyph { min-width: 0; padding: 0 14px; }
.btn.loading::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- formularios ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 46px; padding: 11px 13px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line); outline: none; color: inherit; font: inherit;
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 30%, transparent); }
.field [aria-invalid="true"] { border-color: var(--err); }
.field .hint { font-size: 12px; color: var(--muted); }
.err { color: var(--err); font-size: 13px; min-height: 0; }
.err:empty { display: none; }
.prefix { position: relative; }
.prefix::before { content: "@"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.prefix input { padding-left: 30px; }
.pw { position: relative; }
.pw input { padding-right: 48px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 38px; border: 0; background: none; cursor: pointer; opacity: .65; font-size: 16px;
}
.pw-toggle[aria-pressed="true"] { opacity: 1; }
.form-error, .form-ok {
  padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; font-size: 14px;
  background: color-mix(in srgb, var(--err) 14%, transparent); border: 1px solid color-mix(in srgb, var(--err) 45%, transparent);
}
.form-ok { background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.meter { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--err); transition: width .2s, background .2s; }

/* ---------- páginas de acceso ---------- */
.auth { min-height: 100vh; min-height: 100dvh; max-width: 420px; margin: 0 auto; padding-block: 18px 40px; display: flex; flex-direction: column; }
.auth .back { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 14px; }
.auth-card { margin-top: 6vh; }
.auth-card h1 { margin: 18px 0 4px; font-size: 26px; }
.auth-card .sub { margin: 0 0 22px; color: var(--muted); }
.auth-card .right { display: block; text-align: right; margin: -4px 0 16px; }
.auth-card .alt { text-align: center; color: var(--muted); margin-top: 22px; }
.auth-card .or { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--muted); font-size: 13px; }
.auth-card .or::before, .auth-card .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
/* the light scheme keeps Google's button frame transparent on the dark page */
.google-button { display: flex; justify-content: center; min-height: 44px; color-scheme: light; }
.auth-card #googleName h2 { margin: 0 0 6px; font-size: 20px; }
.status-icon { font-size: 54px; margin-top: 10px; }

/* ---------- tarjetas / secciones ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 16px; }
.card h2 { margin: 0 0 4px; font-size: 17px; }
.card > p.muted { margin: 0 0 14px; font-size: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.danger-zone { border-color: color-mix(in srgb, var(--err) 40%, var(--line)); }
details.card > summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; }
details.card > summary::after { content: "\203A"; transform: rotate(90deg); transition: transform .2s; color: var(--muted); }
details.card[open] > summary::after { transform: rotate(-90deg); }
details.card > summary + * { margin-top: 14px; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.pill.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pill.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }

.avatar-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; margin-bottom: 14px; max-height: min(50vh, 340px); overflow-y: auto; }
.avatar-picker button {
  aspect-ratio: 1; border-radius: 12px; border: 2px solid transparent; background: var(--panel-2);
  font-size: 22px; cursor: pointer; padding: 0;
}
.avatar-picker button[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, var(--panel-2)); }
.theme-picker { display: flex; gap: 10px; margin: 12px 0 10px; }
.theme-picker .btn { flex: 1; }
.theme-picker .btn[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, var(--panel-2)); }

.session-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.session-row:first-of-type { border-top: 0; }
.session-row .info { flex: 1; min-width: 0; }
.session-row .info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- perfil ---------- */
.profile-head { text-align: center; padding-top: 22px; }
.avatar-xl {
  width: 96px; height: 96px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 50px;
  background: radial-gradient(circle at 30% 25%, #ffffff22, transparent 60%), linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 30px var(--shadow-soft);
}
.profile-head h2 { margin: 12px 0 0; font-size: 22px; display: inline-flex; align-items: center; gap: 6px; }
/* insignias: dorada solo el fundador, morada administración, azul creador, blanca email verificado; el ✓ siempre negro */
.verified { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #20d5ec; color: #000; font-size: 11px; font-weight: 900; cursor: help; outline: none; }
.verified.admin { background: #a855f7; }
.verified.founder { background: linear-gradient(135deg, #ffe680, #f2b705 55%, #c98a00); }
.verified.email { background: #fff; box-shadow: 0 0 0 1px #0004; }
/* globo con lo que es: al pasar el ratón o al tocarla */
.verified::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 4px);
  padding: 6px 10px; border-radius: 8px; background: #14141c; color: #fff; border: 1px solid #ffffff26;
  font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 18px #0009;
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 50;
}
.verified:hover::after, .verified:focus::after { opacity: 1; transform: translate(-50%, 0); }
.handle { color: var(--muted); margin-top: 2px; }
.stats { display: flex; justify-content: center; margin: 18px 0 14px; }
.stat { padding: 0 16px; min-width: 76px; }
.stat + .stat { border-left: 1px solid var(--line); }
button.stat { background: none; border: 0; border-radius: 0; color: inherit; font: inherit; cursor: pointer; }
button.stat:hover span, button.stat:focus-visible span { color: var(--text); text-decoration: underline; }
.stat b { display: block; font-size: 18px; }
.stat span { font-size: 12px; color: var(--muted); }
.bio { margin: 0 auto 16px; max-width: 360px; white-space: pre-line; overflow-wrap: anywhere; }
.actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.actions .btn { min-width: 130px; }
.joined { font-size: 12px; color: var(--muted); margin-top: 12px; }

.tabs { display: flex; margin: 22px -16px 0; border-bottom: 1px solid var(--line); position: sticky; top: 59px; background: var(--bg); z-index: 4; }
.tab {
  flex: 1; padding: 12px 0; background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--muted); font-weight: 800; cursor: pointer;
}
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 3px -16px 0; }
.game-card {
  position: relative; aspect-ratio: 9 / 14; overflow: hidden; text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 8px;
  background: linear-gradient(160deg, var(--c1, #333), #000 130%);
}
.game-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, var(--c2, #fff) 0%, transparent 55%); opacity: .22; }
.game-card:hover { filter: brightness(1.12); }
.game-card .icon { position: relative; font-size: 40px; filter: drop-shadow(0 4px 10px #0009); }
.game-card .title { position: relative; font-weight: 800; font-size: 13px; line-height: 1.2; text-shadow: 0 1px 4px #000; }
.game-card .plays { position: absolute; left: 6px; bottom: 5px; font-size: 12px; font-weight: 800; text-shadow: 0 1px 4px #000; }
.game-card .likes { position: absolute; right: 6px; bottom: 5px; font-size: 12px; font-weight: 800; text-shadow: 0 1px 4px #000; }

.score-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.score-row .icon { font-size: 28px; width: 40px; text-align: center; }
.score-row .info { flex: 1; }
.score-row .best { font-size: 20px; font-weight: 900; }

.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty .big { font-size: 42px; display: block; margin-bottom: 8px; }

.skeleton { background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- avisos ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 12px; font-weight: 700;
  background: var(--toast-bg); color: var(--toast-fg); box-shadow: 0 10px 30px var(--shadow);
}
.toast[data-kind="err"] { background: var(--err); color: #fff; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.center-screen { min-height: 70vh; display: grid; place-items: center; text-align: center; }

dialog {
  width: min(420px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 18px;
  background: var(--panel); color: var(--text); padding: 20px;
}
dialog::backdrop { background: #000b; }
dialog h2 { margin: 0 0 6px; }

/* ---------- creadores: subir juego ---------- */
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; background: var(--panel-2); padding: 1px 5px; border-radius: 6px; }
.field select {
  width: 100%; min-height: 46px; padding: 11px 13px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font: inherit;
}
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 14px; }

.dropzone {
  display: grid; gap: 10px; justify-items: center; text-align: center; padding: 22px 14px;
  border: 2px dashed var(--line); border-radius: var(--radius); background: var(--panel-2); transition: border-color .15s, background .15s;
}
.dropzone.over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--panel-2)); }
.dz-icon { font-size: 34px; }
.pkg-result { margin: 12px 0 6px; padding: 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.pkg-name { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; overflow-wrap: anywhere; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.checks li { overflow-wrap: anywhere; }
.checks .ok::before { content: "\2713  "; color: var(--ok); font-weight: 900; }
.checks .bad { color: var(--err); }
.checks .bad::before { content: "\2717  "; font-weight: 900; }

.logo-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.logo-preview {
  width: 88px; height: 88px; border-radius: 20px; overflow: hidden; flex: none; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line); font-size: 40px;
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.card-preview { margin-top: 14px; display: grid; gap: 8px; }
.mini-card {
  position: relative; width: 120px; aspect-ratio: 9 / 14; border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; text-align: center;
  background: linear-gradient(160deg, var(--c1, #333), #000 130%);
}
.mini-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, var(--c2, #fff) 0%, transparent 55%); opacity: .25; }
.mini-card img { position: relative; width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.mini-card b { position: relative; font-size: 12px; text-shadow: 0 1px 4px #000; overflow-wrap: anywhere; }

.progress { position: relative; height: 26px; margin-top: 14px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--brand); transition: width .2s; }
.progress span { position: relative; display: grid; place-items: center; height: 100%; font-size: 13px; font-weight: 800; }

/* ---------- panel de creador y administración ---------- */
.pill.info { background: color-mix(in srgb, var(--brand-2) 22%, transparent); color: var(--info-ink); }
.pill.bad { background: color-mix(in srgb, var(--err) 18%, transparent); color: var(--err); }
.pill.muted { background: var(--panel-2); color: var(--muted); }
.game-row { display: flex; gap: 12px; align-items: flex-start; }
.game-row + .game-row { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.game-thumb {
  width: 64px; height: 64px; border-radius: 16px; overflow: hidden; flex: none; display: grid; place-items: center; font-size: 30px;
  background: linear-gradient(160deg, var(--c1, #333), #000 130%);
}
.game-thumb img { width: 100%; height: 100%; object-fit: contain; }
.game-thumb:has(img) { background: none; }
.game-row .info { flex: 1; min-width: 0; }
.game-row h3 { margin: 0 0 4px; font-size: 16px; overflow-wrap: anywhere; }
.game-row .actions-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.note { margin-top: 8px; padding: 8px 10px; border-radius: 10px; font-size: 13px; background: var(--panel-2); border-left: 3px solid var(--err); white-space: pre-line; overflow-wrap: anywhere; }
.meta { display: flex; gap: 8px 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 4px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.admin-tabs { margin-top: 0; top: 59px; overflow-x: auto; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
/* siete pestañas no caben de una vez: se deslizan de lado y el borde se difumina para que se note */
.admin-tabs { -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%); }
.admin-tabs.at-end { -webkit-mask-image: none; mask-image: none; }
.admin-tabs .tab { flex: 1 0 auto; padding: 12px 11px; white-space: nowrap; font-size: 14px; }

/* ---------- probador y guía ---------- */
.tester { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; justify-content: center; padding-top: 16px; }
.phone { width: min(360px, 100%); aspect-ratio: 9 / 16; border-radius: 26px; overflow: hidden; background: #000; border: 6px solid #22222f; box-shadow: 0 20px 60px #000a; }
.phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.tester-panel { flex: 1; min-width: 260px; max-width: 420px; }
.log { max-height: 220px; overflow: auto; font: 12px/1.5 ui-monospace, Consolas, monospace; background: var(--panel-2); border-radius: 10px; padding: 10px; margin: 0; white-space: pre-wrap; }
.doc h2 { margin-top: 30px; font-size: 20px; }
.doc h3 { margin-top: 22px; font-size: 16px; }
.doc p, .doc li { color: var(--text-soft); }
.doc pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; overflow-x: auto; font: 13px/1.55 ui-monospace, Consolas, monospace; }
.doc pre code { background: none; padding: 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc th, .doc td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc .table-wrap { overflow-x: auto; }

/* ---------- guía del SDK: páginas de ayuda con menú lateral ---------- */
.docs-body { padding-inline: 0; }
/* el contenido de la guía se ve cuando llega su traducción (o a los 3 s, si algo falla) */
.docs-pending .docs-content { visibility: hidden; animation: i18n-reveal 0s 3s forwards; }
.docs-top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px;
  padding: 12px max(16px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.docs-tag { font-size: 12px; font-weight: 800; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 2px 9px; }
.docs-top-links { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 14px; font-weight: 700; }
.docs-top-links a:not(.btn) { color: var(--muted); text-decoration: none; }
.docs-top-links a:not(.btn):hover { color: var(--text); }
.docs-top .brand, .docs-top-links .btn { white-space: nowrap; }
.docs-content pre { tab-size: 4; }
.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 44px; max-width: 1180px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)) 64px; }
.docs-nav { position: sticky; top: 61px; align-self: start; max-height: calc(100vh - 61px); overflow-y: auto; padding: 26px 0; }
.docs-nav .docs-group { margin: 22px 0 6px 10px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.docs-nav .docs-group:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 600; }
.docs-nav a:hover { background: var(--panel); color: var(--text); }
.docs-nav a[aria-current="page"] { background: var(--panel-2); color: var(--text); box-shadow: inset 3px 0 0 var(--brand); }
.docs-nav-toggle { display: none; }
.docs-content { min-width: 0; max-width: 800px; padding-top: 30px; }
.docs-crumb { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); }
.docs-content h1 { margin: 6px 0 10px; font-size: 34px; line-height: 1.15; letter-spacing: -.02em; }
.docs-content .lead { margin: 0 0 8px; font-size: 17px; color: var(--muted); }
.docs-content h2 { margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.docs-content h3 { scroll-margin-top: 80px; }
.docs-content ol li, .docs-content ul li { margin-bottom: 6px; }
.callout { margin: 16px 0; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--brand-2); }
.callout.warn { border-left-color: var(--warn); }
.callout.ok { border-left-color: var(--ok); }
.callout p { margin: 0; }
.docs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 16px 0; }
.docs-card { display: block; padding: 14px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; }
.docs-card:hover { border-color: var(--brand); }
.docs-card b { display: block; margin-bottom: 4px; }
.docs-card span { font-size: 13px; color: var(--muted); }
.download-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0; padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.download-box .icon { font-size: 34px; }
.download-box .file { flex: 1; min-width: 200px; }
.download-box .file b { display: block; }
.download-box .file span { font-size: 13px; color: var(--muted); }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; font-size: 14px; font-weight: 700; }
.flow span { padding: 6px 12px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); }
.flow i { font-style: normal; color: var(--muted); }
.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 52px; }
.docs-pager a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-decoration: none; font-weight: 700; }
.docs-pager a:hover { border-color: var(--brand); }
.docs-pager small { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.docs-pager .next { grid-column: 2; text-align: right; }
@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; gap: 0; }
  .docs-nav { position: static; max-height: none; overflow: visible; padding: 14px 0 0; }
  .docs-nav-toggle { display: flex; width: 100%; justify-content: flex-start; }
  .docs-nav .docs-menu { display: none; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
  .docs-nav.open .docs-menu { display: block; }
  .docs-top-links a:not(.btn) { display: none; }
  .docs-content { padding-top: 20px; }
  .docs-content h1 { font-size: 27px; }
  .docs-pager { grid-template-columns: 1fr; }
  .docs-pager .next { grid-column: 1; }
}

.game-card img.icon { position: relative; width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 6px 12px #0009); }

/* ---------- solicitud para ser creador ---------- */
.request-hero { text-align: center; padding-block: 28px; }
.request-badge {
  width: 68px; height: 68px; margin: 0 auto 12px; border-radius: 20px; display: grid; place-items: center; font-size: 36px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 12px 32px color-mix(in srgb, var(--brand) 30%, transparent);
}
.request-hero h2 { margin: 0 0 8px; font-size: 22px; }
.request-hero > p { max-width: 440px; margin: 0 auto; }
.request-perks { list-style: none; padding: 0; margin: 20px auto 0; max-width: 440px; display: grid; gap: 8px; text-align: left; }
.request-perks li { padding: 11px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.request-notice { text-align: center; padding-block: 24px; }
.request-notice .big { font-size: 40px; display: block; }
.request-notice h3 { margin: 8px 0 6px; }
.request-notice p { max-width: 420px; margin-inline: auto; }
.request-note { margin: 12px auto 0; max-width: 420px; padding: 10px 14px; border-radius: 12px; background: var(--panel-2); text-align: left; white-space: pre-line; overflow-wrap: anywhere; }
.request-check { display: flex; align-items: flex-start; gap: 10px; margin-top: 8px; font-size: 14px; cursor: pointer; }
.request-check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.request-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.request-row:last-child { border-bottom: 0; padding-bottom: 0; }
.request-head { display: flex; align-items: center; gap: 12px; }
.request-message { margin: 10px 0; white-space: pre-line; overflow-wrap: anywhere; }
.request-avatar, .user-avatar {
  width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--panel-2); font-size: 22px;
}
.request-avatar img, .user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
/* users list: the avatar on the left; the text and, under it, the badges and buttons, all aligned to the left */
.admin-user-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; row-gap: 8px; align-items: start; }
.admin-user-row .user-avatar { grid-row: 1 / span 2; }
.admin-user-row .info, .admin-user-row .user-badges { grid-column: 2; }
.admin-user-row .user-badges { justify-content: flex-start; }

/* ---------- listas de juegos: hashtags, tus me gusta, tus más jugados, buscador y explorar ---------- */
.list-head { padding: 18px 0 12px; }
.tag-head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.tag-badge { width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font-size: 30px; font-weight: 900; }
.tag-head h2 { margin: 0; font-size: 22px; overflow-wrap: anywhere; }
.sort-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.sort-select { min-height: 34px; max-width: 100%; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 700; }
.search-box { margin: 14px 0 4px; }
.search-box input { width: 100%; height: 46px; padding: 0 18px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel-2); outline: none; }
.search-box input:focus { border-color: var(--brand); }
.section-title { margin: 22px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.user-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.user-row .avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); font-size: 24px; overflow: hidden; }

/* foto de perfil subida por el usuario, en lugar del emoji */
.avatar-xl img, .user-row .avatar img, .leaderboard .avatar img, .avatar-preview img, .icon-link img.avatar-photo {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block;
}
/* Foto de perfil recortada: la imagen entera colocada para que se vea el trozo elegido en Ajustes. */
img.av-crop.av-crop {
  position: absolute; top: calc(var(--ay) / var(--as) * -100%); left: calc(var(--ax) / var(--as) * -100%);
  width: calc(100% / var(--as)); height: auto; max-width: none; border-radius: 0; object-fit: fill;
}
/* Recortador de la foto de perfil: se arrastra la foto y se ajusta el zoom. */
dialog.cropper-dialog { max-width: min(92vw, 380px); }
.cropper {
  position: relative; width: 100%; aspect-ratio: 1; margin: 10px 0; overflow: hidden;
  border-radius: 14px; background: #000; touch-action: none; cursor: grab; user-select: none;
}
.cropper img { position: absolute; max-width: none; height: auto; }
.cropper::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: #0009; -webkit-mask: radial-gradient(circle closest-side at 50% 50%, transparent 99.5%, #000 100%);
  mask: radial-gradient(circle closest-side at 50% 50%, transparent 99.5%, #000 100%);
}
.cropper-zoom-row { display: flex; align-items: center; gap: 10px; }
.cropper-zoom { flex: 1; }
/* Ver la foto de perfil entera. */
dialog.photo-view { max-width: min(92vw, 720px); padding: 0; border: 0; background: transparent; cursor: zoom-out; }
dialog.photo-view img { display: block; width: 100%; height: auto; border-radius: 14px; }
button.avatar-xl { padding: 0; border: 0; cursor: zoom-in; font: inherit; color: inherit; }
.avatar-xl, .user-row .avatar, .leaderboard .avatar, .avatar-preview, .request-avatar, .user-avatar,
.me-btn.avatar, .p-avatar, .avatar-lg { position: relative; overflow: hidden; }
.avatar-upload { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.avatar-preview {
  width: 72px; height: 72px; flex: none; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--panel-2); font-size: 34px;
}
.photo-rules { margin: 0 0 12px; padding-left: 20px; }
.photo-rules li { margin: 3px 0; }
.avatar-upload-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.user-row .verified { margin-left: 5px; }

/* the owner's Following / Followers / Suggestions window (js/people.js) */
/* a fixed height: the window does not jump when the tab changes */
dialog.people-dialog { width: min(460px, calc(100vw - 24px)); height: min(600px, calc(100vh - 48px)); padding: 0 16px 16px; display: flex; flex-direction: column; overflow: hidden; }
dialog.people-dialog:not([open]) { display: none; }
.people-close { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--panel-2); cursor: pointer; font-size: 14px; }
.people-tabs { display: flex; margin: 0 34px 0 0; border-bottom: 1px solid var(--line); flex: none; overflow-x: auto; scrollbar-width: none; }
@media (max-width: 420px) { .people-tab { font-size: 13px; padding-inline: 4px; } }
.people-tab { flex: 1; padding: 16px 6px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; white-space: nowrap; }
.people-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.people-hint { margin: 12px 0 0; flex: none; }
.people-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; min-height: 0; margin-top: 6px; }
.people-row { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.people-row .user-row { flex: 1; min-width: 0; border-bottom: 0; }
.people-name { min-width: 0; overflow: hidden; }
.people-name b, .people-name div { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-name b .verified { display: inline-grid; vertical-align: middle; }
.people-row .btn { flex: none; }
.people-empty { text-align: center; padding: 36px 8px; margin: 0; }
.people-dialog > .btn.block { margin-top: 12px; flex: none; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel-2); text-decoration: none; font-weight: 800; font-size: 14px; }
.tag-chip span { color: var(--muted); font-weight: 600; font-size: 12px; }
.tag-chip:hover { background: var(--line); }
.explore-intro { margin: 18px 0 0; }
.explore-tag { margin-top: 22px; }
.explore-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.explore-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; text-decoration: none; font-size: 17px; overflow-wrap: anywhere; }
.explore-row { display: grid; grid-auto-flow: column; grid-auto-columns: 30%; gap: 3px; overflow-x: auto; margin: 0 -16px; scrollbar-width: none; }
.explore-row::-webkit-scrollbar { display: none; }
.score-row img.icon { width: 40px; height: 40px; object-fit: contain; }

/* ---------- probador: feed simulado ---------- */
.qa-feed { position: relative; width: 100%; height: 100%; overflow: hidden; touch-action: none; }
.qa-track { position: absolute; left: 0; right: 0; top: 0; height: 300%; transition: transform .34s cubic-bezier(.22, .8, .24, 1); will-change: transform; }
.qa-track.dragging { transition: none; }
.qa-track.dragging iframe { pointer-events: none; }
.qa-slide { position: relative; height: 33.3334%; }
.qa-slide iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.qa-fake { display: grid; place-items: center; cursor: grab; user-select: none; -webkit-user-select: none;
  background: repeating-linear-gradient(135deg, #1b1b2e 0 18px, #15152a 18px 36px); }
.qa-fake-card { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 20px; }
.qa-fake-card b { font-size: 20px; }
.qa-fake-card span { color: var(--muted); font-size: 14px; max-width: 220px; }
.qa-arrow { font-size: 44px; font-weight: 900; color: var(--brand); animation: qa-bounce 1.2s ease-in-out infinite; }
.qa-arrow.up { animation-name: qa-bounce-up; }
@keyframes qa-bounce { 50% { transform: translateY(8px); } }
@keyframes qa-bounce-up { 50% { transform: translateY(-8px); } }
.qa-done { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 16px; margin-bottom: 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--ok) 14%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.qa-done .big { font-size: 40px; }
.qa-done b { font-size: 18px; }
.qa-done small { color: var(--muted); }
.qa-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--text-soft); }
.checks .pending { color: var(--muted); }

/* probador: mensajes a la izquierda, móvil en el centro, comprobaciones a la derecha */
.tester-log { flex: 1; min-width: 240px; max-width: 320px; margin-top: 0; align-self: stretch; display: flex; flex-direction: column; }
.tester-log h3 { margin: 0 0 10px; }
.tester-log .log { flex: 1; max-height: none; min-height: 240px; }
.tester .tester-panel { margin-top: 0; }
@media (max-width: 1100px) {
  .tester-log { order: 3; max-width: 420px; }
  .tester-log .log { max-height: 280px; }
}

/* comentario positivo del administrador (juego aprobado) */
.note.ok { border-left-color: var(--ok, #35d07f); }

/* ---------- ficha del juego ---------- */
.ficha-page { max-width: 980px; }
.ficha-hero { display: flex; gap: 16px; align-items: flex-start; }
.ficha-hero .game-thumb { width: 92px; height: 92px; font-size: 46px; border-radius: 22px; flex: none; }
.ficha-hero .info { flex: 1; min-width: 0; }
.ficha-hero h2 { margin: 0 0 4px; font-size: 22px; overflow-wrap: anywhere; }
.ficha-hero .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.ficha-hero .actions-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ficha-totals { display: flex; gap: 20px; text-align: right; }
.ficha-totals b { display: block; font-size: 22px; font-weight: 900; }
.ficha-totals span { font-size: 12px; color: var(--muted); }
.ficha-tabs .tab { flex: 1; }
code.id { background: var(--panel-2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.segmented button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.segmented button.active { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi .label { font-size: 12px; font-weight: 700; color: var(--muted); }
.kpi .value { font-size: 26px; font-weight: 900; letter-spacing: -.02em; margin-top: 2px; }
.kpi .help { font-size: 11px; color: var(--muted); margin-top: 4px; }
.delta { font-size: 12px; font-weight: 800; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--err); }
.delta.flat { color: var(--muted); }
.chart { display: block; width: 100%; height: auto; margin-top: 12px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .bar { fill: var(--brand); }
.chart .bar:hover { fill: #ff9a33; }
.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.mini-stats div { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; }
.mini-stats b { display: block; font-size: 20px; font-weight: 900; }
.mini-stats span { font-size: 12px; color: var(--muted); }
.leaderboard { list-style: none; margin: 12px 0 0; padding: 0; }
.leaderboard li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.leaderboard .rank { width: 28px; text-align: center; font-weight: 900; color: var(--muted); }
.leaderboard .avatar { font-size: 20px; }
.leaderboard .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.leaderboard .score { font-weight: 900; }
.kv.wide { grid-template-columns: minmax(150px, max-content) 1fr; gap: 10px 18px; margin-top: 10px; }
.ficha-logo { width: 56px; height: 56px; object-fit: contain; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 5px; margin-right: 6px; vertical-align: -3px; border: 1px solid var(--line); }
.timeline { list-style: none; margin: 12px 0 0; padding: 0; }
.timeline li { position: relative; margin-left: 6px; padding: 0 0 18px 22px; border-left: 2px solid var(--line); display: grid; gap: 3px; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--brand-2); }
.timeline .when { font-size: 12px; color: var(--muted); }
.danger-zone { border-color: color-mix(in srgb, var(--err) 45%, transparent); }
@media (max-width: 700px) {
  .ficha-hero { flex-wrap: wrap; }
  .ficha-totals { width: 100%; text-align: left; }
  .mini-stats { grid-template-columns: 1fr; }
  .kv.wide { grid-template-columns: 1fr; gap: 2px; }
  .kv.wide dd { margin-bottom: 8px; }
}

/* ---------- admin: denuncias ---------- */
.report-summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.report-items { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.report-items li { padding: 8px 10px; border-radius: 10px; background: var(--panel-2); }
.report-items .request-message { margin: 4px 0 0; }
.report-thumb { width: 64px; height: 64px; flex: none; border-radius: 10px; object-fit: cover; background: var(--panel-2); }
.report-post { margin: 4px 0 0; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

/* Audiowide para el nombre de la marca. El archivo va en /fonts; si falta, se usa la fuente del sistema. */
@font-face {
  font-family: 'Audiowide';
  src: url('/fonts/audiowide.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
.brand {
  font-family: 'Audiowide', system-ui, -apple-system, sans-serif;
  font-weight: 400; text-transform: uppercase; letter-spacing: 0;
  display: inline-flex; align-items: center;
}
.brand b { font-weight: inherit; }
/* el icono, a la altura de las letras */
.brand-mark { height: 1.18em; width: auto; flex: none; display: block; margin-right: .38em; }

/* ---------- panel de visitas (solo lo ven los administradores) ---------- */
.visit-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 14px; }
.visit-top { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.visit-top li { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; overflow: hidden;
  padding: 5px 9px; border-radius: 9px; background: var(--panel-2); font-size: 13px; }
.visit-top li .fill { position: absolute; inset: 0 auto 0 0; background: var(--brand); opacity: .16; }
.visit-top li span { position: relative; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit-top li b { position: relative; font-variant-numeric: tabular-nums; }
.country { display: inline-flex; align-items: center; cursor: help; font-weight: 700; }
.country .flag { display: block; width: 24px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 1px var(--line); }
.visit-live { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.visit-live th, .visit-live td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.visit-live th { color: var(--muted); font-size: 12px; font-weight: 700; }
.visit-live td.page { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.visit-scroll { overflow-x: auto; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); margin-right: 7px; animation: livePulse 1.6s infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }

/* aviso de cuenta suspendida: arriba del todo, encima de la página, con su ✕ para cerrarlo */
.suspension-bar {
  position: fixed; z-index: 1000; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; background: #3a0d12; color: #ffd9dc; border-bottom: 2px solid #ff4d5e; box-shadow: 0 6px 20px #0008;
  font-size: 14px; line-height: 1.4; text-shadow: none;
}
.suspension-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; white-space: pre-line; }
.suspension-text b { color: #fff; font-size: 15px; }
.suspension-close {
  flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #ffffff1f; color: #fff;
  font-size: 15px; font-weight: 900; cursor: pointer;
}
.suspension-close:hover { background: #ffffff33; }

.mod-head { display: flex; gap: 16px; align-items: center; margin-top: 16px; }
.mod-head .avatar-xl { flex: none; }
.mod-head .info { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mod-head h2 { margin: 0; display: flex; align-items: center; gap: 6px; }
.mod-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mod-card { margin-top: 14px; white-space: pre-line; }
.mod-card h2 { margin: 0 0 8px; font-size: 17px; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mod-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.mod-row .field { flex: 1; min-width: 180px; margin: 0; }
label.mod-row { align-items: center; gap: 6px; }
.mod-days { width: 90px; }
@media (max-width: 480px) { .mod-head { flex-direction: column; text-align: center; } .mod-head h2, .mod-pills { justify-content: center; } }

/* ---------- admin: traffic tube and alert banner ---------- */
.tube-box { --tube: var(--ok); --tube-fill: var(--tube); margin-top: 20px; }
.tube-box[data-level="warn"] { --tube: var(--warn); --tube-fill: #f5a623; }
.tube-box[data-level="danger"] { --tube: #ff7a1a; }
.tube-box[data-level="full"] { --tube: var(--err); }
.tube-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tube-head b { font-size: 15px; }
.tube-head span { font-size: 12px; font-weight: 700; color: var(--muted); }
.tube {
  position: relative; height: 40px; margin-top: 10px; border-radius: 20px; overflow: hidden;
  background: var(--panel-2); border: 2px solid var(--line);
  box-shadow: inset 0 3px 8px var(--shadow-soft), inset 0 -2px 4px var(--fill-2);
}
.tube::after {
  content: ""; position: absolute; left: 14px; right: 14px; top: 5px; height: 10px; border-radius: 8px; pointer-events: none;
  background: linear-gradient(180deg, #ffffff47, #ffffff0a);
}
.tube-fill {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 0 20px 20px 0; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tube-fill) 55%, #fff) 0%, var(--tube-fill) 40%, color-mix(in srgb, var(--tube-fill) 72%, #000) 100%);
  transition: width .9s cubic-bezier(.22, .8, .24, 1), background .4s;
}
.tube-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, #ffffff40 50%, transparent 70%); background-size: 200% 100%;
  animation: tubeShine 2.6s linear infinite;
}
@keyframes tubeShine { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.tube-mark { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: color-mix(in srgb, var(--text) 40%, transparent); }
.tube-scale { position: relative; height: 16px; margin-top: 3px; font-size: 11px; font-weight: 700; color: var(--muted); }
.tube-scale span { position: absolute; transform: translateX(-50%); }
.tube-read { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 2px; }
.tube-read strong { font-size: 32px; font-weight: 900; letter-spacing: -.02em; color: var(--tube); font-variant-numeric: tabular-nums; }
.tube-state { font-size: 13px; font-weight: 800; color: var(--tube); text-align: right; }
.tube-used { font-size: 14px; font-weight: 700; }
.tube-info { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.tube-box[data-level="danger"] .tube, .tube-box[data-level="full"] .tube { animation: tubeGlow 1.5s ease-in-out infinite; }
@keyframes tubeGlow {
  0%, 100% { box-shadow: inset 0 3px 8px var(--shadow-soft), inset 0 -2px 4px var(--fill-2), 0 0 0 transparent; }
  50% { box-shadow: inset 0 3px 8px var(--shadow-soft), inset 0 -2px 4px var(--fill-2), 0 0 16px color-mix(in srgb, var(--tube) 65%, transparent); }
}
.tube-chart-title { margin: 22px 0 0; font-size: 13px; font-weight: 800; color: var(--muted); }
.tube-edit { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.tube-edit summary { cursor: pointer; font-weight: 800; font-size: 14px; }
.tube-form { margin-top: 12px; display: grid; gap: 4px; }
.tube-limit { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.field .tube-limit select { width: auto; min-width: 130px; }
.traffic-banner {
  --bn: var(--warn); display: block; width: 100%; margin-top: 12px; padding: 11px 14px; border-radius: 12px; text-align: left;
  cursor: pointer; font-weight: 800; font-size: 14px; color: var(--text);
  background: color-mix(in srgb, var(--bn) 15%, transparent); border: 1px solid color-mix(in srgb, var(--bn) 60%, transparent);
}
.traffic-banner[data-level="danger"] { --bn: #ff7a1a; animation: bannerPulse 1.6s ease-in-out infinite; }
.traffic-banner[data-level="full"] { --bn: var(--err); animation: bannerPulse 1.6s ease-in-out infinite; }
@keyframes bannerPulse { 50% { background: color-mix(in srgb, var(--bn) 30%, transparent); } }
@media (prefers-reduced-motion: reduce) {
  .tube, .tube-fill, .tube-fill::after, .traffic-banner { animation: none !important; transition: none !important; }
}

.money-card h3, .money-details + div h3 { margin: 18px 0 8px; font-size: 15px; }
.note.money-alert { margin-top: 10px; padding: 10px 12px; background: color-mix(in srgb, var(--err) 14%, transparent); }
.money-promo { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--ok, #35d07f) 12%, transparent); border-left: 3px solid var(--ok, #35d07f); }
.money-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.money-row:first-of-type { border-top: 0; }
.money-row .info { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.money-amount { flex: none; font-weight: 900; font-variant-numeric: tabular-nums; }
.money-amount.pos { color: var(--ok, #35d07f); }
.money-amount.neg { color: var(--err); }
.money-terms { margin: 8px 0 12px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.money-details { margin: 6px 0 4px; font-size: 14px; }
.money-details summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.money-form { display: grid; gap: 10px; max-width: 420px; }
.money-form .btn { justify-self: start; }
.money-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.money-grid .field { margin: 0; }
.money-split { grid-template-columns: repeat(2, 1fr); }

/* ---------- la pestaña "Avisos" del fundador: un juego por fila con sus dos botones ---------- */
.notice-intro { margin: 16px 0 6px; }
.notice-intro h2 { margin: 0 0 4px; font-size: 17px; }
.notice-intro p { margin: 0; font-size: 13px; }
.notice-row { padding: 12px 4px; border-bottom: 1px solid var(--line); }
.notice-row .top { display: flex; align-items: center; gap: 12px; }
.notice-row .icon { font-size: 28px; width: 40px; text-align: center; }
.notice-row img.icon { width: 40px; height: 40px; object-fit: contain; }
.notice-row .info { flex: 1; min-width: 0; }
.notice-row .info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-row .btns { display: flex; gap: 8px; margin-top: 10px; }
.notice-row .btns .btn { flex: 1; min-width: 0; padding: 6px 8px; line-height: 1.2; }
