:root{font-family:Inter,system-ui,Segoe UI,Arial,sans-serif;color:#17202a;background:#f1f3f0}*{box-sizing:border-box}body{margin:0}.topbar{display:flex;justify-content:space-between;align-items:center;padding:18px 22px;background:#0f5132;color:#fff;box-shadow:0 2px 10px #0002}.top-actions{display:flex;gap:10px;align-items:center}.language,.difficulty{display:flex;align-items:center;gap:7px;background:#fff;color:#173f2b;border-radius:10px;padding:7px 10px;font-weight:800}.language select,.difficulty select{border:0;background:transparent;font-weight:800;color:#173f2b;outline:none;cursor:pointer}.topbar h1{margin:0;font-size:20px;line-height:1.1;letter-spacing:.01em}.subtitle{margin-top:4px;opacity:.82;font-size:13px}.primary,.action,.secondary{border:0;border-radius:10px;padding:10px 13px;font-weight:700;cursor:pointer}.primary{background:#fff;color:#0f5132}.layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;max-width:1380px;margin:18px auto;padding:0 18px}.table-area{background:#0b6b43;border-radius:20px;min-height:780px;padding:18px;box-shadow:0 8px 30px #0002}.status-row{display:flex;gap:14px;flex-wrap:wrap;align-items:center;background:#fff;padding:10px 12px;border-radius:12px;font-size:14px}.badge{background:#d4edda;color:#155724;padding:5px 10px;border-radius:999px;font-weight:800}.scoreboard{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center;margin:14px 0}.team-card{background:#fff;border-radius:16px;padding:14px;text-align:center}.team-title{font-weight:900;letter-spacing:.08em}.score{font-size:42px;line-height:1;margin:6px 0;font-weight:900}.team-a{border:3px solid #b22}.team-b{border:3px solid #2563c7}.center-mark{color:#fff;font-weight:900}.players-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.player{background:#ffffffda;border-radius:12px;padding:10px;min-height:118px;display:flex;flex-direction:column;justify-content:space-between;border:2px solid transparent}.player.current{border-color:#ffd166;box-shadow:0 0 0 3px #ffd16655}.player.me{background:#fff}.player-name{font-weight:900}.player-team{font-size:12px;opacity:.65}.player-cards{font-size:13px;display:flex;gap:5px;justify-content:flex-end;align-items:flex-end}.table-center{margin:16px auto;max-width:930px;background:#0a5b38;border-radius:18px;padding:14px;color:#fff}.turn-label{background:#0002;padding:8px 10px;border-radius:10px}.trick-cards{min-height:200px;display:flex;gap:18px;justify-content:center;align-items:center;flex-wrap:wrap}.played-wrap{display:flex;flex-direction:column;align-items:center;gap:6px}.played-label{font-size:12px;font-weight:800;opacity:.85}.actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}.action{background:#ffe08a;color:#5f4500}.secondary{background:#fff;color:#1b1b1b}.hand-panel{background:#072f1d;color:#fff;padding:14px;border-radius:15px}.panel-title{font-weight:900;margin-bottom:9px}.hand{display:flex;justify-content:center;gap:16px;flex-wrap:wrap}.selected-info{text-align:center;font-size:13px;color:#d6f5df;margin-top:6px}

/* Cartas Fournier aportadas por el usuario: se muestran como imágenes reales y el reverso usa la carta azul de la misma imagen. */
.spanish-card{width:126px;height:198px;border-radius:8px;background:#fff;box-shadow:0 7px 16px #0004;padding:0;cursor:pointer;overflow:hidden;position:relative;transition:transform .15s ease,box-shadow .15s ease}.spanish-card:hover{transform:translateY(-4px);box-shadow:0 11px 20px #0004}.spanish-card.selected{transform:translateY(-9px);box-shadow:0 15px 25px #0005}.real-card-face,.real-card-back{display:block;width:100%;height:100%;object-fit:fill;user-select:none;-webkit-user-drag:none}.spanish-card.mini{width:84px;height:132px;padding:0;border-radius:6px}.spanish-card.mini:hover{transform:none}.card-back{background:#fff}.back-label-overlay{position:absolute;left:50%;bottom:5px;transform:translateX(-50%);padding:2px 5px;border-radius:5px;background:#0008;color:#fff;font-size:8px;font-weight:800}.rules .deck-note{margin-top:10px;padding:8px;border-radius:8px;background:#f2eee5;font-weight:700}.bot-info{margin-top:10px;padding:9px;border-radius:9px;background:#eef8f1}
.side-panel{display:flex;flex-direction:column;gap:14px}.panel-block{background:#fff;border-radius:15px;padding:15px;box-shadow:0 4px 15px #0001}.log{height:390px;overflow:auto;background:#111;color:#e7f6ea;border-radius:10px;padding:10px;font:12px ui-monospace,monospace}.log div{margin-bottom:7px}.small{font-size:12px}.muted{color:#6c757d}.rules{font-size:13px;line-height:1.45}.modal{position:fixed;inset:0;background:#0007;display:flex;align-items:center;justify-content:center;padding:18px}.hidden{display:none}.modal-card{background:#fff;max-width:520px;border-radius:18px;padding:22px;box-shadow:0 15px 50px #0005}@media(max-width:1000px){.layout{grid-template-columns:1fr}.side-panel{order:2}}@media(max-width:650px){.scoreboard{grid-template-columns:1fr 1fr}.center-mark{display:none}.spanish-card{width:102px;height:144px}.spanish-card.mini{width:78px;height:110px}.hand{gap:10px}.table-center{padding:10px}.trick-cards{min-height:160px}}

.pending-box{min-height:30px;text-align:center;margin:4px 0 10px;padding:8px 10px;border-radius:10px;background:#0003;color:#fff7c2;font-weight:800}.actions button:disabled{opacity:.45;cursor:not-allowed}.table-center .trick-cards{border:1px solid #ffffff1f;border-radius:14px;padding:8px;background:#084b2f}.played-wrap{min-width:120px}.played-wrap .spanish-card{cursor:default;transform:none}.played-wrap .spanish-card:hover{transform:none}.muted{color:#d7e9de}

.trick-cards{align-items:flex-start;overflow:auto}.trick-group{display:flex;gap:9px;align-items:flex-end;flex-wrap:wrap;padding:9px;border:1px solid #ffffff22;border-radius:12px;background:#063d27}.trick-group.live{box-shadow:0 0 0 2px #ffd16655}.trick-number{width:100%;font-size:11px;font-weight:900;color:#ffe89a;margin-bottom:2px}.played-wrap{min-width:94px}.spanish-card.mini{flex:0 0 auto}


/* Una única mesa central: las cartas se muestran de dos en dos, formando una pila por baza. */
.same-table-pairs{min-height:186px;margin:10px auto 14px;padding:8px 4px;display:flex;justify-content:center;align-items:flex-end;gap:22px;overflow-x:auto;overflow-y:visible}
.table-pair{position:relative;min-width:176px;height:166px;padding-top:18px;display:flex;justify-content:center;align-items:flex-end;border-radius:12px}
.pair-title{position:absolute;top:0;left:50%;transform:translateX(-50%);font-size:11px;font-weight:900;color:#ffe89a;white-space:nowrap}
.pair-cards{position:relative;width:176px;height:140px;display:flex;justify-content:center;align-items:flex-end}
.pair-card{position:absolute;bottom:0;min-width:90px;width:90px;transform:translateX(var(--pair-offset)) rotate(var(--pair-rot));transform-origin:50% 92%;z-index:10}
.pair-card + .pair-card{z-index:11}
.pair-card .played-label{font-size:10px;line-height:1.1;white-space:nowrap;text-shadow:0 1px 2px #0008;background:#0005;border-radius:6px;padding:2px 4px;position:relative;z-index:3}
.pair-card .spanish-card.mini{width:90px;height:126px;pointer-events:none}
.pair-card .spanish-card{cursor:default;transform:none}
@media(max-width:650px){.same-table-pairs{justify-content:flex-start;gap:10px;min-height:152px}.table-pair{min-width:150px;height:140px}.pair-cards{width:150px;height:116px}.pair-card{min-width:78px;width:78px}.pair-card .spanish-card.mini{width:78px;height:110px}.pair-card{--pair-offset:-18px}.pair-card + .pair-card{--pair-offset:18px}}
.lead-hint{margin:8px auto 10px;max-width:760px;padding:8px 12px;border-radius:10px;background:#ffd166;color:#4e3b00;font-weight:900;text-align:center;box-shadow:0 3px 10px #0002}

.result-box{background:#fff7c2!important;color:#4d3b00!important;border:2px solid #ffd166;font-size:15px}.actions .hidden{display:none}

.real-card-face{pointer-events:none}.pair-card .spanish-card.mini{width:84px;height:132px}.pair-card{min-width:88px;width:84px}.pair-card .real-card-face{width:100%;height:100%;object-fit:fill}.same-table-pairs{gap:18px}
@media(max-width:650px){.top-actions{gap:6px}.language,.difficulty{font-size:12px;padding:6px 8px}.spanish-card{width:104px;height:163px}.spanish-card.mini{width:74px;height:116px}.pair-card .spanish-card.mini{width:74px;height:116px}.pair-card{min-width:78px;width:74px}}

/* ===== MÓVIL / PWA ===== */
html{touch-action:manipulation;-webkit-text-size-adjust:100%;background:#f1f3f0}
body{min-height:100dvh;padding-bottom:env(safe-area-inset-bottom)}
button,select{font:inherit;-webkit-tap-highlight-color:transparent}
button{min-height:44px}
.topbar{position:sticky;top:0;z-index:50;padding-top:calc(10px + env(safe-area-inset-top));}
.top-actions{flex-wrap:wrap}
.hand-panel{position:sticky;bottom:0;z-index:40;border-radius:15px 15px 0 0;box-shadow:0 -7px 22px #0004;padding-bottom:calc(12px + env(safe-area-inset-bottom));}
.hand{overflow-x:auto;overflow-y:hidden;justify-content:flex-start;flex-wrap:nowrap;padding:8px 4px 4px;scroll-snap-type:x proximity}
.hand .spanish-card{flex:0 0 auto;scroll-snap-align:center}
.actions{gap:8px}
.actions button{flex:1 1 42%;min-width:140px;font-size:15px;padding:12px 10px}
.same-table-pairs{max-width:100%;}

@media(max-width:650px){
  body{font-size:15px}
  .topbar{align-items:flex-start;gap:8px;flex-direction:column;padding-left:10px;padding-right:10px}
  .topbar h1{font-size:16px;line-height:1.05;letter-spacing:0}
  .subtitle{font-size:10px;margin-top:2px}
  .top-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .top-actions .language,.top-actions .difficulty{min-width:0;justify-content:space-between;background:#fff;padding:7px 8px}
  .top-actions .primary{grid-column:1/-1;width:100%}
  .layout{display:block;margin:8px auto;padding:0 8px}
  .table-area{min-height:auto;padding:9px;border-radius:14px;box-shadow:none}
  .side-panel{margin-top:8px}
  .status-row{gap:7px;padding:8px;font-size:12px}
  .scoreboard{gap:7px;margin:9px 0}
  .team-card{padding:9px;border-width:2px}
  .score{font-size:32px}
  .players-grid{display:none}
  .table-center{margin:8px -1px 9px;padding:9px;border-radius:14px}
  .turn-label{font-size:13px}
  .pending-box{font-size:13px;margin-bottom:7px}
  .lead-hint{font-size:12px;margin:6px auto 8px}
  .same-table-pairs{gap:5px;min-height:132px;padding:4px 1px;justify-content:flex-start}
  .table-pair{min-width:126px;height:124px;padding-top:16px}
  .pair-cards{width:126px;height:104px}
  .pair-card .spanish-card.mini{width:66px;height:98px}
  .pair-card{min-width:70px;width:66px}
  .actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .actions button{min-width:0;width:100%;font-size:14px;padding:10px 7px}
  #nextHandBtn{grid-column:1/-1}
  .hand-panel{margin-left:-1px;margin-right:-1px;padding:9px 7px}
  .hand-panel .panel-title{font-size:14px}
  .hand .spanish-card{width:88px;height:139px}
  .selected-info{font-size:12px}
  .side-panel .panel-block{padding:11px}
  .log{height:220px}
}

@media(min-width:651px) and (max-width:1000px){
  .topbar{gap:10px;flex-wrap:wrap}
  .actions button{flex:1 1 30%;min-width:150px}
}

@media (hover:none){
  .spanish-card:hover{transform:none;box-shadow:0 7px 16px #0004}
  .spanish-card.selected{transform:translateY(-6px)}
}

/* ===== Ajuste compacto para móviles de 6,2" ===== */
@media (max-width:650px){
  .topbar{padding-top:calc(7px + env(safe-area-inset-top));padding-bottom:7px}
  .topbar h1{font-size:18px}
  .subtitle{font-size:10px;margin-top:2px}
  .top-actions{gap:5px}
  .top-actions .language,.top-actions .difficulty{padding:5px 7px;font-size:11px}
  .top-actions .primary{min-height:38px;padding:7px 9px;font-size:12px}
  .layout{margin:5px auto;padding:0 6px}
  .table-area{padding:6px;border-radius:11px}
  .status-row{gap:5px;padding:6px 7px;font-size:11px;border-radius:9px}
  .badge{padding:4px 7px}
  .scoreboard{gap:5px;margin:6px 0}
  .team-card{padding:6px;border-width:2px;border-radius:11px}
  .team-title{font-size:11px;letter-spacing:.04em}
  .score{font-size:26px;margin:3px 0}
  .team-card .small{font-size:10px}
  .table-center{margin:5px -1px 6px;padding:6px;border-radius:11px}
  .turn-label{padding:5px 7px;font-size:11px}
  .pending-box{min-height:24px;margin:3px 0 5px;padding:5px 7px;font-size:11px}
  .lead-hint{margin:4px auto 5px;padding:5px 7px;font-size:10px}
  .same-table-pairs{gap:3px;min-height:112px;padding:3px 0}
  .table-pair{min-width:106px;height:106px;padding-top:14px}
  .pair-cards{width:106px;height:90px}
  .pair-card .spanish-card.mini{width:58px;height:86px}
  .pair-card{min-width:62px;width:58px}
  .pair-title{font-size:9px}
  .actions{gap:5px}
  .actions button{min-height:38px;font-size:12px;padding:7px 5px;border-radius:8px}
  .hand-panel{padding:6px 5px;border-radius:11px 11px 0 0}
  .hand-panel .panel-title{font-size:12px;margin-bottom:3px}
  .hand{gap:6px;padding:5px 2px 2px}
  .hand .spanish-card{width:76px;height:120px}
  .selected-info{font-size:10px;margin-top:3px}
  .side-panel{margin-top:6px;gap:6px}
  .side-panel .panel-block{padding:8px;border-radius:10px}
  .panel-title{font-size:12px;margin-bottom:5px}
  .small{font-size:10px}
  .rules{font-size:11px}
  .log{height:170px}
}

@media (max-width:650px) and (max-height:760px){
  .topbar{padding-top:calc(5px + env(safe-area-inset-top));padding-bottom:5px}
  .topbar h1{font-size:17px}
  .top-actions{grid-template-columns:1fr 1fr;gap:4px}
  .top-actions .language,.top-actions .difficulty{padding:4px 6px}
  .top-actions .primary{min-height:34px;padding:5px 8px}
  .status-row{font-size:10px;padding:5px 6px}
  .scoreboard{margin:4px 0}
  .team-card{padding:5px}
  .score{font-size:23px}
  .table-center{padding:5px;margin:4px -1px 5px}
  .same-table-pairs{min-height:96px}
  .table-pair{min-width:96px;height:92px}
  .pair-cards{width:96px;height:78px}
  .pair-card .spanish-card.mini{width:52px;height:76px}
  .pair-card{min-width:56px;width:52px}
  .actions button{min-height:35px;font-size:11px;padding:6px 4px}
  .hand .spanish-card{width:70px;height:110px}
  .selected-info{display:none}
}


/* v0.34 - opciones plegables en móvil */
.settings-toggle{display:none;min-height:38px;border:0;border-radius:10px;padding:7px 10px;background:#fff;color:#0f5132;font-weight:800;box-shadow:0 2px 8px #0002}
.config-controls{display:contents}
@media(max-width:650px){
  .settings-toggle{display:inline-flex;align-items:center;justify-content:center;align-self:stretch;font-size:11px}
  .topbar{display:grid;grid-template-columns:1fr auto;align-items:start}
  .brand{min-width:0}
  .top-actions{grid-column:1/-1}
  .config-controls{display:grid;grid-template-columns:1fr 1fr;gap:5px}
  .config-controls.settings-hidden{display:none}
}


/* v0.37 - Nueva partida junto a Opciones */
.header-buttons{display:flex;align-items:center;gap:6px;white-space:nowrap}
.new-game-top{min-height:38px}
@media(max-width:650px){
  .header-buttons{display:flex;align-items:center;gap:5px;justify-content:flex-end}
  .header-buttons .settings-toggle,.header-buttons .new-game-top{font-size:11px;min-height:36px;padding:6px 8px}
  .top-actions{grid-column:1/-1}
}

/* v0.38 - Ayuda con registro y valores del Truc en un panel */
.help-toggle{display:inline-flex;align-items:center;justify-content:center;width:38px;min-height:38px;border:0;border-radius:10px;background:#fff;color:#0f5132;font-weight:1000;font-size:18px;line-height:1;box-shadow:0 2px 8px #0002;padding:0}
.help-panel{position:fixed;inset:0;z-index:200;background:#0008;display:flex;align-items:flex-start;justify-content:center;padding:calc(16px + env(safe-area-inset-top)) 12px 16px;overflow:auto}
.help-panel.hidden{display:none}
.help-card{width:min(760px,100%);max-height:calc(100dvh - 28px);overflow:auto;background:#f6f8f5;color:#183126;border-radius:16px;box-shadow:0 18px 50px #0006;padding:14px}
.help-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.help-header h2{margin:0;font-size:18px}.help-close{border:0;background:#e9eeea;color:#183126;border-radius:10px;width:40px;min-height:40px;font-size:26px;line-height:1}
.help-section{background:#fff;border-radius:12px;padding:10px;margin-top:8px}.help-log{height:280px;overflow:auto;background:#0a3324;color:#e9fff1;border-radius:10px;padding:9px;font-size:12px;line-height:1.35}.help-section.rules{line-height:1.4}.help-section.rules .small{display:block;margin-top:7px}
body.help-open{overflow:hidden}
@media(max-width:650px){
  .header-buttons{gap:5px}
  .help-toggle{width:36px;min-height:36px;font-size:17px}
  .help-card{border-radius:14px;padding:10px}.help-log{height:240px;font-size:11px}
}

/* ===== v0.41: cabecera y acciones agrupadas ===== */
.topbar .brand h1{font-size:18px}
.topbar .subtitle{display:none}
.actions{display:flex;flex-direction:column;gap:8px}
.play-card-row{display:flex;justify-content:center}
.play-card-row #playCardBtn{min-width:180px}
.bet-columns{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
.bet-group{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:7px;border-radius:10px;background:#00000014;border:1px solid #ffffff20}
.bet-group-title{grid-column:1/-1;text-align:center;font-size:12px;font-weight:900;opacity:.9;padding:3px 0}
.bet-group button{min-width:0;width:100%}
#nextHandBtn{width:100%}
@media(max-width:650px){
  .topbar{flex-direction:row;align-items:center;justify-content:space-between;gap:6px}
  .topbar .brand h1{font-size:15px}
  .header-buttons{flex-shrink:0}
  .bet-columns{grid-template-columns:1fr 1fr;gap:5px}
  .bet-group{gap:4px;padding:5px}
  .bet-group-title{font-size:10px;padding:2px 0}
  .bet-group button{font-size:11px;min-height:36px;padding:6px 3px}
  .play-card-row #playCardBtn{min-width:150px}
}
/* v0.42 - conceder la tanda sin mostrar las cartas */
.play-card-row{gap:8px;align-items:center}
.no-play-btn{min-width:130px!important}
@media(max-width:650px){
  .play-card-row{display:grid;grid-template-columns:1fr 1fr;gap:5px}
  .play-card-row #playCardBtn,.play-card-row #noPlayBtn{min-width:0!important;width:100%}
}

/* ===== v0.43: diseño responsive PC / tableta / móvil ===== */
html[data-device="desktop"] body{font-size:16px}
html[data-device="desktop"] .layout{max-width:1540px;grid-template-columns:minmax(0,1fr);padding:0 28px;margin:22px auto}
html[data-device="desktop"] .table-area{min-height:calc(100vh - 120px);padding:22px;border-radius:22px}
html[data-device="desktop"] .status-row{font-size:15px;padding:11px 14px}
html[data-device="desktop"] .scoreboard{max-width:760px;margin:16px auto}
html[data-device="desktop"] .team-card{padding:16px}
html[data-device="desktop"] .score{font-size:48px}
html[data-device="desktop"] .table-center{max-width:1040px;margin:18px auto;padding:16px}
html[data-device="desktop"] .trick-cards{min-height:250px;gap:24px}
html[data-device="desktop"] .hand-panel{max-width:1040px;margin:0 auto}
html[data-device="desktop"] .hand{gap:18px}
html[data-device="desktop"] .hand .spanish-card{width:118px;height:188px}
html[data-device="desktop"] .actions{gap:10px}
html[data-device="desktop"] .play-card-row{gap:10px}
html[data-device="desktop"] .bet-group button,html[data-device="desktop"] .play-card-row button{font-size:15px;padding:11px 14px}

html[data-device="tablet"] body{font-size:15px}
html[data-device="tablet"] .layout{grid-template-columns:minmax(0,1fr);max-width:1100px;padding:0 16px;margin:14px auto}
html[data-device="tablet"] .table-area{min-height:auto;padding:15px;border-radius:18px}
html[data-device="tablet"] .scoreboard{max-width:680px;margin:12px auto}
html[data-device="tablet"] .score{font-size:38px}
html[data-device="tablet"] .table-center{max-width:860px;margin:12px auto;padding:12px}
html[data-device="tablet"] .trick-cards{min-height:200px;gap:16px}
html[data-device="tablet"] .hand-panel{max-width:860px;margin:0 auto}
html[data-device="tablet"] .hand{gap:12px}
html[data-device="tablet"] .hand .spanish-card{width:96px;height:150px}
html[data-device="tablet"] .actions button{font-size:14px}

html[data-device="mobile"] .layout{width:100%;max-width:650px}
html[data-device="mobile"] .table-area{width:100%}
html[data-device="mobile"] .topbar{width:100%}
html[data-device="mobile"] .hand-panel{width:100%}

/* En tabletas en orientación horizontal damos prioridad a mesa + mano y evitamos scroll lateral */
@media (min-width:651px) and (max-width:1100px) and (orientation:landscape){
  html[data-device="tablet"] .table-area{padding:12px}
  html[data-device="tablet"] .status-row{font-size:12px;padding:7px 9px}
  html[data-device="tablet"] .scoreboard{grid-template-columns:1fr auto 1fr;gap:8px;margin:8px auto}
  html[data-device="tablet"] .score{font-size:32px}
  html[data-device="tablet"] .table-center{margin:8px auto;padding:9px}
  html[data-device="tablet"] .trick-cards{min-height:150px}
  html[data-device="tablet"] .hand-panel{padding:10px}
  html[data-device="tablet"] .hand .spanish-card{width:82px;height:128px}
}

/* PC con ratón: botones y cartas algo mayores; táctil: objetivos táctiles cómodos */
@media (hover:hover) and (pointer:fine) and (min-width:1101px){
  html[data-device="desktop"] .actions button{min-height:44px}
}
@media (hover:none){
  html[data-device="desktop"] .actions button,html[data-device="tablet"] .actions button{min-height:42px}
}

/* ===== v0.44: acciones separadas por Envite y Truc ===== */
.play-card-row{display:flex;justify-content:center}
.no-play-bottom{width:100%;margin-top:2px}
.bet-group{transition:box-shadow .15s ease,transform .15s ease}
.bet-group.active-response{box-shadow:0 0 0 2px #ffd166aa,0 7px 18px #0002;transform:translateY(-1px)}
.bet-group-envit .secondary:disabled,.bet-group-truc .secondary:disabled{opacity:.34}
@media(max-width:650px){
  .bet-columns{grid-template-columns:1fr 1fr;gap:6px}
  .bet-group{padding:6px}
  .bet-group button{font-size:11px;min-height:35px;padding:6px 3px}
  .bet-group.active-response{box-shadow:0 0 0 2px #ffd166aa}
  .no-play-bottom{min-height:36px!important;font-size:12px!important}
}


/* ===== v0.46: PC más compacto, respuestas del bot visibles y modal por encima de la mesa ===== */
html[data-device="desktop"] .layout{max-width:1280px;padding:0 18px;margin:12px auto}
html[data-device="desktop"] .table-area{min-height:calc(100vh - 92px);padding:16px;border-radius:18px}
html[data-device="desktop"] .status-row{font-size:13px;padding:8px 10px}
html[data-device="desktop"] .scoreboard{max-width:650px;margin:10px auto}
html[data-device="desktop"] .team-card{padding:11px}
html[data-device="desktop"] .score{font-size:38px}
html[data-device="desktop"] .table-center{max-width:900px;margin:10px auto;padding:11px}
html[data-device="desktop"] .trick-cards{min-height:175px;gap:14px}
html[data-device="desktop"] .hand-panel{max-width:900px}
html[data-device="desktop"] .hand{gap:12px}
html[data-device="desktop"] .hand .spanish-card{width:102px;height:162px}
html[data-device="desktop"] .actions{gap:8px}
html[data-device="desktop"] .bet-group button,html[data-device="desktop"] .play-card-row button{font-size:14px;padding:9px 12px}

.bot-response-notice{position:relative;z-index:50;margin:6px auto 8px;max-width:760px;min-height:34px;padding:10px 12px;border-radius:12px;background:#fff7c2;color:#241900;border:3px solid #e0a800;text-align:center;font-weight:1000;font-size:15px;box-shadow:0 6px 20px #0005}
.bot-response-notice.hidden{display:none}

.modal{z-index:1000;background:rgba(0,0,0,.82);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}
.modal-card{position:relative;z-index:1001;width:min(560px,calc(100vw - 28px));max-height:calc(100dvh - 40px);overflow:auto;border:2px solid #ffd166;box-shadow:0 18px 60px #0009}
@media(max-width:650px){
  .bot-response-notice{font-size:13px;padding:8px 9px;margin:4px auto 6px;min-height:30px}
  .modal{padding:12px}
  .modal-card{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:16px;border-radius:16px}
}


/* ===== v0.47 ===== */
.compact-result{justify-content:flex-start;gap:10px}
.compact-result .result-team{font-size:16px;white-space:nowrap}
.compact-result .result-team strong{font-size:24px;line-height:1}
.compact-result .result-separator{font-weight:900;font-size:18px}
.compact-result .beds-summary{margin-left:auto;font-size:13px;font-weight:800;white-space:nowrap}
.turn-label{display:flex;justify-content:center;align-items:center;gap:6px;flex-wrap:wrap}
.turn-separator{opacity:.65}
.play-card-row{justify-content:flex-start}
.play-card-row #playCardBtn{width:48%;min-width:0!important}
.pair-title,.played-label{display:none!important}
.same-table-pairs{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:10px 18px}
.table-pair{display:flex;justify-content:center;align-items:center}
.pair-cards{display:flex;justify-content:center;align-items:center;min-height:160px}
html[data-device="desktop"] .table-area{min-height:calc(100vh - 82px);padding:14px}
html[data-device="desktop"] .compact-result{font-size:12px;padding:7px 9px}
html[data-device="desktop"] .compact-result .result-team strong{font-size:21px}
html[data-device="desktop"] .scoreboard{display:none}
html[data-device="desktop"] .play-card-row #playCardBtn{width:46%;font-size:13px;padding:8px 10px}
@media(max-width:650px){
  .compact-result{gap:7px;padding:6px 8px;font-size:11px}
  .compact-result .result-team{font-size:12px}
  .compact-result .result-team strong{font-size:18px}
  .compact-result .beds-summary{font-size:10px}
  .play-card-row #playCardBtn{width:48%;min-height:34px!important;font-size:11px!important}
  .pair-cards{min-height:120px}
}

/* ===== v0.48: pantalla completa sin scroll en la mesa ===== */
:root{--topbar-height:60px}
html,body{height:100%;min-height:100%;}
body{height:100dvh;overflow:hidden;}
.layout{height:calc(100dvh - var(--topbar-height));margin-top:0;margin-bottom:0;overflow:hidden;}
.table-area{height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;}
.table-center{min-height:0;flex:1 1 auto;display:flex;flex-direction:column;overflow:hidden;}
.table-center .trick-cards{min-height:0;flex:1 1 auto;overflow:hidden;}
.same-table-pairs{min-height:0;flex:1 1 auto;overflow:hidden;}
.hand-panel{flex:0 0 auto;}
.actions{flex:0 0 auto;}

/* La mesa central mantiene las 3 parejas visibles sin necesitar scroll lateral. */
@media(max-width:650px){
  .layout{padding:0 5px;}
  .table-area{padding:5px;border-radius:10px;}
  .table-center{margin:4px 0 5px;padding:5px;border-radius:10px;}
  .same-table-pairs{gap:2px;justify-content:center;align-items:flex-end;overflow:hidden;padding:2px 0;}
  .table-pair{min-width:calc((100% - 6px)/3);width:calc((100% - 6px)/3);height:92px;padding-top:11px;}
  .pair-cards{width:100%;height:78px;}
  .pair-card .spanish-card.mini{width:48px;height:72px;}
  .pair-card{min-width:52px;width:48px;}
  .pair-card{--pair-offset:-11px!important;}
  .pair-card + .pair-card{--pair-offset:11px!important;}
  .hand-panel{position:static;}
  .hand{overflow:hidden;justify-content:center;flex-wrap:nowrap;gap:5px;padding:4px 2px 2px;}
  .hand .spanish-card{width:70px;height:110px;}
  .selected-info{display:none;}
  .actions{gap:4px;}
  .actions button{min-height:34px;font-size:11px;padding:6px 4px;}
}

@media(min-width:651px) and (max-width:1100px){
  .layout{padding:0 10px;}
  .table-area{padding:10px;border-radius:14px;}
  .table-center{margin:7px auto;padding:8px;max-width:900px;}
  .same-table-pairs{gap:8px;}
  .table-pair{min-width:120px;height:115px;}
  .pair-cards{width:120px;height:96px;}
  .pair-card .spanish-card.mini{width:62px;height:92px;}
  .pair-card{min-width:66px;width:62px;}
  .hand-panel{padding:8px;}
  .hand{gap:8px;}
  .hand .spanish-card{width:82px;height:128px;}
}

@media(min-width:1101px){
  .layout{padding:0 14px;}
  .table-area{padding:11px;border-radius:16px;}
  .table-center{margin:8px auto;padding:9px;max-width:900px;}
  .same-table-pairs{gap:10px;}
  .table-pair{min-width:150px;height:132px;}
  .pair-cards{width:150px;height:108px;}
  .pair-card .spanish-card.mini{width:72px;height:106px;}
  .pair-card{min-width:76px;width:72px;}
  .hand-panel{padding:9px;}
  .hand{gap:9px;}
  .hand .spanish-card{width:88px;height:140px;}
}

/* ===== v0.51: escritorio/tableta - botones siempre visibles ===== */
@media (min-width:651px){
  html,body{height:100%;min-height:100%;}
  body{overflow:hidden;}
  .players-grid{display:none!important;}
  .layout{height:calc(100dvh - var(--topbar-height));margin-top:0;margin-bottom:0;overflow:hidden;}
  .table-area{height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:10px 12px;}
  .compact-result{flex:0 0 auto;}
  .table-center{min-height:0;flex:1 1 auto;overflow:hidden;display:flex;flex-direction:column;margin:7px auto;padding:8px;max-width:980px;width:100%;}
  .turn-label{flex:0 0 auto;padding:6px 8px;font-size:12px;}
  .bot-response-notice{flex:0 0 auto;margin:4px auto 5px;padding:7px 10px;min-height:30px;font-size:13px;}
  .pending-box{flex:0 0 auto;min-height:26px;margin:3px 0 5px;padding:5px 8px;font-size:12px;}
  .lead-hint{flex:0 0 auto;margin:3px auto 5px;padding:5px 8px;font-size:11px;}
  .table-center .trick-cards{flex:1 1 auto;min-height:105px;height:auto;overflow:hidden;padding:5px;gap:8px;}
  .same-table-pairs{gap:8px;justify-content:center;align-items:center;min-height:100%;}
  .table-pair{min-width:125px;height:102px;}
  .pair-cards{width:125px;height:90px;}
  .pair-card .spanish-card.mini{width:60px;height:88px;}
  .pair-card{min-width:64px;width:60px;}
  .actions{flex:0 0 auto;display:flex;flex-direction:column;gap:6px;overflow:visible;}
  .play-card-row{display:flex;justify-content:flex-start;flex:0 0 auto;}
  .play-card-row #playCardBtn{width:38%;min-width:0!important;font-size:12px;padding:7px 9px;}
  .bet-columns{display:grid;grid-template-columns:1fr 1fr;gap:6px;width:100%;flex:0 0 auto;}
  .bet-group{gap:5px;padding:5px;}
  .bet-group-title{font-size:11px;padding:2px 0;}
  .bet-group button{font-size:12px;padding:7px 9px;min-height:36px;}
  #nextHandBtn{min-height:36px;padding:7px 10px;}
  .hand-panel{flex:0 0 auto;max-width:980px;width:100%;margin:0 auto;padding:7px 9px;}
  .hand-panel .panel-title{font-size:12px;margin-bottom:3px;}
  .hand{gap:7px;padding:3px 0 1px;}
  .hand .spanish-card{width:80px;height:126px;}
  .selected-info{font-size:10px;margin-top:2px;}
}

@media (min-width:651px) and (max-width:1100px){
  .table-center .trick-cards{min-height:95px;}
  .table-pair{min-width:112px;height:94px;}
  .pair-cards{width:112px;height:82px;}
  .pair-card .spanish-card.mini{width:54px;height:80px;}
  .pair-card{min-width:58px;width:54px;}
  .bet-group button{font-size:11px;min-height:34px;padding:6px 7px;}
}


/* ===== v0.52: móvil sin scroll ===== */
@media (max-width:650px){
  html,body{width:100%;height:100%;min-height:100%;overflow:hidden!important;overscroll-behavior:none;}
  body{height:100dvh;max-height:100dvh;padding:0!important;}
  .topbar{position:relative;top:auto;z-index:60;flex:0 0 auto;}
  .layout{height:calc(100dvh - 52px);max-height:calc(100dvh - 52px);margin:0!important;padding:0 4px!important;overflow:hidden!important;display:block!important;}
  .table-area{height:100%;min-height:0!important;max-height:100%;padding:4px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;border-radius:9px!important;}
  .status-row{flex:0 0 auto;margin:0!important;}
  .scoreboard{flex:0 0 auto;}
  .table-center{flex:1 1 auto;min-height:0!important;height:auto!important;max-height:none!important;margin:3px 0!important;padding:4px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;}
  .turn-label,.bot-response-notice,.pending-box,.lead-hint{flex:0 0 auto;}
  .table-center .trick-cards{flex:1 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:hidden!important;padding:2px!important;}
  .same-table-pairs{width:100%;height:100%;min-height:0!important;max-height:100%!important;overflow:hidden!important;display:flex!important;flex-wrap:nowrap!important;gap:2px!important;justify-content:space-evenly!important;align-items:flex-end!important;padding:1px 0!important;}
  .table-pair{flex:1 1 0;min-width:0!important;width:auto!important;max-width:32%;height:92px!important;padding-top:10px!important;}
  .pair-cards{width:100%!important;height:78px!important;}
  .pair-card .spanish-card.mini{width:50px!important;height:74px!important;}
  .pair-card{min-width:54px!important;width:50px!important;}
  .actions{flex:0 0 auto!important;min-height:0!important;gap:3px!important;overflow:hidden!important;}
  .actions button{min-height:33px!important;padding:5px 3px!important;font-size:11px!important;}
  .play-card-row{gap:3px!important;}
  .play-card-row #playCardBtn{width:44%!important;min-width:0!important;}
  .bet-columns{gap:3px!important;}
  .bet-group{gap:3px!important;padding:3px!important;}
  .bet-group-title{font-size:9px!important;padding:1px 0!important;}
  .bet-group button{font-size:10px!important;min-height:31px!important;padding:4px 2px!important;}
  #nextHandBtn{min-height:33px!important;}
  .hand-panel{position:relative!important;bottom:auto!important;flex:0 0 auto!important;margin:3px 0 0!important;padding:4px!important;border-radius:9px!important;box-shadow:none!important;}
  .hand-panel .panel-title{font-size:11px!important;margin-bottom:2px!important;}
  .hand{overflow:hidden!important;justify-content:center!important;gap:4px!important;padding:2px 0!important;}
  .hand .spanish-card{width:68px!important;height:106px!important;}
  .selected-info{display:none!important;}
  .side-panel{display:none!important;}
  .modal{z-index:9999!important;}
  .help-panel{z-index:10000!important;}
}

@media (max-width:650px) and (max-height:700px){
  .layout{height:calc(100dvh - 48px);max-height:calc(100dvh - 48px);}
  .topbar{padding-top:calc(4px + env(safe-area-inset-top))!important;padding-bottom:4px!important;}
  .topbar .brand h1{font-size:15px!important;}
  .header-buttons .settings-toggle,.header-buttons .new-game-top,.help-toggle{min-height:32px!important;font-size:10px!important;padding:5px 6px!important;}
  .scoreboard{margin:3px 0!important;}
  .team-card{padding:4px!important;}
  .score{font-size:21px!important;}
  .table-center{padding:3px!important;margin:2px 0!important;}
  .same-table-pairs{gap:1px!important;}
  .table-pair{height:82px!important;}
  .pair-cards{height:68px!important;}
  .pair-card .spanish-card.mini{width:46px!important;height:68px!important;}
  .pair-card{min-width:50px!important;width:46px!important;}
  .actions{gap:2px!important;}
  .actions button{min-height:30px!important;font-size:10px!important;padding:4px 2px!important;}
  .hand-panel{margin-top:2px!important;padding:3px!important;}
  .hand .spanish-card{width:64px!important;height:100px!important;}
}

/* ===== v0.56: centrar siempre las bazas respecto a toda la mesa ===== */
.same-table-pairs{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  justify-content:center!important;
  align-items:center!important;
  width:100%!important;
  gap:8px!important;
  overflow:hidden!important;
  margin:0 auto!important;
}
.table-pair{
  width:100%!important;
  min-width:0!important;
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  overflow:visible!important;
}
.pair-cards{
  position:relative!important;
  width:100%!important;
  max-width:150px!important;
  height:100%!important;
  margin:0 auto!important;
  display:flex!important;
  justify-content:center!important;
  align-items:flex-end!important;
}
.pair-card{
  left:50%!important;
  bottom:0!important;
  min-width:0!important;
  width:var(--pair-card-width,60px)!important;
  transform:translateX(calc(-50% + var(--pair-offset,0px))) rotate(var(--pair-rot,0deg))!important;
}
.pair-card .spanish-card.mini{
  width:100%!important;
  height:auto!important;
  aspect-ratio:2 / 3!important;
  max-height:100%!important;
}
@media (max-width:650px){
  .same-table-pairs{display:flex!important;justify-content:center!important;gap:4px!important;align-items:center!important;}
  .table-pair{height:100%!important;padding-top:0!important;}
  .pair-cards{max-width:92px!important;}
  .pair-card{--pair-card-width:48px;}
  .pair-card:first-child{--pair-offset:-9px!important;}
  .pair-card + .pair-card{--pair-offset:9px!important;}
}
@media (max-width:650px) and (max-height:700px){
  .pair-cards{max-width:82px!important;}
  .pair-card{--pair-card-width:44px;}
  .pair-card:first-child{--pair-offset:-8px!important;}
  .pair-card + .pair-card{--pair-offset:8px!important;}
}
@media (min-width:651px) and (max-width:1100px){
  .pair-cards{max-width:110px!important;}
  .pair-card{--pair-card-width:54px;}
  .pair-card:first-child{--pair-offset:-10px!important;}
  .pair-card + .pair-card{--pair-offset:10px!important;}
}
@media (min-width:1101px){
  .pair-cards{max-width:130px!important;}
  .pair-card{--pair-card-width:62px;}
  .pair-card:first-child{--pair-offset:-11px!important;}
  .pair-card + .pair-card{--pair-offset:11px!important;}
}


/* v0.56.2: retirar el cartel de turno y reservar espacio para la tercera baza en PC. */
.lead-hint{display:none!important;margin:0!important;padding:0!important;height:0!important;min-height:0!important;}
@media (min-width:651px){
  html[data-device="desktop"] .table-center{margin-top:4px!important;margin-bottom:4px!important;padding-top:7px!important;padding-bottom:7px!important;}
  html[data-device="desktop"] .table-center .trick-cards{padding:2px 5px!important;}
  /* Una fila de altura flexible por baza: si falta espacio, las cartas reducen
     su tamaño y la tercera baza no queda tapada por el recorte vertical. */
  html[data-device="desktop"] .same-table-pairs{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-auto-rows:minmax(0,1fr)!important;grid-template-rows:none!important;gap:1px!important;padding:0!important;min-height:0!important;height:100%!important;flex:1 1 0!important;align-content:stretch!important;overflow:hidden!important;}
  html[data-device="desktop"] .table-pair{height:auto!important;min-height:0!important;width:100%!important;min-width:0!important;padding:0!important;overflow:visible!important;}
  html[data-device="desktop"] .pair-cards{position:relative!important;height:100%!important;min-height:0!important;width:100%!important;max-width:none!important;align-items:center!important;}
  html[data-device="desktop"] .pair-card{top:0!important;bottom:0!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;width:54px!important;min-width:0!important;height:100%!important;}
  html[data-device="desktop"] .pair-card .spanish-card.mini{width:auto!important;height:min(68px, 100%)!important;max-height:100%!important;aspect-ratio:2 / 3!important;flex:0 0 auto!important;}
}


/* v0.56.3: retiro con carta boca abajo y fallback cuando falta una imagen. */
.play-card-row{display:flex!important;justify-content:center!important;align-items:stretch!important;gap:8px!important;width:100%;}
.play-card-row #playCardBtn,.play-card-row #noPlayBtn{width:calc(50% - 4px)!important;min-width:0!important;flex:0 1 calc(50% - 4px)!important;white-space:normal;line-height:1.15;}
.play-card-row #noPlayBtn{background:#f5dada;color:#762a2a;border:1px solid #e5b2b2;font-weight:800;}
.play-card-row #noPlayBtn:not(:disabled):hover{background:#efc7c7;}
.card-image-fallback{display:flex!important;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:5px!important;white-space:normal;background:#fff!important;color:#152b20!important;border:2px solid #d6b979!important;}
.card-image-fallback .fallback-card-label{font-size:clamp(9px,1.1vw,14px);line-height:1.2;font-weight:900;overflow-wrap:anywhere;}
.card-back.card-image-fallback{background:repeating-linear-gradient(45deg,#143d74,#143d74 5px,#fff 5px,#fff 7px)!important;color:#10284c!important;}
.card-back.card-image-fallback .fallback-card-label{background:#fffde8;border-radius:5px;padding:3px 5px;}
@media (min-width:651px){
  html[data-device="desktop"] .table-center .trick-cards{min-height:120px;}
  html[data-device="desktop"] .hand-panel{position:relative;z-index:2;overflow:visible;}
  html[data-device="desktop"] .hand{min-height:120px;align-items:flex-end;overflow:visible;}
  html[data-device="desktop"] .hand .spanish-card{flex:0 0 auto;}
  html[data-device="desktop"] .actions{overflow:visible;}
}
@media (max-width:650px){
  .play-card-row{gap:5px!important;}
  .play-card-row #playCardBtn,.play-card-row #noPlayBtn{font-size:11px!important;padding:7px 4px!important;min-height:34px!important;}
}


/* v0.56.7: l'acció Retruc sempre visible i destacada quan és legal. */
#retruBtn.active-response{background:#ffd65e!important;color:#302400!important;border:2px solid #fff0a6!important;box-shadow:0 0 0 2px #ffd65e66,0 4px 12px #0003!important;font-weight:1000!important;}
#retruBtn:disabled{opacity:.58!important;}


/* v0.56.8: imágenes estáticas con ruta /truc/cards; asegurar visibilidad en PC y móviles. */
.spanish-card{background:#fff!important;min-width:1px!important;min-height:1px!important;}
.spanish-card img.real-card-face,.spanish-card img.real-card-back{display:block!important;visibility:visible!important;opacity:1!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:fill!important;}
html[data-device="desktop"] .hand-panel{display:block!important;visibility:visible!important;overflow:visible!important;}
html[data-device="desktop"] #myHand{display:flex!important;visibility:visible!important;min-height:190px!important;align-items:flex-end!important;overflow:visible!important;}


/* v0.56.9: en PC no recortar cartas ni controles de apuestas en pantallas bajas. */
@media (min-width:651px){
  html[data-device="desktop"], html[data-device="desktop"] body{height:auto!important;min-height:100%!important;overflow-x:hidden!important;overflow-y:auto!important;}
  html[data-device="desktop"] .layout{height:auto!important;min-height:calc(100dvh - var(--topbar-height))!important;max-height:none!important;overflow:visible!important;margin:10px auto!important;padding-bottom:18px!important;}
  html[data-device="desktop"] .table-area{height:auto!important;min-height:calc(100dvh - 95px)!important;max-height:none!important;overflow:visible!important;}
  html[data-device="desktop"] .table-center{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;flex:0 0 auto!important;}
  html[data-device="desktop"] .table-center .trick-cards{flex:0 0 auto!important;min-height:140px!important;height:auto!important;max-height:none!important;overflow:visible!important;}
  html[data-device="desktop"] .same-table-pairs{height:auto!important;min-height:130px!important;max-height:none!important;overflow:visible!important;flex:0 0 auto!important;}
  html[data-device="desktop"] .actions{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;flex:0 0 auto!important;}
  html[data-device="desktop"] .bet-columns,html[data-device="desktop"] .bet-group{overflow:visible!important;min-height:0!important;}
  html[data-device="desktop"] .hand-panel{height:auto!important;min-height:0!important;overflow:visible!important;flex:0 0 auto!important;}
  html[data-device="desktop"] #myHand{min-height:155px!important;height:auto!important;overflow:visible!important;flex-wrap:wrap!important;}
}
/* Los botones de apuesta se mantienen en dos columnas legibles en escritorio. */
@media (min-width:651px){html[data-device="desktop"] .bet-group button{font-size:13px!important;min-height:40px!important;white-space:normal!important;line-height:1.15!important;padding:7px 8px!important;}}


/* HOTFIX: dimensiones de cartas centrales PC/tableta */
@media (min-width:651px) {
  html[data-device="tablet"] .same-table-pairs,
  html[data-device="desktop"] .same-table-pairs {
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;
    justify-content:center!important;
    align-items:center!important;
    width:100%!important;
    height:auto!important;
    min-height:130px!important;
    max-height:none!important;
    flex:0 0 auto!important;
    overflow:visible!important;
  }

  html[data-device="tablet"] .table-pair,
  html[data-device="desktop"] .table-pair {
    display:flex!important;
    flex:0 0 130px!important;
    width:130px!important;
    min-width:130px!important;
    height:110px!important;
    min-height:110px!important;
    max-height:none!important;
    padding:0!important;
    overflow:visible!important;
  }

  html[data-device="tablet"] .pair-cards,
  html[data-device="desktop"] .pair-cards {
    position:relative!important;
    display:flex!important;
    width:130px!important;
    min-width:130px!important;
    max-width:130px!important;
    height:110px!important;
    min-height:110px!important;
    max-height:none!important;
    margin:0 auto!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:visible!important;
  }

  html[data-device="tablet"] .pair-card,
  html[data-device="desktop"] .pair-card {
    position:absolute!important;
    left:50%!important;
    top:0!important;
    bottom:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:60px!important;
    min-width:60px!important;
    height:100%!important;
    transform:translateX(calc(-50% + var(--pair-offset,0px))) rotate(var(--pair-rot,0deg))!important;
  }

  html[data-device="tablet"] .pair-card .spanish-card.mini,
  html[data-device="desktop"] .pair-card .spanish-card.mini {
    display:block!important;
    width:54px!important;
    min-width:54px!important;
    height:80px!important;
    min-height:80px!important;
    max-height:80px!important;
    aspect-ratio:auto!important;
    flex:0 0 54px!important;
  }
}


/* v0574: boton Revancha compacto */
#nextHandBtn.hidden {
  display: none !important;
}

#nextHandBtn:not(.hidden) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: max-content !important;
  min-height: 34px !important;
  flex: 0 0 auto !important;
  padding: 6px 13px !important;
  margin: 8px auto !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
}

@media (max-width: 650px) {
  #nextHandBtn:not(.hidden) {
    min-height: 32px !important;
    padding: 5px 10px !important;
    font-size: 12px !important;
    margin: 5px auto !important;
  }
}


/* v0576: boton Revancha mas visible */
#nextHandBtn.hidden {
  display: none !important;
}

#nextHandBtn:not(.hidden) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  width: auto !important;
  min-width: 145px !important;
  max-width: max-content !important;
  min-height: 42px !important;
  flex: 0 0 auto !important;
  padding: 9px 18px !important;
  margin: 10px auto !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  color: #173f2b !important;
  background: #ffd166 !important;
  border: 2px solid #fff !important;
  border-radius: 9px !important;
  box-shadow: 0 4px 14px #0006 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}

#nextHandBtn:not(.hidden):hover {
  background: #ffe08a !important;
  box-shadow: 0 5px 17px #0008 !important;
}

@media (max-width: 650px) {
  #nextHandBtn:not(.hidden) {
    min-width: 135px !important;
    min-height: 40px !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
    margin: 7px auto !important;
  }
}
