* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
}
body {
  background: #020608;
  color: #fff;
  font-family: Arial, sans-serif;
}
a,
button {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
}
#wrap {
  width: 100%;
  overflow: hidden;
}
.event-stage {
  width: 100%;
  max-width: 1920px;
  aspect-ratio: 1920 / 1014;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #02070a;
}
.evt_dec {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 0;
  pointer-events: none;
}
.side-character {
  position: absolute;
  z-index: 1;
  height: auto;
  pointer-events: none;
  user-select: none;
  will-change: transform;
  animation: character-reveal 1.15s ease both;
}
.side-character--left {
  left: -1.1%;
  top: 9%;
  width: 32.5%;
  transform-origin: 10% 65%;
}
.side-character--right {
  right: -0.7%;
  top: 17%;
  width: 34%;
  transform-origin: 90% 70%;
  animation-delay: 0.15s;
}
.event-header {
  position: absolute;
  z-index: 10;
  left: 20%;
  right: 19%;
  top: 1%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.logo {
  margin: 0;
  width: 15.9%;
  line-height: 0;
}
.logo a,
.logo img {
  display: block;
  width: 100%;
}
.menu {
  margin: 1.9% 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1px;
  padding-top: 26%;
}
.menu li {
  flex: none;
}
.menu a,
.close-button {
  display: block;
  position: relative;
  width: clamp(24px, 2.58vw, 49px);
  height: clamp(25px, 2.74vw, 52px);
  padding: 0;
  border: 0;
  margin-right: -5px;
  background: none;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    filter 0.22s ease;
}
.menu a img,
.close-button img {
  display: block;
  width: 100%;
  height: 100%;
}
.menu a:hover,
.close-button:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 0 7px #54b6ff);
}
.tooltip-text {
  position: absolute;
  right: 0;
  top: 110%;
  padding: 9px 12px;
  white-space: nowrap;
  background: rgba(6, 19, 36, 0.96);
  border: 1px solid #3f7ba2;
  color: #fff;
  font:
    12px/1.35 Arial,
    sans-serif;
  border-radius: 5px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: 0.2s;
}
.tooltip:hover .tooltip-text,
.tooltip:focus-visible .tooltip-text {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.card_wrap {
  position: absolute;
  z-index: 4;
  left: 19.7%;
  top: 28.6%;
  width: 61%;
  height: 55.9%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2%;
}
.card {
  position: relative;
  flex: 0 0 30.3%;
  line-height: 0;
  filter: drop-shadow(0 13px 20px rgba(0, 0, 0, 0.45));
  transition:
    translate 0.35s ease,
    filter 0.35s ease;
  animation: card-enter 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.card--event {
  animation-delay: 0.12s;
  top: 4%;
}
.card--update {
  flex-basis: 36.1%;
  align-self: flex-start;
  z-index: 2;
  animation-delay: 0.26s;
}
.card--sales {
  animation-delay: 0.4s;
  top: 4%;
}
.card-image {
  display: block;
  width: 100%;
  height: auto;
}
.card-button {
  display: block;
  position: absolute;
  left: 19.5%;
  bottom: 3.4%;
  width: 61%;
  line-height: 0;
  filter: drop-shadow(0 0 0 transparent);
  transition:
    transform 0.25s ease,
    filter 0.25s ease;
  border-radius: 32px;
}
.card--update .card-button {
  left: 24.35%;
  width: 51.3%;
  bottom: 3.1%;
}
.card-button img {
  display: block;
  width: 100%;
}
.card:hover {
  translate: 0 -9px;
  filter: drop-shadow(0 17px 25px rgba(0, 0, 0, 0.65))
    drop-shadow(0 0 10px rgba(87, 157, 235, 0.25));
}
.card--update:hover {
  filter: drop-shadow(0 17px 25px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 14px rgba(152, 83, 249, 0.32));
}
.card-button:hover,
.card-button:focus-visible {
  transform: scale(1.045);
  filter: drop-shadow(0 0 10px rgba(83, 145, 252, 0.8));
  outline: none;
}
.card--update .card-button:hover,
.card--update .card-button:focus-visible {
  filter: drop-shadow(0 0 10px rgba(167, 94, 255, 0.8));
}
.card-button:active {
  transform: scale(0.98);
}
.footer {
  position: absolute;
  z-index: 5;
  bottom: 2.4%;
  width: 100%;
  text-align: center;
  color: #8e8e8e;
  font:
    clamp(9px, 0.7vw, 13px)/1.4 Arial,
    sans-serif;
}
.footer p {
  margin: 0;
}
.ambient-particles {
  position: absolute;
  inset: 0 0 6%;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.ambient-particles i {
  position: absolute;
  display: block;
  width: var(--s);
  height: var(--s);
  left: var(--x);
  top: var(--y);
  border-radius: 50%;
  background: rgba(255, 150, 66, 0.78);
  box-shadow: 0 0 9px 3px rgba(255, 109, 43, 0.3);
  opacity: 0;
  animation: ember var(--d) linear var(--delay) infinite;
}
@keyframes ember {
  0% {
    opacity: 0;
    transform: translate3d(0, 5px, 0);
  }
  18% {
    opacity: 0.65;
  }
  75% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx), -42px, 0);
  }
}
@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes character-reveal {
  from {
    opacity: 0;
    filter: brightness(0.5);
  }
  to {
    opacity: 1;
    filter: brightness(1);
  }
}
@media (min-width: 1921px) {
  .menu a,
  .close-button {
    width: 49px;
    height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === A+B+C+D: subtle effects, original image coordinates preserved === */
.event-stage {
  --pointer-x: 0px;
  --pointer-y: 0px;
}
.side-character--left {
  transform: translate3d(
    calc(var(--pointer-x) * -0.55),
    calc(var(--pointer-y) * -0.45),
    0
  );
}
.side-character--right {
  transform: translate3d(
    calc(var(--pointer-x) * 0.75),
    calc(var(--pointer-y) * 0.55),
    0
  );
}
.update-aura {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  left: 40%;
  top: 23%;
  width: 20%;
  height: 51%;
  background: radial-gradient(
    ellipse at center,
    rgba(125, 71, 233, 0.19) 0%,
    rgba(65, 155, 246, 0.1) 38%,
    transparent 74%
  );
  filter: blur(19px);
  opacity: 0.6;
  transform: scale(0.94);
  animation: aura-breathe 5.8s ease-in-out infinite alternate;
}
@keyframes aura-breathe {
  from {
    opacity: 0.35;
    transform: scale(0.9);
  }
  to {
    opacity: 0.82;
    transform: scale(1.12);
  }
}
.card {
  isolation: isolate;
}
.card::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: -2px;
  z-index: -1;
  border: 1px solid rgba(100, 177, 255, 0);
  border-radius: 2px;
  box-shadow: 0 0 0 rgba(68, 160, 255, 0);
  opacity: 0;
  transition:
    opacity 0.36s ease,
    box-shadow 0.36s ease,
    border-color 0.36s ease;
}
.card:hover::before {
  opacity: 1;
  border-color: rgba(107, 182, 255, 0.42);
  box-shadow: 0 0 20px rgba(73, 153, 251, 0.26);
}
.card--update:hover::before {
  border-color: rgba(182, 122, 255, 0.56);
  box-shadow: 0 0 24px rgba(135, 73, 246, 0.28);
}
.ambient-particles i {
  border-radius: 45% 55% 55% 45%;
  background: rgba(255, 153, 70, 0.8);
  animation-name: ember-drift;
  animation-timing-function: linear;
}
@keyframes ember-drift {
  0% {
    opacity: 0;
    transform: translate3d(-25px, 18px, 0) scale(0.65);
  }
  15% {
    opacity: 0.6;
  }
  55% {
    opacity: 0.4;
  }
  90% {
    opacity: 0.16;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx), var(--dy), 0) scale(0.85);
  }
}

@media (prefers-reduced-motion: reduce) {
  .side-character {
    transform: none !important;
  }
  .update-aura {
    animation: none;
  }
}

/* ===== B v2: 눈에 보이는 숲 불씨 (기존 패럴랙스/카드 좌표 변경 없음) ===== */
.ambient-particles {
  z-index: 3;
  inset: 0 0 6%;
  mix-blend-mode: screen;
}
.ambient-particles .ember {
  width: var(--s);
  height: var(--s);
  background: radial-gradient(
    circle,
    #fff4cc 0%,
    #ffcb6c 30%,
    #ff7d2e 72%,
    rgba(244, 68, 18, 0) 100%
  );
  box-shadow:
    0 0 5px 1px rgba(255, 157, 49, 0.65),
    0 0 13px 3px rgba(255, 91, 19, 0.28);
  will-change: transform, opacity;
  animation: ember-visible var(--d) linear var(--delay) infinite;
}
.ambient-particles .ember--near {
  box-shadow:
    0 0 8px 2px rgba(255, 191, 69, 0.8),
    0 0 23px 5px rgba(255, 93, 20, 0.32);
}
@keyframes ember-visible {
  0% {
    opacity: 0;
    transform: translate3d(-25px, 19px, 0) scale(0.65);
  }
  12% {
    opacity: 0.85;
  }
  38% {
    opacity: 1;
  }
  70% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx), var(--dy), 0) scale(0.6);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-particles .ember {
    animation: none !important;
    opacity: 0.55;
  }
}

/* =============================================================
   MOBILE: FULL THREE-CARD COMPOSITION
   Desktop coordinates, effects, and image assets remain untouched.
   No viewport crop and no mobile parallax.
   ============================================================= */
@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    background: #020608;
  }
  #wrap {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background: #020608;
  }
  .event-stage {
    left: auto;
    transform: none;
    width: 100%;
    max-width: none;
    min-height: 0;
    height: auto;
    aspect-ratio: auto;
    /* Width 393px => height about 334px; no oversized black stage. */
    height: clamp(310px, 85vw, 550px);
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(#071b25 32%, #020608 82%);
  }
  .evt_dec {
    inset: 0 0 auto;
    width: 100%;
    height: 65%;
    object-fit: fill;
    object-position: center top;
  }
  .side-character {
    transform: none !important;
    opacity: 1;
    will-change: auto;
  }
  .side-character--left {
    left: -1.1%;
    top: 9%;
    width: 32.5%;
  }
  .side-character--right {
    right: -0.7%;
    top: 17%;
    width: 34%;
  }
  .event-header {
    position: absolute;
    top: 1.5%;
    left: 5%;
    right: 5%;
    width: auto;
    margin: 0;
    padding: 0;
    transform: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }
  .logo {
    width: clamp(48px, 14vw, 94px);
  }
  .menu {
    margin: 0;
    padding: 0;
    gap: 1px;
  }
  .menu a {
    margin-right: -3px;
  }

  .menu a,
  .close-button {
    width: clamp(21px, 5.7vw, 32px);
    height: clamp(22px, 6vw, 34px);
  }
  .card_wrap {
    position: absolute;
    left: 2%;
    top: 27%;
    width: 96%;
    height: auto;
    margin: 0;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9%;
  }
  .card {
    width: auto;
    min-width: 0;
    max-width: none;
    flex: 0 0 30.3%;
    align-self: auto;
    order: 0;
  }
  .card--event,
  .card--sales {
    top: clamp(16px, 6.5vw, 38px);
  }
  .card--update {
    flex: 0 0 36.1%;
    top: 0;
    align-self: flex-start;
    order: 0;
  }
  .card-image {
    display: block;
    width: 100%;
    height: auto;
  }
  .card-button {
    left: 19.5%;
    bottom: 3.4%;
    width: 61%;
  }
  .card--update .card-button {
    left: 24.35%;
    width: 51.3%;
    bottom: 3.1%;
  }
  .footer {
    position: absolute;
    bottom: 2%;
    left: 0;
    width: 100%;
    padding: 0 5px;
    font-size: clamp(7px, 1.7vw, 10px);
  }
  .update-aura {
    left: 38%;
    top: 25%;
    width: 24%;
    height: 50%;
  }
  .ambient-particles {
    inset: 0;
  }
}

/* Mobile: reveal the scorpion above the sales card without covering content.
   The three cards, header, desktop layout and parallax stay unchanged. */
@media (max-width: 900px) {
  .side-character--right {
    top: -3%;
    right: -3%;
    width: 39%;
    z-index: 1;
    transform: none !important;
  }
}
