/* 抽獎（gacha.js）：池面板、抽獎動畫；角色養成（chargrow.js）：角色卡星級、詳細面板 */
.rt-epic { --rt: #b25cff; --rt-d: #6a1fb0; }

/* ---------- 池面板 ---------- */
.gc-pool { align-items: stretch; gap: 12px; }
.gc-pool .gc-pic { width: 64px; height: 64px; object-fit: contain; image-rendering: pixelated; align-self: center; flex: none; }
.gc-pool .gc-mid { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gc-top .big { font-size: 19px; }
.gc-tk { font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 9px; background: #e8f1fb; color: #6f86a8; border: 2px solid #cfe2f6; white-space: nowrap; }
.gc-tk.on { background: #fff3c8; color: #8a4a00; border-color: #ffc94a; }
.gc-odds { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: 12px; font-weight: 800; color: #34506f; }
.gc-od { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.gc-od i { width: 9px; height: 9px; border-radius: 50%; background: var(--rt); box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); }
.gc-pity { display: flex; flex-wrap: wrap; gap: 4px; }
.gc-pt { font-size: 12px; font-weight: 900; color: #1462c8; background: #fff; border: 2px solid #9cd0ff; border-radius: 10px; padding: 0 8px; white-space: nowrap; }
.gc-pt.near { color: #a54a00; border-color: #ffb347; background: #fff6df; }
.sh-draw.sh-sec { padding: 0; background: none; border: 0; }
.sh-draw .gc-pool { margin-bottom: 0; }
.gc-sub { font-size: 11px; font-weight: 700; color: #5a7699; }
.gc-btns { display: flex; flex-direction: column; justify-content: center; gap: 6px; flex: none; }
.gc-draw { display: flex; flex-direction: column; align-items: center; min-width: 108px; line-height: 1.15; padding: 4px 12px !important; }
.gc-draw b { font-size: 15px; }
.gc-draw small { font-size: 12px; font-weight: 800; white-space: nowrap; }
.gc-done, .gc-lock { font-size: 13px; font-weight: 900; color: #6f86a8; }
.gc-pool.lock { opacity: .8; }
.gc-pool.lock .gc-pic { filter: grayscale(1) opacity(.6); }
.sh-draw.gc-flash { animation: gcFlash 1.1s ease-out; }
@keyframes gcFlash { 0%, 40% { box-shadow: 0 0 0 4px #ffcf3a, 0 0 18px #ffcf3a; } 100% { box-shadow: none; } }
.sh-gonly { color: #8a4a00 !important; font-weight: 900; }
@media (max-width: 700px) {
  .gc-pool { flex-wrap: wrap; }
  .gc-pool .gc-pic { width: 48px; height: 48px; }
  .gc-pool .gc-mid { flex: 1 1 calc(100% - 64px); }
  .gc-btns { flex-direction: row; width: 100%; }
  .gc-draw { flex: 1; min-width: 0; }
}

/* ---------- 商店寶箱分頁：兩欄方卡、卡內切換初級／高級（高級暫不開放） ---------- */
.sh-drawgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 880px; margin-inline: auto; }
.sh-drawgrid .sh-draw { min-width: 0; display: flex; }
.gc-pool.sq { flex: 1; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; margin: 0; padding: 12px; aspect-ratio: 1 / 1; min-width: 0; position: relative; overflow: clip;   /* clip 不是捲動容器：內容多時方卡會自己長高，不會被切掉 */
  background: linear-gradient(180deg, #ffffff, #eef7ff); }
.gc-pool.sq.hi { border-color: #f2b51e; background: linear-gradient(180deg, #fffaf0, #fff0cc); }
.gc-hd { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gc-hd .gc-mid { flex: 1 1 0; min-width: 0; }
.gc-picw { position: relative; flex: none; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 12px; background: #fff; border: 2px solid #d7ecfd; }
.gc-pool.sq .gc-picw .gc-pic { width: 56px; height: 56px; }
.gc-pool.hi .gc-picw { border-color: #ffd76a; background: radial-gradient(#fff8d8, #fff); }
.gc-hib { position: absolute; right: -7px; top: -7px; background: #ffc533; color: #7a3d00; font-size: 11px; font-weight: 900; border-radius: 8px; padding: 0 5px; border: 2px solid #fff; }
.gc-pool.sq .gc-top .big { font-size: 18px; }
.gc-pool.hi .gc-top .big { color: #b35a00; }
.gc-seg { display: grid; grid-template-columns: 1fr 1fr; background: #d4e9fb; border-radius: 10px; padding: 3px; gap: 3px; }
.gc-seg button { font: inherit; font-weight: 900; font-size: 14px; border: 0; border-radius: 8px; padding: 4px 0; background: transparent; color: #34506f; cursor: pointer; }
.gc-seg button.on { background: #fff; color: #1462c8; box-shadow: 0 2px 0 rgba(0, 0, 0, .08); }
.gc-seg button.on.h { background: #ffc533; color: #6b3500; }
.gc-seg button:focus-visible { outline: 3px solid #ff8a00; outline-offset: 1px; }
.gc-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.gc-od.zero { opacity: .4; text-decoration: line-through; }
.gc-pool.hi .gc-pt { color: #a54a00; border-color: #ffc95e; }
.gc-pool.sq .gc-btns { margin-top: auto; flex-direction: row; }
.gc-pool.sq .gc-draw { flex: 1; min-width: 0; }
.gc-soon { position: absolute; top: 12px; right: -32px; transform: rotate(35deg); background: #6c7889; color: #fff; font-size: 11px; font-weight: 900; padding: 2px 36px; pointer-events: none; }
.gc-soonb { flex: 1; text-align: center; border-radius: 10px; background: #e5e9ef; color: #6c7889; border: 2px dashed #a3adbb; padding: 9px 4px; font-size: 15px; font-weight: 900; }
@media (max-width: 700px) {
  .sh-drawgrid { gap: 8px; }
  .gc-pool.sq { aspect-ratio: auto; padding: 9px; }
  .gc-picw { width: 46px; height: 46px; }
  .gc-pool.sq .gc-picw .gc-pic { width: 40px; height: 40px; }
  .gc-hd { gap: 7px; }
  .gc-pool.sq .gc-top .big { font-size: 14px; }
  .gc-pool.sq .gc-picw { width: 40px; height: 40px; }
  .gc-pool.sq .gc-picw .gc-pic { width: 34px; height: 34px; }
  .gc-pool.sq .gc-tk { font-size: 10px; padding: 0 5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .gc-soon { font-size: 9px; top: 7px; right: -40px; }
  .gc-pool.sq .gc-draw { padding: 4px 4px !important; }
  .gc-pool.sq .gc-draw b { font-size: 13px; }
  .gc-pool.sq .gc-draw small { font-size: 10px; white-space: normal; }
}

/* ---------- 抽獎動畫 ---------- */
.gc-ov { position: absolute; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(20, 50, 120, .82), rgba(3, 10, 35, .92)); animation: gcIn .25s ease-out; }
@keyframes gcIn { from { opacity: 0; } }
.gc-box { max-width: min(960px, 96vw); max-height: 96vh; overflow: auto; padding: 14px 18px 16px; text-align: center; }
.gc-box h4 { margin: 0 0 12px; color: #fff; font-size: 22px; font-weight: 900; text-shadow: 0 2px 0 #08224a, 0 0 12px rgba(120, 200, 255, .8); }
.gc-cards { display: grid; gap: 12px; justify-content: center; grid-template-columns: repeat(1, 150px); }
.gc-box.ten .gc-cards { grid-template-columns: repeat(5, 150px); }
.gc-card { width: 150px; height: 196px; perspective: 700px; cursor: pointer; position: relative; }
.gc-in { position: relative; width: 100%; height: 100%; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); transform-style: preserve-3d; }
.gc-card.open .gc-in { transform: rotateY(180deg); }
.gc-back, .gc-front { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; box-sizing: border-box; }
.gc-back { background: repeating-linear-gradient(45deg, #2f7de0 0 10px, #2a6fd0 10px 20px); border: 4px solid #fff; box-shadow: 0 4px 0 #0c3f86; }
.gc-back .gc-q { font-style: normal; font-size: 54px; font-weight: 900; color: #fff; text-shadow: 0 3px 0 #0c3f86; animation: gcBob 1s ease-in-out infinite; }
@keyframes gcBob { 50% { transform: translateY(-5px); } }
.gc-front { transform: rotateY(180deg); background: linear-gradient(180deg, #fff, #eaf4ff); border: 4px solid var(--rt, #c9d3e0); padding: 8px 6px; gap: 4px;
  box-shadow: 0 0 0 2px #fff, 0 4px 0 rgba(0, 0, 0, .25); }
.gc-cpic { height: 92px; display: flex; align-items: center; justify-content: center; flex: none; }   /* 不被擠扁：圖才不會蓋到名字 */
.gc-front > * { flex: none; }
.gc-cpic img { max-height: 88px; max-width: 120px; object-fit: contain; image-rendering: pixelated; }
.gc-nm { font-size: 13px; font-weight: 900; color: #123a73; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-nt { font-size: 12px; font-weight: 900; color: #4a6b9a; min-height: 16px; line-height: 1.2; }
.gc-nt.new { color: #fff; background: linear-gradient(90deg, #ff6a3d, #ff3b5c); border-radius: 8px; padding: 0 8px; }
.gc-nt.sold { font-size: 11px; color: #8a4a00; }
.gc-pf { position: absolute; top: 4px; left: 4px; font-size: 10px; color: #fff; background: #1462c8; border-radius: 6px; padding: 0 4px; }
.gc-epic { background: #b25cff !important; }
/* 發光：稀有藍光、紫光、傳說金光、神話紅光（翻開後才亮）；卡框顏色跟稀有度（rarity.css 的 --rt） */
.gc-card.open.fx-rare .gc-front { box-shadow: 0 0 0 2px #fff, 0 0 16px 4px #3a9cff; }
.gc-card.open.fx-epic .gc-front { box-shadow: 0 0 0 2px #fff, 0 0 16px 4px #b25cff; }
.gc-card.open.fx-legend .gc-front { box-shadow: 0 0 0 2px #fff, 0 0 22px 7px #ffbe1a; animation: gcGold 1.4s ease-in-out infinite; background: linear-gradient(180deg, #fffdf0, #ffeeb0); }
.gc-card.open.fx-mythic .gc-front { box-shadow: 0 0 0 2px #fff, 0 0 26px 9px #ff3b5c; animation: gcRed 1.1s ease-in-out infinite; background: linear-gradient(180deg, #fff4f6, #ffc9d3); }
@keyframes gcGold { 50% { box-shadow: 0 0 0 2px #fff, 0 0 32px 12px #ffd23a; } }
@keyframes gcRed { 50% { box-shadow: 0 0 0 2px #fff, 0 0 40px 16px #ff2a4f; } }
.gc-card.fx-legend .gc-in::after, .gc-card.fx-mythic .gc-in::after { content: ""; position: absolute; inset: -18px; z-index: -1; border-radius: 50%; opacity: 0; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 10%, var(--rt) 12%, transparent 16% 35%, var(--rt) 37%, transparent 41% 60%, var(--rt) 62%, transparent 66% 85%, var(--rt) 87%, transparent 91%);
  transform: rotateY(180deg); }
.gc-card.open.fx-legend .gc-in::after, .gc-card.open.fx-mythic .gc-in::after { opacity: .55; animation: gcRay 4s linear infinite; }
@keyframes gcRay { to { transform: rotateY(180deg) rotate(360deg); } }
.gc-warn { margin: 10px auto 0; max-width: 520px; padding: 5px 12px; border-radius: 10px; background: #fff1ee; border: 2px solid #e8432e; color: #e8432e; font-size: 12px; font-weight: 900; line-height: 1.5; text-align: center; }
.gc-foot { margin-top: 14px; display: flex; justify-content: center; gap: 10px; }
.gc-foot .lb-btn { min-width: 110px; font-size: 16px; }
.gc-foot [hidden] { display: none; }
@media (max-width: 860px) { .gc-box.ten .gc-cards { grid-template-columns: repeat(4, 118px); } .gc-card { width: 118px; height: 160px; } .gc-cpic { height: 70px; } .gc-cpic img { max-height: 66px; max-width: 96px; } }
@media (max-width: 520px) { .gc-box.ten .gc-cards { grid-template-columns: repeat(3, 104px); gap: 8px; } .gc-card { width: 104px; height: 146px; } .gc-cpic { height: 54px; } .gc-cpic img { max-height: 52px; max-width: 88px; } .gc-front { gap: 2px; padding: 6px 4px; } .gc-nm { font-size: 12px; } }
@media (max-height: 760px) and (min-width: 861px) { .gc-card { height: 172px; } .gc-cpic { height: 76px; } .gc-cards { gap: 10px; } }
/* 高級寶箱：金色背景、金卡背、翻前預告光、翻開噴星點；第一段金寶箱掉下來搖晃爆光 */
.gc-ov.hi { background: radial-gradient(ellipse at center, rgba(120, 70, 0, .82), rgba(12, 8, 22, .93)); }
.gc-ov.hi .gc-box h4 { text-shadow: 0 2px 0 #4a2600, 0 0 14px rgba(255, 200, 60, .9); }
.gc-ov.hi .gc-back { background: repeating-linear-gradient(45deg, #ffcf3d 0 10px, #f5b51c 10px 20px); border-color: #fff6d0; box-shadow: 0 4px 0 #a05a00; }
.gc-ov.hi .gc-back .gc-q { text-shadow: 0 3px 0 #a05a00; }
.gc-card.tell .gc-back { animation: gcTell .45s ease-in-out 2; }
@keyframes gcTell { 50% { box-shadow: 0 4px 0 #a05a00, 0 0 22px 8px var(--rt); transform: scale(1.06); } }
.gc-spark { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: #fff3a0; box-shadow: 0 0 6px 2px #ffc533; pointer-events: none; z-index: 2; animation: gcSpark .7s ease-out forwards; }
@keyframes gcSpark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.gc-stage { position: relative; width: 240px; height: 240px; display: grid; place-items: center; cursor: pointer; }
.gc-rays { position: absolute; inset: -60px; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 220, 90, .55) 0 9deg, transparent 9deg 20deg); animation: gcSpin 6s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); }
@keyframes gcSpin { to { transform: rotate(360deg); } }
.gc-chest { width: 128px; height: 128px; object-fit: contain; image-rendering: pixelated; position: relative; filter: drop-shadow(0 0 18px #ffd23a); animation: gcDrop .45s cubic-bezier(.3, 1.6, .5, 1), gcShake .12s linear .6s 7; }
@keyframes gcDrop { from { transform: translateY(-140px) scale(.6); opacity: 0; } }
@keyframes gcShake { 25% { transform: rotate(-7deg) scale(1.05); } 75% { transform: rotate(7deg) scale(1.05); } }
.gc-flashw { position: absolute; inset: -400px; background: radial-gradient(circle, #fff 0, #fff6c0 20%, rgba(255, 220, 90, 0) 60%); opacity: 0; pointer-events: none; }
.gc-stage.boom .gc-flashw { animation: gcBoom .5s ease-out forwards; }
@keyframes gcBoom { 30% { opacity: 1; } to { opacity: 0; transform: scale(1.6); } }
.gc-slbl { position: absolute; bottom: -6px; color: #fff3c0; font-size: 18px; font-weight: 900; text-shadow: 0 2px 0 #7a3d00; }
@media (prefers-reduced-motion: reduce) { .gc-in { transition: none; } .gc-card.open .gc-front, .gc-card .gc-in::after, .gc-card.tell .gc-back, .gc-rays, .gc-chest { animation: none !important; } }

/* ---------- 養成→角色 ---------- */
.cg-stars { display: inline-flex; gap: 1px; font-size: 13px; line-height: 1; vertical-align: middle; }
.cg-stars i { font-style: normal; color: #c3d2e6; }
.cg-stars i.on { color: #ffb400; text-shadow: 0 1px 0 #a55b00; }
.cg-enh { font-size: 12px; font-weight: 900; color: #1462c8; margin-left: 4px; }
.cg-sr { display: flex; align-items: center; gap: 2px; }
.cg-card.rt-frame { border-width: 3px !important; }
.cg-card.on { box-shadow: 0 0 0 3px #7cc8ff, 0 3px 0 #9cc6ee; }
.cg-card.cur.on { box-shadow: 0 0 0 2px #ff9d1f, 0 0 0 5px #7cc8ff; }
.cg-detail { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 14px; padding: 12px; border-radius: 16px; background: linear-gradient(180deg, #fff, #eef7ff); margin-bottom: 12px; }
.cg-pic { width: 120px; height: 132px; border-radius: 14px; display: flex; align-items: flex-end; justify-content: center; background: radial-gradient(circle at 50% 70%, #fff, #dbeeff); }
.cg-pic.rt-glow.rt-legend, .cg-pic.rt-glow.rt-mythic { animation: rtPulse 1.6s ease-in-out infinite; }
.cg-pic img { image-rendering: pixelated; max-height: 120px; max-width: 110px; margin-bottom: 6px; }
.cg-inf { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cg-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cg-name b { font-size: 19px; font-weight: 900; color: #123a73; }
.cg-name .cg-stars { font-size: 17px; }
.cg-note { font-size: 13px; font-weight: 800; color: #4a6b9a; }
.cg-bonus { font-size: 12px; font-weight: 800; color: #34506f; background: #fff; border: 2px solid #d6e9fb; border-radius: 10px; padding: 4px 8px; }
.cg-bonus .cg-bl { color: #1462c8; font-size: 13px; font-weight: 900; }
.cg-bonus .cg-bn { color: #1f7a2c; }
.cg-bonus .cg-cap { color: #1f4f8a; font-size: 12px; font-weight: 800; padding-left: 10px; }
.cg-bonus .cg-cap.over { color: #b36a00; }
.cg-bonus .cg-cap.zero { color: #c0213a; }
.cg-ops { display: flex; flex-direction: column; gap: 6px; }
.cg-op { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cg-ot { font-size: 13px; font-weight: 900; color: #123a73; min-width: 104px; }
.cg-costs { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; min-width: 0; }
.cg-cost { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; color: #1f5d2a; background: #ecfbe9; border: 2px solid #9ee3a2; border-radius: 9px; padding: 0 6px; white-space: nowrap; }
.cg-cost.short { color: #a0213a; background: #fff0f2; border-color: #ffb0bd; }
.cg-cost img { width: 14px; height: 14px; image-rendering: pixelated; }
.cg-cost canvas, .cg-cost .bg-ic { width: 18px; height: 18px; }
.cg-op .lb-btn { flex: none; }
.cg-shard { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 800; color: #4a6b9a; }
.cg-top { position: sticky; z-index: 4; background: linear-gradient(180deg, #e3f4ff 85%, rgba(227, 244, 255, 0)); }
.cg-top.nostick { position: static; }
.cg-top .cg-detail { margin-bottom: 10px; box-shadow: 0 4px 10px rgba(20, 80, 160, .18); }
.cg-left { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.cg-sks { display: grid; grid-template-columns: repeat(2, 54px); gap: 8px; justify-content: center; }
.cg-sk { position: relative; width: 54px; height: 54px; padding: 4px; border-radius: 12px; border: 3px solid #b994ff; background: linear-gradient(180deg, #fff, #f1e8ff); cursor: pointer; box-shadow: 0 2px 0 #9b7fd6; }
.cg-sk.p { border-color: #7fb6f2; background: linear-gradient(180deg, #fff, #e6f2ff); box-shadow: 0 2px 0 #6c9fd6; }
.cg-sk.e { border-color: #ffc93a; background: linear-gradient(180deg, #fffbea, #ffefb5); box-shadow: 0 2px 0 #d8a520; }
.cg-sk.w { border-color: #ff8f8f; background: linear-gradient(180deg, #fff5f5, #ffdcdc); box-shadow: 0 2px 0 #d86a6a; }
.cg-sk.w[data-st="none"] img { filter: grayscale(.85) brightness(1.05); opacity: .7; }
.cg-sk.w[data-st="worn"]::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 12px; height: 12px; border-radius: 50%; background: #2bb24c; border: 2px solid #fff; }
.cg-sk:hover, .cg-sk:focus-visible { transform: translateY(-1px); outline: 2px solid #1f7ae0; outline-offset: 1px; }
.cg-sk img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cg-skt { position: absolute; left: -4px; top: -7px; font-size: 10px; font-weight: 900; line-height: 1; padding: 2px 4px; border-radius: 6px; background: #6a2fb8; color: #fff; }
.cg-sk.p .cg-skt { background: #1d5fae; }
.cg-sk.e .cg-skt { background: #b07800; }
.cg-sk.w .cg-skt { background: #c8303f; }
.cg-pop { position: fixed; z-index: 60; width: min(320px, calc(100vw - 16px)); padding: 10px 12px 12px; border-radius: 14px; border: 3px solid #b994ff; background: #fff; color: #123a73; box-shadow: 0 10px 28px rgba(0, 30, 90, .35); font-size: 13px; line-height: 1.5; }
.cg-pop.p { border-color: #7fb6f2; }
.cg-pop.e { border-color: #ffc93a; }
.cg-pop.w { border-color: #ff8f8f; }
.cg-poplv[data-st="worn"] span { color: #1f8f3c; font-weight: 900; }
.cg-poplv[data-st="none"] span { color: #8a97a8; }
.cg-pophd { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cg-pophd img { width: 44px; height: 44px; flex: none; }
.cg-popnm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cg-popnm b { font-size: 16px; font-weight: 900; }
.cg-popnm .cs-tg { align-self: flex-start; font-size: 11px; }
.cg-popx { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 0; background: #e6f0fb; color: #1f4f8a; font-weight: 900; cursor: pointer; }
.cg-popbr { font-weight: 800; color: #34506f; margin-bottom: 4px; }
.cg-poplv { display: flex; gap: 6px; font-size: 12px; font-weight: 700; color: #34506f; padding: 3px 0; border-top: 1px dashed #d6e3f2; }
.cg-poplv b { flex: none; color: #1462c8; min-width: 32px; }
.cg-sfx { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
.cg-sf { font-size: 12px; font-weight: 800; color: #8aa0bd; background: #f2f6fb; border: 2px dashed #cfdced; border-radius: 9px; padding: 1px 8px; }
.cg-sf b { color: inherit; margin-right: 4px; }
.cg-sf.on { color: #8a4a00; background: #fff3c8; border: 2px solid #ffc94a; }
.cg-more { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 700px) {
  .cg-detail { grid-template-columns: 84px minmax(0, 1fr); padding: 8px; }
  .cg-pic { width: 84px; height: 100px; }
  .cg-pic img { max-height: 90px; max-width: 80px; }
  .cg-sks { grid-template-columns: repeat(2, 38px); gap: 6px; }
  .cg-sk { width: 38px; height: 38px; padding: 2px; border-width: 2px; border-radius: 9px; }
  .cg-skt { font-size: 9px; top: -6px; }
  .cg-ot { min-width: 0; width: 100%; }
}
/* 抽獎結果的材料圖示（itemicon.js）：「背包滿」一行、圖示一行；卡片窄，角標字小一點 */
.gc-nt.gc-ics{display:flex;flex-direction:column;align-items:center;gap:3px;white-space:normal}
.gc-nt.gc-ics .ii-list{justify-content:center;gap:7px;flex-wrap:nowrap}
.gc-nt.gc-ics .ii .ii-n{font-size:9px;line-height:12px;right:0;bottom:-5px;padding:0 2px}
