:root { --yanhuang-compat-release: chrome66-53f0e1ada5cb; }

:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
  --bg-deep: #07100d;
  --bg-shell: #101b16;
  --bg-panel: rgba(14, 24, 20, 0.86);
  --bg-panel-strong: rgba(20, 34, 29, 0.96);
  --border: rgba(215, 181, 109, 0.24);
  --border-soft: rgba(215, 181, 109, 0.12);
  --gold: #d7b56d;
  --gold-bright: #f1ca72;
  --warm-white: #f8f3e7;
  --muted: #9aa79f;
  --subtle: rgba(154, 167, 159, 0.72);
  --ember: #e48178;
  --success: #75d9af;
  --ambient-primary: rgba(35, 105, 75, 0.24);
  --ambient-secondary: rgba(215, 181, 109, 0.12);
  --shell-gradient-start: rgba(20, 34, 29, 0.98);
  --shell-gradient-middle: rgba(14, 24, 20, 0.99);
  --shell-gradient-end: rgba(16, 27, 22, 0.99);
  --shell-outline: rgba(215, 181, 109, 0.12);
  --control-bg: rgba(8, 24, 17, 0.88);
  --control-bg-strong: rgba(8, 24, 17, 0.95);
  --binding-card-bg: rgba(8, 24, 17, 0.82);
  --meta-bg: rgba(14, 24, 20, 0.56);
  --card-strong: rgba(20, 34, 29, 0.72);
  --card-soft: rgba(14, 24, 20, 0.64);
  --card-muted: rgba(14, 24, 20, 0.52);
  --row-border: rgba(215, 181, 109, 0.1);
  --rank-highlight: rgba(215, 181, 109, 0.24);
  --presence-bg: rgba(8, 24, 17, 0.82);
  --dot-bg: rgba(248, 243, 231, 0.25);
  --inverse-text: #10241d;
}

body.theme-classic_green_gold {
  --bg-deep: #07100d;
  --bg-shell: #101b16;
  --bg-panel: rgba(14, 24, 20, 0.86);
  --bg-panel-strong: rgba(20, 34, 29, 0.96);
  --border: rgba(215, 181, 109, 0.24);
  --border-soft: rgba(215, 181, 109, 0.12);
  --gold: #d7b56d;
  --gold-bright: #f1ca72;
  --warm-white: #f8f3e7;
  --muted: #9aa79f;
  --subtle: rgba(154, 167, 159, 0.72);
  --ember: #e48178;
  --success: #75d9af;
  --ambient-primary: rgba(35, 105, 75, 0.24);
  --ambient-secondary: rgba(215, 181, 109, 0.12);
  --shell-gradient-start: rgba(20, 34, 29, 0.98);
  --shell-gradient-middle: rgba(14, 24, 20, 0.99);
  --shell-gradient-end: rgba(16, 27, 22, 0.99);
  --shell-outline: rgba(215, 181, 109, 0.12);
  --control-bg: rgba(8, 24, 17, 0.88);
  --control-bg-strong: rgba(8, 24, 17, 0.95);
  --binding-card-bg: rgba(8, 24, 17, 0.82);
  --meta-bg: rgba(14, 24, 20, 0.56);
  --card-strong: rgba(20, 34, 29, 0.72);
  --card-soft: rgba(14, 24, 20, 0.64);
  --card-muted: rgba(14, 24, 20, 0.52);
  --row-border: rgba(215, 181, 109, 0.1);
  --rank-highlight: rgba(215, 181, 109, 0.24);
  --presence-bg: rgba(8, 24, 17, 0.82);
  --dot-bg: rgba(248, 243, 231, 0.25);
  --inverse-text: #10241d;
}

body.theme-black_gold {
  --bg-deep: #050505;
  --bg-shell: #151109;
  --bg-panel: rgba(16, 14, 10, 0.88);
  --bg-panel-strong: rgba(28, 22, 12, 0.96);
  --border: rgba(238, 191, 82, 0.26);
  --border-soft: rgba(232, 188, 88, 0.12);
  --gold: #e8bc58;
  --gold-bright: #ffd36f;
  --warm-white: #fff7e5;
  --muted: #b5aa94;
  --subtle: rgba(181, 170, 148, 0.72);
  --ember: #e05a38;
  --success: #e05a38;
  --ambient-primary: rgba(224, 90, 56, 0.2);
  --ambient-secondary: rgba(232, 188, 88, 0.12);
  --shell-gradient-start: rgba(28, 22, 12, 0.98);
  --shell-gradient-middle: rgba(16, 14, 10, 0.99);
  --shell-gradient-end: rgba(21, 17, 9, 0.99);
  --shell-outline: rgba(238, 191, 82, 0.14);
  --control-bg: rgba(20, 14, 10, 0.9);
  --control-bg-strong: rgba(20, 14, 10, 0.96);
  --binding-card-bg: rgba(20, 14, 10, 0.9);
  --meta-bg: rgba(16, 14, 10, 0.62);
  --card-strong: rgba(28, 22, 12, 0.76);
  --card-soft: rgba(16, 14, 10, 0.68);
  --card-muted: rgba(16, 14, 10, 0.56);
  --row-border: rgba(238, 191, 82, 0.1);
  --rank-highlight: rgba(232, 188, 88, 0.26);
  --presence-bg: rgba(20, 14, 10, 0.9);
  --dot-bg: rgba(255, 247, 229, 0.25);
  --inverse-text: #1c160c;
}

body.theme-blue_esports {
  --bg-deep: #06111d;
  --bg-shell: #0a2237;
  --bg-panel: rgba(9, 30, 48, 0.88);
  --bg-panel-strong: rgba(14, 43, 68, 0.96);
  --border: rgba(91, 176, 255, 0.28);
  --border-soft: rgba(98, 181, 255, 0.12);
  --gold: #c7a35d;
  --gold-bright: #e4c983;
  --warm-white: #eef7ff;
  --muted: #9eb2c2;
  --subtle: rgba(158, 178, 194, 0.72);
  --ember: #927dff;
  --success: #62b5ff;
  --ambient-primary: rgba(78, 140, 255, 0.24);
  --ambient-secondary: rgba(132, 102, 255, 0.14);
  --shell-gradient-start: rgba(14, 43, 68, 0.98);
  --shell-gradient-middle: rgba(9, 30, 48, 0.99);
  --shell-gradient-end: rgba(10, 34, 55, 0.99);
  --shell-outline: rgba(91, 176, 255, 0.14);
  --control-bg: rgba(7, 24, 43, 0.9);
  --control-bg-strong: rgba(7, 24, 43, 0.96);
  --binding-card-bg: rgba(7, 24, 43, 0.9);
  --meta-bg: rgba(9, 30, 48, 0.62);
  --card-strong: rgba(14, 43, 68, 0.76);
  --card-soft: rgba(9, 30, 48, 0.68);
  --card-muted: rgba(9, 30, 48, 0.56);
  --row-border: rgba(91, 176, 255, 0.1);
  --rank-highlight: rgba(98, 181, 255, 0.22);
  --presence-bg: rgba(7, 24, 43, 0.9);
  --dot-bg: rgba(238, 247, 255, 0.25);
  --inverse-text: #07182b;
}

* {
  box-sizing: border-box;
}

html,
body,
#screen-fit-root {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--bg-deep);
}

body {
  color: var(--warm-white);
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.2;
}

[hidden] {
  display: none !important;
}

#screen-fit-root {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

#screen-bleed-background {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background:
    radial-gradient(circle at 14% 10%, var(--ambient-primary), transparent 620px),
    radial-gradient(circle at 82% 86%, var(--ambient-secondary), transparent 580px),
    linear-gradient(180deg, var(--bg-deep), var(--bg-shell));
}

#screen-stage {
  position: absolute;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  transform-origin: 0 0;
  background: var(--bg-shell);
}

#screen-shell {
  position: relative;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background:
    linear-gradient(116deg, var(--shell-gradient-start), var(--shell-gradient-middle) 58%, var(--shell-gradient-end)),
    var(--bg-shell);
}

#screen-shell::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  content: "";
  border: 1px solid var(--shell-outline);
}

.screen-fullscreen-button {
  position: absolute;
  z-index: 30;
  top: 48px;
  right: 64px;
  width: 124px;
  height: 46px;
  margin: 0;
  padding: 0 18px;
  color: var(--warm-white);
  background: var(--control-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 18px;
  cursor: pointer;
  opacity: 1;
  transition: opacity 200ms ease;
}

.screen-fullscreen-button.is-hidden {
  pointer-events: none;
  opacity: 0;
}

.screen-fullscreen-hint {
  position: absolute;
  z-index: 31;
  top: 102px;
  right: 64px;
  width: 350px;
  margin: 0;
  padding: 12px 16px;
  color: var(--warm-white);
  background: var(--control-bg-strong);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 16px;
  line-height: 1.45;
}

.screen-binding-root,
.screen-runtime {
  position: absolute;
  top: 48px;
  right: 64px;
  bottom: 48px;
  left: 64px;
}

.screen-binding-root {
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen-binding-panel {
  display: grid;
  grid-template-columns: 870px 560px;
  align-items: center;
  gap: 116px;
  width: 1546px;
  min-height: 790px;
}

.screen-binding-copy {
  padding: 48px 0;
}

.screen-eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.screen-binding-copy h1 {
  margin: 0;
  color: var(--warm-white);
  font-family: "Songti SC", "STSong", serif;
  font-size: 86px;
  font-weight: 700;
  line-height: 1.1;
}

.screen-binding-copy > p:not(.screen-eyebrow) {
  width: 720px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 28px;
  line-height: 1.65;
}

.screen-binding-copy ol {
  display: grid;
  gap: 22px;
  margin: 52px 0 0;
  padding: 0;
  list-style: none;
}

.screen-binding-copy li {
  display: flex;
  align-items: center;
  color: var(--warm-white);
  font-size: 26px;
}

.screen-binding-copy li b {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--inverse-text);
  background: var(--gold);
  border-radius: 50%;
  font-size: 20px;
}

.screen-binding-code-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 560px;
  height: 790px;
  padding: 42px;
  background: var(--binding-card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.binding-qr-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 340px;
  height: 340px;
  padding: 12px;
  background: #fff;
  border-radius: 6px;
}

#screenBindingQr {
  width: 316px;
  height: 316px;
  object-fit: contain;
}

.screen-binding-code-card > span {
  margin-top: 28px;
  color: var(--muted);
  font-size: 20px;
}

#screenBindingCode {
  margin-top: 8px;
  color: var(--gold-bright);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 70px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 12px;
  line-height: 1;
}

#screenBindingExpiry,
#screenBindingStatus {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.4;
}

#screenBindingExpiry {
  margin-top: 18px;
}

#screenBindingStatus {
  min-height: 26px;
  margin: 8px 0 0;
  text-align: center;
}

#screenBindingRefresh {
  width: 180px;
  height: 48px;
  margin-top: 22px;
  color: var(--warm-white);
  background: var(--ambient-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 18px;
  cursor: pointer;
}

.screen-runtime {
  display: grid;
  grid-template-rows: 96px 864px;
  gap: 24px;
}

.screen-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 0;
  padding-right: 150px;
}

.screen-header-copy {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 34px 54px;
  column-gap: 26px;
  align-items: end;
  min-width: 0;
}

.screen-meta {
  display: flex;
  grid-row: 1 / 3;
  align-items: center;
  align-self: end;
  height: 52px;
  padding: 0 18px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--meta-bg);
  color: var(--muted);
  font-size: 18px;
}

.status-pill {
  color: var(--success);
  font-weight: 700;
}

.screen-header .screen-eyebrow {
  grid-column: 2;
  margin: 0;
}

#screenVenueName {
  grid-column: 2;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--warm-white);
  font-family: "Songti SC", "STSong", serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-state {
  color: var(--subtle);
  font-size: 17px;
}

.connection-state.error {
  color: var(--ember);
}

.screen-columns {
  display: grid;
  grid-template-columns: 1384px 360px;
  gap: 24px;
  width: 1768px;
  height: 864px;
  background: transparent;
}

.main-column {
  position: relative;
  display: grid;
  grid-template-rows: 744px 72px;
  gap: 20px;
  min-width: 0;
  height: 864px;
}

.screen-slide-host {
  position: relative;
  width: 1384px;
  height: 744px;
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.screen-slide {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  width: 1382px;
  height: 742px;
  padding: 34px 38px;
  overflow: hidden;
  background: transparent;
}

.screen-slide.active {
  display: block;
}

.slide-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 74px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-soft);
}

.slide-header .screen-eyebrow {
  margin: 0 0 6px;
  font-size: 16px;
}

.slide-header h2 {
  margin: 0;
  color: var(--warm-white);
  font-size: 34px;
  line-height: 1;
}

.slide-header > span {
  color: var(--gold);
  font-size: 18px;
}

.overview-slide {
  padding: 38px;
}

.overview-stats {
  display: grid;
  grid-template-columns: 260px 1fr 1fr;
  gap: 22px;
  height: 224px;
}

.hero-stat,
.champion-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 28px;
  background: var(--card-strong);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
}

.hero-stat strong {
  color: var(--gold-bright);
  font-size: 82px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.hero-stat span,
.champion-card label {
  margin-top: 14px;
  color: var(--muted);
  font-size: 20px;
}

.champion-card strong {
  margin-top: 16px;
  overflow: hidden;
  color: var(--warm-white);
  font-size: 38px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.champion-card span {
  margin-top: 10px;
  color: var(--gold);
  font-size: 21px;
}

.overview-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  height: 420px;
  margin-top: 24px;
}

.overview-panel {
  padding: 28px;
  background: var(--card-muted);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
}

.overview-panel h3 {
  margin: 0 0 22px;
  color: var(--gold);
  font-size: 24px;
}

.overview-panel p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.5;
}

.ranking-list {
  display: grid;
  grid-template-rows: repeat(10, 55px);
  gap: 5px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.ranking-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 170px 150px;
  align-items: center;
  min-width: 0;
  padding: 0 20px;
  background: var(--card-soft);
  border: 1px solid var(--row-border);
  border-radius: 5px;
  color: var(--muted);
  font-size: 19px;
}

.ranking-row.top-three {
  border-color: var(--border);
  background: var(--rank-highlight);
}

.ranking-row .rank-number {
  color: var(--gold-bright);
  font-size: 23px;
  font-weight: 700;
}

.ranking-row .player-name {
  overflow: hidden;
  color: var(--warm-white);
  font-size: 23px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-row .metric {
  color: var(--gold-bright);
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

.latest-matches-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 170px);
  gap: 18px;
  margin-top: 22px;
}

.match-card {
  display: grid;
  grid-template-rows: 24px 1fr 24px;
  min-width: 0;
  padding: 24px;
  background: var(--card-soft);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
}

.match-card .match-meta,
.match-card .match-awards {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 17px;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 106px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.match-card .match-player {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--warm-white);
  font-size: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-card .match-player.right {
  text-align: right;
}

.match-card .match-player.winner {
  color: var(--gold-bright);
}

.match-score {
  color: var(--warm-white);
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.match-score.unavailable {
  color: var(--muted);
  font-size: 17px;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  font-size: 25px;
  text-align: center;
}

.tournament-content {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 24px;
  height: 570px;
  margin-top: 22px;
}

.tournament-summary,
.tournament-matches {
  padding: 26px;
  background: var(--card-soft);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
}

.tournament-summary p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.5;
}

.tournament-match {
  display: grid;
  grid-template-columns: 112px 1fr 128px;
  align-items: center;
  height: 108px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-soft);
}

.tournament-match:last-child {
  border-bottom: 0;
}

.tournament-match span {
  color: var(--muted);
  font-size: 17px;
}

.tournament-match strong {
  overflow: hidden;
  color: var(--warm-white);
  font-size: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-match b {
  color: var(--gold);
  font-size: 20px;
  text-align: right;
}

.announcement-bar {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  width: 1384px;
  height: 72px;
  padding: 0 24px;
  background: var(--presence-bg);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.announcement-bar span {
  color: var(--gold);
  font-size: 18px;
  font-weight: 700;
}

.announcement-bar p {
  margin: 0;
  overflow: hidden;
  color: var(--warm-white);
  font-size: 21px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slide-dots {
  position: absolute;
  right: 18px;
  bottom: 86px;
  z-index: 4;
  display: flex;
}

.slide-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  background: var(--dot-bg);
  border: 0;
  border-radius: 50%;
}

.slide-dot.active {
  width: 24px;
  background: var(--gold);
  border-radius: 4px;
}

.side-column {
  display: grid;
  grid-template-rows: 258px 64px 390px;
  gap: 16px;
  align-content: start;
  width: 360px;
  height: 864px;
  background: transparent;
}

.official-code-card,
.participation-steps,
.presence-card {
  background: var(--presence-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.official-code-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.official-code-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 160px;
  padding: 10px;
  overflow: hidden;
  color: #514a45;
  background: #fff;
  border-radius: 6px;
  font-size: 16px;
  text-align: center;
}

.official-code-frame img {
  width: 140px;
  height: 140px;
  object-fit: contain;
}

.official-code-frame button {
  width: 120px;
  height: 38px;
  margin-top: 10px;
  color: #40382f;
  background: #eee8df;
  border: 1px solid #c7bcae;
  border-radius: 4px;
  font-size: 15px;
}

.official-code-card > strong {
  margin-top: 12px;
  color: var(--warm-white);
  font-size: 20px;
}

.official-code-card > p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.participation-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  height: 64px;
  padding: 0 10px;
}

.participation-steps span {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.participation-steps b {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--inverse-text);
  background: var(--gold);
  border-radius: 50%;
  font-size: 12px;
}

.presence-card {
  display: grid;
  grid-template-rows: 36px 200px 52px 20px;
  row-gap: 6px;
  align-content: center;
  align-items: center;
  padding: 14px 18px;
}

.presence-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-soft);
}

.presence-heading strong {
  color: var(--warm-white);
  font-size: 22px;
}

.presence-heading span {
  color: var(--muted);
  font-size: 14px;
}

.presence-qr-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 200px;
  height: 200px;
  padding: 10px;
  color: #514a45;
  background: #fff;
  border-radius: 6px;
  font-size: 15px;
  text-align: center;
}

#presenceQrImage {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

#presenceCode {
  overflow: hidden;
  color: var(--gold-bright);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 44px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 3px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

#presenceCodeStatus {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.screen-debug-panel {
  position: absolute;
  z-index: 50;
  left: 64px;
  bottom: 48px;
  width: 560px;
  max-height: 420px;
  margin: 0;
  padding: 18px 20px;
  overflow: hidden;
  color: #e9f3ed;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid var(--gold);
  border-radius: 6px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
  pointer-events: none;
}


/* Chrome 66 ignores flex gap. These adjacent margins preserve the fixed geometry. */
.screen-binding-copy li > * + * { margin-left: 20px; }
.screen-meta > * + * { margin-left: 18px; }
.slide-dots > * + * { margin-left: 8px; }
.participation-steps span > * + * { margin-left: 7px; }

/* Chrome 57+ supports the production Grid. This fallback keeps a usable fixed stage on weaker WebViews. */
@supports not (display: grid) {
  .screen-binding-panel,
  .screen-columns,
  .participation-steps {
    display: flex;
  }

  .screen-binding-copy {
    width: 870px;
    margin-right: 116px;
  }

  .screen-runtime,
  .main-column,
  .side-column {
    display: block;
  }

  .screen-header {
    height: 96px;
    margin-bottom: 24px;
  }

  .main-column {
    width: 1384px;
    margin-right: 24px;
  }

  .screen-slide-host {
    margin-bottom: 20px;
  }

  .official-code-card,
  .participation-steps {
    margin-bottom: 16px;
  }

  .official-code-card { height: 258px; }
  .participation-steps { height: 64px; }
  .participation-steps span { width: 33.3333%; }
  .presence-card { height: 390px; }
}

.compat-diagnostic-root {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 48px;
  color: #f4efe4;
  background: #071612;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

.compat-diagnostic-root > strong {
  color: #d9b76f;
  font-size: 34px;
}

.compat-diagnostic-root > span {
  margin-top: 18px;
  color: #b9c3bb;
  font-size: 18px;
}

.compat-diagnostic-error {
  align-items: stretch;
  justify-content: flex-start;
  overflow: auto;
}

.compat-diagnostic-error > strong {
  margin-bottom: 22px;
}

.compat-diagnostic-error p {
  display: flex;
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid rgba(217, 183, 111, 0.18);
  font-size: 16px;
  line-height: 1.5;
}

.compat-diagnostic-error p b {
  flex: 0 0 140px;
  color: #d9b76f;
}

.compat-diagnostic-error p span {
  min-width: 0;
  overflow-wrap: break-word;
  color: #f4efe4;
}
