:root {
  --ink: #f4f1ff;
  --muted: #9d97b8;
  --line: rgba(255, 255, 255, 0.10);
  --glass: rgba(18, 16, 34, 0.72);
  --glass-2: rgba(30, 26, 54, 0.86);
  --cyan: #46e6ff;
  --violet: #8b5cff;
  --pink: #ff4fb8;
  --gold: #ffd166;
  --green: #5cf2a8;
  --radius: 22px;
}

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

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #070713;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

.bg-layer { position: fixed; inset: 0; z-index: 0; }
.bg-layer canvas { width: 100%; height: 100%; display: block; }
.bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 3, 12, 0.5), transparent 24%, transparent 66%, rgba(4, 3, 12, 0.62));
  pointer-events: none;
}

.app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px calc(env(safe-area-inset-bottom, 0px) + 8px);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 6px 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 15px;
  color: rgba(244, 241, 255, 0.9);
}

.brand-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

.level-chip {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 209, 102, 0.35);
  background: rgba(255, 209, 102, 0.12);
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(70, 230, 255, 0.25), rgba(139, 92, 255, 0.35));
  border: 1px solid rgba(140, 220, 255, 0.35);
  box-shadow: 0 0 18px rgba(70, 230, 255, 0.22);
  font-size: 15px;
}

.balance-box { text-align: center; line-height: 1; }
.balance {
  font-size: clamp(28px, 8vw, 38px);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff, #cdb9ff 70%, #8b5cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: #f4f1ff;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(139, 92, 255, 0.35));
  font-variant-numeric: tabular-nums;
}
.balance-label { margin-top: 4px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.rates {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rates span:first-child { color: #d9f8ff; }
.rates span:last-child { color: #d6c9ff; }

.view { display: none; flex: 1; min-height: 0; }
.view.active { display: flex; }

.clicker {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-bottom: 6px;
}

.orb-stage {
  position: relative;
  width: min(82vw, 360px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.orb-halo {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 255, 0.30), rgba(70, 230, 255, 0.08) 55%, transparent 70%);
  filter: blur(12px);
  animation: breathe 4.5s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.96); opacity: 0.75; }
  50% { transform: scale(1.06); opacity: 1; }
}

#orbCanvas { position: relative; width: 100%; height: 100%; touch-action: manipulation; cursor: pointer; }

.floats { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.float {
  position: absolute;
  transform: translate(-50%, -50%);
  font-weight: 900;
  font-size: 22px;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.85), 0 2px 8px rgba(0, 0, 0, 0.5);
  animation: floatUp 0.9s ease-out forwards;
  font-variant-numeric: tabular-nums;
}
.float.crit { font-size: 30px; color: var(--gold); }
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.7); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -190%) scale(1.05); }
}

.hint {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(230, 225, 255, 0.55);
  text-align: center;
}

.xp-row { width: min(100%, 380px); display: flex; flex-direction: column; gap: 5px; }
.xp-bar { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.xp-bar > div {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--pink));
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.5);
  transition: width 0.3s ease;
}
.xp-text { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); letter-spacing: 0.04em; }

.boost-row { display: flex; align-items: center; gap: 10px; width: min(100%, 380px); }

.boost {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 209, 102, 0.35);
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.18), rgba(255, 79, 184, 0.12));
  color: var(--ink);
  font: inherit;
  text-align: left;
  box-shadow: 0 8px 26px rgba(255, 160, 60, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.boost:active { transform: scale(0.985); }
.boost:disabled { opacity: 0.55; }
.boost-icon { font-size: 22px; filter: drop-shadow(0 0 8px rgba(255, 209, 102, 0.8)); }
.boost-text { display: flex; flex-direction: column; gap: 2px; }
.boost-text b { font-size: 14px; }
.boost-text small { font-size: 11px; color: rgba(255, 240, 200, 0.65); }

.crit-chip {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--glass);
  font-size: 12px;
  color: var(--muted);
  backdrop-filter: blur(14px);
  white-space: nowrap;
}
.crit-chip b { color: var(--pink); }

.panel {
  flex-direction: column;
  gap: 12px;
  padding-top: 6px;
  overflow: hidden;
}

#profilePanel { overflow-y: auto; overscroll-behavior: contain; }

.panel-head { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 4px 0; }
.panel-head h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.panel-balance { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.panel-balance span { color: var(--gold); font-weight: 800; }

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(12, 10, 24, 0.62);
  backdrop-filter: blur(14px);
}
.segmented button {
  border: 0;
  border-radius: 12px;
  padding: 10px 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.segmented button.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(70, 230, 255, 0.22), rgba(139, 92, 255, 0.34));
  box-shadow: inset 0 0 0 1px rgba(140, 220, 255, 0.25);
}

.cards {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 2px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--ink);
  font: inherit;
  text-align: left;
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform 0.12s ease, border-color 0.2s ease;
}
.card:active { transform: scale(0.975); }
.card.equipped { border-color: rgba(92, 242, 168, 0.5); box-shadow: 0 0 0 1px rgba(92, 242, 168, 0.15), 0 10px 26px rgba(30, 120, 90, 0.18); }
.card-art {
  display: grid;
  place-items: center;
  height: 62px;
  border-radius: 13px;
  font-size: 30px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(135deg, var(--c1, #2b2350), var(--c2, #101024));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.35);
}
.card-name { font-size: 13px; font-weight: 800; line-height: 1.2; }
.card-price { font-size: 11px; color: var(--muted); }
.card-price b { color: var(--gold); }
.card .live {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #06121a;
  background: linear-gradient(135deg, #46e6ff, #5cf2a8);
}
.card .owned-mark {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 12px;
}

.up-card {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(14px);
}
.up-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.up-head .lvl { margin-left: auto; font-size: 11px; color: var(--cyan); font-weight: 800; }
.up-desc { font-size: 12px; color: var(--muted); line-height: 1.35; }
.buy-btn {
  align-self: stretch;
  padding: 11px 12px;
  border-radius: 13px;
  border: 1px solid rgba(140, 220, 255, 0.28);
  background: linear-gradient(135deg, rgba(70, 230, 255, 0.16), rgba(139, 92, 255, 0.26));
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}
.buy-btn:active { transform: scale(0.985); }
.buy-btn:disabled { opacity: 0.45; }

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 7px;
  margin-top: 8px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(12, 10, 24, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}
.tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.tabs button span { font-size: 19px; filter: grayscale(0.5); opacity: 0.75; }
.tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(70, 230, 255, 0.16), rgba(139, 92, 255, 0.28));
}
.tabs button.active span { filter: none; opacity: 1; }

.profile-card {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(14px);
  margin-bottom: 10px;
}
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { padding: 12px; border-radius: 15px; background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.06); }
.stat-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.stat-value { font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat-value.cyan { color: var(--cyan); }
.stat-value.violet { color: #c3b0ff; }
.stat-value.gold { color: var(--gold); }
.stat-value.pink { color: var(--pink); }

.progress-wrap { margin-top: 14px; }
.progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.progress { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress > div { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink)); box-shadow: 0 0 14px rgba(139, 92, 255, 0.5); transition: width 0.35s ease; }

.prestige-btn {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 79, 184, 0.35);
  background: linear-gradient(135deg, rgba(255, 79, 184, 0.2), rgba(139, 92, 255, 0.24));
  color: #fff;
  font: inherit;
  font-weight: 800;
}
.prestige-btn:disabled { opacity: 0.45; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  background: rgba(3, 2, 10, 0.62);
  backdrop-filter: blur(8px);
}
.modal.open { display: flex; }
.modal-card {
  position: relative;
  width: min(100%, 420px);
  max-height: 88dvh;
  overflow-y: auto;
  padding: 14px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(28, 24, 50, 0.98), rgba(12, 10, 24, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  animation: sheetUp 0.24s ease-out;
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0.4; } to { transform: translateY(0); opacity: 1; } }

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(10, 8, 20, 0.72);
  color: var(--ink);
  font-size: 15px;
}
.modal-preview { border-radius: 20px; overflow: hidden; background: #05040d; }
.modal-preview canvas { width: 100%; aspect-ratio: 1.25; display: block; }
.modal-info { padding: 14px 4px 10px; }
.modal-info h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.02em; }
.modal-info .tags { display: flex; gap: 6px; margin-bottom: 9px; }
.tag { padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.tag.live { color: #06121a; background: linear-gradient(135deg, #46e6ff, #5cf2a8); }
.tag.owned { color: #06121a; background: linear-gradient(135deg, #5cf2a8, #b8ff8a); }
.tag.price { color: var(--gold); border: 1px solid rgba(255, 209, 102, 0.3); background: rgba(255, 209, 102, 0.08); }
.modal-info p { margin: 0 0 10px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.modal-balance { font-size: 12px; color: var(--muted); }
.modal-balance b { color: var(--gold); }

.primary-btn {
  width: 100%;
  padding: 15px;
  border-radius: 16px;
  border: 1px solid rgba(140, 220, 255, 0.3);
  background: linear-gradient(135deg, #46e6ff, #8b5cff 60%, #ff4fb8);
  color: #08060f;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(139, 92, 255, 0.35);
}
.primary-btn:disabled { opacity: 0.5; box-shadow: none; }

.level-modal .modal-card { text-align: center; }
.level-badge { font-size: 44px; line-height: 1; margin-bottom: 6px; filter: drop-shadow(0 0 16px rgba(255, 209, 102, 0.6)); }
.level-card h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: -0.02em; }
.level-card p { margin: 0 0 12px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.gamble-amount { font-size: 13px; margin-bottom: 14px; color: var(--muted); }
.gamble-amount b { color: var(--gold); font-size: 18px; }
.gamble-buttons { display: flex; flex-direction: column; gap: 8px; }
.gamble-btn {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
}
.gamble-btn.risk {
  border-color: transparent;
  background: linear-gradient(135deg, #ffd166, #ff4fb8);
  color: #170a14;
  box-shadow: 0 10px 26px rgba(255, 79, 184, 0.3);
}
.gamble-btn.safe { background: rgba(255, 255, 255, 0.06); }
.gamble-btn:disabled { opacity: 0.55; }
.gamble-note { min-height: 18px; margin-top: 10px; font-size: 12px; color: var(--cyan); font-weight: 700; }

.boss-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  overflow: hidden;
  background: #050007;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.boss-overlay.open { display: block; }
#bossCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.boss-top {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}
.boss-tag {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 90, 70, 0.4);
  background: rgba(40, 3, 12, 0.72);
  color: #ffb199;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  backdrop-filter: blur(10px);
}
.boss-sound {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(25, 4, 14, 0.72);
  color: #fff;
  font-size: 17px;
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.boss-intro {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px 22px;
  text-align: center;
  background: radial-gradient(circle at 50% 44%, rgba(140, 6, 26, 0.1), rgba(5, 0, 10, 0.74) 72%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.boss-intro.show { opacity: 1; }
.boss-warning {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 190, 80, 0.55);
  background: rgba(255, 170, 40, 0.12);
  color: #ffd166;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  animation: warnPulse 1.1s ease-in-out infinite;
}
@keyframes warnPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 190, 80, 0); }
  50% { transform: scale(1.04); box-shadow: 0 0 26px rgba(255, 160, 50, 0.35); }
}
.boss-intro h2 {
  margin: 4px 0 0;
  font-size: clamp(30px, 10vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: #fff3e8;
  text-shadow: 0 0 30px rgba(255, 45, 45, 0.65), 0 4px 0 rgba(70, 0, 10, 0.85);
}
.boss-intro p {
  max-width: 330px;
  margin: 2px 0 4px;
  color: rgba(255, 220, 210, 0.78);
  font-size: 13px;
  line-height: 1.5;
}
.boss-intro p b { color: #ffd166; }
.boss-count {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin-top: 6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 80, 60, 0.55);
  background: radial-gradient(circle, rgba(255, 70, 40, 0.24), rgba(30, 0, 8, 0.9));
  color: #fff;
  font-size: 62px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(255, 60, 30, 0.9);
  box-shadow: 0 0 50px rgba(255, 40, 20, 0.22), inset 0 0 30px rgba(255, 60, 30, 0.18);
}
.boss-count.pop { animation: bossCountPop 0.9s ease-out; }
@keyframes bossCountPop {
  0% { transform: scale(1.32); opacity: 0.45; }
  35% { transform: scale(0.94); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.boss-count-label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 190, 170, 0.55); }

.boss-hud {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  z-index: 3;
  padding: 12px 14px 11px;
  border-radius: 18px;
  border: 1px solid rgba(255, 90, 70, 0.28);
  background: rgba(20, 2, 10, 0.78);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.boss-hud.show { opacity: 1; }
.boss-hud-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.boss-name { font-size: 10px; font-weight: 900; letter-spacing: 0.12em; color: #ffb199; }
.boss-timer { font-size: 12px; color: rgba(255, 230, 220, 0.7); font-variant-numeric: tabular-nums; }
.boss-timer b { font-size: 20px; color: #fff; }
.boss-hp { height: 14px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.5); }
#bossHpFill {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff2d55, #ff7a1a 60%, #ffd166);
  box-shadow: 0 0 16px rgba(255, 60, 40, 0.7);
  transition: width 0.12s linear;
}
.boss-hud-bottom { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: rgba(255, 220, 210, 0.55); }
.boss-hud-bottom b { color: #fff; font-size: 14px; font-variant-numeric: tabular-nums; }

.boss-result {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px 24px;
  text-align: center;
  background: radial-gradient(circle at 50% 44%, rgba(20, 4, 30, 0.3), rgba(4, 0, 8, 0.86) 75%);
}
.boss-result.show { display: flex; }
.boss-result-badge { font-size: 62px; line-height: 1; filter: drop-shadow(0 0 24px rgba(255, 190, 80, 0.55)); animation: resultPop 0.55s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes resultPop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.boss-result h2 {
  margin: 0;
  font-size: clamp(34px, 12vw, 54px);
  letter-spacing: -0.03em;
  color: #fff6e8;
  text-shadow: 0 0 30px rgba(255, 70, 40, 0.7);
}
.boss-result p {
  max-width: 320px;
  margin: 0 0 10px;
  color: rgba(255, 225, 210, 0.82);
  font-size: 14px;
  line-height: 1.5;
}
.boss-result p b { color: #ffd166; }
.boss-result-btn {
  width: min(100%, 320px);
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 220, 160, 0.45);
  background: linear-gradient(135deg, #ffd166, #ff7a1a 55%, #ff2d55);
  color: #1b0508;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(255, 70, 40, 0.3);
}
.boss-result-btn:disabled { opacity: 0.6; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 92px);
  z-index: 50;
  transform: translate(-50%, 20px);
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(20, 16, 38, 0.94);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
  max-width: 88vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .app { max-width: 560px; margin: 0 auto; }
}
