/* 午夜二十一 · 黑杰克舞台(原型 games/blackjack/style.css, 选择器限定在 .bj-stage 里) */
.bj-stage{color-scheme:dark;font:14px/1.5 system-ui,"Microsoft YaHei",sans-serif;color:#eee4c7;background:#0d1515;--gold:#d8be7e;--muted:#9aaca3}.bj-stage *{box-sizing:border-box}.bj-stage{margin:0}.bj-stage button,.bj-stage a{-webkit-tap-highlight-color:transparent}.bj-stage button{font:inherit;border:1px solid #d8be7e55;background:#172622de;color:#eee4c7;padding:11px 18px;border-radius:6px;cursor:pointer}.bj-stage button:hover{background:#294237;border-color:var(--gold)}.bj-stage button:disabled{opacity:.4;cursor:wait}.bj-stage button:focus-visible,.bj-stage a:focus-visible{outline:2px solid var(--gold);outline-offset:4px}.bj-stage a{color:var(--gold);text-decoration:none}.bj-stage [hidden]{display:none!important}.bj-stage{position:relative;width:100%;height:100%;min-height:620px;overflow:hidden}.bj-stage #scene{position:absolute;inset:0}.bj-stage #scene canvas{width:100%;height:100%;display:block}.bj-stage .vignette{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 46%,transparent 25%,#04100b4d 75%,#050b0dcc)}.bj-stage header{position:absolute;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;padding:22px 30px;gap:12px;background:linear-gradient(#071211b0,transparent)}.bj-stage header>a{font-size:12px}.bj-stage .brand{font-size:22px;letter-spacing:4px;display:flex;align-items:center;gap:20px}.bj-stage .brand small{font-size:9px;letter-spacing:3px;color:var(--gold)}.bj-stage header button{padding:7px 13px;font-size:12px}.bj-stage .opponent-panel{position:absolute;top:100px;left:35px;width:245px}.bj-stage .opponent-panel>small,.bj-stage .player-panel>small,.bj-stage dialog>small{font-size:9px;letter-spacing:3px;color:var(--gold)}.bj-stage #opponent-name{font-size:21px;font-weight:500;margin:8px 0 15px}.bj-stage .health{position:relative;padding:13px 15px;background:#0e211eaa;border:1px solid #a7b79536;border-radius:7px;overflow:visible}.bj-stage .health>span{color:var(--muted);font-size:11px}.bj-stage .health>b{float:right;font-size:13px;color:#e4e6d0}.bj-stage .segments{display:grid;grid-template-columns:repeat(10,1fr);gap:4px;margin-top:11px}.bj-stage .segments i{height:12px;background:#adccaa;box-shadow:0 0 8px #97b99125}.bj-stage .segments i.lost{background:#25372e;box-shadow:none}.bj-stage .opponent-panel>button{font-size:11px;padding:8px 0;border:0;background:none;color:var(--gold);margin-top:6px}.bj-stage .round-label{position:absolute;top:104px;right:36px;text-align:right;letter-spacing:2px;color:var(--gold);font-size:12px}.bj-stage .round-label small{display:block;color:var(--muted);font-size:10px;letter-spacing:0;margin-top:7px}.bj-stage .score{position:absolute;display:flex;align-items:center;gap:13px;background:#111e19c9;border:1px solid #cdb37155;padding:9px 16px;clip-path:polygon(8% 0,92% 0,100% 50%,92% 100%,8% 100%,0 50%);pointer-events:none}.bj-stage .score span{font-size:10px;color:var(--muted)}.bj-stage .score b{font:26px Georgia,serif;color:var(--gold)}.bj-stage .opponent-score{left:calc(50% + 180px);top:43%}.bj-stage .player-score{left:calc(50% + 195px);top:66%}.bj-stage .player-panel{position:absolute;bottom:173px;left:35px;width:245px}.bj-stage .player-panel>small{display:block;margin-bottom:7px}.bj-stage .console{position:absolute;bottom:40px;left:35px;right:35px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid #cdb37140;padding:20px 0 0}.bj-stage .console small{color:var(--gold);font-size:9px;letter-spacing:3px}.bj-stage .console h2{font-size:24px;font-weight:500;margin:5px 0 6px}.bj-stage .console p{color:var(--muted);font-size:12px;margin:0}.bj-stage .actions{display:flex;gap:10px;flex-shrink:0}.bj-stage .actions button{padding:17px 26px;min-width:140px}.bj-stage .primary{background:#d8be7e;color:#1d281d;border-color:#d8be7e}.bj-stage .primary:hover{background:#edcf87}.bj-stage .actions span{display:inline-block;font-size:10px;border:1px solid currentColor;padding:0 5px;opacity:.5;margin-left:12px}.bj-stage .table-note{position:absolute;bottom:11px;left:0;right:0;text-align:center;font-size:9px;letter-spacing:1px;color:#7e9687;pointer-events:none}.bj-stage .table-note i{font-style:normal;margin:0 12px;color:#b7a572}.bj-stage .slash{position:absolute;left:8%;top:42%;width:86%;height:5px;transform:rotate(-14deg) scaleX(0);transform-origin:left;background:#fff0d7;box-shadow:0 0 8px #ff3737,0 0 22px #ff2020;pointer-events:none}.bj-stage .damage-number{position:absolute;right:17px;top:0;font:bold 25px Georgia;color:#ff5b5b;font-style:normal;opacity:0;pointer-events:none}.bj-stage .health.damaged{animation:wound 2.2s ease-out}.bj-stage .damaged .slash{animation:slash 1.8s ease-out}.bj-stage .damaged .damage-number{animation:damage 2.2s ease-out}@keyframes slash{0%{transform:rotate(-14deg) scaleX(0);opacity:1}22%{transform:rotate(-14deg) scaleX(1);opacity:1}100%{transform:rotate(-14deg) scaleX(1);opacity:0}}@keyframes wound{20%{background:#c32532aa;transform:translateX(-6px)}35%{transform:translateX(5px)}50%{transform:translateX(-3px)}100%{transform:none}}@keyframes damage{10%{opacity:1}100%{transform:translateY(-42px);opacity:0}}.bj-stage #loading,.bj-stage #error{position:absolute;inset:0;z-index:20;background:radial-gradient(circle at 50% 42%,#143434,#050d0d 72%);display:grid;place-content:center;text-align:center}.bj-stage #loading>span{font:70px Georgia;color:var(--gold);animation:pulse 1.5s infinite alternate}.bj-stage #loading h2,.bj-stage #error h2{font-weight:400;font-size:24px}.bj-stage #loading p,.bj-stage #error p{color:var(--muted);max-width:500px}@keyframes pulse{to{opacity:.3}}.bj-stage dialog{color:#eee4c7;background:#101f1d;border:1px solid #a68f57;border-radius:12px;width:min(1000px,94vw);max-height:88dvh;padding:32px}.bj-stage dialog::backdrop{background:#03120cd9;backdrop-filter:blur(6px)}.bj-stage dialog h2{font-weight:400;font-size:27px}.bj-stage dialog p{color:var(--muted);line-height:1.9}.bj-stage #help-dialog{width:min(640px,94vw)}.bj-stage .close{position:absolute;top:15px;right:15px;background:none;border:0;font-size:22px}.bj-stage #opponents{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin:22px 0}.bj-stage #opponents button{padding:0 0 12px;overflow:hidden;text-align:center;font-size:11px}.bj-stage #opponents img{width:100%;height:150px;object-fit:contain;display:block;background:radial-gradient(#374c3b,#172822)}.bj-stage #opponents small{display:block;color:var(--gold);font-size:9px;margin-top:6px}.bj-stage #performance{position:absolute;inset:0;z-index:50;background:radial-gradient(#34433d,#060e13);overflow:hidden}.bj-stage #performance-stage,.bj-stage #performance-stage canvas{width:100%;height:100%;display:block}.bj-stage .performance-top{position:absolute;top:25px;left:30px;right:30px;display:flex;justify-content:space-between;align-items:center;color:var(--gold);font-size:11px;letter-spacing:2px}.bj-stage .performance-caption{position:absolute;bottom:35px;left:40px;text-shadow:0 2px 8px #000}.bj-stage .performance-caption small{font-size:10px;letter-spacing:4px;color:var(--gold)}.bj-stage .performance-caption h2{font-size:29px;font-weight:400;margin:10px 0}.bj-stage .performance-caption p{font-size:13px;color:#d5d3bc}@media(max-width:900px){.bj-stage .brand small{display:none}.bj-stage .opponent-panel{left:20px;width:200px}.bj-stage .round-label{right:20px}.bj-stage .player-panel{left:20px;width:200px;bottom:197px}.bj-stage .console{left:20px;right:20px;bottom:35px;align-items:start}.bj-stage .console h2{font-size:20px}.bj-stage .console p{max-width:320px}.bj-stage .actions button{min-width:110px;padding:15px}.bj-stage .actions span{display:none}.bj-stage .opponent-score{left:calc(50% + 115px)}.bj-stage .player-score{left:calc(50% + 120px)}.bj-stage #opponents{grid-template-columns:repeat(3,1fr)}}@media(max-width:600px){.bj-stage{min-height:700px}.bj-stage header{padding:15px}.bj-stage .brand{font-size:17px;letter-spacing:1px}.bj-stage header>a{font-size:10px}.bj-stage .opponent-panel{top:75px;left:15px;width:170px}.bj-stage #opponent-name{font-size:15px;margin-bottom:9px}.bj-stage .health{padding:10px}.bj-stage .health>b{font-size:11px}.bj-stage .segments{gap:3px}.bj-stage .segments i{height:9px}.bj-stage .round-label{top:88px;right:15px;font-size:10px;max-width:90px}.bj-stage .round-label small{font-size:9px}.bj-stage .opponent-score{left:auto;right:15px;top:43%;padding:6px 12px;gap:8px}.bj-stage .player-score{left:auto;right:15px;top:65%;padding:6px 12px;gap:8px}.bj-stage .score b{font-size:22px}.bj-stage .score span{font-size:9px}.bj-stage .player-panel{left:15px;width:170px;bottom:220px}.bj-stage .console{left:15px;right:15px;flex-direction:column;bottom:35px;gap:13px;padding-top:12px}.bj-stage .console h2{font-size:19px}.bj-stage .console p{max-width:100%;font-size:11px}.bj-stage .actions{width:100%}.bj-stage .actions button{flex:1;padding:13px;min-width:0}.bj-stage .table-note{font-size:8px;letter-spacing:0}.bj-stage .table-note i{margin:0 6px}.bj-stage dialog{padding:25px 18px}.bj-stage #opponents{gap:8px}.bj-stage #opponents img{height:120px}.bj-stage #opponents button{font-size:9px}.bj-stage .performance-top{left:15px;right:15px;top:15px;font-size:9px}.bj-stage .performance-caption{left:20px;bottom:20px}.bj-stage .performance-caption h2{font-size:23px}}@media(prefers-reduced-motion:reduce){.bj-stage #loading>span{animation:none}}

.bj-stage .segments i.losing{position:relative;overflow:hidden}.bj-stage .segments i.losing::after{content:"";position:absolute;inset:0;background:#ff6262;transform-origin:left;animation:drain 2.2s ease-in-out forwards}@keyframes drain{0%,20%{transform:scaleX(1);background:#adccaa}35%{background:#ff6262}100%{transform:scaleX(0)}}

.bj-stage .model-lens,.bj-stage .model-magnifier{position:fixed;z-index:1000;pointer-events:none}.bj-stage .model-lens{width:38px;height:38px;transform:translate(-50%,-50%);display:grid;place-items:center;border:2px solid #c6e5b1;border-radius:50%;background:#111a2670;color:#fff;font:32px/1 system-ui;box-shadow:0 0 12px #0008}.bj-stage .model-magnifier{padding:6px;border:1px solid #c6e5b1;border-radius:12px;background:radial-gradient(#344152,#161d28);box-shadow:0 8px 32px #0009}.bj-stage .model-magnifier canvas{display:block;width:240px;height:240px;border-radius:7px}

.bj-stage #transition{position:absolute;inset:0;z-index:60;display:grid;place-items:center;background:#050405}.bj-stage #transition p{padding:25px;text-align:center;color:#e5ceb0;font:26px/1.8 Georgia,"Microsoft YaHei",serif;letter-spacing:5px;animation:night-caption 1.8s both}@keyframes night-caption{0%,100%{opacity:0;transform:translateY(8px)}30%,65%{opacity:1;transform:none}}.bj-stage .vignette{background:radial-gradient(ellipse at 50% 45%,transparent 35%,#120c0938 78%,#080607a6)}.bj-stage .health{background:#211916bd;border-color:#cba47740}.bj-stage .console{background:linear-gradient(transparent,#0c08079c);padding:20px 0 0}.bj-stage .opponent-panel #opponent-name{text-shadow:0 2px 9px #000}.bj-stage .table-note{color:#baa78f}.bj-stage .player-panel{bottom:160px}@media(max-width:600px){.bj-stage .player-panel{bottom:215px}.bj-stage #transition p{font-size:20px;letter-spacing:3px}}@media(prefers-reduced-motion:reduce){.bj-stage #transition p{animation:none}}

.bj-stage header .brand{margin-right:auto;margin-left:24px;font-size:19px}.bj-stage .console{border-top-color:#c5a16a5c}@media(max-width:600px){.bj-stage header .brand{margin-left:0;font-size:16px}.bj-stage .opponent-panel>small{display:none}.bj-stage .opponent-panel{top:75px;width:160px}.bj-stage .opponent-panel #opponent-name{margin:0 0 7px;font-size:14px}.bj-stage .opponent-panel .health{padding:8px 10px}.bj-stage .opponent-panel .segments{margin-top:8px}}

.bj-stage #performance-next{position:absolute;right:30px;bottom:30px;z-index:2;min-width:160px;padding:14px 22px}.bj-stage .performance-caption{max-width:min(650px,calc(100% - 260px))}.bj-stage .performance-caption p{line-height:1.8;text-shadow:0 2px 5px #000}@media(max-width:600px){.bj-stage #performance-next{right:18px;bottom:20px;min-width:145px}.bj-stage .performance-caption{left:20px;bottom:90px;max-width:calc(100% - 40px)}.bj-stage #transition p{font-size:18px;letter-spacing:2px}}

.bj-stage #opponent-speech{position:absolute;left:calc(50% + 235px);top:170px;width:320px;max-width:calc(50% - 260px);z-index:5;padding:19px 23px 21px;border:1px solid #e5c69865;border-radius:6px 22px 22px 22px;background:linear-gradient(135deg,#38251ec4,#1813119c);box-shadow:0 12px 32px #0005,inset 0 1px #ffe8c41a;color:#fff3df;pointer-events:none;backdrop-filter:blur(12px)}.bj-stage #opponent-speech::before{content:"";position:absolute;left:-7px;top:28px;width:12px;height:12px;background:#38251ec4;border-left:1px solid #e5c69865;border-bottom:1px solid #e5c69865;transform:rotate(45deg)}.bj-stage #opponent-speech::after{content:"“";position:absolute;right:14px;top:6px;color:#e4c18c45;font:38px Georgia,serif}.bj-stage #opponent-speech small{display:block;padding:0 20px 9px 0;border-bottom:1px solid #d8be7e29;font-size:12px;letter-spacing:1px;color:#e8c38e}.bj-stage #opponent-speech p{margin:11px 0 0;font-size:18px;font-weight:500;line-height:1.75;overflow-wrap:anywhere;text-shadow:0 1px 3px #000b}.bj-stage .talking{animation:speech-in .25s ease-out}@keyframes speech-in{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}@media(max-width:1050px){.bj-stage #opponent-speech{left:auto;right:18px;width:230px;max-width:calc(50% - 30px)}}@media(max-width:600px){.bj-stage #opponent-speech{left:auto;right:14px;top:245px;width:205px;max-width:calc(100% - 28px);padding:12px 14px}.bj-stage #opponent-speech p{font-size:16px;line-height:1.65}.bj-stage #opponent-speech small{font-size:11px}.bj-stage #opponent-speech::before{top:21px}}@media(prefers-reduced-motion:reduce){.bj-stage .talking{animation:none}}

.bj-stage #exclusive[aria-pressed="true"]{color:#ffe3a9;text-shadow:0 0 8px #d8be7e88}
.bj-stage .opponent-panel>#exclusive{display:inline-flex;align-items:center;justify-content:center;min-width:94px;min-height:36px;margin-top:10px;padding:7px 13px;border:1px solid #d8be7e99;border-radius:20px;background:#312619dc;color:#ffe4ac;font-size:14px;font-weight:600;box-shadow:0 3px 12px #0004}.bj-stage .opponent-panel>#exclusive:hover{background:#594026}.bj-stage .opponent-panel>#exclusive[aria-pressed="true"]{border-color:#ffe0a0;background:#77552bdc;color:#fff2ce}@media(max-width:600px){.bj-stage .opponent-panel>#exclusive{min-height:32px;margin-top:8px;font-size:13px}}

/* 站点里的舞台: 外框 .bj-frame 页面内 16:9 / 全屏时盖满窗口(account.js 加 html.game-full); 里面的 .bj-stage 保留原型的最小高度,
   矮屏(横屏手机)在外框里上下滚动, 跟原型整页滚动一样 */
.bj-frame{position:relative;width:min(100%,calc((100vh - 100px)*16/9));aspect-ratio:16/9;margin:0 auto;border-radius:18px;overflow-x:hidden;overflow-y:auto;background:#0d1515}
html.game-full,html.game-full body{overflow:hidden}
html.game-full .bj-frame{position:fixed;inset:0;z-index:50;width:100vw;height:100vh;height:100dvh;aspect-ratio:auto;border-radius:0}
html.game-full .chat-fab{display:none}
.bj-stage [data-full-toggle]{display:inline-flex;align-items:center}
