:root{color-scheme:dark;--gold:#e9c66d;--jade:#32c99a;--deep:#031b17;--panel:#062b25e8;--ivory:#fffced;--red:#e84745}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#020a08;font-family:"PingFang SC","Microsoft YaHei",sans-serif}.table{position:relative;width:100%;height:100%;min-height:560px;overflow:hidden;color:#f8f2dc;background:radial-gradient(circle at 50% 34%,#18785d 0,#0c4d3d 31%,#052b25 65%,#021713 100%);isolation:isolate}.table:before{content:"";position:absolute;inset:0;opacity:.19;background-image:repeating-linear-gradient(29deg,#fff1 0 1px,transparent 1px 5px),repeating-linear-gradient(119deg,#0002 0 1px,transparent 1px 7px);mix-blend-mode:soft-light}.ambient{position:absolute;border-radius:50%;filter:blur(35px);pointer-events:none}.ambient-a{width:70vw;height:30vh;left:15vw;top:-12vh;background:#8fffd537}.ambient-b{width:48vw;height:20vh;right:-20vw;bottom:12vh;background:#dbb74b28}.topbar{position:absolute;z-index:20;top:0;left:0;right:0;height:104px;padding:calc(env(safe-area-inset-top) + 12px) 18px 8px;display:flex;align-items:center;justify-content:space-between;background:linear-gradient(#001814e8,transparent)}button{font:inherit;color:inherit}.round-btn,.bottom-nav button{border:1px solid #c9a85f61;background:linear-gradient(145deg,#0b493c,#02241f);box-shadow:inset 0 1px #fff2,0 8px 22px #0007}.round-btn{width:48px;height:48px;border-radius:16px;font-size:22px}.room-title{text-align:center;line-height:1.08}.room-title small{display:block;color:#57d6ae;font-size:9px;letter-spacing:3px}.room-title strong{display:block;margin:4px 0;color:#f5d77f;font-size:23px;letter-spacing:4px;text-shadow:0 3px 12px #000}.room-title span{font-size:10px;color:#c5d8d0}.wall-count{width:52px;text-align:center;color:var(--gold)}.wall-count b{display:block;font-size:15px}.wall-count small{font-size:9px;color:#b9cbc4}.wall-mini{display:block;width:38px;height:22px;margin:auto;transform:skewY(-7deg);border-radius:4px;background:repeating-linear-gradient(90deg,#f4ecd9 0 5px,#a8cbbd 5px 7px);box-shadow:0 4px #9d7743}.stage{position:absolute;inset:92px 0 82px;perspective:900px}.table-inlay{position:absolute;inset:2% 3% 7%;border:2px solid #d6b35b6b;border-radius:48% 48% 42% 42%;box-shadow:inset 0 0 0 7px #002a2380,inset 0 0 80px #00100da8,0 0 30px #d2b35919}.seat{position:absolute;z-index:8}.avatar{position:relative;width:58px;height:58px;display:grid;place-items:center;border-radius:50%;border:2px solid #e5c66d;background:radial-gradient(circle at 35% 28%,#2c8f70,#06362d 68%);box-shadow:0 0 0 3px #001d18bb,0 8px 22px #0009}.avatar span{font-size:22px;font-weight:800;color:#ffe59a;text-shadow:0 2px 4px #000}.avatar i{position:absolute;inset:-6px;border:3px solid transparent;border-top-color:#ffdc6d;border-radius:50%;opacity:0}.seat.active .avatar i{opacity:1;animation:turn 1.1s linear infinite}.seat-meta{position:absolute;top:61px;left:50%;width:94px;transform:translateX(-50%);text-align:center;text-shadow:-1px -1px #001,1px -1px #001,-1px 1px #001,1px 1px #001}.seat-meta b{display:block;font-size:12px}.seat-meta small{color:#f0c95c;font-size:11px}.seat-top{top:2%;left:50%;transform:translateX(-50%)}.seat-left{top:36%;left:5%}.seat-right{top:36%;right:5%}.seat-self{bottom:4%;left:50%;transform:translateX(-50%)}.seat-self .avatar{width:68px;height:68px}.seat-self .seat-meta{top:71px}.concealed{position:absolute;display:flex}.top-hand{top:11px;left:70px;transform:rotate(2deg)}.side-hand{top:67px;left:11px;transform-origin:left top;transform:rotate(90deg)}.seat-right .side-hand{left:auto;right:11px;transform-origin:right top;transform:rotate(-90deg)}.tile-back{width:15px;height:24px;margin-left:-4px;border:1px solid #d8d7bc;border-radius:3px;background:linear-gradient(135deg,#d8f0e5,#6aa48e 33%,#285f53 34% 70%,#86bba3);box-shadow:0 3px 0 #b18c4e}.center-console{position:absolute;z-index:5;left:50%;top:31%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:12px}.compass{position:relative;width:64px;height:64px;display:grid;place-items:center;border-radius:18px;transform:rotate(45deg);border:1px solid #deb85c8a;background:#073e34c7;box-shadow:0 10px 28px #0007,inset 0 1px #fff2}.compass span,.compass b{position:absolute;transform:rotate(-45deg)}.compass span{font-size:22px;color:#f5d77f}.compass b{bottom:3px;right:7px;font-size:9px;color:#fff}.round-info b,.round-info small{display:block}.round-info b{color:#f4d77f}.round-info small{margin-top:4px;font-size:9px;color:#a9c9bd}.river{position:absolute;z-index:4;left:17%;right:17%;top:39%;height:32%;display:grid;grid-template-columns:repeat(6,1fr);grid-auto-rows:34px;gap:3px;align-content:start;justify-items:center;transform:rotateX(8deg)}.tile{position:relative;width:33px;height:46px;flex:0 0 auto;border:0;border-radius:5px 5px 4px 4px;color:#172e28;background:linear-gradient(100deg,#fff 0,#fffceb 68%,#d9ddc9 100%);box-shadow:0 4px 0 #75a58f,0 7px 8px #001b1775;transform-style:preserve-3d;transition:transform .16s ease,filter .16s}.tile:before{content:"";position:absolute;inset:2px;border-radius:3px;border:1px solid #8a9b8052;pointer-events:none}.tile .face{position:absolute;inset:0;display:grid;place-items:center;font-family:serif;font-weight:900;font-size:18px;line-height:.88}.tile .face small{font-size:7px}.tile.wan .face{color:#be332f}.tile.tong .face{color:#1e6a4e}.tile.tiao .face{color:#155992}.tile.zhong .face{color:#e12c2c;font-size:25px}.river .tile{width:29px;height:38px;box-shadow:0 3px 0 #719b88,0 5px 7px #0007}.river .tile .face{font-size:15px}.last-tile-mark{position:absolute;display:none;z-index:6;color:#ffe27b;font-size:18px;animation:bob .7s ease-in-out infinite alternate}.self-hand{position:absolute;z-index:20;left:50%;bottom:7%;width:min(96vw,690px);height:86px;transform:translateX(-50%);display:flex;align-items:flex-end;justify-content:center;gap:2px;filter:drop-shadow(0 12px 12px #0008)}.self-hand .tile{width:calc((min(96vw,690px) - 26px)/14);max-width:48px;height:68px}.self-hand .tile .face{font-size:22px}.self-hand .tile.selected{transform:translateY(-18px) rotateX(-6deg);filter:drop-shadow(0 0 8px #ffe26c)}.self-hand .tile.drawn{margin-left:8px;animation:drawIn .38s cubic-bezier(.2,.9,.3,1.2)}.self-melds{position:absolute;z-index:11;left:3%;bottom:17%;display:flex;gap:3px;transform:scale(.84);transform-origin:left bottom}.draw-hint{position:absolute;z-index:12;bottom:21%;left:50%;transform:translateX(-50%);padding:7px 14px;border:1px solid #d4b45b55;border-radius:18px;background:#00241fbd;color:#ebd58c;font-size:10px;opacity:.9}.actions{position:absolute;z-index:31;left:50%;bottom:18%;width:min(94%,570px);transform:translateX(-50%);display:flex;justify-content:center;gap:7px;transition:.25s}.action{width:76px;height:58px;border:1px solid #ddc06c82;border-radius:17px;font-size:24px;font-weight:900;box-shadow:inset 0 1px #fff3,0 9px 20px #0007}.action small{display:block;margin-top:1px;font-size:8px;font-weight:500;opacity:.7}.secondary{background:linear-gradient(#49625c,#203832)}.jade{background:linear-gradient(#22aa80,#0b5f4a)}.gold{color:#2b210b;background:linear-gradient(#f5d875,#be8424)}.red{background:linear-gradient(#ef6258,#9e2528)}.bottom-nav{position:absolute;z-index:35;bottom:0;left:0;right:0;height:78px;padding:6px 12px calc(env(safe-area-inset-bottom) + 6px);display:flex;align-items:center;justify-content:space-between;background:linear-gradient(transparent,#00130fff 32%)}.bottom-nav button{width:54px;height:50px;border-radius:17px;border-color:#d0b15d52;color:#f7dc8c;font-size:20px}.bottom-nav small{display:block;font-size:8px;color:#bed0c7}.toast{position:absolute;z-index:100;left:50%;top:18%;transform:translate(-50%,-10px);padding:10px 18px;border-radius:20px;background:#001d19e8;border:1px solid #e5c26670;color:#ffe69a;font-size:12px;opacity:0;transition:.25s}.toast.show{opacity:1;transform:translate(-50%,0)}.fly-layer,.effect-layer{position:absolute;z-index:70;inset:0;pointer-events:none}.flying{position:absolute;animation:flyTile .46s cubic-bezier(.2,.7,.2,1) forwards}.effect-text{position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);font-size:76px;font-weight:1000;color:#ff3f3f;text-shadow:0 0 12px #fff,0 0 30px #ffca45;animation:huBurst 1.2s ease both}.effect-text:after{content:"";position:absolute;inset:-80px;border-radius:50%;background:repeating-conic-gradient(#ffd86f 0 2deg,transparent 2deg 11deg);filter:blur(3px);z-index:-1}.mask{position:absolute;z-index:79;inset:0;background:#00120ec7;backdrop-filter:blur(7px);opacity:0;pointer-events:none;transition:.25s}.mask.open{opacity:1;pointer-events:auto}.drawer{position:absolute;z-index:80;left:0;top:0;bottom:0;width:min(82%,350px);padding:74px 24px 25px;transform:translateX(-105%);transition:.3s;background:linear-gradient(145deg,#0b3d33f5,#031b17fa);border-right:1px solid #d0b15b55;box-shadow:20px 0 60px #0009}.drawer.open{transform:none}.drawer>small{color:#48c39c;letter-spacing:3px}.drawer h2{margin:7px 0 25px;color:#f4d77f}.drawer>button:not(.drawer-close){width:100%;height:57px;margin:6px 0;padding:0 17px;text-align:left;border:1px solid #71998a4f;border-radius:15px;background:#ffffff0a}.drawer>button i{float:right;color:#e6c565}.drawer-close,.modal-close{position:absolute;right:16px;top:16px;width:38px;height:38px;border:0;border-radius:50%;background:#ffffff10;font-size:28px}.modal{position:absolute;z-index:90;left:50%;top:50%;width:min(90%,540px);max-height:74%;overflow:auto;padding:26px;transform:translate(-50%,-46%) scale(.95);opacity:0;pointer-events:none;border:1px solid #d4b65f78;border-radius:25px;background:linear-gradient(145deg,#0d4539f7,#031c18fb);box-shadow:0 25px 90px #000b;transition:.25s}.modal.open{transform:translate(-50%,-50%) scale(1);opacity:1;pointer-events:auto}.modal h2{text-align:center;color:#f5d477}.modal h3{color:#58d3aa}.modal p,.modal li{color:#c6d9d1;font-size:13px;line-height:1.7}.rule-card{margin:10px 0;padding:12px 15px;border-radius:14px;background:#ffffff0a;border:1px solid #ffffff0d}.setting-row{display:flex;align-items:center;justify-content:space-between;margin:12px 0;padding:14px;border-radius:14px;background:#ffffff0a}.setting-row input{accent-color:#e3bb55}.quick{display:grid;grid-template-columns:1fr 1fr;gap:8px}.quick button{height:44px;border:1px solid #d0b35a44;border-radius:14px;background:#0d5a49}.chat-list{height:260px;overflow:auto}.chat-msg{display:flex;gap:8px;margin:12px 0}.chat-msg.self{justify-content:flex-end}.chat-msg i{width:34px;height:34px;border-radius:50%;background:#1c7059}.chat-msg span{max-width:70%;padding:9px 12px;border-radius:4px 14px 14px;background:#175945}.chat-msg.self span{border-radius:14px 4px 14px;background:#b9852d}.chat-input{display:flex;gap:7px}.chat-input input{min-width:0;flex:1;padding:12px;border:1px solid #ffffff20;border-radius:13px;background:#001b16;color:#fff}.chat-input button{padding:0 17px;border:0;border-radius:13px;background:#c18b2f}.pulse3d{animation:pulse3d 1.6s ease-in-out infinite}@keyframes turn{to{transform:rotate(360deg)}}@keyframes bob{to{transform:translateY(-5px)}}@keyframes drawIn{from{transform:translate(90px,-180px) rotate(35deg) scale(.45);opacity:.2}}@keyframes flyTile{to{left:var(--x);top:var(--y);transform:scale(.8) rotate(5deg)}}@keyframes huBurst{0%{opacity:0;transform:translate(-50%,-50%) scale(2.2)}35%{opacity:1;transform:translate(-50%,-50%) scale(.9)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.15)}}@keyframes pulse3d{50%{transform:translateY(-5px) rotateX(-7deg);filter:brightness(1.2)}}@media(min-aspect-ratio:3/4){.table{width:min(56.25vh,100vw);margin:auto}.stage{inset-top:84px}}@media(max-height:700px){.topbar{height:82px}.stage{inset:75px 0 68px}.bottom-nav{height:66px}.self-hand{bottom:5%}.actions{bottom:16%}.seat-left,.seat-right{top:34%}}
.actions:not(.available){pointer-events:none;opacity:0;transform:translate(-50%,10px)}
.action[hidden]{display:none!important}.action:disabled{filter:grayscale(.7);opacity:.45}
.compass.urgent{animation:urgentPulse .55s ease-in-out infinite alternate;box-shadow:0 0 28px #ff4e34b8,inset 0 1px #fff2}
.river .tile.latest{filter:drop-shadow(0 0 8px #ffe16d);animation:latestTile .75s ease-in-out infinite alternate}
.meld-group{display:flex;margin-right:8px}.meld-group .tile{margin-left:-5px}
.claim-effect{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);font-size:66px;font-weight:1000;color:#f6d16b;text-shadow:0 0 7px #fff,0 0 26px #e39423,0 5px 10px #000;animation:claimBurst .9s cubic-bezier(.18,.8,.25,1) both}
.effect-text small{display:block;margin-top:8px;font-size:16px;letter-spacing:4px;color:#fff2a7;text-align:center}
.proof-code{overflow-wrap:anywhere;padding:10px;border-radius:10px;background:#001814;font:11px/1.6 ui-monospace,monospace;color:#71e3bd!important}
.balance{margin:5px 0;font-size:28px!important;color:#f2d477!important;text-align:center}
.result-special{margin:0 auto 17px;width:max-content;padding:7px 20px;border:1px solid #f0c95a78;border-radius:20px;background:#c58d2433;color:#ffe18b;font-weight:800}
.result-row{display:flex;align-items:center;justify-content:space-between;margin:7px 0;padding:12px 15px;border-radius:13px;background:#ffffff0a;color:#b9cdc5}.result-row b{color:#ef7870}.result-row.winner{border:1px solid #6fd7ad45;background:#1c765c31}.result-row.winner b{color:#70e2b5}
.chat-msg i{display:grid;place-items:center;flex:0 0 34px;color:#ffe39b;font-style:normal;font-weight:800}.chat-msg span b{font-size:10px;color:#9ed3c2}
.low-power .ambient,.low-power .table:before{display:none}.low-power .pulse3d{animation:none}
@keyframes urgentPulse{to{filter:brightness(1.35);transform:rotate(45deg) scale(1.07)}}
@keyframes latestTile{to{transform:translateY(-3px)}}
@keyframes claimBurst{0%{opacity:0;transform:translate(-50%,-50%) scale(2.2) rotate(-8deg)}35%{opacity:1;transform:translate(-50%,-50%) scale(.92)}72%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-58%) scale(1.08)}}

/* 主项目完整仿真麻将图集；文字牌面仅作为加载失败的兜底。 */
.tile.atlas-tile{background-repeat:no-repeat;background-color:transparent;border-radius:2px;box-shadow:none}
.tile.atlas-tile:before,.tile.atlas-tile .face{display:none}
.river .tile.atlas-tile{height:43px;box-shadow:0 4px 6px #0007}
.self-hand .tile.atlas-tile{height:54px}
.seat.banker .avatar:after{content:"庄";position:absolute;z-index:5;left:50%;top:-19px;transform:translateX(-50%);width:27px;height:27px;display:grid;place-items:center;border:1px solid #ffe39c;border-radius:50%;color:#472b03;background:linear-gradient(145deg,#ffe587,#c8861d);font-size:14px;font-style:normal;font-weight:900;box-shadow:0 3px 9px #0009,0 0 11px #f2c35b80}

/* 竖屏牌宽不足时自动改为 7+7 两排，保持仿真牌比例与点击面积。 */
@media(max-width:480px){
  .self-hand{bottom:5%;width:min(94vw,350px);height:126px;display:grid;grid-template-columns:repeat(7,42px);grid-auto-rows:59px;align-content:end;align-items:end;justify-content:center;gap:2px 3px}
  .self-hand .tile,.self-hand .tile.atlas-tile{width:42px;max-width:none;height:59px}
  .self-hand .tile.drawn{margin-left:0}
  .self-melds{bottom:20%}
  .draw-hint{bottom:27%}
  .actions{bottom:23%}
  .seat-self{bottom:15%}
}

/* 樱粉心愿：女性向的清新玫瑰石英 3D 桌布与配套控件色阶。 */
.table.theme-pink{--gold:#fff0b8;--jade:#f080ae;--deep:#3b1731;--panel:#6d2b52eb;--red:#ed4e82;background:linear-gradient(180deg,#4c173f24,#37122f73),url('./assets/table-sakura-u5-v1.webp') center/cover,linear-gradient(#d9789c,#9c456c)}
.theme-pink:before{opacity:.08}
.theme-pink .table-inlay{border-color:#fff1c7a1;box-shadow:inset 0 0 0 7px #6a244457,inset 0 0 70px #5b183b4d,0 0 28px #fff0c942}
.theme-pink .round-btn,.theme-pink .bottom-nav button{border-color:#ffe5b685;background:linear-gradient(145deg,#a84672e8,#632343ed);box-shadow:inset 0 1px #fff5,0 8px 22px #4b12398c}
.theme-pink .avatar{border-color:#ffeab1;background:radial-gradient(circle at 35% 28%,#f599bc,#8e315e 70%);box-shadow:0 0 0 3px #5c1c41aa,0 8px 22px #4e153b87}
.avatar-photo{position:absolute;z-index:1;inset:2px;width:calc(100% - 4px);height:calc(100% - 4px);border-radius:50%;object-fit:cover;opacity:0;transition:opacity .2s ease}.avatar-photo.loaded{opacity:1}.avatar>span{position:relative;z-index:0}.avatar>i{z-index:3}.ready-btn{position:absolute;z-index:32;left:50%;bottom:24%;min-width:190px;height:52px;transform:translateX(-50%);border:1px solid #ffe49e;border-radius:26px;color:#3b2704;background:linear-gradient(180deg,#ffe58a,#d99a2b);box-shadow:inset 0 1px #fff9,0 8px 24px #0008,0 0 18px #efc65b38;font-size:18px;font-weight:900;letter-spacing:2px}.ready-btn:disabled{color:#e5d8ad;background:linear-gradient(#42675e,#24423b);border-color:#a9c5b866;box-shadow:0 7px 18px #0006}.theme-pink .ready-btn{background:linear-gradient(#ffe0a7,#ee9c77);border-color:#fff0c9}.theme-pink .ready-btn:disabled{background:linear-gradient(#9c607b,#69394f)}
.seat.vacant{opacity:.48}.seat.vacant .avatar{filter:saturate(.25)}.seat.vacant .seat-meta small{color:#93aaa1}
.chat-avatar img{display:block;width:100%;height:100%;border-radius:inherit;object-fit:cover}
.banker-selecting :is(.self-hand,.wall-rack,.river,.actions,.draw-hint,.ready-btn){opacity:.12;transition:opacity .25s}.banker-roll-effect{position:absolute;z-index:95;left:50%;top:40%;width:218px;min-height:190px;display:flex;flex-direction:column;align-items:center;justify-content:center;transform:translate(-50%,-50%) scale(.65);border:1px solid #efd27c99;border-radius:28px;color:#fff0b3;background:radial-gradient(circle at 50% 18%,#80622d99,#062d26f2 58%,#031a16fa);box-shadow:0 24px 70px #000c,inset 0 1px #fff3,0 0 28px #eabe4b38;animation:bankerRollIn .45s cubic-bezier(.2,.86,.25,1.25) forwards}.banker-roll-effect:before{content:"";position:absolute;inset:-30px;border-radius:50%;background:repeating-conic-gradient(from 10deg,#ffd86b00 0 8deg,#ffd86b3b 9deg,#ffd86b00 12deg 23deg);filter:blur(3px);z-index:-1;animation:turn 4s linear infinite}.banker-roll-effect small{color:#c4d8cf;font-size:11px;letter-spacing:3px}.banker-roll-effect strong{margin-top:7px;color:#ffe277;font-size:24px;text-shadow:0 0 12px #f5b52c}.banker-roll-effect span{margin-top:3px;color:#a9c9bd;font-size:10px}.banker-dice{display:flex;gap:15px;margin-top:14px}.banker-die{width:54px;height:54px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:4px;padding:8px;border:1px solid #fff;border-radius:12px;background:linear-gradient(145deg,#fffdf0,#d8d7c7);box-shadow:inset -4px -5px 9px #7c82684d,0 8px 13px #0009;transform:rotate(-8deg);animation:bankerDieShake .18s ease-in-out 5}.banker-die+ .banker-die{transform:rotate(9deg);animation-direction:reverse}.banker-die b{width:8px;height:8px;align-self:center;justify-self:center;border-radius:50%;background:transparent}.banker-die b.on{background:#183e35;box-shadow:inset 1px 1px 2px #0009}.banker-die b.on:nth-child(5){background:#d8332f}.seat.banker-count{z-index:45;filter:brightness(1.35)}.seat.banker-count .avatar{animation:bankerSeatCount .2s ease both;box-shadow:0 0 0 4px #ffe06d,0 0 26px #ffcb45,0 8px 22px #0009}.seat.banker-stamped .avatar{animation:bankerStamp .55s cubic-bezier(.2,.85,.25,1.35)}.banker-roll-effect.settled{animation:bankerSettle .45s ease both}.banker-roll-effect.settled .banker-dice{filter:drop-shadow(0 0 13px #ffd75d)}@keyframes bankerRollIn{to{transform:translate(-50%,-50%) scale(1)}}@keyframes bankerDieShake{0%,100%{translate:0 0;rotate:0deg}35%{translate:-5px -7px;rotate:-18deg}70%{translate:5px 2px;rotate:15deg}}@keyframes bankerSeatCount{0%{transform:scale(.88)}100%{transform:scale(1.08)}}@keyframes bankerStamp{0%{transform:scale(1.8);filter:brightness(2)}100%{transform:scale(1);filter:none}}@keyframes bankerSettle{50%{transform:translate(-50%,-50%) scale(1.08)}100%{transform:translate(-50%,-50%) scale(1)}}
.theme-pink .compass{border-color:#ffe7af;background:#85335dc9}.theme-pink .round-info small{color:#fff0ec}
.banker-selecting :is(.self-hand,.wall-rack,.river,.actions,.draw-hint,.ready-btn){opacity:0;pointer-events:none}
.theme-pink .draw-hint{border-color:#ffe8c187;background:#7e2d57d6;color:#fff3cf}
.theme-pink .drawer,.theme-pink .modal{border-color:#ffe0ac8c;background:linear-gradient(145deg,#8c3d67f7,#48162ffb)}
.theme-pink .secondary{background:linear-gradient(#76556b,#493044)}.theme-pink .jade{background:linear-gradient(#f08bb5,#a43c6c)}
.theme-pink .bottom-nav{background:linear-gradient(transparent,#4b153bfa 35%)}
.setting-block{margin:12px 0;padding:14px;border-radius:14px;background:#ffffff0a}.setting-block>span{display:block;margin-bottom:10px;color:#d8e4df;font-size:13px}
.theme-picker{display:grid;grid-template-columns:1fr 1fr;gap:9px}.theme-picker button{height:48px;border:1px solid #ffffff20;border-radius:14px;background:#001c178c;color:#d8e4df}.theme-picker button.active{border-color:#ffe09d;box-shadow:0 0 0 2px #f5c55a2e,inset 0 1px #fff4;color:#fff3c9}
.theme-dot{display:inline-block;width:18px;height:18px;margin-right:7px;vertical-align:-4px;border-radius:50%;box-shadow:inset 0 1px #fff8,0 2px 5px #0005}.jade-dot{background:linear-gradient(145deg,#60dbb5,#0a604d)}.pink-dot{background:linear-gradient(145deg,#ffc1d7,#d24e84)}

/* 桌面真实牌墙：每个小墩代表上下两张，按剩余牌数逐墩减少。 */
.wall-rack{position:absolute;z-index:7;left:50%;top:18%;width:min(76%,360px);transform:translateX(-50%);text-align:center;pointer-events:none}.wall-rack>span{display:block;margin-bottom:5px;color:#f4d77fb0;font-size:8px;letter-spacing:3px;text-shadow:0 1px 3px #000}.wall-rack>div{min-height:22px;display:flex;align-items:flex-end;justify-content:center;gap:1px;filter:drop-shadow(0 5px 5px #001b1680)}.wall-stack{position:relative;width:9px;height:14px;flex:0 1 9px;border:1px solid #e8e2cc;border-radius:2px;background:linear-gradient(100deg,#eff9f2,#b8d8c9 55%,#4f8f7b 58%);box-shadow:0 3px 0 #bd934d}.wall-stack:after{content:"";position:absolute;left:0;top:-5px;width:100%;height:12px;border:1px solid #f2edda;border-radius:2px;background:linear-gradient(100deg,#f8fff9,#c7e2d5 58%,#5c9b86 61%)}.wall-stack.single:after{display:none}.wall-rack.empty{opacity:.25}.theme-pink .wall-stack{border-color:#fff0df;background:linear-gradient(100deg,#fff9f8,#f1c9d6 56%,#bb6687 59%);box-shadow:0 3px 0 #cf9d59}.theme-pink .wall-stack:after{border-color:#fff8ed;background:linear-gradient(100deg,#fff,#f5d4df 58%,#c97796 61%)}

/* 牌河采用紧凑乱序堆放：固定窄列、纵向轻叠，不再平均摊满桌面。 */
.river{left:21%;right:21%;grid-template-columns:repeat(7,28px);grid-auto-rows:31px;justify-content:center;justify-items:center;gap:0;overflow:visible}.river .tile{transform:translate(var(--scatter-x,0),var(--scatter-y,0)) rotate(var(--scatter-r,0));transform-origin:center;transition:opacity .14s ease}.river .tile.await-flight{opacity:0}.river .tile.latest{filter:drop-shadow(0 0 5px #ffe9a4);animation:latestMahjongGlow 1.45s ease-in-out infinite}.river .tile.latest:after{content:"";position:absolute;inset:-4px;border:1px solid #ffe9a4a8;border-radius:6px;box-shadow:0 0 8px #ffd86c6b;pointer-events:none}.theme-pink .river .tile.latest{filter:drop-shadow(0 0 6px #fff1bd)}

/* 摸牌由牌墙飞向座位，出牌则由玩家面前飞入最终落点。 */
.draw-flight{position:absolute;z-index:75;pointer-events:none;animation:wallDrawFly .66s cubic-bezier(.18,.74,.22,1) forwards}.draw-flight.tile{width:28px;height:42px}.draw-flight.draw-back{width:16px;height:25px;margin:0}.flying{z-index:76;animation:flyTile .58s cubic-bezier(.18,.78,.22,1) forwards}
@keyframes wallDrawFly{0%{opacity:.25;transform:translate(-50%,-50%) scale(.55) rotate(-16deg)}28%{opacity:1}100%{opacity:0;transform:translate(calc(var(--fly-x) - 50%),calc(var(--fly-y) - 50%)) scale(1.08) rotate(4deg)}}
@keyframes latestMahjongGlow{0%,100%{transform:translate(var(--scatter-x,0),var(--scatter-y,0)) rotate(var(--scatter-r,0)) scale(1);filter:drop-shadow(0 0 3px #ffe9a477)}50%{transform:translate(var(--scatter-x,0),calc(var(--scatter-y,0) - 1px)) rotate(var(--scatter-r,0)) scale(1.035);filter:drop-shadow(0 0 8px #ffe28fc7)}}
@media(max-height:720px){.wall-rack{top:17%}.wall-stack{width:8px;flex-basis:8px}}

/* 对手暗牌按真实座位方向摆放：左家在头像右侧、右家在头像左侧、上家在头像下方。 */
.top-hand{top:92px;left:50%;transform:translateX(-50%);flex-direction:row}
.seat-left .side-hand{top:7px;left:70px;right:auto;transform:none;flex-direction:column}
.seat-right .side-hand{top:7px;right:70px;left:auto;transform:none;flex-direction:column}

/* 使用主麻将图集的真实横向牌背，牌体保留白边、绿背和底部厚度。 */
.tile-back{width:25px;height:18px;flex:0 0 25px;margin-left:-10px;border:0;border-radius:2px;background:linear-gradient(160deg,#f7fff9 0 11%,#78aa95 12% 22%,#225d4d 23% 76%,#c8ddd2 77%);box-shadow:0 3px 0 #b78943,0 4px 5px #001c1680;background-repeat:no-repeat}
.tile-back:first-child{margin-left:0}
.tile-back.atlas-back{background-color:transparent}
.side-hand .tile-back{margin:0 0 -8px 0}
.side-hand .tile-back:first-child{margin-top:0}
.concealed{filter:drop-shadow(0 5px 5px #001a157a)}

/* 牌墙每墩明确显示上下两张，增加错层和厚边，避免看成一排薄色块。 */
.wall-rack>div{gap:2px;perspective:240px}
.wall-stack{width:10px;height:15px;flex-basis:10px;border-radius:2px;transform:skewY(-2deg);box-shadow:0 3px 0 #b88a43,1px 5px 4px #001b1678}
.wall-stack:after{top:-6px;height:13px;box-shadow:0 2px 0 #6f9f8b}
.theme-pink .tile-back{box-shadow:0 3px 0 #d29a59,0 4px 5px #5c1d4170}

/* 社交软件式牌桌聊天：清晰的身份、左右消息流、快捷真人语音和固定输入区。 */
.modal.chat-modal{width:min(92%,460px);height:min(78%,690px);padding:18px;overflow:hidden;border-color:#e4c46d8a;background:linear-gradient(155deg,#0b3f35fa,#021c18fd);box-shadow:0 28px 100px #000d,inset 0 1px #fff2}
.chat-modal #modalBody{height:100%}
.chat-modal .modal-close{z-index:3;top:12px;right:12px}.chat-title{height:54px;padding:3px 48px 10px 4px;border-bottom:1px solid #ffffff10}.chat-title>div{display:flex;align-items:center;gap:8px}.chat-title i{width:9px;height:9px;border-radius:50%;background:#56d9a6;box-shadow:0 0 9px #56d9a6}.chat-title strong{color:#fff2c5;font-size:18px}.chat-title small{display:block;margin:4px 0 0 17px;color:#8fb6a8;font-size:10px}.chat-shell{height:calc(100% - 54px);display:flex;flex-direction:column}.chat-list{min-height:120px;flex:1;padding:12px 4px 8px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.chat-msg{display:flex;align-items:flex-end;gap:8px;margin:10px 0}.chat-msg.self{flex-direction:row-reverse;justify-content:flex-start}.chat-avatar{width:36px;height:36px;display:grid;place-items:center;flex:0 0 36px;border:1px solid #f4d57d70;border-radius:12px;color:#ffe8a5!important;background:linear-gradient(145deg,#277f67,#0b493d)!important;box-shadow:0 4px 10px #0006;font-style:normal;font-weight:900}.chat-msg.self .chat-avatar{background:linear-gradient(145deg,#d79a3d,#8d5421)!important}.chat-content{max-width:74%;display:flex;flex-direction:column;align-items:flex-start}.chat-msg.self .chat-content{align-items:flex-end}.chat-content b{margin:0 5px 4px;color:#9dc4b6;font-size:10px;font-weight:500}.chat-content span{position:relative;padding:9px 12px;border:1px solid #ffffff0d;border-radius:5px 15px 15px 15px;color:#eef8f3;background:#175c4b;box-shadow:0 5px 12px #001b1660;font-size:13px;line-height:1.45;overflow-wrap:anywhere}.chat-msg.self .chat-content span{border-radius:15px 5px 15px 15px;color:#34220a;background:linear-gradient(145deg,#f1ce70,#c99235)}.quick-chat{padding:9px 0 7px;border-top:1px solid #ffffff10}.quick-chat>label{display:block;margin:0 0 7px;color:#9fc0b4;font-size:10px;letter-spacing:2px}.quick-chat-grid{max-height:102px;display:grid;grid-template-columns:1fr 1fr;gap:6px;overflow:auto}.quick-chat-grid button{min-width:0;height:31px;display:flex;align-items:center;gap:5px;padding:0 8px;border:1px solid #d8bd6d35;border-radius:10px;color:#dcebe5;background:#ffffff0b;text-align:left;font-size:10px;box-shadow:inset 0 1px #fff1}.quick-chat-grid button:active{transform:scale(.97);background:#c4903338}.quick-chat-grid button i{color:#f2cf72;font-size:11px;font-style:normal}.quick-chat-grid button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-input{height:45px;display:flex;gap:7px;margin:2px 0 0;padding:5px;border:1px solid #ffffff12;border-radius:15px;background:#001812b8}.chat-input input{min-width:0;flex:1;padding:0 10px;border:0;outline:0;color:#f5fbf8;background:transparent;font-size:13px}.chat-input input::placeholder{color:#7d9f93}.chat-input button{width:62px;border:0;border-radius:11px;color:#2a1c07;background:linear-gradient(#f0d073,#bd852d);font-weight:800;box-shadow:inset 0 1px #fff6,0 4px 10px #0005}.theme-pink .modal.chat-modal{border-color:#ffe3b78c;background:linear-gradient(155deg,#7f345dfc,#42152ffd)}.theme-pink .chat-content span{background:#8b3e65}.theme-pink .chat-msg.self .chat-content span{background:linear-gradient(145deg,#ffe0a0,#e69a5f)}

/* 桌面头像聊天气泡：出现后短暂停留，再上移淡出。 */
.seat-chat-bubble{position:absolute;z-index:65;top:-27px;left:70px;min-width:54px;max-width:150px;padding:8px 11px;border:1px solid #ecd27d70;border-radius:13px 13px 13px 4px;color:#fff8de;background:#052c26ed;box-shadow:0 7px 18px #0008;font-size:11px;line-height:1.35;white-space:normal;text-shadow:0 1px 2px #000;animation:seatChatIn .22s cubic-bezier(.2,.8,.25,1.2) both;pointer-events:none}.seat-chat-bubble:after{content:"";position:absolute;left:-5px;bottom:5px;width:9px;height:9px;transform:rotate(45deg);border-left:1px solid #ecd27d70;border-bottom:1px solid #ecd27d70;background:#052c26}.seat-right .seat-chat-bubble{left:auto;right:70px;border-radius:13px 13px 4px 13px}.seat-right .seat-chat-bubble:after{left:auto;right:-5px;border:0;border-top:1px solid #ecd27d70;border-right:1px solid #ecd27d70}.seat-self .seat-chat-bubble{top:3px;left:78px}.seat-top .seat-chat-bubble{top:3px;left:72px}.seat-chat-bubble.leaving{animation:seatChatOut .25s ease forwards}.theme-pink .seat-chat-bubble,.theme-pink .seat-chat-bubble:after{background:#6f294feF}@keyframes seatChatIn{from{opacity:0;transform:translateY(7px) scale(.9)}}@keyframes seatChatOut{to{opacity:0;transform:translateY(-12px) scale(.97)}}

@media(max-height:700px){.modal.chat-modal{height:84%;padding:14px}.quick-chat-grid{max-height:70px}.chat-title{height:47px}.chat-shell{height:calc(100% - 47px)}}

/* Player profile: clickable real avatars and a compact room-stat card. */
.avatar{overflow:visible;cursor:pointer;transition:transform .16s ease,filter .16s ease}.avatar:before{content:"";position:absolute;z-index:4;inset:-5px;border:1px solid #f7db87a8;border-radius:50%;box-shadow:inset 0 0 0 2px #071f1ab8,0 0 12px #e7c15a38;pointer-events:none}.avatar:active{transform:scale(.94)}.avatar:focus-visible{outline:2px solid #66e4b7;outline-offset:7px}.avatar-photo{position:absolute;inset:3px;width:calc(100% - 6px);height:calc(100% - 6px);object-fit:cover;border:1px solid #fff3c666;border-radius:50%;opacity:0;transition:opacity .2s}.avatar-photo.loaded{opacity:1}
.modal.profile-modal{width:min(92%,500px);max-height:82%;padding:18px;border-color:#e4c66f8c;overflow:auto;background:radial-gradient(circle at 50% -20%,#1c765c 0,#0a3d32 35%,#031d18 82%);box-shadow:0 30px 110px #000d,inset 0 1px #fff2}.profile-shell{padding:4px}.profile-head{position:relative;min-height:132px;display:flex;align-items:center;gap:18px;padding:17px;border:1px solid #e3c36b3f;border-radius:22px;background:linear-gradient(130deg,#ffffff12,#ffffff05);overflow:hidden}.profile-head:after{content:"";position:absolute;width:190px;height:190px;right:-70px;top:-100px;border:1px solid #f4d57636;border-radius:50%;box-shadow:0 0 45px #f1ca6c18}.profile-avatar{position:relative;width:92px;height:92px;display:grid;place-items:center;flex:0 0 92px;border:3px solid #f1d079;border-radius:50%;background:linear-gradient(145deg,#2d9373,#092f28);box-shadow:0 0 0 5px #082c25,0 10px 28px #0008,0 0 24px #e4bf5940}.profile-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}.profile-avatar>span{font-size:35px;font-weight:900;color:#ffe9a7}.profile-avatar>i{position:absolute;inset:-8px;border:1px solid #72e0b37a;border-radius:50%;animation:profilePulse 2.1s ease-in-out infinite}.profile-avatar>em{position:absolute;right:-8px;bottom:-5px;padding:4px 8px;border:1px solid #ffe19979;border-radius:10px;color:#342209;background:linear-gradient(#ffe092,#ba7828);box-shadow:0 4px 10px #0007;font-size:9px;font-style:normal;font-weight:900}.profile-identity{min-width:0;position:relative;z-index:1}.profile-identity>small{color:#62d8af;font-size:8px;letter-spacing:2.5px}.profile-identity h2{max-width:245px;margin:7px 0 12px;overflow:hidden;color:#fff4cd;text-align:left;text-overflow:ellipsis;white-space:nowrap;font-size:23px}.profile-identity>div{display:flex;flex-wrap:wrap;gap:7px}.profile-identity b,.profile-identity span{padding:5px 9px;border-radius:10px;font-size:10px}.profile-identity b{color:#f7d983;background:#d2a23a24}.profile-identity span{color:#83e1bb;background:#30b5831c}.profile-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:11px 0}.profile-meta span{padding:11px 12px;border:1px solid #ffffff0e;border-radius:13px;color:#91b6a8;background:#ffffff08;font-size:10px}.profile-meta b{display:block;margin-top:4px;color:#f5e3aa;font-size:15px}.profile-section-title{display:flex;align-items:center;justify-content:space-between;margin:15px 3px 8px}.profile-section-title b{color:#e9f3ef;font-size:14px}.profile-section-title span{color:#6fcfac;font-size:9px}.profile-stats{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.profile-stats section{padding:13px 11px;border:1px solid #ffffff0e;border-radius:15px;background:linear-gradient(145deg,#ffffff0b,#ffffff05)}.profile-stats span{display:block;color:#8fb2a5;font-size:10px}.profile-stats strong{display:inline-block;margin-top:5px;color:#f6df9b;font-size:22px}.profile-stats small{margin-left:4px;color:#8fb2a5;font-size:9px}.profile-stats .gain strong{color:#60e0ad}.profile-stats .loss strong{color:#ff827c}.profile-note{display:flex;align-items:center;gap:11px;margin-top:10px;padding:11px 13px;border:1px solid #d8ba6140;border-radius:14px;background:#d6ad3b10}.profile-note>i{width:35px;height:35px;display:grid;place-items:center;border-radius:11px;color:#382707;background:linear-gradient(#f4d97f,#b9822c);font-style:normal;font-weight:900}.profile-note b,.profile-note span{display:block}.profile-note b{color:#e7f1ed;font-size:11px}.profile-note span{margin-top:3px;color:#8fb2a5;font-size:9px}.profile-loading{height:146px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#9ac0b1;font-size:11px}.profile-loading i{width:34px;height:34px;border:3px solid #ffffff18;border-top-color:#e9c96e;border-radius:50%;animation:turn .8s linear infinite}.profile-error{padding:28px 12px;border:1px solid #e26b6133;border-radius:14px;color:#ffaaa4;background:#7d25231a;text-align:center;font-size:12px}.profile-privacy{margin:12px 5px 1px!important;color:#789b8e!important;text-align:center;font-size:9px!important}.theme-pink .modal.profile-modal{background:radial-gradient(circle at 50% -20%,#a64f75 0,#6d294f 38%,#351229 84%)}@keyframes profilePulse{50%{transform:scale(1.08);opacity:.35}}
.chat-input button{padding:0;white-space:nowrap}
.seat.chatting{z-index:66}
.seat-self .seat-chat-bubble{top:-54px;left:-20px;min-width:108px;max-width:180px}
.profile-modal .modal-close{z-index:12;pointer-events:auto;touch-action:manipulation}.profile-head:after{pointer-events:none}

/* 本桌战绩：顶部三项摘要，下面按时间列出每局结果。 */
.modal.history-modal{width:min(91%,480px);max-height:76%;padding:22px 18px 18px;overflow:hidden}.history-modal #modalBody{display:flex;max-height:calc(76vh - 40px);flex-direction:column}.history-title{padding:1px 42px 14px 3px;border-bottom:1px solid #ffffff10}.history-title small{color:#5cd4aa;font-size:9px;letter-spacing:3px}.history-title h2{margin:4px 0 2px;text-align:left;color:#f4d477;font-size:23px}.history-title p{margin:0;color:#8fb4a7;font-size:10px}.history-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:13px 0}.history-summary section{padding:11px 7px;border:1px solid #ffffff0e;border-radius:13px;background:#ffffff09;text-align:center}.history-summary span{display:block;color:#91b2a6;font-size:10px}.history-summary b{display:block;margin-top:4px;color:#f5df9d;font-size:20px}.positive{color:#5bdbac!important}.negative{color:#ff817a!important}.history-list{min-height:120px;overflow:auto;scrollbar-width:thin}.history-row{display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:9px;margin:7px 0;padding:11px 12px;border:1px solid #ffffff0d;border-radius:13px;background:linear-gradient(100deg,#ffffff09,#ffffff04)}.history-row time{color:#82a89a;font-size:10px}.history-row div{min-width:0}.history-row div b,.history-row div span{display:block}.history-row div b{color:#e7f1ed;font-size:13px}.history-row div span{margin-top:3px;overflow:hidden;color:#91afa4;font-size:9px;text-overflow:ellipsis;white-space:nowrap}.history-row>strong{font-size:17px}.history-empty{padding:38px 10px;text-align:center;color:#91afa4}.history-empty b,.history-empty span{display:block}.history-empty b{color:#d8e8e2}.history-empty span{margin-top:7px;font-size:10px}.theme-pink .history-summary section,.theme-pink .history-row{background:#ffffff0c}.theme-pink .history-title small{color:#ffc1d9}

/* 融合升级：3人红中麻将三角座位布局 & 清一色/碰碰胡/七对等大番型徽章展示 */
.table.mode-3p .seat-top{display:none!important}
.table.mode-3p .seat-left,.table.mode-3p .seat-right{top:28%}
.fan-badges{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:8px 0 14px}
.fan-badge{padding:4px 11px;border:1px solid #f5d67b85;border-radius:14px;color:#ffeaa0;background:linear-gradient(145deg,#337d65aa,#124034cc);font-size:11px;font-weight:700;box-shadow:0 3px 10px #0006}
.fan-badge em{margin-left:4px;color:#71f0c2;font-style:normal}
