:root { --outer:#0f1b2d; --inner:#1c2e4a; --text:#f4efe4; --muted:#b9c2d3; --amber:#f2a65a; --card-w: clamp(54px, 15vw, 96px); }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(ellipse at 50% 35%, #f2a65a12 0%, #f2a65a00 55%), radial-gradient(ellipse at 50% 45%, var(--inner), var(--outer) 85%) fixed; color: var(--text);
  font-family: ui-rounded, -apple-system, "SF Pro Rounded", system-ui, sans-serif; }
body { min-height: 100vh; min-height: 100dvh; }
button { font: inherit; color: inherit; }
.join { max-width: 420px; margin: 0 auto; padding: 8vh 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.join h1 { margin: 0; font-size: 2rem; } .sub, .hint { color: var(--muted); margin: 0 0 8px; } .hint { font-size: .85rem; }
.join label { color: var(--muted); font-size: .9rem; margin-top: 8px; }
.join input { padding: 12px 14px; border-radius: 12px; border: 1px solid #ffffff33; background: #ffffff14; color: var(--text); font: inherit; font-size: 1.15rem; }
#code { text-transform: uppercase; letter-spacing: .3em; font-weight: 800; text-align: center; font-size: 1.5rem; }
.error { background: #ff6b6b22; border: 1px solid #ff6b6b66; padding: 10px 12px; border-radius: 12px; margin: 0; }
.btn { border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 700; cursor: pointer; background: #ffffff1f; }
.btn.amber { background: var(--amber); color: var(--outer); box-shadow: 0 4px 12px #f2a65a73; } .btn.ghost { background: transparent; border: 1px solid #ffffff33; padding: 8px 14px; font-weight: 500; }
.btn:disabled { opacity: .45; cursor: default; }
.players { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.players li { background: #ffffff14; border-radius: 12px; padding: 10px 14px; }
.center-msg { text-align: center; margin-top: 30vh; color: var(--muted); }

.back-row { display: flex; gap: 10px; }
.back-opt { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 12px; border: 2px solid transparent; background: #ffffff10; cursor: pointer; font-size: .8rem; }
.back-opt img { width: 40px; } .back-opt.on { border-color: var(--amber); }
.center-msg { text-align: center; margin-top: 30vh; color: var(--muted); }
.banners { position: fixed; top: 8px; left: 0; right: 0; display: grid; gap: 6px; justify-items: center; pointer-events: none; z-index: 30; }
.pill { background: var(--inner); border: 1px solid #f2a65a99; padding: 8px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; } .pill.chat { background: var(--amber); color: var(--outer); }
.chat { position: fixed; left: 8px; top: 50%; transform: translateY(-50%); z-index: 15; }
.chat-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #f4efe633; background: #1c2e4acc; font-size: 1rem; cursor: pointer; backdrop-filter: blur(8px); }
.chat-menu { position: absolute; left: 48px; top: -80px; background: var(--inner); border: 1px solid #ffffff33; border-radius: 14px; padding: 6px; display: grid; gap: 2px; width: 190px; }
.chat-menu[hidden] { display: none; } .chat-item { background: transparent; border: 0; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; } .chat-item:hover { background: #ffffff1a; }

/* ===== masa, ca în aplicație ===== */
.stage { min-height: 100dvh; }
.table-wrap { min-height: 100dvh; display: flex; justify-content: center; }
.t { width: 100%; max-width: 760px; min-height: 100dvh; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.sp { flex: 1 1 0; min-height: 4px; }
.topbar { display: flex; align-items: center; justify-content: space-between; }
.icon-btn { width: 44px; height: 44px; border: 0; background: none; color: var(--text); font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.icon-btn .ico.sheet { font-size: 22px; } .icon-spacer { width: 44px; height: 44px; }
.titles { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.title { font-weight: 700; font-size: 1.25rem; } .cap { font-size: .75rem; color: var(--muted); } .cap.accent { color: var(--amber); font-weight: 600; } .cap.center { text-align: center; margin-top: 6px; }
.chips { display: flex; gap: 8px; justify-content: center; overflow-x: auto; padding: 2px; }
.chip { display: flex; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #1c2e4ab3; font-size: .95rem; white-space: nowrap; }
.chip.mine { background: var(--amber); color: var(--outer); }
.avatar { position: relative; border-radius: 50%; background: var(--inner); border: 1px solid #f4efe626; display: grid; place-items: center; font-weight: 700; flex: none; }
.avatar.active { box-shadow: 0 0 12px #f2a65acc; } .avatar.active::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 3px solid var(--amber); animation: pulse 1.4s ease-in-out infinite alternate; }
@keyframes pulse { from { transform: scale(1); opacity: .85; } to { transform: scale(1.06); opacity: 1; } }
.opps { display: flex; gap: 12px; align-items: flex-start; } .opp-wrap { flex: 1; min-width: 0; }
.opp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px 8px; align-items: start; }
.opp { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.opp-name { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: .95rem; max-width: 100%; } .opp-name span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dealer { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #d9674e; color: var(--outer); font-size: 10px; font-weight: 800; }
.opp-cap { font-size: .7rem; color: var(--muted); white-space: nowrap; } .opp-open { margin-top: 4px; }
.opp .fan { width: calc(100% - 8px); } .fan.target { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 8px; }
.fan { position: relative; width: 100%; } .fan > * { position: absolute; bottom: 0; }
.card { display: block; height: auto; filter: drop-shadow(0 2px 3px #0006); user-select: none; -webkit-user-drag: none; transition: transform .18s ease, opacity .18s; }
.card.raised { transform: translateY(-18%); } .card.dimmed { opacity: .45; } .hand .card, .tappable { cursor: pointer; }
.hand-box { display: flex; flex-direction: column; align-items: stretch; } .my-cap { text-align: center; font-weight: 600; color: var(--muted); margin-top: 4px; }
.hand.flat { display: flex; justify-content: center; align-items: flex-end; gap: 8px; padding-top: 8px; } .hand.flat .card { position: static; }
.center-row { display: flex; align-items: center; gap: 12px; } .center-row.wide { justify-content: center; gap: 20px; }
.center-row .grow { flex: 1; min-width: 0; } .center-col { display: flex; flex-direction: column; align-items: center; gap: 10px; } .center-col.tight { gap: 8px; }
.pile { display: flex; flex-direction: column; align-items: center; gap: 6px; } .pile.clickable { cursor: pointer; } .pile-stack { position: relative; } .pile-stack .card { position: absolute; }
.pile-n { font-weight: 600; font-size: .95rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.empty-slot { border: 1.5px dashed #b9c2d066; border-radius: 8px; }
.pile-stack .empty-slot { position: absolute; left: 4px; top: 4px; }
.trick .slot { position: absolute; bottom: auto; top: 0; } .trick.faded { opacity: .6; }
.slot-who { position: absolute; left: 3px; bottom: 3px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--inner); border: 1px solid #f4efe64d; }
.status { text-align: center; font-weight: 600; color: var(--amber); display: flex; align-items: center; justify-content: center; } .status.headline { font-size: 1.05rem; } .status.title2 { font-size: 1.4rem; font-weight: 700; } .status.accent2 { color: #d9674e; }
.wait, .hint-line { text-align: center; color: var(--muted); } .wait { font-weight: 600; } .hint-line { font-size: .9rem; }
.controls { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; min-height: 54px; } .controls.slim { min-height: 28px; } .controls.col { flex-direction: column; gap: 8px; }
.ctl-blank { min-height: 54px; } .ctl-blank.tall { min-height: 100px; }
.btn-amber { min-height: 54px; padding: 0 36px; border-radius: 999px; border: 0; background: var(--amber); color: var(--outer); font-weight: 700; font-size: 1.2rem; cursor: pointer; box-shadow: 0 4px 12px #f2a65a73; transition: transform .1s; } .btn-amber:active { transform: scale(.96); }
.controls .btn-amber { padding: 0 24px; font-size: 1.05rem; }
.btn-glass { min-height: 46px; padding: 0 22px; border-radius: 999px; background: #ffffff14; backdrop-filter: blur(14px); border: 1px solid #f4efe62e; color: var(--text); font-weight: 600; font-size: 1.05rem; cursor: pointer; } .btn-glass.on { background: var(--amber); color: var(--outer); }
.glass { background: #ffffff12; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid #f4efe624; border-radius: 18px; padding: 14px; }
.ov { position: fixed; inset: 0; background: #0000008c; display: grid; place-items: center; padding: 24px; z-index: 20; } .ov.dark { background: #000000c7; }
.glass.result { width: 100%; max-width: 440px; border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 16px; text-align: center; align-items: stretch; } .glass.result.wide { max-width: 520px; }
.result-title { font-size: 1.9rem; font-weight: 700; } .result-title.small { font-size: 1.3rem; } .result-note { color: var(--muted); font-size: .9rem; }
.ranking { display: grid; gap: 6px; } .rank-row { display: flex; gap: 8px; align-items: baseline; text-align: left; } .rank-row .place { width: 28px; text-align: right; font-variant-numeric: tabular-nums; } .rank-row .rank-name { flex: 1; } .rank-row.mine { font-weight: 700; }
.gt { display: grid; gap: 8px 14px; justify-content: center; font-variant-numeric: tabular-nums; } .gt-h { color: var(--muted); font-size: .75rem; text-align: right; } .gt-c { text-align: right; } .gt .left { text-align: left; } .gt-c.mine { font-weight: 700; }
.gt-c.good { color: var(--amber); font-weight: 700; } .gt-c.bad { color: #ea4747; font-weight: 700; } .gt-c.muted { color: var(--muted); } .scroll-x { overflow-x: auto; }
.suit-circle { border-radius: 50%; border: 0; background: var(--text); color: var(--outer); font-size: 1.9rem; font-weight: 700; cursor: pointer; display: grid; place-items: center; } .suit-circle.red { color: #ea4747; }
.suit-row { display: flex; justify-content: center; gap: 14px; }
.suit-badge { width: 56px; height: 56px; border-radius: 50%; background: #1c2e4ad9; border: 1px solid #f4efe640; display: grid; place-items: center; font-size: 2.1rem; font-weight: 700; } .suit-badge.small { font-size: 1rem; } .suit-badge.red { color: #ea4747; }
.pending { background: #d9674e; color: var(--outer); border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 1.2rem; }
.log { min-height: 54px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; } .log-line { font-size: .75rem; color: var(--muted); opacity: .6; } .log-line.last { font-size: .95rem; opacity: 1; }
.prompt { font-weight: 600; color: var(--amber); font-size: 1.05rem; text-align: center; }
.last-draw { display: grid; place-items: center; }
.trump-box { display: flex; flex-direction: column; align-items: center; gap: 4px; } .trump-label { display: flex; gap: 4px; font-size: .75rem; font-weight: 600; color: var(--muted); } .trump-label .red { color: #ea4747; }
.no-trump { display: grid; place-items: center; font-size: .75rem; font-weight: 600; color: var(--muted); border: 1.5px dashed #b9c2d066; border-radius: 8px; }
.bid-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.bid-circle { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--amber); color: var(--outer); font-weight: 700; font-size: 1.2rem; cursor: pointer; } .bid-circle.off { background: #1c2e4a99; color: var(--muted); border: 1px solid #f4efe640; cursor: default; }
.contract-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.contract { display: flex; flex-direction: column; gap: 2px; align-items: center; justify-content: center; min-height: 52px; padding: 6px; border-radius: 12px; border: 0; background: var(--amber); color: var(--outer); cursor: pointer; font-size: .95rem; } .contract .goal { font-size: .68rem; text-align: center; } .contract.off { background: #1c2e4a99; color: var(--muted); cursor: default; }
.rentz-cols { display: flex; gap: 10px; justify-content: center; align-items: flex-start; } .rcol { display: flex; flex-direction: column; align-items: center; gap: 4px; } .rcol-suit { font-size: 1.3rem; font-weight: 700; } .rcol-suit.red { color: #ea4747; } .dots { color: var(--muted); }
/* Război */
.war-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
.war-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; } .war-tile.out { opacity: .45; }
.war-head { display: flex; align-items: center; gap: 10px; max-width: 100%; } .war-name { font-weight: 600; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; background: #f2a65a38; border: 1px solid #f2a65a8c; font-size: .95rem; }
.cards-ico { width: 9px; height: 12px; border: 1.5px solid currentColor; border-radius: 2px; display: inline-block; }
.war-slot { display: grid; place-items: center; border: 1.5px dashed #b9c2d059; border-radius: 10px; } .war-slot:not(.empty) { border: 1.5px solid #b9c2d059; } .war-slot.winner { border: 3px solid var(--amber); } .war-slot.war:not(.empty) { border-color: #d9674e; }
@keyframes flyFromTop { from { transform: translateY(-110px) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes flyFromBottom { from { transform: translateY(130px) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dealIn { from { transform: translateY(-110px) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.anim-from-top { animation: flyFromTop .4s cubic-bezier(.2,.9,.3,1.1) backwards; } .anim-from-bottom { animation: flyFromBottom .4s cubic-bezier(.2,.9,.3,1.1) backwards; }
.anim-deal { animation: dealIn .45s cubic-bezier(.2,.9,.3,1.1) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
@media (prefers-reduced-motion: reduce) { .anim-from-top, .anim-from-bottom, .anim-deal { animation: none; } }
