:root {
  --felt-1: #1e7d50;
  --felt-2: #0f5637;
  --felt-3: #05241a;
  --gold: #ffcc4d;
  --ivory: #fbf8f0;
  --red-1: #f4414b;   --red-2: #bd0f1c;
  --black-1: #4a4e5c; --black-2: #121419;
  --blue-1: #4583fa;  --blue-2: #0e36a8;
  --yellow-1: #ffc22e; --yellow-2: #ec8300;
  --font: 'Rubik', 'Bahnschrift', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 75% at 50% 40%, #0c4a30 0%, #05241a 60%, #021009 100%);
  font-family: var(--font);
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  overscroll-behavior: none;
}

/* The whole game is laid out on a fixed 1600x900 stage that is scaled to fit the window. */
#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1600px;
  height: 900px;
  transform-origin: 0 0;
  overflow: hidden;
  background:
    url(../img/noise.png),
    radial-gradient(ellipse 75% 70% at 50% 36%, var(--felt-1) 0%, var(--felt-2) 48%, var(--felt-3) 100%);
}
/* Until the script has scaled and centred it, the stage would sit unscaled from the middle of the
   window (its top-left corner at 50%/50%): keep it out of sight for that moment. */
#stage:not(.fitted) { visibility: hidden; }

button { font-family: inherit; cursor: pointer; border: 0; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ tiles */

.tile {
  position: relative;
  width: 5em;
  height: 7em;
  font-size: 16px;
  border-radius: .62em;
  background: linear-gradient(180deg, #ffffff 0%, #fbf8f0 55%, #efe9da 100%);
  box-shadow:
    inset 0 0 0 .06em rgba(255, 255, 255, .95),
    0 .12em 0 #d6ccb6,
    0 .24em 0 #c2b79c,
    0 .36em 0 #a89c80,
    0 .46em .3em rgba(0, 0, 0, .4);
  flex: none;
}

.tile .num {
  position: absolute;
  left: 0;
  right: 0;
  top: .5em;
  text-align: center;
  font-family: var(--font);
  font-weight: 800;
  font-size: 3.55em;
  line-height: 1;
  letter-spacing: -.04em;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tile .num.wide { font-size: 3.2em; letter-spacing: -.075em; top: .62em; text-indent: -.06em; }

.tile .pip {
  position: absolute;
  left: 50%;
  bottom: .78em;
  width: 1.3em;
  height: 1.3em;
  margin-left: -.65em;
  border-radius: 50%;
  background: linear-gradient(180deg, #ddd5c1, #faf6ec);
  box-shadow: inset 0 .08em .14em rgba(90, 70, 30, .35), 0 .05em 0 rgba(255, 255, 255, .9);
}
.tile .pip i {
  position: absolute;
  inset: .32em;
  border-radius: 50%;
  box-shadow: inset 0 -.06em .08em rgba(0, 0, 0, .3), 0 .04em .06em rgba(0, 0, 0, .3);
}

.tile.c-red .num    { background-image: linear-gradient(180deg, var(--red-1), var(--red-2)); }
.tile.c-black .num  { background-image: linear-gradient(180deg, var(--black-1), var(--black-2)); }
.tile.c-blue .num   { background-image: linear-gradient(180deg, var(--blue-1), var(--blue-2)); }
.tile.c-yellow .num { background-image: linear-gradient(180deg, var(--yellow-1), var(--yellow-2)); }
.tile.c-red .pip i    { background: radial-gradient(circle at 35% 30%, #ff8088, var(--red-2) 70%); }
.tile.c-black .pip i  { background: radial-gradient(circle at 35% 30%, #8a8f9f, var(--black-2) 70%); }
.tile.c-blue .pip i   { background: radial-gradient(circle at 35% 30%, #8fb6ff, var(--blue-2) 70%); }
.tile.c-yellow .pip i { background: radial-gradient(circle at 35% 30%, #ffe08a, var(--yellow-2) 70%); }
.tile.joker .pip i    { background: radial-gradient(circle at 35% 30%, #86e6ab, #0f7a3c 70%); }

.tile .star {
  position: absolute;
  left: 50%;
  top: .85em;
  width: 3.1em;
  height: 3.1em;
  margin-left: -1.55em;
}

/* Face-down */
.tile.back::before {
  content: '';
  position: absolute;
  inset: .55em .5em .6em;
  border-radius: .36em;
  background:
    repeating-linear-gradient(45deg, rgba(160, 138, 92, .13) 0 .14em, transparent .14em .46em),
    repeating-linear-gradient(-45deg, rgba(160, 138, 92, .13) 0 .14em, transparent .14em .46em),
    linear-gradient(180deg, #ebe4d2, #f5f0e3);
  box-shadow: inset 0 .06em .14em rgba(90, 70, 30, .3), 0 .05em 0 #fff;
}

/* The okey (wild) is marked with a golden rim */
.tile.okey {
  background: linear-gradient(180deg, #fffdf2 0%, #fff3c4 60%, #ffe69a 100%);
  box-shadow:
    inset 0 0 0 .16em #ffb300,
    0 .12em 0 #e0bf60,
    0 .24em 0 #cfa943,
    0 .36em 0 #a98220,
    0 .46em .3em rgba(0, 0, 0, .4);
}

/* ------------------------------------------------------------------ rack */

#rack {
  position: absolute;
  left: calc(50% - 650px);
  top: 594px;
  width: 1300px;
  height: 292px;
  border-radius: 12px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .6), 0 0 0 3px rgba(40, 20, 6, .55);
  transition: box-shadow .25s;
}
#rack.my-turn { box-shadow: 0 18px 34px rgba(0, 0, 0, .6), 0 0 0 3px var(--gold), 0 0 26px rgba(255, 204, 77, .55); }

.shelf {
  position: relative;
  height: 146px;
}
.shelf::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url(../img/wood.png) center / 100% 100% no-repeat #b9783d;
  box-shadow: inset 0 14px 16px -8px rgba(0, 0, 0, .5);
}
.shelf:first-child { border-radius: 12px 12px 0 0; }
.shelf:nth-child(2) { border-radius: 0 0 12px 12px; }
.shelf:nth-child(2)::before { transform: scaleX(-1); } /* mirror so the two grains differ */
/* The lip the tiles stand behind */
.shelf::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16px;
  background:
    linear-gradient(180deg, rgba(255, 235, 200, .55) 0 2px, rgba(255, 255, 255, 0) 2px 100%),
    linear-gradient(180deg, rgba(255, 220, 170, .18), rgba(40, 18, 4, .34)),
    url(../img/wood.png) center / 100% 900%;
  box-shadow: 0 -5px 7px rgba(0, 0, 0, .32), inset 0 -2px 0 rgba(30, 12, 2, .5);
  z-index: 3;
  pointer-events: none;
}

.cap {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, .12) 45%, rgba(0, 0, 0, .4)),
    url(../img/wood.png) center / 4000% 100%;
  z-index: 4;
  pointer-events: none;
}
.cap-left { left: 0; border-radius: 12px 0 0 12px; box-shadow: 3px 0 6px rgba(0, 0, 0, .35); }
.cap-right { right: 0; border-radius: 0 12px 12px 0; box-shadow: -3px 0 6px rgba(0, 0, 0, .35); }
.cap::before, .cap::after {
  content: '';
  position: absolute;
  left: 9px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #6a5a4a, #1d140c 75%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .25), 0 1px 0 rgba(255, 220, 170, .25);
}
.cap::before { top: 22px; }
.cap::after { bottom: 22px; }

#rack-tiles { position: absolute; inset: 0; z-index: 2; }
#rack-tiles.dragging { z-index: 10; } /* lift the tiles above the lips and end caps while one is carried */
#rack-tiles .tile {
  position: absolute;
  cursor: grab;
  transition: left .18s cubic-bezier(.2, .8, .3, 1), top .18s cubic-bezier(.2, .8, .3, 1);
  touch-action: none;
}
#rack-tiles .tile.drag {
  z-index: 50;
  cursor: grabbing;
  transition: none;
  will-change: transform;
}
#rack-tiles .tile.pop { animation: pop .28s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: translateY(-40px) scale(1.25); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------------------------ table */

.spot, .holder {
  position: absolute;
  width: 98px;
  height: 130px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .34), rgba(0, 0, 0, .2));
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.spot .tile, .holder .tile { font-size: 15.4px; margin-top: -5px; }
#spot-2 { left: calc(50% - 460px); top: 64px; }
#spot-1 { left: calc(50% + 362px); top: 64px; }
#spot-3 { left: calc(50% - 460px); top: 366px; }
#spot-0 { left: calc(50% + 362px); top: 366px; }
.spot-hint { position: absolute; font-size: 15px; font-weight: 500; color: rgba(255, 255, 255, .36); pointer-events: none; }
.spot.can-take, #pot-holder.can-take { box-shadow: 0 0 0 3px var(--gold), 0 0 22px rgba(255, 204, 77, .6); cursor: grab; }
.spot.can-take .tile, #pot-holder.can-take .tile { animation: nudge 1.4s ease-in-out infinite; }
.spot.drop-ok, #pot-holder.drop-ok { box-shadow: 0 0 0 3px #7dffb0, 0 0 22px rgba(125, 255, 176, .6); }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

#center { position: absolute; left: 0; right: 0; top: 206px; height: 130px; }
#center .holder { position: absolute; top: 0; }
#indicator-holder { left: calc(50% - 104px); }
#pot-holder { left: calc(50% + 6px); }
.holder-label {
  position: absolute;
  top: -28px;
  left: -20px;
  right: -20px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .55);
}
#pot-count {
  position: absolute;
  right: -14px;
  top: -14px;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 19px;
  background: linear-gradient(180deg, #3b3f4a, #15171c);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .25);
  font-weight: 700;
  font-size: 19px;
  line-height: 38px;
  text-align: center;
  z-index: 5;
}

#okey-info {
  position: absolute;
  left: 0; right: 0; top: 352px;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  color: rgba(255, 255, 255, .7);
}
#okey-info b { color: var(--gold); font-weight: 700; }

#banner {
  position: absolute;
  left: calc(50% - 380px); width: 760px; top: 400px;
  text-align: center;
  font-size: 23px;
  font-weight: 600;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .6);
  transition: color .2s;
}
#banner.toast { color: var(--gold); }

#context-buttons { position: absolute; left: 0; right: 0; top: 472px; display: flex; gap: 18px; justify-content: center; }
#sort-buttons { position: absolute; right: calc(50% - 648px); top: 526px; display: flex; gap: 12px; }

/* Seats */
.seat { position: absolute; display: flex; align-items: center; }
#seat-2 { left: 50%; top: 22px; transform: translateX(-50%); }
#seat-3 { left: 26px; top: 232px; }
#seat-1 { right: 26px; top: 232px; flex-direction: row-reverse; }
#seat-0 { left: calc(50% - 648px); top: 504px; }

.avatar {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .5);
  overflow: hidden;
  flex: none;
  z-index: 2;
  transition: border-color .25s, box-shadow .25s;
}
.avatar svg { width: 100%; height: 100%; display: block; }
.plate {
  min-width: 150px;
  margin-left: -22px;
  padding: 9px 20px 9px 34px;
  border-radius: 0 16px 16px 0;
  background: linear-gradient(180deg, rgba(8, 40, 28, .92), rgba(3, 22, 15, .92));
  box-shadow: 0 6px 14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .1);
}
#seat-1 .plate { margin: 0 -22px 0 0; padding: 9px 34px 9px 20px; border-radius: 16px 0 0 16px; text-align: right; }
.plate .name { font-size: 19px; font-weight: 700; }
.plate .score { font-size: 15px; font-weight: 500; color: rgba(255, 255, 255, .7); margin-top: 2px; }
.plate .score b { color: var(--gold); font-weight: 700; }
.seat.active .avatar { border-color: #57ff8f; box-shadow: 0 0 0 4px rgba(87, 255, 143, .28), 0 0 26px rgba(87, 255, 143, .85); }
.seat.active .plate { box-shadow: 0 6px 14px rgba(0, 0, 0, .4), inset 0 0 0 1.5px rgba(87, 255, 143, .6); }

#top-left { position: absolute; left: 22px; top: 20px; display: flex; gap: 10px; }
.icon-btn {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(180deg, rgba(10, 48, 33, .95), rgba(3, 24, 16, .95));
  box-shadow: 0 4px 10px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .14);
  display: grid;
  place-items: center;
}
.icon-btn svg { width: 26px; height: 26px; }
.icon-btn.off .waves { display: none; }
.icon-btn.off { color: rgba(255, 255, 255, .45); }
#hand-info { position: absolute; right: 26px; top: 30px; font-size: 18px; font-weight: 500; color: rgba(255, 255, 255, .75); }

/* ------------------------------------------------------------------ buttons */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .03em;
  color: #fff;
  text-shadow: 0 2px 2px rgba(0, 0, 0, .35);
  transition: transform .08s, filter .15s;
}
.btn:active { transform: translateY(3px); filter: brightness(.92); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-dark  { background: linear-gradient(180deg, #2e3138, #101216); box-shadow: 0 4px 0 #000, 0 8px 14px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-green { background: linear-gradient(180deg, #35c46f, #14843f); box-shadow: 0 4px 0 #0a5527, 0 8px 14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-red   { background: linear-gradient(180deg, #ff5d55, #c9221c); box-shadow: 0 4px 0 #84110d, 0 8px 14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-gold  { background: linear-gradient(180deg, #ffc23d, #e08a00); box-shadow: 0 4px 0 #8f5600, 0 8px 14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn.big { height: 62px; padding: 0 36px; font-size: 23px; border-radius: 14px; }
#context-buttons .btn { height: 56px; font-size: 22px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.mini-tiles { display: inline-flex; gap: 2px; }
.mini-tiles i {
  width: 17px;
  height: 23px;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, #ece5d3);
  color: var(--blue-2);
  font-style: normal;
  font-size: 15px;
  font-weight: 800;
  line-height: 23px;
  text-align: center;
  text-shadow: none;
}
.mini-tiles i:nth-child(1) { color: var(--red-2); }

/* ------------------------------------------------------------------ effects layer */

#fx { position: absolute; inset: 0; pointer-events: none; z-index: 60; }
#fx .tile { position: absolute; left: 0; top: 0; font-size: 15.4px; will-change: transform; }

/* ------------------------------------------------------------------ overlays */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(0, 12, 8, .62);
  animation: fade .25s;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.card {
  min-width: 760px;
  max-width: 1320px;
  padding: 34px 44px 38px;
  border-radius: 26px;
  background: linear-gradient(180deg, #0f4a31, #062619);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .7), inset 0 0 0 2px rgba(255, 204, 77, .35), inset 0 2px 0 rgba(255, 255, 255, .12);
  text-align: center;
  animation: rise .32s cubic-bezier(.2, 1.2, .4, 1);
}
.card.small { min-width: 480px; }
@keyframes rise { from { transform: translateY(30px) scale(.95); opacity: 0; } to { transform: none; opacity: 1; } }
.card h2 { margin: 0 0 6px; font-size: 40px; font-weight: 800; color: var(--gold); text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.card p { margin: 0 0 18px; font-size: 21px; font-weight: 500; color: rgba(255, 255, 255, .85); }
.card-buttons { display: flex; gap: 22px; justify-content: center; margin-top: 26px; }
.card-buttons.column { flex-direction: column; align-items: stretch; margin-top: 24px; }

#result-hand { display: flex; justify-content: center; gap: 20px; margin: 4px 0 20px; }
#result-hand .meld { display: flex; gap: 4px; }
#result-hand .tile { font-size: 12.6px; }

#result-table { margin: 0 auto; border-collapse: collapse; font-size: 21px; }
#result-table td { padding: 5px 26px; text-align: left; }
#result-table td:nth-child(2) { text-align: center; color: rgba(255, 255, 255, .55); font-weight: 600; }
#result-table td:nth-child(2).loss { color: #ff8a80; }
#result-table td:nth-child(3) { text-align: right; font-weight: 700; }
#result-table tr.winner td:first-child { color: var(--gold); font-weight: 700; }

/* ------------------------------------------------------------------ menu */

#menu {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background:
    url(../img/noise.png),
    radial-gradient(ellipse 70% 65% at 50% 30%, #1b7249 0%, #0b4a2f 50%, #04201a 100%);
}
.menu-inner { display: flex; flex-direction: column; align-items: center; }
.logo { text-align: center; }
.logo-tiles { display: flex; justify-content: center; gap: 8px; margin-bottom: 14px; }
.logo-tiles .tile { font-size: 13px; }
.logo-tiles .tile:nth-child(odd) { transform: rotate(-5deg) translateY(4px); }
.logo-tiles .tile:nth-child(even) { transform: rotate(4deg); }
.logo h1 { margin: 0; font-size: 104px; font-weight: 900; line-height: 1; letter-spacing: -.01em; color: #fff; text-shadow: 0 6px 0 rgba(0, 0, 0, .3), 0 14px 30px rgba(0, 0, 0, .45); }
.logo h1 span { color: var(--gold); }
.logo p { margin: 10px 0 0; font-size: 24px; font-weight: 500; color: rgba(255, 255, 255, .75); }

.options { margin-top: 34px; display: grid; gap: 14px; }
.option { display: grid; grid-template-columns: 250px auto; align-items: center; gap: 22px; }
.option label { text-align: right; font-size: 22px; font-weight: 500; color: rgba(255, 255, 255, .85); }
.option.disabled { opacity: .35; pointer-events: none; }
.seg { display: inline-flex; padding: 5px; gap: 5px; border-radius: 16px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4); justify-self: start; }
.seg button { min-width: 150px; height: 50px; padding: 0 20px; border-radius: 12px; background: transparent; color: rgba(255, 255, 255, .7); font-size: 20px; font-weight: 600; transition: background .15s, color .15s; }
.seg button.on { color: #fff; background: linear-gradient(180deg, #35c46f, #14843f); box-shadow: 0 3px 8px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); }

.btn-play {
  margin-top: 34px;
  width: 380px;
  height: 92px;
  border-radius: 22px;
  font-size: 44px;
  font-weight: 900;
  letter-spacing: .08em;
  background: linear-gradient(180deg, #ff6a5c, #cf241c);
  box-shadow: 0 7px 0 #84110d, 0 16px 30px rgba(0, 0, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .4);
}
.btn-play:active { transform: translateY(5px); box-shadow: 0 2px 0 #84110d, 0 8px 16px rgba(0, 0, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .4); }
.rules { max-width: 980px; margin: 30px 0 0; text-align: center; font-size: 17px; line-height: 1.5; color: rgba(255, 255, 255, .55); }

/* Portrait phones */
#rotate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  place-items: center;
  background: #04201a;
  padding: 30px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
}
@media (orientation: portrait) and (max-width: 700px) and (pointer: coarse) { #rotate { display: grid; } }
#rotate small { display: block; margin-top: 14px; font-size: 16px; font-weight: 400; color: rgba(255, 255, 255, .65); }

/* the part of the screen that is free of notches and rounded corners; the stage is fitted into it */
#safe {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  right: env(safe-area-inset-right, 0px);
  bottom: env(safe-area-inset-bottom, 0px);
  left: env(safe-area-inset-left, 0px);
  visibility: hidden;
  pointer-events: none;
}

/* ------------------------------------------------------------------ online */

.play-row { display: flex; gap: 26px; margin-top: 34px; }
.play-row .btn-play { margin-top: 0; width: 330px; }
.btn-online {
  background: linear-gradient(180deg, #4d9bff, #1553c9);
  box-shadow: 0 7px 0 #0b327d, 0 16px 30px rgba(0, 0, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .4);
}
.btn-online:active { box-shadow: 0 2px 0 #0b327d, 0 8px 16px rgba(0, 0, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .4); }

#online { z-index: 95; }
#online .card { width: 560px; }
#online .card.lobby { width: 1120px; padding-bottom: 30px; }
.lobby-cols { display: grid; grid-template-columns: 440px 1fr; gap: 30px; text-align: center; }
#online-form:not(.lobby) .lobby-cols { display: block; }
.lobby-left .card-buttons { margin-top: 16px; gap: 14px; }
.lobby-right { display: flex; flex-direction: column; min-width: 0; }
.lobby-right h3 { margin: 0 0 10px; font-size: 22px; font-weight: 700; color: var(--gold); text-align: left; }
#table-list {
  flex: 1;
  height: 440px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .3);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .45);
  touch-action: pan-y;
  scrollbar-width: thin;
}
.no-tables { margin: auto; padding: 0 30px; font-size: 19px; line-height: 1.45; color: rgba(255, 255, 255, .5); }
.table-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
  flex: none;
}
.table-info { flex: 1; min-width: 0; text-align: left; }
.table-status { font-size: 15px; font-weight: 600; color: #8fe3b0; margin-bottom: 7px; }
.table-status.playing { color: #ffcf7a; }
.table-seats { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 11px; border-radius: 13px; font-size: 16px; font-weight: 600; background: rgba(0, 0, 0, .35); white-space: nowrap; }
.chip.bot { color: rgba(255, 255, 255, .5); font-weight: 500; }
.chip.empty { color: #8fe3b0; background: rgba(53, 196, 111, .16); box-shadow: inset 0 0 0 1.5px rgba(53, 196, 111, .5); }
.table-row .btn { flex: none; height: 48px; }
.check { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; color: rgba(255, 255, 255, .8); cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: #35c46f; touch-action: auto; }
.field {
  width: 100%;
  height: 62px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: rgba(0, 0, 0, .38);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .1);
  color: #fff;
  font: 600 23px var(--font);
  text-align: center;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
  touch-action: auto;
}
.field::placeholder { color: rgba(255, 255, 255, .4); font-weight: 500; }
.field:focus { box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5), 0 0 0 2px var(--gold); }
.code-row { display: flex; gap: 12px; }
.code-row .field { text-transform: uppercase; letter-spacing: .14em; }
.code-row .btn { flex: none; }
.card .error { min-height: 26px; margin: 16px 0 0; color: #ff9a90; font-size: 19px; }

#wait-info b { color: var(--gold); font-size: 30px; letter-spacing: .12em; }
#invite { margin-top: 16px; display: grid; gap: 10px; }
.invite-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .38);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5);
  color: var(--gold);
  font-size: 18px;
  font-weight: 600;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}
#wait-seats { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#wait-seats li {
  height: 52px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .3);
  font-size: 22px;
  font-weight: 600;
  line-height: 52px;
}
#wait-seats li.empty { color: rgba(255, 255, 255, .35); font-weight: 500; }

/* Turn countdown on the active player's avatar */
.avatar-wrap { position: relative; flex: none; z-index: 2; }
.timer {
  position: absolute;
  left: -10px;
  top: -10px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 17px;
  background: linear-gradient(180deg, #35c46f, #14843f);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .35);
  font-size: 17px;
  font-weight: 700;
  line-height: 34px;
  text-align: center;
}
.timer.low { background: linear-gradient(180deg, #ff5d55, #c9221c); }

/* ------------------------------------------------------------------ chat */

#btn-chat { position: relative; }
#chat-badge {
  position: absolute;
  right: -7px;
  top: -7px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff5d55, #c9221c);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .5);
  font-size: 14px;
  font-weight: 700;
  line-height: 24px;
}

#chat {
  position: absolute;
  left: 22px;
  top: 84px;
  width: 330px;
  height: 420px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 52, 35, .97), rgba(4, 26, 18, .97));
  box-shadow: 0 18px 40px rgba(0, 0, 0, .6), inset 0 0 0 1.5px rgba(255, 204, 77, .3);
  overflow: hidden;
  animation: rise .2s ease-out;
}
#chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 8px 18px;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
}
#chat-close { width: 36px; height: 36px; border-radius: 10px; background: rgba(0, 0, 0, .3); color: #fff; font-size: 26px; line-height: 1; }
#chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 4px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  touch-action: pan-y;
  user-select: text;
  -webkit-user-select: text;
  scrollbar-width: thin;
}
#chat-log:empty::before { content: 'Henüz mesaj yok. İlk selamı sen ver!'; margin: auto; color: rgba(255, 255, 255, .4); font-size: 16px; text-align: center; }
.msg {
  align-self: flex-start;
  max-width: 88%;
  padding: 7px 12px;
  border-radius: 4px 14px 14px 14px;
  background: rgba(0, 0, 0, .34);
  font-size: 17px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.msg b { display: block; font-size: 13px; font-weight: 700; color: var(--gold); }
.msg.mine { align-self: flex-end; border-radius: 14px 4px 14px 14px; background: linear-gradient(180deg, #2a9f5b, #17713d); }
.msg.mine b { color: rgba(255, 255, 255, .75); text-align: right; }

#chat-quick { display: flex; gap: 6px; padding: 6px 12px; overflow-x: auto; touch-action: pan-x; scrollbar-width: none; flex: none; }
#chat-quick::-webkit-scrollbar { display: none; }
#chat-quick button { flex: none; height: 34px; padding: 0 12px; border-radius: 17px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 15px; font-weight: 500; }
#chat-quick button:active { background: rgba(255, 255, 255, .25); }

#chat-form { display: flex; gap: 8px; padding: 8px 12px 12px; flex: none; }
#chat-input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, .4);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .5);
  color: #fff;
  font: 500 17px var(--font);
  outline: none;
  user-select: text;
  -webkit-user-select: text;
  touch-action: auto;
}
#chat-input::placeholder { color: rgba(255, 255, 255, .4); }
#chat-input:focus { box-shadow: inset 0 2px 5px rgba(0, 0, 0, .5), 0 0 0 2px var(--gold); }
#chat-send { width: 50px; height: 46px; padding: 0; flex: none; }
#chat-send svg { width: 22px; height: 22px; }

/* Speech bubble by the player who spoke */
.bubble {
  position: absolute;
  left: 70px;
  top: -52px;
  z-index: 65;
  max-width: 300px;
  width: max-content;
  padding: 9px 14px;
  border-radius: 16px 16px 16px 4px;
  background: #fff;
  color: #1c2330;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45);
  animation: pop .22s cubic-bezier(.2, 1.4, .4, 1);
  pointer-events: none;
}
#seat-2 .bubble { top: 86px; left: 60px; border-radius: 4px 16px 16px 16px; }
#seat-1 .bubble { left: auto; right: 70px; border-radius: 16px 16px 4px 16px; }

/* ------------------------------------------------------------------ accounts */

#account, #leaders { z-index: 96; }
#account-bar { position: absolute; right: 28px; top: 24px; display: flex; align-items: center; gap: 12px; z-index: 2; }
#account-bar .btn { height: 46px; font-size: 18px; padding: 0 20px; }
#account-info { padding: 0 6px; font-size: 20px; font-weight: 700; color: var(--gold); white-space: pre; }
#account-form { display: grid; gap: 14px; }
#account .card { max-width: 580px; } /* a long line of text wraps instead of widening the card */
/* Facebook Login on the site: Facebook's blue, its "f", and a "ya da" line before the form */
.btn-fb { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 12px; color: #fff;
  background: linear-gradient(180deg, #3b8cff, #1668e3); box-shadow: 0 4px 0 #0b3f91, 0 8px 14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-fb .fb-f { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #1668e3;
  font: 900 24px/1 Arial, Helvetica, sans-serif; padding-top: 5px; box-sizing: border-box; }
#account .or-line { display: flex; align-items: center; gap: 12px; margin: 16px 0 14px; font-size: 16px; color: rgba(255, 255, 255, .55); }
#account .or-line::before, #account .or-line::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, .18); }
.hint { margin-top: 10px; font-size: 15px; line-height: 1.35; color: rgba(255, 255, 255, .6); }
.field:disabled { opacity: .75; color: var(--gold); }

.plate .score .total { margin-left: 10px; color: var(--gold); font-weight: 700; }
#result-table td.gain { text-align: right; font-weight: 700; color: rgba(255, 255, 255, .6); }
#result-table td.gain.plus { color: #7dffb0; }
#result-table td.gain.minus { color: #ff8a80; }

#leaders-list { max-height: 520px; overflow-y: auto; touch-action: pan-y; font-size: 20px; color: rgba(255, 255, 255, .7); scrollbar-width: thin; }
#leaders-list table { width: 100%; min-width: 620px; border-collapse: collapse; color: #fff; }
#leaders-list th { padding: 6px 14px; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .5); text-align: right; }
#leaders-list td { padding: 8px 14px; text-align: right; border-top: 1px solid rgba(255, 255, 255, .08); }
#leaders-list th:nth-child(2), #leaders-list td:nth-child(2) { text-align: left; font-weight: 700; }
#leaders-list td:nth-child(1) { width: 50px; color: rgba(255, 255, 255, .5); }
#leaders-list td:nth-child(3) { color: var(--gold); font-weight: 700; }
#leaders-list tr.me td { background: rgba(53, 196, 111, .18); }

/* ------------------------------------------------------------------ profiles */

#profile { z-index: 97; }
.avatar img, .profile-pic img, .mini-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.seat.has-profile { cursor: pointer; }
.profile-pic {
  width: 150px;
  height: 150px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 5px solid #fff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .5);
}
.profile-pic svg { width: 100%; height: 100%; display: block; }
#profile-bio { min-height: 26px; overflow-wrap: anywhere; }
.profile-stats { display: grid; gap: 6px; margin: 4px 0 0; padding: 14px 18px; border-radius: 14px; background: rgba(0, 0, 0, .3); }
.profile-stats div { display: flex; justify-content: space-between; font-size: 19px; color: rgba(255, 255, 255, .7); }
.profile-stats b { color: #fff; font-weight: 700; }
.profile-stats div:first-child b { color: var(--gold); }
.pic-buttons { display: flex; gap: 12px; justify-content: center; margin-bottom: 16px; }
.pic-buttons .btn { height: 46px; font-size: 18px; cursor: pointer; }
textarea.field { height: auto; padding: 12px 16px; font-size: 19px; line-height: 1.35; text-align: left; resize: none; }

#account-info { display: inline-flex; align-items: center; gap: 10px; background: none; cursor: pointer; font-family: inherit; }
.mini-pic { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; border: 2px solid #fff; flex: none; display: inline-block; vertical-align: middle; }
.mini-pic svg { width: 100%; height: 100%; display: block; }
#leaders-list .mini-pic { width: 32px; height: 32px; margin-right: 10px; }
#leaders-list tr { cursor: pointer; }
#leaders-list tr:hover td { background: rgba(255, 255, 255, .06); }

/* ------------------------------------------------------------------ friends, walls, private messages */

#friends, #messages { z-index: 97; }
#profile { z-index: 98; }
.card.wide { width: 1240px; max-width: 1240px; padding: 30px 34px; }
.card.mid { width: 760px; }
.btn-blue { background: linear-gradient(180deg, #4d9bff, #1553c9); box-shadow: 0 4px 0 #0b327d, 0 8px 14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); }
.badge {
  display: inline-block;
  min-width: 24px;
  height: 24px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff5d55, #c9221c);
  font-size: 14px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
  text-shadow: none;
}
.online::after { content: ''; display: inline-block; width: 11px; height: 11px; margin-left: 9px; border-radius: 50%; background: #45e07f; box-shadow: 0 0 8px #45e07f; vertical-align: middle; }
.wall-empty { margin: auto; padding: 26px 20px; text-align: center; font-size: 18px; line-height: 1.4; color: rgba(255, 255, 255, .5); }
#profile-form { max-width: 620px; margin: 0 auto; }

/* profile */
.profile-cols { display: grid; grid-template-columns: 380px 1fr; gap: 30px; text-align: center; }
.profile-wall { display: flex; flex-direction: column; min-width: 0; height: 690px; text-align: left; }
#post-form { flex: none; margin-bottom: 12px; padding: 12px; border-radius: 16px; background: rgba(0, 0, 0, .3); }
.post-tools { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.post-tools .btn { height: 44px; font-size: 17px; padding: 0 18px; cursor: pointer; }
.post-tools #post-send { margin-left: auto; }
#post-preview { position: relative; display: inline-flex; }
#post-preview img { height: 44px; border-radius: 8px; display: block; }
#post-preview button { position: absolute; right: -8px; top: -8px; width: 22px; height: 22px; border-radius: 50%; background: #c9221c; color: #fff; font-size: 15px; line-height: 1; }
#post-form .error { min-height: 0; margin: 6px 0 0; }
#post-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 6px; touch-action: pan-y; scrollbar-width: thin; }
.post { padding: 14px 16px; border-radius: 16px; background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); flex: none; }
.post-head { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.post-head span:last-child { margin-left: auto; font-size: 14px; color: rgba(255, 255, 255, .5); }
.post-text { margin-top: 10px; font-size: 19px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.post-image { display: block; max-width: 100%; max-height: 360px; margin-top: 10px; border-radius: 12px; cursor: zoom-in; }
.post-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.like { height: 36px; padding: 0 14px; border-radius: 18px; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .8); font-size: 17px; font-weight: 600; }
.like.on { background: rgba(255, 93, 85, .25); color: #ff8a80; }
.post-delete { margin-left: auto; background: none; color: rgba(255, 255, 255, .45); font-size: 15px; }
.privacy { display: grid; gap: 12px; margin-top: 16px; text-align: left; }
.privacy label { display: grid; gap: 6px; font-size: 17px; color: rgba(255, 255, 255, .8); }
select.field { text-align: left; appearance: none; height: 54px; font-size: 19px; cursor: pointer; }
select.field option { background: #0c3a27; color: #fff; }

/* friends */
#friend-add { display: flex; gap: 12px; }
#friend-add .field { flex: 1; }
#friend-add .btn { flex: none; }
#friend-error { min-height: 22px; margin: 8px 0 0; }
#friend-lists { height: 430px; overflow-y: auto; text-align: left; touch-action: pan-y; scrollbar-width: thin; padding-right: 6px; }
#friend-lists h3 { margin: 14px 0 8px; font-size: 17px; font-weight: 600; color: var(--gold); }
.friend-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px; background: rgba(0, 0, 0, .28); margin-bottom: 7px; }
.friend-row b { font-size: 20px; cursor: pointer; }
.friend-buttons { margin-left: auto; display: flex; gap: 8px; }
.friend-buttons .btn { height: 42px; font-size: 17px; padding: 0 16px; }

/* private messages */
.dm-cols { display: grid; grid-template-columns: 360px 1fr; gap: 26px; height: 700px; text-align: left; }
.dm-side { display: flex; flex-direction: column; min-height: 0; }
.dm-side h2 { text-align: left; }
#dm-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; margin: 10px 0 14px; touch-action: pan-y; scrollbar-width: thin; }
.dm-row { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .28); color: #fff; text-align: left; flex: none; }
.dm-row.on { background: rgba(53, 196, 111, .25); box-shadow: inset 0 0 0 1.5px rgba(53, 196, 111, .6); }
.dm-row-text { flex: 1; min-width: 0; }
.dm-row-text b { display: block; font-size: 18px; }
.dm-row-text small { display: block; font-size: 14px; color: rgba(255, 255, 255, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-row .badge { margin-left: 0; }
.dm-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#dm-head { display: flex; align-items: center; gap: 12px; min-height: 46px; font-size: 22px; }
#dm-head b { cursor: pointer; }
#dm-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin: 10px 0; padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, .3); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .45); touch-action: pan-y; scrollbar-width: thin; }
.dm { align-self: flex-start; max-width: 72%; padding: 9px 13px; border-radius: 4px 16px 16px 16px; background: rgba(255, 255, 255, .12); font-size: 18px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.dm.mine { align-self: flex-end; border-radius: 16px 4px 16px 16px; background: linear-gradient(180deg, #2a9f5b, #17713d); }
.dm img { display: block; max-width: 100%; max-height: 300px; border-radius: 10px; margin-bottom: 4px; cursor: zoom-in; }
.dm small { display: block; margin-top: 3px; font-size: 12px; color: rgba(255, 255, 255, .5); text-align: right; }
#dm-form { display: flex; gap: 10px; flex: none; }
#dm-form .field { flex: 1; height: 54px; text-align: left; }
#dm-form .btn { height: 54px; flex: none; cursor: pointer; }
#dm-error { min-height: 22px; margin: 6px 0 0; }

#lightbox { position: absolute; inset: 0; z-index: 110; display: grid; place-items: center; background: rgba(0, 0, 0, .88); cursor: zoom-out; }
#lightbox img { max-width: 92%; max-height: 92%; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .8); }
#account-bar .btn .badge { margin-left: 8px; }
#note {
  position: fixed;
  left: 50%;
  bottom: 5vh;
  transform: translateX(-50%);
  z-index: 300;
  max-width: 90vw;
  padding: 12px 22px;
  border-radius: 14px;
  background: rgba(8, 40, 28, .97);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6), inset 0 0 0 1.5px rgba(255, 204, 77, .45);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

/* comments under a post */
.comment-count { font-size: 15px; color: rgba(255, 255, 255, .55); }
.comments { display: grid; gap: 8px; margin-top: 10px; }
.comments:empty { display: none; }
.comment { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, .26); }
.comment .mini-pic { width: 32px; height: 32px; }
.comment-body { flex: 1; min-width: 0; font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.comment-body b { cursor: pointer; margin-right: 8px; }
.comment-body small { font-size: 13px; color: rgba(255, 255, 255, .45); }
.comment-delete { flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .6); font-size: 17px; line-height: 1; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form .field { flex: 1; height: 44px; font-size: 17px; text-align: left; }
.comment-form .btn { height: 44px; font-size: 16px; padding: 0 16px; flex: none; }

/* partners game: your side is marked blue, the other side red */
#stage.teams #seat-0 .plate, #stage.teams #seat-2 .plate { box-shadow: 0 6px 14px rgba(0, 0, 0, .4), inset 0 -4px 0 #4d9bff; }
#stage.teams #seat-1 .plate, #stage.teams #seat-3 .plate { box-shadow: 0 6px 14px rgba(0, 0, 0, .4), inset 0 -4px 0 #ff6a5c; }

/* setting up a table */
#create { z-index: 96; }
.create-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.create-choice button { padding: 16px 12px; border-radius: 16px; background: rgba(0, 0, 0, .32); color: rgba(255, 255, 255, .75); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .1); text-align: center; }
.create-choice button b { display: block; font-size: 26px; color: #fff; }
.create-choice button span { display: block; margin-top: 6px; font-size: 15px; line-height: 1.3; }
.create-choice button.on { background: linear-gradient(180deg, #35c46f, #14843f); color: #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); }
#create .check { margin-top: 16px; }

/* choosing a seat in the waiting room */
#wait-seats li.you { box-shadow: inset 0 0 0 2px var(--gold); }
#wait-seats li.empty { padding: 0; background: none; }
#wait-seats li.empty button { width: 100%; height: 52px; border-radius: 12px; background: rgba(53, 196, 111, .14); box-shadow: inset 0 0 0 1.5px rgba(53, 196, 111, .5); color: #8fe3b0; font-size: 20px; font-weight: 600; }
#wait-seats li.empty button:active { background: rgba(53, 196, 111, .3); }
#wait-seats li.team-head { height: auto; margin-top: 4px; background: none; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--gold); text-align: left; }
#wait-seats.teams { gap: 6px; }

/* ------------------------------------------------------------------ phones (landscape)
   The stage is only 664 units tall here instead of 900, so everything is drawn about a third
   larger on the same screen: the table is packed closer and the rack takes more of the height. */

#stage.compact #rack { top: 362px; }
.compact #spot-2, .compact #spot-1 { top: 8px; }
.compact #spot-3, .compact #spot-0 { top: 150px; }
.compact #center { top: 104px; }
.compact .holder-label { display: none; }
.compact #okey-info { top: 238px; font-size: 16px; }
.compact #banner { top: 262px; font-size: 20px; }
.compact #context-buttons { top: 300px; }
.compact #context-buttons .btn { height: 48px; font-size: 20px; }
.compact #sort-buttons { top: 302px; }
.compact #seat-2 { top: 6px; }
.compact #seat-3, .compact #seat-1 { top: 150px; }
.compact #seat-3 { left: 12px; }
.compact #seat-1 { right: 12px; }
.compact #seat-0 { top: 290px; }
.compact .avatar { width: 62px; height: 62px; border-width: 3px; }
.compact .plate { min-width: 116px; padding: 6px 14px 6px 28px; }
.compact #seat-1 .plate { padding: 6px 28px 6px 14px; }
.compact .plate .name { font-size: 17px; }
.compact .plate .score { font-size: 14px; margin-top: 0; }
.compact #top-left { left: 12px; top: 8px; }
.compact #hand-info { right: 14px; top: 12px; font-size: 14px; max-width: 240px; text-align: right; }
.compact #chat { top: 66px; left: 12px; height: 286px; }
.compact .bubble { top: -40px; font-size: 15px; max-width: 240px; }
.compact #seat-2 .bubble { top: 70px; }

/* windows: they scroll inside themselves when the screen is too short for them */
.card { touch-action: pan-y; }
.compact .card { max-height: calc(100% - 14px); overflow-y: auto; padding: 18px 26px 20px; scrollbar-width: thin; }
.compact .card.wide { padding: 16px 22px 18px; }
.compact .card h2 { font-size: 30px; margin-bottom: 4px; }
.compact .card p { font-size: 18px; margin-bottom: 10px; }
.compact .card-buttons { margin-top: 14px; gap: 12px; }
.compact .btn.big { height: 52px; font-size: 20px; padding: 0 26px; }
.compact .field { height: 52px; font-size: 20px; }
.compact textarea.field { height: auto; }
.compact .profile-pic { width: 104px; height: 104px; margin-bottom: 8px; border-width: 4px; }
.compact .profile-wall { height: 530px; }
.compact .profile-stats { padding: 10px 14px; gap: 3px; }
.compact .profile-stats div { font-size: 17px; }
.compact .dm-cols { height: 590px; }
.compact #table-list { height: 330px; }
.compact #friend-lists { height: 320px; }
.compact #leaders-list { max-height: 390px; }
.compact #wait-seats li, .compact #wait-seats li.empty button { height: 44px; line-height: 44px; font-size: 19px; }
.compact #wait-seats li.team-head { height: auto; line-height: 1.3; }
.compact #result-hand .tile { font-size: 11.5px; }
.compact #result-table { font-size: 18px; }
.compact #result-table td { padding: 3px 22px; }

/* main menu */
.compact .logo-tiles, .compact .rules { display: none; }
.compact .logo h1 { font-size: 60px; }
.compact .logo p { margin-top: 2px; font-size: 18px; }
.compact .options { margin-top: 12px; gap: 7px; }
.compact .option { grid-template-columns: 220px auto; gap: 16px; }
.compact .option label { font-size: 19px; }
.compact .seg { padding: 4px; border-radius: 13px; }
.compact .seg button { height: 42px; min-width: 132px; font-size: 18px; border-radius: 10px; }
.compact .play-row { margin-top: 16px; }
.compact .btn-play { height: 70px; font-size: 34px; border-radius: 18px; }
.compact #account-bar { right: 12px; top: 8px; gap: 8px; }
.compact #account-bar .btn { height: 40px; font-size: 16px; padding: 0 14px; }
.compact #account-info { font-size: 17px; }
.compact .create-choice button b { font-size: 22px; }

/* ------------------------------------------------------------------ main menu, desktop
   A header strip for the account, the logo on the left and the settings in a panel on the
   right. Phones (.compact) keep the single centred column further down. */
#menu { padding-top: 84px; }
#account-bar {
  left: 0; right: 0; top: 0; height: 84px; padding: 0 34px; justify-content: flex-end; gap: 14px;
  background: linear-gradient(180deg, rgba(2, 20, 14, .72), rgba(2, 20, 14, .38));
  border-bottom: 1px solid rgba(255, 204, 77, .22);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
#account-info { margin-right: auto; padding: 6px 18px 6px 6px; border-radius: 999px; background: rgba(0, 0, 0, .32); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); font-size: 21px; }
#account-info .mini-pic { width: 46px; height: 46px; }
#account-info:hover { background: rgba(0, 0, 0, .5); }

.menu-inner { display: grid; grid-template-columns: 580px 780px; gap: 80px; align-items: center; }
.menu-hero { display: flex; flex-direction: column; align-items: center; }
.menu-hero .logo-tiles { gap: 12px; margin-bottom: 26px; }
.menu-hero .logo-tiles .tile { font-size: 18px; }
.menu-hero .logo h1 { font-size: 150px; }
.menu-hero .logo p { margin-top: 14px; font-size: 25px; }
.menu-hero .rules { max-width: 540px; margin-top: 40px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 18px; }

.menu-panel {
  padding: 34px 40px 40px; border-radius: 30px;
  background: linear-gradient(180deg, rgba(10, 62, 41, .88), rgba(4, 30, 21, .92));
  border: 2px solid rgba(255, 204, 77, .3);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.menu-panel h2 { margin: 0 0 22px; font-size: 30px; font-weight: 800; color: var(--gold); text-align: center; letter-spacing: .02em; }
.menu-panel .options { margin-top: 0; gap: 16px; }
.menu-panel .option { grid-template-columns: 200px 1fr; gap: 20px; }
.menu-panel .seg { display: flex; justify-self: stretch; }
.menu-panel .seg button { flex: 1; min-width: 0; height: 56px; font-size: 21px; }
.menu-panel .play-row { margin-top: 34px; gap: 22px; }
.menu-panel .play-row .btn-play { flex: 1; width: auto; }

/* phones: back to one centred column, no header strip, no panel */
.compact #menu { padding-top: 0; }
.compact #account-bar { left: auto; height: auto; padding: 0; background: none; border: 0; box-shadow: none; }
.compact #account-info { margin-right: 0; padding: 0 6px; background: none; box-shadow: none; }
.compact #account-info .mini-pic { width: 38px; height: 38px; }
.compact .menu-inner { display: flex; flex-direction: column; align-items: center; gap: 0; }
.compact .menu-hero, .compact .menu-panel { display: contents; }
.compact .menu-panel h2 { display: none; }
.compact .menu-hero .logo h1 { font-size: 60px; }
.compact .menu-hero .logo p { margin-top: 2px; font-size: 18px; }
.compact .menu-panel .options { margin-top: 12px; gap: 7px; }
.compact .menu-panel .option { grid-template-columns: 220px auto; gap: 16px; }
.compact .menu-panel .seg { display: inline-flex; justify-self: start; }
.compact .menu-panel .seg button { flex: none; min-width: 132px; height: 42px; font-size: 18px; }
.compact .menu-panel .play-row { margin-top: 16px; gap: 26px; }
.compact .menu-panel .play-row .btn-play { flex: none; width: 330px; }

/* sign-in card: the "forgot my password" link */
.link { display: block; margin: 6px auto 0; padding: 6px 10px; background: none; border: 0; font: inherit; font-size: 19px; font-weight: 600; color: var(--gold); text-decoration: underline; cursor: pointer; }
.link:hover { filter: brightness(1.15); }
.link.danger { color: #ff9a90; margin-top: 16px; font-size: 17px; }

/* reporting and blocking */
/* these open over the lobby, a profile and a table, so they sit above every other card */
#who { z-index: 100; }
#report, #delete { z-index: 101; }
.legal-line { margin: 12px 0 0; font-size: 16px; line-height: 1.4; color: rgba(255, 255, 255, .7); }
.legal-line a { color: var(--gold); }
.profile-guard { display: flex; justify-content: center; gap: 26px; margin-top: 12px; }
.profile-guard .link { margin: 0; font-size: 16px; color: rgba(255, 255, 255, .72); }
#who-sub, #report-sub { color: rgba(255, 255, 255, .75); }
#report-form, #delete-form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.edit-blocks { margin-top: 16px; text-align: left; }
.edit-blocks > label { display: block; margin-bottom: 8px; font-size: 17px; font-weight: 600; color: rgba(255, 255, 255, .8); }
.block-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 18px; font-weight: 600; }
.block-row .btn { height: 38px; padding: 0 14px; font-size: 15px; }
#account-code { letter-spacing: .3em; font-weight: 700; }
#account-code::placeholder { letter-spacing: 0; font-weight: 500; }

/* ------------------------------------------------------------------ okey celebration */
#celebrate {
  position: absolute; inset: 0; z-index: 88; overflow: hidden; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse 60% 60% at 50% 46%, rgba(6, 40, 27, .55), rgba(0, 10, 6, .88));
  animation: cel-in .3s ease-out both;
}
#celebrate.out { animation: cel-out .35s ease-in both; }
#celebrate .rays {
  position: absolute; left: 50%; top: 46%; width: 1800px; height: 1800px; margin: -900px 0 0 -900px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 204, 77, .26) 0deg 9deg, rgba(255, 204, 77, 0) 9deg 24deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .7) 30%, transparent 62%);
  mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .7) 30%, transparent 62%);
  animation: cel-spin 14s linear infinite, cel-in .6s ease-out both;
}
#celebrate .okey-tile { position: relative; margin-bottom: 26px; animation: cel-tile 1s cubic-bezier(.2, 1.3, .4, 1) both; filter: drop-shadow(0 0 34px rgba(255, 204, 77, .9)); }
#celebrate .okey-tile .tile { font-size: 26px; position: relative; }
#celebrate .word { position: relative; display: flex; gap: 6px; font-size: 190px; font-weight: 900; line-height: 1; letter-spacing: .02em; color: var(--gold);
  text-shadow: 0 8px 0 #a86a00, 0 18px 40px rgba(0, 0, 0, .6), 0 0 60px rgba(255, 204, 77, .55); }
#celebrate .word span { display: inline-block; animation: cel-letter .7s cubic-bezier(.2, 1.5, .4, 1) both; }
#celebrate .word span:nth-child(1) { animation-delay: .25s; }
#celebrate .word span:nth-child(2) { animation-delay: .33s; }
#celebrate .word span:nth-child(3) { animation-delay: .41s; }
#celebrate .word span:nth-child(4) { animation-delay: .49s; }
#celebrate .word span:nth-child(5) { animation-delay: .57s; color: #fff; }
#celebrate .line { position: relative; margin-top: 22px; font-size: 44px; font-weight: 800; color: #fff; text-shadow: 0 4px 14px rgba(0, 0, 0, .7); animation: cel-rise .5s ease-out .85s both; }
#celebrate .note { position: relative; margin-top: 10px; font-size: 26px; font-weight: 600; color: rgba(255, 255, 255, .85); text-shadow: 0 3px 10px rgba(0, 0, 0, .7); animation: cel-rise .5s ease-out 1.05s both; }
#celebrate .bit { position: absolute; left: 0; top: 0; border-radius: 3px; will-change: transform; }
.compact #celebrate .word { font-size: 150px; }
.compact #celebrate .okey-tile .tile { font-size: 20px; }
.compact #celebrate .okey-tile { margin-bottom: 14px; }
.compact #celebrate .line { font-size: 36px; margin-top: 12px; }
.compact #celebrate .note { font-size: 22px; }
@keyframes cel-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cel-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes cel-spin { to { transform: rotate(360deg); } }
@keyframes cel-tile { 0% { transform: translateY(-260px) rotateY(540deg) scale(.4); opacity: 0; } 60% { opacity: 1; } 100% { transform: translateY(0) rotateY(0) scale(1); opacity: 1; } }
@keyframes cel-letter { from { transform: translateY(70px) scale(.2) rotate(-18deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cel-rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------------------------ "okey thrown away" tease */
#wasted {
  position: absolute; inset: 0; z-index: 87; overflow: hidden; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 120px;
  background: radial-gradient(ellipse 55% 50% at 50% 42%, rgba(60, 8, 8, .62), rgba(0, 0, 0, 0) 75%);
  animation: cel-in .25s ease-out both;
}
#wasted.out { animation: cel-out .35s ease-in both; }
#wasted .faces { display: flex; gap: 18px; font-size: 64px; margin-bottom: 4px; }
#wasted .faces span { display: inline-block; animation: was-laugh .5s ease-in-out infinite alternate; }
#wasted .faces span:nth-child(2n) { animation-delay: .17s; }
#wasted .faces span:nth-child(3n) { animation-delay: .31s; }
#wasted .gone-tile { margin: 8px 0 10px; animation: was-tumble 2.6s cubic-bezier(.4, 0, .7, .4) .2s both; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .6)); }
#wasted .gone-tile .tile { font-size: 22px; position: relative; }
#wasted .word { font-size: 120px; font-weight: 900; line-height: 1; color: #ff6a5c; letter-spacing: .01em;
  text-shadow: 0 7px 0 #7c0f0a, 0 16px 34px rgba(0, 0, 0, .65); animation: was-stamp .5s cubic-bezier(.2, 1.6, .4, 1) .15s both, was-shake .45s ease-in-out .7s 3; }
#wasted .line { margin-top: 18px; padding: 10px 26px; border-radius: 999px; background: rgba(0, 0, 0, .55); font-size: 38px; font-weight: 800; color: #fff;
  text-shadow: 0 3px 8px rgba(0, 0, 0, .6); animation: cel-rise .45s ease-out .55s both; max-width: 86%; text-align: center; }
#wasted .ha { position: absolute; left: 0; top: 0; font-style: normal; font-size: 40px; font-weight: 900; color: var(--gold); text-shadow: 0 3px 8px rgba(0, 0, 0, .7); white-space: nowrap; will-change: transform; }
.compact #wasted { padding-bottom: 60px; }
.compact #wasted .faces { font-size: 48px; }
.compact #wasted .word { font-size: 96px; }
.compact #wasted .line { font-size: 30px; margin-top: 10px; }
.compact #wasted .gone-tile .tile { font-size: 17px; }
@keyframes was-laugh { from { transform: translateY(0) rotate(-10deg) scale(1); } to { transform: translateY(-14px) rotate(10deg) scale(1.15); } }
@keyframes was-stamp { from { transform: scale(3) rotate(-8deg); opacity: 0; } to { transform: scale(1) rotate(-3deg); opacity: 1; } }
@keyframes was-shake { 0%, 100% { transform: rotate(-3deg) translateX(0); } 25% { transform: rotate(-5deg) translateX(-10px); } 75% { transform: rotate(-1deg) translateX(10px); } }
@keyframes was-tumble { 0% { transform: translateY(-30px) rotate(0) scale(1.2); opacity: 0; } 12% { opacity: 1; transform: translateY(0) rotate(-8deg) scale(1); } 55% { transform: translateY(0) rotate(8deg) scale(1); opacity: 1; } 100% { transform: translate(260px, 520px) rotate(540deg) scale(.5); opacity: 0; } }
#wasted .faces, #wasted .gone-tile, #wasted .word, #wasted .line { position: relative; z-index: 1; }

/* ------------------------------------------------------------------ nudging a slow player (top right, small) */
#btn-nudge { position: absolute; right: 26px; top: 64px; z-index: 5; height: 46px; padding: 0 20px; font-size: 19px; }
#btn-nudge:disabled { opacity: .45; }
#nudge {
  position: absolute; right: 26px; top: 122px; z-index: 86; pointer-events: none;
  display: flex; align-items: center; gap: 14px; max-width: 460px; padding: 12px 22px 12px 14px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 62, 41, .96), rgba(4, 30, 21, .97)); border: 2px solid rgba(255, 204, 77, .5);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .5);
  animation: nudge-in .32s cubic-bezier(.2, 1.4, .4, 1) both;
}
#nudge.at-me { border-color: #ff6a5c; background: linear-gradient(180deg, rgba(120, 24, 18, .97), rgba(60, 10, 8, .97)); animation: nudge-in .32s cubic-bezier(.2, 1.4, .4, 1) both, nudge-buzz .12s linear .35s 6; }
#nudge.out { animation: nudge-out .3s ease-in both; }
#nudge .finger { font-size: 44px; line-height: 1; display: inline-block; animation: nudge-poke .28s ease-in-out infinite alternate; }
#nudge .body { display: flex; flex-direction: column; min-width: 0; }
#nudge b { font-size: 22px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#nudge .body span { font-size: 17px; font-weight: 500; color: rgba(255, 255, 255, .8); }
.compact #btn-nudge { right: 14px; top: 40px; height: 40px; font-size: 17px; padding: 0 16px; }
.compact #nudge { right: 14px; top: 88px; padding: 9px 18px 9px 11px; }
.compact #nudge .finger { font-size: 36px; }
.compact #nudge b { font-size: 19px; }
.compact #nudge .body span { font-size: 15px; }
@keyframes nudge-in { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nudge-out { from { transform: none; opacity: 1; } to { transform: translateX(120%); opacity: 0; } }
@keyframes nudge-poke { from { transform: translateX(-7px); } to { transform: translateX(9px); } }
@keyframes nudge-buzz { 0%, 100% { margin-right: 0; } 50% { margin-right: 7px; } }

/* ------------------------------------------------------------------ gifts */
#gifts { z-index: 97; }
#gifts .card { width: 900px; }
#gifts-sub { margin: 4px 0 18px; }
#gifts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gift-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px 12px; border-radius: 18px; background: rgba(0, 0, 0, .32);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .1); color: #fff; font-family: inherit; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.gift-card:hover:not(:disabled) { transform: translateY(-4px); box-shadow: inset 0 0 0 2px var(--gold), 0 10px 22px rgba(0, 0, 0, .4); }
.gift-card:disabled { opacity: .35; cursor: default; }
.gift-card i { font-style: normal; font-size: 62px; line-height: 1.1; }
.gift-card b { font-size: 20px; font-weight: 700; }
.gift-card span { font-size: 19px; font-weight: 700; color: var(--gold); }
#profile-gifts { margin-top: 16px; padding: 12px 14px 14px; border-radius: 16px; background: rgba(0, 0, 0, .28); }
#profile-gifts h3 { margin: 0 0 8px; font-size: 19px; font-weight: 700; color: var(--gold); }
#profile-gifts .gift-shelf { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.gift-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px 5px 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; font-family: inherit; border: 0; }
button.gift-chip { cursor: pointer; }
button.gift-chip:hover { background: rgba(255, 204, 77, .28); }
.gift-chip i { font-style: normal; font-size: 26px; line-height: 1; }
.gift-chip b { font-size: 18px; font-weight: 700; }
#profile-gifts .none, #profile-gifts .last { margin: 8px 0 0; font-size: 15px; color: rgba(255, 255, 255, .6); }
#profile-gifts .last { color: rgba(255, 255, 255, .85); }
#profile-gifts .btn { margin-top: 10px; height: 44px; font-size: 17px; padding: 0 16px; }
.gift-fly, .gift-spark { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; line-height: 1; }
.gift-fly { font-size: 84px; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .55)); }
.gift-spark { font-size: 30px; }
.gift-tag { position: absolute; z-index: 61; transform: translateX(-50%); pointer-events: none; white-space: nowrap; padding: 8px 18px; border-radius: 999px;
  background: linear-gradient(180deg, #ffd766, #f0a81c); color: #3a2600; font-size: 20px; font-weight: 800; box-shadow: 0 8px 18px rgba(0, 0, 0, .45); animation: gift-tag-in .3s cubic-bezier(.2, 1.5, .4, 1) both; }
.gift-tag.out { animation: cel-out .3s ease-in both; }
@keyframes gift-tag-in { from { transform: translateX(-50%) scale(.4); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.compact #gifts .card { width: 820px; padding-top: 16px; padding-bottom: 16px; }
.compact #gifts-grid { gap: 9px; }
.compact .gift-card { padding: 8px 6px; }
.compact .gift-card i { font-size: 42px; }
.compact .gift-card b { font-size: 17px; }
.compact .gift-card span { font-size: 16px; }
.compact #profile-gifts { margin-top: 8px; padding: 8px 10px; }
.compact .gift-fly { font-size: 64px; }
.compact .gift-tag { font-size: 17px; }
/* the gift picker opens over a profile */
#gifts { z-index: 99; }
/* profile buttons sit two to a row so the card, now with a gift shelf, still fits the screen */
#profile-view .profile-side .card-buttons.column { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
#profile-view .profile-side .card-buttons.column .btn.big { height: 54px; padding: 0 10px; font-size: 18px; white-space: nowrap; }
#profile-view .profile-side .card-buttons.column .btn.big:only-of-type,
#profile-view .profile-side .card-buttons.column .btn.big:last-child:nth-child(odd) { grid-column: 1 / -1; }
.compact #profile-view .profile-side .card-buttons.column { gap: 8px; margin-top: 8px; }
.compact #profile-view .profile-side .card-buttons.column .btn.big { height: 44px; font-size: 16px; }
/* the profile's left column never grows past the screen: it scrolls instead */
#profile-view .profile-side { max-height: 836px; overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
#profile-view .profile-pic { width: 128px; height: 128px; }
#profile-gifts { margin-top: 12px; padding: 10px 12px 12px; }
.compact #profile-view .profile-side { max-height: 620px; }
.compact #profile-view .profile-pic { width: 92px; height: 92px; }

/* ------------------------------------------------------------------ 101 okey
   The middle of the table is where melds are laid, so the indicator and the draw pile move to
   the top right corner and the side players sit a little lower. */
#melds {
  position: absolute; left: calc(50% - 340px); width: 680px; top: 112px; height: 372px; z-index: 3;
  padding: 10px 12px; border-radius: 18px; overflow-y: auto; scrollbar-width: thin;
  background: rgba(0, 0, 0, .2); box-shadow: inset 0 3px 10px rgba(0, 0, 0, .4), 0 1px 0 rgba(255, 255, 255, .07);
  display: flex; flex-direction: column; gap: 6px;
}
#melds .zone { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
#melds .zone + .zone { padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .1); }
#melds .zone-name { min-width: 64px; font-size: 14px; font-weight: 700; color: var(--gold); }
#melds .tmeld { display: flex; gap: 1px; padding: 3px; border-radius: 7px; background: rgba(255, 255, 255, .07); }
#melds .tmeld.pair { background: rgba(255, 204, 77, .14); }
#melds .tmeld .tile { font-size: 6.4px; position: relative; }
#melds .empty { margin: auto; max-width: 480px; text-align: center; font-size: 17px; line-height: 1.45; color: rgba(255, 255, 255, .5); }
.g101 #center { left: auto; right: 26px; width: 208px; top: 124px; }
.g101 #indicator-holder { left: 0; }
.g101 #pot-holder { left: 110px; }
.g101 #okey-info { left: auto; right: 26px; width: 208px; top: 258px; text-align: center; font-size: 16px; }
.g101 #seat-1, .g101 #seat-3 { top: 296px; }
.g101 #btn-nudge { top: 64px; right: 250px; }
.g101 #context-buttons { top: 532px; left: calc(50% - 400px); right: auto; width: 620px; justify-content: flex-start; }
.g101 #context-buttons .btn { height: 50px; font-size: 20px; }
.g101 #spot-0 .spot-hint, .g101 #spot-3 .spot-hint { font-size: 14px; }
#result-table td.state { color: rgba(255, 255, 255, .7); font-size: .9em; }

.compact #melds { left: calc(50% - 300px); width: 600px; top: 72px; height: 184px; padding: 6px 8px; gap: 3px; border-radius: 14px; }
.compact #melds .tmeld .tile { font-size: 5.2px; }
.compact #melds .tmeld { padding: 2px; }
.compact #melds .zone { gap: 3px 7px; }
.compact #melds .zone + .zone { padding-top: 3px; }
.compact #melds .zone-name { min-width: 50px; font-size: 12px; }
.compact #melds .empty { font-size: 14px; }
.compact.g101 #center { right: 8px; width: 200px; top: 26px; }
.compact.g101 #pot-holder { left: 102px; }
.compact.g101 .holder-label { display: none; }
.compact.g101 #okey-info { right: 8px; width: 200px; top: 158px; font-size: 13px; }
.compact.g101 #seat-1, .compact.g101 #seat-3 { top: 180px; }
.compact.g101 #btn-nudge { right: 214px; top: 30px; }
.compact.g101 #context-buttons { top: 302px; left: calc(50% - 300px); width: 440px; }
.compact.g101 #context-buttons .btn { height: 44px; font-size: 17px; }
.compact.g101 #hand-info { top: 3px; right: 8px; font-size: 11px; max-width: 200px; z-index: 5; }

/* "Masa Kur": the game and, for 101, its rules */
#online-game { margin-bottom: 12px; }
.create-rules { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 0 0 14px; font-size: 19px; color: rgba(255, 255, 255, .85); }
.create-rules .check { margin: 0; }
.seg.small { padding: 4px; border-radius: 12px; }
.seg.small button { min-width: 52px; height: 40px; padding: 0 10px; font-size: 18px; border-radius: 9px; }
.compact .create-rules { gap: 10px; font-size: 16px; margin-bottom: 8px; }
.compact #online-game { margin-bottom: 8px; }
.compact .seg.small button { min-width: 44px; height: 34px; font-size: 16px; }

/* 101: while a tile is carried, the melds it can join glow; the board rises above the rack's shadow so the tile is seen over it */
#melds .tmeld.can-add { background: rgba(125, 255, 176, .28); box-shadow: 0 0 0 2px #7dffb0, 0 0 14px rgba(125, 255, 176, .6); }

/* 101: the board's size includes its padding, so it ends where the layout expects and the banner below stays clear of it */
#melds { box-sizing: border-box; }
/* 101: the total of the tiles still in the hand, beside the sort buttons */
#hand-total {
  position: absolute; right: calc(50% - 648px + 410px); top: 528px; z-index: 4; pointer-events: none;
  display: flex; flex-direction: column; align-items: flex-end; padding: 6px 16px; border-radius: 14px;
  background: rgba(0, 0, 0, .34); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  font-size: 18px; font-weight: 600; color: rgba(255, 255, 255, .85); white-space: nowrap; line-height: 1.25;
}
#hand-total b { font-size: 24px; font-weight: 800; color: var(--gold); margin-left: 4px; }
#hand-total span { font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .6); }
.g101 #context-buttons { width: 520px; }
.compact #hand-total { top: 298px; right: calc(50% - 648px + 330px); padding: 3px 12px; font-size: 15px; border-radius: 11px; }
.compact #hand-total b { font-size: 20px; }
.compact #hand-total span { font-size: 12px; }
.compact.g101 #context-buttons { width: 380px; }
.compact.g101 #banner { font-size: 18px; }
/* 101: the status line sits under the board, not on top of the melds */
.g101 #banner { top: 489px; font-size: 21px; }
.compact.g101 #banner { top: 260px; font-size: 17px; }

/* 101: a rack tile that fits a meld on the table ("işlek") */
#rack-tiles .tile.fits { box-shadow: 0 0 0 3px #7dffb0, 0 0 18px rgba(125, 255, 176, .75); }
#rack-tiles .tile.fits::after { content: 'işlek'; position: absolute; left: 50%; top: -11px; transform: translateX(-50%); padding: 1px 7px; border-radius: 8px;
  background: #1f9d57; color: #fff; font: 700 11px/1.3 Rubik, sans-serif; letter-spacing: .02em; white-space: nowrap; pointer-events: none; }
/* the hand total: clear of the rack on desktop and of the sort buttons on phones */
#hand-total { top: 516px; }
.compact #hand-total { right: calc(50% - 648px + 430px); top: 300px; }
.compact.g101 #context-buttons { width: 300px; }
#hand-total.enough { box-shadow: inset 0 0 0 2px #7dffb0, 0 0 14px rgba(125, 255, 176, .45); }
#hand-total.enough b { color: #7dffb0; }

/* 101: a rack tile that can take the place of an okey on the table */
#rack-tiles .tile.swaps { box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(255, 204, 77, .8); }
#rack-tiles .tile.swaps::after { content: 'okey al'; position: absolute; left: 50%; top: -11px; transform: translateX(-50%); padding: 1px 7px; border-radius: 8px;
  background: #c98a00; color: #fff; font: 700 11px/1.3 Rubik, sans-serif; letter-spacing: .02em; white-space: nowrap; pointer-events: none; }

/* 101: the "lay tiles off by themselves" tick, above the sort buttons */
#auto-add { position: absolute; right: calc(50% - 648px); top: 497px; z-index: 5; margin: 0; padding: 3px 12px 3px 8px; border-radius: 10px; background: rgba(0, 0, 0, .34);
  font-size: 16px; font-weight: 600; color: rgba(255, 255, 255, .9); white-space: nowrap; cursor: pointer; }
#auto-add input { width: 18px; height: 18px; }
.compact #auto-add { top: 281px; font-size: 13px; padding: 1px 9px 1px 6px; }
.compact #auto-add input { width: 15px; height: 15px; }
/* the tick is kept low enough to clear the discard spot above it and short enough to clear the sort buttons below */
#auto-add { top: 499px; padding: 1px 10px 1px 7px; font-size: 15px; line-height: 20px; gap: 7px; }
#auto-add input { width: 16px; height: 16px; margin: 0; }
.compact #auto-add { top: 281px; font-size: 12px; line-height: 16px; gap: 5px; padding: 1px 8px 1px 5px; }
.compact #auto-add input { width: 13px; height: 13px; }

/* a meld picked up by pressing and holding one of its tiles */
#rack-tiles .tile.held { box-shadow: 0 0 0 3px #7fd0ff, 0 10px 18px rgba(0, 0, 0, .45); transform: translateY(-6px); transition: transform .12s, box-shadow .12s; z-index: 6; }
#rack-tiles .tile.held.drag { transition: none; }

/* ------------------------------------------------------------------ 3 bant bilardo */
#bilardo { position: absolute; inset: 0; z-index: 75; background: radial-gradient(ellipse 80% 80% at 50% 45%, #1b2c44 0%, #0d1726 60%, #060b14 100%); }
#bl-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; touch-action: none; }
#bl-top { position: absolute; left: 150px; right: 150px; top: 12px; height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; pointer-events: none; }
.bl-player { flex: 1 1 0; min-width: 0; height: 66px; display: flex; align-items: center; gap: 14px; padding: 0 20px; border-radius: 18px; background: rgba(0, 0, 0, .42);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08); transition: box-shadow .25s, background .25s; }
.bl-player.right { justify-content: flex-end; text-align: right; }
.bl-player.turn { background: rgba(20, 60, 30, .75); box-shadow: inset 0 0 0 3px var(--gold), 0 0 22px rgba(255, 204, 77, .45); }
.bl-ball { flex: none; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #d4d2c8 70%, #a9a79c); box-shadow: 0 3px 6px rgba(0, 0, 0, .5); }
.bl-ball.yellow { background: radial-gradient(circle at 35% 30%, #fff3a6, #ffcc1f 55%, #c98a00); }
.bl-who { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.bl-name { font-size: 22px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-sub { font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .6); white-space: nowrap; }
.bl-score { flex: none; margin-left: auto; min-width: 58px; text-align: center; font-size: 44px; font-weight: 900; color: var(--gold); text-shadow: 0 3px 0 rgba(0, 0, 0, .4); }
.bl-player.right .bl-score { margin-left: 0; margin-right: auto; }
.bl-timer { flex: none; min-width: 40px; padding: 2px 8px; border-radius: 10px; background: rgba(0, 0, 0, .5); font-size: 20px; font-weight: 700; text-align: center; }
.bl-timer.low { background: #c9221c; }
#bl-mid { flex: none; width: 250px; text-align: center; }
#bl-target { font-size: 17px; font-weight: 600; color: rgba(255, 255, 255, .75); }
#bl-track { margin-top: 5px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .6); }
#bl-track span:nth-of-type(2) { margin-left: 10px; }
.bl-dot, .bl-pip { width: 15px; height: 15px; border-radius: 50%; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); transition: background .15s, transform .15s; }
.bl-dot.on { background: #4dd0ff; box-shadow: 0 0 10px #4dd0ff; transform: scale(1.15); }
.bl-pip.on { background: var(--gold); box-shadow: 0 0 10px var(--gold); transform: scale(1.15); }
#bl-msg { position: absolute; left: 50%; top: 104px; transform: translateX(-50%); z-index: 3; padding: 10px 28px; border-radius: 999px; background: rgba(0, 0, 0, .72);
  font-size: 26px; font-weight: 800; white-space: nowrap; pointer-events: none; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); }
#bl-msg.good { background: linear-gradient(180deg, #35c46f, #14843f); }
#bl-left, #bl-right { position: absolute; top: 120px; bottom: 96px; width: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
#bl-left { left: 0; }
#bl-right { right: 0; }
.bl-label { font-size: 17px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
#bl-spin { position: relative; width: 116px; height: 116px; border-radius: 50%; touch-action: none; cursor: crosshair;
  background: radial-gradient(circle at 36% 30%, #fff, #e4e2d8 60%, #b5b3a8); box-shadow: 0 8px 16px rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(0, 0, 0, .12); }
#bl-spin::before, #bl-spin::after { content: ''; position: absolute; background: rgba(0, 0, 0, .14); }
#bl-spin::before { left: 50%; top: 10%; bottom: 10%; width: 1px; }
#bl-spin::after { top: 50%; left: 10%; right: 10%; height: 1px; }
#bl-tip { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #6cb6ff, #1553c9);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .5); pointer-events: none; z-index: 1; }
#bl-spin-reset { height: 40px; padding: 0 16px; font-size: 16px; }
#bl-power { position: relative; width: 44px; flex: 1 1 auto; max-height: 420px; border-radius: 22px; background: rgba(0, 0, 0, .5); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .6), inset 0 0 0 2px rgba(255, 255, 255, .1);
  touch-action: none; cursor: ns-resize; overflow: visible; }
#bl-power-fill { position: absolute; left: 5px; right: 5px; bottom: 5px; border-radius: 17px; background: linear-gradient(0deg, #35c46f, #ffc23d 60%, #ff5d55); }
#bl-power-knob { position: absolute; left: -9px; right: -9px; height: 22px; margin-bottom: -11px; border-radius: 11px; background: linear-gradient(180deg, #fff, #c9c9c9); box-shadow: 0 3px 6px rgba(0, 0, 0, .5); pointer-events: none; }
#bl-power-text { font-size: 22px; font-weight: 800; }
#bl-bottom { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 18px; }
#bl-bottom .btn { touch-action: none; }
#bl-fine-l, #bl-fine-r { width: 74px; height: 62px; font-size: 24px; border-radius: 14px; }
#bl-shoot { min-width: 240px; letter-spacing: .08em; }
#bilardo.idle #bl-bottom, #bilardo.idle #bl-left, #bilardo.idle #bl-right { opacity: .35; pointer-events: none; }
#bl-hint { position: absolute; left: 170px; bottom: 30px; max-width: calc(50% - 400px); font-size: 16px; font-weight: 500; color: rgba(255, 255, 255, .55); pointer-events: none; }
#bl-buttons { position: absolute; left: 22px; top: 20px; display: flex; gap: 10px; }
#bl-result-table { margin: 0 auto; border-collapse: collapse; font-size: 21px; }
#bl-result-table td { padding: 5px 22px; text-align: left; }
#bl-result-table td + td { text-align: center; font-weight: 700; }
#bl-result-table tr.winner td:first-child { color: var(--gold); font-weight: 700; }
#bl-result-table th { padding: 2px 22px; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .55); }
.compact #bl-top { left: 124px; right: 124px; top: 6px; height: 52px; gap: 10px; }
.compact .bl-player { height: 50px; padding: 0 12px; gap: 9px; border-radius: 14px; }
.compact .bl-ball { width: 26px; height: 26px; }
.compact .bl-name { font-size: 17px; }
.compact .bl-sub { font-size: 12px; }
.compact .bl-score { font-size: 34px; min-width: 44px; }
.compact #bl-mid { width: 190px; }
.compact #bl-target { font-size: 13px; }
.compact #bl-track { margin-top: 2px; font-size: 12px; gap: 5px; }
.compact .bl-dot, .compact .bl-pip { width: 12px; height: 12px; }
.compact #bl-msg { top: 66px; font-size: 20px; padding: 7px 20px; }
.compact #bl-left, .compact #bl-right { top: 64px; bottom: 8px; width: 118px; gap: 9px; }
.compact #bl-spin { width: 96px; height: 96px; }
.compact #bl-power { width: 40px; }
.compact #bl-bottom { bottom: 6px; gap: 12px; }
.compact #bl-fine-l, .compact #bl-fine-r { width: 64px; height: 50px; font-size: 20px; }
.compact #bl-shoot { height: 50px; min-width: 190px; font-size: 21px; }
.compact #bl-hint { display: none; }
.compact #bl-buttons { left: 8px; top: 6px; gap: 6px; }
.compact #bl-buttons .icon-btn { width: 44px; height: 44px; }
/* three games now share the menu's game row */
.seg[data-key="game"] button { min-width: 130px; padding: 0 16px; }

#online-game { grid-template-columns: 1fr 1fr 1fr; }
#online-game button b { font-size: 22px; }
#create .card { min-width: 700px; }
.seg[data-key="game"] button { min-width: 0; padding: 0 15px; font-size: 18px; white-space: nowrap; }
.seg[data-key="bilardoTarget"] button { min-width: 96px; }

/* ------------------------------------------------------------------ menu: choose a game, then its own settings */
#games { display: flex; flex-direction: column; align-items: center; }
.games-head { text-align: center; }
.games-head h1 { margin: 0; font-size: 110px; font-weight: 900; line-height: 1; color: #fff; text-shadow: 0 6px 0 rgba(0, 0, 0, .3), 0 14px 30px rgba(0, 0, 0, .45); }
.games-head h1 span { color: var(--gold); }
.games-head p { margin: 10px 0 0; font-size: 25px; font-weight: 500; color: rgba(255, 255, 255, .8); }
.game-cards { display: grid; grid-template-columns: repeat(3, 420px); gap: 34px; margin-top: 40px; }
.game-card { display: flex; flex-direction: column; align-items: center; padding: 24px 26px 26px; border-radius: 28px; color: #fff; text-align: center;
  background: linear-gradient(180deg, #0f4a31, #062619); box-shadow: 0 24px 50px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(255, 204, 77, .3), inset 0 2px 0 rgba(255, 255, 255, .1);
  transition: transform .16s, box-shadow .16s; }
.game-card:hover { transform: translateY(-8px); box-shadow: 0 34px 60px rgba(0, 0, 0, .55), inset 0 0 0 3px var(--gold), 0 0 34px rgba(255, 204, 77, .28); }
.game-card:active { transform: translateY(-2px); }
.game-art { width: 100%; height: 190px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 2px 10px rgba(0, 0, 0, .45); }
.game-art .tile { font-size: 14px; }
#art-classic .tile:nth-child(odd) { transform: rotate(-5deg) translateY(4px); }
#art-classic .tile:nth-child(even) { transform: rotate(4deg); }
#art-101 .tile { font-size: 11px; }
#art-101 b { margin-left: 16px; font-size: 76px; font-weight: 900; line-height: 1; color: var(--gold); text-shadow: 0 5px 0 rgba(0, 0, 0, .35); }
.art-bilardo { position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #2f8be0, #134f97) !important; box-shadow: inset 0 0 0 9px #6b3f1a, inset 0 0 0 14px #0d3f7c, inset 0 2px 10px rgba(0, 0, 0, .45) !important; }
.art-bilardo .ball { position: absolute; width: 38px; height: 38px; border-radius: 50%; box-shadow: 4px 6px 6px rgba(0, 0, 0, .4); }
.art-bilardo .ball.white { left: 30%; top: 54%; background: radial-gradient(circle at 35% 30%, #fff, #e4e2d8 60%, #a9a79c); }
.art-bilardo .ball.yellow { left: 56%; top: 26%; background: radial-gradient(circle at 35% 30%, #fff3a6, #ffcc1f 55%, #b97c00); }
.art-bilardo .ball.red { left: 70%; top: 56%; background: radial-gradient(circle at 35% 30%, #ff9d92, #e0281e 55%, #8a0f0a); }
.art-bilardo .cue { position: absolute; left: -6%; top: 71%; width: 34%; height: 7px; border-radius: 4px; background: linear-gradient(90deg, #2a1a10 0 40%, #c9a227 40% 44%, #e6c98f 44% 96%, #3f7fd6 96%); transform: rotate(-9deg); transform-origin: right center; box-shadow: 2px 5px 5px rgba(0, 0, 0, .4); }
.game-card h3 { margin: 20px 0 6px; font-size: 36px; font-weight: 800; color: var(--gold); text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.game-card p { margin: 0; min-height: 54px; font-size: 18px; line-height: 1.45; font-weight: 500; color: rgba(255, 255, 255, .8); }
.game-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0 20px; }
.game-tags span { padding: 4px 13px; border-radius: 999px; background: rgba(0, 0, 0, .35); font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .78); }
.game-go { align-self: stretch; height: 60px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; font-weight: 800; letter-spacing: .06em;
  background: linear-gradient(180deg, #35c46f, #14843f); box-shadow: 0 5px 0 #0a5527, 0 10px 16px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); }
#menu-back { position: absolute; left: 22px; top: 18px; padding: 6px 10px; font-size: 19px; font-weight: 700; color: rgba(255, 255, 255, .8); background: none; }
#menu-back:hover { color: var(--gold); }
.menu-panel { position: relative; }
.compact .games-head h1 { font-size: 58px; }
.compact .games-head p { margin-top: 0; font-size: 18px; }
.compact .game-cards { grid-template-columns: repeat(3, 390px); gap: 22px; margin-top: 14px; }
.compact .game-card { padding: 16px 18px 18px; border-radius: 22px; }
.compact .game-art { height: 132px; }
.compact .game-art .tile { font-size: 11px; }
.compact #art-101 .tile { font-size: 9px; }
.compact #art-101 b { font-size: 56px; }
.compact .art-bilardo .ball { width: 30px; height: 30px; }
.compact .game-card h3 { margin: 12px 0 4px; font-size: 30px; }
.compact .game-card p { min-height: 46px; font-size: 16px; }
.compact .game-tags { margin: 10px 0 12px; }
.compact .game-tags span { font-size: 13px; padding: 3px 11px; }
.compact .game-go { height: 50px; font-size: 22px; }
/* phones: the chosen game's name stands over its settings, with the way back beside it */
.compact .menu-panel h2 { display: block; margin: 0; font-size: 30px; }
.compact #menu-back { position: absolute; left: 14px; top: 10px; z-index: 3; font-size: 18px; }
.compact .menu-hero .logo { display: none; }
#menu-back { padding: 8px 16px; border-radius: 12px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); cursor: pointer; }

/* ------------------------------------------------------------------ Amerikan bilardo (8 top) */
#bilardo.pool #bl-track { display: none; }
.bl-ball.solid { background: radial-gradient(circle at 35% 30%, #ffe27a, #f4c20d 55%, #a87f00); }
.bl-ball.stripe { background: linear-gradient(180deg, #f6f4ea 0 24%, #1e5bd8 24% 76%, #f6f4ea 76%); }
.game-cards { grid-template-columns: repeat(4, 350px); gap: 26px; }
.game-card { padding: 20px 20px 22px; }
.game-card h3 { font-size: 31px; white-space: nowrap; }
.game-card p { min-height: 78px; font-size: 17px; }
.game-art { height: 170px; }
.game-art .tile { font-size: 12px; }
#art-101 .tile { font-size: 9.5px; }
#art-101 b { margin-left: 10px; font-size: 62px; }
.art-pool { background: radial-gradient(ellipse at 50% 40%, #22a05e, #0e6436) !important; box-shadow: inset 0 0 0 9px #4f2912, inset 0 0 0 14px #0a5230, inset 0 2px 10px rgba(0, 0, 0, .45) !important; }
.art-pool .ball { width: 32px; height: 32px; }
.art-pool .ball.white { left: 24%; top: 56%; }
.art-pool .ball.b1 { left: 55%; top: 24%; background: radial-gradient(circle at 35% 30%, #ffe27a, #f4c20d 55%, #a87f00); }
.art-pool .ball.b3 { left: 68%; top: 44%; background: radial-gradient(circle at 35% 30%, #ff8d80, #d92b2b 55%, #8a0f0a); }
.art-pool .ball.b8 { left: 55%; top: 58%; background: radial-gradient(circle at 35% 30%, #6a6a6a, #16171b 55%, #000); }
.art-pool .ball.b11 { left: 78%; top: 20%; background: linear-gradient(180deg, #f6f4ea 0 24%, #d92b2b 24% 76%, #f6f4ea 76%); }
.art-pool .hole { position: absolute; width: 30px; height: 30px; border-radius: 50%; background: #0b0b0b; box-shadow: 0 0 0 4px #2a1509; }
.art-pool .hole.h1 { right: 4px; top: 4px; }
.art-pool .hole.h2 { right: 4px; bottom: 4px; }
.compact .game-cards { grid-template-columns: repeat(4, 312px); gap: 14px; }
.compact .game-card { padding: 12px 12px 14px; }
.compact .game-art { height: 118px; }
.compact .game-art .tile { font-size: 10px; }
.compact #art-101 .tile { font-size: 8px; }
.compact #art-101 b { font-size: 46px; margin-left: 8px; }
.compact .game-card h3 { font-size: 25px; margin: 10px 0 3px; }
.compact .game-card p { min-height: 62px; font-size: 14.5px; }
.compact .game-tags span { font-size: 12px; padding: 2px 9px; }
.compact .art-pool .ball { width: 24px; height: 24px; }
.compact .art-pool .hole { width: 22px; height: 22px; }
#online-game { grid-template-columns: 1fr 1fr 1fr 1fr; }
#online-game button b { font-size: 19px; }
#create .card { min-width: 880px; }
.seg[data-key="game"] button { font-size: 16px; padding: 0 10px; }

/* 8 top: a player's remaining balls, in a row under the name */
.bl-sub.bl-row { display: flex; gap: 3px; margin-top: 2px; height: 24px; align-items: center; }
.bl-sub.bl-row img { width: 24px; height: 24px; display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); }
.bl-player.right .bl-sub.bl-row { justify-content: flex-end; }
#bilardo.pool .bl-name { font-size: 19px; }
#bilardo.pool .bl-player { gap: 12px; }
.compact .bl-sub.bl-row { height: 19px; gap: 2px; margin-top: 1px; }
.compact .bl-sub.bl-row img { width: 19px; height: 19px; }
.compact #bilardo.pool .bl-name { font-size: 15px; }

/* chat and gifts at the billiards tables: the chat panel and the effects stand over the table */
#chat { z-index: 78; }
#fx { z-index: 79; }
.gift-tag { z-index: 79; }
#bl-chat { position: relative; }
#bl-chat-badge { position: absolute; right: -6px; top: -6px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: #e02b20; color: #fff; font-size: 13px; font-weight: 700; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px #fff; }
#bilardo.online .bl-player { pointer-events: auto; cursor: pointer; }
#bilardo.online .bl-player:hover { background: rgba(30, 70, 45, .7); }
#bilardo.online #bl-top { left: 214px; }
.compact #bilardo.online #bl-top { left: 168px; }

/* ------------------------------------------------------------------ voice chat */
/* One capsule: the headset, what is going on, and (once in) the microphone. */
#voice-bar { position: absolute; left: 22px; top: 82px; z-index: 76; display: flex; align-items: center; gap: 8px; }
#btn-voice { display: flex; align-items: center; gap: 11px; height: 52px; padding: 0 16px 0 7px; border-radius: 26px; color: #fff; text-align: left;
  background: linear-gradient(180deg, rgba(14, 58, 40, .96), rgba(4, 26, 18, .96));
  box-shadow: 0 6px 14px rgba(0, 0, 0, .45), inset 0 0 0 1.5px rgba(255, 255, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .14);
  transition: background .2s, box-shadow .2s; }
#btn-voice:active { transform: translateY(2px); }
#btn-voice .v-icon { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #bfe8cf;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .12); transition: background .2s, color .2s; }
#btn-voice .v-icon svg { width: 23px; height: 23px; }
#btn-voice .v-text { display: flex; flex-direction: column; line-height: 1.15; }
#btn-voice .v-text b { font-size: 16px; font-weight: 700; white-space: nowrap; }
#btn-voice .v-text small { font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, .6); white-space: nowrap; }
/* the little level bars: still while nobody speaks, dancing while someone does */
#btn-voice .v-bars { display: none; align-items: center; gap: 2.5px; height: 20px; margin-left: 2px; }
#btn-voice .v-bars i { width: 3px; height: 5px; border-radius: 2px; background: #9ff0bf; }
#voice-bar.live #btn-voice { background: linear-gradient(180deg, #1f9e59, #0f6b3a); box-shadow: 0 6px 14px rgba(0, 0, 0, .45), 0 0 0 1.5px rgba(120, 240, 170, .55), 0 0 18px rgba(53, 196, 111, .45), inset 0 1px 0 rgba(255, 255, 255, .3); }
#voice-bar.live #btn-voice .v-icon { background: #fff; color: #0f6b3a; box-shadow: none; }
#voice-bar.live #btn-voice .v-text small { color: rgba(255, 255, 255, .82); }
#voice-bar.live #btn-voice .v-bars { display: flex; }
#voice-bar.speaking #btn-voice .v-bars i { animation: v-bar .7s ease-in-out infinite; }
#voice-bar.speaking #btn-voice .v-bars i:nth-child(2) { animation-delay: .15s; }
#voice-bar.speaking #btn-voice .v-bars i:nth-child(3) { animation-delay: .3s; }
#voice-bar.speaking #btn-voice .v-bars i:nth-child(4) { animation-delay: .45s; }
@keyframes v-bar { 0%, 100% { height: 5px; } 50% { height: 19px; } }
#btn-voice.busy .v-icon { animation: v-wait 1s ease-in-out infinite; }
@keyframes v-wait { 50% { opacity: .35; } }
#btn-mic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #0f6b3a; background: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .45), inset 0 -3px 0 rgba(0, 0, 0, .12); transition: background .2s, color .2s; }
#btn-mic:active { transform: translateY(2px); }
#btn-mic svg { width: 24px; height: 24px; }
#btn-mic .slash { display: none; }
#btn-mic.muted { color: #fff; background: linear-gradient(180deg, #ff5d55, #c9221c); box-shadow: 0 6px 14px rgba(0, 0, 0, .45), 0 0 14px rgba(255, 93, 85, .5), inset 0 1px 0 rgba(255, 255, 255, .3); }
#btn-mic.muted .slash { display: block; }
.compact #voice-bar { left: 8px; top: 55px; gap: 6px; }
.compact #btn-voice { height: 42px; padding: 0 12px 0 5px; gap: 8px; }
.compact #btn-voice .v-icon { width: 32px; height: 32px; }
.compact #btn-voice .v-icon svg { width: 19px; height: 19px; }
.compact #btn-voice .v-text b { font-size: 13.5px; }
.compact #btn-voice .v-text small { font-size: 10.5px; }
.compact #btn-mic { width: 38px; height: 38px; }
.compact #btn-mic svg { width: 20px; height: 20px; }
/* everyone in the voice chat carries a small microphone badge; whoever is speaking gets a breathing ring */
.seat.in-voice .avatar-wrap::after, .bl-player.in-voice .bl-ball::after {
  content: ''; position: absolute; right: -5px; bottom: -5px; width: 24px; height: 24px; border-radius: 50%; z-index: 4;
  background: #17a05a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='9' y='3' width='6' height='11' rx='3' fill='%23fff'/%3E%3Cpath d='M5.500 11.500a6.500 6.500 0 0013 0M12 18v3' stroke='%23fff' stroke-width='2.200' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / 15px 15px no-repeat; box-shadow: 0 0 0 2px #fff, 0 2px 5px rgba(0, 0, 0, .5);
}
.bl-player .bl-ball { position: relative; }
.bl-player.in-voice .bl-ball::after { width: 19px; height: 19px; background-size: 12px 12px; right: -6px; bottom: -6px; }
.seat.talking .avatar { box-shadow: 0 0 0 4px #57ff8f, 0 0 22px rgba(87, 255, 143, .9); animation: v-ring 1s ease-in-out infinite; }
.bl-player.talking { box-shadow: inset 0 0 0 3px #57ff8f, 0 0 20px rgba(87, 255, 143, .6); animation: v-ring 1s ease-in-out infinite; }
@keyframes v-ring { 50% { filter: brightness(1.18); } }

/* the game cards: how many players are online in each game right now */
.game-live { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -6px 0 16px; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .5); white-space: nowrap; }
.game-live i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .28); }
.game-live.on { color: #9ff0bf; }
.game-live.on i { background: #35e07a; box-shadow: 0 0 8px #35e07a; animation: live-dot 1.6s ease-in-out infinite; }
@keyframes live-dot { 50% { opacity: .35; } }
.compact .game-live { margin: -4px 0 9px; font-size: 12.5px; gap: 6px; }
.compact .game-live i { width: 7px; height: 7px; }

/* setting up a table: the games of the other side are not offered */
.create-choice button[hidden] { display: none; }

/* ------------------------------------------------------------------ Denge Kulesi */
#bilardo.kule #bl-left, #bilardo.kule #bl-right, #bilardo.kule #bl-bottom, #bilardo.kule #bl-track { display: none; }
#bilardo.kule .bl-ball { border-radius: 7px; height: 22px; background: linear-gradient(180deg, #f0cf9c, #c9965a); box-shadow: 0 3px 6px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(92, 58, 24, .5); }
#bilardo.kule #bl-hint { left: 30px; bottom: 34px; max-width: calc(50% - 330px); }
#bl-canvas { touch-action: none; }
#kl-pull { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: 560px; display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 3; }
#kl-meter { position: relative; width: 100%; height: 34px; border-radius: 999px; overflow: hidden; background: linear-gradient(90deg, #c62f25 0%, #e8a020 28%, #e8a020 34%, #2fbf6b 43%, #2fbf6b 57%, #e8a020 66%, #e8a020 72%, #c62f25 100%); box-shadow: inset 0 3px 8px rgba(0, 0, 0, .55), 0 0 0 3px rgba(0, 0, 0, .45), 0 8px 18px rgba(0, 0, 0, .45); }
#kl-zone { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 55%); }
#kl-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, .75); }
#kl-mark { position: absolute; top: -3px; bottom: -3px; left: 50%; width: 12px; margin-left: -6px; border-radius: 6px; background: #fff; box-shadow: 0 0 0 2px #1a1a1a, 0 0 12px rgba(255, 255, 255, .9); }
#kl-row { display: flex; align-items: center; gap: 16px; }
#kl-go { min-width: 230px; letter-spacing: .08em; }
.compact #kl-pull { width: 420px; bottom: 6px; gap: 7px; }
.compact #kl-meter { height: 26px; }
.compact #kl-go { height: 50px; min-width: 180px; font-size: 21px; }
.compact #kl-cancel { height: 44px; }

/* five games on the menu */
.game-cards { grid-template-columns: repeat(5, 296px); gap: 20px; }
.game-card { padding: 18px 16px 20px; }
.game-card h3 { font-size: 28px; }
.game-card p { min-height: 96px; font-size: 16px; }
.game-art { height: 150px; }
.game-tags span { font-size: 13px; }
.game-live { font-size: 14px; }
.compact .game-cards { grid-template-columns: repeat(5, 250px); gap: 10px; }
.compact .game-card { padding: 10px 9px 12px; }
.compact .game-card h3 { font-size: 21px; }
.compact .game-card p { min-height: 70px; font-size: 13px; }
.compact .game-live { font-size: 11.5px; }
.art-kule { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; background: radial-gradient(ellipse at 50% 35%, #2a7a52, #0c3423) !important; }
.kule-stack { position: relative; display: flex; flex-direction: column-reverse; align-items: center; margin-bottom: 12px; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .5)); }
.kule-stack .row { display: flex; gap: 2px; height: 15px; margin-top: 2px; }
.kule-stack .row b { display: block; height: 100%; border-radius: 2px; background: linear-gradient(180deg, #f3d6a6, #cf9d62); box-shadow: inset 0 0 0 1px rgba(92, 58, 24, .45); }
.kule-stack .row.ends b { width: 26px; }
.kule-stack .row.side b { width: 82px; }
.kule-stack .row.side b + b { display: none; }
.kule-stack .row.gap b:nth-child(2) { visibility: hidden; }
.kule-stack .row.out { position: absolute; left: 100%; bottom: 36px; margin-left: 10px; transform: rotate(-9deg); }
.kule-stack .row.out b { width: 60px; background: linear-gradient(180deg, #ffe7a8, #e0a84f); box-shadow: inset 0 0 0 1px rgba(92, 58, 24, .45), 0 0 10px rgba(255, 214, 90, .7); }
.compact .kule-stack .row { height: 11px; }
.compact .kule-stack .row.ends b { width: 20px; }
.compact .kule-stack .row.side b { width: 64px; }
.compact .kule-stack .row.out { bottom: 27px; }
.compact .kule-stack .row.out b { width: 46px; }
.create-choice#online-game { flex-wrap: wrap; }
.game-card p { min-height: 68px; }
.game-tags { flex-wrap: nowrap; gap: 5px; }
.game-tags span { padding-left: 8px; padding-right: 8px; font-size: 12px; white-space: nowrap; }
.compact .game-card p { min-height: 54px; }
.compact .game-tags { gap: 3px; }
.compact .game-tags span { padding-left: 5px; padding-right: 5px; font-size: 10px; }

/* the menu: four games to a row, the rows one under the other, all in view */
#games { margin-top: -62px; }
.games-head h1, .compact .games-head h1 { font-size: 60px; }
.games-head p, .compact .games-head p { margin-top: 0; font-size: 18px; }
.game-cards, .compact .game-cards { grid-template-columns: repeat(4, 350px); gap: 16px 22px; margin-top: 12px; }
.game-card, .compact .game-card { padding: 12px 14px 14px; border-radius: 22px; }
.game-card:hover { transform: translateY(-4px); }
.game-art, .compact .game-art { height: 104px; border-radius: 14px; }
.game-art .tile, .compact .game-art .tile { font-size: 9px; }
#art-101 .tile, .compact #art-101 .tile { font-size: 7.5px; }
#art-101 b, .compact #art-101 b { font-size: 46px; margin-left: 8px; }
.art-bilardo .ball, .compact .art-bilardo .ball { width: 24px; height: 24px; }
.art-pool .ball, .compact .art-pool .ball { width: 21px; height: 21px; }
.art-pool .hole, .compact .art-pool .hole { width: 20px; height: 20px; }
.art-bilardo, .art-pool { box-shadow: inset 0 0 0 6px #6b3f1a, inset 0 0 0 9px #0d3f7c, inset 0 2px 10px rgba(0, 0, 0, .45) !important; }
.art-pool { box-shadow: inset 0 0 0 6px #4f2912, inset 0 0 0 9px #0a5230, inset 0 2px 10px rgba(0, 0, 0, .45) !important; }
.game-card h3, .compact .game-card h3 { margin: 9px 0 2px; font-size: 26px; }
.game-card p, .compact .game-card p { min-height: 42px; font-size: 14.5px; line-height: 1.4; }
.game-tags, .compact .game-tags { margin: 8px 0 8px; gap: 5px; flex-wrap: nowrap; }
.game-tags span, .compact .game-tags span { padding: 2px 9px; font-size: 12px; }
.game-live, .compact .game-live { margin: 0 0 9px; font-size: 13px; }
.game-go, .compact .game-go { height: 44px; border-radius: 13px; font-size: 21px; }
.kule-stack, .compact .kule-stack { margin-bottom: 7px; }
.kule-stack .row, .compact .kule-stack .row { height: 11px; }
.kule-stack .row.ends b, .compact .kule-stack .row.ends b { width: 20px; }
.kule-stack .row.side b, .compact .kule-stack .row.side b { width: 64px; }
.kule-stack .row.out, .compact .kule-stack .row.out { bottom: 27px; }
.kule-stack .row.out b, .compact .kule-stack .row.out b { width: 46px; }
.compact #games { margin-top: -74px; }
.compact .games-head h1 { font-size: 42px; }
.compact .games-head p { display: none; }
.compact .game-cards { grid-template-columns: repeat(4, 318px); gap: 10px 14px; margin-top: 6px; }
.compact .game-card { padding: 9px 11px 11px; border-radius: 18px; }
.compact .game-art { height: 80px; }
.compact .game-card h3 { margin: 6px 0 1px; font-size: 22px; }
.compact .game-card p { min-height: 36px; font-size: 13px; line-height: 1.35; }
.compact .game-tags { margin: 5px 0 5px; }
.compact .game-tags span { font-size: 11px; padding: 1px 8px; }
.compact .game-live { margin: 0 0 6px; font-size: 12px; }
.compact .game-go { height: 38px; font-size: 19px; }
.compact #art-101 b { font-size: 38px; }
.compact .kule-stack .row { height: 9px; }
.compact .kule-stack .row.out { bottom: 22px; }

/* ------------------------------------------------------------------ Pişti */
#bilardo.pisti #bl-left, #bilardo.pisti #bl-right, #bilardo.pisti #bl-bottom, #bilardo.pisti #bl-track { display: none; }
#bilardo.pisti .bl-ball { border-radius: 4px; width: 22px; height: 30px; background: linear-gradient(135deg, #b3242c, #6e0f18); box-shadow: 0 3px 6px rgba(0, 0, 0, .5), inset 0 0 0 2px #f4e2b8; }
#bilardo.pisti #bl-hint { left: 24px; bottom: 16px; max-width: 300px; }
.compact #bilardo.pisti .bl-ball { width: 17px; height: 23px; }
.art-pisti { position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #2a9a62, #0a4a2e) !important; box-shadow: inset 0 0 0 6px #6a3d1c, inset 0 2px 10px rgba(0, 0, 0, .45) !important; }
.art-pisti .pc { position: absolute; display: block; width: 34px; height: 48px; border-radius: 5px; box-shadow: 2px 4px 6px rgba(0, 0, 0, .45); font-style: normal; }
.art-pisti .pc.back { background: linear-gradient(135deg, #b3242c, #6e0f18); box-shadow: 2px 4px 6px rgba(0, 0, 0, .45), inset 0 0 0 2px #f4e2b8; }
.art-pisti .pc.face { background: #fff; color: #1b1d26; }
.art-pisti .pc.face b { position: absolute; left: 4px; top: 1px; font-size: 14px; font-weight: 800; line-height: 1.1; }
.art-pisti .pc.face u { position: absolute; left: 0; right: 0; bottom: 5px; text-align: center; font-size: 20px; line-height: 1; text-decoration: none; }
.art-pisti .b1 { left: 14%; top: 24%; transform: rotate(-8deg); }
.art-pisti .b2 { left: 17%; top: 20%; transform: rotate(-3deg); }
.art-pisti .f1 { left: 44%; top: 26%; transform: rotate(-12deg); color: #d3222b !important; }
.art-pisti .f2 { left: 70%; top: 24%; transform: rotate(9deg); }
.art-pisti .f3 { left: 48%; top: 22%; transform: rotate(7deg); }

/* confetti for the winner, over everything, letting every touch through */
#confetti { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 300; pointer-events: none; }

/* what a player says at a table for two: a bubble hanging under their name plate */
.bl-player { position: relative; }
.bl-player .bl-bubble { position: absolute; top: calc(100% + 12px); left: 14px; right: auto; bottom: auto; z-index: 6; max-width: 420px; padding: 9px 16px; border-radius: 4px 16px 16px 16px; background: #fff; color: #14201a; font-size: 19px; font-weight: 600; line-height: 1.3; white-space: normal; text-align: left; box-shadow: 0 8px 18px rgba(0, 0, 0, .45); pointer-events: none; animation: bl-bubble-in .18s ease-out; }
.bl-player .bl-bubble::before { content: ''; position: absolute; left: 14px; top: -9px; border: 9px solid transparent; border-top: 0; border-bottom-color: #fff; }
.bl-player.right .bl-bubble { left: auto; right: 14px; border-radius: 16px 4px 16px 16px; }
.bl-player.right .bl-bubble::before { left: auto; right: 14px; }
.bl-player .bl-bubble[hidden] { display: none; }
@keyframes bl-bubble-in { from { opacity: 0; transform: translateY(-6px); } }
.compact .bl-player .bl-bubble { top: calc(100% + 9px); font-size: 15px; max-width: 280px; padding: 6px 12px; }

/* the tower in three dimensions: its own canvas, under the one that takes the touches */
#kl-gl { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
#kl-gl[hidden] { display: none; }


/* ------------------------------------------------------------------ the main menu as a portal */
#account-bar { gap: 10px; }
.portal-brand { margin-right: 18px; padding: 0; background: none; font-size: 44px; font-weight: 900; line-height: 1; color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .3), 0 8px 18px rgba(0, 0, 0, .4); }
.portal-brand span { color: var(--gold); }
.portal-nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.nav-btn { position: relative; height: 48px; padding: 0 18px; border-radius: 12px; background: none; color: rgba(255, 255, 255, .78); font-size: 19px; font-weight: 700; }
.nav-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-btn.on { color: var(--gold); }
.nav-btn.on::after { content: ''; position: absolute; left: 18px; right: 18px; bottom: 2px; height: 3px; border-radius: 3px; background: var(--gold); }
.nav-btn .badge { margin-left: 8px; }
#account-info { margin-right: 0; }

#games, .compact #games { position: absolute; left: 0; right: 0; top: 84px; bottom: 0; margin: 0; padding: 22px 32px 20px; display: block; }
.portal { display: grid; grid-template-columns: 1fr 372px; gap: 26px; height: 100%; }
.portal-main { display: flex; flex-direction: column; min-width: 0; }

.hero { position: relative; display: grid; grid-template-columns: 46% 1fr; align-items: center; gap: 30px; height: 228px; padding: 0 34px 0 18px; border-radius: 26px; overflow: hidden;
  background: radial-gradient(ellipse 60% 120% at 22% 50%, rgba(255, 214, 110, .2), transparent 60%), linear-gradient(120deg, rgba(10, 70, 46, .95), rgba(3, 28, 19, .95));
  border: 2px solid rgba(255, 204, 77, .32); box-shadow: 0 24px 50px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12); }
.hero-art { display: grid; place-items: center; height: 100%; cursor: pointer; }
.hero-zoom { transform: scale(1.42); }
.hero-zoom .game-art { width: 330px; height: 104px; }
.hero.swap .hero-zoom, .hero.swap .hero-text { animation: hero-in .5s ease-out; }
@keyframes hero-in { from { opacity: 0; transform: translateX(14px); } }
.hero.swap .hero-zoom { animation-name: hero-art-in; }
@keyframes hero-art-in { from { opacity: 0; transform: scale(1.5); } }
.hero-kicker { display: inline-block; padding: 3px 12px; border-radius: 999px; background: rgba(255, 204, 77, .18); color: var(--gold); font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hero h2 { margin: 6px 0 2px; font-size: 41px; font-weight: 900; line-height: 1.05; color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .3); }
.hero p { margin: 0; font-size: 18px; line-height: 1.4; color: rgba(255, 255, 255, .82); }
.hero .game-tags { justify-content: flex-start; margin: 10px 0 6px; }
.hero .game-live { justify-content: flex-start; margin: 0; }
.hero-buttons { display: flex; align-items: center; gap: 22px; margin-top: 8px; }
.hero-buttons .btn { height: 52px; padding: 0 34px; font-size: 22px; }
.hero-dots { display: flex; gap: 8px; }
.hero-dots button { width: 11px; height: 11px; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, .28); }
.hero-dots button.on { width: 30px; border-radius: 6px; background: var(--gold); }

.portal-head { display: flex; align-items: baseline; gap: 16px; margin: 18px 0 10px; }
.portal-head h2 { margin: 0; font-size: 28px; font-weight: 800; color: #fff; }
.portal-head span { font-size: 16px; color: rgba(255, 255, 255, .6); }

.portal .game-cards { grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; }
.portal .game-card { padding: 12px 12px 14px; border-radius: 20px; }
.portal .game-card p, .portal .game-card .game-tags { display: none; }
.portal .game-card h3 { margin: 8px 0 2px; font-size: 26px; }
.portal .game-live { margin: 0 0 8px; }
.portal .game-go { height: 42px; font-size: 20px; }

.portal-side { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.side-box { padding: 16px 18px; border-radius: 22px; background: linear-gradient(180deg, rgba(10, 62, 41, .82), rgba(4, 30, 21, .88)); border: 1px solid rgba(255, 204, 77, .22); box-shadow: 0 16px 34px rgba(0, 0, 0, .35); }
.side-box h3 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; font-size: 21px; font-weight: 800; color: var(--gold); }
.side-box h3 button { padding: 2px 8px; border-radius: 8px; background: none; color: rgba(255, 255, 255, .7); font-size: 15px; font-weight: 700; }
.side-box h3 button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.side-total { margin: -2px 0 10px; font-size: 17px; color: rgba(255, 255, 255, .7); }
.side-total b { font-size: 26px; color: #fff; }
.side-total i { margin: 0 6px; font-style: normal; color: rgba(255, 255, 255, .35); }
.side-online, .side-leaders { list-style: none; margin: 0; padding: 0; }
.side-online li { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 6px; border-radius: 8px; font-size: 16px; color: rgba(255, 255, 255, .75); cursor: pointer; }
.side-online li:hover, .side-leaders li:hover { background: rgba(255, 255, 255, .07); }
.side-online li i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.side-online li.on i { background: #35e07a; box-shadow: 0 0 8px #35e07a; }
.side-online li span { flex: 1; }
.side-online li b { font-weight: 700; color: rgba(255, 255, 255, .55); }
.side-online li.on b { color: #9ff0bf; }
.side-leaders li { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 6px; border-radius: 10px; font-size: 17px; cursor: pointer; }
.side-leaders li.muted { cursor: default; color: rgba(255, 255, 255, .55); font-size: 15px; height: auto; padding: 4px 6px; }
.side-leaders li.muted:hover { background: none; }
.side-leaders li.me { background: rgba(255, 204, 77, .14); }
.side-leaders em { width: 22px; font-style: normal; font-weight: 800; text-align: center; color: rgba(255, 255, 255, .55); }
.side-leaders li:nth-child(1) em { color: #ffd54a; }
.side-leaders li:nth-child(2) em { color: #d9dde3; }
.side-leaders li:nth-child(3) em { color: #e3a066; }
.side-leaders .mini-pic { width: 30px; height: 30px; }
.side-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.side-leaders b { color: var(--gold); font-weight: 800; }

/* phones: the same portal, tighter */
.compact #menu { padding-top: 62px; }
.compact #account-bar { left: 0; right: 0; top: 0; height: 62px; padding: 0 16px; gap: 6px; background: linear-gradient(180deg, rgba(2, 20, 14, .8), rgba(2, 20, 14, .45)); border-bottom: 1px solid rgba(255, 204, 77, .22); }
.compact .portal-brand { margin-right: 8px; font-size: 34px; }
.compact .nav-btn { height: 42px; padding: 0 13px; font-size: 17px; }
.compact .nav-btn.on::after { left: 13px; right: 13px; }
.compact #games { top: 62px; padding: 10px 16px 10px; }
.compact .portal { grid-template-columns: 1fr 310px; gap: 14px; }
.compact .hero { height: 158px; gap: 18px; padding: 0 20px 0 6px; border-radius: 20px; }
.compact .hero-zoom { transform: scale(1.18); }
.compact .hero h2 { margin: 4px 0 2px; font-size: 34px; }
.compact .hero p { font-size: 14.5px; }
.compact .hero .game-tags, .compact .hero-kicker { display: none; }
.compact .hero .game-live { margin-top: 6px; }
.compact .hero-buttons { margin-top: 8px; gap: 16px; }
.compact .hero-buttons .btn { height: 42px; padding: 0 24px; font-size: 18px; }
.compact .portal-head { display: none; }
.compact .portal .game-cards { gap: 10px; margin-top: 10px; }
.compact .portal .game-card { padding: 8px 9px 10px; border-radius: 16px; }
.compact .portal .game-art { height: 76px; }
.compact .portal .game-card h3 { margin: 5px 0 1px; font-size: 21px; }
.compact .portal .game-live { margin: 0 0 6px; font-size: 12px; }
.compact .portal .game-go { height: 34px; font-size: 17px; }
.compact .portal-side { gap: 10px; }
.compact .side-box { padding: 10px 14px; border-radius: 16px; }
.compact .side-box h3 { margin-bottom: 6px; font-size: 18px; }
.compact .side-total { margin-bottom: 4px; font-size: 14px; }
.compact .side-total b { font-size: 20px; }
.compact .side-online li { height: 24px; font-size: 14px; }
.compact .side-leaders li { height: 30px; font-size: 15px; }
.compact .side-leaders .mini-pic { width: 24px; height: 24px; }


/* the pictures copied into the featured place and onto a game's page keep the look of the card */
.art-classic .tile:nth-child(odd) { transform: rotate(-5deg) translateY(4px); }
.art-classic .tile:nth-child(even) { transform: rotate(4deg); }
.art-101 .tile { font-size: 7.5px !important; }
.art-101 b { margin-left: 8px; font-size: 46px; font-weight: 900; line-height: 1; color: var(--gold); text-shadow: 0 5px 0 rgba(0, 0, 0, .35); }

/* ------------------------------------------------------------------ a game's page: its lobby, over the
   whole screen and built around the talk. Left: the game and the city channels. Middle: the
   channel's talk under a strip of its open tables. Right: who is there. */
.menu-inner, .compact .menu-inner { position: absolute; left: 0; right: 0; top: 84px; bottom: 0; display: block; padding: 0; gap: 0; }
.menu-inner[hidden] { display: none !important; }
#sheet { --a: #12704a; --b: #073221; --glow: rgba(255, 204, 77, .42);
  position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: 280px minmax(0, 1fr) 290px; background: #081d15; animation: sheet-in .22s ease-out; }
@keyframes sheet-in { from { opacity: 0; } }
#sheet[data-game="101"] { --a: #1a56a8; --b: #0a2452; --glow: rgba(120, 180, 255, .42); }
#sheet[data-game="bilardo"] { --a: #6a3c18; --b: #24130a; --glow: rgba(90, 160, 255, .38); }
#sheet[data-game="pool"] { --a: #5a3413; --b: #1c0f07; --glow: rgba(70, 215, 130, .36); }
#sheet[data-game="kule"] { --a: #8a5a1c; --b: #2e1b0b; --glow: rgba(255, 214, 130, .42); }
#sheet[data-game="pisti"] { --a: #8d1a2c; --b: #300911; --glow: rgba(255, 150, 150, .34); }

.lob-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.lob-cities { padding: 14px 14px 10px; background: #05140f; border-right: 1px solid rgba(255, 255, 255, .07); }
.lob-people { padding: 16px 14px 12px; background: #05140f; border-left: 1px solid rgba(255, 255, 255, .07); }
.lob-main { background: radial-gradient(ellipse 70% 40% at 50% 0%, rgba(255, 255, 255, .05), transparent 70%), #0a251c; }
.lob-head { flex: none; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 4px 9px; }
.lob-head h2 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .5); white-space: nowrap; }
.lob-head span { font-size: 13px; font-weight: 700; color: #9ff0bf; white-space: nowrap; }
.lob-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent; touch-action: pan-y; }
.lob-none { padding: 12px 8px; font-size: 14.5px; line-height: 1.45; color: rgba(255, 255, 255, .5); }
#sheet input { font-family: inherit; border: 0; outline: none; color: #fff; background: rgba(0, 0, 0, .42); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); user-select: text; -webkit-user-select: text; }
#sheet input::placeholder { color: rgba(255, 255, 255, .4); text-transform: none; }
#sheet input:focus { box-shadow: inset 0 0 0 2px var(--gold); }

/* the game: a card in its own colours over the channels */
#sheet .menu-hero { position: relative; flex: none; display: block; height: auto; margin: 0 0 16px; padding: 12px 14px 14px; border: 0; border-radius: 18px; overflow: hidden;
  background: radial-gradient(ellipse 190px 100px at 50% 40%, var(--glow), transparent 72%), url(../img/noise.png), linear-gradient(150deg, var(--a), var(--b));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 12px 26px rgba(0, 0, 0, .4); }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#sheet #menu-back, #rules-open { position: static; padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, .34); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); font-size: 13.5px; font-weight: 700; color: rgba(255, 255, 255, .9); white-space: nowrap; }
#sheet #menu-back:hover, #rules-open:hover { background: rgba(0, 0, 0, .55); color: #fff; }
#rules-open { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 204, 77, .5); }
#sheet .show-art { display: grid; place-items: center; height: 96px; margin: 6px 0 2px; background: none; border: 0; overflow: visible; }
#sheet .show-zoom { transform: scale(.72); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); animation: hero-art-in .4s ease-out; }
#sheet .show-zoom .game-art { width: 330px; height: 104px; }
#sheet .show-zoom .art-classic, #sheet .show-zoom .art-101 { background: none; box-shadow: none; }
#sheet .show-zoom .art-kule { background: none !important; box-shadow: none; }
#sheet h1 { margin: 0 0 8px; font-size: 29px; font-weight: 900; line-height: 1.05; white-space: nowrap; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .28), 0 10px 20px rgba(0, 0, 0, .3); }
#sheet .menu-hero .game-tags { justify-content: flex-start; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; }
#sheet .menu-hero .game-tags span { padding: 2px 9px; font-size: 12px; background: rgba(0, 0, 0, .34); color: rgba(255, 255, 255, .92); }
#sheet .menu-hero .game-live { justify-content: flex-start; margin: 0; font-size: 13px; color: rgba(255, 255, 255, .68); }
#sheet .menu-hero .game-live.on { color: #b4f5cd; }

/* the channels */
#city-q { flex: none; height: 38px; margin: 0 0 8px; padding: 0 12px; border-radius: 10px; font-size: 15px; }
.city-row { flex: none; display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 10px; border-radius: 10px; background: none; color: rgba(255, 255, 255, .58); font-size: 16px; font-weight: 600; text-align: left; }
.city-row i { font-style: normal; font-weight: 800; color: rgba(255, 255, 255, .28); }
.city-row:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.city-row.live { color: #fff; }
.city-row.on { background: linear-gradient(180deg, #35c46f, #14843f); color: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .3); }
.city-row.on i { color: rgba(255, 255, 255, .7); }
.city-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.city-row b { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: rgba(53, 224, 122, .18); color: #9ff0bf; font-size: 13px; font-weight: 800; text-align: center; }
.city-row.on b { background: rgba(0, 0, 0, .28); color: #fff; }

/* the middle: where one is, and the ways to a table */
.lob-bar { flex: none; display: flex; align-items: center; gap: 10px; height: 76px; padding: 0 24px; background: rgba(0, 0, 0, .2); border-bottom: 1px solid rgba(255, 255, 255, .07); }
.lob-where { min-width: 0; margin-right: auto; }
#sheet #lob-title { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: 0; text-transform: none; white-space: nowrap; color: #fff; }
#lob-title::before { content: '#'; margin-right: 6px; color: var(--gold); opacity: .85; }
#lob-sub { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, .55); white-space: nowrap; }
.lob-bar .btn { height: 46px; padding: 0 22px; font-size: 18px; white-space: nowrap; }
.lob-code { display: flex; gap: 6px; margin-right: 6px; }
#lobby-code { width: 122px; height: 46px; padding: 0 12px; border-radius: 12px; font-size: 16px; font-weight: 600; text-transform: uppercase; }
.lob-code .btn { padding: 0 16px; }

/* its open tables, in a strip */
#lobby-tables { flex: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 9px 24px; overflow-x: auto; background: rgba(0, 0, 0, .1); border-bottom: 1px solid rgba(255, 255, 255, .07); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent; touch-action: pan-x; }
.strip-label { flex: none; font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .45); white-space: nowrap; }
.strip-none { font-size: 14.5px; line-height: 1.35; color: rgba(255, 255, 255, .55); }
.table-card { flex: none; display: flex; align-items: center; gap: 14px; padding: 8px 9px 8px 14px; border-radius: 14px; background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.table-card .table-status { margin-bottom: 5px; font-size: 13px; }
.table-card .table-seats { flex-wrap: nowrap; gap: 5px; }
.table-card .chip { padding: 2px 9px; font-size: 13.5px; }
.table-card .btn { flex: none; height: 42px; padding: 0 18px; font-size: 17px; }

#lobby-error { flex: none; margin: 10px 24px 0; padding: 8px 14px; border-radius: 10px; background: rgba(229, 72, 77, .16); font-size: 14.5px; text-align: left; }
#lobby-error.note { background: rgba(255, 204, 77, .14); color: #ffe6a3; }

/* the talk */
#city-chat { padding: 14px 24px 10px; user-select: text; -webkit-user-select: text; }
.chat-none { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 70px 20px 0; text-align: center; font-size: 16px; color: rgba(255, 255, 255, .5); }
.chat-none b { font-size: 26px; font-weight: 800; color: rgba(255, 255, 255, .88); }
.cmsg { position: relative; display: flex; gap: 12px; padding: 6px 38px 6px 8px; border-radius: 12px; }
.cmsg:hover { background: rgba(255, 255, 255, .04); }
.cmsg.mine { background: rgba(53, 196, 111, .08); }
.cmsg.cont { padding-top: 1px; padding-bottom: 5px; margin-top: -4px; }
.cmsg.cont .pp { height: 0; visibility: hidden; }
.cmsg.cont .ch { display: none; }
.pp { flex: none; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: rgba(255, 255, 255, .12); font-size: 17px; font-weight: 800; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .16); }
.pp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cb { min-width: 0; }
.ch { display: flex; align-items: baseline; gap: 8px; margin-bottom: 1px; }
.cmsg .who { padding: 0; background: none; font-size: 15.5px; font-weight: 800; color: #fff; }
.cmsg.guest .who { color: rgba(255, 255, 255, .72); }
.cmsg.adm .who { color: var(--gold); }
.cmsg button.who:hover { text-decoration: underline; }
.cmsg time { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .36); }
.ct { font-size: 16.5px; line-height: 1.42; color: rgba(255, 255, 255, .92); overflow-wrap: anywhere; }
.cmsg.big .ct { font-size: 40px; line-height: 1.2; }
.cmsg.sys { justify-content: center; padding: 6px 38px; }
.cmsg.sys .ct { padding: 3px 14px; border-radius: 999px; background: rgba(255, 204, 77, .1); font-size: 13.5px; font-weight: 600; color: rgba(255, 220, 140, .9); }
em.adm { padding: 1px 8px; border-radius: 999px; background: rgba(255, 204, 77, .18); box-shadow: inset 0 0 0 1px rgba(255, 204, 77, .5); color: var(--gold); font-size: 10.5px; font-style: normal; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.cmsg .del { display: none; position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; padding: 0; border-radius: 50%; background: rgba(229, 72, 77, .28); color: #ffc2bd; font-size: 17px; line-height: 1; }
.is-admin .cmsg:hover .del { display: block; }
.cmsg .del:hover { background: #e5484d; color: #fff; }

/* writing */
#city-say { position: relative; flex: none; display: flex; align-items: center; gap: 8px; margin: 6px 24px 18px; padding: 7px; border-radius: 18px; background: rgba(0, 0, 0, .42); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
#city-say:focus-within { box-shadow: inset 0 0 0 2px var(--gold); }
#emoji-open { flex: none; width: 44px; height: 44px; padding: 0; border-radius: 12px; background: none; font-size: 26px; line-height: 1; filter: grayscale(.35); }
#emoji-open:hover, #emoji-open.on { background: rgba(255, 255, 255, .1); filter: none; }
#sheet #city-text { flex: 1; min-width: 0; height: 44px; padding: 0 6px; background: none; box-shadow: none; font-size: 17px; }
#city-say .btn { flex: none; height: 44px; padding: 0 24px; font-size: 17px; }
#emoji-box { position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 6; width: 420px; display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; padding: 10px; border-radius: 18px; background: #0f3327; box-shadow: 0 24px 60px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(255, 204, 77, .32); }
#emoji-box[hidden] { display: none; }
#emoji-box button { height: 42px; padding: 0; border-radius: 10px; background: none; font-size: 26px; line-height: 1; }
#emoji-box button:hover { background: rgba(255, 255, 255, .12); transform: scale(1.15); }

/* who is here */
.lob-name { flex: none; display: block; margin: 0 0 16px; padding: 10px 12px 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.lob-name[hidden] { display: none; }
.lob-name span { display: block; margin: 0 0 7px 2px; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .6); }
.lob-name small { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 11px; color: rgba(255, 255, 255, .55); }
#lobby-name { width: 100%; box-sizing: border-box; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 16px; font-weight: 700; }
.person { flex: none; display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 8px; border-radius: 11px; background: none; color: #fff; font-size: 16px; font-weight: 700; text-align: left; }
button.person:hover { background: rgba(255, 255, 255, .07); }
.person .pp { width: 32px; height: 32px; font-size: 14.5px; }
.person .pn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person.guest .pn { font-weight: 600; color: rgba(255, 255, 255, .72); }
.person.adm .pn, .person.me .pn { color: var(--gold); }
.person em { flex: none; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 11px; font-style: normal; font-weight: 700; color: rgba(255, 255, 255, .5); }
.person em.play { background: rgba(90, 160, 255, .2); color: #a9cdff; }
.person em.city { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(255, 204, 77, .12); color: rgba(255, 220, 140, .85); }
.person-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 2px 4px 2px 50px; }
.person-tools button { height: 30px; padding: 0 10px; border-radius: 8px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 13px; font-weight: 700; }
.person-tools button:hover { background: rgba(255, 255, 255, .2); }
.person-tools button.danger { background: rgba(229, 72, 77, .28); color: #ffc2bd; }
.person-tools button.danger:hover { background: #e5484d; color: #fff; }
#mod-tools { flex: none; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 12px 12px 10px; border-radius: 14px; background: rgba(255, 204, 77, .08); box-shadow: inset 0 0 0 1px rgba(255, 204, 77, .28); }
#mod-tools[hidden] { display: none; }
#mod-tools span { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
#mod-tools button { height: 36px; border-radius: 10px; background: rgba(229, 72, 77, .28); color: #ffc2bd; font-size: 14.5px; font-weight: 700; }
#mod-tools button:hover { background: #e5484d; color: #fff; }
#mod-tools small { font-size: 12px; line-height: 1.4; color: rgba(255, 255, 255, .5); }

/* how the game is played, over the lobby */
#rules-pop { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 20px; background: rgba(3, 15, 10, .8); }
#rules-pop[hidden] { display: none; }
.show-rules { display: flex; flex-direction: column; width: min(620px, 100%); padding: 26px 30px; border-radius: 22px; background: linear-gradient(180deg, #10382a, #08221a); box-shadow: 0 30px 70px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 204, 77, .3); }
.show-rules h3 { margin: 0 0 16px; font-size: 24px; font-weight: 800; color: var(--gold); }
.rule-steps { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.rule-steps li { position: relative; padding-left: 42px; font-size: 16.5px; line-height: 1.45; color: rgba(255, 255, 255, .86); counter-increment: step; }
.rule-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 204, 77, .16); box-shadow: inset 0 0 0 1px rgba(255, 204, 77, .45); color: var(--gold); font-size: 14.5px; font-weight: 800; line-height: 1; }
.show-rules .btn { align-self: flex-end; height: 46px; margin-top: 20px; padding: 0 24px; font-size: 18px; }

/* phones */
.compact .menu-inner { top: 62px; }
.compact #sheet { grid-template-columns: 214px minmax(0, 1fr) 222px; }
.compact .lob-cities { padding: 9px 10px 8px; }
.compact .lob-people { padding: 10px 10px 8px; }
.compact #sheet .menu-hero { margin-bottom: 10px; padding: 8px 10px 10px; border-radius: 14px; }
.compact #sheet #menu-back, .compact #rules-open { padding: 3px 9px; font-size: 12px; }
.compact #sheet .show-art { height: 58px; margin: 3px 0 0; }
.compact #sheet .show-zoom { transform: scale(.5); }
.compact #sheet h1 { margin-bottom: 5px; font-size: 22px; }
.compact #sheet .menu-hero .game-tags { display: none; }
.compact #sheet .menu-hero .game-live { font-size: 11.5px; }
.compact .lob-head { margin-bottom: 6px; }
.compact .lob-head h2 { font-size: 11.5px; }
.compact .lob-head span { font-size: 11.5px; }
.compact #city-q { height: 32px; margin-bottom: 6px; font-size: 14px; }
.compact .city-row { height: 33px; font-size: 15px; }
.compact .lob-bar { height: 58px; padding: 0 16px; gap: 8px; }
.compact #sheet #lob-title { font-size: 22px; }
.compact #lob-sub { font-size: 12px; margin-top: 0; }
.compact .lob-bar .btn { height: 40px; padding: 0 15px; font-size: 16px; }
.compact #lobby-code { width: 100px; height: 40px; font-size: 14.5px; }
.compact .lob-code .btn { padding: 0 12px; }
.compact #lobby-tables { min-height: 42px; padding: 6px 16px; gap: 8px; }
.compact .strip-label { font-size: 11px; }
.compact .strip-none { font-size: 13px; }
.compact .table-card { padding: 5px 7px 5px 11px; gap: 10px; }
.compact .table-card .btn { height: 36px; padding: 0 14px; font-size: 15px; }
.compact #lobby-error { margin: 6px 16px 0; padding: 6px 12px; font-size: 13px; }
.compact #city-chat { padding: 8px 16px 6px; }
.compact .chat-none { padding-top: 30px; font-size: 14px; }
.compact .chat-none b { font-size: 20px; }
.compact .cmsg { gap: 10px; padding: 4px 34px 4px 6px; }
.compact .cmsg .pp { width: 32px; height: 32px; font-size: 14px; }
.compact .cmsg.cont .pp { height: 0; }
.compact .cmsg .who { font-size: 14px; }
.compact .ct { font-size: 15px; }
.compact .cmsg.big .ct { font-size: 32px; }
.compact #city-say { margin: 4px 16px 10px; padding: 5px; border-radius: 15px; }
.compact #emoji-open { width: 38px; height: 38px; font-size: 22px; }
.compact #sheet #city-text { height: 38px; font-size: 15.5px; }
.compact #city-say .btn { height: 38px; padding: 0 18px; font-size: 15.5px; }
.compact #emoji-box { width: 396px; padding: 8px; }
.compact #emoji-box button { height: 38px; font-size: 23px; }
.compact .lob-name { margin-bottom: 10px; padding: 7px 9px 9px; }
.compact .lob-name span { margin-bottom: 5px; font-size: 12px; }
.compact #lobby-name { height: 34px; font-size: 14.5px; }
.compact .person { height: 36px; font-size: 14.5px; gap: 8px; padding: 0 6px; }
.compact .person .pp { width: 26px; height: 26px; font-size: 12.5px; }
.compact .person-tools { padding-left: 8px; }
.compact #mod-tools { padding: 8px; gap: 6px; }
.compact #mod-tools small { display: none; }
.compact .rule-steps { gap: 9px; }
.compact .rule-steps li { font-size: 14px; padding-left: 34px; }
.compact .rule-steps li::before { width: 23px; height: 23px; font-size: 12.5px; }
.compact .show-rules { padding: 16px 20px; }
.compact .show-rules h3 { margin-bottom: 10px; font-size: 20px; }
.compact .show-rules .btn { height: 40px; margin-top: 12px; }

/* the game's picture stands in the middle of its card, whatever the card's width */
#sheet .show-art { position: relative; }
#sheet .show-zoom { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.72); animation: show-in .35s ease-out; }
.compact #sheet .show-zoom { transform: translate(-50%, -50%) scale(.5); }
@keyframes show-in { from { opacity: 0; } }
/* one's own messages, one after another, read as one block */
.cmsg.cont { margin-top: -5px; padding-top: 0; }
.cmsg.mine.cont { border-top-left-radius: 0; border-top-right-radius: 0; }
.cmsg.mine:has(+ .cmsg.mine.cont) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.cmsg.sys .del { top: 4px; }

/* AI players: the mark they carry wherever their names appear */
em.yz { padding: 1px 7px; border-radius: 999px; background: rgba(140, 170, 255, .16); box-shadow: inset 0 0 0 1px rgba(150, 180, 255, .5); color: #b9cdff; font-size: 10.5px; font-style: normal; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.person.ai .pn, .cmsg.ai .who { color: #cfdcff; font-weight: 700; }
.person.ai .pp, .cmsg.ai .pp { box-shadow: inset 0 0 0 2px rgba(150, 180, 255, .55); }
.person em.yz { background: rgba(140, 170, 255, .16); color: #b9cdff; }
.city-row b.yz { background: rgba(140, 170, 255, .14); color: #b9cdff; font-size: 11.5px; }
.city-row.on b.yz { background: rgba(0, 0, 0, .28); color: #fff; }
.chip.ai { color: #cfdcff; background: rgba(140, 170, 255, .14); box-shadow: inset 0 0 0 1.5px rgba(150, 180, 255, .4); }
#ai-legend { flex: none; margin: 10px 2px 0; font-size: 12px; line-height: 1.45; color: rgba(255, 255, 255, .5); }
#ai-legend[hidden] { display: none; }
.compact #ai-legend { margin-top: 6px; font-size: 10.5px; line-height: 1.35; }

/* every table being played: the full ones in the strip, and all the cities on request */
.strip-all { flex: none; padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .85); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.strip-all:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.table-card.full { opacity: .72; }
.full-tag { flex: none; padding: 5px 12px; border-radius: 999px; background: rgba(0, 0, 0, .35); font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .6); }
#tables-pop { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 24px; background: rgba(3, 15, 10, .8); }
#tables-pop[hidden] { display: none; }
.tables-box { display: flex; flex-direction: column; width: min(1040px, 100%); height: min(640px, 100%); padding: 22px 26px 20px; border-radius: 22px; background: linear-gradient(180deg, #10382a, #08221a); box-shadow: 0 30px 70px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 204, 77, .3); }
.tables-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.tables-head h3 { margin: 0; font-size: 24px; font-weight: 800; color: var(--gold); }
.tables-head .btn { height: 42px; padding: 0 20px; font-size: 17px; }
#tables-all h4 { display: flex; align-items: baseline; gap: 10px; margin: 14px 2px 8px; font-size: 18px; font-weight: 800; color: #fff; }
#tables-all h4:first-child { margin-top: 2px; }
#tables-all h4 span { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .5); }
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.tables-grid .table-card { justify-content: space-between; }
.tables-grid .table-seats { flex-wrap: wrap; }
.side-total em.yz { margin-left: 2px; font-size: 12px; vertical-align: middle; }
.compact .strip-all { padding: 3px 9px; font-size: 11.5px; }
.compact #tables-pop { padding: 10px; }
.compact .tables-box { padding: 12px 16px; border-radius: 16px; }
.compact .tables-head h3 { font-size: 19px; }
.compact .tables-head .btn { height: 36px; font-size: 15px; }
.compact #tables-all h4 { margin: 10px 2px 6px; font-size: 15.5px; }
.compact .tables-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 7px; }

/* "Aktif Masalar": beside quick play, with how many tables are being played */
#lobby-active b { display: inline-block; min-width: 22px; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: #35c46f; color: #04200f; font-size: 14px; font-weight: 900; text-align: center; vertical-align: 1px; }
#lobby-active b[hidden] { display: none; }
.tables-head h3 { margin-right: auto; }
.tables-head .lob-code { margin: 0; }
.tables-head #lobby-code { width: 130px; height: 42px; }
.compact .tables-head #lobby-code { width: 104px; height: 36px; }

/* the advertising space: what room is left under the leaders */
.side-ad { position: relative; flex: 1 1 0; min-height: 120px; display: flex; padding: 10px; overflow: hidden; }
.side-ad[hidden] { display: none; }
/* a player who signs in through Facebook: a small "f" by the name, and the picture ringed in its blue */
.fb-mark { display: inline-grid; place-items: center; width: 1.05em; height: 1.05em; margin-left: .35em; border-radius: .25em; background: #1877f2; color: #fff; font: 800 .82em/1 Arial, Helvetica, sans-serif; vertical-align: .08em; text-shadow: none; flex: none; }
.mini-pic.fb { border-color: #1877f2; }
.pp.fb { box-shadow: 0 0 0 2px #1877f2; }
.profile-pic.fb { box-shadow: 0 0 0 4px #1877f2; }
.avatar-wrap.fb::after { content: 'f'; position: absolute; right: -2px; bottom: -2px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: #1877f2; color: #fff; font: 800 18px/23px Arial, Helvetica, sans-serif; text-align: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.compact .avatar-wrap.fb::after { width: 22px; height: 22px; font-size: 15px; line-height: 19px; }
.side-foot { margin-top: auto; padding: 0 6px 2px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; }
.side-foot a { color: rgba(255, 255, 255, .55); text-decoration: none; }
.side-foot a:hover { color: var(--gold); text-decoration: underline; }
.side-foot i { font-style: normal; color: rgba(255, 255, 255, .25); }
.side-ad .ad-tag { position: absolute; left: 20px; top: 19px; z-index: 1; padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, .55); font-size: 11px; font-weight: 700; letter-spacing: .06em; color: rgba(255, 255, 255, .75); text-transform: uppercase; }
#ad-link { flex: 1; min-width: 0; min-height: 0; display: grid; place-items: center; border-radius: 14px; overflow: hidden; color: inherit; text-decoration: none; }
#ad-link:not([href]) { cursor: default; }
#ad-img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }
#ad-img[hidden] { display: none; }
.ad-empty { align-self: stretch; justify-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px; border-radius: 14px; border: 2px dashed rgba(255, 204, 77, .35); background: rgba(0, 0, 0, .18); text-align: center; }
.ad-empty[hidden] { display: none; }
.ad-empty b { font-size: 22px; font-weight: 800; color: var(--gold); }
.ad-empty span { font-size: 15px; line-height: 1.4; color: rgba(255, 255, 255, .65); }
.compact .side-ad { min-height: 90px; padding: 7px; }
.compact .ad-empty b { font-size: 18px; }
.compact .ad-empty span { font-size: 13px; }

/* ------------------------------------------------------------------ Amerikan Bilardo (8 top): the design of Desktop/Bil
   Everything below applies while the eight-ball table is open (#stage.pool8); the carom table
   uses the same page elements in its own look. The design is drawn on a 1600 × 900 board: --k
   scales it onto the stage, --f does the same for text (a little larger on a phone), --x0 is
   where the design's 1536-wide content starts. */
.bl-head { display: flex; align-items: center; min-width: 0; }
.bl-you, .bl-status, #bl-score8, #bl-spin-name, #bl-scale, #bl-chalk, #bl-rub, #bl-chalk-state { display: none; }
#stage.pool8 #bilardo { font-family: 'Barlow', 'Rubik', system-ui, sans-serif; color: #f4f0e7; background-color: #070b0e;
  background-image: radial-gradient(ellipse calc(980px * var(--k)) calc(560px * var(--k)) at 50% 52%, rgba(255, 226, 170, .13), rgba(255, 226, 170, 0) 72%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .55) 100%); }
#stage.pool8 #bilardo .btn, #stage.pool8 #bilardo button { font-family: inherit; text-shadow: none; }

/* the top bar: menu, chat and sound; the score board; the voice chat */
#stage.pool8 #bilardo #bl-buttons { left: var(--x0); top: calc(30px * var(--k)); gap: calc(8px * var(--k)); }
#stage.pool8 #bilardo #bl-buttons .icon-btn { width: calc(48px * var(--k)); height: calc(48px * var(--k)); border-radius: calc(14px * var(--k)); border: 1px solid rgba(255, 255, 255, .1); background: #121a1f; color: #f4f0e7; box-shadow: none; }
#stage.pool8 #bilardo #bl-buttons .icon-btn svg { width: calc(20px * var(--f)); height: calc(20px * var(--f)); }
#stage.pool8 #bilardo #bl-buttons .icon-btn.off { color: #ff8a7a; border-color: #5b2a2a; }
#stage.pool8 #bilardo #bl-top { left: calc(var(--x0) + 224px * var(--k)); right: auto; width: calc(1088px * var(--k)); top: calc(18px * var(--k)); height: calc(72px * var(--k));
  gap: 0; align-items: stretch; border-radius: calc(20px * var(--k)); overflow: hidden; background: linear-gradient(180deg, #161f25, #0d1418);
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 calc(12px * var(--k)) calc(28px * var(--k)) rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06); }
#stage.pool8 #bilardo .bl-player { position: relative; flex: 1 1 0; height: auto; border-radius: 0; background: none; box-shadow: none; animation: none;
  gap: calc(14px * var(--k)); padding: 0 calc(20px * var(--k)) 0 calc(14px * var(--k)); text-align: left; }
#stage.pool8 #bilardo .bl-player.right { justify-content: flex-end; padding: 0 calc(14px * var(--k)) 0 calc(20px * var(--k)); }
#stage.pool8 #bilardo .bl-player.turn { background: linear-gradient(90deg, rgba(232, 190, 104, .2), rgba(232, 190, 104, .03)); }
#stage.pool8 #bilardo .bl-player.right.turn { background: linear-gradient(270deg, rgba(232, 190, 104, .2), rgba(232, 190, 104, .03)); }
#stage.pool8 #bilardo .bl-player.turn::after { content: ''; position: absolute; left: 0; bottom: 0; width: 96%; height: calc(3px * var(--k)); background: #e8be68; }
#stage.pool8 #bilardo .bl-player.right.turn::after { left: auto; right: 0; }
#stage.pool8 #bilardo .bl-player.talking .bl-ball { box-shadow: 0 0 0 3px #57ff8f, 0 0 14px rgba(87, 255, 143, .8); }
#stage.pool8 #bilardo .bl-ball { width: calc(48px * var(--k)); height: calc(48px * var(--k)); box-sizing: border-box; border: 2px solid #3a4a51; background: #0a1014; box-shadow: none;
  display: grid; place-items: center; font-family: 'Barlow Condensed', sans-serif; font-size: calc(24px * var(--f)); font-weight: 700; line-height: 1; color: #a9b7b8; }
#stage.pool8 #bilardo .bl-player.turn .bl-ball { border-color: #e8be68; color: #e8be68; }
#stage.pool8 #bilardo .bl-who { gap: calc(7px * var(--k)); line-height: 1; }
#stage.pool8 #bilardo .bl-player.right .bl-who { align-items: flex-end; }
#stage.pool8 #bilardo .bl-head { gap: calc(8px * var(--k)); }
#stage.pool8 #bilardo .bl-player.right .bl-head { flex-direction: row-reverse; }
#stage.pool8 #bilardo .bl-name { font-size: calc(19px * var(--f)); font-weight: 700; line-height: 1.05; }
#stage.pool8 #bilardo .bl-player.right .bl-name { color: #d7dedf; }
#stage.pool8 #bilardo .bl-you { display: inline-block; flex: none; font-style: normal; font-size: calc(11px * var(--f)); font-weight: 700; letter-spacing: .1em; line-height: 1.2;
  padding: calc(2px * var(--k)) calc(6px * var(--k)); border-radius: calc(6px * var(--k)); background: #e8be68; color: #1b1305; }
#stage.pool8 #bilardo .bl-you[hidden] { display: none; }
#stage.pool8 #bilardo .bl-status { display: inline; flex: none; font-size: calc(13px * var(--f)); font-weight: 600; color: #c9d2d3; white-space: nowrap; }
#stage.pool8 #bilardo .bl-player.right .bl-status { color: #a9b7b8; }
#stage.pool8 #bilardo .bl-sub.bl-row { display: flex; height: auto; margin: 0; gap: calc(5px * var(--k)); }
#stage.pool8 #bilardo .bl-sub.bl-row img, #stage.pool8 #bilardo .bl-sub.bl-row i { width: calc(14px * var(--k)); height: calc(14px * var(--k)); filter: none; }
#stage.pool8 #bilardo .bl-sub.bl-row i { display: block; box-sizing: border-box; border-radius: 50%; background: rgba(0, 0, 0, .35); border: calc(1.5px * var(--k)) solid rgba(255, 255, 255, .2); }
#stage.pool8 #bilardo .bl-score { display: none; }
#stage.pool8 #bilardo .bl-timer { display: flex; align-items: center; gap: calc(8px * var(--k)); margin-left: auto; min-width: 0; padding: 0; background: none;
  font-family: 'Barlow Condensed', sans-serif; font-size: calc(34px * var(--f)); font-weight: 700; line-height: 1; color: #e8be68; }
#stage.pool8 #bilardo .bl-timer::before { content: ''; flex: none; width: calc(20px * var(--f)); height: calc(20px * var(--f)); background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l2.5 2M9.5 2.5h5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l2.5 2M9.5 2.5h5'/%3E%3C/svg%3E") center / contain no-repeat; }
#stage.pool8 #bilardo .bl-timer[hidden] { display: none; }
#stage.pool8 #bilardo .bl-timer.low { background: none; color: #ff7a6b; }
#stage.pool8 #bilardo .bl-player.right .bl-timer { margin-left: 0; margin-right: auto; }
#stage.pool8 #bilardo #bl-mid { width: calc(190px * var(--k)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(4px * var(--k));
  background: #070b0e; border-left: 1px solid rgba(255, 255, 255, .08); border-right: 1px solid rgba(255, 255, 255, .08); }
#stage.pool8 #bilardo #bl-target { font-size: calc(10.5px * var(--f)); font-weight: 700; letter-spacing: .12em; color: #a9b7b8; white-space: nowrap; }
#stage.pool8 #bilardo #bl-score8 { display: flex; align-items: center; gap: calc(14px * var(--k)); font-family: 'Barlow Condensed', sans-serif; font-weight: 700; line-height: 1; }
#stage.pool8 #bilardo #bl-score8 b { font-size: calc(38px * var(--f)); color: #f4f0e7; }
#stage.pool8 #bilardo #bl-score8 i { font-style: normal; font-size: calc(24px * var(--f)); color: #6f7f82; }
#stage.pool8 #voice-bar { left: auto; right: var(--x0); top: calc(30px * var(--k)); gap: calc(8px * var(--k)); flex-direction: row-reverse; }
#stage.pool8 #btn-voice { height: calc(48px * var(--k)); padding: 0 calc(14px * var(--k)) 0 calc(12px * var(--k)); gap: calc(10px * var(--k)); border-radius: calc(14px * var(--k));
  background: #121a1f; border: 1px solid rgba(255, 255, 255, .1); box-shadow: none; font-family: 'Barlow', 'Rubik', sans-serif; color: #f4f0e7; }
#stage.pool8 #btn-voice .v-icon { width: auto; height: auto; background: none; box-shadow: none; border: none; color: #e8be68; }
#stage.pool8 #btn-voice .v-icon svg { width: calc(20px * var(--f)); height: calc(20px * var(--f)); }
#stage.pool8 #btn-voice .v-text b { font-size: calc(14px * var(--f)); font-weight: 700; }
#stage.pool8 #btn-voice .v-text small { display: none; }
#stage.pool8 #voice-bar.live #btn-voice { background: #10291d; border-color: #2fbf6b; box-shadow: none; }
#stage.pool8 #voice-bar.live #btn-voice .v-icon { background: none; color: #5fe39a; }
#stage.pool8 #btn-mic { width: calc(48px * var(--k)); height: calc(48px * var(--k)); border-radius: calc(14px * var(--k)); background: #121a1f; border: 1px solid rgba(255, 255, 255, .1); color: #f4f0e7; box-shadow: none; }
#stage.pool8 #btn-mic.muted { background: #121a1f; border-color: #c9221c; color: #ff8a7a; box-shadow: none; }
#stage.pool8 #btn-mic svg { width: calc(20px * var(--f)); height: calc(20px * var(--f)); }

/* a word on the table */
#stage.pool8 #bilardo #bl-msg { top: calc(180px * var(--k)); padding: calc(8px * var(--k)) calc(18px * var(--k)); border-radius: calc(12px * var(--k)); background: rgba(18, 26, 31, .94);
  border: 1px solid rgba(255, 255, 255, .1); font-size: calc(16px * var(--f)); font-weight: 700; color: #f4f0e7; box-shadow: 0 8px 18px rgba(0, 0, 0, .45); }
#stage.pool8 #bilardo #bl-msg.good { background: rgba(18, 26, 31, .94); border-color: rgba(232, 190, 104, .7); color: #ffe6ad; }

/* the spin panel, left of the table */
#stage.pool8 #bilardo #bl-left { left: var(--x0); top: calc(332px * var(--k)); bottom: auto; width: calc(110px * var(--k)); height: calc(242px * var(--k)); box-sizing: border-box;
  padding: calc(18px * var(--k)) calc(10px * var(--k)); gap: calc(14px * var(--k)); justify-content: flex-start; border-radius: calc(20px * var(--k));
  background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .09); }
#stage.pool8 #bilardo .bl-label { font-size: calc(12px * var(--f)); line-height: 1.2; font-weight: 700; letter-spacing: .18em; color: #a9b7b8; }
#stage.pool8 #bilardo #bl-spin { flex: none; width: calc(88px * var(--k)); height: calc(88px * var(--k));
  background: radial-gradient(circle, transparent calc(22px * var(--k) - 1px), rgba(20, 30, 35, .2) calc(22px * var(--k) - 1px), rgba(20, 30, 35, .2) calc(22px * var(--k)), transparent calc(22px * var(--k))),
    radial-gradient(circle at 35% 26%, #ffffff 0, #efeadd 50%, #b9b2a0 100%);
  box-shadow: 0 calc(10px * var(--k)) calc(16px * var(--k)) rgba(0, 0, 0, .6), inset 0 -5px 9px rgba(0, 0, 0, .16); }
#stage.pool8 #bilardo #bl-spin::before, #stage.pool8 #bilardo #bl-spin::after { background: rgba(20, 30, 35, .25); }
#stage.pool8 #bilardo #bl-tip { width: calc(18px * var(--k)); height: calc(18px * var(--k)); margin: calc(-9px * var(--k)) 0 0 calc(-9px * var(--k)); box-sizing: border-box;
  background: #1f5fd8; border: 2px solid #ffffff; box-shadow: 0 2px 5px rgba(0, 0, 0, .45); }
#stage.pool8 #bilardo #bl-spin-name { display: block; font-size: calc(14px * var(--f)); line-height: calc(17px * var(--k)); font-weight: 600; white-space: nowrap; }
#stage.pool8 #bilardo #bl-spin-reset { width: 100%; height: calc(44px * var(--k)); padding: 0; border-radius: calc(12px * var(--k)); border: 1px solid rgba(255, 255, 255, .16);
  background: #18232a; box-shadow: none; color: #f4f0e7; font-size: calc(14px * var(--f)); font-weight: 700; letter-spacing: 0; }

/* the power panel, right of the table */
#stage.pool8 #bilardo #bl-right { display: block; left: calc(var(--x0) + 1426px * var(--k)); top: calc(182px * var(--k)); bottom: auto; width: calc(110px * var(--k)); height: calc(542px * var(--k));
  box-sizing: border-box; border-radius: calc(20px * var(--k)); background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .09); }
#stage.pool8 #bilardo #bl-right .bl-label { position: absolute; left: 0; right: 0; top: calc(18px * var(--k)); text-align: center; }
#stage.pool8 #bilardo #bl-power { position: absolute; left: calc(24px * var(--k)); top: calc(46px * var(--k)); width: calc(30px * var(--k)); height: calc(420px * var(--k)); max-height: none;
  box-sizing: border-box; border-radius: calc(15px * var(--k)); background: #05090b; border: 1px solid rgba(255, 255, 255, .14); box-shadow: inset 0 4px 8px rgba(0, 0, 0, .7); }
#stage.pool8 #bilardo #bl-power::after { content: ''; position: absolute; inset: 0 calc(5px * var(--k)); pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, .14), rgba(255, 255, 255, .14)) 0 25% / 100% 1px no-repeat,
    linear-gradient(rgba(255, 255, 255, .14), rgba(255, 255, 255, .14)) 0 50% / 100% 1px no-repeat,
    linear-gradient(rgba(255, 255, 255, .14), rgba(255, 255, 255, .14)) 0 75% / 100% 1px no-repeat; }
#stage.pool8 #bilardo #bl-power-fill { left: calc(3px * var(--k)); right: calc(3px * var(--k)); bottom: calc(3px * var(--k)); border-radius: calc(12px * var(--k));
  background: linear-gradient(0deg, #49c08e 0%, #f0c75e 55%, #f07b45 100%) 50% 100% / 100% calc(412px * var(--k)) no-repeat; }
#stage.pool8 #bilardo #bl-power-knob { left: calc(-9px * var(--k)); right: calc(-7px * var(--k)); height: calc(16px * var(--k)); margin-bottom: calc(-8px * var(--k)); z-index: 1;
  border-radius: calc(8px * var(--k)); background: linear-gradient(180deg, #ffffff, #d5cfbf); box-shadow: 0 3px 6px rgba(0, 0, 0, .6); }
#stage.pool8 #bilardo #bl-scale { display: flex; flex-direction: column; justify-content: space-between; position: absolute; left: calc(64px * var(--k)); top: calc(46px * var(--k)); height: calc(420px * var(--k));
  font-family: 'Barlow Condensed', sans-serif; font-size: calc(14px * var(--f)); font-weight: 600; line-height: 1; color: #a9b7b8; pointer-events: none; }
#stage.pool8 #bilardo #bl-power-text { position: absolute; left: 0; right: 0; top: calc(480px * var(--k)); text-align: center; font-family: 'Barlow Condensed', sans-serif;
  font-size: calc(44px * var(--f)); font-weight: 700; line-height: 1; }
#stage.pool8 #bilardo #bl-power-text small { margin-left: 2px; font-size: calc(22px * var(--f)); color: #a9b7b8; }

/* the bottom bar: a hint, fine aim and the stroke, the chalk on the tip */
#stage.pool8 #bilardo #bl-bottom { top: calc(822px * var(--k)); bottom: auto; gap: calc(12px * var(--k)); }
#stage.pool8 #bilardo #bl-fine-l, #stage.pool8 #bilardo #bl-fine-r { width: calc(64px * var(--k)); height: calc(60px * var(--k)); padding: 0; font-size: 0; border-radius: calc(16px * var(--k));
  border: 1px solid rgba(255, 255, 255, .16); background: #18232a; box-shadow: none; }
#stage.pool8 #bilardo #bl-fine-l::before, #stage.pool8 #bilardo #bl-fine-r::before { content: ''; width: calc(24px * var(--f)); height: calc(24px * var(--f)); background: #f4f0e7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 6l-6 6 6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 6l-6 6 6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
#stage.pool8 #bilardo #bl-fine-r::before { transform: scaleX(-1); }
#stage.pool8 #bilardo #bl-shoot { min-width: 0; width: calc(260px * var(--k)); height: calc(60px * var(--k)); padding: 0; border: none; border-radius: calc(16px * var(--k));
  background: linear-gradient(180deg, #f6d68c, #d9a94c); color: #1b1305; font-family: 'Barlow Condensed', sans-serif; font-size: calc(30px * var(--f)); font-weight: 700; letter-spacing: .16em;
  box-shadow: 0 calc(5px * var(--k)) 0 #8f6a26, 0 calc(14px * var(--k)) calc(22px * var(--k)) rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .6); }
#stage.pool8 #bilardo #bl-shoot:active { box-shadow: 0 calc(2px * var(--k)) 0 #8f6a26, 0 calc(8px * var(--k)) calc(14px * var(--k)) rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .6); }
#stage.pool8 #bilardo #bl-hint { display: flex; align-items: center; gap: calc(12px * var(--k)); left: var(--x0); bottom: auto; top: calc(820px * var(--k)); height: calc(64px * var(--k));
  max-width: min(calc(400px * var(--k)), calc(50% - var(--x0) - 230px * var(--k))); font-size: calc(13px * var(--f)); line-height: 1.32; font-weight: 500; color: #c9d2d3; }
#stage.pool8 #bilardo #bl-hint::before { content: ''; flex: none; width: calc(22px * var(--f)); height: calc(22px * var(--f)); background: #e8be68;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 7.5v.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 7.5v.5'/%3E%3C/svg%3E") center / contain no-repeat; }
#stage.pool8 #bilardo #bl-chalk { display: flex; position: absolute; z-index: 2; left: calc(var(--x0) + 1102px * var(--k)); top: calc(756px * var(--k)); width: calc(44px * var(--k)); height: calc(44px * var(--k));
  padding: 0; border: none; background: transparent; cursor: pointer; align-items: center; justify-content: center; transition: opacity .2s ease; }
#stage.pool8 #bilardo #bl-chalk.busy { opacity: .25; }
#stage.pool8 #bilardo.idle #bl-chalk { pointer-events: none; }
#stage.pool8 #bilardo #bl-chalk i, #stage.pool8 #bilardo #bl-rub .cube { display: block; box-sizing: border-box; width: calc(26px * var(--k)); height: calc(26px * var(--k)); border-radius: calc(4px * var(--k));
  transform: rotate(-12deg); border: calc(3px * var(--k)) solid #17386e; background: radial-gradient(circle at 50% 50%, #1c4c92 0 28%, #3a8ae0 60%);
  box-shadow: 2px 4px 5px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .35); }
#stage.pool8 #bilardo #bl-rub { display: block; position: absolute; z-index: 3; width: 0; height: 0; pointer-events: none; }
#stage.pool8 #bilardo #bl-rub[hidden] { display: none; }
#stage.pool8 #bilardo #bl-rub .dust { position: absolute; left: calc(-23px * var(--k)); top: calc(-23px * var(--k)); width: calc(46px * var(--k)); height: calc(46px * var(--k)); border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 195, 255, .85) 0, rgba(140, 195, 255, 0) 68%); animation: bl-chalk-dust 1100ms ease-out both; }
#stage.pool8 #bilardo #bl-rub .cube { position: absolute; left: calc(-12px * var(--k)); top: calc(-12px * var(--k)); width: calc(24px * var(--k)); height: calc(24px * var(--k)); animation: bl-chalk-rub 1100ms ease-in-out both; }
@keyframes bl-chalk-rub { 0% { transform: translate(70px, 60px) rotate(-12deg); opacity: 0; } 18% { transform: translate(0, 0) rotate(-30deg); opacity: 1; } 32% { transform: translate(3px, -2px) rotate(-12deg); }
  46% { transform: translate(-2px, 2px) rotate(-44deg); } 60% { transform: translate(3px, -2px) rotate(-16deg); } 74% { transform: translate(-2px, 2px) rotate(-40deg); }
  86% { transform: translate(0, 0) rotate(-30deg); opacity: 1; } 100% { transform: translate(70px, 60px) rotate(-12deg); opacity: 0; } }
@keyframes bl-chalk-dust { 0%, 20% { transform: scale(.3); opacity: 0; } 45% { opacity: .75; } 100% { transform: scale(1.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #bl-rub .dust, #bl-rub .cube { animation-duration: .01s !important; } }
#stage.pool8 #bilardo #bl-chalk-state { display: flex; position: absolute; right: var(--x0); top: calc(820px * var(--k)); height: calc(64px * var(--k)); align-items: center; gap: calc(10px * var(--k));
  font-size: calc(14px * var(--f)); font-weight: 600; color: #c9d2d3; pointer-events: none; }
#stage.pool8 #bilardo #bl-chalk-state i { width: calc(14px * var(--k)); height: calc(14px * var(--k)); box-sizing: border-box; border-radius: calc(3px * var(--k)); border: 2px solid #17386e; }
#stage.pool8 #bilardo.idle #bl-bottom, #stage.pool8 #bilardo.idle #bl-left, #stage.pool8 #bilardo.idle #bl-right { opacity: .4; }

/* ------------------------------------------------------------------ Pişti: the design of Desktop/PTasarim
   Applies while the pişti table is open (#stage.pisti8); the billiards tables use the same page
   elements in their own looks. The design is drawn on a 1440 × 810 board: --d scales it onto the
   stage, --df does the same for text (a little larger on a phone). */
#ps-brand, .ps-stat, .ps-time, #ps-scores-btn { display: none; }
#stage.pisti8 #bilardo { font-family: 'Plus Jakarta Sans', 'Rubik', system-ui, sans-serif; color: #eef1f6; background: #090c12; }
#stage.pisti8 #bilardo button { font-family: inherit; text-shadow: none; }

/* the top bar: menu, chat, voice on the left; the name in the middle; points and sound on the right */
#stage.pisti8 #bilardo #bl-buttons { left: calc(28px * var(--d)); right: calc(28px * var(--d)); top: calc(13px * var(--d)); gap: calc(10px * var(--d)); pointer-events: none; }
#stage.pisti8 #bilardo #bl-buttons .icon-btn { pointer-events: auto; width: calc(46px * var(--d)); height: calc(46px * var(--d)); border-radius: calc(12px * var(--d)); border: 1px solid #262d3a; background: #131822; color: #eef1f6; box-shadow: none; }
#stage.pisti8 #bilardo #bl-buttons .icon-btn svg { width: calc(20px * var(--df)); height: calc(20px * var(--df)); }
#stage.pisti8 #bilardo #bl-buttons .icon-btn.off { color: #ff8a7a; border-color: #5b2a2a; }
#stage.pisti8 #bilardo #bl-buttons #ps-scores-btn { display: flex; align-items: center; gap: calc(10px * var(--d)); width: auto; margin-left: auto; padding: 0 calc(16px * var(--d)) 0 calc(12px * var(--d)); font-size: calc(14px * var(--df)); font-weight: 700; }
#stage.pisti8 #bilardo #ps-brand { display: flex; position: absolute; left: 0; right: 0; top: 0; height: calc(72px * var(--d)); align-items: center; justify-content: center; gap: calc(12px * var(--d)); pointer-events: none; }
#stage.pisti8 #bilardo #ps-brand .logo { font-size: calc(26px * var(--d)); font-weight: 800; line-height: 1; letter-spacing: -.02em; color: #ffffff; }
#stage.pisti8 #bilardo #ps-brand .logo em { font-style: normal; font-weight: 500; color: #7fa6ff; }
#stage.pisti8 #bilardo #ps-brand i { width: 1px; height: calc(22px * var(--d)); background: #323a4a; }
#stage.pisti8 #bilardo #ps-brand .game { font-size: calc(13px * var(--df)); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #aab4c4; }
#stage.pisti8 #voice-bar { left: calc(140px * var(--d)); top: calc(13px * var(--d)); gap: calc(8px * var(--d)); }
#stage.pisti8 #btn-voice { height: calc(46px * var(--d)); padding: 0 calc(16px * var(--d)) 0 calc(12px * var(--d)); gap: calc(10px * var(--d)); border-radius: calc(12px * var(--d));
  background: #131822; border: 1px solid #262d3a; box-shadow: none; font-family: 'Plus Jakarta Sans', 'Rubik', sans-serif; color: #eef1f6; }
#stage.pisti8 #btn-voice .v-icon { width: auto; height: auto; background: none; box-shadow: none; border: none; color: #7fa6ff; }
#stage.pisti8 #btn-voice .v-icon svg { width: calc(20px * var(--df)); height: calc(20px * var(--df)); }
#stage.pisti8 #btn-voice .v-text b { font-size: calc(14px * var(--df)); font-weight: 700; }
#stage.pisti8 #btn-voice .v-text small { display: none; }
#stage.pisti8 #voice-bar.live #btn-voice { background: #10291d; border-color: #2fbf6b; box-shadow: none; }
#stage.pisti8 #voice-bar.live #btn-voice .v-icon { background: none; color: #5fe39a; }
#stage.pisti8 #btn-mic { width: calc(46px * var(--d)); height: calc(46px * var(--d)); border-radius: calc(12px * var(--d)); background: #131822; border: 1px solid #262d3a; color: #eef1f6; box-shadow: none; }
#stage.pisti8 #btn-mic.muted { background: #131822; border-color: #c9221c; color: #ff8a7a; box-shadow: none; }
#stage.pisti8 #btn-mic svg { width: calc(20px * var(--df)); height: calc(20px * var(--df)); }

/* the players' panels: the other player's above the table, mine below it with the time left */
#stage.pisti8 #bilardo #bl-top { position: static; }
#stage.pisti8 #bilardo #bl-mid { display: none; }
#stage.pisti8 #bilardo .bl-player { position: absolute; box-sizing: border-box; width: calc(280px * var(--d)); height: auto; flex-wrap: wrap; align-items: center; justify-content: flex-start;
  gap: calc(10px * var(--d)) calc(12px * var(--d)); padding: calc(10px * var(--d)) calc(16px * var(--d)) calc(10px * var(--d)) calc(10px * var(--d)); text-align: left;
  border-radius: calc(16px * var(--d)); background: #131822; border: 1px solid #262d3a; box-shadow: 0 calc(10px * var(--d)) calc(22px * var(--d)) rgba(0, 0, 0, .45); animation: none; }
#stage.pisti8 #bilardo #bl-p1 { left: calc(50% - 445px * var(--d)); top: calc(101px * var(--d)); min-height: calc(66px * var(--d)); }
#stage.pisti8 #bilardo #bl-p0 { left: calc(50% - 580px * var(--d)); top: calc(694px * var(--d)); padding-bottom: calc(12px * var(--d)); }
#stage.pisti8 #bilardo .bl-player.turn { border: 1.5px solid #ffc24a; box-shadow: 0 0 0 4px rgba(255, 194, 74, .14), 0 calc(10px * var(--d)) calc(22px * var(--d)) rgba(0, 0, 0, .45); }
#stage.pisti8 #bilardo .bl-player.talking .bl-ball { box-shadow: 0 0 0 3px #57ff8f, 0 0 14px rgba(87, 255, 143, .8); }
#stage.pisti8 #bilardo .bl-ball { order: 0; flex: none; width: calc(46px * var(--d)); height: calc(46px * var(--d)); border-radius: 50%; border: none; background: #3a4560; box-shadow: none;
  display: grid; place-items: center; font-size: calc(18px * var(--df)); font-weight: 800; line-height: 1; color: #ffffff; }
#stage.pisti8 #bilardo #bl-p0 .bl-ball { background: #1f55d9; }
#stage.pisti8 #bilardo .bl-who { order: 1; flex: 1 1 0; min-width: 0; gap: calc(3px * var(--d)); line-height: 1.1; }
#stage.pisti8 #bilardo .bl-name { font-size: calc(15px * var(--df)); font-weight: 800; line-height: 1.1; }
#stage.pisti8 #bilardo .bl-sub { font-size: calc(12px * var(--df)); font-weight: 600; color: #aab4c4; }
#stage.pisti8 #bilardo .bl-sub.on { font-weight: 700; color: #ffc24a; }
#stage.pisti8 #bilardo .bl-timer { display: none; }
#stage.pisti8 #bilardo .bl-score, #stage.pisti8 #bilardo .bl-player.right .bl-score { order: 2; display: flex; flex-direction: column; align-items: flex-end; gap: calc(3px * var(--d)); margin: 0 0 0 auto; min-width: 0;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-size: calc(34px * var(--df)); font-weight: 600; line-height: 1; color: #eef1f6; text-shadow: none; }
#stage.pisti8 #bilardo .bl-score::after { content: 'Sayı'; font-family: 'Plus Jakarta Sans', sans-serif; font-size: calc(10px * var(--df)); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #aab4c4; }
#stage.pisti8 #bilardo #bl-p0 .ps-time { order: 3; flex: 1 0 100%; display: flex; align-items: center; gap: calc(10px * var(--d)); padding-left: calc(6px * var(--d));
  font-size: calc(12px * var(--df)); font-weight: 600; color: #aab4c4; }
#stage.pisti8 #bilardo .ps-time i { display: none; flex: 1 1 auto; height: calc(5px * var(--d)); border-radius: 3px; background: #262d3a; overflow: hidden; }
#stage.pisti8 #bilardo .ps-time b { display: block; height: 100%; border-radius: 3px; background: #ffc24a; }
#stage.pisti8 #bilardo .ps-time.on i { display: block; }
#stage.pisti8 #bilardo .ps-time.on span { font-weight: 800; color: #ffc24a; }
#stage.pisti8 #bilardo .ps-time.low b { background: #ff6b5b; }
#stage.pisti8 #bilardo .ps-time.low span { color: #ff8a7a; }
#stage.pisti8 #bilardo .ps-stat { display: flex; position: absolute; box-sizing: border-box; align-items: center; gap: calc(14px * var(--d)); padding: 0 calc(16px * var(--d)); pointer-events: none;
  border-radius: calc(16px * var(--d)); background: #131822; border: 1px solid #262d3a; box-shadow: 0 calc(8px * var(--d)) calc(18px * var(--d)) rgba(0, 0, 0, .45); }
#stage.pisti8 #bilardo #ps-stat1 { left: calc(50% + 165px * var(--d)); top: calc(110px * var(--d)); height: calc(48px * var(--d)); }
#stage.pisti8 #bilardo #ps-stat0 { left: calc(50% + 300px * var(--d)); top: calc(726px * var(--d)); height: calc(66px * var(--d)); }
#stage.pisti8 #bilardo .ps-stat div { display: flex; flex-direction: column; gap: calc(3px * var(--d)); line-height: 1; }
#stage.pisti8 #bilardo .ps-stat small { font-size: calc(10px * var(--df)); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #aab4c4; }
#stage.pisti8 #bilardo .ps-stat b { font-size: calc(15px * var(--df)); font-weight: 800; color: #eef1f6; }
#stage.pisti8 #bilardo .ps-stat .sep { width: 1px; height: calc(28px * var(--d)); background: #262d3a; }
#stage.pisti8 #bilardo .ps-mini { width: calc(30px * var(--d)); height: calc(42px * var(--d)); box-sizing: border-box; border-radius: calc(4px * var(--d)); border: 2px solid #ffffff; background: #1f55d9; box-shadow: 3px 3px 0 #5b6375; }

/* a word on the table */
#stage.pisti8 #bilardo #bl-msg { top: calc(186px * var(--d)); padding: calc(8px * var(--d)) calc(18px * var(--d)); border-radius: calc(12px * var(--d)); background: rgba(19, 24, 34, .95);
  border: 1px solid #262d3a; font-size: calc(15px * var(--df)); font-weight: 700; color: #eef1f6; box-shadow: 0 8px 18px rgba(0, 0, 0, .45); }
#stage.pisti8 #bilardo #bl-msg.good { background: #14804a; border-color: #1f9e5c; }
#stage.pisti8 #bilardo #bl-hint { display: none; }

/* the points window */
#ps-scores-table { margin: 0 auto; border-collapse: collapse; font-size: 20px; }
#ps-scores-table td { padding: 5px 18px; text-align: center; font-weight: 700; }
#ps-scores-table td:first-child { text-align: left; font-weight: 600; }
#ps-scores-table td:nth-child(2) { color: var(--gold); }
#ps-scores-table th { padding: 2px 18px; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .55); }
.ps-rules { margin-top: 10px; font-size: 14px; color: rgba(255, 255, 255, .6); }

/* the eight-ball and pişti tables: a signed-in player's profile picture in their round avatar */
#stage.pool8 #bilardo .bl-ball img, #stage.pisti8 #bilardo .bl-ball img { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; }
#stage.pisti8 #bilardo .bl-ball.pic { background: #262d3a; }
/* pişti: what I write shows above my panel (it sits at the foot of the screen) */
#stage.pisti8 #bilardo #bl-p0 .bl-bubble { top: auto; bottom: calc(100% + 12px); border-radius: 16px 16px 16px 4px; }
#stage.pisti8 #bilardo #bl-p0 .bl-bubble::before { top: auto; bottom: -9px; border-bottom: 0; border-top: 9px solid #fff; }

/* ------------------------------------------------------------------ private messages in the channels */
#sheet .lob-main { position: relative; }
.person-line { display: flex; align-items: center; gap: 4px; }
.person-line .person { flex: 1 1 auto; min-width: 0; width: auto; }
.dm-btn { position: relative; flex: none; width: 34px; height: 34px; padding: 0; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .7); }
.dm-btn:hover { background: rgba(255, 204, 77, .2); color: var(--gold); }
.dm-btn svg { width: 18px; height: 18px; }
.dm-btn b, #cdm-unread, .dm-tab b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e02b20; color: #fff; font-size: 11.5px; font-weight: 800; line-height: 18px; text-align: center; }
.dm-btn b { position: absolute; right: -5px; top: -5px; box-shadow: 0 0 0 2px #05140f; }
#cdm-dock { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; margin: 0 0 8px; padding: 0 12px; border-radius: 11px; background: rgba(255, 204, 77, .12); color: #ffe39a; font-size: 14.5px; font-weight: 700; }
#cdm-dock[hidden] { display: none; }
#cdm-dock:hover { background: rgba(255, 204, 77, .22); }
#cdm-dock svg { width: 18px; height: 18px; flex: none; }
#cdm-dock span { flex: 1; text-align: left; }
#cdm-box { position: absolute; right: 24px; bottom: 86px; z-index: 30; width: 400px; max-width: calc(100% - 48px); height: 440px; max-height: calc(100% - 120px); display: flex; flex-direction: column;
  border-radius: 18px; background: #0b231a; box-shadow: 0 18px 40px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .12); overflow: hidden; }
#cdm-box[hidden] { display: none; }
#cdm-tabs { flex: none; display: flex; gap: 6px; padding: 8px 10px 0; overflow-x: auto; }
#cdm-tabs[hidden] { display: none; }
.dm-tab { flex: none; display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .75); font-size: 13px; font-weight: 700; }
.dm-tab.on { background: rgba(255, 204, 77, .2); color: #ffe39a; }
.dm-tab.gone { opacity: .5; }
#cdm-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
#cdm-head .pp { width: 32px; height: 32px; font-size: 14px; }
#cdm-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 800; }
#cdm-marks em { padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 11px; font-style: normal; font-weight: 700; color: rgba(255, 255, 255, .55); }
#cdm-marks em.yz { background: rgba(140, 170, 255, .16); color: #b9cdff; }
#cdm-marks em.adm { background: rgba(255, 204, 77, .16); color: var(--gold); }
#cdm-close { margin-left: auto; width: 30px; height: 30px; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; font-size: 20px; line-height: 1; }
#cdm-close:hover { background: rgba(255, 255, 255, .18); }
#cdm-note { flex: none; margin: 0; padding: 7px 14px; background: rgba(140, 170, 255, .1); font-size: 12.5px; color: rgba(220, 230, 255, .8); }
#cdm-note[hidden] { display: none; }
#cdm-log { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.dm-none { margin: auto 10px; text-align: center; font-size: 14px; color: rgba(255, 255, 255, .5); }
.dm-msg { align-self: flex-start; max-width: 82%; display: flex; flex-direction: column; gap: 2px; padding: 7px 12px; border-radius: 4px 14px 14px 14px; background: rgba(255, 255, 255, .1); font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.dm-msg.mine { align-self: flex-end; border-radius: 14px 4px 14px 14px; background: #1c7a4c; }
.dm-msg.big span { font-size: 30px; line-height: 1.1; }
.dm-msg time { align-self: flex-end; font-size: 11px; color: rgba(255, 255, 255, .45); }
#cdm-form { flex: none; display: flex; gap: 8px; padding: 8px; border-top: 1px solid rgba(255, 255, 255, .08); }
#sheet #cdm-text { flex: 1; min-width: 0; height: 42px; padding: 0 12px; font-size: 15.5px; }
#cdm-form .btn { flex: none; height: 42px; padding: 0 16px; font-size: 15px; }
.compact #cdm-box { right: 10px; bottom: 60px; width: 330px; height: 330px; }
.compact .dm-btn { width: 28px; height: 28px; }
.compact .dm-btn svg { width: 15px; height: 15px; }

.dm-x { margin-left: 2px; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 15px; line-height: 1; color: rgba(255, 255, 255, .55); }
.dm-x:hover { background: rgba(255, 255, 255, .18); color: #fff; }
#cdm-hide { margin-left: auto; width: 30px; height: 30px; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; font-size: 20px; line-height: 1; }
#cdm-hide:hover { background: rgba(255, 255, 255, .18); }
#cdm-hide + #cdm-close { margin-left: 4px; }
#cdm-tabs { display: flex; }

/* the options under a name in the channel's list */
.person.open { background: rgba(255, 255, 255, .08); }
.person .pn { min-width: 3.2em; }
.person em { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .unread { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #e02b20; color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; }
.person-tools button.primary { background: rgba(53, 196, 111, .3); color: #d4ffe4; }
.person-tools button.primary:hover { background: #2fa860; color: #fff; }
.person-tools small { flex-basis: 100%; font-size: 12.5px; color: rgba(255, 255, 255, .5); }

/* ------------------------------------------------------------------ the lobby's radio, under the game's card */
#radio { flex: none; margin: -6px 0 14px; padding: 8px; border-radius: 16px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
#radio[hidden] { display: none; }
#radio.on { box-shadow: inset 0 0 0 1.5px rgba(255, 204, 77, .45); }
.radio-bar { display: flex; align-items: center; gap: 8px; }
.radio-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 204, 77, .14); color: var(--gold); }
.radio-ic svg { width: 20px; height: 20px; }
#radio.on .radio-ic { animation: radio-glow 1.6s ease-in-out infinite; }
@keyframes radio-glow { 50% { background: rgba(255, 204, 77, .3); } }
.radio-now { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.radio-now b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; color: #fff; }
.radio-now small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .55); }
#radio-play, #radio-next { flex: none; width: 34px; height: 34px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #fff; }
#radio-play { background: linear-gradient(180deg, #35c46f, #14843f); }
#radio-play:hover, #radio-next:hover { filter: brightness(1.15); }
#radio-play svg, #radio-next svg { width: 18px; height: 18px; }
#radio-play .i-pause, #radio.on #radio-play .i-play { display: none; }
#radio.on #radio-play .i-pause { display: block; }
#radio-frame { margin-top: 8px; height: 200px; border-radius: 10px; overflow: hidden; background: #000; }
#radio-frame[hidden] { display: none; }
#radio-frame iframe, #radio-player { display: block; width: 100%; height: 100%; border: 0; }
#radio-stop { display: none; width: 100%; margin-top: 6px; height: 28px; border-radius: 8px; background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .65); font-size: 12.5px; font-weight: 700; }
#radio-frame:not([hidden]) + #radio-stop { display: block; }
#radio-stop:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.compact #radio { margin: -2px 0 10px; padding: 6px; }

/* ------------------------------------------------------------------ the DJ: his own colours in the talk and in the list */
.cmsg.dj { margin: 6px 0; padding-top: 10px; padding-bottom: 10px; background: linear-gradient(90deg, rgba(123, 60, 255, .26), rgba(255, 61, 154, .1) 70%, rgba(0, 212, 255, .04)); box-shadow: inset 3px 0 0 #b48cff, inset 0 0 0 1px rgba(180, 140, 255, .22); }
.cmsg.dj.cont { margin-top: -2px; }
.cmsg.dj .who { background: linear-gradient(90deg, #ffd36b, #ff7ac1 55%, #8fe6ff); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 16.5px; letter-spacing: .02em; }
.cmsg.dj .ct { font-weight: 600; color: #f6efff; }
.cmsg.dj .pp { box-shadow: 0 0 0 2px #b48cff, 0 0 14px rgba(180, 140, 255, .6); }
.person.dj { margin: 2px 0 6px; background: linear-gradient(90deg, rgba(123, 60, 255, .3), rgba(255, 61, 154, .12)); box-shadow: inset 0 0 0 1px rgba(180, 140, 255, .4); }
button.person.dj:hover { background: linear-gradient(90deg, rgba(123, 60, 255, .42), rgba(255, 61, 154, .2)); }
.person.dj .pn { color: #f0e2ff; }
.person.dj .pp { box-shadow: 0 0 0 2px #b48cff; }
em.dj { flex: none !important; background: linear-gradient(90deg, #7b3cff, #ff3d9a) !important; color: #fff !important; font-style: normal; }

/* the radio is heard, not seen: YouTube's player plays out of sight (the site owner's choice), the bar shows an equalizer */
#radio-frame { position: fixed; left: 0; bottom: 0; z-index: -1; width: 200px; height: 200px; margin: 0; opacity: 0; pointer-events: none; }
#radio-frame:not([hidden]) + #radio-stop { display: none; }
#radio.live #radio-stop { display: block; }
.radio-eq { display: none; align-items: flex-end; gap: 2px; height: 16px; }
.radio-eq i { width: 3px; height: 100%; border-radius: 2px; background: var(--gold); transform-origin: bottom; animation: radio-eq .9s ease-in-out infinite; }
.radio-eq i:nth-child(2) { animation-delay: -.3s; animation-duration: .7s; }
.radio-eq i:nth-child(3) { animation-delay: -.55s; animation-duration: 1.1s; }
.radio-eq i:nth-child(4) { animation-delay: -.15s; animation-duration: .8s; }
@keyframes radio-eq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
#radio.on .radio-eq { display: flex; }
#radio.on .radio-ic svg { display: none; }
@media (prefers-reduced-motion: reduce) { .radio-eq i { animation: none; transform: scaleY(.6); } }
