:root {
  --felt: #0e6d5c;
  --felt-dark: #08493e;
  --gold: #f0c56a;
  --gold-deep: #a56b24;
  --ink: #3a2416;
  --cream: #f7edd6;
  --panel: #f3e2bc;
  --red: #c4472d;
  --green: #1f9d55;
  --purple: #7a45c4;
  --blue: #2d78d6;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: #120d0a;
  overflow: hidden;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
#frame {
  position: fixed;
  inset: 0;
  overflow: hidden;
  padding:
    env(safe-area-inset-top, 0px)
    env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px)
    env(safe-area-inset-left, 0px);
}
#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1280px;
  height: 720px;
  transform-origin: center center;
  overflow: hidden;
  color: var(--ink);
  background: #1b140f;
}
.view { position: absolute; inset: 0; display: none; }
.view.show { display: block; }
.hidden { display: none !important; }

.btn {
  border: 0;
  border-radius: 999px;
  color: #fff;
  padding: 10px 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 0 rgba(0,0,0,.2);
}
.btn-gold { background: linear-gradient(#ffe38a, #e0a02a); color: #6a3b05; }
.btn-green { background: linear-gradient(#5ed67a, #1d8a45); }
.btn-purple { background: linear-gradient(#b07bef, #6d35b8); }
.btn-red { background: linear-gradient(#f0715d, #c13322); }
.btn-blue { background: linear-gradient(#6aafff, #2467c9); }
.btn-plain { background: transparent; color: #8a6240; box-shadow: none; }
.btn.xl { width: 280px; height: 58px; font-size: 22px; margin: 8px auto; display: block; }

#view-login { background: linear-gradient(#8fd0ef, #d7b48a 42%, #c48a52); }
.login-scene { position: absolute; inset: 0; }
.window {
  position: absolute; right: 40px; top: 36px; width: 420px; height: 250px;
  background: linear-gradient(#b7e6ff, #7ec8ea);
  border: 12px solid #f4efe6; border-radius: 8px;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.4);
}
.window:after {
  content: ""; position: absolute; left: 30px; bottom: 20px; width: 80px; height: 120px;
  background: #f7f3ea; border-radius: 40px 40px 6px 6px; box-shadow: 120px 10px 0 #fff8ea;
}
.sofa {
  position: absolute; left: 70px; bottom: 90px; width: 360px; height: 160px;
  background: linear-gradient(#8d4d62, #623246); border-radius: 24px 24px 10px 10px;
}
.logo-plate {
  position: absolute; left: 50%; top: 78px; transform: translateX(-50%);
  width: 460px; text-align: center; color: #fff8e6;
  background: linear-gradient(#8a2f22, #5c1c14);
  border: 4px solid #e8c36a; border-radius: 18px; padding: 18px 20px 12px;
  box-shadow: 0 12px 0 rgba(80, 30, 10, .25);
}
.crown { font-size: 48px; font-weight: 800; letter-spacing: 4px; text-shadow: 0 3px 0 #3a120c; }
.logo-plate p { margin: 4px 0 0; color: var(--gold); letter-spacing: 3px; }
.login-box, .panel {
  position: absolute; left: 50%; top: 280px; transform: translateX(-50%);
  width: 460px; text-align: center;
}
.panel {
  background: linear-gradient(#fff6df, #f0d7a4);
  border-radius: 16px; padding: 18px 28px 22px;
  box-shadow: 0 16px 40px rgba(0,0,0,.25);
  text-align: left;
}
.panel h2, .dialog h2 { margin: 0 0 12px; text-align: center; color: #7a3b12; }
.panel label, .dialog label { display: block; margin: 8px 0; color: #8a5a2b; }
.panel input, .dialog input, .dialog select, .dialog textarea {
  width: 100%; margin-top: 4px; border: 0; border-radius: 8px;
  background: #5c5148; color: #fff; padding: 10px 12px;
}
.dialog textarea { min-height: 90px; resize: none; }
.row-links { display: flex; justify-content: space-between; }
.link { background: none; border: 0; color: #7a4b22; text-decoration: underline; padding: 0; }
.agree { display: block; margin-top: 8px; color: #3d2a1c; font-size: 13px; }
.server-line {
  position: absolute; right: 16px; top: 12px; color: #fff; font-size: 13px;
}
.server-line input { width: 220px; border: 0; border-radius: 8px; padding: 4px 8px; background: rgba(0,0,0,.35); color: #fff; }
.ver { position: absolute; left: 16px; top: 8px; color: #fff; margin: 0; }
.notice {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: 8px 16px; background: rgba(0,0,0,.55); color: #f3e6c8; font-size: 13px;
}

#view-hall {
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 210, 120, .18), transparent 28%),
    linear-gradient(#2a140f, #120c0a 40%, #1b120e);
}
.hall-top, .club-top, .table-top {
  height: 84px; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
}
.who-btn {
  display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,.45);
  color: #fff; border: 0; border-radius: 12px; padding: 6px 10px;
}
.who-btn b, .who-btn small { display: block; text-align: left; }
.who-btn small { color: #e7c98a; }
.avatar {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  color: #fff; font-weight: 700; background: #e07a3d; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}
.avatar.xl { width: 84px; height: 84px; font-size: 32px; margin: 0 auto 8px; }
.balances { display: flex; gap: 8px; }
.bal {
  background: rgba(0,0,0,.45); color: #fff; border-radius: 999px; padding: 6px 12px;
}
.bal.card b { color: #d7b4ff; }
.bal.score b { color: #ffd56a; }
.brand { margin-left: auto; text-align: center; color: #ffe7a8; font-size: 28px; font-weight: 800; text-shadow: 0 3px 0 #6a3a12; }
.brand small, .mode { display: block; font-size: 13px; letter-spacing: 2px; color: #ffd56a; font-weight: 400; }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.top-actions button, .hall-bottom button, .club-top button, .table-top button, .club-bottom button {
  background: rgba(0,0,0,.35); color: #ffe7bf; border: 1px solid rgba(240, 197, 106, .4);
  border-radius: 12px; padding: 8px 12px;
}
.mode { background: rgba(0,0,0,.35); padding: 8px 12px; border-radius: 12px; }
.hall-main {
  position: absolute; left: 180px; right: 40px; top: 160px; display: flex; justify-content: center; gap: 28px;
}
.entry {
  width: 250px; height: 320px; border-radius: 22px; border: 3px solid #f0d48a;
  color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px;
  box-shadow: 0 16px 0 rgba(0,0,0,.2);
}
.entry strong { font-size: 28px; }
.entry.create { background: linear-gradient(160deg, #8a4bdb, #4c2a86 60%, #2a1848); }
.entry.join { background: linear-gradient(160deg, #3d8dff, #204e9a 60%, #172848); }
.entry.club { background: linear-gradient(160deg, #f0b13a, #c47a16 55%, #6a3e10); }
.side-list {
  position: absolute; left: 0; top: 100px; bottom: 78px; width: 168px;
  background: linear-gradient(#6d3d22, #3e2114); color: #ffe7bf; padding: 12px;
  border-right: 3px solid #e8c36a;
}
.side-list h3 { margin: 0 0 8px; text-align: center; }
.room-mini, .club-item, .member-row {
  background: rgba(255,255,255,.08); border-radius: 10px; padding: 8px; margin-bottom: 8px; color: #fff;
}
.room-mini { width: 100%; text-align: left; border: 0; color: #ffe7bf; }
.hall-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; height: 72px;
  display: flex; gap: 8px; align-items: center; padding: 0 16px;
  background: linear-gradient(#3a2418, #1a100c); border-top: 2px solid #e8c36a;
}
.hall-bottom .shop { margin-left: auto; color: #ffe08a; font-weight: 700; }

#view-club { background: linear-gradient(#24324a, #141821 40%, #2a1b2e); color: #fff; }
#club-list { position: absolute; left: 12px; top: 90px; bottom: 90px; width: 230px; overflow: auto; }
.club-item { width: 100%; text-align: left; border: 1px solid transparent; color: #fff; }
.club-item.on { border-color: #f0c56a; }
#club-floor {
  position: absolute; left: 260px; right: 16px; top: 90px; bottom: 90px;
  border-radius: 16px; background:
    linear-gradient(rgba(80,40,90,.2), rgba(20,10,20,.2)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 80px, transparent 80px 82px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 80px, transparent 80px 82px);
  padding: 16px; overflow: auto;
}
.club-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; height: 78px;
  display: flex; gap: 10px; align-items: center; padding: 0 12px; background: rgba(0,0,0,.45);
}
.club-me { margin-left: auto; display: flex; align-items: center; gap: 8px; }

#view-table { background: url("/res/mj/mahjong_zhuomian.png") center / 100% 100% no-repeat; }
.table-top {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 5; height: auto; padding: 0; gap: 18px; color: #fff;
}
.room-chip, .round-chip { display: flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 700; text-shadow: 0 2px 2px #000; }
.room-chip img { height: 28px; width: auto; }
.room-chip button { margin-left: 6px; height: 28px; padding: 0 8px; }
.wall-chip {
  min-width: 64px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: url("/res/mj/ui/shengyupaishu_bt.png") center / 100% 100% no-repeat;
  color: #fff; font-size: 22px; font-weight: 700;
}
.table-side {
  position: absolute; right: 10px; top: 16px; z-index: 4;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.table-side button {
  border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center;
}
.table-side img { height: 28px; width: auto; }
.table-side button img:first-child { width: 54px; height: 54px; }
#felt { position: absolute; left: 16px; right: 90px; top: 64px; bottom: 168px; }
#dock {
  position: absolute; left: 0; right: 0; bottom: 0; height: 176px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 8px 12px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.28));
}
.my-row { display: flex; align-items: flex-end; gap: 8px; }
.center {
  position: absolute; left: 50%; top: 168px; transform: translateX(-50%);
  width: 460px; text-align: center; color: #f7e7c2;
}
.compass {
  position: relative; width: 248px; height: 156px; margin: 0 auto 10px;
  background: url("/res/mj/ui/pan.png") center / 248px 156px no-repeat;
  border: 0;
}
.compass .dir { position: absolute; width: 36px; height: auto; z-index: 1; }
.compass .e { right: 22px; top: 58px; }
.compass .w { left: 22px; top: 58px; }
.compass .n { left: 106px; top: 16px; }
.compass .s { left: 106px; bottom: 14px; }
.compass .wedge { position: absolute; pointer-events: none; z-index: 0; }
.compass .wedge.bottom { left: 50%; bottom: 34px; width: 118px; transform: translateX(-50%); }
.compass .wedge.top { left: 50%; top: 26px; width: 118px; transform: translateX(-50%) rotate(180deg); }
.compass .wedge.right { right: 22px; top: 50%; width: 34px; transform: translateY(-50%); }
.compass .wedge.left { left: 22px; top: 50%; width: 34px; transform: translateY(-50%); }
.ready-mark { display: block; width: 180px; height: auto; margin: 8px auto 0; }
.invite {
  width: 274px; height: 72px; margin: 8px auto 0; border: 0; padding: 0;
  background: url("/res/mj/ui/green_bt.png") center / 100% 100% no-repeat;
  display: flex; align-items: center; justify-content: center;
}
.invite img { width: 180px; height: auto; }
#table-fx {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  z-index: 6; pointer-events: none;
}
#table-fx img { width: 280px; height: auto; }
.disc { display: flex; flex-wrap: wrap; gap: 3px; min-height: 36px; margin: 4px 0; justify-content: center; }
.dice-show { display: flex; justify-content: center; gap: 16px; margin: 8px 0 4px; }
.die {
  width: 54px; height: 54px; border-radius: 8px; background: #fffdf8;
  box-shadow: 0 3px 0 #c9bba4, 0 6px 10px rgba(0,0,0,.28);
  display: grid; grid-template-columns: repeat(3, 1fr); padding: 7px; gap: 2px;
}
.die b { width: 10px; height: 10px; border-radius: 50%; margin: auto; background: transparent; }
.die b.on { background: #1b1a17; }
.dice-show.roll .die { animation: die-shake .12s linear infinite; }
@keyframes die-shake {
  50% { transform: rotate(18deg) translateY(-4px); }
}
.seat { position: absolute; color: #fff; }
.seat.top { left: 8px; right: 8px; top: 0; text-align: center; }
.seat.top .who { display: inline-flex; }
.seat.top .top-line { position: relative; min-height: 68px; margin-top: 6px; }
.seat.top .holds { justify-content: center; }
.kong-show {
  position: absolute; left: 8px; top: 62px; z-index: 6;
  display: flex; gap: 2px; align-items: flex-end;
  padding: 4px 5px; background: rgba(8, 24, 20, .82);
  border-radius: 6px; border: 1px solid rgba(255,255,255,.2);
}
.kong-show .kong-tile { padding: 0; border: 0; background: transparent; }
.kong-show button.kong-tile { cursor: pointer; }
.kong-show .kong-tile.dark { filter: brightness(0.45); }
.kong-show .tile.small { width: 46px; height: 62px; }
.kong-pick {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  z-index: 7; padding: 14px 22px 18px; text-align: center;
  background: rgba(8, 24, 20, .94); border: 2px solid #e8c36a; border-radius: 14px;
}
.kong-pick p { margin: 0 0 12px; color: #f6e2b4; font-size: 24px; letter-spacing: 2px; }
.kong-pick-row { display: flex; flex-direction: row; gap: 18px; justify-content: center; align-items: flex-end; }
.kong-pick .kong-tile { padding: 0; border: 0; background: transparent; }
.kong-pick button.kong-tile { cursor: pointer; }
.kong-pick .kong-tile.dark { filter: brightness(0.45); }
.kong-pick .tile { width: 78px; height: 108px; }
.pick-tile {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  z-index: 7; width: max-content; max-width: 760px; padding: 12px 16px 14px; text-align: center;
  background: rgba(8, 24, 20, .94); border: 2px solid #e8c36a; border-radius: 14px;
  pointer-events: auto;
}
.pick-tile p { margin: 0 0 10px; color: #f6e2b4; font-size: 22px; letter-spacing: 2px; }
.pick-tile-row { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pick-tile .kong-tile { position: relative; padding: 0; border: 0; background: transparent; cursor: pointer; }
.pick-tile .tile { width: 46px; height: 64px; }
.pick-tile em {
  position: absolute; right: -4px; top: -6px; min-width: 16px; padding: 0 4px;
  border-radius: 8px; background: #e0a02a; color: #4a2a08; font-style: normal; font-size: 12px; font-weight: 700;
}
.round-result {
  position: absolute; left: 70px; right: 70px; top: 50%; transform: translateY(-50%);
  pointer-events: auto;
  background: linear-gradient(#fff8ea, #f4e0b8); color: #3a2416;
  border: 4px solid #e8c36a; border-radius: 16px; padding: 16px 18px 14px;
}
.round-result h3 { margin: 0 0 12px; text-align: center; font-size: 22px; }
.round-row { display: flex; flex-direction: row; align-items: center; gap: 12px; margin: 8px 0; }
.round-who { width: 150px; flex: none; }
.round-who b { display: block; font-size: 18px; }
.round-who span { font-size: 28px; font-weight: 700; }
.round-tiles { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: flex-end; gap: 3px; min-width: 0; }
.round-tiles .tile.tiny { width: 44px; height: 62px; }
.round-meld { display: inline-flex; flex-direction: row; gap: 1px; margin-right: 8px; }
.round-result .result-actions { display: flex; justify-content: center; margin-top: 8px; }
.seat.top .melds {
  position: absolute; left: 168px; bottom: 0; z-index: 5;
  display: flex; gap: 6px;
}
.seat.left { left: 0; top: 70px; }
.seat.right { right: 0; top: 70px; text-align: right; }
.who { display: flex; gap: 6px; align-items: center; background: rgba(0,0,0,.55); color: #fff; padding: 4px 10px; border-radius: 10px; }
.who b, .who i { display: block; font-style: normal; }
.who em { background: #c4472d; color: #fff; border-radius: 6px; padding: 0 4px; margin-left: 4px; font-style: normal; }
.who.active { outline: 2px solid #ffe08a; }
.holds, .melds, .my-melds, .my-hand, .ops { display: flex; gap: 4px; align-items: flex-end; }
.meld-set {
  display: inline-flex; gap: 2px; padding: 4px 5px; align-items: flex-end;
  background: rgba(8, 24, 20, .82); border-radius: 6px; border: 1px solid rgba(255,255,255,.2);
}
.seat.top .meld-set .tile.small { width: 46px; height: 62px; }
.my-melds .meld-set .tile.small { width: 36px; height: 50px; }
.raise-box {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 8;
  width: 440px; padding: 22px 28px 18px; text-align: center; color: #f7f1e4;
  background: rgba(7, 48, 40, .94); border: 3px solid #e2c27a; border-radius: 18px;
}
.raise-box p { margin: 0 0 12px; font-size: 30px; letter-spacing: 2px; }
.raise-row { display: flex; align-items: center; justify-content: center; gap: 22px; }
.raise-row b { min-width: 84px; font-size: 64px; line-height: 1; color: #fff; }
.raise-minus, .raise-plus {
  width: 78px; height: 78px; border: 0; border-radius: 50%; color: #fff;
  font-size: 48px; font-weight: 800; line-height: 1;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 4px 0 rgba(0,0,0,.25);
}
.raise-minus { background: radial-gradient(circle at 40% 32%, #ffe08a, #ef8a14 68%, #c45e08); }
.raise-plus { background: radial-gradient(circle at 40% 32%, #e4ff8a, #67c31a 68%, #2f8d0c); }
.raise-ok {
  margin-top: 16px; width: 196px; height: 54px; border: 0; border-radius: 27px;
  color: #6a3b05; font-size: 26px; font-weight: 800;
  background: linear-gradient(#ffe7a0, #e29a22);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 4px 0 #8a5a10;
}
.my-hand { flex: 1; justify-content: center; }
.ops { display: flex; gap: 8px; justify-content: center; min-height: 34px; }
.op, .vote button {
  background: linear-gradient(#ffe7a2, #e2a12d); color: #5c3208; border: 0; border-radius: 10px;
  padding: 8px 14px; font-weight: 700;
}

.tile {
  width: 52px; height: 74px; border: 0; padding: 4px; border-radius: 6px;
  background: linear-gradient(#fffef8, #f1e4c8); color: #1d1a17;
  box-shadow: 0 3px 0 #c8b89a, 0 6px 8px rgba(0,0,0,.25);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.tile b { font-size: 24px; line-height: 1; }
.tile i { font-size: 13px; font-style: normal; }
.tile.tong b { color: #1d4e89; }
.tile.tiao b, .tile.tiao i { color: #1d7a3a; }
.tile.zhong { background: #fff; }
.tile.zhong b { color: #d1261d; font-size: 32px; }
.tile.fa b { color: #178a45; font-size: 32px; }
.tile.bai { box-shadow: inset 0 0 0 3px #2d5fbf, 0 3px 0 #c8b89a; }
.tile.bai b { color: #2457b5; font-size: 30px; }
.tile.wind b { color: #222; font-size: 28px; }
.tile.small { width: 32px; height: 44px; }
.tile.small b { font-size: 14px; }
.tile.small i { font-size: 10px; }
.tile.tiny { width: 26px; height: 36px; box-shadow: none; }
.tile.tiny b { font-size: 12px; }
.tile.tiny i { display: none; }
.tile.face, .tile.back {
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  padding: 0;
}
.tile.face {
  background-color: #fbf7ee;
  background-size: 82% 82%;
  border-radius: 5px;
  box-shadow: inset 0 0 0 2px #e4d3b0, 0 2px 0 #c8b89a, 0 4px 6px rgba(0,0,0,.28);
}
.tile.back { background-image: url("/res/mj/card/back.png"); box-shadow: none; }
.op.art {
  width: 92px; height: 76px; padding: 0; font-size: 0;
  background-color: transparent; background-repeat: no-repeat; background-position: center; background-size: contain;
}
.tile.sel { transform: translateY(-12px); outline: 2px solid #ffe08a; }
.tile.draw { margin-left: 12px; }
.me-tag { position: absolute; left: 18px; bottom: -96px; max-width: 240px; z-index: 5; }
.who b { font-size: 14px; }

.result, .vote {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  width: 760px; max-height: 420px; overflow: auto;
  background: linear-gradient(#fff8ea, #f4e0b8); color: #3a2416;
  border: 4px solid #e8c36a; border-radius: 16px; padding: 14px 16px; z-index: 3;
}
.result h3 { margin: 0 0 8px; text-align: center; }
.rr { display: grid; grid-template-columns: 120px 70px 1fr; gap: 6px; align-items: center; margin: 6px 0; }
.win { color: #c4472d; font-weight: 700; }
.lose { color: #2d78d6; font-weight: 700; }
.result ul { margin: 8px 0; padding-left: 18px; font-size: 13px; }
.result-actions { display: flex; justify-content: center; gap: 8px; }
#final-layer { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
#final-layer:empty { display: none; }
.final {
  position: absolute; inset: 0; pointer-events: auto;
  background: rgba(0, 0, 0, .55);
}
.final-back {
  position: absolute; left: 16px; top: 12px; z-index: 2;
  width: 64px; height: 52px; padding: 0; border: 0; background: transparent;
}
.final-back img { width: 64px; height: 52px; object-fit: contain; }
.final-panel {
  position: absolute; left: 70px; right: 70px; top: 36px; bottom: 28px;
  background: url("/res/mj/ui/bottom_win.png") center / 100% 100% no-repeat;
}
.final-title {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
  max-width: 460px; color: #f8e7b0; font-size: 22px; letter-spacing: 2px; font-weight: 700;
  text-shadow: 0 2px 0 #6a3a12; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.final .result-actions {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; gap: 8px;
}
.final .result-actions button, .final .result-actions span {
  min-width: 132px; height: 48px; border: 0; border-radius: 24px; cursor: pointer;
  color: #fff; font-size: 22px; letter-spacing: 2px; line-height: 48px; text-align: center;
  background: url("/res/mj/ui/huifang_bt_c.png") center / 100% 100% no-repeat;
}
.final-cards { position: absolute; left: 28px; top: 78px; display: flex; gap: 8px; }
.final-card {
  position: relative; width: 210px; height: 468px; box-sizing: border-box;
  padding: 14px 12px 8px; color: #5c3a1e;
  background: url("/res/mj/ui/bg_paijujieshu.png") center / 100% 100% no-repeat;
}
.final-owner { position: absolute; left: 6px; top: 2px; width: 42px; height: 38px; z-index: 2; }
.final-win { position: absolute; right: -6px; top: -8px; width: 54px; height: 54px; z-index: 2; }
.final-head { display: flex; gap: 8px; align-items: center; min-height: 62px; margin-bottom: 8px; }
.final-head img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.final-head b { display: block; max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; line-height: 1.2; }
.final-head i { display: block; max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; font-style: normal; font-size: 12px; color: #8a6844; }
.final-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 6px; font-size: 15px;
}
.final-row b { font-weight: 700; }
.final-out {
  margin: 4px 2px 0; padding: 6px 8px; background: #d7d1c6; color: #5c3a1e; font-size: 15px;
}
.final-total { margin-top: 12px; text-align: center; }
.final-total span {
  display: inline-block; color: #c8963a; font-size: 16px; letter-spacing: 2px;
}
.final-total span::before, .final-total span::after { content: " ● "; color: #e0b15a; }
.final-total b { display: block; margin-top: 2px; color: #ef3b28; font-size: 40px; line-height: 1; }
.final-share {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: 132px; height: 48px; border: 0; border-radius: 24px; cursor: pointer;
  color: #fff; font-size: 22px; letter-spacing: 4px;
  background: url("/res/mj/ui/huifang_bt_c.png") center / 100% 100% no-repeat;
}

#chat-pop {
  position: absolute; right: 96px; bottom: 180px; background: rgba(0,0,0,.72);
  border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; z-index: 4;
}
#chat-pop button { background: #fff6df; border: 0; border-radius: 8px; padding: 6px 8px; }

#mask {
  position: absolute; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; z-index: 6;
}
.dialog {
  width: 560px; background: linear-gradient(#fff8ea, #f3ddb0); border-radius: 16px;
  padding: 16px 18px 18px; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.dialog.wide { width: 820px; }
.dialog .x {
  position: absolute; right: 10px; top: 8px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: #d4533c; color: #fff; font-size: 22px;
}
.tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.tabs label { flex: 1; background: #7a3b12; color: #fff; border-radius: 10px; padding: 8px; text-align: center; }
.opt { display: flex; gap: 14px; align-items: center; padding: 7px 0; border-bottom: 1px dashed rgba(120,70,30,.2); }
.opt span { width: 90px; color: #7a4b22; }
.cost { color: #7a3b12; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.hint { color: #7a5a32; font-size: 14px; line-height: 1.5; }
.scroll { max-height: 460px; overflow: auto; line-height: 1.55; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.profile-grid { display: grid; grid-template-columns: 180px 1fr; gap: 12px; }
.avatars { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.avatars button { width: 36px; height: 36px; border-radius: 8px; border: 2px solid transparent; color: #fff; }
.avatars button.on { border-color: #fff; outline: 2px solid #c4472d; }
.slider { display: flex; align-items: center; gap: 8px; }
.slider input { flex: 1; }
.fees { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fees label { background: #fff; border-radius: 8px; padding: 8px; text-align: center; }
#toast {
  position: absolute; left: 50%; bottom: 188px; transform: translateX(-50%);
  background: rgba(0,0,0,.82); color: #fff; padding: 10px 16px; border-radius: 999px;
  z-index: 9; display: none; max-width: 70%; text-align: center;
}
#toast.show { display: block; }
.empty { opacity: .8; padding: 8px; }

/* 原客户端素材 */
#view-login {
  background: #1a120c url("/res/csbimages/Login2/img_bg.png") center / 100% 100% no-repeat;
}
.logo-img {
  position: absolute; left: 50%; top: 18px; transform: translateX(-50%);
  width: 340px; height: auto; pointer-events: none;
}
.login-box { top: 330px; width: 340px; }
.img-btn {
  display: block; margin: 8px auto; padding: 0; border: 0; background: none;
  width: 300px;
}
.img-btn img { width: 100%; height: auto; display: block; }
.agree {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px;
}
.agree img { height: 28px; width: auto; }
.agree input {
  appearance: none; width: 28px; height: 28px; margin: 0;
  background: url("/res/csbimages/Login/checkBg.png") center/contain no-repeat;
}
.agree input:checked { background-image: url("/res/csbimages/Login/checkSel.png"); }
.notice-img {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  width: 920px; height: auto; pointer-events: none;
}
.ver { right: 18px; left: auto; top: 10px; color: #f0c56a; font-weight: 700; text-shadow: 0 1px 2px #000; }
.server-line { left: 12px; right: auto; top: auto; bottom: 52px; color: rgba(255,255,255,.75); }
.panel {
  background: url("/res/csbimages/Common2/img_small_bg2.png") center/100% 100% no-repeat;
  box-shadow: none; border-radius: 0; width: 620px; min-height: 420px;
  padding: 54px 48px 28px; top: 150px;
}
.panel h2 { color: #f6e2b4; letter-spacing: 2px; }
.panel .x, .dialog .x, .club-x {
  position: absolute; right: 8px; top: -8px; width: 64px; height: 64px;
  border: 0; color: transparent; border-radius: 0;
  background: url("/res/csbimages/Common2/img_btn_exit.png") center/contain no-repeat;
}
.login-go, .delegate, .create-go, .gold-go, .club-pic, .dock-btn, .pic-mail, .pic-gift, .tbl-ico, .room-tab, .club-ico {
  border: 0; background-color: transparent; background-repeat: no-repeat; background-position: center; background-size: 100% 100%;
  color: transparent; box-shadow: none;
}
.login-go { width: 280px; height: 78px; display: block; margin: 16px auto 0; background-image: url("/res/csbimages/Login/login_btn_ljdl.png"); }
.gold-go {
  min-width: 160px; height: 52px; padding: 0 22px; color: #6a3208; font-weight: 700;
  background-image: url("/res/csbimages/Common2/img_btn_yellow2.png");
}
.gold-go.slim { height: 46px; }

#view-hall {
  background: #120c0a url("/res/csbimages/Login/bg_0.png") center / 100% 100% no-repeat;
}
.hall-top { position: absolute; left: 0; right: 0; top: 0; height: 96px; background: none; padding: 8px 12px; }
.who-btn {
  position: absolute; left: 16px; top: 14px; width: 250px; height: 72px;
  background: rgba(0,0,0,.55); border-radius: 14px; color: #fff; gap: 8px;
}
.who-btn .avatar { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #222; box-shadow: none; }
.balances { position: absolute; left: 258px; top: 18px; }
.bal {
  display: inline-flex; align-items: center; gap: 6px; min-width: 148px; height: 36px;
  padding: 0 8px 0 6px; border-radius: 18px;
  background: url("/res/csbimages/Hall/newimages/img_num_bg.png") center/100% 100% no-repeat;
}
.bal img { width: 28px; height: 28px; object-fit: contain; }
.bal b { flex: 1; text-align: center; }
.plus {
  width: 26px; height: 26px; border: 0; padding: 0;
  background: url("/res/csbimages/Hall/newimages/img_plus.png") center/contain no-repeat;
}
.hall-logo { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); width: 210px; height: auto; }
.hall-tip {
  position: absolute; left: 50%; top: 72px; transform: translateX(-50%);
  margin: 0; color: #ffe08a; font-size: 16px; letter-spacing: 2px; text-shadow: 0 2px 2px #000;
}
.top-actions { position: absolute; right: 16px; top: 10px; }
.pic-mail, .pic-gift { width: 78px; height: 66px; }
.pic-mail { background-image: url("/res/csbimages/Hall/newimages/email.png"); }
.pic-gift { background-image: url("/res/csbimages/Hall/newimages/img_btn_give.png"); }
.mode {
  background: rgba(0,0,0,.55); color: #ffe7bf; border: 1px solid rgba(240,197,106,.45);
  border-radius: 10px; padding: 8px 12px; font-size: 16px;
}
.room-tab {
  position: absolute; left: 0; top: 180px; width: 48px; height: 230px;
  background-image: url("/res/csbimages/Hall/newimages/img_room.png");
  z-index: 2;
}
.side-list {
  display: none; position: absolute; left: 52px; top: 160px; width: 210px; max-height: 360px;
  overflow: auto; z-index: 3; background: rgba(20,12,8,.82); border: 2px solid #e8c36a;
  border-radius: 12px; padding: 8px;
}
.side-list.open { display: block; }
.hall-main { left: 70px; right: 210px; top: 130px; gap: 22px; }
.entry {
  width: 250px; height: 310px; border: 0; border-radius: 8px; box-shadow: none; padding: 0;
  background-color: transparent; background-size: 100% 100%; background-repeat: no-repeat;
}
.entry.create { background-image: url("/res/csbimages/Hall/newimages/img_create_bg.png"); }
.entry.join { background-image: url("/res/csbimages/Hall/newimages/img_join_bg.png"); }
.entry.club { background-image: url("/res/csbimages/Hall/newimages/img_club_bg.png"); }
.hall-girl {
  position: absolute; right: 8px; bottom: 62px; height: 390px; width: auto; pointer-events: none;
}
.hall-bottom {
  height: 78px; background: linear-gradient(transparent, rgba(0,0,0,.55) 30%, rgba(0,0,0,.72));
  border: 0; justify-content: flex-start; gap: 4px; padding-left: 8px;
}
.hall-bottom .dock-btn,
.top-actions .pic-mail,
.top-actions .pic-gift {
  border: 0; color: transparent; box-shadow: none;
  background-color: transparent; background-repeat: no-repeat; background-position: center; background-size: 100% 100%;
}
.top-actions .pic-mail { width: 78px; height: 66px; background-image: url("/res/csbimages/Hall/newimages/email.png"); }
.top-actions .pic-gift { width: 80px; height: 66px; background-image: url("/res/csbimages/Hall/newimages/img_btn_give.png"); }
.hall-bottom .dock-btn { width: 148px; height: 70px; }
.hall-bottom .dock-btn.set { background-image: url("/res/csbimages/Hall/newimages/btnSetting2.png"); }
.hall-bottom .dock-btn.svc { background-image: url("/res/csbimages/Hall/newimages/btnService2.png"); }
.hall-bottom .dock-btn.share { background-image: url("/res/csbimages/Hall/newimages/btnShare2.png"); }
.hall-bottom .dock-btn.qr { background-image: url("/res/csbimages/Hall/newimages/btnqrcode.png"); }
.hall-bottom .dock-btn.rec { background-image: url("/res/csbimages/Hall/newimages/btnRecord2.png"); }
.hall-bottom .dock-btn.rule { background-image: url("/res/csbimages/Hall/newimages/btn_rule.png"); }
.hall-bottom .dock-btn.shop { width: 156px; background-image: url("/res/csbimages/Hall/newimages/img_shop.png"); }
.entry.create, .entry.join, .entry.club { background-size: 100% 100%; background-repeat: no-repeat; background-position: center; }
.server-line { left: 12px; top: 8px; bottom: auto; font-size: 12px; }
.dock-btn.set { background-image: url("/res/csbimages/Hall/newimages/btnSetting2.png"); }
.dock-btn.svc { background-image: url("/res/csbimages/Hall/newimages/btnService2.png"); }
.dock-btn.share { background-image: url("/res/csbimages/Hall/newimages/btnShare2.png"); }
.dock-btn.qr { background-image: url("/res/csbimages/Hall/newimages/btnqrcode.png"); }
.dock-btn.rec { background-image: url("/res/csbimages/Hall/newimages/btnRecord2.png"); }
.dock-btn.rule { background-image: url("/res/csbimages/Hall/newimages/btn_rule.png"); }
.dock-btn.shop { margin-left: auto; width: 140px; background-image: url("/res/csbimages/Hall/newimages/img_shop.png"); }

#view-club { background: #141018 url("/res/csbimages/Hall/Club/bg.png") center / 100% 100% no-repeat; }
.club-title { position: absolute; left: 16px; top: 8px; width: 180px; height: auto; }
.club-top { height: 96px; justify-content: flex-end; align-items: flex-start; gap: 6px; padding: 6px 10px 0 0; }
.club-top .club-ico,
.club-bottom .club-pic,
.club-bottom #club-records {
  padding: 0; border: 0; border-radius: 0; box-shadow: none;
  background-color: transparent; background-repeat: no-repeat; background-position: center; background-size: 100% 100%;
}
.club-ico { width: 72px; height: 72px; flex: none; }
.club-ico.income { background-image: url("/res/csbimages/Club/btnIncome.png"); }
.club-ico.refresh { background-image: url("/res/csbimages/Club/btnRefresh.png"); }
.club-ico.menu { background-image: url("/res/csbimages/Club/btnMenu.png"); }
.club-top .club-x {
  position: relative; top: 0; right: auto; flex: none;
  width: 72px; height: 72px; padding: 0; border: 0; background: none; box-shadow: none;
}
.club-top .club-x img { width: 72px; height: 72px; display: block; }
.club-bottom {
  height: 86px;
  background: linear-gradient(#3a2418, #1a100c);
  border-top: 2px solid #e8c36a;
  overflow: visible;
}
.club-pic { width: 210px; height: 62px; }
.club-pic.new { position: absolute; left: 18px; bottom: 168px; background-image: url("/res/csbimages/Hall/Club/img_btn_create.png"); }
.club-pic.enter { position: absolute; left: 18px; bottom: 98px; background-image: url("/res/csbimages/Hall/Club/img_btn_join.png"); }
#club-create-room {
  position: absolute; right: 214px; bottom: 14px; width: 210px; height: 60px;
  background-image: url("/res/csbimages/Hall/Club/img_btn_create1.png");
}
#club-records {
  position: absolute; right: 16px; bottom: 14px; width: 184px; height: 60px;
  font-size: 0; color: transparent;
  background-image: url("/res/csbimages/Hall/Club/zhanji.png");
}
.club-me {
  position: absolute; left: 286px; right: auto; bottom: 16px; margin: 0;
  color: #ffe7bf; font-size: 14px; line-height: 1.25;
}
.club-me .avatar { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.club-me .me-card { width: 36px; height: 36px; margin-left: 18px; }
.club-me .me-cards { color: #fff; font-size: 22px; margin-left: 6px; }
#club-list {
  left: 8px; top: 96px; bottom: 230px; width: 250px;
  background: url("/res/csbimages/Hall/Club/zuo.png") center/100% 100% no-repeat;
  padding: 10px;
}
#club-floor { background: transparent; left: 270px; }

#view-table { background: url("/res/mj/mahjong_zhuomian.png") center / 100% 100% no-repeat; }
.mat { display: none; }
.op, .vote button {
  min-width: 92px; height: 44px; color: #5c3208;
  background: url("/atlas/btnYellow.png") center/100% 100% no-repeat;
  border-radius: 0; box-shadow: none;
}
.op.art {
  min-width: 92px; width: 92px; height: 76px; padding: 0;
  background-color: transparent; background-repeat: no-repeat; background-position: center; background-size: contain;
}
.who .avatar, .avatar { object-fit: cover; }
#chat-pop { max-height: 360px; overflow: auto; }
.dialog {
  background: url("/res/csbimages/Common2/img_small_bg2.png") center/100% 100% no-repeat;
  border-radius: 0; box-shadow: none; min-height: 280px; padding: 52px 36px 24px;
}
.dialog.wide { width: 860px; background-image: url("/res/csbimages/Common2/img_big_bg.png"); }
#dlg-rules, #dlg-records, #dlg-profile, #dlg-members {
  width: 900px; height: 620px; max-height: 620px; box-sizing: border-box;
  padding: 96px 70px 40px; overflow: hidden;
}
#dlg-rules h2, #dlg-records h2, #dlg-profile h2, #dlg-members h2 {
  margin: 0 0 14px; line-height: 36px; position: relative; z-index: 1; color: #f6e2b4;
}
#dlg-rules .scroll, #dlg-records .scroll, #dlg-members .scroll { max-height: 420px; }
#dlg-rules .x, #dlg-records .x, #dlg-profile .x, #dlg-members .x { top: 22px; right: 28px; }
#dlg-create {
  width: 1080px; height: 640px; padding: 0;
  display: grid; grid-template-columns: 196px 1fr;
  background: url("/res/csbimages/Hall/create/img_bg.png") center/100% 100% no-repeat;
  overflow: visible;
}
.score-title { display: block; width: 158px; height: auto; margin: 22px auto 18px; }
.create-side { padding: 8px 8px 0; min-width: 0; }
.create-body {
  min-width: 0; padding: 18px 28px 16px 26px;
  display: flex; flex-direction: column;
}
.create-wallet { display: flex; justify-content: center; gap: 36px; margin: 4px 0 8px; }
.create-wallet .bal { position: static; color: #fff; min-width: 168px; }
.create-foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.create-foot .cost {
  display: flex; align-items: center; gap: 8px; margin: 0;
  color: #6a4524; font-size: 20px; font-weight: 700;
}
.create-foot .cost img { width: 46px; height: auto; }
#dlg-create .dlg-actions { flex-wrap: nowrap; justify-content: flex-end; gap: 14px; }
#dlg-create .delegate,
#dlg-create .create-go,
#dlg-create #btn-practice {
  border-radius: 0; flex: none; box-shadow: none;
}
#dlg-create #btn-practice { width: 168px; height: 52px; font-size: 16px; white-space: nowrap; }
#dlg-create .opt { padding: 11px 0; }
#dlg-create .opt span { width: 108px; font-size: 18px; }
#dlg-create .tabs {
  position: static; width: auto; display: flex; flex-direction: column; gap: 14px;
}
#dlg-create .tabs label {
  flex: none; width: 176px; height: 52px; min-height: 52px; font-size: 0; overflow: hidden;
  background: center/contain no-repeat; color: transparent; border-radius: 0; padding: 0;
}
#dlg-create .tabs label.tab-2 { background-image: url("/res/csbimages/Hall/CreateRoom/tabName/MwMahjong2p_2.png"); }
#dlg-create .tabs label.tab-2:has(:checked) { background-image: url("/res/csbimages/Hall/CreateRoom/tabName/MwMahjong2p_1.png"); }
#dlg-create .tabs label.tab-3 { background-image: url("/res/csbimages/Hall/CreateRoom/tabName/MwMahjong3p_2.png"); }
#dlg-create .tabs label.tab-3:has(:checked) { background-image: url("/res/csbimages/Hall/CreateRoom/tabName/MwMahjong3p_1.png"); }
#dlg-create .opt label {
  position: relative; padding-left: 34px; color: #6a4524;
  background: url("/res/csbimages/Hall/create/img_btn_on_1.png") left center/26px 26px no-repeat;
}
#dlg-create .opt label:has(:checked) { background-image: url("/res/csbimages/Hall/create/img_btn_off_1.png"); }
#dlg-create .opt input, #dlg-create .tabs input { position: absolute; opacity: 0; pointer-events: none; }
#dlg-create .x { top: -16px; right: -8px; z-index: 2; }
.delegate { width: 196px; height: 62px; background-image: url("/res/csbimages/Hall/create/img_btn_other_create.png"); }
.create-go { width: 196px; height: 62px; background-image: url("/res/csbimages/Hall/Club/img_btn_create1.png"); }
.set-grid { display: grid; grid-template-columns: 1fr 180px; gap: 18px; align-items: center; min-height: 180px; }
.set-side { text-align: center; border-left: 2px solid rgba(255,255,255,.7); padding-left: 16px; }
.set-side img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; }
.slider { position: relative; padding-left: 54px; min-height: 48px; }
.slider.music { background: url("/res/csbimages/Common2/img_btn_music1.png") left center/44px 44px no-repeat; }
.slider.sound { background: url("/res/csbimages/Common2/img_btn_sound1.png") left center/44px 44px no-repeat; }
.slider input[type="range"] { width: 100%; accent-color: #f0b429; }
.avatars button {
  width: 52px; height: 52px; padding: 0; border-radius: 10px; background-size: cover; background-position: center; color: transparent;
}
.panel input, .dialog input, .dialog select, .dialog textarea {
  background: #5c5148 url("/res/csbimages/Login/login_account_editbox_bg.png") center/100% 100% no-repeat;
}
