:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background: #effbf0;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #effbf0;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: #effbf0;
}

.page-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(12px, 2vw, 32px);
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 52%, rgba(255, 237, 138, 0.25), transparent 22rem),
    radial-gradient(circle at 91% 48%, rgba(53, 195, 181, 0.2), transparent 26rem),
    #effbf0;
}

.page-shell::before {
  position: absolute;
  inset: -12%;
  z-index: -1;
  content: "";
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.55), transparent 22%),
    radial-gradient(circle at 78% 70%, rgba(79, 209, 185, 0.14), transparent 27%);
  filter: blur(10px);
  animation: ambient-breathe 12s ease-in-out infinite alternate;
  pointer-events: none;
}

.poster-frame {
  position: relative;
  width: min(100%, 1672px);
  aspect-ratio: 1672 / 941;
  animation: poster-enter 850ms cubic-bezier(0.22, 1, 0.36, 1) both;
  filter: drop-shadow(0 18px 50px rgba(18, 84, 105, 0.2));
}

.official-poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.decorative-motion {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.decorative-motion::before {
  position: absolute;
  top: -16%;
  bottom: -16%;
  left: 45%;
  width: 18%;
  content: "";
  opacity: 0;
  background: linear-gradient(
    104deg,
    transparent 22%,
    rgba(255, 255, 255, 0.18) 42%,
    rgba(255, 255, 255, 0.86) 50%,
    rgba(255, 255, 255, 0.18) 58%,
    transparent 78%
  );
  mix-blend-mode: screen;
  transform: translateX(-190%) skewX(-18deg);
  animation: poster-light-sweep 3.8s ease-in-out -1.9s infinite;
}

.decorative-motion::after {
  position: absolute;
  top: 19%;
  left: 58%;
  width: 25%;
  aspect-ratio: 1;
  content: "";
  opacity: 0.22;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 68%);
  mix-blend-mode: screen;
  animation: focus-glow 3.8s ease-in-out -1.5s infinite;
}

.ambient-glow,
.sparkle {
  position: absolute;
  display: block;
  pointer-events: none;
}

.ambient-glow {
  width: 15%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 70%);
  mix-blend-mode: screen;
  animation: glow-pulse 5.5s ease-in-out infinite alternate;
}

.glow-one {
  top: 20%;
  left: 61%;
}

.glow-two {
  right: 10%;
  bottom: 13%;
  width: 12%;
  animation-delay: -2.4s;
}

.sparkle {
  width: clamp(6px, 0.7vw, 13px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 14px 5px rgba(255, 255, 255, 0.42);
  animation: sparkle-twinkle 3.8s ease-in-out infinite;
}

.sparkle-one {
  top: 15%;
  left: 72%;
}

.sparkle-two {
  top: 32%;
  left: 63%;
  width: clamp(4px, 0.42vw, 8px);
  animation-delay: -1.4s;
}

.sparkle-three {
  right: 21%;
  bottom: 20%;
  width: clamp(5px, 0.55vw, 10px);
  animation-delay: -2.4s;
}

.register-hotspot,
.mobile-register {
  cursor: pointer;
  outline: none;
  touch-action: manipulation;
}

.register-hotspot {
  position: absolute;
  top: 56.3%;
  left: 4.75%;
  width: 38.25%;
  height: 20.55%;
  overflow: hidden;
  border-radius: clamp(12px, 1.35vw, 24px);
}

.register-hotspot::after,
.mobile-register::after {
  position: absolute;
  inset: 4% -20%;
  content: "";
  opacity: 0;
  background: linear-gradient(
    104deg,
    transparent 25%,
    rgba(255, 255, 255, 0.32) 46%,
    transparent 64%
  );
  transform: translateX(-120%) skewX(-18deg);
  animation: button-sheen-auto 4.8s ease-in-out 1s infinite;
  pointer-events: none;
}

.register-hotspot:hover::after,
.register-hotspot:focus-visible::after,
.mobile-register:hover::after,
.mobile-register:focus-visible::after {
  opacity: 1;
  animation: button-sheen 1.45s ease both;
}

.register-hotspot:focus-visible,
.mobile-register:focus-visible {
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.8),
    0 0 0 10px rgba(8, 100, 177, 0.24);
}

.mobile-layout {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes poster-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.988);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ambient-breathe {
  from {
    opacity: 0.72;
    transform: scale(0.98) rotate(-1deg);
  }
  to {
    opacity: 1;
    transform: scale(1.02) rotate(1deg);
  }
}

@keyframes poster-light-sweep {
  0%,
  19% {
    opacity: 0;
    transform: translateX(-190%) skewX(-18deg);
  }
  35% {
    opacity: 0.94;
  }
  58%,
  100% {
    opacity: 0;
    transform: translateX(560%) skewX(-18deg);
  }
}

@keyframes focus-glow {
  0%,
  100% {
    opacity: 0.18;
    transform: scale(0.72);
  }
  50% {
    opacity: 0.78;
    transform: scale(1.16);
  }
}

@keyframes glow-pulse {
  from {
    opacity: 0.28;
    transform: scale(0.78) translate3d(-2%, 1%, 0);
  }
  to {
    opacity: 0.75;
    transform: scale(1.12) translate3d(2%, -2%, 0);
  }
}

@keyframes sparkle-twinkle {
  0%,
  100% {
    opacity: 0.34;
    transform: scale(0.72);
  }
  48% {
    opacity: 1;
    transform: scale(1.22);
  }
}

@keyframes button-sheen {
  from {
    transform: translateX(-120%) skewX(-18deg);
  }
  to {
    transform: translateX(120%) skewX(-18deg);
  }
}

@keyframes button-sheen-auto {
  0%,
  48% {
    opacity: 0;
    transform: translateX(-120%) skewX(-18deg);
  }
  60% {
    opacity: 0.62;
  }
  76%,
  100% {
    opacity: 0;
    transform: translateX(120%) skewX(-18deg);
  }
}

@media (max-width: 680px) {
  .page-shell {
    display: block;
    min-height: auto;
    padding: 0;
    overflow: hidden;
    background:
      radial-gradient(circle at 100% 15%, rgba(54, 199, 183, 0.2), transparent 18rem),
      linear-gradient(180deg, #f8fce9 0%, #effbf0 35%, #e8faf4 100%);
  }

  .page-shell::before {
    inset: -20%;
  }

  .desktop-layout {
    display: none;
  }

  .mobile-layout {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(100%, 520px);
    min-height: 100svh;
    margin: 0 auto;
    flex-direction: column;
    align-items: stretch;
    padding: 0 18px 24px;
    animation: poster-enter 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .mobile-logo {
    display: block;
    width: calc(100% + 36px);
    height: auto;
    margin: 0 -18px;
    object-fit: contain;
  }

  .mobile-copy {
    padding: 8px 4px 0;
    color: #126db5;
    text-align: left;
  }

  .mobile-year {
    margin-bottom: 2px;
    font-size: clamp(44px, 13vw, 68px);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0.01em;
  }

  .mobile-year span {
    display: inline-grid;
    width: 1.03em;
    height: 1.03em;
    margin-left: 5px;
    place-items: center;
    border-radius: 50%;
    background: #1472bb;
    color: #fff;
    font-size: 0.36em;
    vertical-align: 0.24em;
  }

  .mobile-copy h2,
  .mobile-event-title {
    margin: 0;
    font-weight: 900;
    letter-spacing: 0.01em;
  }

  .mobile-copy h2 {
    font-size: clamp(23px, 6.6vw, 34px);
    line-height: 1.16;
  }

  .mobile-event-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #263c75;
    font-size: clamp(23px, 6.3vw, 33px);
    line-height: 1.2;
  }

  .mobile-event-title strong {
    padding: 3px 13px 5px;
    border-radius: 999px;
    background: #1472bb;
    color: #fff;
    font-size: 0.86em;
    white-space: nowrap;
  }

  .mobile-slogan {
    width: fit-content;
    max-width: 100%;
    margin-top: 13px;
    padding: 5px 10px 6px;
    background: rgba(255, 255, 255, 0.78);
    color: #1672b8;
    font-size: clamp(15px, 4.1vw, 21px);
    font-style: italic;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.12em;
  }

  .mobile-subline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 13px;
    color: #1a4b7d;
    font-size: clamp(13px, 3.65vw, 18px);
    font-weight: 700;
  }

  .mobile-subline span {
    display: block;
    width: 56px;
    height: 2px;
    flex: 0 0 auto;
    background: #1a4b7d;
  }

  .mobile-puzzle-frame {
    position: relative;
    overflow: hidden;
    margin: 12px auto 0;
    border-radius: 0;
    filter: drop-shadow(0 14px 24px rgba(25, 125, 146, 0.14));
  }

  .mobile-puzzle-frame::after {
    position: absolute;
    top: -20%;
    bottom: -20%;
    left: 26%;
    width: 24%;
    content: "";
    opacity: 0;
    background: linear-gradient(
      104deg,
      transparent 22%,
      rgba(255, 255, 255, 0.2) 42%,
      rgba(255, 255, 255, 0.9) 50%,
      rgba(255, 255, 255, 0.2) 58%,
      transparent 78%
    );
    mix-blend-mode: screen;
    transform: translateX(-190%) skewX(-18deg);
    animation: mobile-light-sweep 3.8s ease-in-out -1.2s infinite;
    pointer-events: none;
  }

  .mobile-puzzle {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    animation: puzzle-float 7s ease-in-out infinite alternate, puzzle-glow 4.8s ease-in-out infinite alternate;
  }

  .mobile-register {
    position: relative;
    display: block;
    width: min(100%, 390px);
    margin: 9px auto 0;
    overflow: hidden;
    border-radius: 20px;
    animation: card-breathe 4.2s ease-in-out infinite;
  }

  .mobile-register img {
    display: block;
    width: 100%;
    height: auto;
  }

  .mobile-meta {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding: 15px 14px;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 28px rgba(19, 114, 146, 0.1);
  }

  .meta-item {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #134c83;
  }

  .meta-item p {
    display: grid;
    gap: 1px;
    margin: 0;
    font-size: clamp(13px, 3.7vw, 17px);
    line-height: 1.25;
  }

  .meta-item b {
    color: #1672b8;
    font-size: 0.9em;
  }

  .meta-icon {
    display: block;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    object-fit: contain;
    object-position: center;
  }

  @keyframes puzzle-float {
    from {
      transform: translateY(0);
    }
    to {
      transform: translateY(-5px);
    }
  }

  @keyframes puzzle-glow {
    from {
      filter: brightness(0.99) saturate(1);
    }
    to {
      filter: brightness(1.08) saturate(1.05);
    }
  }

  @keyframes mobile-light-sweep {
    0%,
    19% {
      opacity: 0;
      transform: translateX(-190%) skewX(-18deg);
    }
    35% {
      opacity: 0.92;
    }
    58%,
    100% {
      opacity: 0;
      transform: translateX(560%) skewX(-18deg);
    }
  }

  @keyframes card-breathe {
    0%,
    100% {
      transform: translateY(0);
      filter: drop-shadow(0 6px 16px rgba(16, 110, 160, 0.08));
    }
    50% {
      transform: translateY(-3px);
      filter: drop-shadow(0 12px 23px rgba(16, 110, 160, 0.22));
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-shell::before,
  .poster-frame,
  .mobile-layout,
  .mobile-puzzle,
  .mobile-register,
  .ambient-glow,
  .sparkle,
  .decorative-motion::before,
  .decorative-motion::after,
  .mobile-puzzle-frame::after {
    animation: none;
  }

  .register-hotspot:hover::after,
  .register-hotspot:focus-visible::after,
  .mobile-register:hover::after,
  .mobile-register:focus-visible::after {
    animation: none;
  }

  .register-hotspot::after,
  .mobile-register::after {
    animation: none;
  }
}
