:root {
  color: #f7f2ff;
  background: #111018;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: geometricPrecision;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: linear-gradient(160deg, rgba(17, 16, 24, 0.98), rgba(33, 23, 39, 0.95));
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 8, 13, 0.58), rgba(8, 8, 13, 0.94));
  content: '';
}

button {
  border: 0;
  color: inherit;
  font: inherit;
}

.phone-shell {
  width: min(100%, 460px);
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 14px) 14px calc(env(safe-area-inset-bottom) + 86px);
  background:
    linear-gradient(180deg, rgba(20, 19, 31, 0.86), rgba(14, 13, 20, 0.98)),
    linear-gradient(90deg, rgba(155, 188, 255, 0.12), rgba(255, 111, 184, 0.1));
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.45);
}

.topbar,
.footer-actions,
.control-strip,
.ultimates,
.hero-switch,
.skill-top {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 12px;
}

.eyebrow,
.notice,
.enemy-core small,
.enemy-core em,
.fighter-meta,
.selected-panel span,
.skill-card small,
.battle-log,
.roster-copy span,
.summon-panel span,
.summon-panel p,
.cutin span {
  color: rgba(247, 242, 255, 0.72);
}

.eyebrow {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
}

.icon-button,
.primary,
.secondary,
.hero-chip,
.fighter,
.ultimate,
.skill-card {
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
}

.icon-button {
  min-width: 56px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.notice {
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.battlefield {
  position: relative;
  overflow: hidden;
  min-height: 318px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(39, 34, 55, 0.72), rgba(13, 12, 20, 0.94));
}

.battlefield::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 18, 0.35), rgba(10, 10, 18, 0.9));
  content: '';
}

.enemy-zone,
.team-zone {
  position: relative;
  z-index: 1;
}

.enemy-zone {
  display: grid;
  min-height: 142px;
  place-items: center;
  padding: 18px 12px 8px;
}

.enemy-zone.hit {
  animation: enemy-hit 280ms ease;
}

.enemy-core {
  position: relative;
  width: min(86%, 310px);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(14, 13, 22, 0.76);
  text-align: center;
}

.enemy-core strong {
  display: block;
  font-size: 20px;
}

.enemy-core small,
.enemy-core em {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-style: normal;
}

.enemy-aura {
  position: absolute;
  inset: -22px 34px auto;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(155, 188, 255, 0.1), rgba(255, 94, 108, 0.38), rgba(113, 232, 189, 0.12));
  filter: blur(10px);
}

.bar {
  display: block;
  overflow: hidden;
  height: 7px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #71e8bd, #ffe08a, #ff6fb8);
}

.team-zone {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 0 10px 12px;
}

.fighter {
  position: relative;
  overflow: hidden;
  min-height: 142px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
}

.fighter.selected {
  border-color: var(--hero-color);
  box-shadow: 0 0 18px color-mix(in srgb, var(--hero-color), transparent 55%);
}

.fighter.pulse {
  animation: team-pulse 320ms ease;
}

.portrait {
  display: block;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-focus, center);
  user-select: none;
}

.fighter-art {
  height: 82px;
  margin-bottom: 7px;
  border-radius: 8px;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.32);
}

.fighter-name {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fighter-meta {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.25;
}

.selected-panel {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--hero-color), transparent 45%);
  border-radius: 8px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--hero-color), transparent 84%), rgba(255, 255, 255, 0.07));
}

.featured {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
}

.selected-panel strong,
.summon-panel strong,
.roster-copy strong {
  display: block;
  font-size: 21px;
}

.selected-panel p,
.summon-panel p,
.roster-copy p {
  margin: 6px 0 0;
  line-height: 1.45;
}

.control-strip {
  gap: 9px;
  margin-top: 12px;
}

.energy {
  width: 74px;
  padding: 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.11);
  text-align: center;
}

.energy span {
  display: block;
  color: rgba(247, 242, 255, 0.68);
  font-size: 11px;
}

.energy strong {
  display: block;
  font-size: 20px;
}

.hero-switch {
  flex: 1;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.hero-switch::-webkit-scrollbar {
  display: none;
}

.hero-chip {
  display: grid;
  grid-template-columns: 28px auto;
  grid-template-rows: 1fr 1fr;
  gap: 0 6px;
  align-items: center;
  min-width: 86px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-chip.active {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
}

.hero-chip span,
.hero-chip b {
  font-size: 11px;
}

.tiny {
  grid-row: 1 / 3;
  width: 28px;
  height: 34px;
  border-radius: 6px;
}

.ultimates {
  gap: 7px;
  margin-top: 10px;
}

.ultimate {
  flex: 1;
  min-height: 43px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.ultimate span,
.ultimate b {
  display: block;
  font-size: 11px;
}

.ultimate.ready {
  border-color: rgba(255, 224, 138, 0.72);
  background: linear-gradient(180deg, rgba(255, 224, 138, 0.2), rgba(255, 111, 184, 0.16));
}

.ultimate:disabled,
.skill-card.disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.hand {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.skill-card {
  min-height: 118px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--hero-color), transparent 50%);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--hero-color), transparent 82%), rgba(255, 255, 255, 0.08)),
    rgba(16, 15, 24, 0.88);
  text-align: left;
}

.skill-card:active,
.primary:active,
.secondary:active,
.icon-button:active,
.hero-chip:active,
.fighter:active,
.ultimate.ready:active {
  transform: translateY(1px) scale(0.99);
}

.skill-top {
  justify-content: space-between;
  margin-bottom: 10px;
}

.skill-top b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--hero-color);
  color: #111018;
}

.skill-top span {
  color: rgba(247, 242, 255, 0.7);
  font-size: 12px;
}

.skill-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 17px;
}

.skill-card small {
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.footer-actions {
  gap: 8px;
  margin-top: 12px;
  position: fixed;
  right: max(14px, calc((100vw - 460px) / 2 + 14px));
  bottom: calc(env(safe-area-inset-bottom) + 14px);
  left: max(14px, calc((100vw - 460px) / 2 + 14px));
  z-index: 3;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(18, 16, 26, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
}

.primary,
.secondary {
  min-height: 46px;
  border-radius: 8px;
  font-weight: 900;
}

.primary {
  flex: 1.4;
  background: linear-gradient(90deg, #ffe08a, #ff8ebd);
  color: #171019;
}

.secondary {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
}

.battle-log {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}

.battle-log li {
  overflow: hidden;
  padding: 4px 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-panel {
  position: fixed;
  right: max(14px, calc((100vw - 460px) / 2 + 14px));
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  left: max(14px, calc((100vw - 460px) / 2 + 14px));
  z-index: 4;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(18, 16, 26, 0.96);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.result-panel strong,
.result-panel span {
  display: block;
}

.result-panel strong {
  font-size: 22px;
}

.result-panel span {
  margin: 8px 0 12px;
  color: rgba(247, 242, 255, 0.75);
}

.cutin {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--hero-color), transparent 36%), rgba(11, 10, 18, 0.94)),
    rgba(11, 10, 18, 0.92);
  animation: cutin-bg 1250ms ease forwards;
}

.cutin-art {
  width: min(82vw, 360px);
  height: min(82vw, 360px);
  border-radius: 8px;
  box-shadow: 0 24px 90px color-mix(in srgb, var(--hero-color), transparent 58%);
  animation: cutin-art 1250ms ease forwards;
}

.cutin div {
  position: absolute;
  right: max(24px, calc((100vw - 460px) / 2 + 24px));
  bottom: 18vh;
  left: max(24px, calc((100vw - 460px) / 2 + 24px));
}

.cutin strong {
  display: block;
  font-size: 42px;
  line-height: 0.95;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
}

.summon-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(255, 224, 138, 0.16), rgba(255, 111, 184, 0.14)),
    rgba(255, 255, 255, 0.08);
}

.summon-panel .primary {
  width: 100%;
  margin-top: 12px;
}

.roster-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.roster-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  min-height: 158px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--hero-color), transparent 50%);
  border-radius: 8px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--hero-color), transparent 84%), rgba(255, 255, 255, 0.07));
}

.roster-art {
  width: 118px;
  min-height: 138px;
  border-radius: 8px;
}

.roster-copy {
  min-width: 0;
}

.roster-copy p {
  color: rgba(247, 242, 255, 0.76);
  font-size: 13px;
}

.roster-copy .secondary {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
}

@keyframes enemy-hit {
  0%,
  100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-5px);
  }
  60% {
    transform: translateX(5px);
  }
}

@keyframes team-pulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes cutin-bg {
  0% {
    opacity: 0;
  }
  14%,
  84% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes cutin-art {
  0% {
    transform: translateX(90px) scale(0.88);
    opacity: 0;
  }
  18%,
  78% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(-70px) scale(1.08);
    opacity: 0;
  }
}

@media (min-width: 760px) {
  body {
    background-size: 780px auto;
  }

  .phone-shell {
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }
}

@media (max-width: 370px) {
  .phone-shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  h1 {
    font-size: 24px;
  }

  .team-zone {
    gap: 5px;
  }

  .fighter {
    min-height: 132px;
    padding: 5px;
  }

  .fighter-art {
    height: 72px;
  }

  .hand {
    gap: 6px;
  }

  .skill-card {
    min-height: 124px;
    padding: 8px;
  }

  .roster-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .roster-art {
    width: 96px;
  }
}

.phone-shell.is-lobby,
.phone-shell.is-summon,
.phone-shell.is-closet {
  position: relative;
  overflow: hidden;
  width: min(100%, 460px);
  height: 100svh;
  min-height: 100svh;
  padding: 0;
  background: #07080d;
}

.lobby-screen {
  position: relative;
  overflow: hidden;
  height: 100svh;
  min-height: 100svh;
  isolation: isolate;
  background: #07080d;
  touch-action: manipulation;
}

.lobby-bg,
.feature-bg {
  position: absolute;
  inset: -8%;
  z-index: -3;
  background-image:
    linear-gradient(180deg, rgba(6, 7, 12, 0.08), rgba(6, 7, 12, 0.6) 58%, rgba(6, 7, 12, 0.96)),
    var(--lobby-image);
  background-repeat: no-repeat;
  background-position: center 22%;
  background-size: cover;
  filter: blur(14px) saturate(0.9);
  transform: scale(1.08);
  opacity: 0.72;
}

.lobby-screen::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 56% 30%, color-mix(in srgb, var(--hero-color), transparent 52%), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.62), transparent 31%, transparent 72%, rgba(0, 0, 0, 0.5)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 42%, #07080d 92%);
  content: '';
}

.lobby-screen::after {
  position: absolute;
  right: 0;
  bottom: 118px;
  left: 0;
  z-index: -1;
  height: 34%;
  background:
    linear-gradient(180deg, transparent, rgba(7, 8, 13, 0.88)),
    radial-gradient(ellipse at center, color-mix(in srgb, var(--hero-color), transparent 40%), transparent 62%);
  content: '';
}

.puppet-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.puppet-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
}

.puppet-aura {
  position: absolute;
  right: -18%;
  bottom: 24%;
  z-index: 1;
  width: 72%;
  height: 42%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, color-mix(in srgb, var(--hero-color), white 14%), transparent 66%),
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.18), transparent 48%);
  filter: blur(26px);
  opacity: 0.46;
  animation: puppet-aura 4.8s ease-in-out infinite;
}

.puppet-floor {
  position: absolute;
  right: -20%;
  bottom: 0;
  left: -20%;
  z-index: 3;
  height: 46%;
  background:
    linear-gradient(180deg, transparent 0%, rgba(7, 8, 13, 0.18) 24%, rgba(7, 8, 13, 0.86) 72%, #07080d 100%),
    radial-gradient(ellipse at center, color-mix(in srgb, var(--hero-color), transparent 42%), transparent 68%);
  opacity: 0.94;
}

.lobby-touch {
  position: absolute;
  inset: 96px 60px 130px 12px;
  z-index: 3;
  border: 0;
  background: transparent;
}

.lobby-touch:active ~ .lobby-nameplate {
  transform: translateY(-2px);
}

.lobby-top {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 14px);
  right: 14px;
  left: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.player-badge,
.wallet {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(5, 6, 11, 0.46);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.player-badge {
  min-width: 136px;
  padding: 9px 13px;
  border-radius: 999px;
}

.player-badge span,
.wallet span,
.lobby-nameplate span,
.lobby-action small {
  display: block;
  color: rgba(247, 242, 255, 0.66);
  font-size: 11px;
  font-weight: 800;
}

.player-badge strong {
  display: block;
  font-size: 16px;
  line-height: 1.1;
}

.wallet {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 999px;
}

.wallet b {
  font-size: 16px;
}

.lobby-nameplate {
  position: absolute;
  right: 18px;
  bottom: 178px;
  left: 18px;
  z-index: 4;
  max-width: 330px;
  padding-left: 12px;
  border-left: 3px solid var(--hero-color);
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.72);
  transition: transform 180ms ease;
}

.lobby-nameplate strong {
  display: block;
  margin-top: 2px;
  font-size: 42px;
  line-height: 0.92;
}

.lobby-nameplate p {
  max-width: 280px;
  margin: 8px 0 0;
  color: rgba(247, 242, 255, 0.88);
  font-size: 14px;
  line-height: 1.45;
  animation: dialogue-pop 220ms ease;
}

.lobby-switcher {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 72px);
  right: 12px;
  z-index: 5;
  display: grid;
  gap: 9px;
}

.lobby-avatar {
  width: 52px;
  height: 58px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(6, 7, 12, 0.5);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
}

.lobby-avatar .tiny {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.lobby-avatar.active {
  border-color: var(--hero-color);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--hero-color), transparent 32%),
    0 0 22px color-mix(in srgb, var(--hero-color), transparent 52%);
}

.lobby-actions {
  position: absolute;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  left: 12px;
  z-index: 5;
  display: grid;
  grid-template-columns: 1.55fr 1fr 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}

.lobby-action {
  min-height: 62px;
  padding: 9px 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(13, 14, 22, 0.68);
  text-align: left;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.lobby-action span {
  display: block;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.primary-action {
  min-height: 74px;
  border-color: color-mix(in srgb, var(--hero-color), white 8%);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--hero-color), transparent 16%), rgba(255, 224, 138, 0.74)),
    rgba(255, 255, 255, 0.1);
  color: #101018;
}

.primary-action small {
  color: rgba(16, 16, 24, 0.68);
}

.primary-action span {
  font-size: 26px;
}

.feature-screen {
  position: relative;
  overflow: hidden;
  height: 100svh;
  padding: calc(env(safe-area-inset-top) + 18px) 18px calc(env(safe-area-inset-bottom) + 18px);
  background: #07080d;
}

.feature-bg {
  filter: blur(10px) saturate(0.95);
  opacity: 0.82;
}

.feature-screen::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 8, 13, 0.12), rgba(7, 8, 13, 0.92) 70%);
  content: '';
}

.feature-back {
  position: relative;
  z-index: 2;
  min-width: 58px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(5, 6, 11, 0.52);
  font-weight: 900;
}

.feature-copy {
  position: absolute;
  right: 18px;
  bottom: calc(env(safe-area-inset-bottom) + 30px);
  left: 18px;
  z-index: 2;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(7, 8, 13, 0.66);
  backdrop-filter: blur(16px);
}

.feature-copy span {
  color: var(--hero-color);
  font-size: 12px;
  font-weight: 900;
}

.feature-copy strong {
  display: block;
  margin-top: 3px;
  font-size: 34px;
  line-height: 1;
}

.feature-copy p {
  margin: 10px 0 16px;
  color: rgba(247, 242, 255, 0.78);
  line-height: 1.55;
}

.feature-cta {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  background: linear-gradient(90deg, #ffe08a, #ff8ebd);
  color: #141018;
  font-weight: 950;
}

@keyframes puppet-aura {
  0%,
  100% {
    opacity: 0.24;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.42;
    transform: scale(1.04);
  }
}

@keyframes dialogue-pop {
  0% {
    transform: translateY(4px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-height: 760px) {
  .lobby-nameplate {
    bottom: 154px;
  }

  .lobby-actions {
    gap: 6px;
  }

  .lobby-action {
    min-height: 58px;
  }
}

.phone-shell.is-battle {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  padding: 0 0 calc(env(safe-area-inset-bottom) + 284px);
  background:
    linear-gradient(180deg, rgba(9, 10, 17, 0.3), #080910 74%),
    #080910;
}

.combat-screen {
  position: relative;
  overflow: hidden;
  min-height: calc(100svh - 284px);
  padding: calc(env(safe-area-inset-top) + 12px) 14px 92px;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(21, 24, 38, 0.34), rgba(8, 9, 16, 0.94)),
    radial-gradient(circle at 50% 34%, color-mix(in srgb, var(--hero-color), transparent 58%), transparent 39%),
    linear-gradient(135deg, #151624, #080910 68%);
}

.combat-screen::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 20%, rgba(0, 0, 0, 0.6) 82%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 48px);
  content: '';
}

.combat-screen::after {
  position: absolute;
  right: -16%;
  bottom: 10%;
  left: -16%;
  z-index: -1;
  height: 40%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--hero-color), transparent 38%), transparent 66%);
  filter: blur(26px);
  opacity: 0.8;
  content: '';
}

.game-hud {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stage-chip {
  min-width: 130px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(10, 10, 18, 0.58);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.05);
}

.stage-chip span,
.enemy-hud small,
.enemy-hud em,
.nameplate span {
  display: block;
  color: rgba(247, 242, 255, 0.68);
  font-size: 11px;
  font-weight: 800;
}

.stage-chip strong {
  display: block;
  margin-top: 1px;
  font-size: 16px;
}

.hud-button {
  min-width: 52px;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 900;
}

.enemy-hud {
  position: relative;
  z-index: 4;
  width: calc(100% - 42px);
  margin: 9px auto 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(10, 10, 18, 0.62);
  text-align: center;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
}

.enemy-hud.hit {
  animation: enemy-hit 280ms ease;
}

.enemy-hud strong {
  display: block;
  font-size: 16px;
}

.enemy-hud em {
  margin-top: 4px;
  font-style: normal;
}

.enemy-hud .bar {
  height: 5px;
  margin-top: 6px;
}

.hero-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.stage-light {
  position: absolute;
  right: 9%;
  bottom: 20%;
  left: 9%;
  height: 34%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--hero-color), white 20%), transparent 70%);
  filter: blur(22px);
  opacity: 0.42;
}

.stage-art {
  position: absolute;
  right: 50%;
  bottom: -34px;
  z-index: 2;
  width: min(92vw, 420px);
  height: min(59svh, 540px);
  object-fit: contain;
  object-position: center bottom;
  transform: translateX(50%);
  filter: drop-shadow(0 28px 36px rgba(0, 0, 0, 0.45));
  user-select: none;
  animation: stage-idle 3.8s ease-in-out infinite;
}

.nameplate {
  position: absolute;
  right: 14px;
  bottom: 82px;
  left: 14px;
  z-index: 4;
  padding: 10px 12px;
  border-left: 3px solid var(--hero-color);
  background: linear-gradient(90deg, rgba(8, 9, 16, 0.78), rgba(8, 9, 16, 0.24));
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.72);
}

.nameplate strong {
  display: block;
  font-size: 27px;
  line-height: 1;
}

.nameplate p {
  margin: 5px 0 0;
  color: rgba(247, 242, 255, 0.88);
  font-size: 13px;
  line-height: 1.35;
}

.phone-shell.is-battle .team-zone {
  display: none;
}

.phone-shell.is-battle .fighter {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 6px;
  align-items: center;
  min-height: 66px;
  padding: 6px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(10, 10, 18, 0.66);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.phone-shell.is-battle .fighter.selected {
  border-color: var(--hero-color);
  background: color-mix(in srgb, var(--hero-color), rgba(10, 10, 18, 0.7) 76%);
}

.phone-shell.is-battle .fighter-art {
  grid-row: 1 / 4;
  width: 46px;
  height: 54px;
  margin: 0;
  border-radius: 6px;
}

.phone-shell.is-battle .fighter-name {
  font-size: 12px;
}

.phone-shell.is-battle .fighter .bar {
  margin-top: 4px;
}

.phone-shell.is-battle .fighter-meta {
  margin-top: 3px;
  font-size: 9px;
}

.command-deck {
  position: fixed;
  right: max(0px, calc((100vw - 460px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 460px) / 2));
  z-index: 10;
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 10px 12px calc(env(safe-area-inset-bottom) + 10px);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(18, 19, 30, 0.82), rgba(7, 8, 13, 0.98)),
    color-mix(in srgb, var(--hero-color), #080910 88%);
  box-shadow: 0 -18px 42px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
}

.command-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-shell.is-battle .energy {
  flex: 0 0 70px;
  width: 70px;
  padding: 8px 6px;
  background: rgba(255, 255, 255, 0.1);
}

.phone-shell.is-battle .energy strong {
  font-size: 24px;
  line-height: 1;
}

.phone-shell.is-battle .hero-chip {
  min-width: 78px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.phone-shell.is-battle .ultimates {
  margin-top: 8px;
}

.phone-shell.is-battle .ultimate {
  min-height: 36px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.06);
}

.phone-shell.is-battle .hand {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-top: 8px;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.phone-shell.is-battle .hand::-webkit-scrollbar {
  display: none;
}

.phone-shell.is-battle .skill-card {
  flex: 0 0 158px;
  min-height: 94px;
  padding: 9px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--hero-color), transparent 78%), rgba(255, 255, 255, 0.06)),
    rgba(18, 18, 28, 0.9);
}

.phone-shell.is-battle .skill-card strong {
  margin-bottom: 5px;
  font-size: 15px;
}

.phone-shell.is-battle .skill-card small {
  display: -webkit-box;
  overflow: hidden;
  font-size: 11px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.phone-shell.is-battle .footer-actions {
  position: static;
  gap: 8px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.phone-shell.is-battle .primary,
.phone-shell.is-battle .secondary {
  min-height: 44px;
}

.phone-shell.is-battle .battle-log {
  min-height: 28px;
  margin-top: 7px;
  font-size: 11px;
}

.phone-shell.is-battle .battle-log li:not(:first-child) {
  display: none;
}

@keyframes stage-idle {
  0%,
  100% {
    transform: translateX(50%) translateY(0);
  }
  50% {
    transform: translateX(50%) translateY(-6px);
  }
}

@media (max-height: 760px) {
  .phone-shell.is-battle {
    padding-bottom: calc(env(safe-area-inset-bottom) + 268px);
  }

  .combat-screen {
    min-height: calc(100svh - 268px);
  }

  .stage-art {
    width: min(82vw, 370px);
    height: min(56svh, 470px);
  }

  .phone-shell.is-battle .skill-card {
    min-height: 84px;
  }
}
