/* ============================================================
   手机适配层
   设计画布仍是 1920×1080（等比缩放那套不动），这里只补三件事：
     1. 触屏：去掉双击缩放 / 点击延迟 / 蓝色高亮
     2. 竖屏：提示「请横屏」（手机上竖屏缩放比只有 0.2，字看不清）
     3. 长按卡牌：放大到能读的尺寸（横屏下卡面文字只有 5px）
   ============================================================ */

html, body {
  touch-action: manipulation;       /* 去掉双击缩放，消除 300ms 点击延迟 */
  overscroll-behavior: none;        /* 别把整页下拉刷新带出来 */
  -webkit-tap-highlight-color: transparent;
}
.ocard, .eqcell, .pile, button, .crystal { touch-action: manipulation; }

/* ---------- 竖屏提示：只有粗指针（手机/平板）竖屏时才出现 ---------- */
#mgate { display: none; }
@media (pointer: coarse) and (orientation: portrait) {
  #mgate { display: flex; }
}
#mgate.off { display: none !important; }        /* 点过「就这样玩」就不再挡着 */
#mgate {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  z-index: 9997; align-items: center; justify-content: center;
  flex-direction: column; gap: 22px; text-align: center;
  background: radial-gradient(ellipse at 50% 40%, #241d16 0%, #0c0a08 75%);
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; color: #E8DCC0;
  padding: 24px;
}
#mgate .mgicon {
  width: 96px; height: 62px; border: 3px solid #C9A24B; border-radius: 12px;
  position: relative; opacity: .95;
}
#mgate .mgicon::after {
  content: '↻'; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); font-size: 30px; color: #E8C976;
}
#mgate .mgtitle { font-size: 21px; letter-spacing: 3px; color: #E8C976; }
#mgate .mgdesc { font-size: 14px; line-height: 1.9; color: #9A8F7A; max-width: 300px; }
#mgate .mgdesc b { color: #E8DCC0; font-weight: 600; }
#mgate button {
  font-family: inherit; font-size: 14px; padding: 11px 20px; border-radius: 4px;
  color: #E8DCC0; background: rgba(232,200,118,.06);
  border: 1px solid rgba(201,162,75,.55); cursor: pointer;
}

/* ---------- 全屏按钮：拿回地址栏占掉的那一条高度 ---------- */
#mfs {
  display: none; position: absolute; right: max(10px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 9996; font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 12px; letter-spacing: 2px; padding: 8px 13px; border-radius: 4px;
  color: #E8DCC0; background: rgba(20,17,15,.72);
  border: 1px solid rgba(201,162,75,.5); cursor: pointer;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
@media (pointer: coarse) { #mfs { display: block; } }

/* ---------- 长按放大：卡牌按原始 180×252 渲染，再整体放大到能读 ---------- */
#mzoom {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  z-index: 9998; display: none; align-items: center; justify-content: center;
  background: rgba(6,4,3,.86);
}
#mzoom.show { display: flex; }
#mzoom .mzbox { position: relative; transform-origin: 50% 50%; }
#mzoom .mzhint {
  position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  font-family: "Noto Serif SC", "Songti SC", serif; font-size: 12px;
  letter-spacing: 3px; color: #9A8F7A; white-space: nowrap;
}
