/* Meļi in-game screens (waiting room, table, pop-ups). Scoped to .meli so they cannot clash with the shared Duraks lobby styles. */
.meli {
  
  --felt: #235d7a;
  --felt-2: #143a4d;
  --felt-light: #2a6a88;
  --paper: #faf6ec;
  --ink: #1a1a1a;
  --muted: #a9c6d4;
  --gold: #e2c374;
  --gold-2: #c9a24b;
  --font-display: Georgia, 'Times New Roman', serif;
  --wood-1: #4a2f1b;
  --wood-2: #2b1a0f;
  --good: #3fa66b;
  --bad: #d9534f;
  --back-1: #3b3f8f;
  --back-2: #272a63;
  --spade: #14171a;
  --heart: #d6342c;
  --diamond: #d6342c;
  --club: #14171a;
  --card-w: 72.5px;
  --card-h: 102.5px;
}
.meli, .meli * { box-sizing: border-box; margin: 0; }
.meli .hidden { display: none !important; }
.meli button { font: inherit; cursor: pointer; }
.meli button:disabled { cursor: not-allowed; opacity: .45; }
.meli :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.meli .m-screen { min-height: 100%; display: flex; flex-direction: column; max-width: 920px; margin: 0 auto; padding: 12px 16px 16px; }
.meli .panel {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(201, 162, 75, 0.35);
  border-radius: 14px;
  padding: 24px 22px;
}
.meli #lobby { gap: 14px; }
.meli .brand { text-align: center; padding-top: 6px; }
.meli .brand h1 { font-family: var(--font-display); font-weight: 400; font-size: 2.6rem; letter-spacing: .02em; color: var(--paper); }
.meli .brand h1 .m-accent { color: var(--gold); }
.meli .brand .tag { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.meli .lobby-grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 14px; align-items: start; }
.meli .panel h2 { font-family: var(--font-display); font-weight: 400; color: var(--gold); font-size: 1.15rem; letter-spacing: .02em; margin-bottom: 4px; }
.meli .setup { display: grid; gap: 8px; }
.meli .m-field { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.meli .m-hint { color: var(--muted); font-size: .88rem; }
.meli .m-hint.center { text-align: center; }
.meli input#nameInput, .meli #pwInput {
  width: 100%; padding: 10px 12px; font: inherit; border-radius: 8px;
  border: 1px solid rgba(201, 162, 75, .3); background: rgba(255, 255, 255, .06); color: inherit;
}
.meli input#nameInput:focus, .meli #pwInput:focus { outline: none; border-color: var(--gold-2); }
.meli input#nameInput[readonly] { opacity: .85; border-style: dashed; }
.meli #pwInput { text-align: center; letter-spacing: .25em; text-transform: uppercase; font-weight: 700; }
.meli .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; border-radius: 8px; padding: 3px; background: rgba(255, 255, 255, .05); }
.meli .seg button {
  border: 0; background: transparent; color: var(--muted); padding: 9px 8px; border-radius: 6px; font-weight: 600; font-size: .9rem;
  transition: background .15s, color .15s; white-space: nowrap;
}
.meli .seg button:hover { color: var(--paper); }
.meli .seg button[aria-checked='true'] { background: var(--gold-2); color: #2a2005; }
.meli .open-games { min-height: 220px; }
.meli .panel-head { display: flex; justify-content: space-between; align-items: center; }
.meli .room-list { list-style: none; padding: 0; display: grid; gap: 8px; margin-top: 8px; }
.meli .room-list li {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(0, 0, 0, .22); border: 1px solid rgba(201, 162, 75, .3);
}
.meli .room-list .m-who { flex: 1; min-width: 0; }
.meli .room-list .m-who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meli .room-list .m-who small { color: var(--muted); }
.meli #roomEmpty { margin-top: 18px; }
.meli .howto { font-size: .92rem; color: var(--muted); }
.meli .howto summary { cursor: pointer; color: #eef4f7; }
.meli .howto ol { padding-left: 1.2rem; margin-top: 8px; display: grid; gap: 6px; }
.meli .howto b { color: var(--gold); }
.meli .invite-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 10px 14px; border-radius: 12px; background: rgba(201, 162, 75, .15); border: 1px solid var(--gold-2);
}
.meli #waiting { justify-content: center; }
.meli .m-waiting { max-width: 420px; width: 100%; margin: 0 auto; display: grid; gap: 12px; text-align: center; }
.meli .code-box { font-size: 2.6rem; font-weight: 800; letter-spacing: .3em; color: var(--gold); background: rgba(0, 0, 0, .4); border: 2px dashed var(--gold-2); border-radius: 12px; padding: 10px 0 10px .3em; }
.meli .code-box.m-small { font-size: 1.6rem; }
.meli .row-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.meli .dots { display: flex; gap: 6px; justify-content: center; }
.meli .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); animation: blink 1.2s infinite; }
.meli .dots i:nth-child(2) { animation-delay: .2s; }
.meli .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.meli button.primary, .meli button.danger, .meli button.gold, .meli button.ghost, .meli button.ghost-danger {
  border: 0; border-radius: 8px; padding: 12px 16px; font-weight: 600; font-size: .95rem; color: var(--paper);
  transition: transform .08s ease, filter .15s ease;
}
.meli button.primary:not(:disabled):active, .meli button.gold:not(:disabled):active, .meli button.ghost:not(:disabled):active, .meli button.danger:not(:disabled):active { transform: scale(.98); }
.meli button.m-small { padding: 5px 12px; font-size: .85rem; }
.meli button.primary, .meli button.gold { background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #2a2005; }
.meli button.danger { background: linear-gradient(180deg, #b23a3a, #8f2d2d); color: var(--paper); }
.meli button.ghost-danger { background: transparent; border: 1px solid rgba(217, 83, 79, .6); color: #ff9a96; }
.meli button.ghost-danger:not(:disabled):hover { background: rgba(178, 58, 58, .15); }
.meli button.ghost { background: transparent; border: 1px solid var(--gold-2); color: var(--gold); }
.meli button:not(:disabled):hover { filter: brightness(1.08); }
.meli .m-toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 200; max-width: min(92vw, 420px);
  background: #0b2230; color: #fff; border: 1px solid var(--gold-2); border-radius: 999px; padding: 8px 16px; text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .6);
}
.meli .topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 2px 10px; }
.meli .opp { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.meli .avatar { font-size: 1.5rem; }
.meli .count { font-weight: 400; color: var(--muted); }
.meli .count b { color: #fff; }
.meli .roundinfo { color: var(--muted); text-align: right; }
.meli .roundinfo b { color: #fff; }
.meli .lock {
  display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .2); color: #fff; font-weight: 700;
}
.meli .lock.on { border-color: var(--gold-2); }
.meli .table {
  position: relative; flex: 1; min-height: 340px; display: grid; place-items: center; align-content: center; gap: 10px;
  border-radius: 18px; border: 3px solid var(--gold-2); padding: 12px;
  background: radial-gradient(ellipse at 50% 40%, var(--felt-light) 0%, var(--felt-2) 100%);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .5), 0 4px 12px rgba(0, 0, 0, .4);
}
.meli .pile { position: relative; width: calc(var(--card-w) * 1.5); height: calc(var(--card-h) * 1.5); }
.meli .pile .empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: .9rem; padding: 8px; }
.meli .back {
  position: absolute; width: calc(var(--card-w) * 1.5); height: calc(var(--card-h) * 1.5);
  background: url('/images/trump-stack.webp') center / 100% 100% no-repeat;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .55));
}
.meli .pile.has-claim { margin-bottom: 150px; }
.meli .badge {
  position: absolute; left: 50%; top: 100%; margin-top: 12px; transform: translateX(-50%); white-space: nowrap;
  display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 5;
}
.meli .badge small {
  background: var(--paper); color: #444; border: 2px solid var(--gold); border-radius: 999px;
  padding: 2px 12px; font-weight: 700; font-size: .95rem; box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
/* the announced suit (or card), 5x the label size */
.meli .badge .sym {
  font-size: 4.75rem; line-height: 1; font-weight: 800; padding: 4px 18px 8px; border-radius: 14px;
  background: var(--paper); border: 2px solid var(--gold); box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
.meli .badge .sym[data-suit='♠'] { color: var(--spade); }
.meli .badge .sym[data-suit='♥'] { color: var(--heart); }
.meli .badge .sym[data-suit='♦'] { color: var(--diamond); }
.meli .badge .sym[data-suit='♣'] { color: var(--club); }
.meli .pile-count {
  position: absolute; top: -10px; right: -10px; z-index: 5; min-width: 28px; height: 28px; padding: 0 6px;
  display: grid; place-items: center; border-radius: 999px; background: var(--gold); color: #222; font-weight: 800;
}
.meli .claims { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; min-height: 26px; }
.meli .chip { background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .15); border-radius: 999px; padding: 2px 10px; font-size: .85rem; }
.meli .chip.you { border-color: #7fd1a3; }
.meli .chip.opp { border-color: #e9a0a0; }
.meli .reveal {
  position: absolute; inset: 8px; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center;
  background: rgba(10, 33, 45, .95); border-radius: 14px; z-index: 10; padding: 12px; animation: pop .25s ease-out;
}
.meli .reveal .pair { display: flex; gap: 18px; align-items: end; }
.meli .reveal .lab { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.meli .reveal .verdict { font-weight: 800; font-size: 1.15rem; }
.meli .reveal .verdict.good { color: #7fe0a8; }
.meli .reveal .verdict.bad { color: #ff9a96; }
.meli .reveal .sub { color: var(--muted); font-size: .95rem; }
.meli .reveal button { background: none; border: 1px solid rgba(255, 255, 255, .3); color: #eee; border-radius: 8px; padding: 4px 12px; font-size: .85rem; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes flip { from { transform: rotateY(90deg); } to { transform: none; } }
.meli .reveal .actual { animation: flip .5s .15s backwards; }
.meli .status { min-height: 2.6em; padding: 10px 4px 6px; text-align: center; color: #dfebf1; }
.meli .m-card {
  position: relative; flex: none; width: var(--card-w); height: var(--card-h); border-radius: 7px; background-color: var(--paper); color: var(--ink);
  border: 1px solid rgba(0, 0, 0, .3); display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; user-select: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .4); padding: 0; line-height: 1.1;
}
.meli .m-card.big { --card-w: 97.5px; --card-h: 137.5px; font-size: 1.5rem; }
.meli .m-card[data-suit='♠'] { color: var(--spade); }
.meli .m-card[data-suit='♥'] { color: var(--heart); }
.meli .m-card[data-suit='♦'] { color: var(--diamond); }
.meli .m-card[data-suit='♣'] { color: var(--club); }
.meli .m-card .suit { display: block; font-size: 1.3em; text-align: center; }
.meli .m-card .any { font-size: .55em; font-weight: 700; color: #777; letter-spacing: .04em; text-transform: uppercase; }
.meli .me { display: grid; gap: 8px; }
.meli .me-label { text-align: center; color: var(--muted); font-size: .9rem; }
.meli .me-label b { color: #fff; }
.meli .fan { min-height: calc(var(--card-h) + 26px); display: flex; justify-content: center; align-items: flex-end; padding-top: 18px; }
.meli .fan .m-hint { align-self: center; color: var(--muted); }
.meli .fan-row { display: flex; justify-content: center; max-width: 100%; padding: 0 8px; }
.meli .fan-row .m-card { margin-left: -22px; transition: transform .12s; cursor: default; }
.meli .fan-row .m-card:first-child { margin-left: 0; }
.meli .fan-row .m-card.m-playable { cursor: pointer; }
.meli .fan-row .m-card.m-playable:hover, .meli .fan-row .m-card.m-playable:focus-visible { transform: translateY(-14px); z-index: 20; }
.meli .fan-row .m-card.m-selected { transform: translateY(-24px); z-index: 30; border-color: #fff; box-shadow: 0 0 0 3px var(--gold-2), 0 6px 14px rgba(0, 0, 0, .6); }
.meli .fan-row .m-card .tick { position: absolute; top: 2px; right: 4px; font-size: .7rem; color: var(--good); }
.meli .suits { display: flex; justify-content: center; gap: 10px; }
.meli .suit-btn {
  position: relative; width: 64px; height: 56px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .25);
  background: var(--paper); font-size: 3rem; line-height: 1; padding-bottom: 4px; display: grid; place-items: center;
}
.meli .suit-btn[data-suit='♠'] { color: var(--spade); }
.meli .suit-btn[data-suit='♥'] { color: var(--heart); }
.meli .suit-btn[data-suit='♦'] { color: var(--diamond); }
.meli .suit-btn[data-suit='♣'] { color: var(--club); }
.meli .suit-btn.m-active { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 75, .5); transform: translateY(-3px); }
.meli .suit-btn.locked::after { content: '🔒'; position: absolute; top: -9px; left: -7px; font-size: .8rem; }
.meli .suit-btn .n {
  position: absolute; bottom: -7px; right: -7px; min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center;
  border-radius: 999px; background: #1c2f3a; color: #fff; font-size: .75rem; font-weight: 700; border: 1px solid rgba(255, 255, 255, .3);
}
.meli .actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.meli .actions button { min-width: 150px; }
.meli .claim-panel { display: grid; gap: 8px; padding: 12px; }
.meli .claim-panel .line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.meli .claim-panel .row { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.meli .opt {
  min-width: 38px; padding: 6px 8px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08); color: #fff; font-weight: 700;
}
.meli .opt.on { background: var(--gold); color: #222; border-color: var(--gold); }
.meli .opt.used { text-decoration: line-through; opacity: .55; }
.meli .opt.s-red { color: #ff9a96; }
.meli .opt.on.s-red { color: #7a1511; }
.meli .verdict-pill { padding: 2px 10px; border-radius: 999px; font-weight: 800; font-size: .85rem; }
.meli .verdict-pill.truth { background: rgba(63, 166, 107, .25); color: #86e3ae; border: 1px solid var(--good); }
.meli .verdict-pill.bluff { background: rgba(217, 83, 79, .25); color: #ffaaa6; border: 1px solid var(--bad); }
.meli .m-modal { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .65); z-index: 100; padding: 16px; }
.meli .m-modal .panel { text-align: center; display: grid; gap: 12px; max-width: 380px; width: 100%; }
.meli .m-modal h2 { font-size: 1.8rem; }
.meli .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 6px var(--good); }
.meli .dot.off { background: var(--bad); box-shadow: 0 0 6px var(--bad); animation: blink 1s infinite; }
.meli .timer { display: inline-block; min-width: 3.2em; padding: 2px 8px; margin-right: 8px; border-radius: 999px; background: rgba(0, 0, 0, .4); border: 1px solid var(--gold-2); color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.meli .timer.mine { border-color: var(--gold); color: var(--gold); }
.meli .timer.low { background: var(--bad); border-color: var(--bad); color: #fff; }
.meli .roundinfo { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.meli .roundinfo .ghost { margin-left: 8px; }
.meli .m-modal .panel > * + * { margin-top: 0; }
@media (max-width: 760px) {
.meli .lobby-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
.meli { --card-w: 62.5px; --card-h: 90px; }
.meli .fan-row .m-card { margin-left: -26px; }
.meli .suit-btn { width: 56px; height: 50px; font-size: 2.55rem; }
.meli .actions button { flex: 1; min-width: 0; }
.meli .lobby h1 { font-size: 2.2rem; }
}
@media (prefers-reduced-motion: reduce) {
.meli, .meli * { animation: none !important; transition: none !important; }
}
.meli { color: var(--paper); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* waiting room + table fill the page; the lobby (Duraks styles) lives outside .meli */
.meli-stage { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.meli-stage .m-screen { flex: 1; width: 100%; }

/* Meļi-only bits of the (otherwise Duraks-styled) lobby */
.invite-bar {
  display: flex; flex-direction: column; gap: 8px; margin: 14px 0;
  padding: 12px 14px; border-radius: 12px; background: rgba(201, 162, 75, .15); border: 1px solid #c9a24b;
}
.invite-bar .btn { margin: 0; }
.lobby-howto {
  width: 100%; max-width: 1180px; margin: 24px auto 0; padding: 14px 20px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(201, 162, 75, 0.35); color: #a9c6d4; font-size: .92rem; text-align: left;
}
.lobby-howto summary { cursor: pointer; color: #eef4f7; }
.lobby-howto ol { padding-left: 1.2rem; margin: 10px 0 0; display: grid; gap: 6px; }
.lobby-howto b { color: #e2c374; }
#lobby.screen { flex-direction: column; align-items: center; }
.meli .m-modal .panel { background: linear-gradient(180deg, #2a6a88, #143a4d); border-color: rgba(201, 162, 75, 0.6); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6); }

/* Corner menu with the hold-to-surrender button (styles shared from /multi.css) */
.meli #game { position: relative; }
.meli #game .multi-sheet { top: 48px; }
.meli .roundinfo .multi-menu-btn { padding: 2px 12px; }
.meli .multi-hold span:last-child { position: relative; }
/* Card design picker under my hand */
.meli .deck-pick { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* ---------- two-tap hand (Nov 2026) ---------- */
.meli .m-tbar { height: 4px; border-radius: 99px; background: rgba(0, 0, 0, .35); overflow: hidden; margin: -4px 2px 8px; }
.meli .m-tbar i { display: block; height: 100%; border-radius: 99px; }
.meli .m-tbar.low { animation: m-pulse-bar .6s ease-in-out infinite; }
@keyframes m-pulse-bar { 50% { box-shadow: 0 0 0 3px rgba(230, 70, 50, .45); } }
.meli .m-actbar { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.meli .m-meli {
  font: inherit; font-weight: 800; font-size: 1.15rem; letter-spacing: .05em; color: #fff; background: #c0392b; border: 0; border-radius: 12px;
  padding: 10px 42px; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); animation: m-pulse 1.4s ease-in-out infinite;
}
@keyframes m-pulse { 50% { box-shadow: 0 0 0 7px rgba(192, 57, 43, .35), 0 4px 12px rgba(0, 0, 0, .35); } }
.meli .m-announce { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.meli .m-ann {
  font: inherit; font-size: 1.5rem; line-height: 1; width: 54px; height: 46px; border-radius: 10px; border: 2px solid var(--gold-2);
  background: var(--paper); color: var(--ink); cursor: pointer; display: grid; place-items: center; padding: 0;
}
.meli .m-ann[data-suit='♥'], .meli .m-ann[data-suit='♦'] { color: var(--heart); }
.meli .m-ann.real { box-shadow: 0 0 0 3px var(--good); }
.meli .m-ann.on { border-color: var(--gold); background: #fff3cf; }
.meli .m-announce.ranks .m-ann { width: 38px; height: 38px; font-size: 1rem; font-weight: 800; }
.meli .m-ann.used { opacity: .45; }
.meli .m-ann:focus-visible, .meli .m-meli:focus-visible, .meli .m-stack:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.meli .fan { padding-top: 46px; }
.meli .fan-row { align-items: flex-end; }
.meli .fan-row .m-card.m-off { filter: brightness(.62); }
.meli .fan-row .m-card .m-mark {
  position: absolute; left: 5px; bottom: -8px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #fff; z-index: 2;
}
.meli .fan-row .m-card .m-mark.t { background: #2e8b57; }
.meli .fan-row .m-card .m-mark.f { background: #c0392b; }
.meli .fan-row .m-card .m-bubble {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--paper); color: var(--ink);
  border: 2px solid var(--gold-2); border-radius: 9px; padding: 3px 9px; font-size: .78rem; font-weight: 800; white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35); z-index: 40; pointer-events: none;
}
.meli .fan-row .m-card .m-bubble::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--gold-2); }
.meli .m-stack { position: relative; flex: none; width: calc(var(--card-w) * .55); height: calc(var(--card-h) * .55); margin-left: 10px; align-self: center; border: 0; padding: 0; background: none; cursor: pointer; }
.meli .m-stack .m-card { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; }
.meli .m-stack .m-card + .m-card { transform: translate(3px, -3px); }
.meli .m-stack b { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); background: #0b2230; color: #fff; border-radius: 99px; padding: 0 6px; font-size: .72rem; white-space: nowrap; z-index: 2; }
.meli .m-handhint { min-height: 1.3em; text-align: center; font-size: .82rem; color: var(--muted); margin: 0; }
.meli .reveal { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .meli .m-meli, .meli .m-tbar.low { animation: none; } }
/* the hand row measures its own width: keep grid/flex parents from growing to fit it */
.meli .me { grid-template-columns: minmax(0, 1fr); }
.meli .fan { min-width: 0; }
.meli .roundinfo { flex-wrap: nowrap; }
@media (max-width: 560px) {
  .meli .topbar { gap: 6px; }
  .meli .topbar .opp { min-width: 0; flex-wrap: wrap; row-gap: 0; }
  .meli .roundinfo .ghost { margin-left: 2px; }
  .meli .roundinfo .timer { display: none; } /* the bar under the top row shows the time */
}
.meli .lock { white-space: nowrap; }
/* keep the bubble on screen for the outermost cards */
.meli .fan-row > .m-card:first-child .m-bubble { left: 0; transform: none; }
.meli .fan-row > .m-card:first-child .m-bubble::after { left: 24px; }
.meli .fan-row > .m-card:last-child .m-bubble { left: auto; right: 0; transform: none; }
.meli .fan-row > .m-card:last-child .m-bubble::after { left: auto; right: 18px; transform: none; }

/* ---------- 2–6 players: Duraks round table (Nov 2026) ----------
   The table itself comes from /multi.css (#multiGame, #multiTableFelt, .multi-seat…); these are the
   Meļi-only pieces: the pile in the middle, the claimed-suit card, the hand on the table. */
.meli #multiGame {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: calc(var(--app-vh, 1vh) * 100);
  display: flex;
  flex-direction: column;
}
.meli #multiTableFelt .table-wood {
  width: min(100%, 1280px, calc((var(--app-vh, 1vh) * 100 - 205px) * 1.5));
}
.meli .multi-topline { padding: 8px 12px 0; }
.meli .multi-sheet button { width: 100%; }

/* the pile: face down, only the count shows */
.meli .m-pile { position: relative; width: 8.4cqw; aspect-ratio: 84 / 122; }
.meli .m-pile .back { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 6px; }
.meli .m-pile .pile-count { top: -1cqw; right: -1.4cqw; min-width: 2.6cqw; height: 2.6cqw; font-size: clamp(11px, 1.4cqw, 16px); }
.meli .m-pile-empty {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  border: 2px dashed rgba(250, 246, 236, 0.25); border-radius: 8px; color: #cfe0e8; font-size: clamp(10px, 1.2cqw, 13px);
}
.meli .m-pile-cap {
  position: absolute; left: 50%; top: calc(100% + 1cqw); transform: translateX(-50%); white-space: nowrap;
  font-size: clamp(10px, 1.25cqw, 14px); color: #e8f1f5;
}
.meli .m-pile-cap b { color: var(--gold); }

/* the claimed suit: the Duraks empty-deck trump card, labelled "apgalvots" */
.meli .m-claim .deck-last-chip { display: block; }

/* my hand lies on the table, under my name (like the Duraks hand) */
.meli .m-fan-onboard {
  --card-w: 9.2cqw;
  --card-h: calc(var(--card-w) * 1.4);
  position: absolute;
  left: 17%;
  right: 17%;
  bottom: 1.2%;
  z-index: 4;
  min-height: 0;
  padding-top: 0;
  align-items: flex-end;
}
.meli .m-fan-onboard .m-hint { color: #cfe0e8; }
.meli .m-fan-onboard .m-card { border-radius: 6px; }

/* the reveal sits over the middle of the table */
.meli #multiGame .reveal { inset: 8% 14% 6%; }

/* under the table: "Neticu!", the suits to announce, the chat */
.meli .m-action-row { align-items: center; flex-wrap: wrap; gap: 10px; padding: 6px 12px 4px; }
.meli .m-action-row .m-actbar { flex-direction: row; flex-wrap: wrap; min-height: 46px; }
.meli .m-action-row .chat-toggle { flex: 0 0 auto; width: auto; max-width: 180px; padding: 10px 18px; font-weight: 600; font-size: .95rem; }
.meli .m-handhint { padding: 0 12px; }
.meli .game-prefs-row { padding-bottom: 8px; font-size: .8rem; color: var(--muted); }
.meli .game-prefs-row label { display: flex; align-items: center; gap: 8px; }

@media (max-width: 700px), (max-aspect-ratio: 1/1) {
  .meli #multiTableFelt .table-wood { width: min(100%, calc((var(--app-vh, 1vh) * 100 - 215px) / 1.35)); }
  .meli .m-fan-onboard { --card-w: 14.5cqw; left: 2%; right: 2%; }
  .meli .m-pile { width: 14cqw; }
  .meli .m-pile .pile-count { min-width: 5cqw; height: 5cqw; font-size: 3cqw; }
  .meli .m-pile-cap { font-size: 2.9cqw; }
  .meli .m-pile-empty { font-size: 2.8cqw; }
  .meli #multiGame .reveal { inset: 6% 3% 4%; }
}

/* ---------- lobby: waiting box with the early-start "ready" check ---------- */
.wait-names { list-style: none; margin: 6px auto 8px; padding: 0; display: grid; gap: 4px; max-width: 300px; text-align: left; }
.wait-names li { display: flex; justify-content: space-between; gap: 10px; font-size: .85rem; padding: 4px 10px; border-radius: 8px; background: rgba(255, 255, 255, .05); }
.wait-names li .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wait-names li .tick { color: #93c4d9; font-size: .8rem; white-space: nowrap; }
.wait-names li.is-ready { background: rgba(63, 166, 107, .16); }
.wait-names li.is-ready .tick { color: #86e3ae; font-weight: 700; }
.multi-silhouette.is-ready { position: relative; }
.multi-silhouette.is-ready::after {
  content: '✓'; position: absolute; right: -4px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%;
  background: #2e8b57; color: #fff; font-size: 10px; line-height: 14px; text-align: center; font-weight: 900;
}
.ready-box { margin: 10px 0; display: grid; gap: 6px; }
.ready-box .ready-btn { margin: 0; }
#waitBox .btn { margin-top: 8px; }

/* 5–6 players: two seats on each side, spread wider than the Duraks 3–4 player spots */
.meli .multi-seat.seat-l6  { left: 8%;  top: 55%; }
.meli .multi-seat.seat-r6  { left: 92%; top: 55%; }
.meli .multi-seat.seat-tl6 { left: 22%; top: 15%; }
.meli .multi-seat.seat-tr6 { left: 78%; top: 15%; }
@media (max-width: 700px), (max-aspect-ratio: 1/1) {
  .meli .multi-seat.seat-l6  { left: 14%; top: 47%; }
  .meli .multi-seat.seat-r6  { left: 86%; top: 47%; }
  .meli .multi-seat.seat-tl6 { left: 17%; top: 23%; }
  .meli .multi-seat.seat-tr6 { left: 83%; top: 23%; }
}

/* create pop-up: up to 6 player / computer buttons always on one row (the shared min-width wrapped the 6th) */
#setupModal .btn-group { flex-wrap: nowrap; }
#setupModal .btn-option { min-width: 0; padding-left: 4px; padding-right: 4px; }
