@font-face {
  font-family: 'GenWanMinF';
  src: url('../../fonts/源古黑體-F.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MV Boli';
  src: url('../../fonts/mvboli.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* 地图页背景：固定铺满视口，横屏完整显示雪花底图 */
body {
  position: relative;
  isolation: isolate;
  background: transparent;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #c8dff5;
  background-image: url('../../bg-vertical.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 仅手机横屏：底图 cover 铺满，避免两侧留白；桌面不变 */
@media (orientation: landscape) and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  body::before {
    background-size: cover;
    background-position: center center;
  }
}

/* 地图页：单栏白底，无档案页中缝 */
.map-page .archive-card::before {
  display: none;
}

.map-page {
  position: relative;
}

body.lang-zh {
  font-family: 'GenWanMinF', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 左侧标签中文界面仍用 Lilita（与 archive 一致） */
body.lang-zh .archive-tab,
body.lang-zh .archive-tab__label {
  font-family: 'Lilita One', 'LilitaOne-Regular', Arial, sans-serif;
}

/* START MAP：矩形加长，与 BACK 间距加大并整体下移 */
.map-page .archive-tabs {
  gap: 28px;
}

.map-page .archive-tab--active {
  min-height: 158px;
  margin-top: 6px;
}

.map-page a.archive-tab--back,
.map-page a.archive-tab--back:link,
.map-page a.archive-tab--back:visited,
.map-page a.archive-tab--back:hover,
.map-page a.archive-tab--back:active,
.map-page a.archive-tab--back .archive-tab__label {
  color: #ffffff;
}

/* 框内：白底、地图居中（左右留白预留给后续引导） */
.map-card__body {
  position: absolute;
  inset: 0;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  overflow: hidden;
  background: #ffffff;
  border-radius: inherit;
}

:root {
  --map-aspect-w: 3508;
  --map-aspect-h: 2481;
}

/*
 * 地图尺寸只相对白框（%），不用 vw/cqw，避免手机端与 scale 不同步导致偏右。
 * 保持 map.png 原始比例，在框内完整容纳。
 */
.map-page .map-container {
  max-width: 100%;
}

.map-card__body .map-container {
  position: relative;
  aspect-ratio: var(--map-aspect-w) / var(--map-aspect-h);
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  margin-inline: auto;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.map-card__body .map-container > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  vertical-align: top;
}

/* 框内右下角 NEXT（与选卡页 pick-nav 同款细体；位置微调改本段） */
.map-next {
  position: absolute;
  right: 20px;
  bottom: 8px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  padding-bottom: 4px;
  text-decoration: none;
  color: #2d7fde;
  font-family: 'Lilita One', 'LilitaOne-Regular', Arial, sans-serif;
  cursor: pointer;
}

.map-next:hover {
  filter: brightness(1.08);
}

.map-next__label {
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
  color: inherit;
  transform: translateX(-15px);
}

.map-next__arrow {
  display: block;
  width: clamp(72px, 9vw, 110px);
  height: auto;
  object-fit: contain;
  margin-top: -8px;
  margin-left: -14px;
}

body.lang-zh .map-next,
body.lang-zh .map-next__label {
  font-family: 'Lilita One', 'LilitaOne-Regular', Arial, sans-serif;
}

/* 覆盖 index-map 的 vw，随地图容器等比缩放 */
.map-page .memory-total-value {
  font-size: clamp(8px, 1.4%, 20px);
}

/*
 * 四角引导（微调入口：本文件 map.css）
 * - 整块位置：各 .map-hint--* 的 top/left/right/bottom、width/height
 * - 箭头位置：各 .map-hint--* .map-hint__arrow 的 top/left/right/bottom（px，与语言无关）
 * - 文字位置：各 .map-hint--* .map-hint__text 的 top/left/right/bottom、max-width
 * HTML 结构见 map/map.html；文案见 js/app/constants.js（mapHint*）
 */
.map-hint {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  color: #000000;
}

.map-hint__text {
  position: absolute;
  margin: 0;
  font-family: 'MV Boli', cursive;
  font-size: 15px;
  line-height: 1.32;
  white-space: pre-line;
  text-align: left;
  color: #000000;
}

.map-hint__arrow {
  position: absolute;
  display: block;
  margin: 0;
  width: 118px;
  height: auto;
  object-fit: contain;
}

/* —— 左上 —— */
.map-hint--top-left {
  top: 5%;
  left: 2%;
  width: 200px;
  height: 170px;
}

.map-hint--top-left .map-hint__text {
  top: 40px;
  left: 20px;
  max-width: 150px;
}

.map-hint--top-left .map-hint__arrow {
  top: 85px;
  left: 115px;
}

/* —— 左下 —— */
.map-hint--bottom-left {
  bottom: 5%;
  left: 2%;
  width: 200px;
  height: 170px;
}

.map-hint--bottom-left .map-hint__text {
  top: 80px;
  left: 20px;
  max-width: 150px;
}

.map-hint--bottom-left .map-hint__arrow {
  top: 125px;
  left: 60px;
}

/* —— 右上 —— */
.map-hint--top-right {
  top: 5%;
  right: 2%;
  width: 200px;
  height: 170px;
}

.map-hint--top-right .map-hint__text {
  top: 60px;
  left: 100px;
  max-width: 150px;
}

.map-hint--top-right .map-hint__arrow {
  top: 10px;
  right: 55px;
}

/* —— 右下 —— */
.map-hint--bottom-right {
  bottom: 5%;
  right: 2%;
  width: 200px;
  height: 170px;
}

.map-hint--bottom-right .map-hint__text {
  top: 0px;
  left: 80px;
  max-width: 150px;
}

.map-hint--bottom-right .map-hint__arrow {
  top: 25px;
  right: 100px;
}
