/* Game-focused four-seat layout. Original CSS artwork, no external game assets. */
body.playing-mode {
  background: radial-gradient(
    ellipse at 50% 20%,
    #294f59,
    #162c36 65%,
    #101e27
  );
}
.playing-mode .shell {
  max-width: 1540px;
  padding: 0 22px;
}
.playing-mode header {
  height: 66px;
  border-color: #adc6c61a;
}
.playing-mode header .brand {
  font-size: 17px;
}
.playing-mode header .brandmark {
  height: 37px;
  width: 30px;
  font-size: 24px;
}
.playing-mode footer {
  padding: 10px 0;
  color: #96abae;
}
.table-game {
  padding-top: 10px;
}
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 3px 14px;
  gap: 12px;
}
.table-title {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: 2px;
}
.table-mode {
  font-size: 12px;
  margin-left: 12px;
  color: #c4d8d2;
}
.room-number {
  font-size: 11px;
  color: #92b0b0;
  display: block;
  margin-top: 6px;
}
.table-tools {
  display: flex;
  gap: 7px;
}
.tool-button {
  border: 1px solid #b5d9d22b;
  border-radius: 8px;
  padding: 9px 13px;
  background: #102c345c;
  color: #d0e0d9;
  font-size: 12px;
}
.tool-button:hover {
  background: #315b60;
}
.mahjong-board {
  position: relative;
  height: clamp(580px, calc(100dvh - 194px), 830px);
  isolation: isolate;
  border-radius: 40px;
  background: radial-gradient(
    ellipse at 50% 42%,
    #268782,
    #11635f 58%,
    #074c4c
  );
  border: 14px solid #143f48;
  box-shadow:
    inset 0 0 0 2px #54b7a573,
    inset 0 0 45px #062e38b0,
    0 0 0 2px #af925c90,
    0 16px 35px #071b2580;
  overflow: hidden;
}
.mahjong-board:before {
  content: "";
  position: absolute;
  inset: 17px;
  border: 1px solid #97d6c333;
  border-radius: 23px;
  background: repeating-linear-gradient(
    45deg,
    #b9fff503 0 1px,
    transparent 1px 4px
  );
  pointer-events: none;
  z-index: -1;
}
.mahjong-board:after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid #e1bd7140;
  border-radius: 25px;
  pointer-events: none;
  z-index: -1;
}
.felt-decoration {
  position: absolute;
  top: 36%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  font:
    260px KaiTi,
    serif;
  color: #043d4126;
  pointer-events: none;
}
.table-info {
  position: absolute;
  top: 19px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #073f4480;
  padding: 10px 13px;
  border: 1px solid #abd9ce20;
  border-radius: 8px;
  font-size: 12px;
  color: #c3e2d4;
}
.table-info b {
  font-size: 22px;
  color: #f0e3b5;
}
.table-info small {
  display: block;
  border-left: 1px solid #acdace40;
  padding-left: 10px;
  margin-left: 3px;
  font-size: 10px;
}
.wall-icon {
  height: 19px;
  width: 11px;
  background: linear-gradient(#dce4cd 0 15%, #57aa69 15%);
  border-radius: 2px;
  box-shadow: 2px 2px 0 #0a3f32;
}
.player-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 11px;
}
.portrait {
  position: relative;
  width: 58px;
  height: 66px;
  border: 2px solid #acbfb784;
  background: radial-gradient(ellipse at top, #3b6571, #143343);
  border-radius: 11px;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 5px #06383c88;
}
.portrait > span:not(.missing-badge) {
  font:
    32px KaiTi,
    serif;
  color: #f0e7c6;
}
.portrait-1 {
  background: linear-gradient(145deg, #789a73, #315f62);
}
.portrait-2 {
  background: linear-gradient(145deg, #917d68, #414957);
}
.portrait-3 {
  background: linear-gradient(145deg, #588585, #243f60);
}
.is-active .portrait {
  border-color: #f2ce70;
  box-shadow:
    0 0 0 3px #e6b85938,
    0 0 20px #fcd46366;
}
.wind-badge {
  position: absolute;
  bottom: -6px;
  left: -7px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 24px;
  border-radius: 4px;
  background: #ddbd74;
  color: #5a3a12;
  font-size: 14px;
  border: 1px solid #fff0b3;
}
.missing-badge {
  position: absolute;
  right: -13px;
  top: -9px;
  background: #f0d2a0;
  color: #793c28;
  border: 1px solid #c98a52;
  box-shadow: 0 2px 5px #133c33;
  border-radius: 6px;
  padding: 3px 5px;
  font-size: 11px;
  white-space: nowrap;
}
.player-caption {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-width: 135px;
  text-shadow: 0 1px 2px #0a292b;
}
.player-caption strong {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-caption small {
  font-size: 11px;
  color: #c8dcd1;
}
.player-0 {
  left: 22px;
  bottom: 20px;
  flex-direction: column;
  gap: 9px;
  align-items: flex-start;
}
.player-0 .portrait {
  width: 48px;
  height: 53px;
}
.player-0 .player-caption strong {
  font-size: 11px;
}
.player-0 .player-caption {
  gap: 4px;
  max-width: 100px;
}
.player-2 {
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}
.player-1 {
  right: 18px;
  top: 39%;
  flex-direction: column;
  align-items: center;
}
.player-3 {
  left: 18px;
  top: 39%;
  flex-direction: column;
  align-items: center;
}
.player-1 .player-caption,
.player-3 .player-caption {
  text-align: center;
  max-width: 90px;
}
.winner-seal {
  position: absolute;
  right: -12px;
  bottom: -8px;
  color: #fdf2c6;
  background: #a62c27;
  border: 2px solid #e6c27b;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font:
    24px KaiTi,
    serif;
}
.ready-label {
  color: #d0e5c3;
  font-size: 10px;
}
.opponent-hand {
  position: absolute;
  display: flex;
  justify-content: center;
  gap: 2px;
  z-index: 1;
}
.tile-back {
  display: inline-block;
  width: 23px;
  height: 35px;
  border-radius: 3px;
  background: linear-gradient(90deg, #268452, #3dad68 45%, #258650);
  border-top: 5px solid #ede9d3;
  border-bottom: 3px solid #0b5d45;
  box-shadow: 1px 2px 0 #083f3988;
}
.opponent-2 {
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
}
.opponent-1 {
  right: 60px;
  top: 47%;
  transform: translate(50%, -50%) rotate(90deg);
  transform-origin: center;
}
.opponent-3 {
  left: 60px;
  top: 47%;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center;
}
.player-1,
.player-3 {
  top: 29%;
}
.opponent-1 {
  right: 126px;
  top: 48%;
}
.opponent-3 {
  left: 126px;
  top: 48%;
}
.compass-dial {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 133px;
  height: 133px;
  border: 3px solid #8bbda3;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #164d56 0 42%,
    #277c81 44% 64%,
    #103e4b 67%
  );
  box-shadow:
    0 5px 0 #073944,
    0 0 0 4px #073a4177,
    0 8px 15px #083a4480;
  z-index: 2;
}
.compass-wind {
  position: absolute;
  font:
    20px KaiTi,
    serif;
  color: #92b9af;
  text-shadow: 0 1px #183b42;
}
.wind-0 {
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
}
.wind-2 {
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
}
.wind-1 {
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}
.wind-3 {
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}
.compass-wind.lit {
  color: #fff1af;
  text-shadow: 0 0 10px #ffe487;
}
.clock-center {
  position: absolute;
  inset: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.clock-center b {
  font-size: 34px;
  line-height: 1;
  color: #d9ffdc;
  text-shadow: 0 0 12px #48dcc1;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.clock-center small {
  font-size: 9px;
  color: #b5d6c9;
  margin-top: 7px;
  white-space: nowrap;
}
.clock-center b.urgent {
  color: #ffba83;
  text-shadow: 0 0 12px #d6724d;
  animation: clock-pulse 1s infinite;
}
@keyframes clock-pulse {
  50% {
    opacity: 0.55;
  }
}
.discard-zone {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(6, 28px);
  gap: 3px;
  align-content: start;
  justify-content: center;
  z-index: 1;
}
.discard-zone .tile.mini {
  width: 28px;
  height: 37px;
  border-bottom: 4px solid #80a787;
  box-shadow: 0 2px 3px #133f3977;
  padding: 2px;
}
.discard-cell {
  position: relative;
  display: flex;
}
.discard-0 {
  top: 59%;
  left: 50%;
  transform: translateX(-50%);
}
.discard-2 {
  top: 145px;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
}
.discard-1 {
  top: 46%;
  right: 24%;
  transform: translate(50%, -50%) rotate(-90deg);
}
.discard-3 {
  top: 46%;
  left: 24%;
  transform: translate(-50%, -50%) rotate(90deg);
}
.last-discard:after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  left: 50%;
  background: #ffd75e;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 9px #ffc754;
  z-index: 4;
}
.last-discard > .tile {
  outline: 2px solid #f5d779;
}
.table-melds {
  position: absolute;
  display: flex;
  gap: 9px;
  z-index: 2;
}
.table-melds .tile.mini {
  width: 24px;
  height: 34px;
}
.melds-0 {
  left: 145px;
  bottom: 117px;
}
.melds-2 {
  left: 50%;
  top: 78px;
  transform: translateX(-50%) scale(0.8);
}
.melds-1 {
  right: 83px;
  top: 64%;
  transform: translateX(50%) rotate(-90deg);
}
.melds-3 {
  left: 83px;
  top: 64%;
  transform: translateX(-50%) rotate(90deg);
}
.playing-hand {
  position: absolute;
  bottom: 20px;
  left: 130px;
  right: 50px;
  display: flex;
  justify-content: center;
  gap: 3px;
  align-items: flex-end;
  z-index: 5;
  touch-action: none;
  user-select: none;
}
.playing-hand .tile {
  width: clamp(35px, 4.4vw, 66px);
  height: clamp(58px, 6.3vw, 91px);
  padding: 5px 4px;
  border-radius: 7px;
  border: 1px solid #c9d5bd;
  border-bottom: 7px solid #7eae8f;
  box-shadow:
    1px 3px 0 #0b4538c0,
    0 6px 8px #113a3480;
  transition:
    transform 0.12s,
    filter 0.12s,
    box-shadow 0.12s;
  cursor: pointer;
}
.playing-hand .tile.missing {
  background: linear-gradient(#fff9e8, #efe2c5);
  border-top: 3px solid #efca78;
}
.playing-hand .tile.blocked {
  filter: brightness(0.74) saturate(0.7);
  cursor: not-allowed;
}
.playing-hand .tile:hover:not(.blocked) {
  transform: translateY(-7px);
  box-shadow:
    0 0 0 2px #d5d9a766,
    0 4px 8px #102e3066;
}
.playing-hand .tile.selected,
.playing-hand .tile.selected:hover {
  transform: translateY(-17px);
  outline: 2px solid #f2ce77;
  box-shadow: 0 0 13px #ffdc8077;
}
.playing-hand .tile.dragging {
  transform: translateY(-28px);
  outline: 2px solid #f7dd98;
}
.drawn-tile {
  display: inline-flex;
  margin-left: 12px;
}
.hand-caption {
  position: absolute;
  bottom: 126px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: #e1ecd5;
  text-shadow: 0 1px 3px #0b3532;
  white-space: nowrap;
  z-index: 3;
}
.table-actions {
  position: absolute;
  bottom: 156px;
  right: 70px;
  display: flex;
  gap: 15px;
  align-items: center;
  z-index: 6;
}
.play-button {
  background: linear-gradient(#fae6a3, #cc9b4f);
  border: 1px solid #f5db94;
  border-bottom: 4px solid #977139;
  color: #573b19;
  border-radius: 12px;
  min-width: 87px;
  padding: 12px 20px;
  font-weight: 650;
  box-shadow: 0 4px 12px #092e3677;
  font-size: 18px;
}
.play-button small {
  font-size: 10px;
  display: block;
  font-weight: 400;
  margin-top: 3px;
}
.play-button:disabled {
  opacity: 0.4;
}
.pass-button {
  background: linear-gradient(#b9d3cb, #639b95);
  border-color: #a8c6bd;
  border-bottom-color: #35685f;
  color: #123c39;
  min-width: 61px;
  padding: 13px 17px;
}
.call-button {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 28%, #fff4bf, #e4b659 60%, #b7812d);
  border: 2px solid #f6dda2;
  border-bottom: 5px solid #a56e2d;
  color: #fffce9;
  text-shadow: 0 2px 2px #985c20;
  box-shadow:
    0 0 17px #e6bf6955,
    0 5px 12px #15372d88;
}
.call-button b {
  font:
    46px KaiTi,
    serif;
}
.call-button small {
  display: block;
  position: absolute;
  bottom: -19px;
  width: 100%;
  left: 0;
  font-size: 11px;
  text-shadow: 0 1px #244;
}
.hu-button {
  background: radial-gradient(circle at 38% 28%, #ffcb90, #d9743c 60%, #9a351d);
}
.phase-panel {
  position: absolute;
  top: 49%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  padding: 24px 32px;
  min-width: 330px;
  z-index: 4;
  background: linear-gradient(#123f45e8, #092e38ed);
  border: 1px solid #d8c18066;
  border-radius: 20px;
  box-shadow: 0 15px 35px #032d3866;
}
.phase-kicker {
  font-size: 10px;
  letter-spacing: 3px;
  color: #cfba7b;
}
.phase-panel h2 {
  font:
    32px KaiTi,
    serif;
  color: #f8e4ad;
  margin: 13px 0;
}
.phase-panel p {
  font-size: 12px;
  color: #b9d4c8;
  line-height: 1.8;
  margin-bottom: 17px;
}
.phase-panel .primary {
  font-size: 14px;
  padding: 12px 22px;
}
.phase-panel .primary small {
  margin-left: 8px;
  font-weight: 400;
}
.exchange-slots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  margin: 15px 0 20px;
}
.exchange-slots .tile.mini,
.empty-slot {
  width: 37px;
  height: 50px;
}
.empty-slot {
  border: 1px dashed #789c95;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #7b9b8f;
}
.suit-choices {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.suit-choices button {
  background: linear-gradient(#ede7cf, #d3d3b3);
  color: #8f302e;
  border-radius: 10px;
  min-width: 73px;
  border-bottom: 4px solid #749981;
  padding: 12px;
}
.suit-choices button:nth-child(2) {
  color: #295885;
}
.suit-choices button:nth-child(3) {
  color: #256848;
}
.suit-choices b {
  font:
    32px KaiTi,
    serif;
  display: block;
}
.suit-choices small {
  font-size: 10px;
  display: block;
  margin-top: 7px;
  color: #53665b;
}
.phase-wait {
  font-size: 13px;
  color: #a1c9b3;
  padding: 20px;
}
.is-preparing .compass-dial {
  top: 26%;
  width: 95px;
  height: 95px;
}
.is-preparing .clock-center {
  inset: 22px;
}
.is-preparing .clock-center b {
  font-size: 25px;
}
.is-preparing .clock-center small {
  display: none;
}
.is-preparing .compass-wind {
  font-size: 15px;
}
.is-preparing .phase-panel {
  top: 52%;
}
.is-preparing .hand-caption {
  bottom: 127px;
}
.action-callout {
  position: absolute;
  left: 50%;
  top: 37%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 8;
  font:
    70px KaiTi,
    serif;
  color: #ffe7a2;
  text-shadow:
    0 3px #8d5427,
    0 0 25px #ffc24d;
  opacity: 0;
}
.action-callout.show {
  animation: call-out 1.1s both;
}
@keyframes call-out {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.8);
  }
  18%,
  70% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.95);
  }
}
.table-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 5px;
  color: #8faaa8;
  font-size: 11px;
}
.text-button {
  background: none;
  color: #bdd0c2;
  font-size: 12px;
}
.table-log {
  color: #a7c3b7;
  font-size: 12px;
  line-height: 1.8;
  background: #112f32;
  border-radius: 8px;
  max-height: 140px;
  overflow: auto;
}
.table-log:not([open]) {
  display: none;
}
.table-log[open] {
  padding: 13px 18px;
  margin-bottom: 12px;
}
.sound-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 17px 0;
  border-bottom: 1px solid #ffffff16;
  font-size: 15px;
}
.sound-row small {
  display: block;
  font-size: 11px;
  color: #a5bcb0;
}
.sound-row input[type="checkbox"] {
  width: 21px;
  height: 21px;
  accent-color: #d5b26e;
}
.sound-row input[type="range"] {
  width: 160px;
  accent-color: #d5b26e;
}
.audio-state {
  font-size: 12px;
  color: #b8cfbd;
}
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.help-grid div {
  background: #ffffff07;
  border: 1px solid #ffffff15;
  border-radius: 8px;
  padding: 13px;
}
.help-grid b {
  font-size: 14px;
  color: #e2c587;
}
.help-grid p {
  font-size: 12px;
  margin: 7px 0 0;
}
kbd {
  font: 12px monospace;
  border: 1px solid #91a98e50;
  padding: 2px 5px;
  border-radius: 3px;
}
.audio-controls {
  margin-top: 18px;
  display: flex;
  gap: 10px;
}
@media (min-width: 1200px) {
  .playing-hand {
    left: 165px;
    right: 120px;
  }
  .table-actions {
    right: 120px;
  }
  .discard-zone {
    grid-template-columns: repeat(6, 31px);
  }
  .discard-zone .tile.mini {
    width: 31px;
    height: 40px;
  }
}
@media (max-width: 800px) {
  .playing-mode .shell {
    padding: 0 10px;
  }
  .playing-mode header {
    height: 59px;
  }
  .table-toolbar {
    gap: 7px;
    padding: 5px 2px 12px;
  }
  .table-title {
    font-size: 17px;
  }
  .table-mode {
    font-size: 10px;
    margin-left: 6px;
  }
  .room-number {
    font-size: 9px;
  }
  .tool-button {
    font-size: 10px;
    padding: 8px;
  }
  .table-tools {
    gap: 4px;
  }
  .mahjong-board {
    height: clamp(590px, calc(100dvh - 185px), 760px);
    border-width: 8px;
    border-radius: 27px;
  }
  .mahjong-board:before {
    inset: 10px;
    border-radius: 16px;
  }
  .mahjong-board:after {
    inset: 2px;
    border-radius: 18px;
  }
  .portrait {
    width: 38px;
    height: 45px;
    border-radius: 7px;
  }
  .portrait > span:not(.missing-badge) {
    font-size: 23px;
  }
  .missing-badge {
    font-size: 9px;
    padding: 2px 3px;
    right: -9px;
  }
  .wind-badge {
    width: 17px;
    height: 19px;
    font-size: 11px;
    bottom: -4px;
    left: -5px;
  }
  .player-caption strong {
    font-size: 10px;
    max-width: 76px;
  }
  .player-caption small {
    font-size: 9px;
  }
  .player-2 {
    top: 16px;
  }
  .player-0 {
    left: 12px;
    bottom: 86px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .player-0 .portrait {
    width: 32px;
    height: 38px;
  }
  .player-0 .portrait > span:not(.missing-badge) {
    font-size: 20px;
  }
  .player-0 .player-caption {
    max-width: 100px;
  }
  .player-1 {
    right: 9px;
    top: 30%;
    gap: 10px;
  }
  .player-3 {
    left: 9px;
    top: 30%;
    gap: 10px;
  }
  .player-1 .player-caption,
  .player-3 .player-caption {
    max-width: 65px;
  }
  .player-1 .player-caption strong,
  .player-3 .player-caption strong {
    font-size: 9px;
    max-width: 65px;
  }
  .table-info {
    top: 14px;
    left: 13px;
    gap: 5px;
    padding: 7px;
    font-size: 10px;
  }
  .table-info b {
    font-size: 18px;
  }
  .table-info small {
    display: none;
  }
  .wall-icon {
    width: 9px;
    height: 15px;
  }
  .tile-back {
    width: 16px;
    height: 26px;
    border-top-width: 4px;
  }
  .opponent-hand {
    gap: 1px;
  }
  .opponent-2 {
    top: 82px;
  }
  .opponent-1 {
    right: 29px;
    top: 57%;
  }
  .opponent-3 {
    left: 29px;
    top: 57%;
  }
  .compass-dial {
    width: 97px;
    height: 97px;
    top: 44%;
  }
  .compass-wind {
    font-size: 16px;
  }
  .clock-center {
    inset: 23px;
  }
  .clock-center b {
    font-size: 26px;
  }
  .clock-center small {
    font-size: 7px;
    margin-top: 5px;
  }
  .discard-zone {
    grid-template-columns: repeat(6, 20px);
    gap: 2px;
  }
  .discard-zone .tile.mini {
    width: 20px;
    height: 28px;
    padding: 1px;
    border-bottom-width: 3px;
  }
  .discard-2 {
    top: 125px;
  }
  .discard-0 {
    top: 57%;
  }
  .discard-1 {
    right: 23%;
    top: 43%;
  }
  .discard-3 {
    left: 23%;
    top: 43%;
  }
  .playing-hand {
    bottom: 18px;
    left: 8px;
    right: 8px;
    gap: 2px;
  }
  .playing-hand .tile {
    width: calc((100vw - 82px) / 14);
    max-width: 48px;
    height: clamp(44px, 8.8vw, 69px);
    border-radius: 4px;
    border-bottom-width: 5px;
    padding: 2px 1px;
  }
  .drawn-tile {
    margin-left: 6px;
  }
  .playing-hand .tile.selected,
  .playing-hand .tile.selected:hover {
    transform: translateY(-13px);
  }
  .hand-caption {
    bottom: 140px;
    font-size: 10px;
    max-width: 95%;
    white-space: normal;
    text-align: center;
    width: 95%;
  }
  .table-actions {
    bottom: 88px;
    right: 13px;
    gap: 9px;
  }
  .play-button {
    font-size: 15px;
    min-width: 68px;
    padding: 8px 13px;
    border-radius: 8px;
  }
  .play-button small {
    font-size: 8px;
  }
  .call-button {
    width: 57px;
    height: 57px;
    border-bottom-width: 4px;
  }
  .call-button b {
    font-size: 35px;
  }
  .call-button small {
    font-size: 9px;
    bottom: -16px;
  }
  .pass-button {
    min-width: 45px;
    padding: 10px;
  }
  .table-melds .tile.mini {
    width: 17px;
    height: 25px;
  }
  .melds-0 {
    left: 125px;
    bottom: 155px;
    gap: 5px;
  }
  .melds-2 {
    top: 64px;
  }
  .melds-1 {
    right: 50px;
    top: 66%;
  }
  .melds-3 {
    left: 50px;
    top: 66%;
  }
  .table-bottom {
    font-size: 10px;
    gap: 8px;
    line-height: 1.6;
  }
  .interaction-tip {
    max-width: 77%;
  }
  .phase-panel {
    min-width: 0;
    width: 265px;
    padding: 18px;
  }
  .phase-panel h2 {
    font-size: 26px;
    margin: 10px;
  }
  .phase-panel p {
    font-size: 11px;
    margin: 10px 0 13px;
  }
  .suit-choices {
    gap: 8px;
  }
  .suit-choices button {
    min-width: 64px;
    padding: 10px;
  }
  .is-preparing .compass-dial {
    top: 25%;
    width: 84px;
    height: 84px;
  }
  .is-preparing .phase-panel {
    top: 51%;
  }
  .is-preparing .hand-caption {
    bottom: 142px;
  }
  .exchange-slots {
    margin: 12px 0 16px;
  }
  .phase-panel .primary {
    padding: 10px 18px;
    font-size: 13px;
  }
  .player-card .ready-label {
    display: none;
  }
  .felt-decoration {
    font-size: 180px;
  }
  .action-callout {
    font-size: 55px;
  }
  .table-toolbar .room-number {
    max-width: 160px;
  }
}
@media (max-width: 460px) {
  .playing-mode .brand small {
    display: none;
  }
  .playing-mode .brand {
    letter-spacing: 1px;
  }
  .playing-mode .account {
    gap: 6px;
  }
  .playing-mode .account #points {
    font-size: 10px;
  }
  .table-toolbar {
    align-items: flex-start;
  }
  .table-toolbar .table-mode {
    display: block;
    margin: 4px 0 0;
    font-size: 9px;
  }
  .table-tools {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 4px;
  }
  .tool-button {
    padding: 6px 8px;
    font-size: 10px;
  }
  .mahjong-board {
    height: 610px;
  }
  .portrait {
    width: 33px;
    height: 40px;
  }
  .player-caption strong {
    max-width: 65px;
  }
  .player-1,
  .player-3 {
    top: 29%;
  }
  .opponent-1 {
    right: 19px;
    top: 57%;
  }
  .opponent-3 {
    left: 19px;
    top: 57%;
  }
  .discard-zone {
    grid-template-columns: repeat(6, 16px);
    gap: 1px;
  }
  .discard-zone .tile.mini {
    width: 16px;
    height: 23px;
    border-bottom-width: 3px;
    padding: 0;
  }
  .discard-2 {
    top: 124px;
  }
  .discard-0 {
    top: 55%;
  }
  .discard-1 {
    right: 18%;
    top: 42%;
  }
  .discard-3 {
    left: 18%;
    top: 42%;
  }
  .compass-dial {
    width: 82px;
    height: 82px;
    top: 42%;
  }
  .compass-wind {
    font-size: 13px;
  }
  .clock-center {
    inset: 19px;
  }
  .clock-center b {
    font-size: 23px;
  }
  .clock-center small {
    font-size: 6px;
  }
  .wind-0 {
    bottom: 4px;
  }
  .wind-2 {
    top: 4px;
  }
  .wind-1 {
    right: 4px;
  }
  .wind-3 {
    left: 4px;
  }
  .table-info {
    top: 12px;
    left: 9px;
    padding: 6px;
    font-size: 9px;
  }
  .table-info b {
    font-size: 16px;
  }
  .player-2 {
    left: 61%;
    top: 16px;
  }
  .opponent-2 {
    top: 80px;
  }
  .playing-hand .tile {
    height: 46px;
    width: calc((100vw - 78px) / 14);
    padding: 1px 0;
    border-bottom-width: 4px;
  }
  .playing-hand {
    left: 5px;
    right: 5px;
    gap: 1px;
  }
  .drawn-tile {
    margin-left: 5px;
  }
  .player-0 {
    bottom: 92px;
    left: 10px;
  }
  .player-0 .player-caption strong {
    max-width: 90px;
  }
  .table-actions {
    bottom: 94px;
    right: 9px;
    gap: 7px;
  }
  .hand-caption {
    bottom: 163px;
    font-size: 9px;
  }
  .is-preparing .hand-caption {
    bottom: 150px;
  }
  .melds-0 {
    bottom: 192px;
    left: 50%;
    transform: translateX(-50%);
  }
  .phase-panel {
    width: 248px;
  }
  .is-preparing .phase-panel {
    top: 51%;
  }
  .is-preparing .compass-dial {
    top: 25%;
  }
  .help-grid {
    grid-template-columns: 1fr;
  }
  .sound-row input[type="range"] {
    width: 125px;
  }
  .table-log {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .playing-hand .tile {
    transition: none;
  }
  .clock-center b.urgent {
    animation: none;
  }
  .action-callout.show {
    animation: none;
    opacity: 1;
  }
}
