:root {
  --ink: #2b3532;
  --paper: #fffdf8;
  --yellow: #ffd34d;
  --orange: #ff9b54;
  --red: #f2665c;
  --green: #3fae7a;
  --blue: #4a97dd;
  --font: system-ui, -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: #bfe9f7; color: var(--ink); font-family: var(--font); -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
button { font-family: inherit; color: inherit; cursor: pointer; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ---------- 上方狀態列 ---------- */
#hud { position: fixed; left: 0; right: 0; top: calc(10px + var(--st)); display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; pointer-events: none; z-index: 5; }
#hud[hidden] { display: none; }
.pill { display: flex; align-items: center; gap: 6px; background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; padding: 4px 12px 4px 8px; box-shadow: 0 3px 0 var(--ink); font-weight: 900; font-size: 20px; min-width: 64px; }
.pill b { font-variant-numeric: tabular-nums; }
.pill .ic { font-size: 18px; line-height: 1; }
.pill.coin { padding: 4px 8px 4px 14px; }
.pill.coin.bump { animation: bump 0.18s ease-out; }
@keyframes bump { 50% { transform: scale(1.15); } }
.coin-ic { width: 26px; height: 26px; background: url(img/coin-face.webp) center / contain no-repeat; filter: drop-shadow(0 2px 0 #c98a00); }
.mapbtn { position: absolute; right: 10px; top: 52px; pointer-events: auto; display: flex; align-items: center; gap: 4px; background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; padding: 3px 10px 3px 6px; font-weight: 900; font-size: 14px; box-shadow: 0 3px 0 var(--ink); }
.mapbtn .mi { width: 20px; height: 16px; border-radius: 4px; background: linear-gradient(90deg, #7ed389 0 33%, #ffd34d 33% 66%, #5aa9e6 66%); border: 2px solid var(--ink); }
.mapbtn.on { background: #fff1a8; }
.mapbtn.flip { top: 94px; }
.mapbtn .fi { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #5aa9e6; color: #fff; border: 2px solid var(--ink); font-size: 14px; line-height: 1; }
.mapbtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.wave { flex: 1; max-width: 260px; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; padding: 3px 10px 6px; box-shadow: 0 3px 0 var(--ink); text-align: center; font-weight: 900; font-size: 15px; }
.wave .bar { height: 7px; border-radius: 6px; background: #e7e1d3; margin-top: 3px; overflow: hidden; }
.wave .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7ed389, #3fae7a); border-radius: 6px; transition: width 0.3s; }

/* ---------- 橫幅、提示、飄字 ---------- */
.banner { position: fixed; left: 50%; top: 28%; transform: translate(-50%, -50%) scale(0.6); opacity: 0; z-index: 6; pointer-events: none; white-space: nowrap;
  font-size: clamp(30px, 8vw, 54px); font-weight: 900; color: var(--yellow); -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; letter-spacing: 1px; text-shadow: 0 5px 0 var(--ink); transition: opacity 0.2s, transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1); }
.banner.good { color: #8ff0a4; }
.banner.bad { color: #ff9a8f; }
.banner.boss { color: #ffb36b; }
.banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.hint { position: fixed; left: 50%; bottom: calc(18px + var(--sb)); transform: translate(-50%, 20px); opacity: 0; z-index: 6; pointer-events: none; width: max-content; max-width: min(92vw, 520px);
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 10px 16px; font-size: 17px; font-weight: 800; line-height: 1.45; text-align: center; box-shadow: 0 4px 0 var(--ink); transition: opacity 0.25s, transform 0.25s; }
.hint.show { opacity: 1; transform: translate(-50%, 0); }
#toasts { position: fixed; inset: 0; pointer-events: none; z-index: 4; }
.toast { position: absolute; left: 0; top: 0; font-weight: 900; font-size: 22px; color: #fff; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; white-space: nowrap; }
.toast.good { color: var(--yellow); }
.toast.bad { color: #ff9a8f; }
.edge { position: fixed; left: 0; top: 0; width: 40px; height: 40px; z-index: 4; pointer-events: none; opacity: 0; transition: opacity 0.2s; }
.edge::before { content: ""; position: absolute; inset: 0; background: var(--yellow); border: 3px solid var(--ink); border-radius: 50%; }
.edge::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0; border-left: 14px solid var(--ink); border-top: 9px solid transparent; border-bottom: 9px solid transparent; transform: translate(-30%, -50%); }
.edge.on { opacity: 1; }

/* ---------- 搖桿 ---------- */
#joy { position: fixed; left: 0; top: 0; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; background: rgba(255, 253, 248, 0.35); border: 3px solid rgba(43, 53, 50, 0.35); pointer-events: none; z-index: 3; opacity: 0; transition: opacity 0.12s; }
#joy.on { opacity: 1; }
/* 手機:左下角淡淡的搖桿位置提示(手指放上去就換成真的搖桿) */
.joyhome { display: none; position: fixed; left: 26px; bottom: calc(150px + var(--sb) + var(--hx, 0px)); transition: bottom 0.25s; width: 96px; height: 96px; border-radius: 50%; border: 3px dashed rgba(43, 53, 50, 0.3); background: rgba(255, 253, 248, 0.22); pointer-events: none; z-index: 3; }
.joyhome i { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: rgba(255, 253, 248, 0.6); border: 3px solid rgba(43, 53, 50, 0.35); }
body.touch .joyhome { display: block; }
body.touch #hud[hidden] ~ .joyhome, body.joying .joyhome { display: none; }
#joy i { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }

/* ---------- 按鈕 ---------- */
.skip { position: fixed; right: 12px; bottom: calc(84px + var(--sb) + var(--hx, 0px)); transition: bottom 0.25s; z-index: 5; background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px; padding: 8px 16px; font-weight: 900; font-size: 16px; box-shadow: 0 4px 0 var(--ink); }
.skip[hidden] { display: none; }
.mute { position: fixed; left: 12px; bottom: calc(84px + var(--sb) + var(--hx, 0px)); transition: bottom 0.25s; z-index: 5; width: 44px; height: 44px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font-size: 20px; line-height: 1; padding: 0; }
/* ---------- 格子上方的價格牌 ---------- */
#tags { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
.ptag { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 3px; padding: 2px 9px 2px 4px; margin-top: -10px;
  background: var(--paper); border: 3px solid #5b3b22; border-radius: 999px; box-shadow: 0 3px 0 #5b3b22; font-weight: 900; font-size: 16px; line-height: 1.15; white-space: nowrap; transition: background-color 0.2s; }
.ptag::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 9px; height: 9px; margin-left: -6px; background: inherit; border-right: 3px solid #5b3b22; border-bottom: 3px solid #5b3b22; transform: rotate(45deg); }
.ptag b { font-variant-numeric: tabular-nums; }
.ptag .ci { width: 17px; height: 17px; border-radius: 50%; background: radial-gradient(circle at 40% 38%, #fff3b0 0 18%, #ffd23f 19% 60%, #f0a800 61%); box-shadow: inset 0 0 0 2px #e09a00; }
.ptag .ic { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.ic.bubble { background: radial-gradient(circle at 34% 32%, #fff 0 16%, rgba(207,240,255,0.9) 17% 55%, #7cc8f2 56% 72%, #4a97dd 73%); }
.ic.honey { border-radius: 7px 7px 9px 9px; background: linear-gradient(#9b6a43 0 26%, #ffc93c 27%); box-shadow: inset 0 0 0 2px #e0a000; }
.ptag .plv { background: #3fae7a; color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 13px; line-height: 1.2; margin-right: 2px; }
.ptag.up { font-size: 15px; padding: 3px 10px 3px 4px; }
.ptag.can { background: #fff1a8; animation: tagbob 0.9s ease-in-out infinite; }
.ptag.paying { background: #d6f5e2; animation: none; }
@keyframes tagbob { 50% { scale: 1.08; } }
/* 飛往金幣數字的金幣:3D 金幣的照片(img/coin-face.webp),翻轉時看得到正反面 */
.fly { position: fixed; left: -15px; top: -15px; width: 30px; height: 30px; z-index: 7; pointer-events: none;
  background: url(img/coin-face.webp) center / contain no-repeat; filter: drop-shadow(0 2px 2px rgba(120, 70, 0, 0.45)); backface-visibility: visible; will-change: transform; }
/* 金幣到了:數字旁邊閃一圈光 */
.coin-shine { position: fixed; left: -26px; top: -26px; width: 52px; height: 52px; z-index: 7; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 250, 210, 0.95) 0 22%, rgba(255, 214, 80, 0.55) 40%, rgba(255, 214, 80, 0) 70%); animation: coinShine 0.4s ease-out forwards; }
@keyframes coinShine { from { opacity: 1; scale: 0.4; } to { opacity: 0; scale: 1.5; } }

.skip:active, .mute:active, .big:active, .look:active, .hero:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* ---------- 開始、結束畫面 ---------- */
.screen { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: calc(16px + var(--st)) 16px calc(16px + var(--sb)); background: linear-gradient(180deg, rgba(191, 233, 247, 0.55), rgba(255, 253, 248, 0.25)); overflow-y: auto; }
#start { background: linear-gradient(180deg, rgba(191, 233, 247, 0.1), rgba(255, 253, 248, 0.2)); }
.screen[hidden] { display: none; }
@media (orientation: portrait) {
  #start { align-items: flex-end; background: linear-gradient(180deg, rgba(191, 233, 247, 0) 30%, rgba(191, 233, 247, 0.5)); }
  #start .card { margin: auto auto 0; padding: 16px 16px 12px; }
  #start .card h1 { font-size: 34px; }
  #start .tag { margin: 2px 0 8px; }
  #start .steps { gap: 6px; margin-bottom: 8px; }
  #start .steps li { padding: 6px 10px; font-size: 15px; }
  #start .pick { margin: 4px 0 6px; }
  #start .heroes { margin-bottom: 10px; }
  #start .big { padding: 10px; font-size: 22px; }
  #start .note { margin-top: 8px; font-size: 11px; }
}
.card { width: min(420px, 100%); background: var(--paper); border: 4px solid var(--ink); border-radius: 28px; padding: 22px 20px 18px; box-shadow: 0 7px 0 var(--ink); text-align: center; margin: auto; }
.card h1 { margin: 2px 0 2px; font-size: 40px; font-weight: 900; color: #7cc8f2; -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; letter-spacing: 2px; text-shadow: 0 5px 0 var(--ink); }
/* 品牌字放上面一行小字，手機上主名稱才不會被擠成兩行 */
.card h1 small { display: block; font-size: 0.45em; letter-spacing: 6px; -webkit-text-stroke: 4px var(--ink); text-shadow: 0 3px 0 var(--ink); color: #ffd34d; }
.card h2 { margin: 4px 0; font-size: 30px; font-weight: 900; }
.tag { margin: 6px 0 12px; font-size: 17px; font-weight: 800; color: #5d6d68; }
#start .card h1 { margin-bottom: 12px; }
.steps { list-style: none; padding: 0; margin: 0 0 14px; text-align: left; display: grid; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 10px; background: #f3f9ff; border-radius: 14px; padding: 8px 10px; font-size: 16px; font-weight: 700; line-height: 1.4; }
.steps .n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); border: 2.5px solid var(--ink); display: grid; place-items: center; font-weight: 900; font-size: 15px; }
.pick { margin: 6px 0 8px; font-weight: 800; font-size: 15px; color: #5d6d68; }
.heroes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.hero { display: flex; align-items: center; gap: 8px; background: #fff; border: 3px solid #d9d3c5; border-radius: 16px; padding: 8px 8px; text-align: left; }
.hero i { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid #5b3b22; flex: none; }
.hero b { display: block; font-size: 15px; font-weight: 900; }
.hero small { display: block; font-size: 12px; color: #7a8580; font-weight: 700; }
.hero.on { border-color: var(--ink); background: #fff7d6; box-shadow: 0 3px 0 var(--ink); }
.looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.look { display: flex; align-items: center; justify-content: center; gap: 6px; background: #fff; border: 3px solid #d9d3c5; border-radius: 14px; padding: 7px 4px; font-weight: 800; font-size: 14px; }
.look i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); flex: none; }
.look.on { border-color: var(--ink); background: #fff7d6; box-shadow: 0 3px 0 var(--ink); }
.big { width: 100%; background: var(--yellow); border: 4px solid var(--ink); border-radius: 18px; padding: 13px; font-size: 24px; font-weight: 900; box-shadow: 0 3px 0 var(--ink); }
.note { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: #8a958f; }
.emoji { font-size: 58px; line-height: 1.1; }
.stats { list-style: none; padding: 0; margin: 4px 0 18px; display: grid; gap: 6px; font-size: 17px; font-weight: 700; }
.stats li { background: #f3f9ff; border-radius: 12px; padding: 8px; }
.stats b { font-size: 21px; color: var(--blue); }

@media (max-height: 640px) {
  .card { padding: 14px 16px 12px; }
  .card h1 { font-size: 32px; }
  .steps li { padding: 6px 8px; font-size: 14.5px; }
  .big { padding: 10px; font-size: 21px; }
}

/* ---------- 選關卡 ---------- */
.card.wide { width: min(720px, 100%); }
.lvhead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 8px; }
.lvhead h2 { margin: 0; font-size: 26px; }
.lvhead > :first-child { justify-self: start; }
.lvhead > :last-child { justify-self: end; }
.ghost { background: transparent; border: 2.5px solid #d9d3c5; border-radius: 999px; padding: 5px 12px; font-weight: 800; font-size: 14px; color: var(--ink); white-space: nowrap; }
.diff { display: inline-flex; gap: 4px; padding: 4px; background: #f1ede3; border-radius: 999px; margin: 4px auto 14px; }
.diff button { border: 2px solid transparent; background: transparent; padding: 5px 16px; border-radius: 999px; font-weight: 800; font-size: 15px; }
.diff button.on { background: var(--yellow); border-color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.lvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.lv { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 10px; background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); font-weight: 800; }
.lv .no { width: 34px; height: 34px; border-radius: 50%; background: #7cc8f2; color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 900; border: 2.5px solid var(--ink); }
.lv b { font-size: 16px; }
.lv small { font-size: 12px; color: #6f7c77; min-height: 1.4em; }
.lv .st { display: flex; gap: 3px; }
.lv .st i, .stars i { display: block; width: 18px; height: 18px; background: #e3ddcf; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.lv .st i.on, .stars i.on { background: #ffc93c; }
.lv.locked { opacity: 0.55; box-shadow: none; border-style: dashed; cursor: not-allowed; }
.lv.locked .no { background: #b9b3a6; }
.lv.endless { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 10px; background: #fff7d6; }
.lv.endless .no { background: var(--orange); }
.lv:not(.locked):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* ---------- 圖鑑 ---------- */
.dexgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.dx { background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 10px; text-align: center; box-shadow: 0 3px 0 var(--ink); }
.dx img { width: 110px; height: 110px; object-fit: contain; display: block; margin: 0 auto 4px; }
.dx b { display: block; font-size: 17px; }
.dx p { margin: 4px 0; font-size: 13px; line-height: 1.5; color: #4f5d58; font-weight: 600; }
.dx small { font-size: 12px; color: var(--blue); font-weight: 800; }
.dx.unseen img { filter: brightness(0) opacity(0.22); }

/* ---------- 結算 ---------- */
.stars { display: flex; justify-content: center; gap: 8px; margin: 2px 0 12px; }
.stars[hidden] { display: none; }
.stars i { width: 44px; height: 44px; animation: starpop 0.5s var(--d) both cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes starpop { from { transform: scale(0); } }
.tip { background: #fff4d6; border-radius: 12px; padding: 8px 12px; font-size: 14px; font-weight: 700; margin: 0 0 14px; line-height: 1.5; }
.tip[hidden] { display: none; }
.btns { display: grid; gap: 8px; }
.btns [hidden] { display: none; }
.big.alt { background: #fff; font-size: 19px; padding: 10px; }

/* ---------- 技能鈕(右下,冷卻時一圈倒數) ---------- */
/* ---------- 技能鈕(11/02 她說太醜不夠威 → 寶珠 + 緞帶 + 準備好時背後轉光芒) ---------- */
.skill { position: fixed; right: calc(8px + env(safe-area-inset-right, 0px)); bottom: calc(140px + var(--sb) + var(--hx, 0px)); transition: bottom 0.25s; z-index: 5; width: 100px; height: 108px; border: 0; background: none; box-shadow: none; padding: 0; overflow: visible; }
.skill[hidden] { display: none; }
/* 背後的光芒:準備好才出現,慢慢轉 */
.skill .sk-rays { position: absolute; left: -12px; top: -14px; width: 124px; height: 124px; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: repeating-conic-gradient(rgba(255, 226, 110, 0.85) 0 9deg, rgba(255, 226, 110, 0) 9deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 0 34%, #000 36% 52%, transparent 70%); mask: radial-gradient(circle, transparent 0 34%, #000 36% 52%, transparent 70%); }
.skill.ready .sk-rays { opacity: 1; animation: skrays 7s linear infinite; }
@keyframes skrays { to { transform: rotate(360deg); } }
/* 寶珠本體 */
.skill .sk-orb { position: absolute; left: 6px; top: 2px; width: 88px; height: 88px; border-radius: 50%; border: 4px solid var(--ink); overflow: hidden; display: grid; place-items: center;
  box-shadow: 0 5px 0 var(--ink), inset 0 0 0 4px rgba(255, 255, 255, 0.85), inset 0 -10px 16px rgba(10, 30, 90, 0.35);
  background: radial-gradient(circle at 50% 30%, #8ee6ff 0, #3a9bff 55%, #1f4fc4 100%); transition: filter 0.3s, transform 0.12s; }
.skill.magnet .sk-orb { background: radial-gradient(circle at 50% 30%, #fff1a0 0, #ffb81c 55%, #d77a00 100%); box-shadow: 0 5px 0 var(--ink), inset 0 0 0 4px rgba(255, 255, 255, 0.85), inset 0 -10px 16px rgba(110, 50, 0, 0.35); }
.skill .sk-orb::before { content: ""; position: absolute; left: 16%; top: 7%; width: 68%; height: 32%; border-radius: 50%; background: linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0)); z-index: 1; pointer-events: none; }
/* 冷卻:一圈變暗慢慢退掉 */
.skill .sk-orb::after { content: ""; position: absolute; inset: 0; background: conic-gradient(rgba(20, 26, 40, 0.6) calc(var(--cd, 0) * 360deg), transparent 0); z-index: 2; pointer-events: none; }
.skill:not(.ready) .sk-orb { filter: saturate(0.55) brightness(0.9); }
/* 圖示:大泡泡(彩虹光澤)+ 兩顆小泡泡;磁鐵是一枚金幣 */
.skill .sk-ic { width: 52px; height: 52px; border-radius: 50%; position: relative; z-index: 1; }
.skill.burst .sk-ic { background: radial-gradient(circle at 34% 30%, #fff 0 12%, rgba(255, 255, 255, 0) 13%), conic-gradient(from 200deg, #ff9ad5, #ffe27a, #8ff0c0, #8fd4ff, #c9a3ff, #ff9ad5);
  -webkit-mask: radial-gradient(circle, rgba(0,0,0,0.35) 0 55%, #000 70%); mask: radial-gradient(circle, rgba(0,0,0,0.35) 0 55%, #000 70%); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9); }
.skill.burst .sk-orb > i { position: absolute; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.95); background: radial-gradient(circle at 35% 30%, #fff 0 18%, rgba(200, 240, 255, 0.35) 22%); z-index: 1; }
.skill.burst .sk-orb > i.b1 { width: 16px; height: 16px; right: 13px; top: 18px; }
.skill.burst .sk-orb > i.b2 { width: 11px; height: 11px; left: 15px; bottom: 20px; }
.skill.magnet .sk-orb > i { display: none; }
.skill.magnet .sk-ic { background: url(img/coin-face.webp) center / contain no-repeat; filter: drop-shadow(0 2px 0 rgba(120, 60, 0, 0.6)); }
.skill.ready .sk-ic { animation: skbob 1.6s ease-in-out infinite; }
@keyframes skbob { 50% { transform: translateY(-3px) scale(1.06); } }
/* 準備好:寶珠外面一圈金光慢慢呼吸 */
.skill.ready .sk-orb { animation: skglow 1.6s ease-in-out infinite; }
@keyframes skglow { 50% { box-shadow: 0 5px 0 var(--ink), inset 0 0 0 4px rgba(255, 255, 255, 0.85), inset 0 -10px 16px rgba(10, 30, 90, 0.35), 0 0 16px 6px rgba(255, 220, 90, 0.85); } }
/* 冷卻倒數的秒數 */
.skill .sk-cd { position: absolute; left: 6px; top: 2px; width: 88px; height: 88px; display: grid; place-items: center; z-index: 3; pointer-events: none; font: 900 30px/1 "Chiron GoRound TC", var(--font); color: #fff;
  -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.skill.ready .sk-cd { display: none; }
/* 名字:黃色緞帶壓在寶珠下緣 */
.skill .sk-name { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); white-space: nowrap; z-index: 4; padding: 2px 9px 3px; border: 3px solid var(--ink); border-radius: 999px;
  background: linear-gradient(#fff3a0, #ffc21f); box-shadow: 0 3px 0 var(--ink); font-size: 13px; font-weight: 900; line-height: 1.15; color: var(--ink); margin: 0; }
.skill:not(.ready) .sk-name { background: linear-gradient(#f2efe6, #d9d3c4); }
.skill:active .sk-orb { transform: scale(0.92); }

/* ---------- 開始下一波(下一波有哪些蟲、提早開始送的金幣) ---------- */
.skip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 96px); }
.skip .pv { display: inline-flex; gap: 6px; font-size: 14px; }
.skip .pv span { display: inline-flex; align-items: center; gap: 1px; }
.skip .pv i { width: 24px; height: 24px; background: center / contain no-repeat; display: inline-block; }
.skip .bn { display: inline-flex; align-items: center; gap: 3px; background: #fff; border-radius: 999px; padding: 0 8px; font-size: 14px; border: 2px solid var(--ink); }
.skip .ci { width: 15px; height: 15px; border-radius: 50%; display: inline-block; background: radial-gradient(circle at 40% 38%, #fff3b0 0 18%, #ffd23f 19% 60%, #f0a800 61%); }
.pill.fruit.warn { animation: warn 0.8s ease-in-out infinite; background: #ffe3df; }
@keyframes warn { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .skill.ready .sk-rays, .skill.ready .sk-orb, .skill.ready .sk-ic, .pill.fruit.warn, .ptag.can, .stars i { animation: none; } }
@media (max-width: 480px) { .hint { font-size: 15px; padding: 8px 12px; } }

/* ---------- 第二版:過關星星、六關總結、新塔的價格牌圖示 ---------- */
.clear { position: fixed; left: 50%; top: 56%; transform: translate(-50%, 0) scale(0.6); opacity: 0; z-index: 7; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 22px; padding: 10px 22px 12px; box-shadow: 0 5px 0 var(--ink); transition: opacity 0.3s, transform 0.35s cubic-bezier(0.3, 1.5, 0.5, 1); }
.clear[hidden] { display: none; }
.clear.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.clear b { font-size: 22px; font-weight: 900; }
.clear small { font-size: 14px; font-weight: 800; color: #6f7c77; }
.clear .stars { margin: 2px 0; }
.clear .stars i { width: 38px; height: 38px; }
.stars.run { flex-wrap: wrap; gap: 6px 10px; }
.stars.run span { display: inline-flex; align-items: center; gap: 1px; background: #fff7d6; border-radius: 999px; padding: 2px 8px 2px 6px; }
.stars.run small { font-size: 12px; font-weight: 900; color: #8a7a55; margin-right: 3px; }
.stars.run i { width: 20px; height: 20px; }
.ic.fountain { background: radial-gradient(circle at 50% 70%, #fff 0 14%, #7cd8ff 15% 48%, #2fb5c8 49% 70%, #e9e1d3 71%); }
.ic.wind { background: conic-gradient(#f2665c 0 25%, #ffd34d 0 50%, #7cc8f2 0 75%, #8bd96b 0); box-shadow: inset 0 0 0 3px #fff; }
.ic.scope { background: radial-gradient(circle at 50% 50%, #bfe9ff 0 26%, #4f5fc9 27% 55%, #d9a066 56% 72%, #fffdf8 73%); }
.ic.rainbow { background: radial-gradient(circle at 38% 34%, #fff 0 14%, transparent 15%), conic-gradient(#f2665c, #ff9b54, #ffd34d, #8bd96b, #7cc8f2, #b59cf0, #f2665c); }
@media (max-width: 480px) { .wave { font-size: 14px; padding: 3px 6px 6px; } }
@media (prefers-reduced-motion: reduce) { .clear { transition: opacity 0.3s; } }

/* ---------- 無盡模式:暱稱、抽卡、手上的卡、選卡、排行榜 ---------- */
.namerow { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; font-size: 14px; font-weight: 800; color: #6f7c77; }
.namerow b { color: var(--ink); font-size: 16px; background: #fff7d6; border-radius: 999px; padding: 2px 10px; }
.ghost.sm { padding: 3px 9px; font-size: 13px; }
.nameform { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 0 8px; }
.nameform[hidden] { display: none; }
.nameform input { font: inherit; font-weight: 800; font-size: 16px; border: 2.5px solid var(--ink); border-radius: 12px; padding: 5px 10px; width: 11em; max-width: 60vw; }
.nameerr { width: 100%; margin: 0; color: #d0453b; font-size: 13px; font-weight: 800; min-height: 1em; }
.minor { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.minor .ghost { font-size: 14px; }

.draw { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 8; width: max-content; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer;
  background: rgba(255, 253, 248, 0.94); border: 3px solid var(--ink); border-radius: 22px; padding: 12px 16px 16px; box-shadow: 0 5px 0 var(--ink); opacity: 0; transition: opacity 0.25s; max-width: calc(100vw - 24px); }
.draw[hidden] { display: none; }
.draw.show { opacity: 1; }
.draw .dt { font-size: 22px; font-weight: 900; }
.dcs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.dc { width: 96px; padding: 12px 6px 8px; border-radius: 16px; background: #fff; border: 4px solid var(--rc, #7cc8f2); display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 3px 0 var(--ink); animation: cardflip 0.5s var(--d) both cubic-bezier(0.3, 1.4, 0.5, 1); }
.dc .ic { width: 52px; height: 52px; border-radius: 50%; display: block; }
.dc b { font-size: 15px; font-weight: 900; }
.dc small { font-size: 12px; font-weight: 900; color: #fff; background: var(--rc, #7cc8f2); border-radius: 999px; padding: 1px 8px; }
.dc.rare, .pc.rare, .hc.rare { --rc: #4fb06a; }
.dc.epic, .pc.epic, .hc.epic { --rc: #9b6fe8; }
.dc.legend, .pc.legend, .hc.legend { --rc: #f0a800; }
.dc.epic { box-shadow: 0 3px 0 var(--ink), 0 0 18px 4px rgba(155, 111, 232, 0.55); }
.dc.legend { background: linear-gradient(160deg, #fff8d6, #ffe7f3 50%, #e3f6ff); box-shadow: 0 3px 0 var(--ink), 0 0 24px 8px rgba(255, 200, 0, 0.7); }
@keyframes cardflip { from { transform: rotateY(90deg) scale(0.6); opacity: 0; } }

.hand { position: fixed; left: calc(10px + env(safe-area-inset-left, 0px)); top: calc(66px + env(safe-area-inset-top, 0px)); z-index: 5; display: flex; flex-direction: column; gap: 5px; align-items: center;
  background: rgba(255, 253, 248, 0.88); border: 2.5px solid var(--ink); border-radius: 16px; padding: 6px 5px; pointer-events: none; }
.hand[hidden] { display: none; }
.hc { position: relative; width: 40px; height: 40px; border-radius: 12px; border: 3px solid var(--rc, #7cc8f2); background: #fff; display: grid; place-items: center; }
.hc .ic { width: 28px; height: 28px; border-radius: 50%; display: block; }
.hc b { position: absolute; right: -7px; bottom: -6px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 3px; }
.hc.poor { opacity: 0.55; }
.hand small { font-size: 10px; font-weight: 900; color: #6f7c77; text-align: center; line-height: 1.2; }
.hand em { font-size: 11px; font-weight: 800; font-style: normal; color: #6f7c77; }

.picker { position: fixed; left: 50%; bottom: calc(150px + var(--sb) + var(--hx, 0px)); transform: translateX(-50%); z-index: 6; width: max-content; max-width: calc(100vw - 20px);
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 6px 8px 8px; box-shadow: 0 4px 0 var(--ink); text-align: center; }
.picker[hidden] { display: none; }
.picker p { margin: 0 0 5px; font-size: 13px; font-weight: 900; }
.pk { display: flex; gap: 6px; overflow-x: auto; }
.pc { position: relative; flex: none; width: 74px; padding: 6px 3px 5px; border-radius: 14px; background: #fff; border: 3px solid var(--rc, #7cc8f2); display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 3px 0 var(--ink); }
.pc .ic { width: 34px; height: 34px; border-radius: 50%; display: block; }
.pc b { font-size: 12px; font-weight: 900; white-space: nowrap; }
.pc .cost { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 900; }
.pc .cost .ci { width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 40% 38%, #fff3b0 0 18%, #ffd23f 19% 60%, #f0a800 61%); }
.pc em { position: absolute; right: 3px; top: 2px; font-size: 11px; font-weight: 900; font-style: normal; color: #6f7c77; }
.pc kbd { position: absolute; left: 4px; top: 2px; font: 900 11px/1 inherit; color: #9aa6a1; }
.pc:disabled { opacity: 0.45; box-shadow: none; }
.pc:not(:disabled):active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.ptag .ic.slot { border-radius: 5px; width: 18px; height: 24px; background: linear-gradient(#fff, #fff) center / 66% 70% no-repeat, #ffd34d; box-shadow: inset 0 0 0 2px #e0a000; }

.board { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 5px; max-height: min(60vh, 560px); overflow-y: auto; text-align: left; }
.board li { display: flex; align-items: center; gap: 8px; background: #fff; border: 2.5px solid #e6e0d2; border-radius: 12px; padding: 5px 10px; font-weight: 800; }
.board li.me { background: #fff4c2; border-color: var(--ink); }
.board li.empty { justify-content: center; color: #6f7c77; }
.board .rk { width: 26px; text-align: center; font-weight: 900; color: #8a7a55; }
.board li:nth-child(1) .rk { color: #e0a000; } .board li:nth-child(2) .rk { color: #9aa6b0; } .board li:nth-child(3) .rk { color: #c07a45; }
.board .hd { width: 18px; height: 18px; border-radius: 50%; flex: none; background: #fddf22; border: 2px solid var(--ink); }
.board .hd.q { background: #f4f7fb; }
.board b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .wv { font-weight: 900; color: var(--blue); }
.board.small { max-height: 230px; }
.endboard { margin: 0 0 12px; }
.endboard[hidden] { display: none; }
.endboard .rank { margin: 0; font-weight: 800; font-size: 15px; }
.endboard .rank b { color: var(--blue); font-size: 18px; }
@media (max-width: 480px) { .steps li { padding-top: 4px; padding-bottom: 4px; } .pc { width: 66px; } }
@media (prefers-reduced-motion: reduce) { .dc { animation: none; } }

/* 價格牌可以點:點了主角會自己走過去 */
.ptag { pointer-events: auto; cursor: pointer; touch-action: none; }

/* 10/31:靜音鈕搬到右上(左下太靠近搖桿會誤觸);開始下一波固定一行;手機的選卡靠左(不會壓到右邊的技能鈕) */
.mute { left: auto; right: calc(10px + env(safe-area-inset-right, 0px)); bottom: auto; top: calc(148px + var(--st)); width: 40px; height: 40px; font-size: 18px; }
.skip { flex-wrap: nowrap; white-space: nowrap; max-width: calc(100vw - 24px); }
.skip .pv { gap: 4px; }
@media (max-width: 520px) {
  .skip { padding: 7px 12px; font-size: 15px; gap: 6px; }
  .skip .pv i { width: 20px; height: 20px; }
  .picker { left: calc(10px + env(safe-area-inset-left, 0px)); transform: none; max-width: calc(100vw - 124px); }
}

/* 神話卡:星光塔 */
.ic.star { background: linear-gradient(135deg, #fff7c2, #ffc93c 45%, #ff7ab6); clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); border-radius: 0; }
.dc.mythic, .pc.mythic, .hc.mythic { --rc: #e0459a; }
.dc.mythic { background: linear-gradient(160deg, #fff3fb, #fff7d6 40%, #e9f7ff 70%, #f3e9ff);
  box-shadow: 0 3px 0 var(--ink), 0 0 26px 10px rgba(255, 95, 168, 0.6), 0 0 50px 16px rgba(255, 200, 0, 0.35); animation: cardflip 0.5s var(--d) both cubic-bezier(0.3, 1.4, 0.5, 1), mythglow 1.2s 0.6s ease-in-out infinite; }
@keyframes mythglow { 50% { box-shadow: 0 3px 0 var(--ink), 0 0 34px 14px rgba(124, 200, 242, 0.65), 0 0 60px 20px rgba(255, 95, 168, 0.4); } }
@media (prefers-reduced-motion: reduce) { .dc.mythic { animation: none; } }

/* 加購大爆發:技能鈕右上角的小金幣 + 上方的詢問框 */
.skill .sk-buy { display: none; position: absolute; right: 2px; top: 0; width: 22px; height: 22px; border-radius: 50%; z-index: 5;
  background: radial-gradient(circle at 40% 38%, #fff3b0 0 18%, #ffd23f 19% 60%, #f0a800 61%); box-shadow: 0 0 0 2px var(--ink); }
.skill.buyable:not(.ready) .sk-buy { display: block; }
.buy { position: fixed; right: calc(10px + env(safe-area-inset-right, 0px)); bottom: calc(240px + var(--sb) + var(--hx, 0px)); z-index: 7; width: min(250px, calc(100vw - 20px));
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 10px 12px; box-shadow: 0 4px 0 var(--ink); text-align: center; }
.buy[hidden] { display: none; }
.buy p { margin: 0 0 8px; font-weight: 800; font-size: 15px; line-height: 1.45; }
.buy p b { color: #e09a00; font-size: 18px; }
.buyb { display: flex; gap: 8px; align-items: center; justify-content: center; }
.buyb .big { padding: 8px 16px; font-size: 17px; }
.buyb .big:disabled { opacity: 0.55; box-shadow: none; }
.buyb .big { width: auto; flex: 1; }

/* 10/31 開始畫面:直接取名字、下方固定顯示第一名 */
.namebox { margin: 8px 0 12px; text-align: left; }
.namebox label { display: block; font-size: 14px; font-weight: 900; color: #6f7c77; margin: 0 0 4px 4px; }
.namein { display: flex; gap: 8px; }
.namein input { flex: 1; min-width: 0; font: inherit; font-size: 20px; font-weight: 900; color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 8px 12px; background: #fff; }
.namein .ghost { font-size: 22px; padding: 2px 12px; }
.champ { margin: 12px 0 4px; background: #fff7d6; border-radius: 14px; padding: 8px 10px; font-weight: 800; font-size: 15px; }
.champ[hidden] { display: none; }
.champ b { color: #e09a00; }
.minor .hot { background: #fff1a8; border-color: var(--ink); animation: hotpulse 1.2s ease-in-out infinite; }
@keyframes hotpulse { 50% { transform: scale(1.07); } }

/* 玩法教學:下方的教練框 */
.coach { position: fixed; left: 50%; bottom: calc(14px + var(--sb)); transform: translateX(-50%); z-index: 6; width: min(560px, calc(100vw - 20px)); display: flex; gap: 10px; align-items: flex-start;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 10px 12px; box-shadow: 0 4px 0 var(--ink); }
.coach[hidden] { display: none; }
.ch-av { flex: none; width: 44px; height: 44px; border-radius: 50%; background: #fddf22; border: 3px solid var(--ink); display: grid; place-items: center; font-size: 22px; }
.ch-body { flex: 1; min-width: 0; }
.ch-body small { font-size: 12px; font-weight: 900; color: var(--blue); }
.ch-body p { margin: 2px 0 6px; font-size: 16px; font-weight: 800; line-height: 1.5; }
.ch-btns { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.ch-btns [hidden] { display: none; }
.ch-btns .big { width: auto; padding: 8px 18px; font-size: 18px; }
@media (prefers-reduced-motion: reduce) { .minor .hot { animation: none; } }

/* 塔圖鑑 */
.dexnote { margin: 0 0 10px; font-size: 14px; font-weight: 800; color: #6f7c77; }
.twgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; text-align: left; max-height: min(70vh, 640px); overflow-y: auto; }
.tw { background: #fff; border: 3px solid var(--rc, #7cc8f2); border-radius: 18px; padding: 10px 12px; box-shadow: 0 3px 0 var(--ink); }
.tw.rare { --rc: #4fb06a; } .tw.epic { --rc: #9b6fe8; } .tw.legend { --rc: #f0a800; } .tw.mythic { --rc: #e0459a; }
.tw.legend { background: linear-gradient(160deg, #fffbe8, #fff); } .tw.mythic { background: linear-gradient(160deg, #fff3fb, #fff7d6 60%, #fff); }
.twtop { display: flex; align-items: center; gap: 6px; }
.twtop .tw1 { width: 48px; height: 48px; flex: none; display: block; }
.twtop .tw5 { width: 64px; height: 64px; flex: none; display: block; background: center / contain no-repeat; }
.twtop .arr { color: #9aa6a1; font-weight: 900; }
.twname { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-left: 4px; }
.twname b { font-size: 19px; }
.twname .rar { font-size: 12px; font-weight: 900; color: #fff; background: var(--rc, #7cc8f2); border-radius: 999px; padding: 1px 9px; }
.twname small { width: 100%; font-size: 13px; font-weight: 800; color: #6f7c77; }
.tw p { margin: 6px 0 6px; font-size: 14px; font-weight: 700; color: #4f5d58; }
.tw table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-weight: 700; }
.tw th { font-size: 11.5px; color: #8a7a55; font-weight: 900; text-align: left; padding: 2px 3px; border-bottom: 2px solid #f1ede3; }
.tw td { padding: 3px; border-bottom: 1px solid #f4f1ea; white-space: nowrap; }
.tw td:nth-child(4) { white-space: normal; }
@media (max-width: 480px) { .twgrid { grid-template-columns: 1fr; max-height: 68vh; } .tw table { font-size: 12px; } }

/* 換場景的白霧 */
.fade { position: fixed; inset: 0; z-index: 9; pointer-events: none; opacity: 0; transition: opacity 0.6s ease;
  background: radial-gradient(ellipse at 50% 45%, #ffffff 0%, #f3f8ff 45%, #dfeaf9 100%); }
.fade[hidden] { display: none; }
.fade.on { opacity: 1; }

/* App 內建瀏覽器(LINE、FB…)的提示 */
.iab { position: fixed; inset: 0; z-index: 12; display: flex; align-items: center; justify-content: center; padding: calc(16px + var(--st)) 16px calc(16px + var(--sb)); background: rgba(34, 58, 70, 0.5); overflow-y: auto; }
.iab[hidden] { display: none; }
.iabcard .iab-ic { font-size: 48px; line-height: 1; margin-top: 2px; }
.iabcard h2 { font-size: 25px; }
.iabcard > p { margin: 8px 0 16px; font-weight: 700; font-size: 16px; line-height: 1.6; }
.iabhow { background: #fff7d6; border-radius: 14px; padding: 10px 12px; text-align: left; }
.iabhow[hidden] { display: none; }
.iabhow p { margin: 0 0 6px; font-weight: 700; font-size: 15px; line-height: 1.6; }
.iaburl { display: block; font-size: 14px; font-weight: 700; color: #2a7bb8; word-break: break-all; -webkit-user-select: all; user-select: all; }
.iabnote { margin: 10px 0 0; font-size: 13px; font-weight: 700; line-height: 1.5; color: #b5651d; }
.iabnote[hidden] { display: none; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: #2a7bb8; text-decoration: underline; cursor: pointer; }
/* 大爆發的閃光(蓋在遊戲畫面上、介面下面,點擊穿透) */
#fxFlash { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 55%, #ffffff 0%, #e6f8ff 45%, rgba(191, 233, 255, 0) 100%); }
#fxFlash.on { animation: fxflash 0.5s ease-out; }
@keyframes fxflash { 0% { opacity: 0.85; } 100% { opacity: 0; } }
/* 有新版本:畫面上方中間的提示條 */
.updbar { position: fixed; z-index: 30; left: 50%; top: calc(66px + var(--st)); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; white-space: nowrap;
  background: #fffdf8; border: 3px solid var(--ink); border-radius: 999px; box-shadow: 0 4px 0 var(--ink); padding: 6px 6px 6px 14px; font-weight: 900; font-size: 15px; color: var(--ink); }
.updbar[hidden] { display: none; }
.updbar button { border: 3px solid var(--ink); border-radius: 999px; background: #ffd34d; font: inherit; font-weight: 900; padding: 4px 12px; color: var(--ink); cursor: pointer; touch-action: none; }
/* 加到主畫面:開始畫面的按鈕 + 說明視窗(iPhone / Android 兩個分頁) */
.a2hsbtn { display: block; margin: 10px auto 0; font-size: 14px; font-weight: 800; }
.a2hsbtn[hidden] { display: none; }
.a2hscard { text-align: center; word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.a2hs-ic { display: block; margin: 0 auto 4px; width: 76px; height: 76px; border-radius: 18px; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
.a2hs-sub { margin: 2px 0 10px; font-weight: 700; font-size: 15px; color: #52606a; }
.a2tabs { display: flex; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; margin: 8px 0 10px; }
.a2tabs button { flex: 1; border: 0; background: #fff; font: inherit; font-weight: 900; font-size: 15px; padding: 7px 4px; color: var(--ink); cursor: pointer; }
.a2tabs button.on { background: #ffd34d; }
.a2tabs button + button { border-left: 3px solid var(--ink); }
.a2steps { margin: 0; padding: 0; list-style: none; counter-reset: a2; text-align: left; display: grid; gap: 8px; }
.a2steps li { counter-increment: a2; position: relative; padding: 8px 10px 8px 44px; background: #fff7d6; border-radius: 14px; font-weight: 700; font-size: 15px; line-height: 1.55; }
.a2steps li::before { content: counter(a2); position: absolute; left: 10px; top: 8px; width: 24px; height: 24px; border-radius: 50%; background: #7cc8f2; color: #fff; font-weight: 900; font-size: 14px; display: grid; place-items: center; border: 2px solid var(--ink); }
.a2steps small { display: block; font-size: 13px; color: #6f7c77; font-weight: 700; }
.a2i { width: 20px; height: 20px; vertical-align: -4px; margin: 0 2px; }
.a2note { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: #6f7c77; line-height: 1.6; }
#a2hsInstall { margin: 0 0 10px; }
#a2hsInstall[hidden] { display: none; }

/* 11/01:手上的卡可以點(看說明);換塔面板看得懂、文字只在段落之間換行 */
.hand .hc { pointer-events: auto; cursor: pointer; touch-action: none; }
.hand .hc:active { transform: scale(0.94); }
.ph { display: inline-block; }
.picker .pkt { margin: 0 0 6px; display: flex; flex-direction: column; gap: 1px; }
.picker .pkt b { font-size: 14px; font-weight: 900; line-height: 1.35; }
.picker .pkt small { font-size: 12px; font-weight: 800; color: #6f7c77; line-height: 1.35; }
.pkh { display: flex; align-items: center; gap: 9px; text-align: left; margin: 2px 0 8px; }
.pkh .pkt { margin: 0; }
.pkf { position: relative; flex: none; width: 46px; height: 46px; border-radius: 12px; border: 3px solid var(--rc, #7cc8f2); background: #fff; display: grid; place-items: center; }
.pkf .ic { width: 34px; height: 34px; border-radius: 50%; display: block; }
.pkf em { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); font-size: 11px; font-weight: 900; font-style: normal; line-height: 1; background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 6px; white-space: nowrap; }
.picker.swap { border-color: #e09a00; }
.rb { display: inline-block; font-size: 11px; font-weight: 900; font-style: normal; color: #fff; background: var(--rc, #7cc8f2); border-radius: 999px; padding: 0 7px; line-height: 17px; white-space: nowrap; }
.pc .rb { margin: 1px 0; }
.pc .cost { white-space: nowrap; }
.picker.swap .pc .cost { font-size: 12px; color: #b5651d; }
.pkf.rare, .cinfo.rare { --rc: #4fb06a; }
.pkf.epic, .cinfo.epic { --rc: #9b6fe8; }
.pkf.legend, .cinfo.legend { --rc: #f0a800; }
.pkf.mythic, .cinfo.mythic { --rc: #e0459a; }

.cinfo { position: fixed; left: calc(72px + env(safe-area-inset-left, 0px)); top: calc(66px + env(safe-area-inset-top, 0px)); z-index: 7; width: min(260px, calc(100vw - 84px));
  background: var(--paper); border: 3px solid var(--rc, #7cc8f2); border-radius: 16px; padding: 10px 12px 9px; box-shadow: 0 4px 0 var(--ink); text-align: left; animation: cipop 0.18s ease-out; }
.cinfo[hidden] { display: none; }
@keyframes cipop { from { transform: scale(0.85); opacity: 0; } }
.cih { display: flex; align-items: center; gap: 10px; }
.cih .ic { flex: none; width: 48px; height: 48px; border-radius: 50%; display: block; }
.cih b { display: block; font-size: 18px; font-weight: 900; line-height: 1.2; }
.rbl { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.cst { font-size: 13px; letter-spacing: 1px; color: var(--rc, #7cc8f2); white-space: nowrap; }
.cst i { font-style: normal; color: #ddd6c6; }
.cid { margin: 8px 0 6px; font-size: 14px; font-weight: 800; line-height: 1.5; }
.cinfo ul { margin: 0; padding: 0 0 0 16px; font-size: 13px; font-weight: 700; line-height: 1.5; color: #55615c; }
.cinfo li + li { margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .cinfo { animation: none; } }

/* 卡片太多就換到下一排(不要藏在橫向捲動裡);長句平均分行 */
.picker .pk { flex-wrap: wrap; justify-content: center; overflow: visible; }
.hint, .ch-body p, .cid, .cinfo li, .buy p { text-wrap: balance; }

/* 賣卡 */
.sellb { margin-top: 8px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; background: #fff7d6; border: 2.5px solid var(--ink); border-radius: 14px; padding: 6px 10px;
  font-weight: 900; font-size: 15px; color: var(--ink); box-shadow: 0 3px 0 var(--ink); cursor: pointer; }
.sellb span { display: inline-flex; align-items: center; gap: 3px; color: #b5651d; }
.sellb .ci { width: 15px; height: 15px; border-radius: 50%; background: radial-gradient(circle at 40% 38%, #fff3b0 0 18%, #ffd23f 19% 60%, #f0a800 61%); }
.sellb:active { transform: translateY(3px); box-shadow: none; }
.sellb.sure { background: #ffe0d6; }
.buy p small { display: block; margin-top: 3px; font-size: 12px; font-weight: 800; color: #6f7c77; }

/* 暫停、接著玩 */
.rstat { list-style: none; margin: -4px 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rstat li { background: #eef8ea; border-radius: 12px; padding: 6px 2px 5px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.rstat b { font-size: 20px; font-weight: 900; line-height: 1.1; }
.rstat small { font-size: 12px; font-weight: 800; color: #6f7c77; white-space: nowrap; }
#resumeNew.sure { background: #ffe0d6; }
.countin { position: fixed; left: 50%; top: 40%; z-index: 11; transform: translate(-50%, -50%); pointer-events: none; font-size: 128px; font-weight: 900; line-height: 1;
  color: #ffd34d; -webkit-text-stroke: 8px var(--ink); paint-order: stroke fill; text-shadow: 0 7px 0 var(--ink); }
.countin[hidden] { display: none; }
.countin.pop { animation: cpop 0.8s ease-out both; }
@keyframes cpop { 0% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; } 25% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(0.85); opacity: 0; } }

/* 翻牌抽卡:放在畫面下方(10/31 她說這樣單手比較好按);右邊留給「泡泡大爆發」,翻牌時也能按;5 張的時候排兩排 */
.fdraw { position: fixed; left: calc(10px + env(safe-area-inset-left, 0px)); right: calc(104px + env(safe-area-inset-right, 0px)); bottom: calc(12px + var(--sb)); z-index: 8; display: flex; justify-content: center; pointer-events: none; }
.fdraw[hidden] { display: none; }
.flipbox { pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 4px; width: min(470px, 100%); text-align: center;
  background: rgba(255, 253, 248, 0.94); border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 5px 0 var(--ink); padding: 8px 10px 12px; animation: fbin 0.35s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes fbin { from { transform: translateY(40px) scale(0.85); opacity: 0; } }
.fdraw .fh { font-size: 13px; font-weight: 900; color: #fff; background: var(--ink); border-radius: 999px; padding: 1px 12px; }
.fdraw .fh[hidden] { display: none; }
.fdraw .ft { font-size: 26px; font-weight: 900; line-height: 1.15; color: #ffd34d; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); }
.fdraw .fsub { margin: 0 0 4px; font-size: 14px; font-weight: 900; color: var(--ink); line-height: 1.4; }
.fdraw .fsub b { color: #e0459a; }
.fdraw .fauto { color: #6f7c77; white-space: nowrap; }
.fdraw .fauto b { color: #b5651d; }
.frow { display: flex; gap: 8px; justify-content: center; width: 100%; perspective: 900px; }
.fc { position: relative; flex: 0 1 96px; min-width: 0; aspect-ratio: 3 / 4.1; border: 0; padding: 0; background: none; cursor: pointer; pointer-events: none; animation: fcin 0.45s cubic-bezier(.3, 1.5, .5, 1) backwards; animation-delay: var(--d, 0s); }
@keyframes fcin { from { transform: translateY(30px) scale(0.6); opacity: 0; } }
.fc-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.55s cubic-bezier(.3, 1.35, .5, 1); }
.fc.open .fc-in { transform: rotateY(180deg); }
.fc-b, .fc-f { position: absolute; inset: 0; border-radius: 14px; border: 3px solid var(--ink); -webkit-backface-visibility: hidden; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 3px 0 var(--ink); overflow: hidden; }
.fc-b { background: repeating-linear-gradient(45deg, #ffd34d 0 9px, #ffc61a 9px 18px); }
.fc-b i { width: 58%; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 28px; font-weight: 900; color: var(--ink);
  background: radial-gradient(circle at 36% 32%, #fff 0 16%, #e8f8ff 17% 55%, #bfe9f7 56%); border: 3px solid var(--ink); }
.fc:not(.open) .fc-b { animation: fcglow 1.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes fcglow { 50% { box-shadow: 0 3px 0 var(--ink), 0 0 16px 4px rgba(255, 210, 60, 0.95); } }
.fc:not(.open):active .fc-in { transform: scale(0.95); }
.fc-f { transform: rotateY(180deg); background: #fff; border-color: var(--rc, #7cc8f2); padding: 3px; }
.fc-f .ic { width: 52%; aspect-ratio: 1; display: block; border-radius: 50%; }
.fc-f b { font-size: 14px; font-weight: 900; line-height: 1.2; white-space: nowrap; }
.fc-f em { font-style: normal; font-size: 11px; font-weight: 800; color: #6f7c77; white-space: nowrap; }
.fc.rare, .fluck.rare { --rc: #4fb06a; }
.fc.epic, .fluck.epic { --rc: #9b6fe8; }
.fc.legend, .fluck.legend { --rc: #f0a800; }
.fc.mythic, .fluck.mythic { --rc: #e0459a; }
.fc.open.epic .fc-f { box-shadow: 0 3px 0 var(--ink), 0 0 16px 4px rgba(155, 111, 232, 0.6); }
.fc.open.legend .fc-f { background: linear-gradient(160deg, #fff8d6, #ffe7f3 50%, #e3f6ff); box-shadow: 0 3px 0 var(--ink), 0 0 22px 7px rgba(255, 200, 0, 0.75); }
.fc.open.mythic .fc-f { background: linear-gradient(160deg, #fff3fb, #fff7d6 40%, #e9f7ff 70%, #f3e9ff); box-shadow: 0 3px 0 var(--ink), 0 0 26px 9px rgba(224, 69, 154, 0.6); }
.fc.open.epic .fc-f em, .fc.open.legend .fc-f em, .fc.open.mythic .fc-f em { color: var(--rc); font-weight: 900; }
.fc.miss { opacity: 0.6; filter: grayscale(0.5); cursor: default; }
.fc.miss .fc-f { box-shadow: 0 3px 0 var(--ink); }
.fc.miss .fc-f::after { content: '沒翻到'; position: absolute; left: 0; right: 0; top: 0; background: rgba(43, 53, 50, 0.8); color: #fff; font-size: 11px; font-weight: 900; padding: 1px 0; }
.frow.n4 .fc-f b, .frow.n5 .fc-f b { font-size: 12px; }
.frow.n5 { gap: 8px; flex-wrap: wrap; }
.frow.n5 .fc { flex: 0 1 calc(31% - 8px); max-width: 104px; }
/* 4、5 張:用滿整個寬度(10/31 她說太擠,蓋到右邊沒關係);這時大爆發被蓋住,先不接觸控(免得想翻右邊的卡卻放了大爆發) */
.fdraw.n4, .fdraw.n5 { right: calc(10px + env(safe-area-inset-right, 0px)); }
body.flipwide #skillBtn, body.flipwide #buy { pointer-events: none; }
.frow.n5 .fc-f em { font-size: 10px; }
.frow.n5 .fc-f .rb { font-size: 10px; padding: 0 4px; line-height: 15px; }
.frow.n5 .fc-b i { font-size: 22px; }
.fluck { margin: 6px 0 0; display: flex; flex-direction: column; gap: 1px; background: #fff; border: 3px solid var(--rc, var(--ink)); border-radius: 14px; padding: 5px 12px; animation: lkin 0.4s cubic-bezier(.3, 1.6, .5, 1); }
.fluck[hidden] { display: none; }
.fluck b { font-size: 15px; font-weight: 900; color: var(--ink); text-wrap: balance; }
.fluck small { font-size: 12px; font-weight: 800; color: #6f7c77; }
@keyframes lkin { from { transform: scale(0.5); opacity: 0; } }
.fdraw.done .flipbox { cursor: pointer; }

/* 寶箱的防禦加成倒數 */
.defchip { position: fixed; left: 50%; top: calc(64px + var(--st)); transform: translateX(-50%); z-index: 9; pointer-events: none; white-space: nowrap;
  background: #e8f6ff; border: 3px solid var(--ink); border-radius: 999px; padding: 3px 12px; font-weight: 900; font-size: 14px; color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.defchip[hidden] { display: none; }
.defchip b { display: inline-block; min-width: 1.6em; margin-left: 6px; color: #2a7bb8; text-align: right; }

/* iPhone:點兩下不要放大頁面(畫布本身已經是 touch-action: none) */
html, body { touch-action: manipulation; }

/* 鳥瞰時:開始畫面、按鈕先藏起來;島名標在島上(點一下畫面就直接開始) */
body.intro #start, body.intro #hud, body.intro .mute, body.intro #skip, body.intro #skillBtn { visibility: hidden; }
.isletags { position: fixed; inset: 0; z-index: 19; }
.isletags[hidden] { display: none; }
.isletags::after { content: '跳過 ▶'; position: absolute; right: calc(12px + env(safe-area-inset-right, 0px)); bottom: calc(14px + var(--sb)); background: rgba(255, 253, 248, 0.92);
  border: 3px solid var(--ink); border-radius: 999px; padding: 6px 16px; font-weight: 900; font-size: 16px; color: var(--ink); box-shadow: 0 3px 0 var(--ink); pointer-events: none; }
.isletags span { position: absolute; left: 0; top: 0; white-space: nowrap; background: #fffdf8; border: 3px solid var(--ink); border-radius: 999px; padding: 3px 12px;
  font-weight: 900; font-size: 15px; color: var(--ink); box-shadow: 0 3px 0 var(--ink); pointer-events: none; }
.isletags span.here { background: #ffd34d; font-size: 17px; }

/* 換島:地震時的一大團塵土 */
.quakedust { position: fixed; inset: 0; z-index: 9; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 55%, rgba(255, 248, 232, 0.98) 0%, rgba(240, 226, 200, 0.95) 45%, rgba(214, 196, 166, 0.9) 100%); }
.quakedust[hidden] { display: none; }

/* 翻牌框出現時:手指的操作全部穿透到遊戲畫面(拖曳 = 搖桿 / 轉視角,輕點卡片 = 翻牌);被蓋住的按鈕先不接觸控,免得想翻牌卻按到「開始下一波」 */
body.flipping #skip, body.flipping .mute { pointer-events: none; }

/* 遊戲中的按鈕:不讓瀏覽器接手任何手勢(另一隻手按著搖桿時,兩根手指不會被當成「兩指縮放頁面」而把搖桿取消) */
.skill, .skip, .buy, .buy button, .mute, .mapbtn, .picker, .picker button, .hand, .sellb { touch-action: none; }

/* ---------- 無盡模式結算:光芒、發光勳章、緞帶、閃閃星星(11/01) ---------- */
.endhero { position: relative; height: 236px; margin: -6px -8px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; --c1: #ffe680; --c2: #f5b400; --glow: rgba(255, 200, 40, 0.75); }
.endhero[hidden] { display: none; }
.endhero.bronze { --c1: #ffd2a6; --c2: #cd7f32; --glow: rgba(230, 140, 60, 0.6); }
.endhero.silver { --c1: #ffffff; --c2: #9fb3c8; --glow: rgba(150, 200, 255, 0.75); }
.endhero.rainbow { --c1: #ffe1f2; --c2: #9f7bff; --glow: rgba(255, 120, 200, 0.8); }
.endhero .rays { position: absolute; left: 50%; top: 44%; width: 330px; height: 330px; margin: -165px 0 0 -165px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, var(--glow) 0 7deg, transparent 7deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%); mask: radial-gradient(circle, #000 18%, transparent 68%); animation: rayspin 14s linear infinite, fadein 0.6s both; }
.endhero.rainbow .rays { background: repeating-conic-gradient(from 0deg, rgba(255, 95, 168, 0.7) 0 7deg, transparent 7deg 15deg, rgba(255, 200, 40, 0.7) 15deg 22deg, transparent 22deg 30deg, rgba(95, 200, 255, 0.7) 30deg 37deg, transparent 37deg 45deg); }
.endhero .halo { position: absolute; left: 50%; top: 44%; width: 190px; height: 190px; margin: -95px 0 0 -95px; border-radius: 50%; background: radial-gradient(circle, #fff 0 30%, var(--glow) 55%, transparent 72%); animation: halopulse 1.8s ease-in-out infinite, fadein 0.6s both; }
@keyframes rayspin { to { transform: rotate(360deg); } }
@keyframes halopulse { 50% { transform: scale(1.12); opacity: 0.8; } }
@keyframes fadein { from { opacity: 0; } }
.endhero .badge { position: relative; isolation: isolate; width: 132px; height: 148px; margin-top: -14px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(160deg, #fff 0%, var(--c1) 30%, var(--c2) 100%);
  animation: badgepop 0.7s 0.15s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.endhero.rainbow .badge { background: linear-gradient(160deg, #fff 0%, #ffd0e8 22%, #ffb347 42%, #8fe07a 60%, #6fc8ff 78%, #a98bff 100%); }
/* 勳章內圈:深藍底讓白色數字更跳 */
.endhero .badge::before { content: ""; position: absolute; inset: 9px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(180deg, #3b4a6b, #1d2a44); z-index: -1; }
.endhero .badge b { font-size: 58px; font-weight: 900; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), 0 0 16px var(--glow); font-variant-numeric: tabular-nums; }
.endhero .badge small { font-size: 15px; font-weight: 900; color: var(--c1); letter-spacing: 2px; }
.endhero.done .badge b { animation: numglow 0.5s; }
@keyframes badgepop { from { transform: scale(0) rotate(-25deg); } }
@keyframes numglow { 40% { transform: scale(1.25); text-shadow: 0 0 30px #fff, 0 0 40px var(--glow); } }
/* 掃過勳章的一道亮光 */
.endhero .badge::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.75) 50%, transparent 65%); transform: translateX(-120%); animation: sweep 2.6s 1.2s ease-in-out infinite; }
@keyframes sweep { 35%, 100% { transform: translateX(120%); } }
.endhero .ribbon { position: relative; z-index: 2; margin-top: -16px; padding: 7px 26px 8px; font-size: 21px; font-weight: 900; color: #fff; letter-spacing: 1px; white-space: nowrap;
  background: linear-gradient(180deg, #ff8fb8, #f2507f); border: 3px solid var(--ink); border-radius: 10px; box-shadow: 0 4px 0 var(--ink); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
  animation: ribbonin 0.55s 0.55s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.endhero.gold .ribbon { background: linear-gradient(180deg, #ffb84d, #f08a00); }
.endhero.silver .ribbon { background: linear-gradient(180deg, #7fc4ff, #3f86d8); }
.endhero.bronze .ribbon { background: linear-gradient(180deg, #e8a36a, #b9672e); }
.endhero.rainbow .ribbon { background: linear-gradient(90deg, #ff5fa8, #ffa040, #5fc070, #4aa3ff, #9f7bff); }
.endhero.record .ribbon { background: linear-gradient(90deg, #ff5fa8, #ffb800, #ff5fa8); background-size: 200% 100%; animation: ribbonin 0.55s 0.55s cubic-bezier(0.3, 1.5, 0.5, 1) both, shimmer 1.4s linear infinite; }
@keyframes ribbonin { from { transform: scale(0.2) translateY(20px); opacity: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
.endhero .sparks { position: absolute; inset: 0; pointer-events: none; }
.endhero .sparks i { position: absolute; width: 18px; height: 18px; margin: -9px; background: #fff;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); animation: twinkle 1.6s var(--d) ease-in-out infinite both; }
.endhero .sparks i:nth-child(3n) { background: #ffe680; } .endhero .sparks i:nth-child(4n) { background: #ffb3d6; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0) rotate(0); } 50% { opacity: 1; transform: scale(var(--s)) rotate(90deg); } }
/* 統計:2×2 小卡 */
.stats.tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
.stats.tiles li { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px 7px; background: linear-gradient(180deg, #f3f9ff, #e4f1ff); border: 2.5px solid #cfe3f7; border-radius: 16px;
  animation: tilein 0.4s var(--d) cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.stats.tiles .ic { font-size: 22px; line-height: 1; }
.stats.tiles b { font-size: 26px; line-height: 1.1; }
.stats.tiles small { font-size: 13px; color: #5d6d68; font-weight: 800; }
@keyframes tilein { from { opacity: 0; transform: translateY(14px) scale(0.85); } }
/* 再挑戰一次:黃色大按鈕 + 一道亮光掃過 */
#again.hot { position: relative; overflow: hidden; background: var(--yellow); font-size: 22px; padding: 12px; }
#again.hot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.8) 50%, transparent 65%); transform: translateX(-120%); animation: sweep 2.4s 1.6s ease-in-out infinite; }
#end .card { overflow: hidden; }   /* 光芒不要畫出卡片外框 */

/* ---------- 遊戲標題字(11/01 她說原本字黏在一起):圓體粗體、字距拉開、每個字微微歪一下像招牌 ---------- */
.logo { font-family: "Chiron GoRound TC", var(--font) !important; font-weight: 900; line-height: 1.1; }
.card h1.logo { font-size: 44px; letter-spacing: 0; -webkit-text-stroke: 0; color: #6ec6f7; text-shadow: none; margin-bottom: 14px; }
.logo span { display: inline-block; margin: 0 1px; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink);
  transform: rotate(var(--r, 0deg)) translateY(var(--y, 0)); }
/* 11/02 她說「泡泡塔防」太淡被藍天吃掉 → 每個字一個鮮豔的顏色(避開藍色),外框照舊是深色粗框 */
.logo span:nth-of-type(1) { --r: -6deg; --y: 2px; color: #ff5c8a; }
.logo span:nth-of-type(2) { --r: 4deg; --y: -3px; color: #ffa41f; }
.logo span:nth-of-type(3) { --r: -3deg; --y: 1px; color: #a66bff; }
.logo span:nth-of-type(4) { --r: 6deg; --y: -2px; color: #3fcf5c; }
.card h1.logo small { display: block; font-size: 0.42em; letter-spacing: 7px; margin-bottom: 9px; color: #ffd34d; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); }
@media (max-width: 380px) { .card h1.logo { font-size: 40px; } }
#start .card h1.logo { font-size: 42px; }

/* 11/04 合成:左邊卡片夠 3 張亮「合成」;說明卡裡的合成按鈕 */
.hc .mg { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); text-decoration: none; font: 900 10px/14px var(--font, sans-serif); padding: 0 5px; border-radius: 99px; background: #ffd34d; border: 2px solid var(--ink); color: var(--ink); white-space: nowrap; animation: mgpulse 1s ease-in-out infinite; }
@keyframes mgpulse { 50% { transform: translateX(-50%) scale(1.15); } }
.mergeb { display: block; width: 100%; margin: 8px 0 4px; padding: 8px; border: 3px solid var(--ink); border-radius: 12px; background: linear-gradient(180deg, #fff4b0, #ffd34d); font-weight: 900; font-size: 15px; box-shadow: 0 3px 0 var(--ink); }
.mgt { margin: 6px 0 2px; font-size: 12px; font-weight: 800; color: #8a6a00; }
.picker.swap .pc[disabled] { opacity: 0.55; filter: grayscale(0.6); }
