/* =========================================================
   zk-result.css — 结算页独立样式（v329）
   不复用 zk-arena.css 里任何 .result-* 规则。
   布局唯一方案：#app 内文档流三栏（meta / 可滚卡 / 底栏）
   禁止 position:fixed（假横屏 #app rotate 会把 fixed 撑爆）
   ========================================================= */

/* —— 壳：占满 #app，关掉旧 padding / 顶栏 ——
   注意：假横屏 #app 尺寸必须是 width=--fl-h、height=--fl-w + rotate(90deg)
   绝不能用 100dvh/100% 覆盖，否则会把横排变成竖条 */
body.on-result{
  overflow:hidden!important;
}
body.on-result:not(.fake-land){
  height:100%!important;min-height:100%!important;
}
html:has(body.on-result:not(.fake-land)){
  height:100%!important;
}
/* 真横屏 / 桌面 */
body.on-result:not(.fake-land) #app{
  padding:0!important;margin:0!important;
  display:flex!important;flex-direction:column!important;
  width:100%!important;height:100%!important;min-height:100%!important;
  max-height:100dvh!important;height:100dvh!important;
  overflow:hidden!important;box-sizing:border-box!important;
  position:relative!important;transform:none!important;
}
/* 假横屏：完整保留旋转盒尺寸（覆盖上面的 100dvh） */
body.fake-land.on-result{
  overflow:hidden!important;
  width:var(--fl-w,100vw)!important;height:var(--fl-h,100vh)!important;
  position:relative!important;
}
body.fake-land.on-result #app{
  position:fixed!important;z-index:2!important;
  top:0!important;left:var(--fl-w,100vw)!important;right:auto!important;bottom:auto!important;
  width:var(--fl-h,100vh)!important;height:var(--fl-w,100vw)!important;
  min-width:0!important;min-height:0!important;
  max-width:none!important;max-height:none!important;
  margin:0!important;padding:0!important;
  display:flex!important;flex-direction:column!important;
  box-sizing:border-box!important;
  transform-origin:top left!important;
  transform:rotate(90deg)!important;
  overflow:hidden!important;-webkit-overflow-scrolling:touch!important;
  background:transparent!important;
}
body.on-result .topbar,
body.on-result #notice-bar,
body.on-result .mp-float{
  display:none!important;
}

body.on-result #screen-result.rs-v2{
  display:flex!important;flex-direction:column!important;
  flex:1 1 auto!important;align-self:stretch!important;
  width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;
  margin:0!important;padding:0!important;gap:0!important;
  position:relative!important;overflow:hidden!important;
  box-sizing:border-box!important;
  background:transparent!important;
  z-index:2!important;
}
body.on-result #screen-result.rs-v2[hidden]{display:none!important}

/* —— 顶栏 meta —— */
body.on-result #screen-result.rs-v2 .rs-meta{
  flex:0 0 auto!important;
  display:flex!important;flex-direction:row!important;align-items:center!important;
  gap:8px!important;padding:6px 10px!important;
  background:rgba(17,17,17,.82)!important;color:#fff8d6!important;
  border:0!important;border-bottom:3px solid #111!important;
  box-sizing:border-box!important;z-index:3!important;
}
body.on-result #screen-result.rs-v2 .rs-ver{
  font-size:12px!important;font-weight:900!important;
  padding:2px 8px!important;border-radius:999px!important;
  background:#ffef3a!important;color:#111!important;border:2px solid #111!important;
}
body.on-result #screen-result.rs-v2 .rs-meta-tip{
  flex:1 1 auto!important;min-width:0!important;
  font-size:11px!important;opacity:.9!important;white-space:nowrap!important;
  overflow:hidden!important;text-overflow:ellipsis!important;
}
body.on-result #screen-result.rs-v2 .rs-bug{
  flex:0 0 auto!important;
  padding:5px 10px!important;font-size:11px!important;font-weight:900!important;
  border:2px solid #fff8d6!important;border-radius:999px!important;
  background:transparent!important;color:#fff8d6!important;line-height:1.1!important;
}

/* —— 中间卡片（可滚） —— */
body.on-result #screen-result.rs-v2 .rs-card{
  flex:1 1 auto!important;min-height:0!important;
  width:100%!important;margin:0!important;
  padding:10px 12px!important;
  overflow:auto!important;-webkit-overflow-scrolling:touch!important;
  box-sizing:border-box!important;position:relative!important;
  background:linear-gradient(180deg,#fff6e2,#ffe08a 42%,#fff8d6)!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
  color:#111!important;
}
body.on-result #screen-result.rs-v2 .rs-card.win{
  background:linear-gradient(180deg,#fff6e2,#ffe08a 40%,#fff)!important;
}
body.on-result #screen-result.rs-v2 .rs-card.lose{
  background:linear-gradient(180deg,#ffe8f0,#ffb0c2 40%,#fff)!important;
}

body.on-result #screen-result.rs-v2 .rs-banner{
  position:absolute!important;top:10px!important;left:-6px!important;
  z-index:2!important;padding:3px 28px!important;
  font-size:12px!important;font-weight:900!important;letter-spacing:.08em!important;
  background:#ffef3a!important;color:#111!important;
  border:2px solid #111!important;transform:rotate(-8deg)!important;
  box-shadow:2px 2px 0 #111!important;pointer-events:none!important;
}
body.on-result #screen-result.rs-v2 .rs-card.lose .rs-banner{
  background:#ff2d6f!important;color:#fff!important;
}

body.on-result #screen-result.rs-v2 .rs-main{
  display:grid!important;
  grid-template-columns:minmax(96px,28%) minmax(0,1fr)!important;
  gap:8px 12px!important;align-items:start!important;
  margin:4px 0 0!important;width:100%!important;
}
body.on-result #screen-result.rs-v2 .rs-hero{
  position:relative!important;width:100%!important;
  height:clamp(96px,38vh,168px)!important;min-height:84px!important;
  display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:flex-end!important;
  margin:0!important;
}
body.on-result #screen-result.rs-v2 .rs-burst{
  position:absolute!important;inset:8% 10%!important;
  border-radius:50%!important;pointer-events:none!important;
  background:radial-gradient(circle,rgba(255,239,58,.55),transparent 68%)!important;
}
body.on-result #screen-result.rs-v2 .rs-hero img#result-hero-img{
  position:relative!important;z-index:1!important;
  width:auto!important;height:78%!important;max-width:100%!important;
  object-fit:contain!important;display:block!important;
  filter:drop-shadow(0 4px 0 rgba(17,17,17,.35))!important;
}
body.on-result #screen-result.rs-v2 .rs-hero-meta{
  position:relative!important;z-index:2!important;
  display:flex!important;flex-wrap:wrap!important;gap:4px!important;
  justify-content:center!important;align-items:center!important;
  width:max-content!important;max-width:100%!important;margin-top:2px!important;
}
body.on-result #screen-result.rs-v2 .rs-hero-meta b{
  font-size:11px!important;font-weight:900!important;color:#111!important;
  background:rgba(255,255,255,.85)!important;border:2px solid #111!important;
  border-radius:999px!important;padding:2px 8px!important;
}
body.on-result #screen-result.rs-v2 .rs-hero-meta span{
  font-size:10px!important;font-weight:800!important;color:#111!important;
  background:#2ad4ff!important;border:2px solid #111!important;
  border-radius:999px!important;padding:2px 7px!important;
}

body.on-result #screen-result.rs-v2 .rs-copy{
  min-width:0!important;display:flex!important;flex-direction:column!important;gap:5px!important;
}
body.on-result #screen-result.rs-v2 .rs-copy h1,
body.on-result #screen-result.rs-v2 #result-title{
  margin:0!important;font-size:clamp(16px,2.6vw,22px)!important;line-height:1.2!important;
  font-weight:900!important;color:#111!important;text-align:left!important;
}
body.on-result #screen-result.rs-v2 .rs-card.lose #result-title{color:#9a1040!important}
body.on-result #screen-result.rs-v2 #result-desc{
  margin:0!important;font-size:12px!important;line-height:1.35!important;
  color:#3a2a44!important;font-weight:700!important;
}
body.on-result #screen-result.rs-v2 .rs-score,
body.on-result #screen-result.rs-v2 #result-score{
  display:inline-block!important;align-self:flex-start!important;
  margin:0!important;padding:4px 10px!important;
  font-size:13px!important;font-weight:900!important;
  background:#111!important;color:#ffef3a!important;
  border-radius:999px!important;border:2px solid #111!important;
}
body.on-result #screen-result.rs-v2 .rs-card.lose #result-score{
  background:#fff!important;color:#9a1040!important;border-color:#9a1040!important;
}

body.on-result #screen-result.rs-v2 .rs-vs{
  display:flex!important;align-items:center!important;gap:8px!important;
  margin:2px 0!important;padding:4px 0!important;
}
body.on-result #screen-result.rs-v2 .rs-vs[hidden]{display:none!important}
body.on-result #screen-result.rs-v2 .rs-vs img{
  width:40px!important;height:40px!important;border-radius:10px!important;
  border:2px solid #111!important;object-fit:cover!important;background:#fff!important;
}
body.on-result #screen-result.rs-v2 .rs-vs span{
  font-size:12px!important;font-weight:900!important;color:#111!important;
}

body.on-result #screen-result.rs-v2 .rs-stats,
body.on-result #screen-result.rs-v2 #result-stats{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:5px!important;margin:2px 0!important;width:100%!important;
}
body.on-result #screen-result.rs-v2 #result-stats > div{
  background:rgba(255,255,255,.72)!important;border:2px solid #111!important;
  border-radius:10px!important;padding:6px 2px!important;text-align:center!important;
}
body.on-result #screen-result.rs-v2 #result-stats b{
  display:block!important;font-size:15px!important;font-weight:900!important;color:#111!important;
}
body.on-result #screen-result.rs-v2 .rs-card.lose #result-stats b{color:#9a1040!important}
body.on-result #screen-result.rs-v2 #result-stats span{
  display:block!important;font-size:10px!important;font-weight:700!important;color:#5a4a66!important;
  margin-top:1px!important;
}

body.on-result #screen-result.rs-v2 #result-quote{
  margin:2px 0 0!important;padding:6px 8px!important;
  font-size:12px!important;font-weight:700!important;line-height:1.35!important;
  color:#3a2a44!important;background:rgba(255,255,255,.55)!important;
  border-left:4px solid #111!important;border-radius:0 8px 8px 0!important;
}

body.on-result #screen-result.rs-v2 #result-voice-tip{
  align-self:flex-start!important;margin-top:2px!important;
  padding:4px 10px!important;font-size:11px!important;font-weight:900!important;
  border:2px solid #111!important;border-radius:999px!important;
  background:#2ad4ff!important;color:#111!important;
}
body.on-result #screen-result.rs-v2 #result-voice-tip[hidden]{display:none!important}

body.on-result #screen-result.rs-v2 .rs-mp{
  display:flex!important;flex-wrap:wrap!important;align-items:center!important;
  gap:8px!important;margin-top:8px!important;padding-top:8px!important;
  border-top:2px dashed rgba(17,17,17,.25)!important;
}
body.on-result #screen-result.rs-v2 .rs-mp span{
  flex:1 1 160px!important;font-size:11px!important;font-weight:700!important;color:#3a2a44!important;
}
body.on-result #screen-result.rs-v2 .rs-mp b{color:#9a1040!important}
body.on-result #screen-result.rs-v2 .rs-mp #btn-mp2{
  flex:0 0 auto!important;padding:6px 12px!important;font-size:12px!important;font-weight:900!important;
  border:2px solid #111!important;border-radius:999px!important;
  background:linear-gradient(#ffef3a,#ffb800)!important;color:#111!important;
}

/* —— 底栏 dock：居中窄按钮组，高度加高 —— */
body.on-result #screen-result.rs-v2 .rs-dock{
  flex:0 0 auto!important;align-self:stretch!important;
  position:relative!important;left:auto!important;right:auto!important;
  top:auto!important;bottom:auto!important;transform:none!important;inset:auto!important;
  width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;
  margin:0 8px calc(8px + env(safe-area-inset-bottom,0px))!important;
  padding:10px 12px!important;box-sizing:border-box!important;
  display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;
  align-items:center!important;justify-content:center!important;gap:0!important;
  grid-template-columns:none!important;grid-template-rows:none!important;
  z-index:4!important;
  background:linear-gradient(180deg,#fff9ea,#ffecc4)!important;
  border:3px solid #111!important;border-radius:14px!important;
  box-shadow:0 4px 0 #111,0 8px 18px rgba(0,0,0,.22)!important;
}

/* 单行居中：宽度按内容，不拉满 */
body.on-result #screen-result.rs-v2 .rs-row{
  display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
  flex:0 0 auto!important;width:auto!important;max-width:100%!important;height:auto!important;
  max-height:none!important;gap:8px!important;align-items:stretch!important;justify-content:center!important;
  margin:0 auto!important;padding:0!important;
}
body.on-result #screen-result.rs-v2 .rs-row > button{
  flex:0 0 auto!important;min-width:92px!important;width:auto!important;max-width:148px!important;
  height:48px!important;min-height:48px!important;max-height:48px!important;
  margin:0!important;padding:0 14px!important;
  font-size:14px!important;font-weight:900!important;line-height:48px!important;
  box-sizing:border-box!important;
  border:3px solid #111!important;border-radius:12px!important;color:#111!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  background:#fff!important;box-shadow:0 3px 0 #111!important;
}
body.on-result #screen-result.rs-v2 .rs-row > #btn-again,
body.on-result #screen-result.rs-v2 .rs-row > #btn-again.rs-cta{
  min-width:118px!important;max-width:168px!important;
  height:52px!important;min-height:52px!important;max-height:52px!important;line-height:52px!important;
  font-size:15px!important;
  background:linear-gradient(#b8ff6a,#3dff8a)!important;
}
body.on-result #screen-result.rs-v2 .rs-row > #btn-again.pulse-ready,
body.on-result #screen-result.rs-v2 .rs-row > #btn-rematch.pulse-ready{
  animation:rsPulseReady 1s ease-in-out infinite!important;
}
body.on-result #screen-result.rs-v2 .rs-row > #btn-rematch{
  background:linear-gradient(#7ef0ff,#2ad4ff)!important;
}
body.on-result #screen-result.rs-v2 .rs-row > #btn-share{background:linear-gradient(#ffef3a,#ffb800)!important}
body.on-result #screen-result.rs-v2 .rs-row > #btn-highlight{
  background:linear-gradient(#c9a0ff,#8b5cf6)!important;color:#fff!important;text-shadow:0 1px 0 #17102e
}
body.on-result #screen-result.rs-v2 .rs-row > #btn-invite-again{max-width:180px!important}

/* 竖屏精彩集锦 / 战绩回放弹层（全局，不绑结算屏） */
.hl-pop{
  position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;
  padding:14px;box-sizing:border-box
}
.hl-pop[hidden]{display:none!important}
.hl-backdrop{
  position:absolute;inset:0;border:0;margin:0;padding:0;cursor:pointer;
  background:rgba(10,6,20,.72)
}
.hl-sheet{
  position:relative;z-index:1;width:min(100%,380px);max-height:min(92vh,720px);overflow:auto;
  border:3px solid #111;border-radius:16px;padding:16px 14px 12px;
  background:linear-gradient(180deg,#fffdf8,#ffe8c4);color:#111;
  box-shadow:6px 6px 0 rgba(17,17,17,.55);box-sizing:border-box
}
.hl-sheet h3{margin:0 36px 6px 0;font-size:18px;font-weight:900}
.hl-status{margin:0 0 10px;font-size:12px;font-weight:800;opacity:.85}
.hl-x{
  position:absolute;top:8px;right:8px;width:32px;height:32px;border:2px solid #111;
  border-radius:8px;background:#fff;font-size:18px;font-weight:900;cursor:pointer;line-height:1
}
.hl-stage{
  width:100%;aspect-ratio:9/16;max-height:min(58vh,480px);margin:0 auto 10px;
  border:3px solid #111;border-radius:12px;overflow:hidden;background:#120c22;
  display:flex;align-items:center;justify-content:center
}
.hl-video{width:100%;height:100%;object-fit:contain;background:#120c22;display:block}
.hl-slides{
  width:100%;height:100%;overflow:auto;display:flex;flex-direction:column;gap:6px;padding:6px;box-sizing:border-box
}
.hl-slides img{width:100%;height:auto;display:block;border-radius:8px;border:2px solid #17102e}
.hl-acts{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.hl-acts button{
  border:2px solid #111;border-radius:10px;padding:8px 14px;font-weight:900;cursor:pointer;background:#fff;color:#111
}
.hl-acts .primary{background:linear-gradient(#c9a0ff,#8b5cf6);color:#fff}
.hl-acts .ghost{background:#fff7e0}
body.on-result #screen-result.rs-v2 .rs-row > #btn-result-home{background:#fff8d6!important}
body.on-result #screen-result.rs-v2 .rs-row > [hidden]{display:none!important}
body.on-result #screen-result.rs-v2 .rs-row > button.nudge{
  animation:rsNudge .45s ease-in-out 2!important;
}

@keyframes rsPulseReady{
  0%,100%{filter:brightness(1);transform:translateY(0)}
  50%{filter:brightness(1.08);transform:translateY(-1px)}
}
@keyframes rsNudge{
  0%,100%{transform:translateX(0)}
  25%{transform:translateX(-3px)}
  75%{transform:translateX(3px)}
}

/* —— 矮屏压缩（真横屏矮窗） —— */
@media (max-height:420px){
  body.on-result:not(.fake-land) #screen-result.rs-v2 .rs-meta{padding:4px 8px!important}
  body.on-result:not(.fake-land) #screen-result.rs-v2 .rs-meta-tip{display:none!important}
  body.on-result:not(.fake-land) #screen-result.rs-v2 .rs-card{padding:6px 8px!important}
  body.on-result:not(.fake-land) #screen-result.rs-v2 .rs-hero{height:72px!important;min-height:64px!important}
  body.on-result:not(.fake-land) #screen-result.rs-v2 .rs-hero-meta{display:none!important}
  body.on-result:not(.fake-land) #screen-result.rs-v2 .rs-mp,
  body.on-result:not(.fake-land) #screen-result.rs-v2 #result-quote{display:none!important}
  body.on-result:not(.fake-land) #screen-result.rs-v2 .rs-dock{margin:0 6px 6px!important;padding:6px 8px!important}
  body.on-result:not(.fake-land) #screen-result.rs-v2 .rs-row{gap:6px!important}
  body.on-result:not(.fake-land) #screen-result.rs-v2 .rs-row > button{
    min-width:78px!important;height:40px!important;min-height:40px!important;max-height:40px!important;
    line-height:40px!important;font-size:12px!important;padding:0 10px!important;
  }
  body.on-result:not(.fake-land) #screen-result.rs-v2 .rs-row > #btn-again{
    min-width:96px!important;height:44px!important;min-height:44px!important;max-height:44px!important;
    line-height:44px!important;font-size:13px!important;
  }
}
/* 窄屏单列：假横屏视口虽窄但逻辑宽是 --fl-h，禁止误套单列 */
@media (max-width:560px){
  body.on-result:not(.fake-land) #screen-result.rs-v2 .rs-main{
    grid-template-columns:1fr!important;gap:6px!important;
  }
  body.on-result:not(.fake-land) #screen-result.rs-v2 .rs-hero{height:clamp(88px,28vh,140px)!important;margin:0 auto!important;max-width:200px!important}
  body.on-result:not(.fake-land) #screen-result.rs-v2 .rs-copy h1,
  body.on-result:not(.fake-land) #screen-result.rs-v2 #result-title,
  body.on-result:not(.fake-land) #screen-result.rs-v2 #result-desc,
  body.on-result:not(.fake-land) #screen-result.rs-v2 #result-score{text-align:center!important;align-self:center!important}
  body.on-result:not(.fake-land) #screen-result.rs-v2 .rs-vs{justify-content:center!important}
}

/* 假横屏：逻辑高度 = --fl-w（竖屏机宽），强制横排两列 + 压矮 */
body.fake-land.on-result #screen-result.rs-v2 .rs-meta{padding:4px 8px!important}
body.fake-land.on-result #screen-result.rs-v2 .rs-meta-tip{display:none!important}
body.fake-land.on-result #screen-result.rs-v2 .rs-card{padding:6px 8px!important}
body.fake-land.on-result #screen-result.rs-v2 .rs-main{
  grid-template-columns:minmax(88px,26%) minmax(0,1fr)!important;gap:6px 10px!important;
}
body.fake-land.on-result #screen-result.rs-v2 .rs-hero{
  height:min(110px, calc(var(--fl-w, 100vw) * 0.42))!important;min-height:64px!important;
}
body.fake-land.on-result #screen-result.rs-v2 .rs-mp,
body.fake-land.on-result #screen-result.rs-v2 #result-quote{display:none!important}
body.fake-land.on-result #screen-result.rs-v2 .rs-dock{
  margin:0 6px 6px!important;padding:6px 8px!important;gap:0!important;
  border-radius:12px!important;
  width:auto!important;max-width:none!important;
  align-self:stretch!important;align-items:center!important;
}
body.fake-land.on-result #screen-result.rs-v2 .rs-row{gap:6px!important;max-height:none!important}
body.fake-land.on-result #screen-result.rs-v2 .rs-row > button{
  min-width:78px!important;height:42px!important;min-height:42px!important;max-height:42px!important;
  line-height:42px!important;font-size:12px!important;padding:0 10px!important;
}
body.fake-land.on-result #screen-result.rs-v2 .rs-row > #btn-again{
  min-width:100px!important;height:46px!important;min-height:46px!important;max-height:46px!important;
  line-height:46px!important;font-size:13px!important;
}
