:root {
  /* Paleta Súper Fútbol (la misma de Flux / superfutbol.live) sobre fondo negro */
  --bg: #000000;
  --bg-2: #050a0c;
  --tinta: #011C25;
  --marino: #002E3C;
  --panel: #011C25;
  --panel-2: #032a37;
  --line: rgba(255, 255, 255, .12);
  --line-2: rgba(255, 255, 255, .24);
  --text: #FFFFFF;
  --muted: #8FA6AD;
  --cal: #E3E8EA;
  --red: #ED1B34;
  --red-2: #FF5C6E;
  --red-dim: rgba(237, 27, 52, .16);
  --red-soft: #FF5C6E;
  --ok: #4fd18b;
  --amber: #f2b84b;
  --blue: #7fd4e8;
  --radius: 8px;
  --tap: 52px;
  --side-w: 220px;
  --display: "gazzetta-variable", "Archivo", "Arial Narrow", Impact, sans-serif;
  font-family: "Archivo", Arial, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; min-height: 100dvh; background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hidden { display: none !important; }

/* ---------- Estructura ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; min-height: 100dvh; }
.topbar {
  grid-column: 1 / -1; position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px; padding: 14px 24px; padding-top: max(14px, env(safe-area-inset-top));
  background: rgba(0, 0, 0, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 4px solid var(--red); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-logo { height: 48px; width: auto; display: block; }
.login-brand .brand-logo { height: 84px; margin: 0 auto 4px -4px; }
.side-icon { width: 52px; height: 52px; border-radius: 12px; display: block; }
.brand-text { font-family: var(--display); font-style: italic; font-weight: 700; font-stretch: 75%; font-size: 26px; text-transform: uppercase; }
.labtag { font-family: var(--display); font-style: italic; font-stretch: 75%; font-weight: 700; font-size: 22px; letter-spacing: .01em; text-transform: uppercase; color: #fff; background: var(--red); padding: 1px 12px; border-radius: 2px; transform: skewX(-8deg); line-height: 1.2; }
.brand-sub { font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line-2); }
.status-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--panel); border: 1px solid var(--line-2); white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.pill.ok { border-color: rgba(79,209,139,.5); background: rgba(79,209,139,.08); color: var(--ok); }
.pill.ok .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(79,209,139,.22); }
.pill.warn { border-color: rgba(242,184,75,.5); color: var(--amber); }
.pill.warn .dot { background: var(--amber); animation: blink 1s infinite; }
.pill.bad { border-color: rgba(237,27,52,.6); color: var(--red-2); }
.pill.bad .dot { background: var(--red); }
@keyframes blink { 50% { opacity: .3; } }
.btn-outline { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.55); background: transparent; font-weight: 600; font-size: 15px; }
.burger { display: none; width: 44px; height: 44px; border: none; background: none; padding: 10px; flex-direction: column; justify-content: center; gap: 5px; }
.burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; }

.side { border-right: 1px solid var(--line); padding: 20px 0; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 79px; height: calc(100vh - 79px); height: calc(100dvh - 79px); background: #000; }
.nav { display: flex; align-items: center; gap: 14px; min-height: 52px; margin: 0 12px; padding: 0 16px; border-radius: 10px; border: none; background: transparent; color: var(--cal); font-size: 16px; font-weight: 600; text-align: left; position: relative; }
.nav[aria-current="page"] { background: var(--marino); color: var(--text); }
.nav[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 4px; border-radius: 0 2px 2px 0; background: var(--red); }
.nav[aria-current="page"] svg { color: var(--red-2); }
.side-foot { margin-top: auto; padding: 0 24px; display: flex; flex-direction: column; gap: 12px; }
.sf-mark { font-family: var(--display); font-weight: 700; font-style: italic; font-stretch: 75%; font-size: 30px; width: fit-content; border-bottom: 3px solid var(--red); line-height: 1.1; }
.link { background: none; border: none; color: var(--muted); font-size: 13px; text-decoration: underline; padding: 6px 0; text-align: left; min-height: 36px; }
.scrim { display: none; }

main { padding: 24px 28px 32px; min-width: 0; }
.page-head h1 { margin: 0; font-family: var(--display); font-style: italic; font-weight: 700; font-stretch: 75%; text-transform: uppercase; font-size: 44px; letter-spacing: .005em; line-height: .95; }
.page-head p { margin: 4px 0 18px; color: var(--muted); font-size: 17px; }
.view-note { font-size: 13px; color: var(--muted); margin: 0 0 12px; }

.offline-banner { display: none; margin-bottom: 14px; padding: 14px 16px; border-radius: 12px; background: #2a0b10; border: 1.5px solid var(--red); font-weight: 700; }
body.offline .offline-banner { display: block; }

/* ---------- Botonera ---------- */
.deck-main, .deck-side { min-width: 0; }
.deck-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.filters { min-width: 0; display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--line-2); background: transparent; font-weight: 700; font-size: 15px; color: var(--cal); }
.chip[aria-pressed="true"] { border-color: #fff; color: var(--tinta); background: #fff; }
.chips.small .chip { min-height: 38px; font-size: 13px; padding: 0 14px; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.card { min-width: 0; display: flex; flex-direction: column; border-radius: var(--radius); background: linear-gradient(180deg, #03303e, var(--tinta)); border: 2px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05); overflow: hidden; transition: border-color .12s, box-shadow .12s; }
.card.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), 0 0 26px rgba(237,27,52,.35), 0 6px 18px rgba(0,0,0,.5); background: linear-gradient(180deg, #3a0a14, #160409); }
.card.pending { border-color: var(--amber); }
.tile { all: unset; display: flex; flex-direction: column; align-items: stretch; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; padding: 14px 14px 12px; }
.tile:focus-visible { outline: 3px solid #fff; outline-offset: -3px; border-radius: var(--radius); }
.tile:active { transform: scale(.985); }
.thumb { aspect-ratio: 16/10; display: grid; place-items: center; border-radius: 10px; padding: 8px;
  background-color: #00141b;
  background-image: linear-gradient(45deg, #04222d 25%, transparent 25%), linear-gradient(-45deg, #04222d 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #04222d 75%), linear-gradient(-45deg, transparent 75%, #04222d 75%);
  background-size: 14px 14px; background-position: 0 0, 0 7px, 7px -7px, -7px 0; }
.thumb { position: relative; overflow: hidden; }
.thumb img { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; }
.no-thumb { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; letter-spacing: .1em; color: var(--muted); font-size: 13px; }
.prov { position: absolute; left: 6px; top: 6px; font-size: 10px; font-weight: 900; letter-spacing: .08em; padding: 2px 6px; border-radius: 5px; background: var(--amber); color: #111; }
.meta { text-align: center; padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--line-2); }
.sponsor-name { font-weight: 800; font-size: 15px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kind { font-size: 12px; letter-spacing: .3em; font-weight: 800; color: var(--cal); margin-top: 6px; text-transform: uppercase; padding-left: .3em; }
.piece-name { color: var(--muted); font-size: 13px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 10px; border-radius: 2px !important; font-weight: 800; letter-spacing: .08em; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); color: #cfd2d8; vertical-align: 1px; }
.state { margin: 10px auto 0; min-height: 34px; min-width: 110px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-self: center; align-items: center; justify-content: center; gap: 6px; font-weight: 800; font-size: 14px; letter-spacing: .04em; border: 1.5px solid var(--line-2); color: var(--cal); background: rgba(0,0,0,.35); white-space: nowrap; }
.card.on .state { background: var(--red); border-color: var(--red); color: #fff; }
.card.pending .state { background: #3b2c06; border-color: var(--amber); color: var(--amber); }
.sub { padding: 0 12px 12px; display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); min-height: 24px; text-align: center; }
.confirm-ok { color: var(--ok); font-weight: 700; }
.confirm-no { color: var(--amber); font-weight: 700; }
.add-wrap { display: flex; min-width: 0; }
.add-tile { all: unset; box-sizing: border-box; width: 100%; border: 2px dashed var(--line-2); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 220px; color: var(--cal); font-size: 16px; cursor: pointer; }
.add-tile .plus { font-size: 48px; font-weight: 200; line-height: 1; }
body.offline .grid, body.offline .btn-clear { opacity: .4; pointer-events: none; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); border: 2px dashed var(--line-2); border-radius: var(--radius); grid-column: 1 / -1; }

.deck-foot { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.btn-clear { display: inline-flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 28px; border-radius: 999px; border: 2px solid var(--red); background: transparent; color: var(--red-soft); font-weight: 700; font-size: 19px; }
.btn-clear .sq { width: 16px; height: 16px; border-radius: 2px; background: var(--red); }
.btn-clear:not(:disabled):active { background: var(--red); color: #fff; }
.btn-clear:disabled { opacity: .45; }
.by { margin-left: auto; color: var(--muted); font-size: 15px; padding-left: 14px; border-left: 2px solid var(--red); }
.mobile-clear { display: none; }

.card-panel { background: var(--tinta); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card-panel h2 { margin: 0 0 12px; font-family: var(--display); font-style: italic; font-weight: 700; font-stretch: 75%; text-transform: uppercase; font-size: 24px; line-height: 1; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head h2 { margin-bottom: 12px; }
.badge-169 { font-size: 13px; border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 8px; color: var(--cal); margin-bottom: 12px; }
.deck-side { position: sticky; top: 99px; }
.layers-title { margin-top: 22px !important; }
.layers-title span { color: var(--muted); font-weight: 600; font-size: 15px; }
.layers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.layers li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px; background: #000; border: 1px solid var(--line); font-size: 14px; }
.layers li.top { border-color: var(--red); }
.layers .eye { color: var(--ok); }
.layers .eye svg { width: 20px; height: 20px; }
.layers .lname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layers .lname small { display: block; color: var(--muted); font-size: 12px; }
.layers .empty-l { color: var(--muted); font-size: 14px; padding: 8px 2px; background: none; border: none; }
.btn-front { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.55); background: transparent; font-weight: 700; font-size: 13px; white-space: nowrap; }
.btn-front:disabled { opacity: .35; }

/* ---------- Vista previa ---------- */
.preview {
  position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 8px; border: 1px solid var(--line-2);
  background-color: #0b2531;
  background-image: linear-gradient(45deg, #11303d 25%, transparent 25%), linear-gradient(-45deg, #11303d 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #11303d 75%), linear-gradient(-45deg, transparent 75%, #11303d 75%);
  background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  touch-action: none;
}
.preview .stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; }
.preview .stage img { position: absolute; display: block; user-select: none; -webkit-user-drag: none; }

.preview .ed-frame { position: absolute; outline: 4px dashed var(--red-2); outline-offset: 0; cursor: grab; touch-action: none; }
.preview .ed-frame img { position: absolute; pointer-events: none; }
.preview .stage .ph { position: absolute; border: 6px dashed rgba(255,255,255,.4); display: grid; place-items: center; font-size: 48px; color: #fff; font-weight: 800; }
.preview .safe { position: absolute; inset: 5%; border: 2px dashed rgba(255,255,255,.2); pointer-events: none; }
.preview-label { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- Administración ---------- */
.admin-warning { padding: 12px 14px; border-radius: 4px; background: var(--tinta); border-left: 4px solid var(--amber); font-size: 14px; margin-bottom: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
input[type=text], input[type=number], input[type=password], select {
  min-height: var(--tap); padding: 0 14px; border-radius: 4px; border: 1px solid var(--line-2); background: #000; color: var(--text); min-width: 0;
}
input:focus, select:focus { outline: none; border-color: #fff; }
input[type=range] { width: 100%; min-height: 36px; accent-color: var(--red); }
.btn { min-height: var(--tap); padding: 0 20px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.55); background: transparent; font-weight: 800; }
.btn.primary { background: #fff; color: var(--tinta); border-color: #fff; }
.plan-b { border-color: rgba(242,184,75,.45); }
.plan-b .btn { display: inline-flex; align-items: center; text-decoration: none; color: var(--tinta); }
.btn.go { background: var(--red); color: #fff; border-color: var(--red); }
.btn.danger { background: transparent; border-color: var(--red); color: var(--red-soft); }
.btn.small { min-height: 42px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: .5; }
.sponsor-block { background: var(--tinta); border: 1px solid var(--line); border-radius: 6px; padding: 16px; margin-top: 14px; }
.sponsor-block.inactive { opacity: .7; border-style: dashed; }
.sponsor-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sponsor-head h3 { margin: 0; font-family: var(--display); font-style: italic; font-weight: 700; font-stretch: 75%; text-transform: uppercase; font-size: 26px; line-height: 1; flex: 1 1 auto; }
.badge { font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 6px; text-transform: uppercase; }
.badge.on { background: rgba(34,197,94,.14); color: #6ee28f; }
.badge.off { background: #33270a; color: #ffd36b; }
.badge.air { background: var(--red); color: #fff; }
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
@media (max-width: 900px) { .slots { grid-template-columns: 1fr; } }
.slot { border: 1px solid var(--line); border-radius: 6px; padding: 12px; background: #000; display: flex; flex-direction: column; gap: 8px; }
.slot-head { display: flex; align-items: baseline; gap: 10px; }
.slot-title { font-family: var(--display); font-style: italic; font-weight: 700; font-stretch: 75%; text-transform: uppercase; font-size: 20px; }
.slot-hint { font-size: 12px; color: var(--muted); }
.slot-add { min-height: 52px; border: 2px dashed var(--line-2); border-radius: 6px; background: transparent; color: var(--cal); font-weight: 700; font-size: 15px; }
.slot-add:active { border-color: #fff; }
.piece-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); margin-top: 12px; }
.piece-item { display: flex; gap: 10px; align-items: center; background: #000; border-radius: 6px; padding: 8px; border: 1px solid var(--line); }
.piece-item .thumb { width: 110px; flex: none; padding: 6px; border-radius: 8px; }
.piece-item .info { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.piece-item .info b { display: block; color: var(--text); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-title { margin: 28px 0 4px; font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* ---------- Editor ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.72); display: flex; align-items: stretch; justify-content: center; overflow-y: auto; }
.modal-box { background: var(--bg); width: 100%; max-width: 1200px; margin: auto; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px; }
@media (max-width: 700px) { .modal-box { border-radius: 0; min-height: 100%; } }
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.modal-head h2 { margin: 0; flex: 1; font-size: 22px; }
.editor { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } }
.fields { display: flex; flex-direction: column; gap: 12px; }
.field label, .field .lbl { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .08em; }
.field input[type=text], .field input[type=number], .field select { width: 100%; }
.seg { display: flex; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; }
.seg button { flex: 1; min-height: 46px; border: none; background: #000; font-weight: 700; color: var(--cal); padding: 0 6px; font-size: 14px; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--tinta); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.file-info { font-size: 13px; color: var(--muted); }
.form-error { color: #ff8b98; font-weight: 700; font-size: 14px; min-height: 1em; }
.onair-warn { padding: 10px 12px; border-radius: 4px; background: #3a0a14; border: 1px solid var(--red); font-size: 14px; font-weight: 700; }
.dirty-note { font-size: 13px; color: #ffd36b; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; justify-content: flex-end; }
.modal-actions .spacer { flex: 1; }
.file-pick { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-pick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-pick .btn { display: inline-flex; align-items: center; }
.file-pick input:focus-visible + .btn { outline: 3px solid #fff; }

/* ---------- Salida OBS ---------- */
.out-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); }
.link-row { display: flex; gap: 8px; flex-wrap: wrap; }
.link-row input { flex: 1 1 260px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
ol.steps { margin: 0; padding-left: 20px; line-height: 1.6; font-size: 15px; }
ol.steps code { background: #000; padding: 1px 6px; border-radius: 4px; }
.out-list { font-size: 14px; display: flex; flex-direction: column; gap: 8px; }
.out-item { padding: 10px 12px; border-radius: 4px; background: #000; border: 1px solid var(--line); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(560px, calc(100% - 24px)); pointer-events: none; }
.toast { padding: 12px 16px; border-radius: 4px; background: var(--marino); border: 1px solid var(--line-2); font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.toast.err { background: #3a0c14; border-color: var(--red); }

/* ---------- Login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login form { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 14px; border-top: 4px solid var(--red); }
.login .brand-sub { border: 0; padding: 0; }
.login-title { margin: 6px 0 0; font-family: var(--display); font-style: italic; font-weight: 700; font-stretch: 75%; text-transform: uppercase; font-size: 44px; line-height: .92; }
.login-title em { color: var(--red); }

/* ---------- Responsive ---------- */
@media (max-width: 1250px) {
  .deck-layout { grid-template-columns: minmax(0, 1fr); }
  .deck-side { position: static; }
  .deck-side .card-panel { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 18px; }
  .deck-side .panel-head, .deck-side .preview, .deck-side .preview-label { grid-column: 1; }
  .deck-side .layers-title { grid-column: 2; grid-row: 1; margin-top: 0 !important; }
  .deck-side .layers { grid-column: 2; grid-row: 2 / span 2; }
  .top-obs { display: none; }
}
@media (max-width: 1000px) {
  :root { --side-w: 180px; }
  .out-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .status-row { margin-left: auto; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  html, body { overflow-x: hidden; }
  .topbar { gap: 8px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
  .burger { display: flex; }
  .brand { gap: 8px; }
  .brand-logo { height: 34px; }
  .labtag { font-size: 17px; padding: 0 8px; }
  .brand-sub { display: none; }
  .status-row { flex: 1; flex-wrap: nowrap; gap: 6px; min-width: 0; justify-content: flex-end; overflow: hidden; }
  .pill { min-width: 0; flex-shrink: 1; }
  .pill span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .pill { font-size: 12px; padding: 5px 9px; gap: 6px; }
  .pill .dot { width: 10px; height: 10px; }
  #connPill { padding: 8px; }
  #connPill #connText { display: none; }
  .side { position: fixed; top: 0; left: 0; bottom: 0; height: auto; width: 270px; z-index: 50; background: #121315; transform: translateX(-100%); transition: transform .2s; padding-top: max(24px, env(safe-area-inset-top)); }
  body.menu-open .side { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.55); }
  main { padding: 14px 12px 110px; }
  .page-head h1 { font-size: 26px; }
  .page-head p { font-size: 14px; margin-bottom: 12px; }
  .chip { min-height: 40px; padding: 0 16px; font-size: 14px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 10px 10px 8px; }
  .sponsor-name { font-size: 14px; }
  .kind { font-size: 11px; letter-spacing: .22em; }
  .state { min-width: 0; width: 100%; font-size: 13px; }
  .sub { padding: 0 8px 10px; }
  .add-tile { min-height: 160px; }
  .deck-foot { display: none; }
  .deck-side .card-panel { display: block; }
  body.view-botonera .mobile-clear { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(13,14,16,.96) 30%); }
  .mobile-clear .btn-clear { width: 100%; justify-content: center; min-height: 56px; font-size: 18px; background: #1a0b0e; }
  .toasts { bottom: 90px; }
}
