/* «خلّصها» — a night majlis: a mud wall with Najdi teeth, a lamp's warm light, a Sadu rug on the floor, cushions behind
   the players, the dallah and an incense burner; the cards drawn in SVG (game.js). One deliberate dark look. */
:root {
  --night: #140B08; --night2: #1E120C; --ink: #FFF6E6; --muted: #D9C3A5; --dim: #A58C70;
  --gold: #E8B84A; --gold2: #FFE3A0; --gold3: #A8761E; --cream: #FBF3E4; --coffee: #2A1608;
  --r: #E2402F; --y: #F5B10C; --g: #22A35A; --b: #2F7FE6; --rc: #E8B84A;
  --cw: 78px; --ch: calc(var(--cw) * 1.5); --pw: calc(var(--cw) * 1.1); --av: 54px; --fw: 22px;
  --hand-h: 150px; --me-h: 58px; --top-h: 56px; --center-top: 200px; --center-h: 240px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--night); color: var(--ink); overflow: hidden; }
body { font-family: "Readex Pro", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; touch-action: manipulation; overscroll-behavior: none; }
button { font-family: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--gold2); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.kh { position: fixed; inset: 0; overflow: hidden; }
#safeProbe { position: fixed; top: 0; left: 0; width: 0; height: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); visibility: hidden; pointer-events: none; }

/* ---------- the majlis ---------- */
#scene { position: absolute; inset: 0; background:
  radial-gradient(130% 60% at 50% 0%, rgba(255, 168, 82, .2), transparent 62%),
  radial-gradient(100% 55% at 50% 108%, rgba(110, 36, 18, .38), transparent 70%),
  linear-gradient(#26150D, #150C08 55%, #100806); }
.wall { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--top-h) + var(--safe-t) + 4px);
  background: radial-gradient(60% 140% at 50% 0%, rgba(255, 190, 120, .2), transparent 70%), linear-gradient(#6A4630, #4B2F1F 70%, #3B2418);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .55); }
.wall::before { content: ""; position: absolute; inset: 0; opacity: .25;
  background-image: radial-gradient(rgba(0, 0, 0, .35) 1px, transparent 1.4px), radial-gradient(rgba(255, 230, 190, .18) 1px, transparent 1.6px);
  background-size: 7px 9px, 11px 7px; background-position: 0 0, 3px 4px; }
.wall::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 13px; background-repeat: repeat-x; background-size: 18px 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='13'%3E%3Cpath d='M0 13L9 1.5L18 13Z' fill='%23EADBC0'/%3E%3Cpath d='M6.6 13L9 9.4L11.4 13Z' fill='%234B2F1F'/%3E%3C/svg%3E"); }
.lamp { position: absolute; left: 50%; top: -140px; width: 620px; height: 480px; margin-left: -310px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 186, 104, .3), rgba(255, 150, 70, .08) 55%, transparent); animation: flick 3.4s ease-in-out infinite; }
@keyframes flick { 0%, 100% { opacity: .9; } 38% { opacity: 1; } 52% { opacity: .78; } 70% { opacity: .96; } }
.rug { position: absolute; background-size: 100% 100%; background-repeat: no-repeat; border-radius: 4px;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .65)); }
.rug::after { content: ""; position: absolute; inset: 0; border-radius: 4px; pointer-events: none;
  background: radial-gradient(75% 60% at 50% 45%, transparent 40%, rgba(10, 4, 2, .42)), radial-gradient(40% 30% at 50% 45%, rgba(255, 190, 110, .12), transparent); }
.deco { position: absolute; pointer-events: none; background-size: contain; background-repeat: no-repeat; background-position: center bottom; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .5)); }
.deco-b .smoke { position: absolute; left: 46%; bottom: 62%; width: 14px; height: 40px; border-radius: 50%; background: radial-gradient(closest-side, rgba(235, 225, 210, .38), transparent);
  filter: blur(4px); animation: smoke 4.6s ease-out infinite; opacity: 0; }
.deco-b .smoke.s2 { animation-delay: 1.5s; left: 40%; }
.deco-b .smoke.s3 { animation-delay: 3s; left: 52%; }
@keyframes smoke { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 15% { opacity: .9; } 100% { transform: translate(-14px, -120px) scale(2.2, 2.8); opacity: 0; } }

/* ---------- the top bar ---------- */
#bar { position: absolute; top: var(--safe-t); left: 0; right: 0; height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 12px; z-index: 55; pointer-events: none; }
#bar > * { pointer-events: auto; }
.at-menu #menuBtn, .at-menu #lvlTag, .at-menu .brand, .at-menu #scoreChip, .at-menu #me { visibility: hidden; }
.brand { font: 26px/1 Lalezar, "Readex Pro", sans-serif; letter-spacing: .5px; color: var(--gold2); text-shadow: 0 2px 0 #3a1f0c, 0 0 18px rgba(255, 200, 100, .35); }
.lvl-tag { font-size: 12px; color: #F3E3C8; background: rgba(20, 11, 8, .62); padding: 3px 10px; border-radius: 10px; margin-inline-start: auto; white-space: nowrap; }
.ic { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(232, 184, 74, .35); background: rgba(20, 11, 8, .55); display: grid; place-items: center; padding: 0; flex: none; }
.ic svg { width: 22px; height: 22px; fill: none; stroke: var(--gold2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic .spk { fill: var(--gold2); stroke: none; }
#soundBtn[aria-pressed="true"] .off, #soundBtn[aria-pressed="false"] .on { display: none; }

/* the avatar studio's layers (as in the site's styles.css), for your MODTV avatar */
.av2 { position: absolute; inset: 0; display: block; overflow: hidden; border-radius: 50%; container-type: inline-size; }
.av2-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av2::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 30% 0%, rgba(255, 255, 255, .26), transparent 55%); pointer-events: none; }
.av2-in { position: absolute; inset: 6%; display: block; }
.av2-b { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2.5cqw 2.5cqw rgba(0, 0, 0, .32)); }
.av2-acc { position: absolute; object-fit: contain; filter: drop-shadow(0 1cqw 1.4cqw rgba(0, 0, 0, .3)); }
.av2-badge { position: absolute; inset-inline-end: 3%; bottom: 3%; width: 38%; height: 38%; border-radius: 50%; background: rgba(10, 13, 19, .72); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); display: grid; place-items: center; z-index: 1; }
.av2-badge img { width: 76%; height: 76%; object-fit: contain; }
.av2 img { background: none; border-radius: 0; max-width: none; }
.av2-sp, .av2-talk { display: none; }
.seat .av > .av2 { inset: 3px; width: auto; height: auto; }
.who button { position: relative; }
.who button > .av2 { inset: 3px; width: auto; height: auto; }
.over-av { position: relative; }
.over-av > .av2 { inset: 4px; width: auto; height: auto; }
.over-list .oa { position: relative; }

/* ---------- seats ---------- */
#seats { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.seat { position: absolute; display: flex; flex-direction: column; align-items: center; width: 116px; text-align: center; pointer-events: auto; }
.seat .cush { position: absolute; top: calc(var(--av) * .3); left: 50%; width: calc(var(--av) * 2.15); height: calc(var(--av) * .8); transform: translateX(-50%); z-index: -1;
  background-size: 100% 100%; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .5)); }
.seat .av { position: relative; width: var(--av); height: var(--av); border-radius: 50%; padding: 3px; flex: none;
  background: linear-gradient(145deg, #FFE3A0, #B07A20 60%, #6E4710); box-shadow: 0 6px 14px rgba(0, 0, 0, .55); transition: box-shadow .3s; }
.seat .av > svg.robot { display: block; width: 100%; height: 100%; border-radius: 50%; }
.seat .av > img, .seat .av > .av2 { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: radial-gradient(circle at 50% 35%, #5a3a26, #22140c); }
.seat .av > .av2 { overflow: hidden; }
.seat.turn .av { box-shadow: 0 0 0 3px var(--gold2), 0 0 28px 8px rgba(255, 200, 90, .55); animation: turnGlow 1.3s ease-in-out infinite; }
@keyframes turnGlow { 50% { box-shadow: 0 0 0 3px var(--gold2), 0 0 14px 3px rgba(255, 200, 90, .35); } }
.seat .cnt { position: absolute; bottom: -5px; left: -7px; min-width: 27px; height: 27px; padding: 0 6px; border-radius: 14px; background: #1E120C; border: 2px solid var(--gold);
  font: 17px/23px Lalezar, sans-serif; color: var(--gold2); text-align: center; box-shadow: 0 3px 6px rgba(0, 0, 0, .5); }
.seat .cnt.one { background: #B3261A; border-color: #FFB4A0; color: #fff; animation: pop .5s; }
.seat .nm { margin-top: 5px; font-weight: 600; font-size: 13px; line-height: 1.2; text-shadow: 0 1px 3px #000; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.seat .tag { font-size: 10.5px; color: var(--muted); background: rgba(0, 0, 0, .4); padding: 1px 8px; border-radius: 8px; margin-top: 2px; white-space: nowrap; }
.seat .fan { position: relative; width: calc(var(--fw) * 4); height: calc(var(--fw) * 1.5); margin-top: 6px; }
.seat .fan i { position: absolute; left: 50%; top: 0; width: var(--fw); height: calc(var(--fw) * 1.5); margin-left: calc(var(--fw) / -2); transform-origin: 50% 110%; }
.seat .fan svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.seat .think { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); display: none; gap: 4px; background: rgba(251, 243, 228, .95); padding: 5px 8px; border-radius: 12px; z-index: 5; }
.seat .think b { width: 6px; height: 6px; border-radius: 50%; background: #6b4a2e; animation: dot 1s infinite; }
.seat .think b:nth-child(2) { animation-delay: .15s; } .seat .think b:nth-child(3) { animation-delay: .3s; }
.seat.thinking .think { display: flex; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.seat .bub { position: absolute; top: calc(var(--av) + 2px); left: 50%; transform: translateX(-50%); z-index: 8; background: var(--cream); color: #2A1A10; font-weight: 600; font-size: 14px;
  padding: 6px 12px; border-radius: 14px; white-space: nowrap; box-shadow: 0 8px 20px rgba(0, 0, 0, .45); animation: bub .28s cubic-bezier(.2, 1.4, .4, 1); pointer-events: none; }
.seat .bub::before { content: ""; position: absolute; top: -6px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top: 0; border-bottom-color: var(--cream); }
.seat .bub.emo { font-size: 28px; padding: 2px 10px; line-height: 1.3; }
.seat .bub.call { background: linear-gradient(#FFE3A0, #E8B84A); font: 18px/1.2 Lalezar, sans-serif; padding: 6px 14px; }
.seat .bub.call::before { border-bottom-color: #FFE3A0; }
.seat .bub.hit { background: #FFE1DA; }
.seat .bub.out { animation: bubOut .25s forwards; }
@keyframes bub { from { transform: translateX(-50%) scale(.4); opacity: 0; } }
@keyframes bubOut { to { transform: translateX(-50%) scale(.6); opacity: 0; } }
.seat .catch { position: absolute; top: calc(var(--av) * .1); left: 50%; transform: translateX(-50%); z-index: 9; border: 0; border-radius: 14px; padding: 6px 12px 4px;
  background: linear-gradient(#FF7A5C, #D42F1C); color: #fff; font: 17px/1.1 Lalezar, sans-serif; box-shadow: 0 4px 0 #7a1a10, 0 10px 22px rgba(0, 0, 0, .5); white-space: nowrap; animation: wiggle .55s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: translateX(-50%) rotate(-5deg) scale(1); } 50% { transform: translateX(-50%) rotate(5deg) scale(1.08); } }
.seat .stamp { position: absolute; top: 0; left: 50%; width: var(--av); height: var(--av); margin-left: calc(var(--av) / -2); display: grid; place-items: center; z-index: 7; pointer-events: none; animation: stamp .9s forwards; }
.seat .stamp svg { width: 86%; height: 86%; }
@keyframes stamp { 0% { transform: scale(2); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 75% { opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
.seat.shake { animation: shake .45s; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* my seat: beside the buttons, above the hand */
#me { position: absolute; left: 0; right: 0; bottom: calc(var(--hand-h) + var(--safe-b)); height: var(--me-h); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; z-index: 20; }
.me-seat { position: relative; flex-direction: row; width: auto; gap: 8px; --av: 46px; }
.me-seat .who-t { display: flex; flex-direction: column; align-items: flex-start; }
.me-seat .nm { margin: 0; }
.me-seat .bub { top: auto; bottom: calc(100% + 8px); left: auto; right: 0; transform: none; animation-name: bubMe; transform-origin: calc(100% - 23px) 100%; }
.me-seat .bub::before { top: auto; bottom: -6px; left: auto; right: 17px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--cream); }
.me-seat .bub.call::before { border-top-color: #E8B84A; }
@keyframes bubMe { from { transform: scale(.4); opacity: 0; } }
.me-seat .bub.out { animation: bubOutMe .25s forwards; }
@keyframes bubOutMe { to { transform: scale(.6); opacity: 0; } }
.me-seat .stamp { left: 0; margin: 0; }
.your-turn { font: 15px/1 Lalezar, sans-serif; color: var(--coffee); background: linear-gradient(#FFE3A0, #E8B84A); padding: 5px 10px 3px; border-radius: 10px; display: none; }
.me-seat.turn .your-turn { display: inline-block; animation: pop .4s; }
.acts { display: flex; align-items: center; gap: 8px; }
.call-btn { border: 0; border-radius: 15px; padding: 9px 12px 6px; font: 18px/1.1 Lalezar, sans-serif; color: #fff; background: linear-gradient(#FF7A5C, #C9301E);
  box-shadow: 0 4px 0 #7a1a10, 0 8px 18px rgba(0, 0, 0, .45); transition: transform .12s, filter .2s; white-space: nowrap; }
.call-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #7a1a10; }
.call-btn:disabled { background: rgba(60, 40, 30, .8); color: rgba(255, 230, 200, .35); box-shadow: none; cursor: default; }
.call-btn.ready { animation: ready 1.1s ease-in-out infinite; }
.call-btn.hot { animation: hot .5s ease-in-out infinite; }
@keyframes ready { 50% { transform: scale(1.06); filter: brightness(1.15); } }
@keyframes hot { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.12) rotate(2deg); filter: brightness(1.25); } }
.pass-btn { border: 0; border-radius: 15px; padding: 9px 16px 7px; font: 600 15px/1.1 "Readex Pro", sans-serif; color: var(--coffee); background: var(--cream); box-shadow: 0 4px 0 #9d8a70, 0 8px 18px rgba(0, 0, 0, .4); animation: pop .3s; }
.react-btn { font-size: 21px; }

/* ---------- the middle: deck, table pile, direction ring ---------- */
#center { position: absolute; left: 0; right: 0; top: var(--center-top); height: var(--center-h); display: flex; align-items: center; justify-content: center; gap: calc(var(--cw) * .5); z-index: 5; }
#ring { position: absolute; left: 50%; top: 50%; width: calc(var(--pw) * 3.9); height: calc(var(--pw) * 2.35); transform: translate(-50%, -50%); overflow: visible; pointer-events: none; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
#ring ellipse { fill: none; stroke: var(--rc); stroke-width: 2.6; stroke-dasharray: 9 13; opacity: .75; animation: flow 1.8s linear infinite; filter: drop-shadow(0 0 6px var(--rc)); transition: stroke .4s; }
#ring .arrows path { fill: var(--rc); opacity: .9; transition: fill .4s; }
#ring.ccw { transform: translate(-50%, -50%) scaleX(-1); }
@keyframes flow { to { stroke-dashoffset: -44; } }
#deck { position: relative; width: var(--cw); height: var(--ch); border: 0; padding: 0; background: none; border-radius: 10px; flex: none; }
#deck .stack { position: absolute; inset: 0; }
#deck .stack i { position: absolute; inset: 0; }
#deck .stack svg { display: block; width: 100%; height: 100%; }
#deck .stack i:nth-child(1) { transform: translate(4px, 5px); filter: brightness(.55); }
#deck .stack i:nth-child(2) { transform: translate(2px, 2.5px); filter: brightness(.75); }
#deck .stack i:nth-child(3) { filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .5)); }
#deck.can .stack i:nth-child(3) { animation: deckCall 1.1s ease-in-out infinite; }
@keyframes deckCall { 50% { transform: translateY(-6px); filter: drop-shadow(0 0 14px rgba(255, 210, 120, .85)) drop-shadow(0 10px 12px rgba(0, 0, 0, .5)); } }
#deckN { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; background: rgba(20, 11, 8, .78); padding: 2px 9px; border-radius: 9px; }
#pile { position: relative; width: var(--pw); height: calc(var(--pw) * 1.5); flex: none; }
#pile .pc { position: absolute; inset: 0; }
#pile .pc svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
#pile .pc.land { animation: land .32s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes land { from { scale: 1.08; } }
.color-chip { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 10px; border-radius: 14px;
  background: rgba(20, 11, 8, .85); border: 1.5px solid var(--rc); font-size: 13px; font-weight: 600; white-space: nowrap; animation: pop .35s; }
.color-chip i { width: 14px; height: 14px; transform: rotate(45deg); border-radius: 3px; background: var(--rc); box-shadow: 0 0 8px var(--rc); }

/* ---------- my hand ---------- */
#hand { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--hand-h) + var(--safe-b)); padding-bottom: var(--safe-b); overflow-x: auto; overflow-y: hidden; direction: ltr;
  scrollbar-width: none; z-index: 15; -webkit-overflow-scrolling: touch; }
#hand::-webkit-scrollbar { display: none; }
#hand .spacer { height: 1px; pointer-events: none; }
#hand .hc { position: absolute; left: 0; top: 26px; width: var(--cw); height: var(--ch); border: 0; padding: 0; background: none; border-radius: 9px;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1); transform-origin: 50% 100%; }
#hand .hc .cd { display: block; width: 100%; height: 100%; transition: transform .18s ease, filter .25s; filter: drop-shadow(0 5px 8px rgba(0, 0, 0, .5)); }
#hand.mine .hc.ok .cd { transform: translateY(-16px); filter: drop-shadow(0 0 9px rgba(255, 220, 130, .7)) drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
#hand.mine .hc:not(.ok) .cd { filter: brightness(.55) saturate(.75) drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
#hand.mine .hc.ok:hover .cd { transform: translateY(-24px); }
#hand .hc.in { visibility: hidden; }
#hand .hc.flipin .cd { animation: flipIn .45s backwards; }
@keyframes flipIn { from { transform: scaleX(.05) translateY(10px); } }
#hand .hc.nudge .cd { animation: nudge .5s; }
#hand .hc.bounce .cd { animation: bounce 1s ease-in-out infinite; }
@keyframes nudge { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
@keyframes bounce { 50% { transform: translateY(-26px); } }
.cd .cn { font-family: Lalezar, "Readex Pro", sans-serif; font-size: 66px; text-anchor: middle; }
.cd .ci, .cd .cp { direction: ltr; unicode-bidi: bidi-override; }
.cd .ci { font-family: Lalezar, "Readex Pro", sans-serif; font-size: 22px; text-anchor: middle; fill: var(--cream); stroke: rgba(30, 12, 4, .55); stroke-width: 3.2px; paint-order: stroke; stroke-linejoin: round; }
.cd .cp { font-family: Lalezar, "Readex Pro", sans-serif; text-anchor: middle; stroke-linejoin: round; paint-order: stroke; }
.cd .cb { font-family: Lalezar, "Readex Pro", sans-serif; font-size: 17px; text-anchor: middle; fill: #F3CF78; }

.coach { position: absolute; left: 50%; bottom: calc(var(--hand-h) + var(--me-h) + var(--safe-b) + 6px); transform: translateX(-50%); z-index: 25; width: max-content; max-width: calc(100% - 32px);
  background: rgba(251, 243, 228, .96); color: #2A1A10; font-size: 14px; font-weight: 600; text-align: center; padding: 8px 14px; border-radius: 14px; box-shadow: 0 10px 24px rgba(0, 0, 0, .5); animation: coachIn .3s; }
.coach::after { content: ""; position: absolute; bottom: -6px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: rgba(251, 243, 228, .96); }
@keyframes coachIn { from { transform: translate(-50%, 8px); opacity: 0; } }

/* ---------- reactions ---------- */
.tray { position: absolute; left: 12px; bottom: calc(var(--hand-h) + var(--me-h) + var(--safe-b) + 4px); z-index: 40; width: min(330px, calc(100% - 24px)); background: rgba(30, 18, 12, .97);
  border: 1px solid rgba(232, 184, 74, .45); border-radius: 18px; padding: 10px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; box-shadow: 0 16px 36px rgba(0, 0, 0, .6); animation: coachIn .2s; }
.tray button { border: 0; background: rgba(255, 255, 255, .06); border-radius: 12px; padding: 6px 0; font-size: 24px; line-height: 1.2; }
.tray button.ph { grid-column: span 2; font-size: 13.5px; font-weight: 600; padding: 9px 4px; color: var(--ink); }
.tray button:active { background: rgba(232, 184, 74, .3); }

/* ---------- overlays ---------- */
.toast { position: absolute; left: 50%; top: calc(var(--center-top) - 4px); transform: translate(-50%, -40%); z-index: 35; max-width: calc(100% - 32px); width: max-content; text-align: center;
  background: rgba(20, 11, 8, .92); border: 1px solid rgba(232, 184, 74, .45); color: var(--ink); font-size: 14.5px; font-weight: 600; padding: 8px 16px; border-radius: 20px;
  opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; box-shadow: 0 10px 24px rgba(0, 0, 0, .5); }
.toast.on { opacity: 1; transform: translate(-50%, -100%); }
.toast.warn { border-color: #FF8A70; background: rgba(70, 14, 8, .94); }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.fly { position: absolute; left: 0; top: 0; will-change: transform; }
.fly .flip { position: absolute; inset: 0; }
.fly .face { position: absolute; inset: 0; }
.fly svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); }
.confetti { position: absolute; top: -20px; width: 10px; height: 10px; border-radius: 2px; }

.sheet { position: absolute; inset: 0; z-index: 60; background: rgba(10, 5, 3, .62); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet-card { width: min(480px, 100%); background: linear-gradient(#2C1A10, #1C100A); border: 1px solid rgba(232, 184, 74, .35); border-bottom: 0; border-radius: 26px 26px 0 0;
  padding: 18px 16px calc(16px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; animation: sheetUp .28s cubic-bezier(.2, .9, .3, 1); }
.sheet-card h2 { margin: 0; text-align: center; font: 26px/1.2 Lalezar, sans-serif; color: var(--gold2); font-weight: 400; }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.pick-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pick-list button { border: 0; border-radius: 18px; padding: 14px 4px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .22), 0 8px 16px rgba(0, 0, 0, .4); text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.pick-list button svg { width: 46px; height: 46px; }
.pick-list button small { font-size: 11px; font-weight: 500; opacity: .85; }
.pick-list button:active { transform: translateY(2px); }

.btn { border: 0; border-radius: 15px; padding: 12px 18px; font: 600 16px/1.2 "Readex Pro", sans-serif; color: var(--ink); background: rgba(255, 255, 255, .08); transition: transform .12s; }
.btn:active { transform: translateY(2px); }
.btn.gold { background: linear-gradient(#FFEBB5, #E8B84A 52%, #B98424); color: var(--coffee); box-shadow: 0 4px 0 #7A5214, 0 10px 24px rgba(0, 0, 0, .45); }
.btn.gold:active { box-shadow: 0 1px 0 #7A5214; transform: translateY(3px); }
.btn.big { font: 24px/1.2 Lalezar, sans-serif; padding: 13px 18px 9px; }
.btn.ghost { background: rgba(20, 11, 8, .5); border: 1px solid rgba(232, 184, 74, .45); color: var(--gold2); }

.screen { position: absolute; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: calc(20px + var(--safe-t)) 16px calc(20px + var(--safe-b)); overflow-y: auto; }
.screen.dim { background: rgba(12, 6, 4, .74); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); animation: fade .25s; }
#menu { background: radial-gradient(90% 60% at 50% 30%, rgba(20, 11, 8, .2), rgba(12, 6, 4, .78)); align-items: safe center; }
.menu-in { width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; margin: auto 0; }
.logo { display: flex; flex-direction: column; align-items: center; }
.logo-fan { position: relative; width: 240px; height: 120px; margin-bottom: -26px; }
.logo-fan i { position: absolute; left: 50%; bottom: 0; width: 68px; height: 102px; margin-left: -34px; transform-origin: 50% 120%; animation: fanIn .7s cubic-bezier(.2, 1.2, .4, 1) backwards; }
.logo-fan svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .55)); }
@keyframes fanIn { from { transform: rotate(0) translateY(30px); opacity: 0; } }
.logo h1 { position: relative; margin: 0; font: 84px/1.05 Lalezar, "Readex Pro", sans-serif; font-weight: 400; color: var(--gold);
  background: linear-gradient(#FFF4CF, #F2C765 45%, #B3801F 80%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 0 #3a1f0c) drop-shadow(0 12px 22px rgba(0, 0, 0, .7)); }
.tagline { margin: 2px 0 0; color: var(--muted); font-size: 15px; text-align: center; text-wrap: balance; }
.menu-card { width: 100%; background: rgba(30, 18, 12, .86); border: 1px solid rgba(232, 184, 74, .32); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.opt-col { flex-direction: column; align-items: stretch; gap: 8px; }
.opt-t { font-weight: 600; font-size: 15px; color: var(--ink); }
.seg { display: flex; background: rgba(0, 0, 0, .38); border-radius: 13px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: none; color: var(--muted); font: 600 15px/1.2 "Readex Pro", sans-serif; padding: 7px 14px; border-radius: 10px; min-width: 46px; }
.seg button[aria-checked="true"] { background: linear-gradient(#FFE3A0, #C89434); color: var(--coffee); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.who { display: flex; gap: 10px; justify-content: space-between; }
.who button { flex: 1; max-width: 70px; aspect-ratio: 1; border-radius: 50%; border: 0; padding: 3px; background: rgba(255, 255, 255, .08); transition: transform .15s; }
.who button img, .who button .av2 { display: block; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #5a3a26, #22140c); overflow: hidden; }
.who button[aria-checked="true"] { background: linear-gradient(145deg, #FFE3A0, #B07A20); transform: scale(1.06); box-shadow: 0 0 18px rgba(255, 200, 90, .45); }
.menu-note { margin: -4px 0 0; font-size: 12.5px; color: var(--dim); text-align: center; }
.menu-row { display: flex; gap: 10px; }
.stats { margin: 0; color: var(--muted); font-size: 13.5px; text-align: center; }
.back-site { color: var(--dim); font-size: 13px; text-decoration: none; padding: 6px 10px; }

.how-card, .pause-card, .over-card { width: min(440px, 100%); background: linear-gradient(#2C1A10, #1C100A); border: 1px solid rgba(232, 184, 74, .35); border-radius: 24px; padding: 20px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6); display: flex; flex-direction: column; gap: 12px; margin: auto 0; }
.how-card h2, .over-card h2 { margin: 0; text-align: center; font: 30px/1.2 Lalezar, sans-serif; font-weight: 400; color: var(--gold2); text-wrap: balance; }
.how-list { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; line-height: 1.65; color: var(--ink); }
.how-list b { color: var(--gold2); }
.how-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.how-cards figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.how-cards svg { width: 100%; max-width: 62px; height: auto; display: block; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
.how-cards figcaption { font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.how-cards figcaption b { display: block; color: var(--ink); font-size: 12.5px; }
.how-call { font-size: 14px; line-height: 1.7; background: rgba(226, 64, 47, .12); border: 1px solid rgba(226, 64, 47, .4); border-radius: 14px; padding: 10px 12px; }
.how-call b { color: #FFB4A0; }
.how-pts { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.pause-card { gap: 10px; }
.over-card { align-items: stretch; text-align: center; }
.over-av { width: 108px; height: 108px; margin: -64px auto 0; border-radius: 50%; padding: 4px; background: linear-gradient(145deg, #FFE3A0, #B07A20); box-shadow: 0 0 40px rgba(255, 200, 90, .5); animation: pop .5s; }
.over-av img, .over-av .av2 { display: block; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #5a3a26, #22140c); overflow: hidden; }
.over-card { margin-top: 60px; }
.over-sub { margin: -4px 0 0; color: var(--gold2); font-size: 16px; font-weight: 600; }
.over-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.over-list li { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 14px; background: rgba(255, 255, 255, .05); text-align: start; }
.over-list li.win { background: linear-gradient(90deg, rgba(232, 184, 74, .25), rgba(232, 184, 74, .08)); border: 1px solid rgba(232, 184, 74, .4); }
.over-list .oa { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #5a3a26, #22140c); }
.over-list .oa img, .over-list .oa .av2 { display: block; width: 100%; height: 100%; }
.over-list b { font-size: 14px; display: block; }
.over-list b .bot-t { display: inline; font-size: 12px; font-weight: 500; color: var(--muted); }
.over-list small { color: var(--muted); font-size: 12px; }
.over-list .op { font: 20px/1 Lalezar, sans-serif; color: var(--gold2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.over-list .op small { font: 500 11px "Readex Pro", sans-serif; color: var(--muted); display: block; text-align: center; }
.over-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

.loading { position: absolute; inset: 0; z-index: 100; background: var(--night); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; transition: opacity .4s; }
.loading b { font: 64px/1 Lalezar, sans-serif; font-weight: 400; color: var(--gold); }
.loading span { color: var(--muted); font-size: 14px; }
.loading.out { opacity: 0; pointer-events: none; }

/* ---------- the tables from the store (art.js draws what's on the floor) ---------- */
.lamp { background: radial-gradient(closest-side, var(--glow, rgba(255, 186, 104, .3)), rgba(255, 150, 70, .06) 55%, transparent); }
.deco svg { display: block; width: 100%; height: 100%; overflow: visible; }
.deco.fire .fl, .deco.lit .fl { transform-box: fill-box; transform-origin: 50% 100%; animation: flame .17s ease-in-out infinite alternate; }
.deco.lit .glow, .hang .glow { transform-box: fill-box; transform-origin: center; animation: glowP 2.6s ease-in-out infinite; }
@keyframes flame { from { transform: scale(1, .9) skewX(-3deg); opacity: .9; } to { transform: scale(1.05, 1.08) skewX(3deg); opacity: 1; } }
@keyframes glowP { 50% { opacity: .7; transform: scale(.93); } }
.theme-fx { position: absolute; inset: 0; pointer-events: none; }
.hang { position: absolute; transform-origin: 50% 0; animation: swing 4.6s ease-in-out infinite alternate; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.hang svg { display: block; width: 100%; height: 100%; overflow: visible; }
@keyframes swing { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
.theme-fx .rays { position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255, 236, 190, 0) 0 46px, rgba(255, 236, 190, .075) 46px 92px);
  -webkit-mask-image: radial-gradient(90% 70% at 78% 8%, #000, transparent 75%); mask-image: radial-gradient(90% 70% at 78% 8%, #000, transparent 75%); animation: rays 10s ease-in-out infinite alternate; }
@keyframes rays { to { opacity: .55; transform: translateX(-24px); } }
.theme-fx .lattice { position: absolute; left: 18%; right: 6%; top: 22%; bottom: 34%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M11 1L21 11L11 21L1 11Z' fill='%23000'/%3E%3Cpath d='M11 5L17 11L11 17L5 11Z' fill='%233a2a1a'/%3E%3C/svg%3E"); background-size: 22px 22px; opacity: .13; transform: skewX(-14deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent); mask-image: radial-gradient(closest-side, #000 40%, transparent); }
.kh[data-table="tent"] #scene { background: radial-gradient(90% 55% at 8% 100%, rgba(255, 120, 40, .3), transparent 60%), radial-gradient(130% 60% at 50% 0%, rgba(255, 150, 70, .1), transparent 62%), linear-gradient(#1A120C, #0E0907 60%, #0A0605); }
.kh[data-table="tent"] .wall, .tprev[data-table="tent"] .tp-wall { background: linear-gradient(rgba(0, 0, 0, .35), transparent 70%), repeating-linear-gradient(0deg, #1C140F 0 7px, #2B1F16 7px 9px, #17100B 9px 16px, #3A2A1C 16px 17px); }
.kh[data-table="tent"] .wall::before { display: none; }
.kh[data-table="tent"] .wall::after { height: 18px; bottom: -15px; background-size: 24px 18px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='18'%3E%3Crect width='24' height='8' fill='%238E1B1B'/%3E%3Crect width='24' height='1.4' fill='%23E6D6B8'/%3E%3Cpath d='M0 8L6 3L12 8ZM12 8L18 3L24 8Z' fill='%23E6D6B8'/%3E%3Cpath d='M6 8v5.5M18 8v5.5' stroke='%23E6D6B8' stroke-width='1.3'/%3E%3Ccircle cx='6' cy='15' r='2' fill='%23C8963E'/%3E%3Ccircle cx='18' cy='15' r='2' fill='%23C8963E'/%3E%3C/svg%3E"); }
.kh[data-table="ramadan"] #scene { background: radial-gradient(130% 60% at 50% 0%, rgba(255, 206, 110, .2), transparent 62%), radial-gradient(100% 55% at 50% 108%, rgba(20, 90, 60, .35), transparent 70%), linear-gradient(#0F241C, #0A1712 55%, #07110D); }
.kh[data-table="ramadan"] .wall, .tprev[data-table="ramadan"] .tp-wall { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cg fill='none' stroke='%23E3C77A' stroke-opacity='.32' stroke-width='1'%3E%3Crect x='9.5' y='9.5' width='11' height='11'/%3E%3Crect x='9.5' y='9.5' width='11' height='11' transform='rotate%2845 15 15%29'/%3E%3C/g%3E%3Ccircle cx='15' cy='15' r='1.4' fill='%23E3C77A' fill-opacity='.4'/%3E%3C/svg%3E"), linear-gradient(#145040, #0C3428 70%, #0A2A20); background-size: 30px 30px, auto; }
.kh[data-table="ramadan"] .wall::before { display: none; }
.kh[data-table="ramadan"] .wall::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='13'%3E%3Cpath d='M0 13V7.5Q9 -2.5 18 7.5V13Z' fill='%23E3C77A'/%3E%3Cpath d='M3 13V8.5Q9 1.5 15 8.5V13Z' fill='%230C3428'/%3E%3Ccircle cx='9' cy='5.6' r='1' fill='%230C3428'/%3E%3C/svg%3E"); }
.kh[data-table="roshan"] #scene { background: radial-gradient(120% 60% at 80% 0%, rgba(255, 236, 190, .2), transparent 60%), linear-gradient(#2A2018, #17110C 55%, #100B08); }
.kh[data-table="roshan"] .wall, .tprev[data-table="roshan"] .tp-wall { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='60'%3E%3Crect x='5' y='3' width='54' height='60' rx='2' fill='%2324585C'/%3E%3Crect x='10' y='8' width='44' height='52' fill='%2310302F'/%3E%3Cpath d='M10 16L18 8M10 24L26 8M10 32L34 8M10 40L42 8M10 48L50 8M10 56L54 12M18 56L54 20M26 56L54 28M34 56L54 36M42 56L54 44M50 56L54 52M46 8L54 16M38 8L54 24M30 8L54 32M22 8L54 40M14 8L54 48M10 12L54 56M10 20L46 56M10 28L38 56M10 36L30 56M10 44L22 56M10 52L14 56' stroke='%23D6B27A' stroke-width='1.7'/%3E%3Crect x='5' y='3' width='54' height='5' fill='%231C4A4E'/%3E%3Cpath d='M8 3h48' stroke='%23E9D3A4' stroke-opacity='.5'/%3E%3C/svg%3E") 50% 100% / auto 100% repeat-x, linear-gradient(#EFE6D6, #D6C8AE); }
.kh[data-table="roshan"] .wall::before { opacity: .12; }
.kh[data-table="roshan"] .wall::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='13'%3E%3Crect width='20' height='13' fill='%235A3A22'/%3E%3Cpath d='M2 13V6.5Q5 2 8 6.5V13ZM12 13V6.5Q15 2 18 6.5V13Z' fill='%23C9A26A'/%3E%3C/svg%3E"); background-size: 20px 13px; }
.tprev[data-table="majlis"] .tp-wall { background: linear-gradient(#6A4630, #4B2F1F 70%, #3B2418); }

/* ---------- «وش أنزل؟» and dragging ---------- */
.hint-btn { border: 1px solid rgba(255, 227, 160, .5); border-radius: 15px; padding: 8px 10px 6px; font: 600 13.5px/1.1 "Readex Pro", sans-serif; color: var(--gold2); background: rgba(20, 11, 8, .62); white-space: nowrap; }
.hint-btn:active { transform: translateY(2px); }
#hand .hc.hinted .cd { animation: hintPulse 1s ease-in-out infinite; filter: drop-shadow(0 0 14px rgba(255, 230, 140, .95)) drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
@keyframes hintPulse { from { transform: translateY(-26px); } 50% { transform: translateY(-36px); } to { transform: translateY(-26px); } }
#deck.hinted .stack i:nth-child(3) { animation: deckCall .7s ease-in-out infinite; }
.call-btn.hinted:not(:disabled) { animation: hot .5s ease-in-out infinite; box-shadow: 0 4px 0 #7a1a10, 0 0 22px rgba(255, 140, 100, .8); }
#hand .hc { touch-action: pan-x; }
#hand .hc.lifted { visibility: hidden; }
.fly.drag { filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .55)); }
#pile.drop::after { content: ""; position: absolute; inset: -12px; border-radius: 16px; border: 3px dashed var(--gold2); box-shadow: 0 0 26px rgba(255, 220, 130, .55); animation: pop .3s; pointer-events: none; }

/* ---------- the store and the achievements ---------- */
.shop-card { width: min(520px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(#2C1A10, #1C100A); border: 1px solid rgba(232, 184, 74, .35);
  border-radius: 24px; padding: 18px 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); margin: auto 0; }
.shop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shop-head h2 { margin: 0; font: 30px/1.1 Lalezar, sans-serif; font-weight: 400; color: var(--gold2); }
.shop-pts { font-weight: 700; font-size: 13.5px; color: var(--coffee); background: linear-gradient(#FFE3A0, #E8B84A); padding: 5px 12px; border-radius: 12px; white-space: nowrap; }
.shop-pts:empty { display: none; }
.shop-tabs button { flex: 1; }
.shop-tabs button[aria-selected="true"] { background: linear-gradient(#FFE3A0, #C89434); color: var(--coffee); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.shop-note { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; text-wrap: balance; }
.shop-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; overflow-y: auto; min-height: 0; padding: 2px; }
.shop-item { display: flex; flex-direction: column; gap: 8px; min-width: 0; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; padding: 8px; }
.shop-item.on { border-color: var(--gold); background: rgba(232, 184, 74, .12); }
.si-prev { border: 0; padding: 0; background: none; border-radius: 12px; overflow: hidden; display: block; width: 100%; }
.tprev { position: relative; display: block; aspect-ratio: 240 / 132; background-size: 100% 100%; border-radius: 12px; overflow: hidden; }
.tprev .tp-wall { position: absolute; left: 0; right: 0; top: 0; height: 17%; }
.tprev .tp-a { position: absolute; left: 3%; bottom: 5%; width: 36%; height: 48%; }
.tprev .tp-b { position: absolute; right: 5%; bottom: 5%; width: 19%; height: 46%; }
.tprev svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bprev { display: flex; justify-content: center; padding: 8px 0; background: radial-gradient(circle at 50% 35%, #3a2618, #1c100a); border-radius: 12px; }
.bprev svg { width: 50%; max-width: 86px; height: auto; display: block; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .5)); }
.si-t b { display: block; font-size: 14.5px; }
.si-t small { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; }
.si-act { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.btn.sm { flex: 1; font-size: 13px; padding: 8px 8px; border-radius: 12px; text-align: center; text-decoration: none; white-space: nowrap; }
.btn.used { background: rgba(232, 184, 74, .18); color: var(--gold2); }
.btn:disabled { cursor: default; }
.btn.ghost:disabled { opacity: .65; }
.ach-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; }
.ach { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid transparent; }
.ach.on { background: linear-gradient(90deg, rgba(232, 184, 74, .22), rgba(232, 184, 74, .06)); border-color: rgba(232, 184, 74, .4); }
.ach-i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .3); font-size: 26px; filter: grayscale(1); opacity: .7; }
.ach.on .ach-i { filter: none; opacity: 1; background: rgba(232, 184, 74, .2); }
.ach-t b { display: block; font-size: 14.5px; }
.ach-t small { display: block; color: var(--muted); font-size: 12px; }
.ach-bar { display: block; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .1); margin-top: 6px; overflow: hidden; }
.ach-bar i { display: block; height: 100%; background: linear-gradient(90deg, #E8B84A, #FFE3A0); }
.ach-n { font: 16px/1 Lalezar, sans-serif; color: var(--gold2); white-space: nowrap; }
.ach-pop { position: absolute; left: 50%; top: calc(var(--safe-t) + 66px); transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 18px;
  background: linear-gradient(#3A2414, #22140C); border: 1.5px solid var(--gold); box-shadow: 0 14px 30px rgba(0, 0, 0, .6), 0 0 30px rgba(255, 200, 90, .3); animation: achIn .5s cubic-bezier(.2, 1.3, .4, 1); white-space: nowrap; }
.ach-pop .ap-i { font-size: 30px; }
.ach-pop small { display: block; color: var(--gold); font-size: 11.5px; font-weight: 700; }
.ach-pop b { font-size: 15px; }
.ach-pop.out { animation: achOut .35s forwards; }
@keyframes achIn { from { transform: translate(-50%, -30px) scale(.7); opacity: 0; } }
@keyframes achOut { to { transform: translate(-50%, -20px); opacity: 0; } }
.pick-list button.off { opacity: .28; filter: grayscale(.7); }
.first-card { text-align: center; align-items: center; }
.first-card h2 { margin: 0; font: 28px/1.2 Lalezar, sans-serif; font-weight: 400; color: var(--gold2); }
.first-card p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 14.5px; text-wrap: balance; }
.first-card .btn { align-self: stretch; }
.first-av { width: 96px; height: 96px; border-radius: 50%; padding: 4px; background: linear-gradient(145deg, #FFE3A0, #B07A20); box-shadow: 0 0 30px rgba(255, 200, 90, .4); }
.first-av img { display: block; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #5a3a26, #22140c); }
.how-btns { display: flex; flex-direction: column; gap: 8px; }
.menu-row { flex-wrap: wrap; justify-content: center; }
.menu-row .btn { padding: 10px 12px; font-size: 14px; }
@media (max-width: 380px) { .me-seat .who-t { display: none; } .menu-row .btn { padding: 9px 10px; font-size: 13px; } }

/* ---------- with friends: the table's screen, the turn's clock ---------- */
.ini { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; color: #fff; font: 700 1.1em/1 "Readex Pro", sans-serif; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.seat .av > .ini { font-size: calc(var(--av) * .42); }
.friends-btn { background: linear-gradient(#3B2A1C, #2A1B11); border: 1px solid rgba(232, 184, 74, .55); color: var(--gold2); font: 21px/1.2 Lalezar, sans-serif; padding: 11px 18px 8px; }
.room-card { gap: 12px; }
/* (its frame — the ticket, «أصدقاؤك الحين», a friend's code, sharing, the foot — is the three games' /tables/lobby.css) */
.room-card.lb { width: min(560px, 100%); }
.lb { --lb-box: rgba(255, 236, 200, .04); --lb-row: rgba(255, 236, 200, .05); --lb-on-gold: var(--coffee); }
@media (min-width: 880px) { .lb .room-table { height: 360px; } }
.room-body { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; }
.room-seats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rs { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); min-width: 0; }
.rs .rs-av { grid-row: span 2; position: relative; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #5a3a26, #22140c); }
.rs .rs-av img { display: block; width: 100%; height: 100%; }
.rs b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs small { font-size: 11.5px; color: var(--muted); }
.rs.ok { border-color: rgba(120, 220, 140, .45); }
.rs.ok small { color: #9FE6AE; }
.rs.off { opacity: .55; }
.rs.empty { display: grid; place-items: center; min-height: 62px; color: var(--dim); font-size: 13px; border-style: dashed; }
.room-bots { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .22); }
.room-step { display: flex; align-items: center; gap: 10px; }
.room-step button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(232, 184, 74, .5); background: rgba(20, 11, 8, .6); color: var(--gold2); font-size: 20px; line-height: 1; padding: 0; }
.room-step button:disabled { opacity: .35; }
.room-step b { font: 22px/1 Lalezar, sans-serif; min-width: 18px; text-align: center; }
.room-link { display: flex; gap: 8px; }
.room-link input { flex: 1; min-width: 0; direction: ltr; text-align: left; font: 500 13px/1 "Readex Pro", sans-serif; color: var(--ink); background: rgba(0, 0, 0, .3); border: 1px solid rgba(232, 184, 74, .3); border-radius: 12px; padding: 10px 12px; }
.room-link .btn { flex: none; }
.room-h { margin: 2px 0 0; font-size: 15px; color: var(--gold2); }
.room-friends { display: flex; flex-direction: column; gap: 6px; }
.rf { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.rf .ini { width: 38px; height: 38px; font-size: 16px; }
.rf-t b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-t small { font-size: 11.5px; color: var(--muted); }
.rf-t small.on { color: #9FE6AE; }
.rf .btn { flex: none; }
.seat .av.timed::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--gold2) calc(var(--t, 1) * 360deg), transparent 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); }
.seat .av.timed.late::after { background: conic-gradient(#FF7A5C calc(var(--t, 1) * 360deg), transparent 0); }

/* ---------- «العب أونلاين»: the search, the places, the computer player's mark ---------- */
.online-btn { display: flex; align-items: center; justify-content: center; gap: 10px; }
.online-btn .dot { width: 10px; height: 10px; border-radius: 50%; background: #2BD46A; box-shadow: 0 0 0 0 rgba(43, 212, 106, .7); animation: live 1.6s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 9px rgba(43, 212, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(43, 212, 106, 0); } }
.bot-chip { position: absolute; top: -4px; right: -8px; z-index: 2; font: 700 9.5px/1 "Readex Pro", sans-serif; font-style: normal; color: #1E1408; background: linear-gradient(#E9EDF5, #B9C2D3); border: 1.5px solid rgba(20, 11, 8, .55); border-radius: 8px; padding: 3px 5px 2px; box-shadow: 0 2px 4px rgba(0, 0, 0, .4); letter-spacing: .2px; }
.bot-chip.in { position: static; display: inline-block; margin-inline-start: 6px; vertical-align: 2px; border-width: 1px; }
.seat .cnt.rank { background: radial-gradient(circle at 40% 30%, #FFF4CF, #E8B84A 70%); border-color: #FFF4CF; font: 16px/23px system-ui, sans-serif; }
.seat.done .av { filter: saturate(.85); }
.seat.done .nm::after { content: " ✓"; color: #9FE6AE; }
.over-list li.last { background: rgba(226, 64, 47, .1); border: 1px solid rgba(226, 64, 47, .3); }
.over-list .op { font: 26px/1 system-ui, sans-serif; }
#search { align-items: safe center; }
.search-in { width: min(420px, 100%); margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.search-in h2 { margin: 0; font: 28px/1.2 Lalezar, sans-serif; font-weight: 400; color: var(--gold2); }
.radar { position: relative; width: 210px; height: 210px; display: grid; place-items: center; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(232, 184, 74, .45); animation: ping 2.4s cubic-bezier(.2, .6, .4, 1) infinite; opacity: 0; }
.radar i:nth-child(2) { animation-delay: .8s; } .radar i:nth-child(3) { animation-delay: 1.6s; }
@keyframes ping { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
.radar .sweep { position: absolute; inset: 8px; border-radius: 50%; background: conic-gradient(from 0deg, rgba(232, 184, 74, .35), transparent 70deg); animation: sweep 2s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.radar-me { position: relative; width: 92px; height: 92px; border-radius: 50%; padding: 4px; background: linear-gradient(145deg, #FFE3A0, #B07A20); box-shadow: 0 0 30px rgba(255, 200, 90, .45); }
.radar-me img, .radar-me .av2 { display: block; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #5a3a26, #22140c); overflow: hidden; }
.radar-me > .av2 { position: absolute; inset: 4px; width: auto; height: auto; }
.search-count { position: relative; width: 58px; height: 58px; }
.search-count svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.search-count circle { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 4; }
#searchRing { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 119.4; stroke-dashoffset: 0; transition: stroke-dashoffset .2s linear; }
.search-count b { position: absolute; inset: 0; display: grid; place-items: center; font: 24px/1 Lalezar, sans-serif; color: var(--gold2); }
.search-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
.search-slots:empty { display: none; }
.ss { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(232, 184, 74, .25); min-width: 0; animation: pop .4s; }
.ss.wait { justify-content: center; color: var(--dim); font-size: 20px; border-style: dashed; animation: none; }
.ss .ss-av { position: relative; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #5a3a26, #22140c); }
.ss b { font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-btns { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.search-in.local .radar .sweep, .search-in.local .radar i, .search-in.local .search-count { display: none; }
.search-in.local .radar { width: 120px; height: 120px; }
@media (prefers-reduced-motion: reduce) { .radar i, .radar .sweep, .online-btn .dot { animation: none; } }

/* ---------- the held hand's bed, the music switch ---------- */
#hand::before { content: ""; position: fixed; left: 50%; bottom: calc(var(--safe-b) - 30px); width: min(120vw, 900px); height: calc(var(--hand-h) * .9); transform: translateX(-50%); z-index: -1; pointer-events: none;
  background: radial-gradient(50% 60% at 50% 100%, rgba(232, 184, 74, .16), rgba(120, 60, 20, .08) 55%, transparent 75%); }
#musicBtn .off { display: none; } #musicBtn[aria-pressed="false"] .off { display: block; } #musicBtn[aria-pressed="false"] .note { opacity: .45; }
#musicBtn .note { fill: none; }

/* ---------- levels, partners ---------- */
.seat .lvl { position: absolute; bottom: -5px; right: -7px; z-index: 2; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; font: 700 11.5px/18px "Readex Pro", sans-serif; font-style: normal; text-align: center;
  color: #2A1608; background: linear-gradient(#FFF1C2, #E8B84A); border: 2px solid #5A3408; box-shadow: 0 2px 5px rgba(0, 0, 0, .45); }
.me-seat .lvl { bottom: -4px; right: -6px; }
.seat.partner .av { background: linear-gradient(145deg, #B6F5C8, #2E9A63 60%, #0F5A33); box-shadow: 0 0 0 2px rgba(120, 230, 160, .5), 0 6px 14px rgba(0, 0, 0, .55); }
.seat.partner .tag { color: #CFFADC; background: rgba(20, 90, 50, .65); }
.seat.foe .av { background: linear-gradient(145deg, #FFC9B8, #C24A2C 60%, #6E1A08); }
.over-xp { margin: -2px 0 0; text-align: center; font-size: 14.5px; color: var(--muted); }
.over-xp b { color: var(--gold2); font-size: 17px; } .over-xp .up { color: #9FE6AE; font-weight: 700; }
.my-level { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 12px; border-radius: 14px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(232, 184, 74, .25); }
.my-level:empty { display: none; }
.ml-star { font-size: 26px; text-align: center; filter: drop-shadow(0 0 8px rgba(255, 210, 90, .6)); }
.ml-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ml-t b { font-size: 14.5px; color: var(--gold2); }
.ml-bar { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.ml-bar i { display: block; height: 100%; background: linear-gradient(90deg, #E8B84A, #FFE3A0); border-radius: 3px; }
.ml-t small { font-size: 11.5px; color: var(--muted); }

/* ---------- the kind of table ---------- */
.modes { display: flex; flex-direction: column; gap: 10px; }
.modes button { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: start; padding: 14px; border-radius: 18px;
  background: rgba(255, 255, 255, .05); border: 1.5px solid rgba(232, 184, 74, .28); color: var(--ink); transition: transform .15s, border-color .15s; }
.modes button:hover, .modes button:focus-visible { border-color: var(--gold); transform: translateY(-2px); }
.modes button.last { border-color: rgba(232, 184, 74, .6); background: rgba(232, 184, 74, .08); }
.modes b { font: 21px/1.2 Lalezar, sans-serif; font-weight: 400; color: var(--gold2); }
.modes small { grid-column: 2; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.md-ic { grid-row: span 2; position: relative; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle, #8E1B1B 0 46%, #3A1A10 47%); box-shadow: inset 0 0 0 2px rgba(232, 184, 74, .5); }
.md-ic i { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #F3DDBA; box-shadow: 0 0 0 2px #2A1608; }
.md-ic i:nth-child(1) { left: 25px; top: 2px; } .md-ic i:nth-child(2) { right: 2px; top: 25px; } .md-ic i:nth-child(3) { left: 25px; bottom: 2px; } .md-ic i:nth-child(4) { left: 2px; top: 25px; }
.md-ic.duel i:nth-child(2) { right: auto; left: 25px; top: auto; bottom: 2px; }
.md-ic.teams i:nth-child(1), .md-ic.teams i:nth-child(3) { background: #7BE3A0; } .md-ic.teams i:nth-child(2), .md-ic.teams i:nth-child(4) { background: #FF9A80; }
.search-slots.duo { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 240px; margin: 0 auto; }
.room-mode { align-self: stretch; } .room-mode button { flex: 1; }

/* ---------- animated stickers ---------- */
.stk { display: block; width: 100%; height: 100%; overflow: visible; }
.seat .bub.stk { background: none; box-shadow: none; padding: 0; width: 96px; height: 96px; top: calc(var(--av) - 10px); }
.seat .bub.stk::before { display: none; }
.me-seat .bub.stk { top: auto; bottom: calc(100% + 4px); left: auto; right: -10px; }
.tray-h { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: 4px; }
.tray .stk-b { padding: 4px; aspect-ratio: 1; }
.sprev { padding: 6px 0; } .sprev .stk { width: 64%; height: auto; max-width: 96px; margin: 0 auto; }
.stk-coffee .steam path { animation: steam 2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.stk-coffee .steam .s2 { animation-delay: .5s; } .stk-coffee .steam .s3 { animation-delay: 1s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(10px) scaleY(.6); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-16px) scaleY(1.2); } }
.stk-coffee .cup { animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px); } }
.stk-dallah .pot { transform-box: fill-box; transform-origin: 70% 90%; animation: pourTilt 2.4s ease-in-out infinite; }
@keyframes pourTilt { 0%, 100% { transform: rotate(0deg); } 35%, 75% { transform: rotate(-22deg); } }
.stk-dallah .pour { animation: pour 2.4s linear infinite; opacity: 0; }
@keyframes pour { 0%, 30% { opacity: 0; stroke-dashoffset: 0; } 40%, 72% { opacity: 1; } 80%, 100% { opacity: 0; stroke-dashoffset: -48; } }
.stk-falcon .bird { animation: soar 1.8s ease-in-out infinite; }
@keyframes soar { 50% { transform: translateY(-8px); } }
.stk-falcon .wl, .stk-falcon .wr { transform-box: fill-box; animation: flap .45s ease-in-out infinite alternate; }
.stk-falcon .wl { transform-origin: 100% 60%; } .stk-falcon .wr { transform-origin: 0% 60%; }
@keyframes flap { from { transform: scaleY(1) rotate(0deg); } to { transform: scaleY(.45) rotate(0deg); } }
.stk-fire .fl { transform-box: fill-box; transform-origin: 50% 100%; animation: flame .16s ease-in-out infinite alternate; }
.stk-fire .sparks circle { animation: spark 1.4s ease-out infinite; } .stk-fire .k2 { animation-delay: .45s; } .stk-fire .k3 { animation-delay: .9s; }
@keyframes spark { 0% { opacity: 0; transform: translateY(20px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-24px); } }
.stk-clap .hl, .stk-clap .hr { transform-box: fill-box; animation: clapL .5s ease-in-out infinite alternate; }
.stk-clap .hl { transform-origin: 30% 100%; } .stk-clap .hr { transform-origin: 70% 100%; animation-name: clapR; }
@keyframes clapL { from { transform: rotate(-14deg); } to { transform: rotate(0deg); } }
@keyframes clapR { from { transform: rotate(14deg); } to { transform: rotate(0deg); } }
.stk-clap .burst { animation: burst .5s ease-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes burst { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1.05); } }
.stk-laugh .face { transform-box: fill-box; transform-origin: 50% 100%; animation: giggle .35s ease-in-out infinite alternate; }
@keyframes giggle { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-5px) rotate(4deg); } }
.stk-laugh .t1, .stk-laugh .t2 { animation: tear .9s ease-in infinite; } .stk-laugh .t2 { animation-delay: .45s; }
@keyframes tear { 0% { transform: translateY(-4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }
.stk-laugh .ha { animation: ha 1s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ha { 0% { opacity: 0; transform: scale(.6) translateY(6px); } 40% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .stk * { animation: none !important; } }

/* wide screens: bigger type in the bar; my seat and buttons stay close to the hand */
.ls #me { left: 50%; right: auto; width: min(100%, 860px); transform: translateX(-50%); }
.ls .brand { font-size: 30px; }
.ls .seat .nm { font-size: 14px; }
@media (prefers-reduced-motion: reduce) {
  .lamp, .deco-b .smoke, #ring ellipse, .call-btn.ready, .seat.turn .av, #deck.can .stack i:nth-child(3) { animation: none !important; }
}

/* ---------- the special cards, felt ---------- */
.slam { position: absolute; transform: translate(-50%, -50%); font: 92px/1 Lalezar, sans-serif; color: var(--gold2); -webkit-text-stroke: 3px #3A1406; paint-order: stroke;
  text-shadow: 0 6px 26px rgba(0, 0, 0, .65), 0 0 40px rgba(255, 190, 90, .5); animation: slamIn 1.05s cubic-bezier(.2, 1.5, .4, 1) forwards; pointer-events: none; z-index: 3; }
.slam.d2 { font-size: 70px; }
@keyframes slamIn { 0% { transform: translate(-50%, -50%) scale(3) rotate(-14deg); opacity: 0; } 22% { transform: translate(-50%, -50%) scale(1) rotate(-6deg); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -95%) scale(1.08) rotate(-6deg); opacity: 0; } }
.cburst { position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; border: 4px solid var(--bc); box-shadow: 0 0 22px var(--bc), inset 0 0 14px var(--bc); animation: cburst .9s ease-out both; pointer-events: none; }
@keyframes cburst { from { transform: scale(1); opacity: .95; } to { transform: scale(13); opacity: 0; } }
#ring.spin .arrows { transform-box: view-box; transform-origin: 150px 90px; animation: ringSpin .95s cubic-bezier(.3, .9, .35, 1); }
#ring.spin ellipse { stroke-width: 4.5; opacity: 1; }
@keyframes ringSpin { from { transform: rotate(0); } to { transform: rotate(-360deg); } }
.seat .stamp { animation: stampSlam 1.2s cubic-bezier(.2, 1.4, .4, 1) forwards; width: calc(var(--av) * 1.25); height: calc(var(--av) * 1.25); margin-left: calc(var(--av) * -.625); top: calc(var(--av) * -.12); }
.seat .stamp svg { width: 100%; height: 100%; }
.stamp .st-t { font: 13px Lalezar, sans-serif; fill: #FFB3A3; }
.me-seat .stamp { left: -6px; margin: 0; }
@keyframes stampSlam { 0% { transform: scale(2.6) rotate(-24deg); opacity: 0; } 22% { transform: scale(1) rotate(-12deg); opacity: 1; } 78% { opacity: 1; } 100% { transform: scale(1) rotate(-12deg); opacity: 0; } }

/* stacked drawing waiting on the table */
.pend-chip { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); display: flex; align-items: baseline; gap: 6px; padding: 4px 14px 2px; border-radius: 14px; z-index: 6;
  background: linear-gradient(#FFE3A0, #E8B84A); color: var(--coffee); font: 24px/1.1 Lalezar, sans-serif; box-shadow: 0 4px 14px rgba(0, 0, 0, .45), 0 0 18px rgba(255, 190, 90, .5); animation: pendIn .4s cubic-bezier(.2, 1.6, .4, 1); }
.pend-chip small { font: 600 12px "Readex Pro", sans-serif; }
@keyframes pendIn { from { transform: translateX(-50%) scale(.4); } to { transform: translateX(-50%) scale(1); } }

/* «٧ تبدّل»: who to swap with */
.pick-list.who-pick { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.pick-list.who-pick button { background: rgba(255, 255, 255, .06); border: 1px solid rgba(232, 184, 74, .4); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; }
.pick-list.who-pick .wp-av { position: relative; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; display: block; background: radial-gradient(circle at 50% 35%, #5a3a26, #22140c); }
.pick-list.who-pick .wp-av img, .pick-list.who-pick .wp-av .av2, .pick-list.who-pick .wp-av .ini { width: 100%; height: 100%; display: grid; place-items: center; }
.pick-list.who-pick small { color: var(--muted); font-size: 11.5px; }

/* the round's summary on the results */
.over-sum { display: flex; flex-direction: column; gap: 8px; text-align: start; }
.over-sum p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.os-best { background: linear-gradient(90deg, rgba(232, 184, 74, .2), rgba(232, 184, 74, .05)); border: 1px solid rgba(232, 184, 74, .35); border-radius: 12px; padding: 7px 10px; }
.os-best b { color: var(--gold2); }
.os-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.os-chips span { display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border-radius: 12px; background: rgba(255, 255, 255, .05); min-width: 0; }
.os-chips b { font: 22px/1.1 Lalezar, sans-serif; color: var(--gold2); font-variant-numeric: tabular-nums; }
.os-chips small { font-size: 11px; color: var(--muted); text-align: center; }
.os-catch { color: var(--muted) !important; font-size: 12.5px !important; }

/* watching a friend's table; the connection gone for a moment */
.watch-n { font-size: 12px; color: var(--gold2); background: rgba(20, 11, 8, .62); padding: 3px 9px; border-radius: 10px; white-space: nowrap; }
.watch-bar { position: absolute; bottom: calc(var(--safe-b) + var(--hand-h) + 10px); left: 12px; z-index: 56; display: flex; align-items: center; gap: 10px;
  background: rgba(20, 11, 8, .82); border: 1px solid rgba(232, 184, 74, .45); border-radius: 14px; padding: 4px 6px 4px 12px; font-size: 13px; white-space: nowrap; }
.watch-bar b { color: var(--gold2); }
.kh.watching #me .acts { visibility: hidden; }
.kh.watching #hand { pointer-events: none; }
#hand .hc.wb { cursor: default; }
.net { position: absolute; top: calc(var(--safe-t) + var(--top-h) + 6px); left: 50%; transform: translateX(-50%); z-index: 70; background: #5A1A10; color: #FFE1DA; border: 1px solid #E2402F;
  padding: 6px 14px; border-radius: 12px; font-size: 13.5px; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); white-space: nowrap; animation: fade .25s; }

/* the menu: a season on; a friend at a table now; your friends */
.season-banner { width: 100%; display: flex; align-items: center; gap: 10px; text-align: start; padding: 9px 12px; border-radius: 16px; border: 1px solid rgba(160, 200, 255, .45);
  background: linear-gradient(100deg, rgba(40, 60, 100, .9), rgba(30, 18, 12, .9)); color: var(--ink); }
.season-banner.soon { border-color: rgba(232, 184, 74, .35); background: rgba(30, 18, 12, .86); }
.season-banner .sb-i { font-size: 26px; flex: none; }
.season-banner b { display: block; font-size: 14.5px; color: var(--gold2); }
.season-banner small { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; }
.live-strip { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; text-align: start; padding: 7px 10px; border-radius: 14px;
  background: rgba(43, 212, 106, .1); border: 1px solid rgba(43, 212, 106, .45); color: var(--ink); }
.live-strip .ls-av, .pr-av { position: relative; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: block; background: radial-gradient(circle at 50% 35%, #5a3a26, #22140c); }
.live-strip .ls-av > *, .pr-av > * { width: 100%; height: 100%; }
.live-strip b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-strip small { display: block; font-size: 11.5px; color: #9FE6AE; }
.live-strip .ls-go { font: 600 13px "Readex Pro", sans-serif; color: var(--coffee); background: linear-gradient(#FFE3A0, #E8B84A); padding: 6px 12px; border-radius: 10px; }
.pals-btn { position: relative; }
.pals-btn.live::after { content: ""; position: absolute; top: 6px; inset-inline-end: 6px; width: 9px; height: 9px; border-radius: 50%; background: #2BD46A; box-shadow: 0 0 0 0 rgba(43, 212, 106, .7); animation: live 1.6s infinite; }
.pals-card #palsBody { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 0; }
.pals-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pals-rank li { display: grid; grid-template-columns: 26px 38px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.pals-rank li.me { background: rgba(232, 184, 74, .14); border: 1px solid rgba(232, 184, 74, .4); }
.pals-rank i { font-style: normal; text-align: center; font: 17px/1 Lalezar, sans-serif; color: var(--gold2); }
.pals-rank .pr-t b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pals-rank .pr-t small { font-size: 11.5px; color: var(--muted); }
.pals-rank .pr-x { font: 20px/1 Lalezar, sans-serif; color: var(--gold2); text-align: center; font-variant-numeric: tabular-nums; }
.pals-rank .pr-x small { display: block; font: 500 10.5px "Readex Pro", sans-serif; color: var(--muted); }
.pr-av .ini, .ls-av .ini { display: grid; place-items: center; font-weight: 700; }

/* the room: house rules */
.room-rules { display: flex; flex-direction: column; gap: 6px; align-self: stretch; }
.rule { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); cursor: pointer; }
.rule input { width: 20px; height: 20px; accent-color: var(--gold); margin: 2px 0 0; flex: none; }
.rule b { display: block; font-size: 14px; }
.rule small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.rule:has(input:checked) { border-color: rgba(232, 184, 74, .55); background: rgba(232, 184, 74, .1); }
.rules-note { font-size: 11.5px; color: var(--dim); }

/* the store: a seasonal piece */
.si-prev { position: relative; }
.si-sea { position: absolute; top: 5px; inset-inline-start: 5px; max-width: calc(100% - 10px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 600 10px/1.3 "Readex Pro", sans-serif; font-style: normal; color: #0E1A2C; background: linear-gradient(#DDEBFF, #9CC2F2); padding: 2px 7px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.si-sea.soon { background: rgba(20, 11, 8, .8); color: var(--muted); }

/* the seasons' tables: winter stars, the Najdi wall of Diriyah, the Eid's lights */
.theme-fx .stars { position: absolute; left: 0; right: 0; top: 0; height: 34%; background-image: radial-gradient(1.4px 1.4px at 12% 30%, #FFF6D8, transparent), radial-gradient(1px 1px at 28% 62%, #fff, transparent),
  radial-gradient(1.6px 1.6px at 44% 22%, #FFE9A8, transparent), radial-gradient(1px 1px at 61% 48%, #fff, transparent), radial-gradient(1.3px 1.3px at 77% 18%, #FFF6D8, transparent), radial-gradient(1px 1px at 90% 54%, #fff, transparent);
  background-size: 260px 120px; opacity: .8; animation: twinkle 3.2s ease-in-out infinite alternate; }
.theme-fx .stars.s2 { background-size: 340px 150px; background-position: 120px 40px; animation-delay: -1.6s; opacity: .55; }
@keyframes twinkle { from { opacity: .3; } to { opacity: .9; } }
.theme-fx .najdi { position: absolute; left: 0; right: 0; top: calc(var(--safe-t) + var(--top-h) - 6px); height: 34px; opacity: .55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='34'%3E%3Cpath d='M0 34V14h4l8-12 8 12h8l8-12 8 12h4v20z' fill='%23B9824F'/%3E%3Cpath d='M10 24l2-4 2 4zM34 24l2-4 2 4z' fill='%23472812'/%3E%3C/svg%3E") repeat-x;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .4)); }
.theme-fx .lights { position: absolute; left: 0; right: 0; top: calc(var(--safe-t) + var(--top-h) - 4px); width: 100%; height: 36px; }
.theme-fx .bulbs { position: absolute; left: 0; right: 0; top: calc(var(--safe-t) + var(--top-h) - 4px); height: 40px; }
.theme-fx .bulbs i { position: absolute; width: 9px; height: 12px; margin-left: -4.5px; border-radius: 50% 50% 45% 45%; background: var(--c); box-shadow: 0 0 10px 2px var(--c); animation: bulb 1.8s ease-in-out infinite alternate; }
@keyframes bulb { from { opacity: .35; box-shadow: 0 0 3px 0 var(--c); } to { opacity: 1; } }
.deco .sm1, .deco .sm2 { animation: steam 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; } .deco .sm2 { animation-delay: .8s; }
.deco-a .frs, .tp-a .frs { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 4s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }

/* the seasons' stickers */
.stk-farwa .coat { transform-box: fill-box; transform-origin: 50% 100%; animation: shiver .12s linear infinite alternate; }
@keyframes shiver { from { transform: translateX(-1.2px); } to { transform: translateX(1.2px); } }
.stk-farwa .brr { transform-box: fill-box; transform-origin: center; animation: ha 1.4s ease-out infinite; }
.stk-jamr .steam path { animation: steam 2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; } .stk-jamr .steam .s2 { animation-delay: .7s; }
.stk-jamr .coals circle { animation: coal 1.1s ease-in-out infinite alternate; } .stk-jamr .coals circle:nth-child(2n) { animation-delay: -.5s; }
@keyframes coal { from { opacity: .55; } to { opacity: 1; } }
.stk-horse .horse { transform-box: fill-box; transform-origin: 70% 90%; animation: nod 1.4s ease-in-out infinite; }
@keyframes nod { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-6deg); } 60% { transform: rotate(2deg); } }
.stk-horse .mane { transform-box: fill-box; transform-origin: 20% 0; animation: sway .7s ease-in-out infinite alternate; }
.stk-palm .frs { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 1.6s ease-in-out infinite alternate; }
.stk-palm .dates { animation: bob 1.6s ease-in-out infinite; }
.stk-fanoos .lan { transform-box: fill-box; transform-origin: 50% 0; animation: swing 2.2s ease-in-out infinite alternate; }
.stk-fanoos .glow { animation: glowP 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.stk-fanoos .moon { animation: bob 2.4s ease-in-out infinite; }
.stk-dates [class^="d"] { animation: hop 1.5s ease-in-out infinite; }
.stk-dates .d2 { animation-delay: .15s; } .stk-dates .d3 { animation-delay: .3s; } .stk-dates .d4 { animation-delay: .45s; } .stk-dates .d5 { animation-delay: .6s; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-7px); } }
.stk-dates .sp, .stk-eidiya .sp { animation: twinkle .9s ease-in-out infinite alternate; }
.stk-eidiya .coin { animation: coinUp 1.6s cubic-bezier(.3, 1.4, .5, 1) infinite; }
@keyframes coinUp { 0% { transform: translateY(26px); opacity: 0; } 30% { transform: translateY(0); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-6px); opacity: 0; } }
.stk-eidiya .env { animation: bob 1.6s ease-in-out infinite; }
.stk-balloon .b1 { animation: bob 2s ease-in-out infinite; } .stk-balloon .b2 { animation: bob 2.4s ease-in-out infinite -.6s; } .stk-balloon .b3 { animation: bob 1.8s ease-in-out infinite -1.1s; }
.stk-balloon .mb { animation: ha 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  .slam, .cburst, #ring.spin .arrows, .seat .stamp, .pend-chip, .theme-fx .stars, .theme-fx .bulbs i, .pals-btn.live::after, .deco-a .frs { animation-duration: .01s !important; animation-iteration-count: 1 !important; }
}

/* =================== «بلوت» =================== */
.bl { --tw: 64px; }
.bl .cd .cr { font-family: "Readex Pro", sans-serif; font-weight: 700; font-size: 17px; text-anchor: start; direction: ltr; unicode-bidi: bidi-override; }
.bl .cd .cr.ten { font-size: 14.5px; letter-spacing: -1.2px; }
.bl .cd .cnm { font-family: "Readex Pro", sans-serif; font-weight: 700; font-size: 7.2px; text-anchor: middle; fill: #3A2406; }
.sym { font-family: system-ui, sans-serif; font-weight: 700; }
.sym.r { color: #E5484D; } .sym.k { color: #F3EBDD; }
.bid-bar .sym.k, .mode-chip .sym.k, .banner .sym.k, .seat .sym.k { color: #F3EBDD; }

/* the bar: the score as «لنا · لهم» */
.score-chip { margin-inline-start: auto; display: flex; gap: 2px; padding: 3px; border-radius: 14px; border: 1px solid rgba(232, 184, 74, .45); background: rgba(20, 11, 8, .72); color: var(--ink); }
.score-chip span { display: flex; flex-direction: column; align-items: center; min-width: 44px; padding: 1px 8px; border-radius: 11px; }
.score-chip .sc-us { background: rgba(43, 160, 90, .22); }
.score-chip small { font-size: 10px; color: var(--muted); line-height: 1.2; }
.score-chip b { font: 18px/1.1 Lalezar, sans-serif; color: var(--gold2); font-variant-numeric: tabular-nums; }
.bl .lvl-tag { display: none; }
.mode-chip { position: absolute; top: calc(var(--safe-t) + var(--top-h) + 2px); left: 50%; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 12px;
  background: rgba(20, 11, 8, .78); border: 1px solid rgba(232, 184, 74, .4); font-weight: 700; font-size: 14px; white-space: nowrap; }
.mode-chip.ours { border-color: rgba(80, 200, 120, .6); }
.mode-chip .mult { color: #FF9A7A; } .mode-chip small { font-weight: 500; color: var(--muted); font-size: 11px; }

/* the middle: an anchor at the table's centre */
.bl #center { left: 50%; right: auto; width: 0; height: 0; display: block; gap: 0; }
#voiceBtn svg path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#voiceBtn .off { display: none; } #voiceBtn[aria-pressed="false"] .off { display: block; } #voiceBtn[aria-pressed="false"] .spk { opacity: .45; }
.trick { position: absolute; left: 0; top: 0; }
.trick .tc { position: absolute; left: 0; top: 0; width: var(--tw); height: calc(var(--tw) * 1.5); }
.trick .tc .cd, .up-card .cd, .bl-stack i .cd { display: block; width: 100%; height: 100%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.up-card { position: absolute; left: calc(var(--tw) * .1); top: calc(var(--tw) * -.75 + var(--up-dy, 0px)); width: var(--tw); height: calc(var(--tw) * 1.5); }
.up-card.flip { animation: upIn .45s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes upIn { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }
.bl-stack { position: absolute; left: calc(var(--tw) * -1.15); top: calc(var(--tw) * -.75 + var(--up-dy, 0px)); width: var(--tw); height: calc(var(--tw) * 1.5); }
.bl-stack i { position: absolute; inset: 0; }
.bl-stack i:nth-child(2) { transform: translate(-2px, -2px); } .bl-stack i:nth-child(3) { transform: translate(-4px, -4px); }
.tally { position: absolute; left: 0; top: calc(var(--tw) * 1.6); transform: translateX(-50%); display: flex; gap: 6px; white-space: nowrap; }
.tally span { font-size: 11px; padding: 2px 8px; border-radius: 9px; background: rgba(0, 0, 0, .42); color: var(--muted); }
.tally .t-us { color: #9FE6AE; }
.ls .tally { top: calc(var(--tw) * 1.75); }

/* the bidding and doubling: big buttons above your hand */
.bid-bar { position: absolute; left: 50%; bottom: calc(var(--hand-h) + var(--safe-b) + 4px); transform: translateX(-50%); z-index: 40; width: min(560px, calc(100% - 20px));
  background: linear-gradient(rgba(44, 26, 16, .96), rgba(28, 16, 10, .96)); border: 1px solid rgba(232, 184, 74, .5); border-radius: 18px; padding: 10px 10px 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); animation: fade .2s; }
.bid-top { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 8px; }
.bid-q { margin: 0; min-width: 0; text-align: center; font-size: 14px; line-height: 1.5; color: var(--ink); }
.bar-hint { flex: none; padding: 6px 9px 4px; font-size: 12.5px; }
@media (max-width: 379px) { .bar-hint .t { display: none; } }
/* a phone on its side: the bar dips into the room above your cards, with smaller buttons */
.short .bid-bar { bottom: calc(var(--hand-h) + var(--safe-b) - 26px); padding: 6px 10px; }
.short .bid-btns .btn { min-width: 84px; font-size: 17px; padding: 7px 8px 5px; }
/* a short phone: the raised deck would sit on your partner's little fan, so the fan steps aside while the card is up */
.up-high:has(#upCard:not([hidden])) .seat[data-i="2"] .fan { visibility: hidden; }
/* while you bid the bar sits over your row */
.bidding #me { visibility: hidden; }
/* the online clock along the bar's top */
.bid-bar.timed::after { content: ""; position: absolute; top: -1px; left: 16px; right: 16px; height: 3px; border-radius: 2px; background: var(--gold2); transform: scaleX(var(--t, 1)); transform-origin: right; }
.bid-bar.late::after { background: #E5484D; }
/* a wide screen: the question beside the buttons, one row */
.ls .bid-bar { display: flex; align-items: center; gap: 12px; width: min(780px, calc(100% - 20px)); padding: 9px 12px; }
.ls .bid-top { flex: 1 1 0; min-width: 0; margin: 0; justify-content: flex-start; }
.ls .bid-q { text-align: start; }
.ls .bid-btns { flex: none; flex-wrap: nowrap; }
.ls .bid-btns .btn { flex: none; min-width: 96px; }
.bid-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bid-btns .btn { flex: 1 1 22%; min-width: 74px; font: 20px/1.2 Lalezar, sans-serif; padding: 10px 8px 7px; }
.bid-btns .btn.hinted { animation: bidPulse 1s ease-in-out infinite; box-shadow: 0 0 0 3px #FFE3A0, 0 0 22px rgba(255, 220, 130, .8); }
@keyframes bidPulse { 50% { transform: scale(1.06); box-shadow: 0 0 0 3px #FFE3A0, 0 0 32px rgba(255, 220, 130, 1); } }
.suit-b { background: rgba(255, 255, 255, .06) !important; border: 1px solid rgba(232, 184, 74, .45) !important; color: var(--ink) !important; }
.suit-b .big { font-size: 34px; line-height: 1; } .suit-b.r .big { color: #E5484D; } .suit-b.k .big { color: #F3EBDD; }
.pick-list:has(.suit-b) { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.suit-b.lock span { font: 20px/1.2 Lalezar, sans-serif; }

/* the narrator's word */
.banner { position: absolute; left: 50%; top: calc(var(--center-top) - 30px); transform: translate(-50%, 0) scale(.7); z-index: 46; pointer-events: none; text-align: center; opacity: 0;
  font: 54px/1.05 Lalezar, sans-serif; color: var(--gold2); -webkit-text-stroke: 2px #3A1406; paint-order: stroke; text-shadow: 0 6px 26px rgba(0, 0, 0, .7); transition: transform .35s cubic-bezier(.2, 1.4, .4, 1), opacity .25s; }
.banner.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.banner small { display: block; font: 600 14px "Readex Pro", sans-serif; -webkit-text-stroke: 0; color: var(--ink); margin-top: 4px; }
.banner.ours { color: #B8F5C8; } .banner.dbl { color: #FFB89A; } .banner.proj { color: #FFE3A0; font-size: 44px; }

/* seats */
.seat .buyer { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); z-index: 6; white-space: nowrap; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 9px;
  background: linear-gradient(#FFE3A0, #E8B84A); color: var(--coffee); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.seat .buyer .sym.k { color: #17171D; } .seat .buyer .sym.r { color: #B11A25; }
.me-seat .buyer { top: -14px; left: auto; right: 0; transform: none; }
.seat.won .av { animation: wonPulse .7s ease-out; }
@keyframes wonPulse { 40% { box-shadow: 0 0 0 4px #9FE6AE, 0 0 26px 8px rgba(120, 230, 150, .6); } }
.seat .bub.pass { background: rgba(20, 11, 8, .95); color: var(--muted); font-weight: 500; }
.seat .bub.pass::before { border-bottom-color: rgba(20, 11, 8, .95); }
.me-seat .bub.pass::before { border-top-color: rgba(20, 11, 8, .95); }
.seat .bub.teach { width: max-content; max-width: min(230px, calc(100vw - 32px)); font-size: 13px; line-height: 1.5; white-space: normal; }
.seat .bub.proj { background: linear-gradient(#FFF1C2, #E8B84A); }
.seat .bub .sym.k { color: #17171D; }
.proj-show { position: absolute; top: calc(var(--av) + 18px); left: 50%; transform: translateX(-50%); display: flex; z-index: 9; animation: fade .3s; }
.proj-show i { width: 30px; height: 45px; margin-inline-start: -10px; }
.proj-show i:first-child { margin-inline-start: 0; }
.proj-show .cd { width: 100%; height: 100%; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .5)); }
.proj-show.out { opacity: 0; transition: opacity .4s; }
.pt .seat[data-i="1"] .bub, .pt .seat[data-i="1"] .proj-show, .pt .seat[data-i="1"] .buyer { left: auto; right: calc(50% - var(--av) / 2); transform: none; }
.pt .seat[data-i="3"] .bub, .pt .seat[data-i="3"] .proj-show, .pt .seat[data-i="3"] .buyer { left: calc(50% - var(--av) / 2); transform: none; }
.pt .seat[data-i="1"] .bub::before { left: auto; right: 22px; } .pt .seat[data-i="3"] .bub::before { left: 22px; }
.pt .seat[data-i="1"] .bub, .pt .seat[data-i="3"] .bub { animation-name: bubMe; transform-origin: 28px 0; }
.pt .seat[data-i="1"] .bub { transform-origin: calc(100% - 28px) 0; }
.pt .seat[data-i="1"] .bub.out, .pt .seat[data-i="3"] .bub.out { animation-name: bubOutMe; }

/* the logo's fan */
.bl-fan i { width: 62px; height: 93px; margin-left: -31px; }

/* the hand's result */
.bl-over { gap: 10px; }
.res { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-variant-numeric: tabular-nums; }
.res th, .res td { padding: 6px 10px; text-align: center; }
.res thead th { color: var(--gold2); font: 18px Lalezar, sans-serif; font-weight: 400; }
.res tbody th { text-align: start; color: var(--muted); font-weight: 500; font-size: 13px; }
.res tbody td { background: rgba(255, 255, 255, .05); font-weight: 600; }
.res tbody td:first-of-type { border-radius: 0 10px 10px 0; } .res tbody td:last-of-type { border-radius: 10px 0 0 10px; }
.res tfoot th { text-align: start; color: var(--gold2); font-size: 14px; }
.res tfoot td { font: 26px/1 Lalezar, sans-serif; color: var(--ink); }
.res tfoot td.big { color: #9FE6AE; }
.res-total { margin: 0; text-align: center; font-size: 14.5px; } .res-total b { color: var(--gold2); font-size: 18px; } .res-total small { color: var(--muted); }
.res-note { margin: 0; text-align: center; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

/* the analysis */
.ana-card { width: min(560px, 100%); max-height: 100%; }
.ana-body { flex: 1 1 auto; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.stats-body, .shop-list { flex: 1 1 auto; }
.mode-chip .tk { font-weight: 500; font-size: 11.5px; color: var(--muted); }
.ana-h { margin: 6px 0 2px; font-size: 15px; color: var(--gold2); }
.ana-tricks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.ana-tricks li { display: grid; grid-template-columns: 22px minmax(0, 1fr) 40px; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.ana-tricks li.ours { background: rgba(43, 160, 90, .14); }
.ana-tricks .an { font: 16px Lalezar, sans-serif; color: var(--muted); text-align: center; }
.ana-tricks .ac { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.mc { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.mc i { width: 34px; height: 51px; display: block; border-radius: 5px; }
.mc i .cd { width: 100%; height: 100%; }
.mc.w i { box-shadow: 0 0 0 2px #9FE6AE, 0 0 12px rgba(120, 230, 150, .6); }
.mc small { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mc.lead small { color: var(--gold2); }
.ana-tricks .ap { font: 18px/1 Lalezar, sans-serif; text-align: center; color: var(--gold2); }
.ana-tricks .ap small { display: block; font: 500 10px "Readex Pro", sans-serif; color: var(--muted); }
.ana-proj { margin: 0; padding: 0 18px 0 0; font-size: 13px; line-height: 1.8; }
.ana-proj .off { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.ana-count { font-size: 13.5px; line-height: 1.75; background: rgba(255, 255, 255, .04); border-radius: 12px; padding: 8px 12px; }
.ana-count p { margin: 0 0 4px; }

/* «لنا / لهم» on paper */
.paper { width: min(380px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 14px; border-radius: 6px; color: #1E2A4A;
  background: repeating-linear-gradient(#FBF6E8 0 33px, #A9C1DC 33px 34px); box-shadow: 0 18px 40px rgba(0, 0, 0, .55); transform: rotate(-1.2deg); }
.paper-body { overflow-y: auto; min-height: 0; font-family: "Aref Ruqaa", serif; position: relative; }
.paper-body::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #C21F2B; opacity: .8; }
.ps-head, .ps-rows li, .ps-total { display: grid; grid-template-columns: 1fr 1fr; text-align: center; }
.ps-head { font-size: 30px; font-weight: 700; color: #1B2A55; height: 46px; align-items: center; }
.ps-rows { list-style: none; margin: 0; padding: 0; }
.ps-rows li { height: 34px; align-items: center; font-size: 24px; color: #24356B; }
.ps-total { border-top: 3px double #24356B; margin-top: 4px; padding-top: 4px; font-size: 32px; font-weight: 700; color: #102050; }
.ps-target { margin: 6px 0 0; text-align: center; font-size: 18px; color: #6A5A3A; }
.paper .btn { transform: rotate(1.2deg); }

/* stats */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.st { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.st b { font: 24px/1.1 Lalezar, sans-serif; color: var(--gold2); } .st small { font-size: 11.5px; color: var(--muted); text-align: center; }
.stats-body { overflow-y: auto; min-height: 0; }

/* the store: the look of the cards */
.sty-prev { display: flex; justify-content: center; padding: 10px 0 4px; }
.sty-prev i { width: 50px; height: 75px; margin-inline-start: -14px; transform: rotate(var(--r, 0deg)); }
.sty-prev i:first-child { margin: 0; --r: -8deg; } .sty-prev i:last-child { --r: 8deg; }
.sty-prev .cd { width: 100%; height: 100%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }

/* the menu's segmented choices */
.bl .menu-card .seg { align-self: stretch; } .bl .menu-card .seg button { flex: 1; }
.bl .friends-btn:disabled { opacity: .55; cursor: default; }
.bl .menu-row { flex-wrap: wrap; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .banner { transition: none; } .up-card.flip, .seat.won .av, .bid-btns .btn.hinted { animation: none; } }

/* «بلوت» online: practice in the menu, the friends' table with its four seats */
.bl .practice { display: flex; flex-direction: column; gap: 6px; align-items: stretch; padding-top: 4px; border-top: 1px dashed rgba(232, 184, 74, .25); }
.bl .practice .btn { padding: 10px 12px; font-size: 14.5px; }
.bl .practice .seg button { flex: 1; min-width: 0; padding: 6px 8px; font-size: 13px; }
.room-hint { margin: 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.room-table { position: relative; height: 318px; flex: none; border-radius: 18px; overflow: hidden; background: radial-gradient(70% 70% at 50% 50%, rgba(160, 40, 34, .55), rgba(40, 14, 10, .7)); border: 1px solid rgba(232, 184, 74, .3); }
.rt-rug { position: absolute; left: 50%; top: 50%; width: 96px; height: 64px; transform: translate(-50%, -50%); border-radius: 8px; border: 2px dashed rgba(232, 184, 74, .35); }
.rt-seat { position: absolute; width: 104px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(20, 11, 8, .55); color: var(--ink); }
.rt-seat .rs-av { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; position: relative; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #5a3a26, #22140c); }
.rt-seat .rs-av > * { width: 100%; height: 100%; } .rt-seat .rs-av.empty { font: 24px Lalezar, sans-serif; color: var(--gold2); border: 2px dashed rgba(232, 184, 74, .55); background: none; }
.rt-seat b { font-size: 13px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rt-seat small { font-size: 10.5px; color: var(--muted); }
.rt-seat .rt-role { font-style: normal; font-size: 10px; font-weight: 700; color: var(--gold2); }
.rt-seat.ok small { color: #9FE6AE; } .rt-seat.off { opacity: .55; } .rt-seat.free { cursor: pointer; } .rt-seat.free:hover { border-color: var(--gold); }
.rt-seat.taken { cursor: default; }
.rt-0 { left: 50%; bottom: 6px; transform: translateX(-50%); } .rt-2 { left: 50%; top: 6px; transform: translateX(-50%); }
.rt-1 { right: 6px; top: 50%; transform: translateY(-50%); } .rt-3 { left: 6px; top: 50%; transform: translateY(-50%); }
.rt-2 .rt-role { color: #9FE6AE; }
.room-opts { display: flex; flex-direction: column; gap: 8px; } .room-opts .seg button { flex: 1; }
.bl-watch-n { position: absolute; top: calc(var(--safe-t) + var(--top-h) + 4px); inset-inline-start: 12px; z-index: 30; }
.bl .watch-bar { bottom: calc(var(--safe-b) + var(--hand-h) + var(--me-h) + 8px); }

/* a phone on its side: the table is made for a phone standing up */
.rotate { display: none; }
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  .rotate { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center;
    background: radial-gradient(ellipse at 50% 40%, #3A2416, #160C07 75%); }
  .rotate b { font: 30px/1.2 Lalezar, sans-serif; color: var(--gold2); }
  .rotate span { font-size: 15px; color: var(--muted); }
  .rot-phone { position: relative; width: 44px; height: 76px; margin-bottom: 14px; border: 3px solid var(--gold2); border-radius: 10px; animation: rotPhone 2.4s ease-in-out infinite; }
  .rot-phone::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 14px; height: 3px; margin-left: -7px; border-radius: 2px; background: var(--gold2); }
}
@keyframes rotPhone { 0%, 20% { transform: rotate(-90deg); } 55%, 100% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .rot-phone { animation: none; } }

/* a game against the computer kept on this device: closed and opened again, «كمّل» carries on */
.resume-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 13px; border-radius: 15px; border: 1px solid rgba(43, 212, 106, .45); background: rgba(43, 212, 106, .1); color: var(--ink); text-align: start; cursor: pointer; }
.resume-btn[hidden] { display: none; }
.rs-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rs-t b { font: 700 15px/1.3 "Readex Pro", sans-serif; } .rs-t small { font-size: 11.5px; color: #9FE6AE; }
.rs-go { flex: none; font: 600 13px "Readex Pro", sans-serif; color: var(--coffee); background: linear-gradient(#FFE3A0, #E8B84A); padding: 6px 12px; border-radius: 10px; }

/* the banners at the top of the menu (tables/banners.js, 2026-11-15) */
.gb-host { width: 100%; max-width: 520px; margin: 2px auto 12px; }
/* a phone: the bar holds the menu, the name, the score, the voice, the connection (tables/tablenet.js, 2026-11-17), the
   music and the sound — a little tighter so none falls off its edge (before the connection, the smallest phones lost the
   sound button already) */
@media (max-width: 430px) {
  #bar { gap: 6px; }
  #bar .ic { width: 38px; height: 38px; }
  #bar .tn-chip { padding: 0 7px; height: 34px; }
  .score-chip span { min-width: 38px; padding: 1px 6px; }
}
@media (max-width: 370px) { #bar { padding: 0 8px; } .brand { font-size: 21px; } }

/* back to the site (2026-11-18): in the lobby, in the menu button's place (it shows during a game) */
#siteBack { display: none; text-decoration: none; }
.at-menu #siteBack { display: grid; }
.at-menu #menuBtn { display: none; }
#siteBack svg { stroke-width: 2.4; }
