:root {
  --orange: #FF8A3D;
  --orange-light: #FFB164;
  --orange-deep: #D95B21;
  --cream: #FFF3E2;
  --cream-dim: #C9B9A4;
  --ink: #07101B;
  --panel: rgba(10, 18, 29, .78);
  --panel-solid: #111C2A;
  --line: rgba(255, 176, 106, .22);
  --cyan: #63D8E3;
  --danger: #FF5A4E;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: "Arial Black", "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #05080d;
  color: var(--cream);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
body {
  display: flex;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.app {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 100vh;
  height: 100dvh;
  min-height: 480px;
  overflow: hidden;
  background: #08111e;
  isolation: isolate;
  touch-action: none;
}
.app::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at center, transparent 34%, rgba(255, 43, 31, .55) 110%);
}
.app.hurt::before { animation: hurtPulse .26s ease-out; }
@keyframes hurtPulse {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}

#stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* ---------------- profile / avatars ---------------- */
.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFB15C, #D95B21);
  border: 2px solid rgba(255, 237, 215, .9);
  box-shadow: 0 0 0 2px rgba(255, 138, 61, .35), 0 6px 16px rgba(0, 0, 0, .4);
  color: #241305;
  font-size: 17px;
  font-weight: 900;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-fallback { display: block; transform: skew(-5deg); }
.avatar.has-image .avatar-fallback { display: none; }

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #70E7A2;
  box-shadow: 0 0 8px rgba(112, 231, 162, .9);
  animation: dotBreathe 2s ease-in-out infinite;
}
@keyframes dotBreathe { 50% { opacity: .45; transform: scale(.75); } }

/* ---------------- HUD ---------------- */
.hud {
  position: absolute;
  z-index: 12;
  inset: 0;
  padding: calc(var(--safe-top) + 10px) 14px 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .3s ease, transform .3s ease;
}
.app.state-playing .hud,
.app.state-paused .hud,
.app.state-over .hud {
  opacity: 1;
  transform: none;
}
.hud-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 42px;
  align-items: center;
  gap: 8px;
}
.profile-panel,
.score-panel,
.wave-panel,
.health-panel {
  background: linear-gradient(150deg, rgba(18, 30, 45, .92), rgba(8, 15, 25, .72));
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.profile-panel {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 6px 12px 6px 6px;
  border-radius: 26px;
}
.profile-panel .avatar { width: 36px; height: 36px; font-size: 15px; border-width: 1.5px; }
.profile-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.profile-copy b {
  overflow: hidden;
  color: var(--cream);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-copy small { margin-top: 3px; color: #94AA9D; font-size: 9px; letter-spacing: .06em; }
.score-panel {
  min-width: 74px;
  padding: 5px 13px 7px;
  border-radius: 16px;
  text-align: right;
}
.eyebrow {
  display: block;
  color: var(--orange-light);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.2;
  opacity: .9;
}
.score-panel strong {
  display: block;
  color: #FFF4DE;
  font-family: var(--display);
  font-size: 21px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: .03em;
  line-height: 1.2;
  text-shadow: 0 0 18px rgba(255, 138, 61, .45);
  font-variant-numeric: tabular-nums;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  color: var(--cream);
  background: linear-gradient(145deg, rgba(25, 40, 57, .95), rgba(9, 16, 27, .85));
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .06);
  pointer-events: auto;
  transition: transform .12s ease, background .2s ease;
}
.icon-button .mp-icon { width: 21px; height: 21px; }
.icon-button:active { transform: scale(.91); background: rgba(255, 138, 61, .18); }

.hud-second {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 9px;
}
.health-panel {
  width: min(58%, 240px);
  padding: 8px 12px 10px;
  border-radius: 14px;
}
.health-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; }
.health-row span { color: var(--cream-dim); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.health-row b { color: #FFE6C5; font-family: var(--display); font-size: 15px; font-style: italic; line-height: 1; }
.health-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, .46);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7);
}
.health-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #FF5D47, #FF8A3D 48%, #FFC46E);
  box-shadow: 0 0 12px rgba(255, 122, 61, .66);
  transition: width .2s ease;
}
.health-shine { position: absolute; inset: 1px 2px auto; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .36); }
.wave-panel {
  display: grid;
  grid-template-columns: auto auto;
  align-content: center;
  align-items: center;
  gap: 0 7px;
  flex: 1;
  max-width: 124px;
  padding: 6px 11px 7px;
  border-radius: 14px;
}
.wave-panel .eyebrow { grid-column: 1 / -1; }
.wave-panel b {
  color: var(--cream);
  font-family: var(--display);
  font-size: 21px;
  font-style: italic;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.wave-left {
  color: #96A8B9;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* ---------------- controls ---------------- */
.controls {
  position: absolute;
  z-index: 18;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 24px calc(var(--safe-bottom) + 26px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .35s ease .1s, transform .35s ease .1s;
}
.app.state-playing .controls { opacity: 1; transform: none; }
.app.state-paused .controls,
.app.state-over .controls { opacity: 0; pointer-events: none; }
.joystick-wrap, .fire-wrap { display: flex; flex-direction: column; align-items: center; gap: 7px; pointer-events: auto; }
.control-label {
  color: rgba(255, 236, 214, .56);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .22em;
  text-shadow: 0 2px 5px #000;
}
.joystick {
  position: relative;
  width: 122px;
  height: 122px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 44%, rgba(60, 85, 110, .32), rgba(7, 14, 24, .56) 66%),
    rgba(10, 19, 31, .48);
  border: 1.5px solid rgba(255, 191, 130, .24);
  box-shadow: inset 0 0 26px rgba(0, 0, 0, .48), 0 12px 30px rgba(0, 0, 0, .26);
  touch-action: none;
}
.joy-ring {
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 180, 112, .26);
  animation: ringTurn 22s linear infinite;
}
@keyframes ringTurn { to { transform: rotate(360deg); } }
.joy-mark { position: absolute; width: 0; height: 0; opacity: .65; }
.joy-mark-up { top: 8px; left: 56px; border-right: 4px solid transparent; border-bottom: 6px solid rgba(255, 189, 127, .64); border-left: 4px solid transparent; }
.joy-mark-down { bottom: 8px; left: 56px; border-top: 6px solid rgba(255, 189, 127, .64); border-right: 4px solid transparent; border-left: 4px solid transparent; }
.joy-mark-left { top: 56px; left: 8px; border-top: 4px solid transparent; border-right: 6px solid rgba(255, 189, 127, .64); border-bottom: 4px solid transparent; }
.joy-mark-right { top: 56px; right: 8px; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 6px solid rgba(255, 189, 127, .64); }
.joy-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-radius: 50%;
  color: #2B1607;
  background: linear-gradient(150deg, #FFB568, #FF8A3D 52%, #D95B21);
  border: 2px solid rgba(255, 240, 219, .8);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .45), inset 0 3px 0 rgba(255, 255, 255, .34), inset 0 -5px 10px rgba(145, 49, 6, .35);
  will-change: transform;
  transition: box-shadow .2s ease;
}
.joy-knob .mp-icon { width: 23px; height: 23px; opacity: .8; }
.joystick.active .joy-knob { box-shadow: 0 8px 22px rgba(255, 106, 38, .38), inset 0 3px 0 rgba(255, 255, 255, .4), inset 0 -5px 10px rgba(145, 49, 6, .35); }
.fire-wrap { position: relative; }
.fire-label { position: absolute; top: -19px; }
.fire-button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  color: #2A1505;
  background:
    radial-gradient(circle at 38% 30%, #FFD394, transparent 34%),
    linear-gradient(150deg, #FFB35E, #FF8A3D 48%, #D9561D);
  border: 2px solid rgba(255, 236, 211, .9);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .42), 0 0 0 7px rgba(255, 138, 61, .12), inset 0 4px 0 rgba(255, 255, 255, .3), inset 0 -8px 14px rgba(137, 43, 7, .32);
  touch-action: none;
  transition: transform .1s ease, box-shadow .15s ease;
}
.fire-button .mp-icon { width: 34px; height: 34px; filter: drop-shadow(0 2px 0 rgba(255, 238, 208, .35)); }
.fire-button small { margin-top: 2px; font-size: 9px; font-weight: 900; letter-spacing: .2em; opacity: .75; }
.fire-ring {
  position: absolute;
  inset: -11px;
  border-radius: 50%;
  border: 1px solid rgba(255, 182, 111, .34);
  animation: firePulse 2.4s ease-out infinite;
}
@keyframes firePulse {
  0% { transform: scale(.92); opacity: .85; }
  70% { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1.12); opacity: 0; }
}
.fire-button.active, .fire-button:active {
  transform: scale(.92);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .4), 0 0 0 3px rgba(255, 138, 61, .22), inset 0 2px 0 rgba(255, 255, 255, .22), inset 0 -5px 12px rgba(137, 43, 7, .36);
}
.fire-button.active .fire-ring { animation: none; border-color: rgba(255, 238, 203, .8); }

.control-tip {
  position: absolute;
  z-index: 17;
  bottom: calc(var(--safe-bottom) + 156px);
  left: 50%;
  display: flex;
  gap: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #D5E3EC;
  background: rgba(7, 14, 23, .72);
  border: 1px solid rgba(255, 166, 94, .2);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
  backdrop-filter: blur(10px);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .03em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity .3s ease, transform .3s ease;
}
.control-tip.show { opacity: 1; transform: translate(-50%, 0); }
.control-tip span { display: inline-flex; align-items: center; gap: 5px; }
.control-tip .mp-icon { width: 13px; height: 13px; color: var(--orange-light); }

/* ---------------- landing ---------------- */
.landing {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 16px) 20px calc(var(--safe-bottom) + 18px);
  background:
    linear-gradient(180deg, rgba(3, 8, 15, .62) 0%, rgba(3, 8, 15, .04) 22%, rgba(3, 8, 15, 0) 44%, rgba(3, 8, 15, .1) 58%, rgba(3, 8, 15, .28) 74%, rgba(4, 9, 16, .9) 88%, #07101b 100%),
    url("cover.svg") center center / cover no-repeat;
  opacity: 1;
  visibility: visible;
  transition: opacity .38s ease, visibility .38s ease;
}
.app.state-playing .landing,
.app.state-paused .landing,
.app.state-over .landing {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.landing-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 70%, rgba(255, 138, 61, .16), transparent 34%),
    radial-gradient(ellipse at 50% 66%, transparent 18%, rgba(2, 6, 11, .26) 84%),
    linear-gradient(90deg, rgba(3, 8, 15, .4), transparent 30%, transparent 70%, rgba(3, 8, 15, .4));
  pointer-events: none;
}
.landing-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.landing-profile {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 5px 8px 5px 5px;
  border: 1px solid rgba(255, 188, 126, .24);
  border-radius: 999px;
  background: rgba(6, 14, 24, .54);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.landing-profile .avatar { width: 34px; height: 34px; font-size: 14px; border-width: 1.5px; }
.landing-profile-copy { display: flex; flex-direction: column; line-height: 1.12; min-width: 0; }
.landing-profile-copy small { color: #AAB8C2; font-size: 8px; letter-spacing: .08em; }
.landing-profile-copy b {
  max-width: 116px;
  overflow: hidden;
  margin-top: 2px;
  color: #FFF1DC;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.online-pill {
  display: flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  color: #BCEBD0;
  background: rgba(67, 168, 119, .15);
  font-size: 8px;
  font-weight: 700;
}
.best-pill {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 11px;
  border-radius: 12px;
  background: rgba(6, 14, 24, .52);
  border: 1px solid rgba(255, 188, 126, .22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.best-pill span { color: #B4B8B9; font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.best-pill b { color: #FFD7A5; font-family: var(--display); font-size: 15px; font-style: italic; line-height: 1; font-variant-numeric: tabular-nums; }

.landing-title {
  position: relative;
  z-index: 2;
  align-self: center;
  width: 100%;
  margin-top: 8px;
  text-align: center;
  animation: titleIn .7s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes titleIn {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.season-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #FFD2A2;
  background: rgba(255, 138, 61, .13);
  border: 1px solid rgba(255, 168, 94, .34);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  text-shadow: 0 1px 3px #000;
}
.season-tag span { display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.landing-title h1 {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .05em;
  margin: 8px 0 2px;
  font-family: var(--display);
  font-size: clamp(50px, 15vw, 76px);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.075em;
  line-height: 1;
  transform: skew(-4deg);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .46));
}
.landing-title h1 span:first-child {
  color: var(--orange-light);
  text-shadow: 0 2px 0 #7D2C08, 0 4px 0 #4B1805, 0 0 28px rgba(255, 138, 61, .46);
}
.landing-title h1 span:last-child {
  color: #FFF3DF;
  text-shadow: 0 2px 0 #7A6C5C, 0 4px 0 #3B322A, 0 0 30px rgba(255, 231, 193, .24);
}
.landing-title p {
  margin: 7px 0 0;
  color: rgba(255, 243, 226, .78);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .28em;
  text-shadow: 0 2px 8px #000;
}
.feature-row {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 13px;
}
.feature-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 8px;
  color: #DDEAF1;
  background: rgba(7, 16, 27, .42);
  border: 1px solid rgba(255, 190, 129, .17);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .06em;
  backdrop-filter: blur(8px);
}
.feature-row .mp-icon { width: 13px; height: 13px; color: var(--orange-light); }

.landing-bottom {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  animation: bottomIn .75s .12s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes bottomIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
.primary-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 58px;
  overflow: hidden;
  padding: 0 22px;
  border-radius: 18px;
  color: #2A1405;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, .46), transparent 30%),
    linear-gradient(135deg, #FFC078, #FF8A3D 52%, #EC6625);
  border: 1.5px solid rgba(255, 244, 225, .7);
  box-shadow: 0 13px 30px rgba(225, 86, 23, .33), 0 4px 0 #9B370D, inset 0 2px 0 rgba(255, 255, 255, .34);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .18em;
  transition: transform .12s ease, box-shadow .12s ease;
}
.primary-button .mp-icon { width: 26px; height: 26px; }
.primary-button:active {
  transform: translateY(3px) scale(.99);
  box-shadow: 0 7px 16px rgba(225, 86, 23, .3), 0 1px 0 #9B370D, inset 0 2px 0 rgba(255, 255, 255, .3);
}
.primary-shine {
  position: absolute;
  top: -70%;
  left: -40%;
  width: 35%;
  height: 240%;
  transform: rotate(22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .48), transparent);
  animation: shineSweep 4s 1.3s ease-in-out infinite;
}
@keyframes shineSweep {
  0%, 58% { transform: translateX(-180%) rotate(22deg); }
  78%, 100% { transform: translateX(620%) rotate(22deg); }
}
.landing-meta {
  display: flex;
  justify-content: space-between;
  padding: 8px 3px 0;
  color: rgba(224, 212, 194, .48);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .1em;
}
.guide-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 11px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(8, 16, 27, .6);
  border: 1px solid rgba(255, 185, 122, .16);
  backdrop-filter: blur(12px);
}
.guide-item { display: flex; align-items: center; gap: 8px; flex: 1; }
.guide-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  border-radius: 9px;
  color: #91E5ED;
  background: rgba(79, 207, 220, .11);
  border: 1px solid rgba(100, 218, 229, .23);
}
.guide-icon.hot { color: #FFC189; background: rgba(255, 138, 61, .12); border-color: rgba(255, 166, 94, .24); }
.guide-icon .mp-icon { width: 16px; height: 16px; }
.guide-item > span:last-child { display: flex; flex-direction: column; line-height: 1.18; }
.guide-item b { color: #E9F0F3; font-size: 10px; font-weight: 700; }
.guide-item small { margin-top: 2px; color: #7E939F; font-size: 8px; }
.guide-split { width: 1px; height: 28px; background: rgba(255, 255, 255, .08); }

/* ---------------- overlays ---------------- */
.overlay {
  position: absolute;
  z-index: 45;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 20px) 20px calc(var(--safe-bottom) + 20px);
  background: radial-gradient(ellipse at center, rgba(9, 19, 31, .66), rgba(3, 7, 12, .9));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}
.overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
.overlay-card {
  position: relative;
  width: 100%;
  max-width: 340px;
  overflow: hidden;
  padding: 24px 22px 22px;
  border-radius: 26px;
  background:
    linear-gradient(160deg, rgba(32, 50, 69, .64), transparent 48%),
    linear-gradient(155deg, #152333, #0A121D 72%);
  border: 1px solid rgba(255, 178, 106, .26);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .62), inset 0 1px 0 rgba(255, 255, 255, .09);
  text-align: center;
  animation: cardIn .32s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.overlay-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14%;
  width: 72%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 184, 116, .7), transparent);
}
.card-kicker { display: block; color: var(--orange-light); font-size: 8px; font-weight: 800; letter-spacing: .28em; }
.card-kicker.danger { color: #FF735D; }
.overlay-card h2 {
  margin: 7px 0 0;
  color: #FFF4E2;
  font-family: var(--display);
  font-size: 31px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.03em;
  text-shadow: 0 5px 16px rgba(0, 0, 0, .5);
}
.overlay-card p { margin: 7px 0 19px; color: #9EAFBC; font-size: 11px; line-height: 1.55; }
.primary-button.compact { min-height: 52px; font-size: 16px; letter-spacing: .1em; border-radius: 16px; }
.ghost-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  margin-top: 9px;
  border-radius: 13px;
  color: #BFCBD3;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .09);
  font-size: 12px;
  font-weight: 600;
  transition: background .15s ease, transform .12s ease;
}
.ghost-button .mp-icon { width: 16px; height: 16px; opacity: .8; }
.ghost-button:active { transform: scale(.98); background: rgba(255, 255, 255, .07); }
.over-card { padding-top: 29px; }
.over-burst {
  position: absolute;
  top: -132px;
  left: 50%;
  width: 290px;
  height: 290px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 92, 55, .3), rgba(255, 138, 61, .08) 44%, transparent 68%);
  pointer-events: none;
}
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 17px 0 8px; }
.result-grid div {
  padding: 11px 9px 12px;
  border-radius: 13px;
  background: rgba(4, 9, 15, .44);
  border: 1px solid rgba(255, 255, 255, .07);
}
.result-grid span { display: block; color: #83969F; font-size: 8px; font-weight: 700; letter-spacing: .14em; }
.result-grid b {
  display: block;
  margin-top: 4px;
  color: #FFE4C4;
  font-family: var(--display);
  font-size: 23px;
  font-style: italic;
  font-variant-numeric: tabular-nums;
}
.new-best {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #FFD7A2;
  background: rgba(255, 138, 61, .13);
  border: 1px solid rgba(255, 168, 94, .25);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}
.new-best.hidden { display: none; }
.over-card .primary-button { margin-top: 3px; }

/* ---------------- wave banner ---------------- */
.wave-banner {
  position: absolute;
  z-index: 22;
  top: 31%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  padding: 13px 29px 14px;
  transform: translate(-50%, -50%) scale(.9);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(23, 38, 55, .9), rgba(7, 14, 24, .76));
  border: 1px solid rgba(255, 179, 108, .33);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
}
.wave-banner.show { animation: waveIn 1.7s ease both; }
@keyframes waveIn {
  0% { opacity: 0; transform: translate(-50%, -44%) scale(.88); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  76% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(1.03); }
}
.wave-banner span { color: var(--orange-light); font-size: 8px; font-weight: 900; letter-spacing: .35em; }
.wave-banner b {
  margin: 1px 0 0;
  color: #FFF4E1;
  font-family: var(--display);
  font-size: 42px;
  font-style: italic;
  line-height: 1;
  text-shadow: 0 0 24px rgba(255, 138, 61, .5);
}
.wave-banner em { margin-top: 4px; color: #A9B8C2; font-size: 9px; font-style: normal; letter-spacing: .1em; }

/* ---------------- responsive ---------------- */
@media (max-width: 370px) {
  .landing { padding-right: 16px; padding-left: 16px; }
  .landing-title h1 { font-size: 48px; }
  .landing-title p { font-size: 11px; }
  .feature-row { margin-top: 10px; }
  .profile-panel { padding-right: 8px; }
  .score-panel { min-width: 66px; padding-right: 9px; padding-left: 9px; }
  .joystick { width: 108px; height: 108px; }
  .controls { padding-right: 18px; padding-left: 18px; }
  .fire-button { width: 84px; height: 84px; }
  .control-tip { gap: 9px; font-size: 9px; }
}
@media (max-height: 720px) {
  .landing { padding-top: calc(var(--safe-top) + 10px); background-position: center 78%; }
  .landing-title { margin-top: 0; }
  .landing-title h1 { font-size: 48px; margin-top: 5px; }
  .landing-title p { margin-top: 4px; font-size: 10px; }
  .feature-row { margin-top: 8px; }
  .landing-bottom { padding-top: 8px; }
  .primary-button { min-height: 52px; font-size: 16px; }
  .guide-card { margin-top: 8px; padding: 7px 10px; }
  .landing-meta { padding-top: 6px; }
  .joystick { width: 106px; height: 106px; }
  .fire-button { width: 82px; height: 82px; }
  .controls { padding-bottom: calc(var(--safe-bottom) + 18px); }
  .control-tip { bottom: calc(var(--safe-bottom) + 136px); }
  .wave-banner { top: 34%; }
}
@media (min-width: 520px) {
  .app { border-right: 1px solid rgba(255, 255, 255, .06); border-left: 1px solid rgba(255, 255, 255, .06); }
  .landing { padding-right: 30px; padding-left: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
