
.moon      { --p: #e8eef8; --p-light: #ffffff; --p-dark: #7d8aa6; --p-glow: rgba(220, 230, 255, 0.5); }
.lotus     { --p: #ff9ccf; --p-light: #fff0f8; --p-dark: #a8336f; --p-glow: rgba(255, 140, 200, 0.6); }
.storm     { --p: #a77bff; --p-light: #efe4ff; --p-dark: #3f1a99; --p-glow: rgba(160, 110, 255, 0.75); }
.sun       { --p: #ffc93a; --p-light: #fffbe0; --p-dark: #b25a00; --p-glow: rgba(255, 190, 40, 0.85); }
.celestial { --p: #7af2ff; --p-light: #ffffff; --p-dark: #3a2aa8; --p-glow: rgba(140, 240, 255, 0.95); }
.supernova { --p: #f8a5de; --p-light: #fff3b8; --p-dark: #401970; --p-glow: rgba(243, 98, 216, 0.95); }

.pearl {
  position: relative;
  display: inline-block;
  flex: none;
  width: 24px;
  height: 24px;
  background: var(--planet-art) center / contain no-repeat;
  font-size: 24px;
}

.pearl.moon { --planet-art: url("../art/planets/moon.webp"); }
.pearl.lotus { --planet-art: url("../art/planets/lotus.webp"); }
.pearl.storm { --planet-art: url("../art/planets/storm.webp"); }
.pearl.sun { --planet-art: url("../art/planets/sun.webp"); }
.pearl.celestial { --planet-art: url("../art/planets/celestial.webp"); }
.pearl.supernova { --planet-art: url("../art/planets/supernova.webp"); }

.pearl.storm {
  display: inline-block;
  flex: none;
  min-height: 0;
  padding: 0;
  overflow: visible;
}

.pearl-tile.storm {
  flex: initial;
  justify-content: flex-start;
  padding: 8px 2px 6px;
  overflow: visible;
}

.pearl-button {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 44px;
  padding: 0 10px 0 6px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.pearl-button .pearl {
  width: 22px;
  height: 22px;
}

.pearl-count {
  color: var(--text);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.pearl-fever {
  grid-column: 1 / -1;
  width: 100%;
  border: 1px solid var(--gold-deep);
  border-radius: 0;
  background: var(--bg);
  color: var(--neon-cyan);
  font-family: var(--display);
  font-size: 11px;
  line-height: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pearl-fever[hidden] {
  display: none;
}

.pearl-button.landed .pearl {
  animation: pearl-land 450ms ease-out;
}

.pearl-button:active {
  transform: scale(0.95);
}

.league-button.fever {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 20px 14px;
  justify-items: center;
  padding: 2px;
}

.league-button.fever .league-icon { width: 16px; height: 16px; }

.fly-pearl {
  position: fixed;
  z-index: 16;
}

.float-text.pearl-drop {
  font-size: 1.6rem;
  animation-duration: 1400ms;
}

.float-text.pearl-drop.lotus { color: #ffb8de; }
.float-text.pearl-drop.storm { color: #c9a8ff; }
.float-text.pearl-drop.sun { color: var(--gold); }
.float-text.pearl-drop.celestial { color: #b8fbff; font-size: 2rem; }
.float-text.pearl-drop.supernova { color: var(--p-light); font-size: 2rem; }

.planet-tip {
  position: fixed;
  z-index: 20;
  display: none;
  grid-template-columns: minmax(0, 1fr);
  padding: 6px 10px 8px;
  border-radius: 12px;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(190, 120, 255, 0.35), transparent 70%),
    linear-gradient(180deg, rgba(58, 26, 150, 0.96), rgba(22, 10, 70, 0.96));
  border: 2px solid #b48cff;
  box-shadow: 0 0 0 1px #2a0a6a, 0 0 18px rgba(170, 110, 255, 0.75), 0 6px 14px rgba(0, 0, 0, 0.6);
  transform: translateX(-50%);
  pointer-events: none;
}

.planet-tip.show {
  display: grid;
  animation: planet-tip 5200ms ease-out forwards;
}

.planet-tip-page {
  grid-area: 1 / 1;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  transition: opacity 240ms ease;
}

.planet-tip-page.b,
.planet-tip.page-b .planet-tip-page.a {
  opacity: 0;
}

.planet-tip-page.b {
  container-type: inline-size;
}

.planet-tip.page-b .planet-tip-page.b {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .planet-tip.show {
    animation: none;
  }
  .planet-tip-page {
    transition: none;
  }
}

@keyframes planet-tip {
  0% { opacity: 0; transform: translate(-50%, -10px) scale(0.96); }
  5% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  92% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}

.planet-tip-title {
  color: #fff;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow: 0 0 8px #b07aff, 0 2px 0 rgba(0, 0, 0, 0.6);
}

.planet-tip-sub {
  color: #e6dcff;
  font-family: var(--display);
  font-size: 0.7rem;
  text-shadow: 0 1px 0 #000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.planet-tip-row {
  container-type: inline-size;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
  padding: 16px 4px 6px;
  border-radius: var(--radius);
  background: rgba(8, 4, 40, 0.6);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.7);
}

.planet-tip-slot {
  position: relative;
  display: grid;
  place-items: center;
}

.planet-tip-slot + .planet-tip-slot::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  width: 4px;
  height: 6px;
  border-top: 2px solid #7fd0ff;
  border-right: 2px solid #7fd0ff;
  transform: translateY(-50%) rotate(45deg);
  filter: drop-shadow(0 0 2px #7fd0ff);
}

.planet-tip-slot .pearl {
  width: min(38px, 13cqi);
  height: min(38px, 13cqi);
  font-size: min(38px, 13cqi);
}

.planet-tip-slot.off .pearl {
  filter: grayscale(1) brightness(0.4);
  box-shadow: none;
}

.planet-tip-slot.best .pearl {
  animation: pearl-bob 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 5px var(--p-glow));
}

.planet-tip-tag {
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  display: none;
  padding: 1px 6px;
  border-radius: 4px;
  background: linear-gradient(180deg, #ff9a3a, #e2420e);
  box-shadow: 0 0 0 1px #ffe0a0, 0 0 8px rgba(255, 120, 30, 0.8);
  color: #fff;
  font-family: var(--display);
  font-size: 0.7rem;
  text-shadow: 0 1px 0 #000;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(-50%);
}

.planet-tip-slot.best .planet-tip-tag {
  display: block;
}

.planet-tip-slot:first-child .planet-tip-tag { left: 0; transform: none; }
.planet-tip-slot:last-child .planet-tip-tag { left: auto; right: 0; transform: none; }

.planet-tip-meter {
  width: 82%;
  padding: 4px 0 13px;
}

.planet-tip-track {
  position: relative;
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(180, 140, 255, 0.5);
}

.planet-tip-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  min-width: 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7a2a, #ffd23a);
  box-shadow: 0 0 8px rgba(255, 170, 40, 0.8);
}

.planet-tip-mark {
  position: absolute;
  top: 9px;
  color: rgba(230, 220, 255, 0.45);
  font-family: var(--display);
  font-size: 0.6875rem;
  line-height: 1;
  transform: translateX(-50%);
}

.planet-tip-mark.on {
  color: #ffd23a;
  text-shadow: 0 0 4px rgba(255, 160, 40, 0.8);
}

.planet-tip-label {
  color: #e6dcff;
  font-family: var(--display);
  font-size: 0.7rem;
  text-shadow: 0 1px 0 #000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bet-bonus-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: space-around;
  gap: 4px 6px;
  width: 100%;
  margin-top: 2px;
  padding: 5px 4px;
  border-radius: var(--radius);
  background: var(--planet-tip-band);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.7);
}

.bet-bonus {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 0;
}

.bet-bonus-head,
.bet-bonus-foot {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bet-bonus-foot {
  gap: 3px;
}

.bet-bonus-mark {
  flex: none;
  width: 18px;
  height: 18px;
}

.level-star.bet-bonus-mark {
  width: 18px;
  height: 18px;
  margin: 0;
  filter: none;
}

.rush-mark.bet-bonus-mark {
  width: 18px;
  height: 18px;
}

.bet-bonus-glyph {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1;
  background-image: var(--gold-bevel);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 var(--gold-deep)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.7));
}

.bet-bonus-value {
  color: var(--gold-light);
  font-family: var(--display);
  font-size: clamp(11px, 5.4cqi, 0.9rem);
  line-height: 1.15;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 #000;
  white-space: nowrap;
}

.bet-bonus-label {
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.7rem;
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 0 #000;
  white-space: nowrap;
}

.bet-bonus-tag {
  padding: 0 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--hot-tag-top), var(--hot-tag-base));
  box-shadow: 0 0 0 1px var(--hot-tag-rim);
  color: var(--text);
  font-family: var(--display);
  font-size: 0.7rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 #000;
}

.bet-bonus-tag[hidden] {
  display: none;
}

.bet-bonus.off .bet-bonus-mark {
  filter: grayscale(1) brightness(0.45);
}

.bet-bonus.off .bet-bonus-value {
  color: var(--muted);
  filter: grayscale(1);
}

@container (max-width: 270px) {
  .bet-bonus-grid {
    width: calc(100% + 12px);
    margin-inline: -6px;
    padding-inline: 2px;
    column-gap: 4px;
  }
  .bet-bonus-mark,
  .level-star.bet-bonus-mark,
  .rush-mark.bet-bonus-mark {
    width: 16px;
    height: 16px;
  }
  .bet-bonus-glyph {
    font-size: 0.95rem;
  }
  .bet-bonus-label {
    letter-spacing: 0.04em;
  }
  .bet-bonus-tag {
    padding: 0 3px;
  }
}

@container (max-width: 240px) {
  .bet-bonus-grid {
    padding-inline: 0;
    column-gap: 2px;
  }
  .bet-bonus-value {
    letter-spacing: 0;
  }
}


.income-line,
.pearl-odds {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.shop-bonus {
  flex: none;
  margin: 0 0 8px;
  color: var(--gold);
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-align: center;
  text-shadow: 0 1px 0 #000;
}

.shop-bonus::before,
.shop-bonus::after {
  content: "✦";
  margin: 0 8px;
  color: var(--gold-light);
  font-size: 0.8em;
}

.shop-bonus[hidden] {
  display: none;
}

