/* ─── Botones ─── */
.btn {
  --b-bg: var(--bg-3); --b-fg: var(--text); --b-bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--b-bd);
  background: var(--b-bg); color: var(--b-fg); font-weight: 700; font-size: var(--fs-s);
  letter-spacing: 0.01em; line-height: 1.1; text-decoration: none; white-space: nowrap;
  transition: background-color 120ms, border-color 120ms, transform 80ms, box-shadow 120ms;
}
.btn:hover { text-decoration: none; background: color-mix(in oklab, var(--b-bg) 88%, var(--text)); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-bd: color-mix(in oklab, var(--accent) 70%, #000); box-shadow: 0 1px 0 rgb(255 255 255 / 0.35) inset; }
.btn-primary:hover { background: color-mix(in oklab, var(--accent) 88%, #fff); }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; --b-fg: var(--text-2); }
.btn-ghost:hover { background: var(--bg-3); color: var(--text); }
.btn-danger { --b-bg: color-mix(in oklab, var(--siren) 16%, var(--bg-2)); --b-fg: var(--siren); --b-bd: color-mix(in oklab, var(--siren) 45%, transparent); }
.btn-info { --b-bg: color-mix(in oklab, var(--beacon) 14%, var(--bg-2)); --b-fg: var(--beacon); --b-bd: color-mix(in oklab, var(--beacon) 40%, transparent); }
.btn-go { --b-bg: color-mix(in oklab, var(--go) 14%, var(--bg-2)); --b-fg: var(--go); --b-bd: color-mix(in oklab, var(--go) 40%, transparent); }
.btn-s { min-height: 32px; padding: 5px 11px; font-size: var(--fs-xs); border-radius: 8px; }
.btn-l { min-height: 50px; padding: 12px 22px; font-size: var(--fs-m); border-radius: 12px; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-s { width: 32px; }
.btn-block { width: 100%; }
.btn .count { min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--siren); color: #fff; font-size: 11px; line-height: 18px; }

/* ─── Superficies ─── */
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); }
.panel-pad { padding: clamp(16px, 2.4vw, 22px); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { font-size: var(--fs-xl); }
.panel-foot { padding: 12px 18px; border-top: 1px solid var(--line); }
.inset { background: var(--bg-inset); border: 1px solid var(--line); border-radius: var(--r-s); }

/* ─── Etiquetas ─── */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px;
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.4; white-space: nowrap;
  background: color-mix(in oklab, var(--pc, var(--text-3)) 15%, transparent);
  color: var(--pc, var(--text-2));
  border: 1px solid color-mix(in oklab, var(--pc, var(--text-3)) 32%, transparent);
}
.pill-go { --pc: var(--go); } .pill-bad { --pc: var(--siren); } .pill-info { --pc: var(--beacon); } .pill-warn { --pc: var(--caution); } .pill-accent { --pc: var(--accent); }
.pill .dot, .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.live-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--go); flex: none; }
.live-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--go); opacity: 0; animation: ping 1.8s var(--ease) infinite; }
.live-dot.off { background: var(--text-3); }
.live-dot.off::after { display: none; }
@keyframes ping { 0% { transform: scale(0.5); opacity: 0.8; } 100% { transform: scale(1.6); opacity: 0; } }

/* Insignias de rango: forma y color distintos para cada nivel del staff */
.rank {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 6px; border-radius: 5px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.02em; line-height: 18px; white-space: nowrap;
  color: var(--rc); background: color-mix(in oklab, var(--rc) 14%, transparent); border: 1px solid color-mix(in oklab, var(--rc) 40%, transparent);
}
.rank::before { content: ''; width: 7px; height: 7px; background: currentColor; flex: none; }
.rank-founder { --rc: var(--rank-founder); }
.rank-founder::before { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); width: 9px; height: 9px; }
.rank-admin { --rc: var(--rank-admin); }
.rank-admin::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 8px; }
.rank-mod { --rc: var(--rank-mod); }
.rank-mod::before { border-radius: 2px; }
.rank-helper { --rc: var(--rank-helper); }
.rank-helper::before { border-radius: 50%; }
.title-tag { font-size: 11px; color: var(--accent-text); font-weight: 700; }

.fam { --fc: var(--text-3); color: var(--fc); }
.fam-zombi { --fc: var(--fam-zombi); } .fam-rol { --fc: var(--fam-rol); } .fam-combate { --fc: var(--fam-combate); } .fam-motor { --fc: var(--fam-motor); } .fam-evento { --fc: var(--fam-evento); }
.blip { width: 10px; height: 10px; border-radius: 50%; background: var(--fc, var(--text-3)); box-shadow: 0 0 0 3px color-mix(in oklab, var(--fc, var(--text-3)) 22%, transparent); flex: none; }

/* ─── Formularios ─── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: var(--fs-s); font-weight: 700; color: var(--text); }
.hint { font-size: var(--fs-xs); color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line-2);
  background: var(--bg-inset); color: var(--text); transition: border-color 120ms, box-shadow 120ms;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in oklab, var(--line-2) 60%, var(--text-2)); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }
.textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.input-s { min-height: 34px; padding: 5px 10px; font-size: var(--fs-s); }
.select.input-s { padding-right: 30px; background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form-error { padding: 10px 12px; border-radius: 9px; background: color-mix(in oklab, var(--siren) 12%, transparent); color: var(--siren); font-size: var(--fs-s); border: 1px solid color-mix(in oklab, var(--siren) 35%, transparent); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-s); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; font-size: var(--fs-s); }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; transition: background 150ms; margin: 0; flex: none; cursor: pointer; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 150ms var(--ease); box-shadow: 0 1px 3px rgb(0 0 0 / 0.3); }
.switch input:checked { background: var(--go); }
.switch input:checked::after { transform: translateX(18px); }

/* Control segmentado y pestañas */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--bg-inset); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button, .seg a { border: 0; background: transparent; color: var(--text-2); padding: 6px 12px; border-radius: 8px; font-weight: 700; font-size: var(--fs-s); text-decoration: none; white-space: nowrap; }
.seg button[aria-pressed="true"], .seg a[aria-current="page"], .seg button.on { background: var(--bg-3); color: var(--text); box-shadow: 0 1px 0 rgb(255 255 255 / 0.05) inset, 0 0 0 1px var(--line-2); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { flex: none; border: 0; background: none; padding: 10px 14px; color: var(--text-2); font-weight: 700; font-size: var(--fs-s); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

/* ─── Tablas ─── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-weight: 700; font-size: var(--fs-xs); color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid color-mix(in oklab, var(--line) 60%, transparent); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in oklab, var(--bg-3) 55%, transparent); }
.table .r { text-align: right; }
.table tr.clickable { cursor: pointer; }

/* ─── Avatares ─── */
.avatar { display: inline-block; vertical-align: middle; width: var(--s, 36px); height: var(--s, 36px); border-radius: 28%; flex: none; overflow: hidden; background: var(--bg-3); }
.avatar svg { display: block; width: 100%; height: 100%; }
.avatar-l { --s: 64px; } .avatar-xl { --s: 96px; } .avatar-s { --s: 26px; } .avatar-xs { --s: 20px; border-radius: 6px; }
.who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); }
.who:hover { text-decoration: none; }
.who:hover .who-name { text-decoration: underline; text-underline-offset: 3px; }
.who-name { font-weight: 700; }

/* ─── Estados vacíos y carga ─── */
.empty { display: grid; place-items: center; gap: 10px; padding: 40px 20px; text-align: center; color: var(--text-2); }
.empty svg { width: 34px; height: 34px; color: var(--text-3); }
.empty strong { color: var(--text); font-size: var(--fs-l); }
.skeleton { border-radius: var(--r-s); background: linear-gradient(90deg, var(--bg-3), color-mix(in oklab, var(--bg-3) 60%, var(--line-2)), var(--bg-3)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading-page { display: grid; gap: 14px; padding-block: 40px; }
.loading-page .skeleton:nth-child(1) { height: 42px; width: 40%; }
.loading-page .skeleton:nth-child(2) { height: 16px; width: 70%; }
.loading-page .skeleton:nth-child(3) { height: 240px; }

.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); color: var(--text-2); font-weight: 700; font-size: var(--fs-s); text-decoration: none; }
.pager a:hover { background: var(--bg-3); color: var(--text); }
.pager [aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* ─── Avisos ─── */
.toasts { position: fixed; z-index: 90; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: var(--bg-3); border: 1px solid var(--line-2); box-shadow: var(--shadow-pop); font-size: var(--fs-s);
  animation: toast-in 220ms var(--ease);
}
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.toast.ok svg { color: var(--go); } .toast.bad svg { color: var(--siren); } .toast.info svg { color: var(--beacon); }
.toast b { display: block; margin-bottom: 2px; }
.toast.leaving { animation: toast-out 180ms var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

.notice-bar { background: color-mix(in oklab, var(--accent) 16%, var(--bg)); border-bottom: 1px solid color-mix(in oklab, var(--accent) 35%, transparent); color: var(--text); font-size: var(--fs-s); padding: 8px var(--gutter); text-align: center; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-m); border: 1px solid color-mix(in oklab, var(--cc, var(--beacon)) 35%, transparent); background: color-mix(in oklab, var(--cc, var(--beacon)) 9%, var(--bg-2)); font-size: var(--fs-s); }
.callout svg { width: 20px; height: 20px; flex: none; color: var(--cc, var(--beacon)); }
.callout-warn { --cc: var(--caution); } .callout-bad { --cc: var(--siren); } .callout-go { --cc: var(--go); }

/* ─── Diálogos ─── */
dialog.modal {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--line-2);
  border-radius: var(--r-l); background: var(--bg-2); color: var(--text); box-shadow: var(--shadow-pop);
}
dialog.modal[open] { animation: modal-in 200ms var(--ease); }
dialog.modal::backdrop { background: rgb(5 7 20 / 0.62); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: var(--fs-xl); }
.modal-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
dialog.drawer {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(520px, 100vw); padding: 0; border: 0; border-left: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text); box-shadow: var(--shadow-pop);
}
dialog.drawer[open] { animation: drawer-in 240ms var(--ease); display: flex; flex-direction: column; }
dialog.drawer::backdrop { background: rgb(5 7 20 / 0.5); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 18px; }
@keyframes drawer-in { from { transform: translateX(30px); opacity: 0; } }

/* Menús desplegables */
.menu { position: fixed; z-index: 80; min-width: 220px; max-width: min(360px, calc(100vw - 24px)); padding: 6px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line-2); box-shadow: var(--shadow-pop); animation: modal-in 140ms var(--ease); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; color: var(--text); font-size: var(--fs-s); font-weight: 600; text-align: left; text-decoration: none; }
.menu a:hover, .menu button:hover { background: color-mix(in oklab, var(--bg-2) 60%, var(--line-2)); }
.menu svg { width: 17px; height: 17px; color: var(--text-2); flex: none; }
.menu hr { margin: 6px 4px; }
.menu .menu-label { padding: 6px 10px 4px; font-size: var(--fs-xs); color: var(--text-3); font-weight: 700; }

/* ─── Paleta de comandos (Ctrl+K) ─── */
dialog.palette { width: min(620px, calc(100vw - 20px)); margin-top: 10vh; padding: 0; border-radius: var(--r-l); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); box-shadow: var(--shadow-pop); }
dialog.palette::backdrop { background: rgb(5 7 20 / 0.62); backdrop-filter: blur(3px); }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette-input svg { width: 20px; height: 20px; color: var(--text-3); }
.palette-input input { flex: 1; border: 0; background: none; font-size: var(--fs-l); outline: none; min-width: 0; }
.palette-list { max-height: min(60vh, 460px); overflow-y: auto; padding: 8px; }
.palette-group { padding: 8px 10px 4px; font-size: var(--fs-xs); color: var(--text-3); font-weight: 700; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; color: var(--text); text-decoration: none; }
.palette-item[aria-selected="true"] { background: var(--bg-3); text-decoration: none; }
.palette-item small { color: var(--text-3); margin-left: auto; white-space: nowrap; }
.palette-item svg { width: 18px; height: 18px; color: var(--text-2); flex: none; }
.palette-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--text-3); }

/* ─── Chat del juego: se ve como el chat de SA-MP en cualquier tema ─── */
.gamechat {
  --gc-bg: #0a0d1f;
  background: var(--gc-bg); color: #f2f3ff; border-radius: var(--r-m); border: 1px solid #262c5a;
  font-family: var(--font-body); font-size: 13.5px; line-height: 1.5; padding: 10px 12px;
  text-shadow: 1px 1px 0 #000, -1px 0 0 rgb(0 0 0 / 0.6);
}
.gamechat .line { display: flex; gap: 8px; align-items: baseline; padding: 1px 0; min-width: 0; }
.gamechat .line time { color: #6d74a8; font-family: var(--font-mono); font-size: 11px; flex: none; text-shadow: none; }
.gamechat .line .txt { min-width: 0; overflow-wrap: anywhere; }
.gamechat .sc { color: var(--c); }
.gamechat .line.new { animation: line-in 400ms var(--ease); }
@keyframes line-in { from { opacity: 0; transform: translateX(-6px); } }

/* ─── Tarjeta de ayuda / tooltip ─── */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 50;
  padding: 5px 8px; border-radius: 6px; background: #05071a; color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap; pointer-events: none;
}

/* Contenido del foro y textos largos (Markdown) */
.md { overflow-wrap: anywhere; line-height: 1.65; }
.md > * + * { margin-top: 0.8em; }
.md h3, .md h4, .md h5 { font-family: var(--font-display); font-weight: 800; line-height: 1.1; margin-top: 1.1em; }
.md h3 { font-size: 1.55rem; } .md h4 { font-size: 1.3rem; } .md h5 { font-size: 1.1rem; }
.md ul, .md ol { padding-left: 1.4em; margin-block: 0.6em; }
.md li + li { margin-top: 0.25em; }
.md blockquote { margin: 0.8em 0; padding: 8px 14px; border-left: 3px solid var(--line-2); background: var(--bg-inset); border-radius: 0 var(--r-s) var(--r-s) 0; color: var(--text-2); }
.md pre { padding: 12px 14px; border-radius: var(--r-s); background: var(--bg-inset); border: 1px solid var(--line); overflow-x: auto; font-size: 0.88em; }
.md code { padding: 1px 5px; border-radius: 4px; background: var(--bg-inset); border: 1px solid var(--line); }
.md pre code { padding: 0; border: 0; background: none; }
.md img { border-radius: var(--r-s); max-height: 520px; width: auto; }
.md a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in oklab, var(--accent-text) 50%, transparent); }
.md .mention { text-decoration: none; font-weight: 700; padding: 0 3px; border-radius: 4px; background: color-mix(in oklab, var(--accent) 14%, transparent); }
.md .spoiler { background: var(--text-3); color: transparent; border-radius: 4px; padding: 0 4px; cursor: pointer; transition: all 150ms; }
.md .spoiler.open, .md .spoiler:focus { background: var(--bg-3); color: var(--text); }
.md hr { margin: 1.2em 0; }
.md .yt { position: relative; aspect-ratio: 16 / 9; max-width: 640px; border-radius: var(--r-m); overflow: hidden; background: #000 center / cover no-repeat; border: 1px solid var(--line); }
.md .yt a, .md .yt button { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; text-decoration: none; background: rgb(0 0 0 / 0.35); border: 0; width: 100%; }
.md .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.md-rules h2 { font-size: var(--fs-2xl); margin-top: 1.4em; }
.md-rules ol { counter-reset: r; list-style: none; padding-left: 0; }
.md-rules ol li { counter-increment: r; position: relative; padding-left: 38px; }
.md-rules ol li::before { content: counter(r); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: var(--bg-3); font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--accent-text); }

/* ─── v1.1.3: insignias (components/badges.js) y skins del juego como avatar ─── */
.badge-featured, .vip-shield, .event-patch { display: inline-flex; align-items: center; gap: 6px; flex: none; vertical-align: middle; line-height: 1; }
.badge-featured svg, .vip-shield svg, .event-patch svg { display: block; width: var(--bsz, 28px); height: var(--bsz, 28px); }
.badge-featured.s, .vip-shield.s, .event-patch.s { --bsz: 18px; }
.badge-featured.m, .vip-shield.m, .event-patch.m { --bsz: 28px; }
.badge-featured.l, .vip-shield.l, .event-patch.l { --bsz: 48px; }
.badge-featured.xl, .vip-shield.xl, .event-patch.xl { --bsz: 76px; }
.vip-shield .vip-name { font-weight: 700; font-size: var(--fs-s); color: var(--text); }
.event-patch { position: relative; border-radius: 50%; }
.event-patch.live::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--lime, var(--go)); opacity: 0.9;
  animation: patch-pulse 1.8s var(--ease) infinite;
}
@keyframes patch-pulse { 0% { transform: scale(0.92); opacity: 0.9; } 100% { transform: scale(1.22); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .event-patch.live::after { animation: none; opacity: 0.8; transform: none; } }
.avatar.skin { background: linear-gradient(180deg, color-mix(in oklab, var(--bg-3) 70%, transparent), var(--bg-inset)); }
.avatar.skin img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.mode-moment { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 3px; background: var(--lime, var(--accent)); color: #000; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

/* v1.1.5 (C1): recuperar la contraseña por correo */
.field-label { font-size: var(--fs-s); font-weight: 700; color: var(--text); }
.auth-sep { border: 0; border-top: 1px solid var(--line); margin: 22px 0 18px; }
.auth-sub { font-size: 1.35rem; margin-bottom: 2px; }

/* v1.1.5 (C3): centro de tickets (jugador y staff) */
.tlist { display: grid; }
.tlist-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.tlist-row:first-child { border-top: 0; }
.tlist-row:hover { background: var(--bg-3); }
.tlist-row.is-new { box-shadow: inset 3px 0 0 var(--go); }
.tlist-main { display: grid; gap: 2px; min-width: 0; }
.tlist-main strong { overflow-wrap: anywhere; }
.tlist-main .faint { font-size: var(--fs-xs); }
.tpick { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tpick legend { font-size: var(--fs-s); font-weight: 700; margin-bottom: 8px; padding: 0; }
.tpick-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg-2); cursor: pointer; }
.tpick-item:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tpick-item:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.tpick-item input { margin-top: 3px; accent-color: var(--accent); }
.tpick-item span { display: grid; gap: 2px; }
.tpick-item small { color: var(--text-2); font-size: var(--fs-xs); line-height: 1.4; }
.tchat { display: grid; gap: 14px; }
.tmsg { max-width: min(640px, 92%); padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); display: grid; gap: 8px; justify-self: start; min-width: 0; }
.tmsg.is-mine { justify-self: end; background: color-mix(in oklab, var(--accent) 10%, var(--bg-2)); border-color: color-mix(in oklab, var(--accent) 30%, var(--line)); }
.tmsg.is-staff:not(.is-mine) { border-color: color-mix(in oklab, var(--go) 40%, var(--line)); }
.tmsg.is-internal { border-style: dashed; border-color: color-mix(in oklab, var(--siren) 50%, var(--line)); background: repeating-linear-gradient(-45deg, color-mix(in oklab, var(--siren) 7%, var(--bg-2)) 0 10px, var(--bg-2) 10px 20px); }
.tmsg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-s); }
.tmsg-head time { margin-left: auto; color: var(--text-3); font-size: var(--fs-xs); }
.tmsg-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.tmsg-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-s); }
.tmsg-links a { display: inline-flex; gap: 6px; align-items: center; overflow-wrap: anywhere; }
.tmsg-links svg { width: 14px; height: 14px; flex: none; }
.tmsg-files { display: flex; flex-wrap: wrap; gap: 10px; }
.tfile { margin: 0; display: grid; gap: 4px; max-width: 100%; }
.tfile-img { display: block; max-width: min(320px, 100%); max-height: 240px; border-radius: 10px; border: 1px solid var(--line); object-fit: contain; background: var(--bg-inset); }
.tfile-video { display: block; width: min(420px, 100%); max-height: 300px; border-radius: 10px; background: #000; }
.tfile figcaption { display: flex; gap: 6px; align-items: center; color: var(--text-3); font-size: var(--fs-xs); overflow-wrap: anywhere; }
.tfile figcaption svg { width: 13px; height: 13px; flex: none; }
.tmsg-event { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; color: var(--text-3); font-size: var(--fs-xs); text-align: center; }
.tmsg-event.is-internal span { font-style: italic; }
.tcompose-more summary { cursor: pointer; color: var(--text-2); font-size: var(--fs-s); font-weight: 600; }
.tcompose-more textarea { margin-top: 8px; }
.tups { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tups:empty { display: none; }
.tup { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; align-items: center; gap: 10px; font-size: var(--fs-s); }
.tup-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tup-bar { height: 6px; border-radius: 999px; background: var(--bg-inset); overflow: hidden; }
.tup-bar span { display: block; height: 100%; background: var(--accent); transition: width 0.2s; }
.ticket-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 960px) { .ticket-grid { grid-template-columns: minmax(0, 1fr); } .ticket-grid > aside { order: -1; } }
.tinfo { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: var(--fs-s); }
.tinfo dt { color: var(--text-3); font-weight: 700; }
.tinfo dd { margin: 0; overflow-wrap: anywhere; }
.row-hot td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.mail-preview { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: var(--fs-s); background: var(--bg-inset); padding: 14px; border-radius: var(--r-m); max-height: 60vh; overflow: auto; margin: 0; }
@media (max-width: 560px) { .tup { grid-template-columns: minmax(0, 1fr) 70px auto; } .tmsg { max-width: 100%; } }
