:root {
  --glass: rgba(18, 21, 28, 0.56);
  --glass-deep: rgba(14, 17, 24, 0.78);
  --border-subtle: rgba(255, 255, 255, 0.14);
  --border-hi: rgba(255, 255, 255, 0.28);
  --text: #f3f2ee;
  --muted: rgba(236, 234, 228, 0.66);
  --gold: #e4c784;
  --green: #96d959;
  --meituan: #ffc300;
  --paper: #f5f3ec;
  --ink: #20242d;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "PingFang SC", "SF Pro Text", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --display: "Avenir Next", "DIN Alternate", "PingFang SC", "Microsoft YaHei", sans-serif;
  --art-script: "Snell Roundhand", "Savoye LET", "Apple Chancery", "Brush Script MT", "Georgia", serif;
  /* Crisp brushed halftone diagonal grain SVG texture for italic textured typography */
  --text-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M-2,10 L10,-2 M4,14 L14,4' stroke='rgba(255,255,255,0.22)' stroke-width='1.1'/%3E%3Ccircle cx='3' cy='3' r='0.9' fill='rgba(24,28,36,0.16)'/%3E%3Ccircle cx='9' cy='8' r='0.8' fill='rgba(255,244,210,0.24)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body, #game, #world {
  margin: 0; width: 100%; height: 100%; overflow: hidden;
  font-family: var(--sans);
  color: var(--text);
  background: #171a21;
  user-select: none;
  -webkit-user-select: none;
}
#world canvas { display: block; width: 100%; height: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ===================== OPENING 3D DIORAMA SPAWN OVERLAY ===================== */
#spawnLayer {
  position: fixed; inset: 0; z-index: 20; pointer-events: none;
  background: radial-gradient(circle at 50% 48%, transparent 55%, rgba(12, 15, 22, 0.40) 100%);
}
.dioramaHead {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  text-align: center; pointer-events: auto;
  padding: 11px 24px 12px; border-radius: 12px;
  background: var(--glass); backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.30);
}
.crest {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10.5px; letter-spacing: 0.20em; color: var(--gold);
}
.crestDia { width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }
.dioramaHead h1 {
  margin: 3px 0 2px; font-family: var(--display); font-size: clamp(19px, 2.3vw, 25px);
  font-weight: 900; font-style: italic; letter-spacing: 0.12em;
  background-image: var(--text-grain), linear-gradient(180deg, #ffffff 0%, #f5efcf 58%, #e4c784 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
}
.dioramaHead p { margin: 0; font-size: 12px; color: var(--muted); }

.dioramaTools {
  position: absolute; top: 18px; right: 18px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: auto;
}
.zoomGroup, .dioramaTime {
  display: flex; gap: 4px; padding: 4px; border-radius: 10px;
  background: var(--glass); backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
}
.zoomGroup button, .dioramaTime button {
  border: 0; background: transparent; color: var(--text);
  padding: 5px 10px; border-radius: 7px; font-size: 12px; font-weight: 500;
}
.zoomGroup button:hover, .dioramaTime button:hover { background: rgba(255, 255, 255, 0.12); }
.dioramaTime button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.90); color: #181b22; font-weight: 600; }

#spawnPins { position: absolute; inset: 0; pointer-events: none; }
.spawnPin {
  position: absolute; transform: translate(-50%, -100%); pointer-events: auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px 6px 9px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--pin-color, var(--gold)) 75%, #fff);
  background: rgba(18, 21, 28, 0.80); backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
  transition: transform 0.16s, background 0.16s;
  white-space: nowrap;
}
.spawnPin:hover, .spawnPin.selected {
  transform: translate(-50%, -108%) scale(1.06);
  background: rgba(26, 30, 40, 0.94);
}
.pinDia {
  width: 9px; height: 9px; flex: 0 0 auto;
  background: var(--pin-color, var(--gold)); border: 1.5px solid #fff;
  transform: rotate(45deg);
}
.pinBody { display: flex; flex-direction: column; text-align: left; line-height: 1.18; }
.pinBody strong { font-size: 13px; color: #fff; font-weight: 600; }
.pinBody small { font-size: 10px; color: var(--gold); }

.spawnDock {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: min(880px, calc(100% - 32px)); pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 18px; border-radius: 14px;
  background: var(--glass-deep); backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}
.spawnMeta { min-width: 0; flex: 1; }
.spawnTag {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: rgba(228, 199, 132, 0.18); border: 1px solid rgba(228, 199, 132, 0.36);
  color: var(--gold); font-size: 11px; font-weight: 600; margin-right: 8px; vertical-align: middle;
}
.spawnMeta strong { font-size: 16.5px; color: #fff; vertical-align: middle; }
.spawnMeta p { margin: 5px 0 0; font-size: 12.2px; color: var(--muted); line-height: 1.42; }
.spawnDockRight { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 0 0 auto; }
.spawnChips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.spawnChip {
  border: 1px solid var(--border-subtle); background: rgba(255, 255, 255, 0.06);
  padding: 4px 10px; border-radius: 7px; font-size: 11.8px; color: var(--text);
}
.spawnChip:hover { background: rgba(255, 255, 255, 0.16); }
.spawnChip.active { background: rgba(255, 255, 255, 0.92); color: #181b22; font-weight: 600; border-color: #fff; }
.goldBtn {
  border: 0; background: #f4f1e8; color: #181b22;
  padding: 8px 20px; border-radius: 9px; font-size: 13.5px; font-weight: 700;
  transition: transform 0.14s, background 0.14s;
}
.goldBtn:hover { transform: translateY(-1px); background: #fff; }

/* ===================== FIG. 1 MINIMALIST IN-GAME HUD ===================== */
.eyeBtn {
  position: fixed; top: 14px; right: 16px; z-index: 28;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--glass); backdrop-filter: blur(10px);
  display: grid; place-items: center; color: var(--text);
  opacity: 0.82; transition: opacity 0.15s, background 0.15s;
}
.eyeBtn:hover { opacity: 1; background: rgba(255, 255, 255, 0.16); }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 15; }
#hud button, #hud select, #hud aside { pointer-events: auto; }
#game.hud-hidden #hud { opacity: 0; pointer-events: none; }
#game.hud-hidden #hud * { pointer-events: none !important; }

/* TOP-LEFT: FPS + Clean Light Frosted Quest Card (Fig. 1) */
.hudTL {
  position: absolute; top: 12px; left: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.fpsLine {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}
.fpsLine b { font-family: ui-monospace, monospace; font-weight: 600; color: #fff; }

.questCardLight {
  width: 248px; text-align: left;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(244, 243, 238, 0.88);
  backdrop-filter: blur(12px);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.14s, background 0.14s;
}
.questCardLight:hover { background: rgba(250, 249, 245, 0.96); transform: translateY(-1px); }
.qcIcon {
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto;
  background: rgba(82, 166, 98, 0.14); border: 1px solid rgba(82, 166, 98, 0.42);
  color: #367d46; display: grid; place-items: center; font-size: 13px;
}
.qcBody { min-width: 0; flex: 1; }
.qcRow { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.qcRow strong { font-size: 12.8px; font-weight: 700; color: #1b1f27; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qcBadge {
  font-size: 10.5px; font-weight: 600; color: #8c6a1f;
  background: rgba(228, 190, 96, 0.22); padding: 1px 6px; border-radius: 999px; flex: 0 0 auto;
}
.qcBody small { display: block; margin-top: 2px; font-size: 11px; color: #565d6b; line-height: 1.32; }
.runMini {
  margin-top: 5px; padding-top: 4px; border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex; justify-content: space-between; font-size: 11px; color: #242933;
}
.runMini b { font-family: monospace; color: #b56c18; }

/* TOP-CENTER: Minimal Location Pill + Subtitle (Fig. 1) */
.hudTC {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.locPillTop { text-align: center; }
.locPillMain {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 16px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
}
.tinyDia { width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.locPillMain strong {
  font-family: var(--display); font-size: 14px; font-weight: 800; font-style: italic;
  letter-spacing: 0.08em;
  background-image: var(--text-grain), linear-gradient(180deg, #ffffff 0%, #f3ebd2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.topClockBar {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 5px; padding: 3px 13px; border-radius: 999px;
  background: rgba(16, 20, 28, 0.62); backdrop-filter: blur(10px);
  border: 1px solid rgba(228, 199, 132, 0.28);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  font-size: 11.5px; color: #f4f1e6;
}
.topClockBar b {
  font-family: ui-monospace, "SF Mono", monospace; font-style: italic;
  font-size: 13px; font-weight: 800; letter-spacing: 0.06em; color: #ffe7a3;
  font-variant-numeric: tabular-nums;
}
.topClockBar i { font-style: italic; color: rgba(244, 241, 232, 0.88); }
.topClockBar em { font-style: normal; font-weight: 600; color: #c7e6ff; }
.topClkSep { color: rgba(255, 255, 255, 0.35); }
.locPillTop small {
  display: block; margin-top: 3px;
  font-size: 9.2px; letter-spacing: 0.20em; color: rgba(242, 239, 232, 0.72);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.65);
}

.navMini {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 12px; border-radius: 999px;
  background: rgba(18, 21, 28, 0.62); backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle); font-size: 11.5px;
}
.bearingArrow { color: var(--gold); display: inline-block; font-size: 11px; }
.navMini small { color: var(--gold); font-family: monospace; }

.areaBanner {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 16px; text-align: center;
  animation: areaIn 2.8s ease forwards;
}
.areaBanner small { display: block; font-size: 9.5px; letter-spacing: 0.26em; color: var(--gold); }
.areaBanner strong { font-family: var(--serif); font-size: 20px; letter-spacing: 0.18em; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65); }
.areaRule { width: 38px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
@keyframes areaIn {
  0% { opacity: 0; transform: translateY(-6px); }
  15% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-4px); }
}

/* Stealth Countdown Alert */
.stealthAlert {
  width: min(390px, 88%); padding: 10px 14px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(118, 20, 24, 0.90), rgba(40, 14, 20, 0.88));
  backdrop-filter: blur(10px); border: 1px solid #ff6457;
  box-shadow: 0 8px 26px rgba(210, 32, 32, 0.45);
}
.alertHeader { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.alertBang {
  width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto;
  background: #ff453a; color: #fff; font-weight: 800; font-size: 12px; display: grid; place-items: center;
}
.alertHeader strong { font-size: 13px; color: #fff; flex: 1; }
.alertHeader b { font-family: ui-monospace, monospace; font-size: 16px; color: #ffe07d; }
.alertBarTrack { height: 5px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); overflow: hidden; margin-bottom: 4px; }
.alertBarTrack i { display: block; height: 100%; background: linear-gradient(90deg, #ffd166, #ff453a); transition: width 0.06s linear; }
.stealthAlert small { font-size: 11px; color: #ffd9d2; }

/* MID-LEFT: Fig. 1 Slender Translucent Dark Menu */
.hudSideMenu {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 128px; padding: 7px 8px; border-radius: 10px;
  background: var(--glass); backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.hudSideMenu button, .menuStat, .menuSelectRow {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 5px 6px; border-radius: 6px; border: 0; background: transparent;
  font-size: 11.5px; color: rgba(243, 242, 238, 0.88);
  transition: background 0.14s;
}
.hudSideMenu button:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.hudSideMenu kbd {
  min-width: 20px; height: 18px; padding: 0 4px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.10); border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: ui-monospace, monospace; font-size: 10px; color: rgba(255, 255, 255, 0.86);
  display: grid; place-items: center;
}
.menuStat b { font-family: ui-monospace, monospace; font-size: 11px; color: #fff; }
.menuSelectRow select {
  background: rgba(255, 255, 255, 0.10); border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff; border-radius: 5px; padding: 1px 4px; font-size: 11px; outline: none;
}
.menuSelectRow select option { background: #1c202a; color: #fff; }
#flowToggle em {
  font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.10);
}
#flowToggle[aria-pressed="true"] em { background: var(--gold); color: #181b22; font-weight: 700; }

/* MIDDLE-RIGHT: Contextual Prompts */
.hudMR {
  position: absolute; right: 20px; top: 46%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.promptPill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 9px; border-radius: 9px;
  border: 1px solid var(--border-hi);
  background: var(--glass-deep); backdrop-filter: blur(10px);
  font-size: 12.8px; color: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
  transition: transform 0.14s, background 0.14s;
}
.promptPill:hover { transform: translateX(-2px); background: rgba(34, 39, 50, 0.92); }
.promptPill kbd {
  width: 22px; height: 22px; border-radius: 5px;
  background: #f4f2eb; color: #181b22; font-weight: 800; font-size: 11.5px;
  display: grid; place-items: center;
}
.yellowPill { border-color: rgba(255, 195, 0, 0.75); }
.yellowPill kbd { background: var(--meituan); color: #1a1c20; }
.ballPill { gap: 10px; }
.ballPill button {
  border: 0; background: #f4f2eb; color: #181b22;
  padding: 3px 10px; border-radius: 6px; font-weight: 700; font-size: 12px;
}

/* BOTTOM-LEFT: Minimalist Twin Bars + Odometer (Fig. 1) */
.hudBL {
  position: absolute; left: 16px; bottom: 16px;
  display: flex; flex-direction: column; gap: 5px; width: 174px;
}
.statRow { display: flex; align-items: center; gap: 7px; }
.statIcon { width: 12px; text-align: center; font-size: 11px; font-weight: 800; }
.statIcon.green { color: var(--green); }
.statIcon.gold { color: var(--gold); }
.barTrack {
  flex: 1; height: 4.5px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16); overflow: hidden;
}
.barTrack i { display: block; height: 100%; border-radius: 999px; transition: width 0.12s linear; }
.barGreen { background: var(--green); box-shadow: 0 0 8px rgba(150, 217, 89, 0.55); }
.barGold { background: var(--gold); box-shadow: 0 0 8px rgba(228, 199, 132, 0.5); }
.statRow b { font-family: ui-monospace, monospace; font-size: 10.5px; color: rgba(255, 255, 255, 0.85); width: 24px; }
.odometer {
  margin-top: 4px; display: flex; align-items: baseline; gap: 6px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.65);
}
.odometer strong { font-family: ui-monospace, monospace; font-size: 14px; color: #fff; }
.odometer span { font-size: 9px; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.62); }

/* BOTTOM-CENTER: 3-Skill Strip + Fig. 1 Speedometer & Keycap Bar */
.hudBC {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.centerTopRow { display: flex; align-items: flex-end; gap: 10px; }
.skillRowMinimal { display: flex; gap: 7px; }
.skillBtn {
  position: relative; width: 58px; height: 58px; border-radius: 12px; overflow: hidden; padding: 0;
  border: 1.5px solid color-mix(in srgb, var(--skill-color) 65%, rgba(232, 201, 126, 0.45));
  background: rgba(12, 16, 24, 0.86); backdrop-filter: blur(12px);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.44), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.14s, border-color 0.14s, box-shadow 0.14s;
}
.skillArt {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  pointer-events: none; transition: transform 0.2s ease, filter 0.2s ease;
}
.skillBtn:hover { transform: translateY(-2px); border-color: var(--skill-color); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.56), 0 0 14px color-mix(in srgb, var(--skill-color) 42%, transparent); }
.skillBtn:hover .skillArt { transform: scale(1.06); }
.skillBtn.active { border-color: var(--skill-color); box-shadow: 0 0 18px color-mix(in srgb, var(--skill-color) 72%, transparent); }
.skillBtn.cooling .skillArt { filter: grayscale(0.75) brightness(0.45); }
.skillIcon { display: none; }
.skillName {
  position: relative; z-index: 1; width: 100%; text-align: center; padding: 2px 0;
  background: linear-gradient(0deg, rgba(8, 11, 18, 0.92) 30%, transparent 100%);
  font-size: 9.5px; font-weight: 700; color: #f6f1e4; letter-spacing: 0.06em;
}
.skillKey {
  position: absolute; top: 3px; left: 4px; z-index: 2;
  padding: 0 4px; border-radius: 4px; background: rgba(10, 14, 22, 0.78);
  border: 1px solid rgba(232, 201, 126, 0.35);
  font-family: ui-monospace, monospace; font-size: 9.5px; font-weight: 700; color: #f5e6bf;
}
.skillCd {
  position: absolute; inset: 0; z-index: 3; border-radius: 10px;
  background: rgba(10, 13, 20, 0.76); backdrop-filter: blur(2px);
  display: grid; place-items: center;
  font-family: ui-monospace, monospace; font-size: 16px; font-weight: 800; color: #fff;
}

.speedBox {
  min-width: 92px; padding: 6px 14px 7px; border-radius: 10px; text-align: center;
  background: var(--glass); backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.speedBox small { display: block; font-size: 8.5px; letter-spacing: 0.14em; color: var(--muted); }
.speedBox b { font-family: ui-monospace, monospace; font-size: 22px; font-weight: 700; color: #fff; line-height: 1.1; }
.speedBox span { font-size: 10px; color: var(--muted); margin-left: 3px; }
.speedBox em { font-style: normal; font-size: 10px; color: #7ce2ff; margin-left: 5px; }

.keyStrip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 11px;
  padding: 6px 15px; border-radius: 10px;
  background: var(--glass); backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  font-size: 11px; color: rgba(240, 238, 232, 0.84);
}
.keyStrip kbd {
  display: inline-block; padding: 1px 5px; border-radius: 4px; margin-right: 3px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.20);
  font-family: ui-monospace, monospace; font-size: 10px; color: #fff;
}

/* BOTTOM-RIGHT: Fig. 1 Unified Dark-Glass Clock & Circular Minimap Card */
.hudBRCard {
  position: absolute; right: 16px; bottom: 14px;
  width: 194px; padding: 10px 12px 12px; border-radius: 12px;
  background: var(--glass-deep); backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
  display: flex; flex-direction: column; gap: 8px;
}
.radarHead {
  display: flex; align-items: center; gap: 6px;
  padding-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.radarDot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; }
.radarHead strong { font-size: 12px; font-weight: 600; color: #fff; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radarHead button {
  width: 20px; height: 20px; border-radius: 5px;
  border: 1px solid var(--border-subtle); background: rgba(255, 255, 255, 0.08);
  font-size: 10px; font-weight: 700; color: var(--text);
}
.radarHead button:hover { background: rgba(255, 255, 255, 0.20); }

.radarTimeRow { display: flex; align-items: center; justify-content: space-between; }
.radarTimeRow small { display: block; font-size: 9px; letter-spacing: 0.06em; color: var(--muted); }
.radarTimeRow b { font-family: ui-monospace, monospace; font-size: 22px; font-weight: 700; color: #fff; letter-spacing: 0.04em; line-height: 1.15; }
.compassMini {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border-hi); color: var(--gold);
  font-size: 10px; font-weight: 700; display: grid; place-items: center;
}
.radarCanvasBtn {
  width: 158px; height: 158px; margin: 0 auto; padding: 0;
  border-radius: 50%; overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: #e7e0d2;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.radarCanvasBtn canvas { width: 100%; height: 100%; display: block; border-radius: 50%; }

/* DIALOG BAR */
.dialogBar {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: min(760px, calc(100% - 32px)); pointer-events: auto; z-index: 32;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  padding: 18px 22px; border-radius: 14px;
  background: rgba(16, 19, 26, 0.90); backdrop-filter: blur(14px);
  border: 1px solid var(--border-hi);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}
.dialogMain { flex: 1; min-width: 0; }
.dialogHead {
  display: flex; align-items: baseline; gap: 10px;
  padding-bottom: 7px; margin-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.dialogHead strong { font-family: var(--serif); font-size: 18px; color: var(--gold); }
.dialogHead small { font-size: 12px; color: var(--muted); }
.dialogMain p { margin: 0; font-size: 14.5px; line-height: 1.62; color: #fff; }
.dialogChoices { display: flex; flex-direction: column; gap: 7px; min-width: 180px; }
.dialogChoice {
  text-align: left; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--border-hi); background: rgba(255, 255, 255, 0.08);
  color: #fff; font-size: 13px; font-weight: 600;
}
.dialogChoice:hover { background: #f4f2eb; color: #181b22; }

/* RED SCREEN WARNING */
.redAlert {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: rgba(92, 10, 14, 0.48); backdrop-filter: blur(3px);
}
.redVignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 60, 50, 0.08) 0 2px, transparent 2px 6px),
    radial-gradient(circle at 50% 50%, rgba(220, 28, 28, 0.08) 28%, rgba(215, 18, 24, 0.84) 100%);
  animation: redFlash 0.55s ease-in-out infinite alternate;
}
@keyframes redFlash { from { opacity: 0.72; } to { opacity: 1; } }
.redCard {
  position: relative; z-index: 2; width: min(490px, calc(100% - 36px));
  padding: 26px 28px; text-align: center; border-radius: 14px;
  background: linear-gradient(160deg, rgba(52, 12, 16, 0.94), rgba(22, 10, 14, 0.96));
  border: 1.5px solid #ff5c52;
  box-shadow: 0 20px 60px rgba(180, 12, 18, 0.65);
}
.redStamp {
  display: inline-block; padding: 3px 13px; border-radius: 6px;
  background: #e6362e; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; margin-bottom: 10px;
}
.redCard h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 22px; color: #fff; }
.redCard p { margin: 0 0 12px; font-size: 15px; line-height: 1.55; color: #ffd4cc; }
.redHint { padding: 9px 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); font-size: 12px; color: #f4d8b5; margin-bottom: 16px; }
.redHint kbd { padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); color: #fff; font-weight: 700; }
.redRetryBtn {
  border: 0; background: #e6362e; color: #fff;
  padding: 10px 26px; border-radius: 8px; font-size: 14px; font-weight: 700;
}
.redRetryBtn:hover { filter: brightness(1.12); }

/* MODALS */
.paperDialog {
  width: min(720px, calc(100vw - 28px)); max-height: min(86vh, 700px);
  padding: 0; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--paper); color: var(--ink);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.58); overflow: auto;
}
.paperDialog::backdrop { background: rgba(12, 15, 22, 0.64); backdrop-filter: blur(4px); }
.panelHead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; background: #1e232e; color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.panelHead h2 { margin: 0; font-size: 18px; font-weight: 700; }
.panelHead small { color: var(--gold); font-size: 12px; }
.dismiss {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.08);
  color: #fff; font-size: 18px;
}
.dismiss:hover { background: #fff; color: #181b22; }

.journalTabs { display: flex; gap: 6px; padding: 10px 18px; background: #e8e5dc; border-bottom: 1px solid #d5d0c4; }
.journalTabs button { border: 1px solid #c9c3b5; background: #fff; color: var(--ink); padding: 6px 14px; border-radius: 7px; font-weight: 600; font-size: 12.5px; }
.journalTabs button[aria-pressed="true"] { background: #1e232e; color: #fff; border-color: #1e232e; }
.questList { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 9px; }
.questList article { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 10px; background: #fff; border: 1px solid #dfdbd0; }
.questList h3 { margin: 0 0 2px; font-size: 14.5px; }
.questList p { margin: 0; font-size: 12.5px; color: #5c6370; }
.questList article > div { flex: 1; }
.questList article button { border: 0; background: #1e232e; color: #fff; padding: 6px 13px; border-radius: 7px; font-size: 12px; font-weight: 600; }
.seal { width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; border: 2px dashed #bbb6a8; color: #9a9588; background: #f2efe7; }
.seal.earned { border-style: solid; border-color: #c95042; color: #fff; background: #c95042; }
#plateGallery { display: flex; gap: 10px; flex-wrap: wrap; }
#plateGallery figure { margin: 0; width: 170px; background: #fff; padding: 6px; border-radius: 8px; border: 1px solid #dcd8cd; }
#plateGallery img { width: 100%; border-radius: 4px; display: block; }
#plateGallery figcaption { font-size: 11px; text-align: center; margin-top: 4px; color: #5c6370; }

#albumList { padding: 16px 18px 18px; }
.albumTools { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.albumTools button { border: 0; background: #1e232e; color: #fff; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 12.5px; }
#albumPhoto { margin: 0 0 10px; background: #fff; padding: 8px; border-radius: 8px; border: 1px solid #dcd8cd; }
#albumPhoto img { width: 100%; border-radius: 5px; display: block; }
#albumPhoto figcaption { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; }
#albumRemove { border: 1px solid #c96159; background: transparent; color: #b53a32; padding: 4px 10px; border-radius: 6px; font-size: 12px; }
#albumStrip { display: flex; gap: 7px; flex-wrap: wrap; }
#albumStrip button { padding: 2px; border: 2px solid transparent; border-radius: 6px; background: transparent; }
#albumStrip button[aria-pressed="true"] { border-color: #1e232e; }
#albumStrip img { width: 82px; height: 52px; object-fit: cover; border-radius: 4px; display: block; }

.sandboxReturnBtn {
  background: linear-gradient(135deg, rgba(92, 224, 208, 0.28), rgba(40, 128, 122, 0.38)) !important;
  border: 1px solid rgba(92, 224, 208, 0.65) !important;
  color: #e4fffb !important; font-weight: 700 !important;
}
.selfSandboxPin {
  position: absolute; transform: translate(-50%, -100%); pointer-events: none; z-index: 6;
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px;
  border-radius: 999px; background: rgba(10, 22, 30, 0.88);
  border: 1.5px solid #5ce0d0; color: #e9fffb; font-size: 12px; font-weight: 700;
  box-shadow: 0 0 0 4px rgba(92, 224, 208, 0.24), 0 8px 22px rgba(0, 0, 0, 0.55);
  animation: selfPulse 1.5s ease-in-out infinite;
  white-space: nowrap;
}
.selfSandboxPin i {
  width: 9px; height: 9px; border-radius: 50%; background: #5ce0d0;
  box-shadow: 0 0 10px #5ce0d0;
}
@keyframes selfPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(92, 224, 208, 0.28), 0 8px 22px rgba(0, 0, 0, 0.55); }
  50% { box-shadow: 0 0 0 10px rgba(92, 224, 208, 0.06), 0 8px 24px rgba(92, 224, 208, 0.32); }
}
.peerSandboxPin {
  position: absolute; transform: translate(-50%, -100%); pointer-events: none; z-index: 5;
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 999px; background: rgba(18, 22, 32, 0.82);
  border: 1px solid rgba(232, 201, 126, 0.55); color: #f6ebd0; font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.peerSandboxPin i { width: 6px; height: 6px; border-radius: 50%; background: #e8c97e; }

.swordModal {
  width: min(590px, calc(100vw - 28px));
  background: linear-gradient(170deg, rgba(14, 21, 30, 0.96), rgba(9, 13, 20, 0.98)) !important;
  color: #f4efe2 !important;
  border: 1px solid rgba(92, 224, 208, 0.36) !important;
}
.swordHead {
  background: linear-gradient(135deg, #10242d, #162231) !important;
  border-bottom: 1px solid rgba(232, 201, 126, 0.25) !important;
}
.swordHead small { display: block; font-size: 10px; letter-spacing: 0.22em; color: #5ce0d0; }
.swordHero { position: relative; width: 100%; aspect-ratio: 2.25; overflow: hidden; border-bottom: 1px solid rgba(232, 201, 126, 0.22); }
.swordHero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.swordHeroOverlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-end; padding: 14px 18px;
  background: linear-gradient(180deg, transparent 40%, rgba(9, 13, 20, 0.82) 100%);
}
.swordLaunchBtn {
  border: 1px solid rgba(247, 230, 183, 0.6); border-radius: 999px;
  background: linear-gradient(135deg, #5ce0d0 0%, #2a9d98 100%);
  color: #091318; padding: 9px 20px; font-size: 13.5px; font-weight: 800; letter-spacing: 0.06em;
  box-shadow: 0 8px 24px rgba(92, 224, 208, 0.34);
}
.swordLaunchBtn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.swordBody { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.swordModal #codeForm, .swordModal p, .swordModal #collection { padding: 0 !important; margin: 0; }
.swordModal #codeForm label { color: rgba(240, 234, 218, 0.84) !important; }
.swordModal .codeLine input {
  background: rgba(8, 12, 19, 0.85) !important; color: #fff8e6 !important;
  border-color: rgba(92, 224, 208, 0.32) !important;
}
.swordModal .codeLine button {
  background: linear-gradient(135deg, #e8c97e, #c5983e) !important; color: #161a24 !important; font-weight: 700;
}
.swordModal code, .swordModal kbd {
  background: rgba(92, 224, 208, 0.16) !important; color: #8ff5e8 !important;
  border: 1px solid rgba(92, 224, 208, 0.3); padding: 1px 6px; border-radius: 4px;
}
.swordKeys {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 9px 12px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11.5px; color: rgba(236, 232, 222, 0.85);
}
.swordModal #codeFeedback { font-size: 12px; color: rgba(232, 201, 126, 0.88); line-height: 1.5; }

#garageDialog form, #garageDialog p, #collection { padding: 0 18px; }
#garageDialog form { padding-top: 15px; }
#garageDialog label { display: block; font-size: 13px; line-height: 1.5; margin-bottom: 9px; color: #363c48; }
.codeLine { display: flex; gap: 8px; }
.codeLine input { flex: 1; padding: 9px 12px; border-radius: 8px; border: 1.5px solid #c9c3b5; background: #fff; color: var(--ink); font-size: 14px; text-transform: uppercase; }
.codeLine button { border: 0; background: #1e232e; color: #fff; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; }

#atlas { width: 100%; display: block; background: #e7e0d2; }
#waypointForm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 18px; background: #e8e5dc; border-top: 1px solid #d5d0c4; }
#waypointForm select { padding: 6px 10px; border-radius: 7px; border: 1px solid #c2bcb0; background: #fff; color: var(--ink); }
#waypointForm button { border: 0; background: #1e232e; color: #fff; padding: 7px 13px; border-radius: 7px; font-size: 12px; font-weight: 600; }
#waypointForm button:disabled { opacity: 0.45; cursor: not-allowed; }
.legend { display: flex; gap: 16px; padding: 8px 18px 14px; font-size: 12px; color: #5c6370; }

#instructions p { padding: 0 18px; font-size: 13.5px; line-height: 1.65; color: #363c48; }
#instructions kbd, #garageDialog code { padding: 1px 6px; border-radius: 4px; background: #e4e0d5; color: #1e232e; font-weight: 700; }

/* LENS MODE */
#lensPanel { position: fixed; inset: 0; z-index: 35; pointer-events: none; }
#sourcePic { position: absolute; top: 18px; right: 18px; width: min(360px, 42vw); border-radius: 10px; border: 1.5px solid var(--gold); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); pointer-events: auto; }
.lensCaption { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); pointer-events: auto; display: flex; align-items: center; gap: 9px; padding: 9px 16px; border-radius: 10px; background: var(--glass-deep); backdrop-filter: blur(12px); border: 1px solid var(--border-subtle); }
.lensCaption small { display: block; font-size: 10.5px; color: var(--gold); }
.lensCaption select { background: transparent; color: #fff; border: 0; font-size: 14px; font-weight: 600; }
.lensCaption button { border: 1px solid var(--border-subtle); background: rgba(255, 255, 255, 0.08); padding: 5px 11px; border-radius: 7px; font-size: 12px; }

#shutter { position: fixed; inset: 0; background: #fffaf0; opacity: 0; pointer-events: none; z-index: 70; }
#toast {
  position: fixed; left: 50%; bottom: 118px; transform: translate(-50%, 8px); z-index: 55; pointer-events: none;
  padding: 7px 16px; border-radius: 9px;
  background: rgba(18, 21, 28, 0.88); backdrop-filter: blur(10px);
  border: 1px solid var(--border-hi); color: #fff; font-size: 12.5px; font-weight: 500;
  opacity: 0; transition: opacity 0.18s, transform 0.18s;
  max-width: min(480px, calc(100% - 36px)); text-align: center;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

.touch { display: none; position: absolute; left: 16px; bottom: 84px; width: 144px; height: 144px; pointer-events: auto; }
.touch button { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-hi); background: var(--glass); color: #fff; font-size: 16px; }
.touch button[data-key="KeyW"] { left: 50px; top: 0; }
.touch button[data-key="KeyS"] { left: 50px; bottom: 0; }
.touch button[data-key="KeyA"] { left: 0; top: 50px; }
.touch button[data-key="KeyD"] { right: 0; top: 50px; }
.flightTouch { display: none; }
#game.flying .flightTouch { display: block; }
.touch button[data-key="Space"] { left: 154px; top: 20px; font-size: 12px; }
.touch button[data-key="KeyX"] { left: 154px; top: 76px; font-size: 12px; }
#error { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(16, 19, 26, 0.92); color: #fff; }

@media (pointer: coarse) {
  .touch { display: block; }
  .keyStrip { display: none !important; }
}
@media (max-width: 1060px) {
  .dioramaHead { left: 16px; transform: none; text-align: left; max-width: calc(100% - 240px); }
  .dioramaHead p { display: none; }
  .questCardLight { width: 208px; padding: 8px 10px; }
  .keyStrip { gap: 7px; padding: 5px 10px; font-size: 10px; }
}
@media (max-width: 760px) {
  .hudSideMenu { width: 108px; padding: 5px; }
  .hudBRCard { width: 154px; padding: 8px; }
  .radarCanvasBtn { width: 126px; height: 126px; }
  .questCardLight { width: 186px; }
  .hudBL, .keyStrip { display: none !important; }
  .spawnDock { flex-direction: column; align-items: stretch; }
  .spawnDockRight { align-items: stretch; }
  .dialogBar { flex-direction: column; align-items: stretch; }
}

/* ===================== OPENING TITLE SCREEN (FIG. 1 RECREATION) ===================== */
#titleScreen {
  position: fixed; inset: 0; z-index: 30; pointer-events: none;
  background: linear-gradient(90deg, rgba(14, 18, 26, 0.72) 0%, rgba(14, 18, 26, 0.24) 38%, rgba(14, 18, 26, 0.08) 100%);
}
#titleScreen button, #titleScreen .profileCard, #titleScreen .showcaseBar, #titleScreen .frogColorDock { pointer-events: auto; }

.titleBrand {
  position: absolute; top: 24px; left: 32px;
}
.titleBrand h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 3.8vw, 48px);
  font-weight: 900; font-style: italic; letter-spacing: 0.05em;
  display: inline-block;
  transform: skewX(-6deg);
  background-image:
    var(--text-grain),
    repeating-linear-gradient(-38deg, rgba(255, 255, 255, 0.16) 0 3px, rgba(0, 0, 0, 0.06) 3px 6px),
    linear-gradient(180deg, #fffdf0 0%, #eef7c4 48%, #d7e58d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.72)) drop-shadow(0 0 1px rgba(255, 252, 224, 0.45));
  line-height: 1.04;
}
.titleBrand p {
  margin: 5px 0 0 3px;
  font-size: 13px; font-style: italic; letter-spacing: 0.18em;
  color: rgba(244, 241, 230, 0.86);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.68);
}

.titleTopRight {
  position: absolute; top: 20px; right: 24px;
  display: flex; align-items: center; gap: 12px;
}
.profileCard {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 7px; border-radius: 7px;
  background: rgba(248, 248, 244, 0.94); color: #1c2028;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.30);
}
.profileAvatar {
  width: 34px; height: 34px; border-radius: 6px;
  background: linear-gradient(135deg, #ffe066, #f0b62a); color: #3d2706;
  font-family: var(--serif); font-weight: 900; font-size: 17px;
  display: grid; place-items: center;
  transition: background 0.25s ease, color 0.25s ease;
}
.profileAvatar.color-green {
  background: linear-gradient(135deg, #9ce66f, #5cae42); color: #162910;
}
.profileAvatar.color-rainbow {
  background: linear-gradient(135deg, #ff6b9d, #ffd152, #6ef0a0, #54d6ff, #b57dff);
  background-size: 240% 240%;
  animation: rainbowFlow 2.6s linear infinite;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(45, 16, 68, 0.72);
}
@keyframes rainbowFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.profileCard strong { display: block; font-size: 13px; line-height: 1.2; }
.profileCard small { display: block; font-size: 10.5px; color: #676f7d; font-family: ui-monospace, monospace; }
.langBadge {
  padding: 7px 13px; border-radius: 7px;
  background: rgba(18, 22, 30, 0.72); backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle); font-size: 12px; color: #f3f2ee;
}

.titleMenu {
  position: absolute; left: 32px; bottom: 44px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}
.menuNotice {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: rgba(235, 233, 226, 0.72); margin-bottom: 6px;
}
.menuNotice span { width: 2px; height: 12px; background: #dfe8b0; display: inline-block; }

.menuHero {
  border: 0; background-color: transparent; padding: 3px 8px 3px 0;
  font-family: var(--display);
  font-size: clamp(29px, 3.4vw, 42px); font-weight: 900; font-style: italic; letter-spacing: 0.05em;
  transform: skewX(-7deg);
  background-image:
    var(--text-grain),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.18) 0 2px, rgba(20, 24, 32, 0.08) 2px 5px),
    linear-gradient(180deg, #ffffff 0%, #f5f2e6 56%, #d9d6ca 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.72));
  transition: transform 0.16s, filter 0.16s;
}
.menuHero:hover:not(:disabled) {
  transform: skewX(-7deg) translateX(9px);
  background-image:
    var(--text-grain),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.22) 0 2px, rgba(20, 24, 32, 0.06) 2px 5px),
    linear-gradient(180deg, #fffef2 0%, #eef7bf 54%, #c9e17b 100%);
  filter: drop-shadow(0 4px 16px rgba(232, 246, 165, 0.45)) drop-shadow(0 3px 10px rgba(0, 0, 0, 0.7));
}
.menuHero.disabled {
  background-image:
    var(--text-grain),
    linear-gradient(180deg, rgba(205, 210, 220, 0.56) 0%, rgba(155, 160, 172, 0.44) 100%);
  cursor: not-allowed;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.menuDisabledRow { display: flex; align-items: center; gap: 18px; }
.comingNote {
  font-size: 12px; font-style: italic; color: rgba(242, 238, 224, 0.80);
  padding: 3px 10px; border-radius: 6px;
  background: rgba(16, 20, 28, 0.54); border: 1px solid rgba(255, 255, 255, 0.14);
}

.menuSubLinks {
  margin-top: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
}
.authorArt {
  position: relative;
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 5px 14px 6px 10px;
  border-left: 2.5px solid #f0d182;
  background: linear-gradient(90deg, rgba(24, 28, 38, 0.64), rgba(24, 28, 38, 0.12));
  border-radius: 0 10px 10px 0;
  backdrop-filter: blur(6px);
}
.authorLabel {
  font-family: var(--serif); font-size: 13px; font-style: italic; font-weight: 700;
  letter-spacing: 0.12em; color: rgba(245, 236, 206, 0.88);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.authorName {
  font-family: var(--art-script);
  font-size: clamp(24px, 2.5vw, 31px);
  font-weight: 700; font-style: italic; letter-spacing: 0.04em;
  line-height: 1.05;
  padding-right: 4px;
  background-image:
    var(--text-grain),
    linear-gradient(105deg, #fff6c9 0%, #ffd57e 28%, #ff9ea8 54%, #a6e3ff 80%, #eef7bf 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 210, 118, 0.42)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.75));
}
.verMetaRow {
  margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.verPill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px !important; border-radius: 999px;
  background: rgba(24, 28, 36, 0.72) !important;
  border: 1px solid rgba(235, 244, 190, 0.55) !important;
  color: #eef7bf !important; font-size: 12px !important; font-weight: 600;
}
.verPill i { width: 6px; height: 6px; border-radius: 50%; background: #a8e66c; display: inline-block; }
.visitStatsPill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px !important; border-radius: 999px;
  background: rgba(24, 28, 36, 0.76) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(244, 209, 130, 0.52) !important;
  color: #f6ead0 !important; font-size: 12px !important; font-weight: 600;
  cursor: pointer; transition: transform 0.16s ease, border-color 0.2s ease, background 0.2s ease;
}
.visitStatsPill:hover {
  background: rgba(34, 40, 52, 0.88) !important;
  border-color: rgba(255, 224, 138, 0.88) !important;
  transform: translateY(-1px);
}
.visitStatsPill .vsDot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #ffd45e; box-shadow: 0 0 8px rgba(255, 212, 94, 0.85);
}
.visitStatsPill b {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #ffe38f; font-weight: 800; font-size: 12.5px;
}
.visitStatsPill .vsSep { opacity: 0.55; }

.frogColorDock {
  position: absolute; right: 26px; bottom: 108px;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 13px; border-radius: 10px;
  background: rgba(22, 25, 32, 0.80); backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
}
.colorDockLabel {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em;
  color: #ebd9a6; white-space: nowrap;
}
.colorSwatches { display: flex; align-items: center; gap: 6px; }
.colorChip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08); color: #eceae2;
  font-size: 12px; font-weight: 700; cursor: pointer;
  transition: transform 0.15s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.colorChip:hover { background: rgba(255, 255, 255, 0.18); transform: translateY(-1px); }
.colorChip.active {
  background: rgba(255, 248, 224, 0.94); color: #1d2028;
  border-color: #ffe388;
  box-shadow: 0 0 14px rgba(255, 218, 102, 0.45);
}
.colorChip .sw {
  width: 13px; height: 13px; border-radius: 50%; display: inline-block;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
}
.colorChip .sw-yellow { background: linear-gradient(135deg, #ffe375, #f5b92a); }
.colorChip .sw-green { background: linear-gradient(135deg, #a8eb76, #5eb842); }
.colorChip .sw-rainbow {
  background: conic-gradient(#ff6b9d, #ffd152, #6ef0a0, #54d6ff, #b57dff, #ff6b9d);
}

.showcaseBar {
  position: absolute; right: 26px; bottom: 28px;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; border-radius: 10px;
  background: rgba(22, 25, 32, 0.78); backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.40);
}
.showcaseBar button {
  border: 0; background: rgba(255, 255, 255, 0.08); color: #fff;
  width: 26px; height: 26px; border-radius: 6px; font-size: 16px;
}
.showcaseBar button:hover { background: rgba(255, 255, 255, 0.22); }
.showcaseInfo { text-align: center; min-width: 170px; }
.showcaseInfo small { display: block; font-size: 10px; color: var(--muted); }
.showcaseInfo strong { display: block; font-size: 14px; color: #fff; margin: 1px 0; }
.showcaseInfo em { display: block; font-size: 9.5px; font-style: italic; letter-spacing: 0.10em; color: var(--gold); }

/* ===================== 3D OVERHEAD LOCKED HANCHENG TEASER ===================== */
.lockedRegionPin {
  position: absolute; transform: translate(-50%, -50%); pointer-events: none;
  padding: 9px 15px; border-radius: 12px; text-align: center;
  background: rgba(18, 22, 30, 0.80); backdrop-filter: blur(10px);
  border: 1.5px dashed rgba(228, 199, 132, 0.65);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
  white-space: nowrap;
}
.lockBadge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: rgba(228, 199, 132, 0.20); color: var(--gold);
  font-size: 10.5px; font-weight: 700; margin-bottom: 3px;
}
.lockedRegionPin strong { display: block; font-size: 13.5px; color: #fff; }
.lockedRegionPin small { display: block; font-size: 10.5px; color: var(--muted); }

/* Prompt color accents */
.redPill { border-color: rgba(236, 78, 68, 0.82); }
.redPill kbd { background: #ec4e44; color: #fff; }
.goldPill { border-color: rgba(228, 199, 132, 0.82); }
.goldPill kbd { background: var(--gold); color: #1b1f27; }

/* ===================== CONVENIENCE STORE SNACK MENU & BROKE VFX ===================== */
.storeModal { width: min(860px, calc(100vw - 28px)); }
.storeHead { background: linear-gradient(135deg, #b82522, #7a1818); border-bottom: 2px solid #f7ca65; gap: 12px; }
.walletPill {
  margin-left: auto; margin-right: 10px;
  padding: 5px 12px; border-radius: 8px;
  background: rgba(0, 0, 0, 0.34); border: 1px solid rgba(255, 220, 140, 0.55);
  display: flex; align-items: baseline; gap: 7px; font-size: 12px;
}
.walletPill b { font-family: ui-monospace, monospace; font-size: 16px; color: #ffdf73; }
.storeBody { display: grid; grid-template-columns: 1.05fr 1fr; gap: 16px; padding: 16px 18px 20px; align-items: start; }
.storePosterWrap { position: relative; border-radius: 12px; overflow: hidden; border: 2px solid #e5b77b; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16); }
.storePoster { width: 100%; display: block; }
.brokeStamp {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg);
  padding: 8px 16px; border-radius: 10px; max-width: 90%; text-align: center;
  background: rgba(196, 26, 26, 0.94); color: #fff7df;
  border: 3px solid #ffe184; font-size: 16px; font-weight: 900; letter-spacing: 0.06em;
  box-shadow: 0 12px 32px rgba(180, 16, 16, 0.6);
  pointer-events: none;
  animation: stampPop 0.28s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes stampPop { from { transform: translate(-50%, -50%) scale(2.1) rotate(-22deg); opacity: 0; } to { transform: translate(-50%, -50%) scale(1) rotate(-12deg); opacity: 1; } }
.storeModal.shaking { animation: modalShake 0.42s ease; }
@keyframes modalShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px) rotate(-0.6deg); }
  40% { transform: translateX(10px) rotate(0.6deg); }
  60% { transform: translateX(-7px); }
  80% { transform: translateX(6px); }
}
.clerkBubble {
  padding: 10px 13px; border-radius: 10px; margin-bottom: 12px;
  background: #fff6e6; border: 1px solid #e8cca0; color: #5b3a1b;
  font-size: 13px; line-height: 1.5; font-weight: 600;
}
.snackGrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.snackItem {
  padding: 9px 11px; border-radius: 10px; text-align: left;
  background: #fff; border: 1px solid #e0dad0;
  display: flex; flex-direction: column; gap: 3px;
  transition: transform 0.12s, border-color 0.12s;
}
.snackItem:hover { transform: translateY(-2px); border-color: #d93b34; }
.snackItem strong { font-size: 13px; color: #20242d; }
.snackItem small { font-size: 10.5px; color: #7a818f; }
.snackPriceRow { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.snackPriceRow b { color: #c92e28; font-family: ui-monospace, monospace; font-size: 14px; }
.snackPriceRow span { padding: 2px 9px; border-radius: 999px; background: #20242d; color: #ffe38e; font-size: 11px; font-weight: 600; }

#brokeFxLayer { position: fixed; inset: 0; pointer-events: none; z-index: 99; overflow: hidden; }
.brokeParticle {
  position: fixed; font-weight: 900; pointer-events: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  animation: brokeFly 1.35s cubic-bezier(0.18, 0.85, 0.35, 1) forwards;
}
@keyframes brokeFly {
  0%   { opacity: 1; transform: translate(0, 0) scale(0.7) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(1.25) rotate(var(--rot)); }
}

/* ===================== SETTINGS MODAL ===================== */
.settingsBody { padding: 16px 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.setRow {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 14px; border-radius: 10px; background: #fff; border: 1px solid #dfdbd0;
  font-size: 13.5px; font-weight: 600; color: #20242d;
}
.setRow select { padding: 6px 10px; border-radius: 7px; border: 1px solid #c5bfb2; background: #faf8f2; color: #20242d; }
.setRow input[type="checkbox"] { width: 18px; height: 18px; accent-color: #1e232e; }
.setRow input[type="range"] { width: 170px; accent-color: #1e232e; }

/* ===================== HD ILLUSTRATED M-KEY INTERACTIVE ATLAS ===================== */
.atlasHdDialog { width: min(940px, calc(100vw - 24px)); }
.hdMapStage { position: relative; width: 100%; background: #1e222a; overflow: hidden; }
.hdMapImg { width: 100%; display: block; }
.hdMapOverlay { position: absolute; inset: 0; }
.hdMapPin {
  position: absolute; transform: translate(-50%, -50%);
  padding: 3px 9px; border-radius: 999px;
  background: rgba(20, 24, 34, 0.84); border: 1.5px solid #e6cb88;
  color: #fff8ea; font-size: 11.5px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  transition: transform 0.14s, background 0.14s; white-space: nowrap;
}
.hdMapPin:hover, .hdMapPin.selected {
  transform: translate(-50%, -50%) scale(1.12);
  background: #e6cb88; color: #1a1e28;
}
.hdMapPin[data-place="skywalk"] {
  transform: translate(0, 0);
}
.hdPlayerDot {
  position: absolute; width: 16px; height: 16px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #44b4ff; border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(68, 180, 255, 0.35), 0 2px 10px rgba(0, 0, 0, 0.5);
  pointer-events: none; z-index: 4;
}
.hdLockedZone {
  position: absolute; right: 3.5%; top: 21%;
  padding: 8px 13px; border-radius: 10px; text-align: center;
  background: rgba(20, 24, 34, 0.82); backdrop-filter: blur(8px);
  border: 1.5px dashed #e6cb88; color: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
}
.hdLockedZone span { display: block; font-size: 12.5px; font-weight: 800; color: #f4d68c; }
.hdLockedZone small { display: block; font-size: 10px; color: rgba(242, 238, 228, 0.82); margin-top: 2px; }

@media (max-width: 760px) {
  .storeBody { grid-template-columns: 1fr; }
  .menuDisabledRow { flex-direction: column; align-items: flex-start; gap: 4px; }
  .frogColorDock { right: 14px; bottom: 18px; padding: 6px 10px; gap: 7px; }
  .showcaseBar { display: none; }
}

/* ===================== PUBG-STYLE MOBILE TOUCH HUD & TRUE AUTO-LANDSCAPE ===================== */
/* Exact pixel-locked 90-degree auto-landscape stage (dimensions & transform set by JS syncForceLandscape
   from window.innerWidth/innerHeight so WeChat/iOS/Android bars NEVER cause clipping or drift!) */
#game.mobile-mode.force-landscape {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  transform-origin: 0 0 !important;
}
/* Rotate top-layer native <dialog> modals cleanly centered inside forced CSS 90deg landscape! */
body.force-landscape-body dialog[open] {
  position: fixed !important;
  inset: auto !important;
  margin: 0 !important;
  top: 50% !important;
  left: 50% !important;
  width: min(700px, calc(var(--rot-w, 720px) - 24px)) !important;
  max-width: calc(var(--rot-w, 720px) - 24px) !important;
  max-height: calc(var(--rot-h, 360px) - 18px) !important;
  transform: translate(-50%, -50%) rotate(90deg) !important;
  transform-origin: center center !important;
  overflow-y: auto !important;
}
/* Keep dialog close header always sticky & reachable on mobile screens */
body.mobile-mode-body .panelHead {
  position: sticky; top: 0; z-index: 8;
}
body.mobile-mode-body .atlasHdDialog .hdMapStage {
  width: min(100%, 370px); margin: auto;
}
body.mobile-mode-body .atlasHdDialog .hdMapImg {
  width: 100%; height: auto;
}
body.mobile-mode-body #waypointForm {
  padding: 6px 10px; gap: 6px; font-size: 11px;
}
body.mobile-mode-body #waypointForm select,
body.mobile-mode-body #waypointForm button {
  padding: 4px 8px; font-size: 11px;
}
body.mobile-mode-body .hdMapPin {
  padding: 2px 6px; font-size: 9px;
}
body.mobile-mode-body .hdLockedZone {
  padding: 4px 8px;
}
body.mobile-mode-body .hdLockedZone span { font-size: 9.5px; }
body.mobile-mode-body .hdLockedZone small { font-size: 8px; }

#game.mobile-mode .hudSideMenu,
#game.mobile-mode .keyStrip,
#game.mobile-mode #skillBar,
#game.mobile-mode .touch,
#game.mobile-mode .hudMR,
#game.mobile-mode .hudBL,
#game.mobile-mode #locationSub {
  display: none !important;
}

/* Compact Mobile-Landscape Title Screen (tuned for 360px-430px phone landscape height) */
#game.mobile-mode .titleBrand { top: 10px; left: 16px; }
#game.mobile-mode .titleBrand h1 { font-size: clamp(19px, 2.9vw, 26px); }
#game.mobile-mode .titleBrand p { font-size: 10px; margin-top: 2px; letter-spacing: 0.12em; }
#game.mobile-mode .titleTopRight { top: 10px; right: 14px; gap: 7px; }
#game.mobile-mode .profileCard { padding: 3px 10px 3px 4px; gap: 6px; border-radius: 6px; }
#game.mobile-mode .profileAvatar { width: 22px; height: 22px; font-size: 12px; }
#game.mobile-mode .profileCard strong { font-size: 10.5px; }
#game.mobile-mode .profileCard small { font-size: 8.5px; }
#game.mobile-mode .langBadge { padding: 4px 8px; font-size: 10px; }
#game.mobile-mode .titleMenu { left: 16px; bottom: 12px; gap: 1px; }
#game.mobile-mode .menuNotice { font-size: 9.5px; margin-bottom: 2px; }
#game.mobile-mode .menuNotice span { height: 9px; }
#game.mobile-mode .menuHero { font-size: clamp(18px, 2.7vw, 24px); padding: 1px 6px 1px 0; }
#game.mobile-mode .menuDisabledRow { flex-direction: row; align-items: center; gap: 8px; }
#game.mobile-mode .comingNote { font-size: 9px; padding: 2px 7px; }
#game.mobile-mode .menuSubLinks { margin-top: 6px; gap: 4px; }
#game.mobile-mode .authorArt { padding: 2px 10px 3px 7px; }
#game.mobile-mode .authorLabel { font-size: 10px; }
#game.mobile-mode .authorName { font-size: 17px; }
#game.mobile-mode .verMetaRow { margin-top: 1px; gap: 5px; }
#game.mobile-mode .verPill { padding: 3px 10px !important; font-size: 9.5px !important; }
#game.mobile-mode .visitStatsPill { padding: 3px 9px !important; font-size: 9.5px !important; gap: 4px; }
#game.mobile-mode .visitStatsPill b { font-size: 10px; }
#game.mobile-mode .frogColorDock {
  right: 14px; bottom: 64px; padding: 4px 8px; gap: 6px; border-radius: 8px;
}
#game.mobile-mode .colorDockLabel { font-size: 9.5px; }
#game.mobile-mode .colorSwatches { gap: 4px; }
#game.mobile-mode .colorChip { padding: 3px 7px; font-size: 10px; gap: 4px; }
#game.mobile-mode .colorChip .sw { width: 10px; height: 10px; }
#game.mobile-mode .showcaseBar {
  display: flex !important; right: 14px; bottom: 12px; padding: 5px 9px; gap: 8px;
}
#game.mobile-mode .showcaseBar button { width: 20px; height: 20px; font-size: 12px; }
#game.mobile-mode .showcaseInfo { min-width: 112px; }
#game.mobile-mode .showcaseInfo small { font-size: 8px; }
#game.mobile-mode .showcaseInfo strong { font-size: 10.5px; }
#game.mobile-mode .showcaseInfo em { font-size: 7.5px; }

/* Compact Mobile-Landscape 3D Overhead Spawn Map (uses % widths so it NEVER breaks in forced 90deg landscape!) */
#game.mobile-mode .dioramaHead {
  top: 8px; left: 12px; transform: none; text-align: left;
  max-width: 46%; padding: 5px 12px 6px; border-radius: 9px;
}
#game.mobile-mode .crest { font-size: 8.5px; gap: 5px; }
#game.mobile-mode .dioramaHead h1 { font-size: 14px; margin: 1px 0 0; }
#game.mobile-mode .dioramaHead p { display: none; }
#game.mobile-mode .dioramaTools { top: 8px; right: 10px; gap: 4px; }
#game.mobile-mode .zoomGroup, #game.mobile-mode .dioramaTime { padding: 2px; gap: 2px; border-radius: 7px; }
#game.mobile-mode .zoomGroup button, #game.mobile-mode .dioramaTime button { padding: 3px 7px; font-size: 10px; }
#game.mobile-mode .spawnPin { padding: 3px 8px 3px 6px; gap: 5px; }
#game.mobile-mode .pinDia { width: 6px; height: 6px; }
#game.mobile-mode .pinBody strong { font-size: 10.5px; }
#game.mobile-mode .pinBody small { font-size: 8.5px; }
#game.mobile-mode .lockedRegionPin { padding: 5px 10px; }
#game.mobile-mode .lockBadge { font-size: 8.5px; padding: 1px 6px; }
#game.mobile-mode .lockedRegionPin strong { font-size: 10.5px; }
#game.mobile-mode .lockedRegionPin small { font-size: 8.5px; }
#game.mobile-mode .spawnDock {
  left: 10px; right: 10px; bottom: 8px; transform: none;
  width: auto !important; max-width: none !important;
  padding: 6px 10px; gap: 8px; border-radius: 10px;
  display: flex; flex-direction: row !important; align-items: center !important; justify-content: space-between;
}
#game.mobile-mode .spawnMeta {
  flex: 0 1 auto; min-width: 0; max-width: 30%;
  display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden;
}
#game.mobile-mode .spawnTag { font-size: 9px; padding: 1px 5px; margin: 0; flex: 0 0 auto; }
#game.mobile-mode .spawnMeta strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
#game.mobile-mode .spawnMeta p { display: none !important; }
#game.mobile-mode .spawnDockRight {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: row !important; align-items: center !important; justify-content: flex-end; gap: 6px;
}
#game.mobile-mode .spawnChips {
  display: flex; flex-wrap: nowrap !important; overflow-x: auto; gap: 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
#game.mobile-mode .spawnChips::-webkit-scrollbar { display: none; }
#game.mobile-mode .spawnChip { padding: 3px 7px; font-size: 9.5px; border-radius: 5px; white-space: nowrap; flex: 0 0 auto; }
#game.mobile-mode .goldBtn { padding: 5px 11px; font-size: 10.5px; border-radius: 7px; white-space: nowrap; flex: 0 0 auto; }

/* Compact Mobile-Landscape In-Game PUBG Tactical HUD */
#game.mobile-mode .eyeBtn { top: 8px; right: 8px; width: 26px; height: 26px; }
#game.mobile-mode .eyeBtn svg { width: 13px; height: 13px; }

#game.mobile-mode .hudTL { top: 6px; left: 10px; gap: 3px; }
#game.mobile-mode .fpsLine { font-size: 9px; gap: 5px; }
#game.mobile-mode .questCardLight {
  width: 162px; padding: 4px 8px; gap: 6px; border-radius: 7px;
}
#game.mobile-mode .qcIcon { width: 20px; height: 20px; font-size: 10px; border-radius: 5px; }
#game.mobile-mode .qcRow strong { font-size: 10px; }
#game.mobile-mode .qcBadge { font-size: 8.5px; padding: 0 4px; }
#game.mobile-mode .qcBody small { font-size: 8.5px; margin-top: 1px; line-height: 1.2; }

/* Single compact horizontal Top-Center bar (Location + Live Clock + Weather) */
#game.mobile-mode .hudTC { top: 6px; gap: 4px; }
#game.mobile-mode .locPillTop {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(16, 20, 28, 0.64); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
#game.mobile-mode .locPillMain {
  padding: 0; border: 0; background: transparent; backdrop-filter: none; gap: 5px;
}
#game.mobile-mode .tinyDia { width: 4.5px; height: 4.5px; }
#game.mobile-mode .locPillMain strong { font-size: 10.5px; letter-spacing: 0.04em; }
#game.mobile-mode .topClockBar {
  margin-top: 0; padding: 0 0 0 6px; border: 0; border-left: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0; background: transparent; backdrop-filter: none; box-shadow: none;
  font-size: 9.5px; gap: 4px;
}
#game.mobile-mode .topClockBar b { font-size: 10.5px; }
#game.mobile-mode .navMini { padding: 2px 9px; font-size: 9.5px; gap: 5px; }
#game.mobile-mode .areaBanner strong { font-size: 14px; }
#game.mobile-mode .areaBanner small { font-size: 8px; }
#game.mobile-mode .stealthAlert { width: min(290px, 60%); padding: 6px 10px; }
#game.mobile-mode .alertHeader strong { font-size: 10.5px; }
#game.mobile-mode .alertHeader b { font-size: 12px; }
#game.mobile-mode .stealthAlert small { font-size: 9px; }

/* Compact Top-Right Circular PUBG Minimap */
#game.mobile-mode .hudBRCard {
  top: 8px; right: 40px; bottom: auto; width: 88px; padding: 4px; border-radius: 10px;
}
#game.mobile-mode .radarHead { margin-bottom: 3px; gap: 3px; }
#game.mobile-mode .radarHead strong { font-size: 8.5px; }
#game.mobile-mode .radarHead button { padding: 0 4px; font-size: 8.5px; }
#game.mobile-mode .radarTimeRow { display: none; }
#game.mobile-mode .radarCanvasBtn { width: 78px; height: 78px; }

#game.mobile-mode .hudBC { bottom: 8px; gap: 0; }
#game.mobile-mode .speedBox { min-width: 58px; padding: 2px 8px 3px; border-radius: 7px; }
#game.mobile-mode .speedBox small { font-size: 7.5px; }
#game.mobile-mode .speedBox b { font-size: 14px; }
#game.mobile-mode .speedBox span { font-size: 8.5px; }
#game.mobile-mode #toast { bottom: 48px; font-size: 11px; padding: 5px 12px; }

/* Compact Dialogs for Mobile-Landscape height */
#game.mobile-mode .paperDialog,
body.mobile-mode-body .paperDialog {
  max-height: 90dvh; overflow-y: auto;
}
body.mobile-mode-body .panelHead { padding: 9px 14px; }
body.mobile-mode-body .panelHead h2 { font-size: 15px; }
body.mobile-mode-body .panelHead small { font-size: 10.5px; }
body.mobile-mode-body .settingsBody { padding: 10px 14px 14px; gap: 7px; }
body.mobile-mode-body .setRow { padding: 7px 10px; font-size: 11.5px; gap: 8px; }
body.mobile-mode-body .setRow select { padding: 4px 7px; font-size: 11px; }
body.mobile-mode-body .storeBody { padding: 10px 12px; gap: 10px; grid-template-columns: 0.9fr 1.1fr; }
body.mobile-mode-body .snackGrid { gap: 6px; }
body.mobile-mode-body .snackItem { padding: 6px 8px; font-size: 10.5px; }
body.mobile-mode-body .clerkBubble { padding: 6px 9px; font-size: 10.5px; }

.mobileHud {
  position: fixed; inset: 0; pointer-events: none; z-index: 22;
  touch-action: none;
}
.mobileHud button, .mobileHud select, .mobileHud .mJoyArea, .mobileHud .mQuickDrawer {
  pointer-events: auto; touch-action: none;
}

.mTopLeftTools {
  position: absolute; top: 64px; left: 10px;
  display: flex; flex-wrap: nowrap; gap: 4px;
}
.mChipBtn {
  padding: 4px 8px; border-radius: 6px;
  background: rgba(16, 20, 28, 0.68); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: #f4f2eb; font-size: 10px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.30);
}
.mChipBtn:active { transform: scale(0.94); background: rgba(255, 255, 255, 0.22); }

.mQuickDrawer {
  position: absolute; top: 92px; left: 10px; width: 206px;
  padding: 8px; border-radius: 10px;
  background: rgba(16, 20, 28, 0.92); backdrop-filter: blur(12px);
  border: 1px solid rgba(228, 199, 132, 0.35);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
  display: flex; flex-direction: column; gap: 6px;
}
.mDrawerRow {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.5px; color: #f4f2eb;
}
.mDrawerRow select {
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff; border-radius: 5px; padding: 2px 6px; font-size: 10.5px;
}
.mDrawerRow select option { background: #1c202a; color: #fff; }
.mDrawerBtns {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5px;
}
.mDrawerBtns button {
  padding: 5px 5px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08); color: #f6f4ec; font-size: 10px; font-weight: 600;
}
.mDrawerBtns button:active { background: rgba(228, 199, 132, 0.28); }

/* Bottom-Left Compact PUBG Analog Virtual Joystick (ergonomic 94px thumb ring) */
.mJoyArea {
  position: absolute; left: max(16px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom));
  width: 112px; height: 124px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.mSprintLock {
  margin-bottom: 5px; padding: 2px 8px; border-radius: 999px;
  font-size: 9px; font-weight: 800; letter-spacing: 0.04em;
  background: rgba(16, 20, 28, 0.55); border: 1px solid rgba(255, 255, 255, 0.20);
  color: rgba(255, 255, 255, 0.65); transition: all 0.14s;
}
.mSprintLock.locked {
  background: rgba(255, 198, 56, 0.92); color: #1a1e26; border-color: #fff2b2;
  box-shadow: 0 0 12px rgba(255, 198, 56, 0.65);
}
.mJoyBase {
  position: relative; width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(16, 20, 28, 0.44) 72%, rgba(255, 255, 255, 0.12) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.42), 0 6px 18px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(5px);
}
.mJoyTick {
  position: absolute; font-size: 7px; color: rgba(255, 255, 255, 0.42); pointer-events: none;
}
.mJoyTick.n { top: 4px; left: 50%; transform: translateX(-50%); }
.mJoyTick.s { bottom: 4px; left: 50%; transform: translateX(-50%); }
.mJoyTick.w { left: 5px; top: 50%; transform: translateY(-50%); }
.mJoyTick.e { right: 5px; top: 50%; transform: translateY(-50%); }
.mJoyKnob {
  position: absolute; top: 50%; left: 50%;
  width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, rgba(255, 255, 255, 0.95), rgba(226, 232, 240, 0.72) 60%, rgba(152, 166, 186, 0.60) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.46);
  pointer-events: none;
}

.mAimHint {
  position: absolute; right: 16px; bottom: 154px;
  font-size: 8.5px; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.45);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); pointer-events: none;
}

/* Bottom-Right Compact PUBG Ergonomic Action & Skill Cluster (zero overlap even when riding/flying!) */
.mActionArc {
  position: absolute; right: max(12px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom));
  width: 214px; height: 146px; pointer-events: none;
}
.mSkillArc {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none;
}
.mSkillCircle {
  position: absolute; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; padding: 0;
  border: 1.5px solid color-mix(in srgb, var(--sk) 78%, #fff);
  background: rgba(12, 16, 24, 0.84); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  color: #fff;
}
.mSkillCircle img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.mSkillCircle small { position: relative; z-index: 1; width: 100%; text-align: center; background: rgba(8, 11, 18, 0.78); font-size: 7px; color: rgba(255, 255, 255, 0.92); line-height: 1.2; }
.mSkillCircle.cooling img { filter: grayscale(0.75) brightness(0.45); }
.mSkillCircle.active { box-shadow: 0 0 14px var(--sk); }
.mSkCd {
  position: absolute; inset: 0; z-index: 2; border-radius: 50%;
  background: rgba(10, 14, 22, 0.76); font-style: normal;
  display: grid; place-items: center; font-family: ui-monospace, monospace; font-size: 11px; font-weight: 800;
}
#mSkIce   { left: 4px;  bottom: 10px; }
#mSkFire  { left: 14px; bottom: 56px; }
#mSkCloak { left: 48px; bottom: 98px; }

.mRoundBtn {
  position: absolute; border-radius: 50%;
  background: rgba(18, 22, 30, 0.66); backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 255, 255, 0.40);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.42);
  transition: transform 0.1s, background 0.14s, border-color 0.14s;
}
.mRoundBtn:active { transform: scale(0.91); background: rgba(255, 255, 255, 0.24); }
.mRoundBtn b { font-size: 13px; line-height: 1.05; }
.mRoundBtn span { font-size: 8px; font-weight: 700; }

.mJumpBtn {
  right: 4px; bottom: 6px; width: 50px; height: 50px;
  border-color: rgba(255, 232, 164, 0.85);
  background: radial-gradient(circle, rgba(255, 224, 132, 0.26), rgba(18, 22, 30, 0.74));
}
.mJumpBtn b { font-size: 15px; color: #ffe7a3; }

.mActBtn {
  right: 64px; bottom: 8px; width: 44px; height: 44px;
  border-color: rgba(255, 255, 255, 0.36);
}
.mActBtn.hot {
  border-color: #ffc300; background: radial-gradient(circle, rgba(255, 195, 0, 0.42), rgba(28, 22, 14, 0.84));
  box-shadow: 0 0 14px rgba(255, 195, 0, 0.55);
}

.mSprintBtn {
  right: 10px; bottom: 66px; width: 38px; height: 38px;
}
.mSprintBtn[aria-pressed="true"] {
  border-color: #96d959; background: rgba(150, 217, 89, 0.32); color: #eaffd0;
}

.mLeaveBtn {
  right: 66px; bottom: 62px; width: 40px; height: 40px;
  border-color: #ff6f61; background: rgba(190, 42, 36, 0.82);
}
/* While flying, #mActBtn hides and #mDescendBtn sits ergonomically right beside #mJumpBtn (升高)! */
.mDescendBtn {
  right: 64px; bottom: 8px; width: 46px; height: 46px;
  border-color: #7ccdff; background: radial-gradient(circle, rgba(96, 198, 255, 0.34), rgba(20, 52, 82, 0.84));
}

/* Portrait-to-Landscape Mobile Prompt (only kept as fallback; CSS auto-landscape handles portrait automatically!) */
.rotateOverlay { display: none !important; }

.coordinateProbe {
  position: fixed; z-index: 9999; bottom: 14px; left: 12px; padding: 10px 12px;
  max-width: 90vw; background: #102127ed; color: #e4f8e9; border-radius: 6px;
  font: 12px/1.5 ui-monospace, monospace; pointer-events: auto;
}
.coordinateProbe output { white-space: pre; display: block; }
.coordinateProbe button { margin: 6px 6px 0 0; }
#aimPoint {
  position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 3px #162b38; pointer-events:none;
}
#exploreInteraction {
  position:absolute; bottom:18%; left:50%; transform:translateX(-50%); z-index:8;
  border:1px solid #e8dfcb; border-radius:20px; background:#243c40e8; color:#fff9e9; padding:8px 18px;
}
#game.mobile-mode #exploreInteraction {display:none;}
#game.in-garden .hudTL, #game.in-garden .hudBL, #game.in-garden #skillBar,
#game.in-garden .hudSideMenu, #game.in-garden .hudMR, #game.in-garden #map,
#game.in-garden #mMenuToggle, #game.in-garden #mQuickDrawer,
#game.in-garden #mMapBtn, #game.in-garden .mSkillBtn {display:none;}
#dialogBar.hasSpeaker #dialogText {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}

#game.in-garden .topClockBar, #game.in-garden #locationSub, #game.in-garden #navigation, #game.in-garden .mSkillArc {display:none;}

.room-roster {position:fixed; top:max(12px,env(safe-area-inset-top)); right:12px; z-index:21; max-width:min(155px,35vw); padding:8px 12px; color:#fff4d7; background:rgba(24,35,41,.87); border:1px solid #b29b69; border-radius:10px; font:13px/22px system-ui,sans-serif}
.room-roster[hidden]{display:none}
.room-roster ul {list-style:none; padding:0; margin:3px 0 0; max-height:min(220px,38vh); overflow:auto; overscroll-behavior:contain}
.room-roster li {height:22px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis}

.outfitShowcase {position:relative;height:clamp(160px,32vh,300px);min-height:160px;border-radius:12px;background:radial-gradient(ellipse at 50% 85%,#63716b 0%,#334545 35%,#233534 80%);overflow:hidden;flex:none}
.avatarOrbit {position:absolute;inset:0;width:100%;height:100%;z-index:2;cursor:grab;touch-action:none}
.avatarOrbit:active {cursor:grabbing}
.orbitHint {position:absolute;bottom:6px;right:10px;pointer-events:none;z-index:3;color:#f8f0d7;font:11px/1.5 system-ui;text-shadow:0 1px 3px #18211c}
.xz-showcase:has(.avatarOrbit:not([hidden])) img {visibility:hidden}
.xz-showcase:has(.xz-empty:not([hidden])) .orbitHint,.xz-showcase:has(.xz-empty:not([hidden])) .avatarOrbit {display:none}

#srPickup {position:fixed;top:32%;left:0;right:0;margin:auto;width:max-content;color:#fff3b4;background:#392a1ce8;border:1px solid #f4ce71;border-radius:2em;padding:.35em .95em;font-weight:bold;pointer-events:none}
