:root {
  /* 设计稿画布 1920x1080，整页等比缩放（类似整体 contain） */
  --stage-w: min(100vw, calc(100vh * 1920 / 1080));
  --stage-h: min(100vh, calc(100vw * 1080 / 1920));
  --stage-x: calc((100vw - var(--stage-w)) / 2);
  --stage-y: calc((100vh - var(--stage-h)) / 2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  display: block;
  vertical-align: middle;
  user-select: none;
  -webkit-user-drag: none;
}

html {
  /* 1rem = 画布宽 / 19.2 ≈ 100 设计稿像素（随整页缩放） */
  font-size: calc(var(--stage-w) / 19.2);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  position: relative;
  background-color: #0a0a0a;
}

/* 整页设计画布：背景 + 所有元素一起等比缩放 */
.page-stage {
  position: absolute;
  left: var(--stage-x);
  top: var(--stage-y);
  width: var(--stage-w);
  height: var(--stage-h);
  overflow: hidden;
  background: url(../image/desktop/bg.png?_t=5) no-repeat center center;
  background-size: 100% 100%;
}

/* ========== header ========== */
.page-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.3rem 0.6rem 0;
}

.page-header .logo {
  width: 3.66rem;
  height: auto;
}

.header-btns {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.header-btns img {
  height: 0.86rem;
  width: auto;
  cursor: pointer;
}

.header-btns .tg {
  width: 2.74rem;
}

.header-btns .sw {
  width: 2.7rem;
}

/* ========== main ========== */
.page-main {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* 左侧：标题 + 扫码区 */
.content-left {
  position: absolute;
  left: 1.1rem;
  top: 2.2rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.main-title {
  width: 9.21rem;
  height: auto;
}

/* 扫码区：背景图 + 二维码 + 右侧按钮组 */
.scan-box {
  position: relative;
  width: 5.75rem;
  height: 3.33rem;
}

.scan-box .scan-bg {
  width: 100%;
  height: 100%;
}

/* 白底二维码区 231x231 @ 575x333 */
#qrcode {
  position: absolute;
  left: 0.08rem;
  top: 0.08rem;
  width: 2.15rem;
  height: 2.15rem;
  z-index: 2;
}

#qrcode img,
#qrcode canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.download-btns {
  position: absolute;
  top: 0.08rem;
  right: 0.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  z-index: 2;
}

.download-btns img {
  width: 3.15rem;
  height: 1.06rem;
  cursor: pointer;
}

/* 右侧人像主图 */
.content-right {
  position: absolute;
  right: 0;
  bottom: 0;
  top: 0;
  width: 12.1rem;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  z-index: 5;
  pointer-events: none;
}

.content-right .main-visual {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
}
