/* ============================================================
   Welcome to the greenroom  —  style.css
   Bliss 壁纸 + 楷体斜体标题 + 极其老土的按钮 + 抢地盘小游戏
   ============================================================ */

:root{
  --kai: "KaiTi", "STKaiti", "Kaiti SC", "楷体", "华文楷体", "TW-Kai",
         "AR PL UKai CN", "AR PL KaitiM GB", "LXGW WenKai",
         "Noto Serif CJK SC", "Source Han Serif SC", "DejaVu Serif", serif;
  --retro: "SimSun", "宋体", "MS Song", "Songti SC", "Noto Serif CJK SC",
           "Source Han Serif SC", "WenQuanYi Zen Hei", "Microsoft YaHei",
           "PingFang SC", "Hiragino Sans GB", sans-serif;
  --mono: "Courier New", Courier, "Noto Sans Mono CJK SC", "Noto Sans SC",
          "Microsoft YaHei", "PingFang SC", "WenQuanYi Zen Hei", monospace;

  --blue: #35a7ff;
  --blue-deep: #0b4f9e;
  --red: #ff5252;
  --red-deep: #9e1b1b;
  --neutral: #2c6b3f;
}

*{ box-sizing: border-box; }

html, body{
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body{
  font-family: var(--retro);
  background: #0a2a12;
  color: #08210f;
  overflow-x: hidden;
}

/* ============================================================
   主页面
   ============================================================ */

#stage{
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 74px 18px 78px;
}

/* --- Bliss 壁纸 --- */
.bliss{
  position: fixed;
  inset: 0;
  background-image: url("../assets/bliss.jpg");
  background-size: cover;
  background-position: center 55%;
  background-repeat: no-repeat;
  background-color: #3d86d2;
  z-index: -3;
  transform: scale(1.03);
  animation: blissDrift 60s ease-in-out infinite alternate;
}
@keyframes blissDrift{
  from{ transform: scale(1.03) translate3d(-0.6%, -0.4%, 0); }
  to  { transform: scale(1.07) translate3d(0.6%, 0.5%, 0); }
}

.bliss-grain{
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  /* 原版 Bliss 照片本身就够亮，这层只留很轻的上下压暗，
     保证顶部标题和底部跑马灯看得清，不要把天空冲白 */
  background:
    linear-gradient(180deg,
      rgba(2,14,34,.30) 0%,
      rgba(2,14,34,.10) 22%,
      rgba(2,14,34,0) 40%,
      rgba(2,14,34,.06) 68%,
      rgba(2,14,34,.38) 100%);
}

/* ============================================================
   左上角：探头张望的卢斯卡德
   ============================================================ */

.rouxls-corner{
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  gap: 2px;
  pointer-events: none;
  max-width: 100%;
}

/* 让它看起来是从画面左上角探出头来：底部被裁掉一截、左边也被切掉一点 */
/* 让它看起来是从画面左上角探出头来 */
.rouxls-figure{
  position: relative;
  flex: 0 0 auto;
  display: block;
}
.rouxls-img{
  display: block;
  width: clamp(84px, 10.5vw, 150px);
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform-origin: 20% 95%;
  filter: drop-shadow(8px 12px 16px rgba(0, 20, 8, .55));
  animation: peekInOut 6.2s cubic-bezier(.45,.05,.35,1) infinite;
}
@keyframes peekInOut{
  0%   { transform: translateX(-30%) translateY(4%) rotate(-9deg) scale(.95); }
  18%  { transform: translateX(0%)   translateY(0%) rotate(1deg)  scale(1); }
  46%  { transform: translateX(3%)   translateY(-1%) rotate(-1.5deg) scale(1.01); }
  64%  { transform: translateX(1%)   translateY(1%) rotate(0deg)  scale(1); }
  86%  { transform: translateX(-5%)  translateY(2%) rotate(-3deg) scale(.99); }
  100% { transform: translateX(-30%) translateY(4%) rotate(-9deg) scale(.95); }
}

.rouxls-bubble{
  position: relative;
  margin-top: clamp(26px, 5vh, 60px);
  margin-left: 10px;
  max-width: min(52vw, 430px);
  background: #fffdf3;
  border: 3px solid #1d2b4a;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 8px 0 rgba(12, 26, 50, .35), 0 14px 26px rgba(0, 20, 8, .4);
  animation: bubblePop 6.2s ease-in-out infinite;
}
.rouxls-bubble p{
  margin: 0;
  font-family: var(--kai);
  font-style: italic;
  font-size: clamp(14px, 1.65vw, 21px);
  line-height: 1.5;
  color: #16233d;
  letter-spacing: .04em;
}
.bubble-tail{
  position: absolute;
  left: -14px;
  top: 26px;
  width: 0; height: 0;
  border: 8px solid transparent;
  border-right-color: #1d2b4a;
}
.bubble-tail::after{
  content: "";
  position: absolute;
  left: -4px;
  top: -6px;
  width: 0; height: 0;
  border: 6px solid transparent;
  border-right-color: #fffdf3;
}
@keyframes bubblePop{
  0%, 12% { opacity: 0; transform: translateX(-18px) scale(.9); }
  22%, 88%{ opacity: 1; transform: translateX(0) scale(1); }
  100%    { opacity: 0; transform: translateX(-18px) scale(.9); }
}

/* ============================================================
   标题
   ============================================================ */

.hero{
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.title{
  margin: 0;
  font-family: var(--kai);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(34px, 6.6vw, 92px);
  line-height: 1.14;
  letter-spacing: .035em;
  color: #ffffff;
  /* 保证"斜体"观感：即使系统没有楷体斜体，也人工倾斜 */
  display: inline-block;
  transform: skewX(-8deg);
  text-shadow:
    0 2px 0 rgba(9, 48, 22, .55),
    0 6px 18px rgba(4, 40, 16, .55),
    0 0 34px rgba(255, 255, 255, .55),
    0 0 70px rgba(180, 255, 160, .35);
  animation: titleGlow 5s ease-in-out infinite;
}
@keyframes titleGlow{
  0%, 100%{ text-shadow: 0 2px 0 rgba(9,48,22,.55), 0 6px 18px rgba(4,40,16,.55), 0 0 30px rgba(255,255,255,.5),  0 0 66px rgba(180,255,160,.30); }
  50%     { text-shadow: 0 2px 0 rgba(9,48,22,.55), 0 6px 20px rgba(4,40,16,.6),  0 0 46px rgba(255,255,255,.75), 0 0 96px rgba(210,255,190,.5); }
}

.subtitle{
  margin: 2px 0 18px;
  font-family: var(--retro);
  font-size: clamp(12px, 1.5vw, 18px);
  letter-spacing: .34em;
  color: #f3fff0;
  text-shadow: 0 2px 6px rgba(0, 30, 10, .85), 0 0 14px rgba(0,0,0,.6);
}

/* ============================================================
   音乐面板
   ============================================================ */

.mini-btn:active{ border-style: inset; }
.mini-btn:disabled{ opacity: .45; cursor: not-allowed; }
.mini-btn.attention{
  animation: attnPulse .5s ease-in-out 5;
  box-shadow: 0 0 0 0 rgba(255, 210, 60, .9);
}
@keyframes attnPulse{
  0%, 100%{ background: linear-gradient(180deg, #ffffff, #cfdced); }
  50%     { background: linear-gradient(180deg, #fff29a, #ffc93c); }
}

/* ============================================================
   极其老土的按钮
   ============================================================ */

.btn-wrap{ display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* 彩虹描边放在外壳上，按钮本体压在它上面 */
.tacky-shell{
  position: relative;
  isolation: isolate;
  display: inline-block;
}
/* 裁切层：把旋转的大方块裁成"按钮外圈"这一条环 */
.tacky-ring{
  position: absolute;
  inset: -13px;
  z-index: 0;
  border-radius: 16px;
  overflow: hidden;
  display: block;
  box-shadow: 0 0 22px rgba(255, 120, 220, .55);
}
.tacky-ring::before{
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 360%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  background: conic-gradient(#ff0055, #ffcc00, #33ff66, #00e5ff, #4d5bff, #ff33cc, #ff0055);
  filter: saturate(1.35);
  animation: tackySpin 2.4s linear infinite;
}
.tacky-shell::after{
  content: "";
  position: absolute;
  inset: -5px;
  z-index: 1;
  border-radius: 8px;
  border: 2px dashed #fffbe0;
  pointer-events: none;
  animation: tackyDashPulse 1.6s ease-in-out infinite;
}
@keyframes tackySpin{ to{ transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes tackyRoll{ to{ transform: rotate(360deg); } }
@keyframes tackyDashPulse{
  0%, 100%{ opacity: .95; }
  50%     { opacity: .35; }
}

.tacky-btn{
  position: relative;
  z-index: 2;
  font-family: var(--kai);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(21px, 3.1vw, 38px);
  letter-spacing: .2em;
  text-indent: .2em;
  color: #fff8c9;
  padding: 16px 48px 18px;
  cursor: pointer;
  border: 4px outset #efe6c8;
  border-radius: 5px;
  background:
    linear-gradient(180deg, #ff7a5c 0%, #e03131 45%, #a80f0f 52%, #f05252 100%);
  text-shadow: 2px 2px 0 #4a0000, 4px 4px 0 rgba(0,0,0,.45), 0 0 16px #ffe066;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.75),
    inset -2px -2px 0 rgba(70,0,0,.6),
    0 8px 0 #5c0808,
    0 12px 22px rgba(0,0,0,.5);
  transition: transform .08s ease;
  animation: tackyWobble 2.6s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
@keyframes tackyWobble{
  0%, 100%{ transform: rotate(-1.1deg) scale(1); }
  50%     { transform: rotate(1.1deg)  scale(1.025); }
}

.tacky-label{
  position: relative;
  display: inline-block;
  animation: tackyBlink 1s steps(1, end) infinite;
}
@keyframes tackyBlink{
  0%, 49%  { color: #fff8c9; text-shadow: 2px 2px 0 #4a0000, 4px 4px 0 rgba(0,0,0,.45), 0 0 18px #ffe066; }
  50%,100% { color: #ffffff; text-shadow: 2px 2px 0 #4a0000, 4px 4px 0 rgba(0,0,0,.45), 0 0 26px #7dfcff; }
}

.tacky-star{
  position: absolute;
  top: -20px;
  right: -18px;
  font-family: var(--retro);
  font-size: 15px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0;
  text-indent: 0;
  color: #fff200;
  background: #e10000;
  border: 2px solid #fff200;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  text-shadow: 1px 1px 0 #7a0000;
  box-shadow: 0 0 14px rgba(255, 240, 0, .85);
  animation: tackyPulse .62s ease-in-out infinite alternate;
  z-index: 3;
}
@keyframes tackyPulse{
  from{ transform: scale(.88) rotate(-14deg); }
  to  { transform: scale(1.12) rotate(10deg); }
}

.tacky-sparkle{
  position: absolute;
  left: -20px;
  bottom: -16px;
  font-size: 26px;
  font-style: normal;
  color: #ffffff;
  text-shadow: 0 0 12px #fff59a, 1px 1px 0 #8a5a00;
  animation: tackyRoll 1.8s linear infinite;
  pointer-events: none;
}

.tacky-btn:hover{
  transform: translateY(-2px) scale(1.035) rotate(0deg);
  animation-play-state: paused;
  filter: brightness(1.1) saturate(1.15);
}
.tacky-btn:active{
  transform: translateY(6px) scale(.99);
  border-style: inset;
  box-shadow: inset 2px 2px 0 rgba(70,0,0,.6), 0 2px 0 #5c0808;
}
.tacky-btn:focus-visible{ outline: 4px dotted #fff200; outline-offset: 6px; }

.btn-hint{
  margin: 0;
  font-family: var(--retro);
  font-size: 12px;
  color: #ffffff;
  text-shadow: 0 2px 5px rgba(0, 30, 10, .9), 0 0 10px rgba(0,0,0,.7);
  letter-spacing: .06em;
}

/* ============================================================
   计数器 / 跑马灯 / toast
   ============================================================ */

.hits{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
.hits-lcd{
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: #7dff9b;
  background: #06170c;
  border: 2px inset #4d6b56;
  border-radius: 3px;
  padding: 5px 10px;
  text-shadow: 0 0 8px #35ff6a;
}
.hits-lcd b{ color: #e9ff5c; font-weight: 700; }

.marquee{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 35;
  background: #0a1c46;
  border-top: 3px solid #ffe066;
  border-bottom: 3px solid #ffe066;
  overflow: hidden;
  height: 30px;
  display: flex;
  align-items: center;
}
.marquee-track{
  display: flex;
  white-space: nowrap;
  animation: marqueeRun 26s linear infinite;
}
.marquee-track span{
  font-family: var(--retro);
  font-size: 14px;
  color: #ffe066;
  padding-right: 40px;
  text-shadow: 0 0 8px rgba(255, 224, 102, .6);
}
@keyframes marqueeRun{ from{ transform: translateX(0); } to{ transform: translateX(-50%); } }

.toast{
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 46px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 660px);
  padding: 10px 12px 10px 16px;
  background: #fffbe8;
  border: 3px solid #8a6d00;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 20, 8, .45);
  font-family: var(--retro);
  font-size: 13px;
  line-height: 1.55;
  color: #4a3800;
}
.toast[hidden]{ display: none; }
.toast code{
  font-family: var(--mono);
  background: #f0e6c0;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid #d6c68e;
}

/* 光标星光 */
.sparkle{
  position: fixed;
  z-index: 80;
  pointer-events: none;
  font-size: 14px;
  line-height: 1;
  color: #fff9b0;
  text-shadow: 0 0 8px #ffe066, 0 0 16px #ff9de0;
  animation: sparkleFade .85s ease-out forwards;
}
@keyframes sparkleFade{
  0%  { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  100%{ opacity: 0; transform: translate(-50%, -160%) scale(.3) rotate(140deg); }
}

/* ============================================================
   小游戏界面（暗世界 / 三角符文风：纯黑底 + 白描边 + 像素贴图）
   ============================================================ */

.game-screen{
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;      /* 内容超高时从顶部开始，而不是被上下截断 */
  justify-content: center;
  padding: 12px;
  overflow: auto;
  background: #05030a;
}
.game-screen[hidden]{ display: none; }

.game-bg{
  position: fixed;
  inset: 0;
  background-image: url("../assets/bliss.jpg");
  background-size: cover;
  background-position: center 60%;
  filter: blur(6px) saturate(.5) brightness(.35) hue-rotate(220deg);
  transform: scale(1.06);
  z-index: -1;
}
.game-bg::after{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 45%, rgba(60, 30, 110, .35), rgba(3, 1, 8, .92));
}

.game-frame{
  /* 让整局（棋盘 + HUD）正好塞进视口高度，不用滚动 */
  width: min(920px, 100%, calc((100vh - 275px) * 1.2857 + 30px));
  margin: auto;
  background: #000000;
  border: 4px solid #ffffff;
  box-shadow: 0 0 0 4px #000000, 0 18px 50px rgba(0, 0, 0, .8);
  font-family: var(--retro);
  color: #ffffff;
}

.game-titlebar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #000000;
  border-bottom: 3px solid #ffffff;
  padding: 7px 8px 7px 12px;
  user-select: none;
}
.game-titlebar-text{
  font-family: var(--retro);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-titlebar-btns{ display: flex; gap: 6px; flex: 0 0 auto; }
.tb-btn{
  width: 26px; height: 24px;
  font-family: var(--retro);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  background: #000000;
  border: 2px solid #ffffff;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.tb-btn:hover{ background: #ffffff; color: #000000; }
.tb-close{ margin-left: 2px; }

.game-body{ padding: 12px; background: #000000; }

/* --- HUD --- */
.game-hud{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  background: #000000;
  border: 3px solid #ffffff;
  padding: 8px 14px;
  margin-bottom: 8px;
}
.score{ display: flex; align-items: center; gap: 10px; font-family: var(--retro); }
.score-blue{ justify-content: flex-start; }
.score-red{ justify-content: flex-end; }
.score-name{
  font-size: 12px;
  letter-spacing: .04em;
  color: #ffffff;
  white-space: nowrap;
}
.score-name em{ font-style: normal; font-weight: 700; }
.score-blue .score-name em{ color: #7ec8ff; }
.score-red .score-name em{ color: #ff8f8f; }
.score-num{
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  min-width: 1.6em;
  text-align: center;
}
.score-blue .score-num{ color: #5cc0ff; }
.score-red  .score-num{ color: #ff6b6b; }

.hud-center{ text-align: center; }
.timer{
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  color: #ffe066;
  line-height: 1;
}
.timer.warning{ color: #ff6b6b; animation: timerFlash .5s steps(1) infinite; }
@keyframes timerFlash{ 0%,100%{ opacity: 1; } 50%{ opacity: .35; } }
.timer-label{
  font-size: 11px;
  color: #ffffff;
  letter-spacing: .16em;
  margin-top: 4px;
  opacity: .85;
}

/* --- 进度条 --- */
.bar{
  display: flex;
  height: 16px;
  border: 3px solid #ffffff;
  background: #000000;
  margin-bottom: 10px;
  overflow: hidden;
}
.bar-blue, .bar-red, .bar-neutral{ transition: width .18s linear; height: 100%; }
.bar-blue{ background: #2f74de; }
.bar-red{ background: #d8344c; }
.bar-neutral{ background: repeating-linear-gradient(90deg, #3b2a5e, #3b2a5e 6px, #2a1d45 6px, #2a1d45 12px); }

/* --- canvas --- */
.canvas-wrap{
  position: relative;
  border: 3px solid #ffffff;
  background: #150f26;
  overflow: hidden;
  line-height: 0;
}
#gameCanvas{
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* 游戏里左上角的卢斯卡德 */
.game-rouxls{
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
}
.game-rouxls img{
  width: clamp(46px, 6vw, 66px);
  height: auto;
  image-rendering: pixelated;
  margin-left: 2px;
  margin-top: 2px;
  /* 黑底上给像素画描一圈白边，不然深蓝色的卢斯卡德会糊进背景 */
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff)
          drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff);
  animation: peekSmall 5s ease-in-out infinite;
}
@keyframes peekSmall{
  0%, 100%{ transform: translateX(-22%); }
  28%, 70%{ transform: translateX(0); }
}
.game-bubble{
  margin: 10px 0 0 6px;
  max-width: min(52vw, 340px);
  background: #000000;
  border: 3px solid #ffffff;
  padding: 8px 12px;
  font-family: var(--kai);
  font-style: italic;
  font-size: clamp(12px, 1.35vw, 15px);
  line-height: 1.45;
  color: #ffffff;
}

/* --- 遮罩层 --- */
.overlay{
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, .82);
  line-height: 1.5;
}
.overlay[hidden]{ display: none; }
.overlay-card{
  width: min(580px, 100%);
  background: #000000;
  border: 4px solid #ffffff;
  padding: 20px 22px 22px;
  text-align: center;
  color: #ffffff;
}
.overlay-card h2{
  margin: 0 0 12px;
  font-family: var(--kai);
  font-style: italic;
  font-size: clamp(24px, 3.2vw, 34px);
  letter-spacing: .08em;
  color: #ffffff;
}
.overlay-card p{
  margin: 0 0 14px;
  font-family: var(--retro);
  font-size: 14px;
  line-height: 1.7;
  color: #ffffff;
}
.ov-keys{
  text-align: left;
  margin: 0 auto 18px;
  padding: 12px 14px 12px 30px;
  max-width: 460px;
  background: #000000;
  border: 3px solid #ffffff;
  font-family: var(--retro);
  font-size: 12.5px;
  line-height: 2;
  color: #ffffff;
}
.ov-keys[hidden]{ display: none; }
kbd{
  font-family: var(--mono);
  font-size: 11px;
  background: #ffffff;
  border: none;
  border-radius: 0;
  padding: 1px 6px;
  margin: 0 2px;
  color: #000000;
}
.star-item{ color: #ffe066; }

.ov-btns{ display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ov-btn{
  font-family: var(--retro);
  font-size: 15px;
  font-weight: 700;
  padding: 10px 24px;
  cursor: pointer;
  color: #ffffff;
  background: #000000;
  border: 3px solid #ffffff;
}
.ov-btn:hover{ background: #ffffff; color: #000000; }
.ov-primary{ color: #000000; background: #ffffff; }
.ov-primary:hover{ background: #ffe066; border-color: #ffe066; }

.game-foot{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-family: var(--retro);
  font-size: 12px;
  color: #ffffff;
  opacity: .9;
}
.foot-legend{ display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.dot{ width: 11px; height: 11px; display: inline-block; border: 1px solid #ffffff; }
.dot-blue{ background: #2f74de; }
.dot-red{ background: #d8344c; }
.dot-neutral{ background: #3b2a5e; }

/* --- HUD 头像 --- */
.hud-avatar{
  height: 40px;
  width: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.hud-avatar[src=""]{ display: none; }

/* --- 回合提示条 --- */
.turn-strip{
  display: flex;
  align-items: center;
  gap: 10px;
  border: 3px solid #ffffff;
  background: #000000;
  padding: 7px 14px;
  margin-bottom: 8px;
  border-left-width: 12px;
  transition: border-left-color .15s linear;
}
.turn-strip[hidden]{ display: none; }
.turn-strip.is-blue{ border-left-color: #3f8cf0; }
.turn-strip.is-red{ border-left-color: #e0503f; }
.turn-avatar{
  height: 36px;
  width: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.turn-avatar[src=""]{ display: none; }
.turn-who{
  font-family: var(--retro);
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}
.step-pill{
  background: #ffe066;
  color: #000000;
  font-family: var(--retro);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 11px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.step-pill b{ font-size: 1.25em; }
.step-pill.spent{ background: #4a4a5e; color: #cfcfdf; }
.bag{ display: flex; gap: 4px; flex: 0 0 auto; }
.bag i{
  width: 23px; height: 23px;
  display: grid; place-items: center;
  font-style: normal;
  font-size: 12px; font-weight: 700;
  border: 2px solid #ffffff;
  color: #ffffff;
}
.bag i.used{ opacity: .22; text-decoration: line-through; }
.turn-hint{
  font-family: var(--retro);
  font-size: 12px;
  color: #ffffff;
  opacity: .7;
  margin-left: auto;
  text-align: right;
}

/* --- 选角面板 --- */
.setup-panel{
  position: absolute;
  inset: 0;
  z-index: 8;
  background: #08050f;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  line-height: 1.5;
}
.setup-panel[hidden]{ display: none; }
.setup-head{ text-align: center; }
.setup-head h3{
  margin: 0 0 2px;
  font-family: var(--kai);
  font-style: italic;
  font-size: clamp(19px, 2.4vw, 26px);
  color: #ffffff;
  letter-spacing: .08em;
}
.setup-head p{
  margin: 0;
  font-family: var(--retro);
  font-size: 12px;
  color: #b9a8e8;
}
.setup-row{ display: flex; align-items: center; gap: 12px; }
.setup-tag{
  flex: 0 0 auto;
  font-family: var(--retro);
  font-size: 12px;
  font-weight: 700;
  color: #000000;
  padding: 4px 9px;
  white-space: nowrap;
}
.tag-blue{ background: #7ec8ff; }
.tag-red{ background: #ff9a8c; }
.roster{ display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; }

.card{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 92px;
  padding: 8px 4px 6px;
  background: #000000;
  border: 2px solid #6b6b8a;
  cursor: pointer;
  font-family: var(--retro);
  transition: transform .08s ease, border-color .12s linear, background .12s linear;
}
.card img{
  height: 58px;
  width: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}
.card span{
  font-size: 11px;
  line-height: 1.15;
  color: #ffffff;
  text-align: center;
  pointer-events: none;
  word-break: break-word;
}
.card:hover{ transform: translateY(-3px); border-color: #ffffff; }
.card.is-picked{ border-color: #ffe066; background: #2a2410; box-shadow: 0 0 0 2px #ffe066 inset; }
.card.is-taken{ opacity: .28; cursor: not-allowed; transform: none; }
.card.is-taken:hover{ transform: none; border-color: #6b6b8a; }

.setup-foot{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 6px;
}
.rule-note{
  font-family: var(--retro);
  font-size: 12.5px;
  line-height: 1.85;
  color: #cbbdf0;
  text-align: left;
}
.rule-note b{ color: #ffffff; }
.mode-pick{ display: flex; align-items: center; gap: 8px; }
.mode-label{
  font-family: var(--retro);
  font-size: 12px;
  color: #b9a8e8;
}
.mode-btn{
  font-family: var(--retro);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  color: #ffffff;
  background: #000000;
  border: 2px solid #ffffff;
  cursor: pointer;
}
.mode-btn.is-on{ background: #ffffff; color: #000000; }
#btnStartMatch{ font-size: 15px; padding: 10px 26px; }
#btnStartMatch:disabled{ opacity: .35; cursor: not-allowed; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 720px){
  #stage{ padding: 62px 12px 66px; }
  .rouxls-bubble{ max-width: 48vw; padding: 9px 11px; }
  .tacky-btn{ padding: 13px 30px 15px; letter-spacing: .14em; }
  .tacky-star{ width: 46px; height: 46px; font-size: 12px; top: -14px; right: -12px; }
  .game-screen{ padding: 6px; align-items: flex-start; }
  .game-body{ padding: 8px; }
  .score-num{ font-size: 19px; }
  .timer{ font-size: 21px; }
  .score-name{ font-size: 10px; }
  .game-bubble{ max-width: 44vw; font-size: 10.5px; padding: 5px 8px; }
}
@media (max-width: 520px){
  .rouxls-bubble{ display: none; }
  .score-name em{ display: none; }
}
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}


/* ============================================================
   小游戏选择页  (/games/)
   ============================================================ */

body.page-games{
  overflow-x: hidden;
}

.games-hero{
  position: relative;
  z-index: 5;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 20px 96px;
}

/* --- 面包屑 --- */
.crumb{
  font-family: var(--retro);
  font-size: 14px;
  color: #eaf7ea;
  text-shadow: 1px 1px 0 #05300f, 2px 2px 6px rgba(0,0,0,.55);
}
.crumb a{ color: #ffe066; text-decoration: none; border-bottom: 1px dashed #ffe066; }
.crumb a:hover{ color: #fff; border-bottom-color: #fff; }
.crumb span{ opacity: .7; margin: 0 5px; }
.crumb-top{ margin-bottom: 2px; }

.title-sm{ font-size: clamp(40px, 7vw, 84px) !important; margin: 0 !important; }

/* 主页上的那一行"当前位置" */
.crumb + .subtitle{ margin-top: -6px; }

/* --- 卡片网格 --- */
.game-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 330px));
  justify-content: center;
  gap: 22px;
  width: 100%;
  max-width: 1080px;
  margin: 16px 0 8px;
}

.game-card{
  --edge: #efe6c8;
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 4px outset var(--edge);
  border-radius: 6px;
  background:
    linear-gradient(180deg, #eaf6ff 0%, #cfe6fb 46%, #b6d6f5 54%, #dcecfc 100%);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.9),
    inset -2px -2px 0 rgba(0,50,90,.25),
    0 8px 0 #1c4f7a,
    0 14px 24px rgba(0,0,0,.42);
  overflow: hidden;
  transform: translateY(0);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
  animation: gcIn .5s ease backwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes gcIn{
  from{ opacity: 0; transform: translateY(22px) scale(.96); }
  to  { opacity: 1; transform: translateY(0) scale(1); }
}

.game-card.is-ready{ cursor: pointer; }
.game-card.is-ready:hover{
  transform: translateY(-6px) scale(1.02);
  filter: brightness(1.06) saturate(1.08);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.9),
    inset -2px -2px 0 rgba(0,50,90,.25),
    0 14px 0 #1c4f7a,
    0 22px 32px rgba(0,0,0,.5);
}
.game-card.is-ready:active{
  transform: translateY(4px) scale(.995);
  border-style: inset;
  box-shadow: inset 2px 2px 0 rgba(0,50,90,.35), 0 2px 0 #1c4f7a;
}
.game-card.is-ready:focus-visible{ outline: 4px dotted #fff200; outline-offset: 5px; }

.game-card.is-soon{
  filter: grayscale(.72) brightness(.94);
  opacity: .82;
  cursor: not-allowed;
}

/* --- 卡片顶部：角色头像 --- */
.gc-art{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 116px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 10px, rgba(255,255,255,0) 10px 20px),
    linear-gradient(180deg, #7fb6e6, #3f7cb8);
  border-bottom: 3px groove rgba(255,255,255,.55);
}

.gc-sprite{
  width: 84px;
  height: 84px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.28));
}
.gc-sprite-empty{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px; height: 84px;
  font-family: var(--mono);
  font-size: 52px;
  font-weight: 700;
  color: rgba(255,255,255,.75);
  text-shadow: 2px 2px 0 rgba(0,0,0,.3);
}

.gc-badge{
  position: absolute;
  top: 8px; right: -30px;
  width: 118px;
  padding: 4px 0;
  transform: rotate(38deg);
  background: #ff2d2d;
  color: #fff8c9;
  font-family: var(--retro);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.45);
  animation: badgePulse 1.4s ease-in-out infinite;
}
@keyframes badgePulse{
  0%, 100%{ background: #ff2d2d; }
  50%     { background: #ffb300; color: #4a2500; }
}

/* --- 卡片正文 --- */
.gc-body{
  flex: 1;
  padding: 12px 15px 6px;
  text-align: center;
}

.gc-tag{
  display: inline-block;
  padding: 2px 10px;
  border: 2px outset #efe6c8;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffe98a, #f5c518);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #6b4a00;
}

.gc-name{
  margin: 8px 0 0;
  font-family: var(--kai);
  font-style: italic;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #0d3c66;
  text-shadow: 1px 1px 0 #fff, 2px 3px 0 rgba(13,60,102,.22);
}

.gc-title{
  margin: 0 0 8px;
  font-family: var(--kai);
  font-style: italic;
  font-size: 14px;
  letter-spacing: .1em;
  color: #2b6ea8;
}

.gc-desc{
  margin: 0;
  font-family: var(--retro);
  font-size: 13px;
  line-height: 1.65;
  text-align: left;
  color: #14364f;
}

.gc-icons{
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 2px;
}
.gc-icons img{
  width: 30px; height: 30px;
  object-fit: contain;
  image-rendering: pixelated;
  padding: 2px;
  border: 2px inset rgba(255,255,255,.7);
  background: rgba(255,255,255,.45);
  border-radius: 4px;
}

/* --- 卡片底部按钮条 --- */
.gc-foot{
  padding: 8px 12px 12px;
  text-align: center;
}

.gc-go{
  display: block;
  padding: 9px 0 10px;
  border: 3px outset #efe6c8;
  border-radius: 4px;
  background: linear-gradient(180deg, #7ddc6a 0%, #33a02c 48%, #1e6b1a 52%, #5ec44f 100%);
  color: #f4ffe9;
  font-family: var(--kai);
  font-style: italic;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .16em;
  text-shadow: 1px 1px 0 #0c3d09, 2px 2px 0 rgba(0,0,0,.35);
  box-shadow: 0 4px 0 #14500f, 0 7px 12px rgba(0,0,0,.35);
  transition: transform .1s ease, filter .1s ease;
}
.game-card.is-ready:hover .gc-go{
  filter: brightness(1.12);
  transform: translateY(-1px);
}
.gc-go-off{
  background: linear-gradient(180deg, #c9cfd6 0%, #9aa3ad 48%, #7d868f 52%, #b6bdc5 100%);
  color: #f0f3f6;
  text-shadow: 1px 1px 0 #59616a;
  box-shadow: 0 4px 0 #6a737c, 0 7px 12px rgba(0,0,0,.28);
}

/* --- 底部 --- */
.hits-center{
  margin-top: 6px;
  justify-content: center;
}

.games-foot{ margin: 4px 0 0; }

.back-btn{
  display: inline-block;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .06em;
}

.games-tip{
  margin: 4px 0 0;
  max-width: 620px;
  text-align: center;
  font-family: var(--retro);
  font-size: 13px;
  line-height: 1.7;
  color: #eaf7ea;
  text-shadow: 1px 1px 0 #05300f, 2px 2px 6px rgba(0,0,0,.5);
}

/* 离开主页时淡出 */
body.leaving #stage{ animation: leaveFade .32s ease forwards; }
@keyframes leaveFade{ to{ opacity: 0; transform: scale(.985); } }

/* 小游戏页面：整页就是那块 game-screen，去掉多余留白 */
body.page-game{ background: #0a2a12; }
body.page-game .game-screen{ position: relative; min-height: 100vh; min-height: 100dvh; }

@media (max-width: 640px){
  .games-hero{ padding: 26px 12px 84px; gap: 10px; }
  .game-grid{ gap: 16px; }
  .gc-name{ font-size: 25px; }
  .gc-art{ height: 96px; }
  .gc-sprite, .gc-sprite-empty{ width: 68px; height: 68px; }
}


.mini-btn{
  flex: 0 0 auto;
  font-family: var(--retro);
  font-size: 12px;
  line-height: 1;
  min-width: 28px;
  padding: 6px 7px;
  cursor: pointer;
  color: #10304d;
  background: linear-gradient(180deg, #ffffff, #cfdced);
  border: 2px outset #ffffff;
  border-radius: 3px;
}

/* ============================================================
   简约现代风 · 主菜单  (基于 fuhua.jpg)
   ============================================================ */

:root{
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
          "Noto Sans CJK SC", "Source Han Sans SC", "WenQuanYi Micro Hei",
          Roboto, sans-serif;
  --ink: #ffffff;
  --glass-bg: rgba(255,255,255,.11);
  --glass-bg-strong: rgba(255,255,255,.20);
  --glass-line: rgba(255,255,255,.26);
  --glass-shadow: 0 8px 32px rgba(8,22,44,.20);
}

body.m-home{
  font-family: var(--sans);
  background: #0c1a2c;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- 背景 --- */
.m-bg{
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("../assets/fuhua.jpg");
  background-size: cover;
  background-position: center 32%;
  background-repeat: no-repeat;
  background-color: #0c1a2c;
}
.m-bg::after{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(10,24,45,.38) 0%,
      rgba(10,24,45,.10) 26%,
      rgba(10,24,45,.04) 48%,
      rgba(10,24,45,.14) 72%,
      rgba(10,24,45,.52) 100%);
}

/* --- 顶部磨砂玻璃条 --- */
.m-bar{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px clamp(14px, 3vw, 30px);
  padding-top: calc(11px + env(safe-area-inset-top, 0px));
  background: rgba(8,17,32,.52);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  backdrop-filter: blur(26px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 10px 34px rgba(4,12,26,.34);
}

.m-site{
  flex: none;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .08em;
  color: #fff;
  text-shadow: 0 1px 6px rgba(4,12,26,.55);
  white-space: nowrap;
  user-select: none;
}

/* --- 菜单按钮 --- */
.m-nav{
  display: flex;
  align-items: center;
  gap: 10px;
}

.m-btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 17px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.10);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 6px 20px rgba(4,12,26,.26);
  color: #fff;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s cubic-bezier(.2,.8,.3,1),
              background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.m-btn:hover{
  background: rgba(255,255,255,.19);
  border-color: rgba(255,255,255,.34);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 10px 26px rgba(4,12,26,.32);
}
.m-btn:active{ transform: translateY(0) scale(.985); }
.m-btn:focus-visible{ outline: 2px solid rgba(255,255,255,.85); outline-offset: 3px; }

.m-btn-primary{
  background: rgba(255,255,255,.86);
  border-color: rgba(255,255,255,.9);
  color: #12314f;
  font-weight: 600;
  box-shadow: inset 0 1px 0 #fff, 0 8px 24px rgba(8,22,44,.26);
}
.m-btn-primary:hover{
  background: #fff;
  border-color: #fff;
  color: #0d2740;
}
/* 下载按钮：绿色 */
#btnDownload{
  background: linear-gradient(180deg,#5fd07a,#2fa34c);
  border-color: rgba(120,240,160,.75);
  color: #fff; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 24px rgba(20,90,45,.4);
}
#btnDownload:hover{
  background: linear-gradient(180deg,#72e08c,#37b857);
  border-color: rgba(150,255,185,.9);
}

.m-ico{
  width: 17px; height: 17px;
  flex: none;
  fill: currentColor;
  opacity: .92;
}
.m-ico-line{
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.m-ico-fill{ fill: currentColor; stroke: none; }

/* 「即将上线」小角标 */
.m-soon{
  margin-left: 2px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255,199,92,.22);
  border: 1px solid rgba(255,208,120,.5);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: .04em;
  color: #ffe7b4;
}

/* --- 标题 --- */
.m-hero{
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 96px 24px 120px;
  text-align: center;
  pointer-events: none;
}

.m-title{
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(36px, 6.6vw, 74px);
  font-weight: 600;
  font-style: normal;
  letter-spacing: .04em;
  line-height: 1.16;
  color: #fff;
  text-shadow: 0 2px 10px rgba(8,22,44,.42), 0 12px 44px rgba(8,22,44,.36);
}

.m-sub{
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 400;
  letter-spacing: .34em;
  text-indent: .34em;
  color: rgba(255,255,255,.82);
  text-shadow: 0 1px 8px rgba(8,22,44,.5);
}

/* --- 底部 --- */
.m-foot{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px clamp(14px, 3vw, 30px);
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}

.m-chip{
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 6px 20px rgba(8,22,44,.16);
  font-size: 13px;
  color: rgba(255,255,255,.9);
}
.m-chip b{ color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }

.m-stats{ letter-spacing: .02em; }
.m-sep{
  display: inline-block;
  width: 1px; height: 12px;
  background: rgba(255,255,255,.32);
  margin: 0 2px;
}

.m-audio-text{
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  max-width: 46vw;
}
.m-audio-text > span:first-child{
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-audio-sub{
  font-size: 11px;
  color: rgba(255,255,255,.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 播放指示点 */
.m-dot{
  position: relative;
  width: 8px; height: 8px;
  flex: none;
  border-radius: 50%;
  background: rgba(255,255,255,.42);
  transition: background .2s ease;
}
.m-dot.playing{
  background: #7fe3a4;
  box-shadow: 0 0 0 0 rgba(127,227,164,.7);
  animation: mPulse 1.9s ease-out infinite;
}
@keyframes mPulse{
  0%  { box-shadow: 0 0 0 0 rgba(127,227,164,.6); }
  70% { box-shadow: 0 0 0 9px rgba(127,227,164,0); }
  100%{ box-shadow: 0 0 0 0 rgba(127,227,164,0); }
}

.m-mini{
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  flex: none;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, transform .12s ease;
}
.m-mini:hover:not(:disabled){ background: rgba(255,255,255,.26); }
.m-mini:active:not(:disabled){ transform: scale(.92); }
.m-mini:disabled{ opacity: .38; cursor: default; }
.m-mini.attention{ animation: mWiggle .5s ease 3; }
@keyframes mWiggle{
  0%,100%{ transform: rotate(0); }
  25%{ transform: rotate(-13deg); }
  75%{ transform: rotate(13deg); }
}

/* --- 提示条 --- */
.m-toast{
  position: fixed;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 14px 12px 18px;
  border-radius: 14px;
  background: rgba(16,30,50,.55);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 12px 40px rgba(4,12,26,.4), inset 0 1px 0 rgba(255,255,255,.16);
  color: #fff;
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.6;
  animation: mToastIn .26s cubic-bezier(.2,.9,.3,1);
}
.m-toast[hidden]{ display: none; }
.m-toast code{
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255,255,255,.16);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}
@keyframes mToastIn{
  from{ opacity: 0; transform: translate(-50%, 10px); }
  to  { opacity: 1; transform: translate(-50%, 0); }
}

/* 离开时的淡出 */
body.m-home.leaving .m-hero,
body.m-home.leaving .m-foot{ animation: mLeave .3s ease forwards; }
@keyframes mLeave{ to{ opacity: 0; transform: translateY(-6px); } }

/* --- 窄屏 --- */
@media (max-width: 720px){
  .m-bar{ padding: 9px 14px; gap: 8px; }
  .m-site{ font-size: 13.5px; letter-spacing: .05em; }
  .m-nav{ gap: 7px; }
  .m-btn{ padding: 8px 13px; font-size: 13.5px; gap: 6px; }
  .m-ico{ width: 15px; height: 15px; }
  .m-soon{ display: none; }
  .m-sub{ letter-spacing: .24em; text-indent: .24em; }

  .m-foot{
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .m-chip{ justify-content: center; }
  .m-audio{ width: 100%; }
  .m-audio-text{ max-width: none; flex: 1; }
  .m-toast{ bottom: 132px; }
}

@media (prefers-reduced-motion: reduce){
  .m-dot.playing{ animation: none; }
  .m-btn{ transition: none; }
}


/* --- 顶部加一点点压暗，让深色菜单条更稳 --- */
body.m-home:not(.m-games) .m-bg::before{
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 110px;
  background: linear-gradient(180deg, rgba(4,12,26,.34), rgba(4,12,26,0));
  pointer-events: none;
}
