/* 好友房「等人」页面（麻将、德州共用，2026-10-15；2026-10-16 改版「安静的私人牌室」）。盖在牌桌上面，放在 #app 里（竖着拿手机时跟着整页一起转）。
 * 底下就是游戏真正的牌桌，这里只盖一层暗幕；只有有人的座位是亮的。空位 = 很淡的玻璃圆位 + 细“+”；喊了的朋友 = 半透明影子 + 金线倒计时。
 * 中间：大号细体数字「2 / 6」+ 一行小字 + 开始 + 一排在线好友（没有框）。平时几乎不动。类名都用 wr- 开头 */
.wr{--wr-gold:#e3c188;--wr-ink:#f2efe8;--wr-dim:#bab6ad;--wr-faint:#8d8981;--wr-line:#ffffff1a;--wr-ease:cubic-bezier(.22,1,.36,1);--wr-spring:cubic-bezier(.34,1.56,.64,1);
  position:absolute;inset:0;z-index:58;color:var(--wr-ink);font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  user-select:none;-webkit-user-select:none}
/* 暗幕：桌面中间留一点点亮，四周压到几乎全黑，像深夜关了灯的私人牌室 */
.wr-bg{position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(62% 70% at 50% 52%,#05050570 0%,#050505b0 55%,#030303f0 100%)}
/* 开局时顶上那盏大灯闪一下 */
.wr-lamp{position:absolute;inset:0;pointer-events:none;opacity:0;mix-blend-mode:screen;
  background:radial-gradient(70% 80% at 50% 40%,#fff1d633 0%,#ffe6b814 45%,transparent 75%)}
.wr .ic{width:18px;height:18px;display:block}
/* :where 不加分量：以前写成 .wr button{background:none} 把金色开始按钮盖成了透明黑底（2026-10-15 修） */
.wr :where(button){font:inherit;color:inherit;border:0;background:none;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}

/* 等人时牌桌自己的座位、顶栏先藏起来（等人页面在同样的位置画），开局再淡回来 */
.wr-on .seat,.wr-on .me-tag,.wr-on>.top,.wr-on #board{visibility:hidden}
/* 游戏自己的开场卡片（德州 #intro：黑桃、标题、坐下、牌局记录）也藏起来：拿链接进来的朋友，卡片要等第一张快照才淡出，会和等人页叠在一起（2026-10-16 Kevin 截图） */
.wr-on #intro{visibility:hidden;pointer-events:none}
.wr-on #dial{visibility:hidden}   /* 麻将牌桌中间的转盘（“0 牌墙”），还没开局，压在大数字下面 */

/* 顶上：返回 + 名字 */
.wr-top{position:absolute;left:0;right:0;top:0;height:44px;display:flex;align-items:center;gap:12px;z-index:4;padding:0 max(14px,env(safe-area-inset-right)) 0 max(14px,env(safe-area-inset-left))}
.wr-back{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--wr-line);color:var(--wr-dim);background:#0a0a0a99;transition:transform .2s var(--wr-ease),background .2s,color .2s}
.wr-back:hover{background:#ffffff14;color:var(--wr-ink);transform:scale(1.06)}.wr-back:active{transform:scale(.9)}
.wr-ttl{display:flex;align-items:baseline;gap:10px}
.wr-ttl b{font-weight:400;font-size:15px;letter-spacing:.2em}
.wr-ttl span{font-size:12px;color:var(--wr-faint);letter-spacing:.14em}

/* 座位：一个点（牌桌上头像的中心），光束、光圈、头像都围着它画 */
.wr-stage{position:absolute;inset:0;transition:opacity .45s var(--wr-ease),filter .45s var(--wr-ease)}
.wr-seat{position:absolute;width:0;height:0;z-index:2;--cone:180px}
.wr-defs{position:absolute;width:0;height:0;overflow:hidden}
.wr-cone{position:absolute;left:-60px;bottom:-26px;width:120px;height:calc(var(--cone) + 26px);pointer-events:none;opacity:0;overflow:visible;transition:opacity .7s var(--wr-ease);mix-blend-mode:screen}
.wr-pool{position:absolute;left:-86px;top:-44px;width:172px;height:96px;pointer-events:none;opacity:0;transition:opacity .7s var(--wr-ease);mix-blend-mode:screen;
  background:radial-gradient(50% 50% at 50% 54%,#ffe7bd3d 0%,#ffe1b01a 46%,transparent 74%)}
.wr-seat.on .wr-cone,.wr-seat.on .wr-pool{opacity:1}
.wr-seat.off .wr-cone,.wr-seat.off .wr-pool{opacity:.3}

.wr-box{position:absolute;left:-42px;top:-26px;width:84px;display:flex;flex-direction:column;align-items:center;gap:8px}
.wr-door{position:relative;width:52px;height:52px;display:grid;place-items:center}

/* 空位：一块很淡的磨砂玻璃圆位，中间一个细“+”；鼠标放上去金边亮起、“+”变金，点了弹小卡 */
.wr-slot{position:absolute;inset:0;border-radius:50%;display:grid;place-items:center;color:#ffffff4d;
  background:radial-gradient(circle at 50% 28%,#ffffff14,#ffffff05 62%);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  box-shadow:inset 0 1px 0 #ffffff1c,inset 0 0 0 1px #ffffff12,0 12px 26px -14px #000;
  transition:opacity .45s var(--wr-ease),scale .45s var(--wr-spring),color .3s,box-shadow .3s}
.wr-slot .ic{width:16px;height:16px;stroke-width:1.3;transition:rotate .45s var(--wr-spring)}
@media (hover:hover){.wr-slot:hover{color:var(--wr-gold);scale:1.06;box-shadow:inset 0 1px 0 #ffffff26,inset 0 0 0 1px #e3c18870,0 0 26px -8px #e3c18866}}
.wr-slot:active,.wr-slot.press{scale:.92}
.wr-seat.picking .wr-slot{color:var(--wr-gold);box-shadow:inset 0 1px 0 #ffffff26,inset 0 0 0 1px #e3c188a0,0 0 30px -8px #e3c18888}
.wr-seat.picking .wr-slot .ic{rotate:45deg}
.wr-seat.on .wr-slot,.wr-seat.gh .wr-slot{opacity:0;scale:.82;pointer-events:none}

/* 影子：喊了的朋友先半透明、偏灰地坐在空位上，外圈金线 30 秒走完；答应了变实、金线亮起来 */
.wr-ghost{position:absolute;inset:0;opacity:0;pointer-events:none;transition:opacity .5s var(--wr-ease),filter .5s}
.wr-ghost .wr-face{width:100%;height:100%;font-size:20px}
.wr-gcd{position:absolute;inset:-5px;width:62px;height:62px;transform:rotate(-90deg);overflow:visible}
.wr-gcd circle{fill:none;stroke:var(--wr-gold);stroke-width:1.4;stroke-linecap:round;stroke-dasharray:188.5;animation:wrDrain 30s linear forwards}
@keyframes wrDrain{to{stroke-dashoffset:188.5}}
.wr-seat.gh .wr-ghost{opacity:.55;filter:saturate(.35) brightness(.9)}
.wr-seat.gh.coming .wr-ghost{opacity:.92;filter:none}
.wr-seat.coming .wr-gcd circle{animation:none;stroke:#f6e2bb;filter:drop-shadow(0 0 4px #e3c188)}
.wr-seat.on .wr-ghost{opacity:0}

/* 有人：头像外一圈静止的细金边 */
.wr-ring{position:absolute;inset:-3px;border-radius:50%;border:1px solid #e3c188a6;pointer-events:none;opacity:0;transition:opacity .5s}
.wr-seat.on .wr-ring{opacity:1}
.wr-seat.me .wr-ring{border-color:#f6e2bb;box-shadow:0 0 18px -4px #e3c188aa}
.wr-ava{position:absolute;inset:0;pointer-events:none;border-radius:50%;overflow:hidden;display:grid;place-items:center;font-size:21px;color:#111;opacity:0;
  background:radial-gradient(circle at 35% 30%,#f6e2b8,#c9a063 70%,#8a6a3a);box-shadow:0 0 0 1px #000,0 10px 24px -8px #000;transition:filter .4s}
.wr-ava.photo{background:#ece4d4}
.wr-ava img{width:100%;height:100%;display:block;object-fit:cover;border-radius:50%}
.wr-seat.on .wr-ava{opacity:1}
.wr-seat.off .wr-ava{filter:grayscale(.85) brightness(.55)}
.wr-crown{position:absolute;pointer-events:none;right:-6px;top:-8px;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:#0d0b08;color:var(--wr-gold);box-shadow:0 0 0 1px #e3c18866,0 0 12px -2px #e3c18866;opacity:0;scale:.5;transition:opacity .3s,scale .4s var(--wr-spring)}
.wr-crown .ic{width:11px;height:11px}
.wr-seat.host .wr-crown{opacity:1;scale:1}
.wr-nm{max-width:96px;height:20px;line-height:20px;padding:0 9px;border-radius:99px;font-size:11px;letter-spacing:.1em;color:var(--wr-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .3s,background .3s,box-shadow .3s}
.wr-nm:empty{visibility:hidden}
.wr-seat.on .wr-nm{color:var(--wr-ink);font-size:12px;letter-spacing:.08em;background:#0b0a09cc;box-shadow:inset 0 0 0 1px #e3c18833}
.wr-seat.me .wr-nm{color:#f6e2bb}
.wr-seat.gh.coming:not(.on) .wr-nm{color:#f6e2bb}
.wr-burst{position:absolute;left:50%;top:50%;width:52px;height:52px;margin:-26px 0 0 -26px;border-radius:50%;border:1px solid #f6e2bb;pointer-events:none;opacity:0}

/* 小头像（好友那排、影子、飞的那个用同一个样子） */
.wr-face{display:grid;place-items:center;border-radius:50%;overflow:hidden;color:#111;background:radial-gradient(circle at 35% 30%,#f6e2b8,#c9a063 70%,#8a6a3a);box-shadow:0 0 0 1px #000,0 6px 14px -6px #000}
.wr-face.photo{background:#ece4d4}
.wr-face img{width:100%;height:100%;display:block;object-fit:cover;border-radius:50%}
.wr-fly{position:absolute;width:52px;height:52px;margin:-26px 0 0 -26px;z-index:6;pointer-events:none;font-size:14px}

/* 中间：大数字 + 一行小字 + 开始 + 好友那排 */
.wr-mid{position:absolute;left:50%;top:50%;translate:-50% -50%;display:flex;flex-direction:column;align-items:center;gap:14px;z-index:3;width:max-content;min-width:240px;transform-origin:50% 50%}
.wr-head{display:flex;flex-direction:column;align-items:center;gap:6px;transition:opacity .45s var(--wr-ease),filter .45s var(--wr-ease)}
.wr-count{display:flex;align-items:baseline;gap:8px;font-family:"Jost","Helvetica Neue",Arial,sans-serif;line-height:1}
.wr-n{position:relative;display:inline-grid;height:50px;overflow:hidden;font-size:52px;font-weight:200;letter-spacing:-.02em;color:var(--wr-ink);
  -webkit-mask:linear-gradient(180deg,transparent 0,#000 14%,#000 86%,transparent 100%);mask:linear-gradient(180deg,transparent 0,#000 14%,#000 86%,transparent 100%)}
.wr-n>span{grid-area:1/1;line-height:50px;text-align:center}
.wr-of{font-size:18px;font-weight:300;letter-spacing:.06em;color:var(--wr-faint)}
.wr-st{display:flex;align-items:center;gap:7px;height:16px;font-size:12px;letter-spacing:.18em;white-space:nowrap;color:var(--wr-dim);transition:color .4s}
.wr-st.hot{color:#f6e2bb}
.wr-dots{display:inline-flex;gap:3px}
.wr-dots i{width:3.5px;height:3.5px;border-radius:50%;background:currentColor;animation:wrDot 1.2s ease-in-out infinite}
.wr-dots i:nth-child(2){animation-delay:.15s}.wr-dots i:nth-child(3){animation-delay:.3s}
@keyframes wrDot{0%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
/* Magic UI Shimmer Button（MIT）：实心金底，一圈白光沿着边缘转；--cut 是露出光的那圈宽度 */
.wr-go{--spread:90deg;--shimmer:#fffaf0;--speed:3s;--cut:.08em;--bg:linear-gradient(180deg,#f4dfb3,#d2a862);
  position:relative;z-index:0;min-width:188px;height:46px;padding:0 28px;border-radius:100px;display:flex;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;
  border:1px solid #ffffff2e;background:var(--bg);color:#16120c;box-shadow:0 16px 40px -14px #e3c188b3,0 0 0 1px #0008;
  transition:transform .3s var(--wr-spring),box-shadow .3s,opacity .45s var(--wr-ease),filter .45s var(--wr-ease)}
.wr-go[hidden]{display:none}
.wr-go-t{position:relative;z-index:1;display:flex;align-items:center;gap:10px;font-size:15px;letter-spacing:.22em;padding-left:.22em}
.wr-go-t b{font-weight:500}
.wr-go .ic{width:13px;height:13px;fill:currentColor}
.wr-spark-box{position:absolute;inset:0;z-index:-3;overflow:visible;filter:blur(2px);container-type:size}
.wr-spark{position:absolute;inset:0;height:100cqh;aspect-ratio:1;animation:wrSlide var(--speed) ease-in-out infinite alternate}
.wr-spark-in{position:absolute;inset:-100%;width:auto;background:conic-gradient(from calc(270deg - (var(--spread) * .5)),transparent 0,var(--shimmer) var(--spread),transparent var(--spread));animation:wrSpin calc(var(--speed) * 2) infinite linear}
.wr-hl{position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 -8px 10px #ffffff40,inset 0 1px 0 #ffffffb3;transition:box-shadow .3s ease-in-out}
.wr-backdrop{position:absolute;inset:var(--cut);z-index:-2;border-radius:100px;background:var(--bg)}
@keyframes wrSlide{to{transform:translate(calc(100cqw - 100%),0)}}
@keyframes wrSpin{0%{transform:translateZ(0) rotate(0)}15%,35%{transform:translateZ(0) rotate(90deg)}65%,85%{transform:translateZ(0) rotate(270deg)}100%{transform:translateZ(0) rotate(360deg)}}
.wr-go:hover{transform:scale(1.04);box-shadow:0 20px 46px -14px #e3c188d9,0 0 0 1px #0008}
.wr-go:hover .wr-hl{box-shadow:inset 0 -6px 10px #ffffff66,inset 0 1px 0 #ffffffb3}
.wr-go:active,.wr-go.press{transform:scale(.94) translateY(1px)}
.wr-go:active .wr-hl{box-shadow:inset 0 -10px 10px #ffffff66,inset 0 1px 0 #ffffffb3}
.wr-go[disabled]{pointer-events:none}

/* 好友那排（没有框，直接放在暗处）：在线好友（四种状态）| 发链接 | 面对面。空位小卡里是同一套 */
.wr-tray,.wr-pop-row{display:flex;align-items:flex-start;justify-content:center;gap:6px}
.wr-fl{display:flex;gap:6px}
.wr-fl[hidden],.wr-sep[hidden]{display:none}
.wr-sep{flex:none;width:1px;align-self:stretch;margin:4px 2px 16px;background:linear-gradient(180deg,transparent,#ffffff26,transparent)}
.wr-fr,.wr-act{flex:none;width:46px;display:flex;flex-direction:column;align-items:center;gap:5px;padding:2px 0 0;position:relative;transition:transform .25s var(--wr-ease)}
.wr-fr:active,.wr-act:active,.wr-act.press{transform:scale(.92)}
@media (hover:hover){.wr-fr:hover,.wr-act:hover{transform:scale(1.07)}.wr-fr:active,.wr-act:active{transform:scale(.92)}}
.wr-fa{position:relative;width:34px;height:34px}
.wr-fa .wr-face{width:34px;height:34px;font-size:13px;transition:filter .4s,box-shadow .4s}
.wr-dot{position:absolute;right:-1px;bottom:-1px;width:8px;height:8px;border-radius:50%;background:#3ddc84;box-shadow:0 0 0 2px #0c0b0a,0 0 8px #3ddc8488;transition:transform .3s var(--wr-ease),opacity .3s}
.wr-cd{position:absolute;inset:-4px;width:42px;height:42px;transform:rotate(-90deg);overflow:visible;pointer-events:none}
.wr-cd circle{fill:none;stroke:transparent;stroke-width:1.6;stroke-linecap:round;stroke-dasharray:132;stroke-dashoffset:0;transition:stroke .3s}
.wr-fr b{max-width:46px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400;font-size:11px;line-height:13px;color:var(--wr-ink)}
.wr-fr small,.wr-act b{font-size:10.5px;line-height:12px;letter-spacing:.04em;white-space:nowrap;font-weight:500}
.wr-fr small{display:flex;align-items:center;gap:2px;min-height:12px;color:var(--wr-faint)}
.wr-fr small .ic{width:10px;height:10px;stroke-width:2.2}
.wr-fr[data-st=inviting] .wr-cd circle{stroke:var(--wr-gold);animation:wrDrainT 30s linear forwards}
.wr-fr[data-st=inviting] small{color:var(--wr-gold)}
.wr-fr[data-st=inviting] .wr-dot,.wr-fr[data-st=coming] .wr-dot{transform:scale(0);opacity:0}
.wr-fr[data-st=coming] .wr-cd circle{stroke:#f6e2bb;filter:drop-shadow(0 0 4px #e3c188)}
.wr-fr[data-st=coming] .wr-face{box-shadow:0 0 0 1px #000,0 0 20px -2px #e3c188cc}
.wr-fr[data-st=coming] small{color:#f6e2bb}
.wr-fr[data-st=declined] .wr-face{filter:grayscale(1) brightness(.55)}
.wr-fr[data-st=declined] .wr-dot{opacity:.25}
.wr-fr[data-st=declined] b,.wr-fr[data-st=declined] small{color:var(--wr-faint)}
.wr-fr[data-st=noreply] .wr-cd circle{stroke:#ffffff40;stroke-dasharray:3 5}
.wr-fr[data-st=noreply] .wr-face{filter:brightness(.8)}
@keyframes wrDrainT{to{stroke-dashoffset:132}}
.wr-act-i{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;color:var(--wr-dim);background:#ffffff0a;box-shadow:inset 0 0 0 1px #ffffff1c;transition:background .3s,box-shadow .3s,color .3s}
.wr-act-i .ic{width:15px;height:15px}
@media (hover:hover){.wr-act:hover .wr-act-i{color:var(--wr-gold);box-shadow:inset 0 0 0 1px #e3c18870}}
.wr-act b{color:var(--wr-faint);margin-top:1px}
.wr-act.on .wr-act-i{background:var(--wr-gold);color:#16120b;box-shadow:0 0 22px -4px #e3c188aa}
.wr-act.on b{color:var(--wr-gold)}

/* 空位小卡：点“+”从那个位子旁边长出来的一小块磨砂玻璃 */
.wr-pop{position:absolute;z-index:7;padding:12px 12px 8px;border-radius:20px;
  border:1px solid transparent;background:linear-gradient(180deg,#1b1916e6,#0e0d0be6) padding-box,linear-gradient(165deg,#ffffff33,#ffffff0a 45%,#e3c18840) border-box;
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);box-shadow:inset 0 1px 0 #ffffff14,0 24px 50px -18px #000}

/* 面对面：二维码板从“面对面”按钮里长出来（象牙白底 + 深色圆点，扫码要高对比），座位和开始按钮退到后面；再点一下收回 */
.wr.qr-on .wr-stage,.wr.qr-on .wr-head,.wr.qr-on .wr-go{opacity:.1;filter:blur(3px);pointer-events:none}
.wr-qr{position:absolute;left:50%;translate:-50% 0;z-index:5;width:150px;display:flex;flex-direction:column;align-items:center;gap:10px;cursor:pointer}
.wr-qrplate{width:100%;aspect-ratio:1;padding:7%;border-radius:18px;background:linear-gradient(160deg,#fbf3e2,#efdfbf);box-shadow:0 0 0 1px #ffffff40,0 24px 60px -18px #000,0 0 50px -10px #e3c18866}
.wr-qr svg{display:block;width:100%;height:100%}
.wr-qr .m{fill:#17120b}
.wr-qr p{margin:0;font-size:12px;letter-spacing:.1em;color:var(--wr-ink);display:flex;align-items:center;gap:6px;white-space:nowrap}
.wr-qr p .ic{width:14px;height:14px;color:var(--wr-gold)}
.wr-qr .q{opacity:0;transform-box:fill-box;transform-origin:center}
.wr-qr.on .q{animation:wrQrIn .5s var(--wr-ease) both;animation-delay:var(--d)}
@keyframes wrQrIn{from{opacity:0;transform:scale(.2)}to{opacity:1;transform:none}}

@media (prefers-reduced-motion:reduce){.wr *{animation:none!important}.wr-qr .q{opacity:1}}

/* 房间设置开关（2026-10-19，德州“唬住特效”）：开始按钮下面一行小字 + 金色小开关，只有房主看得到 */
.wr-opt{display:flex;align-items:center;gap:10px;height:28px;margin-top:-4px;padding:0 4px 0 8px;border-radius:99px;font-size:12px;letter-spacing:.18em;color:var(--wr-dim);transition:color .25s,transform .25s var(--wr-spring),opacity .45s var(--wr-ease),filter .45s var(--wr-ease)}
.wr-opt[hidden]{display:none}
.wr-opt b{font-weight:400}
.wr-opt:hover{color:var(--wr-ink)}
.wr-opt.press,.wr-opt:active{transform:scale(.95)}
.wr-sw{position:relative;width:30px;height:18px;border-radius:99px;background:#ffffff1f;box-shadow:inset 0 0 0 1px #ffffff26;transition:background .3s var(--wr-ease),box-shadow .3s}
.wr-sw i{position:absolute;left:2px;top:2px;width:14px;height:14px;border-radius:50%;background:#d9d3c7;box-shadow:0 1px 3px #0008;transition:translate .35s var(--wr-spring),background .3s}
.wr-opt.on .wr-sw{background:linear-gradient(180deg,#f4dfb3,#d2a862);box-shadow:inset 0 0 0 1px #ffffff40,0 0 12px -3px #e3c188aa}
.wr-opt.on .wr-sw i{translate:12px 0;background:#16120c}
