/* 象棋玩法多种 · 全局样式
   移动端优先，竖屏铺满，无顶部标题栏。 */

:root {
  --orange: #FF8A3D;
  --orange-2: #F26A18;
  --orange-soft: #FFE6D2;
  --ink: #33241A;
  --ink2: #6E5546;
  --ink3: #A18A79;
  --line: rgba(196, 138, 80, .18);
  --card: #FFFFFF;
  --red: #C0301F;
  --black: #241F1B;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --sh-card: 0 6px 18px rgba(166, 96, 34, .10);
  --sh-btn: 0 8px 18px rgba(242, 106, 24, .30);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { background: #FFEFDC; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(120% 52% at 50% -8%, #FFD5A8 0%, rgba(255, 213, 168, 0) 62%),
    radial-gradient(90% 40% at 100% 108%, #FFDCC0 0%, rgba(255, 220, 192, 0) 70%),
    linear-gradient(180deg, #FFF8EF 0%, #FFF0DE 46%, #FFE4C8 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  min-height: 100vh;
  min-height: 100dvh;
}
button { font-family: inherit; font-size: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; }
input { font-family: inherit; }

/* ============ 装饰浮子 ============ */
.bgdeco { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.bgdeco span {
  position: absolute;
  font-family: "STKaiti", "Kaiti SC", "KaiTi", serif;
  font-weight: 700;
  color: rgba(214, 138, 74, .13);
  user-select: none;
}
.bgdeco span:nth-child(1) { font-size: 128px; left: -26px; top: 12%; transform: rotate(-12deg); }
.bgdeco span:nth-child(2) { font-size: 96px; right: -18px; top: 44%; transform: rotate(10deg); color: rgba(150, 106, 66, .10); }
.bgdeco span:nth-child(3) { font-size: 150px; left: 22%; bottom: -46px; transform: rotate(6deg); color: rgba(214, 138, 74, .08); }

/* ============ 布局 ============ */
.app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(10px + var(--safe-top)) 16px calc(10px + var(--safe-bottom));
}

/* ============ 玩家卡片 ============ */
.hud { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.pcard {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  box-shadow: var(--sh-card);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.pcard.me { background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 246, 236, .92)); }

.ava {
  position: relative;
  flex: 0 0 auto;
  width: 36px; height: 36px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  font-family: "STKaiti", "Kaiti SC", "KaiTi", serif;
  font-size: 20px; font-weight: 700;
}
.ava.dark { background: linear-gradient(135deg, #5A4B3F, #221C17); color: #F7E7C8; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.ava.red { background: linear-gradient(135deg, #FF9C58, #F0652A); color: #fff; box-shadow: 0 3px 8px rgba(240, 100, 40, .35); }
.ava img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.ava .mp-icon { width: 20px; height: 20px; }

.pm { min-width: 0; flex: 1 1 auto; }
.pn {
  font-size: 14px; font-weight: 800; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ps { font-size: 11px; color: var(--ink3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.turnchip {
  flex: 0 0 auto;
  font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px;
  color: var(--ink3);
  background: rgba(190, 150, 110, .12);
  transition: all .2s ease;
}
.turnchip.hot { color: #fff; background: linear-gradient(135deg, #FF9A52, #F06A20); box-shadow: 0 4px 10px rgba(240, 106, 32, .30); }

.gbtn {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--line);
  box-shadow: var(--sh-card);
  color: var(--ink2);
  transition: transform .12s ease, background .2s;
}
.gbtn .mp-icon { width: 21px; height: 21px; }
.glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  color: inherit;
}
.gbtn:active { transform: scale(.92); background: #FFF3E8; }
.gbtn.off { color: #C7B3A2; }

/* ============ 模式选择 ============ */
.chips { display: flex; gap: 6px; flex: 0 0 auto; }
.chip {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 32px;
  height: 32px;
  border-radius: 11px;
  color: var(--ink2);
  background: rgba(255, 255, 255, .74);
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: transform .12s ease, background .2s, color .2s, box-shadow .2s;
}
.chip.on {
  color: #fff;
  background: linear-gradient(135deg, #FF9C58, #F26A18);
  border-color: transparent;
  box-shadow: 0 5px 12px rgba(242, 106, 24, .30);
}
.chip:active { transform: scale(.96); }

/* ============ 棋盘 ============ */
.boardwrap {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  max-width: 430px;
  margin: auto auto;
}

.board {
  position: relative;
  width: 100%;
  aspect-ratio: 9.04 / 10.04;
  border-radius: 18px;
  background:
    radial-gradient(135% 88% at 28% 0%, #F8E7C6 0%, #EFD6A9 42%, #E2BE86 76%, #D2A66B 100%);
  box-shadow:
    inset 0 0 0 1px rgba(154, 104, 48, .30),
    inset 0 2px 10px rgba(255, 255, 255, .55),
    0 0 0 4px #D7A468,
    0 0 0 5px rgba(138, 86, 38, .28),
    0 16px 30px -8px rgba(150, 84, 24, .28),
    0 3px 8px rgba(150, 84, 24, .10);
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.board::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: repeating-linear-gradient(92deg, rgba(150, 96, 40, .05) 0 2px, rgba(255, 255, 255, 0) 2px 11px);
}
#bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.layer { position: absolute; inset: 0; }
#marks { z-index: 1; }
#pieces { z-index: 2; }
#dots { z-index: 3; }

/* 棋子 */
.pc {
  position: absolute;
  width: var(--d, 34px);
  height: var(--d, 34px);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  font-family: "STKaiti", "Kaiti SC", "KaiTi", "Songti SC", "Noto Serif SC", serif;
  font-weight: 700;
  font-size: calc(var(--d, 34px) * .56);
  line-height: 1;
  background: radial-gradient(circle at 34% 26%, #FFFDF6 0%, #FCF1D9 44%, #F0DDBA 78%, #E2C79C 100%);
  box-shadow:
    0 2px 3px rgba(92, 52, 16, .34),
    0 0 0 1px rgba(120, 78, 36, .42),
    inset 0 0 0 2px rgba(255, 255, 255, .62),
    inset 0 0 0 calc(var(--d, 34px) * .07) rgba(203, 158, 92, .30);
  transition: transform .14s ease, box-shadow .14s ease;
}
.pc.red { color: var(--red); text-shadow: 0 1px 0 rgba(255, 255, 255, .9); }
.pc.black { color: var(--black); text-shadow: 0 1px 0 rgba(255, 255, 255, .9); }
.pc.sel {
  transform: translate(-50%, -50%) scale(1.07);
  box-shadow:
    0 0 0 3px var(--orange),
    0 6px 14px rgba(242, 106, 24, .40),
    inset 0 0 0 2px rgba(255, 255, 255, .8);
  z-index: 4;
}
.pc.moved { animation: pop .22s ease; }
.pc.check {
  box-shadow:
    0 0 0 3px #E2372B,
    0 0 18px rgba(226, 55, 43, .55),
    inset 0 0 0 2px rgba(255, 255, 255, .8);
  animation: pulse 1s ease-in-out infinite;
}

.mark {
  position: absolute;
  width: calc(var(--d, 34px) * 1.0);
  height: calc(var(--d, 34px) * 1.0);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 138, 61, .18);
  box-shadow: inset 0 0 0 1.5px rgba(242, 106, 24, .34);
  animation: pop .2s ease;
}
.dot {
  position: absolute;
  width: calc(var(--d, 34px) * .30);
  height: calc(var(--d, 34px) * .30);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--orange);
  opacity: .72;
  box-shadow: 0 0 0 4px rgba(255, 138, 61, .16);
  animation: pop .16s ease;
}
.ring {
  position: absolute;
  width: calc(var(--d, 34px) * 1.02);
  height: calc(var(--d, 34px) * 1.02);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(242, 106, 24, .88);
  animation: pop .16s ease;
}
.hintr {
  position: absolute;
  width: calc(var(--d, 34px) * 1.14);
  height: calc(var(--d, 34px) * 1.14);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 3px dashed #2FA36B;
  box-shadow: 0 0 14px rgba(47, 163, 107, .40);
  animation: hintpulse .9s ease-in-out infinite;
  z-index: 5;
}

.banner {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(.7);
  opacity: 0;
  pointer-events: none;
  padding: 9px 24px;
  border-radius: 16px;
  background: linear-gradient(160deg, #FF9C52, #EE5E1A);
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 5px;
  text-indent: 5px;
  box-shadow: 0 14px 30px rgba(238, 94, 26, .42);
  transition: opacity .18s ease, transform .22s cubic-bezier(.2, 1.4, .4, 1);
  z-index: 8;
}
.banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ============ 状态条 ============ */
.bar { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.status {
  flex: 1 1 auto;
  min-width: 0;
  display: flex; align-items: center; gap: 7px;
  padding: 0 12px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line);
  box-shadow: var(--sh-card);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink2);
  white-space: nowrap;
  overflow: hidden;
}
.status b { color: var(--ink); font-weight: 800; }
.sdot {
  flex: 0 0 auto;
  width: 8px; height: 8px; border-radius: 50%;
  background: #26A65B;
  box-shadow: 0 0 0 3px rgba(38, 166, 91, .16);
  transition: background .2s;
}
.sdot.black { background: #3A332D; box-shadow: 0 0 0 3px rgba(58, 51, 45, .14); }
.sdot.warn { background: #E2372B; box-shadow: 0 0 0 3px rgba(226, 55, 43, .16); animation: pulse 1s infinite; }

.acts { display: flex; gap: 6px; flex: 0 0 auto; }
.abtn {
  width: 42px; height: 42px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--line);
  box-shadow: var(--sh-card);
  color: var(--ink2);
  transition: transform .12s ease, background .18s;
}
.abtn .mp-icon { width: 21px; height: 21px; }
.abtn:active { transform: scale(.9); background: #FFF1E4; }
.abtn:disabled { opacity: .42; }

.timer {
  flex: 0 0 auto;
  min-width: 44px;
  text-align: center;
  font-size: 15px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--orange-2);
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(255, 138, 61, .12);
}
.timer.low { color: #fff; background: #E2372B; animation: pulse .8s infinite; }

/* ============ 浮动提示 ============ */
.toast {
  position: fixed;
  left: 50%; bottom: calc(96px + var(--safe-bottom));
  transform: translate(-50%, 10px);
  max-width: 78vw;
  padding: 9px 16px;
  border-radius: 12px;
  background: rgba(44, 28, 16, .90);
  color: #fff;
  font-size: 13px;
  letter-spacing: .3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 90;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ 结算浮层 ============ */
.overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(46, 26, 10, .48);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
  z-index: 80;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.result {
  width: 100%; max-width: 320px;
  padding: 26px 20px 18px;
  border-radius: 26px;
  background: linear-gradient(180deg, #FFFFFF, #FFF8F1);
  box-shadow: 0 24px 60px rgba(60, 30, 10, .38), inset 0 0 0 1px rgba(255, 255, 255, .8);
  text-align: center;
  transform: translateY(14px) scale(.95);
  transition: transform .26s cubic-bezier(.2, 1.2, .4, 1);
}
.overlay.show .result { transform: translateY(0) scale(1); }
.rbadge {
  width: 66px; height: 66px;
  margin: 0 auto 12px;
  border-radius: 22px;
  display: grid; place-items: center;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 34px; font-weight: 700;
  color: #fff;
  background: linear-gradient(150deg, #FFB36B, #F0601A);
  box-shadow: 0 10px 22px rgba(240, 96, 26, .38);
}
.rbadge.lose { background: linear-gradient(150deg, #8A8079, #4A423B); box-shadow: 0 10px 22px rgba(60, 50, 40, .32); }
.rtitle { font-size: 21px; font-weight: 800; letter-spacing: 1px; }
.rsub { margin-top: 6px; font-size: 13px; color: var(--ink3); line-height: 1.6; }
.rrow { display: flex; gap: 10px; margin-top: 18px; }
.rbtn {
  flex: 1 1 0;
  height: 46px;
  border-radius: 14px;
  font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .12s ease;
}
.rbtn:active { transform: scale(.97); }
.rbtn.primary { color: #fff; background: linear-gradient(135deg, #FF9C58, #F26A18); box-shadow: var(--sh-btn); }
.rbtn.ghost { color: var(--ink2); background: rgba(190, 150, 110, .12); }
.rbtn .mp-icon { width: 18px; height: 18px; }

/* ============ 底部面板 ============ */
.sheet-mask {
  position: fixed; inset: 0;
  background: rgba(46, 26, 10, .42);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
  z-index: 85;
}
.sheet-mask.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 86;
  max-height: 82vh;
  overflow-y: auto;
  padding: 20px 18px calc(20px + var(--safe-bottom));
  border-radius: 26px 26px 0 0;
  background: linear-gradient(180deg, #FFFFFF, #FFF9F3);
  box-shadow: 0 -12px 40px rgba(60, 30, 10, .22);
  transform: translateY(110%);
  transition: transform .28s cubic-bezier(.25, .9, .3, 1);
}
.sheet.show { transform: translateY(0); }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: rgba(160, 120, 80, .22); margin: -6px auto 14px; }
.sheet h3 { margin: 0 0 4px; font-size: 17px; font-weight: 800; }
.sheet .hintxt { margin: 0 0 14px; font-size: 12.5px; color: var(--ink3); line-height: 1.6; }

.optlist { display: flex; flex-direction: column; gap: 8px; }
.optrow {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  background: #FFF7EE;
  border: 1px solid rgba(196, 138, 80, .16);
  text-align: left;
  transition: transform .12s, background .18s, border-color .18s;
}
.optrow:active { transform: scale(.985); background: #FFEFE1; }
.optrow.on { background: linear-gradient(135deg, #FFF0E2, #FFE3CC); border-color: rgba(242, 106, 24, .45); }
.optrow .oic {
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 12px;
  display: grid; place-items: center;
  background: #fff;
  box-shadow: 0 2px 6px rgba(166, 96, 34, .12);
  color: var(--orange-2);
}
.optrow .oic .mp-icon { width: 20px; height: 20px; }
.optrow .otx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.optrow .ot { font-size: 14px; font-weight: 700; }
.optrow .od { font-size: 11.5px; color: var(--ink3); margin-top: 2px; }
.optrow .ocheck { flex: 0 0 auto; color: var(--orange-2); }
.optrow .ocheck .mp-icon { width: 20px; height: 20px; }

.field {
  display: flex; gap: 8px; margin-top: 4px;
}
.field input {
  flex: 1 1 auto;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  font-size: 16px;
  border-radius: 14px;
  border: 1px solid rgba(196, 138, 80, .26);
  background: #FFFDFA;
  color: var(--ink);
  outline: none;
}
.field input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 138, 61, .16); }
.field button {
  flex: 0 0 auto;
  padding: 0 18px;
  height: 46px;
  border-radius: 14px;
  color: #fff; font-weight: 800;
  background: linear-gradient(135deg, #FF9C58, #F26A18);
  box-shadow: var(--sh-btn);
}

/* ============ 独立页面（残局 / 战绩） ============ */
.sub-app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(12px + var(--safe-top)) 16px calc(24px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pagehead { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.pagehead .tt { font-size: 19px; font-weight: 800; letter-spacing: .5px; }
.pagehead .st { margin-left: auto; font-size: 11.5px; color: var(--ink3); }

.lvcard {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  box-shadow: var(--sh-card);
  transition: transform .12s ease, box-shadow .2s;
}
.lvcard:active { transform: scale(.985); }
.lvno {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 15px;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 800;
  color: #fff;
  background: linear-gradient(150deg, #FFA864, #F06A20);
  box-shadow: 0 6px 14px rgba(240, 106, 32, .28);
}
.lvno.done { background: linear-gradient(150deg, #56C98A, #23A063); box-shadow: 0 6px 14px rgba(35, 160, 99, .26); }
.lvbody { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lvname { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.lvtip { font-size: 12px; color: var(--ink3); line-height: 1.45; }

.prog { height: 8px; border-radius: 8px; background: rgba(190, 150, 110, .18); overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #FFB067, #F26A18); transition: width .45s ease; }
.lvgo { flex: 0 0 auto; color: var(--ink3); }
.lvgo .mp-icon { width: 22px; height: 22px; }
.tag {
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
  color: #23A063; background: rgba(35, 160, 99, .12);
}

.statgrid { display: flex; gap: 10px; }
.sbox {
  flex: 1 1 0;
  padding: 14px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  box-shadow: var(--sh-card);
  text-align: center;
}
.sbox .sv { font-size: 24px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sbox .sl { font-size: 11px; color: var(--ink3); margin-top: 5px; }
.sbox.hi .sv { color: var(--orange-2); }

.rec {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
}
.rec .rt { flex: 1 1 auto; min-width: 0; }
.rec .rn { font-size: 13.5px; font-weight: 700; }
.rec .rd { font-size: 11px; color: var(--ink3); margin-top: 3px; }
.rec .rr { flex: 0 0 auto; font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 9px; }
.rec .rr.w { color: #1B8E58; background: rgba(35, 160, 99, .12); }
.rec .rr.l { color: #C0301F; background: rgba(192, 48, 31, .10); }
.rec .rr.d { color: #8A8079; background: rgba(138, 128, 121, .12); }

.empty {
  padding: 34px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .7);
  border: 1px dashed rgba(196, 138, 80, .30);
  text-align: center;
  color: var(--ink3);
  font-size: 13px;
  line-height: 1.8;
}
.empty .mp-icon { width: 34px; height: 34px; color: #D9C4B0; }
.sect-title { font-size: 12px; font-weight: 800; color: var(--ink3); letter-spacing: 1px; margin: 4px 2px -4px; }

/* ============ 动画 ============ */
@keyframes pop {
  from { transform: translate(-50%, -50%) scale(.72); opacity: .4; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@keyframes pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}
@keyframes hintpulse {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: .55; transform: translate(-50%, -50%) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============ 小屏微调 ============ */
@media (max-height: 640px) {
  .app { gap: 6px; padding-top: calc(7px + var(--safe-top)); padding-bottom: calc(7px + var(--safe-bottom)); }
  .pcard { padding: 5px 10px; }
  .ava { width: 32px; height: 32px; border-radius: 10px; font-size: 18px; }
  .chip { height: 29px; line-height: 29px; font-size: 11.5px; }
  .bar .status, .abtn { height: 38px; }
  .abtn { width: 38px; }
}
