/* CARDS: «Карточные игры» */
.gm-tabs{display:flex;gap:6px;padding:10px 16px 0}
.gm-tabs button{flex:1;max-width:220px;padding:9px 14px;border-radius:999px;border:1px solid var(--line,rgba(127,127,127,.25));background:transparent;color:inherit;font:600 14px/1 inherit;cursor:pointer}
.gm-tabs button.on{background:linear-gradient(100deg,#f59e0b,#ec4899);border-color:transparent;color:#fff}
.cg{padding:12px 16px 24px;display:flex;flex-direction:column;gap:12px}
.cg-head{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap}
.cg-head h3{margin:0;font-size:18px}.cg-head small{opacity:.65;font-size:12px}
.cg-bal{font-size:20px;font-weight:800;padding:8px 16px;border-radius:14px;background:linear-gradient(100deg,#f59e0b,#f97316);color:#fff;box-shadow:0 2px 10px rgba(249,115,22,.35);font-variant-numeric:tabular-nums}
.cg-create{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;padding:12px;border-radius:14px;background:rgba(127,127,127,.08)}
.cg-create h4{width:100%;margin:0}.cg-create label{display:flex;flex-direction:column;gap:4px;font-size:12px;opacity:.9}
.cg-create select,.cg-create input{padding:7px 8px;border-radius:8px;border:1px solid var(--line,rgba(127,127,127,.3));background:transparent;color:inherit;min-width:90px}
.cg-create option{color:#000}
.cg-btn{padding:9px 16px;border-radius:999px;border:1px solid var(--line,rgba(127,127,127,.35));background:transparent;color:inherit;font:600 14px/1 inherit;cursor:pointer}
.cg-btn.pri{background:#1e88ff;border-color:#1e88ff;color:#fff}.cg-btn.warn{background:#ef4444;border-color:#ef4444;color:#fff}.cg-btn.ghost{opacity:.7;margin-top:8px}
.cg-lh{margin:6px 0 0}.cg-list{display:flex;flex-direction:column;gap:8px}
.cg-li{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:12px;background:rgba(127,127,127,.08)}
.cg-li>div:first-child{flex:1;min-width:0}.cg-li small{display:block;opacity:.65;font-size:12px}.cg-stake{font-weight:700}
.cg-m{opacity:.7;font-size:13px;margin:4px 0}.cg-err{color:#ef4444}.cg-fine{opacity:.55;font-size:11.5px}
.cg-lhd{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.cg-pot{margin-left:auto;font-weight:700;padding:4px 10px;border-radius:999px;background:rgba(245,158,11,.18)}
.cg-t{font-variant-numeric:tabular-nums;font-weight:700;color:#f97316}
.cg-seats{display:flex;flex-wrap:wrap;gap:8px}.cg-seat{padding:10px 14px;border-radius:12px;background:rgba(127,127,127,.1);display:flex;flex-direction:column;min-width:110px}
.cg-seat.rd{background:rgba(34,197,94,.18)}.cg-seat.empty{opacity:.45;border:1px dashed rgba(127,127,127,.5);background:transparent}.cg-seat small{opacity:.7}
.cg-acts,.cg-btns{display:flex;gap:8px;flex-wrap:wrap}
/* карты */
.cg-card{--w:58px;position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--w);height:calc(var(--w)*1.42);border-radius:8px;background:#fff;color:#111;
  border:1px solid rgba(0,0,0,.2);box-shadow:0 1px 3px rgba(0,0,0,.25);font-family:Georgia,serif;flex:none;user-select:none;transition:transform .15s,box-shadow .15s,opacity .15s}
.cg-card.red{color:#d11a2a}.cg-card b{font-size:calc(var(--w)*.5)}.cg-card i{position:absolute;font-style:normal;font-size:calc(var(--w)*.22);line-height:1;font-weight:700;text-align:center}
.cg-card .tl{top:4px;left:5px}.cg-card .br{bottom:4px;right:5px;transform:rotate(180deg)}
.cg-card.back{background:repeating-linear-gradient(45deg,#4f46e5 0 6px,#6366f1 6px 12px);border:3px solid #fff}
.cg-card.sm{--w:34px}.cg-card.sm i{display:none}
.cg-hand{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;padding:8px 0}
.cg-hand .cg-card{cursor:pointer}.cg-hand .cg-card.legal{box-shadow:0 0 0 3px #22c55e,0 4px 10px rgba(34,197,94,.4);transform:translateY(-6px)}
.cg-hand .cg-card.dim{opacity:.55;cursor:default}.cg-hand .cg-card.sel{box-shadow:0 0 0 3px #1e88ff;transform:translateY(-14px)}
.cg-opps{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}.cg-opp{display:flex;flex-direction:column;align-items:center;padding:6px 10px;border-radius:12px;min-width:90px}
.cg-opp.act{background:rgba(30,136,255,.15)}.cg-opp small{opacity:.7;font-size:11.5px}.cg-fan{display:flex}.cg-fan .cg-card{margin-left:-20px;--w:28px}.cg-fan .cg-card:first-child{margin-left:0}
.cg-mid{display:flex;align-items:center;gap:12px;padding:12px;border-radius:16px;background:radial-gradient(ellipse at center,#1f7a4a,#14532d);color:#fff;min-height:120px}
.cg-deck{position:relative;display:flex;flex-direction:column;align-items:center;width:84px;flex:none}.cg-deck .cg-trump .cg-card{transform:rotate(90deg);position:absolute;left:22px;top:6px}
.cg-deck>.cg-card.back{position:relative;z-index:1}.cg-deck small{margin-top:4px}.cg-tsuit{font-size:40px}.cg-tsuit.red{color:#ff6b6b}
.cg-table{flex:1;display:flex;flex-wrap:wrap;gap:14px;justify-content:center}.cg-pair{position:relative;width:70px;height:92px}
.cg-pair .cg-card{position:absolute;left:0;top:0}.cg-pair .cg-card.def{left:12px;top:14px;transform:rotate(8deg)}
.cg-pair.tgt .cg-card:first-child{box-shadow:0 0 0 3px #facc15;cursor:pointer}.cg-disc{font-size:12px;opacity:.85;flex:none}
.cg-role{text-align:center;font-weight:600;min-height:20px}.cg-btns{justify-content:center}.cg-log{opacity:.6;font-size:12px;text-align:center}
.cg-fin{padding:12px;border-radius:12px;background:rgba(127,127,127,.12);font-weight:700;text-align:center}.cg-fin.win{background:linear-gradient(100deg,#22c55e,#16a34a);color:#fff}
.cg-bjrow{display:flex;align-items:center;gap:10px;padding:8px;border-radius:12px;flex-wrap:wrap}.cg-bjrow.act{background:rgba(30,136,255,.12)}.cg-bjrow.won{background:rgba(34,197,94,.18)}
.cg-bjrow>b{min-width:110px}.cg-bjc{display:flex;gap:4px}.cg-v{margin-left:auto;font-weight:700}
.cg-dround{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}.cg-drow{display:flex;align-items:center;gap:10px;padding:6px 10px;border-radius:12px}
.cg-drow.won{background:rgba(34,197,94,.18)}.cg-drow>b{min-width:120px}.cg-drow span{font-weight:800;font-size:18px}
.cg-die{display:inline-grid;grid-template:repeat(3,1fr)/repeat(3,1fr);width:38px;height:38px;padding:5px;border-radius:9px;background:#fff;box-shadow:0 2px 5px rgba(0,0,0,.3);box-sizing:border-box}
.cg-die i{width:7px;height:7px;border-radius:50%;background:#111;align-self:center;justify-self:center}
.cg-die.d1 i{grid-area:2/2}.cg-die.d2 i:nth-child(1){grid-area:1/1}.cg-die.d2 i:nth-child(2){grid-area:3/3}
.cg-die.d3 i:nth-child(1){grid-area:1/1}.cg-die.d3 i:nth-child(2){grid-area:2/2}.cg-die.d3 i:nth-child(3){grid-area:3/3}
.cg-die.d4 i:nth-child(1){grid-area:1/1}.cg-die.d4 i:nth-child(2){grid-area:1/3}.cg-die.d4 i:nth-child(3){grid-area:3/1}.cg-die.d4 i:nth-child(4){grid-area:3/3}
.cg-die.d5 i:nth-child(1){grid-area:1/1}.cg-die.d5 i:nth-child(2){grid-area:1/3}.cg-die.d5 i:nth-child(3){grid-area:2/2}.cg-die.d5 i:nth-child(4){grid-area:3/1}.cg-die.d5 i:nth-child(5){grid-area:3/3}
.cg-die.d6 i:nth-child(1){grid-area:1/1}.cg-die.d6 i:nth-child(2){grid-area:2/1}.cg-die.d6 i:nth-child(3){grid-area:3/1}.cg-die.d6 i:nth-child(4){grid-area:1/3}.cg-die.d6 i:nth-child(5){grid-area:2/3}.cg-die.d6 i:nth-child(6){grid-area:3/3}
.cg-dice.roll .cg-die{animation:cg-roll .9s cubic-bezier(.2,.8,.3,1)}
@keyframes cg-roll{0%{transform:rotate(0) translateY(-30px) scale(.6);opacity:0}60%{transform:rotate(540deg) translateY(4px)}100%{transform:rotate(720deg)}}
@media (max-width:600px){.cg-card{--w:46px}.cg-mid{flex-wrap:wrap;justify-content:center}.cg-pair{width:58px;height:78px}.cg-bal{font-size:17px}.cg-hand{gap:2px}}
@media (prefers-reduced-motion:reduce){.cg-dice.roll .cg-die{animation:none}}
