.picture-scene {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  background:
    radial-gradient(circle at top, rgba(116, 58, 41, 0.28), transparent 20%),
    linear-gradient(180deg, #3f2119 0%, #27140f 100%);
}

.picture-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 100vh;
  min-height: 100dvh;
}

.picture-scene .table-stage {
  position: relative;
  display: grid;
  place-items: center;
  align-content: stretch;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.picture-scene .table-desk {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.34);
}

.picture-scene .table-felt {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-height: 100vh;
  min-height: 100dvh;
  aspect-ratio: auto;
  margin-top: 0;
  border-radius: 0;
  overflow: hidden;
  justify-self: stretch;
  align-self: stretch;
}

.table-surface {
  position: absolute;
  inset: 18px;
  border-radius: 20px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.04), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.04) 52%, rgba(0, 0, 0, 0.08));
}

.table-surface::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(0, 0, 0, 0.06));
}

.inner-outline {
  position: absolute;
  pointer-events: none;
}

.inner-outline.outer {
  inset: 22px;
  border-radius: 20px;
  border: 1px solid rgba(24, 63, 35, 0.82);
  box-shadow:
    inset 0 0 0 2px rgba(177, 112, 69, 0.3),
    inset 0 0 0 6px rgba(8, 36, 18, 0.18);
}

.inner-outline.mid {
  inset: 74px 92px 122px;
  border-radius: 20px;
  border: 2px solid rgba(180, 224, 187, 0.12);
}

.inner-outline.diamond {
  left: 50%;
  top: 50%;
  width: 280px;
  height: 280px;
  border: 2px solid rgba(143, 199, 155, 0.08);
  transform: translate(-50%, -50%) rotate(45deg);
}

.top-left-tools {
  position: absolute;
  top: 40px;
  left: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 5;
}

.menu-trigger-wrap {
  position: relative;
}

.menu-trigger {
  transition: transform 120ms ease-out, box-shadow 120ms ease-out;
}

.menu-trigger.is-feedback {
  transform: scale(0.92);
}

.menu-trigger-icon {
  left: 40px;
  display: inline-block;
  transform-origin: center;
}

.menu-trigger.is-feedback .menu-trigger-icon {
  animation: menu-toggle-spin 170ms cubic-bezier(0.2, 0.75, 0.35, 1) 1;
}

.metal-circle {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: #d7f0ff;
  font-size: 26px;
  background:
    linear-gradient(180deg, rgba(156, 171, 191, 0.82), rgba(79, 94, 114, 0.86)),
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.28), transparent 42%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 16px rgba(0, 0, 0, 0.22);
}

.menu-popover {
  position: absolute;
  top: -4px;
  left: 58px;
  min-width: 128px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(18, 20, 27, 0.94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  transform-origin: left top;
}

.menu-pop-enter-active,
.menu-pop-leave-active {
  transition: transform 170ms cubic-bezier(0.2, 0.78, 0.3, 1), opacity 170ms ease-out;
}

.menu-pop-enter-from,
.menu-pop-leave-to {
  opacity: 0;
  transform: scale(0.92);
}

.menu-pop-enter-to,
.menu-pop-leave-from {
  opacity: 1;
  transform: scale(1);
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.menu-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: #eaf3ff;
  background: transparent;
  text-align: left;
  padding: 0 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transform: translateX(0);
  transition: background-color 130ms ease-out, transform 130ms ease-out;
}

.menu-item-icon {
  width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  flex: 0 0 18px;
}

.menu-item-icon img {
  width: 16px;
  height: 16px;
  display: block;
  filter: brightness(0) invert(1);
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

.menu-item:active {
  transform: scale(0.96);
}

.menu-item-danger {
  color: #ffd0d0;
}

.menu-item-delay-1,
.menu-item-delay-2 {
  opacity: 0;
  transform: translateY(6px);
  animation: menu-item-reveal 180ms ease-out forwards;
}

.menu-item-delay-1 {
  animation-delay: 60ms;
}

.menu-item-delay-2 {
  animation-delay: 120ms;
}

.left-counter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  color: #fff4cf;
  background: rgba(13, 15, 20, 0.78);
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(132, 235, 166, 0.3);
  color: #d4ffe0;
  font-size: 12px;
  background: rgba(23, 109, 52, 0.42);
}

@keyframes menu-toggle-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(90deg);
  }
}

@keyframes menu-item-reveal {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.counter-light {
  width: 16px;
  height: 24px;
  border-radius: 3px;
  background: linear-gradient(180deg, #54e061 0%, #179928 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 0 8px rgba(84, 224, 97, 0.35);
}

.top-right-clock {
  position: absolute;
  top: 40px;
  right: 40px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 10px;
  color: #f1f6ff;
  background: rgba(14, 16, 22, 0.46);
  z-index: 5;
}

.room-status-panel {
  position: absolute;
  top: 92px;
  right: 40px;
  width: min(320px, calc(100% - 80px));
  padding: 12px;
  border: 1px solid rgba(255, 226, 175, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(45, 24, 18, 0.82), rgba(26, 14, 11, 0.88)),
    radial-gradient(circle at top, rgba(255, 219, 154, 0.05), transparent 44%);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
  z-index: 5;
}

.room-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.room-status-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.room-status-item span {
  display: block;
  font-size: 11px;
  color: rgba(244, 233, 208, 0.62);
}

.room-status-item strong {
  display: block;
  margin-top: 6px;
  color: #fff0c2;
  font-size: 15px;
  word-break: break-word;
}

.room-status-error {
  margin-top: 10px;
  color: #ffc1c1;
  font-size: 13px;
}

.action-countdown {
  position: absolute;
  top: 210px;
  right: 40px;
  min-width: 188px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 219, 131, 0.22);
  border-radius: 12px;
  color: #fff5d5;
  background: rgba(21, 17, 14, 0.82);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  z-index: 5;
}

.action-countdown.is-self {
  border-color: rgba(107, 237, 174, 0.36);
  color: #e8fff3;
}

.action-countdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
}

.action-countdown-head strong {
  font-size: 20px;
  line-height: 1;
}

.action-countdown-track {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 6px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.action-countdown-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd569 0%, #ff8e3c 100%);
  transition: width 0.9s linear;
}

.action-countdown.is-self .action-countdown-fill {
  background: linear-gradient(90deg, #75f0aa 0%, #22b573 100%);
}

.signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.scene-watermark {
  position: absolute;
  left: 50%;
  bottom: 38%;
  transform: translateX(-50%);
  text-align: center;
  color: rgba(7, 42, 19, 0.18);
  pointer-events: none;
}

.scene-watermark strong {
  display: block;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
  font-weight: 800;
}

.scene-watermark span,
.scene-watermark small {
  display: block;
  margin-top: 6px;
  color: rgba(7, 42, 19, 0.24);
}

/* Chengdu 游戏页玩家卡：由 room.css 独立控制，避免受 global.css 同名类影响 */
.picture-scene .player-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 154px;
  padding: 9px 12px;
  border-radius: 16px;
  border: 1px solid rgba(248, 226, 173, 0.24);
  background:
    linear-gradient(180deg, rgba(43, 52, 73, 0.84), rgba(17, 22, 34, 0.82)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 40%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.24);
}

.picture-scene .avatar-panel {
  position: relative;
  flex: 0 0 auto;
}

.picture-scene .player-badge.seat-top {
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.picture-scene .player-badge.seat-right {
  right: -20px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
}

.picture-scene .player-badge.seat-bottom {
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.picture-scene .player-badge.seat-left {
  left: -20px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
}

.picture-scene .player-badge.is-turn {
  border-color: rgba(244, 222, 163, 0.72);
}

.picture-scene .player-badge.offline {
  opacity: 0.55;
}

.picture-scene .avatar-card {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(255, 248, 215, 0.32);
  background:
    linear-gradient(145deg, #b3e79c, #4eaf4a 46%, #2f7e28 100%);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.18),
    0 6px 14px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.picture-scene .avatar-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.picture-scene .player-badge.seat-right .avatar-card img,
.picture-scene .player-badge.seat-left .avatar-card img {
  transform: rotate(-90deg);
}

.picture-scene .player-meta p {
  font-size: 14px;
  font-weight: 700;
  color: #eef5ff;
}

.picture-scene .player-meta .ready-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  color: #f7f2dd;
  font-size: 10px;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(214, 173, 58, 0.82), rgba(125, 91, 20, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 2px 6px rgba(0, 0, 0, 0.2);
}

.picture-scene .player-meta .trustee-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  color: #eaffef;
  font-size: 10px;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(57, 182, 110, 0.86), rgba(19, 105, 61, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.18);
}

.picture-scene .player-badge.seat-right .player-meta,
.picture-scene .player-badge.seat-left .player-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  transform: rotate(-90deg);
}

.picture-scene .player-badge.seat-right .player-meta p,
.picture-scene .player-badge.seat-left .player-meta p {
  line-height: 1;
  letter-spacing: 1px;
  white-space: nowrap;
}

.picture-scene .dealer-mark,
.picture-scene .missing-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 12px;
}

.picture-scene .dealer-mark {
  position: absolute;
  right: -8px;
  bottom: -6px;
  background: linear-gradient(180deg, #ffe38a 0%, #f1b92e 100%);
  color: #5f3200;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
}

.picture-scene .player-badge.seat-right .dealer-mark {
  transform: rotate(-90deg);
}

.picture-scene .missing-mark {
  margin-left: auto;
  width: 42px;
  height: 42px;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(114, 219, 149, 0.2) 0%, rgba(21, 148, 88, 0.34) 100%);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.16);
}

.picture-scene .missing-mark img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.picture-scene .player-badge.seat-right .missing-mark {
  transform: rotate(-90deg);
}

.picture-scene .player-badge.seat-left .missing-mark {
  transform: rotate(-90deg);
}

.picture-scene .missing-mark span {
  color: #effff5;
}

.wall {
  position: absolute;
  display: flex;
  gap: 2px;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.2));
}

.wall img {
  display: block;
  object-fit: contain;
}

.wall-live .wall-live-tile {
  display: block;
  object-fit: contain;
}

.wall-top,
.wall-bottom {
  left: 50%;
  transform: translateX(-50%);
}

.wall-left,
.wall-right {
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
}

.wall-top {
  top: -100px;
}

.wall-top img,
.wall-bottom img {
  width: 24px;
  height: 36px;
}

.wall-right {
  right: 140px;
  gap: 0;
}

.wall-left {
  left: 140px;
}

.wall-left img,
.wall-right img {
  width: 36px;
  height: 24px;
}

.wall-left img + img,
.wall-right img + img {
  margin-top: -15px;
}

.wall-top img + img,
.wall-bottom img + img {
  margin-left: -4px;
}

.wall-bottom {
  bottom: 108px;
}

.wall-top.wall-live .wall-live-tile,
.wall-bottom.wall-live .wall-live-tile {
  width: 36px;
  height: 54px;
}

.wall-left.wall-live .wall-live-tile {
  width: 60px;
  height: 40px;
}

.wall-right.wall-live .wall-live-tile {
  width: 60px;
  height: 40px;
}

.wall-top.wall-live .wall-live-tile + .wall-live-tile,
.wall-bottom.wall-live .wall-live-tile + .wall-live-tile {
  margin-left: -4px;
}

.wall-left.wall-live .wall-live-tile + .wall-live-tile,
.wall-right.wall-live .wall-live-tile + .wall-live-tile {
  margin-top: -22px;
}

.wall-left.wall-live .wall-live-tile + .wall-live-tile{
  margin-top: -24px;
}

.wall-live .wall-live-tile.is-group-start {
  margin-left: 10px;
}

.wall-left.wall-live .wall-live-tile.is-group-start,
.wall-right.wall-live .wall-live-tile.is-group-start {
  margin-left: 0;
  margin-top: 8px;
}

.wall-bottom.wall-live {
  --wall-bottom-live-scale: 1;
  --wall-bottom-live-width: calc(60px * var(--wall-bottom-live-scale));
  --wall-bottom-live-height: calc(86px * var(--wall-bottom-live-scale));
  gap: 0;
}

.wall-bottom.wall-live .wall-live-tile {
  width: var(--wall-bottom-live-width);
  height: var(--wall-bottom-live-height);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
}

.wall-live-tile-button {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  cursor: pointer;
  transform: translateY(0);
  transition: transform 150ms cubic-bezier(0.22, 0.82, 0.32, 1), filter 150ms ease-out;
}

.wall-live-tile-lack-tag {
  position: absolute;
  top: 21px;
  left: 5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 6px;
  color: #fff8e8;
  font-size: 10px;
  line-height: 16px;
  font-weight: 800;
  background: linear-gradient(180deg, rgba(200, 56, 41, 0.95), rgba(137, 25, 14, 0.96));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  z-index: 2;
  pointer-events: none;
}

.wall-live-tile-button:disabled {
  cursor: default;
  opacity: 1;
}

.wall-live-tile-button:not(:disabled):hover {
  transform: translateY(-4px);
}

.wall-live-tile-button.is-selected {
  transform: translateY(-18px);
  z-index: 3;
}

.wall-live-tile-button.is-selected .wall-live-tile {
  filter:
    drop-shadow(0 14px 18px rgba(0, 0, 0, 0.24))
    drop-shadow(0 0 10px rgba(255, 214, 111, 0.42));
}

.wall-live-tile-button:disabled .wall-live-tile {
  opacity: 1;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
}

.wall-bottom.wall-live .wall-live-tile-button + .wall-live-tile-button,
.wall-bottom.wall-live .wall-live-tile-button + .wall-live-tile,
.wall-bottom.wall-live .wall-live-tile + .wall-live-tile-button {
  margin-left: -4px;
}

.wall-bottom.wall-live .wall-live-tile + .wall-live-tile {
  margin-left: -4px;
}

.wall-bottom.wall-live .wall-live-tile.is-group-start,
.wall-bottom.wall-live .wall-live-tile-button.is-group-start {
  margin-left: 12px;
}

.wall-hu-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  margin-left: 8px;
  padding: 0 7px;
  border-radius: 999px;
  color: #fff3da;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(180deg, rgba(219, 81, 56, 0.92), rgba(146, 32, 20, 0.96));
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}

/* 提高特异性，保证本页使用 room.css 配置值 */
.picture-scene .wall-top {
  top: 120px;
}

.picture-scene .wall-right {
  right: 110px;
}

.picture-scene .wall-bottom {
  bottom: 124px;
}

.picture-scene .wall-left {
  left: 110px;
}

.desk-zone {
  position: absolute;
  display: flex;
  gap: 0;
  max-width: 280px;
  max-height: 220px;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2));
}

.desk-zone-top,
.desk-zone-bottom {
  left: 50%;
  transform: translateX(-50%);
}

.desk-zone-top {
  top: 208px;
}

.desk-zone-bottom {
  bottom: 220px;
}

.desk-zone-left,
.desk-zone-right {
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
}

.desk-zone-left {
  left: 240px;
}

.desk-zone-right {
  right: 240px;
}

.desk-tile {
  display: block;
  object-fit: contain;
}

.desk-zone-top .desk-tile,
.desk-zone-bottom .desk-tile {
  width: 30px;
  height: 44px;
}

.desk-zone-left .desk-tile,
.desk-zone-right .desk-tile {
  width: 44px;
  height: 30px;
}

.desk-zone-top .desk-tile + .desk-tile {
  margin-left: -0px;
}

.desk-zone-bottom .desk-tile + .desk-tile {
  margin-left: -2px;
}

.desk-zone-left .desk-tile + .desk-tile,
.desk-zone-right .desk-tile + .desk-tile {
  margin-top: -14px;
}

.desk-zone-top .desk-tile.is-group-start,
.desk-zone-bottom .desk-tile.is-group-start {
  margin-left: 6px;
}

.desk-zone-bottom .desk-tile.is-group-start {
  margin-left: 13px;
}

.desk-zone-left .desk-tile.is-group-start,
.desk-zone-right .desk-tile.is-group-start {
  margin-top: 7px;
}

.desk-tile.is-covered {
  opacity: 0.95;
}

.desk-hu-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  color: #fff3da;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(180deg, rgba(219, 81, 56, 0.92), rgba(146, 32, 20, 0.96));
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}

.desk-zone-left .desk-hu-flag,
.desk-zone-right .desk-hu-flag {
  margin-top: 6px;
  margin-left: 0;
}

.center-wind-square {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
}

.ready-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 138px;
  height: 44px;
  padding: 0 16px 0 14px;
  border: 1px solid rgba(220, 191, 118, 0.24);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(14, 55, 40, 0.92), rgba(8, 36, 27, 0.96)),
    radial-gradient(circle at 20% 24%, rgba(237, 214, 157, 0.08), transparent 34%);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 214, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 8px 18px rgba(0, 0, 0, 0.2);
  z-index: 4;
  animation: ready-toggle-pop 180ms ease-out;
}

.ready-toggle-inline {
  position: static;
}

.ready-toggle-label {
  color: #e5c472;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow:
    -1px 0 rgba(0, 0, 0, 0.38),
    0 1px rgba(0, 0, 0, 0.38),
    1px 0 rgba(0, 0, 0, 0.38),
    0 -1px rgba(0, 0, 0, 0.38);
}

.ready-toggle:active {
  transform: translateY(1px) scale(0.96);
}

.ready-toggle:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 214, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 4px 10px rgba(0, 0, 0, 0.14);
}

@keyframes ready-toggle-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.center-desk {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: repeat(2, 46px);
  grid-template-areas:
    'north west'
    'count count'
    'south east';
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 2px solid rgba(69, 55, 38, 0.72);
  background:
    linear-gradient(135deg, rgba(107, 51, 41, 0.94), rgba(33, 35, 32, 0.96) 50%, rgba(26, 69, 36, 0.92)),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.06), transparent 52%);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.center-desk strong {
  grid-area: count;
  text-align: center;
  font-size: 32px;
  color: #3ec37f;
  letter-spacing: 3px;
}

.wind {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.68);
  font-weight: 700;
}

.wind.north {
  grid-area: north;
}

.wind.west {
  grid-area: west;
}

.wind.south {
  grid-area: south;
}

.wind.east {
  grid-area: east;
}

.floating-status {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffcf4d;
  font-size: clamp(24px, 2.6vw, 42px);
  font-weight: 800;
  text-shadow:
    0 0 12px rgba(255, 195, 0, 0.32),
    0 3px 0 rgba(130, 74, 0, 0.4);
  pointer-events: none;
}

.floating-status img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2));
}

.floating-status.top {
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
}

.floating-status.left {
  left: 24%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.floating-status.right {
  right: 24%;
  top: 50%;
  transform: translate(50%, -50%);
}

.claim-banner {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  min-width: 380px;
  padding: 14px 20px;
  border-radius: 10px;
  text-align: center;
  color: #eef7ef;
  background: rgba(13, 31, 17, 0.24);
}

.claim-banner span {
  display: block;
  font-size: 14px;
  opacity: 0.8;
}

.claim-banner strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
}

.waiting-owner-tip {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(220, 191, 118, 0.2);
  border-radius: 999px;
  color: #f2d68f;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow:
    -1px 0 rgba(0, 0, 0, 0.38),
    0 1px rgba(0, 0, 0, 0.38),
    1px 0 rgba(0, 0, 0, 0.38),
    0 -1px rgba(0, 0, 0, 0.38);
  background:
    linear-gradient(180deg, rgba(14, 55, 40, 0.78), rgba(8, 36, 27, 0.82)),
    radial-gradient(circle at 20% 24%, rgba(237, 214, 157, 0.08), transparent 34%);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 214, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.16);
  z-index: 4;
  pointer-events: none;
}

.bottom-control-panel {
  position: absolute;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  width: min(100% - 120px, 1180px);
  padding: 8px 14px 12px;
}

.bottom-action-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  min-height: 56px;
  margin-bottom: 10px;
}

.discard-confirm-button {
  min-width: 168px;
  background:
    linear-gradient(180deg, rgba(110, 32, 20, 0.94), rgba(72, 16, 9, 0.98)),
    radial-gradient(circle at 20% 24%, rgba(255, 214, 153, 0.14), transparent 34%);
  border-color: rgba(255, 184, 112, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 205, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    0 12px 22px rgba(0, 0, 0, 0.26);
}

.hand-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: min(760px, calc(100vw - 120px));
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(14, 25, 22, 0.72);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.hand-action-tile {
  min-width: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(244, 228, 194, 0.98), rgba(214, 190, 145, 0.96));
  color: #2e1e14;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 6px 14px rgba(0, 0, 0, 0.18);
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, opacity 120ms ease-out;
}

.hand-action-tile:active:not(:disabled) {
  transform: translateY(1px);
}

.hand-action-tile:disabled {
  opacity: 0.55;
}

.ding-que-bar {
  position: absolute;
  right: 150px;
  top: -90px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ding-que-button {
  min-width: 64px;
  height: 46px;
  border: 1px solid rgba(220, 191, 118, 0.24);
  border-radius: 999px;
  color: #e5c472;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background:
    linear-gradient(180deg, rgba(14, 55, 40, 0.92), rgba(8, 36, 27, 0.96)),
    radial-gradient(circle at 20% 24%, rgba(237, 214, 157, 0.08), transparent 34%);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 214, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 8px 18px rgba(0, 0, 0, 0.2);
  text-shadow:
    -1px 0 rgba(0, 0, 0, 0.38),
    0 1px rgba(0, 0, 0, 0.38),
    1px 0 rgba(0, 0, 0, 0.38),
    0 -1px rgba(0, 0, 0, 0.38);
  cursor: pointer;
}

.ding-que-button:active {
  transform: translateY(1px) scale(0.96);
}

.ding-que-button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.control-copy {
  margin-bottom: 10px;
  text-align: center;
  color: rgba(239, 247, 237, 0.84);
}

.control-copy p {
  font-size: 14px;
  font-weight: 700;
}

.control-copy small {
  font-size: 12px;
}

.action-orbs {
  position: absolute;
  right: 38px;
  top: -66px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.orb-button {
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 50%;
  font-size: 26px;
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    inset 0 3px 8px rgba(255, 255, 255, 0.18),
    0 10px 20px rgba(0, 0, 0, 0.22);
}

.orb-button.theme-gold {
  color: #8a4e00;
  background: radial-gradient(circle at 35% 28%, #fff7bf 0%, #ffd85d 42%, #d89a19 100%);
}

.orb-button.theme-jade {
  color: #efffff;
  background: radial-gradient(circle at 35% 28%, #c4fff2 0%, #3ad8b4 42%, #00876e 100%);
}

.orb-button.theme-blue {
  color: #effff2;
  background: radial-gradient(circle at 35% 28%, #bff2c8 0%, #6bc77c 42%, #2e7a43 100%);
}

.orb-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.player-hand {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.player-hand-group {
  display: flex;
  align-items: flex-end;
  gap: 0;
  flex-shrink: 0;
}

.tile-chip {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 74px;
  height: 104px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: transform 120ms ease-out;
}

.tile-chip-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
}

.tile-chip.selected {
  transform: translateY(-18px);
}

.empty-hand {
  text-align: center;
  color: rgba(237, 244, 253, 0.82);
  font-size: 13px;
}

.table-side-buttons {
  position: absolute;
  right: 18px;
  top: 42%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-round {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  color: #edf8ef;
  font-size: 22px;
  font-weight: 700;
  background:
    linear-gradient(180deg, rgba(126, 140, 122, 0.82), rgba(59, 72, 57, 0.86)),
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.22), transparent 40%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 14px rgba(0, 0, 0, 0.22);
}

.side-round.gold {
  color: #7a4600;
  background: radial-gradient(circle at 35% 28%, #fff6c2 0%, #ffe16c 42%, #e3aa23 100%);
}

@media (max-width: 980px) {
  .picture-scene {
    padding: 0;
  }

  .wall-right {
    right: 88px;
  }

  .wall-left {
    left: 88px;
  }

  .desk-zone-top {
    top: 196px;
  }

  .desk-zone-bottom {
    bottom: 208px;
  }

  .desk-zone-left {
    left: 186px;
  }

  .desk-zone-right {
    right: 186px;
  }

  .inner-outline.mid {
    inset: 70px 72px 120px;
  }

  .tile-chip {
    min-width: 60px;
    height: 88px;
    font-size: 24px;
  }

  .action-orbs {
    right: 18px;
    top: -54px;
  }

  .orb-button {
    width: 62px;
    height: 62px;
    font-size: 22px;
  }

  .action-countdown {
    top: 82px;
    right: 20px;
    min-width: 164px;
  }

  .room-status-panel {
    top: 92px;
    right: 20px;
    width: min(300px, calc(100% - 40px));
  }
}

@media (max-width: 640px) {
  .inner-outline.mid {
    inset: 92px 34px 190px;
  }

  .inner-outline.diamond {
    width: 180px;
    height: 180px;
  }

  .wall-top,
  .wall-bottom {
    display: none;
  }

  .desk-zone-top,
  .desk-zone-bottom {
    display: none;
  }

  .wall-left {
    left: 32px;
  }

  .wall-right {
    right: 32px;
  }

  .desk-zone-left {
    left: 84px;
  }

  .desk-zone-right {
    right: 84px;
  }

  .floating-status.left,
  .floating-status.right {
    display: none;
  }

  .claim-banner {
    min-width: 0;
    width: calc(100% - 40px);
  }

  .waiting-owner-tip {
    top: 23%;
    min-width: 0;
    width: calc(100% - 60px);
    font-size: 16px;
  }

  .top-right-clock {
    top: 16px;
    right: 16px;
    gap: 8px;
    padding: 7px 10px;
  }

  .room-status-panel {
    top: 58px;
    right: 16px;
    width: calc(100% - 32px);
    padding: 10px;
  }

  .room-status-grid {
    gap: 8px;
  }

  .room-status-item {
    padding: 8px 10px;
  }

  .action-countdown {
    top: 176px;
    right: 16px;
    min-width: 0;
    width: calc(100% - 32px);
    padding: 8px 10px;
  }

  .bottom-control-panel {
    width: calc(100% - 20px);
  }

  .bottom-action-bar {
    justify-content: center;
  }

  .action-orbs {
    position: static;
    justify-content: center;
    margin-bottom: 10px;
  }

  .tile-chip {
    min-width: 42px;
    height: 64px;
    font-size: 16px;
  }

  .table-side-buttons {
    right: 10px;
    gap: 8px;
  }

  .side-round {
    width: 46px;
    height: 46px;
    font-size: 18px;
  }
}

/* ── Settlement Overlay ── */
.settlement-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  animation: settlement-fade-in 300ms ease-out;
}

@keyframes settlement-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.settlement-panel {
  width: 380px;
  max-width: 90vw;
  padding: 28px 24px 20px;
  border: 1px solid rgba(220, 191, 118, 0.3);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(14, 55, 40, 0.96), rgba(8, 36, 27, 0.98)),
    radial-gradient(circle at 20% 24%, rgba(237, 214, 157, 0.06), transparent 34%);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 214, 0.08),
    0 24px 48px rgba(0, 0, 0, 0.4);
  animation: settlement-panel-pop 300ms ease-out;
}

@keyframes settlement-panel-pop {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.settlement-title {
  margin: 0 0 4px;
  color: #e5c472;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 1px;
  text-shadow:
    -1px 0 rgba(0, 0, 0, 0.38),
    0 1px rgba(0, 0, 0, 0.38),
    1px 0 rgba(0, 0, 0, 0.38),
    0 -1px rgba(0, 0, 0, 0.38);
}

.settlement-round-info {
  margin: 0 0 16px;
  color: rgba(229, 196, 114, 0.6);
  font-size: 13px;
  text-align: center;
  letter-spacing: 0.5px;
}

.settlement-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.settlement-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 150ms;
}

.settlement-row.is-winner {
  background: rgba(229, 196, 114, 0.1);
  border: 1px solid rgba(220, 191, 118, 0.2);
}

.settlement-row.is-self {
  box-shadow: inset 0 0 0 1px rgba(229, 196, 114, 0.18);
}

.settlement-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.settlement-row.is-winner .settlement-rank {
  background: rgba(229, 196, 114, 0.2);
  color: #e5c472;
}

.settlement-name {
  flex: 1;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settlement-winner-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(229, 196, 114, 0.22);
  color: #e5c472;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.settlement-score {
  font-size: 18px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
  min-width: 48px;
  text-align: right;
}

.settlement-score.is-positive {
  color: #5dda6e;
}

.settlement-score.is-negative {
  color: #e85d5d;
}

.settlement-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.settlement-btn {
  min-width: 160px;
}
