:root{--bg: #0b1220;--bg-2: #121c31;--panel: #17233c;--panel-2: #1e2c49;--line: #2b3d63;--txt: #eaf0ff;--txt-dim: #9fb0d0;--green: #1f9d55;--green-2: #25b869;--gold: #f2c14e;--red: #e05561;--blue: #3d7fe0;--radius: 14px;--shadow: 0 8px 28px rgba(0, 0, 0, .38);--safe-b: env(safe-area-inset-bottom, 0px);--safe-t: env(safe-area-inset-top, 0px)}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body,#root{height:100%}body{margin:0;background:radial-gradient(1200px 600px at 50% -10%,#1b2b4a 0%,var(--bg) 60%);color:var(--txt);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:16px;line-height:1.45;overscroll-behavior-y:none}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}a{color:var(--gold)}.app{display:flex;flex-direction:column;min-height:100%}.topbar{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:10px;padding:calc(10px + var(--safe-t)) 14px 10px;background:#0b1220eb;backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}.topbar h1{margin:0;font-size:17px;font-weight:700;letter-spacing:.2px;flex:1}.topbar .brand{display:flex;align-items:center;gap:8px}.logo{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;background:linear-gradient(145deg,var(--green),#0d6b39);font-weight:800;font-size:15px;color:#fff}.main{flex:1;padding:14px;padding-bottom:calc(86px + var(--safe-b));max-width:760px;width:100%;margin:0 auto}.main.no-nav{padding-bottom:calc(20px + var(--safe-b))}.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:14px;margin-bottom:12px;box-shadow:var(--shadow)}.card h2{margin:0 0 4px;font-size:16px}.card h3{margin:0 0 8px;font-size:14px;color:var(--txt-dim);text-transform:uppercase;letter-spacing:.6px}.muted{color:var(--txt-dim);font-size:13.5px}.center{text-align:center}.row{display:flex;gap:10px;align-items:center}.row.wrap{flex-wrap:wrap}.spacer{flex:1}.stack{display:flex;flex-direction:column;gap:10px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.btn{display:inline-block;text-align:center;text-decoration:none;border:1px solid var(--line);background:var(--panel-2);color:var(--txt);padding:11px 14px;border-radius:11px;font-weight:600;font-size:15px;transition:transform .08s ease,filter .15s ease;min-height:44px}.btn:active{transform:scale(.975)}.btn:disabled{opacity:.5}.btn.primary{background:linear-gradient(180deg,var(--green-2),var(--green));border-color:#17803f}.btn.gold{background:linear-gradient(180deg,#f7d675,var(--gold));border-color:#c99b26;color:#2a1f00}.btn.danger{background:linear-gradient(180deg,#e9707a,var(--red));border-color:#b83f4a}.btn.ghost{background:transparent}.btn.block{width:100%}.btn.sm{padding:7px 11px;font-size:13.5px;min-height:36px;border-radius:9px}label{display:block;font-size:13px;color:var(--txt-dim);margin-bottom:5px}input,select{width:100%;padding:12px;border-radius:11px;background:#0f1930;border:1px solid var(--line);outline:none}input:focus,select:focus{border-color:var(--blue)}.field{margin-bottom:12px}.hint{font-size:12.5px;color:var(--txt-dim);margin-top:5px}.chipvalue{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff,#d8dee9);color:#10151f;font-weight:800;font-size:12px;border:2px solid #fff;box-shadow:0 2px 5px #0006}.badge{display:inline-block;padding:3px 9px;border-radius:999px;background:var(--panel-2);border:1px solid var(--line);font-size:12px;color:var(--txt-dim)}.badge.ok{background:#1f9d552e;border-color:#1f9d55;color:#7ee2ab}.badge.warn{background:#f2c14e26;border-color:#a8842a;color:var(--gold)}.badge.err{background:#e0556129;border-color:#a73a44;color:#ffa8b0}.tile{width:42px;height:58px;border-radius:7px;background:linear-gradient(170deg,#fdfdfd,#d9dde5);border:2px solid #fff;color:#131822;display:grid;place-items:center;gap:0;font-weight:800;font-size:15px;line-height:1;box-shadow:0 3px 7px #00000073;padding:2px}.tile .pip{width:13px;height:13px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#3b4a63,#10151f)}.tile .pip.light{background:radial-gradient(circle at 35% 30%,#9fb0d0,#46536b)}.tile small{font-size:9px;font-weight:700;color:#56617a}.tile.playable{outline:3px solid var(--gold);outline-offset:1px}.tile.dim{opacity:.42}.tile:active{transform:scale(.94)}.hand{display:flex;gap:4px;overflow-x:auto;padding:6px 2px 10px}.hand::-webkit-scrollbar{height:5px}.hand::-webkit-scrollbar-thumb{background:var(--line);border-radius:3px}.chain-wrap{display:flex;align-items:center;gap:8px;overflow-x:auto;padding:10px 2px;min-height:86px}.chain{display:flex;gap:3px}.chain .tile{width:34px;height:48px;font-size:12px;flex:0 0 auto;position:relative}.chain .tile .pip{width:9px;height:9px}.chain .tile .half{display:flex;gap:1px}table{width:100%;border-collapse:collapse;font-size:13.5px}th,td{text-align:left;padding:8px 6px;border-bottom:1px solid var(--line)}th{color:var(--txt-dim);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.4px}td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}.nav{position:fixed;left:0;right:0;bottom:0;z-index:40;display:grid;grid-template-columns:repeat(5,1fr);background:#0d1526f7;backdrop-filter:blur(12px);border-top:1px solid var(--line);padding-bottom:var(--safe-b)}.nav a{display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 2px 7px;color:var(--txt-dim);text-decoration:none;font-size:10.5px}.nav a.on{color:var(--gold)}.nav .ic{font-size:19px;line-height:1}.tier{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);margin-bottom:10px}.tier .info{flex:1;min-width:0}.tier .title{font-weight:700;font-size:15px}.tier .meta{font-size:12.5px;color:var(--txt-dim);margin-top:2px}.tier .waiting{font-size:12px;color:var(--gold)}.codebox{text-align:center;padding:16px 12px;border-radius:var(--radius);background:#0a1224;border:1px dashed var(--green)}.codebox .code{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace;font-size:30px;font-weight:800;letter-spacing:3px;color:var(--gold)}.copyfield{display:flex;align-items:center;gap:8px;padding:10px 12px;background:#0a1224;border:1px solid var(--line);border-radius:11px;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:14px;word-break:break-all}.splash{display:grid;place-items:center;min-height:100vh;padding:20px}.splash .box{width:100%;max-width:420px}.banner{padding:10px 12px;border-radius:11px;font-size:13.5px;margin-bottom:12px}.banner.err{background:#e0556126;border:1px solid #a73a44;color:#ffc0c6}.banner.ok{background:#1f9d5526;border:1px solid #1f9d55;color:#a8ecc9}.banner.info{background:#3d7fe024;border:1px solid #2f5fa8;color:#bcd6ff}.empty{text-align:center;padding:26px 10px;color:var(--txt-dim);font-size:14px}.spinner{width:22px;height:22px;border:3px solid var(--line);border-top-color:var(--gold);border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 10px}@keyframes spin{to{transform:rotate(360deg)}}.kv{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px dashed var(--line);font-size:14px}.kv:last-child{border-bottom:0}.kv span:first-child{color:var(--txt-dim)}.kv span:last-child{font-weight:600;font-variant-numeric:tabular-nums}.avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,var(--blue),#1d4f96);font-weight:800;font-size:16px}.avatar.me{background:linear-gradient(145deg,var(--green-2),var(--green))}.avatar.rival{background:linear-gradient(145deg,#7b4ec9,#4a2a86)}.chatbox{max-height:190px;overflow-y:auto;display:flex;flex-direction:column;gap:6px}.chatmsg{font-size:13.5px;padding:6px 9px;border-radius:9px;background:var(--panel-2);align-self:flex-start;max-width:86%}.chatmsg b{color:var(--gold)}.timerbar{height:5px;background:var(--line);border-radius:3px;overflow:hidden;margin:6px 0 2px}.timerbar i{display:block;height:100%;background:var(--gold);transition:width .9s linear}.timerbar i.low{background:var(--red)}@media(min-width:720px){.main{padding-top:20px}.nav{grid-template-columns:repeat(5,minmax(0,120px));justify-content:center}}

/* ============================================================
   REDISEÑO DE MESA Y FICHAS  ·  Dominó Cubano
   - Mesa de fieltro con marco de madera y placa de latón
   - Fichas de marfil con bisel, separador grabado y pips hundidos
   - Cadena como se colocan los dominós de verdad:
     las DOBLES de pie (verticales) y las sencillas tumbadas
   ============================================================ */
:root{
  --marco-1:#8a5a2d;
  --marco-2:#4a2b13;
  --fieltro-1:#3aa86f;
  --fieltro-2:#1f7d4c;
  --fieltro-3:#0c4527;
  --hueso-1:#fffdf7;
  --hueso-2:#f4ecd6;
  --hueso-3:#dccfae;
  --hueso-borde:#b09c72;
  --tinta-ficha:#1a2130;
  --laton-1:#e6c471;
  --laton-2:#a57c28;
}

/* ---------- La tarjeta del tablero se convierte en MESA ---------- */
.card:has(.chain-wrap){
  position:relative;
  padding:8px;
  border:0;
  border-radius:20px;
  margin-bottom:14px;
  overflow:hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 2px, rgba(0,0,0,.05) 2px 7px),
    linear-gradient(180deg,var(--marco-1) 0%,var(--marco-2) 100%);
  box-shadow:
    0 18px 36px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.24),
    inset 0 -3px 8px rgba(0,0,0,.45);
}
.card:has(.chain-wrap) h3{
  margin:0 0 9px;
  padding:7px 10px;
  border-radius:8px;
  background:linear-gradient(180deg,var(--laton-1),var(--laton-2));
  color:#2b1e00;
  font-size:12px;
  font-weight:800;
  letter-spacing:1.7px;
  text-align:center;
  text-shadow:0 1px 0 rgba(255,255,255,.45);
  box-shadow:0 3px 8px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.55);
}

/* ---------- El fieltro ---------- */
.chain-wrap{
  position:relative;
  gap:0;
  min-height:244px;
  margin:0;
  padding:18px 8px 20px;
  border-radius:12px;
  overflow-x:auto;
  overflow-y:hidden;
  background:
    radial-gradient(70% 55% at 50% -5%, rgba(255,255,255,.17), rgba(255,255,255,0) 62%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.014) 0 3px, rgba(0,0,0,.018) 3px 6px),
    radial-gradient(135% 145% at 50% 0%, var(--fieltro-1) 0%, var(--fieltro-2) 46%, var(--fieltro-3) 100%);
  box-shadow:
    inset 0 12px 26px rgba(0,0,0,.45),
    inset 0 -12px 26px rgba(0,0,0,.4),
    inset 0 0 0 1px rgba(0,0,0,.4),
    inset 0 0 0 5px rgba(255,255,255,.05);
}
.chain-wrap::-webkit-scrollbar{ height:0; }
.chain-wrap > span.muted{ color:rgba(255,255,255,.6); }
.chain-wrap::before{
  content:"";
  position:absolute;
  left:0; right:0; top:50%;
  border-top:1px dashed rgba(255,255,255,.15);
  pointer-events:none;
}
/* El pozo de fichas boca abajo */
.card:has(.chain-wrap)::after{
  content:"";
  position:absolute;
  right:18px; bottom:14px;
  width:30px; height:40px;
  border-radius:6px;
  background:repeating-linear-gradient(45deg,#16304c 0 5px,#1d3f63 5px 10px);
  border:1px solid rgba(0,0,0,.6);
  box-shadow:-4px 5px 0 -1px #102540,0 7px 12px rgba(0,0,0,.5);
  transform:rotate(-9deg);
  opacity:.92;
  pointer-events:none;
}

/* ============================================================
   LA CADENA
   Las fichas sencillas van TUMBADAS (horizontales).
   Las DOBLES van DE PIE (verticales), como en el dominó real.
   ============================================================ */
.chain{
  --e:1;                       /* factor de tamaño de la cadena */
  --caja:calc(30px * var(--e)); /* caja de media ficha */
  --pip:calc(9.3px * var(--e)); /* punto */
  position:relative;
  z-index:1;
  display:flex;
  flex-wrap:wrap;              /* al llenar la mesa, la cadena salta de fila */
  align-items:center;
  align-content:center;
  justify-content:flex-start;
  gap:0;
  width:100%;
  padding:8px 0 12px;
}
/* La cadena se encoge poco a poco para que quepan todas las fichas */
.chain:has(> .tile:nth-child(5)){ --e:.98 }
.chain:has(> .tile:nth-child(7)){ --e:.96 }
.chain:has(> .tile:nth-child(9)){ --e:.94 }
.chain:has(> .tile:nth-child(11)){ --e:.92 }
.chain:has(> .tile:nth-child(13)){ --e:.90 }
.chain:has(> .tile:nth-child(15)){ --e:.88 }
.chain:has(> .tile:nth-child(17)){ --e:.86 }
.chain:has(> .tile:nth-child(19)){ --e:.84 }
.chain:has(> .tile:nth-child(21)){ --e:.82 }
.chain:has(> .tile:nth-child(23)){ --e:.80 }
.chain:has(> .tile:nth-child(25)){ --e:.78 }
.chain:has(> .tile:nth-child(27)){ --e:.76 }

.chain .tile{
  flex:0 0 auto;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:center;
  gap:0;
  padding:calc(3px * var(--e));
  border-radius:calc(6px * var(--e));
  width:calc(72px * var(--e));
  height:calc(38px * var(--e));
  background:linear-gradient(170deg,#fffdf6 0%,#f6efdc 58%,#e7dcc2 100%)!important;
  border:1px solid #d9d0b9;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -2px 5px rgba(120,98,55,.32),
    0 6px 11px rgba(0,0,0,.5);
}
/* Separador grabado */
.chain .tile > div:nth-child(2){
  width:1.5px!important;
  height:78%!important;
  border-radius:2px;
  background:linear-gradient(180deg,rgba(129,103,58,.75),rgba(129,103,58,.45))!important;
  box-shadow:1px 0 0 rgba(255,255,255,.55);
}

/* ---- LAS DOBLES VAN DE PIE ----
   Una doble tiene el mismo número de puntos en las dos mitades.
   Se giran 90°: así quedan de pie, con el separador horizontal
   y los puntos en el reparto del dominó vertical.
   (Ojo: dentro de :has() no se puede usar :not(:has(...));
   la doble de blancas se detecta con :empty) */
.chain .tile:has(> div:nth-child(1) > .pip:nth-child(1):last-child):has(> div:nth-child(3) > .pip:nth-child(1):last-child),
.chain .tile:has(> div:nth-child(1) > .pip:nth-child(2):last-child):has(> div:nth-child(3) > .pip:nth-child(2):last-child),
.chain .tile:has(> div:nth-child(1) > .pip:nth-child(3):last-child):has(> div:nth-child(3) > .pip:nth-child(3):last-child),
.chain .tile:has(> div:nth-child(1) > .pip:nth-child(4):last-child):has(> div:nth-child(3) > .pip:nth-child(4):last-child),
.chain .tile:has(> div:nth-child(1) > .pip:nth-child(5):last-child):has(> div:nth-child(3) > .pip:nth-child(5):last-child),
.chain .tile:has(> div:nth-child(1) > .pip:nth-child(6):last-child):has(> div:nth-child(3) > .pip:nth-child(6):last-child),
.chain .tile:has(> div:nth-child(1):empty):has(> div:nth-child(3):empty){
  transform:rotate(90deg);
  margin:calc(17px * var(--e)) calc(-17px * var(--e));
}

/* El cero de la doble de blancas tambien se endereza */
.chain .tile:has(> div:nth-child(1):empty):has(> div:nth-child(3):empty) > div:first-child::after,
.chain .tile:has(> div:nth-child(1):empty):has(> div:nth-child(3):empty) > div:last-child::after{
  transform:rotate(-90deg);
}

/* ============================================================
   LA FICHA
   ============================================================ */
.tile{
  --caja:26px;
  --pip:8px;
  position:relative;
  width:46px;
  height:64px;
  padding:3px;
  border-radius:9px;
  background:linear-gradient(170deg,#fffdf6 0%,#f6efdc 58%,#e7dcc2 100%);
  border:1px solid #d9d0b9;
  color:var(--tinta-ficha);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 1px 0 0 rgba(255,255,255,.5),
    inset 0 -3px 6px rgba(120,98,55,.3),
    0 7px 14px rgba(0,0,0,.45);
}
.tile::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  background:
    radial-gradient(66% 46% at 28% 6%, rgba(255,255,255,.92), rgba(255,255,255,0) 76%),
    repeating-linear-gradient(92deg, rgba(150,130,95,.035) 0 1px, rgba(255,255,255,0) 1px 5px);
}
.tile > div:nth-child(2){
  width:74%!important;
  height:1.5px!important;
  border-radius:2px;
  background:linear-gradient(180deg,rgba(129,103,58,.75),rgba(129,103,58,.42))!important;
  box-shadow:0 1px 0 rgba(255,255,255,.6);
}

/* Media ficha: los puntos van en rejilla 3x3 */
.tile > div:nth-child(1),
.tile > div:nth-child(3){
  position:relative;
  display:grid!important;
  grid-template-columns:repeat(3,1fr);
  grid-template-rows:repeat(3,1fr);
  place-items:center;
  width:var(--caja)!important;
  height:var(--caja)!important;
}
.tile .pip{
  position:static!important;
  left:auto!important;
  top:auto!important;
  width:var(--pip)!important;
  height:var(--pip)!important;
  border-radius:50%!important;
  background:radial-gradient(circle at 38% 30%, #7e8ba3 0%, #4e5a73 42%, #333c4e 100%)!important;
  box-shadow:
    inset 0 1px 1.5px rgba(255,255,255,.5),
    inset 0 -1.5px 2px rgba(18,24,38,.42),
    0 1px 1px rgba(0,0,0,.24);
}
.tile .pip.light{
  background:radial-gradient(circle at 38% 30%, #b6c1d4 0%, #7b88a3 45%, #4e5a73 100%)!important;
  box-shadow:
    inset 0 1px 1.5px rgba(255,255,255,.55),
    inset 0 -1.5px 2px rgba(18,24,38,.34),
    0 1px 1px rgba(0,0,0,.22);
}

/* Reparto de los puntos según el número */
.tile > div:has(> .pip:nth-child(1):last-child) > .pip:nth-child(1){ grid-area:2/2 }
.tile > div:has(> .pip:nth-child(2):last-child) > .pip:nth-child(1){ grid-area:1/1 }
.tile > div:has(> .pip:nth-child(2):last-child) > .pip:nth-child(2){ grid-area:3/3 }
.tile > div:has(> .pip:nth-child(3):last-child) > .pip:nth-child(1){ grid-area:1/1 }
.tile > div:has(> .pip:nth-child(3):last-child) > .pip:nth-child(2){ grid-area:2/2 }
.tile > div:has(> .pip:nth-child(3):last-child) > .pip:nth-child(3){ grid-area:3/3 }
.tile > div:has(> .pip:nth-child(4):last-child) > .pip:nth-child(1){ grid-area:1/1 }
.tile > div:has(> .pip:nth-child(4):last-child) > .pip:nth-child(2){ grid-area:1/3 }
.tile > div:has(> .pip:nth-child(4):last-child) > .pip:nth-child(3){ grid-area:3/1 }
.tile > div:has(> .pip:nth-child(4):last-child) > .pip:nth-child(4){ grid-area:3/3 }
.tile > div:has(> .pip:nth-child(5):last-child) > .pip:nth-child(1){ grid-area:1/1 }
.tile > div:has(> .pip:nth-child(5):last-child) > .pip:nth-child(2){ grid-area:1/3 }
.tile > div:has(> .pip:nth-child(5):last-child) > .pip:nth-child(3){ grid-area:2/2 }
.tile > div:has(> .pip:nth-child(5):last-child) > .pip:nth-child(4){ grid-area:3/1 }
.tile > div:has(> .pip:nth-child(5):last-child) > .pip:nth-child(5){ grid-area:3/3 }
.tile > div:has(> .pip:nth-child(6):last-child) > .pip:nth-child(1){ grid-area:1/1 }
.tile > div:has(> .pip:nth-child(6):last-child) > .pip:nth-child(2){ grid-area:1/3 }
.tile > div:has(> .pip:nth-child(6):last-child) > .pip:nth-child(3){ grid-area:2/1 }
.tile > div:has(> .pip:nth-child(6):last-child) > .pip:nth-child(4){ grid-area:2/3 }
.tile > div:has(> .pip:nth-child(6):last-child) > .pip:nth-child(5){ grid-area:3/1 }
.tile > div:has(> .pip:nth-child(6):last-child) > .pip:nth-child(6){ grid-area:3/3 }

/* La blanca (0): cero grabado en vez de media ficha vacía */
.tile > div:first-child:not(:has(.pip))::after,
.tile > div:last-child:not(:has(.pip))::after{
  content:"0";
  position:absolute;
  inset:0;
  display:grid;
  place-items:center start;
  padding-left:12%;
  font-family:Georgia,"Times New Roman",serif;
  font-weight:700;
  font-size:1.15em;
  color:#57627a;
  text-shadow:0 1px 0 rgba(255,255,255,.75), 0 -1px 1px rgba(0,0,0,.18);
}

/* Ficha jugable: brillo dorado */
.tile.playable{
  outline:none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -3px 6px rgba(120,98,55,.3),
    0 0 0 2px var(--laton-1),
    0 0 16px rgba(242,193,78,.55),
    0 7px 14px rgba(0,0,0,.45);
}
.tile.dim{
  opacity:.92;
  filter:saturate(.55) brightness(.76);
}

/* ============================================================
   LA MANO (se mantiene del mismo tamaño)
   ============================================================ */
.hand{
  gap:0;
  padding:14px 6px 16px;
  overflow-x:auto;
}
.hand::-webkit-scrollbar{ height:0; }
.hand .tile{ margin-right:-7px; }
.hand .tile:last-child{ margin-right:0; }
.hand .tile > div:nth-child(1),
.hand .tile > div:nth-child(3){
  transform:rotate(90deg);
}
.hand .tile > div:first-child:not(:has(.pip))::after,
.hand .tile > div:last-child:not(:has(.pip))::after{
  transform:rotate(-90deg);
}
.hand .tile.playable{ z-index:2; }

/* Rival y turno */
.avatar.rival{
  background:linear-gradient(145deg,#8a5cd6,#4a2a86);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.25);
}
.badge.warn{ animation:latido 1.6s ease-in-out infinite; }
@keyframes latido{
  0%,100%{ box-shadow:0 0 0 0 rgba(242,193,78,.5); }
  50%{ box-shadow:0 0 0 6px rgba(242,193,78,0); }
}
.timerbar{
  height:6px;
  background:#0b1220;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.6);
}
.timerbar i{ background:linear-gradient(90deg,var(--laton-1),var(--laton-2)); }

/* ============================================================
   PANTALLA DE PARTIDA · compacta lo de arriba
   ============================================================ */
.main:has(.avatar.rival){
  padding:10px 10px calc(86px + var(--safe-b));
}
.main:has(.avatar.rival) > .card{ margin-bottom:8px; }
.banner{
  padding:8px 10px;
  font-size:12.5px;
  line-height:1.35;
  border-radius:9px;
  margin-bottom:8px;
}
.card:has(.avatar.rival){
  padding:9px 11px;
  font-size:14px;
}
.card:has(.avatar.rival) .avatar{
  width:34px;
  height:34px;
  font-size:14px;
}
.card:has(.avatar.rival) .badge{
  font-size:11px;
  padding:2px 8px;
}
.card:has(.avatar.rival) .timerbar{
  height:4px;
  margin:6px 0 3px;
}
.card:has(.avatar.rival) .timerbar + .muted{ font-size:11px!important; }
.card:has(.hand){ padding:11px; }
.card:has(.chatbox){ padding:11px; }
