/* 修仙 2048 · 主题：明亮仙侠（云白 + 青碧 + 朱砂 + 明黄 + 星紫）
   所有颜色走 token，后期换 UI 只改这里；图片化 UI 由 js/ui/assets.js 注入 */

:root {
  --bg: #F7F4EC;
  --bg2: #EFE9DA;
  --jade: #1FB6A6;
  --cinnabar: #E0563C;
  --gold: #F2C14E;
  --gold-deep: #D19A12;
  --violet: #7B5BD6;
  --text: #1E2A32;
  --text-dim: #6B7A84;
  --line: rgba(30, 42, 50, .12);
  --card: rgba(255, 255, 255, .78);
  --shadow: 0 8px 24px rgba(30, 50, 60, .12);
  --radius: 14px;
  --cell-gap: 8px;

  /* 图片化 UI（留空则用程序化样式） */
  --img-bg: none;
  --img-stage: none;
  --img-board: none;
  --img-lightning: none;
  --app-h: 100dvh;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  overscroll-behavior: none;
  overflow: hidden;
}

body {
  background:
    var(--img-bg),
    linear-gradient(180deg, #FDFBF4 0%, #F3EEE0 55%, #EBE4D2 100%);
  background-size: cover;
  background-position: center;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  height: var(--app-h);
  max-height: var(--app-h);
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) 12px calc(env(safe-area-inset-bottom) + 6px);
  overflow: hidden;
}

/* ───────── 上方人物区 ───────── */
.stage {
  position: relative;
  flex: 0 0 auto;
  border-radius: var(--radius);
  background:
    var(--img-stage),
    radial-gradient(120% 90% at 50% 0%, rgba(31,182,166,.14) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #FFFDF7 0%, #F6F1E4 100%);
  background-size: cover, auto, auto;
  background-position: center, center, center;
  border: 1px solid rgba(210, 190, 150, .45);
  box-shadow: var(--shadow);
  padding: 6px 12px 8px;
  overflow: hidden;
}

.sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 42% at 18% 88%, rgba(123, 91, 214, .08), transparent 60%),
    radial-gradient(55% 36% at 84% 92%, rgba(31, 182, 166, .10), transparent 62%),
    radial-gradient(40% 30% at 50% 18%, rgba(242, 193, 78, .12), transparent 70%);
  pointer-events: none;
}

.cornerRow {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  margin: 0 0 2px;
}
.cornerBtn {
  appearance: none; cursor: pointer; font-family: inherit;
  font-size: 11px; letter-spacing: 2px; color: var(--text-dim);
  padding: 4px 10px; border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
  transition: background .18s, color .18s, transform .12s;
}
.cornerBtn:active { transform: scale(.96); }
.cornerBtn.chronicle { color: var(--violet); border-color: rgba(123, 91, 214, .3); }

.stageTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.realmCard { display: flex; gap: 8px; align-items: center; min-width: 0; }
.realmIconWrap { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; }
.realmIconWrap .realmIcon { width: 42px; height: 42px; }

.realmInfo { min-width: 0; }
.realmName {
  font-size: 19px; font-weight: 700; letter-spacing: 2px;
  background: linear-gradient(180deg, #2A3B45, #12252B);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.realmDesc {
  font-size: 10.5px; line-height: 1.35; color: var(--text-dim);
  max-width: 190px; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}

.stats { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: 0 0 auto; }
.stat { display: flex; align-items: baseline; gap: 5px; }
.stat span { font-size: 10px; color: var(--text-dim); letter-spacing: 1px; }
.stat b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.stat.best b { font-size: 12.5px; color: var(--text-dim); }

.powerStat { flex-wrap: wrap; justify-content: flex-end; }
.rankChip {
  appearance: none; cursor: pointer; font-family: inherit;
  font-size: 9.5px; line-height: 1; letter-spacing: .5px;
  color: var(--gold-deep); background: rgba(242, 193, 78, .14);
  border: 1px solid rgba(209, 154, 18, .28);
  border-radius: 99px; padding: 3px 7px; white-space: nowrap;
}
.rankChip.on { color: #12998C; background: rgba(31,182,166,.12); border-color: rgba(31,182,166,.3); }
.rankChip:active { transform: scale(.96); }

/* 小人 + 姓名 + 纪事流 */
.charRow {
  position: relative;
  display: flex; gap: 10px;
  height: 126px;
  margin: 2px 0 2px;
  z-index: 1;
}
.avatarCol { width: 90px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; }
.avatar {
  width: 84px; height: 84px;
  filter: drop-shadow(0 6px 12px rgba(30, 50, 60, .18));
  flex: 0 0 auto;
}
.avatar .avaSvg { width: 100%; height: 100%; --aura: #2F9FC4; --aura2: #BEE9F7; }
.avatar .avaSvg[data-fx="4"], .avatar .avaSvg[data-fx="5"] { filter: saturate(1.1) brightness(1.03); }
.avatar .avaImg { width: 100%; height: 100%; object-fit: contain; }

.avaAura {
  fill: var(--aura);
  opacity: .18;
  animation: breathe 3.4s ease-in-out infinite;
}
.avaShadow { fill: rgba(30, 50, 60, .12); }
.avaCloak { fill: #303F4A; opacity: .92; }
.avaCloak.female { fill: #5A3B49; }
.avaArm { fill: none; stroke: #43555F; stroke-width: 3; opacity: .6; }
.avaHead { fill: #4A3B33; }
.avaBun { fill: #3A2E28; }
.avaHairF { fill: #2E2320; opacity: .9; }
.avaCore {
  fill: var(--aura);
  filter: drop-shadow(0 0 6px var(--aura));
  animation: corePulse 2.4s ease-in-out infinite;
}
.avaRings .avaRing {
  fill: none;
  stroke: var(--aura);
  stroke-width: 1.4;
  opacity: .28;
  animation: ringTurn 9s linear infinite;
}
.avaSvg.pulse .avaAura { animation: auraFlash 1.1s ease-out 1; }

@keyframes breathe { 0%,100%{ transform: scale(1); opacity:.16 } 50%{ transform: scale(1.06); opacity:.26 } }
@keyframes corePulse { 0%,100%{ opacity:.65 } 50%{ opacity:1 } }
@keyframes ringTurn { from{ transform: rotate(0deg) } to{ transform: rotate(360deg) } }
@keyframes auraFlash { 0%{ opacity:.5; transform:scale(1.25) } 100%{ opacity:.16; transform:scale(1) } }

.namePlate {
  margin-top: -10px;
  display: flex; align-items: center; gap: 4px;
  max-width: 100%;
  padding: 2px 8px; border-radius: 99px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(30, 50, 60, .08);
  z-index: 3;
}
.namePlate span {
  font-size: 11.5px; font-weight: 600; letter-spacing: .5px;
  max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.namePlate .realmTag {
  font-size: 10px; font-weight: 700; color: var(--gold-deep); letter-spacing: 1px;
  padding: 1px 4px; border-radius: 4px; background: rgba(209,154,18,.10);
  flex: 0 0 auto;
}
.namePlate i {
  font-style: normal; font-size: 9px; color: var(--text-dim);
  padding: 1px 4px; border-radius: 4px; background: rgba(30, 50, 60, .06);
  flex: 0 0 auto;
}
.nameHint { text-align: center; font-size: 11px; color: var(--text-dim); margin: -6px 0 10px; }
.nameHint.err { color: var(--cinnabar); }
.nameInput.err { border-color: var(--cinnabar); box-shadow: 0 0 0 3px rgba(224,86,60,.12); }
.setVersion { margin-top: 14px; text-align: center; font-size: 10.5px; color: var(--text-dim); letter-spacing: .5px; }
.setVersion::before { content: ''; display: block; height: 1px; margin: 0 0 10px; background: var(--line); }

/* 轮播消息流：不消失，自下而上，可上下滑动查看历史 */
.bubbleLog {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 5px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 2px 2px 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 100%);
}
.bubbleLog::-webkit-scrollbar { width: 3px; }
.bubbleLog::-webkit-scrollbar-thumb { background: rgba(30,50,60,.18); border-radius: 99px; }

.bubbleItem {
  position: relative;
  font-size: 11.5px; line-height: 1.45;
  padding: 6px 9px 6px 10px;
  border-radius: 10px 10px 10px 2px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  box-shadow: 0 3px 10px rgba(30, 50, 60, .07);
  color: #2C3B45;
  flex: 0 0 auto;
  animation: bubbleIn .3s ease both;
}
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: translateY(0) } }
.bubbleItem .bTag {
  font-size: 9px; letter-spacing: 1px; padding: 1px 5px; margin-right: 5px;
  border-radius: 4px; vertical-align: 1px;
  background: rgba(30,50,60,.07); color: var(--text-dim);
}
.bubbleItem.good { border-left: 3px solid var(--jade); }
.bubbleItem.bad { border-left: 3px solid var(--cinnabar); }
.bubbleItem.story .bTag { background: rgba(31,182,166,.14); color: #12998C; }
.bubbleItem.encounter { border-left: 3px solid var(--gold); background: rgba(255, 251, 235, .97); }
.bubbleItem.encounter .bTag { background: rgba(242,193,78,.24); color: var(--gold-deep); font-weight: 700; }
.bubbleItem.breakthrough .bTag { background: rgba(123,91,214,.14); color: var(--violet); }
.bubbleItem.tribulation { border-left: 3px solid var(--cinnabar); }
.bubbleItem.tribulation .bTag { background: rgba(224,86,60,.14); color: var(--cinnabar); }
.bubbleItem.tip { color: var(--text-dim); border-left: 3px solid var(--violet); }

/* 修为条 */
.barRow { display: flex; align-items: center; gap: 8px; z-index: 1; position: relative; }
.barLabel { font-size: 11px; color: var(--text-dim); letter-spacing: 2px; flex: 0 0 auto; }
.bar {
  position: relative; flex: 1; height: 9px;
  background: rgba(30, 50, 60, .10);
  border-radius: 99px; overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
}
.bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--jade), #6FD8C4 55%, var(--gold));
  border-radius: 99px;
  transition: width .35s ease;
  box-shadow: 0 0 10px rgba(31,182,166,.5);
}
.barPct { font-size: 11px; color: var(--text-dim); min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }

/* 灵力 / 紫气 */
.resRow { display: flex; gap: 8px; margin-top: 6px; z-index: 1; position: relative; }
.res {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 4px 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .68);
  border: 1px solid var(--line);
}
.resName { font-size: 10px; color: var(--text-dim); letter-spacing: 1px; }
.res b { font-size: 14px; font-variant-numeric: tabular-nums; }
.res small { font-size: 9px; color: var(--text-dim); margin-left: auto; white-space: nowrap; }
.res.qi b { color: var(--violet); }
.miniBtn {
  appearance: none; cursor: pointer; font-family: inherit;
  font-size: 9.5px; line-height: 1; letter-spacing: .5px;
  padding: 3px 7px; border-radius: 99px;
  border: 1px solid rgba(31,182,166,.35);
  background: rgba(31,182,166,.12); color: #12998C;
  white-space: nowrap;
}
.miniBtn:disabled { opacity: .55; }
.miniBtn.ad { border-color: rgba(209,154,18,.35); background: rgba(242,193,78,.16); color: var(--gold-deep); }
.miniBtn:active { transform: scale(.96); }

/* ───────── 下方操作区 ───────── */
.play {
  flex: 1 1 auto;
  min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 8px; padding-top: 8px;
}

.board {
  position: relative;
  width: var(--board-size, 100%);
  aspect-ratio: 1 / 1;
  padding: var(--cell-gap);
  border-radius: 18px;
  background:
    var(--img-board),
    linear-gradient(180deg, #FCF8EC, #F1E9D5);
  background-size: cover, auto;
  background-position: center;
  border: 1px solid rgba(210, 190, 150, .55);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.9);
  touch-action: none;
  user-select: none;
}
.board.has-img .grid .cell { background: rgba(255,255,255,.28); }

.grid {
  position: absolute; inset: var(--cell-gap);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: var(--cell-gap);
}
.cell {
  border-radius: 12px;
  background: rgba(30, 50, 60, .055);
  box-shadow: inset 0 1px 3px rgba(30,50,60,.05);
  transition: background .18s ease, box-shadow .18s ease;
}
.cell.selected { background: rgba(242, 193, 78, .35); box-shadow: inset 0 0 0 2px rgba(242,193,78,.9); }
.cell.flash { background: rgba(224, 86, 60, .18); }

.tiles { position: absolute; inset: var(--cell-gap); }

.tile {
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.9), rgba(255,255,255,.35));
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  box-shadow: 0 3px 10px rgba(30, 50, 60, .10), inset 0 1px 0 rgba(255,255,255,.8);
  transition: transform .12s cubic-bezier(.2,.8,.3,1);
  will-change: transform;
  overflow: hidden;
  pointer-events: none;
}
.tile::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%);
  pointer-events: none;
}
.tile .realmIcon { pointer-events: none; }
.tile .tileImg { width: 90%; height: 90%; object-fit: contain; pointer-events: none; }
.tile.appear { animation: tilePop .22s cubic-bezier(.3,1.5,.5,1); }
.tile.gone { opacity: 0; transform-origin: center; }
.tile.pending { box-shadow: 0 0 0 2px rgba(224,86,60,.65), 0 0 18px rgba(224,86,60,.35); }
.tile.tier5 { animation: tierGlow 3.2s ease-in-out infinite; }

@keyframes tilePop { 0%{ scale: .4; opacity: 0 } 100%{ scale: 1; opacity: 1 } }
@keyframes tierGlow {
  0%,100% { box-shadow: 0 3px 10px rgba(30,50,60,.10), 0 0 8px color-mix(in srgb, var(--c) 30%, transparent); }
  50% { box-shadow: 0 3px 14px rgba(30,50,60,.14), 0 0 22px color-mix(in srgb, var(--c) 55%, transparent); }
}

/* 按钮 */
.btn {
  appearance: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 11px 18px; border-radius: 12px;
  transition: transform .12s ease, filter .18s ease, opacity .18s ease;
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  line-height: 1.2;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary {
  background-color: #26C6B4;
  background-image: linear-gradient(135deg, #26C6B4, #12998C);
  color: #fff; box-shadow: 0 6px 16px rgba(18, 153, 140, .32);
}
.btn.gold {
  background-color: #F6CE6A;
  background-image: linear-gradient(135deg, #F6CE6A, #E0A326);
  color: #4A3400; box-shadow: 0 6px 16px rgba(224, 163, 38, .3);
}
.btn.ghost {
  background-color: rgba(255,255,255,.85);
  background-image: none;
  color: var(--text);
  border: 1px solid var(--line); box-shadow: 0 3px 10px rgba(30,50,60,.08);
}
.btn.danger {
  background-color: #E0563C;
  background-image: linear-gradient(135deg, #E86A50, #C2402A);
  color: #fff; box-shadow: 0 6px 16px rgba(192, 64, 42, .32);
}
.bsub { font-size: 10px; font-weight: 400; opacity: .8; }
/* 有图片时文字隐去（图片自带文字） */
.btn.imgBtn .bl, .btn.imgBtn .bsub { visibility: hidden; }

.actions { display: flex; gap: 6px; width: var(--board-size, 100%); }
.act {
  flex: 1; position: relative;
  appearance: none; cursor: pointer; font-family: inherit;
  padding: 8px 4px 7px;
  border-radius: 12px;
  border: 1px solid rgba(210, 190, 150, .5);
  background:
    linear-gradient(180deg, #FFFDF5, #F4EEDF);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 4px 12px rgba(30, 50, 60, .08);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  transition: transform .12s ease, box-shadow .18s ease, background .18s;
}
.act span { font-size: 12px; font-weight: 600; color: var(--text); letter-spacing: .5px; }
.act em { font-style: normal; font-size: 9px; color: var(--text-dim); }
.act:active { transform: scale(.97); }
.act.active {
  background: linear-gradient(180deg, #FBEBB8, #F3D47E);
  box-shadow: 0 0 0 2px rgba(242,193,78,.65), 0 4px 12px rgba(224,163,38,.25);
}
.act.dim { opacity: .6; }
.act.qi em { color: var(--violet); }
.act.restart em { color: var(--cinnabar); }
.act.imgBtn span, .act.imgBtn em { visibility: hidden; }

/* ───────── 弹窗 ───────── */
#modals { position: fixed; inset: 0; pointer-events: none; z-index: 20; }

.modalWrap {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(20, 28, 34, .38);
  backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .18s ease;
  pointer-events: auto;
  padding: 16px;
}
.modalWrap.in { opacity: 1; }

.modal {
  width: min(92vw, 380px);
  max-height: 82dvh;
  overflow: auto;
  background: linear-gradient(180deg, #FFFDF8, #F7F2E4);
  border-radius: 18px;
  border: 1px solid rgba(210, 190, 150, .6);
  box-shadow: 0 18px 48px rgba(20, 30, 40, .28);
  padding: 18px 18px 16px;
  transform: translateY(10px) scale(.98);
  transition: transform .22s cubic-bezier(.2,.9,.3,1.2);
}
.modalWrap.in .modal { transform: translateY(0) scale(1); }

/* 大弹窗（仙纪 / 长列表） */
.modalWrap.wide .modal { width: min(94vw, 680px); max-height: 86dvh; padding: 16px 16px 14px; }
.modalWrap.tall .modal { max-height: 90dvh; }

.modalTag {
  display: inline-block; font-size: 10px; letter-spacing: 3px; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; margin-bottom: 6px;
}
.modalTitle { margin: 0 0 10px; font-size: 19px; letter-spacing: 3px; font-weight: 700; }
.modalBody { font-size: 13.5px; line-height: 1.65; color: #35454F; }
.modalBtns { display: flex; gap: 8px; margin-top: 16px; position: sticky; bottom: -16px; padding: 10px 0 0; background: linear-gradient(180deg, rgba(247,242,228,0), #F7F2E4 30%); }
.modalBtns .btn { flex: 1; }

/* 起名 */
.nameWrap { margin: 4px 0 12px; }
.nameInput {
  width: 100%; font-family: inherit; font-size: 20px; text-align: center;
  letter-spacing: 4px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid rgba(210,190,150,.8); background: #fff; color: var(--text);
  outline: none;
}
.nameInput:focus { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(31,182,166,.15); }
.introText { font-size: 12.5px; color: var(--text-dim); line-height: 1.8; }
.introText p { margin: 0 0 8px; }

.genderPick { display: flex; gap: 8px; margin: 0 0 4px; }
.genderPick .gbtn {
  flex: 1; cursor: pointer; font-family: inherit; font-size: 14px; letter-spacing: 3px;
  padding: 9px 0; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.8); color: var(--text-dim);
  transition: all .18s;
}
.genderPick .gbtn.on {
  color: #fff; border-color: var(--jade);
  background: linear-gradient(135deg, #26C6B4, #12998C);
  box-shadow: 0 4px 12px rgba(18,153,140,.28);
}

/* 破境 */
.btBody { text-align: center; }
.btIcon { display: grid; place-items: center; margin-bottom: 4px; }
.btName { font-size: 24px; letter-spacing: 6px; font-weight: 700; margin-bottom: 6px; }
.btText { font-size: 14px; color: var(--text); margin-bottom: 8px; }
.btDesc { font-size: 12px; color: var(--text-dim); }

/* 叙事弹窗 */
.narrBody .narrTag {
  display: inline-block; font-size: 10px; letter-spacing: 3px; padding: 2px 10px;
  border-radius: 99px; margin-bottom: 8px;
}
.narrBody.story .narrTag { background: rgba(31,182,166,.14); color: #12998C; }
.narrBody.encounter .narrTag { background: rgba(242,193,78,.22); color: var(--gold-deep); font-weight: 700; }
.narrText { font-size: 14px; line-height: 1.9; color: #2C3B45; }
.narrDelta { margin-top: 12px; font-size: 13px; font-weight: 700; }
.narrDelta.up { color: #12998C; }
.narrDelta.down { color: var(--cinnabar); }

/* 劫难 */
.tribBody { text-align: center; }
.tribIcon { display: grid; place-items: center; }
.tribName { font-size: 18px; letter-spacing: 4px; font-weight: 700; margin: 4px 0 8px; }
.tribIntro { font-size: 12.5px; color: var(--text-dim); }
.tribRetry { margin-top: 6px; font-size: 12px; color: var(--gold-deep); }
.tribChance { margin-top: 10px; font-size: 13px; }
.tribChance b { color: var(--cinnabar); font-size: 17px; }

.tribResult { text-align: center; }
.tribResult.fail .tribTitle2 { color: var(--cinnabar); }
.tribResult.great .tribTitle2 { color: var(--gold-deep); }
.tribResult.success .tribTitle2 { color: var(--jade); }
.tribTitle2 { font-size: 20px; letter-spacing: 4px; font-weight: 700; margin-bottom: 8px; }
.tribText { font-size: 13.5px; line-height: 1.7; color: #35454F; }
.tribDelta { margin-top: 10px; font-size: 14px; font-weight: 700; }
.tribDelta.up { color: #12998C; }
.tribDelta.down { color: var(--cinnabar); }
.tribHint { margin-top: 4px; font-size: 11px; color: var(--text-dim); }

/* 挑战 */
.chBody { text-align: center; }
.chTag {
  display: inline-block; font-size: 10px; letter-spacing: 2px;
  padding: 2px 10px; border-radius: 99px; background: rgba(30,50,60,.08); color: var(--text-dim);
}
.chTag.boss { background: rgba(224,86,60,.14); color: var(--cinnabar); }
.chName { font-size: 20px; font-weight: 700; letter-spacing: 2px; margin: 8px 0; }
.chDesc { font-size: 12.5px; color: var(--text-dim); line-height: 1.7; }
.chRate { margin-top: 10px; font-size: 13px; }
.chRate b { color: var(--jade); font-size: 17px; }
.chResult { text-align: center; }
.chVerdict { font-size: 22px; font-weight: 800; letter-spacing: 6px; }
.chResult.win .chVerdict { color: #12998C; }
.chResult.lose .chVerdict { color: var(--cinnabar); }
.chText { font-size: 13.5px; line-height: 1.7; margin: 8px 0; }
.chDelta { font-weight: 700; font-size: 14px; }
.chDelta.up { color: #12998C; }
.chDelta.down { color: var(--cinnabar); }

/* 结算 */
.settleBody { text-align: center; }
.stBig { font-size: 15px; font-weight: 700; letter-spacing: 2px; margin-bottom: 12px; }
.stHint { font-size: 11.5px; color: var(--text-dim); margin-top: 6px; }
.settleGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.settleGrid div {
  background: rgba(255,255,255,.75); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 4px;
}
.settleGrid span { display: block; font-size: 10px; color: var(--text-dim); margin-bottom: 4px; }
.settleGrid b { font-size: 15px; }
.newRecord {
  display: inline-block; font-size: 12px; font-weight: 700; color: #4A3400;
  background: linear-gradient(135deg, #F6CE6A, #E0A326);
  padding: 4px 14px; border-radius: 99px; letter-spacing: 2px;
}

/* 灵力恢复说明 */
.adInfo p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.9; white-space: pre-line; }
.adInfo .adNow { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }
.adNow div { background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px; font-size: 11px; color: var(--text-dim); }
.adNow b { display: block; font-size: 15px; color: var(--text); margin-top: 2px; }

/* 解锁 */
.unlockBody p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.8; }
.unlockTip { font-size: 12px; color: var(--text-dim); border-left: 2px solid var(--violet); padding-left: 8px; }

/* 结局 */
.endingBody .endTitle { font-size: 26px; font-weight: 800; letter-spacing: 10px; text-align: center; margin-bottom: 14px; }
.endingBody p { font-size: 13.5px; line-height: 2; margin: 0 0 10px; color: #35454F; }
.endEpilogue {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
  font-size: 12.5px; color: var(--text-dim); font-style: italic; line-height: 1.9;
}

/* 天道金榜：自己的名次置于最上方 */
.rankMine {
  padding: 10px; border-radius: 12px; margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(242,193,78,.20), rgba(31,182,166,.10));
  border: 1px solid rgba(209,154,18,.28);
}
.rankMineTitle { font-size: 10px; letter-spacing: 3px; color: var(--text-dim); margin-bottom: 6px; }
.rankMineRow { display: flex; align-items: baseline; gap: 10px; }
.rankMineRow .rk { width: 34px; font-size: 15px; font-weight: 800; color: var(--gold-deep); text-align: center; }
.rankMineRow .nm { flex: 1; font-size: 14px; font-weight: 700; }
.rankMineRow .sc { font-size: 18px; font-weight: 800; color: var(--text); }
.rankMineTip { font-size: 11px; color: var(--text-dim); margin-top: 6px; }

.rankHead {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px 6px; font-size: 10px; letter-spacing: 2px; color: var(--text-dim);
  border-bottom: 1px dashed var(--line); margin-bottom: 4px;
}
.rankHead .rk { color: var(--text-dim); font-size: 10px; }
.rankHead .nm { flex: 1; }
.rankHead .sc { width: auto; }

.rankList { display: flex; flex-direction: column; gap: 3px; max-height: 46dvh; overflow-y: auto; padding-right: 2px; }
.rankRow {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 8px; font-size: 12px;
  background: rgba(255,255,255,.5);
}
.rankRow.me {
  background: rgba(242,193,78,.16);
  box-shadow: inset 3px 0 0 var(--gold);
}
.rk { width: 30px; text-align: right; color: var(--text-dim); font-variant-numeric: tabular-nums; font-size: 11px; }
.rk.top { color: var(--gold-deep); font-weight: 700; }
.nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc { width: 76px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.tagYou {
  font-style: normal; font-size: 9px; padding: 1px 5px; margin-left: 5px;
  border-radius: 4px; background: var(--gold); color: #4A3400;
}
.rankEmpty { padding: 24px 0; text-align: center; color: var(--text-dim); }

/* 仙纪 */
.chronicleList { display: flex; flex-direction: column; gap: 6px; max-height: 60dvh; overflow-y: auto; padding-right: 3px; }
.chronicleRow {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,.66); border: 1px solid var(--line);
}
.chronicleRow.encounter { border-left: 3px solid var(--gold); background: rgba(255,251,235,.9); }
.chronicleRow.tribulation { border-left: 3px solid var(--cinnabar); }
.chronicleRow.breakthrough { border-left: 3px solid var(--violet); }
.chronicleRow.challenge { border-left: 3px solid var(--jade); }
.chronicleRow.story { border-left: 3px solid #12998C; }
.chronicleMeta { flex: 0 0 auto; width: 62px; text-align: left; }
.chronicleMeta .ct { font-size: 9.5px; letter-spacing: 1px; color: var(--text-dim); }
.chronicleMeta .cs { font-size: 9px; color: var(--text-dim); opacity: .8; margin-top: 2px; }
.chronicleText { flex: 1; min-width: 0; }
.chronicleText .ctt { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.chronicleText .ctb { font-size: 11.5px; line-height: 1.55; color: #45555F; }
.chronicleEmpty { padding: 30px 0; text-align: center; color: var(--text-dim); font-size: 12px; }

/* 每日 */
.dailyList { display: flex; flex-direction: column; gap: 8px; }
.dailyRow {
  display: flex; gap: 10px; align-items: center;
  padding: 9px 10px; border-radius: 11px;
  background: rgba(255,255,255,.7); border: 1px solid var(--line);
}
.dailyRow.claimed { opacity: .6; }
.dMain { flex: 1; min-width: 0; }
.dName { font-size: 13px; font-weight: 600; }
.dDesc { font-size: 11px; color: var(--text-dim); margin: 2px 0 5px; }
.dBar { height: 4px; border-radius: 99px; background: rgba(30,50,60,.1); overflow: hidden; }
.dBar i { display: block; height: 100%; background: linear-gradient(90deg, var(--jade), var(--gold)); transition: width .3s; }
.dRight { text-align: right; flex: 0 0 auto; }
.dReward { font-size: 10px; color: var(--violet); margin-bottom: 4px; }
.dRight .btn { padding: 5px 12px; font-size: 12px; }

/* 设置 */
.setRow { display: flex; justify-content: space-between; align-items: center; padding: 4px 0 10px; gap: 10px; }
.setRow .btn { padding: 6px 16px; min-width: 60px; }
.setBlock { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 6px; }
.setTitle { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.setDesc { font-size: 11.5px; color: var(--text-dim); line-height: 1.6; margin-bottom: 8px; }
.setTextarea {
  width: 100%; font-family: ui-monospace, monospace; font-size: 11px;
  padding: 8px; border-radius: 9px; border: 1px solid var(--line); resize: vertical;
  margin-bottom: 8px; background: #fff;
}
.toggleGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.toggleCell {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.7);
  border: 1px solid var(--line); font-size: 12px;
}
.toggleCell .btn { padding: 4px 12px; font-size: 11px; min-width: 48px; }

/* 浮动分 / 特效 */
.floatText {
  position: fixed; transform: translate(-50%, 0);
  font-size: 14px; font-weight: 800; pointer-events: none; z-index: 30;
  text-shadow: 0 1px 3px rgba(255,255,255,.9);
  animation: floatUp .9s ease-out forwards;
}
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); }
  25% { opacity: 1; transform: translate(-50%, -6px) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -42px) scale(1); }
}

.burst {
  position: fixed; width: 8px; height: 8px; border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 0 currentColor;
  animation: burstOut .8s ease-out forwards;
  pointer-events: none; z-index: 25;
}
@keyframes burstOut {
  0% { box-shadow: 0 0 0 0 currentColor; opacity: .9; }
  100% { box-shadow: 0 0 0 42px transparent; opacity: 0; }
}

/* 轻量粒子：随机方向的小圆点，CSS 变量驱动 */
.spark {
  position: fixed; width: 5px; height: 5px; border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 25; pointer-events: none;
  animation: sparkOut .75s ease-out forwards;
}
@keyframes sparkOut {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.2); }
}

/* 碎片（合成失败 / 破碎） */
.shard {
  position: fixed; width: 9px; height: 9px;
  background: currentColor; border-radius: 2px;
  transform: translate(-50%, -50%);
  z-index: 26; pointer-events: none;
  animation: shardFly .9s ease-out forwards;
}
@keyframes shardFly {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(0) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(320deg) scale(.4); }
}

/* 成功 / 失败 全屏氛围 */
.fxResult {
  position: fixed; inset: 0; z-index: 24; pointer-events: none;
  display: grid; place-items: center;
  animation: fxResult 1.1s ease-out forwards;
}
.fxResult span {
  font-size: 46px; font-weight: 800; letter-spacing: 14px;
}
.fxResult.win span { color: #12998C; text-shadow: 0 0 28px rgba(31,182,166,.65); }
.fxResult.lose span { color: var(--cinnabar); text-shadow: 0 0 24px rgba(224,86,60,.55); }
@keyframes fxResult {
  0% { opacity: 0; transform: scale(1.25); }
  18% { opacity: 1; transform: scale(1); }
  70% { opacity: .85; }
  100% { opacity: 0; transform: scale(1); }
}

/* 光环扩散（破境 / 奇遇） */
.ringWave {
  position: fixed; left: 50%; top: 50%; width: 60px; height: 60px;
  border: 2px solid var(--ring); border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ringWave 1.1s ease-out forwards; pointer-events: none; z-index: 26;
}
@keyframes ringWave {
  0% { opacity: .95; transform: translate(-50%, -50%) scale(.4); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(3.2); }
}

.beam {
  position: fixed; left: 50%; top: 50%; width: 6px; height: 6px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--beam);
  box-shadow: 0 0 40px 18px var(--beam), 0 0 120px 40px color-mix(in srgb, var(--beam) 55%, transparent);
  animation: beamGrow 1.15s ease-out forwards;
  pointer-events: none; z-index: 26;
}
@keyframes beamGrow {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  20% { opacity: .95; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
}

/* 雷劫：闪白 + 闪电图（可选 PNG） */
.thunderFlash {
  position: fixed; inset: 0; background: #FFF6C9;
  animation: flash 0.9s ease-out forwards; pointer-events: none; z-index: 27;
  mix-blend-mode: screen;
}
@keyframes flash {
  0% { opacity: 0 } 8% { opacity: .95 } 18% { opacity: .2 } 30% { opacity: .85 }
  55% { opacity: .12 } 100% { opacity: 0 }
}
.lightning {
  position: fixed; inset: 0; z-index: 28; pointer-events: none;
  background: var(--img-lightning) center / contain no-repeat;
  animation: lightningJitter .7s steps(2, end) forwards;
  mix-blend-mode: screen;
}
@keyframes lightningJitter {
  0% { opacity: 0; transform: translate(0, 0) scale(1.02); }
  10% { opacity: 1; transform: translate(-2%, 0) scale(1.05); }
  25% { opacity: .5; transform: translate(2%, -1%) scale(1.02); }
  40% { opacity: 1; transform: translate(-1%, 1%) scale(1.06); }
  70% { opacity: .3; }
  100% { opacity: 0; transform: scale(1.08); }
}

.shockwave {
  position: fixed; left: 50%; top: 50%; width: 10px; height: 10px;
  border: 3px solid var(--wave); border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: wave .8s ease-out forwards; pointer-events: none; z-index: 26;
}
@keyframes wave {
  0% { opacity: .9; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(60); }
}

.shake { animation: shakeIt .45s ease-in-out; }
@keyframes shakeIt {
  0%,100% { transform: translateX(0) } 20% { transform: translateX(-6px) }
  40% { transform: translateX(5px) } 60% { transform: translateX(-3px) } 80% { transform: translateX(2px) }
}

/* Toast */
#toasts { position: fixed; left: 0; right: 0; bottom: 90px; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 40; pointer-events: none; }
.toast {
  font-size: 12.5px; padding: 8px 16px; border-radius: 99px;
  background: rgba(30, 42, 50, .86); color: #fff;
  opacity: 0; transform: translateY(6px); transition: all .25s ease;
}
.toast.in { opacity: 1; transform: translateY(0); }

/* 启动页 */
#splash {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; align-content: center; gap: 8px;
  background: linear-gradient(180deg, #FDFBF4, #EFE8D8);
  color: var(--text);
}
#splash span { font-size: 28px; letter-spacing: 8px; font-weight: 700; }
#splash small { font-size: 12px; letter-spacing: 6px; color: var(--text-dim); }
.splashErr { text-align: center; font-size: 15px; color: var(--cinnabar); line-height: 1.8; }

/* 桌面：同一版式，仅居中 */
@media (min-width: 560px) {
  body { display: flex; justify-content: center; }
  #app { padding-top: 12px; }
}

/* 低矮屏：压缩人物区，棋盘让位 */
@media (max-height: 760px) {
  .charRow { height: 104px; }
  .avatar { width: 72px; height: 72px; }
  .avatarCol { width: 78px; }
  .bubbleItem { padding: 5px 8px; font-size: 11px; }
  .realmDesc { display: none; }
}
@media (max-height: 660px) {
  .charRow { height: 88px; }
  .avatar { width: 60px; height: 60px; }
  .avatarCol { width: 66px; }
  .namePlate span { font-size: 10px; }
  .stage { padding: 4px 10px 6px; }
}

/* ═══════════════════════════════════════════════════════════
   v1.3 整图皮肤（1500×2667）：图片自带按钮与人物，DOM 只做文字层 + 热区
   代码 UI 永远是兜底：皮肤图缺失/加载失败时 html 不加 .skin，回到上面的布局
   强制代码 UI：index.html?ui=code
   ═══════════════════════════════════════════════════════════ */
.bestRank { font-style: normal; font-size: 9.5px; color: var(--text-dim); }
html.skin body { background: #E8DFC8; display: flex; align-items: center; justify-content: center; }

html.skin #app {
  position: relative;
  flex: none;
  width: min(100vw, calc(100dvh * 1500 / 2667));
  height: min(100dvh, calc(100vw * 2667 / 1500));
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  display: block;
  background: var(--img-skin) center / 100% 100% no-repeat;
  border-radius: 0;
  overflow: hidden;
  container-type: size;
  font-family: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  user-select: none;
}

html.skin #app .stage,
html.skin #app .play { position: absolute; inset: 0; }
html.skin #app .stage {
  padding: 0; margin: 0;
  border: 0; border-radius: 0; box-shadow: none;
  background: none;
  overflow: visible;
  pointer-events: none;
}
html.skin #app .sky { display: none; }
html.skin #app .stageTop,
html.skin #app .stats,
html.skin #app .powerStat,
html.skin #app .best,
html.skin #app .realmCard,
html.skin #app .charRow,
html.skin #app .avatarCol,
html.skin #app .resRow,
html.skin #app .res { background: none; border: 0; box-shadow: none; position: static; }
html.skin #app .realmCard { display: none; }

/* 顶部：齿轮 / 仙纪 / 天道榜 热区（文字透明，图案在图里） */
html.skin #app .cornerRow { position: static; margin: 0; }
html.skin #app #btnSettings,
html.skin #app #btnChronicle { position: absolute; color: transparent; -webkit-text-fill-color: transparent; background: none !important; border: 0 !important; box-shadow: none !important; }
html.skin #app #btnSettings { left: 9.2%; top: 3.6%; width: 8.4%; height: 4.6%; border-radius: 50%; }
html.skin #app #btnChronicle { left: 24.0%; top: 3.79%; width: 16.73%; height: 3.71%; border-radius: 99px; }
html.skin #app #rankChip {
  position: absolute; left: 43.93%; top: 3.79%; width: 16.67%; height: 3.71%;
  color: transparent; -webkit-text-fill-color: transparent;
  background: none !important; border: 0 !important; box-shadow: none !important;
  padding: 0; border-radius: 99px;
}

/* 战力 / 最高：图里已画「战力」「最高：」字样，这里只放会变的数字 */
html.skin #app .stats { position: static; }
html.skin #app .powerStat > span,
html.skin #app .best > span { display: none; }
html.skin #app #power {
  position: absolute; right: 7.1%; top: 2.45%; width: 30%;
  font-size: 5.8cqw; line-height: 1.12; text-align: right; color: #4A3A2A;
  font-family: "Songti SC", "STSong", serif; font-weight: 700;
}
html.skin #app #best { position: absolute; left: 71.5%; top: 6.5%; font-size: 3.0cqw; color: #6B5B45; font-weight: 600; }
html.skin #app #bestRank { position: absolute; left: 82.0%; top: 6.5%; font-size: 2.9cqw; color: #6B5B45; font-style: normal; }

/* 人物姓名 + 境界（人物图已画在背景里，只叠文字） */
html.skin #app .charRow { position: static; height: auto; margin: 0; }
html.skin #app .avatarCol { position: static; width: auto; }
html.skin #app .avatar { display: none; }
html.skin #app .namePlate {
  position: absolute; inset: 0; width: auto; height: auto;
  margin: 0; padding: 0; gap: 0; background: none; border: 0; box-shadow: none;
  display: block;
}
html.skin #app #charName {
  position: absolute; left: 14.6%; top: 27.0%; width: 20%; height: 4.2%;
  display: flex; align-items: center;
  font-size: 4.2cqw; color: #3B2C1E; font-weight: 700; letter-spacing: .08em; max-width: none;
}
html.skin #app #charRealm {
  position: absolute; left: 29.0%; top: 27.55%; width: 9.47%; height: 4.0%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.2cqw; color: #7A5C33; letter-spacing: .08em; background: none; padding: 0;
}
html.skin #app #charGender { display: none; }

/* 气泡流：放在人物右侧云空处，保留纪事能力 */
html.skin #app .bubbleLog {
  position: absolute; left: 54%; top: 11%; width: 42%; height: 26%;
  padding: 0 .6cqw; gap: .45cqw; pointer-events: auto; mask-image: none; -webkit-mask-image: none;
}
html.skin #app .bubbleItem {
  font-family: "Songti SC", "STSong", serif;
  font-size: 1.95cqw; line-height: 1.42; padding: .5cqw .7cqw;
  border-radius: .6cqw; background: rgba(255,252,242,.72); border: 1px solid rgba(180,158,120,.25);
  box-shadow: none;
}
html.skin #app .bubbleItem .bTag { font-size: 1.55cqw; padding: 0 .35cqw; }

/* 修为：竹子=进度条，图里已画「修为」字样 */
html.skin #app .barRow { position: absolute; inset: 0; pointer-events: none; }
html.skin #app .barLabel { display: none; }
html.skin #app .bar {
  position: absolute; left: 18.93%; top: 32.73%; width: 63.73%; height: 2.02%;
  background: transparent; box-shadow: none; border-radius: 99px;
}
html.skin #app .bar i { height: 100%; background: linear-gradient(90deg, rgba(242,193,78,.55), rgba(255,232,150,.95)); box-shadow: 0 0 1.2cqw rgba(242,193,78,.6); border-radius: 99px; }
html.skin #app .barPct {
  position: absolute; left: 83.4%; top: 32.73%; width: 9%; height: 2.02%;
  display: flex; align-items: center;
  font-size: 3.9cqw; color: #4A3A2A;
}

/* 灵力 / 紫气：标签在图里，只显示会变化的数值 */
html.skin #app .resRow { position: absolute; inset: 0; margin: 0; pointer-events: none; }
html.skin #app .res { position: static; padding: 0; display: block; }
html.skin #app .resName { display: none; }
html.skin #app #staminaVal {
  position: absolute; left: 19.7%; top: 36.15%; width: 10%; height: 3.7%;
  display: flex; align-items: center;
  font-size: 3.9cqw; color: #4A3A2A; font-variant-numeric: tabular-nums;
}
html.skin #app #btnAdStam {
  position: absolute; left: 30.13%; top: 36.2%; width: 18.93%; height: 3.71%;
  color: transparent; -webkit-text-fill-color: transparent;
  background: none !important; border: 0 !important; box-shadow: none !important; padding: 0;
}
html.skin #app #staminaTimer { display: none; }
html.skin #app #qiStock {
  position: absolute; left: 69.0%; top: 36.15%; width: 6%; height: 3.7%;
  display: flex; align-items: center;
  font-size: 3.9cqw; color: #6B4AA8; font-variant-numeric: tabular-nums;
}
html.skin #app #btnDailyMini {
  position: absolute; left: 73.6%; top: 36.2%; width: 18.73%; height: 3.71%;
  color: transparent; -webkit-text-fill-color: transparent;
  background: none !important; border: 0 !important; box-shadow: none !important; padding: 0;
}

/* 棋盘：对齐图上的灰色棋盘区，格子用图里的 16 张图标 */
html.skin #app .play { pointer-events: none; }
html.skin #app .board {
  position: absolute; left: 10.37%; top: 43.78%; width: 79.87%;
  --cell-gap: 0px;
  margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none;
  border-radius: 2.4cqw; pointer-events: auto;
}
html.skin #app .board .grid { inset: 0; gap: 3.5%; }
html.skin #app .board .tiles { inset: 0; }
html.skin #app .board .cell {
  border-radius: 1.5cqw;
  background: transparent;
  border: 0;
  box-shadow: none;
}
html.skin #app .board .cell.selected { background: rgba(242,193,78,.32); box-shadow: inset 0 0 0 2px rgba(242,193,78,.9); }
html.skin #app .board .cell.flash { background: rgba(224,86,60,.22); }
html.skin #app .tile {
  background: none !important; border: 0 !important; box-shadow: none !important;
  border-radius: 1.5cqw;
}
html.skin #app .tile::after { display: none; }
html.skin #app .tile .tileImg { width: 100%; height: 100%; object-fit: cover; border-radius: 1.5cqw; }
html.skin #app .tile.appear { animation: tilePop .2s cubic-bezier(.3,1.5,.5,1); }
html.skin #app .tile.tier5 { animation: none; }

/* 底部四个神通按钮：图里已有文字，只做热区 + 点击反馈 */
html.skin #app .actions {
  position: absolute; left: 8.53%; right: 8.07%; bottom: 2.36%; height: 5.85%;
  padding: 0; margin: 0; gap: 3.84%; pointer-events: auto;
}
html.skin #app .act {
  position: relative; flex: 1; padding: 0;
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  border-radius: 1.2cqw;
  color: transparent; -webkit-text-fill-color: transparent;
  transition: transform .1s ease, filter .1s ease;
}
html.skin #app .act span, html.skin #app .act em { visibility: hidden; }
html.skin #app .act:active { transform: scale(.965); filter: brightness(1.18); }
html.skin #app .act.active { box-shadow: 0 0 0 .35cqw rgba(242,193,78,.8) !important; }
html.skin #app .act.dim { opacity: .55; }
html.skin #app .act.qi em { display: none; }

/* 皮肤下的点击反馈（贴图按钮无背景，用亮度/缩放表达按下） */
html.skin #app #btnSettings:active,
html.skin #app #btnChronicle:active,
html.skin #app #rankChip:active,
html.skin #app #btnAdStam:active,
html.skin #app #btnDailyMini:active { filter: brightness(1.15); transform: scale(.96); }
html.skin #app #btnSettings,
html.skin #app #btnChronicle,
html.skin #app #rankChip,
html.skin #app #btnAdStam,
html.skin #app #btnDailyMini,
html.skin #app .bubbleLog { pointer-events: auto; }
