/* 星火：钢穹球赛 — 2v2 机甲足球 / 转播级球场 HUD */
.rb-shell {
  position: absolute; inset: 0; overflow: hidden; background: #02080c; color: #e9fbff;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --rb-cyan: #25e6ff; --rb-orange: #ff7a35; --rb-gold: #ffd166; --rb-ink: #041014;
  user-select: none; touch-action: none;
}
#gWrap:has(.rb-live) .g-stage,
body.landscape-mode:has(.rb-live) .g-stage {
  height: 100%; min-height: 0; padding: 0; border: 0; background: transparent;
}
body.landscape-mode:has(.rb-live) .rb-live,
#gWrap:has(.rb-live) .rb-live {
  position: absolute !important; inset: 0; width: 100%; height: 100% !important;
  min-height: 0; max-width: none; border-radius: 0; box-shadow: none;
}
.g-wrap.g-live:has(.rb-live) .g-victory,
.g-wrap.g-live:has(.rb-live) .g-champ-overlay,
.g-wrap.g-live:has(.rb-live) .g-final { display: none !important; }
.g-wrap.g-live-done:has(.rb-live) .g-stage {
  position: fixed; inset: 0; z-index: 260; width: 100vw; height: 100vh; min-height: 0; padding: 0; margin: 0;
  border: 0; border-radius: 0; background: #02080c;
}
.g-wrap.g-live-done:has(.rb-live) .rb-live { position: absolute !important; inset: 0; height: 100vh !important; }
.rb-shell:fullscreen, .rb-shell:-webkit-full-screen { width: 100vw; height: 100vh; }

.rb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rb-vignette { position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(ellipse at 50% 42%, transparent 46%, rgba(0,0,0,.5) 100%),
  linear-gradient(180deg, rgba(0,0,0,.7) 0%, transparent 20%, transparent 76%, rgba(0,0,0,.72) 100%);
  box-shadow: inset 0 0 160px rgba(0,0,0,.6);
}
.rb-scan { position: absolute; inset: 0; pointer-events: none; opacity: .1; mix-blend-mode: screen;
  background: repeating-linear-gradient(0deg, rgba(137,247,255,.26) 0 1px, transparent 1px 4px); }
.rb-grain { position: absolute; inset: 0; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: radial-gradient(rgba(255,255,255,.9) .5px, transparent .6px); background-size: 3px 3px; }

/* 顶部记分牌 */
.rb-top {
  position: absolute; z-index: 6; left: 0; right: 0; top: 0;
  display: grid; grid-template-columns: minmax(170px, 1fr) minmax(140px, 26vw) minmax(170px, 1fr);
  align-items: start; gap: 7px;
  padding: max(8px, env(safe-area-inset-top)) max(64px, calc(env(safe-area-inset-right) + 54px)) 8px max(12px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(2,8,12,.96), rgba(2,8,12,.72) 62%, transparent);
  pointer-events: none;
}
/* 实时局自带的退出/说明按钮会和钢穹球赛的记分牌打架：退出挪到右上留白，通用说明交给作战手册。 */
.g-wrap:has(.rb-live) .g-live-exit { top: max(8px, env(safe-area-inset-top)); right: 10px; }
.g-wrap:has(.rb-live) #gLiveHelp,
.g-wrap:has(.rb-live) .g-live-help,
.g-wrap:has(.rb-live) #gHelp,
.g-wrap:has(.rb-live) .g-help { display: none !important; }
.rb-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rb-team.right { flex-direction: row-reverse; text-align: right; }
.rb-team-mark { width: 30px; height: 30px; display: grid; place-items: center; flex: none; transform: skewX(-12deg);
  border: 1px solid rgba(255,255,255,.16); background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(0,0,0,.6));
  font-family: "DIN Alternate", "Bahnschrift", sans-serif; font-size: 13px; font-weight: 900; color: var(--tc);
  text-shadow: 0 0 12px var(--tc); box-shadow: 0 0 18px color-mix(in srgb, var(--tc) 20%, transparent);
}
.rb-team-mark i { font-style: normal; transform: skewX(12deg); }
.rb-team-copy { min-width: 0; flex: 1; }
.rb-team-name { display: flex; align-items: baseline; gap: 5px; font-size: 9px; letter-spacing: .1em; color: rgba(220,247,255,.6); font-weight: 800; }
.rb-team-name b { font-size: 11px; letter-spacing: .16em; color: #f2fdff; }
.rb-team-name em { font-style: normal; color: var(--tc); font-size: 8px; letter-spacing: .08em; opacity: .8; }
.rb-team.right .rb-team-name { justify-content: flex-end; }
.rb-team-score { display: flex; align-items: baseline; gap: 3px; line-height: .85; margin-top: 1px; }
.rb-team-score strong { font-family: "DIN Alternate", "Bahnschrift", sans-serif; font-weight: 900; font-size: clamp(26px, 4.4vw, 48px); color: #f3feff; letter-spacing: -.02em; text-shadow: 0 0 22px color-mix(in srgb, var(--tc) 55%, transparent); }
.rb-team-score small { font-family: "DIN Alternate", "Bahnschrift", sans-serif; font-size: 9px; color: rgba(218,245,255,.45); letter-spacing: .12em; }
.rb-team.right .rb-team-score { justify-content: flex-end; }
.rb-team-bar { display: block; height: 3px; background: rgba(255,255,255,.12); margin-top: 4px; overflow: hidden; transform: skewX(-22deg); }
.rb-team-bar u { display: block; height: 100%; width: 30%; background: var(--tc); box-shadow: 0 0 12px var(--tc); transition: width .35s ease; }
.rb-team.right .rb-team-bar u { margin-left: auto; }
.rb-top-center { text-align: center; padding-top: 1px; }
.rb-top-center small { display: block; color: rgba(168,222,232,.58); font-size: 8px; letter-spacing: .24em; font-weight: 800; }
.rb-clock { display: block; font-family: "DIN Alternate", "Bahnschrift", sans-serif; font-size: clamp(20px, 3.2vw, 34px); letter-spacing: .06em; line-height: 1.02; color: #fff7dc; text-shadow: 0 0 18px rgba(255,209,102,.24); }
.rb-clock.low { color: #ff8c5c; animation: rbPulse 1s infinite; }
.rb-ot { display: none; margin: 2px auto 0; padding: 1px 7px; width: max-content; border: 1px solid rgba(255,209,102,.45); color: #ffd166; font-size: 8px; letter-spacing: .13em; font-weight: 900; background: rgba(255,180,70,.1); }
.rb-ot.on { display: block; animation: rbPulse 1.2s infinite; }
.rb-arena { display: block; margin-top: 2px; color: rgba(205,239,247,.52); font-size: 8px; letter-spacing: .12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 场边信息 */
.rb-stage-tag {
  position: absolute; z-index: 5; top: 84px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 7px; padding: 4px 10px 5px;
  border: 1px solid rgba(131,232,255,.18); background: linear-gradient(180deg, rgba(5,17,24,.82), rgba(3,10,14,.52));
  color: rgba(196,245,255,.64); font-size: 8px; letter-spacing: .14em; pointer-events: none; backdrop-filter: blur(7px);
}
.rb-stage-tag b { color: #fff2c8; font-size: 9px; letter-spacing: .08em; }
.rb-stage-tag i { font-style: normal; width: 4px; height: 4px; background: #7cf3ff; border-radius: 50%; box-shadow: 0 0 8px #7cf3ff; }
.rb-phase { color: #7cf3ff; font-weight: 900; }
.rb-shell.rb-overdrive .rb-stage-tag { border-color: rgba(255,61,129,.5); box-shadow: 0 0 22px rgba(255,61,129,.24) inset; }
.rb-shell.rb-overdrive .rb-phase { color: #ff8ac2; text-shadow: 0 0 12px rgba(255,61,129,.7); }
.rb-shell.rb-overdrive .rb-stage-tag i { background: #ff3d81; box-shadow: 0 0 10px #ff3d81; }
.rb-shell.rb-overdrive .rb-team-bar u { box-shadow: 0 0 12px var(--tc); }

/* 左下：角色卡 + 摇杆 */
.rb-hero {
  position: absolute; z-index: 6; left: max(104px, calc(env(safe-area-inset-left) + 104px)); bottom: max(12px, env(safe-area-inset-bottom));
  width: min(246px, 30vw); padding: 7px 9px 8px; border-left: 2px solid var(--rc);
  background: linear-gradient(90deg, rgba(5,19,25,.88), rgba(3,11,15,.5));
  box-shadow: 0 10px 26px rgba(0,0,0,.3); pointer-events: none; backdrop-filter: blur(7px);
}
.rb-hero-head { display: flex; align-items: center; gap: 6px; }
.rb-role-icon { width: 21px; height: 21px; display: grid; place-items: center; flex: none; font-size: 12px; color: var(--rc);
  border: 1px solid color-mix(in srgb, var(--rc) 40%, transparent); background: color-mix(in srgb, var(--rc) 10%, rgba(0,0,0,.3)); }
.rb-hero-name { flex: 1; min-width: 0; }
.rb-hero-name small { display: block; font-size: 7px; letter-spacing: .12em; color: rgba(188,232,242,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-hero-name b { display: block; font-size: 10px; letter-spacing: .04em; color: #f0fdff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-hero-role { font-size: 8px; font-weight: 900; letter-spacing: .08em; color: var(--rc); padding: 2px 5px; border: 1px solid color-mix(in srgb, var(--rc) 26%, transparent); }
.rb-boost { margin-top: 5px; }
.rb-boost-label { display: flex; justify-content: space-between; font-size: 7px; letter-spacing: .12em; color: rgba(193,236,245,.55); }
.rb-boost-label b { color: #9cf5ff; font-family: "DIN Alternate", "Bahnschrift", sans-serif; font-size: 9px; }
.rb-boost-bar { display: block; height: 4px; margin-top: 3px; background: rgba(210,246,255,.14); overflow: hidden; transform: skewX(-18deg); }
.rb-boost-bar u { display: block; height: 100%; width: 60%; background: linear-gradient(90deg, #2abaff, #8ef7ff); box-shadow: 0 0 12px rgba(64,232,255,.65); transition: width .12s linear; }
.rb-hero-stats { display: flex; gap: 7px; margin-top: 5px; font-size: 7px; letter-spacing: .08em; color: rgba(187,231,240,.5); }
.rb-hero-stats b { color: #fff1c2; font-size: 9px; margin-left: 2px; }

.rb-stick {
  position: absolute; z-index: 7; left: max(13px, env(safe-area-inset-left)); bottom: max(13px, env(safe-area-inset-bottom));
  width: 81px; height: 81px; border-radius: 50%;
  border: 1px solid rgba(144,239,255,.25);
  background: radial-gradient(circle at 50% 50%, rgba(10,43,52,.55), rgba(4,13,18,.7) 64%, rgba(2,8,12,.82));
  box-shadow: inset 0 0 22px rgba(49,213,244,.12), 0 6px 18px rgba(0,0,0,.28);
  touch-action: none;
}
.rb-stick::before { content: ''; position: absolute; inset: 17px; border-radius: 50%; border: 1px dashed rgba(148,237,255,.16); }
.rb-stick i { position: absolute; left: 50%; top: 50%; width: 31px; height: 31px; margin: -15.5px 0 0 -15.5px; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #bbfbff, #36cfe9 38%, #0b6473 78%);
  box-shadow: 0 0 16px rgba(50,226,255,.45), inset 0 0 6px rgba(255,255,255,.25);
  transition: transform .04s linear;
}
.rb-stick em { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-style: normal; font-size: 7px; letter-spacing: .08em; color: rgba(192,239,248,.42); }
.rb-stick.on { border-color: rgba(94,239,255,.6); box-shadow: inset 0 0 26px rgba(49,213,244,.2), 0 0 20px rgba(41,211,243,.14); }

/* 右下：四个动作键 */
.rb-actions {
  position: absolute; z-index: 7; right: max(13px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(2, 62px); gap: 5px; align-items: end; justify-items: stretch;
}
.rb-btn {
  position: relative; height: 48px; padding: 5px 3px 4px; border: 1px solid rgba(159,232,246,.22);
  background: linear-gradient(180deg, rgba(12,34,42,.82), rgba(4,13,18,.88)); color: #ddfbff;
  font-family: inherit; cursor: pointer; overflow: hidden; touch-action: manipulation;
  transition: transform .1s ease, border-color .15s, background .15s;
}
.rb-btn::before { content: ''; position: absolute; inset: 3px; border: 1px solid rgba(255,255,255,.05); pointer-events: none; }
.rb-btn:active { transform: scale(.94); }
.rb-btn.down { border-color: rgba(255,209,102,.72); background: linear-gradient(180deg, rgba(66,43,15,.9), rgba(27,18,7,.9)); }
.rb-btn b { display: block; font-size: 10px; letter-spacing: .06em; line-height: 1.1; white-space: nowrap; }
.rb-btn small { display: block; margin-top: 2px; font-family: "DIN Alternate", "Bahnschrift", sans-serif; font-size: 7px; letter-spacing: .08em; color: rgba(186,235,244,.55); white-space: nowrap; }
.rb-btn.boost b { color: #8ef7ff; }
.rb-btn.dash b { color: #ffd166; }
.rb-btn.shoot { grid-column: 1 / 3; height: 41px; border-color: rgba(255,122,53,.3); background: linear-gradient(180deg, rgba(54,25,12,.82), rgba(20,10,5,.9)); }
.rb-btn.shoot b { color: #ff9b5d; font-size: 11px; letter-spacing: .14em; }
.rb-btn.shoot small { color: rgba(255,185,138,.55); }
.rb-btn.skill { border-color: color-mix(in srgb, var(--rc) 34%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 12%, rgba(9,24,30,.88)), rgba(4,13,18,.9)); }
.rb-btn.skill b { color: var(--rc); }
.rb-btn.skill.ready { box-shadow: inset 0 0 18px color-mix(in srgb, var(--rc) 12%, transparent), 0 0 12px color-mix(in srgb, var(--rc) 8%, transparent); }
.rb-btn.skill.cool { opacity: .55; }
.rb-btn[disabled] { opacity: .4; cursor: default; }
.rb-help { position: absolute; z-index: 8; right: max(13px, env(safe-area-inset-right)); top: 84px; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid rgba(171,235,246,.25); background: rgba(5,17,23,.7); color: rgba(221,249,255,.75); font-size: 12px; cursor: pointer; }
.rb-toast { position: absolute; z-index: 12; left: 50%; bottom: 88px; transform: translateX(-50%) translateY(8px); padding: 6px 11px;
  background: rgba(2,9,13,.88); border: 1px solid rgba(120,232,255,.28); color: #d9fbff; font-size: 10px; letter-spacing: .05em;
  opacity: 0; pointer-events: none; transition: .2s; white-space: nowrap; }
.rb-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 大横幅 / 进球 / 结算 */
.rb-banner {
  position: absolute; z-index: 10; left: 50%; top: 33%; transform: translate(-50%, -50%) scale(.96); text-align: center;
  pointer-events: none; opacity: 0; transition: opacity .35s ease, transform .35s ease;
}
.rb-banner.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.rb-banner small { display: block; color: rgba(133,241,255,.7); font-size: 9px; letter-spacing: .4em; font-weight: 900; }
.rb-banner b { display: block; margin-top: 3px; font-family: "DIN Alternate", "Bahnschrift", sans-serif; font-size: clamp(30px, 6vw, 64px); line-height: .9; letter-spacing: .08em; color: #f5feff; text-shadow: 0 0 32px rgba(36,220,255,.4), 0 5px 0 rgba(0,23,30,.65); }
.rb-banner em { display: block; margin-top: 5px; font-style: normal; color: #ffda83; font-size: 9px; letter-spacing: .14em; }

.rb-goal {
  position: absolute; z-index: 11; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 50% 48%, rgba(44,213,255,.22), transparent 56%); transition: opacity .2s;
}
.rb-goal.on { opacity: 1; animation: rbGoalFlash .6s ease-out; }
.rb-goal-card { text-align: center; transform: scale(.9); transition: transform .3s cubic-bezier(.2,1.6,.5,1); }
.rb-goal.on .rb-goal-card { transform: scale(1); }
.rb-goal-card small { display: block; color: rgba(210,251,255,.75); font-size: 10px; letter-spacing: .3em; font-weight: 900; }
.rb-goal-card b { display: block; font-family: "DIN Alternate", "Bahnschrift", sans-serif; font-size: clamp(44px, 10vw, 100px); line-height: .82; letter-spacing: .1em; color: #fff; text-shadow: 0 0 34px rgba(50,231,255,.65), 0 0 70px rgba(50,231,255,.2); }
.rb-goal-card span { display: block; margin-top: 7px; font-size: 13px; letter-spacing: .14em; color: #ffdc8a; }
.rb-goal-card i { display: block; margin-top: 4px; font-style: normal; color: rgba(208,248,255,.6); font-size: 9px; letter-spacing: .1em; }
.rb-goal.orange { background: radial-gradient(ellipse at 50% 48%, rgba(255,110,49,.23), transparent 56%); }
.rb-goal.orange .rb-goal-card b { text-shadow: 0 0 34px rgba(255,124,53,.7), 0 0 70px rgba(255,124,53,.2); }

.rb-result {
  position: absolute; z-index: 20; inset: 0; display: none; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, rgba(6,30,39,.78), rgba(1,5,8,.96) 70%);
  backdrop-filter: blur(8px);
}
.rb-result.on { display: flex; }
.rb-result-card {
  width: min(560px, 82vw); max-height: 82vh; overflow: auto; padding: 18px 20px 16px; text-align: center;
  border: 1px solid rgba(121,231,255,.28); background: linear-gradient(180deg, rgba(10,32,41,.96), rgba(3,12,17,.96));
  box-shadow: 0 18px 60px rgba(0,0,0,.55), inset 0 0 50px rgba(40,210,245,.05);
}
.rb-result-card > small { display: block; color: rgba(157,238,251,.65); font-size: 9px; letter-spacing: .28em; font-weight: 900; }
.rb-result-card h2 { margin: 5px 0 3px; font-family: "DIN Alternate", "Bahnschrift", sans-serif; font-size: clamp(26px, 5vw, 44px); letter-spacing: .1em; color: #f6feff; text-shadow: 0 0 26px rgba(58,226,255,.35); }
.rb-result-card p { margin: 0 0 9px; color: rgba(203,243,250,.58); font-size: 10px; letter-spacing: .08em; }
.rb-result-score { display: flex; justify-content: center; align-items: baseline; gap: 10px; margin: 8px 0 12px; font-family: "DIN Alternate", "Bahnschrift", sans-serif; }
.rb-result-score b { font-size: 44px; color: #f4feff; }
.rb-result-score em { font-style: normal; color: rgba(212,249,255,.45); font-size: 12px; letter-spacing: .1em; }
.rb-result-score span { font-size: 10px; color: rgba(217,247,255,.55); letter-spacing: .1em; }
.rb-result-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 9px 0; }
.rb-result-stats div { padding: 6px 3px; border: 1px solid rgba(133,230,244,.13); background: rgba(8,26,34,.55); }
.rb-result-stats b { display: block; font-family: "DIN Alternate", "Bahnschrift", sans-serif; font-size: 18px; color: #ffda86; }
.rb-result-stats small { display: block; margin-top: 2px; font-size: 7px; letter-spacing: .12em; color: rgba(197,236,245,.52); }
.rb-result-mvp { margin: 8px 0 12px; color: #ffe29a; font-size: 10px; letter-spacing: .06em; }
.rb-result-best { margin: -5px 0 11px; color: #8fb8b8; font-size: 8px; letter-spacing: .08em; }
.rb-result-btns { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.rb-result-btns button { padding: 8px 15px; border: 1px solid rgba(119,235,255,.35); background: rgba(14,44,53,.7); color: #dffcff; font-family: inherit; font-size: 10px; letter-spacing: .08em; cursor: pointer; }
.rb-result-btns button.primary { border-color: rgba(255,209,102,.5); background: linear-gradient(180deg, rgba(255,180,71,.24), rgba(68,40,10,.7)); color: #ffe7a9; }

/* 作战手册 */
.rb-codex {
  position: absolute; z-index: 18; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(1,7,10,.82); backdrop-filter: blur(9px); padding: 14px;
}
.rb-codex.on { display: flex; }
.rb-codex-card { position: relative; width: min(720px, 90vw); max-height: 86vh; overflow: auto; padding: 17px 19px 18px;
  border: 1px solid rgba(104,230,255,.25); background: linear-gradient(150deg, rgba(10,37,44,.98), rgba(3,13,18,.98));
  box-shadow: 0 20px 70px rgba(0,0,0,.6); }
.rb-codex-card > small { color: rgba(138,236,252,.6); letter-spacing: .23em; font-size: 8px; font-weight: 900; }
.rb-codex-card h2 { margin: 3px 0 5px; font-size: clamp(18px, 3vw, 27px); letter-spacing: .08em; color: #f1feff; }
.rb-codex-card > p { margin: 0 0 9px; color: rgba(199,237,243,.62); font-size: 10px; line-height: 1.65; }
.rb-codex-close { position: absolute; right: 9px; top: 7px; width: 26px; height: 26px; border: 1px solid rgba(161,234,247,.23); background: rgba(4,15,20,.8); color: #dffbff; font-size: 16px; cursor: pointer; }
.rb-codex-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.rb-codex-grid section { padding: 8px 9px; border: 1px solid rgba(133,231,245,.12); background: rgba(6,25,31,.5); }
.rb-codex-grid h3 { margin: 0 0 5px; color: #ffda8f; font-size: 10px; letter-spacing: .1em; }
.rb-codex-grid li { margin: 4px 0; }
.rb-codex-grid li b { display: block; color: #d7fbff; font-size: 9px; letter-spacing: .03em; }
.rb-codex-grid li small { display: block; color: rgba(196,234,240,.54); font-size: 8px; line-height: 1.35; margin-top: 1px; }
.rb-codex-grid ul { padding-left: 12px; margin: 0; }
.rb-codex-grid p { grid-column: 1 / 3; margin: 2px 0 0; color: rgba(199,235,242,.5); font-size: 8px; line-height: 1.55; }
.rb-codex-grid section.wide { grid-column: 1 / 3; }

@keyframes rbPulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes rbGoalFlash { 0% { opacity: 0; transform: scale(1.06); } 26% { opacity: 1; transform: scale(1); } 100% { opacity: 1; transform: scale(1); } }

@media (max-width: 900px) {
  .rb-team-mark { width: 25px; height: 25px; font-size: 11px; }
  .rb-team-name b { font-size: 9px; }
  .rb-team-score strong { font-size: 32px; }
  .rb-stage-tag { top: 75px; }
  .rb-stick { width: 72px; height: 72px; }
  .rb-stick::before { inset: 15px; }
  .rb-stick i { width: 27px; height: 27px; margin: -13.5px 0 0 -13.5px; }
  .rb-actions { grid-template-columns: repeat(2, 55px); }
  .rb-btn { height: 43px; }
  .rb-btn.shoot { height: 37px; }
  .rb-hero { left: 96px; width: 206px; }
}
@media (max-width: 680px) {
  .rb-top { grid-template-columns: 1fr minmax(105px, 30vw) 1fr; gap: 4px; }
  .rb-team-mark { width: 21px; height: 21px; font-size: 9px; }
  .rb-team-name { font-size: 7px; }
  .rb-team-name b { font-size: 8px; letter-spacing: .1em; }
  .rb-team-name em { display: none; }
  .rb-team-score strong { font-size: 27px; }
  .rb-team-score small { font-size: 7px; }
  .rb-team-bar { height: 2px; }
  .rb-clock { font-size: 20px; }
  .rb-top-center small { font-size: 6px; letter-spacing: .18em; }
  .rb-arena { font-size: 7px; }
  .rb-stage-tag { top: 66px; padding: 3px 7px; font-size: 7px; }
  .rb-hero { left: 86px; width: 170px; padding: 5px 7px 6px; }
  .rb-hero-name b { font-size: 9px; }
  .rb-boost-bar { height: 3px; }
  .rb-hero-stats { display: none; }
  .rb-stick { width: 62px; height: 62px; }
  .rb-stick::before { inset: 12px; }
  .rb-stick i { width: 24px; height: 24px; margin: -12px 0 0 -12px; }
  .rb-stick em { bottom: 5px; font-size: 6px; }
  .rb-actions { grid-template-columns: repeat(2, 49px); gap: 4px; }
  .rb-btn { height: 38px; padding: 3px 2px; }
  .rb-btn b { font-size: 8px; }
  .rb-btn small { font-size: 6px; }
  .rb-btn.shoot { height: 33px; }
  .rb-btn.shoot b { font-size: 9px; }
  .rb-toast { bottom: 72px; font-size: 9px; }
  .rb-help { top: 66px; width: 19px; height: 19px; font-size: 10px; }
  .rb-result-card { padding: 14px 13px; }
  .rb-result-stats { gap: 3px; }
  .rb-result-stats b { font-size: 15px; }
  .rb-codex-grid { grid-template-columns: 1fr; }
  .rb-codex-grid p, .rb-codex-grid section.wide { grid-column: 1; }
}
@media (max-height: 430px) {
  .rb-top { padding-top: max(5px, env(safe-area-inset-top)); }
  .rb-team-score strong { font-size: 28px; }
  .rb-clock { font-size: 20px; }
  .rb-stage-tag { top: 57px; }
  .rb-hero { bottom: 7px; }
  .rb-stick { bottom: 7px; }
  .rb-actions { bottom: 6px; }
  .rb-codex-card { max-height: 92vh; }
  .rb-result-card { max-height: 94vh; padding-top: 13px; padding-bottom: 12px; }
}
@media (min-width: 1180px) {
  .rb-actions { grid-template-columns: repeat(2, 70px); }
  .rb-btn { height: 54px; }
  .rb-btn.shoot { height: 46px; }
  .rb-hero { width: 280px; left: 112px; }
}
