:root {
  --abyss: #04121f;
  --deep: #0a2440;
  --ice: #d8f4ff;
  --cyan: #4fd8ff;
  --blue: #3b8cff;
  --xp: #ffd166;
  --danger: #ff3b5c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--abyss);
  color: var(--ice);
  font-family: Outfit, system-ui, sans-serif;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

#game {
  display: block;
  width: 100vw;
  height: 100dvh;
  cursor: crosshair;
}

/* ---------- HUD ---------- */

.hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  padding: 16px;
}

.hud.hidden { display: none; }

.surge-indicator {
  position: absolute;
  left: 50%;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: rgba(216, 244, 255, 0.68);
  background: rgba(5, 20, 36, 0.78);
  border: 1px solid rgba(79, 216, 255, 0.28);
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(79, 216, 255, 0.12);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.16s, transform 0.16s;
}

.surge-indicator strong {
  font-family: Bungee, cursive;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.surge-indicator span {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hud.is-boosting .surge-indicator {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hud.is-no-surge .surge-indicator,
.hud.is-no-surge .touch-surge {
  display: none;
}

.dark-field-indicator {
  position: absolute;
  top: 18px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  color: rgba(226, 204, 245, 0.82);
  background: rgba(17, 6, 29, 0.78);
  border: 1px solid rgba(187, 105, 239, 0.38);
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(128, 42, 190, 0.24);
  opacity: 0;
  transform: translate(-50%, -9px);
  transition: opacity 0.2s, transform 0.2s;
}

.dark-field-indicator strong {
  font-family: Bungee, cursive;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #d38cff;
  text-shadow: 0 0 8px rgba(185, 93, 242, 0.72);
}

.dark-field-indicator span {
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hud.has-dark-field .dark-field-indicator {
  opacity: 1;
  transform: translate(-50%, 0);
}

.frost-ability-indicator {
  position: absolute;
  top: 54px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  color: rgba(221, 250, 255, 0.9);
  background: rgba(5, 30, 47, 0.82);
  border: 1px solid rgba(126, 231, 255, 0.48);
  border-radius: 999px;
  box-shadow: 0 0 22px rgba(79, 216, 255, 0.24);
  opacity: 0;
  transform: translate(-50%, -9px);
  transition: opacity 0.2s, transform 0.2s;
}

.frost-ability-indicator strong {
  font-family: Bungee, cursive;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #8cecff;
  text-shadow: 0 0 8px rgba(79, 216, 255, 0.72);
}

.frost-ability-indicator span {
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hud.has-frost-ability .frost-ability-indicator {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hud.has-dark-field::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 7px solid rgba(102, 33, 148, 0.1);
  box-shadow: inset 0 0 70px rgba(54, 8, 83, 0.16);
  pointer-events: none;
}

.coop-stats {
  position: absolute;
  left: 50%;
  top: 58px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.coop-stats.hidden { display: none; }

.coop-stats span {
  padding: 6px 10px;
  border: 1px solid rgba(79, 216, 255, 0.28);
  border-radius: 999px;
  background: rgba(5, 20, 36, 0.78);
  backdrop-filter: blur(6px);
}

.coop-stats span:last-child { border-color: rgba(255, 209, 102, 0.4); }
.coop-stats strong { color: var(--cyan); }
.coop-stats span:last-child strong { color: var(--xp); }
.coop-stats span.is-downed {
  opacity: 0.55;
  border-style: dashed;
  color: rgba(255, 214, 214, 0.78);
}

.coop-revive-hint {
  position: absolute;
  left: 50%;
  top: 96px;
  transform: translateX(-50%);
  padding: 7px 12px;
  border: 1px solid rgba(255, 209, 102, 0.46);
  border-radius: 999px;
  color: var(--xp);
  background: rgba(31, 17, 4, 0.84);
  box-shadow: 0 0 18px rgba(255, 183, 50, 0.16);
  font-size: 11px;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.coop-revive-hint.hidden { display: none; }

.event-timer {
  position: absolute;
  top: 292px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 209, 102, 0.48);
  border-radius: 999px;
  color: var(--xp);
  background: rgba(31, 17, 4, 0.82);
  box-shadow: 0 0 22px rgba(255, 183, 50, 0.16);
}

.event-timer.hidden { display: none; }
.event-timer span { font-family: Bungee, cursive; font-size: 9px; letter-spacing: 0.08em; }
.event-timer strong { color: #fff; font-variant-numeric: tabular-nums; }

.hud.is-xp-rush::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 118%, rgba(255, 186, 64, 0.14), transparent 46%),
    linear-gradient(180deg, rgba(255, 214, 120, 0.06), transparent 22%);
  box-shadow: inset 0 0 110px rgba(72, 28, 6, 0.2);
}

.hud.is-xp-rush .stat,
.hud.is-xp-rush .board {
  border-color: rgba(255, 209, 102, 0.36);
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.14), transparent 48%),
    rgba(28, 16, 6, 0.8);
}

.hud.is-xp-rush .stat::after {
  border-color: rgba(255, 209, 102, 0.16);
}

.hud.is-xp-rush .stat-label,
.hud.is-xp-rush .board-title {
  color: rgba(255, 226, 176, 0.64);
}

.hud.is-xp-rush .board-title {
  border-bottom-color: rgba(255, 209, 102, 0.18);
}

.hud.is-xp-rush .stat-value {
  color: #ffd166;
  text-shadow: 0 0 12px rgba(255, 196, 72, 0.45);
}

.hud.is-xp-rush .event-timer {
  animation: rush-timer 1.35s ease-in-out infinite alternate;
}

.hud.is-xp-rush .minimap {
  border-color: rgba(255, 209, 102, 0.36);
  background: rgba(28, 16, 6, 0.76);
  box-shadow: inset 0 0 22px rgba(40, 18, 4, 0.5), 0 10px 24px rgba(0, 5, 14, 0.28);
}

@keyframes rush-timer {
  from { box-shadow: 0 0 16px rgba(255, 183, 50, 0.16); }
  to { box-shadow: 0 0 28px rgba(255, 209, 102, 0.48); }
}

.mobile-controls { display: none; }

/* Sits below the studio's fixed "All games" exit pill. */
.hud-top-left {
  position: absolute;
  top: 62px;
  left: 16px;
  display: flex;
  gap: 10px;
}

.stat {
  position: relative;
  overflow: hidden;
  min-width: 78px;
  padding: 8px 12px 9px;
  background:
    linear-gradient(135deg, rgba(79, 216, 255, 0.08), transparent 48%),
    rgba(6, 24, 42, 0.78);
  border: 1px solid rgba(79, 216, 255, 0.28);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 8px 22px rgba(0, 5, 14, 0.2);
}

.stat.hidden { display: none; }

.stat::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -17px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(79, 216, 255, 0.1);
  border-radius: 50%;
}

.stat-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(216, 244, 255, 0.55);
  font-weight: 600;
}

.stat-value {
  font-family: Bungee, cursive;
  font-size: 22px;
  line-height: 1.15;
  color: var(--cyan);
}

.stat-money .stat-value { color: var(--xp); }

.stat-note {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  line-height: 1;
  color: rgba(216, 244, 255, 0.48);
  font-variant-numeric: tabular-nums;
}

.board {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 208px;
  padding: 10px 12px 12px;
  background:
    linear-gradient(160deg, rgba(79, 216, 255, 0.08), transparent 42%),
    rgba(6, 24, 42, 0.78);
  border: 1px solid rgba(79, 216, 255, 0.28);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 10px 26px rgba(0, 5, 14, 0.2);
}

.board-title {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(216, 244, 255, 0.55);
  font-weight: 600;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(79, 216, 255, 0.13);
}

.board-list { list-style: none; font-size: 13px; }

.board-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  color: rgba(216, 244, 255, 0.8);
}

.board-list li.me { color: #fff; font-weight: 800; }

.board-list .rank {
  width: 16px;
  font-size: 11px;
  color: rgba(216, 244, 255, 0.4);
}

.board-list .pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.board-list .name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-list .len { font-variant-numeric: tabular-nums; opacity: 0.75; }

.feed {
  position: absolute;
  left: 16px;
  bottom: 16px;
  list-style: none;
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  font-size: 13px;
}

.feed li {
  padding: 4px 10px;
  background: rgba(6, 24, 42, 0.7);
  border-left: 3px solid var(--cyan);
  border-radius: 6px;
  animation: feedIn 0.25s ease-out;
}

.feed li.dead { border-left-color: var(--danger); }

@keyframes feedIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}

@keyframes water-rays {
  from { opacity: 0.55; transform: translateX(-2%); }
  to { opacity: 1; transform: translateX(2%); }
}

@keyframes plankton-drift {
  to { background-position: 30px -90px, -45px -120px, 70px -150px; }
}

@keyframes title-breathe {
  to { text-shadow: 0 0 30px rgba(79, 216, 255, 0.78), 0 0 6px rgba(255, 255, 255, 0.28); }
}

.minimap {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 150px;
  height: 150px;
  background: rgba(6, 24, 42, 0.72);
  border: 1px solid rgba(79, 216, 255, 0.28);
  border-radius: 12px;
  box-shadow: inset 0 0 22px rgba(0, 4, 12, 0.5), 0 10px 24px rgba(0, 5, 14, 0.28);
}

/* ---------- Overlays ---------- */

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(ellipse at 50% 40%, rgba(10, 36, 64, 0.72), rgba(4, 18, 31, 0.94));
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 5;
}

.overlay::before,
.overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.overlay::before {
  background:
    linear-gradient(112deg, transparent 14%, rgba(93, 210, 255, 0.055) 32%, transparent 46%),
    linear-gradient(72deg, transparent 58%, rgba(93, 210, 255, 0.04) 72%, transparent 84%);
  animation: water-rays 9s ease-in-out infinite alternate;
}

.overlay::after {
  background-image:
    radial-gradient(circle at 12% 22%, rgba(185, 242, 255, 0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 76% 64%, rgba(185, 242, 255, 0.18) 0 1px, transparent 2px),
    radial-gradient(circle at 44% 82%, rgba(255, 209, 102, 0.13) 0 1.5px, transparent 3px);
  background-size: 170px 190px, 230px 250px, 310px 280px;
  animation: plankton-drift 18s linear infinite;
}

.overlay.hidden { display: none; }

.card {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 26px 26px 24px;
  text-align: center;
  background:
    radial-gradient(circle at 50% -12%, rgba(79, 216, 255, 0.16), transparent 38%),
    linear-gradient(170deg, rgba(12, 42, 72, 0.97), rgba(5, 20, 36, 0.97));
  border: 1px solid rgba(79, 216, 255, 0.34);
  border-radius: 20px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 42px rgba(27, 136, 183, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  scrollbar-color: rgba(79, 216, 255, 0.4) transparent;
  scrollbar-width: thin;
}

.card::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 24%;
  width: 52%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(166, 235, 255, 0.48), transparent);
}

.kicker {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 600;
  margin-bottom: 8px;
}

h1 {
  font-family: Bungee, cursive;
  font-size: clamp(30px, 8vw, 44px);
  line-height: 1;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 0 22px rgba(79, 216, 255, 0.6);
  margin-bottom: 12px;
  animation: title-breathe 3.8s ease-in-out infinite alternate;
}

h1 .dot { color: var(--cyan); }

h2 {
  font-family: Bungee, cursive;
  font-size: 34px;
  color: var(--danger);
  text-shadow: 0 0 22px rgba(255, 59, 92, 0.45);
  margin-bottom: 10px;
}

.tagline {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(216, 244, 255, 0.82);
  margin-bottom: 16px;
}

.blue { color: var(--blue); }
.xp { color: var(--xp); }

.rules {
  list-style: none;
  text-align: left;
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 14px;
  color: rgba(216, 244, 255, 0.78);
}

.rules li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }

.bullet {
  flex: none;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(79, 216, 255, 0.16);
  border: 1px solid rgba(79, 216, 255, 0.4);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
}

.hint {
  font-size: 13px;
  color: rgba(216, 244, 255, 0.6);
  margin-bottom: 20px;
  line-height: 2;
}

kbd {
  display: inline-block;
  min-width: 24px;
  padding: 2px 7px;
  margin: 0 1px;
  border: 1px solid rgba(79, 216, 255, 0.42);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: rgba(79, 216, 255, 0.1);
  color: var(--ice);
  font-family: Outfit, sans-serif;
  font-size: 12px;
  font-weight: 600;
}

button {
  position: relative;
  overflow: hidden;
  font-family: Bungee, cursive;
  font-size: 18px;
  letter-spacing: 0.05em;
  color: #04121f;
  background: linear-gradient(180deg, #7ee7ff, #2ea8e0);
  border: none;
  border-radius: 999px;
  padding: 13px 34px;
  cursor: pointer;
  box-shadow: 0 6px 0 #14638c, 0 12px 26px rgba(79, 216, 255, 0.3);
  transition: transform 0.1s, box-shadow 0.1s;
}

button::before {
  content: "";
  position: absolute;
  inset: 1px 12% auto;
  height: 42%;
  border-radius: inherit;
  background: linear-gradient(rgba(255, 255, 255, 0.24), transparent);
  pointer-events: none;
}

button:hover { transform: translateY(-1px); }
button:active { transform: translateY(5px); box-shadow: 0 1px 0 #14638c; }
button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.35);
  opacity: 0.55;
  transform: none;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.btn-alt {
  color: var(--ice);
  background: linear-gradient(180deg, #1d4d75, #12324d);
  box-shadow: 0 6px 0 #0a1c2e, 0 12px 26px rgba(0, 0, 0, 0.35);
}

.btn-alt:active { box-shadow: 0 1px 0 #0a1c2e; }

.btn-wheel {
  color: #241303;
  background: linear-gradient(180deg, #ffe59a, #e9a82e);
  box-shadow: 0 6px 0 #8f5510, 0 12px 26px rgba(255, 192, 69, 0.24);
}

.btn-wheel:active { box-shadow: 0 1px 0 #8f5510; }

.btn-reward {
  color: #062217;
  background: linear-gradient(180deg, #a7ffc2, #36c47c);
  box-shadow: 0 6px 0 #16714a, 0 12px 26px rgba(68, 232, 142, 0.2);
}

.btn-reward:active { box-shadow: 0 1px 0 #16714a; }

.btn-coop {
  color: #281600;
  background: linear-gradient(180deg, #ffe787, #eaaa30);
  box-shadow: 0 6px 0 #895312, 0 12px 26px rgba(255, 203, 78, 0.24);
}

.btn-coop:active { box-shadow: 0 1px 0 #895312; }

.btn-events {
  color: #2d0d02;
  background: linear-gradient(180deg, #ffb675, #f06435);
  box-shadow: 0 6px 0 #96351d, 0 12px 26px rgba(255, 104, 53, 0.24);
}

.btn-events:active { box-shadow: 0 1px 0 #96351d; }

.btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Shop ---------- */

.card-shop { width: min(620px, 100%); }
#dragonsScreen .card-shop { width: min(760px, 100%); }
.card-coop-select { width: min(760px, 100%); }

.card-events,
.card-event-result {
  width: min(700px, 100%);
  border-color: rgba(255, 139, 71, 0.48);
  background:
    radial-gradient(circle at 15% 0, rgba(255, 192, 83, 0.18), transparent 34%),
    radial-gradient(circle at 88% 16%, rgba(255, 77, 68, 0.16), transparent 30%),
    linear-gradient(165deg, rgba(20, 48, 74, 0.98), rgba(18, 20, 38, 0.98));
}

.event-banner {
  position: relative;
  margin: -8px -8px 18px;
  padding: 18px 16px 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 184, 89, 0.28);
  border-radius: 16px;
  background:
    repeating-linear-gradient(115deg, transparent 0 24px, rgba(255, 255, 255, 0.025) 25px 27px),
    linear-gradient(135deg, rgba(245, 93, 49, 0.22), rgba(255, 195, 83, 0.08));
}

#eventsScreen.theme-xp-rush .card-events {
  border-color: rgba(255, 209, 102, 0.52);
  background:
    radial-gradient(circle at 18% 0, rgba(255, 214, 110, 0.28), transparent 36%),
    radial-gradient(circle at 88% 18%, rgba(255, 120, 48, 0.16), transparent 32%),
    linear-gradient(165deg, rgba(42, 28, 12, 0.98), rgba(16, 12, 22, 0.98));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(255, 176, 46, 0.12),
    inset 0 1px 0 rgba(255, 236, 180, 0.12);
}

#eventsScreen.theme-xp-rush .event-banner {
  border-color: rgba(255, 214, 120, 0.4);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 214, 110, 0.22), transparent 52%),
    repeating-linear-gradient(115deg, transparent 0 24px, rgba(255, 255, 255, 0.035) 25px 27px),
    linear-gradient(135deg, rgba(92, 38, 12, 0.78), rgba(28, 12, 22, 0.62));
}

#eventsScreen.theme-xp-rush .event-title {
  color: #fff3c2;
  text-shadow: 0 2px 0 rgba(70, 28, 6, 0.35), 0 0 26px rgba(255, 196, 64, 0.72);
}

.event-week {
  position: absolute;
  top: 13px;
  right: 15px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 209, 102, 0.38);
  border-radius: 999px;
  color: var(--xp);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.event-title,
.event-result-title {
  color: #ff8954;
  text-shadow: 0 0 22px rgba(255, 98, 48, 0.46);
}

.event-countdown {
  color: rgba(255, 226, 179, 0.72);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-description { margin-inline: auto; max-width: 590px; }

.event-modifiers {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.event-modifiers span {
  padding: 6px 10px;
  border: 1px solid rgba(255, 152, 86, 0.3);
  border-radius: 999px;
  color: rgba(255, 229, 197, 0.84);
  background: rgba(255, 112, 58, 0.08);
  font-size: 11px;
}

.event-rewards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.event-rewards div {
  padding: 10px 6px;
  border: 1px solid rgba(255, 209, 102, 0.2);
  border-radius: 11px;
  background: rgba(5, 18, 33, 0.52);
}

.event-rewards strong,
.event-rewards span { display: block; }
.event-rewards strong { color: var(--xp); font-family: Bungee, cursive; font-size: 13px; }
.event-rewards span { margin-top: 3px; color: rgba(216, 244, 255, 0.7); font-size: 11px; }

.event-claim {
  min-height: 18px;
  margin-bottom: 10px;
  color: #8ff3b1;
  font-size: 12px;
}

.event-cycle {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 18px;
}

.event-cycle span {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 209, 102, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.event-cycle span.active {
  background: #ff8954;
  border-color: #ffd166;
  box-shadow: 0 0 10px rgba(255, 112, 58, 0.65);
}

.event-result-board {
  max-width: 480px;
  margin: 0 auto 20px;
  list-style: none;
  text-align: left;
}

.event-result-board li {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 209, 102, 0.1);
  color: rgba(216, 244, 255, 0.72);
}

.event-result-board li.me {
  color: #fff;
  background: rgba(255, 126, 65, 0.14);
  border-radius: 7px;
}

.event-result-board .rank { color: var(--xp); font-family: Bungee, cursive; }

.coop-title {
  color: var(--xp);
  text-shadow: 0 0 22px rgba(255, 209, 102, 0.35);
}

.coop-picks {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: -4px 0 16px;
}

.coop-picks span {
  min-width: 150px;
  padding: 7px 12px;
  color: rgba(216, 244, 255, 0.72);
  background: rgba(5, 20, 36, 0.72);
  border: 1px solid rgba(79, 216, 255, 0.2);
  border-radius: 10px;
}

.coop-picks span:last-child { border-color: rgba(255, 209, 102, 0.28); }
.coop-picks b { color: var(--cyan); }
.coop-picks span:last-child b { color: var(--xp); }

.coop-hint {
  margin: -5px 0 14px;
  line-height: 1.5;
}

.coop-hint strong:first-child { color: var(--cyan); }
.coop-hint strong:nth-child(2) { color: var(--xp); }

.coop-dragon-grid .dragon.is-p1-picked {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(79, 216, 255, 0.22);
}

.coop-dragon-grid .dragon.is-p2-picked {
  border-color: var(--xp);
  box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.22);
}

.coop-dragon-grid .dragon.is-p1-picked.is-p2-picked {
  background: linear-gradient(135deg, rgba(79, 216, 255, 0.18), rgba(255, 209, 102, 0.18));
}

/* ---------- Daily wheel ---------- */

.card-wheel { width: min(560px, 100%); }

/* ---------- Daily reward challenge ---------- */

.card-daily-reward { width: min(560px, 100%); }

.daily-reward-title {
  color: #83f5b1;
  text-shadow: 0 0 20px rgba(83, 240, 151, 0.38);
}

.daily-reward-status {
  min-height: 30px;
  margin: 10px 0 2px;
  color: rgba(221, 249, 236, 0.78);
  font-size: 14px;
}

.daily-reward-status strong {
  color: var(--xp);
  font-family: Bungee, cursive;
}

.daily-clam-stage {
  position: relative;
  width: min(350px, 82vw);
  height: 155px;
  margin: 0 auto 8px;
  border-bottom: 2px solid rgba(92, 224, 161, 0.18);
  background: radial-gradient(ellipse at 50% 100%, rgba(44, 184, 128, 0.12), transparent 67%);
}

.reward-clam {
  position: absolute;
  top: 48px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 82px;
  min-width: 0;
  height: 88px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  cursor: default;
  transition: transform 0.36s cubic-bezier(0.2, 0.75, 0.25, 1), filter 0.2s;
  will-change: transform;
}

.daily-clam-stage.is-fast .reward-clam {
  transition-duration: 0.257s;
}

.daily-clam-stage.is-emerald {
  border-bottom-color: rgba(103, 242, 154, 0.28);
  background: radial-gradient(ellipse at 50% 100%, rgba(61, 199, 126, 0.18), transparent 67%);
}

.daily-clam-stage.is-choosing .reward-clam {
  cursor: pointer;
  filter: drop-shadow(0 0 8px rgba(98, 241, 164, 0.34));
}

.daily-clam-stage.is-choosing .reward-clam:hover {
  filter: brightness(1.18) drop-shadow(0 0 12px rgba(98, 241, 164, 0.58));
}

.reward-clam .clam-shell {
  z-index: 2;
  width: 72px;
  height: 52px;
}

.reward-token {
  position: absolute;
  z-index: 4;
  top: -26px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  font-family: Bungee, cursive;
  font-size: 10px;
  color: #4b2d00;
  background: radial-gradient(circle at 34% 28%, #fff6ad, #f2b936 56%, #a76206 76%);
  border: 3px solid #ffe890;
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(255, 213, 77, 0.8);
  opacity: 0;
  transform: translate(-50%, 24px) scale(0.55);
  transition: opacity 0.22s, transform 0.36s cubic-bezier(0.18, 0.8, 0.3, 1.3);
}

.reward-clam.has-prize .reward-token {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.reward-clam.has-prize .clam-shell {
  filter: brightness(1.2) drop-shadow(0 0 12px rgba(255, 215, 76, 0.7));
  transform: perspective(80px) rotateX(-18deg) scale(1.05);
}

.reward-clam.is-wrong { filter: grayscale(0.8) brightness(0.55); }
.reward-clam.is-correct { animation: reward-clam-win 0.7s ease-in-out 2 alternate; }

@keyframes reward-clam-win {
  to { filter: brightness(1.35) drop-shadow(0 0 18px rgba(255, 221, 93, 0.92)); }
}

.wheel-title {
  color: var(--xp);
  text-shadow: 0 0 22px rgba(255, 209, 102, 0.48);
}

.wheel-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 11px;
  margin-bottom: 13px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(216, 244, 255, 0.65);
  background: rgba(3, 16, 29, 0.48);
  border: 1px solid rgba(255, 209, 102, 0.22);
  border-radius: 999px;
}

.wheel-status strong {
  font-family: Bungee, cursive;
  font-size: 17px;
  color: var(--xp);
}

.wheel-wrap {
  position: relative;
  width: min(310px, 72vw);
  aspect-ratio: 1;
  margin: 0 auto 14px;
  filter: drop-shadow(0 18px 24px rgba(0, 4, 12, 0.48));
}

.daily-wheel {
  position: absolute;
  inset: 9px;
  overflow: hidden;
  border: 8px solid #d4edf4;
  border-radius: 50%;
  background: conic-gradient(
    from -20deg,
    #1e8fc0 0 40deg,
    #7046b8 40deg 80deg,
    #d38b23 80deg 120deg,
    #137d74 120deg 160deg,
    #b83b62 160deg 200deg,
    #2660aa 200deg 240deg,
    #8d5bc4 240deg 280deg,
    #d5aa2f 280deg 320deg,
    #20a968 320deg 360deg
  );
  box-shadow:
    0 0 0 5px #183f59,
    0 0 0 8px rgba(112, 224, 255, 0.45),
    0 0 28px rgba(79, 216, 255, 0.32),
    inset 0 0 34px rgba(1, 9, 18, 0.38);
  transition: transform 4.2s cubic-bezier(0.12, 0.67, 0.08, 1);
}

.daily-wheel::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.08);
}

.wheel-label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44%;
  height: 28px;
  margin-top: -14px;
  padding-right: 15px;
  text-align: right;
  font-family: Outfit, sans-serif;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 4, 12, 0.85);
  transform-origin: left center;
}

.wheel-label span { display: block; font-size: 8px; opacity: 0.78; }

.wheel-pointer {
  position: absolute;
  z-index: 4;
  top: -2px;
  left: 50%;
  width: 0;
  height: 0;
  border-right: 16px solid transparent;
  border-left: 16px solid transparent;
  border-top: 35px solid #fff2b6;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
  transform: translateX(-50%);
}

.wheel-hub {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 57px;
  height: 57px;
  font-family: Bungee, cursive;
  font-size: 11px;
  color: #092137;
  background: radial-gradient(circle at 35% 28%, #fff7c7, #6dd7f1 60%, #1e668e);
  border: 5px solid rgba(226, 248, 255, 0.88);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(137, 230, 255, 0.52);
  transform: translate(-50%, -50%);
}

.wheel-reward {
  min-height: 38px;
  margin-bottom: 14px;
  color: rgba(216, 244, 255, 0.72);
  font-size: 14px;
}

.wheel-reward strong {
  color: var(--xp);
  font-family: Bungee, cursive;
  font-size: 15px;
}

.ad-curtain {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(1, 9, 17, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ad-curtain.hidden { display: none; }

.ad-panel {
  width: min(350px, 100%);
  padding: 26px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 209, 102, 0.16), transparent 35%),
    linear-gradient(165deg, #123e5e, #061a2e);
  border: 1px solid rgba(255, 209, 102, 0.38);
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
}

.ad-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(216, 244, 255, 0.48);
}

.ad-creature {
  margin: 10px 0 4px;
  font-size: 54px;
  filter: drop-shadow(0 0 15px rgba(255, 209, 102, 0.38));
  animation: clam-bob 1.2s ease-in-out infinite alternate;
}

.ad-panel h3 {
  font-family: Bungee, cursive;
  color: var(--xp);
  font-size: 20px;
}

.ad-panel > p:not(.ad-label) {
  margin: 8px 0 18px;
  color: rgba(216, 244, 255, 0.72);
  font-size: 13px;
}

.ad-progress {
  height: 5px;
  overflow: hidden;
  background: rgba(1, 10, 18, 0.62);
  border-radius: 999px;
}

.ad-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--xp));
}

.ad-countdown {
  display: block;
  margin: 12px 0 2px;
  font-family: Bungee, cursive;
  font-size: 28px;
  color: var(--cyan);
}

.ad-wait { font-size: 10px; color: rgba(216, 244, 255, 0.48); }

@keyframes clam-bob {
  to { transform: translateY(-6px) rotate(4deg); }
}

.shop-title {
  color: var(--cyan);
  text-shadow: 0 0 22px rgba(79, 216, 255, 0.45);
}

.balance {
  font-size: 14px;
  color: rgba(216, 244, 255, 0.7);
  margin-bottom: 16px;
}

.balance strong {
  font-family: Bungee, cursive;
  font-size: 20px;
  color: var(--xp);
}

.clam-grid,
.dragon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.clam,
.dragon {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 10px;
  font-family: Outfit, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ice);
  background:
    linear-gradient(145deg, rgba(112, 223, 255, 0.08), transparent 45%),
    rgba(79, 216, 255, 0.055);
  border: 1px solid rgba(79, 216, 255, 0.2);
  border-radius: 14px;
  box-shadow: none;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.clam:hover,
.dragon:hover {
  transform: translateY(-2px);
  background: rgba(79, 216, 255, 0.12);
  box-shadow: 0 8px 18px rgba(0, 6, 17, 0.28), inset 0 1px rgba(255, 255, 255, 0.06);
}

.clam:active,
.dragon:active { transform: scale(0.98); box-shadow: none; }

.dragon.is-locked { opacity: 0.5; }
.clam.is-locked { border-color: rgba(79, 216, 255, 0.12); }

.clam-shell {
  position: relative;
  overflow: hidden;
  width: 58px;
  height: 43px;
  border: 2px solid color-mix(in srgb, var(--shell-dark, #4f7590) 72%, #020c16);
  border-radius: 52% 52% 24% 24% / 78% 78% 28% 28%;
  background:
    radial-gradient(ellipse at 31% 18%, rgba(255, 255, 255, 0.62) 0 4%, transparent 16%),
    repeating-conic-gradient(
      from 249deg at 50% 105%,
      transparent 0 7deg,
      rgba(255, 255, 255, 0.2) 8deg 10deg,
      rgba(3, 13, 23, 0.14) 11deg 13deg,
      transparent 14deg 18deg
    ),
    linear-gradient(145deg, var(--shell-light), var(--shell-mid) 48%, var(--shell-dark));
  box-shadow:
    inset 0 -9px 11px rgba(0, 5, 12, 0.38),
    inset 0 2px 4px rgba(255, 255, 255, 0.28),
    0 5px 7px rgba(0, 5, 12, 0.35);
  transform: perspective(80px) rotateX(-7deg);
  transform-origin: 50% 100%;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.clam-shell::before {
  content: "";
  position: absolute;
  inset: 4px 5px 10px;
  border-radius: 55% 55% 18% 18% / 78% 78% 24% 24%;
  border-top: 1px solid rgba(255, 255, 255, 0.38);
  background:
    repeating-radial-gradient(
      ellipse at 50% 120%,
      transparent 0 6px,
      rgba(255, 255, 255, 0.12) 7px 8px,
      transparent 9px 12px
    );
  opacity: 0.9;
}

.clam-shell::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 31px;
  height: 10px;
  border: 1px solid rgba(2, 10, 18, 0.48);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #fffdf1 0 10%, #d7edf0 11% 19%, transparent 21%),
    radial-gradient(ellipse at 50% 30%, #263743, #07121d 70%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.58), 0 -1px rgba(255, 255, 255, 0.16);
  transform: translateX(-50%);
}

.clam:hover .clam-shell { transform: translateY(-2px) perspective(80px) rotateX(-4deg) scale(1.05); }

.clam-basic { --shell-light: #d8e0df; --shell-mid: #8b9f9f; --shell-dark: #465b60; }
.clam-sand { --shell-light: #f1dfb5; --shell-mid: #c8a46a; --shell-dark: #75512e; }
.clam-sea { --shell-light: #b8eee2; --shell-mid: #56aaa6; --shell-dark: #245d69; }
.clam-azure { --shell-light: #c5ebff; --shell-mid: #4a9ee5; --shell-dark: #174c9d; }
.clam-emerald { --shell-light: #c4f8cf; --shell-mid: #3dc77e; --shell-dark: #087044; }
.clam-amethyst { --shell-light: #efcfff; --shell-mid: #a65ddd; --shell-dark: #57228b; }
.clam-ruby { --shell-light: #ffbdc8; --shell-mid: #e54867; --shell-dark: #850522; }
.clam-gold { --shell-light: #fff4b8; --shell-mid: #e5b52f; --shell-dark: #8b5705; }
.clam-pearl {
  --shell-light: #fffdf2;
  --shell-mid: #a9e7e9;
  --shell-dark: #9a75bd;
  background:
    radial-gradient(ellipse at 31% 18%, rgba(255, 255, 255, 0.9) 0 5%, transparent 17%),
    repeating-conic-gradient(from 249deg at 50% 105%, transparent 0 7deg, rgba(255,255,255,.32) 8deg 10deg, transparent 12deg 18deg),
    conic-gradient(from 35deg, #fff6e8, #8edfe7, #d4b3ff, #ffbed8, #fff1a8, #fff6e8);
}

.clam[data-id="azure"] { --clam-aura: #55c9ff; }
.clam[data-id="emerald"] { --clam-aura: #67f29a; }
.clam[data-id="amethyst"] { --clam-aura: #c477ff; }
.clam[data-id="ruby"] { --clam-aura: #ff5575; }
.clam[data-id="gold"] { --clam-aura: #ffd75c; }
.clam[data-id="pearl"] { --clam-aura: #d8faff; }

.clam[data-id="azure"]::after,
.clam[data-id="emerald"]::after,
.clam[data-id="amethyst"]::after,
.clam[data-id="ruby"]::after,
.clam[data-id="gold"]::after,
.clam[data-id="pearl"]::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: -22px;
  left: 50%;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--clam-aura) 32%, transparent), transparent 68%);
  transform: translateX(-50%);
  animation: clam-aura 2.2s ease-in-out infinite alternate;
  pointer-events: none;
}

.clam[data-id="azure"]::before,
.clam[data-id="emerald"]::before,
.clam[data-id="amethyst"]::before,
.clam[data-id="ruby"]::before,
.clam[data-id="gold"]::before,
.clam[data-id="pearl"]::before {
  content: "✦";
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 24%;
  width: 3px;
  height: 3px;
  color: var(--clam-aura);
  font-size: 8px;
  line-height: 1;
  text-shadow:
    42px 8px 0 var(--clam-aura),
    13px 28px 0 color-mix(in srgb, var(--clam-aura) 80%, white),
    52px 34px 0 color-mix(in srgb, var(--clam-aura) 72%, white);
  filter: drop-shadow(0 0 4px var(--clam-aura));
  animation: clam-sparkles 1.55s ease-in-out infinite alternate;
  pointer-events: none;
}

.clam > * { position: relative; z-index: 1; }
.clam > .clam-shell { z-index: 2; }

@keyframes clam-aura {
  to { opacity: 0.62; transform: translateX(-50%) scale(1.14); }
}

@keyframes clam-sparkles {
  0% { opacity: 0.28; transform: translateY(4px) scale(0.72) rotate(-12deg); }
  55% { opacity: 1; }
  100% { opacity: 0.62; transform: translateY(-5px) scale(1.12) rotate(12deg); }
}

.clam-name { font-size: 14px; }

.clam-cards,
.dragon-rarity {
  font-size: 11px;
  line-height: 1.3;
  color: rgba(216, 244, 255, 0.55);
}

.clam-price {
  font-family: Bungee, cursive;
  font-size: 16px;
  color: var(--xp);
}

.clam.is-locked .clam-price { color: rgba(216, 244, 255, 0.45); }

.booster-shop {
  padding-top: 16px;
  margin: 2px 0 18px;
  border-top: 1px solid rgba(79, 216, 255, 0.16);
}

.booster-shop .kicker { margin-bottom: 3px; }

.booster-shop h3 {
  margin-bottom: 12px;
  font-family: Bungee, cursive;
  font-size: 19px;
  color: #9af5ff;
  text-shadow: 0 0 16px rgba(79, 216, 255, 0.35);
}

.booster-grid {
  display: grid;
  gap: 10px;
}

.booster {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px 15px;
  text-align: left;
  font-family: Outfit, sans-serif;
  color: var(--ice);
  background:
    radial-gradient(circle at 8% 50%, rgba(241, 255, 104, 0.13), transparent 27%),
    linear-gradient(135deg, rgba(64, 205, 237, 0.13), rgba(14, 52, 78, 0.72));
  border: 1px solid rgba(139, 235, 255, 0.3);
  border-radius: 14px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.booster:hover {
  transform: translateY(-2px);
  border-color: rgba(202, 249, 255, 0.62);
  box-shadow: 0 9px 20px rgba(0, 7, 18, 0.32), inset 0 1px rgba(255, 255, 255, 0.09);
}

.booster.is-locked {
  opacity: 0.58;
  border-color: rgba(139, 235, 255, 0.14);
}

.booster-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  font-size: 25px;
  color: #efff6f;
  background: radial-gradient(circle, rgba(224, 255, 81, 0.22), rgba(34, 108, 133, 0.24));
  border: 1px solid rgba(223, 255, 91, 0.38);
  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(218, 255, 78, 0.5));
}

.booster-length .booster-icon {
  color: #8fffe0;
  background: radial-gradient(circle, rgba(75, 255, 198, 0.2), rgba(34, 108, 133, 0.24));
  border-color: rgba(92, 255, 204, 0.38);
  filter: drop-shadow(0 0 8px rgba(69, 255, 196, 0.45));
}

.booster-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.booster-copy strong {
  font-family: Bungee, cursive;
  font-size: 13px;
  color: #eaff88;
}

.booster-copy small {
  font-size: 11px;
  color: rgba(216, 244, 255, 0.62);
}

.booster-copy > span {
  font-size: 11px;
  font-weight: 800;
  color: rgba(216, 244, 255, 0.86);
}

.booster-price {
  max-width: 150px;
  text-align: right;
  font-family: Bungee, cursive;
  font-size: 11px;
  line-height: 1.3;
  color: var(--xp);
}

.clam.is-coming-soon {
  opacity: 0.62;
  cursor: not-allowed;
}

.coming-soon {
  padding: 3px 7px;
  font-family: Bungee, cursive;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: #3a2602;
  background: var(--xp);
  border-radius: 999px;
}

.reward {
  padding: 12px 14px;
  margin-bottom: 18px;
  text-align: left;
  font-size: 13px;
  background: rgba(79, 216, 255, 0.08);
  border: 1px solid rgba(79, 216, 255, 0.25);
  border-radius: 14px;
}

.reward-title {
  font-family: Bungee, cursive;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--cyan);
  margin-bottom: 6px;
}

.reward-line { color: rgba(216, 244, 255, 0.8); }
.reward-line em { font-style: normal; color: var(--xp); }

.dragon.is-equipped {
  border-color: var(--cyan);
  background: rgba(79, 216, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(79, 216, 255, 0.13), 0 8px 24px rgba(40, 181, 232, 0.16);
}

.dragon.is-equipped::after {
  content: "◆";
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 8px;
  color: var(--cyan);
  text-shadow: 0 0 7px var(--cyan);
}

.dragon-portrait {
  display: block;
  width: min(104px, 100%);
  height: auto;
  aspect-ratio: 26 / 15;
  border: 1px solid rgba(118, 224, 255, 0.24);
  border-radius: 11px;
  background: #061625;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.06),
    0 5px 12px rgba(0, 5, 13, 0.32);
}

.dragon.is-equipped .dragon-portrait {
  border-color: rgba(126, 234, 255, 0.72);
  box-shadow: 0 0 12px rgba(70, 213, 255, 0.26), inset 0 1px rgba(255, 255, 255, 0.1);
}

.dragon-swatch {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(2, 12, 22, 0.75);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.35);
}

.swatch-mark {
  position: relative;
  z-index: 2;
  color: rgba(245, 253, 255, 0.92);
  font-family: Bungee, cursive;
  font-size: 15px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 6, 14, 0.85), 0 0 7px rgba(255, 255, 255, 0.3);
}

.look-waves { border-radius: 58% 42% 52% 48%; }
.look-kelp { border-radius: 70% 30% 65% 35%; }
.look-kelp .swatch-mark { color: #b9ff9f; transform: rotate(-20deg); }
.look-seadragon {
  border-radius: 42% 58% 38% 62%;
  border-color: #8dffd0;
  box-shadow: 0 0 0 3px rgba(98, 239, 179, 0.14), inset 0 -5px 9px rgba(0, 48, 39, 0.48);
}
.look-seadragon .swatch-mark {
  color: #ffe784;
  font-size: 18px;
  text-shadow: 0 0 7px rgba(255, 224, 87, 0.62);
}
.look-coral { border-radius: 44% 56% 34% 66%; }
.look-coral .swatch-mark { color: #ffd0c7; font-size: 20px; }
.look-tideclaw {
  border-radius: 46% 54% 38% 62%;
  border-color: rgba(155, 239, 255, 0.82);
  box-shadow: 0 0 0 3px rgba(255, 214, 148, 0.16), inset 0 -5px 9px rgba(4, 46, 62, 0.48);
}
.look-tideclaw .swatch-mark { color: #ffe3b0; }
.look-voidwing {
  border-radius: 38% 62% 42% 58%;
  border-color: rgba(186, 96, 255, 0.78);
  box-shadow: 0 0 12px rgba(122, 43, 255, 0.42), inset 0 -5px 9px rgba(8, 1, 18, 0.7);
}
.look-voidwing .swatch-mark {
  color: #d7a8ff;
  letter-spacing: 0.08em;
  font-size: 13px;
}
.look-little { border: 4px double rgba(255, 255, 185, 0.82); transform: scale(0.88); }
.look-little .swatch-mark { color: #fff5a6; font-size: 11px; letter-spacing: 1px; }
.look-drake {
  border-radius: 48% 52% 34% 66%;
  border-color: rgba(190, 239, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(101, 205, 241, 0.13), inset 0 -5px 9px rgba(1, 37, 65, 0.48);
}
.look-drake .swatch-mark { color: #d7f7ff; }
.look-wyrm {
  width: 42px;
  border-radius: 65% 35% 65% 35%;
  border-color: rgba(169, 245, 255, 0.82);
  box-shadow: 0 0 9px rgba(78, 213, 232, 0.35), inset 0 -5px 9px rgba(0, 46, 61, 0.45);
}
.look-wyrm .swatch-mark { color: #cafbff; font-style: italic; }
.look-snappy {
  border-radius: 48% 52% 62% 38%;
  border: 3px ridge #ffe0a0;
  box-shadow: inset -5px -4px 8px rgba(72, 31, 2, 0.42);
}
.look-snappy .swatch-mark { color: #fff0c9; font-size: 20px; }
.look-magma {
  border-color: #ffbf4d;
  box-shadow: 0 0 12px rgba(255, 84, 32, 0.65), inset 0 -5px 9px rgba(69, 4, 0, 0.48);
}
.look-magma .swatch-mark { color: #ffe86a; }
.look-amethyst { border-radius: 9px 50% 9px 50%; }
.look-amethyst .swatch-mark { color: #efc3ff; }
.look-stalker {
  width: 42px;
  border-radius: 58% 42% 58% 42%;
  box-shadow: 0 0 0 2px rgba(81, 255, 218, 0.18), inset 0 -5px 9px rgba(0, 20, 22, 0.55);
}
.look-stalker .swatch-mark { color: #baffd9; }
.look-acid {
  border: 2px dashed #d9ff43;
  box-shadow: 0 0 13px rgba(151, 255, 41, 0.56), inset 0 0 8px rgba(222, 255, 54, 0.35);
}
.look-acid .swatch-mark { color: #efff73; }
.look-plaguewing {
  border-radius: 42% 58% 36% 64%;
  border-color: rgba(198, 214, 72, 0.78);
  box-shadow: 0 0 12px rgba(148, 168, 36, 0.42), inset 0 -5px 9px rgba(28, 32, 6, 0.62);
}
.look-plaguewing .swatch-mark { color: #e4f07a; }
.look-armor { border: 4px ridge #ffe58e; border-radius: 8px; }
.look-armor .swatch-mark { color: #fff2a4; font-size: 12px; }
.look-frost {
  clip-path: polygon(50% 0, 65% 16%, 88% 12%, 84% 36%, 100% 50%, 83% 65%, 88% 90%, 63% 84%, 50% 100%, 35% 83%, 10% 89%, 16% 63%, 0 50%, 17% 35%, 11% 11%, 36% 17%);
  border: 0;
}
.look-frost .swatch-mark { color: #e6fdff; }
.look-wraith .swatch-mark { opacity: 0.72; }
.look-fang .swatch-mark { color: #ffe1d9; }
.look-electro {
  border-color: #f2ff6e;
  box-shadow: 0 0 8px rgba(238, 255, 69, 0.86), 0 0 18px rgba(67, 216, 255, 0.62), inset 0 -4px 8px rgba(25, 58, 38, 0.42);
  animation: electro-spark 0.72s steps(2, end) infinite alternate;
}
.look-electro .swatch-mark { color: #f7ff8a; font-size: 18px; }
.look-shine .swatch-mark { color: #fffbd0; }
.look-diamond .swatch-mark { transform: rotate(-45deg); }
.look-hellfire {
  border-color: #ff9a32;
  box-shadow: 0 0 14px rgba(255, 84, 18, 0.75), 0 0 24px rgba(255, 170, 40, 0.38), inset 0 -5px 9px rgba(80, 12, 0, 0.5);
  animation: hellfire-pulse 1.1s ease-in-out infinite alternate;
}
.look-hellfire .swatch-mark { color: #ffe27a; }
.look-pearl .swatch-mark { color: #fff8eb; }

.dragon-swatch.is-rainbow {
  background: conic-gradient(from 0deg, #ff5f5f, #ffd166, #7dff9b, #4fd8ff, #b98cff, #ff5f5f);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35), inset 0 -4px 8px rgba(0, 0, 0, 0.3);
  animation: rainbow-spin 4s linear infinite;
}

.dragon-swatch.is-pearl {
  background: conic-gradient(from 30deg, #fff9e7, #8fe6ee, #d0aaff, #ffb6d5, #fff0a4, #fff9e7);
  box-shadow: 0 0 14px rgba(213, 247, 255, 0.68), inset 0 -4px 8px rgba(94, 56, 109, 0.22);
  animation: pearl-pulse 2.4s ease-in-out infinite alternate;
}

.dragon-swatch.is-shine {
  background: radial-gradient(circle at 35% 28%, #fffce0 0 12%, #ffe86f 34%, #d88b05 75%);
  box-shadow: 0 0 15px rgba(255, 230, 87, 0.72), inset 0 -4px 8px rgba(93, 49, 0, 0.24);
  animation: shine-pulse 1.35s ease-in-out infinite alternate;
}

.dragon-swatch.is-diamond {
  background: conic-gradient(from 45deg, #f5ffff, #7cdcff, #858cff, #dfb5ff, #f5ffff);
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(130, 220, 255, 0.7), inset 0 0 8px rgba(255, 255, 255, 0.78);
  transform: rotate(45deg) scale(0.78);
}

.dragon-swatch.is-bubble {
  background: radial-gradient(circle at 33% 28%, #efffff 0 9%, #70e7ff 23%, #168abf 66%, #0a426e);
  box-shadow: 0 0 0 4px rgba(108, 220, 255, 0.12), 0 0 14px rgba(78, 213, 255, 0.58);
  animation: bubble-float 1.8s ease-in-out infinite alternate;
}

.dragon-swatch.is-fangtooth {
  background: radial-gradient(circle at 34% 28%, #ffb0a7 0 8%, #c52c42 34%, #4c0718 78%);
  box-shadow: 0 0 8px rgba(255, 61, 83, 0.75), 0 0 18px rgba(196, 20, 48, 0.45);
  animation: fang-aura 1.2s ease-in-out infinite alternate;
}

.dragon-swatch.is-fangtooth::before,
.dragon-swatch.is-wraith::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  pointer-events: none;
}

.dragon-swatch.is-fangtooth::before {
  border: 1px solid rgba(255, 73, 91, 0.4);
  box-shadow: inset 0 0 8px rgba(255, 34, 65, 0.3);
}

.dragon-swatch.is-wraith {
  background: radial-gradient(circle at 36% 28%, #deffff 0 8%, #6f9ca4 34%, #172b35 78%);
  box-shadow: 0 0 9px rgba(150, 240, 255, 0.72), 0 0 20px rgba(104, 176, 196, 0.38);
  animation: wraith-aura 2.2s ease-in-out infinite alternate;
}

.dragon-swatch.is-wraith::before {
  border: 1px solid rgba(169, 242, 255, 0.32);
  box-shadow: 0 0 8px rgba(114, 219, 238, 0.3);
}

@keyframes rainbow-spin {
  to { filter: hue-rotate(360deg); }
}

@keyframes pearl-pulse {
  to { filter: brightness(1.22) saturate(1.18); transform: scale(1.08); }
}

@keyframes shine-pulse {
  to { filter: brightness(1.25); box-shadow: 0 0 22px rgba(255, 237, 130, 0.92); }
}

@keyframes hellfire-pulse {
  to { filter: brightness(1.22); box-shadow: 0 0 22px rgba(255, 92, 18, 0.95), 0 0 34px rgba(255, 176, 40, 0.7); }
}

@keyframes bubble-float {
  to { transform: translateY(-3px); filter: brightness(1.18); }
}

@keyframes fang-aura {
  to { box-shadow: 0 0 13px rgba(255, 77, 94, 0.9), 0 0 25px rgba(202, 19, 50, 0.62); }
}

@keyframes electro-spark {
  to { filter: brightness(1.28); box-shadow: 0 0 14px rgba(246, 255, 91, 0.98), 0 0 26px rgba(66, 220, 255, 0.78); }
}

@keyframes wraith-aura {
  to { filter: brightness(1.18); box-shadow: 0 0 15px rgba(178, 247, 255, 0.86), 0 0 28px rgba(97, 188, 211, 0.52); }
}

.dragon-name { font-size: 14px; }

.r-basic .dragon-rarity { color: #b9cad7; }
.r-uncommon .dragon-rarity { color: #78ef9a; }
.r-rare .dragon-rarity { color: #6fd8ff; }
.r-epic .dragon-rarity { color: #c08bff; }
.r-legendary .dragon-rarity { color: var(--xp); }
.r-basic { border-top-color: rgba(185, 202, 215, 0.38); }
.r-uncommon { border-top-color: rgba(120, 239, 154, 0.45); }
.r-rare { border-top-color: rgba(111, 216, 255, 0.45); }
.r-epic { border-top-color: rgba(192, 139, 255, 0.5); }
.r-legendary { border-top-color: rgba(255, 209, 102, 0.55); }
.r-mythical .dragon-rarity {
  color: #ff92ec;
  text-shadow: 0 0 8px rgba(255, 106, 225, 0.65);
}
.r-mythical { border-top-color: rgba(255, 146, 236, 0.6); }
.r-mystical .dragon-rarity {
  color: #a8dcff;
  text-shadow: 0 0 5px #64caff, 0 0 10px #9b7cff;
}
.r-mystical { border-top-color: rgba(168, 220, 255, 0.68); }
.r-infinite .dragon-rarity {
  color: #d8fbff;
  text-shadow: 0 0 5px #70ecff, 0 0 11px #d58bff;
}
.r-infinite {
  border-top-color: rgba(216, 251, 255, 0.8);
  background:
    linear-gradient(145deg, rgba(218, 177, 255, 0.1), transparent 45%),
    rgba(79, 216, 255, 0.065);
}

.dragon-level {
  font-size: 12px;
  color: rgba(216, 244, 255, 0.8);
}

.progress {
  width: 100%;
  height: 6px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(2, 18, 30, 0.6);
}

.progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--xp));
}

.dragon-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(216, 244, 255, 0.55);
}

.dragon.is-equipped .dragon-tag { color: var(--cyan); }

.end-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.end-stat {
  padding: 10px 6px;
  background: rgba(79, 216, 255, 0.08);
  border: 1px solid rgba(79, 216, 255, 0.2);
  border-radius: 12px;
}

.end-stat span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(216, 244, 255, 0.55);
  margin-bottom: 2px;
}

.end-stat strong {
  font-family: Bungee, cursive;
  font-size: 26px;
  color: var(--cyan);
}

.best-line {
  font-size: 13px;
  color: rgba(216, 244, 255, 0.6);
  margin-bottom: 18px;
}

.best-line strong { color: var(--xp); }

@media (max-width: 720px) {
  .board { width: 150px; font-size: 12px; }
  .minimap { width: 110px; height: 110px; }
  .stat { min-width: 62px; padding: 6px 9px; }
  .stat-value { font-size: 18px; }
}

@media (max-width: 520px) {
  .hud { padding: 10px; }
  .hud-top-left { left: 10px; gap: 6px; }
  .stat { min-width: 58px; padding: 6px 7px; }
  .stat-label { font-size: 8px; letter-spacing: 0.12em; }
  .stat-value { font-size: 16px; }
  .stat-note { font-size: 7px; }
  .board { top: 132px; right: 10px; width: 140px; }
  .feed { left: 10px; bottom: 10px; max-width: 68vw; font-size: 11px; }
  .minimap { right: 10px; bottom: 10px; width: 96px; height: 96px; }
  .surge-indicator { bottom: 12px; }
  .dark-field-indicator {
    top: auto;
    bottom: 56px;
    max-width: calc(100vw - 24px);
  }
  .dark-field-indicator span { display: none; }
  .card { padding: 22px 16px 20px; }
  .clam-grid,
  .dragon-grid { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
  .booster { grid-template-columns: auto minmax(0, 1fr); }
  .booster-price {
    grid-column: 1 / -1;
    max-width: none;
    text-align: center;
  }
  .wheel-wrap { width: min(270px, 76vw); }
  .wheel-label { font-size: 9px; padding-right: 10px; }
  .wheel-label span { font-size: 7px; }
  .ad-panel { padding: 20px 16px; }
  .event-rewards { grid-template-columns: repeat(2, 1fr); }
  .event-week { position: static; display: inline-block; margin-bottom: 8px; }
  .event-title { font-size: 28px; }
  .event-timer { top: 398px; right: 10px; }
}

@media (pointer: coarse) {
  .mobile-controls {
    position: absolute;
    inset: auto 14px 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
  }

  .mobile-player-controls {
    position: relative;
    display: grid;
    grid-template-columns: auto auto;
    align-items: end;
    gap: 9px;
    pointer-events: auto;
  }

  .mobile-player-two { display: none; }
  .hud.is-coop .mobile-player-two { display: grid; }

  .mobile-player-label {
    position: absolute;
    top: -21px;
    left: 40px;
    color: var(--cyan);
    font-family: Bungee, cursive;
    font-size: 11px;
  }

  .mobile-player-two .mobile-player-label {
    right: 40px;
    left: auto;
    color: var(--xp);
  }

  .touch-stick {
    position: relative;
    width: 96px;
    height: 96px;
    border: 2px solid rgba(126, 231, 255, 0.4);
    border-radius: 50%;
    background:
      radial-gradient(circle, rgba(79, 216, 255, 0.13) 0 30%, transparent 31%),
      rgba(4, 18, 31, 0.56);
    box-shadow: inset 0 0 24px rgba(79, 216, 255, 0.08);
    touch-action: none;
  }

  .mobile-player-two .touch-stick { border-color: rgba(255, 209, 102, 0.46); }

  .touch-stick-knob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(158, 239, 255, 0.94), rgba(36, 143, 190, 0.94));
    box-shadow: 0 4px 12px rgba(0, 8, 18, 0.45);
    transform: translate(-50%, -50%);
  }

  .mobile-player-two .touch-stick-knob {
    background: linear-gradient(145deg, #ffe899, #d79727);
  }

  .touch-surge {
    width: 58px;
    height: 58px;
    padding: 0;
    border-radius: 50%;
    font-size: 9px;
    box-shadow: 0 4px 0 #14638c, 0 8px 18px rgba(79, 216, 255, 0.24);
    touch-action: none;
  }

  .mobile-player-two .touch-surge {
    color: #291800;
    background: linear-gradient(180deg, #ffe899, #d79727);
    box-shadow: 0 4px 0 #805019, 0 8px 18px rgba(255, 209, 102, 0.2);
  }

  .touch-frost {
    width: 58px;
    height: 58px;
    padding: 0;
    border-radius: 50%;
    color: #e9fcff;
    font-size: 8px;
    background: linear-gradient(180deg, #49d8ff, #1675ae);
    box-shadow: 0 4px 0 #10537c, 0 8px 18px rgba(79, 216, 255, 0.25);
    touch-action: none;
  }

  .touch-frost.hidden { display: none; }
  .touch-frost:disabled { opacity: 0.42; }

  .surge-indicator { display: none; }
  .feed { bottom: 130px; }
  .minimap { bottom: 130px; }
}

@media (pointer: coarse) and (max-width: 520px) {
  .coop-stats {
    top: 118px;
    left: 10px;
    max-width: 205px;
    flex-wrap: wrap;
    transform: none;
  }
  .coop-revive-hint {
    top: 168px;
    left: 10px;
    max-width: 205px;
    transform: none;
  }
  .mobile-controls { inset-inline: 8px; }
  .mobile-player-controls { gap: 5px; }
  .touch-stick { width: 82px; height: 82px; }
  .touch-surge,
  .touch-frost { width: 50px; height: 50px; font-size: 8px; }
  .mobile-player-label { left: 34px; }
  .mobile-player-two .mobile-player-label { right: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
