:root {
  --felt: #0d3b2e;
  --felt-2: #12523f;
  --felt-3: #0a2c22;
  --wood: #2a1a12;
  --gold: #f0c674;
  --gold-2: #c9983f;
  --ink: #10231d;
  --paper: #f7f3e8;
  --red: #c0392b;
  --blue: #1f6feb;
  --green: #157f4a;
  --text: #ecf5f0;
  --muted: #9dbcae;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-br: rgba(255, 255, 255, 0.12);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 700px at 50% -10%, var(--felt-2), var(--felt) 55%, var(--felt-3));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--panel-br);
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-mark {
  color: var(--gold);
  font-size: 22px;
}

.brand-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.conn {
  font-size: 12px;
}

.conn-on {
  color: #46d38a;
}

.conn-off {
  color: #e05b5b;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--panel-br);
  font-size: 13px;
}

.user-chip button {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.user-chip button:hover {
  color: var(--gold);
}

/* ---------- layout ---------- */
.stage {
  flex: 1;
  padding: 22px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-br);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel-title {
  margin: 0 0 12px;
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--gold);
}

.screen {
  animation: fade 0.25s ease;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ---------- auth ---------- */
.auth-panel {
  max-width: 380px;
  margin: 40px auto;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  flex: 1;
  padding: 9px;
  border-radius: 10px;
  border: 1px solid var(--panel-br);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}

.tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #2a1c06;
  font-weight: 700;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--panel-br);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 15px;
  outline: none;
}

input:focus {
  border-color: var(--gold);
}

.hint {
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0 0;
  line-height: 1.6;
}

/* ---------- buttons ---------- */
.btn {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--panel-br);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.08s ease, filter 0.15s ease;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.18);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  border-color: var(--gold-2);
  color: #2a1c06;
  font-weight: 700;
}

.btn.danger {
  background: rgba(192, 57, 43, 0.85);
  border-color: #8f2d22;
  color: #fff;
}

.btn.block {
  width: 100%;
  padding: 12px;
  font-size: 15px;
}

.btn.tiny {
  padding: 3px 9px;
  font-size: 12px;
}

/* ---------- lobby ---------- */
.lobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.game-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--panel-br);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.22));
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}

.game-card h3 {
  margin: 0 0 6px;
  font-size: 19px;
  color: var(--gold);
  letter-spacing: 1px;
}

.game-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  min-height: 40px;
}

.game-card .gc-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--muted);
}

.game-card .gc-icon {
  font-size: 30px;
  margin-bottom: 8px;
  opacity: 0.92;
}

.lobby-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.join-row {
  display: flex;
  gap: 10px;
}

.code-input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 18px;
  text-align: center;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed var(--panel-br);
  font-size: 13px;
}

.stats-row:last-child {
  border: 0;
}

.stats-row b {
  color: var(--gold);
  font-weight: 600;
}

/* ---------- room ---------- */
.room-panel {
  max-width: 760px;
  margin: 0 auto;
}

.room-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--panel-br);
}

.room-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
}

.room-code-box {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.room-code-box b {
  font-size: 24px;
  letter-spacing: 6px;
  color: #fff;
  font-family: ui-monospace, Menlo, monospace;
}

.room-rules {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  text-align: right;
}

.seats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.seat {
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed var(--panel-br);
  background: rgba(0, 0, 0, 0.18);
  text-align: center;
}

.seat.filled {
  border-style: solid;
  border-color: var(--gold-2);
}

.seat-empty {
  color: var(--muted);
  font-size: 13px;
}

.seat-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  word-break: break-all;
}

.seat-tags {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

.tag.ready {
  background: #1c7a4d;
  color: #eafff3;
}

.tag.bot {
  background: #3a5a80;
  color: #e8f2ff;
}

.tag.host {
  background: var(--gold);
  color: #2a1c06;
}

.tag.off {
  background: #8c3b3b;
  color: #ffecec;
}

.room-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- table ---------- */
.table-wrap {
  position: relative;
}

.table {
  position: relative;
  width: 100%;
  min-height: 620px;
  border-radius: 44% / 34%;
  background: radial-gradient(120% 120% at 50% 20%, #17604a, var(--felt) 60%, var(--felt-3));
  border: 10px solid #3a2417;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.45), var(--shadow);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.table-info {
  align-self: center;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.3);
  padding: 5px 14px;
  border-radius: 999px;
}

.table-info b {
  color: var(--gold);
}

/* Seats, centre and the discard rivers live in one grid: nothing is absolutely
   positioned any more, so panels can never land on top of the hand. */
.felt-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(116px, 0.85fr) minmax(0, 3fr) minmax(116px, 0.85fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    '. top .'
    'left center right'
    '. bottom .';
  gap: 10px;
}

.cell {
  min-width: 0;
  min-height: 0;
}

.cell-top {
  grid-area: top;
  justify-self: center;
}

.cell-left {
  grid-area: left;
  align-self: center;
}

.cell-right {
  grid-area: right;
  align-self: center;
}

.cell-bottom {
  grid-area: bottom;
  justify-self: center;
}

.cell-center {
  grid-area: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.player {
  min-width: 120px;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid var(--panel-br);
  font-size: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.player.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(240, 198, 116, 0.28);
}

.player.won {
  border-color: #46d38a;
}

.player .p-name {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.player .p-count {
  color: var(--muted);
}

.player .p-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 6px;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--gold), var(--gold-2));
  color: #2a1c06;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 auto;
}

.clock {
  position: relative;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex: 0 0 auto;
}

.clock .hand {
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--p, 0) * 1%), transparent 0);
}

.clock.urgent .hand {
  background: conic-gradient(#e05b5b calc(var(--p, 0) * 1%), transparent 0);
}

/* ---------- poker card ---------- */
.hand-wrap {
  margin-top: auto;
  padding-top: 10px;
}

/* QQ-斗地主式手牌：牌与牌压叠，只露出左上角点数 */
.hand-area .mj + .mj {
  margin-left: 2px;
}

.hand-area .pc + .pc {
  margin-left: -34px;
}

/* 滑动选牌靠 pointer 拖拽，必须让浏览器别把这套动作当成手势/缩放 */
.hand-area .pc,
.hand-area .mj {
  touch-action: none;
}

.hand-area .pc.sel {
  z-index: 3;
}

.hand-area .draw-gap {
  margin-left: 6px;
}

.voice-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.voice-select {
  padding: 4px 6px;
  font-size: 12px;
  max-width: 168px;
  border-radius: 8px;
  border: 1px solid var(--panel-br);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
}

.counter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}

.cc-row {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.cc {
  min-width: 26px;
  padding: 2px 3px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--panel-br);
  text-align: center;
  line-height: 1.15;
}

.cc .cc-r {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
}

.cc .cc-n {
  display: block;
  font-size: 11px;
  color: #fff;
}

.cc.spent {
  opacity: 0.34;
}

.hand-area {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  padding: 6px 0 2px;
  min-height: 88px;
}

.pc {
  position: relative;
  width: 58px;
  height: 82px;
  border-radius: 7px;
  background: linear-gradient(180deg, #fffef8, #ece6d6);
  border: 1px solid #b9ad93;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 5px;
  font-family: ui-rounded, 'PingFang SC', system-ui, sans-serif;
}

.pc:hover {
  transform: translateY(-3px);
}

.pc.sel {
  transform: translateY(-14px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.45), 0 0 0 2px var(--gold);
}

.pc.red {
  color: var(--red);
}

.pc .r {
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

.pc .s {
  font-size: 15px;
  line-height: 1;
}

.pc .big {
  position: absolute;
  right: 4px;
  bottom: 2px;
  font-size: 22px;
  opacity: 0.22;
}

.pc.joker {
  background: linear-gradient(180deg, #fff8e6, #f2e2bd);
}

.pc.joker .r {
  font-size: 13px;
  writing-mode: vertical-rl;
  letter-spacing: 2px;
  font-weight: 800;
}

.pc.back {
  background: repeating-linear-gradient(45deg, #7b2d2d, #7b2d2d 6px, #943b3b 6px, #943b3b 12px);
  border-color: #5c2020;
  cursor: default;
}

.pc.mini {
  width: 34px;
  height: 48px;
  padding: 2px 3px;
  border-radius: 5px;
  cursor: default;
}

.pc.mini .r {
  font-size: 13px;
}

.pc.mini .s {
  font-size: 11px;
}

.pc.dim {
  opacity: 0.45;
}

.group {
  display: flex;
  gap: 2px;
  padding: 3px 5px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  margin: 2px 0;
}

/* ---------- mahjong tile ---------- */
.mj {
  position: relative;
  width: 40px;
  height: 54px;
  border-radius: 5px;
  background: linear-gradient(180deg, #fdfdf6, #e6e2d2);
  border: 1px solid #a89e85;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35), inset 0 -4px 0 rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.1s ease;
  font-weight: 700;
}

.mj svg {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.mj:hover {
  transform: translateY(-3px);
}

.mj.sel {
  transform: translateY(-13px);
  box-shadow: 0 0 0 2px var(--gold), 0 5px 10px rgba(0, 0, 0, 0.4);
}

.mj.back {
  background: linear-gradient(180deg, #2f7d63, #1c5643);
  border-color: #123b2e;
  cursor: default;
}

.mj.mini {
  width: 26px;
  height: 36px;
  border-radius: 4px;
  cursor: default;
}

.mj.dim {
  opacity: 0.5;
}

.tile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.mj-center {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.rivers {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.river {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  align-content: flex-start;
  padding: 4px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  min-height: 44px;
}

.river .who {
  width: 100%;
  font-size: 10px;
  color: var(--muted);
}

.river.mine {
  outline: 1px solid rgba(240, 198, 116, 0.45);
}

.center-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.last-play {
  display: flex;
  gap: 3px;
  justify-content: center;
  margin-top: 4px;
}

.pass-tag {
  font-size: 12px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 10px;
  border-radius: 999px;
}

/* ---------- action bar ---------- */
.action-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid var(--panel-br);
  border-radius: 14px;
  max-width: 860px;
}

.action-bar .spacer {
  width: 12px;
}

.btn.big {
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
}

.btn.warn {
  background: linear-gradient(180deg, #f2d08a, #d0a54a);
  border-color: #b08b33;
  color: #2a1c06;
  font-weight: 700;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.dingque-choice {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
}

/* ---------- chat / toasts / modal ---------- */
.chat-dock {
  position: fixed;
  left: 16px;
  bottom: 16px;
  right: auto;
  width: 240px;
  z-index: 20;
}

.chat-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--panel-br);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-log {
  max-height: 150px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-log .who {
  color: var(--gold);
}

.chat-row {
  display: flex;
  gap: 6px;
}

.chat-row input {
  flex: 1;
  padding: 7px 9px;
  font-size: 13px;
}

.toasts {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 60;
  pointer-events: none;
}

.toast {
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid var(--panel-br);
  font-size: 13.5px;
  animation: pop 0.2s ease;
  box-shadow: var(--shadow);
}

.toast.err {
  border-color: #b04a4a;
  color: #ffd8d8;
}

.toast.ok {
  border-color: var(--gold);
  color: var(--gold);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: grid;
  place-items: center;
  z-index: 70;
  padding: 20px;
}

.modal {
  width: min(560px, 94vw);
  max-height: 84vh;
  overflow: auto;
  background: linear-gradient(180deg, #14402f, #0c2a20);
  border: 1px solid var(--gold-2);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.modal h2 {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 20px;
  text-align: center;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 16px;
}

.result-table th,
.result-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--panel-br);
  text-align: left;
}

.result-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}

.score-plus {
  color: #5ee39a;
  font-weight: 700;
}

.score-minus {
  color: #ff8f8f;
  font-weight: 700;
}

.fan-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.fan-chip {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(240, 198, 116, 0.16);
  border: 1px solid rgba(240, 198, 116, 0.4);
  color: var(--gold);
}

.conflict {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}

.table-tools {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.draw-gap {
  width: 12px;
  flex: 0 0 auto;
}

#room-code {
  user-select: all;
  cursor: pointer;
}

@media (max-width: 820px) {
  .stage {
    padding: 10px;
  }

  .table {
    min-height: min(620px, calc(100vh - 220px));
    border-radius: 26% / 20%;
    padding: 8px;
    gap: 6px;
  }

  .felt-grid {
    grid-template-columns: minmax(70px, 0.72fr) minmax(0, 2.1fr) minmax(70px, 0.72fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 6px;
  }

  .player {
    min-width: 66px;
    padding: 5px 6px;
    font-size: 11px;
  }

  .player .p-name {
    font-size: 12px;
  }

  .avatar {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  /* 手牌：靠叠放压宽度，不横向滚动 —— 否则滑动选牌会和滚动打架 */
  #hand-area {
    gap: 0;
    flex-wrap: wrap;
    justify-content: center;
    padding-bottom: 4px;
  }

  #hand-area .mj {
    width: 30px;
    height: 41px;
    flex: 0 0 auto;
    touch-action: none;
  }

  #hand-area .mj + .mj {
    margin-left: -7px;
  }

  #hand-area .mj.sel {
    transform: translateY(-10px);
  }

  #hand-area .pc {
    width: 36px;
    height: 52px;
    flex: 0 0 auto;
    touch-action: none;
  }

  #hand-area .pc + .pc {
    margin-left: -20px;
  }

  #hand-area .pc .r {
    font-size: 13px;
  }

  #hand-area .pc .s {
    font-size: 10px;
  }

  #hand-area .pc .big {
    display: none;
  }

  .mj {
    width: 26px;
    height: 36px;
  }

  .rivers {
    gap: 4px;
  }

  .river {
    min-height: 32px;
    padding: 2px;
  }

  .mj.mini {
    width: 20px;
    height: 28px;
  }

  .action-bar {
    padding: 8px;
    gap: 6px;
    border-radius: 12px;
  }

  .btn.big {
    padding: 10px 13px;
    font-size: 14px;
  }

  .chat-dock {
    width: 158px;
    left: 8px;
    bottom: 8px;
  }

  .chat-log {
    max-height: 84px;
  }

  .brand-sub {
    display: none;
  }

  .lobby-side {
    grid-template-columns: 1fr;
  }

  .room-code-box b {
    font-size: 20px;
    letter-spacing: 4px;
  }
}
