/* 郝主席麻将 · 牌桌 v2：照《欢乐麻将》参考图（2344×2156）重做，换算到 1280×800 舞台
   取色：房间浅蓝 #cfe0f2→#9fbde3；桌框深蓝 #22344c/#2d4560 加金色饰角；台面青绿 #3f9a98→#2c7c7d；牌背绿 #33a554→#1f7d3b；
   转盘深青 #1b4c58，四段环色：下黄 #f3c94a、右蓝 #3da6ea、上绿 #57cf86、左红（轮到谁哪段变红） */

/* —— 牌（覆盖旧样式）：浅灰白牌面，绿色牌背做厚度 —— */
.tile { position: relative; flex: none; border-radius: calc(var(--w) * .1); width: var(--w); height: calc(var(--w) * 1.36);
  background: linear-gradient(180deg, #fbfbf7 0%, #f1f1ea 75%, #e2e2d8 100%);
  box-shadow: 0 calc(var(--w) * .09) 0 #2b9a4b, 0 calc(var(--w) * .09) 0 1px #1d7436, 0 calc(var(--w) * .11 + 2px) 4px rgba(0, 0, 0, .3); }
.tile img { position: absolute; left: 6%; top: 5%; width: 88%; height: 90%; pointer-events: none; }
.tile.back { background: linear-gradient(180deg, #45bb67 0%, #2fa152 60%, #23843f 100%); box-shadow: 0 calc(var(--w) * .09) 0 #f3f3ec, 0 calc(var(--w) * .09) 0 1px #c9c9bd, 0 calc(var(--w) * .11 + 2px) 4px rgba(0, 0, 0, .3); }
.tile.back::after { content: none; }
.tile.side { width: calc(var(--w) * 1.36); height: var(--w); }
.tile.side img { left: 50%; top: 50%; width: calc(var(--w) * .88); height: calc(var(--w) * 1.22); transform: translate(-50%, -50%) rotate(var(--rot, 90deg)); }
.tile.flip img { transform: rotate(180deg); }
.tile.hl { outline: 3px solid #ffd25c; outline-offset: 1px; }
.tile .mark { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); width: 22px; height: 26px; border: none;
  background: radial-gradient(circle at 40% 30%, #ffd8a0, #ff8a1a 60%, #e05a00); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); animation: bob .8s ease-in-out infinite alternate; filter: none; }

/* —— 房间背景（浅蓝、模糊格子地面） —— */
#table { background: #b9d0ec; }
.room-bg { position: absolute; inset: 0; background:
  radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%),
  repeating-linear-gradient(90deg, rgba(255, 255, 255, .18) 0 60px, rgba(255, 255, 255, 0) 60px 120px),
  repeating-linear-gradient(0deg, rgba(255, 255, 255, .14) 0 60px, rgba(255, 255, 255, 0) 60px 120px),
  linear-gradient(180deg, #dbe7f5 0%, #c3d6ee 45%, #9fbde3 100%); filter: blur(2px); }
.room-bg::before, .room-bg::after { content: ""; position: absolute; top: 60px; width: 220px; height: 320px; border-radius: 40px; background: radial-gradient(ellipse at 50% 40%, rgba(255, 220, 120, .55), rgba(255, 255, 255, 0) 70%); filter: blur(18px); }
.room-bg::before { left: -60px; } .room-bg::after { right: -60px; }

/* —— 透视台面 —— */
/* 近边（下沿）保持原大，远边按透视缩小：按参考图桌框上沿 y≈120、下沿 y≈730、远近宽度比约 0.68 反算 */
#board-wrap { position: absolute; left: 50%; top: -90px; width: 1200px; height: 820px; margin-left: -600px; perspective: 720px; perspective-origin: 50% 100%; pointer-events: none; transform: scale(1.2); transform-origin: 50% 100%; }
#board { position: absolute; inset: 0; transform-origin: 50% 100%; transform: rotateX(24.4deg); transform-style: preserve-3d; }
.frame { position: absolute; inset: 0; border-radius: 26px; background: linear-gradient(180deg, #2d4560, #22344c 60%, #1b2a3e); box-shadow: 0 30px 50px rgba(20, 40, 70, .45), inset 0 0 0 3px #3e5878; }
.corner { position: absolute; width: 120px; height: 70px; border: 7px solid #e8c15a; border-radius: 6px; }
.corner::after { content: ""; position: absolute; width: 60px; height: 34px; border: 3px solid #f6dc8a; border-radius: 4px; }
.corner.tl { left: 8px; top: 8px; border-right: none; border-bottom: none; } .corner.tl::after { left: 10px; top: 10px; border-right: none; border-bottom: none; }
.corner.tr { right: 8px; top: 8px; border-left: none; border-bottom: none; } .corner.tr::after { right: 10px; top: 10px; border-left: none; border-bottom: none; }
.corner.bl { left: 8px; bottom: 8px; border-right: none; border-top: none; } .corner.bl::after { left: 10px; bottom: 10px; border-right: none; border-top: none; }
.corner.br { right: 8px; bottom: 8px; border-left: none; border-top: none; } .corner.br::after { right: 10px; bottom: 10px; border-left: none; border-top: none; }
.felt3 { position: absolute; left: 34px; top: 34px; right: 34px; bottom: 34px; border-radius: 10px; overflow: hidden;
  background: radial-gradient(ellipse 70% 60% at 50% 48%, #449f9c 0%, #3b918f 45%, #2f807f 80%, #2a7475 100%); box-shadow: inset 0 0 30px rgba(0, 30, 40, .35); }
.felt3 .ln { position: absolute; border: 2px solid rgba(255, 255, 255, .13); border-radius: 6px; }
.felt3 .dia { position: absolute; left: 50%; top: 48%; width: 380px; height: 380px; transform: translate(-50%, -50%) rotate(45deg); background: rgba(10, 60, 66, .14); border-radius: 18px; }
.felt3 .wm { position: absolute; left: 268px; top: 540px; padding: 4px 12px; border: 2px solid rgba(0, 40, 46, .28); border-radius: 4px; font-size: 30px; font-weight: 900; letter-spacing: 4px; color: rgba(0, 40, 46, .32); font-family: "Kaiti SC", "STKaiti", "KaiTi", serif; }
/* 牌墙：绿背、两层 */
.w3 { position: absolute; display: flex; }
.w3.h { height: 52px; } .w3.v { width: 52px; flex-direction: column; }
.w3 .stk { position: relative; flex: none; }
.w3.h .stk { width: 36px; height: 52px; } .w3.v .stk { width: 52px; height: 29px; }
.w3 .stk i { position: absolute; border-radius: 4px; background: linear-gradient(180deg, #45bb67, #2a9a4b); box-shadow: 0 5px 0 #f1f1ea, 0 5px 0 1px #bdbdb0; }
.w3.h .stk i { left: 1px; right: 1px; height: 40px; } .w3.h .stk i.lo { top: 9px; } .w3.h .stk i.hi { top: 0; }
.w3.v .stk i { top: 1px; bottom: 4px; width: 42px; } .w3.v .stk i.lo { left: 8px; } .w3.v .stk i.hi { left: 2px; top: -4px; }
.w3 .stk.H i { background: linear-gradient(180deg, #ffbf6a, #e38a2c); }
.w3 .stk.T i { background: linear-gradient(180deg, #a596d6, #7262b0); }
/* 对手立着的手牌与碰杠 */
.oh { position: absolute; display: flex; align-items: center; gap: 1px; }
.oh .gap { width: 12px; height: 12px; flex: none; }
.oh .meld { display: flex; gap: 0; margin: 0 6px; flex: none; }
.stand { flex: none; border-radius: 4px; background: linear-gradient(180deg, #f6f6f0, #e4e4da); box-shadow: inset 0 -8px 0 #2fa152, 0 3px 0 #1f7d3b, 0 4px 6px rgba(0, 0, 0, .3); }
.oh.h .stand { width: 38px; height: 48px; }
.oh.v .stand { width: 44px; height: 30px; box-shadow: inset 8px 0 0 #2fa152, 2px 2px 0 #1f7d3b, 0 4px 6px rgba(0, 0, 0, .3); }
.oh.v.r .stand { box-shadow: inset -8px 0 0 #2fa152, -2px 2px 0 #1f7d3b, 0 4px 6px rgba(0, 0, 0, .3); }
/* 河 */
.rv { position: absolute; display: flex; flex-wrap: wrap; }
/* 中央方位转盘 */
#disc { position: absolute; left: 500px; top: 326px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #2d6a74 0%, #1c4f5b 55%, #143d48 100%); box-shadow: 0 0 0 6px rgba(160, 230, 230, .25), 0 0 0 9px #0f3440, 0 10px 24px rgba(0, 0, 0, .45); }
#disc .ring { position: absolute; inset: 6px; border-radius: 50%; }
#disc .seg { position: absolute; inset: 0; border-radius: 50%; }
#disc .wind { position: absolute; width: 60px; height: 60px; display: grid; place-items: center; font-size: 40px; font-weight: 900; color: #0c2a33; font-family: "Kaiti SC", "STKaiti", "KaiTi", serif; text-shadow: 0 1px 0 rgba(255, 255, 255, .25); }
#disc .wind.on { color: #fff; text-shadow: 0 0 10px rgba(255, 255, 255, .7); }
#disc .w0 { left: 70px; bottom: 2px; } #disc .w2 { left: 70px; top: 2px; transform: rotate(180deg); }
#disc .w1 { right: 2px; top: 70px; transform: rotate(-90deg); } #disc .w3 { left: 2px; top: 70px; transform: rotate(90deg); }
#disc .core { position: absolute; left: 50px; top: 50px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #2f7680, #174552 75%); box-shadow: inset 0 0 14px rgba(0, 0, 0, .5), 0 0 0 2px rgba(120, 220, 220, .25); display: grid; place-items: center; text-align: center; }
#disc .core b { display: block; font-size: 54px; line-height: 54px; font-weight: 900; color: #7ef2e8; text-shadow: 0 0 14px rgba(126, 242, 232, .7); font-family: "DIN Alternate", "Arial Rounded MT Bold", sans-serif; }
#disc .core small { display: block; font-size: 17px; color: #bff8f2; font-weight: 800; letter-spacing: 2px; }
#under-disc { position: absolute; left: 400px; top: 556px; width: 400px; text-align: center; font-size: 30px; font-weight: 800; color: rgba(0, 40, 46, .45); letter-spacing: 2px; }
.dice2 { position: absolute; left: 538px; top: 380px; z-index: 5; display: flex; gap: 10px; }
.dice2 .die { width: 52px; height: 52px; border-radius: 10px; }
.dice2 .die i { width: 10px; height: 10px; }

/* —— 左上：退出、时间、余牌、楼数；右上：每局详情、菜单 —— */
#tl2 { position: absolute; left: 30px; top: 12px; display: flex; gap: 10px; align-items: center; z-index: 20; }
#tr2 { position: absolute; right: 26px; top: 12px; display: flex; gap: 12px; z-index: 20; }
#br2 { position: absolute; right: 26px; top: 552px; display: flex; flex-direction: column; gap: 12px; z-index: 20; }
.cbtn { width: 58px; height: 58px; border-radius: 50%; padding: 0; display: grid; place-items: center; font-size: 28px;
  background: radial-gradient(circle at 40% 30%, #6b8fb3, #3d5f85 60%, #2c4a6d); box-shadow: 0 0 0 3px rgba(255, 255, 255, .35), 0 4px 10px rgba(0, 0, 0, .3); }
.cbtn svg { width: 32px; height: 32px; }
.cbtn.big { width: 62px; height: 62px; background: radial-gradient(circle at 40% 30%, #4f6f7f, #2c4652 70%); }
.cbtn.on { background: radial-gradient(circle at 40% 30%, #ffd0a0, #ff7a3a 60%, #c4400a); }
.pbox { height: 40px; padding: 0 12px; border-radius: 8px; background: rgba(40, 50, 70, .62); color: #fff; font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 6px; font-family: "DIN Alternate", "PingFang SC", sans-serif; }
.pbox .tico { width: 16px; height: 22px; border-radius: 3px; background: linear-gradient(180deg, #45bb67, #23843f); box-shadow: 0 2px 0 #f1f1ea; }
.pbox.gold { background: linear-gradient(180deg, #ffe48a, #f5b82a); color: #6b3a00; font-weight: 900; font-family: "PingFang SC", sans-serif; box-shadow: 0 2px 0 #b9730a; }
#menu { left: auto; right: 26px; top: 80px; }

/* —— 头像：方框＋分数条（对手）；我在左下：状态、头像、庄、分数 —— */
.seat2 { position: absolute; z-index: 12; display: flex; flex-direction: column; align-items: center; font-family: var(--font-round); }
.seat2[data-pos="2"] { left: 818px; top: 6px; }
.seat2[data-pos="3"] { left: 24px; top: 300px; }
.seat2[data-pos="1"] { left: 1166px; top: 300px; }
.seat2.me { left: 36px; top: 500px; }
.seat2 .av2 { position: relative; width: 82px; height: 82px; border: 3px solid #8aa0b8; background: #dfe8f2; display: grid; place-items: center; font-size: 52px; box-shadow: 0 3px 8px rgba(0, 0, 0, .3); }
.seat2 .av2 .av-img { border-radius: 0; }
.seat2.turn .av2 { border-color: #ff8a3a; box-shadow: 0 0 0 3px #ffb070, 0 0 18px 4px rgba(255, 140, 60, .8); }
.seat2 .sc { min-width: 82px; padding: 1px 6px 2px; text-align: center; background: rgba(40, 50, 70, .72); color: #fff; font-size: 19px; font-weight: 700; font-family: "DIN Alternate", "PingFang SC", sans-serif; }
.seat2 .nm2 { font-size: 13px; color: #fff; background: rgba(40, 50, 70, .55); padding: 0 6px; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat2 .zh { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 4px; background: linear-gradient(180deg, #ffd27a, #f08a1a); color: #fff; font-size: 16px; font-weight: 900; display: grid; place-items: center; border: 1px solid #fff3c0; }
.seat2 .st { padding: 1px 10px; background: rgba(30, 40, 60, .78); color: #fff; font-size: 16px; font-weight: 800; margin-bottom: 3px; letter-spacing: 2px; }
.seat2 .st.ming { background: linear-gradient(180deg, #ff7a5a, #e0301e); }
.seat2 .tg { position: absolute; left: -6px; top: -10px; font-size: 12px; padding: 0 6px; border-radius: 6px; color: #fff; font-weight: 800; z-index: 2; }
.seat2 .tg.off { background: #e2453a; } .seat2 .tg.auto { background: #f2701f; }

/* —— 我的手牌（2D，在台面前沿） —— */
#my-hand { position: absolute; left: 150px; right: 120px; top: 676px; height: 116px; display: flex; align-items: flex-end; justify-content: flex-start; z-index: 10; }
#my-melds { position: absolute; left: 150px; top: 610px; height: 60px; display: flex; gap: 10px; align-items: flex-end; z-index: 10; }
#my-melds .meld { display: flex; }
#my-hand .htile { cursor: pointer; transition: transform .1s; margin-right: 1px; border-top: 7px solid #2fa152; border-radius: 8px; }
#my-hand .htile:hover { transform: translateY(-6px); }
#my-hand .htile.sel { transform: translateY(-22px); }
#my-hand .htile.drawn { margin-left: 18px; }
#my-hand .htile.rev::after { content: "亮"; position: absolute; right: -4px; top: -10px; font-size: 12px; font-weight: 900; color: #fff; background: #e0301e; border-radius: 6px; padding: 0 4px; border: 1px solid #fff; }
#my-hand .htile .jian { position: absolute; left: 50%; top: -34px; transform: translateX(-50%); width: 28px; height: 28px; display: grid; place-items: center; font-size: 13px; font-weight: 900; color: #7a4a00;
  background: linear-gradient(180deg, #fff2b0, #ffcf3a); clip-path: polygon(50% 0, 100% 40%, 82% 100%, 18% 100%, 0 40%); filter: drop-shadow(0 0 6px rgba(255, 220, 90, .9)); }
#my-hand.locked .htile { cursor: default; }
#my-hand.locked .htile:hover { transform: none; }

/* —— 圆形按钮：胡（红）、过（青玻璃）、碰杠（金）、明拎（绿）、摸牌（青） —— */
#actions { position: absolute; left: 0; right: 120px; top: 538px; height: 116px; display: flex; justify-content: flex-end; align-items: center; gap: 22px; z-index: 12; pointer-events: none; padding-right: 30px; }
.rbtn { pointer-events: auto; position: relative; width: 108px; height: 108px; border-radius: 50%; padding: 0; font-size: 50px; font-weight: 900; color: #fff;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif; text-shadow: 0 3px 0 rgba(0, 0, 0, .25); box-shadow: 0 8px 14px rgba(0, 0, 0, .35), inset 0 -6px 12px rgba(0, 0, 0, .2), inset 0 6px 10px rgba(255, 255, 255, .5); transition: transform .08s; }
.rbtn:active { transform: scale(.94); }
.rbtn::before { content: ""; position: absolute; left: 18%; right: 18%; top: 8%; height: 34%; border-radius: 50%; background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0)); }
.rbtn small { position: absolute; left: 0; right: 0; bottom: 14px; font-size: 13px; font-family: "PingFang SC", sans-serif; letter-spacing: 1px; }
.rbtn.hu { background: radial-gradient(circle at 45% 40%, #ff8a7a 0%, #ec3b33 55%, #b8141a 100%); }
.rbtn.pass { background: radial-gradient(circle at 45% 40%, #c8fbf6 0%, #5fd0cf 45%, #208d98 100%); color: #f4fffe; }
.rbtn.gold { background: radial-gradient(circle at 45% 40%, #fff3b0 0%, #ffcf3a 50%, #e09612 100%); color: #fff; text-shadow: 0 2px 0 #a8600a; }
.rbtn.ting { background: radial-gradient(circle at 45% 40%, #d6ffe6 0%, #57d39a 50%, #13906a 100%); }
.rbtn.mo { background: radial-gradient(circle at 45% 40%, #e0f4ff 0%, #6ab8f0 50%, #2a6fc0 100%); }
#actions .claim-tile { pointer-events: none; margin-right: 4px; }
#actions .tip { pointer-events: none; color: #fff; font-size: 18px; font-weight: 800; text-shadow: 0 2px 4px rgba(0, 0, 0, .6); }
#tenpai-tip { position: absolute; left: 150px; top: 616px; z-index: 12; background: rgba(20, 40, 50, .78); border-radius: 12px; padding: 4px 12px; display: flex; gap: 6px; align-items: center; font-size: 15px; font-weight: 800; white-space: nowrap; color: #fff; }
#tenpai-tip.with-melds { left: auto; right: 160px; }
#center-msg { position: absolute; left: 50%; top: 92px; transform: translateX(-50%); z-index: 15; font-size: 18px; font-weight: 800; color: #fff; text-shadow: 0 2px 4px rgba(0, 0, 0, .6); white-space: nowrap; pointer-events: none; background: rgba(20, 40, 60, .45); padding: 4px 16px; border-radius: 16px; }
#center-msg:empty { display: none; }
.roll-btn { position: absolute; left: 50%; top: 470px; transform: translateX(-50%); z-index: 15; }
.haidi-pick { position: absolute; left: 50%; top: 420px; transform: translateX(-50%); z-index: 15; display: flex; gap: 14px; align-items: center; background: rgba(10, 30, 36, .85); padding: 10px 16px; border-radius: 16px; color: #fff; }

/* 托管：底部金色“取消托管”＋说明（参考图） */
#btn-tuoguan { position: static; width: 62px; height: 62px; border: none; font-size: 28px; }
#tuoguan-mask { position: absolute; left: 0; right: 0; top: 690px; bottom: 0; height: auto; z-index: 13; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 6px; background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .35)); }
.gold-btn { padding: 10px 26px; border-radius: 10px; font-size: 22px; font-weight: 800; color: #7a3e00; background: linear-gradient(180deg, #ffe58a, #f5b82a); box-shadow: 0 3px 0 #b9730a, 0 6px 12px rgba(0, 0, 0, .3); }
.tg-note { margin-top: 8px; font-size: 16px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
#reopen-result { top: 470px; }

/* 结算与每局详情 */
.calc { margin: 6px auto 4px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; font-size: 16px; font-weight: 800; color: #5a3a1a; }
.calc .chip { padding: 3px 10px; border-radius: 10px; background: #fff; border: 2px solid #f0d9a8; }
.calc .chip b { color: #e0301e; }
.calc .chip.floor { background: #fff4cf; border-color: #f5b82a; }
.calc .op { color: #a08a6a; }
.calc .eq { font-size: 22px; color: #e0301e; }
.rec-list { max-height: 540px; overflow: auto; text-align: left; }
.rec-item { background: #fff; border-radius: 14px; padding: 8px 12px; margin-bottom: 8px; border: 2px solid #f3e4c4; }
.rec-item .rh { display: flex; justify-content: space-between; align-items: center; font-weight: 900; font-size: 16px; }
.rec-item .rh em { font-style: normal; color: #a08a6a; font-size: 13px; font-weight: 700; margin-left: 8px; }
.rec-item .rb { font-size: 14px; color: #5a3a1a; line-height: 1.7; margin-top: 4px; }
.rec-item .rb b { color: #e0301e; }
.rec-item table { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 14px; }
.rec-item td, .rec-item th { text-align: center; padding: 2px 4px; border-top: 1px dashed #eadcbc; }
.rec-item .pos { color: #2fae45; font-weight: 800; } .rec-item .neg { color: #e2453a; font-weight: 800; }
.act-fx.floor { font-size: 110px; background-image: linear-gradient(180deg, #fffbe6 0%, #ffe066 40%, #ffb000 75%, #e07a00 100%); -webkit-text-stroke: 4px #6a3000; }

.res-pays { font-size: 15px; }
.rule-sum { font-size: 12px; line-height: 1.45; margin: 4px 0 4px; }
.rule-sum div { padding: 2px 0; }
#lobby .opt-row { margin-top: 4px; }

/* ===== 牌身 v3：照参考图的立体感——浅灰白牌面带圆角高光，下面白色牌身，最底绿色牌背 ===== */
.tile { border-radius: calc(var(--w) * .13);
  background: linear-gradient(180deg, #fbfbf8 0%, #f1f1ec 45%, #e4e4dc 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .95), inset 0 -3px 5px rgba(90, 90, 70, .16), inset 2px 0 2px rgba(255, 255, 255, .6), inset -2px 0 3px rgba(90, 90, 70, .10),
    0 calc(var(--w) * .07) 0 #d8d8cf, 0 calc(var(--w) * .07) 0 1px #bdbdb2,
    0 calc(var(--w) * .07 + var(--w) * .06) 0 #2f9c4f, 0 calc(var(--w) * .07 + var(--w) * .06) 0 1px #1f7438,
    0 calc(var(--w) * .16 + 3px) calc(var(--w) * .08) rgba(0, 20, 20, .35); }
.tile img { left: 7%; top: 6%; width: 86%; height: 88%; }
.tile.side img { width: calc(var(--w) * .86); height: calc(var(--w) * 1.2); }
.tile.back { background: linear-gradient(180deg, #4cc06c 0%, #34a957 45%, #24873f 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -3px 5px rgba(0, 40, 10, .25),
    0 calc(var(--w) * .07) 0 #f0f0ea, 0 calc(var(--w) * .07) 0 1px #c4c4b8, 0 calc(var(--w) * .1 + 3px) calc(var(--w) * .08) rgba(0, 20, 20, .35); }
/* 我的手牌：立着的牌，正面朝我；顶上露一条绿色牌背 */
#my-hand .htile { border-top: none; border-radius: 10px;
  background: linear-gradient(180deg, #fafaf6 0%, #efefe9 55%, #dededa 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .95), inset 0 -6px 8px rgba(80, 80, 60, .18), inset 3px 0 3px rgba(255, 255, 255, .55), inset -3px 0 4px rgba(80, 80, 60, .12),
    0 -4px 0 #33a656, 0 -4px 0 1px #1f7a3c, 0 6px 10px rgba(0, 20, 30, .45); }
#my-hand .htile img { top: 7%; height: 86%; }
/* ===== 牌墙 v3：照参考图——绿色牌背朝上，侧面白色牌身，两层之间一道细线 ===== */
.w3 .stk i { border-radius: 5px; background: linear-gradient(180deg, #5ccd7b 0%, #39b05c 40%, #26903f 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -2px 3px rgba(0, 40, 10, .3), 0 6px 0 #f2f2ec, 0 6px 0 1px #c8c8bc, 0 8px 0 #2a8e46; }
.w3 .stk i.hi { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -2px 3px rgba(0, 40, 10, .3), 0 6px 0 #f2f2ec, 0 7px 0 #9a9a90, 0 13px 0 #eaeae2, 0 13px 0 1px #c0c0b4, 0 15px 0 #2a8e46, 0 18px 6px rgba(0, 20, 20, .3); }
.w3.h .stk i { height: 34px; } .w3.h .stk i.lo { top: 9px; } .w3.h .stk i.hi { top: 2px; }
.w3.v .stk i { height: auto; }
.w3 .stk.H i { background: linear-gradient(180deg, #ffd08a 0%, #f2a64a 45%, #d9822a 100%); }
.w3 .stk.T i { background: linear-gradient(180deg, #b8aae4 0%, #9484cc 45%, #6f60ad 100%); }
/* 对手立着的手牌：看到的是绿色牌背，顶上一道白边 */
.stand { background: linear-gradient(180deg, #4fc370 0%, #34a957 50%, #23883e 100%); box-shadow: inset 0 6px 0 #f3f3ec, inset 0 7px 0 #b9b9ad, 0 3px 0 #1c6e34, 0 5px 8px rgba(0, 20, 20, .35); border-radius: 5px; }
.oh.v .stand { box-shadow: inset 7px 0 0 #f3f3ec, inset 8px 0 0 #b9b9ad, 2px 3px 0 #1c6e34, 0 5px 8px rgba(0, 20, 20, .35); }
.oh.v.r .stand { box-shadow: inset -7px 0 0 #f3f3ec, inset -8px 0 0 #b9b9ad, -2px 3px 0 #1c6e34, 0 5px 8px rgba(0, 20, 20, .35); }
/* 牌面颜色照参考图调成浅灰 */
.tile, #my-hand .htile { background: linear-gradient(180deg, #f4f4f0 0%, #e8e8e3 45%, #d8d8d1 100%); }

/* ===== 牌身 v4：加厚加倒角（照参考图量得：白色牌身约 0.3 倍牌宽、绿色牌背约 0.1 倍，右下有投影） ===== */
.tile { border-radius: calc(var(--w) * .12);
  background: linear-gradient(180deg, #f7f7f3 0%, #eeeee9 50%, #e1e1da 100%);
  box-shadow:
    inset 0 2px 0 #ffffff, inset 0 -3px 3px rgba(80, 80, 60, .10), inset 0 0 0 1px rgba(140, 140, 120, .35),
    0 1px 0 #ffffff,
    0 calc(var(--w) * .07) 0 #eeeee8, 0 calc(var(--w) * .14) 0 #e4e4dc, 0 calc(var(--w) * .21) 0 #d9d9d0, 0 calc(var(--w) * .28) 0 #cdcdc3,
    0 calc(var(--w) * .28) 0 1px #b4b4a8,
    0 calc(var(--w) * .33) 0 #33a656, 0 calc(var(--w) * .40) 0 #23843f, 0 calc(var(--w) * .40) 0 1px #17642c,
    calc(var(--w) * .10) calc(var(--w) * .46) calc(var(--w) * .14) rgba(0, 25, 25, .38); }
.rv .tile { margin: 0 1px calc(var(--w) * .42) 0; }
.oh .meld .tile { margin-bottom: calc(var(--w) * .4); }
.tile.back { background: linear-gradient(180deg, #52c674 0%, #37ad5a 50%, #25893f 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -3px 4px rgba(0, 40, 10, .3), inset 0 0 0 1px rgba(10, 70, 30, .5),
    0 calc(var(--w) * .07) 0 #f2f2ec, 0 calc(var(--w) * .14) 0 #e6e6de, 0 calc(var(--w) * .21) 0 #d8d8cf, 0 calc(var(--w) * .21) 0 1px #b4b4a8,
    calc(var(--w) * .08) calc(var(--w) * .3) calc(var(--w) * .12) rgba(0, 25, 25, .38); }
/* 我手里立着的牌：明显倒角——顶边亮、底边和右边暗，顶上露绿色牌背，底下投影 */
#my-hand .htile { border-radius: 11px; background: linear-gradient(180deg, #f6f6f2 0%, #ebebe6 40%, #dcdcd5 85%, #d0d0c8 100%);
  box-shadow: inset 0 5px 4px -2px rgba(255, 255, 255, .95), inset 0 -12px 12px -6px rgba(70, 70, 50, .28),
    inset 5px 0 5px -3px rgba(255, 255, 255, .75), inset -6px 0 7px -4px rgba(70, 70, 50, .25), inset 0 0 0 1px rgba(110, 110, 90, .45),
    0 -5px 0 #36aa59, 0 -5px 0 1px #1d7a3b, 0 -9px 0 #2a944a,
    4px 10px 14px rgba(0, 15, 25, .55); }
/* 牌墙加厚 */
.w3 .stk i { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), inset 0 -3px 4px rgba(0, 40, 10, .3), inset 0 0 0 1px rgba(10, 70, 30, .45),
  0 5px 0 #f2f2ec, 0 10px 0 #dcdcd3, 0 10px 0 1px #b4b4a8, 0 13px 0 #2a8e46, 4px 16px 8px rgba(0, 25, 25, .35); }
.w3 .stk i.hi { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), inset 0 -3px 4px rgba(0, 40, 10, .3), inset 0 0 0 1px rgba(10, 70, 30, .45),
  0 5px 0 #f2f2ec, 0 10px 0 #dcdcd3, 0 11px 0 #8f8f86, 0 16px 0 #eeeee7, 0 21px 0 #d8d8cf, 0 21px 0 1px #b4b4a8, 0 24px 0 #2a8e46, 4px 27px 9px rgba(0, 25, 25, .35); }
.w3.h .stk { height: 64px; } .w3.h .stk i { height: 30px; } .w3.h .stk i.lo { top: 12px; } .w3.h .stk i.hi { top: 0; }
