/* ===================================================================
   Ceki — tema meja kasino (landscape-first, tetap jalan di portrait)
   =================================================================== */
:root {
  --bg0: #0b0606; --bg1: #2a0f12;
  --felt-hi: #23855a; --felt: #135a3b; --felt-lo: #0a3524;
  --wood-hi: #8a4b25; --wood: #5b2c14; --wood-lo: #2e1408;
  --gold: #e9c46a; --gold-hi: #fbe3a1; --gold-lo: #a67c2e;
  --ink: #f7f1e3; --muted: #c9bfa6; --red: #c62f37; --black: #17171c;
  --card: #fffdf7; --card-edge: #e8e1cf;
  --cw: 58px; --ch: 82px;              /* kartu di tangan */
  --mcw: 36px; --mch: 51px;            /* kartu di susunan meja */
  --pcw: 50px; --pch: 70px;            /* kartu tumpukan */
  --display: "Cinzel", Georgia, serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  color: var(--ink); font: 14px/1.4 var(--ui); overflow-x: hidden;
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, #3b1419 0%, var(--bg1) 45%, var(--bg0) 100%) fixed,
    var(--bg0);
}
/* motif karpet kasino halus */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .07;
  background-image:
    radial-gradient(circle at 25% 25%, var(--gold) 1.2px, transparent 1.6px),
    radial-gradient(circle at 75% 75%, var(--gold) 1.2px, transparent 1.6px);
  background-size: 28px 28px;
}
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }

/* ===================================================================
   Beranda / Lobby
   =================================================================== */
#app { position: relative; min-height: 100%; }
#v-home, #v-lobby, #v-join {
  max-width: 920px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  padding: 16px calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l));
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
}
.brand { text-align: center; }
.brand h1 {
  margin: 0; font: 800 54px/1 var(--display); letter-spacing: 8px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 50%, var(--gold-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #0008);
}
.brand.small h1 { font-size: 26px; letter-spacing: 3px; }
.brand p { margin: 6px 0 0; color: var(--muted); }
.suits { color: var(--gold); letter-spacing: 10px; font-size: 18px; opacity: .8; }
.suits::first-letter { color: var(--gold); }
.card-box {
  background: linear-gradient(160deg, #1a5c40, #0d3b28);
  border: 1px solid #e9c46a55; border-radius: 16px; padding: 14px;
  box-shadow: 0 10px 30px #0008, inset 0 1px 0 #ffffff14;
  display: flex; flex-direction: column; gap: 10px;
}
.card-box h2 { margin: 0; font: 600 15px/1.2 var(--display); color: var(--gold); letter-spacing: 1px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.row { display: flex; gap: 8px; }
.row > input, .row > select { flex: 1; min-width: 0; }
input, select {
  font: inherit; color: var(--ink); background: #0006; border: 1px solid #ffffff2a;
  border-radius: 10px; padding: 10px 12px;
}
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
#join-code { text-transform: uppercase; letter-spacing: 4px; font-weight: 800; }
.card-box button, .modal-box button:not(.link) {
  font-weight: 700; border-radius: 10px; padding: 10px 16px; border: 1px solid #ffffff2a; background: #ffffff14;
}
button.primary {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, var(--gold-lo)) !important;
  color: #2b1d00; border-color: #fff6 !important; box-shadow: 0 3px 0 #6b4d12, 0 6px 14px #0007;
}
button.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #6b4d12; }
button.wide { width: 100%; }
button.link { background: none; border: none; color: var(--muted); text-decoration: underline; align-self: center; padding: 6px; }
.muted { color: var(--muted); margin: 0; font-size: 12.5px; }
.plist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plist li { padding: 8px 10px; background: #0003; border-radius: 8px; }
.plist li.empty { color: var(--muted); font-style: italic; }

@media (orientation: landscape) and (min-width: 600px) {
  #v-home {
    display: grid; grid-template-columns: 1fr 1.15fr; column-gap: 20px; align-content: center;
  }
  #v-home .brand { grid-row: 1 / span 4; align-self: center; }
  #v-home .brand h1 { font-size: 76px; }
  #v-home > :not(.brand) { grid-column: 2; }
}

/* ===================================================================
   Meja permainan
   =================================================================== */
#v-game { position: fixed; inset: 0; overflow: hidden; }
.room { position: absolute; inset: 0; --bottomH: 128px; }

/* meja oval: rail kayu + garis emas + felt */
.table {
  position: absolute; top: 8px; bottom: calc(var(--bottomH) * .42);
  left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r));
  border-radius: 999px / 50%;
  background:
    radial-gradient(ellipse at 50% 0%, #ffffff22, transparent 60%),
    linear-gradient(180deg, var(--wood-hi), var(--wood) 40%, var(--wood-lo));
  box-shadow: 0 18px 40px #000c, inset 0 2px 1px #ffffff30, inset 0 -3px 6px #0008;
  padding: 14px;
}
.rail { display: none; }
.felt {
  position: relative; width: 100%; height: 100%; border-radius: 999px / 50%; overflow: hidden;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.35'/></svg>"),
    radial-gradient(ellipse 70% 65% at 50% 45%, var(--felt-hi), var(--felt) 55%, var(--felt-lo));
  box-shadow: inset 0 0 0 2px #e9c46a99, inset 0 0 0 6px #0003, inset 0 8px 30px #000a, inset 0 -6px 24px #0007;
}
.felt-logo {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%);
  font: 800 clamp(40px, 11vw, 120px)/1 var(--display); letter-spacing: .25em;
  color: #ffffff0d; pointer-events: none; white-space: nowrap;
  text-shadow: 0 1px 0 #0002;
}
.felt-logo::after {
  content: "♠ ♥ ♦ ♣"; display: block; text-align: center; font-size: .22em; letter-spacing: .6em; margin-top: .25em;
}

/* --- kursi lawan di sisi atas meja --- */
.seats {
  position: absolute; top: 6px; left: 13%; right: 13%; z-index: 2;
  display: flex; justify-content: space-around; align-items: flex-start; gap: 6px;
}
/* kursi lawan: pil ringkas (avatar + nama + kartu/skor) */
.seat {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 6px; align-items: center;
  min-width: 0; max-width: 160px; padding: 3px 10px 3px 3px; border-radius: 24px;
  background: linear-gradient(180deg, #000c, #000a); border: 1px solid #e9c46a50; box-shadow: 0 4px 10px #0007;
  transform: translateY(var(--arc, 0));
}
.seat .avatar { grid-row: 1 / span 2; }
.seat .nm { background: none; border: none; padding: 0; text-align: left; }
.seat.turn { border-color: var(--gold-hi); box-shadow: 0 0 14px #e9c46a88; }
.avatar {
  --pct: 0; position: relative; width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font: 800 16px var(--ui); color: #2b1d00;
  background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  box-shadow: 0 3px 8px #0009, inset 0 -2px 3px #0004;
}
.avatar.bot { background: radial-gradient(circle at 35% 30%, #d9e2ec, #8fa3b8 60%, #4f6175); font-size: 18px; }
.seat.turn .avatar, .me-seat.turn .avatar { box-shadow: 0 0 0 3px #0008, 0 0 16px 4px #fbe3a1aa; }
.seat.turn .avatar::before, .me-seat.turn .avatar::before {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(var(--gold-hi) calc(var(--pct) * 1turn), #ffffff22 0);
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%);
}
.seat .nm, .me-seat .nm {
  max-width: 100%; font-weight: 700; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: #000a; padding: 1px 8px; border-radius: 10px; border: 1px solid #e9c46a40;
}
.seat .info { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.minis { display: inline-flex; }
.minis i {
  width: 10px; height: 14px; border-radius: 2px; border: 1px solid #fff;
  background: repeating-linear-gradient(45deg, #7d1622 0 2px, #a3222f 2px 4px);
}
.minis i + i { margin-left: -6px; }
.score-chip {
  display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 6px; border-radius: 9px;
  font: 800 10.5px var(--ui); color: #fff; background: #1c1c22; border: 1.5px dashed #ffffffa0;
}
.score-chip.neg { background: #6e1a20; }
.score-chip.pos { background: #145c3a; }

/* --- pusat meja: tumpukan + susunan --- */
.center {
  position: absolute; top: 58px; bottom: calc(var(--bottomH) * .58 + 22px); left: 8%; right: 8%; z-index: 1;
  display: flex; gap: 14px; align-items: flex-start;
}
.piles { display: flex; gap: 10px; align-items: flex-end; flex: none; }
.pile { position: relative; background: none; border: none; padding: 0; }
.stock { width: calc(var(--pcw) + 6px); height: calc(var(--pch) + 6px); }
.stock .back { position: absolute; left: 0; top: 0; }
.stock .back:nth-child(2) { left: 2px; top: -2px; }
.stock .back:nth-child(3) { left: 4px; top: -4px; }
.stock.low .back:nth-child(n+2) { display: none; }
.badge {
  position: absolute; right: -8px; bottom: -6px; z-index: 2; min-width: 24px; height: 20px; padding: 0 6px;
  border-radius: 10px; display: grid; place-items: center; font: 800 11px var(--ui);
  background: #111; border: 1.5px solid var(--gold); color: var(--gold-hi);
}
.back {
  display: block; width: var(--pcw); height: var(--pch); border-radius: 7px;
  border: 3px solid #fffdf7;
  background:
    radial-gradient(circle at 50% 50%, #f5d27a 0 3px, transparent 3.5px) 0 0 / 10px 10px,
    repeating-linear-gradient(45deg, #7d1622 0 5px, #a3222f 5px 10px);
  box-shadow: 0 2px 6px #0009, inset 0 0 0 2px #e9c46a;
}
.discard { display: flex; align-items: flex-end; gap: 0; min-height: var(--pch); }
.discard .c { --cw: var(--pcw); --ch: var(--pch); }
.discard .c + .c { margin-left: calc(var(--pcw) * -.42); }
.discard .c:not(:last-child) { filter: brightness(.9); transform: translateY(4px); }
.discard .slot {
  width: var(--pcw); height: var(--pch); border-radius: 7px; border: 2px dashed #ffffff40;
  display: grid; place-items: center; font-size: 10px; color: #ffffff70;
}
.pile.glow .back:last-of-type, .pile.glow .c:last-child { box-shadow: 0 0 0 3px var(--gold-hi), 0 0 18px 2px var(--gold); }
.pile.glow .c:not(:last-child) { box-shadow: 0 0 0 2px #e9c46a88; }
.pile.glow { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-2px); } }

.melds {
  flex: 1; min-width: 0; height: 100%; overflow: auto; scrollbar-width: none;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 14px 10px; padding: 8px 4px 4px;
}
.melds::-webkit-scrollbar { display: none; }
.meld {
  position: relative; display: flex; padding: 5px 5px 4px; border-radius: 9px;
  background: #00000030; border: 1.5px solid #ffffff14;
}
.meld.fresh { animation: land .35s ease-out; }
@keyframes land { from { transform: scale(.85); opacity: 0; } }
.meld .c { --cw: var(--mcw); --ch: var(--mch); }
.meld .c + .c { margin-left: calc(var(--mcw) * -.38); }
.meld small {
  position: absolute; top: -8px; left: 6px; font-size: 9.5px; font-weight: 700; padding: 0 5px; border-radius: 6px;
  background: var(--felt-lo); color: var(--gold); max-width: 90px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.meld.target { border: 1.5px dashed var(--gold-hi); background: #e9c46a1f; cursor: pointer; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { background: #e9c46a38; } }
.empty-table { color: #ffffff55; font-style: italic; font-size: 12px; align-self: center; margin: auto; }

.status {
  position: absolute; left: 50%; bottom: calc(var(--bottomH) * .58 - 8px); transform: translateX(-50%); z-index: 3;
  padding: 4px 14px; border-radius: 14px; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis;
  font-weight: 700; font-size: 12.5px; background: #000b; border: 1px solid #ffffff26;
}
.status.mine { color: #2b1d00; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); border-color: #fff8; box-shadow: 0 0 14px #e9c46a99; }
.status:empty { display: none; }

/* --- kartu --- */
.c {
  position: relative; flex: none; width: var(--cw); height: var(--ch); border-radius: calc(var(--cw) * .12);
  background: linear-gradient(160deg, #fff, var(--card) 60%, #f3ecda);
  color: var(--black); border: 1px solid var(--card-edge);
  box-shadow: 0 1px 1px #0003, 0 3px 8px #0006; user-select: none; -webkit-user-select: none;
  font-family: var(--ui); overflow: hidden;
}
.c.red { color: var(--red); }
.c .ix {
  position: absolute; left: 7%; top: 4%; display: flex; flex-direction: column; align-items: center;
  font-weight: 800; line-height: .95; font-size: calc(var(--cw) * .3); letter-spacing: -.04em;
}
.c .ix small { font-size: .8em; line-height: 1; }
.c .ix.b { left: auto; top: auto; right: 7%; bottom: 4%; transform: rotate(180deg); }
.c .pip { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--cw) * .58); line-height: 1; padding-top: 6%; }
.c.face .pip { font: 800 calc(var(--cw) * .4) var(--display); padding-top: 10%; }
.c.face .pip::after { content: attr(data-s); font: 400 .55em var(--ui); margin-left: .05em; align-self: center; }
.c.face { background: linear-gradient(160deg, #fff, #fff6dc 70%, #f3e2b4); }
.c.face::before {
  content: ""; position: absolute; inset: 18% 16%; border: 1.5px solid currentColor; border-radius: 4px; opacity: .25;
}
.c.joker { background: linear-gradient(150deg, #fff7d6, #f6d37a 55%, #e2a93c); color: #5b2a86; }
.c.joker .ix { font-size: calc(var(--cw) * .2); letter-spacing: 0; }
.c.joker .pip { font-size: calc(var(--cw) * .55); }
.c .as {
  position: absolute; left: 0; right: 0; bottom: 3%; text-align: center; font: 800 calc(var(--cw) * .24) var(--ui); color: #5b2a86;
}
.meld .c .ix.b, .discard .c:not(:last-child) .ix.b { display: none; }
.meld .c .pip { padding-top: 22%; font-size: calc(var(--cw) * .5); justify-content: end; padding-right: 10%; }

/* ===================================================================
   Area bawah: kursi saya + tangan + tombol chip
   =================================================================== */
.bottom {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--bottomH); z-index: 4;
  padding: 0 calc(10px + var(--safe-r)) calc(4px + var(--safe-b)) calc(10px + var(--safe-l));
  display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 8px; pointer-events: none;
}
.bottom > * { pointer-events: auto; }
.me-seat { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 86px; padding-bottom: 6px; }
.me-seat .avatar { width: 44px; height: 44px; font-size: 18px; }

.hand {
  --ov: -18px; position: relative; display: flex; justify-content: center; align-items: flex-end;
  min-width: 0; height: 100%; padding: 0 6px 6px; touch-action: none;
}
.hand .c {
  --rot: 0deg; --arc: 0px; --lift: 0px; cursor: pointer; touch-action: none;
  transform-origin: 50% 120%;
  transform: translateY(calc(var(--arc) + var(--lift))) rotate(var(--rot));
  transition: transform .15s ease, box-shadow .15s;
}
.hand .c + .c { margin-left: var(--ov); }
.hand .c.sel { --lift: -18px; box-shadow: 0 0 0 3px var(--gold-hi), 0 0 16px var(--gold), 0 8px 14px #0009; z-index: 2; }
.hand .c.new { animation: dealt .45s ease-out; }
@keyframes dealt { from { transform: translateY(-60px) scale(1.15); opacity: 0; } }
.hand .c.must { box-shadow: 0 0 0 3px #5ad1ff, 0 0 14px #5ad1ff, 0 8px 14px #0009; }
.hand .c.must.sel { box-shadow: 0 0 0 3px #5ad1ff, 0 0 0 6px var(--gold), 0 8px 14px #0009; }
.hand .c.dragging { z-index: 9; transition: none; box-shadow: 0 14px 28px #000c; cursor: grabbing; }

.actions { display: grid; grid-template-columns: repeat(2, auto); gap: 6px; padding-bottom: 8px; }
.chip-btn {
  --c1: #333; --c2: #111; position: relative; width: 56px; height: 56px; border-radius: 50%; padding: 0;
  border: none; font: 800 11.5px var(--ui); letter-spacing: .3px; color: #fff;
  background:
    radial-gradient(circle, var(--c1) 0 52%, transparent 53%),
    repeating-conic-gradient(#fff 0 10deg, var(--c2) 10deg 30deg);
  box-shadow: 0 4px 0 #0008, 0 6px 12px #0009, inset 0 0 0 2px #0005;
  transition: transform .1s, filter .2s;
}
.chip-btn span {
  position: absolute; inset: 9px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px dashed #ffffffb0; text-shadow: 0 1px 1px #0008;
}
.chip-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #0008; }
.chip-btn:disabled { filter: grayscale(.7) brightness(.72); opacity: .8; }
.chip-btn.gold { --c1: #c99a2e; --c2: #8a6514; }
.chip-btn.gold span { color: #2b1d00; text-shadow: none; border-color: #2b1d0080; }
.chip-btn.red { --c1: #b3262f; --c2: #6b1118; }
.chip-btn.dark { --c1: #23232b; --c2: #0e0e12; }

/* tombol kecil kanan atas */
.hud-top { position: absolute; top: 10px; right: calc(12px + var(--safe-r)); z-index: 6; display: flex; gap: 6px; }
.ico {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid #e9c46a80; background: #000a;
  color: var(--gold-hi); font-weight: 800; display: grid; place-items: center; padding: 0;
}
.logbox {
  position: absolute; top: 48px; right: calc(12px + var(--safe-r)); z-index: 7; width: min(300px, 70vw); max-height: 55%;
  overflow: auto; background: #0a0a0ce8; border: 1px solid #e9c46a55; border-radius: 12px; padding: 10px 12px; font-size: 12px;
}
.logbox h3 { margin: 0 0 6px; font: 600 13px var(--display); color: var(--gold); }
.logbox ol { margin: 0; padding-left: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.rotate-hint { display: none; }

/* ===================================================================
   Modal
   =================================================================== */
.modal { position: fixed; inset: 0; background: #000b; display: flex; align-items: center; justify-content: center; padding: 12px; z-index: 20; backdrop-filter: blur(2px); }
.modal-box {
  width: 100%; max-width: 520px; max-height: 94vh; max-height: 94dvh; overflow: auto;
  background: linear-gradient(170deg, #17583c, #0b2e20); border-radius: 18px; padding: 18px;
  border: 2px solid var(--gold-lo); box-shadow: 0 0 0 5px #2e1408, 0 0 0 7px #a67c2e66, 0 20px 50px #000;
  display: flex; flex-direction: column; gap: 10px;
}
.modal-box h2 { margin: 0; font: 800 22px var(--display); color: var(--gold-hi); letter-spacing: 1px; text-align: center; }
.modal-box p { margin: 0; text-align: center; }
.rules ol { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.rules p { text-align: left; }
.scores { width: 100%; border-collapse: collapse; font-size: 13px; }
.scores th, .scores td { padding: 6px 4px; text-align: right; border-bottom: 1px solid #ffffff1a; white-space: nowrap; }
.scores th:first-child, .scores td:first-child { text-align: left; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.scores th { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.scores td:last-child { font-weight: 800; color: var(--gold-hi); }
.scores tr.me td { background: #e9c46a1c; }
.toast {
  position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 30; max-width: 90vw; text-align: center;
  background: #120a0af0; border: 1px solid var(--gold-lo); padding: 9px 16px; border-radius: 12px; font-weight: 600;
  box-shadow: 0 8px 20px #000a;
}

/* ===================================================================
   Ukuran layar
   =================================================================== */
/* HP landscape yang pendek */
@media (orientation: landscape) and (max-height: 430px) {
  :root { --cw: 52px; --ch: 74px; --mcw: 32px; --mch: 45px; --pcw: 44px; --pch: 62px; }
  .room { --bottomH: 112px; }
  .table { top: 4px; padding: 10px; }
  .center { top: 50px; }
  .avatar { width: 30px; height: 30px; font-size: 14px; }
  .me-seat .avatar { width: 38px; height: 38px; }
  .chip-btn { width: 50px; height: 50px; font-size: 10.5px; }
  .chip-btn span { inset: 8px; }
}
/* tablet / desktop */
@media (min-width: 1000px) and (min-height: 600px) {
  :root { --cw: 74px; --ch: 104px; --mcw: 46px; --mch: 65px; --pcw: 64px; --pch: 90px; }
  .room { --bottomH: 170px; }
  .center { top: 76px; }
  .seat { max-width: 200px; }
  .avatar { width: 44px; height: 44px; font-size: 20px; }
  .seat .nm { font-size: 13px; }
  .chip-btn { width: 66px; height: 66px; font-size: 13px; }
}
/* portrait: meja tetap bisa dipakai, dengan ajakan memutar HP */
@media (orientation: portrait) {
  :root { --cw: 46px; --ch: 66px; --mcw: 32px; --mch: 45px; --pcw: 44px; --pch: 62px; }
  .room { --bottomH: 176px; }
  .table { top: 40px; border-radius: 48px; }
  .felt { border-radius: 38px; }
  .seats { left: 4%; right: 4%; flex-wrap: wrap; justify-content: center; }
  .seat { max-width: 47%; transform: none; }
  .center { top: 92px; left: 5%; right: 5%; flex-direction: column; }
  .bottom { grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; }
  .hand { grid-column: 1 / -1; grid-row: 1; }
  .me-seat { grid-row: 2; flex-direction: row; width: auto; }
  .actions { grid-row: 2; grid-template-columns: repeat(4, auto); justify-content: end; }
  .chip-btn { width: 48px; height: 48px; font-size: 10px; }
  .chip-btn span { inset: 7px; }
  .rotate-hint {
    display: block; position: absolute; top: 6px; left: 10px; right: 120px; z-index: 5; font-size: 11.5px;
    color: var(--muted); background: #000a; border: 1px solid #ffffff22; border-radius: 10px; padding: 5px 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
