* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0e4e2e;
  color: #2b2118;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
button, input { font-family: inherit; }
input { user-select: text; -webkit-user-select: text; }
#app {
  height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 214, 170, .22), transparent 42%),
    radial-gradient(circle at 50% 46%, #239254 0%, #146b3e 48%, #e06a22 100%);
  box-shadow: inset 0 0 0 8px #ff8a3d, inset 0 0 0 12px #9a4514;
}

.home, .table {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding:
    calc(16px + env(safe-area-inset-top))
    14px
    calc(12px + env(safe-area-inset-bottom));
  min-height: 0;
}

.home { justify-content: flex-start; gap: 12px; overflow: auto; }
.fan {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 78px;
}
.fan .tile { position: relative; }
.fan .tile:nth-child(1) { transform: rotate(-16deg) translateY(6px); }
.fan .tile:nth-child(2) { transform: translateY(-6px); z-index: 1; }
.fan .tile:nth-child(3) { transform: rotate(16deg) translateY(6px); }
.plaque {
  text-align: center;
  color: #fff8ee;
}
.plaque h1 {
  margin: 0;
  font-size: 40px;
  letter-spacing: .12em;
  text-shadow: 0 3px 0 #8a3e12;
}
.plaque .eye {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: .4em;
  color: #ffe0bf;
}
.plaque .sub {
  margin: 6px 0 0;
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .22);
  color: #ffe7c8;
  font-size: 14px;
  font-weight: 700;
}
.card {
  background: #fff8ee;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(40, 16, 0, .18);
  border: 1px solid rgba(255, 255, 255, .6);
}
.name-card label {
  display: block;
  font-size: 12px;
  color: #8d7158;
  margin-bottom: 6px;
}
.name-card input {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid #f0d7b4;
  background: #fff;
  padding: 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: #2b2118;
  outline: none;
}
.name-card input:focus { border-color: #ff8a3d; }
.rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.rules span {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff4e4;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #6d4a2c;
}
.rules .mp-icon { width: 18px; height: 18px; color: #ff8a3d; }
.note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #8d7158;
}
.career {
  margin: 0;
  text-align: center;
  color: #ffe7c8;
  font-size: 13px;
}
.home > .note { color: #ffe7c8; }
.note.center { text-align: center; }
.sound-h {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 15px;
}
.sound-h .mp-icon { width: 20px; height: 20px; color: #ff8a3d; }
.sound-h .spin { animation: mjpulse 1.3s ease-in-out infinite; }
.vol { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.vol span { width: 68px; flex: 0 0 auto; font-size: 13px; font-weight: 800; color: #6d4a2c; }
.vol b { width: 44px; flex: 0 0 auto; text-align: right; font-size: 13px; color: #e07a20; }
.vol input[type="range"] { flex: 1; height: 36px; accent-color: #ff8a3d; }
.code-input {
  width: 100%;
  height: 48px;
  margin: 8px 0;
  border-radius: 12px;
  border: 1.5px solid #f0d7b4;
  background: #fff;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .18em;
  color: #2b2118;
}
.code {
  text-align: center;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: .2em;
  text-indent: .2em;
  color: #fff8ee;
  margin: 0;
}
.seats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seatcard {
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  min-height: 64px;
  box-shadow: 0 6px 16px rgba(40, 16, 0, .12);
}
.seatcard b { display: block; font-size: 16px; }
.seatcard span { color: #8d7158; font-size: 12px; font-weight: 700; }
.iconbtn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .28);
  color: #fff8ee;
  display: grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
}
.iconbtn .mp-icon { width: 20px; height: 20px; }
.iconbtn.on { background: #ff8a3d; }
.iconbtn.live .mp-icon { animation: mjpulse 1.3s ease-in-out infinite; }
.iconbtn:active { transform: scale(.96); }
.iconbtn.back { margin-bottom: -4px; }
.toolrow { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.toolgap { flex: 1; }
.chipbtn {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(0, 0, 0, .28);
  color: #fff8ee;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chipbtn .mp-icon { width: 16px; height: 16px; }
.chipbtn.on { background: #ff8a3d; }
.chipbtn:active { transform: scale(.97); }
@keyframes mjpulse {
  50% { transform: scale(1.14); }
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  min-height: 48px;
  padding: 0 14px;
  background: #ff8a3d;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 4px 0 #c85e16;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #c85e16; }
.btn:disabled { opacity: .45; box-shadow: none; transform: none; }
.btn .mp-icon { width: 20px; height: 20px; }
a.btn { text-decoration: none; color: #fff; box-sizing: border-box; }
a.btn.line { color: #fff8ee; }
.btn.block { width: 100%; }
.btn.gold {
  background: linear-gradient(180deg, #ffe08a, #f0b429);
  color: #6a3b08;
  box-shadow: 0 4px 0 #c48a12;
}
.btn.cream {
  background: #fff4df;
  color: #7a4314;
  box-shadow: 0 4px 0 #e2c091;
}
.btn.ghost {
  background: rgba(255, 255, 255, .16);
  color: #fff8ee;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .22);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row .btn { flex: 1 1 40%; min-width: 0; font-size: 16px; }
.btn.line {
  background: transparent;
  color: #fff8ee;
  box-shadow: none;
  border: 1.5px solid rgba(255, 248, 238, .78);
}
.btn.line:active { transform: translateY(1px); box-shadow: none; }
.btn.cream.block, .sheet .btn.cream { margin-top: 8px; }
.que-row { display: flex; gap: 8px; }
.que-row .btn { flex: 1; color: #fff; }
.que-row .s0 { background: #d4533c; box-shadow: 0 4px 0 #9d3220; }
.que-row .s1 { background: #2d74d6; box-shadow: 0 4px 0 #1a4e96; }
.que-row .s2 { background: #1f8a48; box-shadow: 0 4px 0 #0f5a2c; }

.seat.top, .me { flex-shrink: 0; }
.seat.top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-bottom: 2px;
}
.who, .me-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  background: rgba(0, 0, 0, .28);
  color: #fff8ee;
  border-radius: 999px;
  padding: 3px 10px 3px 3px;
  font-size: 13px;
}
.me-bar { align-self: center; margin-bottom: 4px; }
.av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: #ff8a3d;
  flex: 0 0 auto;
}
.nm { font-weight: 800; white-space: nowrap; }
.sc { font-variant-numeric: tabular-nums; font-weight: 800; color: #ffe08a; }
.sc.neg { color: #ffd0c4; }
.sc.zero { color: rgba(255, 248, 238, .75); }
.pill {
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 6px;
  background: #fff;
  line-height: 1.5;
}
.pill.zhuang { color: #b86a00; }
.pill.s0 { color: #c23a2e; }
.pill.s1 { color: #1d5fbf; }
.pill.s2 { color: #1c7a3e; }
.pill.hu { background: #f0b429; color: #6a3b08; }
.pill.ting { background: #ff8a3d; color: #fff; }
.seat.out .who { opacity: .95; }

.mid {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 4px;
  margin: 4px 0;
}
.seat.side {
  width: 70px;
  flex: 0 0 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 0;
}
.seat.side .who {
  flex-direction: column;
  border-radius: 16px;
  padding: 6px 4px;
  width: 100%;
  gap: 3px;
}
.seat.side .nm { font-size: 12px; }
.seat.side .meld-row { justify-content: center; }
.backs {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fff3de;
  font-size: 12px;
  font-weight: 700;
}
.stack { display: inline-flex; }
.stack .tile { margin-left: -8px; }
.stack .tile:first-child { margin-left: 0; }

.center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 4px;
}
.spotlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 86px;
}
.wall {
  font-size: 12px;
  font-weight: 700;
  color: #fff1da;
  background: rgba(0, 0, 0, .22);
  border-radius: 999px;
  padding: 2px 10px;
}
.spotlight .from {
  font-size: 12px;
  color: #ffe7c4;
  font-weight: 700;
}
.seal {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffe7c8;
  border: 2px dashed rgba(255, 231, 200, .45);
  font-weight: 800;
  letter-spacing: .12em;
  font-size: 14px;
}
.rivers {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto minmax(36px, 1fr) auto;
  gap: 3px;
}
.river {
  background: rgba(0, 0, 0, .14);
  border-radius: 8px;
  padding: 3px;
  min-width: 0;
  overflow: auto;
}
.river.opp, .river.mine { grid-column: 1 / -1; }
.river .cap {
  font-size: 10px;
  color: rgba(255, 244, 224, .72);
  margin-bottom: 2px;
}
.river .tiles { display: flex; flex-wrap: wrap; gap: 2px; }

.meld-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  min-height: 0;
}
.meld { display: inline-flex; gap: 1px; }

.me { display: flex; flex-direction: column; min-height: 0; }
.me.live .hand-wrap {
  background: rgba(255, 138, 61, .12);
  border-radius: 14px;
}
.hand-wrap { padding-top: 12px; }
.hand {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 2px;
  padding: 0 2px;
}
.hand .tile {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  max-width: 40px;
  height: 52px;
  overflow: hidden;
}
.ting-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 18px;
  color: #ffe7c4;
  font-size: 11px;
  font-weight: 700;
}
.dock {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 6px;
}
.hint {
  text-align: center;
  color: #fff1dc;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 48px;
  border: 0;
  padding: 0;
  border-radius: 5px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(180deg, #fffefb 0%, #f6e7c8 100%);
  box-shadow: 0 2px 0 #d7b98a, 0 3px 5px rgba(0, 0, 0, .18);
  line-height: 1;
  color: #2b2118;
}
.tile .n, .tile b {
  font-style: normal;
  font-weight: 900;
  font-size: 16px;
}
.tile .u, .tile em {
  font-style: normal;
  font-weight: 800;
  font-size: 10px;
  margin-top: 1px;
}
.hand .tile .n { font-size: clamp(13px, 3.6vw, 18px); }
.hand .tile .u { font-size: clamp(9px, 2.4vw, 12px); }
.suit-wan { color: #c23a2e; }
.suit-tong { color: #1a5fbf; }
.suit-tiao { color: #1c7a3e; }
.tile.back {
  background:
    repeating-linear-gradient(135deg, #1f8f54 0 4px, #167445 4px 8px);
  box-shadow: 0 2px 0 #0c4a2c;
  color: transparent;
}
.tile.mini { width: 18px; height: 26px; border-radius: 3px; }
.tile.mini b { font-size: 10px; }
.tile.mini em { font-size: 7px; }
.tile.tiny { width: 16px; height: 22px; border-radius: 2px; box-shadow: 0 1px 0 #d7b98a; }
.tile.tiny b { font-size: 9px; }
.tile.tiny em { font-size: 7px; }
.tile.big { width: 54px; height: 76px; border-radius: 8px; }
.tile.big .n { font-size: 28px; }
.tile.big .u { font-size: 14px; }
.tile.sel {
  transform: translateY(-12px);
  outline: 2px solid #ff8a3d;
  z-index: 2;
}
.tile.lock { filter: grayscale(.25); opacity: .55; }
.tile.que-break { margin-left: 6px; }
.tile.drawn { margin-left: 8px; }
.tile.fresh { outline: 2px solid #ffb067; }
.tile.hot { outline: 2px solid #ffe08a; }
.tile.win { outline: 2px solid #f0b429; }
.hand .tile.que-tile::after,
.hand .tile.fresh::before {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  top: 3px;
  right: 3px;
}
.hand .tile.que-tile::after { background: #ff8a3d; }
.tile:active { transform: translateY(1px); }
.tile.sel:active { transform: translateY(-10px); }

.toast {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -8px);
  max-width: 80%;
  background: rgba(32, 18, 8, .88);
  color: #fff8ee;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 8;
  text-align: center;
}
.toast.show { opacity: 1; }

.mask {
  position: absolute;
  inset: 0;
  background: rgba(8, 30, 18, .55);
  z-index: 6;
  overflow: auto;
  padding: calc(18px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
}
.netmask { z-index: 7; }
.sheet {
  background: #fff8ee;
  border-radius: 20px;
  padding: 16px 14px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
  border: 1px solid rgba(255, 255, 255, .7);
}
.sheet-top { text-align: center; }
.sheet-top .mp-icon { width: 32px; height: 32px; color: #ff8a3d; }
.sheet-top h2 { margin: 4px 0 0; font-size: 26px; letter-spacing: .04em; }
.sheet-top .delta { margin: 2px 0 0; font-size: 22px; font-weight: 900; color: #e07a20; }
.sheet-top .delta.neg { color: #c23a2e; }
.sheet-top .reason { margin: 2px 0 10px; color: #8d7158; font-size: 13px; }
.prow {
  background: #fff;
  border: 1px solid #f0e0cc;
  border-radius: 14px;
  padding: 8px;
  margin-bottom: 8px;
}
.prow-h {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}
.prow-h b { font-size: 14px; }
.prow-h span {
  flex: 1;
  min-width: 0;
  color: #8d7158;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prow-h em { font-style: normal; font-weight: 900; color: #e07a20; }
.prow-h em.neg { color: #c23a2e; }
.prow-tiles { display: flex; flex-wrap: wrap; gap: 3px; align-items: flex-end; }
.notes {
  background: #fff4e4;
  border-radius: 12px;
  padding: 8px 10px;
  margin: 4px 0 12px;
  max-height: 120px;
  overflow: auto;
}
.notes p { margin: 0 0 4px; font-size: 12px; color: #6d4a2c; line-height: 1.45; }
.notes p:last-child { margin: 0; }
.sheet .btn { margin-top: 4px; }

/* ===== 国风皮肤（默认）：木纹桌面 + 水墨山水 + 米白墨字牌面 + 竹节座位 + 回纹四角 ===== */
.table { position: relative; }
body.skin-gf #app {
  background:
    radial-gradient(120% 42% at 15% 24%, rgba(41, 54, 64, .34) 43%, transparent 46%),
    radial-gradient(135% 38% at 52% 20%, rgba(34, 46, 56, .32) 41%, transparent 44%),
    radial-gradient(120% 42% at 87% 26%, rgba(41, 54, 64, .32) 43%, transparent 46%),
    linear-gradient(180deg, rgba(238, 228, 204, .16), transparent 34%),
    repeating-linear-gradient(92deg, rgba(46, 24, 8, .10) 0 2px, transparent 2px 12px),
    linear-gradient(168deg, #9a6a3c 0%, #7c4f28 52%, #8d5c30 100%);
  box-shadow: inset 0 0 0 8px #523115, inset 0 0 0 12px #8a5a33;
}
body.skin-gf .tile {
  background: linear-gradient(180deg, #faf5e6 0%, #efe4c8 100%);
  box-shadow: 0 2px 0 #c9b790, 0 3px 5px rgba(0, 0, 0, .24);
}
body.skin-gf .suit-wan, body.skin-gf .suit-tong, body.skin-gf .suit-tiao { color: #39322a; }
body.skin-gf .tile.back {
  background: repeating-linear-gradient(135deg, #7d9b62 0 4px, #688450 4px 8px);
  box-shadow: 0 2px 0 #4c6238;
}
body.skin-gf .who, body.skin-gf .me-bar {
  background: repeating-linear-gradient(90deg,
    rgba(231, 238, 206, .93) 0 12px, rgba(209, 220, 176, .93) 12px 14px);
  border: 1.5px solid #9db26f;
  color: #4a4132;
}
body.skin-gf .sc { color: #b3541e; }
body.skin-gf .sc.neg { color: #a33a2c; }
body.skin-gf .wall { background: rgba(58, 34, 12, .35); color: #f4e6c8; }
body.skin-gf .chipbtn { background: rgba(58, 34, 12, .38); }
body.skin-gf .river { background: rgba(58, 34, 12, .18); }
body.skin-gf .av { border: 2px solid #f4e9d2; }
body.skin-gf .pill.zhuang { color: #9a6210; }
body.skin-gf .pill.s0, body.skin-gf .pill.s1, body.skin-gf .pill.s2 { color: #39322a; }

.corner { display: none; }
body.skin-gf .corner {
  display: block;
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(244, 208, 138, .85);
  border-radius: 3px;
  z-index: 3;
  pointer-events: none;
}
body.skin-gf .corner::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid rgba(244, 208, 138, .65);
  border-radius: 2px;
}
.c-tl { top: 10px; left: 10px; }
.c-tr { top: 10px; right: 10px; }
.c-bl { bottom: 10px; left: 10px; }
.c-br { bottom: 10px; right: 10px; }

/* ===== 卷轴结算面板 ===== */
.sheet.scroll {
  background: linear-gradient(180deg, #f8f0da 0%, #f3e7c8 60%, #eee0bc 100%);
  border: 1px solid #d9c294;
  border-radius: 8px;
  position: relative;
  animation: unfurl .3s cubic-bezier(.25, .9, .3, 1) both;
  transform-origin: 50% 100%;
}
.sheet.scroll::before, .sheet.scroll::after {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  height: 18px;
  background: linear-gradient(180deg, #8a5a33, #5d3b1c);
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(30, 10, 0, .4);
}
.sheet.scroll::before { top: -10px; }
.sheet.scroll::after { bottom: -10px; }
@keyframes unfurl {
  from { transform: scaleY(.08); opacity: .25; }
  to { transform: scaleY(1); opacity: 1; }
}
.brush {
  font-family: "Xingkai SC", "STXingkai", "Kaiti SC", "STKaiti", "KaiTi", "FangSong", serif;
  letter-spacing: .22em;
  font-size: 32px;
  color: #33291d;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}
.sheet.scroll .sheet-top .delta { color: #c3272b; }
.sheet.scroll .sheet-top .delta.neg { color: #a01f22; }
.sheet.scroll .sheet-top .reason { color: #8a734e; }

/* ===== 流局查叫 / 查花猪 赔付明细 ===== */
.settle {
  background: rgba(255, 250, 236, .78);
  border: 1px dashed #cbb17f;
  border-radius: 10px;
  padding: 8px 10px;
  margin: 4px 0 8px;
}
.settle-h {
  font-size: 13px;
  font-weight: 900;
  color: #7c5a26;
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.sline {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #5c4a30;
  padding: 4px 0;
  border-bottom: 1px solid rgba(160, 120, 60, .16);
  flex-wrap: wrap;
}
.sline:last-of-type { border-bottom: 0; }
.sline .tag {
  font-size: 10px;
  font-weight: 900;
  border-radius: 4px;
  padding: 1px 5px;
  background: #e7d7b4;
  color: #6b532c;
  flex: 0 0 auto;
}
.sline.pig .tag { background: #c3272b; color: #fff; }
.sline b { font-size: 12px; }
.sline .arr { color: #8a734e; }
.sline em { font-style: normal; margin-left: auto; font-weight: 800; color: #a05a1a; }
.sline.pig em { color: #c3272b; }
.stotal { margin-top: 6px; font-size: 12px; font-weight: 900; color: #7c5a26; }
.pill.pig { background: #c3272b; color: #fff; }
.prow.ispig { border-color: #e4b6ad; background: #fdf1ee; }
.prow.ispig .prow-h b { color: #a01f22; }

/* ===== 结算关闭后的操作条 ===== */
.endbar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
  z-index: 5;
}
.endbar .btn { flex: 1; }

/* ===== 换三张方向动画 ===== */
.swapfx {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 6;
  pointer-events: none;
}
.swapfx .mp-icon {
  width: 76px;
  height: 76px;
  color: #ffe6b0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45));
}
.swapfx span {
  background: rgba(0, 0, 0, .42);
  color: #ffe6b0;
  padding: 7px 20px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .22em;
}
.swapfx .fx-cw { animation: fxspin 1.3s linear infinite; }
.swapfx .fx-ccw { animation: fxspinr 1.3s linear infinite; }
.swapfx .fx-dui { animation: fxbob .65s ease-in-out infinite alternate; }
@keyframes fxspin { to { transform: rotate(360deg); } }
@keyframes fxspinr { to { transform: rotate(-360deg); } }
@keyframes fxbob { from { transform: translateY(-9px); } to { transform: translateY(9px); } }
.swap-tag {
  align-self: center;
  padding: 0 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, .25);
  color: #ffe7c8;
  font-size: 13px;
  font-weight: 800;
  flex: 0 0 auto;
}

/* ===== 分段选择（皮肤 / 换三张方向） ===== */
.setrow { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; }
.setrow .setlab { font-size: 13px; font-weight: 800; color: #6d4a2c; flex: 0 0 auto; }
.seg { display: flex; flex: 1; background: #f4e7cd; border-radius: 10px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1;
  border: 0;
  border-radius: 8px;
  min-height: 34px;
  background: transparent;
  color: #8d7158;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
}
.seg button.on { background: #ff8a3d; color: #fff; box-shadow: 0 2px 6px rgba(200, 94, 22, .4); }
.seg button:active { transform: scale(.97); }

/* ===== 安装包版本条 ===== */
.verbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffe7c8;
  font-size: 12px;
  font-weight: 700;
  flex-wrap: wrap;
}
.verbtn {
  border: 1.5px solid rgba(255, 231, 200, .7);
  background: transparent;
  color: #ffe7c8;
  border-radius: 999px;
  min-height: 32px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
}
.verbtn.new { background: #ff8a3d; border-color: #ff8a3d; color: #fff; }
.verbtn:active { transform: scale(.96); }

/* ===== iOS 安装三步引导 ===== */
.steps { margin: 10px 0 6px; display: flex; flex-direction: column; gap: 10px; }
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid #f0e0cc;
}
.step .no {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ff8a3d;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  flex: 0 0 auto;
}
.step .mp-icon { width: 26px; height: 26px; color: #e07a20; flex: 0 0 auto; }
.step p { margin: 0; font-size: 14px; font-weight: 700; color: #5c4a30; }

@media (max-height: 700px) {
  .plaque h1 { font-size: 32px; }
  .fan { height: 62px; }
  .home { gap: 10px; justify-content: flex-start; }
  .spotlight { min-height: 72px; }
  .hand .tile { height: 46px; }
  .brush { font-size: 27px; }
}

/* ===== 牌桌：按参考图的庭院牌桌 ===== */
#app.on-table, body.skin-gf #app.on-table, body.skin-simple #app.on-table {
  background:
    radial-gradient(ellipse at 50% 46%, rgba(80, 180, 120, .35), transparent 62%) 0 calc(min(100vw, 520px) * .39) / 100% 100% no-repeat,
    linear-gradient(180deg, #0f7048 0%, #0a5236 100%) 0 calc(min(100vw, 520px) * .39) / 100% 100% no-repeat,
    url("images/gen/gptimg_1795563560_look.png") top center / 100% auto no-repeat,
    #0a5236;
  box-shadow: none;
}
.on-table .table { padding: calc(10px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom)); }
.on-table .corner { display: none; }
.on-table .who, .on-table .me-bar { background: rgba(10, 30, 20, .62); border: 1.5px solid rgba(244, 208, 138, .55); color: #fff6e2; }
.on-table .sc, .on-table .sc.zero { color: #ffe08a; }
.on-table .river { background: rgba(0, 0, 0, .16); }
.on-table .wall { background: rgba(10, 30, 20, .7); border: 1px solid rgba(244, 208, 138, .4); color: #ffe08a; font-size: 13px; }
.on-table .tile {
  background: linear-gradient(180deg, #fffdf6 0%, #efe6cf 100%);
  box-shadow: 0 3px 0 #2fa65c, 0 4px 6px rgba(0, 0, 0, .32);
}
.on-table .tile.back {
  background: linear-gradient(180deg, #46c46a 0%, #26a04c 100%);
  box-shadow: 0 2px 0 #e9e4d0, 0 3px 4px rgba(0, 0, 0, .3);
}
.on-table .hand { gap: 3px; }
.on-table .hand .tile { height: 64px; max-width: 42px; border-radius: 6px; }
.on-table .hand .tile .n { font-size: clamp(15px, 4.4vw, 22px); }
.on-table .hand .tile .u { font-size: clamp(11px, 3vw, 15px); }
.on-table .tile.sel { transform: translateY(-14px); outline: 2px solid #ffb347; }
.on-table .me.live .hand-wrap { background: rgba(255, 190, 90, .14); }
.on-table .dock { min-height: 0; padding: 6px 4px 2px; background: rgba(40, 22, 10, .55); border-radius: 18px; }
.on-table .btn-row, .on-table .que-row { justify-content: center; gap: 10px; }
.on-table .dock .btn { min-width: 66px; height: 50px; font-size: 22px; font-weight: 900; border-radius: 14px; }
.on-table .dock .btn.gold { box-shadow: 0 0 0 2px #ffb347, 0 0 14px rgba(255, 170, 60, .75); }
.on-table .dock .hint { font-size: 12px; }
