:root {
  --app-height: 100dvh;
  --bg-0: #0b0711;
  --bg-1: #140b1d;
  --bg-2: #231330;
  --surface: rgba(27, 17, 38, 0.92);
  --surface-strong: rgba(34, 21, 48, 0.97);
  --surface-soft: rgba(20, 12, 29, 0.88);
  --panel-line: rgba(255, 255, 255, 0.08);
  --text: #f4ebff;
  --muted: #c5b7d8;
  --pink: #f77df6;
  --cyan: #33dcff;
  --lime: #c7ff54;
  --gold: #ffcf72;
  --danger: #ef426f;
  --shadow: 0 24px 54px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(circle at 16% 12%, rgba(247, 125, 246, 0.16), transparent 26%),
    radial-gradient(circle at 84% 18%, rgba(51, 220, 255, 0.14), transparent 28%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 52%, var(--bg-2) 100%);
  overflow-x: hidden;
  overflow-y: auto;
}

body.intro-page {
  height: var(--app-height);
  min-height: var(--app-height);
  overflow: hidden;
}

.intro-shell {
  height: var(--app-height);
  min-height: var(--app-height);
  position: relative;
  display: flex;
  justify-content: center;
  padding: 0;
}

.scanline-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 14%),
    repeating-linear-gradient(180deg, rgba(247, 125, 246, 0.045) 0 2px, transparent 2px 6px);
  opacity: 0.8;
}

.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.24;
  animation: drift 13s ease-in-out infinite;
}

.glow-a {
  width: 34vw;
  aspect-ratio: 1;
  top: -10vw;
  left: -9vw;
  background: rgba(247, 125, 246, 0.65);
}

.glow-b {
  width: 28vw;
  aspect-ratio: 1;
  right: -8vw;
  top: 16vh;
  background: rgba(51, 220, 255, 0.5);
  animation-delay: -4s;
}

.glow-c {
  width: 24vw;
  aspect-ratio: 1;
  bottom: -8vw;
  left: 42vw;
  background: rgba(255, 207, 114, 0.36);
  animation-delay: -8s;
}

.intro-card {
  position: relative;
  z-index: 2;
  width: min(980px, 100%);
  height: var(--app-height);
  min-height: var(--app-height);
  border-radius: 0;
  padding: clamp(8px, 1.5vw, 16px) clamp(14px, 2.2vw, 22px) clamp(18px, 2.4vw, 24px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 16%),
    var(--surface);
  border: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  overflow: hidden;
  margin: 0 auto;
}

.intro-card::before,
.intro-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
}

.intro-card::before {
  width: 180px;
  height: 180px;
  top: -52px;
  right: -32px;
  background: rgba(51, 220, 255, 0.09);
}

.intro-card::after {
  width: 190px;
  height: 190px;
  left: -74px;
  bottom: -78px;
  background: rgba(247, 125, 246, 0.12);
}

.intro-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  width: min(100%, 460px);
  min-height: 0;
  height: 100%;
  margin: 0 auto;
}

.eyebrow {
  margin: 0;
  color: var(--cyan);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
}

h1 {
  margin: 8px 0 6px;
  font-size: clamp(3.6rem, 11vw, 6rem);
  line-height: 0.88;
  letter-spacing: -0.06em;
  color: var(--pink);
  text-shadow:
    1px 0 rgba(255, 255, 255, 0.12),
    0 0 18px rgba(247, 125, 246, 0.18);
}

.tagline {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(0.98rem, 2.4vw, 1.18rem);
  line-height: 1.28;
  font-weight: 700;
  color: var(--text);
}

.intro-copy {
  margin-top: clamp(6px, 1.1vh, 10px);
  display: grid;
  gap: 7px;
}

.premise {
  margin: 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.38;
}

.premise strong {
  color: var(--lime);
  font-weight: 800;
}

.premise.emphasis {
  color: var(--text);
  font-size: clamp(0.98rem, 2.4vw, 1.18rem);
  line-height: 1.28;
  font-weight: 700;
}

.intro-actions {
  display: none;
}

.card-action-fan {
  margin-top: clamp(8px, 1.3vh, 14px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.action-card {
  display: flex;
  width: 100%;
  min-height: 108px;
  border-radius: 14px;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 11px 10px;
  text-decoration: none;
  text-align: left;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(96, 68, 119, 0.98), rgba(56, 39, 73, 0.98));
  box-shadow:
    inset 0 0 0 2px rgba(247, 125, 246, 0.45),
    0 18px 28px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}

.action-card:hover,
.action-card:focus-visible {
  filter: brightness(1.04);
}


.action-card:disabled {
  cursor: default;
  opacity: 0.72;
}

.action-card.locked,
.action-card[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.62;
  filter: grayscale(0.5) saturate(0.55);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 10px 18px rgba(0, 0, 0, 0.22);
}

.action-card.locked:hover,
.action-card.locked:focus-visible,
.action-card[aria-disabled="true"]:hover,
.action-card[aria-disabled="true"]:focus-visible {
  filter: grayscale(0.5) saturate(0.55);
}

.action-card.locked .action-card-rank,
.action-card[aria-disabled="true"] .action-card-rank {
  color: rgba(232, 223, 243, 0.72);
}

.action-card.locked .action-card-title,
.action-card[aria-disabled="true"] .action-card-title {
  color: rgba(240, 233, 250, 0.82);
}

.action-card.locked .action-card-sub,
.action-card[aria-disabled="true"] .action-card-sub {
  color: rgba(205, 193, 222, 0.76);
}

.deck-choice-card.unlocked {
  filter: saturate(1);
}

.deck-choice-card.locked,
.deck-choice-card:disabled {
  cursor: not-allowed;
  opacity: 1;
  color: rgba(242, 235, 255, 0.78);
  background: linear-gradient(180deg, rgba(63, 51, 79, 0.96), rgba(34, 26, 46, 0.98));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.06),
    0 12px 22px rgba(0, 0, 0, 0.22);
  filter: grayscale(0.18);
}

.deck-choice-card.locked .deck-choice-label,
.deck-choice-card:disabled .deck-choice-label {
  color: rgba(255, 255, 255, 0.88);
}

.deck-choice-card.locked .deck-choice-desc,
.deck-choice-card:disabled .deck-choice-desc {
  color: rgba(214, 201, 236, 0.84);
}

.deck-choice-card.unlocked .deck-choice-label {
  color: inherit;
}

.action-card-rank,
.action-card-title,
.action-card-sub {
  position: relative;
  z-index: 1;
}

.action-card-rank {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}

.action-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.action-card-sub {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.25;
}

.action-card-play {
  color: #213100;
  background: linear-gradient(180deg, #d8ff75 0%, #b7f13d 100%);
}

.action-card-daily {
  color: #332006;
  background: linear-gradient(180deg, #ffda8e 0%, #ffb34e 100%);
}

.action-card-howto {
  color: #fff4f7;
  background: linear-gradient(180deg, #f14e7a 0%, #ca2552 100%);
}

.action-card-heroes {
  color: #081a24;
  background: linear-gradient(180deg, #8fefff 0%, #53d7f6 100%);
}

.intro-footer-row {
  margin-top: clamp(8px, 1.1vh, 12px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  align-items: end;
}

.intro-name {
  display: grid;
  gap: 6px;
}

.intro-name-card {
  padding: 10px 11px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(32, 20, 44, 0.98), rgba(18, 12, 27, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 16px 24px rgba(0, 0, 0, 0.18);
}

.intro-name label {
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro-name input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(133, 224, 255, 0.14);
  background: rgba(14, 10, 21, 0.92);
  color: var(--text);
  font-family: inherit;
  font-size: 0.96rem;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 0 14px rgba(51, 220, 255, 0.06);
}

.intro-name input::placeholder {
  color: rgba(197, 184, 216, 0.72);
}

.intro-name input:focus {
  outline: none;
  border-color: rgba(199, 255, 84, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(199, 255, 84, 0.18),
    0 0 18px rgba(199, 255, 84, 0.12);
}

.profile-launch {
  min-height: 40px;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(25, 99, 184, 0.98), rgba(13, 64, 129, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(133, 224, 255, 0.24),
    0 14px 22px rgba(0, 0, 0, 0.22);
  color: #e8f8ff;
}

.profile-launch:visited,
.profile-launch:hover,
.profile-launch:active,
.profile-launch:focus-visible {
  color: #e8f8ff;
  text-decoration: none;
}

.profile-launch:hover,
.profile-launch:focus-visible {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.profile-launch-label {
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1;
}

.profile-launch-sub {
  font-size: 0.54rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.howto-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
}

.howto-modal.hidden {
  display: none;
}

.howto-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 10, 0.76);
  backdrop-filter: blur(10px);
}

.howto-dialog {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  border-radius: 18px;
  padding: clamp(16px, 3.2vw, 24px);
  background: linear-gradient(180deg, rgba(47, 31, 61, 0.98), rgba(25, 17, 34, 0.98));
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.42),
    0 0 24px rgba(247, 125, 246, 0.2);
}

.howto-dialog h2 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 800;
}

.howto-block + .howto-block {
  margin-top: 14px;
}

.howto-block h3 {
  margin: 0 0 8px;
  color: var(--pink);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.88rem;
}

.howto-block p,
.howto-block li {
  color: var(--text);
  line-height: 1.45;
}

.howto-block ul {
  margin: 0;
  padding-left: 20px;
}

.howto-close-btn {
  margin-top: 16px;
  min-height: 44px;
  min-width: 120px;
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 800;
  color: #3d1602;
  background: linear-gradient(180deg, #ffd78e 0%, #ffbf4d 100%);
}

@keyframes drift {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -16px, 0);
  }
}

@media (max-width: 860px) {
  .intro-main {
    width: min(100%, 440px);
  }
}

@media (max-width: 620px) {
  .intro-shell {
    padding: 0;
  }

  .intro-card {
    min-height: var(--app-height);
    height: var(--app-height);
    padding: 8px 10px 16px;
  }

  .tagline {
    max-width: none;
    font-size: 0.88rem;
  }

  .intro-name input {
    min-height: 36px;
  }

  .card-action-fan {
    gap: 8px;
  }

  .action-card {
    min-height: 92px;
    padding: 10px 9px 8px;
  }

  .action-card-rank {
    font-size: 1rem;
  }

  .action-card-title {
    font-size: 0.94rem;
  }

  .action-card-sub {
    font-size: 0.5rem;
  }

  .intro-footer-row {
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 8px;
  }

  .profile-launch {
    min-height: 36px;
    padding: 8px 10px;
  }

  .profile-launch-label {
    font-size: 0.88rem;
  }

  .profile-launch-sub {
    font-size: 0.48rem;
  }
}

@media (max-height: 860px) {
  .intro-copy {
    gap: 6px;
  }

  .premise {
    font-size: 0.88rem;
    line-height: 1.32;
  }

  .action-card {
    min-height: 98px;
  }
}

@media (max-height: 760px) {
  .intro-card {
    padding-top: 6px;
    padding-bottom: 10px;
  }

  h1 {
    margin-top: 6px;
    margin-bottom: 4px;
    font-size: clamp(3rem, 10vw, 4.2rem);
  }

  .tagline {
    font-size: clamp(0.84rem, 2.15vw, 1rem);
    line-height: 1.24;
  }

  .intro-copy {
    gap: 5px;
  }

  .premise {
    font-size: 0.8rem;
    line-height: 1.28;
  }

  .premise.emphasis {
    font-size: 0.88rem;
    line-height: 1.32;
  }

  .card-action-fan {
    gap: 7px;
  }

  .action-card {
    min-height: 86px;
    padding: 8px 8px 7px;
  }

  .action-card-title {
    font-size: 1rem;
  }

  .intro-footer-row {
    gap: 7px;
  }

  .intro-name-card {
    padding: 8px 9px;
  }

  .intro-name input {
    min-height: 34px;
  }

  .profile-launch {
    min-height: 34px;
    padding: 8px 10px;
  }
}

@media (max-height: 680px) {
  .eyebrow {
    font-size: 0.66rem;
  }

  h1 {
    font-size: clamp(2.6rem, 9vw, 3.5rem);
  }

  .tagline {
    font-size: 0.78rem;
  }

  .premise {
    font-size: 0.72rem;
    line-height: 1.22;
  }

  .premise.emphasis {
    font-size: 0.72rem;
    line-height: 1.22;
  }

  .action-card {
    min-height: 76px;
    padding: 7px 7px 6px;
  }

  .action-card-title {
    font-size: 0.9rem;
  }

  .action-card-sub {
    font-size: 0.45rem;
  }

  .intro-footer-row {
    grid-template-columns: minmax(0, 1fr) 112px;
    margin-top: 6px;
  }
}


.deck-modal {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  padding: 16px;
}

.deck-modal.hidden {
  display: none;
}

.deck-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 10, 0.76);
  backdrop-filter: blur(10px);
}

.deck-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 520px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(47, 31, 61, 0.98), rgba(25, 17, 34, 0.98));
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.deck-dialog h2 {
  margin: 0 0 10px;
  color: var(--pink);
  font-size: 1.35rem;
  font-weight: 800;
}

.deck-copy {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.deck-choice-grid {
  display: grid;
  gap: 12px;
}

.deck-choice-card {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 16px 14px;
  display: grid;
  gap: 6px;
  text-align: left;
  color: #fff;
  cursor: pointer;
}

.deck-choice-blue {
  background: linear-gradient(180deg, #74e8ff, #35c4f1);
  color: #08202c;
}

.deck-choice-red {
  background: linear-gradient(180deg, #ff8cab, #ef426f);
  color: #fff5f7;
}

.deck-choice-green {
  background: linear-gradient(180deg, #a8f48b, #63c768);
  color: #0d2b16;
}

.level-choice-1 {
  background: linear-gradient(180deg, #74e8ff, #35c4f1);
  color: #08202c;
}

.level-choice-2 {
  background: linear-gradient(180deg, #d8ff75 0%, #b7f13d 100%);
  color: #213100;
}

.level-choice-3 {
  background: linear-gradient(180deg, #ffda8e 0%, #ffb34e 100%);
  color: #332006;
}

.level-choice-4 {
  background: linear-gradient(180deg, #ffb46f 0%, #ff8f3f 100%);
  color: #311903;
}

.deck-choice-label {
  font-size: 1.08rem;
  font-weight: 800;
}

.deck-choice-desc {
  font-size: 0.82rem;
  line-height: 1.35;
}

.deck-close-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-weight: 800;
}
