/* Chinese program text: light outlines for scene contrast, clean panel copy.
   Keep original images, canvas, transforms and gameplay hit targets intact. */
html[lang^="zh"] {
  --minefun-ui-font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  --minefun-text-edge: #182536;
  --minefun-dark-text-edge: #fff3cb;
  --minefun-button-outline: clamp(.8px, .05em, 2.4px);
  --minefun-text-outline: clamp(.6px, .035em, 1.6px);
  --minefun-hud-outline: clamp(1px, .055em, 2.4px);
}
html[lang^="zh"] body,
html[lang^="zh"] .app,
html[lang^="zh"] .app :where(div, span, p, a, button, input, textarea, label, h1, h2, h3, h4, strong, small, li, td, th),
html[lang^="zh"] #modal-target,
html[lang^="zh"] #modal-target :where(div, span, p, a, button, input, textarea, label, h1, h2, h3, h4, strong, small, li, td, th),
html[lang^="zh"] .v-popper__inner {
  font-family: var(--minefun-ui-font) !important;
  -webkit-text-stroke: var(--minefun-text-outline) var(--minefun-text-edge) !important;
  paint-order: stroke fill;
  text-shadow: 0 1px 1px rgb(10 21 34 / 65%) !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Scene labels and HUD numbers need a firmer edge against moving scenery.
   Em-based widths follow the original logical-canvas scale, without resizing UI. */
html[lang^="zh"] .app :is(.key, .key-label, .keyboard-key, .timer, .timer-number, .armor-points, .ammo-magazine, .room-id-cont),
html[lang^="zh"] .app :is(.key, .key-label, .keyboard-key, .timer, .timer-number, .armor-points, .ammo-magazine, .room-id-cont) :where(div, span, strong),
html[lang^="zh"] .app .game-wrapper .name {
  -webkit-text-stroke: var(--minefun-hud-outline) var(--minefun-text-edge) !important;
  paint-order: stroke fill;
  text-shadow: 0 2px 1px rgb(10 21 34 / 75%) !important;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* Reading and typing use clean glyphs on their existing panel backgrounds. */
html[lang^="zh"] :is(.app, #modal-target) :where(input, textarea, select, p, small, td, th),
html[lang^="zh"] .app :is(.docs-page, .monaco-editor) *,
html[lang^="zh"] .v-popper__inner,
html[lang^="zh"] .v-popper__inner * {
  -webkit-text-stroke: 0 !important;
  text-shadow: none !important;
}
html[lang^="zh"] :is(.app, #modal-target) :where(input, textarea) {
  font-weight: 500;
  line-height: 1.5;
  text-shadow: none !important;
}
html[lang^="zh"] .app :where(.base-btn, .base-button) {
  font-weight: 700;
  line-height: 1.35;
  paint-order: stroke fill;
}
html[lang^="zh"] .app .base-btn[style*="--primary-btn"],
html[lang^="zh"] .app .base-button.primary {
  color: #27313e !important;
}
/* Dark button text gets a warm light edge; pale text keeps the dark edge.
   Match pause actions explicitly as well as the shared button component. */
html[lang^="zh"] :is(.app, #modal-target) :is(.base-btn[style*="--primary-btn"], .base-button.primary, .play-btn[data-v-d4af08ad], .main-section-buttons .play, .main-section-buttons .another-room),
html[lang^="zh"] :is(.app, #modal-target) :is(.base-btn[style*="--primary-btn"], .base-button.primary, .play-btn[data-v-d4af08ad], .main-section-buttons .play, .main-section-buttons .another-room) :where(div, span, strong) {
  -webkit-text-stroke: var(--minefun-button-outline) var(--minefun-dark-text-edge) !important;
  paint-order: stroke fill;
  text-shadow: 0 1px 0 rgb(81 51 8 / 20%) !important;
}
/* The start button stays in the original card and calls the original action. */
html[lang^="zh"] .app .play-btn[data-v-d4af08ad] {
  color: #26323e !important;
  background: linear-gradient(180deg, #ffdc70, #ffc43c) !important;
  border: 2px solid #e6ab2d !important;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 96px;
  min-height: 96px;
  padding: 0 24px;
  line-height: 1;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: .08em;
  text-shadow: none !important;
  box-shadow: 0 4px 0 #af7b1f, 0 12px 26px rgb(16 38 56 / 18%);
  animation: none !important;
  transition: background .16s ease, box-shadow .16s ease;
}
html[lang^="zh"] .app .play-btn[data-v-d4af08ad]:hover {
  background: linear-gradient(180deg, #ffe38d, #ffce50) !important;
  transform: none;
}
html[lang^="zh"] .app .play-btn[data-v-d4af08ad]:active {
  background: #f5bc37 !important;
  box-shadow: 0 2px 0 #af7b1f;
}
/* This is a DOM instruction strip, independent of the 1920px design canvas.
   Undo only its text-container scale/offset, leaving the image card untouched. */
html[lang^="zh"] .app .tips-wrapper[data-v-d4af08ad] {
  transform: none !important;
  width: 100% !important;
  left: 0;
  bottom: max(20px, env(safe-area-inset-bottom));
  padding: 0 16px;
  box-sizing: border-box;
}
html[lang^="zh"] .app .tips[data-v-d4af08ad] {
  left: 0 !important;
  width: max-content;
  max-width: min(680px, 100%);
  min-height: 44px;
  padding: 10px 18px;
  gap: 8px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 12px;
  background: rgb(17 37 53 / 88%);
  box-shadow: 0 4px 18px rgb(0 0 0 / 12%);
  box-sizing: border-box;
  line-height: 1.5;
}
html[lang^="zh"] .app .tips-title[data-v-d4af08ad] {
  -webkit-text-stroke: .6px var(--minefun-text-edge) !important;
  margin-right: 0;
  color: #ffdb83;
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 700;
  flex-shrink: 0;
  text-shadow: none !important;
}
html[lang^="zh"] .app .tips-value[data-v-d4af08ad] {
  -webkit-text-stroke: .6px var(--minefun-text-edge) !important;
  min-width: 0;
  max-width: none;
  color: #fff;
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 500;
  overflow-wrap: anywhere;
  text-align: left;
  text-shadow: none !important;
}
/* Dark lettering on pale keycaps uses the same light-edge treatment. */
html[lang^="zh"] :is(.app, #modal-target) :is(.keycap, .key-wrapper, .gg-travel-bar__key),
html[lang^="zh"] :is(.app, #modal-target) :is(.keycap, .key-wrapper, .gg-travel-bar__key) * {
  -webkit-text-stroke: .6px var(--minefun-dark-text-edge) !important;
  paint-order: stroke fill;
  text-shadow: none !important;
}
@media (max-height: 420px) {
  html[lang^="zh"] .app .tips-wrapper[data-v-d4af08ad] { bottom: max(10px, env(safe-area-inset-bottom)); }
  html[lang^="zh"] .app .tips[data-v-d4af08ad] { min-height: 36px; padding: 7px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html[lang^="zh"] .app .base-btn,
  html[lang^="zh"] .app .base-button { animation: none !important; transition: none !important; }
}

/* Original emote menu: honest empty state while its source assets are missing. */
html[lang^="zh"] .app .local-emotes-empty { color: #f5f7fb; font-size: 28px; line-height: 1.6; text-align: center; padding: 44px 24px; }
html[lang^="zh"] .app .local-emotes-empty p { color: #c9d4e2; font-size: 24px; margin: 10px 0; }

/* NPC tip modal: readable copy, centered heading, room for two lines. */
html[lang^="zh"] .app .top[data-v-dda849ec] { padding-left: 0; }
html[lang^="zh"] .app .label[data-v-dda849ec] { box-sizing: border-box; padding: 0 30px; top: 140px; font-size: 28px; line-height: 1.5; overflow-wrap: anywhere; }

/* Pause cards share one title baseline. The lootbox caption previously
   inherited a 36x39 icon box, which wrapped the Chinese word outside its card. */
html[lang^="zh"] .pause-cont { --pause-card-label-size: 24px; }
html[lang^="zh"] .pause-cont.vertical { --pause-card-label-size: 36px; }
html[lang^="zh"] .pause-cont.tooVertical { --pause-card-label-size: 31px; }
html[lang^="zh"] :is(.app, #modal-target) .pause-main-section :is(.game-wrapper .name[data-v-a16afb14], .lootbox .lootbox-text[data-v-22b68280]) {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0;
  padding: 0 8px;
  box-sizing: border-box;
  color: #fff;
  font-size: var(--pause-card-label-size);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  z-index: 2;
  -webkit-text-stroke: var(--minefun-hud-outline) var(--minefun-text-edge) !important;
  paint-order: stroke fill;
  text-shadow: 0 2px 1px rgb(10 21 34 / 75%) !important;
}
