.result-dialog{width:min(900px,94vw);display:grid;grid-template-columns:270px minmax(420px,1fr);gap:16px;text-align:left;padding:0;overflow:hidden}.result-hero{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:360px;padding:28px 22px;text-align:center;background:radial-gradient(circle at 50% 25%,#ffd88755,transparent 35%),linear-gradient(145deg,#e7a93a,#9c5d18);color:#fff8df}.result-crown{font-size:68px;filter:drop-shadow(0 8px 8px #5b2b1680)}.result-hero small{font-weight:800;letter-spacing:4px}.result-hero h2{margin:7px 0;font-size:38px;text-shadow:0 4px 8px #78420f}.result-hero p{margin:8px 0;line-height:1.65}.result-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;align-self:center;margin:18px 16px 18px 0}.result-stats>div{padding:10px 6px;border:1px solid #b8944d55;border-radius:10px;background:#082b23}.result-stats small,.result-stats b{display:block}.result-stats small{color:#82a097;font-size:10px}.result-stats b{margin-top:4px;color:#f4d797;font-size:13px}.result-stats.player-results{display:block}.result-table-head,.result-player{display:grid;grid-template-columns:minmax(180px,1fr) 62px 82px 92px;align-items:center;gap:8px}.result-table-head{padding:0 10px 7px;color:#819b91;font-size:10px}.result-player{position:relative;margin-top:5px;padding:8px 10px;border:1px solid #365e5055;border-radius:10px;background:#082b23}.result-player.winner{border-color:#d7ab53;background:linear-gradient(90deg,#4f4329,#102f27)}.result-player.mine:after{content:'自己';position:absolute;left:39px;top:2px;padding:1px 4px;border-radius:4px;background:#c87530;color:#fff;font-size:8px}.result-player>.result-avatar{grid-row:1;grid-column:1;display:block;width:42px;height:42px;border:2px solid #c9a55c;border-radius:8px;background-image:url('/assets/avatar-sprite-v1.png');background-size:200% 200%;overflow:hidden}.result-avatar.avatar-system-1{background-position:0 0}.result-avatar.avatar-system-2{background-position:100% 0}.result-avatar.avatar-system-3{background-position:0 100%}.result-avatar.avatar-system-4{background-position:100% 100%}.result-avatar img{width:100%;height:100%;object-fit:cover}.result-player>span{grid-row:1;grid-column:1;margin-left:51px}.result-player>span small{margin-top:3px}.result-player strong{color:#f2d38d}.result-player em{padding:3px 5px;border-radius:6px;background:#17533f;color:#dcece5;font-size:10px;font-style:normal;text-align:center}.result-player i{font-style:normal;font-weight:800;text-align:right}.result-player i.gain{color:#f0a45d}.result-player i.loss{color:#6eb8f1}.result-actions{grid-column:1/-1;display:flex;justify-content:center;gap:10px;padding:0 16px 14px}.result-actions button{min-width:150px}
.dialog-kicker{color:#c9a457;letter-spacing:2px}.recharge-dialog{width:min(650px,90vw)}.recharge-dialog h2{margin:5px 0}.recharge-packages{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin:14px 0}.recharge-packages button,.recharge-channels button{border:1px solid #806d4f;border-radius:12px;background:#0b3128;color:#eadfc9;padding:12px;cursor:pointer}.recharge-packages button b,.recharge-packages button small,.recharge-packages button em,.recharge-channels button b,.recharge-channels button small{display:block}.recharge-packages button b{color:#f5d384;font-size:18px}.recharge-packages button small,.recharge-channels button small{color:#849e95;font-size:10px}.recharge-packages button em{margin-top:6px;color:#d7b56e;font-style:normal}.recharge-packages button.selected,.recharge-channels button.selected{border-color:#f3ca6b;background:#22513f;box-shadow:0 0 0 2px #d8a84b40}.recharge-channels{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-bottom:14px}.recharge-result{display:flex;flex-direction:column;gap:4px;min-height:25px;margin:10px 0;color:#e5c477}.recharge-result span{color:#9db1aa}.channel-closed{grid-column:1/-1;padding:18px;border:1px dashed #806d4f;border-radius:10px;color:#b9a98c;text-align:center}.order-history{border-top:1px solid #6d654955;margin-top:13px;padding-top:9px}.order-history h3{font-size:12px}.order-row{display:flex;justify-content:space-between;align-items:center;padding:7px;border-radius:7px;background:#08271f;margin-top:5px}.order-row span,.order-row small{display:block}.order-row b{font-size:10px}.order-row small{color:#7f9990;font-size:9px}.order-row em{color:#e0ba68;font-size:10px;font-style:normal}.lobby-info-dialog{width:min(520px,86vw)}.lobby-info-dialog h2{margin:5px 0 12px}.lobby-info-dialog p{line-height:1.8}
html.fullscreen-active{--safe-top:0px!important;--safe-right:0px!important;--safe-bottom:0px!important;--safe-left:0px!important}html.fullscreen-active .lobby-screen{padding:0!important}html.fullscreen-active .lobby-header{height:44px!important;padding:0 12px!important}html.fullscreen-active .lobby-body{height:calc(100dvh - 70px)!important}html.fullscreen-active .matching-layer{inset:44px 0 26px!important}html.fullscreen-active .game-shell>.topbar nav{position:fixed!important;top:5px!important;right:7px!important}
@media (orientation:landscape) and (max-height:700px){.result-dialog,.recharge-dialog,.lobby-info-dialog{max-height:88dvh;padding:14px 18px}.result-stats{margin:7px 0}.recharge-packages{margin:8px 0}.recharge-packages button,.recharge-channels button{padding:7px}.order-history{max-height:80px;overflow:auto}.result-actions button{min-height:32px;padding:5px 14px}}
@media (orientation:landscape) and (max-height:700px){.result-dialog{padding:0;grid-template-columns:220px minmax(400px,1fr)}.result-hero{min-height:265px;padding:12px}.result-crown{font-size:42px}.result-hero h2{font-size:27px}.result-player{padding:5px 8px}.result-player>.result-avatar{width:34px;height:34px}.result-player>span{margin-left:42px}.result-actions{padding-bottom:7px}}
@media (orientation:landscape) and (max-height:600px),(orientation:portrait) and (max-width:700px){dialog{width:min(680px,94vw);max-width:94vw;max-height:92dvh;margin:auto;padding:10px 16px;overflow:auto;font-size:11px;overscroll-behavior:contain}dialog h2{font-size:17px;line-height:1.25;margin:4px 0}dialog p{margin:5px 0}.close{position:sticky;float:right;right:0;top:0;z-index:40;width:28px;height:28px;padding:0;border-radius:50%;background:#fff8e8dd}.settings-dialog label{margin:5px!important}.rule-grid{padding:7px;font-size:10px}.result-crown{font-size:34px}.big{margin:6px auto;font-size:12px}.recharge-dialog{width:min(700px,96vw)}.recharge-packages{grid-template-columns:repeat(4,1fr)}.lobby-info-dialog{width:min(560px,92vw)}}
html.virtual-landscape dialog[open]{max-height:92vw;max-width:94dvh}

/* Result panel: keep every column inside compact phone landscape viewports. */
.result-dialog{width:min(900px,96vw);max-width:96vw;grid-template-columns:minmax(170px,28%) minmax(0,1fr)}
.result-stats{min-width:0;grid-template-columns:repeat(4,minmax(0,1fr))}
.result-table-head,.result-player{grid-template-columns:minmax(105px,1fr) 52px 68px minmax(68px,90px)}
.result-player>span{min-width:0}.result-player>span b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (orientation:landscape) and (max-height:700px){.result-dialog{grid-template-columns:minmax(155px,26%) minmax(0,1fr)}}
@media (orientation:landscape) and (max-width:760px){.result-dialog{gap:8px;grid-template-columns:minmax(130px,24%) minmax(0,1fr)}.result-table-head,.result-player{grid-template-columns:minmax(92px,1fr) 42px 56px minmax(58px,72px);gap:5px}.result-player{padding:5px 6px}.result-actions button{min-width:120px}}

/* Explicit columns prevent avatar/name overlap at browser zoom and high DPI. */
.result-crown{display:grid;place-items:center;width:68px;height:68px;margin-bottom:10px;border:2px solid #ffe3a0;border-radius:50%;background:#8e591d;color:#fff4d0;font-size:34px;font-weight:900}
.result-table-head{grid-template-columns:minmax(0,1fr) 62px 82px 92px}
.result-player{grid-template-columns:42px minmax(0,1fr) 62px 82px 92px}
.result-player>.result-avatar{grid-row:auto;grid-column:auto}.result-player>span{grid-row:auto;grid-column:auto;margin-left:0!important}.result-player.mine:after{left:38px;top:1px}
@media (orientation:landscape) and (max-height:700px){.result-table-head{grid-template-columns:minmax(0,1fr) 52px 68px 78px}.result-player{grid-template-columns:34px minmax(0,1fr) 52px 68px 78px}}
@media (orientation:landscape) and (max-width:760px){.result-table-head{grid-template-columns:minmax(0,1fr) 42px 56px 64px}.result-player{grid-template-columns:32px minmax(0,1fr) 42px 56px 64px}}

/* Phone landscape result: keep four players and both actions inside one screen. */
@media (orientation:landscape) and (max-height:520px){
  .result-dialog{width:min(760px,94vw);max-width:94vw;max-height:94dvh;grid-template-columns:150px minmax(0,1fr);gap:7px;padding:0;overflow:auto}
  .result-hero{min-height:0;padding:9px 8px}.result-crown{width:42px;height:42px;margin-bottom:4px;font-size:23px}.result-hero small{font-size:8px;letter-spacing:2px}.result-hero h2{margin:3px 0;font-size:20px}.result-hero p{margin:3px 0;font-size:9px;line-height:1.4}
  .result-stats{margin:7px 7px 2px 0}.result-table-head{padding:0 5px 3px;grid-template-columns:minmax(0,1fr) 39px 51px 65px;font-size:8px}.result-player{min-height:35px;margin-top:2px;padding:3px 5px;grid-template-columns:27px minmax(0,1fr) 39px 51px 65px;gap:4px}.result-player>.result-avatar{width:27px;height:27px;border-radius:6px}.result-player>span b{font-size:10px}.result-player>span small{font-size:7px}.result-player strong{font-size:10px}.result-player em,.result-player i{font-size:8px}.result-player.mine:after{left:25px;top:0;font-size:6px}
  .result-actions{gap:8px;padding:2px 8px 7px}.result-actions button{min-width:120px;min-height:30px;margin:0;padding:5px 12px;font-size:11px}
}
