/* 公共牌桌嵌入样式：由 board.css 自动转换生成，作用域限定在 #pub-frame 内 */
#pub-frame{position:fixed;left:0;top:0;width:100%;height:100%;overflow:hidden;
  background:#0a1005;border:0;border-radius:0;z-index:-1;
  font-family:"Microsoft YaHei",sans-serif;font-size:24px;color:#e8d5a3;
  user-select:none;box-sizing:border-box}
#pub-canvas{position:absolute;left:0;top:0}

#pub-frame *{margin:0;padding:0;box-sizing:border-box}
#pub-frame{font-family:"Microsoft YaHei",sans-serif;background:#080e04;color:#e8d5a3}
#pub-frame #stage{position:absolute;left:0;top:0;width:var(--pub-inner);height:var(--pub-inner);transform:scale(0.67);transform-origin:0 0;display:flex;justify-content:center;align-items:center}
#pub-frame .side{flex:1 1 0;height:100%;min-width:0;background:#0a1005}
#pub-frame .side:first-child{border-right:1px dashed #1e3a1e}
#pub-frame .side:last-child{border-left:1px dashed #1e3a1e}
#pub-frame #table{--sq:var(--pub-inner);display:grid;grid-template-columns:170px minmax(0,1fr) 170px;grid-template-rows:150px minmax(0,1fr) 150px;grid-template-areas:"nw west ne" "south center north" "sw east se";width:var(--sq);height:var(--sq);flex:0 0 auto}
#pub-frame #p-west{grid-area:west}
#pub-frame #p-east{grid-area:east}
#pub-frame #p-north{grid-area:north}
#pub-frame #p-south{grid-area:south}
#pub-frame #tc{grid-area:center}
#pub-frame #corner-nw{grid-area:nw}
#pub-frame #corner-ne{grid-area:ne}
#pub-frame #corner-sw{grid-area:sw}
#pub-frame #corner-se{grid-area:se}
#pub-frame .corner{display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(0,0,0,.28);border:1px solid #3a2a0a;border-radius:10px;color:#ffd700;font-size:2.4em;line-height:1;user-select:none}
#pub-frame .corner-name{font-size:.48em;color:#00ffff;font-weight:bold;line-height:1.15;max-width:5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
#pub-frame .corner-main{display:flex;align-items:center;justify-content:center;gap:.18em;line-height:1.1}
#pub-frame .corner-wind{font-size:1em;line-height:1.1}
#pub-frame .corner-score{font-size:.42em;color:#9dff5a;font-weight:bold;line-height:1.2;white-space:nowrap;text-shadow:0 1px 2px rgba(0,0,0,.65)}
#pub-frame #corner-nw{transform:rotate(90deg)}
#pub-frame #corner-ne{transform:rotate(180deg)}
#pub-frame #corner-sw{transform:rotate(0deg)}
#pub-frame #corner-se{transform:rotate(-90deg)}
#pub-frame .p{position:relative;overflow:hidden;background:rgba(0,0,0,.2);border:1px solid #1e3a1e}
#pub-frame .p.active{border-color:#ffd700;background:rgba(255,215,0,.03)}
#pub-frame .p.active .pm{display:flex;background:rgba(163,230,155,.26);border:1px solid rgba(163,230,155,.5);border-radius:6px;padding:3px 4px;min-height:26px;align-items:center}
#pub-frame .pi{position:absolute;top:50%;left:50%;display:flex;flex-direction:column;gap:4px;padding:6px 10px;white-space:nowrap;min-width:0}
#pub-frame .pi-east{width:100%;height:100%;transform:translate(-50%,-50%) rotate(0deg)}
#pub-frame .pi-west{width:100%;height:100%;transform:translate(-50%,-50%) rotate(180deg)}
#pub-frame .pi-south{width:calc(var(--sq) - 300px);height:170px;transform:translate(-50%,-50%) rotate(90deg)}
#pub-frame .pi-north{width:calc(var(--sq) - 300px);height:170px;transform:translate(-50%,-50%) rotate(-90deg)}
#pub-frame .ph{display:flex;align-items:center;gap:8px;padding:4px 10px;background:rgba(0,0,0,.3);border-radius:6px;border:1px solid #3a2a0a;flex-shrink:0}
#pub-frame .ph{display:none}
#pub-frame .pw{font-size:1.6em;line-height:1;color:#ffd700;flex-shrink:0}
#pub-frame .pa-frame{width:89.6px;height:112px;flex:0 0 auto;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.35);border:2px solid rgba(255,215,0,.5);border-radius:8px;padding:4px;margin-right:6px;box-sizing:border-box}
#pub-frame .pa-frame:empty{display:none}
#pub-frame .pa-frame img{width:100%;height:100%;object-fit:cover;border-radius:6px;display:block}
#pub-frame .pa-frame.pa-ting-back{position:relative;background:linear-gradient(135deg,#fff 0%,#fdfdfc 72%,#fafaf9 100%);border-color:#e3e5e8;box-shadow:0 2px 5px rgba(0,0,0,.25),0 0 8px rgba(255,255,255,.28),inset 0 0 0 1px rgba(255,255,255,.9)}
#pub-frame .pa-frame.pa-ting-back::before{content:"";position:absolute;inset:6% 5%;border:1.5px solid #eceef0;border-radius:6px;pointer-events:none}
#pub-frame .pa-frame.pa-ting-back::after{content:"";position:absolute;inset:2% 3% 40% 2%;border-radius:6px;background:linear-gradient(135deg,rgba(255,255,255,.95),rgba(255,255,255,.18) 55%,rgba(255,255,255,0) 100%);pointer-events:none}
#pub-frame .pa-frame.pa-ting-back .pa-ting-text{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:2;color:#e53935;font-size:2.1em;font-weight:900;line-height:1;pointer-events:none;text-shadow:0 1px 0 #fff,0 -1px 0 #fff,1px 0 0 #fff,-1px 0 0 #fff,0 0 8px rgba(255,215,0,.95),0 2px 3px rgba(0,0,0,.45)}
#pub-frame .pa-name{writing-mode:vertical-rl;font-family:"Microsoft YaHei","微软雅黑",sans-serif;font-weight:bold;color:#00ffff;font-size:1.3em;line-height:1.2;letter-spacing:.1em;align-self:center;margin-right:6px}
#pub-frame .pn{font-size:.95em;font-weight:bold;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}
#pub-frame .pc{font-size:.7em;color:#ffd700;background:rgba(255,215,0,.1);padding:1px 8px;border-radius:8px;border:1px solid rgba(255,215,0,.2);flex-shrink:0}
#pub-frame .pc:empty{display:none}
#pub-frame .pm{display:flex;gap:0.12em;flex-shrink:0;flex-wrap:wrap}
#pub-frame .pm:empty{display:none}
#pub-frame .mb{display:flex;align-items:center;flex-shrink:0;gap:6px}
#pub-frame .mtag{font-size:.55em;padding:1px 4px;line-height:1.3;white-space:nowrap;background:#5c3d1e;color:#ffd700}
#pub-frame .mtag[data-t="chi"]{background:#1e4d72}
#pub-frame .mtag[data-t="pong"]{background:#1d5a3a}
#pub-frame .mtag[data-t="kong"]{background:#6b3a08}
#pub-frame .mtag[data-t="ankong"]{background:#3a1a50}
#pub-frame .mt{font-size:var(--mj-pub-meld-tile-w,2.9em);line-height:1;padding:0;display:block;width:1em;height:1.35em;overflow:hidden;flex-shrink:0;font-family:"Microsoft YaHei","Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif}
#pub-frame .mt span{display:block;width:100%;height:100%;line-height:1}
#pub-frame .mt img{width:100%;height:100%;display:block}
#pub-frame .mt svg{width:100%;height:100%;display:block}
#pub-frame #tc{position:relative;display:flex;flex-direction:column;border:3px solid #5c3d1e;background:radial-gradient(#1a2e0c,#0c1804 70%)}
#pub-frame #rv{flex:1;display:flex;flex-direction:column;overflow:hidden;min-height:0;transition:transform .5s ease}
#pub-frame .rh{display:flex;align-items:center;justify-content:center;gap:.55em;padding:.28em .55em;background:linear-gradient(180deg,rgba(0,0,0,.58),rgba(0,0,0,.26));border-bottom:1px solid rgba(255,215,0,.22);font-size:.95em;color:#ffd700;text-align:center;flex-shrink:0;white-space:nowrap}
#pub-frame .rw-badge{display:inline-flex;align-items:center;gap:.38em;padding:.14em .62em .14em .24em;border:1px solid rgba(255,215,0,.55);border-radius:999px;background:rgba(0,0,0,.46);box-shadow:0 0 9px rgba(255,215,0,.13),inset 0 0 8px rgba(255,215,0,.07)}
#pub-frame .rw-glyph{width:1.55em;height:1.55em;border-radius:50%;display:flex;align-items:center;justify-content:center;flex:0 0 auto;border:1px solid rgba(255,215,0,.8);background:radial-gradient(circle at 35% 30%,#3c5a1e,#111f06 72%);color:#ffe27a;font-weight:900;font-size:.92em;line-height:1;text-shadow:0 1px 2px #000}
#pub-frame .rw-main{font-weight:900;letter-spacing:.08em;color:#ffe27a}
#pub-frame .rw-sub{font-size:.86em;color:#cdb87f;letter-spacing:.03em}
#pub-frame #rt{flex:1;display:flex;flex-wrap:wrap;align-content:flex-start;gap:0;padding:10px;overflow-y:auto}
#pub-frame #rt:empty::after{content:"暂无弃牌";color:#1a1a1a;font-size:.75em;padding:16px;width:100%;text-align:center}
#pub-frame .rt{font-size:var(--mj-pub-discard-tile-w,3.72em);line-height:1;margin:0 0.04em;display:inline-block;width:1em;height:1.35em;overflow:hidden;font-family:"Microsoft YaHei","Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif}
#pub-frame .rt img{width:100%;height:100%;display:block}
#pub-frame .rt svg{width:100%;height:100%;display:block}
#pub-frame .rt.latest{background:rgba(255,215,0,.2);border-radius:4px;padding:0;margin:0 0.04em}
@media (max-width:650px){
  #pub-frame .rh{font-size:.74em;gap:.3em;padding:.24em .3em}
  #pub-frame .rw-badge{gap:.3em;padding:.12em .5em .12em .18em}
  #pub-frame .rw-glyph{width:1.5em;height:1.5em}
  #pub-frame .rw-sub{display:none}
}
@keyframes fadeIn{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:translateX(0)}}
@keyframes spin{to{transform:rotate(360deg)}}

/* ===== 哈尔滨玩法左侧 HUD（牌桌外空白处） ===== */
#harbin-hud{position:fixed;z-index:40;padding:10px 11px 9px;background:linear-gradient(180deg,rgba(18,28,10,.96),rgba(8,14,4,.97));border:1px solid #7a5a1e;border-radius:10px;box-shadow:0 6px 24px rgba(0,0,0,.45),inset 0 0 0 1px rgba(255,215,0,.08);color:#e8d5a3;font-family:"Microsoft YaHei",sans-serif;font-size:12px;line-height:1.35;pointer-events:none;user-select:none}
#harbin-hud .hh-head{display:flex;align-items:baseline;justify-content:space-between;gap:6px;padding-bottom:7px;border-bottom:1px solid rgba(255,215,0,.18)}
#harbin-hud .hh-wind{font-size:16px;font-weight:700;color:#ffd700;letter-spacing:1px;text-shadow:0 1px 4px rgba(0,0,0,.7)}
#harbin-hud .hh-dealer{font-size:10px;color:#b9c9a3;white-space:nowrap}
#harbin-hud .hh-bao{margin-top:8px}
#harbin-hud .hh-bao-label{font-size:10px;color:#9fb08c;letter-spacing:2px;margin-bottom:4px}
#harbin-hud .hh-bao-tile{display:flex;align-items:center;gap:8px;min-height:38px;padding:4px 7px;border:1px dashed rgba(255,215,0,.28);border-radius:7px;background:rgba(255,215,0,.035)}
#harbin-hud .hh-bao-tile.revealed{border-style:solid;border-color:#ffd700;background:rgba(255,215,0,.1);box-shadow:0 0 10px rgba(255,215,0,.14)}
#harbin-hud .hh-bao-glyph{display:flex;align-items:center;justify-content:center;width:var(--hh-tile-w,26px);height:calc(var(--hh-tile-w,26px) * 1.35);font-size:var(--hh-tile-w,26px);line-height:1;color:#8a6d3b;text-shadow:none;flex:0 0 auto}
#harbin-hud .hh-bao-glyph img,#harbin-hud .hh-bao-glyph svg{display:block;width:100%;height:100%;object-fit:fill}
#harbin-hud .hh-bao-glyph.hh-tile-hidden{background:linear-gradient(180deg,#fffdf3,#e9dfc3);border:1px solid #c9c1a8;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.35);color:#8a6d3b}
#harbin-hud .hh-bao-glyph .hh-tile-q{font-size:.55em;font-weight:700;line-height:1}
#harbin-hud .hh-bao-name{font-size:11px;color:#e8d5a3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#harbin-hud .hh-bao-meta{display:flex;justify-content:space-between;gap:6px;margin-top:5px;font-size:10px;color:#a9bd8f}
#harbin-hud .hh-bao-rule{color:#d9b45a}
#harbin-hud .hh-bao-note{margin-top:3px;font-size:10px;color:#8fa27c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#harbin-hud .hh-score-title{margin-top:9px;padding-top:7px;border-top:1px solid rgba(255,215,0,.18);font-size:10px;letter-spacing:2px;color:#9fb08c}
#harbin-hud .hh-scores{margin-top:4px}
#harbin-hud .hh-score-row{display:grid;grid-template-columns:18px minmax(0,1fr) auto 16px;align-items:center;gap:5px;padding:3px 3px 3px 4px;border-left:2px solid transparent;border-radius:4px}
#harbin-hud .hh-score-row.is-dealer{background:rgba(255,215,0,.075);border-left-color:#ffd700}
#harbin-hud .hh-score-row.is-turn{background:rgba(120,220,120,.1)}
#harbin-hud .hh-score-wind{color:#d9b45a;font-weight:700;text-align:center}
#harbin-hud .hh-score-name{color:#dce8ce;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#harbin-hud .hh-score-val{color:#9dff5a;font-weight:700;font-variant-numeric:tabular-nums}
#harbin-hud .hh-dealer-tag{font-size:9px;color:#1a1200;background:#ffd700;border-radius:3px;text-align:center;line-height:14px}
#harbin-hud .hh-rule{margin-top:8px;padding-top:6px;border-top:1px solid rgba(255,215,0,.12);font-size:10px;line-height:1.55;color:#81936f;letter-spacing:.5px}
#round-info{display:none!important}
