/* Pop-Chibi Smartphone Portrait RPG Stylesheet */
:root {
  --ink: #1d2030;
  --bg-page: #181c2b;
  --bg-app: #f6f8fc;
  --card: #ffffff;
  --primary: #ff5400;
  --blue: #2b7de9;
  --green: #16a34a;
  --purple: #8b3dff;
  --gold: #f59f00;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'M PLUS Rounded 1c', sans-serif;
  background: radial-gradient(circle at top, #2c3354 0%, #141726 100%);
  color: var(--ink);
  overflow: hidden;
  user-select: none;
}

button, input {
  font-family: inherit;
}

.app-shell {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg-app);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.55);
}

/* ================= Top Header ================= */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 3px solid var(--ink);
  z-index: 10;
}
.hdr-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lv-pill {
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 2px solid var(--ink);
}
.hdr-name {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.1;
}
.exp-bar {
  width: 92px;
  height: 7px;
  background: #e2e8f0;
  border-radius: 99px;
  border: 1.5px solid var(--ink);
  overflow: hidden;
  margin-top: 3px;
}
.exp-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d4ff, #2b7de9);
  width: 0%;
  transition: width 0.3s;
}
.hdr-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.coin-pill {
  background: #fff4cc;
  border: 2px solid var(--ink);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
}
.tts-hdr-btn {
  height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: #dcfce7;
  color: #14532d;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.tts-hdr-btn.off {
  background: #e2e8f0;
  color: #64748b;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: #f1f5f9;
  font-size: 16px;
  cursor: pointer;
}

/* ================= Viewport & Screens ================= */
.viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.screen {
  display: none;
  width: 100%;
  height: 100%;
  overflow-y: auto;
}
.screen.active {
  display: block;
}
.scroll-pad {
  padding: 12px 12px 26px;
}

/* ================= Bottom Nav ================= */
.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #ffffff;
  border-top: 3px solid var(--ink);
  padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
  gap: 5px;
  z-index: 10;
}
.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 2px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
}
.nav-btn .nav-ic {
  font-size: 19px;
  line-height: 1.1;
}
.nav-btn.active {
  background: #fff3d6;
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 2px 0 var(--ink);
}

/* ================= Avatar Creator & Salon ================= */
.create-card, .salon-wrap {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 5px 0 var(--ink);
}
.create-title {
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--primary);
}
.create-sub {
  text-align: center;
  font-size: 12px;
  color: #475569;
  margin: 4px 0 10px;
}
.avatar-stage-box {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.72) 100%),
    url('../assets/backgrounds/hub_town.jpg') center / cover no-repeat;
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  padding: 8px;
  text-align: center;
  margin-bottom: 12px;
}
.avatar-stage-box .chibi-svg {
  width: 155px;
  height: 175px;
}
.starter-tag {
  display: inline-block;
  background: #1d2030;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
}
.creator-section {
  margin-bottom: 12px;
}
.creator-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.creator-label {
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 5px;
}
.chaos-btn {
  background: linear-gradient(90deg, #ff2a85, #ff9900);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink);
}
.name-input {
  width: 100%;
  padding: 9px 12px;
  font-size: 15px;
  font-weight: 800;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
}
.gender-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gender-btn {
  padding: 9px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: #f1f5f9;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
}
.gender-btn.selected {
  background: #ffe066;
  box-shadow: 0 3px 0 var(--ink);
}
.chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.chip-grid.cols-4 {
  grid-template-columns: repeat(2, 1fr);
}
.part-chip {
  padding: 7px 4px;
  border-radius: 10px;
  border: 2px solid #cbd5e1;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  color: var(--ink);
}
.part-chip.funny {
  background: #fff5f8;
}
.part-chip.selected {
  border-color: var(--ink);
  background: #72efdd;
  box-shadow: 0 2px 0 var(--ink);
}
.color-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.color-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 2px;
  border-radius: 10px;
  border: 2px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
}
.color-swatch.selected {
  border-color: var(--ink);
  background: #fff3cc;
  box-shadow: 0 2px 0 var(--ink);
}
.swatch-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  margin-bottom: 2px;
}
.swatch-dot.rainbow {
  background: conic-gradient(#ff3b5c, #ffb800, #22e58a, #2997ff, #c33cff, #ff3b5c);
}
.color-swatch small {
  font-size: 9px;
  font-weight: 800;
}
.primary-cta-btn {
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  border: 3px solid var(--ink);
  background: linear-gradient(180deg, #ff7b00 0%, #ff4800 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
  margin-top: 6px;
}
.primary-cta-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--ink);
}

/* ================= Home Screen ================= */
.home-hero-card {
  display: grid;
  grid-template-columns: 122px 1fr;
  gap: 8px;
  background:
    linear-gradient(96deg, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0.86) 46%, rgba(255, 255, 255, 0.94) 100%),
    url('../assets/backgrounds/hub_town.jpg') center / cover no-repeat;
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 4px 0 var(--ink);
  align-items: center;
}
.home-avatar-col .chibi-svg {
  width: 120px;
  height: 142px;
  display: block;
}
.stat-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 7px;
}
.stat-pill {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 4px 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.stat-pill strong {
  font-size: 14px;
  font-weight: 900;
}
.home-weapon-card {
  background: #1d2030;
  color: #fff;
  border-radius: 11px;
  padding: 7px 9px;
  font-size: 11px;
}
.hw-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  font-size: 13px;
}
.hw-tendency {
  color: #93c5fd;
  font-weight: 700;
}
.hw-ult {
  color: #fde047;
  margin-top: 2px;
}
.sec-heading {
  font-size: 15px;
  font-weight: 900;
  margin: 14px 2px 8px;
}
.quest-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.quest-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  background-size: cover;
  background-position: center;
  border: 2.5px solid var(--ink);
  border-radius: 15px;
  padding: 11px 12px;
  box-shadow: 0 3px 0 var(--ink);
}
.quest-card.has-bg {
  color: #ffffff;
}
.quest-card.has-bg .quest-lv-badge {
  background: #ffd500;
  color: var(--ink);
}
.quest-card.has-bg .quest-name {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}
.quest-card.has-bg .quest-desc {
  color: #e2e8f0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.quest-card.has-bg .quest-meta {
  color: #fde047;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}
.quest-card.locked {
  opacity: 0.62;
  filter: grayscale(0.45);
}
.quest-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.quest-lv-badge {
  background: #1d2030;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
}
.cleared-mark {
  background: #ffd500;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
}
.quest-name {
  font-size: 15px;
  font-weight: 900;
  margin-top: 2px;
}
.quest-desc {
  font-size: 11px;
  color: #475569;
}
.quest-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  font-weight: 800;
  color: #0f766e;
  margin-top: 3px;
}
.quest-go-btn {
  flex-shrink: 0;
  padding: 10px 13px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: linear-gradient(180deg, #ff7b00, #ff4800);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
}
.quest-go-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

/* ================= Rarity Badges ================= */
.rarity-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  border: 1.5px solid var(--ink);
}
.r-N   { background: #cbd5e1; color: #1e293b; }
.r-R   { background: #38bdf8; color: #fff; }
.r-SR  { background: #a855f7; color: #fff; }
.r-SSR { background: linear-gradient(90deg, #ff3b5c, #ffd000, #00f5d4); color: #1d2030; }

.border-R   { border-color: #2b7de9 !important; }
.border-SR  { border-color: #9333ea !important; }
.border-SSR { border-color: #f59f00 !important; background: #fffdf2 !important; }

/* ================= Equip Screen ================= */
.equip-preview-card {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 8px;
  background:
    linear-gradient(96deg, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0.86) 46%, rgba(255, 255, 255, 0.94) 100%),
    url('../assets/backgrounds/hub_armory.jpg') center / cover no-repeat;
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 4px 0 var(--ink);
  align-items: center;
}
.equip-avatar-view .chibi-svg {
  width: 124px;
  height: 146px;
}
.equip-QuickStats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.eq-stat {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 9px;
  padding: 4px 7px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.eq-ult-box {
  grid-column: span 2;
  background: #1d2030;
  color: #fff;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 11px;
}
.eq-ult-box small {
  color: #94a3b8;
  font-size: 10px;
}
.eq-ult-box span {
  color: #fde047;
  font-size: 10px;
}
.eq-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0;
}
.lock-notice {
  background: #fff4e6;
  border: 2px solid #f59f00;
  color: #9a3412;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  margin: 8px 0 4px;
}
.eq-tab-btn {
  padding: 8px 4px;
  border-radius: 11px;
  border: 2.5px solid var(--ink);
  background: #e2e8f0;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.eq-tab-btn.active {
  background: #ffd500;
  box-shadow: 0 3px 0 var(--ink);
}
.inv-count-bar {
  font-size: 11px;
  color: #475569;
  margin-bottom: 7px;
  font-weight: 700;
}
.inv-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.inv-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  padding: 9px;
  box-shadow: 0 3px 0 rgba(29, 32, 48, 0.2);
}
.inv-card.equipped {
  box-shadow: 0 4px 0 var(--ink);
  background: #f0fdf4;
}
.inv-icon-box {
  position: relative;
  border: 2px solid var(--ink);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 78px;
}
.inv-icon-box .rarity-badge {
  position: absolute;
  top: 3px;
  left: 3px;
}
.item-icon-svg {
  width: 56px;
  height: 56px;
}
.inv-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.eq-now-pill {
  background: #16a34a;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 99px;
}
.item-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.spec-tag {
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
}
.spec-tag.atk   { background: #ffe4e6; border-color: #fda4af; }
.spec-tag.def   { background: #dbeafe; border-color: #93c5fd; }
.spec-tag.spd   { background: #dcfce7; border-color: #86efac; }
.spec-tag.genre { background: #fef3c7; border-color: #fde047; }
.item-ult-line {
  margin-top: 4px;
  font-size: 11px;
  background: #fff4e6;
  border-radius: 6px;
  padding: 3px 6px;
  color: #9a3412;
}
.item-desc-text {
  font-size: 11px;
  color: #64748b;
  margin-top: 3px;
}
.inv-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.btn-equip {
  padding: 5px 12px;
  border-radius: 9px;
  border: 2px solid var(--ink);
  background: #2b7de9;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.btn-equipped {
  padding: 5px 12px;
  border-radius: 9px;
  border: 2px solid #16a34a;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 900;
}
.btn-sell {
  padding: 5px 10px;
  border-radius: 9px;
  border: 2px solid #94a3b8;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

/* ================= Gacha Screen ================= */
.gacha-banner {
  background:
    linear-gradient(180deg, rgba(45, 10, 85, 0.82) 0%, rgba(88, 28, 135, 0.9) 100%),
    url('../assets/backgrounds/stage_9.jpg') center / cover no-repeat;
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 16px 14px;
  text-align: center;
  box-shadow: 0 5px 0 var(--ink);
}
.gacha-chest-illust {
  font-size: 62px;
  line-height: 1;
  margin-bottom: 4px;
  display: inline-block;
}
.gacha-chest-illust.shake {
  animation: hitShake 0.45s ease infinite;
}
.gacha-banner h2 {
  margin: 4px 0;
  font-size: 19px;
}
.gacha-banner p {
  margin: 4px 0 8px;
  font-size: 12px;
  color: #e9d5ff;
}
.gacha-rates {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 8px;
  border-radius: 99px;
  display: inline-block;
  margin-bottom: 12px;
}
.gacha-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.gacha-pull-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 11px 8px;
  border-radius: 14px;
  border: 2.5px solid var(--ink);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
}
.gacha-pull-btn.single {
  background: #38bdf8;
  color: var(--ink);
}
.gacha-pull-btn.ten {
  background: linear-gradient(180deg, #ffe066, #ff9f1c);
  color: var(--ink);
}
.gacha-pull-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ten-ribbon {
  position: absolute;
  top: -10px;
  background: #ff006e;
  color: #fff;
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 99px;
  border: 1.5px solid var(--ink);
}
.gacha-res-title {
  text-align: center;
  margin: 14px 0 8px;
  font-size: 16px;
}
.gacha-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.gacha-item-card {
  position: relative;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 13px;
  padding: 8px;
  text-align: center;
}
.gacha-item-card .rarity-badge {
  position: absolute;
  top: 5px;
  left: 5px;
}
.gi-name {
  font-size: 12px;
  font-weight: 900;
  margin-top: 2px;
}
.gi-sub {
  font-size: 10px;
  color: #475569;
  font-weight: 700;
}

/* ================= Online Preview ================= */
.online-card {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 5px 0 var(--ink);
}
.online-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 900;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1.5px solid var(--ink);
}
.online-card h2 {
  margin: 8px 0 4px;
  font-size: 18px;
}
.online-card p {
  font-size: 12px;
  color: #475569;
}
.fighter-pass {
  margin-top: 12px;
  background:
    linear-gradient(110deg, rgba(15, 23, 42, 0.82) 0%, rgba(30, 41, 59, 0.9) 100%),
    url('../assets/backgrounds/stage_6.jpg') center / cover no-repeat;
  color: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  padding: 10px;
  display: grid;
  grid-template-columns: 115px 1fr;
  align-items: center;
  text-align: left;
}
.fp-left .chibi-svg {
  width: 110px;
  height: 130px;
}
.fp-name {
  font-size: 16px;
  font-weight: 900;
}
.fp-score {
  color: #ffd500;
  font-size: 13px;
  margin: 3px 0 6px;
}
.fp-gear {
  font-size: 11px;
  color: #cbd5e1;
}

/* ================= Battle Screen ================= */
.battle-screen.active {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bt-top-hud {
  background: #1d2030;
  color: #fff;
  padding: 7px 12px;
}
.bt-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.bt-stage-name {
  font-weight: 900;
  font-size: 14px;
}
.bt-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.retreat-btn {
  background: #334155;
  color: #fff;
  border: 1.5px solid #94a3b8;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  cursor: pointer;
}
.retreat-btn.tts-mini {
  background: #14532d;
  border-color: #4ade80;
  color: #dcfce7;
}
.retreat-btn.tts-mini.off {
  background: #334155;
  border-color: #64748b;
  color: #94a3b8;
}
.wave-pips {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
.wave-pip {
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 0;
  border-radius: 6px;
  background: #334155;
  color: #94a3b8;
}
.wave-pip.done {
  background: #16a34a;
  color: #fff;
}
.wave-pip.cur {
  background: #ffd500;
  color: var(--ink);
  transform: scale(1.04);
}

.battle-arena {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 12px 6px;
  overflow: hidden;
  background-color: #1e293b;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.battle-arena::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 15, 30, 0.28) 0%, rgba(10, 15, 30, 0.04) 50%, rgba(10, 15, 30, 0.36) 100%);
  pointer-events: none;
  z-index: 1;
}
.battle-arena.ult-flash {
  animation: ultFlash 0.6s ease;
}
.battle-arena.arena-shake {
  animation: arenaShake 0.42s ease;
}
.battle-arena.arena-heavy-shake {
  animation: arenaHeavyShake 0.52s ease;
}

.bt-damage-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 15;
}
.bt-damage-flash.red.active {
  background: radial-gradient(circle, rgba(255, 42, 85, 0.14) 22%, rgba(225, 29, 72, 0.76) 100%);
  animation: dmgVignette 0.48s ease-out forwards;
}
.bt-damage-flash.heavy.active {
  background: radial-gradient(circle, rgba(255, 213, 0, 0.25) 10%, rgba(225, 29, 72, 0.88) 75%, rgba(88, 28, 135, 0.92) 100%);
  animation: dmgVignette 0.56s ease-out forwards;
}
.bt-damage-flash.ult.active {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.65) 15%, rgba(255, 213, 0, 0.55) 100%);
  animation: dmgVignette 0.5s ease-out forwards;
}
@keyframes dmgVignette {
  0%   { opacity: 0.95; }
  35%  { opacity: 0.85; }
  100% { opacity: 0; }
}

.bt-vfx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 16;
}
.vfx-slash-enemy {
  position: absolute;
  top: 44px;
  right: 22px;
  width: 150px;
  height: 150px;
  animation: slashPop 0.42s ease-out forwards;
  filter: drop-shadow(0 0 10px #00f5d4);
}
.vfx-slash-enemy.big {
  top: 22px;
  right: 8px;
  width: 210px;
  height: 210px;
  filter: drop-shadow(0 0 16px #ffd500);
}
.vfx-hit-player {
  position: absolute;
  bottom: 24px;
  left: 16px;
  width: 145px;
  height: 145px;
  animation: slashPop 0.44s ease-out forwards;
  filter: drop-shadow(0 0 10px #ff2a55);
}
.vfx-hit-player.boss-boom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 185px;
  height: 185px;
  bottom: 12px;
  left: 6px;
}
.boom-burst {
  font-size: 62px;
  filter: drop-shadow(0 0 14px #ffd500);
}
@keyframes slashPop {
  0%   { opacity: 0; transform: scale(0.45) rotate(-12deg); }
  30%  { opacity: 1; transform: scale(1.12) rotate(0deg); }
  100% { opacity: 0; transform: scale(1.28) rotate(6deg); }
}

.enemy-zone {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-right: 4px;
}
.enemy-hud {
  background: rgba(15, 23, 42, 0.86);
  color: #fff;
  border: 2.5px solid #f8fafc;
  border-radius: 12px;
  padding: 5px 11px;
  width: 82%;
  max-width: 295px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}
.enemy-name {
  font-weight: 900;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.enemy-name small {
  color: #cbd5e1;
  font-size: 10px;
}
.boss-tag {
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 5px;
  margin-right: 4px;
}
.hp-track {
  position: relative;
  height: 16px;
  background: #0f172a;
  border-radius: 99px;
  border: 2px solid var(--ink);
  overflow: hidden;
  margin-top: 3px;
}
.hp-trail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background: #fde047;
  z-index: 1;
  transition: width 0.45s ease;
}
.hp-fill {
  position: relative;
  z-index: 2;
  height: 100%;
  transition: width 0.22s ease;
}
.hp-fill.enemy  { background: linear-gradient(90deg, #ff2a55, #ff758f); }
.hp-fill.player { background: linear-gradient(90deg, #16a34a, #4ade80); }
.hp-label {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 2px #000;
}

.sprite-holder {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.enemy-holder {
  margin-top: 2px;
  margin-right: 10px;
}

.player-zone {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
.player-hud-card {
  flex: 1;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  border: 2.5px solid #ffd500;
  border-radius: 14px;
  padding: 7px 10px;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.player-hud-name {
  font-size: 12px;
  font-weight: 900;
  color: #fde047;
}
.player-meta {
  font-size: 11px;
  font-weight: 800;
  margin-top: 4px;
  color: #e2e8f0;
}

.battle-control-panel {
  background: #ffffff;
  border-top: 3px solid var(--ink);
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
}
.bt-log-box {
  background: #1d2030;
  color: #fff;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  min-height: 36px;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.bt-cmd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.bt-cmd-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  border-radius: 13px;
  border: 2.5px solid var(--ink);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
  text-align: center;
}
.bt-cmd-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--ink);
}
.bt-cmd-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.bt-cmd-btn.atk  { background: linear-gradient(180deg, #ff7b00, #ff4800); color: #fff; }
.bt-cmd-btn.heal { background: linear-gradient(180deg, #4ade80, #16a34a); color: #fff; }
.bt-cmd-btn.ult  { background: linear-gradient(180deg, #ffd500, #f59f00); color: var(--ink); }
.cmd-ic  { font-size: 20px; line-height: 1.1; }
.cmd-lbl { font-size: 13px; font-weight: 900; }
.bt-cmd-btn small {
  font-size: 9px;
  font-weight: 800;
  opacity: 0.92;
  margin-top: 2px;
}

/* Popups & Sprite Animations */
.battle-popup {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
  animation: floatUp 0.9s ease forwards;
  z-index: 20;
  -webkit-text-stroke: 1.5px #1d2030;
}
.battle-popup.dmg  { color: #ff3b5c; }
.battle-popup.crit { color: #ffd500; font-size: 30px; }
.battle-popup.heal { color: #22c55e; }
.battle-popup.miss { color: #cbd5e1; font-size: 20px; }

.lunge-up          { animation: lungeUp 0.35s ease; }
.enemy-lunge       { animation: enemyLunge 0.35s ease; }
.player-attack-dash{ animation: playerAttackDash 0.56s cubic-bezier(0.22, 1, 0.36, 1); }
.enemy-charge-diag { animation: enemyChargeDiag 0.46s cubic-bezier(0.22, 1, 0.36, 1); }
.player-damaged    { animation: playerDamaged 0.62s ease; }
.player-dodge      { animation: playerDodge 0.64s ease; }
.hit-shake         { animation: hitShake 0.45s ease; }
.heal-glow         { filter: drop-shadow(0 0 14px #4ade80) brightness(1.15); }

@keyframes playerAttackDash {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(-8px, 6px) scale(0.97); }
  55%  { transform: translate(38px, -30px) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes enemyChargeDiag {
  0%   { transform: translate(0, 0) scale(1); }
  30%  { transform: translate(8px, -8px) scale(1.04); }
  58%  { transform: translate(-42px, 34px) scale(1.14); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes playerDamaged {
  0%   { transform: translate(0, 0) rotate(0deg); filter: brightness(1); }
  15%  { transform: translate(-20px, 14px) rotate(-14deg); filter: brightness(2.4) sepia(1) saturate(6) hue-rotate(-35deg); }
  32%  { transform: translate(10px, 6px) rotate(6deg); filter: brightness(0.65); }
  48%  { transform: translate(-14px, 10px) rotate(-10deg); filter: brightness(2.2) sepia(1) saturate(5) hue-rotate(-35deg); }
  68%  { transform: translate(6px, 2px) rotate(4deg); filter: brightness(1.4); }
  100% { transform: translate(0, 0) rotate(0deg); filter: brightness(1); }
}
@keyframes playerDodge {
  0%   { transform: translate(0, 0); filter: drop-shadow(0 0 0 transparent); }
  28%  { transform: translate(-40px, -12px) rotate(-10deg); filter: drop-shadow(12px 4px 0 rgba(0, 245, 212, 0.65)) brightness(1.2); }
  62%  { transform: translate(18px, -8px) rotate(6deg); filter: drop-shadow(-10px 4px 0 rgba(0, 245, 212, 0.5)); }
  100% { transform: translate(0, 0); filter: drop-shadow(0 0 0 transparent); }
}
@keyframes arenaShake {
  0%, 100% { transform: translate(0, 0); }
  20%      { transform: translate(-7px, 5px); }
  40%      { transform: translate(7px, -5px); }
  60%      { transform: translate(-5px, -3px); }
  80%      { transform: translate(5px, 3px); }
}
@keyframes arenaHeavyShake {
  0%, 100% { transform: translate(0, 0); }
  15%      { transform: translate(-12px, 9px); }
  30%      { transform: translate(12px, -9px); }
  45%      { transform: translate(-10px, -6px); }
  65%      { transform: translate(10px, 7px); }
  82%      { transform: translate(-6px, 4px); }
}
@keyframes lungeUp {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(18px, -26px) scale(1.08); }
  100% { transform: translate(0, 0); }
}
@keyframes enemyLunge {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(26px) scale(1.1); }
  100% { transform: translateY(0); }
}
@keyframes hitShake {
  0%, 100% { transform: translateX(0); filter: brightness(1); }
  20%      { transform: translateX(-11px); filter: brightness(2.1); }
  40%      { transform: translateX(11px); filter: brightness(0.85); }
  60%      { transform: translateX(-8px); filter: brightness(1.9); }
  80%      { transform: translateX(8px); filter: brightness(1); }
}
@keyframes floatUp {
  0%   { opacity: 1; transform: translate(-50%, 10px) scale(0.8); }
  30%  { opacity: 1; transform: translate(-50%, -14px) scale(1.12); }
  100% { opacity: 0; transform: translate(-50%, -38px) scale(1); }
}
@keyframes ultFlash {
  0%, 100% { filter: brightness(1); }
  25%      { filter: brightness(2.2) saturate(1.8); }
  50%      { filter: invert(0.85); }
}

/* ================= Ultimate Cut-In ================= */
.ult-cutin-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 24, 0.82);
  z-index: 60;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ult-cutin-overlay.active {
  display: flex;
}
.cutin-band {
  width: 110%;
  background: linear-gradient(90deg, #1d2030, var(--ult-color, #ff5400), #1d2030);
  border-top: 4px solid #fff;
  border-bottom: 4px solid #fff;
  transform: rotate(-6deg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  animation: cutInSlide 0.3s ease-out;
}
.cutin-avatar .chibi-svg {
  width: 105px;
  height: 120px;
}
.cutin-text {
  color: #fff;
  text-shadow: 2px 2px 0 #1d2030;
}
.cutin-text small {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: #ffd500;
}
.cutin-text strong {
  font-size: 21px;
  font-weight: 900;
}
.cutin-band.boss-cutin {
  background: linear-gradient(90deg, #0f172a, #be123c, #4c0519);
  border-top: 4px solid #ffd500;
  border-bottom: 4px solid #ffd500;
  transform: rotate(5deg);
  animation: bossCutInSlide 0.32s ease-out;
}
.cutin-boss .enemy-img.boss {
  width: 108px;
  height: 108px;
}
.cutin-sub-warn {
  margin-top: 3px;
  display: inline-block;
  background: #ffd500;
  color: #1d2030;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 99px;
}
@keyframes bossCutInSlide {
  from { transform: translateX(100%) rotate(5deg); }
  to   { transform: translateX(0) rotate(5deg); }
}
@keyframes cutInSlide {
  from { transform: translateX(-100%) rotate(-6deg); }
  to   { transform: translateX(0) rotate(-6deg); }
}

/* ================= Challenge (Quiz & Minigame) Modal ================= */
.modal-backdrop {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  z-index: 50;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.modal-backdrop.active {
  display: flex;
}
.challenge-sheet, .result-sheet {
  position: relative;
  width: 100%;
  background: #ffffff;
  border: 3.5px solid var(--ink);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 0 var(--ink);
}
.modal-backdrop.ult-mode .challenge-sheet {
  border-color: #ffd500;
  box-shadow: 0 0 25px rgba(255, 213, 0, 0.7);
}
.modal-backdrop.evade-mode .challenge-sheet {
  border-color: #ff2a55;
  box-shadow: 0 0 28px rgba(255, 42, 85, 0.85);
}
.challenge-hdr-bar {
  background: var(--ink);
  color: #fff;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.challenge-hdr-title {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}
.modal-backdrop.ult-mode .challenge-hdr-bar {
  background: linear-gradient(90deg, #d90429, #ff7b00);
}
.modal-backdrop.evade-mode .challenge-hdr-bar {
  background: linear-gradient(90deg, #9f1239, #e11d48, #0f172a);
}
.modal-tts-btn {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1.5px solid #86efac;
  background: #14532d;
  color: #dcfce7;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.modal-tts-btn.off {
  border-color: #94a3b8;
  background: #334155;
  color: #cbd5e1;
}
.challenge-body {
  position: relative;
  padding: 12px;
}

/* Timer Bar */
.mg-timer-wrap {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 99px;
  border: 2px solid var(--ink);
  overflow: hidden;
  margin-bottom: 10px;
}
.mg-timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
}
.mg-timer-bar.danger {
  background: #ef4444;
}

/* Quiz UI */
.quiz-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.quiz-mode-tag {
  background: #dbeafe;
  color: #1e40af;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 99px;
}
.quiz-mode-tag.hard {
  background: #ffe4e6;
  color: #be123c;
}
.quiz-badge-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.quiz-replay-tts {
  background: #dcfce7;
  color: #15803d;
  border: 1.5px solid #16a34a;
  border-radius: 99px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.quiz-diff-stars {
  color: #f59f00;
  font-size: 12px;
  font-weight: 900;
}
.quiz-question-text {
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 10px;
}
.quiz-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quiz-choice-btn {
  padding: 12px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: #fff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
  text-align: left;
}
.quiz-choice-btn.correct { background: #86efac; }
.quiz-choice-btn.wrong   { background: #fda4af; }

/* Kana Panel Input */
.kana-answer-slots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}
.kana-slot {
  width: 36px;
  height: 38px;
  border: 2.5px solid var(--ink);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  background: #f1f5f9;
}
.kana-slot.filled {
  background: #fef08a;
}
.kana-panel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.kana-btn {
  padding: 10px 0;
  font-size: 18px;
  font-weight: 900;
  border-radius: 11px;
  border: 2.5px solid var(--ink);
  background: #fff;
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
}
.kana-btn:disabled {
  opacity: 0.3;
}
.kana-reset-btn {
  margin-top: 8px;
  width: 100%;
  padding: 7px;
  border-radius: 9px;
  border: 2px solid #94a3b8;
  background: #f8fafc;
  font-weight: 800;
  cursor: pointer;
}

/* ================= Minigame Specific Styles ================= */
.mg-tag {
  font-size: 11px;
  font-weight: 900;
  color: var(--purple);
  margin-bottom: 4px;
}
.mg-prompt {
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 10px;
}
.mg-choice-grid {
  display: grid;
  gap: 8px;
}
.mg-choice-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.mg-choice-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.mg-choice-grid.cols-4 { grid-template-columns: 1fr 1fr; }
.mg-choice-btn {
  padding: 18px 8px;
  font-size: 24px;
  font-weight: 900;
  border-radius: 14px;
  border: 3px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
}
.mg-big-action-btn {
  width: 100%;
  padding: 14px;
  margin-top: 10px;
  border-radius: 14px;
  border: 3px solid var(--ink);
  background: #ffd500;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
}
.mg-big-action-btn.fire {
  background: #ff3b5c;
  color: #fff;
}

/* Sniper */
.sniper-arena {
  position: relative;
  height: 115px;
  background: #0f172a;
  border: 3px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
}
.sniper-cross-h {
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 2px; background: rgba(255, 255, 255, 0.25);
}
.sniper-cross-v {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px; background: rgba(255, 255, 255, 0.25);
}
.sniper-bullseye {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid #ff2a55;
  border-radius: 50%;
  background: rgba(255, 42, 85, 0.2);
}
.sniper-target {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
}

/* Car Race */
.race-road {
  position: relative;
  height: 195px;
  background: #334155;
  border: 3px solid var(--ink);
  border-radius: 14px;
  display: grid;
  overflow: hidden;
}
.race-road.lanes-3 { grid-template-columns: repeat(3, 1fr); }
.race-road.lanes-4 { grid-template-columns: repeat(4, 1fr); }
.race-lane {
  border-right: 2px dashed rgba(255, 255, 255, 0.35);
  cursor: pointer;
}
.race-lane:last-child { border-right: none; }
.race-player {
  position: absolute;
  bottom: 10px;
  transform: translateX(-50%);
  font-size: 30px;
  transition: left 0.09s ease-out;
  pointer-events: none;
}
.race-obs {
  position: absolute;
  transform: translateX(-50%);
  font-size: 28px;
  pointer-events: none;
}
.race-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.mg-ctrl-btn {
  padding: 11px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: #e2e8f0;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

/* Gauge Stop */
.gauge-track {
  position: relative;
  height: 44px;
  background: #1e293b;
  border: 3px solid var(--ink);
  border-radius: 99px;
  overflow: hidden;
}
.gauge-zone {
  position: absolute;
  top: 0; bottom: 0;
  background: #ff2a55;
}
.gauge-needle {
  position: absolute;
  top: 0; bottom: 0;
  width: 8px;
  transform: translateX(-50%);
  background: #ffd500;
  box-shadow: 0 0 8px #fff;
}

/* Quick Draw */
.quickdraw-stage {
  height: 110px;
  border-radius: 14px;
  border: 3px solid var(--ink);
  background: #fef3c7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quickdraw-stage.fake { background: #dbeafe; }
.quickdraw-stage.go   { background: #ffe4e6; }
.qd-status {
  font-size: 24px;
  font-weight: 900;
}

/* Number Rush */
.numrush-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.numrush-btn {
  height: 54px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: #fff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
}
.numrush-btn.cleared {
  background: #86efac;
  opacity: 0.35;
}
.numrush-empty {
  height: 54px;
}

/* Mash Crash */
.mash-rock-btn {
  width: 100%;
  height: 130px;
  border-radius: 18px;
  border: 3px solid var(--ink);
  background: radial-gradient(circle, #fef08a, #f97316);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--ink);
}
.mash-rock-btn.pop {
  transform: scale(0.94);
}
.mash-icon { font-size: 52px; }
.mash-sub  { font-size: 14px; font-weight: 900; }

/* Odd One Out */
.odd-grid {
  display: grid;
  gap: 5px;
}
.odd-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: #fff;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

/* Bomb Wire */
.wire-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.wire-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  background: #1e293b;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  cursor: pointer;
}
.wire-line {
  flex: 1;
}

/* Shell Game */
.shell-stage {
  position: relative;
  height: 125px;
  background: #f1f5f9;
  border-radius: 14px;
  border: 2.5px solid var(--ink);
}
.shell-cup {
  position: absolute;
  top: 22px;
  transform: translateX(-50%);
  width: 68px;
  height: 84px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: left 0.15s ease-in-out;
}
.cup-body {
  font-size: 48px;
  display: block;
}
.cup-gem {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  opacity: 0;
  transition: opacity 0.15s;
}
.cup-gem.show {
  opacity: 1;
  transform: translate(-50%, -42px);
}

/* Slash Combo */
.combo-seq {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.combo-step {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #f8fafc;
}
.combo-step.cur  { border-color: var(--ink); background: #fde047; transform: scale(1.1); }
.combo-step.done { background: #86efac; opacity: 0.5; }
.combo-pad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.combo-btn {
  padding: 14px 0;
  font-size: 24px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: #fff;
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
}

/* Memory Flash */
.mem-cards {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}
.mem-card {
  width: 56px;
  height: 64px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
}
.mem-card.ask {
  background: #fef08a;
}

/* Result Banner inside Challenge */
.mg-result-banner {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.93);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 30;
}
.mg-result-banner span {
  font-size: 30px;
  font-weight: 900;
}
.mg-result-banner.ok span { color: #16a34a; }
.mg-result-banner.ng span { color: #e11d48; }
.mg-result-banner small {
  font-size: 14px;
  font-weight: 800;
  margin-top: 4px;
}

/* Stage Result Modal */
.result-sheet {
  padding: 16px;
  text-align: center;
  max-height: 86dvh;
  overflow-y: auto;
}
.res-header {
  font-size: 24px;
  font-weight: 900;
}
.res-header.win  { color: #ea580c; }
.res-header.lose { color: #64748b; }
.res-stage {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
}
.res-rewards {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}
.res-pill {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 6px;
  font-size: 13px;
}
.res-lvup {
  background: #fef08a;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 6px;
  font-size: 13px;
  font-weight: 900;
}
.res-drops-title {
  font-size: 13px;
  font-weight: 900;
  margin: 8px 0 6px;
}
.res-nodrop {
  font-size: 12px;
  color: #64748b;
  margin: 10px 0;
}

/* ================= Split Fixed-Preview + Scrollable Controls Layout ================= */
.split-screen.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.fixed-top-dock {
  flex-shrink: 0;
  background: #f6f8fc;
  padding: 8px 12px 6px;
  border-bottom: 2.5px solid var(--ink);
  z-index: 6;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}
.fixed-top-dock.equip-dock .eq-tabs {
  margin: 8px 0 2px;
}
.create-dock-inner {
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  padding: 8px 10px 6px;
}
.avatar-stage-box.compact {
  margin: 6px 0 0;
  padding: 4px 6px 6px;
}
.split-scroll-pane {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 26px;
}

/* ================= 2D Illustrated Chibi Paper-Doll & Monster Layers ================= */
.create-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bgm-pill-btn {
  background: #fff3cc;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink);
  white-space: nowrap;
}

.chibi-doll {
  position: relative;
  width: 140px;
  aspect-ratio: 440 / 520;
  margin: 0 auto;
  user-select: none;
}
.chibi-doll::after {
  content: '';
  position: absolute;
  bottom: 6.4%;
  left: 18%;
  width: 64%;
  height: 5.5%;
  background: rgba(15, 23, 42, 0.22);
  border-radius: 50%;
  z-index: 0;
}
.chibi-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}
.chibi-aura-ring {
  position: absolute;
  inset: 8% 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 224, 102, 0.55) 0%, rgba(255, 107, 179, 0.18) 60%, transparent 75%);
  border: 2.5px dashed #ffd500;
  z-index: 1;
  animation: spinSlow 9s linear infinite;
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.avatar-stage-box .chibi-doll {
  width: 142px;
}
.home-avatar-col .chibi-doll {
  width: 122px;
}
.equip-avatar-view .chibi-doll {
  width: 126px;
}
.fp-left .chibi-doll {
  width: 112px;
}
.player-holder .chibi-doll {
  width: 132px;
}
.player-holder .chibi-doll.back-battle-doll {
  width: 158px;
  aspect-ratio: 480 / 520;
}
.back-battle-doll .back-weapon-pivot {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  will-change: transform;
}
.back-battle-doll .back-outfit { z-index: 3; }
.back-battle-doll .back-head   { z-index: 4; }
.back-battle-doll .back-hair   { z-index: 5; }

.back-weapon-pivot.swing-weapon {
  animation: weaponBrandishSlash 0.58s cubic-bezier(0.22, 1, 0.36, 1);
}
.back-weapon-pivot.swing-ult {
  animation: weaponUltSlash 0.64s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes weaponBrandishSlash {
  0%   { transform: rotate(0deg) scale(1); filter: drop-shadow(0 0 0 transparent); }
  28%  { transform: rotate(-72deg) scale(1.12); filter: drop-shadow(0 0 8px #fde047); }
  58%  { transform: rotate(68deg) scale(1.18); filter: drop-shadow(0 0 12px #00f5d4); }
  82%  { transform: rotate(18deg) scale(1.04); }
  100% { transform: rotate(0deg) scale(1); filter: drop-shadow(0 0 0 transparent); }
}
@keyframes weaponUltSlash {
  0%   { transform: rotate(0deg) scale(1); filter: drop-shadow(0 0 0 transparent); }
  25%  { transform: rotate(-92deg) scale(1.22); filter: drop-shadow(0 0 16px #ffd500); }
  55%  { transform: rotate(82deg) scale(1.3); filter: drop-shadow(0 0 22px #ff3b5c); }
  80%  { transform: rotate(22deg) scale(1.08); }
  100% { transform: rotate(0deg) scale(1); filter: drop-shadow(0 0 0 transparent); }
}
.cutin-avatar .chibi-doll {
  width: 106px;
}

.item-icon-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.18));
}

.enemy-illust-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.enemy-illust-wrap.boss::before {
  content: '';
  position: absolute;
  width: 165px;
  height: 165px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--boss-glow, #ff2a55) 0%, transparent 70%);
  opacity: 0.35;
  z-index: 0;
}
.enemy-boss-crown {
  position: absolute;
  top: -18px;
  font-size: 26px;
  z-index: 3;
  filter: drop-shadow(0 2px 0 #1d2030);
}
.enemy-img {
  position: relative;
  z-index: 2;
  width: 142px;
  height: 142px;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.28));
}
.enemy-img.boss {
  width: 174px;
  height: 174px;
}


/* =========================================================================
   RPG Royal Armory Overhaul (#screenEquip) + Ultimate Recessed "凹" Sockets
   ========================================================================= */
#screenEquip {
  background:
    linear-gradient(180deg, rgba(28, 17, 10, 0.86) 0%, rgba(20, 12, 8, 0.94) 100%),
    url('../assets/backgrounds/hub_armory.jpg') center / cover no-repeat;
  color: #f8fafc;
}

#screenEquip .fixed-top-dock.equip-dock {
  background: linear-gradient(180deg, #2b190e 0%, #190e07 100%);
  border-bottom: 3px solid #eab308;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
  padding: 8px 10px 7px;
}

#screenEquip .equip-preview-card {
  display: grid;
  grid-template-columns: 122px 1fr;
  gap: 8px;
  background:
    linear-gradient(96deg, rgba(16, 10, 5, 0.10) 0%, rgba(18, 11, 7, 0.48) 44%, rgba(15, 13, 24, 0.86) 100%),
    url('../assets/backgrounds/hub_armory.jpg') center / cover no-repeat;
  border: 2.5px solid #f59e0b;
  border-radius: 16px;
  padding: 8px;
  box-shadow: inset 0 0 0 2px rgba(24, 14, 7, 0.78), 0 5px 14px rgba(0, 0, 0, 0.55);
  align-items: center;
}

.equip-avatar-view {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.equip-pedestal-ring {
  position: absolute;
  bottom: 15px;
  width: 98px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(250, 204, 21, 0.55) 0%, rgba(245, 158, 11, 0.18) 62%, transparent 80%);
  border: 1.5px solid rgba(253, 224, 71, 0.75);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.45);
  z-index: 1;
}
.equip-avatar-view .chibi-doll {
  position: relative;
  z-index: 2;
  width: 118px;
}
.equip-hero-ribbon {
  position: relative;
  z-index: 3;
  margin-top: -4px;
  background: linear-gradient(90deg, #451a03, #78350f, #451a03);
  border: 1.5px solid #fbbf24;
  color: #fef08a;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 9px;
  border-radius: 99px;
  white-space: nowrap;
}

#screenEquip .equip-QuickStats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
#screenEquip .eq-stat {
  background: rgba(15, 20, 32, 0.88);
  border: 1.5px solid rgba(251, 191, 36, 0.48);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#screenEquip .eq-stat b {
  color: #fde047;
  font-size: 12px;
  font-weight: 900;
}

.eq-slot-trio {
  grid-column: span 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 1px;
}
.eq-mini-socket {
  position: relative;
  background: linear-gradient(180deg, #1e140c, #0f0a06);
  border: 1.5px solid #785532;
  border-radius: 8px;
  padding: 3px 2px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.75);
}
.eq-mini-socket.active {
  border-color: #fde047;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6), 0 0 8px rgba(250, 204, 21, 0.55);
}
.eq-mini-socket .item-icon-img {
  width: 28px;
  height: 28px;
}
.eq-mini-socket small {
  color: #e7d3b0;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}
.eq-sock-rar {
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 8px;
  font-weight: 900;
  padding: 0 3px;
  border-radius: 4px;
  line-height: 1.2;
}

#screenEquip .eq-ult-box {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(28, 18, 38, 0.94), rgba(15, 23, 42, 0.95));
  border: 1.5px solid #d99b26;
  border-radius: 9px;
  padding: 4px 6px;
}
.eq-zero-sock {
  font-size: 10px;
  font-weight: 800;
  color: #cbd5e1;
  padding: 2px 0;
}
.eq-preview-sockets {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 2px;
}
.eq-prev-sock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}
.eq-prev-sock.filled {
  background: rgba(15, 10, 24, 0.9);
  border: 1px solid var(--orb-c, #f59e0b);
  color: #fff;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.75);
}
.eq-prev-sock.filled em {
  font-style: normal;
  color: #fde047;
  font-size: 9px;
}
.eq-prev-sock.empty {
  background: #0b0908;
  border: 1px dashed #94a3b8;
  color: #94a3b8;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.9);
}
.eq-prev-sock.empty em {
  font-style: normal;
  color: #38bdf8;
  font-size: 9px;
}

#screenEquip .eq-tab-btn {
  background: linear-gradient(180deg, #3b2516 0%, #24150b 100%);
  border: 2px solid #855d37;
  color: #e7d3b0;
  box-shadow: 0 3px 0 #120904;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
#screenEquip .eq-tab-btn.active {
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 100%);
  border-color: #fef9c3;
  color: #291405;
  box-shadow: 0 3px 0 #78350f, 0 0 12px rgba(250, 204, 21, 0.45);
}
.tab-cnt {
  background: rgba(0, 0, 0, 0.28);
  padding: 0 5px;
  border-radius: 99px;
  font-size: 10px;
}
#screenEquip .eq-tab-btn.active .tab-cnt {
  background: #451a03;
  color: #fde047;
}

.rpg-armory-banner {
  background: linear-gradient(90deg, #3b2212, #23140b);
  border: 2px solid #d99b26;
  border-radius: 12px;
  padding: 7px 10px;
  margin-bottom: 8px;
  color: #fef3c7;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}
.rab-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rab-icon {
  font-size: 20px;
}
.rpg-armory-banner strong {
  display: block;
  font-size: 12px;
  color: #fde047;
}
.rpg-armory-banner small {
  font-size: 10px;
  color: #e7d3b0;
}

/* Extracted Ultimate Orb Pouch */
.ult-orb-pouch {
  background: linear-gradient(180deg, #1c1229 0%, #120b1c 100%);
  border: 2px solid #a855f7;
  border-radius: 12px;
  padding: 7px 10px;
  margin-bottom: 9px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.7), 0 3px 8px rgba(0, 0, 0, 0.4);
}
.uop-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #f3e8ff;
}
.uop-head strong {
  color: #fde047;
}
.uop-head small {
  font-size: 10px;
  color: #c084fc;
}
.uop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.uop-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--orb-c, #c084fc);
  border-radius: 99px;
  padding: 2px 8px;
  font-size: 10px;
  color: #fff;
}
.uop-chip small {
  color: #fde047;
}
.uop-empty {
  margin-top: 4px;
  font-size: 10px;
  color: #cbd5e1;
}

/* Parchment & Gilt Iron RPG Inventory Cards */
#screenEquip .inv-card {
  background: linear-gradient(180deg, #fffdf5 0%, #f3e4c6 100%);
  color: #29180b;
  border: 2.5px solid #6b4c2b;
  border-radius: 15px;
  padding: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 0 #140b05, 0 6px 14px rgba(0, 0, 0, 0.45);
}
#screenEquip .inv-card.rar-card-R   { border-color: #2563eb; }
#screenEquip .inv-card.rar-card-SR  { border-color: #9333ea; }
#screenEquip .inv-card.rar-card-SSR {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fffef7 0%, #fef3c7 100%);
}
#screenEquip .inv-card.equipped {
  border: 2.5px solid #fbbf24 !important;
  background: linear-gradient(180deg, #fffef5 0%, #fde68a 100%) !important;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.45), 0 4px 0 #78350f !important;
}

.inv-icon-box.pedestal-N {
  background: radial-gradient(circle, #f8fafc 0%, #cbd5e1 100%);
  border-color: #475569;
}
.inv-icon-box.pedestal-R {
  background: radial-gradient(circle, #e0f2fe 0%, #7dd3fc 100%);
  border-color: #1d4ed8;
}
.inv-icon-box.pedestal-SR {
  background: radial-gradient(circle, #f3e8ff 0%, #c084fc 100%);
  border-color: #7e22ce;
}
.inv-icon-box.pedestal-SSR {
  background: radial-gradient(circle, #fef9c3 0%, #facc15 65%, #f59e0b 100%);
  border-color: #b45309;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.8), 0 0 10px rgba(245, 158, 11, 0.5);
}

.stat-diff {
  font-style: normal;
  font-weight: 900;
  font-size: 9px;
  padding: 0 4px;
  border-radius: 4px;
  margin-left: 2px;
}
.stat-diff.up {
  background: #dcfce7;
  color: #15803d;
}
.stat-diff.down {
  background: #ffe4e6;
  color: #be123c;
}
.spec-tag.sock-cnt {
  background: #2e1065;
  border-color: #a855f7;
  color: #f3e8ff;
}

/* Sunken Indented "凹" Socket Wells */
.weapon-sockets-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}
.zero-socket-bar {
  background: rgba(41, 24, 11, 0.1);
  border: 1.5px dashed #785532;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  color: #5c4028;
}
.ult-socket-well {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 5px 8px;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.1s;
}
.ult-socket-well:active {
  transform: scale(0.98);
}
.ult-socket-well.empty {
  background: #1c1510;
  border: 2px solid #574536;
  color: #a8998c;
  box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.88), 0 1px 0 rgba(255, 255, 255, 0.6);
}
.ult-socket-well.filled {
  background: linear-gradient(90deg, #171124 0%, #241938 100%);
  border: 2px solid var(--orb-c, #f59e0b);
  color: #ffffff;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.75), 0 0 8px rgba(168, 85, 247, 0.25);
}
.usw-bevel {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.55);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9);
}
.ult-socket-well.filled .usw-bevel {
  color: var(--orb-c, #fde047);
  border-color: var(--orb-c, #fde047);
  text-shadow: 0 0 6px var(--orb-c, #fde047);
}
.usw-main {
  flex: 1;
  font-size: 11px;
  font-weight: 800;
}
.usw-main small {
  color: #fde047;
  font-size: 10px;
  margin-left: 3px;
}
.usw-act {
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
}
.ult-socket-well.filled .usw-act {
  background: #6b21a8;
}

#screenEquip .inv-actions {
  flex-wrap: wrap;
}
#screenEquip .btn-equip {
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  border: 2px solid #0f172a;
  box-shadow: 0 2px 0 #0f172a;
}
.btn-extract {
  padding: 5px 10px;
  border-radius: 9px;
  border: 2px solid #3b0764;
  background: linear-gradient(180deg, #a855f7 0%, #6b21a8 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 0 #3b0764;
}
#screenEquip .btn-sell {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #78350f;
  color: #451a03;
  font-weight: 900;
}
#screenEquip .btn-equipped {
  background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
  border: 2px solid #052e16;
  color: #ffffff;
}

/* Blacksmith Forge / Socket / Battle Ult Picker Modal */
.forge-sheet {
  width: 100%;
  background: linear-gradient(180deg, #24160e 0%, #160d08 100%);
  color: #f8fafc;
  border: 3px solid #eab308;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75);
}
.forge-hdr {
  background: linear-gradient(90deg, #451a03, #78350f);
  color: #fde047;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 900;
  border-bottom: 2px solid #eab308;
}
.forge-hdr.danger {
  background: linear-gradient(90deg, #7f1d1d, #be123c);
  color: #fff;
}
.forge-content {
  padding: 12px;
}
.forge-cur-orb {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid var(--orb-c, #f59e0b);
  border-radius: 10px;
  padding: 8px;
  font-size: 12px;
  margin-bottom: 10px;
}
.forge-cur-orb small {
  color: #cbd5e1;
  display: block;
  font-size: 10px;
}
.forge-warn-note {
  display: block;
  font-style: normal;
  font-size: 10px;
  color: #fda4af;
  margin-top: 3px;
}
.forge-cur-empty {
  background: rgba(56, 189, 248, 0.12);
  border: 1.5px dashed #38bdf8;
  border-radius: 10px;
  padding: 8px;
  font-size: 12px;
  color: #e0f2fe;
  margin-bottom: 10px;
}
.forge-sec-lbl {
  font-size: 11px;
  font-weight: 900;
  color: #fde047;
  margin-bottom: 6px;
}
.forge-orb-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 10px;
}
.forge-orb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #1c132b;
  border: 2px solid var(--orb-c, #a855f7);
  border-radius: 11px;
  padding: 8px 10px;
}
.for-info {
  font-size: 12px;
}
.for-info small {
  display: block;
  font-size: 10px;
  color: #cbd5e1;
}
.btn-socket-insert {
  flex-shrink: 0;
  padding: 7px 11px;
  border-radius: 9px;
  border: 2px solid #fef08a;
  background: linear-gradient(180deg, #fde047, #f59e0b);
  color: #1d2030;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.forge-no-orbs {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px;
  font-size: 11px;
  color: #cbd5e1;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 10px;
}
.extract-preview-wp {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(225, 29, 72, 0.14);
  border: 1.5px solid #f43f5e;
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.epw-danger {
  color: #fda4af;
  font-size: 11px;
  font-weight: 900;
  margin-top: 3px;
}
.forge-btn-pair {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
}
.forge-close-btn {
  width: 100%;
  padding: 9px;
  border-radius: 10px;
  border: 2px solid #64748b;
  background: #334155;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.btn-extract-confirm {
  width: 100%;
  padding: 9px;
  border-radius: 10px;
  border: 2px solid #fef08a;
  background: linear-gradient(180deg, #e11d48, #9f1239);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

/* Battle Multi-Ultimate Picker Button */
.bt-ult-pick-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: linear-gradient(90deg, #1b132a, #2c1b3d);
  border: 2px solid var(--orb-c, #f59e0b);
  color: #fff;
  border-radius: 12px;
  padding: 9px 10px;
  cursor: pointer;
  text-align: left;
}
.bt-ult-pick-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.bup-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bup-ic {
  font-size: 22px;
}
.bup-left strong {
  display: block;
  font-size: 13px;
}
.bup-left small {
  color: #cbd5e1;
  font-size: 10px;
}
.bup-uses {
  background: #fde047;
  color: #1d2030;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 99px;
}
.bup-uses.zero {
  background: #475569;
  color: #cbd5e1;
}

/* =========================================================================
   Overdrive Multi-Stage Ultimate Finisher VFX & Boss Cataclysm VFX
   ========================================================================= */
.ult-cinema-stage {
  position: absolute;
  inset: 0;
  z-index: 18;
  pointer-events: none;
  background: radial-gradient(circle at 72% 28%, rgba(255, 255, 255, 0.08) 0%, rgba(8, 10, 22, 0.72) 68%);
  overflow: hidden;
}
.ult-speedlines {
  position: absolute;
  width: 220%;
  height: 220%;
  top: -75%;
  left: -38%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0.0) 0deg 8deg,
    rgba(255, 213, 0, 0.22) 8deg 10deg,
    rgba(255, 255, 255, 0.0) 10deg 18deg,
    color-mix(in srgb, var(--ult-col, #ff5400) 35%, transparent) 18deg 20.5deg
  );
  animation: spinSlow 4s linear infinite;
}
.ult-enemy-focus {
  position: absolute;
  top: 32px;
  right: 12px;
  width: 210px;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ult-beam-slash {
  position: absolute;
  width: 250px;
  height: 115px;
  transform: rotate(var(--beam-rot, -35deg)) scale(0.4);
  filter: drop-shadow(0 0 12px var(--beam-col, #ffd500));
  animation: ultBeamSlice 0.34s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.ult-beam-slash.wide {
  width: 295px;
  height: 140px;
  filter: drop-shadow(0 0 20px #ffd500);
}
@keyframes ultBeamSlice {
  0%   { opacity: 0; transform: rotate(var(--beam-rot)) scaleX(0.2) scaleY(0.5); }
  35%  { opacity: 1; transform: rotate(var(--beam-rot)) scaleX(1.18) scaleY(1.25); }
  100% { opacity: 0; transform: rotate(var(--beam-rot)) scaleX(1.35) scaleY(0.15); }
}

.ult-combo-pop {
  position: absolute;
  font-size: 16px;
  font-weight: 900;
  color: #00f5d4;
  -webkit-text-stroke: 1px #0f172a;
  text-shadow: 0 2px 6px #000;
  z-index: 25;
  pointer-events: none;
  animation: floatUp 0.5s ease-out forwards;
}
.ult-combo-pop.step-0 { top: 20px; left: 18%; color: #38bdf8; }
.ult-combo-pop.step-1 { top: 6px;  left: 68%; color: #fde047; font-size: 18px; }
.ult-combo-pop.step-2 { top: -8px; left: 42%; color: #ff2a85; font-size: 21px; }

.ult-detonation-pack {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ult-energy-pillar {
  position: absolute;
  width: 118px;
  height: 520px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--ult-col, #ff5400) 20%,
    #ffffff 50%,
    var(--ult-col, #ff5400) 80%,
    transparent 100%
  );
  filter: drop-shadow(0 0 22px #ffd500);
  animation: pillarErupt 0.62s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes pillarErupt {
  0%   { opacity: 0; transform: scaleX(0.15) scaleY(0.2); }
  25%  { opacity: 1; transform: scaleX(1.18) scaleY(1); }
  75%  { opacity: 0.9; transform: scaleX(0.85) scaleY(1); }
  100% { opacity: 0; transform: scaleX(0.05) scaleY(1.1); }
}
.ult-arcane-crest {
  position: absolute;
  width: 175px;
  height: 175px;
  border-radius: 50%;
  border: 4px dashed #ffd500;
  box-shadow: 0 0 22px var(--ult-col, #ff5400), inset 0 0 22px #ffd500;
  animation: crestBurst 0.62s ease-out forwards;
}
@keyframes crestBurst {
  0%   { opacity: 1; transform: scale(0.3) rotate(0deg); }
  65%  { opacity: 1; transform: scale(1.15) rotate(120deg); }
  100% { opacity: 0; transform: scale(1.45) rotate(190deg); }
}
.ult-shock-ring {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 6px solid #ffffff;
  box-shadow: 0 0 18px var(--ult-col, #ffd500);
  animation: shockExpand 0.56s ease-out forwards;
}
.ult-shock-ring.r2 {
  border-color: #ffd500;
  animation-delay: 0.09s;
}
@keyframes shockExpand {
  0%   { opacity: 1; transform: scale(0.25); border-width: 10px; }
  100% { opacity: 0; transform: scale(3.4); border-width: 1px; }
}
.ult-core-flash {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #fde047 40%, var(--ult-col, #ff5400) 72%, transparent 100%);
  animation: slashPop 0.55s ease-out forwards;
}
.ult-spark-field {
  position: absolute;
  width: 0;
  height: 0;
}
.ult-spark {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  background: var(--sp-col, #ffd500);
  box-shadow: 0 0 8px #fff, 0 0 14px var(--sp-col, #ffd500);
  animation: sparkFly 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes sparkFly {
  0%   { opacity: 1; transform: translate(0, 0) scale(1.2); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.2); }
}

.ult-mega-popup {
  position: absolute;
  top: -8px;
  left: 46%;
  transform: translateX(-50%);
  z-index: 30;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  animation: megaDmgPop 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.ump-tag {
  display: inline-block;
  background: linear-gradient(90deg, #d90429, #ff7b00, #d90429);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1.5px solid #fde047;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.ump-val {
  display: block;
  font-size: 36px;
  font-weight: 900;
  color: #fde047;
  -webkit-text-stroke: 2px #1d2030;
  filter: drop-shadow(0 0 12px #ff5400) drop-shadow(0 4px 0 #1d2030);
}
@keyframes megaDmgPop {
  0%   { opacity: 0; transform: translate(-50%, 24px) scale(0.35); }
  22%  { opacity: 1; transform: translate(-50%, -14px) scale(1.28); }
  42%  { opacity: 1; transform: translate(-50%, -8px) scale(1.06); }
  82%  { opacity: 1; transform: translate(-50%, -18px) scale(1.06); }
  100% { opacity: 0; transform: translate(-50%, -42px) scale(0.95); }
}

.ult-caster-charge {
  filter: drop-shadow(0 0 16px #ffd500) brightness(1.18);
}
.ult-enemy-blast {
  animation: ultEnemyBlast 0.7s ease;
}
@keyframes ultEnemyBlast {
  0%   { transform: translate(0, 0) scale(1); filter: brightness(1); }
  14%  { transform: translate(22px, -16px) scale(1.18) rotate(12deg); filter: brightness(3) saturate(0); }
  28%  { transform: translate(-16px, 8px) scale(0.88) rotate(-10deg); filter: brightness(1.8) hue-rotate(90deg); }
  45%  { transform: translate(18px, -10px) scale(1.12) rotate(9deg); filter: brightness(2.6); }
  65%  { transform: translate(-10px, 4px) scale(0.95) rotate(-5deg); filter: brightness(1.5); }
  100% { transform: translate(0, 0) scale(1); filter: brightness(1); }
}
.battle-arena.arena-ult-quake {
  animation: arenaUltQuake 0.66s ease;
}
@keyframes arenaUltQuake {
  0%, 100% { transform: translate(0, 0); }
  12%      { transform: translate(-15px, 11px); }
  24%      { transform: translate(15px, -12px); }
  38%      { transform: translate(-13px, -8px); }
  54%      { transform: translate(12px, 9px); }
  72%      { transform: translate(-8px, 5px); }
  88%      { transform: translate(5px, -4px); }
}

/* Boss Ultimate Cataclysm on Player */
.vfx-boss-cataclysm {
  position: absolute;
  bottom: 10px;
  left: 8px;
  width: 195px;
  height: 215px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ult-shock-ring.boss-r1 { border-color: #ff2a55; box-shadow: 0 0 18px #ff2a55; }
.ult-shock-ring.boss-r2 { border-color: #c084fc; animation-delay: 0.1s; }
.boss-plasma-core {
  position: absolute;
  width: 145px;
  height: 145px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #ff2a55 45%, #581c87 78%, transparent 100%);
  animation: slashPop 0.6s ease-out forwards;
}
.boss-lightning-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 12px #ff2a55);
  animation: slashPop 0.65s ease-out forwards;
}

/* =========================================================================
   Split Gacha Tabs & 3-Range Heat Summon Cinema (#gachaSummonOverlay)
   ========================================================================= */
.gacha-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.gmt-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 6px;
  border-radius: 14px;
  border: 2.5px solid var(--ink);
  background: #e2e8f0;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.gmt-btn small {
  font-size: 9px;
  font-weight: 800;
  margin-top: 2px;
  opacity: 0.85;
}
.gmt-btn.wp.active {
  background: linear-gradient(180deg, #ff7b00 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 4px 0 var(--ink);
}
.gmt-btn.ar.active {
  background: linear-gradient(180deg, #38bdf8 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 4px 0 var(--ink);
}
.gacha-banner.weapon-theme {
  background:
    linear-gradient(180deg, rgba(69, 10, 10, 0.80) 0%, rgba(30, 15, 45, 0.90) 100%),
    url('../assets/backgrounds/stage_10.jpg') center / cover no-repeat;
}
.gacha-banner.armor-theme {
  background:
    linear-gradient(180deg, rgba(12, 35, 78, 0.80) 0%, rgba(45, 18, 82, 0.90) 100%),
    url('../assets/backgrounds/stage_9.jpg') center / cover no-repeat;
}
.gacha-theme-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid #fde047;
  color: #fde047;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 10px;
  border-radius: 99px;
  margin-bottom: 6px;
}
.ssr-card-shine {
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.65);
}

/* Full-Screen 3-Tier Gacha Summon Cinema Overlay */
.gacha-summon-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 80;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.gacha-summon-overlay.active {
  display: flex;
}
.gs-aurora-bg {
  position: absolute;
  inset: 0;
  transition: background 0.35s ease;
}
.gacha-summon-overlay.tier-1 .gs-aurora-bg {
  background: radial-gradient(circle at center, #1e3a8a 0%, #0f172a 72%, #020617 100%);
}
.gacha-summon-overlay.tier-2 .gs-aurora-bg {
  background: radial-gradient(circle at center, #9f1239 0%, #4c1d95 58%, #090514 100%);
}
.gacha-summon-overlay.tier-3 .gs-aurora-bg {
  background: radial-gradient(circle at center, #f59e0b 0%, #db2777 38%, #4f46e5 72%, #090514 100%);
}

.gs-speed-rays {
  position: absolute;
  width: 220%;
  height: 220%;
  opacity: 0.18;
  background: repeating-conic-gradient(from 0deg, transparent 0deg 9deg, rgba(255, 255, 255, 0.35) 9deg 12deg);
  animation: spinSlow 9s linear infinite;
}
.gacha-summon-overlay.tier-2 .gs-speed-rays {
  opacity: 0.35;
  background: repeating-conic-gradient(from 0deg, transparent 0deg 7deg, rgba(253, 224, 71, 0.45) 7deg 10deg);
  animation-duration: 4.5s;
}
.gacha-summon-overlay.tier-3 .gs-speed-rays {
  opacity: 0.58;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 59, 92, 0.45) 0deg 8deg,
    rgba(255, 213, 0, 0.55) 8deg 16deg,
    rgba(0, 245, 212, 0.45) 16deg 24deg,
    rgba(168, 85, 247, 0.5) 24deg 32deg
  );
  animation-duration: 2.6s;
}

.gs-magic-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.gs-magic-circle.outer {
  width: 265px;
  height: 265px;
  border: 3px dashed rgba(56, 189, 248, 0.55);
  animation: spinSlow 8s linear infinite;
}
.gs-magic-circle.inner {
  width: 190px;
  height: 190px;
  border: 2px solid rgba(56, 189, 248, 0.4);
  animation: spinSlow 5s linear infinite reverse;
}
.gacha-summon-overlay.tier-2 .gs-magic-circle.outer {
  border: 4px dashed #fde047;
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.7);
  animation-duration: 3.5s;
}
.gacha-summon-overlay.tier-3 .gs-magic-circle.outer {
  width: 300px;
  height: 300px;
  border: 5px dashed #ffffff;
  box-shadow: 0 0 38px #fde047, inset 0 0 28px #00f5d4;
  animation-duration: 2s;
}

.gs-lightning-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}
.gacha-summon-overlay.tier-2 .gs-lightning-layer {
  opacity: 0.65;
  animation: hitShake 0.35s infinite;
}
.gacha-summon-overlay.tier-3 .gs-lightning-layer {
  opacity: 1;
  filter: drop-shadow(0 0 14px #fde047);
  animation: hitShake 0.22s infinite;
}

.gs-skip-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 90;
  padding: 6px 12px;
  border-radius: 99px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.gs-center-stage {
  position: relative;
  z-index: 85;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}
.gs-banner-type {
  font-size: 12px;
  font-weight: 900;
  color: #e2e8f0;
  margin-bottom: 6px;
}
.gs-heat-meter {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.hm-step {
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.5);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}
.gacha-summon-overlay.tier-1 .hm-step.s1 {
  background: #0284c7;
  color: #fff;
  border-color: #7dd3fc;
  box-shadow: 0 0 10px #38bdf8;
}
.gacha-summon-overlay.tier-2 .hm-step.s2 {
  background: linear-gradient(90deg, #e11d48, #f59e0b);
  color: #fff;
  border-color: #fde047;
  transform: scale(1.08);
  box-shadow: 0 0 14px #f43f5e;
}
.gacha-summon-overlay.tier-3 .hm-step.s3 {
  background: linear-gradient(90deg, #ff2a85, #ffd500, #00f5d4);
  color: #1d2030;
  border-color: #fff;
  transform: scale(1.14);
  box-shadow: 0 0 20px #ffd500;
}

.gs-tier-badge {
  font-size: 15px;
  font-weight: 900;
  padding: 5px 14px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.52);
  border: 2px solid #fff;
  text-shadow: 0 2px 4px #000;
  margin-bottom: 18px;
}
.gacha-summon-overlay.tier-3 .gs-tier-badge {
  border-color: #fde047;
  color: #fde047;
  font-size: 16px;
}

.gs-chest-pedestal {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 16px;
}
.gs-chest-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.55) 0%, transparent 70%);
}
.gacha-summon-overlay.tier-2 .gs-chest-glow {
  background: radial-gradient(circle, rgba(250, 204, 21, 0.8) 0%, rgba(225, 29, 72, 0.4) 55%, transparent 75%);
}
.gacha-summon-overlay.tier-3 .gs-chest-glow {
  background: radial-gradient(circle, #ffffff 0%, #fde047 35%, #ec4899 65%, transparent 80%);
}
.gs-chest-box {
  position: relative;
  font-size: 86px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.6));
  animation: chestDropTremor 0.65s ease-in-out infinite;
}
.gs-chest-pedestal[data-tier="1"] .chest-ico-t2,
.gs-chest-pedestal[data-tier="1"] .chest-ico-t3 { display: none; }
.gs-chest-pedestal[data-tier="2"] .chest-ico-t1,
.gs-chest-pedestal[data-tier="2"] .chest-ico-t3 { display: none; }
.gs-chest-pedestal[data-tier="3"] .chest-ico-t1,
.gs-chest-pedestal[data-tier="3"] .chest-ico-t2 { display: none; }

.gs-chest-pedestal.bursting .gs-chest-box {
  animation: slashPop 0.45s ease-out forwards;
}
@keyframes chestDropTremor {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25%      { transform: scale(1.06) rotate(-5deg); }
  75%      { transform: scale(1.06) rotate(5deg); }
}

.gs-tier-hint {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
  text-shadow: 0 2px 4px #000;
}
.gs-open-btn {
  padding: 12px 26px;
  border-radius: 99px;
  border: 3px solid #fff;
  background: linear-gradient(180deg, #fde047, #f59e0b);
  color: #1d2030;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(253, 224, 71, 0.75);
}

.gs-upgrade-cutin {
  position: absolute;
  left: -5%;
  right: -5%;
  top: 44%;
  background: linear-gradient(90deg, #ff006e, #ffd500, #00f5d4);
  color: #1d2030;
  font-size: 17px;
  font-weight: 900;
  text-align: center;
  padding: 12px 10px;
  border-top: 4px solid #fff;
  border-bottom: 4px solid #fff;
  transform: scaleY(0) rotate(-4deg);
  z-index: 88;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.gs-upgrade-cutin.show {
  transform: scaleY(1) rotate(-4deg);
}
.gs-whiteout {
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 95;
}
.gs-whiteout.burst {
  animation: whiteoutBurst 0.48s ease-out forwards;
}
@keyframes whiteoutBurst {
  0%   { opacity: 0; }
  45%  { opacity: 1; }
  100% { opacity: 1; }
}

/* =========================================================================
   Styles for the 12 New Doubled Minigames (#13 ~ #24)
   ========================================================================= */
.mole-grid {
  display: grid;
  gap: 7px;
}
.mole-hole {
  height: 60px;
  border-radius: 14px;
  border: 2.5px solid var(--ink);
  background: #3f2e21;
  font-size: 28px;
  cursor: pointer;
  box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.6);
}
.mole-hole.up-mole { background: #fef08a; }
.mole-hole.up-bomb { background: #fecdd3; }

.dont-push-btn {
  width: 100%;
  height: 128px;
  border-radius: 20px;
  border: 3.5px solid var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--ink);
}
.dont-push-btn span  { font-size: 26px; font-weight: 900; }
.dont-push-btn small { font-size: 13px; font-weight: 800; margin-top: 4px; }
.dont-push-btn.go   { background: linear-gradient(180deg, #4ade80, #16a34a); color: #fff; }
.dont-push-btn.stop { background: linear-gradient(180deg, #ff2a55, #be123c); color: #fff; }

.crane-stage {
  position: relative;
  height: 120px;
  background: #0f172a;
  border: 3px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
}
.crane-head {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  font-size: 24px;
}
.crane-gem {
  position: absolute;
  top: 24px;
  transform: translateX(-50%);
  font-size: 24px;
}
.crane-pedestal {
  position: absolute;
  bottom: 0;
  height: 24px;
  background: #ffd500;
  color: #1d2030;
  border-top: 2.5px solid #fff;
  border-radius: 6px 6px 0 0;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-stage {
  position: relative;
  height: 132px;
  background: #0f172a;
  border: 3px solid var(--ink);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ring-target {
  position: absolute;
  border-radius: 50%;
  border: 5px dashed #ffd500;
}
.ring-moving {
  position: absolute;
  border-radius: 50%;
  border: 5px solid #00f5d4;
  box-shadow: 0 0 10px #00f5d4;
}

.roulette-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.rl-cell {
  height: 52px;
  border-radius: 11px;
  border: 2.5px solid #cbd5e1;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.rl-cell.lit {
  border-color: var(--ink);
  background: #fde047;
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.8);
}

.shield-arena, .sort-stage {
  height: 92px;
  background: #1e293b;
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.sh-incoming {
  font-size: 18px;
  font-weight: 900;
}
.sh-btn small {
  display: block;
  font-size: 11px;
  font-weight: 900;
}
.sort-cur-item {
  font-size: 42px;
  line-height: 1.1;
}

.hurdle-track {
  position: relative;
  height: 105px;
  background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 72%, #d97706 72%, #b45309 100%);
  border: 3px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
}
.hd-runner {
  position: absolute;
  left: 14%;
  bottom: 8px;
  font-size: 30px;
  transform: scaleX(-1);
  transition: bottom 0.1s ease-out;
}
.hd-obs {
  position: absolute;
  bottom: 8px;
  font-size: 24px;
}

.tug-arena {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 10px;
}
.tug-rope-bar {
  position: relative;
  flex: 1;
  height: 30px;
  background: #e2e8f0;
  border: 2.5px solid var(--ink);
  border-radius: 99px;
  overflow: hidden;
}
.tug-win-zone {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 22%;
  background: #86efac;
}
.tug-flag {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
}

.pump-stage {
  height: 115px;
  background: #f8fafc;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 10px;
}
.pump-balloon {
  font-size: 42px;
  transition: transform 0.1s ease-out;
}
.pump-meter span {
  font-size: 26px;
  font-weight: 900;
}


/* =========================================================================
   Full-App RPG Chrome Overhaul (Top Header, Bottom Nav, Hub Screens, Scrollbars)
   ========================================================================= */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #1a1009;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d99b26, #855d37);
  border-radius: 99px;
}

.app-shell {
  background: #1a110b;
  border-left: 2px solid #452c1a;
  border-right: 2px solid #452c1a;
}

/* Top RPG Status Bar */
.top-bar {
  background: linear-gradient(180deg, #2e1b0f 0%, #190e07 100%);
  border-bottom: 3px solid #eab308;
  box-shadow: inset 0 -1px 0 rgba(254, 240, 138, 0.35), 0 4px 12px rgba(0, 0, 0, 0.55);
  color: #fef3c7;
  padding: 7px 10px;
}
.lv-pill {
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  border: 2px solid #fde047;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.hdr-name {
  color: #fef08a;
  text-shadow: 0 1px 3px #000;
}
.exp-bar {
  background: #090d16;
  border: 1.5px solid #785532;
}
.coin-pill {
  background: linear-gradient(180deg, #451a03 0%, #291002 100%);
  border: 2px solid #fbbf24;
  color: #fde047;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6);
}
.tts-hdr-btn {
  background: linear-gradient(180deg, #166534, #14532d);
  border: 2px solid #86efac;
  color: #dcfce7;
}
.tts-hdr-btn.off {
  background: #27272a;
  border-color: #71717a;
  color: #a1a1aa;
}
.icon-btn {
  background: linear-gradient(180deg, #3b2516, #23150c);
  border: 2px solid #a17449;
  color: #fef3c7;
}

/* Bottom RPG Guild Command Footer (#bottomNav) */
.bottom-nav {
  background:
    linear-gradient(180deg, #331e11 0%, #1c1008 55%, #120904 100%);
  border-top: 3px solid #eab308;
  box-shadow:
    inset 0 1px 0 rgba(254, 249, 195, 0.45),
    0 -6px 18px rgba(0, 0, 0, 0.65);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  gap: 7px;
}
.nav-btn {
  position: relative;
  background: linear-gradient(180deg, #2a1a10 0%, #170e08 100%);
  border: 2px solid #6b4c2b;
  border-radius: 13px;
  padding: 5px 3px 4px;
  color: #d6c1a3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 3px 0 #0b0603;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.nav-btn:active {
  transform: translateY(2px);
}
.nav-crest {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(0, 0, 0, 0.38) 100%);
  border: 1.5px solid rgba(217, 155, 38, 0.45);
  margin-bottom: 2px;
}
.nav-svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.65));
}
.nav-lbl {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
.nav-btn.active {
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 55%, #b45309 100%);
  border-color: #fef9c3;
  color: #291103;
  transform: translateY(-2px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.75),
    0 4px 0 #5c2808,
    0 0 14px rgba(250, 204, 21, 0.55);
}
.nav-btn.active .nav-crest {
  background: radial-gradient(circle, #fffbeb 0%, #fde68a 100%);
  border-color: #78350f;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}
.nav-btn.active .nav-lbl {
  color: #291103;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

/* Hub Screen OuterRPG Atmosphere (#screenHome, #screenGacha, #screenOnline) */
#screenHome {
  background:
    linear-gradient(180deg, rgba(24, 17, 12, 0.84) 0%, rgba(18, 13, 10, 0.93) 100%),
    url('../assets/backgrounds/hub_town.jpg') center / cover no-repeat;
}
#screenHome .sec-heading {
  color: #fde047;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
  background: linear-gradient(90deg, rgba(69, 26, 3, 0.88), rgba(28, 16, 8, 0.45));
  border-left: 4px solid #f59e0b;
  padding: 5px 10px;
  border-radius: 0 10px 10px 0;
}
#screenHome .home-hero-card {
  background:
    linear-gradient(96deg, rgba(16, 10, 6, 0.12) 0%, rgba(18, 12, 8, 0.52) 44%, rgba(15, 16, 28, 0.88) 100%),
    url('../assets/backgrounds/hub_town.jpg') center / cover no-repeat;
  border: 2.5px solid #f59e0b;
  box-shadow: inset 0 0 0 2px rgba(24, 14, 7, 0.7), 0 5px 14px rgba(0, 0, 0, 0.55);
}
#screenHome .stat-pill {
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid rgba(251, 191, 36, 0.5);
  color: #e2e8f0;
}
#screenHome .stat-pill strong {
  color: #fde047;
}
#screenHome .home-weapon-card {
  background: linear-gradient(135deg, rgba(24, 16, 36, 0.94), rgba(15, 23, 42, 0.95));
  border: 1.5px solid #d99b26;
}

#screenGacha {
  background:
    linear-gradient(180deg, rgba(22, 11, 36, 0.88) 0%, rgba(12, 8, 22, 0.95) 100%),
    url('../assets/backgrounds/stage_9.jpg') center / cover no-repeat;
}
#screenGacha .gacha-res-title {
  color: #fde047;
  text-shadow: 0 2px 4px #000;
}
#screenGacha .gacha-item-card {
  background: linear-gradient(180deg, #fffdf5 0%, #f3e4c6 100%);
  color: #29180b;
}

#screenOnline {
  background:
    linear-gradient(180deg, rgba(18, 22, 38, 0.86) 0%, rgba(10, 14, 24, 0.94) 100%),
    url('../assets/backgrounds/stage_6.jpg') center / cover no-repeat;
}
#screenOnline .online-card {
  background: linear-gradient(180deg, #fffdf5 0%, #f4e6ca 100%);
  border-color: #d99b26;
}

/* Battle Command Console RPG Frame */
.battle-control-panel {
  background: linear-gradient(180deg, #261810 0%, #140b06 100%);
  border-top: 3px solid #eab308;
  box-shadow: inset 0 1px 0 rgba(254, 240, 138, 0.35);
}
.bt-log-box {
  background: rgba(10, 14, 24, 0.92);
  border: 1.5px solid #785532;
}

/* =========================================================================
   Minigame "READY... -> GO!!" Non-Obstructive Intro Banner
   ========================================================================= */
.mg-ready-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 66px;
  background: rgba(15, 23, 42, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 24;
  border-radius: 0 0 16px 16px;
}
.mg-ready-overlay.unlock {
  pointer-events: none;
  background: rgba(15, 23, 42, 0.08);
}
.mg-ready-pill {
  background: linear-gradient(90deg, #1e293b, #0f172a);
  color: #fde047;
  border: 3px solid #fde047;
  border-radius: 99px;
  padding: 10px 26px;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  animation: slashPop 0.3s ease-out;
}
.mg-ready-pill.go {
  background: linear-gradient(90deg, #ff5400, #ffd500);
  color: #1d2030;
  border-color: #ffffff;
  transform: scale(1.1);
}

/* =========================================================================
   Weapon-Archetype Specific Battle Motions & Projectiles (Shoot / Magic / Smash / Slash)
   ========================================================================= */
.back-weapon-pivot.weapon-aim-recoil {
  animation: weaponAimRecoil 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes weaponAimRecoil {
  0%   { transform: rotate(0deg); }
  22%  { transform: rotate(18deg) scale(1.05); filter: drop-shadow(0 0 8px #00f5d4); }
  42%  { transform: rotate(-16deg) translate(-6px, 3px) scale(1.08); filter: drop-shadow(0 0 14px #fde047); }
  75%  { transform: rotate(8deg); }
  100% { transform: rotate(0deg); }
}
.player-shoot-brace {
  animation: playerShootBrace 0.5s ease;
}
@keyframes playerShootBrace {
  0%, 100% { transform: translate(0, 0); }
  35%      { transform: translate(-9px, 4px); }
  65%      { transform: translate(2px, -1px); }
}

.back-weapon-pivot.weapon-magic-cast {
  animation: weaponMagicCast 0.62s ease-in-out;
}
@keyframes weaponMagicCast {
  0%   { transform: rotate(0deg) scale(1); }
  32%  { transform: rotate(-32deg) translateY(-6px) scale(1.12); filter: drop-shadow(0 0 14px #ff70a6); }
  65%  { transform: rotate(16deg) scale(1.1); filter: drop-shadow(0 0 16px #38bdf8); }
  100% { transform: rotate(0deg) scale(1); }
}
.player-magic-float {
  animation: playerMagicFloat 0.62s ease-in-out;
}
@keyframes playerMagicFloat {
  0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 0 transparent); }
  45%      { transform: translateY(-10px); filter: drop-shadow(0 0 14px #38bdf8); }
}

.back-weapon-pivot.weapon-heavy-smash {
  animation: weaponHeavySmash 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes weaponHeavySmash {
  0%   { transform: rotate(0deg) scale(1); }
  34%  { transform: rotate(-108deg) scale(1.18); filter: drop-shadow(0 0 10px #fde047); }
  62%  { transform: rotate(84deg) scale(1.26); filter: drop-shadow(0 0 16px #ff5400); }
  85%  { transform: rotate(45deg) scale(1.08); }
  100% { transform: rotate(0deg) scale(1); }
}
.player-smash-leap {
  animation: playerSmashLeap 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes playerSmashLeap {
  0%   { transform: translate(0, 0) scale(1); }
  35%  { transform: translate(22px, -46px) scale(1.08); }
  62%  { transform: translate(46px, -22px) scale(1.14); }
  100% { transform: translate(0, 0) scale(1); }
}

/* Ranged Gun/Slingshot Projectiles */
.vfx-ranged-pack, .vfx-magic-pack {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.vfx-muzzle-flash {
  position: absolute;
  bottom: 84px;
  left: 108px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, var(--fx-col, #00f5d4) 55%, transparent 75%);
  animation: slashPop 0.26s ease-out forwards;
}
.vfx-muzzle-flash.warm {
  background: radial-gradient(circle, #ffffff 0%, #fde047 50%, #f97316 75%, transparent 100%);
}
.vfx-laser-beam {
  position: absolute;
  left: 108px;
  bottom: 96px;
  width: 290px;
  height: 16px;
  background: linear-gradient(180deg, transparent 0%, var(--fx-col, #00f5d4) 22%, #ffffff 50%, var(--fx-col, #00f5d4) 78%, transparent 100%);
  transform-origin: left center;
  transform: rotate(-34deg) scaleX(0);
  filter: drop-shadow(0 0 12px var(--fx-col, #00f5d4));
  animation: laserBeamShoot 0.36s ease-out forwards;
}
@keyframes laserBeamShoot {
  0%   { opacity: 1; transform: rotate(-34deg) scaleX(0.1); }
  35%  { opacity: 1; transform: rotate(-34deg) scaleX(1.05) scaleY(1.3); }
  100% { opacity: 0; transform: rotate(-34deg) scaleX(1.1) scaleY(0.1); }
}
.vfx-bullet-pellet {
  position: absolute;
  left: 106px;
  bottom: 94px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #fde047 45%, #f97316 100%);
  box-shadow: -14px 8px 12px #f97316, 0 0 10px #fff;
  animation: projectileToEnemy 0.24s linear forwards;
}
@keyframes projectileToEnemy {
  0%   { opacity: 1; transform: translate(0, 0) scale(0.8); }
  90%  { opacity: 1; transform: translate(185px, -135px) scale(1.25); }
  100% { opacity: 0; transform: translate(200px, -146px) scale(0.5); }
}

/* Magic Wand Orbs & Caster Circle */
.vfx-caster-ring {
  position: absolute;
  left: 18px;
  bottom: 12px;
  width: 132px;
  height: 36px;
  border-radius: 50%;
  border: 2.5px dashed var(--fx-col, #38bdf8);
  box-shadow: 0 0 14px var(--fx-col, #38bdf8);
  animation: slashPop 0.55s ease-out forwards;
}
.vfx-magic-orb {
  position: absolute;
  left: 102px;
  bottom: 96px;
  font-size: 26px;
  filter: drop-shadow(0 0 10px var(--fx-col, #38bdf8));
  animation: projectileToEnemy 0.30s cubic-bezier(0.22, 0.8, 0.36, 1) forwards;
}
.vfx-magic-orb.o2 { bottom: 118px; left: 88px; animation-delay: 0.05s; }
.vfx-magic-orb.o3 { bottom: 78px;  left: 118px; animation-delay: 0.09s; }

/* Enemy Impact Center for Shoot / Magic / Smash */
.vfx-impact-enemy {
  position: absolute;
  top: 48px;
  right: 26px;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vfx-bullseye-pop, .vfx-smash-emblem {
  font-size: 42px;
  animation: slashPop 0.45s ease-out forwards;
}
.vfx-leaf-scatter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  animation: slashPop 0.5s ease-out forwards;
}


/* =========================================================================
   Dynamic Exact-Aimed Laser / Projectiles + Rare Enemy + Wave Checkpoint UI
   ========================================================================= */
@keyframes weaponAimRecoil {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-10deg) scale(1.05); filter: drop-shadow(0 0 8px #00f5d4); }
  42%  { transform: rotate(-24deg) translate(-6px, 4px) scale(1.08); filter: drop-shadow(0 0 14px #fde047); }
  75%  { transform: rotate(-6deg); }
  100% { transform: rotate(0deg); }
}

.vfx-aim-laser-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 14px var(--fx-col, #00f5d4));
  animation: aimLaserPulse 0.38s ease-out forwards;
}
@keyframes aimLaserPulse {
  0%   { opacity: 0.4; }
  25%  { opacity: 1; }
  70%  { opacity: 0.9; }
  100% { opacity: 0; }
}

.vfx-muzzle-flash {
  transform: translate(-50%, -50%);
  bottom: auto;
}
.vfx-bullet-pellet {
  bottom: auto;
  transform: translate(-50%, -50%);
  animation: dynamicPelletToEnemy 0.23s linear forwards;
}
.vfx-magic-orb {
  bottom: auto;
  transform: translate(-50%, -50%);
  animation: dynamicPelletToEnemy 0.30s cubic-bezier(0.22, 0.8, 0.36, 1) forwards;
}
.vfx-caster-ring {
  bottom: auto;
  transform: translate(-50%, -50%);
}
@keyframes dynamicPelletToEnemy {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(0.8); }
  90%  { opacity: 1; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.25); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.4); }
}
.vfx-impact-enemy.dynamic {
  right: auto;
  transform: translate(-50%, -50%);
}

/* Rare Enemy Visuals */
.rare-tag {
  background: linear-gradient(90deg, #ff2a85, #ffd500, #00f5d4);
  color: #1d2030;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 5px;
  margin-right: 4px;
  box-shadow: 0 0 8px #ffd500;
}
.enemy-illust-wrap.rare::before {
  content: '';
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 224, 71, 0.65) 0%, rgba(236, 72, 153, 0.25) 55%, transparent 75%);
  border: 2.5px dashed #fde047;
  z-index: 0;
  animation: spinSlow 5s linear infinite;
}
.enemy-rare-sparkles {
  position: absolute;
  top: -16px;
  font-size: 20px;
  z-index: 4;
  filter: drop-shadow(0 2px 4px #000);
}
.enemy-illust-wrap.rare-gold .rare-img {
  filter: sepia(1) saturate(4.8) hue-rotate(6deg) brightness(1.18) drop-shadow(0 0 12px #fde047);
}
.enemy-illust-wrap.rare-platinum .rare-img {
  filter: grayscale(0.85) brightness(1.36) contrast(1.15) drop-shadow(0 0 12px #38bdf8);
}
.enemy-illust-wrap.rare-rainbow .rare-img {
  filter: hue-rotate(270deg) saturate(2.5) brightness(1.16) drop-shadow(0 0 14px #ec4899);
}
.enemy-illust-wrap.rare-divine .rare-img {
  filter: sepia(0.85) saturate(3.8) hue-rotate(-8deg) brightness(1.22) drop-shadow(0 0 15px #f59e0b);
}

/* Wave Clear Checkpoint & Expedition Loot Bag UI */
.forge-hdr.rare-win {
  background: linear-gradient(90deg, #b45309, #db2777, #4f46e5);
  color: #fff;
}
.wave-loot-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid #d99b26;
  border-radius: 12px;
  padding: 9px 10px;
  margin-bottom: 9px;
}
.wlb-title {
  font-size: 12px;
  font-weight: 900;
  color: #fde047;
  margin-bottom: 5px;
}
.wlb-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}
.wlb-pills span {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(253, 224, 71, 0.45);
  border-radius: 99px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
}
.wlb-drop-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #fffdf5 0%, #f3e4c6 100%);
  color: #29180b;
  border: 2.5px solid #f59e0b;
  border-radius: 12px;
  padding: 7px 9px;
}
.wlb-drop-ic {
  position: relative;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 10px;
  border: 1.5px solid #785532;
  flex-shrink: 0;
}
.wlb-drop-ic .rarity-badge {
  position: absolute;
  top: 2px;
  left: 2px;
}
.wlb-drop-ic .item-icon-img {
  width: 46px;
  height: 46px;
}
.wlb-new-tag {
  font-size: 10px;
  font-weight: 900;
  color: #be123c;
}
.wlb-drop-info strong {
  display: block;
  font-size: 13px;
}
.wlb-drop-info small {
  font-size: 10px;
  color: #5c4028;
  font-weight: 800;
}
.wlb-nodrop {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  padding: 4px 0 2px;
}

.bag-summary-box {
  background: rgba(15, 23, 42, 0.78);
  border: 1.5px solid #64748b;
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.bsb-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.bsb-head strong { color: #fde047; }
.bsb-head small  { color: #cbd5e1; font-size: 10px; }
.bsb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.bsb-item {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #94a3b8;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 800;
}
.bsb-status {
  margin-top: 6px;
  font-size: 11px;
  color: #e2e8f0;
}
.bsb-status b { color: #86efac; }
.bsb-risk-warn {
  margin-top: 5px;
  font-size: 10px;
  font-weight: 900;
  color: #fda4af;
}

.checkpoint-btn-pair {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
}
.btn-cp-return, .btn-cp-advance {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-radius: 12px;
  border: 2.5px solid #fef08a;
  cursor: pointer;
  color: #fff;
}
.btn-cp-return span, .btn-cp-advance span {
  font-size: 13px;
  font-weight: 900;
}
.btn-cp-return small, .btn-cp-advance small {
  font-size: 9.5px;
  font-weight: 800;
  margin-top: 2px;
  opacity: 0.92;
}
.btn-cp-return {
  background: linear-gradient(180deg, #16a34a 0%, #14532d 100%);
  border-color: #86efac;
  box-shadow: 0 3px 0 #052e16;
}
.btn-cp-advance {
  background: linear-gradient(180deg, #ff7b00 0%, #c2410c 100%);
  border-color: #fde047;
  box-shadow: 0 3px 0 #431407;
}
.btn-cp-advance.boss-next {
  background: linear-gradient(180deg, #e11d48 0%, #881337 100%);
}

.res-header.retreat {
  color: #16a34a;
}
.res-lost-box {
  margin: 8px 0 10px;
  background: #fff1f2;
  border: 2px dashed #f43f5e;
  border-radius: 12px;
  padding: 8px;
}
.res-lost-title {
  font-size: 12px;
  font-weight: 900;
  color: #be123c;
  margin-bottom: 6px;
}
.gacha-item-card.lost-card {
  opacity: 0.58;
  filter: grayscale(0.75);
}


/* =========================================================================
   Official Title Screen (#screenTitle) & Fixed Home Character Dock (#screenHome)
   ========================================================================= */
.title-screen.active {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  height: 100%;
  overflow-y: auto;
  padding: 12px 14px 22px;
  background:
    radial-gradient(circle at 50% 24%, rgba(253, 224, 71, 0.24) 0%, rgba(15, 23, 42, 0.62) 52%, rgba(12, 9, 20, 0.92) 100%),
    url('../assets/backgrounds/hub_town.jpg') center / cover no-repeat;
  color: #fff;
}

.title-bg-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 18% 22%, #fef08a 70%, transparent 100%),
    radial-gradient(2.5px 2.5px at 82% 18%, #38bdf8 70%, transparent 100%),
    radial-gradient(2px 2px at 26% 68%, #f472b6 70%, transparent 100%),
    radial-gradient(2.5px 2.5px at 76% 62%, #fde047 70%, transparent 100%),
    radial-gradient(2px 2px at 50% 12%, #ffffff 70%, transparent 100%);
  opacity: 0.85;
}

.title-top-tools {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.title-tool-btn {
  background: rgba(24, 15, 10, 0.84);
  border: 1.5px solid #fbbf24;
  color: #fef08a;
  border-radius: 99px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.title-center-wrap {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 4px 0;
}

.title-logo-hero {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.title-logo-img {
  width: min(96%, 396px);
  max-height: 215px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.72)) drop-shadow(0 0 18px rgba(250, 204, 21, 0.28));
}

.title-hero-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2px 0;
}

.title-pedestal-ring {
  position: absolute;
  bottom: 22px;
  width: 132px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(253, 224, 71, 0.65) 0%, rgba(56, 189, 248, 0.28) 58%, transparent 80%);
  border: 2px solid rgba(254, 240, 138, 0.85);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.55);
  z-index: 1;
}

.title-hero-showcase .chibi-doll {
  position: relative;
  z-index: 2;
  width: 146px;
}

.title-hero-ribbon {
  position: relative;
  z-index: 3;
  margin-top: -4px;
  background: linear-gradient(90deg, #451a03, #78350f, #451a03);
  border: 1.5px solid #fde047;
  color: #fef9c3;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 13px;
  border-radius: 99px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
}

.title-feature-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.title-feature-chips span {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 99px;
}

.title-start-btn {
  width: min(94%, 340px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  margin-top: 4px;
  border-radius: 16px;
  border: 3px solid #fef08a;
  background: linear-gradient(180deg, #ff8800 0%, #e11d48 100%);
  color: #ffffff;
  cursor: pointer;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    0 5px 0 #4c0519,
    0 0 22px rgba(251, 191, 36, 0.65);
  animation: startBtnGlow 1.8s ease-in-out infinite;
}
.title-start-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #4c0519;
}
.tsb-main {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.65);
}
.tsb-sub {
  font-size: 11px;
  font-weight: 800;
  color: #fef9c3;
  margin-top: 2px;
}

@keyframes startBtnGlow {
  0%, 100% { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 5px 0 #4c0519, 0 0 16px rgba(251, 191, 36, 0.5); }
  50%      { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.75), 0 5px 0 #4c0519, 0 0 28px rgba(253, 224, 71, 0.95); }
}

.create-logo-img {
  height: 44px;
  max-width: 210px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.28));
}

/* Fixed Top Character Dock on Home / Quest Screen */
#screenHome .fixed-top-dock.home-dock {
  background: linear-gradient(180deg, #2b190e 0%, #190e07 100%);
  border-bottom: 3px solid #eab308;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
  padding: 8px 10px 7px;
}
#screenHome .home-hero-card {
  padding: 8px;
}
#screenHome .home-avatar-col .chibi-doll {
  width: 116px;
}
.home-sec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
}
#screenHome .home-sec-row .sec-heading {
  margin: 0;
  flex: 1;
  font-size: 13.5px;
  padding: 4px 10px;
}
.title-mini-btn {
  flex-shrink: 0;
  background: linear-gradient(180deg, #451a03 0%, #240e02 100%);
  border: 1.5px solid #fbbf24;
  color: #fde047;
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 0 #0c0602;
}
.title-mini-btn:active {
  transform: translateY(1px);
}
#homeQuestScroll {
  padding: 10px 12px 26px;
}


/* Volume Mixer Modal Styles */
.vol-mixer-box {
  background: rgba(15, 23, 42, 0.78);
  border: 1.5px solid #d99b26;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vol-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.vol-label-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 900;
  color: #fef3c7;
}
.vol-label-line strong {
  color: #fde047;
  font-size: 14px;
}
.vol-slider {
  width: 100%;
  height: 8px;
  accent-color: #f59e0b;
  cursor: pointer;
}
.vol-slider.sfx {
  accent-color: #38bdf8;
}
.vol-test-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 2px solid #86efac;
  background: linear-gradient(180deg, #166534, #14532d);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.vol-test-btn:active {
  transform: translateY(1px);
}


/* =========================================================================
   Family Multi-Slot Save Bar & Age Group / Junior Elementary Handicap UI
   ========================================================================= */
.save-slot-bar {
  width: min(96%, 365px);
  background: rgba(15, 18, 30, 0.84);
  border: 1.5px solid rgba(251, 191, 36, 0.65);
  border-radius: 14px;
  padding: 7px 9px;
}
.ssb-lbl {
  font-size: 10.5px;
  font-weight: 900;
  color: #fde047;
  margin-bottom: 5px;
}
.ssb-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.save-slot-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(30, 41, 59, 0.85);
  border: 1.5px solid #475569;
  border-radius: 10px;
  padding: 5px 8px;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.save-slot-pill.active {
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.92), rgba(69, 26, 3, 0.92));
  border-color: #fde047;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.45);
}
.save-slot-pill.empty {
  border-style: dashed;
}
.ssp-main {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #f8fafc;
  min-width: 0;
}
.ssp-num {
  background: #0f172a;
  color: #fde047;
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}
.ssp-main strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ssp-main small {
  color: #93c5fd;
  font-size: 10px;
}
.ssp-age {
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 99px;
  flex-shrink: 0;
}
.ssp-age.kids {
  background: linear-gradient(90deg, #ff70a6, #fbbf24);
  color: #1d2030;
  font-weight: 900;
}
.ssp-del-btn {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(248, 113, 113, 0.5);
  border-radius: 7px;
  padding: 2px 5px;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Age Selector on #screenCreate */
.age-select-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.age-option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  background: #f8fafc;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.aob-left {
  font-size: 13.5px;
  font-weight: 900;
}
.aob-tag {
  font-size: 10.5px;
  font-weight: 800;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 99px;
}
.age-option-btn.kids-special .aob-tag {
  background: #ffe4e6;
  color: #be123c;
  font-weight: 900;
}
.age-option-btn.selected {
  border-color: var(--ink);
  background: #ffe066;
  box-shadow: 0 3px 0 var(--ink);
}
.age-option-btn.kids-special.selected {
  background: linear-gradient(90deg, #ffe066 0%, #fbcfe8 100%);
}
.age-option-btn.selected .aob-tag {
  background: #1d2030;
  color: #fde047;
}

.kids-handicap-banner {
  margin-top: 8px;
  background: linear-gradient(180deg, #fff0f6 0%, #fff9db 100%);
  border: 2.5px solid #f43f5e;
  border-radius: 13px;
  padding: 9px 11px;
  font-size: 11px;
  font-weight: 800;
  color: #881337;
  line-height: 1.5;
}
.kids-handicap-banner strong {
  display: block;
  font-size: 12.5px;
  color: #e11d48;
  margin-bottom: 3px;
}

.home-kids-pill {
  margin-top: 2px;
  background: linear-gradient(90deg, #f43f5e, #f59e0b);
  color: #fff;
  border: 1.5px solid #fef08a;
  border-radius: 99px;
  font-size: 9.5px;
  font-weight: 900;
  padding: 1px 6px;
  text-align: center;
  white-space: nowrap;
}


/* =========================================================================
   3-Scene x 10-Stage World Map Tabs & Abyss / Cosmos Monster Auras
   ========================================================================= */
.scene-tabs-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 6px;
}
.scene-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 3px;
  border-radius: 10px;
  border: 2px solid #6b4c2b;
  background: linear-gradient(180deg, #2b1a10 0%, #160d07 100%);
  color: #e2d1b8;
  cursor: pointer;
  box-shadow: 0 2px 0 #090502;
}
.stb-top {
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}
.stb-sub {
  font-size: 8.8px;
  font-weight: 800;
  opacity: 0.88;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.scene-tab-btn.active.theme-s1 {
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 100%);
  border-color: #fef9c3;
  color: #291103;
  box-shadow: 0 2px 0 #78350f, 0 0 10px rgba(250, 204, 21, 0.55);
}
.scene-tab-btn.active.theme-s2 {
  background: linear-gradient(180deg, #e879f9 0%, #9333ea 55%, #581c87 100%);
  border-color: #f5d0fe;
  color: #ffffff;
  box-shadow: 0 2px 0 #3b0764, 0 0 12px rgba(217, 70, 239, 0.65);
}
.scene-tab-btn.active.theme-s3 {
  background: linear-gradient(180deg, #67e8f9 0%, #0284c7 55%, #1e3a8a 100%);
  border-color: #fef08a;
  color: #ffffff;
  box-shadow: 0 2px 0 #0f172a, 0 0 14px rgba(56, 189, 248, 0.7);
}
.scene-tab-btn.locked {
  opacity: 0.58;
  border-style: dashed;
  background: #181310;
  color: #94a3b8;
}

.quest-card.scene-card-2 {
  border-color: #c084fc;
}
.quest-card.scene-card-3 {
  border-color: #38bdf8;
}

.res-scene-unlock {
  background: linear-gradient(90deg, #7e22ce, #e11d48, #d97706);
  color: #ffffff;
  border: 2.5px solid #fde047;
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 900;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.65);
}

.enemy-illust-wrap.world-abyss .enemy-img {
  filter: hue-rotate(255deg) saturate(1.38) contrast(1.08) drop-shadow(0 0 12px rgba(192, 38, 211, 0.65));
}
.enemy-illust-wrap.world-cosmos .enemy-img {
  filter: hue-rotate(155deg) saturate(1.35) brightness(1.08) drop-shadow(0 0 14px rgba(56, 189, 248, 0.75));
}
