/* landing.css - 游戏启动封面（批次四十四：方向A·天空游乐园 —— 蓝天白云地面 + 贴纸 SVG LOGO，全居中） */

:root {
  --ink: #1d1d1d;
  --paper: #ffffff;
  --miku: #39C5BB;
  --teto: #F0605A;
  --tianyi: #66CCFF;
  --star: #FFD93D;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  color: var(--ink);
  background: linear-gradient(180deg, #6FC3F0 0%, #A8DCF7 55%, #E8F7FF 100%);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ================= 动态背景层 ================= */
.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* 白云漂移（批次八十四：造型重绘——主鼓包 + 阴影补出第三团，三团叠出云朵感，
   不再是「胶囊上顶两个圆」的生硬弧度） */
.cloud {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  opacity: 0.95;
  animation: drift linear infinite;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}

.cloud.c1 { top: 9%;  width: 96px; height: 26px; animation-duration: 46s; animation-delay: -8s; }
.cloud.c1::before { width: 40px; height: 40px; top: -20px; left: 16px; box-shadow: 30px 14px 0 -10px #fff; }
.cloud.c1::after  { width: 26px; height: 26px; top: -12px; left: 60px; }

.cloud.c2 { top: 21%; width: 72px; height: 20px; animation-duration: 34s; animation-delay: -20s; opacity: 0.85; }
.cloud.c2::before { width: 30px; height: 30px; top: -15px; left: 12px; box-shadow: 22px 11px 0 -8px #fff; }
.cloud.c2::after  { width: 20px; height: 20px; top: -9px; left: 44px; }

.cloud.c3 { top: 52%; width: 108px; height: 28px; animation-duration: 58s; animation-delay: -34s; opacity: 0.8; }
.cloud.c3::before { width: 44px; height: 44px; top: -22px; left: 18px; box-shadow: 32px 14px 0 -10px #fff; }
.cloud.c3::after  { width: 28px; height: 28px; top: -13px; left: 64px; }

.cloud.c4 { top: 4%;  width: 64px; height: 18px; animation-duration: 28s; animation-delay: -4s; opacity: 0.9; }
.cloud.c4::before { width: 26px; height: 26px; top: -13px; left: 10px; box-shadow: 18px 9px 0 -7px #fff; }
.cloud.c4::after  { width: 17px; height: 17px; top: -8px; left: 38px; }

@keyframes drift {
  from { transform: translateX(110vw); }
  to   { transform: translateX(-25vw); }
}

/* 天上飘过的收集物：批次二十已撤除（改由图鉴配置驱动，样式在 css/dex-home.css） */

/* 彩虹弧：右上角（批次四十四） */
.rainbow {
  position: absolute;
  top: -80px;
  right: -60px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle,
    transparent 0 44%,
    #FF9EBB 44% 52%, #FFD93D 52% 60%, #8FD8CB 60% 68%, #A8C8F0 68% 76%,
    transparent 76%);
  opacity: 0.8;
}

/* 三角彩旗挂绳（顶部横贯，批次四十四） */
.bunting {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
}

.bunting svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* 星星闪烁（批次四十四） */
.twinkle {
  position: absolute;
  animation: twinkleBlink 2.6s ease-in-out infinite;
}

.twinkle svg { display: block; width: 100%; }
.twinkle.t1 { top: 20%; left: 32%; width: 16px; }
.twinkle.t2 { top: 34%; right: 24%; width: 13px; animation-delay: -0.9s; }
.twinkle.t3 { top: 50%; left: 6%;  width: 18px; animation-delay: -1.7s; }

@keyframes twinkleBlink {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50%      { opacity: 1;    transform: scale(1.1); }
}

/* 云朵地面：一排相叠的白云 + 白色云底（批次四十四：替代原山丘 + 砖块地面；
   批次五十一：加高到 150px，顶缘盖过底栏按钮，人物踩在云上） */
.cloud-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
}

.cg-base {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 112px;
  background: #fff;
}

.cg-bumps {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100px;
  height: 52px;
  /* 批次八十四：云岸造型重绘——圆心高低错落（y 42~58）、半径大小相间（26~46），
     鼓包互相叠压出天然云团的起伏，不再是一排整齐半圆弧线；瓦片加宽到 1260px 降低重复感 */
  background-image:
    radial-gradient(circle at 60px 50px, #fff 46px, transparent 47px),
    radial-gradient(circle at 152px 57px, #fff 29px, transparent 30px),
    radial-gradient(circle at 226px 44px, #fff 40px, transparent 41px),
    radial-gradient(circle at 316px 58px, #fff 26px, transparent 27px),
    radial-gradient(circle at 388px 48px, #fff 44px, transparent 45px),
    radial-gradient(circle at 482px 55px, #fff 31px, transparent 32px),
    radial-gradient(circle at 562px 42px, #fff 38px, transparent 39px),
    radial-gradient(circle at 652px 57px, #fff 27px, transparent 28px),
    radial-gradient(circle at 726px 47px, #fff 42px, transparent 43px),
    radial-gradient(circle at 826px 55px, #fff 30px, transparent 31px),
    radial-gradient(circle at 902px 49px, #fff 36px, transparent 37px),
    radial-gradient(circle at 986px 58px, #fff 26px, transparent 27px),
    radial-gradient(circle at 1056px 44px, #fff 40px, transparent 41px),
    radial-gradient(circle at 1156px 53px, #fff 32px, transparent 33px),
    radial-gradient(circle at 1232px 49px, #fff 37px, transparent 38px);
  background-repeat: repeat-x;
  background-size: 1260px 52px;
}

/* 云底淡蓝阴影线 */
.cloud-ground::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: rgba(111, 195, 240, 0.25);
}

/* 底部五色窄彩条（批次五十一：a-candy 同款色带收窄到 12px） */
.stripe {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12px;
  background: linear-gradient(90deg,
    #FF9EBB 0 20%, #FFD93D 20% 40%, #8FD8CB 40% 60%,
    #A8C8F0 60% 80%, #C9A8E8 80% 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.6);
}

/* 行走的 Q 版小人（等画师素材，占位样式保留；批次五十一：踩在加高后的云顶上） */
.char {
  position: absolute;
  bottom: 126px;
  left: 0;
  animation: walkAcross linear infinite;
}

.char .body-wrap {
  animation: stepBob 0.5s ease-in-out infinite;
}

.char .head {
  position: relative;
  width: 34px;
  height: 30px;
  margin: 0 auto;
  background: var(--c-soft);
  border: 3px solid var(--ink);
  border-radius: 50%;
  z-index: 1;
}

/* 双马尾 */
.char .head::before,
.char .head::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 12px;
  height: 26px;
  background: var(--c);
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.char .head::before { left: -12px; transform: rotate(-18deg); }
.char .head::after  { right: -12px; transform: rotate(18deg); }

.char .torso {
  width: 30px;
  height: 26px;
  margin: -3px auto 0;
  background: var(--c);
  border: 3px solid var(--ink);
  border-radius: 10px;
}

.char.k1 { --c: var(--miku);   --c-soft: #DDF7F4; animation-duration: 13s; animation-delay: -2s; }
.char.k2 { --c: var(--teto);   --c-soft: #FDE7E5; animation-duration: 17s; animation-delay: -9s; transform: scale(0.86); }
.char.k3 { --c: var(--tianyi); --c-soft: #E3F5FF; animation-duration: 21s; animation-delay: -14s; transform: scale(0.72); }

@keyframes walkAcross {
  from { transform: translateX(-80px); }
  to   { transform: translateX(105vw); }
}

@keyframes stepBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* ================= 前景内容 ================= */
.landing {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 1fr auto; /* 底栏自然高度，视觉落进云朵地面 */
  width: 100%;
  height: 100%;
  min-height: 100svh;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 16px; /* 批次四十四：全居中，不为右侧按钮列让位 */
  position: relative;
  top: -5vh;       /* 批次五十一：LOGO 区整体上移 */
}

/* 贴纸风 SVG LOGO（批次五十一：L5 五色糖果 —— 每字歌姬色 + 深紫灰描边 + 逐字浮动） */
.game-title {
  font-size: 0; /* h1 只作语义容器，视觉全在 SVG */
  line-height: 0;
}

.logo-wrap {
  position: relative;
  display: inline-block;
  transform: rotate(-2.5deg);
}

.logo {
  display: block;
  width: min(520px, 86vw);
  height: auto;
}

.logo text {
  font-family: "YouYuan", "Yuanti SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 92px;
  font-weight: 900;
  letter-spacing: 8px;
  paint-order: stroke fill;
  stroke-linejoin: round;
}

.t-outer { fill: #fff; stroke: #4A3B52; stroke-width: 24px; }
.t-inner { stroke: #fff; stroke-width: 10px; }
/* 批次七十四：c1~c5 移到内层 text 本体的类上（结构从 tspan 改为每字一 <g>） */
.t-inner.c1 { fill: #39C5BB; }
.t-inner.c2 { fill: #F0605A; }
.t-inner.c3 { fill: #FF9F45; }
.t-inner.c4 { fill: #66CCFF; }
.t-inner.c5 { fill: #FF8FB5; }

/* 逐字浮动（批次七十四根修）：动画目标从 tspan 改 <g>——
   tspan 不是图形元素，CSS transform/SMIL 全被忽略；<g> 全内核有效。
   错相位由内联 animation-delay 给出（0/0.14/0.28/0.42/0.56s） */
.logo .lc {
  transform-box: fill-box;
  animation: logoCharBob 2.8s ease-in-out infinite;
}

@keyframes logoCharBob {
  /* 批次七十八：振幅 9px → 16px（SVG 单位，字顶最低仍留 viewBox 内约 9px 余量） */
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-16px); }
}

/* 副标题：L6 黑胶囊（黄字 + 青色错位影） */
.game-subtitle {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 18px 5px;
  background: #26262E;
  color: var(--star);
  font-size: clamp(11px, 1.6vw, 13px);
  font-weight: 900;
  letter-spacing: 6px;
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--miku);
  transform: rotate(-1deg);
}

/* 开始按钮 */
.start-button {
  display: inline-block;
  margin-top: clamp(20px, 4vh, 32px);
  padding: 14px 54px;
  background: var(--star);
  color: var(--ink);
  font-size: clamp(17px, 2.4vw, 21px);
  font-weight: 900;
  letter-spacing: 7px;
  text-indent: 7px;
  text-decoration: none;
  border: 4px solid var(--ink);
  border-radius: 999px;
  box-shadow: 5px 5px 0 var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  animation: btnPulse 1.4s ease-in-out infinite;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.start-button:hover,
.start-button:focus-visible {
  background: #ffe47a;
  outline: none;
}

.start-button:active {
  animation: none;
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}

@keyframes btnPulse {
  0%, 100% { transform: scale(1); box-shadow: 5px 5px 0 var(--ink); }
  50%      { transform: scale(1.06); box-shadow: 7px 7px 0 var(--ink); }
}

/* ================= 底部署名（批次五十一：按钮排与作者行间距拉开、整体贴底落在彩条上方） ================= */
.credits {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}

.creator-actions {
  display: flex;
  gap: 10px;
}

.creator-actions button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 5px 18px;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.creator-actions button:hover,
.creator-actions button:focus-visible {
  outline: none;
}

/* 批次五十一·B3 变体：浅彩填充 + 彩字 + 墨边 + 彩色硬影，三枚交替微斜 */
.creator-actions .home-link {
  background: #D9F4F2; color: #1FA79C;
  box-shadow: 3px 3px 0 var(--miku); transform: rotate(-1.5deg);
}
.creator-actions .home-link:hover,
.creator-actions .home-link:focus-visible {
  background: var(--miku);
  color: #fff;
}
.creator-actions .home-link:active {
  transform: rotate(-1.5deg) translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--miku);
}

.creator-actions .support-link {
  background: #FFE3E1; color: #D8433C;
  box-shadow: 3px 3px 0 var(--teto); transform: rotate(1.2deg);
}
.creator-actions .support-link:hover,
.creator-actions .support-link:focus-visible {
  background: var(--teto);
  color: #fff;
}
.creator-actions .support-link:active {
  transform: rotate(1.2deg) translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--teto);
}

.creator-actions .credits-link {
  background: #EDE4FF; color: #7B5CB8;
  box-shadow: 3px 3px 0 #B98CF0; transform: rotate(-1deg);
}
.creator-actions .credits-link:hover,
.creator-actions .credits-link:focus-visible {
  background: #B98CF0;
  color: #fff;
}
.creator-actions .credits-link:active {
  transform: rotate(-1deg) translate(2px, 2px);
  box-shadow: 1px 1px 0 #B98CF0;
}

/* Produced by · 版本号 小字行 */
.credit-line {
  color: rgba(29, 29, 29, 0.7);
  white-space: nowrap;
}

.credit-line strong {
  font-weight: 900;
}

/* 链接待配置提示 */
.link-status {
  position: absolute;
  right: 22px;
  bottom: calc(100% + 8px);
  padding: 6px 12px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
}

.link-status.show {
  animation: statusNotice 1.8s ease both;
}

@keyframes statusNotice {
  0%, 100% { opacity: 0; transform: translateY(5px); }
  15%, 80% { opacity: 1; transform: translateY(0); }
}

/* ============ 旺铺招租广告牌（批次五十一：去木杆，飘在左上天空） ============ */
.ad-sign {
  position: fixed;
  left: 16px;
  top: 13%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transform: rotate(-3deg);
  transition: transform 0.15s ease;
}

.ad-sign-board {
  position: relative;
  z-index: 1;
  display: block;
  padding: 7px 13px 6px;
  background: #FFFDF6;
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--teto);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  white-space: nowrap;
  animation: adSignBob 3.4s ease-in-out infinite;
}

.ad-sign-board small {
  font-size: 10px;
  font-weight: 800;
  color: #8d8375;
  letter-spacing: 0;
}

/* 牌子上的两枚小钉子 */
.ad-sign-board::before,
.ad-sign-board::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 5px;
  height: 5px;
  background: var(--ink);
  border-radius: 50%;
}

.ad-sign-board::before { left: 5px; }
.ad-sign-board::after  { right: 5px; }

/* 木杆（批次三十六曾隐藏，批次四十四回归，批次五十一随广告牌上天撤除） */

@keyframes adSignBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-4px) rotate(1.2deg); }
}

/* hover：一圈虚线描边 + 微微放大，暗示可点击 */
.ad-sign:hover,
.ad-sign:focus-visible {
  transform: rotate(-3deg) scale(1.06);
  outline: 3px dashed var(--ink);
  outline-offset: 5px;
  border-radius: 10px;
}

.ad-sign:active {
  transform: rotate(-3deg) scale(0.98);
}

/* ============ 浮动音乐播放器（波普卡通） ============ */
/* 批次四十四：四个功能入口收拢为右侧等距竖列 ——
   图鉴拍立得(bottom:306) → 排行榜(236) → 设置(166) → 播放器(96)，间距 14px */
.music-player {
  position: fixed;
  right: 14px;
  bottom: 96px;          /* 云朵地面(86) 上方 10px */
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* 圆形悬浮按钮：跳动的音谱条（批次五十一：白底 + 墨边 + 各自彩色投影，去大黑投影） */
.mp-fab {
  --fab-sh: #39C5BB;
  width: 56px; height: 56px;
  border: 4px solid #1d1d1d;
  border-radius: 50%;
  background: #fff;
  box-shadow: 4px 4px 0 var(--fab-sh);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.mp-fab:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--fab-sh); }
.mp-fab-bars { display: flex; align-items: flex-end; gap: 3px; height: 20px; }
.mp-fab-bars i {
  width: 4px; border-radius: 2px; background: #1d1d1d;
  height: 8px;
  animation: mpBar 0.9s ease-in-out infinite;
  animation-play-state: paused;
}
.mp-fab-bars i:nth-child(1) { height: 10px; }
.mp-fab-bars i:nth-child(2) { height: 18px; animation-delay: 0.15s; }
.mp-fab-bars i:nth-child(3) { height: 13px; animation-delay: 0.3s; }
.mp-fab-bars i:nth-child(4) { height: 17px; animation-delay: 0.45s; }
.music-player.playing .mp-fab-bars i { animation-play-state: running; }
@keyframes mpBar {
  0%, 100% { transform: scaleY(0.5); }
  50%      { transform: scaleY(1); }
}

/* 面板 */
.mp-panel {
  width: 264px;
  background: #FFF9EC;
  border: 4px solid #1d1d1d;
  border-radius: 18px;
  box-shadow: 6px 6px 0 #A8C8F0;   /* 批次五十一：大黑投影换浅蓝 */
  padding: 14px 14px 12px;
  animation: mpPop 0.18s ease-out;
}
@keyframes mpPop {
  from { transform: translateY(10px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* 头部：转盘 + 曲名 + 收起 */
.mp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mp-now { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mp-disc {
  width: 40px; height: 40px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; color: #fff;
  background: #39C5BB;
  border: 3px solid #1d1d1d; border-radius: 50%;
  box-shadow: 2px 2px 0 #1d1d1d;
}
.music-player.playing .mp-disc { animation: mpSpin 2.4s linear infinite; }
@keyframes mpSpin { to { transform: rotate(360deg); } }
.mp-now-text { min-width: 0; }
.mp-now-text strong {
  display: block; font-size: 16px; font-weight: 900; color: #1d1d1d;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-now-text em { font-style: normal; font-size: 11px; font-weight: 700; color: #8d8375; }
.mp-close {
  width: 30px; height: 30px; flex: none;
  font-size: 18px; font-weight: 900; line-height: 1; color: #1d1d1d;
  background: #fff; border: 3px solid #1d1d1d; border-radius: 50%;
  box-shadow: 2px 2px 0 #1d1d1d; cursor: pointer;
}
.mp-close:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #1d1d1d; }

/* 时间（无拖动进度条） */
.mp-time {
  margin: 8px 2px 0;
  display: flex; justify-content: flex-end; gap: 4px;
  font-size: 11px; font-weight: 700; color: #8d8375;
  font-variant-numeric: tabular-nums;
}

/* 控制按钮 */
.mp-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.mp-btn {
  min-width: 40px; height: 40px;
  padding: 0 8px;
  font-size: 15px; font-weight: 900; color: #1d1d1d;
  background: #fff; border: 3px solid #1d1d1d; border-radius: 12px;
  box-shadow: 3px 3px 0 #1d1d1d; cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.mp-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #1d1d1d; }
.mp-play {
  width: 48px; height: 48px; font-size: 18px;
  background: #FFD93D; border-radius: 50%;
}
.mp-shuffle { font-size: 12px; letter-spacing: 1px; flex: 1; }
.mp-shuffle.on { background: #39C5BB; color: #fff; }

/* 曲目列表 */
.mp-list {
  list-style: none; margin: 12px 0 0; padding: 10px 0 0;
  border-top: 3px dashed #e5d9c0;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 168px; overflow-y: auto;
}
.mp-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px;
  background: #fff; border: 3px solid #1d1d1d; border-radius: 12px;
  box-shadow: 2px 2px 0 #1d1d1d;
  font-size: 13px; font-weight: 800; color: #1d1d1d;
  cursor: pointer; user-select: none;
}
.mp-item .mp-note {
  width: 24px; height: 24px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff;
  background: #F0605A; border: 2px solid #1d1d1d; border-radius: 8px;
}
.mp-item .mp-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-item .mp-sub { display: block; font-size: 10px; font-weight: 700; color: #8d8375; }
.mp-item.current { background: #FFF0B8; }
.mp-item.current .mp-note { background: #39C5BB; }

/* 锁定曲目 */
.mp-item.locked {
  background: #f0ece2; color: #b0a892;
  border-color: #c9c2b2; box-shadow: 2px 2px 0 #c9c2b2;
  cursor: not-allowed;
}
.mp-item.locked .mp-note { background: #c9c2b2; border-color: #b0a892; }
.mp-item.locked .mp-sub { color: #b0a892; }

/* 锁定提示 toast */
.mp-toast {
  position: fixed; right: 14px; bottom: 250px; z-index: 61;
  padding: 8px 14px;
  font-size: 12px; font-weight: 800; color: #1d1d1d;
  background: #FFD93D; border: 3px solid #1d1d1d; border-radius: 12px;
  box-shadow: 3px 3px 0 #1d1d1d;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.mp-toast.show { opacity: 1; transform: translateY(0); }

/* ============ 致谢弹层（贴纸卡片风） ============ */
.credits-modal {
  position: fixed;
  inset: 0;
  z-index: 80;          /* 高于音乐播放器(60) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.credits-modal[hidden] {
  display: none;
}

.cm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 29, 29, 0.35);
}

.cm-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: min(86vh, 640px);
  max-height: min(86dvh, 640px); /* 移动浏览器地址栏伸缩时按动态视口高 */
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 24px;
  box-shadow: 8px 8px 0 var(--ink);
  overflow: hidden;
  user-select: text;     /* 名单文字允许选中复制 */
}

.cm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 10px;
  border-bottom: 3px dashed rgba(29, 29, 29, 0.18);
}

.cm-title {
  font-size: 22px;
  font-weight: 900;
}

/* 关闭按钮：≥44×44 触控目标 */
.cm-close {
  flex: none;
  width: 44px;
  height: 44px;
  background: #FFE3E1;
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.cm-close:hover,
.cm-close:focus-visible {
  background: var(--teto);
  color: #fff;
  outline: none;
}

.cm-close:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.cm-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px 6px;
}

.cm-group + .cm-group {
  margin-top: 18px;
}

.cm-group-title {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 14px;
  font-size: 15px;
  font-weight: 900;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
}

/* 分组贴纸标题配色：批次五十一一纯文字版新分组（旧的 artist/composer/thanks 留作今后卡片版复用） */
.cm-group[data-group="artist"]   .cm-group-title { background: #EDE4FF; }
.cm-group[data-group="composer"] .cm-group-title { background: #D9F4F2; }
.cm-group[data-group="thanks"]   .cm-group-title { background: #FFE3E1; }
.cm-group[data-group="music"]   .cm-group-title { background: #D9F4F2; }
.cm-group[data-group="art"]     .cm-group-title { background: #EDE4FF; }
.cm-group[data-group="chart"]   .cm-group-title { background: #FFE9C7; }
.cm-group[data-group="library"] .cm-group-title { background: #FFF3B8; }
.cm-group[data-group="info"]    .cm-group-title { background: #D8F3DC; }
.cm-group[data-group="coord"]   .cm-group-title { background: #CFE8FF; }
.cm-group[data-group="code"]    .cm-group-title { background: #E2E2E2; }
.cm-group[data-group="test"]    .cm-group-title { background: #FFE3E1; }

/* 批次五十一一：纯文字名单——一行名字（顿号分隔），自动换行 */
.cm-names {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 2;
  color: var(--ink);
}

.cm-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.cm-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #FFFDF6;
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 3px 3px 0 var(--ink);
}

/* 有 uid 的条目可点击跳转 B站空间 */
.cm-entry.clickable {
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.cm-entry.clickable:hover,
.cm-entry.clickable:focus-visible {
  background: #EAF7FF;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
  outline: none;
}

.cm-entry.clickable:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.cm-avatar {
  flex: none;
  width: 48px;
  height: 48px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 0 rgba(29, 29, 29, 0.25);
}

.cm-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 字母头像柔和糖果色（按名字散列） */
.cm-avatar.c0 { background: #7EC8E3; }
.cm-avatar.c1 { background: #F0A6C0; }
.cm-avatar.c2 { background: #A8D8A8; }
.cm-avatar.c3 { background: #F5C979; }
.cm-avatar.c4 { background: #B9A6E8; }
.cm-avatar.c5 { background: #8FD8CB; }

.cm-text {
  min-width: 0;
}

.cm-name {
  font-size: 15px;
  font-weight: 900;
}

.cm-entry.clickable .cm-name::after {
  content: " ↗";
  font-size: 12px;
  color: var(--teto);
}

.cm-works {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(29, 29, 29, 0.62);
}

.cm-foot {
  padding: 10px 18px 14px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: rgba(29, 29, 29, 0.55);
  border-top: 3px dashed rgba(29, 29, 29, 0.18);
}

/* ============ 首页功能 FAB：排行榜 / 设置（播放器同款圆形贴纸风） ============
   批次四十四：右侧竖列成员 —— 排行榜 bottom:236、设置 bottom:166（播放器 96 + 56 + 14 逐级上叠） */
.home-fab {
  position: fixed;
  right: 14px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border: 4px solid #1d1d1d;
  border-radius: 50%;
  background: #fff;
  box-shadow: 4px 4px 0 var(--fab-sh, #1d1d1d);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  touch-action: manipulation;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.home-fab:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--fab-sh, #1d1d1d);
}
.home-fab-settings { bottom: 166px; --fab-sh: #B98CF0; }
.home-fab-rank     { bottom: 236px; --fab-sh: #F0605A; }

/* 齿轮 hover 轻转，暗示可点 */
@media (hover: hover) {
  .home-fab:hover { transform: translateY(-2px); }
  .home-fab-settings:hover .home-fab-gear { transform: rotate(40deg); }
}
.home-fab-gear { transition: transform 0.25s ease; }

/* ============ 首页总完成度排行榜（Top 50） ============
   视觉严格沿用结算页 .rank-card / .rank-row / .rank-help-modal，
   首页只额外提供弹窗尺寸与关闭入口。 */
.home-rank-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.home-rank-modal[hidden],
.home-rank-rules[hidden] { display: none; }

.home-rank-backdrop,
.home-rank-rules-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 29, 29, 0.45);
}

.home-rank-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 92vw);
  height: min(760px, 88vh);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 14px 16px;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 20px;
  box-shadow: 8px 8px 0 var(--ink);
  animation: mpPop 0.18s ease-out;
}

.home-rank-head {
  flex: none;
  position: relative;
  min-height: 42px;
  padding: 1px 72px 10px;
  text-align: center;
  border-bottom: 2.5px dashed rgba(29, 29, 29, 0.2);
}

.home-rank-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
}

.home-rank-head p {
  margin-top: 2px;
  color: #8d8375;
  font-size: 10px;
  font-weight: 800;
}

.home-rank-head-actions {
  position: absolute;
  top: -3px;
  right: -4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.home-rank-help-btn {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #FFE28A;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.home-rank-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.home-rank-close:active { background: rgba(29, 29, 29, 0.1); }

.home-rank-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(29, 29, 29, 0.22) transparent;
}

.home-rank-list::-webkit-scrollbar { width: 6px; }
.home-rank-list::-webkit-scrollbar-track { background: transparent; }
.home-rank-list::-webkit-scrollbar-thumb {
  background: rgba(29, 29, 29, 0.22);
  border-radius: 3px;
}
.home-rank-list::-webkit-scrollbar-thumb:hover { background: rgba(29, 29, 29, 0.38); }

.home-rank-row,
.home-rank-mine {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 5px 8px;
  border-radius: 10px;
  background: #FFF6E8;
}

.home-rank-no {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #8d8375;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.home-rank-row.is-top1 .home-rank-no,
.home-rank-row.is-top2 .home-rank-no,
.home-rank-row.is-top3 .home-rank-no {
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
}
.home-rank-row.is-top1 .home-rank-no { background: #FFD93D; }
.home-rank-row.is-top2 .home-rank-no { background: #E8E8E8; }
.home-rank-row.is-top3 .home-rank-no { background: #F0B9A0; }

.home-rank-avatar {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--miku);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.home-rank-row:nth-child(3n + 2) .home-rank-avatar { background: var(--tianyi); }
.home-rank-row:nth-child(3n) .home-rank-avatar { background: var(--teto); }

.home-rank-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-rank-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.home-rank-name em {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #b0a893;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.home-rank-score {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.home-rank-mine {
  flex: none;
  margin-top: 6px;
  background: #fff;
  border: 2.5px dashed var(--ink);
}

.home-rank-mine .home-rank-avatar {
  color: var(--ink);
  background: #FFD93D;
}

.home-rank-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #8d8375;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.home-rank-rules {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.home-rank-rules-dialog {
  position: relative;
  z-index: 1;
  width: min(430px, 92vw);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #FFF6DC;
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 5px 6px 0 rgba(29, 29, 29, 0.85);
}

.home-rank-rules-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 16px;
  border-bottom: 2px dashed rgba(29, 29, 29, 0.25);
}

.home-rank-rules-head h3 { font-size: 15px; font-weight: 900; }

.home-rank-rules-head .home-rank-close {
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.home-rank-rules-body {
  overflow-y: auto;
  padding: 10px 16px 14px;
  font-size: 13px;
  line-height: 1.9;
  text-align: left;
}

.home-rank-completion {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 2px dashed rgba(29, 29, 29, 0.25);
}
.home-rank-completion-title { margin-bottom: 4px; font-weight: 900; }
.home-rank-completion-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  line-height: 1.8;
}
.home-rank-completion-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.home-rank-completion-row.is-full b { color: #1a9e6b; }
.home-rank-completion-row.is-zero { opacity: 0.55; }

@media (max-height: 560px) and (orientation: landscape) {
  .home-rank-dialog { width: min(680px, 84vw); height: 92vh; padding: 10px 12px; }
  .home-rank-head { min-height: 32px; padding-bottom: 6px; }
  .home-rank-head h2 { font-size: 13px; }
  .home-rank-head p { font-size: 10px; }
  .home-rank-head-actions { top: -5px; }
  .home-rank-list { gap: 3px; margin-top: 6px; }
  .home-rank-row, .home-rank-mine { min-height: 26px; padding: 2px 6px; }
  .home-rank-no { width: 18px; height: 18px; font-size: 11px; }
  .home-rank-avatar { width: 22px; height: 22px; border-width: 2px; font-size: 11px; }
  .home-rank-name, .home-rank-score { font-size: 12px; }
  .home-rank-mine { margin-top: 4px; }
  .home-rank-rules-dialog { max-height: 92vh; }
}

@media (max-width: 520px) {
  .home-rank-dialog { width: 92vw; height: 88vh; padding: 12px 14px; }
  .home-rank-head { padding-left: 54px; padding-right: 64px; }
}

/* ============ 设置面板（与 mp-panel 同款贴纸卡片） ============ */
.home-settings-panel {
  position: fixed;
  right: 14px;
  bottom: 234px;           /* 设置齿轮(166) 正上方，12px 间距 */
  z-index: 70;
  width: 248px;
  background: #FFF9EC;
  border: 4px solid #1d1d1d;
  border-radius: 18px;
  box-shadow: 6px 6px 0 #A8C8F0;   /* 批次五十一：大黑投影换浅蓝 */
  padding: 12px 14px 12px;
  animation: mpPop 0.18s ease-out;   /* 复用播放器弹出动效 */
}
.hsp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.hsp-title {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: #1d1d1d;
}
.hsp-close {
  width: 28px;
  height: 28px;
  border: 3px solid #1d1d1d;
  border-radius: 50%;
  background: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hsp-close:active { transform: translate(1px, 1px); }

.hsp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
.hsp-label {
  flex: none;
  width: 62px;
  font-size: 13px;
  font-weight: 800;
  color: #1d1d1d;
}
.hsp-val {
  flex: none;
  width: 40px;
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  color: #6b5b3e;
  font-variant-numeric: tabular-nums;
}

/* 滑杆：糖果色轨道 + 白圆钮 */
.hsp-row input[type="range"] {
  flex: 1;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  height: 8px;
  border: 2px solid #1d1d1d;
  border-radius: 999px;
  background: linear-gradient(90deg, #6FD3E7, #FFD93D);
  cursor: pointer;
}
.hsp-row input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 3px solid #1d1d1d;
  border-radius: 50%;
  background: #fff;
  box-shadow: 2px 2px 0 #1d1d1d;
}
.hsp-row input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid #1d1d1d;
  border-radius: 50%;
  background: #fff;
  box-shadow: 2px 2px 0 #1d1d1d;
}

.hsp-reset {
  margin-top: 8px;
  width: 100%;
  padding: 6px 0;
  border: 3px solid #1d1d1d;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  color: #1d1d1d;
  cursor: pointer;
  box-shadow: 3px 3px 0 #1d1d1d;
}
.hsp-reset:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #1d1d1d;
}

/* ================= 响应式 ================= */
/* 竖屏（批次八十四）：右侧按钮列整体缩小一档，图鉴框不再逼近「点击开启」；
   圆钮 56 → 46（right:14 → 10），步进 70 → 56：播放器 86 → 设置 142 → 排行榜 198
   （图鉴 254 在 dex-home.css；人物竖屏档也在那边） */
@media (orientation: portrait) {
  .music-player { right: 10px; bottom: 86px; }
  .mp-fab {
    width: 46px;
    height: 46px;
    border-width: 3.5px;
    box-shadow: 3px 3px 0 var(--fab-sh);
  }
  .mp-fab-bars { height: 16px; gap: 2px; }
  .mp-fab-bars i { width: 3px; }
  .home-fab {
    right: 10px;
    width: 46px;
    height: 46px;
    border-width: 3.5px;
    box-shadow: 3px 3px 0 var(--fab-sh, #1d1d1d);
  }
  .home-fab svg { width: 20px; height: 20px; }
  .home-fab-settings { bottom: 142px; }
  .home-fab-rank     { bottom: 198px; }
  .home-settings-panel { right: 10px; }
  .mp-toast { right: 10px; }
}

/* 矮屏横屏 */
@media (max-height: 520px) {
  .hero { top: -2vh; }
  .logo { width: min(330px, 46vw); }
  .logo text { letter-spacing: 7px; }

  .game-subtitle {
    margin-top: 4px;
    padding: 3px 14px 4px;
    letter-spacing: 5px;
    font-size: 10px;
  }

  .start-button {
    margin-top: 10px;
    padding: 8px 40px;
    font-size: 15px;
    border-width: 3px;
    box-shadow: 4px 4px 0 var(--ink);
    letter-spacing: 5px;
    text-indent: 5px;
  }

  @keyframes btnPulse {
    0%, 100% { transform: scale(1); box-shadow: 4px 4px 0 var(--ink); }
    50%      { transform: scale(1.06); box-shadow: 6px 6px 0 var(--ink); }
  }

  .bunting { height: 38px; }
  .rainbow { width: 170px; height: 170px; top: -70px; right: -40px; }
  .cloud.c2, .cloud.c3, .twinkle.t2 { display: none; }

  /* 批次五十一：矮档云地同比例加高 56 → 84；批次八十四：云岸瓦片同步 1260 */
  .cloud-ground { height: 84px; }
  .cg-bumps { bottom: 46px; height: 38px; background-size: 1260px 38px; }
  .cg-base { height: 56px; }
  .stripe { height: 10px; }

  .credits {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    padding: 4px 12px 16px; /* 底部留出彩条位置 */
  }
  .creator-actions button { min-height: 30px; font-size: 11px; padding: 2px 12px; }
  .credit-line { font-size: 10px; }

  /* 广告牌矮档：贴着彩旗下方的左上天 */
  .ad-sign { top: 56px; left: 12px; }
  .ad-sign-board { font-size: 12px; padding: 4px 10px; }

  /* 右侧竖列紧凑档：播放器 66 → 设置 116 → 排行榜 166（图鉴 216 在 dex-home.css） */
  .music-player { right: 10px; bottom: 66px; }
  /* 批次六十一：播放器钮同步缩到 42px——之前只有 home-fab 缩，竖列大小不一 */
  .mp-fab {
    width: 42px;
    height: 42px;
    border-width: 3px;
    box-shadow: 3px 3px 0 var(--fab-sh);
  }
  .mp-fab-bars { height: 15px; gap: 2px; }
  .mp-fab-bars i { width: 3px; }
  .home-fab {
    right: 10px;
    width: 42px;
    height: 42px;
    border-width: 3px;
    box-shadow: 3px 3px 0 var(--fab-sh, #1d1d1d);
  }
  .home-fab svg { width: 18px; height: 18px; }
  .home-fab-settings { bottom: 116px; }
  .home-fab-rank     { bottom: 166px; }
  .home-settings-panel {
    right: 10px;
    bottom: 170px;
    width: 224px;
    padding: 10px 12px;
  }
  .hsp-title { font-size: 14px; }

  .mp-toast { right: 10px; bottom: 180px; }

  .char { bottom: 70px; }

  /* 致谢弹层：面板更扁，避免遮挡 */
  .credits-modal {
    padding: 8px;
  }

  .cm-panel {
    max-height: 92vh;
    max-height: 92dvh; /* 动态视口高兜底 */
    border-radius: 18px;
  }

  .cm-head {
    padding: 8px 14px 6px;
  }

  .cm-title {
    font-size: 18px;
  }

  .cm-body {
    padding: 10px 14px 4px;
  }

  .cm-group + .cm-group {
    margin-top: 10px;
  }

  .cm-avatar {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }

  .cm-foot {
    display: none;     /* 矮屏省略页脚，把空间留给名单 */
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
}

/* ===== 批次四十九：延迟校准浮层（批次四十四只写了结构没写样式，本批补齐；贴纸风与致谢弹层一致） ===== */
.calib-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;          /* 与致谢弹层同级，高于音乐播放器(60) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(29, 29, 29, 0.35);
}
.calib-overlay[hidden] { display: none; }

.calib-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(420px, 100%);
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 18px 20px 22px;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 24px;
  box-shadow: 8px 8px 0 var(--ink);
  text-align: center;
}

.calib-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.calib-title { margin: 0; font-size: 20px; }
.calib-close {
  width: 36px; height: 36px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  font-size: 18px; font-weight: 700;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
}
.calib-close:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.calib-tip { margin: 0; font-size: 13px; line-height: 1.7; color: #555; }
.calib-tip b { color: var(--ink); }

.calib-stage { padding: 8px 0 2px; }
.calib-pad {
  width: 128px; height: 128px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: #FFD93D;
  font-size: 48px;
  cursor: pointer;
  box-shadow: 6px 6px 0 var(--ink);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.calib-pad:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }

.calib-progress { margin: 0; font-weight: 700; font-size: 15px; }
.calib-live { margin: 0; min-height: 1.4em; font-size: 13px; color: #2a7d4f; font-weight: 700; }

.calib-result { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.calib-result[hidden] { display: none; }
.calib-avg { margin: 0; font-size: 34px; font-weight: 900; }
.calib-disp { margin: 0; font-size: 12px; color: #555; }
.calib-actions { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }
.calib-btn {
  padding: 8px 18px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
}
.calib-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.calib-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.calib-apply { background: #7BE0A3; }

/* ===== 批次五十八：校准浮层 手动填/微调延迟 ===== */
.calib-manual { width: 100%; }
.calib-manual-label { font-size: 12px; font-weight: 700; color: #777; }
.calib-manual-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.calib-step {
  min-width: 40px; height: 34px;
  padding: 0 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-size: 13px; font-weight: 800;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
.calib-step:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.calib-manual-input {
  width: 76px; height: 34px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  text-align: center;
  font-size: 15px; font-weight: 800;
  /* 输入框必须可选中可编辑（游玩页防长按规则不影响首页，这里双保险） */
  -webkit-user-select: text !important;
  user-select: text !important;
}
.calib-manual-apply { padding: 6px 14px; font-size: 13px; background: #7BE0A3; }
