/* ─── Panel del staff: sala de control ─── */
.panel-app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.panel-side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 12px 16px; background: var(--header-bg); border-right: 1px solid var(--header-line); color: var(--text);
}
.panel-side .brand { padding: 4px 8px 14px; }
.panel-side .brand-name { font-size: 23px; }
.side-label { padding: 12px 10px 4px; font-size: var(--fs-xs); font-weight: 800; color: var(--text-3); }
.side-link { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: var(--text-2); font-weight: 700; font-size: var(--fs-s); text-decoration: none; }
.side-link:hover { background: var(--bg-3); color: var(--text); text-decoration: none; }
.side-link[aria-current="page"] { background: var(--bg-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.side-link svg { width: 18px; height: 18px; flex: none; }
.side-link .n { margin-left: auto; min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--siren); color: #fff; font-size: 11px; font-weight: 800; line-height: 19px; text-align: center; }
.side-link .n.soft { background: var(--bg-3); color: var(--text-2); border: 1px solid var(--line-2); }
.side-foot { margin-top: auto; padding: 12px 8px 0; display: grid; gap: 10px; border-top: 1px solid var(--line); }

.panel-main { min-width: 0; display: flex; flex-direction: column; }
.panel-bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  min-height: 60px; padding: 10px clamp(16px, 2.6vw, 28px); background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.panel-bar .status-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.panel-bar .tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
@media (max-width: 640px) {
  .panel-bar { gap: 8px; }
  .panel-bar .chip-label, .panel-bar .duty-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .panel-bar .status-chips .pill { padding-inline: 8px; }
  .panel-bar .tools { gap: 2px; }
  .panel-bar .btn-icon { width: 34px; height: 34px; }
  .duty-toggle { padding: 4px; }
}
.panel-content { padding: clamp(16px, 2.6vw, 28px); display: flex; flex-direction: column; gap: 20px; }
.room-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.room-head h1 { font-size: clamp(2.1rem, 4.4vw, 2.9rem); }
.room-head p { color: var(--text-2); margin-top: 4px; max-width: 70ch; }
.panel-menu-toggle { display: none; }
@media (max-width: 1080px) {
  .panel-app { grid-template-columns: minmax(0, 1fr); }
  .panel-side { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); z-index: 70; transform: translateX(-102%); transition: transform 220ms var(--ease); box-shadow: var(--shadow-pop); }
  .panel-app.menu-open .panel-side { transform: none; }
  .panel-scrim { position: fixed; inset: 0; z-index: 65; background: rgb(5 7 20 / 0.55); }
  .panel-menu-toggle { display: inline-flex; }
}

/* Indicadores */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { position: relative; padding: 14px 16px; border-radius: var(--r-m); background: var(--bg-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; display: grid; gap: 4px; }
a.kpi:hover { border-color: var(--line-2); text-decoration: none; }
.kpi span { font-size: var(--fs-xs); font-weight: 700; color: var(--text-2); }
.kpi b { font-family: var(--font-display); font-size: 2.3rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--text-3); font-size: var(--fs-xs); }
.kpi.alert { border-color: color-mix(in oklab, var(--siren) 50%, var(--line)); }
.kpi.alert b { color: var(--siren); }
.kpi.attention b { color: var(--caution); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid-3-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid-1-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px; align-items: start; }
@media (max-width: 1180px) { .grid-3-1, .grid-1-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.chart { width: 100%; height: auto; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font-body); }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .area { fill: color-mix(in oklab, var(--accent) 18%, transparent); }
.chart .stroke { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart .endpoint { fill: var(--accent); stroke: var(--bg-2); stroke-width: 2; }
.stack-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--bg-3); }
.stack-bar i { display: block; height: 100%; background: var(--fc); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-xs); color: var(--text-2); font-weight: 700; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Listas con estado (reportes, dudas, alertas) */
.queue { display: grid; }
.queue-item { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 14px; padding: 14px 16px 14px 0; border-bottom: 1px solid color-mix(in oklab, var(--line) 65%, transparent); align-items: start; }
.queue-item:last-child { border-bottom: 0; }
.queue-item::before { content: ''; align-self: stretch; border-radius: 0 3px 3px 0; background: var(--sev, var(--line-2)); }
.queue-item.sev-high { --sev: var(--siren); }
.queue-item.sev-mid { --sev: var(--caution); }
.queue-item.sev-info { --sev: var(--beacon); }
.queue-item.sev-done { --sev: var(--go); }
.queue-item h3 { font-family: var(--font-body); font-size: var(--fs-m); font-weight: 800; line-height: 1.35; }
.queue-item p { font-size: var(--fs-s); color: var(--text-2); margin-top: 3px; overflow-wrap: anywhere; }
.queue-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; margin-top: 6px; }
.queue-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .queue-item { grid-template-columns: 4px minmax(0, 1fr); } .queue-actions { grid-column: 2; justify-content: flex-start; } }
.age { font-variant-numeric: tabular-nums; }
.age.late { color: var(--siren); font-weight: 800; }

/* Administración en vivo */
.live-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1280px) { .live-layout { grid-template-columns: minmax(0, 1fr); } }
.players-table td .pname { font-weight: 800; color: var(--text); }
.players-table .pid { font-family: var(--font-mono); color: var(--text-3); font-size: 12px; }
.players-table .ping-bad { color: var(--siren); font-weight: 800; }
.players-table .ping-mid { color: var(--caution); font-weight: 800; }
.players-table tr.sel { background: color-mix(in oklab, var(--accent) 9%, transparent); }
.flags { display: inline-flex; gap: 4px; }
.console { height: 420px; overflow-y: auto; display: flex; flex-direction: column; }
.console .line { font-size: 13px; }
.console .t-chat .txt { color: #f2f3ff; }
.console .t-cmd .txt { color: #9ec5ff; }
.console .t-join .txt { color: #7ee2b0; }
.console .t-leave .txt { color: #9aa0c8; }
.console .t-kill .txt { color: #ffb4a0; }
.console .t-staff .txt { color: #ffc266; }
.console .t-report .txt, .console .t-ac .txt { color: #ff8da2; }
.console .t-system .txt, .console .t-mode .txt, .console .t-result .txt, .console .t-event .txt { color: #c9ccf0; }
.console-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.console-filters button { border: 1px solid var(--line); background: var(--bg-2); color: var(--text-3); font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 99px; }
.console-filters button[aria-pressed="true"] { color: var(--text); border-color: var(--line-2); background: var(--bg-3); }
.composer { display: flex; gap: 8px; }
.composer .input { flex: 1; }

/* Vigilancia de radios */
.radio-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 980px) { .radio-layout { grid-template-columns: minmax(0, 1fr); } }
.channels { display: grid; gap: 6px; }
.channel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); text-align: left; width: 100%; }
.channel:hover { border-color: var(--line-2); }
.channel[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 8%, var(--bg-2)); }
.channel strong { font-size: var(--fs-s); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel small { color: var(--text-3); font-size: var(--fs-xs); font-weight: 700; grid-column: 1; }
.channel .wave { grid-column: 1 / -1; height: 22px; width: 100%; }
.channel .flag-n { font-size: 11px; font-weight: 800; color: var(--siren); }
.channel-group { cursor: default; }
.channel-group:hover { border-color: var(--line); }
.band-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.band-chips button { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-inset); color: var(--text-2); font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; }
.band-chips button:hover { border-color: var(--line-2); color: var(--text); }
.band-chips button[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: color-mix(in oklab, var(--accent) 12%, var(--bg-inset)); }
.radio-stream { height: 560px; overflow-y: auto; }
.radio-msg { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 7px 8px; border-radius: 8px; }
.radio-msg:hover { background: rgb(255 255 255 / 0.04); }
.radio-msg.new { animation: line-in 400ms var(--ease); }
.radio-msg.flagged { background: rgb(255 79 110 / 0.13); box-shadow: inset 3px 0 0 #ff4f6e; }
.radio-msg .ch { font-family: var(--font-mono); font-size: 11px; padding: 1px 6px; border-radius: 4px; background: rgb(255 255 255 / 0.08); color: #c9ccf0; white-space: nowrap; text-shadow: none; }
.radio-msg .who-r { color: #ffc266; font-weight: 700; }
.radio-msg .note { display: block; font-size: 11.5px; color: #ff8da2; text-shadow: none; }
.radio-msg .acts { display: flex; gap: 2px; opacity: 0.5; }
.radio-msg:hover .acts, .radio-msg:focus-within .acts { opacity: 1; }
.radio-msg .acts button { border: 0; background: rgb(255 255 255 / 0.08); color: #f2f3ff; border-radius: 6px; padding: 3px 7px; font-size: 11px; font-weight: 800; }
.radio-msg .acts button:hover { background: rgb(255 255 255 / 0.18); }
.paused-banner { position: sticky; top: 0; z-index: 2; margin: -10px -12px 8px; padding: 6px 12px; background: #3a2a07; color: #ffd166; font-size: 12px; font-weight: 800; text-shadow: none; display: flex; justify-content: space-between; align-items: center; }
.word-list { display: flex; flex-wrap: wrap; gap: 6px; }
.word-list span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 99px; background: var(--bg-3); font-size: var(--fs-xs); font-weight: 700; }
.word-list button { border: 0; background: none; color: var(--text-3); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.word-list button:hover { color: var(--siren); background: var(--bg-2); }

/* Sala de modos */
.mode-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.mode-card { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-m); background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; align-content: start; }
.mode-card.off { opacity: 0.72; }
.mode-card.off .mode-card-img { filter: grayscale(0.85); }
.mode-card-img { display: block; margin: -16px -16px 0; width: calc(100% + 32px); max-width: none; aspect-ratio: 16 / 9; height: auto; object-fit: cover; }
.mode-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mode-card h3 { font-size: 1.6rem; display: flex; align-items: center; gap: 10px; }
.mode-card .live-count { font-family: var(--font-display); font-size: 2rem; font-weight: 900; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.mode-card .live-count small { display: block; font-family: var(--font-body); font-size: 11px; font-weight: 700; color: var(--text-3); }
.round-state { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: var(--fs-s); padding: 8px 10px; border-radius: 8px; background: var(--bg-inset); border: 1px solid var(--line); }
.mode-card .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Mapa en vivo: el mapa real de San Andreas, con zoom y arrastre */
.live-map { position: relative; }
.live-map canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r-m); background: #060e22; outline: none; }
.live-map canvas:focus-visible { box-shadow: var(--focus); }
.map-host { position: relative; }
.map-zoom { position: absolute; right: 10px; top: 10px; display: grid; gap: 1px; border-radius: 10px; overflow: hidden; border: 1px solid rgb(255 255 255 / 0.14); box-shadow: 0 8px 22px -10px rgb(0 0 0 / 0.8); }
.map-zoom button { width: 36px; height: 36px; border: 0; background: rgb(8 20 46 / 0.88); color: #fff; font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.map-zoom button:hover { background: #16397a; }
.map-zoom button:disabled { opacity: 0.4; cursor: default; }
.map-hint { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: var(--fs-xs); color: var(--text-3); }
.map-hint b { color: var(--text-2); }
.map-tip { position: absolute; pointer-events: none; padding: 5px 8px; border-radius: 6px; background: #05071a; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; transform: translate(-50%, -130%); }

/* Ficha del jugador */
.player-file { display: grid; gap: 18px; }
.file-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.file-head h2 { font-size: 2rem; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 16px; }
.kv dt { font-size: var(--fs-xs); color: var(--text-3); font-weight: 700; }
.kv dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-item .node { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; background: var(--nc, var(--line-2)); box-shadow: 0 0 0 3px var(--bg-2); }
.t-ban { --nc: var(--siren); } .t-kick { --nc: var(--fam-combate); } .t-mute { --nc: var(--caution); } .t-jail, .t-modeban { --nc: var(--fam-rol); } .t-unban { --nc: var(--go); } .t-warn { --nc: var(--beacon); }
.sanction-type { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: var(--fs-s); color: var(--nc); }
.sanction-type::before { content: ''; width: 9px; height: 9px; border-radius: 3px; background: currentColor; }
.status-active { color: var(--siren); } .status-expired, .status-done { color: var(--text-3); } .status-revoked { color: var(--go); }

.chat-box { display: flex; flex-direction: column; height: 380px; }
.chat-box .gamechat { flex: 1; overflow-y: auto; border-radius: var(--r-m) var(--r-m) 0 0; }
.chat-box form { display: flex; gap: 8px; padding: 10px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-m) var(--r-m); background: var(--bg-2); }

.duty-toggle { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 8px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg-2); font-weight: 800; font-size: var(--fs-s); }
.duty-toggle.on { border-color: color-mix(in oklab, var(--go) 50%, transparent); background: color-mix(in oklab, var(--go) 10%, var(--bg-2)); }

.setup-2fa { max-width: 640px; }
.cmd-status { font-size: 11px; font-weight: 800; }
.cmd-done { color: var(--go); } .cmd-failed, .cmd-timeout, .cmd-expired { color: var(--siren); } .cmd-pending, .cmd-sent { color: var(--caution); }
.perm-matrix th:not(:first-child), .perm-matrix td:not(:first-child) { text-align: center; }
.perm-matrix .yes { color: var(--go); font-weight: 900; }
.perm-matrix .no { color: var(--text-3); }

/* ─── v1.1.3: resumen (R5) ─── */
.kpi .kpi-ic svg { width: 100%; height: 100%; }
.fig-link { color: var(--text); text-decoration: none; padding: 4px 6px; border-radius: 4px; }
.fig-link:hover { background: var(--bg-inset); text-decoration: none; }
.notice { display: grid; gap: 6px; padding: 12px 14px; border-radius: 4px; background: var(--bg-inset); border-left: 3px solid var(--line-2); }
.notice.pinned { border-left-color: var(--accent); }
.notice-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.notice-head small { margin-left: auto; }
.notice-head .pill svg { width: 12px; height: 12px; }
.notice-body { color: var(--text-2); font-size: var(--fs-s); overflow-wrap: anywhere; }
.notice-body > :first-child { margin-top: 0; }
.notice-body > :last-child { margin-bottom: 0; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.balance-list { display: grid; gap: 14px; }
.balance-row { display: grid; grid-template-columns: minmax(140px, 230px) minmax(0, 1fr) 72px; grid-template-areas: "name bar pct" "name meta meta"; align-items: center; gap: 2px 16px; }
.balance-name { grid-area: name; display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; min-width: 0; }
.balance-row .progress { grid-area: bar; }
.balance-pct { grid-area: pct; text-align: right; font-variant-numeric: tabular-nums; }
.balance-meta { grid-area: meta; color: var(--text-3); font-size: var(--fs-xs); }
.balance-row.top .progress { height: 6px; }
.mode-moment svg { width: 11px; height: 11px; }
@media (max-width: 760px) { .balance-row { grid-template-columns: minmax(0, 1fr) 64px; grid-template-areas: "name pct" "bar bar" "meta meta"; } }
.mission-now { display: flex; align-items: center; gap: 14px; }
.mission-now > div { display: grid; gap: 2px; min-width: 0; }
.mission-now small { font-size: var(--fs-xs); }
.mission-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 2px dashed var(--line-2); color: var(--text-3); flex: none; }
.mission-ic svg { width: 20px; height: 20px; }

/* ─── v1.1.3: economía (R15) ─── */
.kpis-eco { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.table td.up { color: var(--go); }
.table td.down { color: var(--siren); }

/* ─── v1.1.3: comandos y sistemas (R11) ─── */
.cmd-head { flex-wrap: wrap; padding-bottom: 0; }
.cmd-head .tabs { border-bottom: 0; }
.cmd-head .tabs .pill { margin-left: 4px; }
.cmd-search { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px auto; color: var(--text-3); }
.cmd-search svg { width: 16px; height: 16px; }
.cmd-search .input { width: min(320px, 70vw); }
.cmd-table code { white-space: nowrap; }
.cmd-table .cmd-usage { white-space: normal; overflow-wrap: anywhere; }
.cmd-table td:nth-child(4) { min-width: 240px; }
/* En el celular: pestañas en dos renglones y cada comando como una ficha (comando y nivel arriba, uso y descripción abajo) */
@media (max-width: 760px) {
  .cmd-head .tabs { flex-wrap: wrap; min-width: 0; }
  .cmd-search { margin-left: 0; width: 100%; }
  .cmd-search .input { width: 100%; }
  .cmd-table thead { display: none; }
  .cmd-table, .cmd-table tbody { display: block; }
  .cmd-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 14px; border-bottom: 1px solid color-mix(in oklab, var(--line) 60%, transparent); }
  .cmd-table td { display: block; padding: 0; border: 0; min-width: 0; text-align: left; }
  .cmd-table td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .cmd-table td:nth-child(n+3) { grid-column: 1 / -1; min-width: 0; }
  .cmd-table td:nth-child(3):has(> .faint) { display: none; }
  .cmd-table td:nth-child(5) { font-size: 12px; }
  .cmd-table .cmd-usage { overflow-wrap: break-word; }
}
.sys-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.sys-index { position: sticky; top: 76px; }
.sys-index ol { list-style: none; margin: 0; padding: 6px 0; counter-reset: sys; }
.sys-index li a { display: block; padding: 8px 16px 8px 14px; border-left: 3px solid transparent; color: var(--text-2); font-size: var(--fs-s); text-decoration: none; }
.sys-index li a:hover { background: var(--bg-inset); color: var(--text); }
.sys-index li a[aria-current="page"] { border-left-color: var(--accent); background: var(--bg-inset); color: var(--text); font-weight: 600; }
.sys-doc .md { max-width: 82ch; }
.sys-intro { margin-top: 0; }
@media (max-width: 980px) { .sys-layout { grid-template-columns: minmax(0, 1fr); } .sys-index { position: static; } }

/* ─── v1.1.3: textos del juego (R6, R10) con la vista previa del diálogo de SA-MP ─── */
.text-editor .textarea { min-height: 340px; font-size: 13px; line-height: 1.5; }
.color-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.color-chip { width: 26px; height: 26px; padding: 0; border-radius: 4px; border: 1px solid rgb(0 0 0 / 0.25); background: var(--c); cursor: pointer; }
.color-chip:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgb(0 0 0 / 0.25); }
.color-custom { display: inline-flex; width: 30px; height: 28px; }
.color-custom input { width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.samp-dialog { max-width: 640px; margin-inline: auto; border-radius: 2px; overflow: hidden; background: rgb(0 0 0 / 0.86); color: #a9c4e4; font-family: Tahoma, Verdana, 'DejaVu Sans', sans-serif; font-size: 13px; line-height: 1.35; box-shadow: 0 10px 30px -10px rgb(0 0 0 / 0.6); }
.samp-caption { padding: 7px 10px; background: rgb(0 0 0 / 0.55); border-bottom: 1px solid rgb(255 255 255 / 0.12); font-weight: 700; color: #fff; }
.samp-body { padding: 10px 12px 14px; white-space: pre-wrap; tab-size: 6; overflow-wrap: anywhere; max-height: 520px; overflow-y: auto; }
.samp-buttons { display: flex; justify-content: center; gap: 8px; padding: 8px 10px 12px; }
.samp-buttons span { min-width: 90px; padding: 4px 12px; text-align: center; color: #fff; background: rgb(255 255 255 / 0.08); border: 1px solid rgb(255 255 255 / 0.25); }

/* ─── v1.1.3: usuarios (R13) y grupos (R14) ─── */
.row > .input.grow { width: auto; flex: 1 1 240px; min-width: 0; }
.kv-1 { grid-template-columns: minmax(0, 1fr); }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 12px 14px; border-radius: 4px; border: 1px solid color-mix(in oklab, var(--siren) 35%, var(--line)); background: color-mix(in oklab, var(--siren) 5%, var(--bg-2)); }
.danger-zone > div { min-width: 0; flex: 1 1 260px; }
.name-history { list-style: none; margin: 0; padding: 0; }
.name-history li { display: grid; gap: 2px; padding: 10px 18px; font-size: var(--fs-s); }
.name-history li + li { border-top: 1px solid var(--line); }
.name-history s { color: var(--text-3); }
.inv-cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* ─── v1.1.3: sorteos (R9) ─── */
.sub-h { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.top10 { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.top10 li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 4px; background: var(--bg-inset); font-size: var(--fs-s); }
.top10 li span { color: var(--text-3); font-weight: 700; }
.top10 li small { color: var(--text-3); }
.pos-editor { display: grid; gap: 10px; }
.pos-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
.pos-row:first-child { border-top: 0; }
.pos-n { font-weight: 700; font-size: 1.1rem; padding-top: 4px; color: var(--accent-text); }
.week-list, .hist-list { list-style: none; margin: 0; padding: 0; }
.week-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 18px; }
.week-list li + li { border-top: 1px solid var(--line); }
.week-list li > span:first-child { display: grid; }
.hist-item { border-top: 1px solid var(--line); }
.hist-item:first-child { border-top: 0; }
.hist-item > summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 18px; cursor: pointer; list-style: none; }
.hist-item > summary::-webkit-details-marker { display: none; }
.hist-item > summary::before { content: '▸'; color: var(--text-3); }
.hist-item[open] > summary::before { content: '▾'; }
.im-prizes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.im-prizes li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: var(--fs-s); }

/* ─── v1.1.3: barra para guardar (ayuda y tienda del juego) ─── */
.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 12px 16px; border-radius: 4px; background: var(--bg-2); box-shadow: 0 -6px 18px -12px rgb(0 0 0 / 0.35), var(--shadow); }
.btn-link { background: none; border: 0; padding: 0; cursor: pointer; }

/* ─── v1.1.3: /ayuda del juego (R11) ─── */
.help-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.help-modes ul { list-style: none; margin: 0; padding: 6px 0; }
.help-modes button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; border: 0; border-left: 3px solid transparent; background: none; color: var(--text-2); font-size: var(--fs-s); text-align: left; cursor: pointer; }
.help-modes button:hover { background: var(--bg-inset); color: var(--text); }
.help-modes button[aria-current="true"] { border-left-color: var(--accent); background: var(--bg-inset); color: var(--text); font-weight: 600; }
.help-topic { display: grid; gap: 8px; padding: 12px; border-radius: 4px; border: 1px solid var(--line); background: var(--bg-inset); }
.help-topic-head { display: flex; align-items: center; gap: 6px; }
.help-topic-head .input { flex: 1 1 auto; min-width: 0; }
.help-topic .textarea { min-height: 140px; font-size: 13px; }
.help-preview { padding-top: 4px; }
@media (max-width: 900px) { .help-layout { grid-template-columns: minmax(0, 1fr); } }

/* ─── v1.1.3: /tienda del juego (R7) ─── */
.shop-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.shop-bar .select, .shop-section-head .select { width: auto; max-width: 300px; }
.shop-section.off { opacity: 0.78; }
.shop-section-head { gap: 8px; flex-wrap: wrap; }
.shop-section-head .input.grow { flex: 1 1 220px; min-width: 0; }
.shop-items { display: grid; }
.shop-item { display: grid; gap: 6px; padding: 10px 18px; border-top: 1px solid var(--line); }
.shop-item:first-child { border-top: 0; }
.shop-item.off { background: var(--bg-inset); }
.shop-item.off .shop-line:first-child .input[data-f="name"] { text-decoration: line-through; color: var(--text-3); }
.shop-line { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
.shop-line .input.grow { flex: 1 1 200px; min-width: 0; }
.shop-line .select { width: auto; max-width: 260px; }
.shop-value { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.shop-num { width: 96px !important; }
.shop-field { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; }
.shop-hint { color: var(--text-3); font-size: var(--fs-xs); }
.shop-check { display: inline-flex; align-items: center; }
.shop-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.shop-tools { display: inline-flex; gap: 4px; margin-left: auto; }

/* ─── v1.1.3: editor de premios (evento y sorteos) ─── */
.prize-editor { display: grid; gap: 8px; justify-items: start; }
.prize-rows { display: grid; gap: 6px; width: 100%; }
.prize-rows:empty { display: none; }
.prize-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.prize-row .select, .prize-row .input { width: auto; max-width: 100%; }
.prize-valor { display: contents; }
.prize-qty { width: 110px !important; }
.prize-unit { color: var(--text-3); font-size: var(--fs-s); }
.prize-unit:empty { display: none; }

/* ─── v1.1.3: tienda web (R8) ─── */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.ws-prod { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.ws-prod-art { width: 64px; height: 40px; flex: none; border-radius: 6px; overflow: hidden; }
.ws-prod b { display: block; }
.ws-prod small { display: block; color: var(--text-3); font-size: 12px; }
.ws-method { display: grid; gap: 10px; padding: 14px; border-radius: 6px; border: 1px solid var(--line); }
.ws-method .select { width: 100%; }
.ws-method .hint svg { width: 14px; height: 14px; vertical-align: -2px; }
.ws-filter { flex-wrap: wrap; gap: 8px; padding-bottom: 6px; }
.ws-filter .select { width: auto; min-width: 200px; }
.ws-note { max-width: 260px; white-space: normal; }
.ws-orders code { font-size: 12.5px; white-space: nowrap; }
.ws-terms-link { display: inline-flex; align-items: center; gap: 6px; }
.ws-terms-link svg { width: 14px; height: 14px; flex: none; }
.ws-terms-preview { max-height: 260px; overflow: auto; padding: 12px 14px; border-radius: 6px; background: var(--bg-inset); font-size: 13px; }
.ws-terms-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ws-terms-edit .textarea { min-height: 420px; }
.ws-terms-edit .ws-terms-preview { max-height: 440px; }
.ws-prod-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.ws-prod-preview { border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 10; }
.ws-hue { width: 100%; accent-color: var(--accent); }
.ws-prod-flags { gap: 18px; }
@media (max-width: 760px) {
  .grid-3, .ws-terms-edit, .ws-prod-grid { grid-template-columns: minmax(0, 1fr); }
  .ws-prod-preview { max-width: 320px; }
  .ws-filter .select { width: 100%; min-width: 0; }
  /* en el celular cada producto y cada venta es una ficha: sin desplazar la tabla de costado */
  .ws-products thead, .ws-orders thead { display: none; }
  .ws-products, .ws-products tbody, .ws-orders, .ws-orders tbody { display: block; }
  .ws-products tr, .ws-orders tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center;
    padding: 12px 14px; border-bottom: 1px solid color-mix(in oklab, var(--line) 60%, transparent);
  }
  .ws-products tr:last-child, .ws-orders tr:last-child { border-bottom: 0; }
  .ws-products td, .ws-orders td { display: block; padding: 0; border: 0; min-width: 0; text-align: left; }
  .ws-products td:empty, .ws-orders td:empty { display: none; }
  .ws-products td[data-label]::before, .ws-orders td[data-label]::before { content: attr(data-label) ' '; color: var(--text-3); font-size: 12px; }
  .ws-prod { min-width: 0; }
  .ws-products tr { grid-template-areas: "prod prod" "sec sold" "price price" "state act"; }
  .ws-products td:nth-child(1) { grid-area: prod; }
  .ws-products td:nth-child(2) { grid-area: sec; color: var(--text-3); font-size: 12.5px; }
  .ws-products td:nth-child(3) { grid-area: price; }
  .ws-products td:nth-child(4) { grid-area: sold; text-align: right; }
  .ws-products td:nth-child(5) { grid-area: state; }
  .ws-products td:nth-child(6) { grid-area: act; text-align: right; }
  .ws-orders tr { grid-template-areas: "id total" "prod prod" "acc pay" "state dl" "act act"; }
  .ws-orders td:nth-child(1) { grid-area: id; }
  .ws-orders td:nth-child(2) { grid-area: acc; }
  .ws-orders td:nth-child(3) { grid-area: prod; font-weight: 600; }
  .ws-orders td:nth-child(4) { grid-area: pay; text-align: right; }
  .ws-orders td:nth-child(5) { grid-area: total; text-align: right; font-weight: 600; }
  .ws-orders td:nth-child(6) { grid-area: state; }
  .ws-orders td:nth-child(7) { grid-area: dl; text-align: right; }
  .ws-orders td:nth-child(8) { grid-area: act; }
  .ws-note { max-width: none; }
}

/* v1.1.4 (P3, D36): pase de batalla (sala del panel) */
.pass-mform { display: grid; grid-template-columns: 1fr 1.4fr 1.2fr 0.6fr 0.6fr auto; gap: 10px; align-items: end; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; }
.pass-rw-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px; border-radius: 8px; background: var(--bg-inset); }
@media (max-width: 900px) {
  .pass-mform { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pass-mform .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 520px) {
  .pass-rw-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pass-rw-row .prize-editor { grid-column: 1 / -1; grid-row: 2; }
}
.pass-rw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 20px; margin: 0; padding: 0; list-style: none; }
.pass-rw-list li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; font-size: var(--fs-s); }
.pass-rw-list b { white-space: nowrap; }
@media (max-width: 600px) {
  /* En el celular cada misión es una ficha: período arriba, misión y XP, estado y botones */
  .pass-mtable thead { display: none; }
  .pass-mtable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .pass-mtable td { padding: 0; border: 0; }
  .pass-mtable td:nth-child(1) { grid-column: 1 / -1; color: var(--text-3); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; }
  .pass-mtable td:nth-child(3) { grid-column: 2; grid-row: 2; font-weight: 700; }
  .pass-mtable td:nth-child(5) { grid-column: 1 / -1; }
  .pass-mtable td:nth-child(5) .row { justify-content: flex-start !important; }
}

/* v1.1.4 (W9): emblemas en la sala de grupos */
.emblem { display: inline-grid; place-items: center; flex: none; overflow: hidden; border-radius: 8px; background: var(--bg-inset); object-fit: contain; vertical-align: middle; }
.emblem-s { width: 28px; height: 28px; border-radius: 6px; }
.emblem-m { width: 56px; height: 56px; }
.emblem-l { width: 96px; height: 96px; border-radius: 12px; }
.emblem-empty { border: 1px dashed var(--line); color: var(--text-3); }
.emblem-edit { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

/* v1.1.4 (A1): vista previa de cada sección de la tienda del juego (el diálogo como lo arma la gamemode) */
.shop-pv { border-top: 1px solid var(--line); }
.shop-pv > summary { display: flex; align-items: center; gap: 8px; padding: 10px 18px; cursor: pointer; list-style: none; font-size: var(--fs-s); font-weight: 600; color: var(--text-2); }
.shop-pv > summary::-webkit-details-marker { display: none; }
.shop-pv > summary::after { content: '▸'; margin-left: auto; color: var(--text-3); }
.shop-pv[open] > summary::after { content: '▾'; }
.shop-pv > summary svg { width: 16px; height: 16px; color: var(--text-3); }
.shop-pv-body { display: grid; gap: 10px; padding: 2px 18px 18px; }
.shop-pv-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-xs); color: var(--text-3); }
.shop-pv-notes li { padding-left: 14px; position: relative; }
.shop-pv-notes li::before { content: '•'; position: absolute; left: 2px; }
.shop-pv-notes li.warn { color: var(--siren); font-weight: 600; }
.shop-pv-empty { margin: 0; font-size: var(--fs-s); color: var(--text-3); }
.samp-dialog-list { width: fit-content; min-width: min(100%, 320px); max-width: 100%; }
.samp-list { overflow: auto; max-height: 360px; padding: 6px 4px 4px; }
.samp-tablist { border-collapse: collapse; white-space: nowrap; }
.samp-tablist th { padding: 2px 12px 5px; text-align: left; font-weight: 400; color: #a9c4e4; opacity: 0.8; }
.samp-tablist td { padding: 2px 12px; }
.samp-tablist tr.sel td { background: rgb(169 196 228 / 0.22); }
.samp-ph { color: #8c8c8c; }
.samp-ph.bad { color: #ff6347; font-style: normal; }
@media (max-width: 480px) {
  /* en el teléfono el nombre puede bajar de línea (en el juego no) para que se vean las tres columnas */
  .samp-tablist th, .samp-tablist td { padding-inline: 7px; }
  .samp-tablist td:first-child { white-space: normal; min-width: 8.5em; }
}

/* v1.1.4 (A2): «Actualizaciones» en Sistemas, cada cambio por separado */
.sys-index-top { list-style: none; margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sys-index .sys-index-top a { display: flex; align-items: center; gap: 8px; padding: 8px 16px 8px 14px; border-left: 3px solid transparent; color: var(--text-2); font-size: var(--fs-s); font-weight: 600; text-decoration: none; }
.sys-index .sys-index-top a svg { width: 16px; height: 16px; color: var(--accent); }
.sys-index .sys-index-top a:hover { background: var(--bg-inset); color: var(--text); }
.sys-index .sys-index-top a[aria-current="page"] { border-left-color: var(--accent); background: var(--bg-inset); color: var(--text); }
.upd-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; border-bottom: 1px solid var(--line); }
.upd-tools > label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); }
.upd-tools .select { width: auto; max-width: 230px; }
.upd-tools .upd-search { margin: 0 0 0 auto; }
.upd-version { padding: 18px; border-top: 1px solid var(--line); }
.upd-version:first-child { border-top: 0; }
.upd-vhead { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 14px; flex-wrap: wrap; }
.upd-vhead h3 { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 1.3rem; }
.upd-vlabel { font-size: var(--fs-s); font-weight: 600; color: var(--text-3); }
.upd-vhead time { font-size: var(--fs-s); color: var(--text-3); }
.upd-vtitle { margin: 4px 0 0; font-weight: 600; color: var(--text); }
.upd-summary { margin: 6px 0 0; max-width: 86ch; color: var(--text-2); font-size: var(--fs-s); }
.upd-tally { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.upd-group { margin-top: 18px; }
.upd-group h4 { margin: 0 0 8px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.upd-group h4 span { font-weight: 600; opacity: 0.8; }
.upd-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.upd-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); }
.upd-body strong { display: block; font-size: var(--fs-s); color: var(--text); }
.upd-body p { margin: 2px 0 0; font-size: var(--fs-s); color: var(--text-2); }
.upd-ref { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }
.upd-type { --pc: var(--text-3); display: inline-flex; align-items: center; justify-content: center; padding: 2px 9px; border-radius: 99px; font-size: var(--fs-xs); font-weight: 700; line-height: 1.5; white-space: nowrap;
  color: color-mix(in oklab, var(--pc) 78%, var(--text)); background: color-mix(in oklab, var(--pc) 14%, transparent); border: 1px solid color-mix(in oklab, var(--pc) 34%, transparent); }
.upd-t-nuevo { --pc: var(--go); }
.upd-t-mejora { --pc: var(--beacon); }
.upd-t-arreglo { --pc: var(--caution); }
.upd-t-seguridad { --pc: var(--siren); }
@media (max-width: 640px) {
  .upd-version { padding: 14px; }
  .upd-item { grid-template-columns: minmax(0, 1fr) auto; }
  .upd-item .upd-body { grid-column: 1 / -1; grid-row: 2; }
  .upd-item .upd-type { justify-self: start; }
  .upd-tools > label { width: 100%; justify-content: space-between; }
  .upd-tools .select { max-width: none; flex: 1; }
  .upd-tools .upd-search { margin: 0; }
  .upd-tools .upd-search .input { width: 100%; }
}

/* v1.1.4 (A2): la sección del panel del juego de cada comando, y su filtro */
.cmd-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px auto; }
.cmd-filters .cmd-search { margin: 0; }
.cmd-section .select { width: auto; max-width: 260px; }
.cmd-panel { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }
.cmd-panel svg { width: 12px; height: 12px; flex: none; }
.cmd-panel.off { font-style: italic; opacity: 0.8; }
@media (max-width: 760px) {
  .cmd-filters { margin-left: 0; width: 100%; }
  .cmd-section, .cmd-section .select { width: 100%; max-width: none; }
}

/* v1.1.5: editor de los ítems del sistema de la tienda */
.ws-sys-box { border: 1px solid var(--line); border-radius: var(--r-m, 12px); padding: 12px 14px; }
.ws-sys-box > legend { padding: 0 6px; font-weight: 700; }
.ws-vip-opts input, .ws-vip-opts select { width: 100%; min-width: 80px; }
.ws-vip-level { border-radius: 10px; background: var(--surface-2, rgb(127 127 127 / 0.06)); padding: 8px 12px; }
.ws-vip-level summary { cursor: pointer; }
.ws-vip-level[open] summary { margin-bottom: 8px; }
.h-s { margin: 6px 0 0; font-size: var(--fs-s, 14px); }

/* ─── v1.1.6, fase 6: Ofertas y regalos ─── */
.te-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px 16px; align-items: end; padding: 0 18px 16px; }
.te-form-meta, .te-form-rg { padding: 0; }
.te-form .field { margin: 0; min-width: 0; }
.te-go .btn { width: 100%; justify-content: center; }
.te-hint, .te-on { grid-column: 1 / -1; margin: 0; }
.te-suffix { display: flex; align-items: center; gap: 6px; }
.te-suffix .input { flex: 1; min-width: 0; }
.te-meta-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; }
.te-meta-now b { font-size: var(--fs-l, 18px); }
.te-block { display: block; }

/* ─── v1.1.6, fase 8: lo nuevo del centro de tickets del staff (ideas 72, 74, 77 y 78) ─── */
.tk-valor-cola { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: var(--fs-s); }
.tk-valor-cola svg { width: 16px; height: 16px; color: var(--caution); flex: none; }
.tk-ronda h2, .tk-bug h2 { display: flex; align-items: center; gap: 8px; font-size: var(--fs-m, 1.05rem); margin: 0 0 4px; }
.tk-ronda h2 svg, .tk-bug h2 svg { width: 18px; height: 18px; color: var(--accent-text); }
.tk-ronda > p, .tk-bug > p { margin: 0 0 10px; font-size: var(--fs-s); }
.tk-ronda-quien { margin: 4px 0 8px !important; }
.tk-ronda-num { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; }
.tk-ronda-num div { padding: 8px 10px; border-radius: 8px; background: var(--bg-inset); border: 1px solid var(--line); min-width: 0; }
.tk-ronda-num dt { font-size: 11px; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.tk-ronda-num dd { margin: 2px 0 0; font-size: var(--fs-l, 18px); font-weight: 900; font-variant-numeric: tabular-nums; }
.tk-ronda-num dd small { font-size: var(--fs-xs); font-weight: 700; color: var(--text-2); }
.tk-ronda-toda summary { cursor: pointer; font-weight: 800; font-size: var(--fs-s); padding: 4px 0; }
.tk-valor p { margin: 0; font-size: var(--fs-s); }
.tk-valor p + p { margin-top: 6px; }
.tk-resp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-resp > svg { width: 17px; height: 17px; color: var(--text-3); flex: none; }
.tk-resp select { flex: 1 1 220px; min-width: 0; width: auto; }
.tk-resp-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tk-resp-lista li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-inset); }
.tk-resp-txt { display: grid; gap: 2px; min-width: 0; }
.tk-resp-txt .faint { font-size: var(--fs-xs); }
.tk-resp-txt p { margin: 4px 0 0; white-space: pre-wrap; color: var(--text-2); font-size: var(--fs-s); max-height: 7.5em; overflow: hidden; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .tk-ronda-num { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tk-resp-lista li { grid-template-columns: minmax(0, 1fr); }
}

/* ─── v1.1.6, fase 9: el panel del staff (ideas 81 a 90) ─── */
/* 82: las notas del staff en el ticket y en el diálogo de sanción */
.nt-box { display: grid; gap: 8px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-inset); }
.nt-line { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-s); min-width: 0; }
.nt-line > svg { width: 16px; height: 16px; color: var(--text-3); flex: none; margin-top: 2px; }
.nt-line > div { min-width: 0; overflow-wrap: anywhere; }
.nt-ultima { margin: 4px 0 0; padding: 0 0 0 10px; border-left: 3px solid var(--line); color: var(--text-2); }
[data-sx-notas]:empty { display: none; }
[data-sx-reglas] select { width: 100%; }
[data-sx-reglas] .hint { display: block; margin-top: 6px; }
/* 83: la tabla de sanciones sugeridas */
.pl-tabla td { vertical-align: top; }
.pl-tabla td:nth-child(2) { min-width: 180px; }
.pl-tabla select, .pl-tabla input { width: auto; max-width: 100%; }
.pl-tabla [data-pl-dur] { display: inline-block; margin-top: 4px; }
/* 84: el simulador de premios */
.sim-premios:empty { display: none; }
.sim-premios { display: grid; gap: 6px; padding: 12px 14px; border-radius: 8px; border: 1px dashed var(--line); background: var(--bg-inset); }
.sim-head { display: flex; align-items: center; gap: 8px; }
.sim-head svg { width: 18px; height: 18px; color: var(--accent-text); }
.sim-premios .hint { margin: 0; }
/* 85: los emblemas para revisar */
.em-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.em-card { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px 12px; padding: 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-inset); }
.em-card img { width: 88px; height: 88px; object-fit: contain; border-radius: 8px; background: repeating-conic-gradient(#0000000d 0 25%, #0000 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); }
.em-txt { display: grid; gap: 2px; align-content: start; min-width: 0; font-size: var(--fs-s); overflow-wrap: anywhere; }
.em-card .row { grid-column: 1 / -1; }
/* 86: el chat por modo y las palabras vigiladas */
.cx-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-s); }
.cx-alertas { margin-top: 8px; font-size: var(--fs-s); }
.cx-alertas summary { cursor: pointer; font-weight: 800; }
.cx-alertas ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; max-height: 220px; overflow-y: auto; }
.cx-alertas li { overflow-wrap: anywhere; }
.gamechat .line.has-word { background: color-mix(in srgb, var(--caution) 22%, transparent); box-shadow: inset 3px 0 0 var(--caution); border-radius: 3px; }
/* 87: la lista para la apertura */
.ap-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ap-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px 14px; align-items: start; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2, var(--bg)); border-left-width: 5px; }
.ap-verde { border-left-color: var(--go); }
.ap-amarillo { border-left-color: var(--caution); }
.ap-rojo { border-left-color: var(--siren); }
.ap-luz { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; }
.ap-luz svg { width: 18px; height: 18px; }
.ap-verde .ap-luz { background: var(--go); }
.ap-amarillo .ap-luz { background: var(--caution); color: #1b1b1b; }
.ap-rojo .ap-luz { background: var(--siren); }
.ap-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ap-top h2 { font-size: var(--fs-m, 1.05rem); margin: 0; }
.ap-txt p { margin: 4px 0 0; color: var(--text-2); font-size: var(--fs-s); overflow-wrap: anywhere; }
.ap-partes { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-s); }
.ap-partes li { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.ap-partes svg { width: 14px; height: 14px; }
.ap-partes .ok svg { color: var(--go); }
.ap-partes .no svg { color: var(--siren); }
/* 88: el embudo de la tienda */
.emb-pasos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.emb-paso { display: grid; gap: 2px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-inset); font-size: var(--fs-s); min-width: 0; }
.emb-n { font-size: var(--fs-xl, 1.6rem); font-weight: 900; font-variant-numeric: tabular-nums; }
/* 89: la ficha con todo junto */
.ln-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ln-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.ln-item:first-child { border-top: 0; }
.ln-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-inset); border: 1px solid var(--line); color: var(--text-2); }
.ln-ic svg { width: 16px; height: 16px; }
.ln-sancion .ln-ic { color: var(--siren); }
.ln-nota .ln-ic { color: var(--accent-text); }
.ln-compra .ln-ic { color: var(--go); }
.ln-txt { min-width: 0; font-size: var(--fs-s); overflow-wrap: anywhere; }
.ln-det { color: var(--text-2); margin-top: 2px; }
.ln-meta { font-size: var(--fs-xs); margin-top: 2px; }
/* 90: las versiones de los editores */
.vr-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vr-item { display: grid; gap: 6px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-inset); }
.vr-top { font-size: var(--fs-s); overflow-wrap: anywhere; }
.vr-ver { flex: 1 1 200px; min-width: 0; }
.vr-ver summary { cursor: pointer; font-weight: 800; font-size: var(--fs-s); }
.vr-vista { margin: 6px 0 0; font-size: var(--fs-s); max-height: 240px; overflow: auto; }
.vr-vista pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-xs); margin: 4px 0 0; }
@media (max-width: 720px) {
  .emb-pasos { grid-template-columns: minmax(0, 1fr); }
  .ap-item { grid-template-columns: auto minmax(0, 1fr); }
  .ap-item > .btn { grid-column: 2; justify-self: start; }
  .em-grid { grid-template-columns: minmax(0, 1fr); }
}
