/* Dominó Online — visual inspirado no estilo Apple (vidro fosco, tipografia limpa, movimento com mola) */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", Roboto, sans-serif;
  --blue: #0a84ff;
  --green: #30d158;
  --orange: #ff9f0a;
  --red: #ff453a;
  --purple: #bf5af2;
  --yellow: #ffd60a;
  --label: #1d1d1f;
  --label-2: rgba(60, 60, 67, .6);
  --label-3: rgba(60, 60, 67, .3);
  --fill: rgba(120, 120, 128, .12);
  --fill-2: rgba(120, 120, 128, .2);
  --sep: rgba(60, 60, 67, .14);
  --sheet: rgba(255, 255, 255, .8);
  --felt-1: #1c6b47;
  --felt-2: #0e3d29;
  --glass-dark: rgba(28, 28, 30, .55);
  --glass-line: rgba(255, 255, 255, .12);
  --white-2: rgba(235, 235, 245, .6);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.25, .1, .25, 1);
  --default-bg:
    radial-gradient(60vmax 60vmax at 10% 0%, rgba(48, 209, 88, .35), transparent 60%),
    radial-gradient(50vmax 50vmax at 100% 100%, rgba(10, 132, 255, .25), transparent 60%),
    radial-gradient(40vmax 40vmax at 90% 10%, rgba(255, 214, 10, .12), transparent 60%),
    linear-gradient(160deg, #0d3b28, #07160f);
  --team-a: var(--blue);
  --team-b: var(--orange);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--label);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  background: var(--scene-bg, var(--default-bg));
  background-attachment: fixed;
}
.hidden { display: none !important; }
button, input, select { font: inherit; letter-spacing: inherit; }
::selection { background: rgba(10, 132, 255, .3); }

/* ---------- Botões ---------- */
.btn {
  border: 0;
  border-radius: 980px;
  padding: 11px 20px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform .25s var(--spring), background .2s, opacity .2s, filter .2s;
  color: var(--blue);
  background: transparent;
}
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn.primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(10, 132, 255, .35); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.tinted { background: rgba(10, 132, 255, .12); color: var(--blue); }
.btn.tinted:hover:not(:disabled) { background: rgba(10, 132, 255, .18); }
.btn.plain { padding: 6px 10px; }
.btn.plain:hover:not(:disabled) { background: var(--fill); }
.btn.muted { color: var(--label-2); }
.btn.large { padding: 15px 22px; font-size: 17px; width: 100%; }

input, select {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 17px;
  background: var(--fill);
  color: var(--label);
  outline: none;
  transition: box-shadow .2s, background .2s;
}
input::placeholder { color: var(--label-3); }
input:focus { background: #fff; box-shadow: 0 0 0 4px rgba(10, 132, 255, .25); }
input:disabled { color: var(--label-2); }

/* ---------- Folhas (cards) ---------- */
.screen:not(#game) {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.sheet {
  width: min(420px, 100%);
  background: var(--sheet);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 28px;
  padding: 32px 28px 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .08);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: sheetIn .6s var(--spring) both;
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.title { margin: 0; text-align: center; font-size: 40px; font-weight: 800; letter-spacing: -0.035em; }
.subtitle { margin: -6px 0 6px; text-align: center; color: var(--label-2); font-size: 15px; line-height: 1.4; }
.eyebrow { margin: 0; text-align: center; font-size: 13px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .06em; }
h2 { margin: 0; text-align: center; letter-spacing: -0.02em; }
.code { font-size: 52px; font-weight: 800; letter-spacing: .18em; margin: -4px 0 4px .18em; font-variant-numeric: tabular-nums; }

.hero { height: 96px; display: flex; justify-content: center; align-items: center; margin-bottom: 4px; }
.hero .tile { --u: 34px; position: relative; }
.hero .tile:nth-child(1) { transform: rotate(-18deg) translate(14px, 6px); animation: float 6s ease-in-out infinite; }
.hero .tile:nth-child(2) { transform: rotate(4deg); z-index: 1; animation: float 6s ease-in-out -2s infinite; }
.hero .tile:nth-child(3) { transform: rotate(22deg) translate(-14px, 8px); animation: float 6s ease-in-out -4s infinite; }
@keyframes float { 50% { translate: 0 -6px; } }

.divider { display: flex; align-items: center; gap: 12px; color: var(--label-3); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--sep); }
.join-row { display: flex; gap: 10px; }
.join-row input { text-transform: uppercase; letter-spacing: .3em; text-align: center; font-weight: 700; }
.join-row input::placeholder { letter-spacing: normal; font-weight: 400; text-transform: none; }

.rules-link { display: flex; align-items: center; justify-content: center; gap: 8px; }
.acct { border-top: 1px solid var(--sep); padding-top: 14px; margin-top: 4px; text-align: center; }
#acctGuest { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hint { font-size: 12px; color: var(--label-2); }
.acct-user { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.acct-name { font-weight: 700; margin-right: 4px; }

/* ---------- Listas (estilo Ajustes) ---------- */
.list { list-style: none; margin: 0; padding: 0; background: rgba(255, 255, 255, .7); border-radius: 14px; overflow: hidden; }
.list li {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; min-height: 52px;
  position: relative;
  animation: rowIn .45s var(--spring) both;
}
.list li + li::before { content: ""; position: absolute; top: 0; left: 60px; right: 0; height: 1px; background: var(--sep); }
.list.settings li + li::before { left: 14px; }
.list li.empty { color: var(--label-3); }
.list li.empty .avatar { background: var(--fill); color: var(--label-3); box-shadow: none; }
.list li.stacked { flex-direction: column; align-items: stretch; gap: 10px; padding-bottom: 14px; }
.list .grow { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list small { display: block; font-size: 12px; color: var(--label-2); font-weight: 400; }
.list li > span:first-child:not(.avatar) { flex: 1; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px); } }
.tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 980px; background: var(--fill); color: var(--label-2); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.tag.host { background: rgba(255, 159, 10, .15); color: #c46f00; }
.tag.acc { background: rgba(10, 132, 255, .12); color: var(--blue); }
.tag.off { background: rgba(255, 69, 58, .12); color: var(--red); }
.kick { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 0; background: var(--fill); color: var(--label-2); cursor: pointer; font-size: 13px; }
.kick:hover { background: rgba(255, 69, 58, .15); color: var(--red); }
#hostControls { display: flex; flex-direction: column; gap: 14px; }

/* Interruptor iOS */
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; background: var(--fill-2); border-radius: 31px; transition: background .25s; }
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16);
  transition: transform .3s var(--spring);
}
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:disabled + .track { opacity: .4; }
.switch input:disabled { cursor: not-allowed; }

/* Controle segmentado */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--fill); border-radius: 9px; padding: 2px; }
.segmented button {
  border: 0; background: transparent; padding: 7px 0; border-radius: 7px; font-weight: 600; font-size: 14px;
  color: var(--label); cursor: pointer; transition: background .2s, box-shadow .2s;
}
.segmented button.on { background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .04); }
/* Modo de jogo: os que ainda não existem aparecem desativados, com "em breve" */
.segmented.modes button { font-size: 13px; padding: 7px 2px; line-height: 1.15; white-space: nowrap; }
.segmented button.soon { color: var(--label-3); cursor: default; font-weight: 500; }
.segmented button.soon small { display: block; font-size: 10px; }
.mode-hint { display: block; color: var(--label-2); font-size: 12px; line-height: 1.35; }
.result-hands .rh.sleeping { color: var(--label-2); }
/* Ponta de 5: soma das pontas embaixo da fila de pedras */
.ends-sum { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); color: rgba(255, 255, 255, .75); font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.ends-sum.fives { color: #ffd60a; }

.waiting { margin: 4px 0; }
.dots::after { content: ""; animation: dots 1.4s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- Avatares ---------- */
.avatar {
  --c: var(--blue);
  width: 34px; height: 34px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
  position: relative;
}
.avatar.small { width: 26px; height: 26px; font-size: 11px; }
.avatar .team { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; }
.avatar .team.a { background: var(--team-a); }
.avatar .team.b { background: var(--team-b); }
.avatar.off { filter: grayscale(1); opacity: .55; }

/* ---------- Mesa ---------- */
#game {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "bar bar" "table side" "me side";
  gap: 10px;
  padding: 10px;
  color: #fff;
}
.glass {
  background: var(--glass-dark);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--glass-line);
  border-radius: 20px;
}
.topbar { grid-area: bar; display: flex; align-items: center; gap: 14px; padding: 8px 10px 8px 16px; position: relative; z-index: 20; }
.room-info { font-size: 13px; color: var(--white-2); font-weight: 500; white-space: nowrap; }
.room-info b { color: #fff; font-weight: 700; letter-spacing: .08em; }
.scores { flex: 1; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border-radius: 980px;
  background: rgba(255, 255, 255, .08);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.pill b { font-variant-numeric: tabular-nums; font-size: 15px; display: inline-block; }
.pill .of { color: var(--white-2); font-weight: 500; }
.pill.bump b { animation: bump .7s var(--spring); }
@keyframes bump { 40% { transform: scale(1.6); color: var(--yellow); } }
.bar-actions { display: flex; gap: 4px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer;
  display: grid; place-items: center; padding: 0; font-size: 15px; font-weight: 700;
  transition: background .2s, transform .25s var(--spring);
}
.icon-btn:hover { background: rgba(255, 255, 255, .18); }
.icon-btn:active { transform: scale(.9); }
.icon-btn svg { width: 18px; height: 18px; }
#btnSide { display: none; }

/* Volume: o alto-falante abre um controle deslizante de 0 a 100% */
.volume { position: relative; }
.volume-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 200px;
  display: grid; gap: 6px; padding: 12px 14px 10px;
  background: rgba(28, 28, 30, .94); border: 1px solid var(--glass-line); border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.volume-panel label { font-size: 12px; font-weight: 600; color: var(--white-2); }
.volume-panel output { font-size: 13px; color: var(--white-2); font-variant-numeric: tabular-nums; }
.volume-panel .volume-range {
  --fill: 100%; -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none; cursor: pointer;
}
.volume-range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(to right, #8ec5ff var(--fill), rgba(255, 255, 255, .2) var(--fill));
}
.volume-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -6px;
  border: 0; border-radius: 50%; background: #8ec5ff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
.volume-range::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .2); }
.volume-range::-moz-range-progress { height: 6px; border-radius: 3px; background: #8ec5ff; }
.volume-range::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #8ec5ff; }
.volume-range:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 6px; }

.table {
  grid-area: table;
  display: grid;
  grid-template-columns: 170px 1fr 170px;
  grid-template-rows: auto 1fr;
  grid-template-areas: ". top ." "left board right";
  min-height: 0;
  gap: 10px;
}
.seat-top { grid-area: top; justify-self: center; }
.seat-left { grid-area: left; align-self: center; }
.seat-right { grid-area: right; align-self: center; }
.seat:empty { display: none; }
.seat {
  background: var(--glass-dark);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: center;
  min-width: 150px;
  transition: box-shadow .4s var(--ease), border-color .4s, transform .4s var(--spring);
}
.seat .who { min-width: 0; }
.seat .name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat .meta { font-size: 12px; color: var(--white-2); }
.seat .backs { grid-column: 1 / -1; display: flex; gap: 3px; flex-wrap: wrap; margin-top: 4px; min-height: 20px; }
.back {
  width: 11px; height: 20px; border-radius: 3px;
  background: var(--back-emblem) center / var(--back-emblem-size, 80%) no-repeat, var(--back-bg);
  box-shadow: inset 0 0 0 1px var(--back-line), 0 1px 2px rgba(0, 0, 0, .35);
}
.back.pending { visibility: hidden; }
.back.arrive { animation: backIn .35s var(--spring); }
@keyframes backIn { from { transform: scale(0); } }
.seat.turn, #myInfo.turn {
  border-color: rgba(48, 209, 88, .8);
  box-shadow: 0 0 0 3px rgba(48, 209, 88, .25), 0 10px 30px rgba(48, 209, 88, .2);
}
.seat.turn { transform: scale(1.03); }
.seat.turn .avatar::after, #myInfo.turn .avatar::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--green);
  animation: ring-pulse 1.6s ease-out infinite;
}
@keyframes ring-pulse { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }

.board-area {
  grid-area: board;
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  min-height: 0;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .09), transparent 60%),
    var(--felt-center, none),
    var(--felt-pattern),
    linear-gradient(160deg, var(--felt-1), var(--felt-2));
  box-shadow: var(--felt-rim, 0 0 0 0 transparent), inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 20px 60px rgba(0, 0, 0, .3), 0 20px 50px rgba(0, 0, 0, .35);
  overflow: hidden;
}
.status-pill {
  margin-top: 12px;
  padding: 7px 16px;
  border-radius: 980px;
  background: rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 14px; font-weight: 600;
  min-height: 1.4em;
  transition: background .3s, color .3s;
  z-index: 3;
  text-align: center;
}
.status-pill.mine { background: #fff; color: #0b3d26; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); animation: statusIn .5s var(--spring); }
@keyframes statusIn { from { transform: scale(.85); } }
#board {
  flex: 1; width: 100%;
  overflow: auto;
  display: flex; flex-wrap: wrap; align-items: center; align-content: center; justify-content: center;
  gap: 3px;
  padding: 16px;
  --u: 28px;
  /* Casa da mesa com curva: pedra de 30px (como hoje) mais o respiro; diminui se a mesa encher. */
  --board-unit: 32px;
  position: relative;
}
.empty-board { color: rgba(255, 255, 255, .4); font-size: 15px; font-weight: 500; }
/* Mesa com curva: cada pedra no lugar calculado por board-layout.js */
.board-layer { position: relative; flex: none; }
.board-layer > .tile, .board-layer > .drop { position: absolute; }
.board-layer > .tile { --u: var(--board-tile); }
.board-layer > .drop { font-size: 16px; border-radius: 8px; }
.drop {
  border: 2px dashed rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border-radius: 10px;
  width: calc(var(--u) * 2); height: calc(var(--u) * 2);
  font-size: 18px; padding: 0; cursor: pointer;
  animation: breathe 1.4s ease-in-out infinite;
  transition: transform .25s var(--spring), background .2s;
}
@keyframes breathe { 50% { background: rgba(255, 255, 255, .22); } }
.drop.hot { background: rgba(48, 209, 88, .55); border-color: #fff; border-style: solid; transform: scale(1.15); animation: none; }
.drop-right:only-child { width: auto; padding: 0 20px; font-size: 14px; font-weight: 600; }
/* Pedra voando da mão até a mesa: a mesa não rola enquanto isso (sem a barra piscar) */
#board.landing { overflow: hidden; }
.board-fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.ring {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border: 2px solid rgba(255, 255, 255, .8); border-radius: 50%;
  pointer-events: none;
  animation: ring .7s var(--ease) forwards;
}
@keyframes ring { to { transform: scale(10); opacity: 0; } }

/* Monte de compra e animação de embaralhar/distribuir */
.monte {
  /* Abaixo da mesa (#board): o estojo é só enfeite e não pode cobrir a seta de virada nem o "+" */
  position: absolute; right: 16px; bottom: 14px; z-index: 1;
  display: flex; align-items: flex-end; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--white-2);
}
/* Estojo de couro preto aberto: a tampa fica para trás e as pedras viradas deitam em duas fileiras de 8 */
.stock-case { --case-tile-w: 9px; --case-tile-h: 17px; --case-gap: 2px; display: grid; gap: 3px; }
.case-lid {
  height: 16px; border-radius: 5px 5px 3px 3px;
  background: linear-gradient(#2e3133, #1c1e1f);
  box-shadow: inset 0 0 0 3px #232526, inset 0 0 0 5px #121314, 0 2px 4px rgba(0, 0, 0, .35);
}
.case-tray {
  box-sizing: content-box;
  display: grid; grid-template-columns: repeat(8, var(--case-tile-w)); grid-auto-rows: var(--case-tile-h);
  gap: var(--case-gap); align-content: start;
  width: calc(8 * var(--case-tile-w) + 7 * var(--case-gap));
  height: calc(2 * var(--case-tile-h) + var(--case-gap));
  padding: 5px; border-radius: 5px;
  background: #0e0f10;
  box-shadow: 0 0 0 2px #2a2d2f, 0 0 0 4px #17191a, 0 5px 10px rgba(0, 0, 0, .45);
}
.case-tile {
  border-radius: 2px;
  background: var(--back-emblem) center / var(--back-emblem-size, 70%) no-repeat, var(--back-bg);
  box-shadow: inset 0 0 0 .5px var(--back-line), 0 1px 1px rgba(0, 0, 0, .5);
}
.case-tile.waiting, .monte-count.waiting { visibility: hidden; }
/* Setas para escolher se a fila sobe ou desce perto da borda; o lado barrado fica cinza */
.bend-arrow {
  position: absolute; z-index: 3; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px; font-weight: 800; line-height: 1;
  color: #fff; background: var(--blue, #0a84ff); border: 2px solid rgba(255, 255, 255, .85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35); cursor: pointer; animation: bend-pop .25s ease-out;
}
.bend-arrow:hover { transform: scale(1.08); }
.bend-arrow.barred { background: #6b716e; color: rgba(255, 255, 255, .6); text-decoration: line-through; cursor: not-allowed; box-shadow: none; }
.bend-arrow.barred:hover { transform: none; }
@keyframes bend-pop { from { transform: scale(.6); opacity: 0; } }
.deal-layer { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.dback {
  position: absolute; left: 0; top: 0;
  width: 24px; height: 46px; margin: -23px 0 0 -12px;
  border-radius: 4px;
  background: var(--back-emblem) center / var(--back-emblem-size, 70%) no-repeat, var(--back-bg);
  box-shadow: inset 0 0 0 1px var(--back-line), 0 3px 6px rgba(0, 0, 0, .45);
  will-change: transform;
}
.deal-caption {
  position: absolute; left: 50%; top: 18%; transform: translateX(-50%);
  font-size: 15px; font-weight: 700; color: #fff; letter-spacing: .02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .4);
  animation: fade .4s var(--ease);
}
.fixed-fly { position: fixed; z-index: 35; pointer-events: none; margin: 0; }

.mybar { grid-area: me; display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
#myInfo {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 980px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .06);
  transition: box-shadow .4s, border-color .4s;
  min-width: 0;
}
#myInfo .name { font-weight: 700; font-size: 14px; }
#myInfo .meta { font-size: 12px; color: var(--white-2); }
#hand { flex: 1; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; --u: 36px; padding-top: 10px; min-height: 82px; }
#hand .tile { cursor: grab; transition: transform .35s var(--spring), opacity .25s, filter .25s; }
#hand .tile.pending { visibility: hidden; }
#hand.myturn .tile.playable { transform: translateY(-8px); }
#hand.myturn .tile.playable:hover { transform: translateY(-14px) scale(1.04); }
#hand.myturn .tile:not(.playable) { opacity: .4; filter: saturate(0) drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
#hand .tile.selected { transform: translateY(-18px) scale(1.06) !important; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .9)) drop-shadow(0 10px 10px rgba(0, 0, 0, .45)) !important; }
.actions { min-width: 110px; display: flex; justify-content: flex-end; }
#btnDraw { animation: statusIn .5s var(--spring); }

/* ---------- Pedras (SVG) ---------- */
.tile {
  --u: 30px;
  display: block;
  flex: none;
  overflow: visible;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .25)) drop-shadow(0 4px 6px rgba(0, 0, 0, .35));
}
.tile.v { width: var(--u); height: calc(var(--u) * 2); }
.tile.h { width: calc(var(--u) * 2); height: var(--u); }
.tile.mini { --u: 15px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.tile.last { filter: drop-shadow(0 0 4px rgba(255, 255, 255, .9)) drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
#hand .tile { touch-action: none; user-select: none; -webkit-user-select: none; }
#hand.myturn .tile.playable { cursor: grab; }
#hand .tile.drag-src { opacity: .15 !important; transform: none !important; }
.tile.ghost {
  position: fixed; z-index: 30; pointer-events: none;
  transform: rotate(-5deg) scale(1.15);
  filter: drop-shadow(0 20px 18px rgba(0, 0, 0, .5));
}

/* ---------- Painel lateral ---------- */
.side { grid-area: side; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.side-title { padding: 14px 16px 6px; font-size: 13px; font-weight: 700; color: var(--white-2); text-transform: uppercase; letter-spacing: .06em; }
/* Barra de rolagem do chat: fina e translúcida, no tom do painel (no lugar da branca padrão do sistema) */
#log { flex: 1; overflow-y: auto; padding: 6px 12px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .28) transparent; }
#log::-webkit-scrollbar { width: 8px; }
#log::-webkit-scrollbar-track { background: transparent; }
#log::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .28); border-radius: 8px; }
#log::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .45); }
#log > div { color: var(--white-2); line-height: 1.35; }
#log > div.new { animation: rowIn .35s var(--ease) both; }
#log .big { color: #fff; font-weight: 600; padding: 8px 10px; background: rgba(255, 255, 255, .07); border-radius: 10px; }
#log .chat { align-self: flex-start; background: rgba(255, 255, 255, .12); color: #fff; padding: 7px 12px; border-radius: 16px 16px 16px 4px; max-width: 90%; overflow-wrap: anywhere; }
#log .chat.mine { align-self: flex-end; background: var(--blue); border-radius: 16px 16px 4px 16px; }
#log .chat b { display: block; font-size: 11px; color: var(--white-2); font-weight: 600; }
#log .chat.mine b { display: none; }
#chatForm { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--glass-line); align-items: center; }
#chatForm input { padding: 9px 14px; font-size: 14px; border-radius: 980px; background: rgba(255, 255, 255, .1); color: #fff; }
#chatForm input:focus { background: rgba(255, 255, 255, .16); box-shadow: 0 0 0 3px rgba(10, 132, 255, .4); }
#chatForm input::placeholder { color: rgba(235, 235, 245, .4); }
.send { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 0; background: var(--blue); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.send svg { width: 16px; height: 16px; }

/* ---------- Modais ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 16px;
  z-index: 10;
  animation: fade .3s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
.overlay .sheet { width: min(500px, 100%); max-height: 90vh; overflow-y: auto; color: var(--label); }
.result-emoji { font-size: 46px; text-align: center; line-height: 1; animation: pop .6s var(--spring) both; }
.result-title { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; text-align: center; margin: 0; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.result-hands { display: flex; flex-direction: column; }
.result-hands .rh { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 14px; }
.result-hands .rh + .rh { border-top: 1px solid var(--sep); }
.result-hands .rh .nm { font-weight: 600; min-width: 80px; }
.result-hands .rh .tiles { display: flex; gap: 3px; flex-wrap: wrap; flex: 1; }
.result-hands .rh .sum { color: var(--label-2); font-variant-numeric: tabular-nums; font-size: 13px; }
.result-hands .rh.winner { background: rgba(48, 209, 88, .1); }
.score-rows .sr { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.score-rows .sr + .sr { border-top: 1px solid var(--sep); }
.score-rows .sr .nm { flex: 1; font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-rows .bar { flex: 1.2; height: 6px; border-radius: 6px; background: var(--fill-2); overflow: hidden; }
.score-rows .bar i { display: block; height: 100%; border-radius: 6px; background: var(--green); transform-origin: left; animation: grow 1s var(--ease) both .3s; }
@keyframes grow { from { transform: scaleX(0); } }
.score-rows .pts { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; font-size: 14px; }
.champ { font-size: 22px; font-weight: 800; text-align: center; letter-spacing: -0.02em; animation: pop .7s var(--spring) both .2s; }
.confetti { position: fixed; top: -14px; width: 8px; height: 14px; border-radius: 2px; z-index: 40; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(var(--rot)); } }

.form { display: flex; flex-direction: column; gap: 10px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: rgba(255, 255, 255, .7); border-radius: 14px; padding: 14px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--label-2); font-weight: 500; }
.stat.hl b { color: #1f9d48; }
.history { list-style: none; margin: 0; padding: 0; background: rgba(255, 255, 255, .7); border-radius: 14px; overflow: hidden; font-size: 14px; }
.history li { display: flex; gap: 10px; align-items: center; padding: 10px 14px; }
.history li + li { border-top: 1px solid var(--sep); }
.history li b { min-width: 64px; }
.history li.won b { color: #1f9d48; }
.history li.lost b { color: var(--red); }
.history li span:not(.when) { flex: 1; color: var(--label-2); }
.history .when { color: var(--label-2); font-size: 12px; }
.section-label { margin: 6px 0 -6px 4px; font-size: 13px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .04em; }

/* Regras */
.rules { display: flex; flex-direction: column; gap: 10px; }
.rules section { background: rgba(255, 255, 255, .7); border-radius: 14px; padding: 14px 16px; }
.rules h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.rules h3 .ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 14px; color: #fff; flex: none; }
.rules p, .rules li { margin: 0; font-size: 14px; line-height: 1.5; color: #3a3a3c; }
.rules ul { margin: 0; padding-left: 18px; }
.rules .example { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--fill); font-size: 13px; }
.rules .tiles-row { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin: 6px 0; }

/* ---------- Toast e balões ---------- */
.toast {
  position: fixed; left: 50%; top: max(16px, env(safe-area-inset-top));
  transform: translateX(-50%);
  background: rgba(30, 30, 32, .85);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: #fff; padding: 12px 20px; border-radius: 980px;
  font-size: 14px; font-weight: 600;
  z-index: 50; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); max-width: calc(100% - 32px);
  animation: toastIn .5s var(--spring);
}
@keyframes toastIn { from { transform: translate(-50%, -30px) scale(.9); opacity: 0; } }
.bubble {
  position: fixed; z-index: 25; transform: translate(-50%, -100%);
  background: #fff; color: var(--label); font-weight: 700; font-size: 13px;
  padding: 7px 14px; border-radius: 980px; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  animation: bubble 1.8s var(--ease) forwards;
}
@keyframes bubble {
  0% { opacity: 0; transform: translate(-50%, -60%) scale(.6); }
  15% { opacity: 1; transform: translate(-50%, -115%) scale(1.05); }
  80% { opacity: 1; transform: translate(-50%, -120%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -150%) scale(.95); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Celular ---------- */
@media (max-width: 860px) {
  #game {
    grid-template-columns: 1fr;
    grid-template-areas: "bar" "table" "me";
    gap: 8px; padding: 8px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  #btnSide { display: grid; }
  .side {
    position: fixed; right: 8px; top: 64px; bottom: 8px; width: min(340px, calc(100vw - 16px));
    z-index: 5; background: rgba(28, 28, 30, .94);
    transform: translateX(110%); transition: transform .45s var(--spring);
  }
  .side.open { transform: none; }
  .topbar { flex-wrap: wrap; gap: 6px 10px; padding: 8px 8px 8px 14px; }
  /* No celular os botões ficam à esquerda: o controle abre para a direita, sem sair da tela. */
  .volume-panel { right: auto; left: 0; }
  .room-info { flex: 1; }
  .scores { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .table {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas: "left top right" "board board board";
    gap: 6px;
  }
  .seat { min-width: 0; padding: 8px; gap: 2px 6px; border-radius: 14px; }
  .seat-left, .seat-right, .seat-top { align-self: start; justify-self: stretch; }
  .seat .avatar { width: 26px; height: 26px; font-size: 11px; }
  .seat .name { font-size: 12px; }
  .back { width: 7px; height: 13px; border-radius: 2px; }
  .seat .backs { gap: 2px; min-height: 13px; }
  .seat.turn { transform: none; }
  .board-area { border-radius: 22px; }
  #board { --u: 20px; padding: 10px; }
  .dback { width: 18px; height: 34px; margin: -17px 0 0 -9px; }
  .stock-case { --case-tile-w: 7px; --case-tile-h: 13px; --case-gap: 1.5px; }
  .case-lid { height: 12px; }
  .mybar { flex-direction: column; gap: 8px; padding: 10px; }
  #myInfo { padding: 4px 12px 4px 4px; }
  #hand { --u: 30px; gap: 7px; padding-top: 6px; min-height: 66px; }
  .actions { min-width: 0; }
  .sheet { padding: 26px 20px 20px; border-radius: 24px; }
  .code { font-size: 44px; }
}

/* Convite, avisos no canto e espectadores */
.invite-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.invite-row .btn.tinted { flex: 1; }
.code.masked { letter-spacing: .3em; color: var(--label-3); }
.small-rules { font-size: 13px; margin: 0; }
.notices {
  position: fixed; left: 16px; bottom: 16px; z-index: 45;
  display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none;
  max-width: min(340px, calc(100vw - 32px));
}
.notice {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 10px; border-radius: 16px;
  background: rgba(30, 30, 32, .82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  color: #fff; font-size: 13px; font-weight: 600; line-height: 1.3;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  animation: noticeIn .5s var(--spring);
}
.notice.out { animation: noticeOut .35s var(--ease) forwards; }
.notice .ic { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; }
.notice.join .ic { background: var(--green); }
.notice.leave .ic { background: var(--red); }
.notice.drop .ic { background: var(--orange); }
.notice.back .ic, .notice.swap .ic { background: var(--blue); }
.notice.info .ic { background: rgba(255, 255, 255, .2); }
@keyframes noticeIn { from { opacity: 0; transform: translateX(-30px) scale(.9); } }
@keyframes noticeOut { to { opacity: 0; transform: translateX(-30px); } }
.spectator-bar {
  flex: 1; text-align: center; font-size: 14px; color: var(--white-2); font-weight: 500;
}
.spectator-bar b { color: #fff; }
.ready-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ready-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 980px; background: var(--fill); font-size: 13px; font-weight: 600; color: var(--label-2); }
.ready-chip.ok { background: rgba(48, 209, 88, .15); color: #1f9d48; }
.ready-chip .avatar { width: 22px; height: 22px; font-size: 10px; }
@media (max-width: 860px) {
  .notices { left: 8px; right: 8px; bottom: auto; top: 112px; flex-direction: column; max-width: none; align-items: flex-start; }
}

/* ---------- Abas da tela inicial e skins ---------- */
.home-sheet { width: min(460px, 100%); }
.home-tabs { margin: -4px 0 2px; }
.tab-panel { display: flex; flex-direction: column; gap: 14px; animation: fade .3s var(--ease); }
#tabRules { max-height: min(60vh, 560px); overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
#tabSkins { gap: 10px; }
.skin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.skin-card {
  position: relative; border: 0; padding: 0; background: rgba(255, 255, 255, .7); border-radius: 14px;
  overflow: hidden; cursor: pointer; text-align: left; font: inherit; color: var(--label);
  box-shadow: 0 0 0 1px var(--sep);
  transition: transform .3s var(--spring), box-shadow .2s;
}
.skin-card:hover { transform: translateY(-2px); }
.skin-card.on { box-shadow: 0 0 0 3px var(--blue); }
.skin-card .preview { height: 72px; display: flex; align-items: center; justify-content: center; gap: 4px; position: relative; }
.skin-card .label { display: block; padding: 7px 9px 8px; font-size: 12px; font-weight: 600; line-height: 1.2; }
.skin-card .badge { position: absolute; top: 6px; left: 6px; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 980px; background: var(--yellow); color: #3a2a00; text-transform: uppercase; letter-spacing: .03em; }
.skin-card .check { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; display: none; place-items: center; }
.skin-card.on .check { display: grid; }
.skin-card .preview .tile { --u: 20px; }
.skin-card .preview .back { width: 20px; height: 40px; border-radius: 4px; }
.skin-hint { text-align: center; margin: 2px 0 0; }
@media (max-width: 480px) {
  .skin-grid { grid-template-columns: repeat(2, 1fr); }
  .segmented.modes button { font-size: 12px; letter-spacing: -.01em; }
}

/* O painel escondido fora da tela não pode alargar a página no celular */
html, body { overflow-x: hidden; }
@media (max-width: 860px) {
  #game { overflow: hidden; }
  .side { visibility: hidden; transition: transform .45s var(--spring), visibility 0s .45s; }
  .side.open { visibility: visible; transition: transform .45s var(--spring), visibility 0s; }
}
@media (max-width: 860px) {
  #game { grid-template-columns: minmax(0, 1fr); }
  .topbar, .table, .mybar, .board-area { min-width: 0; }
  .scores { min-width: 0; max-width: 100%; scrollbar-width: none; }
  .scores::-webkit-scrollbar { display: none; }
}

/* Mesas claras (plástico, praça): textos da mesa em tom escuro */
.light-table .empty-board { color: rgba(0, 0, 0, .35); }
.light-table .monte { color: rgba(0, 0, 0, .55); }
.light-table .drop { border-color: rgba(0, 0, 0, .45); color: #1d1d1f; background: rgba(0, 0, 0, .06); }
.light-table .ring { border-color: rgba(0, 0, 0, .35); }
.light-table .tile.last { filter: drop-shadow(0 0 4px rgba(10, 132, 255, .9)) drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }

/* ---------- Cenários ---------- */
#sceneLayer { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.screen { position: relative; z-index: 1; }
.deco { position: absolute; }
.deco svg { width: 100%; height: 100%; display: block; overflow: visible; }
/* Boteco */
.deco-bulbs { left: 0; right: 0; top: -6px; height: 90px; }
.deco-bulbs .bulb { filter: drop-shadow(0 0 6px #ffcf5c) drop-shadow(0 0 14px rgba(255, 190, 80, .7)); animation: twinkle 3.5s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .55; } }
.deco-neon { right: 3vw; top: 80px; width: 180px; height: 74px; filter: drop-shadow(0 0 8px #ff375f) drop-shadow(0 0 18px rgba(255, 55, 95, .6)); animation: neon 6s infinite; }
@keyframes neon { 0%, 18%, 22%, 100% { opacity: 1; } 20% { opacity: .35; } }
/* Praça */
.deco-tree-l { left: -60px; bottom: -40px; width: 300px; height: 500px; opacity: .9; }
.deco-tree-r { right: -60px; bottom: -40px; width: 300px; height: 500px; opacity: .9; }
.deco-leaf {
  position: absolute; top: -30px; width: 14px; height: 9px; border-radius: 0 100% 0 100%;
  background: linear-gradient(135deg, #8bc34a, #4f8a2b); opacity: .8;
  animation: leafFall linear infinite;
}
@keyframes leafFall {
  0% { transform: translate(0, -5vh) rotate(0deg); }
  25% { transform: translate(40px, 25vh) rotate(120deg); }
  50% { transform: translate(-30px, 55vh) rotate(240deg); }
  75% { transform: translate(30px, 80vh) rotate(330deg); }
  100% { transform: translate(-10px, 110vh) rotate(420deg); }
}
.dapple {
  position: absolute; inset: -20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(0, 0, 0, .22) 0 8%, transparent 9%),
    radial-gradient(circle at 70% 20%, rgba(0, 0, 0, .18) 0 10%, transparent 11%),
    radial-gradient(circle at 40% 70%, rgba(0, 0, 0, .2) 0 9%, transparent 10%),
    radial-gradient(circle at 85% 65%, rgba(0, 0, 0, .16) 0 7%, transparent 8%),
    radial-gradient(circle at 55% 45%, rgba(255, 255, 220, .12) 0 12%, transparent 13%);
  filter: blur(14px);
  animation: dapple 9s ease-in-out infinite alternate;
}
@keyframes dapple { to { transform: translate(4%, 3%) rotate(3deg); } }
/* Praia */
.deco-sun { right: 6vw; top: 30px; width: 150px; height: 150px; animation: sunPulse 6s ease-in-out infinite; }
@keyframes sunPulse { 50% { transform: scale(1.06); } }
.deco-palm-l { left: -40px; bottom: -20px; width: 300px; height: 420px; transform-origin: bottom left; animation: sway 7s ease-in-out infinite; }
.deco-palm-r { right: -40px; bottom: -20px; width: 300px; height: 420px; transform-origin: bottom right; animation: sway 8s ease-in-out -2s infinite; }
@keyframes sway { 50% { transform: rotate(2.5deg); } }
.deco-gull { width: 46px; height: 18px; animation: gull 26s linear infinite; }
.deco-gull.g1 { top: 14vh; }
.deco-gull.g2 { top: 22vh; width: 34px; animation-duration: 34s; animation-delay: -12s; }
@keyframes gull { from { left: -60px; } to { left: 105vw; } }
/* Casa da vó */
.deco-clock { left: 4vw; top: 70px; width: 110px; height: 110px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .3)); }
.deco-clock .hand { transform-origin: 60px 60px; animation: tick 60s steps(60) infinite; }
@keyframes tick { to { transform: rotate(360deg); } }
.deco-frame { right: 5vw; top: 80px; width: 130px; height: 102px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .3)); transform: rotate(2deg); }
.deco-vase { right: 2vw; bottom: 6vh; width: 90px; height: 150px; }

/* Objetos em cima da mesa */
.props { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; border-radius: inherit; }
#board { z-index: 2; }
.prop { position: absolute; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); user-select: none; }
.prop-tl { left: 14px; top: 14px; transform: rotate(-8deg); }
.prop-tr { right: 16px; top: 12px; transform: rotate(7deg); }
.prop-bl { left: 14px; bottom: 12px; transform: rotate(5deg); }
.prop-br { right: 16px; bottom: 12px; transform: rotate(-6deg); }

/* Seletor de cenário */
.scene-preview { overflow: hidden; }
.scene-preview img { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
.scene-icon { font-size: 28px; }

/* Créditos */
.credits { display: flex; justify-content: center; gap: 6px 16px; flex-wrap: wrap; font-size: 12px; color: var(--label-2); margin-top: -2px; }
.credits a { color: #9146ff; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.credits a:hover { text-decoration: underline; }
.credits svg { width: 13px; height: 13px; fill: currentColor; }

@media (max-width: 860px) {
  .deco-tree-l, .deco-tree-r { width: 180px; height: 300px; opacity: .6; }
  .deco-palm-l, .deco-palm-r { width: 170px; height: 240px; opacity: .7; }
  .deco-neon, .deco-frame, .deco-clock, .deco-vase { display: none; }
  .deco-sun { width: 90px; height: 90px; top: 70px; }
  .prop { transform-origin: top left; scale: .7; }
  .prop-tr, .prop-br { transform-origin: top right; }
  .prop-bl { transform-origin: bottom left; }
}

/* Decoração nos espaços visíveis (a barra superior e o painel lateral cobrem o resto) */
.deco-bulbs { top: 52px; height: 80px; }
.deco-neon { right: auto; left: 22px; top: 92px; width: 150px; height: 62px; }
.deco-sun { right: auto; left: 60%; top: 64px; }
.deco-clock { top: 96px; left: 30px; width: 96px; height: 96px; }
.deco-frame { right: auto; left: calc(100% - 300px - 190px); top: 92px; width: 110px; height: 86px; }
#home .deco-frame { left: auto; }
@media (max-width: 860px) {
  .deco-bulbs { top: 100px; height: 50px; }
  .deco-sun { left: auto; right: 16px; top: 110px; }
}
/* Mesas claras: contorno mais forte para pedras claras não sumirem */
.light-table #board .tile:not(.last) { filter: drop-shadow(0 0 .6px rgba(0, 0, 0, .75)) drop-shadow(0 0 .6px rgba(0, 0, 0, .5)) drop-shadow(0 4px 5px rgba(0, 0, 0, .3)); }
.light-table #board .tile.last { filter: drop-shadow(0 0 .6px rgba(0, 0, 0, .75)) drop-shadow(0 0 4px rgba(10, 132, 255, .9)) drop-shadow(0 4px 5px rgba(0, 0, 0, .3)); }

/* Escolha ao criar a sala (normal ou modo streamer) */
.room-choice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 1px var(--sep);
  color: var(--label);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.25s var(--spring),
    box-shadow 0.2s;
}
.room-choice:hover {
  box-shadow: 0 0 0 2px var(--blue);
}
.room-choice:active {
  transform: scale(0.98);
}
.room-choice b {
  font-size: 16px;
}
.room-choice span {
  font-size: 13px;
  color: var(--label-2);
}

/* Sair da sala: ícone no topo da sala de espera */
.lobby-sheet {
  position: relative;
}
.leave-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--fill);
  color: var(--label-2);
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.25s var(--spring);
}
.leave-btn:hover {
  background: rgba(255, 69, 58, 0.12);
  color: var(--red);
}
.leave-btn:active {
  transform: scale(0.9);
}
.leave-btn svg {
  width: 18px;
  height: 18px;
}
