/* Xeri (static/js/games/xeri.js): a long rectangular table — slate, dark oak, marble or navy leather, always with a
   thin copper inlay round it — the pile in the middle, the deck beside it, the others on brass name plates round the
   edge, your cards along the bottom. Four tables (.xrt-*) and three card backs (drawn in the js); each player may
   choose their own. Its own look: nothing here is shared with the other card games. */

/* ---------- the tables ---------- */
.xrt-slate { --t1: #3a3f45; --t2: #24282d; --t3: #15181b; --inlay: #c47a42; --inlay2: #f3c79b; --ink: #f4ede2; --plate: rgba(20,22,25,.82);
  --grain: repeating-linear-gradient(115deg, rgba(255,255,255,.018) 0 2px, transparent 2px 7px), repeating-linear-gradient(25deg, rgba(0,0,0,.08) 0 1px, transparent 1px 11px); }
.xrt-oak { --t1: #5b3b22; --t2: #3d2614; --t3: #22140a; --inlay: #d39a5c; --inlay2: #f6d3a6; --ink: #fbf1e2; --plate: rgba(30,18,9,.82);
  --grain: repeating-linear-gradient(90deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3px, rgba(255,220,170,.04) 3px 4px, transparent 4px 12px), repeating-linear-gradient(0deg, transparent 0 118px, rgba(0,0,0,.35) 118px 120px); }
.xrt-marble { --t1: #ece8e1; --t2: #d6d0c6; --t3: #b9b1a4; --inlay: #a8652f; --inlay2: #e2a66c; --ink: #2a221a; --plate: rgba(250,247,240,.9);
  --grain: linear-gradient(118deg, transparent 30%, rgba(90,80,70,.16) 31%, transparent 33%, transparent 58%, rgba(90,80,70,.12) 59.5%, transparent 61%), linear-gradient(32deg, transparent 44%, rgba(120,105,90,.12) 45%, transparent 47%); }
.xrt-navy { --t1: #1f3a5c; --t2: #132741; --t3: #0a1626; --inlay: #c9925a; --inlay2: #f1cfa4; --ink: #eef3fb; --plate: rgba(9,18,32,.84);
  --grain: radial-gradient(circle at 20% 30%, rgba(255,255,255,.03) 0 1px, transparent 1px) 0 0 / 5px 5px, radial-gradient(circle at 70% 60%, rgba(0,0,0,.18) 0 1px, transparent 1px) 0 0 / 4px 4px; }

/* ---------- a card ---------- */
.xrc { position: relative; display: block; width: var(--cw, 80px); aspect-ratio: 2 / 3; flex: none; border-radius: calc(var(--cw, 80px) * .075); }
.xrc .xrsvg, .xr-hc .xrsvg { display: block; width: 100%; height: 100%; }
.xr-ghost { position: fixed; z-index: 95; pointer-events: none; will-change: transform; filter: drop-shadow(0 10px 14px rgba(0,0,0,.5)); }
.xr-ghost .xrc { width: 100%; }
.xr-ghost.xr-hold { transform: rotate(-4deg) scale(1.08); }

/* ---------- the page: the table on one screen, nothing scrolls ---------- */
html:has(body.game-xeri[data-page="table"]) { overflow: hidden; }
body.game-xeri[data-page="table"] .site-foot { display: none; }
body.game-xeri[data-page="table"] .chat-fab { display: none !important; }
body.game-xeri[data-page="table"] #table.page { max-width: none; height: calc(100dvh - var(--top)); box-sizing: border-box; overflow: hidden; padding: 10px 14px; }
body.game-fs .xr-wrap { height: 100%; }
.xr-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; height: 100%;
  --cw: clamp(56px, 6vw, 92px); color: var(--ink); }

/* ---------- the bar: the deal, the tools ---------- */
.xr-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 5px 6px 5px 14px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0)), #121315; border: 1px solid rgba(196,122,66,.35); box-shadow: 0 10px 22px -14px rgba(0,0,0,.9); color: #f4ede2; }
.xr-info { min-width: 0; font: 700 12.5px 'Inter', system-ui, sans-serif; letter-spacing: .3px; color: #d9c6b2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xr-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.xr-tool { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 36px; height: 36px; padding: 0; border-radius: 9px; cursor: pointer;
  color: #f4ede2; font: 800 12.5px 'Inter', system-ui, sans-serif; background: linear-gradient(180deg, #2a2b2e, #18191b); border: 1px solid rgba(196,122,66,.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.xr-tool:hover { border-color: #e9a873; color: #fff; }
.xr-tool svg.i { width: 17px; height: 17px; }
.xr-tool.wide { width: auto; padding: 0 12px; white-space: nowrap; }
.xr-tool.hidden { display: none; }
.xr-tool > b { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; display: grid; place-items: center;
  font-size: 10.5px; color: #fff; background: #c2412d; }
.xr-tool > b.hidden { display: none; }
.xr-tool.xr-leave:hover { border-color: rgba(255,110,90,.7); color: #ffb3a8; }
.xr-mute .tv-snd-off { display: none; }
body.tv-muted .xr-mute .tv-snd-off { display: inline; } body.tv-muted .xr-mute .tv-snd-on { display: none; }

/* ---------- the table: a long slab with a copper inlay, its edge bevelled ---------- */
.xr-table { position: relative; min-height: 0; border-radius: 26px; isolation: isolate;
  background: var(--grain), radial-gradient(ellipse 70% 60% at 50% 42%, var(--t1), var(--t2) 70%, var(--t3));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.07), inset 0 0 0 14px rgba(0,0,0,.18), inset 0 0 0 15px var(--inlay), inset 0 0 0 16px color-mix(in srgb, var(--inlay2) 60%, transparent),
    inset 0 2px 30px rgba(0,0,0,.5), 0 2px 0 rgba(255,255,255,.06), 0 24px 40px -18px rgba(0,0,0,.95), 0 6px 0 -1px color-mix(in srgb, var(--t3) 70%, #000); }
.xr-table::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse 50% 28% at 50% 6%, rgba(255,255,255,.12), transparent 70%), radial-gradient(ellipse 80% 50% at 50% 110%, rgba(0,0,0,.35), transparent 70%); }
/* the score of the two teams, on a copper strip at the top */
.xr-score { position: absolute; left: 26px; top: 24px; z-index: 6; flex-direction: column; align-items: flex-start; gap: 6px !important; display: flex; align-items: center; gap: 10px; padding: 5px 12px; border-radius: 10px;
  background: var(--plate); border: 1px solid color-mix(in srgb, var(--inlay) 70%, transparent); box-shadow: 0 8px 18px -10px rgba(0,0,0,.8); white-space: nowrap; }
.xr-score.hidden { display: none; }
.xr-team { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.xr-team > b { font-weight: 800; opacity: .85; }
.xr-team.us > b { color: var(--inlay2); opacity: 1; }
.xr-vs { display: none; }

/* ---------- the others: on brass plates round the edge ---------- */
.xr-opps { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.xr-opp { position: absolute; display: grid; justify-items: center; gap: 6px; }
.xr-opp.at-t { left: 50%; top: 18px; transform: translateX(-50%); grid-template-columns: auto auto auto; align-items: center; column-gap: 14px; }
.xr-opp.at-l { left: 22px; top: 50%; transform: translateY(-50%); }
.xr-opp.at-r { right: 22px; top: 50%; transform: translateY(-50%); }
.xr-plate { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 12px; background: var(--plate);
  border: 1px solid color-mix(in srgb, var(--inlay) 60%, transparent); box-shadow: 0 6px 14px -8px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.07); }
.xr-opp.turn .xr-plate { border-color: var(--inlay2); box-shadow: 0 0 0 1px var(--inlay), 0 0 22px -4px var(--inlay), 0 6px 14px -8px rgba(0,0,0,.8); }
.xr-opp.mate .xr-plate { background: color-mix(in srgb, var(--plate) 80%, var(--inlay)); }
.xr-av { position: relative; display: grid; place-items: center; width: 42px; height: 42px; padding: 3px; box-sizing: border-box; border-radius: 11px; flex: none; }
.xr-tring { position: absolute; inset: 0; border-radius: 11px; background: rgba(255,255,255,.1); }
.xr-opp.turn .xr-tring, .xr-dock.my-turn .xr-tring { background: conic-gradient(from 0deg, var(--inlay2), var(--inlay) calc(var(--k, 1) * 360deg), rgba(255,255,255,.08) 0);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--inlay) 90%, transparent)); }
.xr-avi { position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 8px; overflow: hidden; color: #fff; font-weight: 900; font-size: 16px;
  background: linear-gradient(160deg, rgba(255,255,255,.35), transparent 50%), var(--bg); box-shadow: 0 0 0 1.5px rgba(0,0,0,.6); }
.xr-avi svg.i { width: 20px; height: 20px; } .xr-avi .ava-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xr-pn { display: grid; line-height: 1.15; min-width: 0; }
.xr-pn b { font-size: 12.5px; font-weight: 800; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xr-pn small { font-size: 10.5px; font-weight: 700; opacity: .65; }
.xr-backs { position: relative; display: block; width: 92px; height: 46px; }
.xr-backs i { position: absolute; left: 50%; bottom: 0; width: 26px; aspect-ratio: 2 / 3; margin-left: -13px; transform-origin: 50% 130%; transform: rotate(calc(var(--k) * 11deg));
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.xr-backs i .xrsvg { display: block; width: 100%; height: 100%; }
.xr-opp.at-l .xr-backs, .xr-opp.at-r .xr-backs { order: 2; }
/* the cards a side took: a squared stack, its number, copper tokens for the xeris */
.xr-taken { display: inline-flex; align-items: center; gap: 8px; }
.xr-tk-st { position: relative; display: block; width: 28px; aspect-ratio: 2 / 3; }
.xr-tk-st i { position: absolute; inset: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.xr-tk-st i:first-child { transform: translate(-2px, 2px) rotate(-4deg); }
.xr-tk-st i .xrsvg { display: block; width: 100%; height: 100%; }
.xr-tk-st.none { border-radius: 4px; border: 1.5px dashed color-mix(in srgb, var(--ink) 30%, transparent); }
.xr-tk-st em { position: absolute; right: -9px; bottom: -6px; z-index: 2; min-width: 20px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; display: grid; place-items: center;
  font-style: normal; font-size: 10.5px; font-weight: 900; color: #1b1006; background: linear-gradient(180deg, #f3c79b, #c47a42); box-shadow: 0 2px 5px rgba(0,0,0,.5); }
.xr-tk-i { display: grid; justify-items: start; line-height: 1; }
.xr-tk-i b { font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--inlay2); }
.xr-tk-i small { font-size: 9.5px; font-weight: 700; opacity: .7; }
.xr-xtok { display: flex; gap: 2px; margin-top: 3px; }
.xr-xtok i { width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe2c2, #c47a42 55%, #6e3a17); box-shadow: 0 0 6px rgba(233,168,115,.8); }
.xr-xtok u { text-decoration: none; font-size: 10px; font-weight: 900; color: var(--inlay2); }

/* ---------- the middle: the pile and the deck ---------- */
.xr-center { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); z-index: 4; display: flex; align-items: center; gap: calc(var(--cw) * .7); }
.xr-deck { position: relative; width: calc(var(--cw) * .82); aspect-ratio: 2 / 3; }
.xr-deck .xrc.d { position: absolute; inset: 0; width: 100%; transform: translate(calc(var(--i) * -1.5px), calc(var(--i) * -1.5px)); filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.xr-deck em { position: absolute; z-index: 5; left: 50%; bottom: -12px; transform: translateX(-50%); font-style: normal; font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 8px;
  color: #f4ede2; background: rgba(12,12,14,.85); border: 1px solid color-mix(in srgb, var(--inlay) 60%, transparent); }
.xr-deck.none { opacity: 0; }
.xr-deck.riffle .xrc.d:nth-child(odd) { animation: xrRiffA .32s ease-in-out 3; }
.xr-deck.riffle .xrc.d:nth-child(even) { animation: xrRiffB .32s ease-in-out 3; }
@keyframes xrRiffA { 50% { transform: translate(-16px, -4px) rotate(-9deg); } }
@keyframes xrRiffB { 50% { transform: translate(14px, -3px) rotate(8deg); } }
.xr-pile { position: relative; width: var(--cw); aspect-ratio: 2 / 3; cursor: pointer; border-radius: calc(var(--cw) * .075); }
.xr-pile::before { content: ''; position: absolute; inset: -14px; border-radius: 18px; border: 1.5px dashed color-mix(in srgb, var(--inlay) 50%, transparent); opacity: .55; transition: border-color .2s, box-shadow .2s, opacity .2s; }
.xr-pile.hot::before { opacity: 1; border-style: solid; border-color: var(--inlay2); box-shadow: 0 0 26px -2px var(--inlay), inset 0 0 18px -6px var(--inlay); }
.xr-pile .xrc { position: absolute; inset: 0; width: 100%; transform: translate(var(--x), var(--y)) rotate(var(--r)); filter: drop-shadow(0 3px 5px rgba(0,0,0,.45)); }
.xr-pile .xrc.land { animation: xrLand .32s cubic-bezier(.3,1.5,.5,1); }
/* (it lands already turned and placed the way it lies: nothing moves when it arrives) */
.xr-pile .xrc.land { animation: none; }
/* a card under the pointer rises; the space it leaves below still counts as the card, so it never flickers */
.xr-hc.mine:hover::before { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 30px; }
.xr-pile.sweep .xrc { transition: transform .26s cubic-bezier(.5,0,.5,1); transform: translate(0, 0) rotate(0) scale(.96); }
.xr-pile.one .xrc:last-of-type { box-shadow: 0 0 0 2px color-mix(in srgb, var(--inlay2) 80%, transparent), 0 0 20px -2px var(--inlay); animation: xrOne 1.6s ease-in-out infinite; }
@keyframes xrOne { 50% { box-shadow: 0 0 0 2px var(--inlay2), 0 0 30px 0 var(--inlay); } }
.xr-pile-n { position: absolute; z-index: 30; right: -12px; top: -12px; font-style: normal; min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box; border-radius: 11px;
  display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #1b1006; background: linear-gradient(180deg, #f3c79b, #c47a42); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.xr-pile-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 6px; font-size: 10.5px; font-weight: 700; opacity: .55; line-height: 1.2; }

/* ---------- the word in the middle; the xeri stamp with its copper sparks ---------- */
.xr-banner { position: absolute; left: 50%; top: 24%; z-index: 25; transform: translateX(-50%); max-width: min(90%, 520px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none; padding: 8px 18px; border-radius: 10px; font: 800 14px 'Inter', system-ui, sans-serif; color: #f4ede2; background: rgba(14,14,16,.88);
  border: 1px solid color-mix(in srgb, var(--inlay) 70%, transparent); box-shadow: 0 12px 26px -12px rgba(0,0,0,.9); animation: xrBan .3s ease-out; }
.xr-banner.blank { display: none; }
.xr-banner.good { color: #1b1006; background: linear-gradient(180deg, #f6d6b3, #d9955c); border-color: #f3c79b; }
.xr-banner.gold { border-color: var(--inlay2); }
@keyframes xrBan { from { opacity: 0; transform: translate(-50%, -8px); } }
.xr-table > .paused21 { z-index: 26; }
.xr-fx { position: absolute; inset: 0; pointer-events: none; z-index: 28; overflow: visible; }
.xr-stamp { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%) rotate(-8deg); display: grid; justify-items: center; gap: 2px; padding: 10px 26px 8px;
  border-radius: 14px; border: 3px solid #e9a873; background: radial-gradient(ellipse at 50% 30%, rgba(60,30,12,.92), rgba(20,10,4,.94));
  box-shadow: 0 0 0 2px rgba(0,0,0,.6), 0 0 40px 4px rgba(233,168,115,.55), inset 0 0 22px rgba(233,168,115,.35); animation: xrStamp 1.9s cubic-bezier(.2,1.4,.4,1) forwards; }
.xr-stamp b { font: 900 clamp(30px, 5vw, 54px) Georgia, 'Times New Roman', serif; letter-spacing: 3px; color: transparent;
  background: linear-gradient(180deg, #fff1de, #f3c79b 35%, #c47a42 70%, #8a4a1f); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 2px 0 rgba(0,0,0,.6)); }
.xr-stamp small { font: 800 13px 'Inter', system-ui, sans-serif; color: #f6d6b3; }
@keyframes xrStamp { 0% { transform: translate(-50%, -50%) rotate(-8deg) scale(2.4); opacity: 0; } 14% { transform: translate(-50%, -50%) rotate(-8deg) scale(.94); opacity: 1; }
  22% { transform: translate(-50%, -50%) rotate(-8deg) scale(1.04); } 80% { opacity: 1; } 100% { transform: translate(-50%, -62%) rotate(-8deg) scale(1); opacity: 0; } }
.xr-spark { position: absolute; left: 50%; top: 46%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: radial-gradient(circle, #fff3e0, #e9a873 50%, transparent 70%);
  box-shadow: 0 0 8px #e9a873; animation: xrSpark 1.1s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes xrSpark { from { transform: translate(0, 0) scale(1.3); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

/* ---------- the time round the table: a copper line that empties ---------- */
/* (the turn's line round the table: on its own layer — it changes every frame, the table under it is not drawn again) */
.xr-timer { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; will-change: transform; }
.xr-timer rect { fill: none; stroke-width: 3.5; }
.xr-timer .tr-bg { stroke: rgba(0,0,0,.22); }
.xr-timer .tr-fg { stroke: color-mix(in srgb, var(--ink) 55%, transparent); stroke-linecap: round; stroke-dasharray: 100 100; transition: stroke .3s; }
.xr-timer.mine .tr-fg { stroke: var(--inlay2); }
.xr-timer.low .tr-fg { stroke: #ff6a4d; animation: xrLow .55s ease-in-out infinite alternate; }
/* the glow: two soft lines under the line (was a filter, drawn again every frame) */
.xr-timer .tr-g1, .xr-timer .tr-g2 { stroke-linecap: round; stroke-dasharray: 100 100; opacity: 0; transition: opacity .3s; }
.xr-timer.mine .tr-g1 { opacity: 1; stroke: var(--inlay); stroke-width: 8; stroke-opacity: .42; }
.xr-timer.mine .tr-g2 { opacity: 1; stroke: var(--inlay); stroke-width: 18; stroke-opacity: .13; }
.xr-timer.low .tr-g1 { opacity: 1; stroke: rgb(255 90 60); stroke-width: 9; stroke-opacity: .45; }
.xr-timer.low .tr-g2 { opacity: 1; stroke: rgb(255 90 60); stroke-width: 16; stroke-opacity: .12; }
.xr-timer.idle .tr-fg, .xr-timer.idle .tr-head, .xr-timer.idle .tr-g1, .xr-timer.idle .tr-g2 { opacity: 0; }
.xr-timer .tr-head { fill: #fff6ea; filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 10px var(--inlay2)); }
@keyframes xrLow { to { stroke-width: 5.5; } }

/* ---------- you: the dock and your six cards ---------- */
.xr-me { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; min-width: 0; }
.xr-dock { position: relative; display: flex; align-items: center; gap: 12px; margin: 0; padding: 7px 12px; border-radius: 12px; min-width: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)), #141517; border: 1px solid rgba(196,122,66,.35); color: #f4ede2; }
.xr-dock.my-turn { border-color: #e9a873; box-shadow: 0 0 0 1px rgba(233,168,115,.35), 0 0 24px -8px #c47a42; }
.xr-who { flex: none; display: flex; align-items: center; gap: 12px; }
.xr-dock-mid { flex: 1; min-width: 0; display: grid; gap: 2px; text-align: center; }
.xr-dock .turnlbl { display: flex; justify-content: center; gap: 10px; margin: 0; }
.xr-dock .turnlbl b { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xr-dock .turnlbl span { font-size: 12px; font-weight: 700; color: #e9a873; white-space: nowrap; }
.xr-dock .tbar { display: none; }
.xr-dock .xr-tk-i b { color: #f3c79b; }
.xr-hand { display: flex; justify-content: center; align-items: flex-end; min-width: 0; padding: 26px 8px calc(8px + env(safe-area-inset-bottom)); min-height: calc(var(--cw) * 1.5 + 26px); }
.xr-hc { position: relative; flex: none; width: calc(var(--cw) * 1.08); aspect-ratio: 2 / 3; padding: 0; border: 0; background: none; cursor: pointer; margin: 0 calc(var(--cw) * -.04);
  border-radius: calc(var(--cw) * .08); filter: drop-shadow(0 6px 8px rgba(0,0,0,.5)); transform: translateY(calc(var(--d) * var(--d) * 1.6px)) rotate(calc(var(--d) * 2.4deg));
  transform-origin: 50% 110%; transition: transform .2s cubic-bezier(.3,1.3,.5,1), filter .2s, opacity .15s; touch-action: none; }
.xr-hc:not(.mine) { cursor: default; }
/* (the card's picture rises, not the card itself: the place under the pointer never moves, so from the sides too it
   never flickers) */
.xr-hc .xrsvg { transition: transform .2s cubic-bezier(.3,1.3,.5,1); }
.xr-hc.mine:hover .xrsvg { transform: translateY(-10px); }
.xr-hc.sel .xrsvg { transform: none; }
.xr-hc.sel { z-index: 5; transform: translateY(-30px) rotate(0) scale(1.07); filter: drop-shadow(0 0 0 #e9a873) drop-shadow(0 0 14px rgba(233,168,115,.85)) drop-shadow(0 12px 14px rgba(0,0,0,.5)); }
.xr-hc.lifted { opacity: .25; }
.xr-hc.gone { opacity: 0; transform: translateY(-24px) scale(.9); transition: opacity .1s, transform .1s; }
.xr-hc.came { animation: xrCame .5s cubic-bezier(.3,1.3,.5,1); }
@keyframes xrCame { from { transform: translateY(-80px) rotate(-10deg) scale(.7); opacity: 0; } }
.xr-hand.dealt .xr-hc { animation: xrDeal .5s cubic-bezier(.3,1.2,.5,1) backwards; animation-delay: calc(var(--i) * 80ms + .25s); }
@keyframes xrDeal { from { transform: translateY(-180px) rotateY(90deg) scale(.6); opacity: 0; } }
.xr-hc.nope { animation: xrNope .35s; }
@keyframes xrNope { 25% { translate: -6px 0; } 75% { translate: 6px 0; } }

/* ---------- the end of a deal: a card of points ---------- */
.xr-res { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 12px; pointer-events: none; }
.xr-res.hidden { display: none; }
.xr-res-in { pointer-events: auto; width: min(520px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; box-sizing: border-box; padding: 16px 18px; border-radius: 16px; color: #f4ede2;
  background: linear-gradient(180deg, #1d1e21, #111214); border: 1px solid #c47a42; box-shadow: 0 0 0 4px rgba(196,122,66,.12), 0 30px 70px -20px rgba(0,0,0,.95); animation: xrIn .3s ease-out; }
@keyframes xrIn { from { transform: scale(.94) translateY(8px); opacity: 0; } }
.xr-res-in h3 { margin: 0 0 12px; text-align: center; font: 900 19px Georgia, 'Times New Roman', serif; letter-spacing: .5px; color: #f3c79b; }
.xr-rt { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.xr-rt th { padding: 6px 8px; font-size: 12px; font-weight: 800; text-align: right; color: #d9c6b2; border-bottom: 1px solid rgba(196,122,66,.4); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xr-rt th.us { color: #f3c79b; }
.xr-rt td { padding: 5px 8px; text-align: right; border-bottom: 1px solid rgba(255,255,255,.06); }
.xr-rt td:first-child { text-align: left; color: #bfae9c; font-weight: 600; }
.xr-rt td small { color: #e9a873; font-size: 10.5px; }
.xr-rt tr.sum td { font-weight: 800; color: #f6d6b3; border-bottom: 1px solid rgba(196,122,66,.4); }
.xr-rt tr.tot td { font-weight: 900; font-size: 16px; color: #fff; padding-top: 8px; }
.xr-res-n { margin: 12px 0 0; text-align: center; font-size: 12px; color: #a99886; }

/* ---------- home and my look ---------- */
.hero-xr .xr-art { display: flex; justify-content: center; padding: 4px 0 10px; }
.hero-xr .xr-art img { display: block; width: 100%; max-width: 320px; height: auto; filter: drop-shadow(0 14px 18px rgba(0,0,0,.5)); }
.xr-target { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); }
.xr-target button { font-size: 12.5px; font-weight: 900; }
.xr-lk { position: relative; display: block; width: 100%; height: 100%; min-height: 60px; border-radius: 10px; overflow: hidden;
  background: var(--grain), radial-gradient(ellipse at 50% 40%, var(--t1), var(--t2) 70%, var(--t3)); box-shadow: inset 0 0 0 2px var(--inlay); }
.xr-lk-c { position: absolute; top: 50%; width: 28%; max-width: 46px; aspect-ratio: 2 / 3; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.xr-lk-c .xrsvg { width: 100%; height: 100%; display: block; }
.xr-lk-c.b { left: 30%; transform: translate(-50%, -50%) rotate(-9deg); } .xr-lk-c.f { left: 64%; transform: translate(-50%, -50%) rotate(7deg); }
.logo-xr { width: 36px; height: 36px; flex: none; } .logo-xr img, .logo-xr svg { width: 36px; height: 36px; display: block; filter: drop-shadow(0 3px 5px rgba(0,0,0,.45)); }

@media (prefers-reduced-motion: reduce) {
  .xr-pile.one .xrc:last-of-type, .xr-deck.riffle .xrc, .xr-stamp, .xr-spark { animation: none !important; }
}

/* ---------- a computer: the tools on the table's corner, no bar ---------- */
@media (min-width: 761px) and (min-height: 521px) {
  .xr-wrap { grid-template-rows: minmax(0, 1fr) auto; }
  .xr-top { position: absolute; top: 10px; right: 10px; z-index: 30; padding: 0; background: none; border: 0; box-shadow: none; }
  .xr-top .xr-info { display: none; }
}
/* ---------- a phone ---------- */
@media (max-width: 760px) {
  .xr-wrap { --cw: clamp(46px, 13vw, 64px); }
  .xr-table { border-radius: 20px; }
  .xr-av { width: 34px; height: 34px; padding: 2px; border-radius: 9px; } .xr-tring { border-radius: 9px; }
  .xr-pn b { font-size: 11px; max-width: 74px; } .xr-pn small { display: none; }
  .xr-plate { padding: 3px 8px 3px 3px; gap: 6px; }
  .xr-backs { width: 60px; height: 32px; } .xr-backs i { width: 18px; margin-left: -9px; }
  .xr-opp.at-l { left: 12px; } .xr-opp.at-r { right: 12px; }
  .xr-opp.at-t { top: 12px; column-gap: 8px; }
  .xr-opp.at-l, .xr-opp.at-r { top: 44%; }
  .xr-opp.at-l .xr-taken, .xr-opp.at-r .xr-taken { flex-direction: column; gap: 3px; }
  .xr-tk-st { width: 22px; }
  .xr-score { top: auto; bottom: 10px; font-size: 11px; padding: 4px 8px; gap: 6px; } .xr-team > b { max-width: 70px; overflow: hidden; text-overflow: ellipsis; }
  .xr-dock { padding: 6px 9px; gap: 8px; } .xr-dock .turnlbl { flex-direction: column; gap: 0; min-width: 0; } .xr-dock .turnlbl b { font-size: 12.5px; }
  /* (a long sentence wraps inside the bar instead of running past its border) */
  .xr-dock-mid, .xr-dock .turnlbl { min-width: 0; max-width: 100%; }
  .xr-dock .turnlbl b { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; overflow-wrap: anywhere; }
  .xr-tool { width: 32px; height: 32px; }
  .xr-center { top: 54%; }
}
@media (max-width: 760px) and (orientation: portrait) {
  .xr-table { align-self: center; height: min(100%, 132vw); }
}
/* a phone sideways: no site bar, the table and your cards on one screen */
@media (orientation: landscape) and (max-height: 520px) {
  body.game-xeri[data-page="table"] .top { display: none; }
  body.game-xeri[data-page="table"] #table.page { height: 100dvh; margin: 0; padding: max(4px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(2px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
  .xr-wrap { --cw: clamp(38px, 10vh, 54px); gap: 4px; }
  .xr-top { padding: 3px 6px 3px 10px; } .xr-info { font-size: 11px; }
  .xr-av { width: 28px; height: 28px; padding: 2px; } .xr-pn small { display: none; }
  .xr-backs { width: 48px; height: 24px; } .xr-backs i { width: 14px; margin-left: -7px; }
  .xr-dock { padding: 4px 8px; } .xr-hand { padding-top: 14px; min-height: calc(var(--cw) * 1.5 + 14px); }
  .xr-score { left: auto; right: 16px; top: 12px; bottom: auto; flex-direction: row; align-items: center; padding: 3px 9px; gap: 12px !important; font-size: 11px; }
  .xr-score .xr-tk-st { display: none; } .xr-score .xr-tk-i b { font-size: 14px; }
  .xr-team > b { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .xr-tool { width: 30px; height: 30px; }
}

/* four players in teams: your partner and the others marked on the seats; a tap on a seat's button makes it your partner */
.seat-wrap.xa-mate .seat-row { box-shadow: inset 3px 0 0 #7fe25a; }
.seat-wrap.xa-foe .seat-row { box-shadow: inset 3px 0 0 #ff7a8a; }
.xa-team { align-self: flex-start; margin-top: 4px; padding: 2px 9px; border-radius: 999px; font: 900 10px/1.4 'Inter', system-ui, sans-serif; letter-spacing: .4px;
  text-transform: uppercase; cursor: pointer; border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s; }
.xa-team.mate { background: rgba(127,226,90,.2); color: #b5f58f; border-color: rgba(127,226,90,.55); }
.xa-team.foe { background: rgba(255,122,138,.12); color: #ffb3bd; border-color: rgba(255,122,138,.3); }
.xa-team.foe:hover { background: rgba(127,226,90,.14); color: #d8ffc4; border-color: rgba(127,226,90,.45); }

/* (2026-10-11) the points so far, big; under them in words the cards and the xeris taken */
.xr-tk-i { gap: 2px; }
.xr-tk-p { display: inline-flex; align-items: baseline; gap: 4px; }
.xr-tk-sub { font-size: 10px; font-weight: 700; opacity: .75; white-space: nowrap; }

/* (2026-10-12) a new deal: "preparing the cards" — a copper pill with a soft glow and three breathing dots */
.xr-prep { position: absolute; left: 50%; top: 50%; z-index: 30; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px 10px 14px; border-radius: 999px; pointer-events: none; font: 800 14px 'Inter', system-ui, sans-serif; letter-spacing: .3px; color: #f6dcc0;
  background: linear-gradient(180deg, rgba(40,26,18,.92), rgba(20,13,9,.92)); border: 1px solid rgba(233,168,115,.55);
  box-shadow: 0 0 0 4px rgba(233,168,115,.08), 0 0 26px -6px rgba(233,168,115,.7), 0 12px 24px -12px rgba(0,0,0,.8); animation: xrPrepIn .35s cubic-bezier(.3,1.3,.5,1); }
.xr-prep i { position: relative; width: 26px; height: 8px; flex: none;
  background: radial-gradient(circle, #e9a873 3px, transparent 3.5px) 0 50% / 9px 8px repeat-x; animation: xrPrepDots 1s steps(3) infinite; }
.xr-prep.out { opacity: 0; transform: translate(-50%, -50%) scale(.94); transition: opacity .3s, transform .3s; }
@keyframes xrPrepIn { from { opacity: 0; transform: translate(-50%, -40%) scale(.92); } }
@keyframes xrPrepDots { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.xr-ghost.xr-show { z-index: 94; }
@media (prefers-reduced-motion: reduce) { .xr-prep, .xr-prep i { animation: none; } }
