/* gacha.theme-2.css — Gacha · ชั้นธีมใหม่ (แยกจาก theme2.css เดิม)
   ลำดับ <link> ใน index.html มีผลต่อการทับกันของกฎ — ไฟล์ชั้นเดียวกันเรียงตามเลขส่วน */
.gc-f.rare,
.gc-i.rare,
.gc-card.rare {
  border-image: var(--ui-rarity-rare, none) 40 fill/12px stretch;
}
.gc-f.epic,
.gc-i.epic,
.gc-card.epic {
  border-image: var(--ui-rarity-sr, none) 40 fill/12px stretch;
}
.gc-f.legendary,
.gc-i.legendary,
.gc-card.legendary {
  border-image: var(--ui-rarity-ssr, none) 40 fill/12px stretch;
}
/* ป้ายระดับ (ชื่อระดับมาจาก gacha.js: Common/Rare/SR/SSR) */
.gc-r {
  background: #fff !important;
  border: 2px solid var(--rk, #ccc);
  color: #3b4255 !important;
  font-weight: 800;
}
.gc-r.rare {
  --rk: var(--rk-rare);
}
.gc-r.epic {
  --rk: var(--rk-sr);
}
.gc-r.legendary {
  --rk: var(--rk-ssr);
}
/* ===== SSR: กรอบรูป (Assets/UI/ui.config → rarity.ssr) + แสงรุ้งโฮโลวิ่งบนกรอบ =====
   การ์ดใหญ่ (ตู้กาชา/ผลสุ่ม) ใช้รูปกรอบวางทับ · ช่องเล็กในรายการใช้ขอบรุ้งหมุนแบบเดิม */
.gc-i.legendary {
  border-image: none !important;
}
.gc-f.legendary,
.gc-card.legendary {
  border: 0 !important;
  border-image: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background: radial-gradient(120% 80% at 50% 30%, #8a1430, #3a0a18 60%, #1a0f14) !important;
  box-shadow:
    0 0 2vh #ff7ab655,
    0 0.6vh 1.4vh #0008 !important;
  animation: none;
}
.gc-card.legendary {
  animation: gcPop 0.45s ease-out forwards !important;
  padding: 12% 10% 14% !important;
}
.gc-f.legendary::after,
.gc-card.legendary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: var(--ui-rarity-ssr, none) center/100% 100% no-repeat;
}
.gc-f.legendary::before,
.gc-card.legendary::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.9;
  background: linear-gradient(
      115deg,
      transparent 35%,
      #ff7ab6cc 44%,
      #ffd36bcc 50%,
      #7ce0ffcc 56%,
      #b48cffcc 62%,
      transparent 70%
    )
    0 0/300% 100% no-repeat;
  -webkit-mask: var(--ui-rarity-ssr, none) center/100% 100% no-repeat;
  mask: var(--ui-rarity-ssr, none) center/100% 100% no-repeat;
  animation: ssr-holo 3.6s ease-in-out infinite;
}
@keyframes ssr-holo {
  0% {
    background-position: 100% 0;
  }
  60%,
  100% {
    background-position: 0 0;
  }
}
.gc-f.legendary .gc-fi {
  inset: 9% 8% calc(34px + 9%) 8%;
}
.gc-f.legendary .gc-fn {
  margin: 0 9% 15%;
  z-index: 5;
  background: #1a0f14cc;
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .gc-f.legendary::before,
  .gc-card.legendary::before {
    animation: none;
    opacity: 0;
  }
}
/* การ์ดตัวละครที่มีรูปการ์ดสำเร็จ (Character.config "card") — รูปมีกรอบในตัวแล้ว ไม่ต้องใส่กรอบซ้อน */
.gc-f.has-card {
  border: 0 !important;
  border-image: none !important;
  background: #1b2050 !important;
  box-shadow: 0 0.6vh 1.4vh #0008 !important;
}
.gc-f.has-card .gc-fi {
  inset: 0 !important;
  transform: skewX(3deg);
}
.gc-f.has-card .gc-fi img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  filter: none;
}
.gc-f.has-card .gc-fn {
  background: #141838cc;
}
.gc-card.has-card {
  border-image: none !important;
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.gc-card.has-card .gc-cimg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 11px;
}
.gc-card.has-card b,
.gc-card.has-card small {
  position: relative;
  z-index: 1;
  background: #141838cc;
}
.gc-card.has-card b {
  padding-top: 4px;
  margin-top: 0;
}
.gc-card.has-card small {
  padding-bottom: 5px;
}
/* SR: กรอบรูป (Assets/UI/ui.config → rarity.sr) วางทับแบบเดียวกับ SSR + ประกายทองวิ่งช้าๆ (การ์ดที่มีรูปการ์ดสำเร็จไม่ใส่ซ้อน) */
.gc-i.epic {
  border-image: none !important;
}
.gc-f.epic:not(.has-card),
.gc-card.epic:not(.has-card) {
  border: 0 !important;
  border-image: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background: radial-gradient(120% 80% at 50% 30%, #2a3070, #141838 60%, #0c0f26) !important;
  box-shadow:
    0 0 1.6vh #e3b24c44,
    0 0.6vh 1.4vh #0008 !important;
}
.gc-card.epic:not(.has-card) {
  padding: 12% 10% 20% !important;
}
.gc-f.epic:not(.has-card)::after,
.gc-card.epic:not(.has-card)::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: var(--ui-rarity-sr, none) center/100% 100% no-repeat;
}
.gc-f.epic:not(.has-card)::before,
.gc-card.epic:not(.has-card)::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.8;
  background: linear-gradient(115deg, transparent 40%, #fff3c4cc 50%, transparent 60%) 0 0/300% 100% no-repeat;
  -webkit-mask: var(--ui-rarity-sr, none) center/100% 100% no-repeat;
  mask: var(--ui-rarity-sr, none) center/100% 100% no-repeat;
  animation: ssr-holo 5s ease-in-out infinite;
}
.gc-f.epic:not(.has-card) .gc-fi {
  inset: 9% 8% calc(34px + 9%) 8%;
}
.gc-f.epic:not(.has-card) .gc-fn {
  margin: 0 9% 15%;
  z-index: 5;
  background: #0c0f26cc;
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .gc-f.epic::before,
  .gc-card.epic::before {
    animation: none;
    opacity: 0;
  }
}
/* ผลสุ่ม: การ์ดทุกใบสูงเท่ากัน ไม่ว่ากรอบแบบไหน */
.gc-res .gc-card {
  box-sizing: border-box;
  aspect-ratio: 5/9;
  align-self: start;
  min-width: 0;
  display: flex !important;
  flex-direction: column;
  justify-content: flex-end;
}
.gc-res .gc-card > :first-child:not(b):not(small):not(em) {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.gc-res .gc-card > :first-child img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.gc-res .gc-card.has-card > .gc-cimg {
  position: absolute;
}
/* ===== หน้าต่างผลสุ่ม: ธีมเดียวกับหน้าต่างอื่นของเกม (พื้นครีม · กรอบทอง · หัวข้อทอง แบบหน้าต่างเควส) =====
   ใช้ :has(.gc-res) ให้โดนเฉพาะหน้าต่างผลสุ่ม ไม่โดนหน้าต่าง "รายการและอัตราการออก" (gcList) ที่ใช้ .gc-box เหมือนกัน */
.gc-box:has(.gc-res) {
  background: #fffaf2;
  color: #3b4255;
  border: 2px solid #e8c77a;
  box-shadow: 0 10px 30px #0008;
  max-width: 96vw;
  max-height: 96vh;
}
.gc-box.gc-top3:has(.gc-res) {
  box-shadow:
    0 10px 30px #0008,
    0 0 30px #a45be8aa;
}
.gc-box.gc-top4:has(.gc-res) {
  border-color: #ffc83d;
  box-shadow:
    0 10px 30px #0008,
    0 0 40px #ffc83daa;
}
.gc-box:has(.gc-res) h3 {
  color: #8a6d3b;
}
.gc-box:has(.gc-res) .gc-sum {
  color: #5b6275;
}
/* ตัวอักษรบนการ์ดอยู่บนแถบสีเข้ม/กรอบเข้ม — ต้องเป็นสีขาวเอง เพราะพื้นหน้าต่างเปลี่ยนเป็นตัวอักษรสีเข้มแล้ว */
.gc-res .gc-card,
.gc-res .gc-card b,
.gc-res .gc-card small,
.gc-res .gc-new,
.gc-res .gc-dup {
  color: #fff;
}
/* ===== ขนาดการ์ดผลสุ่ม: แถวละ 5 ใบ กว้างเท่ากันทุกใบ =====
   ต้องกำหนดความกว้างการ์ดเอง: รูปการ์ดสำเร็จวางแบบ absolute ไม่ดันความกว้าง ถ้าสุ่มได้แต่การ์ดแบบนี้
   หน้าต่างจะหดเหลือเท่าความกว้างชื่อ การ์ดเล็กจนไม่เห็นรูป (ที่ผู้เล่นเห็นว่า "บางครั้งรูปไม่ขึ้น")
   ความกว้างคิดจากความสูงจอด้วย: 2 แถว + หัวข้อ/สรุป/ปุ่ม (GC_CHROME) ต้องพอดีจอแนวนอนโดยไม่ต้องเลื่อน
   (92vh = ความสูงสูงสุดของหน้าต่างเมื่อมีกรอบซากุระ — Theme/sakura-kit.css) */
.gc-res {
  --gc-chrome: 170px;
  --gc-cw: min(17vw, 132px, calc((92vh - var(--gc-chrome)) / 2 * 5 / 9));
  grid-template-columns: repeat(5, var(--gc-cw)) !important;
  justify-content: center;
}
.gc-res.n1 {
  --gc-cw: min(40vw, 170px, calc((92vh - var(--gc-chrome)) * 5 / 9));
  grid-template-columns: var(--gc-cw) !important;
  max-width: none;
}
/* การ์ดที่ไม่มีรูปการ์ดสำเร็จ (SR/SSR ที่ใช้กรอบ) — ให้รูปตัวละครเต็มพื้นที่ในกรอบ เห็นทั้งตัว ไม่ครอปเป็นสี่เหลี่ยม */
.gc-res .gc-card .pv-ch {
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: none;
}
.gc-res .gc-card .pv-ch img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}
/* ผลสุ่มตู้ของแต่ง: รูปตัวอย่าง (หลังไพ่/โต๊ะ/พื้นหลัง/กรอบ) ขนาดตายตัวของหน้าร้าน กว้างกว่าการ์ด — ย่อให้พอดีความกว้างการ์ด */
.gc-res .gc-card > :is(.pv-back, .pv-table, .pv-bg, .pv-frame) {
  flex: 0 0 auto;
  box-sizing: border-box;
  height: auto;
  margin: auto auto 4px;
}
.gc-res .gc-card > .pv-back {
  width: 74%;
  aspect-ratio: 18 / 25;
}
.gc-res .gc-card > .pv-table {
  width: 100%;
  aspect-ratio: 3 / 2;
}
.gc-res .gc-card > .pv-bg {
  width: 100%;
  aspect-ratio: 7 / 5;
}
.gc-res .gc-card > .pv-frame {
  width: 90%;
  aspect-ratio: 1;
}
/* การ์ด Common/Rare ที่ไม่มีรูปการ์ด: ใส่พื้นเข้มเดิมไว้ใต้กรอบ (พื้นหน้าต่างเป็นครีมแล้ว ตัวอักษรขาวจะจาง) */
.gc-res .gc-card.common:not(.has-card),
.gc-res .gc-card.rare:not(.has-card) {
  background-color: #241a4a;
}
/* ป้าย NEW / ซ้ำ บนการ์ดเล็ก: บรรทัดเดียว ไม่ล้นทับการ์ดข้าง ๆ */
.gc-res .gc-new,
.gc-res .gc-dup {
  white-space: nowrap;
  font-size: 9px;
  padding: 1px 5px;
}
/* หน้าต่าง "รายการและอัตราการออก" (gcList): ธีมครีม/ทองชุดเดียวกับหน้าต่างผลสุ่ม — เจ้าของสั่ง */
.gc-box:has(.gc-grid) {
  background: #fffaf2;
  color: #3b4255;
  border: 2px solid #e8c77a;
  box-shadow: 0 10px 30px #0008;
}
.gc-box:has(.gc-grid) h3 {
  color: #8a6d3b;
}
/* ป้าย NEW / ซ้ำ: วางในมุมการ์ดบนเลเยอร์บนสุด — เดิมยื่นออกนอกการ์ด ถูกขอบการ์ดตัด และกรอบ SR/SSR (::before/::after) ทับ */
.gc-res .gc-new,
.gc-res .gc-dup {
  top: 3px;
  right: 3px;
  z-index: 6;
}
/* หน้าต่าง "รายการและอัตราการออก": จัดเป็นตารางหลายช่องต่อแถว (เดิมหน้าต่างแคบตามเนื้อหา เหลือแถวละ 1 ชิ้น ต้องเลื่อนยาว) — เจ้าของสั่ง */
.gc-box:has(.gc-grid) {
  width: min(94vw, 760px);
  max-width: none;
  max-height: 86vh;
}
.gc-box .gc-grid {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)) !important;
  gap: 8px;
  margin: 8px 0 10px;
}
.gc-box .gc-grid .item2 {
  padding: 8px 6px;
  gap: 4px;
  font-size: 12px;
}
.gc-box .gc-grid .item2 small {
  font-size: 11px;
}
.gc-box .gc-grid .pv-ch {
  width: 72px;
  height: 72px;
}
.gc-box .gc-grid .pv-back {
  width: 54px;
  height: 75px;
}
.gc-box .gc-grid .pv-table,
.gc-box .gc-grid .pv-bg {
  width: 88px;
  height: 60px;
}
.gc-box .gc-grid .pv-frame {
  width: 72px;
  height: 72px;
}

/* ======================================================================
   หน้ากาชาหน้าตาใหม่ (Beta 0.22.0) — คลาส .g2-* (Code/Gacha/gacha.js: gachaView)
   แบบหน้ากาชา Arknights: Endfield ในธีมซากุระ เข้าชุดกับหน้าตัวละคร/โปรไฟล์
   หลัก: ตัวละครในแบนเนอร์ต้องเด่นและหัวไม่โดนตัด — รูปยึดขอบบน (background-position: … 0) แถบบนโปร่งด้านขวา
   ปุ่มสุ่มขนาดพอดี ไม่บังตัวละคร · ตัวหนังสือมีขั้นต่ำ px ให้อ่านออกบนมือถือแนวนอน
   หน้าต่างผลสุ่ม/รายการในตู้ (.gc-modal) ใช้สไตล์เดิมด้านบน
   ====================================================================== */
#app.g2-app {
  background: none;
}
.g2 {
  --g2-ink: #3b4255;
  --g2-soft: #6b7285;
  --g2-pink: #e86a92;
  position: fixed;
  inset: 0;
  overflow: hidden;
  color: var(--g2-ink);
  font-family: Mali, Sarabun, sans-serif;
  background:
    repeating-linear-gradient(90deg, #3b425508 0 1px, transparent 1px 12vh),
    repeating-linear-gradient(0deg, #3b425508 0 1px, transparent 1px 12vh),
    linear-gradient(160deg, #fbf6f1, #efe7ea 60%, #e9e3ea);
}
.g2 button {
  font: inherit;
  cursor: pointer;
}
.g2-ci {
  width: max(14px, 2.6vh);
  height: max(14px, 2.6vh);
  object-fit: contain;
  vertical-align: middle;
  margin: 0 0.3vh;
}

/* ---------- ฉาก: รูปแบนเนอร์เต็มจอ ----------
   ยึดขอบบน: จอกว้างกว่า 16:9 รูปจะถูกตัดล่าง (เท้า) แทนหัว · ตัวละครอยู่ขวาของรูป → ชิดขวา 70% */
.g2-art {
  position: absolute;
  inset: 0;
  background: center 0 / cover no-repeat;
  background-position: 70% 0;
}
/* ไล่สีครีมเฉพาะซ้าย (ใต้รายชื่อตู้/การ์ดข้อมูล) — ไม่ทับตัวละครทางขวา */
.g2-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #fbf6f1e0 0, #fbf6f1a0 22vh, #fbf6f100 40vh);
  pointer-events: none;
}

/* ---------- แถบบน: ไล่สีเฉพาะด้านซ้าย ไม่ทับหัวตัวละครด้านขวา ---------- */
.g2-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 11vh;
  display: flex;
  align-items: center;
  gap: 1.4vh;
  padding: 0 2.4vh;
  z-index: 3;
  background: linear-gradient(90deg, #fffaf2f0 0, #fffaf2c8 45%, #fffaf200 70%);
}
.g2.g2-is-panel .g2-top {
  background: linear-gradient(#fffaf2f0, #fffaf200);
}
.g2-crumb {
  font: 800 max(14px, 2.6vh) / 1 Mali, sans-serif;
  white-space: nowrap;
}
.g2-tabs {
  display: flex;
  gap: 0.8vh;
  margin-left: 1.4vh;
}
.g2-tabs button {
  padding: max(5px, 1vh) max(10px, 1.8vh);
  border: 0;
  border-radius: 99px;
  background: #ffffffd0;
  color: var(--g2-ink);
  box-shadow: 0 0.3vh 0.6vh #0001;
  font: 800 max(12px, 1.9vh) / 1 Mali, sans-serif !important;
  white-space: nowrap;
}
.g2-tabs button.on {
  background: var(--g2-ink);
  color: #fff;
}
.g2-cur {
  display: inline-flex;
  align-items: center;
  gap: 0.4vh;
  padding: 0.5vh 1.2vh 0.5vh 0.5vh;
  border-radius: 99px;
  background: #3b4255d8;
  color: #fff;
  font: 800 max(12px, 1.9vh) / 1 Georgia, serif;
  white-space: nowrap;
}
.g2-cur:first-of-type {
  margin-left: 1vh;
}

/* ---------- ซ้ายบน: รายชื่อตู้ ---------- */
.g2-list {
  position: absolute;
  left: 2.4vh;
  top: 13vh;
  width: max(26vh, 150px);
  display: grid;
  gap: 1.2vh;
  z-index: 2;
}
.g2-bn {
  position: relative;
  height: max(12vh, 64px);
  padding: 0;
  overflow: hidden;
  border: 0.35vh solid #fff;
  border-radius: 1vh;
  background: #ddd;
  box-shadow: 0 0.6vh 1.2vh #0003;
}
.g2-bn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 25%;
}
.g2-bn b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6vh 1vh;
  text-align: left;
  color: #fff;
  background: linear-gradient(transparent, #000b);
  font: 800 max(11px, 1.7vh) / 1.2 Mali, sans-serif;
}
.g2-bn em {
  position: absolute;
  left: 0.6vh;
  top: 0.6vh;
  padding: 0.2vh 0.8vh;
  border-radius: 0.5vh;
  color: #fff;
  background: linear-gradient(90deg, #ff9ac0, #c7a2ff);
  font: 800 max(9px, 1.3vh) / 1.4 Sarabun, sans-serif;
  font-style: normal;
}
.g2-bn:not(.on) {
  filter: saturate(0.75) brightness(0.92);
}
.g2-bn.on {
  border-color: var(--g2-pink);
  box-shadow:
    0 0 0 0.35vh #ffffffc0,
    0 0.6vh 1.2vh #0003;
}

/* ---------- ซ้ายล่าง: การ์ดข้อมูลตู้ ---------- */
.g2-info {
  position: absolute;
  left: 2.4vh;
  bottom: 3vh;
  width: max(56vh, 320px);
  padding: 1.6vh 1.8vh;
  border-radius: 1.4vh;
  background: #fffaf2ee;
  box-shadow: 0 1vh 2.4vh #0003;
  z-index: 2;
}
.g2-tag {
  display: inline-block;
  padding: 0.4vh 1.2vh;
  border-radius: 0.6vh;
  color: #fff;
  background: linear-gradient(90deg, #ff9ac0, #c7a2ff);
  font: 800 max(11px, 1.6vh) / 1.3 Mali, sans-serif;
}
.g2-info h2 {
  margin: 0.6vh 0 0;
  font: 900 max(18px, 3.8vh) / 1.1 Mali, sans-serif;
  color: var(--g2-ink);
  text-shadow: none;
}
.g2-info p {
  margin: 0.6vh 0 0;
  font: 600 max(11px, 1.7vh) / 1.4 Sarabun, sans-serif;
  color: var(--g2-soft);
}
.g2-rates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8vh;
  margin-top: 1.1vh;
}
.g2-r {
  padding: 0.5vh 1.2vh;
  border-radius: 99px;
  background: #fff;
  box-shadow: inset 0 0 0 0.25vh #3b425522;
  font: 800 max(11px, 1.6vh) / 1.3 Sarabun, sans-serif;
}
.g2-r.legendary {
  background: conic-gradient(from 200deg, #ffd6e6, #fff1c4, #d9f6ff, #ece0ff, #ffd6e6);
}
.g2-r.epic {
  background: #fff3d0;
  color: #8a5a00;
}
.g2-r.rare {
  background: #efe6ff;
  color: #5a3aa0;
}
.g2-pity {
  margin-top: 1.1vh;
  padding: 1vh 1.4vh;
  border-radius: 1vh;
  background: #3b4255e8;
  color: #fff;
}
.g2-pity > div {
  display: flex;
  justify-content: space-between;
  font: 800 max(11px, 1.7vh) / 1.3 Mali, sans-serif;
}
.g2-pity b {
  color: #ffd36b;
}
.g2-pity > i {
  display: block;
  height: 1vh;
  margin-top: 0.8vh;
  border-radius: 9px;
  overflow: hidden;
  background: #ffffff33;
}
.g2-pity u {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ff9cc2, #ffd36b);
}
.g2-links {
  display: flex;
  align-items: center;
  gap: 1vh;
  margin-top: 1.1vh;
}
.g2-links button {
  flex: none;
  padding: 0.8vh 1.4vh;
  border: 0;
  border-radius: 0.8vh;
  background: #fff;
  color: var(--g2-ink);
  box-shadow: 0 0.2vh 0.5vh #0002;
  font: 800 max(11px, 1.6vh) / 1 Mali, sans-serif !important;
}
.g2-links small {
  font: 600 max(10px, 1.4vh) / 1.3 Sarabun, sans-serif;
  color: var(--g2-soft);
}

/* ---------- ขวาล่าง: ตั๋ว + ปุ่มสุ่ม (ขนาดพอดี ไม่บังตัวละคร) ---------- */
.g2-pull {
  position: absolute;
  right: 2.4vh;
  bottom: 2.4vh;
  display: grid;
  justify-items: end;
  gap: 1vh;
  z-index: 2;
}
.g2-tk {
  display: flex;
  align-items: center;
  gap: 0.8vh;
  padding: 0.6vh 0.8vh 0.6vh 0.6vh;
  border-radius: 99px;
  background: #fffaf2eb;
  box-shadow: 0 0.4vh 0.8vh #0002;
}
.g2-tki {
  width: max(22px, 3.8vh);
  height: max(22px, 3.8vh);
  object-fit: contain;
}
.g2-tk b {
  display: block;
  font: 800 max(11px, 1.6vh) / 1.2 Mali, sans-serif;
}
.g2-tk small {
  display: block;
  font: 600 max(10px, 1.3vh) / 1.2 Sarabun, sans-serif;
  color: var(--g2-soft);
}
.g2-tk button {
  padding: 0.6vh 1.2vh;
  border: 0;
  border-radius: 99px;
  background: var(--g2-ink);
  color: #fff;
  font: 800 max(10px, 1.4vh) / 1 Mali, sans-serif !important;
}
.g2-btns {
  display: flex;
  gap: 1vh;
}
.g2-go {
  /* หัว/ท้ายปุ่ม (ดอกซากุระ · วงลูกศร) ต้องกว้างตามสัดส่วนความสูง ไม่งั้นถูกบีบจนดูยืด (Beta 0.22.0 แก้)
     รูปครีม 265×74 ตัดซ้าย 60 · ขวา 66 → ซ้าย 0.81 · ขวา 0.89 เท่าของความสูง
     รูปทอง 267×82 ตัดซ้าย 62 · ขวา 72 → ซ้าย 0.76 · ขวา 0.88 (ค่าเดียวกับปุ่มเริ่มเล่นใน sakura-kit.css)
     ความกว้าง = ความสูง × 3.3 ใกล้สัดส่วนรูปจริง (3.3–3.6) ส่วนกลางจึงแทบไม่ถูกยืด */
  --g2-h: max(8.6vh, 44px);
  position: relative;
  width: calc(var(--g2-h) * 3.3);
  height: var(--g2-h);
  padding: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.2vh;
  background: none;
  border-style: solid;
  border-color: transparent;
  filter: drop-shadow(0 0.6vh 1vh #0004);
}
.g2-go.one {
  border-width: 0 calc(var(--g2-h) * 0.89) 0 calc(var(--g2-h) * 0.81);
  border-image: url(../../Assets/UI/Assets/kit3/btn-cream.webp) 0 66 0 60 fill / 0 calc(var(--g2-h) * 0.89) 0 calc(var(--g2-h) * 0.81) stretch;
  color: var(--g2-ink);
}
.g2-go.ten {
  border-width: 0 calc(var(--g2-h) * 0.88) 0 calc(var(--g2-h) * 0.76);
  border-image: url(../../Assets/UI/Assets/kit3/btn-gold.webp) 0 72 0 62 fill / 0 calc(var(--g2-h) * 0.88) 0 calc(var(--g2-h) * 0.76) stretch;
  color: #6b3f12;
}
.g2-go b {
  font: 900 max(13px, 2.5vh) / 1 Mali, sans-serif;
  white-space: nowrap;
}
.g2-go small {
  display: flex;
  align-items: center;
  font: 800 max(10px, 1.5vh) / 1 Sarabun, sans-serif;
  white-space: nowrap;
}
.g2-go small .g2-ci {
  width: max(12px, 2.2vh);
  height: max(12px, 2.2vh);
}
.g2-go em {
  position: absolute;
  top: -1vh;
  right: -2vh;
  padding: 0.2vh 0.9vh;
  border-radius: 99px;
  background: var(--g2-pink);
  color: #fff;
  font: 800 max(9px, 1.3vh) / 1.4 Sarabun, sans-serif;
  font-style: normal;
  white-space: nowrap;
}
.g2-go.ask b {
  font-size: max(12px, 2vh);
}
.g2-go:disabled {
  filter: grayscale(0.7) opacity(0.7);
  cursor: default;
}
.g2-go:not(:disabled):active {
  transform: translateY(0.3vh) scale(0.97);
}
.g2-note {
  position: absolute;
  left: 50%;
  top: 12vh;
  transform: translateX(-50%);
  max-width: 70vw;
  margin: 0;
  padding: 0.8vh 1.8vh;
  border-radius: 99px;
  background: #3b4255e8;
  color: #fff;
  font: 700 max(11px, 1.7vh) / 1.3 Sarabun, sans-serif;
  z-index: 4;
}

/* ---------- แท็บอื่น: แผงครีมใต้แถบบน (เนื้อหาเดิม) ---------- */
.g2-panel {
  position: absolute;
  left: 2.4vh;
  right: 2.4vh;
  top: 12vh;
  bottom: 2.4vh;
  overflow-y: auto;
  padding: 2vh;
  border-radius: 1.4vh;
  background: #fffaf2ee;
  box-shadow: 0 1vh 2.4vh #0002;
  color: var(--g2-ink);
}
.g2-panel .note {
  color: var(--g2-soft);
  font-size: max(12px, 1.9vh);
}
@media (prefers-reduced-motion: reduce) {
  .g2-go:not(:disabled):active {
    transform: none;
  }
}
/* จอเตี้ย (มือถือแนวนอน): การ์ดข้อมูลกับรายชื่อตู้ชนกัน — ซ่อนคำอธิบายยาว ย่อรูปตู้ */
@media (max-height: 480px) {
  .g2-info p,
  .g2-links small {
    display: none;
  }
  .g2-list {
    width: 130px;
    gap: 6px;
  }
  .g2-bn {
    height: 50px;
  }
}
/* ผลสุ่ม: แสงรอบการ์ดตามเรท ให้ตรงกับแสงใต้สำรับ (Gacha/gacha-draw.css) — Rare ม่วง · SR ทอง · SSR รุ้ง
   หน้าต่างผลพื้นครีม แสงฟุ้งอย่างเดียวมองไม่ค่อยเห็น จึงใส่เส้นขอบสี (spread) ด้วย */
.gc-card.rare {
  box-shadow:
    0 0 0 2px #fff8 inset,
    0 0 1.4vh #9b4dffaa !important;
}
.gc-card.epic,
.gc-card.epic:not(.has-card) {
  box-shadow:
    0 0 0 2px #ffcc4d,
    0 0 2.2vh #ffb300 !important;
}
.gc-card.legendary {
  box-shadow:
    -2px -2px 0 2px #ff5c8a,
    2px -2px 0 2px #fff275,
    2px 2px 0 2px #5cc8ff,
    -2px 2px 0 2px #6dff9e,
    -1vh 0 2vh #ff5c8a,
    1vh 0 2vh #5cc8ff,
    0 -1vh 2vh #ffd36b !important;
}
