/* =====================================================================
   LALIGA.group · cliente del juego
   ===================================================================== */
:root {
  --night: #020812;
  --deep: #07111f;
  --panel: #0b172a;
  --panel-2: #0f1e36;
  --line: #1b2c4a;
  --line-2: #26406a;
  --chalk: #eef3fa;
  --muted: #8ea0bf;
  --faint: #5d7094;
  --electric: #1e7bff;
  --sky: #2bc4ff;
  --win: #2fd48a;
  --loss: #ff5a6a;
  --draw: #f2c14e;
  --gold: #f2c14e;
  --pitch: #12603d;
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 16px;
  --f: 'Saira', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f);
  font-variation-settings: 'wdth' 100;
  background: var(--night);
  color: var(--chalk);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--sky); }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; font-variation-settings: 'wdth' 85; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.win { color: var(--win); } .loss { color: var(--loss); } .draw { color: var(--draw); } .gold { color: var(--gold); }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { opacity: .9; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .boot img { animation: none; } }

/* ---------- tipografía ---------- */
.h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 850; font-style: italic; font-variation-settings: 'wdth' 112; line-height: 1.05; letter-spacing: -.01em; }
.h2 { font-size: 22px; font-weight: 800; font-style: italic; font-variation-settings: 'wdth' 108; line-height: 1.15; }
.h3 { font-size: 16px; font-weight: 700; font-variation-settings: 'wdth' 100; }
.lab { font-size: 13px; color: var(--muted); font-weight: 500; }
p + p { margin-top: .6em; }

/* ---------- controles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--chalk);
  padding: 9px 16px; border-radius: var(--r-s); font-weight: 600; font-size: 14px;
  transition: background .15s, border-color .15s, transform .1s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--sky); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--electric); border-color: var(--electric); color: #fff; }
.btn.primary:hover { background: #3a8cff; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: #5a2230; color: #ffb3bc; background: transparent; }
.btn.big { padding: 14px 22px; font-size: 16px; font-weight: 700; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.block { width: 100%; }

.field { display: grid; gap: 6px; }
.field + .field { margin-top: 14px; }
.input, select.input, textarea.input {
  background: var(--deep); border: 1px solid var(--line-2); border-radius: var(--r-s);
  padding: 10px 12px; width: 100%; font-size: 15px;
}
.input:focus { border-color: var(--sky); outline: none; }
textarea.input { resize: vertical; min-height: 70px; }
.code-input { font-size: 26px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; text-align: center; font-variation-settings: 'wdth' 110; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.err { color: var(--loss); font-size: 14px; min-height: 1.2em; }

.seg { display: inline-flex; background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-s); padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--panel-2); color: var(--chalk); box-shadow: inset 0 0 0 1px var(--line-2); }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip.ok { color: var(--win); border-color: #1d5a43; }
.chip.bad { color: var(--loss); border-color: #5a2230; }
.chip.warn { color: var(--draw); border-color: #5a4a20; }
.chip.blue { color: var(--sky); border-color: #1d4a6a; }
.pos { display: inline-block; width: 38px; text-align: center; font-size: 11px; font-weight: 700; padding: 2px 0; border-radius: 4px; font-variation-settings: 'wdth' 90; }
.pos.POR { background: #4a3b10; color: #ffd66b; }
.pos.DFC, .pos.LAT { background: #10314a; color: #7cc8ff; }
.pos.MC, .pos.MCO { background: #123d2a; color: #74e0aa; }
.pos.EXT, .pos.DC { background: #4a1621; color: #ff9aa6; }
.form { display: inline-flex; gap: 3px; }
.form i { width: 18px; height: 18px; border-radius: 3px; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 800; color: #04101f; }
.form i.W { background: var(--win); } .form i.D { background: var(--draw); } .form i.L { background: var(--loss); }

.bar { height: 6px; background: var(--deep); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--sky); border-radius: 3px; }
.bar.en > i { background: linear-gradient(90deg, var(--loss), var(--draw) 45%, var(--win) 80%); background-size: 200px 100%; }

/* ---------- autenticación ---------- */
.gbtn { background: #fff; color: #1f1f1f; border-color: #fff; text-decoration: none; gap: 10px; }
.gbtn:hover { background: #f1f4f9; border-color: #fff; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--faint); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; overflow: hidden; display: grid; place-items: center; padding: 40px; background: var(--night); }
.auth-art img { width: min(520px, 90%); height: auto; position: relative; z-index: 1; mix-blend-mode: lighten; }
.auth-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--deep); border-left: 1px solid var(--line); }
.auth-form .box { width: min(380px, 100%); }
.auth-form .h1 { margin-bottom: 6px; }
.auth-switch { margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-switch button { background: none; border: 0; color: var(--sky); font-weight: 600; text-decoration: underline; }
@media (max-width: 820px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 28px 16px 10px; min-height: 0; }
  .auth-art img { width: min(320px, 80%); }
  .auth-form { border-left: 0; border-top: 1px solid var(--line); align-items: start; }
}

/* ---------- estructura ---------- */
.top {
  position: sticky; top: 0; z-index: 30; background: rgba(2, 8, 18, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.top .mark { height: 30px; width: auto; }
.top .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top .who .h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .who .lab { white-space: nowrap; }
.top .stats { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.top .stat { text-align: right; line-height: 1.15; }
.top .stat b { display: block; font-size: 17px; font-weight: 750; white-space: nowrap; }
.top .stat span { font-size: 12px; color: var(--muted); }
.iconbtn { background: none; border: 1px solid var(--line); border-radius: var(--r-s); width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted); }
.iconbtn:hover { color: var(--chalk); border-color: var(--line-2); }

.tabs { max-width: 1240px; margin: 0 auto; padding: 0 12px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  background: none; border: 0; padding: 10px 12px 11px; color: var(--muted); font-weight: 600; font-size: 14px;
  border-bottom: 2px solid transparent; white-space: nowrap; position: relative;
}
.tabs button:hover { color: var(--chalk); }
.tabs button.on { color: var(--chalk); border-bottom-color: var(--electric); }
.tabs button .dot { position: absolute; top: 9px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--sky); }

.page { max-width: 1240px; margin: 0 auto; padding: 22px 16px 80px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 960px) { .dash, .g3 { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  .g2 { grid-template-columns: 1fr; } .top .stat.hide-s { display: none; } .top .mark { display: none; }
  .top-in { gap: 10px; padding: 8px 12px; } .top .stats { gap: 10px; } .top .stat b { font-size: 15px; }
  .top .who .lab { display: none; } .page { padding: 16px 12px 60px; }
  .sheet { padding: 50px 12px 14px; }
}

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px; min-width: 0; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-h .h3 { font-size: 15px; }
.sep { height: 1px; background: var(--line); margin: 14px 0; }

/* ---------- partido destacado ---------- */
.matchup {
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(30, 123, 255, .22), transparent 55%),
    radial-gradient(120% 140% at 100% 100%, rgba(43, 196, 255, .12), transparent 55%),
    var(--panel);
  border: 1px solid var(--line-2); border-radius: var(--r-l); padding: 22px; position: relative; overflow: hidden;
}
.matchup .vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin: 12px 0 18px; }
.matchup .side { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; min-width: 0; }
.matchup .side .h2 { font-size: clamp(17px, 2.4vw, 22px); }
.matchup .mid { text-align: center; font-weight: 850; font-style: italic; font-size: 22px; color: var(--muted); font-variation-settings: 'wdth' 115; }
.compare { display: grid; gap: 8px; }
.compare .cmp { display: grid; grid-template-columns: 34px 1fr 64px 1fr 34px; align-items: center; gap: 8px; font-size: 13px; }
.compare .cmp .l { display: flex; justify-content: flex-end; }
.compare .cmp .l > i, .compare .cmp .r > i { height: 6px; border-radius: 3px; display: block; }
.compare .cmp .l > i { background: var(--electric); }
.compare .cmp .r > i { background: var(--muted); }
.compare .cmp .k { text-align: center; color: var(--muted); font-size: 12px; }
.ready-box { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.mgrs { display: flex; gap: 6px; flex-wrap: wrap; }

.obj { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.obj:first-of-type { border-top: 0; padding-top: 0; }
.obj .tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); margin-top: 2px; display: grid; place-items: center; font-size: 12px; font-weight: 900; }
.obj .tick.ok { border-color: var(--win); background: var(--win); color: #04101f; }
.obj .tick.ko { border-color: var(--loss); color: var(--loss); }
.obj .stars { color: var(--gold); letter-spacing: 1px; font-size: 12px; }
.obj .rw { text-align: right; font-size: 13px; line-height: 1.25; }

.press-q { font-size: 17px; font-weight: 650; font-style: italic; line-height: 1.35; margin-bottom: 12px; }
.press-q::before { content: '“'; color: var(--sky); font-size: 28px; line-height: 0; vertical-align: -9px; margin-right: 2px; }
.press-o { display: block; width: 100%; text-align: left; background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; margin-top: 8px; font-size: 14px; }
.press-o:hover { border-color: var(--sky); }
.press-o.chosen { border-color: var(--electric); background: rgba(30, 123, 255, .12); }
.press-o small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { text-align: right; font-weight: 600; }

.spark { width: 100%; height: 64px; display: block; }

/* ---------- tablas ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 8px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--panel); white-space: nowrap; cursor: default; }
.tbl th.s { cursor: pointer; } .tbl th.s:hover { color: var(--chalk); }
.tbl td { padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: rgba(43, 196, 255, .05); }
.tbl tr.me td { background: rgba(30, 123, 255, .12); }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl td.c, .tbl th.c { text-align: center; }
.tbl .tn { display: flex; align-items: center; gap: 8px; }
.tbl .zone-ucl td:first-child { box-shadow: inset 3px 0 0 var(--sky); }
.tbl .zone-uel td:first-child { box-shadow: inset 3px 0 0 var(--draw); }
.tbl .zone-down td:first-child { box-shadow: inset 3px 0 0 var(--loss); }
.scroll-x { overflow-x: auto; }
.ovr { display: inline-grid; place-items: center; min-width: 30px; height: 24px; border-radius: 5px; font-weight: 800; font-size: 13px; background: var(--deep); border: 1px solid var(--line-2); }
.ovr.hi { border-color: var(--win); color: var(--win); }
.ovr.mid { border-color: #2a6a8a; color: var(--sky); }

/* ---------- campo / alineación ---------- */
.lineup { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .lineup { grid-template-columns: 1fr; } }
.pitchv {
  position: relative; aspect-ratio: 68 / 92; width: 100%; max-width: 520px; margin: 0 auto;
  border-radius: var(--r-m); overflow: hidden;
  background: repeating-linear-gradient(180deg, #13663f 0 8.33%, #115b38 8.33% 16.66%);
  border: 1px solid #1f7a50;
}
.pitchv svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.slot {
  position: absolute; transform: translate(-50%, -50%); width: 88px; text-align: center;
  background: none; border: 0; padding: 0; color: #fff;
}
.slot .shirt {
  width: 38px; height: 38px; border-radius: 50%; margin: 0 auto 3px; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  font-variation-settings: 'wdth' 90;
}
.slot .nm { font-size: 11px; font-weight: 650; background: rgba(2, 8, 18, .72); border-radius: 4px; padding: 1px 5px; display: inline-block; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .sp { font-size: 10px; opacity: .8; display: block; }
.slot.sel .shirt { outline: 3px solid var(--sky); outline-offset: 2px; }
.slot.empty .shirt { background: rgba(255, 255, 255, .12) !important; border-style: dashed; }
.slot .cap { position: absolute; top: -2px; right: 18px; background: var(--gold); color: #1a1300; width: 15px; height: 15px; border-radius: 50%; font-size: 9px; font-weight: 900; display: grid; place-items: center; }
.pick-list { max-height: 520px; overflow: auto; }

/* ---------- partido 2D ---------- */
.viewer { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .viewer { grid-template-columns: 1fr; } }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 16px; background: var(--deep); border-bottom: 1px solid var(--line); }
.scoreboard .t { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 700; }
.scoreboard .t.away { justify-content: flex-end; text-align: right; }
.scoreboard .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scoreboard .sc { font-size: 34px; font-weight: 850; font-style: italic; font-variation-settings: 'wdth' 110; text-align: center; line-height: 1; }
.scoreboard .clock { display: block; text-align: center; font-size: 13px; color: var(--sky); font-weight: 700; margin-top: 4px; font-style: normal; }
.cv-wrap { position: relative; background: #0d4a30; }
.cv-wrap canvas { display: block; width: 100%; height: auto; }
.viewer-ctl { display: flex; gap: 8px; padding: 10px 12px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); }
.timeline { height: 6px; background: var(--deep); border-radius: 3px; position: relative; flex: 1; min-width: 120px; }
.timeline i { position: absolute; top: 0; bottom: 0; left: 0; background: var(--electric); border-radius: 3px; }
.events { max-height: 430px; overflow: auto; }
.ev { display: grid; grid-template-columns: 40px 26px 1fr; gap: 6px; align-items: start; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ev .m { color: var(--muted); font-weight: 700; text-align: right; }
.ev.goal { font-weight: 650; }
.ev .ic { text-align: center; }
.card-y { display: inline-block; width: 10px; height: 14px; background: #ffd400; border-radius: 2px; vertical-align: -2px; }
.card-r { display: inline-block; width: 10px; height: 14px; background: #ff3b4e; border-radius: 2px; vertical-align: -2px; }
.statrow { display: grid; grid-template-columns: 50px 1fr 50px; gap: 10px; align-items: center; font-size: 13px; margin-top: 10px; }
.statrow .k { text-align: center; color: var(--muted); font-size: 12px; grid-column: 1 / -1; margin-bottom: -6px; }
.statrow .dual { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--deep); }
.statrow .dual i { display: block; height: 100%; }
.statrow .dual i:first-child { background: var(--electric); }
.statrow .dual i:last-child { background: #6b7c9c; }
.statrow b:last-child { text-align: right; }

.results { display: grid; gap: 6px; }
.res { display: grid; grid-template-columns: 1fr 64px 1fr; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--r-s); background: var(--deep); border: 1px solid var(--line); font-size: 14px; width: 100%; text-align: left; }
button.res:hover { border-color: var(--line-2); }
.res.mine { border-color: var(--electric); }
.res .h { display: flex; align-items: center; justify-content: flex-end; gap: 8px; text-align: right; min-width: 0; }
.res .a { display: flex; align-items: center; gap: 8px; min-width: 0; }
.res .h span, .res .a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res .s { text-align: center; font-weight: 800; font-size: 16px; font-variation-settings: 'wdth' 90; }

/* ---------- muro ---------- */
.post-box { display: flex; gap: 10px; align-items: flex-end; }
.feed { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); }
.item .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--panel-2); border: 1px solid var(--line-2); }
.item .av.sys { color: var(--sky); }
.item .meta { font-size: 12px; color: var(--muted); }
.item .txt { margin-top: 2px; overflow-wrap: anywhere; }
.item.result .txt { font-weight: 700; font-size: 16px; }
.item.title { border-color: #5a4a20; background: linear-gradient(90deg, rgba(242, 193, 78, .1), transparent 60%), var(--panel); }
.item.post .txt { font-size: 15px; }
.item.press .txt { font-style: italic; font-size: 16px; }
.likebtn { background: none; border: 0; color: var(--muted); font-size: 13px; display: inline-flex; gap: 5px; align-items: center; margin-top: 8px; padding: 2px 0; }
.likebtn.on { color: var(--loss); }

/* ---------- lobby ---------- */
.lobby-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .lobby-hero { grid-template-columns: 1fr; } }
.leagues { display: grid; gap: 10px; }
.lg { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); text-align: left; width: 100%; }
.lg:hover { border-color: var(--line-2); }
.lg .h3 { font-size: 17px; }
.empty { text-align: center; padding: 36px 16px; border: 1px dashed var(--line-2); border-radius: var(--r-m); color: var(--muted); }
.lvl { display: flex; align-items: center; gap: 12px; }
.lvl .n { width: 52px; height: 52px; border-radius: 12px; background: var(--electric); display: grid; place-items: center; font-size: 24px; font-weight: 850; font-style: italic; color: #fff; flex: none; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bdg { padding: 12px; border-radius: var(--r-m); background: var(--deep); border: 1px solid var(--line); }
.bdg.got { border-color: #5a4a20; background: linear-gradient(160deg, rgba(242, 193, 78, .12), transparent 60%), var(--deep); }
.bdg .h3 { font-size: 14px; }
.bdg p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bdg:not(.got) .h3 { color: var(--muted); }

.teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tcard { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-m); background: var(--panel); border: 1px solid var(--line); text-align: left; width: 100%; }
.tcard:hover:not([disabled]) { border-color: var(--sky); }
.tcard[disabled] { opacity: .5; cursor: not-allowed; }
.tcard .h3 { font-size: 15px; line-height: 1.2; }
.tcard .lab { font-size: 12px; }

.code-big { font-size: 30px; font-weight: 850; letter-spacing: .18em; font-variation-settings: 'wdth' 115; color: var(--sky); }
.crest-prev { display: grid; place-items: center; padding: 20px; background: var(--deep); border-radius: var(--r-m); border: 1px solid var(--line); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 6px; border: 2px solid transparent; }
.swatches button.on { border-color: #fff; }
input[type=color] { width: 44px; height: 32px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--deep); padding: 2px; }
input[type=range] { width: 100%; accent-color: var(--electric); }

/* ---------- modal y aviso ---------- */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(1, 4, 10, .72); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.sheet { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-l); width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; position: relative; }
.sheet.wide { width: min(1080px, 100%); }
.sheet { padding-top: 54px; }
.sheet .x { position: absolute; top: 10px; right: 10px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0; z-index: 200; background: var(--chalk); color: #04101f; padding: 11px 18px; border-radius: var(--r-s); font-weight: 600; font-size: 14px; transition: .25s; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--loss); color: #fff; }

.attr { display: grid; grid-template-columns: 90px 1fr 32px; gap: 10px; align-items: center; font-size: 13px; margin-top: 6px; }
.attr .bar > i { background: var(--electric); }
