@font-face {
  font-family: "Tweetcraft";
  src: url(/assets/font/tweetcraft.woff2) format("woff2");
  font-display: block;
}
:root {
  --mc-font: "Tweetcraft", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", ui-monospace, monospace;
  --u: 2px;
  --d: 1.5px;
  --hp: 1px;
  --hb: 44px;
  color-scheme: dark;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
#account-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 24px 16px;
  background: radial-gradient(ellipse at top, #364737, #171c1a 70%);
  touch-action: pan-y;
  font-family: system-ui, -apple-system, sans-serif;
  user-select: text;
}
.account-panel {
  width: min(100%, 420px);
  margin: auto;
  padding: 30px;
  background: #242b27;
  border: 2px solid #667464;
  box-shadow: 6px 6px 0 #111812;
}
.account-brand { color: #acdc85; font-weight: 900; letter-spacing: .17em; font-size: 18px; }
.account-panel h1 { margin: 18px 0 10px; font-size: 25px; }
.account-description { color: #bec8be; font-size: 14px; line-height: 1.65; margin: 8px 0 18px; }
.account-panel form { display: grid; gap: 16px; }
.account-panel label { display: grid; gap: 8px; font-size: 14px; }
.account-panel input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #667464;
  border-radius: 0;
  background: #141a16;
  color: white;
  font: inherit;
  touch-action: manipulation;
  user-select: text;
}
.account-panel input:focus { outline: 2px solid #acdc85; outline-offset: 1px; }
.account-panel button {
  width: 100%;
  min-height: 44px;
  border: 1px solid #758371;
  border-bottom: 3px solid #151b14;
  margin-top: 12px;
  background: #465443;
  color: white;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.account-panel .account-primary { margin: 0; background: #8fbe64; color: #15200e; font-weight: 700; }
.account-panel button:hover { filter: brightness(1.12); }
.account-panel button:disabled { opacity: .6; cursor: wait; }
.account-panel button:focus-visible { outline: 2px solid #acdc85; outline-offset: 2px; }
.account-tabs { display: flex; gap: 10px; margin: 0 0 22px; }
.account-tabs button { margin: 0; }
.account-tabs button[aria-selected="true"] { background: #8fbe64; color: #15200e; }
.account-error { color: #ffb7a9; min-height: 0; margin: 0; line-height: 1.5; font-size: 14px; }
.account-error:empty { display: none; }
@media (max-width: 480px) { .account-panel { padding: 24px 20px; } }
.off {
  display: none !important;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #fff;
  font: 16px/1.25 var(--mc-font);
  font-synthesis: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
body.game {
  touch-action: none;
  overscroll-behavior: none;
}
#gl,
#hud,
#load,
#inv {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}
#gl {
  outline: none;
}
#hud {
  z-index: 1;
  pointer-events: none;
}
#cross {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  pointer-events: none;
  mix-blend-mode: difference;
  image-rendering: pixelated;
}

/* menus */
#screen {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: none;
  overflow-y: auto;
  touch-action: pan-y;
}
#screen.on {
  display: flex;
}
#screen.dim {
  background: rgba(16, 16, 16, 0.62);
}
#screen.title {
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0) 45%,
    rgba(0, 0, 0, 0.4)
  );
}
#screen.blur {
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
#screen.card {
  background: none;
}
#screen > .inner {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(4 * var(--u));
  padding: calc(10 * var(--u)) calc(6 * var(--u));
  max-width: 100%;
}
.logowrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: calc(6 * var(--u));
}
.logo {
  width: min(94vw, calc(289 * var(--u)));
  height: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}
#screen.card .logo {
  width: 75vw;
  margin: 0;
}
/* the splash: a small coral ribbon with notched ends, tucked under the logo; straight and still */
.splashw {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 35%);
  pointer-events: none;
  filter: drop-shadow(0 var(--u) 0 rgba(0, 0, 0, 0.35));
}
.splash {
  display: block;
  box-sizing: content-box;
  padding: calc(2 * var(--u)) calc(9 * var(--u));
  image-rendering: pixelated;
  background: #e8604a;
  box-shadow:
    inset 0 calc(-1 * var(--u)) 0 #b8432f,
    inset 0 var(--u) 0 #f59a7c;
  clip-path: polygon(
    0 0,
    100% 0,
    calc(100% - 4 * var(--u)) 50%,
    100% 100%,
    0 100%,
    calc(4 * var(--u)) 50%
  );
}
.mct {
  image-rendering: pixelated;
  margin: 0 0 calc(6 * var(--u));
}
.lbl {
  image-rendering: pixelated;
  margin-bottom: calc(-2 * var(--u));
}
.discord {
  position: fixed;
  left: max(calc(4 * var(--u)), env(safe-area-inset-left));
  bottom: max(calc(4 * var(--u)), env(safe-area-inset-bottom));
  z-index: 6;
  display: flex;
  align-items: center;
  gap: calc(3 * var(--u));
  line-height: 0;
  image-rendering: pixelated;
  touch-action: manipulation;
}
.discord canvas {
  display: block;
}
.discord .dicon {
  width: calc(16 * var(--u));
  height: calc(13 * var(--u));
  image-rendering: pixelated;
  filter: drop-shadow(var(--u) var(--u) 0 rgba(0, 0, 0, 0.3));
  transition: transform 0.12s;
}
.discord:hover .dicon,
.discord:focus-visible .dicon {
  transform: translateY(calc(-1 * var(--u))) rotate(-6deg);
}
.discord .h,
.discord:hover .n,
.discord:focus-visible .n {
  display: none;
}
.discord:hover .h,
.discord:focus-visible .h {
  display: block;
}
.desc {
  margin: 0;
  max-width: min(94vw, calc(230 * var(--u)));
  text-align: center;
  color: #a0a0a0;
  font-size: calc(8 * var(--d));
  line-height: calc(10 * var(--d));
  text-shadow: var(--d) var(--d) 0 #282828;
  user-select: text;
  -webkit-user-select: text;
}
.desc.small {
  color: #808080;
  text-shadow: var(--d) var(--d) 0 #202020;
}
#screen.title .desc.small {
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  padding: calc(2 * var(--u)) calc(5 * var(--u));
  text-shadow: 1px 1px 2px #000000;
}
.desc b,
b {
  font-weight: normal;
  color: #fff;
}
.desc.err {
  color: #ff5555;
}
.desc.code {
  color: #ffff55;
}
.row {
  display: flex;
  gap: calc(4 * var(--u));
  align-items: center;
  justify-content: center;
  max-width: 94vw;
}
.brightness-control {
  display: grid;
  gap: 14px;
  width: min(320px, 80vw);
  margin: 18px auto;
  color: #fff;
  font: 16px system-ui, sans-serif;
  text-align: center;
}
.brightness-control input {
  width: 100%;
  height: 28px;
  accent-color: #84be57;
  cursor: pointer;
}
.row.wrap {
  flex-wrap: wrap;
}

/* vanilla buttons */
.mcb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: calc(200 * var(--u));
  max-width: 94vw;
  height: calc(20 * var(--u));
  margin: 0;
  padding: 0;
  cursor: pointer;
  background: none;
  border: calc(3 * var(--u)) solid transparent;
  border-image: url(/assets/gui/button.png) 3 fill / calc(3 * var(--u)) stretch;
  image-rendering: pixelated;
  overflow: hidden;
}
.mcb:hover:not(:disabled),
.mcb:focus-visible {
  border-image-source: url(/assets/gui/button_highlighted.png);
  outline: none;
}
.mcb:disabled {
  cursor: default;
  border-image-source: url(/assets/gui/button_disabled.png);
}
.mcb canvas {
  image-rendering: pixelated;
  pointer-events: none;
}
.mcb .hi {
  display: none;
}
.mcb:hover:not(:disabled) .lo,
.mcb:focus-visible .lo {
  display: none;
}
.mcb:hover:not(:disabled) .hi,
.mcb:focus-visible .hi {
  display: block;
}
.mcb.half {
  width: calc(98 * var(--u));
  max-width: 46vw;
}
.mcb.wide {
  width: calc(148 * var(--u));
  max-width: 94vw;
}
.mcb.third {
  width: calc(64 * var(--u));
  max-width: 30vw;
}
.mcb.small {
  width: calc(60 * var(--u));
  max-width: 30vw;
}
.row.p {
  width: min(94vw, calc(200 * var(--u)));
}
.row.p .link {
  flex: 1;
  width: auto;
  min-width: 0;
}
.who {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: calc(8 * var(--u));
  text-shadow: var(--u) var(--u) 0 #3f3f3f;
}
.who.ver {
  color: #55ffff;
}
.face {
  flex: none;
  image-rendering: pixelated;
}
.link {
  width: calc(200 * var(--u));
  max-width: 94vw;
  height: calc(18 * var(--u));
  min-height: 28px;
  padding: 0 calc(4 * var(--u));
  background: #000;
  color: #fff;
  border: 1px solid #a0a0a0;
  border-radius: 0;
  font: calc(8 * var(--u)) var(--mc-font);
  user-select: text;
  -webkit-user-select: text;
  outline: none;
}
.link:focus {
  border-color: #fff;
}
.link.search {
  width: min(94vw, calc(305 * var(--u)));
}
.remote-address {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #aaa;
  font: calc(8 * var(--u)) var(--mc-font);
  user-select: text;
}
/* a read-only link with its copy button inside the bar */

/* server list */
.servers {
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--u));
  width: min(94vw, calc(305 * var(--u)));
  padding: calc(2 * var(--u)) 0;
}
/* Only the worlds scroll. The two action rows stay docked at the bottom, including on short/mobile screens. */
#screen.servers-menu {
  overflow: hidden;
}
#screen.servers-menu > .inner {
  margin: 0 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  gap: calc(3 * var(--u));
  padding-bottom: max(calc(6 * var(--u)), env(safe-area-inset-bottom));
}
#screen.servers-menu > .inner > :not(.servers) {
  flex-shrink: 0;
}
#screen.servers-menu .mct {
  margin-bottom: 0;
}
#screen.servers-menu > .inner > .row.wrap {
  width: min(94vw, calc(305 * var(--u)));
  max-width: 100%;
  flex-wrap: nowrap;
}
#screen.servers-menu > .inner > .row.wrap .mcb {
  flex: 1;
  width: auto;
  min-width: 0;
  max-width: none;
}
#screen.servers-menu > .inner > .row.wrap canvas {
  max-width: 100%;
  object-fit: contain;
}
#screen.servers-menu .servers {
  flex: 1 1 auto;
  min-height: 0;
  max-width: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.server-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(4 * var(--u));
  width: min(94vw, calc(305 * var(--u)));
  max-width: 100%;
  padding: calc(3 * var(--u));
  background: rgba(12, 20, 25, 0.86);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.server-actions > .row {
  width: 100%;
  flex-wrap: nowrap;
}
.server-actions .mcb {
  flex: 1;
  width: auto;
  min-width: 0;
  max-width: none;
}
.server-actions .mcb canvas {
  max-width: 100%;
  object-fit: contain;
}
.srow {
  display: flex;
  gap: calc(3 * var(--u));
  align-items: flex-start;
  padding: calc(2 * var(--u));
  border: var(--u) solid transparent;
  cursor: pointer;
  outline: none;
}
.srow:hover {
  background: rgba(255, 255, 255, 0.06);
}
.srow.sel {
  border-color: #fff;
  background: rgba(0, 0, 0, 0.6);
}
.sicon {
  flex: none;
  width: calc(32 * var(--u));
  height: calc(32 * var(--u));
  image-rendering: pixelated;
}
.sicon.pfp {
  image-rendering: auto;
}
.stext {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--u);
  overflow: hidden;
}
.sline {
  display: flex;
  justify-content: space-between;
  gap: calc(4 * var(--u));
}
.stext canvas {
  flex: none;
  image-rendering: pixelated;
}
/* sponsored rows (menus.js sponsorRow): shorter than a server row; the 24 px image sits in a server icon's 32 px column */
.sprow {
  display: flex;
  gap: calc(3 * var(--u));
  align-items: center;
  padding: calc(2 * var(--u));
  border: var(--u) solid transparent;
  background: rgba(255, 170, 0, 0.07);
  color: inherit;
  text-decoration: none;
  outline: none;
}
.sprow:hover,
.sprow:focus-visible {
  background: rgba(255, 170, 0, 0.14);
}
.sprow:focus-visible {
  border-color: #fff;
}
.sprow .stext {
  gap: 0;
}
.spicon {
  flex: none;
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
  margin: 0 calc(4 * var(--u));
  object-fit: cover;
}
.spicon.pix {
  image-rendering: pixelated;
}
.sptag {
  display: flex;
  flex: none;
}
.row .desc.spimg {
  max-width: calc(98 * var(--u));
  text-align: left;
}

/* Sponsor purchase controls: native, labelled and readable even on small phones. */
.sp-placement {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(94vw, 400px);
  font-size: 16px;
}
.sp-placement label {
  color: #ffff55;
}
.sp-heading {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: normal;
  text-align: center;
}
.sp-label {
  font-size: 16px;
  color: #ddd;
}
.mcb.sp-button {
  font: 16px var(--mc-font);
  color: #eee;
  min-height: 44px;
  height: auto;
  padding: 6px;
  text-align: center;
}
.mcb.sp-button.half {
  width: min(180px, 44vw);
  max-width: 44vw;
}
#screen:has(.sp-placement) .row {
  flex-wrap: wrap;
}
#screen:has(.sp-placement) .link {
  width: min(94vw, 400px);
}
#screen:has(.sp-placement) .sppreview {
  width: min(94vw, 400px);
}
.sp-placement select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px;
  color: #fff;
  background: #171717;
  border: 1px solid #aaa;
  font: 16px var(--mc-font);
}
.sp-world-picker {
  width: min(94vw, 400px);
  flex-wrap: wrap;
}
.sp-world-picker .link {
  width: 100%;
  max-width: 100%;
}
.sp-discover {
  color: #9cf;
  font-size: 16px;
  max-width: 94vw;
  text-align: center;
}
#screen:has(.sp-placement) .desc {
  font-size: 14px;
  line-height: 1.4;
  color: #bbb;
  max-width: min(94vw, 440px);
}
#screen:has(.sp-placement) .desc.code {
  color: #ffff55;
}
#screen:has(.sp-placement) .desc.err {
  color: #ff5555;
}
#screen:has(.sp-placement) .link {
  font-size: 16px;
  min-height: 40px;
}

/* small in-game buttons: menu top left; Play in new tab, Inventory and Chat top right */
#hudtop {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
#hudleft,
#hudright {
  position: absolute;
  top: max(calc(4 * var(--hp)), env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--hp));
}
#hudleft {
  left: max(calc(4 * var(--hp)), env(safe-area-inset-left));
  flex-direction: row;
  align-items: flex-start;
}
#hudleft.stack {
  flex-direction: column;
}
#hudright {
  right: max(calc(4 * var(--hp)), env(safe-area-inset-right));
  align-items: stretch;
}
.mcb.hb {
  pointer-events: auto;
  width: auto;
  max-width: none;
  height: calc(18 * var(--hp));
  padding: 0 calc(3 * var(--hp));
  justify-content: flex-start;
  border-width: calc(3 * var(--hp));
  border-image-width: calc(3 * var(--hp));
  touch-action: manipulation;
}
#hudleft .mcb.hb {
  justify-content: center;
  min-width: calc(18 * var(--hp));
}

/* World sponsors: only the links take pointer input; the panel never captures the camera. */
#world-sponsors {
  position: fixed;
  left: max(calc(4 * var(--hp)), env(safe-area-inset-left));
  top: 48px;
  z-index: 4;
  width: min(190px, 42vw);
  padding: 6px 7px;
  pointer-events: none;
  background: rgba(12, 20, 25, 0.67);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 2px solid #d9b76c;
  border-radius: 3px;
  font: 11px/1.35 var(--mc-font);
  text-shadow: 1px 1px #000;
}
#world-sponsors.pause-visible {
  z-index: 6;
}
.ws-heading {
  color: #d9b76c;
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.ws-list {
  display: flex;
  flex-direction: column;
}
.ws-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 3px 0;
  color: #eee;
  text-decoration: none;
}
.ws-rank {
  color: #a4acaf;
  width: 10px;
  flex: none;
  font-size: 10px;
}
.ws-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
}
.ws-bid {
  color: #e3cb8d;
  flex: none;
}
.ws-cta {
  display: inline-block;
  color: #a9d5e8;
  margin-top: 5px;
  font-size: 10px;
  text-decoration: none;
}
#world-sponsors a {
  pointer-events: auto;
  touch-action: manipulation;
}
.ws-row:hover,
.ws-row:focus-visible,
.ws-cta:hover,
.ws-cta:focus-visible {
  color: #ffffa0;
  outline: 1px solid #d9b76c;
  outline-offset: 2px;
}
.ws-empty {
  margin: 2px 0;
  color: #aeb8bd;
  font-size: 10px;
}
@media (max-width: 600px), (max-height: 450px) {
  #world-sponsors {
    width: min(136px, 42vw);
    padding: 3px 4px;
    font-size: 10px;
    line-height: 14px;
  }
  #world-sponsors .ws-row {
    gap: 3px;
    padding: 0;
  }
  #world-sponsors .ws-rank {
    width: 8px;
    font-size: 9px;
  }
  #world-sponsors .ws-heading {
    margin-bottom: 2px;
    letter-spacing: 0.5px;
  }
  #world-sponsors .ws-heading,
  #world-sponsors .ws-cta {
    font-size: 8px;
    line-height: 12px;
  }
  #world-sponsors .ws-cta {
    margin-top: 2px;
  }
}

/* touch controls */
#touch {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
#touch > * {
  pointer-events: auto;
}
#stick {
  position: absolute;
  left: max(18px, env(safe-area-inset-left));
  bottom: calc(var(--hb) + 16px);
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.28);
  touch-action: none;
}
#knob {
  position: absolute;
  left: 34px;
  top: 34px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  pointer-events: none;
}
.tb {
  width: 62px;
  height: 62px;
  padding: 0;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font: 24px var(--mc-font);
  touch-action: none;
}
.tb:active {
  background: rgba(255, 255, 255, 0.25);
}
#t-jump {
  position: absolute;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(var(--hb) + 40px);
}
#t-sneak {
  position: absolute;
  right: calc(max(18px, env(safe-area-inset-right)) + 74px);
  bottom: calc(var(--hb) + 16px);
}

/* the chat field is drawn on the HUD in the game's font; this invisible input over it takes the typing */
#chatbox {
  position: fixed;
  z-index: 6;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  user-select: text;
  -webkit-user-select: text;
}
#chatbox::selection {
  background: transparent;
}

/* creative inventory: a canvas, with an invisible input over its search box */
#inv {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 7;
  touch-action: none;
}
#invsearch {
  position: fixed;
  z-index: 8;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  user-select: text;
  -webkit-user-select: text;
}
#invsearch::selection {
  background: transparent;
}

#adv {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  right: env(safe-area-inset-right, 0px);
  z-index: 9;
  pointer-events: none;
  image-rendering: pixelated;
  transform: translateX(100%);
}
#note {
  position: fixed;
  left: 50%;
  top: 14px;
  z-index: 10;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  border: 1px solid #555;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#note.show {
  opacity: 1;
}
#load {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 11;
  background: #000;
}
#fatal {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  font-size: 16px;
  line-height: 20px;
  text-shadow: 2px 2px 0 #3f3f3f;
  background:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url(/assets/block/dirt.png) 0 0 / 64px repeat;
  image-rendering: pixelated;
}

/* ==========================================================================
   Modern Neomorphic Frosted-Glass Scoreboard (全新现代化体素拟态计分板)
   ========================================================================== */
.scoreboard-dock {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  user-select: none;
}
.scoreboard-dock.off {
  display: none !important;
}

/* 计分板核心毛玻璃卡片 */
.sc-card {
  width: 236px;
  pointer-events: auto;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(15, 21, 32, 0.85) 0%, rgba(9, 13, 22, 0.94) 100%);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.75), 0 0 1px 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.24s ease;
}
.sc-card.collapsed {
  transform: translateX(280px);
  opacity: 0;
  pointer-events: none;
}

/* 顶栏 Header */
.sc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 8px;
}
.sc-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sc-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  border-radius: 20px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.sc-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: scPulse 1.8s infinite ease-in-out;
}
@keyframes scPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
}
.sc-status-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #4ade80;
}
.sc-title {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #f8fafc;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 12px rgba(255, 255, 255, 0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sc-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.2);
}

/* 分割线光晕 */
.sc-glow-divider {
  height: 1px;
  margin: 0 10px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.4), rgba(168, 85, 247, 0.4), transparent);
}

/* 词条容器 */
.sc-entries {
  list-style: none;
  margin: 0;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 55vh;
  overflow-y: auto;
  scrollbar-width: none;
}
.sc-entries::-webkit-scrollbar {
  display: none;
}

/* 单条词条 Item */
.sc-entry-item {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.sc-entry-item:hover {
  transform: translateX(-3px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

/* 排位专属样式 */
.sc-entry-item.rank-1 {
  border-left: 3px solid #fbbf24;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.15) 0%, rgba(255, 255, 255, 0.02) 100%);
}
.sc-entry-item.rank-1 .sc-entry-score {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.3);
}
.sc-entry-item.rank-2 {
  border-left: 3px solid #cbd5e1;
  background: linear-gradient(90deg, rgba(203, 213, 225, 0.15) 0%, rgba(255, 255, 255, 0.02) 100%);
}
.sc-entry-item.rank-2 .sc-entry-score {
  color: #cbd5e1;
  background: rgba(203, 213, 225, 0.15);
}
.sc-entry-item.rank-3 {
  border-left: 3px solid #f97316;
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.15) 0%, rgba(255, 255, 255, 0.02) 100%);
}
.sc-entry-item.rank-3 .sc-entry-score {
  color: #fb923c;
  background: rgba(249, 115, 22, 0.15);
}

.sc-entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sc-entry-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.sc-entry-icon {
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}
.sc-entry-name {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-entry-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* 分数微胶囊 (Score Capsule) */
.sc-entry-score {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.sc-entry-score.score-pulse {
  animation: scScorePop 0.35s ease-out;
}
@keyframes scScorePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.22); background: rgba(56, 189, 248, 0.35); }
  100% { transform: scale(1); }
}

/* 进度条 (Progress Track) */
.sc-entry-progress-track {
  width: 100%;
  height: 3px;
  margin-top: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.sc-entry-progress-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
  transition: width 0.3s ease;
}

/* 页脚 Footer */
.sc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  font-size: 10px;
  color: #64748b;
}
.sc-footer-left {
  display: flex;
  align-items: center;
  gap: 5px;
}
.sc-signal-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 9px;
}
.sc-signal-bars i {
  display: inline-block;
  width: 2px;
  background: #22c55e;
  border-radius: 1px;
}
.sc-signal-bars i:nth-child(1) { height: 3px; }
.sc-signal-bars i:nth-child(2) { height: 5px; }
.sc-signal-bars i:nth-child(3) { height: 7px; }
.sc-signal-bars i:nth-child(4) { height: 9px; }
.sc-ping-val {
  font-weight: 700;
  color: #86efac;
}
.sc-footer-right {
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #64748b;
}

/* 微缩浮标 (Mini Dock Pill) */
.sc-mini-dock {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 20px 0 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-right: none;
  background: linear-gradient(135deg, rgba(15, 21, 32, 0.88) 0%, rgba(9, 13, 22, 0.95) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: -4px 6px 20px rgba(0, 0, 0, 0.5);
  color: #f1f5f9;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}
.sc-mini-dock:hover {
  transform: translateX(-4px);
  background: linear-gradient(135deg, rgba(24, 32, 48, 0.92) 0%, rgba(13, 18, 28, 0.98) 100%);
}
.sc-mini-dock.hidden {
  display: none !important;
}
.sc-mini-icon {
  font-size: 13px;
}
.sc-mini-text {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #cbd5e1;
}

/* 窄屏/移动端自适应 */
@media (max-width: 640px) {
  .scoreboard-dock {
    right: 8px;
    top: 42%;
  }
  .sc-card {
    width: 190px;
  }
  .sc-title {
    font-size: 11px;
  }
  .sc-entry-name {
    font-size: 11px;
  }
  .sc-entry-score {
    font-size: 10px;
    padding: 1px 4px;
  }
}
