/* Tiến Lên Miền Nam */
:root {
  --cw: 70px; --ch: 98px; --tcw: 56px; --tch: 78px; --scw: 20px; --lift: 18px;
  --gold: #ffd54a; --red: #c8102e; --ink: #17171f;
  --font: system-ui, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--font); color: #f3f7f1; background: #06261a;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; overscroll-behavior: none;
}
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; }

#app {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
  background:
    radial-gradient(ellipse 75% 60% at 50% 42%, #23864f 0%, #146a3c 45%, #0b4a2a 78%, #073420 100%);
}
#app::before {   /* thớ nỉ */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .22;
  background-image:
    repeating-radial-gradient(circle at 30% 20%, rgba(255,255,255,.05) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(115deg, rgba(0,0,0,.05) 0 2px, transparent 2px 5px);
}

/* ---------- thanh trên ---------- */
#top {
  position: relative; z-index: 5; display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; min-height: 46px;
  background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.18));
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 17px; letter-spacing: .3px; white-space: nowrap; }
.brand .logo {
  display: inline-grid; place-items: center; width: 26px; height: 32px; border-radius: 5px;
  background: linear-gradient(#fff, #ece6d6); color: var(--ink); font-size: 18px; box-shadow: 0 2px 4px rgba(0,0,0,.4);
  transform: rotate(-8deg);
}
.coins {
  display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 99px;
  background: rgba(0,0,0,.35); border: 1px solid rgba(255,213,74,.4); font-size: 15px; margin-left: auto;
}
.coins b { color: var(--gold); font-variant-numeric: tabular-nums; }
.coins.bump { animation: bump .6s; }
@keyframes bump { 30% { transform: scale(1.15); } }
.coin {
  display: inline-block; width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff6c0 0 15%, #ffd54a 40%, #c98a12 100%);
  box-shadow: inset 0 0 0 2px rgba(150,90,0,.55);
}
.tools { display: flex; gap: 6px; }
.tools button {
  height: 34px; min-width: 34px; padding: 0 9px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: #fff; font-size: 15px; font-weight: 700;
}
.tools button:hover { background: rgba(255,255,255,.16); }
#btn-fast.on { background: var(--gold); color: #3a2600; border-color: var(--gold); }

/* ---------- bàn ---------- */
#table { position: relative; flex: 1; min-height: 0; touch-action: none; }
#table::before {
  content: ''; position: absolute; inset: 8px 8px 0; border-radius: 34px 34px 0 0; pointer-events: none;
  border: 2px solid rgba(255,255,255,.07); border-bottom: none;
  box-shadow: inset 0 0 70px rgba(0,0,0,.35);
}
#table.shake { animation: shake .45s; }
@keyframes shake { 15% { transform: translate(-6px, 2px); } 30% { transform: translate(5px, -3px); } 45% { transform: translate(-4px, 2px); } 60% { transform: translate(3px, 0); } 80% { transform: translate(-1px, 1px); } }
.felt-mark {
  position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); text-align: center; pointer-events: auto;
  color: rgba(255,255,255,.07); font-weight: 900; line-height: 1.1; white-space: nowrap;
}
.felt-mark b { display: block; font-size: clamp(28px, 7vw, 64px); letter-spacing: 6px; }
.felt-mark span { font-size: clamp(16px, 3vw, 26px); letter-spacing: 10px; }
body.portrait .felt-mark { top: 56%; }

/* ---------- ghế ---------- */
.seat { position: absolute; z-index: 3; display: flex; align-items: center; gap: 8px; transition: opacity .3s; }
.seat.s2 { top: 10px; left: 50%; transform: translateX(-50%); }
.seat.s1 { right: 12px; top: 42%; transform: translateY(-50%); flex-direction: column; gap: 3px; }
.seat.s3 { left: 12px; top: 42%; transform: translateY(-50%); flex-direction: column; gap: 3px; }
.seat.s0 { left: 12px; bottom: 8px; }
body.portrait .seat.s1, body.portrait .seat.s3 { top: 26%; }
.seat.s1 .info, .seat.s3 .info { align-items: center; }
.seat.passed:not(.turn) .av { filter: grayscale(.7) brightness(.75); }
.seat.done .av { filter: none; }

.av {
  position: relative; width: 52px; height: 52px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 22px; font-weight: 900; color: #fff; text-shadow: 0 2px 2px rgba(0,0,0,.35);
  border: 3px solid rgba(255,255,255,.85); box-shadow: 0 4px 10px rgba(0,0,0,.45);
  transition: box-shadow .2s, filter .3s;
}
.av0 { background: radial-gradient(circle at 35% 30%, #ffe08a, #f0a020 70%, #b56d00); color: #5a3400; text-shadow: none; }
.av1 { background: radial-gradient(circle at 35% 30%, #7fd4ff, #2a86d8 70%, #12508f); }
.av2 { background: radial-gradient(circle at 35% 30%, #ff9ab8, #e0457a 70%, #8f1d45); }
.av3 { background: radial-gradient(circle at 35% 30%, #c3f08a, #5fb03a 70%, #2e6a17); }
.seat.turn .av { box-shadow: 0 0 0 4px var(--gold), 0 0 22px 6px rgba(255,213,74,.65); animation: pulse 1.1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px var(--gold), 0 0 8px 2px rgba(255,213,74,.35); } }
.info { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.nm {
  font-size: 13px; font-weight: 700; white-space: nowrap; padding: 1px 8px; border-radius: 8px;
  background: rgba(0,0,0,.4);
}
.me-sub { font-size: 12px; opacity: .8; }
.cnt { display: flex; align-items: center; gap: 5px; justify-content: center; }
.cnt b {
  min-width: 26px; text-align: center; padding: 1px 6px; border-radius: 99px; font-size: 14px;
  background: #fff; color: var(--ink); box-shadow: 0 2px 4px rgba(0,0,0,.4);
}
.cnt.warn b { background: #ff3b4f; color: #fff; animation: warn .8s infinite; }
@keyframes warn { 50% { transform: scale(1.18); } }
.mini { position: relative; width: calc(var(--scw) * 1.7); height: calc(var(--scw) * 1.4); }
.mini i {
  position: absolute; top: 0; width: var(--scw); height: calc(var(--scw) * 1.4); border-radius: 3px;
  background: repeating-linear-gradient(45deg, #b3263a 0 3px, #8b1729 3px 6px); border: 1.5px solid #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.mini i:nth-child(1) { left: 0; transform: rotate(-12deg); }
.mini i:nth-child(2) { left: 30%; transform: rotate(-2deg); }
.mini i:nth-child(3) { left: 60%; transform: rotate(9deg); }
.badge {
  position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%) scale(0); white-space: nowrap;
  padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 900; color: #3b2500;
  background: linear-gradient(#ffe98a, #f2b31c); box-shadow: 0 2px 5px rgba(0,0,0,.45); transition: transform .3s cubic-bezier(.3,1.6,.5,1);
  text-shadow: none;
}
.badge.show { transform: translateX(-50%) scale(1); }
.badge.r1 { background: linear-gradient(#f4f6fb, #b9c2d3); }
.badge.r2 { background: linear-gradient(#ffd0a6, #d9844a); }
.badge.cong { background: linear-gradient(#bde8ff, #4aa6dd); color: #062a40; }
.bub {
  position: absolute; z-index: 4; white-space: nowrap; pointer-events: none;
  padding: 4px 10px; border-radius: 12px; font-size: 13px; font-weight: 800;
  background: #fff; color: var(--ink); box-shadow: 0 3px 8px rgba(0,0,0,.4);
  opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s cubic-bezier(.3,1.6,.5,1);
}
.bub.show { opacity: 1; transform: scale(1); }
.bub.pass { background: #e9ecef; color: #555; }
.bub.hot { background: #ff3b4f; color: #fff; }
.seat.s2 .bub { left: calc(100% + 6px); top: 50%; margin-top: -13px; }
.seat.s1 .bub { right: calc(100% + 6px); top: 12px; }
.seat.s3 .bub { left: calc(100% + 6px); top: 12px; }
.seat.s0 .bub { left: 8px; bottom: calc(100% + 6px); }

/* ---------- giữa bàn ---------- */
#pile {
  position: absolute; z-index: 2; left: 50%; top: 47%; height: var(--tch);
  transform: translate(-50%, -50%); pointer-events: none;
}
body.portrait #pile { top: 56%; }
.pgrp { position: absolute; left: 50%; top: 0; height: var(--tch); --w: var(--tcw); transition: transform .35s, opacity .35s, filter .35s; }
.pgrp.old { transform: translateY(calc(var(--tch) * -.42)) scale(.8); opacity: .55; filter: brightness(.8); z-index: -1; }
.pgrp.gone { opacity: 0; transform: scale(.85); }
.pgrp.chopper .card { box-shadow: 0 0 0 2px #ff4d4d, 0 0 18px rgba(255,60,60,.8); }
#pile-label {
  position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap;
  padding: 3px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; background: rgba(0,0,0,.45);
  opacity: 0; transition: opacity .2s;
}
#pile-label.show { opacity: 1; }
#pile-label.chop { background: #c62034; }
#pile-label .who { color: var(--gold); margin-right: 4px; }

#banner {
  position: absolute; z-index: 6; left: 50%; top: 30%; transform: translate(-50%, -50%) scale(.4); opacity: 0;
  pointer-events: none; text-align: center; transition: opacity .25s, transform .35s cubic-bezier(.3,1.5,.5,1);
}
body.portrait #banner { top: 42%; }
#banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#banner span {
  display: inline-block; padding: 8px 20px; border-radius: 14px; white-space: nowrap;
  background: rgba(0,0,0,.6); font-size: clamp(16px, 3.4vw, 24px); font-weight: 900; box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
#banner small { display: block; font-size: .65em; opacity: .9; }
#banner.chop span { background: linear-gradient(#ff5a5f, #b5121b); font-size: clamp(22px, 5vw, 38px); letter-spacing: 1px; text-shadow: 0 3px 0 rgba(0,0,0,.3); }
#banner.gold span { background: linear-gradient(#ffe98a, #f0a81a); color: #3b2500; font-size: clamp(20px, 4.4vw, 32px); }

#status {
  position: absolute; z-index: 3; left: 50%; bottom: 12px; transform: translateX(-50%); max-width: calc(100% - 300px);
  padding: 6px 14px; border-radius: 99px; font-size: 14px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(0,0,0,.4); transition: background .2s;
}
#status:empty { display: none; }
#status.turn { background: rgba(255,213,74,.92); color: #3b2500; }
#status.ok { background: rgba(30,140,70,.9); }
#status.bad { background: rgba(200,30,50,.9); }
#status .chop { color: #ffe98a; font-weight: 900; }
body.portrait #status { left: auto; right: 10px; transform: none; max-width: calc(100% - 150px); white-space: normal; border-radius: 14px; font-size: 13px; }

/* ---------- khu bài của bạn ---------- */
#dock {
  position: relative; z-index: 4; padding: 4px 8px calc(6px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.38));
  border-top: 1px solid rgba(255,255,255,.07);
}
#controls { display: flex; justify-content: center; gap: 8px; padding: 4px 0 2px; }
.ctl {
  display: flex; align-items: center; justify-content: center; gap: 5px; height: 42px; padding: 0 16px; min-width: 64px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: #fff;
  font-weight: 800; font-size: 15px; transition: transform .1s, background .2s, opacity .2s, box-shadow .2s;
}
.ctl em { font-style: normal; white-space: nowrap; }
.ctl:not(:disabled):hover { background: rgba(255,255,255,.18); }
.ctl:not(:disabled):active { transform: scale(.95); }
.ctl:disabled { opacity: .4; }
.ctl.pass { background: linear-gradient(#7a8393, #4d5563); }
.ctl.pass.nudge:not(:disabled) { animation: nudge 1.2s infinite; }
@keyframes nudge { 50% { box-shadow: 0 0 0 3px rgba(255,255,255,.6); } }
.ctl.play { min-width: 104px; background: linear-gradient(#ffcf57, #f08d16); color: #3b2200; border-color: #ffd36b; }
.ctl.play:disabled { background: linear-gradient(#a08a52, #7b5f2b); color: rgba(0,0,0,.6); }
.ctl.play.ready { box-shadow: 0 0 0 3px rgba(255,255,255,.75), 0 0 18px rgba(255,200,60,.9); }
#dock.myturn #hand { filter: drop-shadow(0 0 10px rgba(255,213,74,.35)); }

#hand {
  position: relative; height: calc(var(--ch) + var(--lift) + 6px); margin: 0 auto; max-width: 1100px;
  touch-action: none; --w: var(--cw);
}
#hand .card {
  top: calc(var(--lift) + 2px); cursor: pointer;
  transform: translate(var(--x, 0), calc(var(--y, 0px) + var(--hy, 0px)));
  transition: transform .22s cubic-bezier(.2,.8,.3,1), box-shadow .15s, opacity .2s;
}
#hand .card.pre { opacity: 0; transition: none; }
#hand .card.sel { box-shadow: 0 0 0 2px var(--gold), 0 8px 16px rgba(0,0,0,.45); }
#hand .card.sel::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: rgba(255,213,74,.12); }
@media (hover: hover) { #hand .card:hover { --hy: -6px; } }
#hand.nope { animation: nope .35s; }
@keyframes nope { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- lá bài ---------- */
.card {
  position: absolute; left: 0; top: 0; width: var(--w); height: calc(var(--w) * 1.4);
  border-radius: calc(var(--w) * .09); font-size: calc(var(--w) * .3); color: var(--ink);
  background: linear-gradient(160deg, #ffffff 0%, #f7f4ec 60%, #ece6d6 100%);
  border: 1px solid rgba(0,0,0,.22); box-shadow: 0 2px 6px rgba(0,0,0,.35);
  overflow: hidden;
}
.card.red { color: var(--red); }
.ix { position: absolute; left: .1em; top: .1em; width: 1.12em; display: flex; flex-direction: column; align-items: center; line-height: .95; }
.ix b { font-size: 1.02em; font-weight: 800; letter-spacing: -.03em; }
.card.ten .ix b { letter-spacing: -.12em; font-size: .9em; }
.ix i { font-style: normal; font-size: .82em; margin-top: .06em; }
.ix.br { left: auto; top: auto; right: .1em; bottom: .1em; transform: rotate(180deg); }
.pip { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.8em; padding: .35em 0 0 .45em; line-height: 1; }
.pip.ace { font-size: 2.5em; }
.fc {
  position: absolute; left: 26%; right: 12%; top: 18%; bottom: 14%; border-radius: .18em;
  border: max(1px, .06em) solid currentColor; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #fff6d6, #f1d892); line-height: 1;
}
.fc b { font-family: "Times New Roman", Georgia, serif; font-size: 1.5em; font-weight: 700; }
.fc i { font-style: normal; font-size: .85em; }
.card.back, .fly {
  background: repeating-linear-gradient(45deg, #b3263a 0 4px, #8b1729 4px 8px);
  border: 2px solid #fff;
}
.card.back::after { content: ''; position: absolute; inset: 3px; border-radius: 4px; border: 1px solid rgba(255,255,255,.5); }
.fly { position: fixed; --w: var(--tcw); z-index: 40; pointer-events: none; }

/* ---------- hiệu ứng ---------- */
#fx { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }
.float {
  position: fixed; transform: translate(-50%, -50%); font-weight: 900; font-size: 18px; white-space: nowrap;
  padding: 2px 10px; border-radius: 99px; animation: floatUp 1.5s ease-out forwards; text-shadow: 0 2px 2px rgba(0,0,0,.4);
}
.float.plus { background: linear-gradient(#ffe98a, #f0a81a); color: #3b2500; text-shadow: none; }
.float.minus { background: #c62034; color: #fff; }
@keyframes floatUp { 0% { opacity: 0; margin-top: 10px; } 15% { opacity: 1; margin-top: 0; } 100% { opacity: 0; margin-top: -60px; } }
.spark {
  position: fixed; width: 8px; height: 8px; border-radius: 50%; margin: -4px 0 0 -4px;
  animation: spark .85s cubic-bezier(.1,.7,.3,1) forwards;
}
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.confetti {
  position: fixed; top: -20px; width: 8px; height: 13px; border-radius: 2px;
  animation: fall 2.4s linear forwards;
}
@keyframes fall { to { transform: translateY(105vh) rotate(var(--rx)); } }

/* ---------- overlay ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 14px;
  background: rgba(2, 18, 10, .72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: ovIn .25s;
}
.overlay.hidden { display: none; }
@keyframes ovIn { from { opacity: 0; } }
.panel {
  width: min(440px, 100%); max-height: calc(100% - 10px); overflow: auto; text-align: center;
  padding: 20px 20px 18px; border-radius: 20px; color: #f3f7f1;
  background: linear-gradient(170deg, #17573a, #0d3a26 70%);
  border: 2px solid rgba(255,213,74,.55); box-shadow: 0 20px 60px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.12);
  animation: popIn .35s cubic-bezier(.3,1.4,.5,1);
}
@keyframes popIn { from { transform: scale(.85); opacity: 0; } }
.panel h1 { margin: 6px 0 4px; font-size: 30px; color: var(--gold); text-shadow: 0 3px 0 rgba(0,0,0,.3); }
.panel h2 { margin: 2px 0 6px; font-size: 24px; color: #fff; }
.panel h2.win { color: var(--gold); }
.panel .sub { margin: 0 0 12px; opacity: .85; font-size: 14px; }
.panel .note { margin: 12px 0 0; font-size: 12px; opacity: .7; }
.primary {
  display: block; width: 100%; margin: 8px 0 4px; padding: 13px 18px; border: none; border-radius: 14px;
  background: linear-gradient(#ffcf57, #f08d16); color: #3b2200; font-size: 18px; font-weight: 900;
  box-shadow: 0 4px 0 #a25a00, 0 8px 18px rgba(0,0,0,.35);
}
.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #a25a00; }
.row2 { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.row2 .gnx-btn, .btns .gnx-btn { margin-top: 6px; }
.btns { display: flex; flex-direction: column; align-items: center; }
.stats { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 0 0 10px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; background: rgba(0,0,0,.3); font-weight: 700; font-size: 14px; }
.title-cards { position: relative; height: 92px; margin: 0 auto; width: 160px; }
.tc {
  position: absolute; top: 6px; left: 50%; width: 58px; height: 80px; margin-left: -29px; border-radius: 7px;
  background: linear-gradient(160deg, #fff, #ece6d6); color: var(--ink); font-style: normal; font-weight: 900; font-size: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 4px 12px rgba(0,0,0,.45);
}
.tc s { text-decoration: none; font-size: 26px; }
.tc.a { transform: translateX(-40px) rotate(-16deg); }
.tc.b { color: var(--red); z-index: 1; transform: translateY(-4px); }
.tc.c { color: var(--red); transform: translateX(40px) rotate(16deg); }
.gift { font-size: 54px; animation: bump 1.2s infinite; }

#res-rows { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; text-align: left; }
.rrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(0,0,0,.25); }
.rrow.me { background: rgba(255,213,74,.16); border: 1px solid rgba(255,213,74,.5); }
.rrow .md { width: 28px; text-align: center; font-size: 22px; font-weight: 900; flex: none; }
.rrow .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rrow .who small { font-size: 12px; opacity: .78; }
.rrow .left { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 3px; }
.rrow .left i { font-style: normal; font-size: 11.5px; font-weight: 800; padding: 0 4px; border-radius: 4px; background: #fff; color: var(--ink); }
.rrow .left i.r { color: var(--red); }
.rrow .dl { font-weight: 900; font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dl.up { color: #7dff9c; }
.dl.down { color: #ff7b8a; }
.bal { font-size: 16px; margin-bottom: 4px; }
.bal b { color: var(--gold); font-size: 20px; }
.bal small { display: block; font-size: 12px; opacity: .7; margin-top: 2px; }
.help { text-align: left; width: min(560px, 100%); }
.help h2 { text-align: center; color: var(--gold); }
.help h3 { margin: 12px 0 4px; font-size: 15px; color: var(--gold); }
.help p, .help ul { margin: 0 0 4px; font-size: 14px; line-height: 1.5; }
.help ul { padding-left: 20px; }
.help .warn { margin-top: 12px; padding: 8px 10px; border-radius: 10px; background: rgba(255,213,74,.14); border: 1px solid rgba(255,213,74,.45); }

/* ---------- màn hình nhỏ ---------- */
@media (max-width: 560px) {
  .brand > span:last-child { display: none; }
  .tools button { padding: 0 7px; min-width: 32px; height: 32px; font-size: 14px; }
  .ctl { padding: 0 10px; min-width: 0; font-size: 14px; height: 40px; flex: 1; max-width: 120px; }
  .ctl.play { min-width: 0; }
  .av { width: 44px; height: 44px; font-size: 19px; }
  .nm { font-size: 12px; }
}
@media (max-width: 420px) {
  .ctl span { display: none; }
}
body.short #top { min-height: 38px; padding: 3px 10px; }
body.short .tools button { height: 30px; }
body.short .ctl { height: 34px; }
body.short #controls { padding: 2px 0 0; }
body.short .av { width: 40px; height: 40px; font-size: 17px; border-width: 2px; }
body.short .seat.s2 { top: 4px; }
body.short #status { bottom: 6px; padding: 4px 12px; font-size: 13px; }
body.short #pile, body.short .felt-mark { top: 50%; }
body.short #banner { top: 36%; }
body.short .panel { padding: 12px 16px; }
body.short .title-cards { display: none; }
/* màn hình thấp (điện thoại xoay ngang): nút đặt cạnh bài để bàn rộng hơn */
body.short #dock { display: flex; align-items: flex-end; gap: 8px; padding-top: 0; }
body.short #hand { flex: 1; min-width: 0; margin: 0; }
body.short #controls { order: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 200px; flex: none; padding: 0 0 8px; }
body.short .ctl { max-width: none; padding: 0 8px; }
body.short .felt-mark { display: none; }
body.short .panel { width: min(720px, 100%); }
body.short #res-rows { display: grid; grid-template-columns: 1fr 1fr; }
body.short .panel h2 { font-size: 20px; margin: 0; }
body.short .panel .sub { margin-bottom: 6px; }
