/* Auto-generated CSS Bundle */

/* --- css/variables.css --- */
    :root {
      color-scheme: dark;
      --ink: #020817;
      --navy: #03142d;
      --navy-2: #062b59;
      --blue: #006dff;
      --blue-2: #00a8ff;
      --cyan: #54e8ff;
      --ice: #eafaff;
      --muted: #9fc9e5;
      --green: #6fffc8;
      --yellow: #ffe36a;
      --danger: #ff6b91;
      --ease: cubic-bezier(.16, .88, .25, 1);
      --mouse-x: 75%;
      --mouse-y: 25%;
    }

    * {
      box-sizing: border-box;
    }

    html {
      overflow-x: hidden;
      background: var(--ink);
      scroll-behavior: smooth;
      scrollbar-gutter: stable;
    }

    body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ice);
  background: linear-gradient(145deg, #010713, #031a3a 58%, #062e5c);
  font-family: "Chakra Petch", sans-serif;
}

.ambient-spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(41, 206, 255, .22), transparent 25rem);
  will-change: transform;
}

    html.locked,
    body.locked {
      overflow: hidden !important;
    }

    button,
    input,
    select {
      font: inherit;
    }

    button {
      color: inherit;
    }

    ::selection {
      color: var(--navy);
      background: var(--cyan);
    }

    :focus-visible {
      outline: 2px solid var(--cyan) !important;
      outline-offset: 3px !important;
    }

@media (max-width: 980px) {
  .ambient-spotlight {
    display: none !important;
  }
}


/* --- css/base.css --- */
/* =========================================================
   BASE & ATMOSPHERE
   ========================================================= */

    /* ---------------- BACKGROUND ---------------- */

    .world {
      position: fixed;
      z-index: -10;
      inset: 0;
      overflow: hidden;
      pointer-events: none;
    }

    .world::before {
      content: "";
      position: absolute;
      inset: -25%;
      opacity: .52;
      background:
        repeating-radial-gradient(
          ellipse at 70% 120%,
          transparent 0 34px,
          rgba(89, 221, 255, .32) 36px,
          transparent 39px 64px
        );
      transform: perspective(700px) rotateX(64deg) translateY(22%);
      animation: water 12s linear infinite;
    }

    .world::after {
      content: "";
      position: absolute;
      inset: 0;
      opacity: .2;
      mix-blend-mode: screen;
      background-image:
        linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.15) 1px, transparent 1px);
      background-size: 70px 70px;
      mask-image: linear-gradient(to bottom, transparent, #000);
      transform: perspective(600px) rotateX(58deg) scale(1.5) translateY(28%);
    }

    .moon {
      position: absolute;
      top: 8%;
      right: 8%;
      width: min(38vw, 520px);
      aspect-ratio: 1;
      opacity: .52;
      border-radius: 50%;
      background:
        radial-gradient(circle at 43% 42%, #dffbff 0 3%, transparent 4%),
        radial-gradient(circle at 60% 62%, rgba(4,55,105,.45) 0 5%, transparent 6%),
        radial-gradient(circle, #52dcff, #087dff 45%, transparent 68%);
      filter: blur(.3px);
      box-shadow: 0 0 110px rgba(0, 174, 255, .34);
      animation: moonFloat 7s ease-in-out infinite;
    }

    .slash {
      position: absolute;
      width: 23vw;
      height: 140vh;
      top: -20vh;
      right: 29vw;
      opacity: .08;
      background: white;
      transform: rotate(18deg) skewX(-12deg);
    }

    .bubble {
      position: absolute;
      width: var(--size);
      height: var(--size);
      left: var(--left);
      bottom: -10%;
      opacity: .65;
      border: 1.5px solid rgba(166, 238, 255, .85);
      border-radius: 48% 52% 58% 42%;
      box-shadow: 0 0 12px rgba(84, 232, 255, 0.45);
      animation: bubble var(--duration) linear infinite;
      animation-delay: var(--delay);
    }

    /* Pause ambient background animations when modal is open to conserve CPU/GPU */
    body:has(.detail.open) .world::before,
    body:has(.detail.open) .moon,
    body:has(.detail.open) .bubble {
      animation-play-state: paused;
    }


/* =========================================================
   ANIMATIONS & RESPONSIVE GLOBAL
   ========================================================= */

    /* ---------------- ANIMATIONS ---------------- */

    .content-change {
      animation: contentChange 430ms var(--ease);
    }

    @keyframes contentChange {
      0% {
        opacity: 0;
        transform: translateX(45px) skewX(-4deg);
        filter: blur(7px);
      }
      100% {
        opacity: 1;
        transform: translateX(0) skewX(0);
        filter: blur(0);
      }
    }

    @keyframes wipeAcross {
      0% {
        transform: translateX(-135%) skewX(-16deg);
      }
      52% {
        transform: translateX(0) skewX(-16deg);
      }
      100% {
        transform: translateX(135%) skewX(-16deg);
      }
    }

    @keyframes selectorPulse {
      50% {
        transform: translateY(-50%) translateX(-5px) scale(.82);
      }
    }

    @keyframes water {
      to {
        transform: perspective(700px) rotateX(64deg) translateY(32%);
      }
    }

    @keyframes previewWater {
      to {
        transform: rotate(-4deg) translateY(60px);
      }
    }

    @keyframes moonFloat {
      50% {
        transform: translateY(13px) scale(1.025);
      }
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    @keyframes bubble {
      from {
        transform: translateY(0) rotate(0) scale(.7);
      }
      to {
        transform: translateY(-125vh) rotate(210deg) scale(1.2);
      }
    }

    /* ---------------- RESPONSIVE ---------------- */

    @media (max-width: 980px) {
      .archive-stage {
        grid-template-columns: 1fr;
        margin-top: 25px;
      }

      .command-area {
        padding: 20px 5vw 0;
      }

      .project-list {
        max-width: none;
      }

      .preview {
        min-height: 500px;
        margin: 0 3vw;
      }
    }

    @media (max-width: 640px) {
      .topbar {
        height: 60px;
        padding: 0 14px;
      }

      .topbar.is-scrolled {
        height: 56px;
      }

      .brand-title {
        display: none;
      }

      .mode-switch button {
        padding: 8px 9px;
        font-size: 8px;
      }

      .reload-layout {
        padding: 105px 12px 35px;
      }

      .intro {
        margin-left: 15px;
      }

      .intro h1 {
        font-size: clamp(3.5rem, 19vw, 5.6rem);
      }

      .intro-note {
        margin-left: 10px;
      }

      .command-area {
        padding-left: 0;
      }

      .command-heading {
        margin-left: 45px;
      }

      .project-button {
        grid-template-columns: 42px 1fr auto;
        min-height: 65px;
        padding-right: 13px;
      }

      .project-button:hover,
      .project-button.selected {
        transform: translateX(12px) rotate(-1deg) scale(1.025);
      }

      .project-number {
        width: 39px;
        height: 37px;
      }

      .preview {
        min-height: 455px;
        margin: 0;
      }

      .preview::before {
        inset: 3.6% 0;
      }

      .preview-shape {
        inset: 4% 0;
      }

      .preview-content {
        left: 7%;
        right: 7%;
        bottom: 10%;
      }

      .preview-content h2 {
        font-size: 2.75rem;
      }

      .preview-symbol {
        font-size: 8rem;
      }

      .open-project {
        right: 9px;
        bottom: -1px;
        width: 82px;
        height: 82px;
      }

      .detail-art {
        inset: 0;
        opacity: .3;
        clip-path: none;
      }

      .detail-inner {
        width: calc(100% - 28px);
        padding-top: 110px;
      }

      .detail-title {
        font-size: clamp(3.5rem, 20vw, 6rem);
      }

      .detail-card {
        padding: 22px 18px 42px;
      }

      .detail-info {
        grid-template-columns: 1fr;
      }

      .detail-actions {
        flex-direction: column;
      }

      .classic-heading h1 {
        font-size: clamp(2.2rem, 12vw, 3.8rem);
      }
    }

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

/* =========================================================
   PRINT STYLESHEET (Clean Ink-Friendly Export)
   ========================================================= */

    @media print {
      *,
      *::before,
      *::after {
        background: transparent !important;
        color: #111 !important;
        box-shadow: none !important;
        text-shadow: none !important;
        filter: none !important;
      }

      html,
      body {
        background: #fff !important;
        color: #111 !important;
        font-size: 11pt;
        line-height: 1.4;
      }

      .world,
      .water-intro,
      .p3r-enter-slash,
      .circle-transition,
      .circle-close-arc,
      .topbar,
      .mode-switch,
      .skip-water-intro,
      .action-button,
      .gallery-modal,
      .gallery-modal-pagination,
      .close-detail,
      .patch-drawer-close,
      .command-action-buttons,
      .classic-filter-bar,
      .classic-pagination,
      .highlight-actions,
      .quick-menu-trigger,
      .ambient-mesh {
        display: none !important;
      }

      main,
      #mainContent,
      .reload-layout,
      .classic-layout,
      .guide-layout,
      .detail,
      .detail-screen,
      .detail-inner {
        position: static !important;
        overflow: visible !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        transform: none !important;
        clip-path: none !important;
        opacity: 1 !important;
        visibility: visible !important;
      }

      h1, h2, h3 {
        page-break-after: avoid;
        break-after: avoid;
      }

      .classic-card,
      .guide-card,
      .patch-item,
      .detail-card {
        page-break-inside: avoid;
        break-inside: avoid;
        border: 1px solid #ddd !important;
        margin-bottom: 1rem !important;
        padding: 0.75rem !important;
      }

      a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        color: #555 !important;
      }

      a[href^="#"]::after,
      a[href^="javascript:"]::after {
        content: "";
      }
    }


/* =========================================================
   P3R MENU ENTRANCE TRANSITION (POST-WATER DROP)
   ========================================================= */

.p3r-enter-slash {
  position: fixed;
  inset: -60%;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    130deg,
    transparent 42%,
    rgba(84, 232, 255, 0.4) 47%,
    rgba(255, 255, 255, 0.95) 49.5%,
    #54e8ff 50.5%,
    rgba(0, 168, 255, 0.6) 52%,
    transparent 57%
  );
  transform: rotate(-25deg) translateX(-130%);
  filter: drop-shadow(0 0 30px #54e8ff);
}

body.site-ready .p3r-enter-slash {
  animation: p3rMenuSlashSweep 0.52s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.is-entering {
  overflow: hidden;
}

body.is-entering .world {
  opacity: 0;
}

body.is-entering .topbar,
body.is-entering .intro,
body.is-entering .project-button,
body.is-entering .preview,
body.is-entering .scroll-cue,
body.is-entering .p3r-stat-banner-wrap {
  opacity: 0;
  visibility: hidden;
}

body.site-ready .world {
  animation: siteWorldReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.site-ready .topbar {
  visibility: visible;
  animation: p3rTopbarDrop 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.site-ready .intro {
  visibility: visible;
  animation: p3rTitleSlide 0.46s 0.06s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.site-ready .project-list > :nth-child(1) {
  visibility: visible;
  animation: p3rBtnStagger 0.40s 0.10s cubic-bezier(0.16, 1, 0.3, 1) both;
}
body.site-ready .project-list > :nth-child(2) {
  visibility: visible;
  animation: p3rBtnStagger 0.40s 0.14s cubic-bezier(0.16, 1, 0.3, 1) both;
}
body.site-ready .project-list > :nth-child(3) {
  visibility: visible;
  animation: p3rBtnStagger 0.40s 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
}
body.site-ready .project-list > :nth-child(4) {
  visibility: visible;
  animation: p3rBtnStagger 0.40s 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}
body.site-ready .project-list > :nth-child(5) {
  visibility: visible;
  animation: p3rBtnStagger 0.40s 0.26s cubic-bezier(0.16, 1, 0.3, 1) both;
}
body.site-ready .project-list > :nth-child(6) {
  visibility: visible;
  animation: p3rBtnStagger 0.40s 0.30s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.site-ready .preview {
  visibility: visible;
  animation: p3rPreviewSwoop 0.52s 0.20s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.site-ready .p3r-stat-banner-wrap {
  visibility: visible;
  animation: p3rStatBannerPop 0.44s 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.site-ready .scroll-cue {
  visibility: visible;
  animation: p3rScrollCuePop 0.42s 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Once animated, clear animations so hover transforms aren't overridden */
body.site-animated .topbar,
body.site-animated .intro,
body.site-animated .project-button,
body.site-animated .preview,
body.site-animated .p3r-stat-banner-wrap,
body.site-animated .scroll-cue {
  animation: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.water-intro {
  position: fixed;
  z-index: 9999;
  inset: 0;
  overflow: hidden;
  visibility: visible;
  opacity: 1;
  background: #010713;
  pointer-events: auto;
  transition:
    opacity .85s cubic-bezier(.4,0,.2,1),
    visibility 0s .85s;
}

.water-intro.finished {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.intro-white {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 60% 30%,
      rgba(41, 206, 255, .2) 0%,
      transparent 32rem
    ),
    linear-gradient(145deg, #010713, #031a3a 58%, #062e5c);
}

.water-layer {
  position: absolute;
  right: -12%;
  bottom: -4%;
  left: -12%;
  height: 116%;
  color: #21aeee;
  transform: translateY(0);
  transform-origin: bottom;
  will-change: transform;
}

.water-wave {
  position: absolute;
  top: 0;
  left: -25%;
  display: block;
  width: 150%;
  height: 180px;
  overflow: visible;
  fill: currentColor;
  filter: drop-shadow(0 -2px 0 rgba(255,255,255,.13));
  animation: waterWaveHorizontal 2.8s linear infinite;
}

.water-fill {
  position: absolute;
  top: 172px;
  right: 0;
  bottom: 0;
  left: 0;
  background: currentColor;
}

.water-layer-back {
  z-index: 2;
  color: #7acbee;
  opacity: .94;
  animation:
    waterLevelDown 2.35s .58s cubic-bezier(.72,.02,.22,1) forwards;
}

.water-layer-back .water-wave {
  height: 156px;
  animation-duration: 4.1s;
}

.water-layer-middle {
  z-index: 3;
  color: #42b9e9;
  opacity: .94;
  animation:
    waterLevelDown 2.3s .71s cubic-bezier(.72,.02,.22,1) forwards;
}

.water-layer-middle .water-wave {
  left: -30%;
  width: 160%;
  height: 168px;
  animation-name: waterWaveHorizontalReverse;
  animation-duration: 3.25s;
}

.water-layer-front {
  z-index: 4;
  color: #069fe1;
  animation:
    waterLevelDown 2.25s .84s cubic-bezier(.72,.02,.22,1) forwards;
}

.water-layer-front .water-wave {
  height: 184px;
  animation-duration: 2.7s;
}

.water-layer-front .water-fill {
  background:
    radial-gradient(
      ellipse at 35% 4%,
      rgba(255,255,255,.08),
      transparent 23%
    ),
    linear-gradient(
      180deg,
      #069fe1 0%,
      #008bd6 48%,
      #0066bb 100%
    );
}

.water-bubbles {
  position: absolute;
  inset: 100px 0 0;
  overflow: hidden;
}

.water-bubbles i {
  position: absolute;
  left: var(--x);
  bottom: -50px;
  width: var(--size);
  height: var(--size);
  opacity: 0;
  border: 2px solid rgba(230,251,255,.58);
  border-radius: 46% 54% 58% 42%;
  animation: waterBubbleRise 3.6s var(--delay) linear infinite;
}

.water-intro-label {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 15px;
  opacity: 0;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .8), 0 0 35px rgba(84, 232, 255, .3);
  transform: translate(-50%,-50%) rotate(-2deg);
  animation: waterLabelAppear 1.65s .12s cubic-bezier(.16,.85,.23,1) both;
}

.water-intro-label > span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 64px;
  color: white;
  background: #031a3a;
  border: 1px solid rgba(84, 232, 255, .6);
  font-family: Inter,sans-serif;
  font-size: 28px;
  font-weight: 900;
  clip-path: polygon(7% 0,100% 9%,87% 100%,0 84%);
  box-shadow: 9px 8px 0 #009dff, 0 0 25px rgba(0, 157, 255, .4);
  overflow: hidden;
}

.water-intro-label > span img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: polygon(7% 0,100% 9%,87% 100%,0 84%);
  display: block;
}

.water-intro-label strong {
  display: block;
  font-family: Inter,sans-serif;
  font-size: clamp(15px,2.4vw,27px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.04em;
  white-space: nowrap;
  color: #ffffff;
}

.water-intro-label small {
  display: block;
  margin-top: 8px;
  color: #54e8ff;
  font-family: Inter,sans-serif;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .28em;
  text-shadow: 0 0 10px rgba(84, 232, 255, .6);
}

.skip-water-intro {
  position: absolute;
  z-index: 15;
  right: 25px;
  bottom: 22px;
  padding: 9px 17px;
  cursor: pointer;
  color: rgba(255,255,255,.84);
  background: rgba(2,34,71,.36);
  border: 1px solid rgba(255,255,255,.55);
  font-family: Inter,sans-serif;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
  transition: 180ms ease;
}

.skip-water-intro:hover {
  color: #062657;
  background: white;
  transform: translateY(-2px);
}

@keyframes waterLevelDown {
  0% {
    transform: translateY(0);
  }

  16% {
    transform: translateY(-2.5%);
  }

  33% {
    transform: translateY(12%);
  }

  61% {
    transform: translateY(52%);
  }

  78% {
    transform: translateY(69%);
  }

  88% {
    transform: translateY(66%);
  }

  100% {
    transform: translateY(112%);
  }
}

@keyframes waterWaveHorizontal {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-20%);
  }
}

@keyframes waterWaveHorizontalReverse {
  from {
    transform: translateX(-18%);
  }

  to {
    transform: translateX(2%);
  }
}

@keyframes waterBubbleRise {
  0% {
    opacity: 0;
    transform: translate3d(0,40px,0) scale(.5);
  }

  16% {
    opacity: .7;
  }

  80% {
    opacity: .42;
  }

  100% {
    opacity: 0;
    transform: translate3d(35px,-105vh,0) rotate(140deg) scale(1.25);
  }
}

@keyframes waterLabelAppear {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translate(-50%,-43%) rotate(-6deg) scale(.83);
  }

  24%,
  66% {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%,-50%) rotate(-2deg) scale(1);
  }

  100% {
    opacity: 0;
    filter: blur(3px);
    transform: translate(-50%,-62%) rotate(1deg) scale(1.04);
  }
}

@keyframes siteWorldReveal {
  from {
    opacity: 0;
    filter: saturate(.65) blur(12px);
    transform: scale(1.07);
  }

  to {
    opacity: 1;
    filter: saturate(1) blur(0);
    transform: scale(1);
  }
}

@keyframes p3rTopbarDrop {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes p3rTitleSlide {
  0% {
    opacity: 0;
    transform: translateX(-40px) rotate(-4deg);
  }
  100% {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
  }
}

@keyframes p3rBtnStagger {
  0% {
    opacity: 0;
    transform: translateY(24px) translateX(-18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) translateX(0);
  }
}

@keyframes p3rPreviewSwoop {
  0% {
    opacity: 0;
    transform: translateX(50px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes p3rStatBannerPop {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes p3rScrollCuePop {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* =========================================================
   KEYFRAMES
   ========================================================= */

@keyframes p3rCircleExpand {
  0% {
    transform: translate3d(-50%, 50%, 0) scale(0);
    opacity: 1;
  }
  100% {
    transform: translate3d(-50%, 50%, 0) scale(1.06);
    opacity: 1;
  }
}

@keyframes p3rDetailWipeIn {
  0% {
    clip-path: circle(0% at 0% 100%);
  }
  100% {
    clip-path: circle(150% at 0% 100%);
  }
}

@keyframes p3rArcPulse {
  0% {
    opacity: 0;
    transform: translate3d(-50%, 50%, 0) scale(0.02);
  }
  25% {
    opacity: 1;
  }
  75% {
    opacity: 1;
    transform: translate3d(-50%, 50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, 50%, 0) scale(1.06);
  }
}

@keyframes p3rShardBurst {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.2);
  }
  20% {
    opacity: 1;
  }
  75% {
    opacity: 0.95;
    transform: translate3d(var(--s-dist-x), calc(-1 * var(--s-dist-y)), 0) rotate(var(--s-rot)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--s-dist-x) * 1.1), calc(-1 * var(--s-dist-y) * 1.1), 0) rotate(calc(var(--s-rot) * 1.25)) scale(0.85);
  }
}

@keyframes p3rShardExit {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.3);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--s-dist-x), calc(-1 * var(--s-dist-y)), 0) rotate(var(--s-rot)) scale(0.8);
  }
}

@keyframes p3rBubbleRise {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.6);
  }
  35% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: translateY(-55vh) scale(1.2);
  }
}

@keyframes p3rLabelSlide {
  0% {
    opacity: 0;
    transform: translate(-40px, 40px) rotate(-6deg) scale(0.85);
  }
  28% {
    opacity: 1;
    transform: translate(0, 0) rotate(-3deg) scale(1.02);
  }
  58% {
    opacity: 1;
    transform: translate(0, 0) rotate(-3deg) scale(1);
  }
  72% {
    opacity: 0;
    transform: translate(15px, -15px) rotate(-1deg) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: translate(20px, -20px) rotate(0deg) scale(1.06);
  }
}

@keyframes p3rOverlayFade {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes p3rDetailWipeOut {
  0% {
    clip-path: circle(150% at 0% 100%);
    opacity: 1;
  }
  99% {
    clip-path: circle(0% at 0% 100%);
    opacity: 1;
  }
  100% {
    clip-path: circle(0% at 0% 100%);
    opacity: 0;
  }
}

@keyframes p3rCloseArcShrink {
  0% {
    opacity: 1;
    transform: translate3d(-50%, 50%, 0) scale(1.08);
  }
  85% {
    opacity: 1;
    transform: translate3d(-50%, 50%, 0) scale(0.04);
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, 50%, 0) scale(0);
  }
}




@media (max-width: 640px) {
  .world::before, .moon, .bubble { display: none !important; animation: none !important; }
}


/* --- css/components/header.css --- */
    /* ---------------- TOP BAR ---------------- */

    .topbar {
      position: fixed;
      z-index: 30;
      top: 0;
      left: 0;
      right: 0;
      width: 100%;
      height: 72px;
      padding: 0 28px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      pointer-events: none;
      background: transparent;
      border-bottom: 1px solid transparent;
      box-shadow: none;
      backdrop-filter: blur(0px);
      -webkit-backdrop-filter: blur(0px);
      transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                  border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                  box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                  height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .topbar.is-scrolled {
      background: rgba(1, 9, 24, 0.94);
      backdrop-filter: blur(20px) saturate(160%);
      -webkit-backdrop-filter: blur(20px) saturate(160%);
      box-shadow: 0 10px 32px rgba(0, 0, 0, 0.85);
      height: 66px;
      pointer-events: auto;
    }

    .topbar.is-scrolled::after {
      content: "";
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 1.5px;
      background: linear-gradient(90deg, transparent 0%, rgba(84, 232, 255, 0.35) 15%, rgba(0, 225, 255, 0.85) 50%, rgba(84, 232, 255, 0.35) 85%, transparent 100%);
      box-shadow: 0 0 10px rgba(0, 225, 255, 0.6);
      pointer-events: none;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 13px;
      pointer-events: auto;
    }

    .brand-mark {
      position: relative;
      display: grid;
      place-items: center;
      width: 51px;
      height: 45px;
      color: var(--navy);
      background: var(--ice);
      font-family: Inter, sans-serif;
      font-weight: 900;
      clip-path: polygon(10% 0, 100% 6%, 86% 91%, 0 100%);
      transform: rotate(-5deg);
      box-shadow: 8px 7px 0 rgba(0, 119, 255, .5);
    }

    .brand-mark-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      clip-path: polygon(10% 0, 100% 6%, 86% 91%, 0 100%);
      display: block;
    }

    .brand-mark::after {
      content: "";
      position: absolute;
      width: 15px;
      height: 4px;
      right: -8px;
      bottom: 4px;
      background: var(--cyan);
    }

    .brand-title {
      font-family: Inter, sans-serif;
      font-size: 13px;
      font-weight: 900;
      line-height: .95;
      letter-spacing: .06em;
    }

    .brand-title span {
      display: block;
      margin-top: 6px;
      color: var(--cyan);
      font-size: 8px;
      letter-spacing: .3em;
    }

    .mode-switch {
      display: flex;
      padding: 5px;
      background: rgba(1, 10, 27, .55);
      border: 1px solid rgba(255,255,255,.17);
      backdrop-filter: blur(16px);
      transform: skewX(-8deg);
      pointer-events: auto;
    }

    .mode-switch button,
    .mode-switch a {
      padding: 9px 13px;
      cursor: pointer;
      color: #9ec5df;
      background: transparent;
      border: 0;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: .08em;
      transition: 180ms ease;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
    }

    .mode-switch button.active,
    .mode-switch a.active {
      color: var(--navy);
      background: var(--cyan);
    }

    .mode-switch button:hover,
    .mode-switch a:hover {
      color: #ffffff;
      background: rgba(84, 232, 255, 0.2);
    }

    @media (max-width: 768px) {
      .topbar {
        height: 62px;
        padding: 0 16px;
      }
      .brand-mark {
        width: 44px;
        height: 40px;
      }
      .brand-title {
        font-size: 11px;
      }
      .mode-switch {
        padding: 3px;
        transform: skewX(-5deg);
      }
      .mode-switch button,
      .mode-switch a {
        padding: 7px 9px;
        font-size: 8.5px;
        letter-spacing: .04em;
      }
    }

    @media (max-width: 480px) {
      .topbar {
        height: 58px;
        padding: 0 10px;
      }
      .brand-title {
        display: none;
      }
      .mode-switch {
        transform: none;
      }
      .mode-switch button,
      .mode-switch a {
        padding: 6px 7px;
        font-size: 8px;
        letter-spacing: 0.01em;
      }
    }

    .nav-extra {
      display: inline;
    }

    @media (max-width: 520px) {
      .nav-extra {
        display: none;
      }
    }


@media (max-width: 640px) {
  .topbar.is-scrolled { backdrop-filter: blur(5px) saturate(120%) !important; -webkit-backdrop-filter: blur(5px) saturate(120%) !important; }
}


/* --- css/components/highlight.css --- */
    /* ---------------- RELOAD LAYOUT ---------------- */

    .reload-layout {
      position: relative;
      width: min(1500px, 100%);
      min-height: 100vh;
      margin: auto;
      padding: 78px 5vw 20px;
      display: flex;
      flex-direction: column;
      box-sizing: border-box;
    }

    .reload-layout[hidden],
    .classic-layout[hidden] {
      display: none !important;
    }

    

    .intro {
      position: relative;
      z-index: 2;
      max-width: 720px;
      margin-left: 5vw;
      margin-bottom: 4px;
      pointer-events: none;
    }

    .intro-kicker {
      display: flex;
      align-items: center;
      gap: 12px;
      color: var(--cyan);
      font-family: Inter, sans-serif;
      font-size: 11px;
      font-weight: 900;
      letter-spacing: .24em;
    }

    .intro-kicker::before {
      content: "";
      width: 54px;
      height: 5px;
      background: var(--cyan);
      clip-path: polygon(0 30%, 100% 0, 90% 100%, 4% 70%);
    }

    .intro h1 {
      position: relative;
      margin: 4px 0 8px;
      font-family: Inter, sans-serif;
      font-size: clamp(2.8rem, 5.2vw, 4.8rem);
      font-weight: 900;
      line-height: .86;
      letter-spacing: -.085em;
      text-transform: uppercase;
      transform: rotate(-2deg);
      text-shadow:
        6px 6px 0 #006bdf,
        12px 13px 0 rgba(0, 25, 75, .48);
    }

    .intro h1 span {
      display: inline-block;
      color: transparent;
      -webkit-text-stroke: 2px var(--cyan);
      transform: translateX(1.6vw);
    }

    .intro-note {
      width: min(520px, 92%);
      margin: 26px 0 0 5vw;
      padding: 9px 18px 9px 20px;
      color: #c0e2f8;
      background: rgba(0, 26, 60, 0.65);
      border-left: 4px solid var(--cyan);
      font-size: 12px;
      line-height: 1.55;
      transform: skewX(-7deg);
      backdrop-filter: blur(10px);
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .intro-note span {
      display: block;
      transform: skewX(7deg);
    }

    .archive-stage {
      display: grid;
      grid-template-columns: minmax(360px, .95fr) minmax(420px, 1.05fr);
      gap: 3.5vw;
      align-items: center;
      min-height: 430px;
      margin-top: 18px;
      margin-bottom: 8px;
    }

    /* ---------------- COMMAND MENU ---------------- */

    .command-area {
      position: relative;
      z-index: 5;
      align-self: center;
      padding: 0 0 0 4vw;
    }

    .command-area::before {
      content: "";
      position: absolute;
      z-index: -2;
      width: 720px;
      height: 530px;
      top: 50%;
      left: -250px;
      opacity: .85;
      background:
        radial-gradient(ellipse, rgba(0, 144, 255, .55), transparent 62%);
      transform: translateY(-50%) rotate(-8deg);
      filter: blur(9px);
    }

    .command-heading {
      margin: 0 0 12px 48px;
      color: rgba(221, 249, 255, .75);
      font-family: Inter, sans-serif;
      font-size: 11px;
      font-weight: 900;
      letter-spacing: .22em;
    }

    .project-list {
      display: grid;
      gap: 5px;
      max-width: 560px;
    }

    .project-button {
      position: relative;
      display: grid;
      grid-template-columns: 46px 1fr auto;
      align-items: center;
      gap: 12px;
      width: 100%;
      min-height: 56px;
      padding: 6px 20px 6px 14px;
      overflow: visible;
      cursor: pointer;
      text-align: left;
      background: transparent;
      border: 0;
      isolation: isolate;
      transition:
        transform 240ms var(--ease),
        padding 240ms var(--ease);
    }

    .project-button::before {
      content: "";
      position: absolute;
      z-index: -1;
      inset: 0;
      opacity: .55;
      background: linear-gradient(90deg,
        rgba(0, 30, 72, .95),
        rgba(0, 96, 185, .48) 72%,
        transparent);
      clip-path: polygon(2% 0%, 98% 4%, 100% 96%, 0% 100%);
      transition:
        opacity 220ms ease,
        transform 240ms var(--ease),
        background 220ms ease,
        box-shadow 220ms ease;
    }

    .project-button::after {
      content: "";
      position: absolute;
      z-index: -2;
      inset: -3px -5px;
      opacity: 0;
      background: #ffffff;
      clip-path: polygon(1.5% 0%, 98.5% 3.5%, 100% 96.5%, 0% 100%);
      transform: scaleX(.88) translateX(-5%);
      transform-origin: left;
      transition: 240ms var(--ease);
    }

    .project-button:hover,
    .project-button.selected {
      z-index: 4;
      padding-left: 18px;
      transform: translateX(12px) rotate(-1deg);
    }

    .project-button:hover::before,
    .project-button.selected::before {
      opacity: 1;
      background: linear-gradient(90deg, #0266d6 0%, #009fff 70%, #2beaff 100%);
      box-shadow: 0 8px 30px rgba(0, 145, 255, .45);
    }

    .project-button:hover::after,
    .project-button.selected::after {
      opacity: 1;
      transform: scaleX(1) translateX(0);
    }

    .project-number {
      position: relative;
      display: grid;
      place-items: center;
      width: 44px;
      height: 38px;
      color: var(--navy);
      background: var(--ice);
      font-family: Inter, sans-serif;
      font-size: 15px;
      font-weight: 900;
      clip-path: polygon(11% 0, 100% 8%, 87% 100%, 0 83%);
      transform: rotate(-5deg);
      flex-shrink: 0;
      overflow: hidden;
    }

    .project-number-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .project-copy {
      min-width: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .project-copy strong {
      display: block;
      overflow: hidden;
      font-family: Inter, sans-serif;
      font-size: clamp(15px, 1.5vw, 19px);
      font-weight: 900;
      letter-spacing: -.03em;
      line-height: 1.15;
      text-overflow: ellipsis;
      text-transform: uppercase;
      white-space: nowrap;
      color: #ffffff;
    }

    .project-copy small {
      display: block;
      margin-top: 4px;
      color: #8ed6ff;
      font-family: "Chakra Petch", Inter, sans-serif;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: .03em;
      line-height: 1.2;
      transition: color 200ms ease;
    }

    .project-button:hover .project-copy small,
    .project-button.selected .project-copy small {
      color: #ffffff;
      text-shadow: 0 1px 4px rgba(0, 18, 50, .85);
    }

    .project-button:hover .project-copy strong,
    .project-button.selected .project-copy strong {
      color: #ffffff;
      text-shadow: 0 2px 8px rgba(0, 20, 60, .8);
    }

    .project-tag {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 4px 11px;
      color: var(--navy);
      font-family: "Chakra Petch", Inter, sans-serif;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .02em;
      clip-path: polygon(4% 0, 100% 8%, 95% 100%, 0 85%);
      transform: rotate(-2deg);
      white-space: nowrap;
      transition: all 200ms ease;
    }

    .project-tag.tag-patch,
    .project-tag.tag-cyan,
    .project-tag.tag-blue {
      background: var(--cyan);
      color: var(--navy);
      box-shadow: 0 2px 8px rgba(84, 232, 255, .35);
    }

    .project-tag.tag-complete,
    .project-tag.tag-green {
      background: var(--green);
      color: var(--navy);
      box-shadow: 0 2px 8px rgba(111, 255, 200, .35);
    }

    .project-tag.tag-queue,
    .project-tag.tag-yellow {
      background: var(--yellow);
      color: var(--navy);
      box-shadow: 0 2px 8px rgba(255, 227, 106, .35);
    }

    .project-tag.tag-red {
      background: #ff4d6d;
      color: #ffffff;
      box-shadow: 0 2px 8px rgba(255, 77, 109, .4);
    }

    .project-tag.tag-purple {
      background: #c084fc;
      color: #1a0538;
      box-shadow: 0 2px 8px rgba(192, 132, 252, .4);
    }

    .project-tag.tag-orange {
      background: #ff9f43;
      color: #2b1200;
      box-shadow: 0 2px 8px rgba(255, 159, 67, .4);
    }

    .project-button.selected .project-tag {
      box-shadow: 0 3px 12px rgba(0, 18, 50, .5);
      border: 1px solid rgba(0, 20, 60, .35);
    }

    .project-button.selected .project-tag.tag-patch,
    .project-button.selected .project-tag.tag-cyan,
    .project-button.selected .project-tag.tag-blue {
      background: #ffffff;
      color: #022b68;
    }

    .project-button.selected .project-tag.tag-complete,
    .project-button.selected .project-tag.tag-green {
      background: var(--green);
      color: var(--navy);
    }

    .project-button.selected .project-tag.tag-queue,
    .project-button.selected .project-tag.tag-yellow {
      background: var(--yellow);
      color: var(--navy);
    }

    .project-button.selected .project-tag.tag-red {
      background: #ff4d6d;
      color: #ffffff;
    }

    .project-button.selected .project-tag.tag-purple {
      background: #c084fc;
      color: #1a0538;
    }

    .project-button.selected .project-tag.tag-orange {
      background: #ff9f43;
      color: #2b1200;
    }

    .selector {
      position: absolute;
      left: -22px;
      top: 50%;
      width: 26px;
      height: 26px;
      opacity: 0;
      background: var(--cyan);
      clip-path: polygon(0 16%, 100% 50%, 0 84%, 24% 50%);
      transform: translateY(-50%) translateX(-16px);
      transition: 220ms var(--ease);
      filter: drop-shadow(0 0 8px var(--cyan));
    }

    .project-button.selected .selector {
      opacity: 1;
      transform: translateY(-50%) translateX(0);
      animation: selectorPulse 1.1s ease-in-out infinite;
    }

    /* ---------------- PREVIEW ---------------- */

    :root {
      --p3r-preview-polygon: polygon(3% 0%, 95% 4%, 100% 20%, 96.5% 96%, 90% 100%, 0% 100%);
    }

    .preview {
      position: relative;
      min-height: 440px;
      margin-right: 3vw;
      isolation: isolate;
    }

    /* P3R Glowing Cyber Frame Outline */
    .preview::before {
      content: "";
      position: absolute;
      z-index: 0;
      inset: 3.6% 0.6% 3.6% 1.6%;
      background: linear-gradient(135deg, rgba(84, 232, 255, 0.75) 0%, rgba(255, 255, 255, 0.5) 40%, rgba(0, 140, 255, 0.4) 100%);
      clip-path: var(--p3r-preview-polygon);
      pointer-events: none;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
      transition: all 0.3s ease;
    }

    .preview-shape {
      position: absolute;
      z-index: 1;
      inset: 4% 1% 4% 2%;
      overflow: hidden;
      background: var(--preview-background);
      clip-path: var(--p3r-preview-polygon);
      transition: background 350ms ease;
    }

    .preview-shape::before {
      content: "";
      position: absolute;
      inset: -20%;
      background:
        radial-gradient(circle at 68% 35%, rgba(255,255,255,.38), transparent 4%),
        repeating-radial-gradient(
          ellipse at 75% 110%,
          transparent 0 31px,
          rgba(193, 247, 255, .22) 33px,
          transparent 36px 55px
        );
      transform: rotate(-4deg);
      animation: previewWater 8s linear infinite;
    }

    .preview-shape::after {
      content: "";
      position: absolute;
      inset: 0;
      background:
        linear-gradient(115deg, rgba(0, 12, 36, .08), transparent 40%),
        linear-gradient(to top, rgba(0, 8, 25, .88), transparent 59%);
    }

    .preview-ring {
      position: absolute;
      z-index: 1;
      width: 310px;
      height: 310px;
      top: 8%;
      right: 7%;
      opacity: .35;
      border: 3px solid var(--cyan);
      border-radius: 50%;
      box-shadow:
        0 0 0 20px rgba(65, 225, 255, .07),
        0 0 0 43px rgba(65, 225, 255, .04);
      animation: spin 18s linear infinite;
    }

    .preview-ring::before,
    .preview-ring::after {
      content: "";
      position: absolute;
      width: 33px;
      height: 8px;
      background: var(--cyan);
    }

    .preview-ring::before {
      top: 26px;
      left: 17px;
      transform: rotate(-38deg);
    }

    .preview-ring::after {
      right: -8px;
      bottom: 96px;
      transform: rotate(70deg);
    }

    .preview-symbol {
      position: absolute;
      z-index: 2;
      top: 14%;
      right: 3%;
      color: rgba(233, 252, 255, .22);
      font-family: Inter, sans-serif;
      font-size: clamp(7.5rem, 16vw, 16rem);
      font-weight: 900;
      line-height: .8;
      letter-spacing: -.12em;
      transform: rotate(5deg);
      text-shadow: 8px 8px 0 rgba(0, 77, 178, .4);
      transition:
        opacity 180ms ease,
        transform 420ms var(--ease);
    }

    /* Character Art Pop-out Layer */
    .preview-character {
      position: absolute;
      z-index: 3;
      inset: 4% 1% 4% 2%; /* Matches .preview-shape exactly */
      pointer-events: none;
      display: none;
      align-items: flex-end;
      justify-content: flex-end;
      overflow: visible;
      /* Top is unclipped so head pops out, bottom & sides clip along .preview-shape's exact polygon */
      clip-path: polygon(0% -100%, 105% -100%, 100% 20%, 96.5% 96%, 90% 100%, 0% 100%, 0% 20%);
      transition: opacity 0.3s ease;
    }

    .preview-character.entering .preview-character-img {
      animation: characterEnterP3R 0.58s cubic-bezier(0.2, 0.9, 0.3, 1) both;
    }

    @keyframes characterEnterP3R {
      0% {
        opacity: 0;
        transform: translateY(42px) scale(0.95) skewX(-2deg);
        filter: blur(3px);
      }
      60% {
        filter: blur(0);
      }
      100% {
        opacity: 1;
        transform: translateY(0) scale(1) skewX(0);
        filter: blur(0);
      }
    }

    .preview-character-transform {
      display: flex;
      align-items: flex-end;
      justify-content: flex-end;
      width: 100%;
      height: 100%;
      transform: translate(var(--char-x, 0px), var(--char-y, 0px)) scale(var(--char-scale, 1));
      transform-origin: bottom right;
      transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
    }

    .preview-character-img {
      width: auto;
      height: 122%; /* Sized to command the frame without overflowing borders */
      max-height: 126%;
      max-width: 100%;
      object-fit: contain;
      object-position: bottom right;
      margin-right: 4%;
      filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.65));
      will-change: transform, opacity;
    }

    .preview-content {
      position: absolute;
      z-index: 5;
      left: 7.5%;
      right: 12%;
      bottom: 7.8%;
      max-width: 520px;
    }

    .status-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 4px 10px;
      color: var(--navy);
      background: var(--green);
      font-family: "Chakra Petch", Inter, sans-serif;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: .02em;
      clip-path: polygon(4% 0, 100% 8%, 95% 100%, 0 85%);
      transform: rotate(-2deg);
      white-space: nowrap;
    }

    .status-pill.tag-patch,
    .status-pill.tag-cyan,
    .status-pill.tag-blue,
    .status-pill.patch {
      background: var(--cyan);
      color: var(--navy);
      box-shadow: 0 2px 8px rgba(84, 232, 255, .35);
    }

    .status-pill.tag-complete,
    .status-pill.tag-green,
    .status-pill.complete {
      background: var(--green);
      color: var(--navy);
      box-shadow: 0 2px 8px rgba(111, 255, 200, .35);
    }

    .status-pill.tag-queue,
    .status-pill.tag-yellow,
    .status-pill.queue,
    .status-pill.developing,
    .status-pill.planned {
      background: var(--yellow);
      color: var(--navy);
      box-shadow: 0 2px 8px rgba(255, 227, 106, .35);
    }

    .status-pill.tag-red {
      background: #ff4d6d;
      color: #ffffff;
      box-shadow: 0 2px 8px rgba(255, 77, 109, .4);
    }

    .status-pill.tag-purple {
      background: #c084fc;
      color: #1a0538;
      box-shadow: 0 2px 8px rgba(192, 132, 252, .4);
    }

    .status-pill.tag-orange {
      background: #ff9f43;
      color: #2b1200;
      box-shadow: 0 2px 8px rgba(255, 159, 67, .4);
    }

    .preview-content h2 {
      max-width: 440px;
      margin: 12px 0 8px;
      font-family: Inter, sans-serif;
      font-size: clamp(2.3rem, 4.4vw, 5rem);
      font-weight: 900;
      line-height: .88;
      letter-spacing: -.075em;
      text-transform: uppercase;
      text-shadow: 6px 6px 0 rgba(0, 74, 170, .65);
      word-break: normal;
      overflow-wrap: break-word;
    }

    .preview-content p {
      max-width: 520px;
      margin: 0;
      color: #cbe7f5;
      font-size: 13px;
      line-height: 1.6;
    }

    .preview-meta {
      display: flex;
      align-items: center;
      gap: 14px;
      margin-top: 12px;
    }

    .preview-bar {
      width: 220px;
      max-width: 48%;
      height: 8px;
      overflow: hidden;
      background: rgba(255,255,255,.17);
      clip-path: polygon(2% 0, 100% 0, 98% 100%, 0 100%);
    }

    .preview-bar span {
      display: block;
      width: 0;
      height: 100%;
      background: linear-gradient(90deg, #0084ff, var(--cyan));
      box-shadow: 0 0 18px var(--cyan);
      transition: width 650ms var(--ease);
    }

    .open-project {
      position: absolute;
      z-index: 8;
      right: -7px;
      bottom: 21%;
      display: grid;
      place-items: center;
      width: 96px;
      height: 96px;
      cursor: pointer;
      color: var(--navy);
      background: var(--ice);
      border: 0;
      clip-path: polygon(50% 0, 100% 35%, 86% 90%, 31% 100%, 0 57%, 13% 15%);
      font-family: Inter, sans-serif;
      font-size: 11px;
      font-weight: 900;
      transform: rotate(5deg);
      transition: 240ms var(--ease);
    }

    .open-project::after {
      content: "→";
      display: block;
      font-size: 27px;
    }

    .open-project:hover {
      color: var(--navy);
      background: var(--cyan);
      transform: rotate(-4deg) scale(1.12);
      filter: drop-shadow(0 12px 18px rgba(0, 191, 255, .45));
    }

    /* ---------------- COMMAND STAT BAR (MATCHING GAME MENU) ---------------- */

    .command-stat-bar-wrapper {
      max-width: 560px;
      width: 100%;
      display: flex;
      justify-content: center;
      margin-top: 10px;
    }

    .command-stat-bar {
      position: relative;
      width: 320px;
      max-width: 100%;
      min-height: 40px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 4px 15px 4px 10px;
      background: transparent;
      border: 0;
      isolation: isolate;
      box-sizing: border-box;
      user-select: none;
      cursor: default;
    }

    /* กรอบนอก / Border frame - clip-path เดียวกับเมนูเกม */
    .command-stat-bar::after {
      content: "";
      position: absolute;
      z-index: -2;
      inset: 0;
      background: linear-gradient(90deg, rgba(84, 232, 255, 0.65) 0%, rgba(255, 255, 255, 0.45) 55%, rgba(84, 232, 255, 0.25) 100%);
      clip-path: polygon(2% 0%, 98% 3.5%, 100% 96.5%, 0% 100%);
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    }

    /* พื้นหลังด้านใน - ย่นเข้ามา 1.5px เพื่อเผยขอบกรอบเฉียง */
    .command-stat-bar::before {
      content: "";
      position: absolute;
      z-index: -1;
      inset: 1.5px 2px;
      background: linear-gradient(90deg,
        rgba(0, 30, 72, .95) 0%,
        rgba(0, 78, 158, .48) 72%,
        rgba(0, 20, 52, .88) 100%);
      clip-path: polygon(2% 0%, 98% 3.5%, 100% 96.5%, 0% 100%);
    }

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

    /* Number Badge matching .project-number */
    .command-stat-badge {
      display: grid;
      place-items: center;
      min-width: 36px;
      width: auto;
      padding: 0 6px;
      height: 28px;
      color: var(--navy);
      background: var(--ice);
      font-family: Inter, sans-serif;
      font-size: 12.5px;
      font-weight: 900;
      clip-path: polygon(11% 0, 100% 8%, 87% 100%, 0 83%);
      transform: rotate(-4deg);
      flex-shrink: 0;
    }

    .command-stat-copy {
      display: flex;
      flex-direction: column;
      line-height: 1.15;
    }

    .command-stat-title {
      font-family: "Chakra Petch", sans-serif;
      font-size: 12px;
      font-weight: 700;
      color: #ffffff;
      letter-spacing: 0.02em;
      white-space: nowrap;
    }

    .command-stat-sub {
      font-family: Inter, sans-serif;
      font-size: 8px;
      font-weight: 800;
      color: #8ed6ff;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .command-stat-divider {
      width: 1px;
      height: 18px;
      background: rgba(84, 232, 255, 0.28);
      margin: 0 6px;
      flex-shrink: 0;
    }

    .command-stat-right {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      line-height: 1.15;
    }

    .command-stat-date-lbl {
      font-family: "Chakra Petch", sans-serif;
      font-size: 9px;
      font-weight: 600;
      color: #8ed6ff;
      letter-spacing: 0.04em;
      white-space: nowrap;
    }

    .command-stat-date-val {
      font-family: "Chakra Petch", Inter, sans-serif;
      font-size: 13.5px;
      font-weight: 800;
      color: var(--cyan);
      letter-spacing: 0.02em;
      white-space: nowrap;
    }

    /* ---------------- SCROLL CUE ---------------- */

    .scroll-cue {
      display: flex;
      justify-content: center;
      margin-top: auto;
      margin-bottom: 20px;
      padding-top: 24px;
      position: relative;
      z-index: 5;
    }

    .scroll-cue-btn {
      display: inline-flex;
      align-items: center;
      gap: 16px;
      padding: 10px 24px 10px 18px;
      background: linear-gradient(135deg, rgba(3, 26, 58, 0.85) 0%, rgba(1, 9, 23, 0.95) 100%);
      border: 1px solid rgba(84, 232, 255, 0.35);
      border-left: 5px solid var(--cyan);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 168, 255, 0.2);
      transform: skewX(-8deg);
      cursor: pointer;
      color: var(--ice);
      transition: all 250ms var(--ease);
      outline: none;
    }

    .scroll-cue-btn:hover {
      transform: skewX(-8deg) translateY(-4px);
      border-color: var(--cyan);
      box-shadow: 0 14px 35px rgba(0, 0, 0, 0.5), 0 0 30px rgba(84, 232, 255, 0.45);
      background: linear-gradient(135deg, rgba(6, 43, 89, 0.95) 0%, rgba(3, 20, 45, 0.98) 100%);
    }

    .scroll-cue-btn > * {
      transform: skewX(8deg);
    }

    .scroll-cue-tag {
      font-family: Inter, sans-serif;
      font-size: 10px;
      font-weight: 900;
      letter-spacing: .2em;
      color: var(--navy);
      background: var(--cyan);
      padding: 4px 8px;
      clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 100%, 0 100%);
    }

    .scroll-cue-title {
      font-family: "Chakra Petch", sans-serif;
      font-size: 14px;
      font-weight: 700;
      letter-spacing: .08em;
      color: var(--ice);
    }

    .scroll-cue-arrow {
      font-size: 12px;
      color: var(--cyan);
      animation: cueBounce 1.8s infinite ease-in-out;
    }

    @keyframes cueBounce {
      0%, 100% {
        transform: skewX(8deg) translateY(0);
      }
      50% {
        transform: skewX(8deg) translateY(5px);
      }
    }

    /* ---------------- RESPONSIVE BREAKPOINTS (HORIZONTAL) ---------------- */

    @media (max-width: 1240px) {
      .archive-stage {
        grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.15fr);
        gap: 20px;
      }
      .command-area {
        padding-left: 1vw;
      }
      .preview {
        margin-right: 1vw;
      }
      .project-button:hover,
      .project-button.selected {
        transform: translateX(8px) rotate(-1deg);
      }
      .preview-character {
        clip-path: polygon(0% -100%, 100% -100%, 100% 20%, 96.5% 96%, 90% 100%, 0% 100%, 0% 20%);
      }
    }

    @media (max-width: 980px) {
      .archive-stage {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-top: 15px;
      }
      .command-area {
        padding: 0;
        max-width: 580px;
        margin: 0 auto;
        width: 100%;
      }
      .command-area::before {
        width: 100%;
        max-width: 480px;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-4deg);
      }
      .command-heading {
        margin-left: 20px;
      }
      .project-list {
        max-width: 100%;
      }
      .preview {
        margin: 0 auto;
        max-width: 580px;
        width: 100%;
        min-height: 220px;
      }
      .project-button:hover,
      .project-button.selected {
        transform: translateX(6px) rotate(-0.5deg);
      }
    }

    @media (max-width: 640px) {
      .archive-stage {
        gap: 24px;
      }
      .preview {
        min-height: 200px;
      }
      .project-button {
        grid-template-columns: 38px 1fr auto;
        gap: 8px;
        padding: 6px 12px 6px 10px;
      }
      .project-number {
        width: 36px;
        height: 32px;
        font-size: 13px;
      }
      .project-copy strong {
        font-size: 14px;
      }
      .project-copy small {
        font-size: 10px;
      }
      .project-tag {
        padding: 3px 8px;
        font-size: 9.5px;
      }
    }

    /* ---------------- RESPONSIVE BREAKPOINTS (VERTICAL COMPACT / SHORT SCREENS) ---------------- */

    @media (max-height: 760px) {
      .reload-layout {
        padding-top: 66px;
        padding-bottom: 8px;
        min-height: auto;
      }
      .intro {
        margin-bottom: 0;
      }
      .intro h1 {
        font-size: clamp(2rem, 3.8vw, 2.9rem);
        margin: 2px 0 4px;
      }
      .intro-note {
        margin: 10px 0 0 5vw;
        padding: 6px 14px;
        font-size: 11px;
      }
      .archive-stage {
        margin-top: 8px;
        margin-bottom: 4px;
        min-height: auto;
      }
      .command-heading {
        margin-bottom: 6px;
      }
      .project-list {
        gap: 3px;
      }
      .project-button {
        min-height: 48px;
        padding: 4px 14px 4px 10px;
      }
      .project-number {
        width: 38px;
        height: 32px;
        font-size: 13px;
      }
      .project-copy strong {
        font-size: 14px;
      }
      .project-copy small {
        font-size: 10px;
        margin-top: 2px;
      }
      .project-tag {
        padding: 2px 8px;
        font-size: 9.5px;
      }
      .preview {
        min-height: 180px;
      }
      .preview-content {
        right: 20%;
      }
      .preview-content h2 {
        font-size: clamp(1.7rem, 6.5vw, 2.3rem);
      }
      .open-project {
        width: 80px;
        height: 80px;
        font-size: 10px;
        right: -2px;
        bottom: 16%;
      }
      .command-stat-bar-wrapper {
        margin-top: 6px;
      }
      .scroll-cue {
        padding-top: 8px;
        margin-bottom: 8px;
      }
      .scroll-cue-btn {
        padding: 6px 16px;
      }
    }

    @media (max-height: 640px) {
      .reload-layout {
        padding-top: 56px;
        padding-bottom: 6px;
      }
      .intro {
        margin-bottom: 6px;
      }
      .intro-kicker {
        font-size: 9.5px;
      }
      .intro h1 {
        font-size: clamp(1.7rem, 3vw, 2.2rem);
        margin: 2px 0 4px;
      }
      .intro-note {
        display: none; /* Hide subtitle note on very short screens so all 6 game buttons remain fully visible in viewport */
      }
      .archive-stage {
        margin-top: 4px;
      }
      .command-heading {
        margin-bottom: 4px;
      }
      .project-button {
        min-height: 42px;
        padding: 3px 12px 3px 8px;
      }
      .preview {
        min-height: 180px;
      }
      .scroll-cue {
        padding-top: 4px;
        margin-bottom: 4px;
      }
    }

@media (max-width: 640px) {
  .preview-character-img { filter: none !important; }
}

@media (max-width: 640px) {
  
@keyframes characterEnterP3RMobile {
  0% { opacity: 0; transform: translateY(42px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.preview-character.entering .preview-character-img {
  animation: characterEnterP3RMobile 0.58s cubic-bezier(0.2, 0.9, 0.3, 1) both !important;
}

}

@media (max-width: 860px) {
  .preview-ring {
    display: none !important;
    animation: none !important;
  }
}


/* --- css/components/classic-grid.css --- */
    /* ---------------- CLASSIC ARCHIVE SECTION ---------------- */

    /* ---------------- CLASSIC ARCHIVE SECTION ---------------- */

    .classic-layout {
      position: relative;
      width: min(1360px, calc(100% - 40px));
      min-height: calc(100vh - 60px);
      margin: 10px auto 25px;
      padding: 30px 0 35px;
      scroll-margin-top: 72px;
      border-top: 1px solid rgba(84, 232, 255, 0.15);
    }

    .classic-heading {
      position: relative;
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 20px;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }

    .classic-heading-text {
      flex: 1;
      min-width: 280px;
    }

    .classic-kicker {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: var(--cyan);
      font-family: Inter, sans-serif;
      font-size: 10px;
      font-weight: 900;
      letter-spacing: .22em;
      margin-bottom: 4px;
    }

    .classic-kicker::before {
      content: "";
      width: 32px;
      height: 3px;
      background: var(--cyan);
      clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
    }

    .classic-heading h1 {
      margin: 2px 0 6px;
      font-family: Inter, sans-serif;
      font-size: clamp(2rem, 3.8vw, 3.2rem);
      font-weight: 900;
      line-height: .88;
      letter-spacing: -.05em;
      text-transform: uppercase;
      transform: skewX(-4deg);
      text-shadow: 4px 5px 0 rgba(0, 109, 255, .5);
    }

    .classic-heading h1 span {
      color: transparent;
      -webkit-text-stroke: 2px var(--cyan);
    }

    .classic-heading p {
      margin: 0;
      color: #8bbce0;
      font-size: 13px;
      max-width: 560px;
      line-height: 1.45;
    }

    /* P3R Search Bar in Header */
    .classic-search-wrap {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 6px;
    }

    /* P3R Sort Bar above Search Box */
    .classic-sort-bar {
      display: flex;
      align-items: center;
      gap: 8px;
      user-select: none;
      margin-bottom: 2px;
    }

    .classic-sort-label {
      font-family: "Chakra Petch", Inter, sans-serif;
      font-size: 11px;
      font-weight: 700;
      color: #6392b8;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }

    .classic-sort-group {
      display: inline-flex;
      align-items: center;
      background: rgba(3, 23, 58, 0.75);
      border: 1px solid rgba(84, 232, 255, 0.22);
      padding: 2px;
      gap: 2px;
      box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
      transform: skewX(-4deg);
    }

    .classic-sort-btn {
      position: relative;
      border: 0;
      background: transparent;
      color: #8bbce0;
      font-family: "Chakra Petch", Inter, sans-serif;
      font-size: 11.5px;
      font-weight: 700;
      letter-spacing: 0.04em;
      padding: 4px 13px;
      cursor: pointer;
      transition: all 0.18s cubic-bezier(0.2, 0.9, 0.3, 1);
      outline: none;
      white-space: nowrap;
    }

    .classic-sort-btn:hover {
      color: #ffffff;
      background: rgba(84, 232, 255, 0.16);
    }

    .classic-sort-btn.is-active {
      color: #020b18;
      background: var(--cyan);
      box-shadow: 0 0 12px rgba(84, 232, 255, 0.55);
      font-weight: 800;
    }

    .classic-search-box {
      display: flex;
      align-items: center;
      gap: 10px;
      width: min(380px, 86vw);
      background: #03173a;
      border: 1.5px solid #0e3d7d;
      padding: 8px 16px;
      clip-path: polygon(3% 0, 100% 0, 97% 100%, 0 100%);
      box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
      transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }

    .classic-search-box:focus-within {
      background: #05204c;
      border-color: var(--cyan);
      box-shadow: 5px 5px 0 #000000, 0 0 14px rgba(84, 232, 255, 0.35);
    }

    .classic-search-icon {
      color: var(--cyan);
      font-size: 14px;
      user-select: none;
      flex-shrink: 0;
    }

    .classic-search-input {
      flex: 1;
      background: transparent;
      border: 0;
      outline: none;
      color: #ffffff;
      font-family: "Chakra Petch", Inter, sans-serif;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.02em;
    }

    .classic-search-input::placeholder {
      color: #6392b8;
      font-size: 12px;
      font-weight: 500;
    }

    .classic-search-clear {
      display: grid;
      place-items: center;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: #092c63;
      border: 0;
      color: var(--cyan);
      font-size: 11px;
      font-weight: 900;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease;
    }

    .classic-search-clear:hover {
      background: var(--cyan);
      color: #00122e;
    }

    .classic-search-count {
      font-family: Inter, sans-serif;
      font-size: 10.5px;
      font-weight: 800;
      color: #8bbce0;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    /* Classic Grid: Compact 6-card layout */
    .classic-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 16px;
      min-height: 606px;
      align-content: start;
    }

    .classic-card {
      position: relative;
      min-height: 295px;
      height: 295px;
      padding: 0;
      overflow: hidden;
      cursor: pointer;
      text-align: left;
      background: var(--card-background);
      border: 1px solid rgba(84, 232, 255, 0.22);
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
      clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
      opacity: 1;
      outline: none;
      transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    }

    .classic-card.entering {
      animation: cardEnterP3R 0.58s cubic-bezier(0.2, 0.9, 0.3, 1) both;
      animation-delay: calc(var(--card-index, 0) * 0.08s);
      will-change: transform, opacity, filter;
    }

    @keyframes cardEnterP3R {
      0% {
        opacity: 0;
        transform: translateY(30px) scale(0.96) skewX(-2deg);
        filter: blur(2px);
      }
      60% {
        filter: blur(0);
      }
      100% {
        opacity: 1;
        transform: translateY(0) scale(1) skewX(0);
        filter: blur(0);
      }
    }

    .classic-card:hover {
      z-index: 5;
      border-color: var(--cyan);
      transform: translateY(-6px) scale(1.015);
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(84, 232, 255, 0.3);
    }

    .classic-card-strip {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 5px;
      background: var(--card-accent, var(--cyan));
      box-shadow: 0 0 14px var(--card-accent, var(--cyan));
      z-index: 3;
    }

    .classic-card::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        linear-gradient(175deg, rgba(1, 9, 25, 0.3) 0%, rgba(1, 7, 20, 0.95) 65%, rgba(0, 4, 12, 0.99) 100%),
        repeating-linear-gradient(
          125deg,
          transparent 0 22px,
          rgba(255, 255, 255, 0.035) 23px 24px
        );
      pointer-events: none;
      z-index: 1;
    }

    .classic-card-number {
      position: absolute;
      top: 12px;
      right: 14px;
      font-family: Inter, sans-serif;
      font-size: 52px;
      font-weight: 900;
      line-height: 0.8;
      letter-spacing: -0.05em;
      color: rgba(255, 255, 255, 0.08);
      pointer-events: none;
      user-select: none;
      z-index: 1;
      transition: color 0.25s ease, transform 0.25s ease;
    }

    .classic-card:hover .classic-card-number {
      color: rgba(84, 232, 255, 0.18);
      transform: translateX(-3px);
    }

    .classic-card-header {
      position: absolute;
      top: 14px;
      left: 16px;
      z-index: 2;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .classic-platform {
      padding: 3px 7px;
      font-family: Inter, sans-serif;
      font-size: 8.5px;
      font-weight: 900;
      letter-spacing: .12em;
      color: rgba(255, 255, 255, 0.9);
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 2px;
    }

    .classic-copy {
      position: absolute;
      inset: auto 0 0;
      padding: 16px 18px 14px;
      z-index: 2;
      width: 100%;
    }

    .classic-copy h2 {
      margin: 0 0 5px;
      font-family: Inter, sans-serif;
      font-size: 19px;
      font-weight: 900;
      line-height: 1.1;
      letter-spacing: -0.02em;
      text-transform: uppercase;
      color: #ffffff;
      transition: color 0.2s ease;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .classic-card:hover .classic-copy h2 {
      color: var(--cyan);
    }

    /* Classic Card Media & Art */
    .classic-card-media {
      position: absolute;
      inset: 0;
      overflow: hidden;
      z-index: 1;
      pointer-events: none;
    }

    .classic-card-cover-art {
      position: absolute;
      right: 0;
      top: 0;
      bottom: 0;
      width: 88%;
      height: 100%;
      object-fit: cover;
      object-position: top center;
      opacity: 1;
      filter: none;
      -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 6%, rgba(0, 0, 0, 0.12) 16%, rgba(0, 0, 0, 0.45) 32%, rgba(0, 0, 0, 0.85) 50%, #000 68%);
      mask-image: linear-gradient(to right, transparent 0%, transparent 6%, rgba(0, 0, 0, 0.12) 16%, rgba(0, 0, 0, 0.45) 32%, rgba(0, 0, 0, 0.85) 50%, #000 68%);
      transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1), filter 0.3s ease;
    }

    .classic-card:hover .classic-card-cover-art {
      transform: scale(1.05) translateX(-6px);
      filter: none;
    }

    /* Version with full scene background (coverbg) */
    .classic-card-cover-art.has-bg {
      width: 88%;
      object-fit: cover;
      object-position: 65% 25%;
      filter: none;
    }

    .classic-card:hover .classic-card-cover-art.has-bg {
      filter: none;
    }

    .classic-card-cover-overlay {
      position: absolute;
      inset: 0;
      background:
        linear-gradient(to right,
          #010a1c 0%,
          #010a1c 16%,
          rgba(1, 10, 28, 0.92) 28%,
          rgba(1, 10, 28, 0.72) 38%,
          rgba(1, 10, 28, 0.42) 48%,
          rgba(1, 10, 28, 0.16) 58%,
          rgba(1, 10, 28, 0.03) 68%,
          transparent 76%
        ),
        linear-gradient(to top, #00040c 18%, rgba(0, 4, 12, 0.5) 40%, transparent 65%);
      pointer-events: none;
    }

    /* Targeted left fade for image with full background */
    .classic-card-cover-overlay.has-bg {
      background:
        linear-gradient(to right,
          #010a1c 0%,
          #010a1c 16%,
          rgba(1, 10, 28, 0.92) 28%,
          rgba(1, 10, 28, 0.72) 38%,
          rgba(1, 10, 28, 0.42) 48%,
          rgba(1, 10, 28, 0.16) 58%,
          rgba(1, 10, 28, 0.03) 68%,
          transparent 76%
        ),
        linear-gradient(to top, #00040c 18%, rgba(0, 4, 12, 0.5) 40%, transparent 65%);
    }

    .classic-card-logo-wrap {
      display: flex;
      align-items: center;
      margin: 0 0 8px;
      min-height: 52px;
    }

    .classic-card-logo-img {
      max-height: 72px;
      max-width: 220px;
      object-fit: contain;
      object-position: left center;
      filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.9));
      transition: transform 0.25s ease, filter 0.25s ease;
    }

    .classic-card:hover .classic-card-logo-img {
      transform: translateY(-3px) scale(1.05);
      filter: drop-shadow(0 8px 18px rgba(84, 232, 255, 0.6));
    }

    .classic-copy p {
      color: #a4c9e3;
      font-size: 12px;
      line-height: 1.45;
      margin: 0 0 10px;
      display: -webkit-box;
      -webkit-line-clamp: 1;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .classic-progress-wrap {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 10px;
    }

    .classic-progress-bar {
      flex: 1;
      height: 5px;
      background: rgba(255, 255, 255, 0.12);
      overflow: hidden;
      transform: skewX(-12deg);
    }

    .classic-progress-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--blue-2), var(--cyan));
      box-shadow: 0 0 8px var(--cyan);
    }

    .classic-progress-text {
      font-family: Inter, sans-serif;
      font-size: 10.5px;
      font-weight: 900;
      color: var(--cyan);
      letter-spacing: 0.05em;
    }

    .classic-card-action {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-top: 9px;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .classic-action-label {
      font-family: Inter, sans-serif;
      font-size: 10.5px;
      font-weight: 900;
      letter-spacing: .15em;
      color: rgba(255, 255, 255, 0.75);
      transition: color 0.2s ease;
    }

    .classic-card:hover .classic-action-label {
      color: var(--cyan);
    }

    .classic-action-arrow {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 20px;
      background: rgba(84, 232, 255, 0.15);
      border: 1px solid rgba(84, 232, 255, 0.4);
      color: var(--cyan);
      font-weight: 900;
      font-size: 12px;
      transform: skewX(-8deg);
      transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    }

    .classic-card:hover .classic-action-arrow {
      background: var(--cyan);
      color: #00122e;
      transform: skewX(-8deg) translateX(3px);
      box-shadow: 0 0 12px var(--cyan);
    }

    /* P3R Pagination */
    .classic-pagination {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      margin-top: 22px;
    }

    .page-nav-btn {
      padding: 7px 18px;
      background: #04193d;
      border: 1px solid #0d3d82;
      color: #8bbce0;
      font-family: Inter, sans-serif;
      font-size: 11px;
      font-weight: 900;
      letter-spacing: 0.1em;
      cursor: pointer;
      clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
      box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.4);
      transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    }

    .page-nav-btn:hover:not(:disabled) {
      background: var(--cyan);
      color: #00122e;
      transform: translateY(-2px);
    }

    .page-nav-btn:disabled {
      opacity: 0.35;
      cursor: not-allowed;
    }

    .page-numbers {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .page-num-btn {
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      background: #03173a;
      border: 1px solid #0b3470;
      color: #8bbce0;
      font-family: Inter, sans-serif;
      font-size: 11.5px;
      font-weight: 900;
      cursor: pointer;
      clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
      box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.4);
      transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
    }

    .page-num-btn:hover {
      background: #072a66;
      color: #ffffff;
      border-color: var(--cyan);
      transform: translateY(-2px);
    }

    .page-num-btn.active {
      background: var(--cyan);
      color: #00122e;
      border-color: var(--cyan);
      box-shadow: 3px 4px 0 #000000;
      transform: translateY(-2px);
    }

    /* Empty State */
    .classic-empty-state {
      grid-column: 1 / -1;
      padding: 50px 20px;
      text-align: center;
      background: #031433;
      border: 1.5px dashed #0e3d7d;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      animation: emptyEnterP3R 0.48s cubic-bezier(0.2, 0.9, 0.3, 1) both;
    }

    @keyframes emptyEnterP3R {
      0% {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
      }
      100% {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .classic-empty-state .empty-icon {
      font-size: 32px;
      color: var(--cyan);
    }

    .classic-empty-state h3 {
      font-family: "Chakra Petch", sans-serif;
      font-size: 20px;
      font-weight: 700;
      color: #ffffff;
      margin: 0;
    }

    .classic-empty-state p {
      font-size: 13px;
      color: #8bbce0;
      margin: 0;
      max-width: 420px;
    }

    .empty-reset-btn {
      margin-top: 8px;
      min-width: 140px;
      padding: 10px 18px;
      font-size: 11px;
    }

    @media (max-width: 980px) {
      .classic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
      }
      .classic-heading {
        flex-direction: column;
        align-items: stretch;
      }
      .classic-search-wrap {
        align-items: stretch;
        width: 100%;
      }
      .classic-search-box {
        width: 100%;
        max-width: 100%;
      }
    }

    @media (max-width: 600px) {
      .classic-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        min-height: auto;
      }
      .classic-card {
        min-height: 250px;
        height: 260px;
      }
      .classic-sort-bar {
        justify-content: space-between;
      }
      .classic-sort-group {
        flex: 1;
      }
      .classic-sort-btn {
        flex: 1;
        padding: 5px 8px;
        font-size: 11px;
        text-align: center;
      }
      .page-num-btn {
        width: 38px;
        height: 38px;
        font-size: 13px;
      }
    }


/* --- css/components/detail-modal.css --- */
/* =========================================================
   DETAIL SCREEN CORE
   ========================================================= */

    /* ---------------- DETAIL SCREEN ---------------- */

    .detail {
      position: fixed;
      z-index: 100;
      inset: 0;
      visibility: hidden;
      overflow: hidden;
      opacity: 0;
      background: transparent;
      pointer-events: none;
    }

    .detail.transitioning,
    .detail.reveal-detail,
    .detail.open,
    .detail.closing {
      visibility: visible !important;
      opacity: 1;
      background: transparent;
      pointer-events: auto !important;
    }

    .detail-screen {
      position: absolute;
      inset: 0;
      overflow-x: hidden;
      overflow-y: auto;
      opacity: 0;
      visibility: hidden;
      background:
        radial-gradient(circle at 80% 20%, rgba(0, 182, 255, .22), transparent 26rem),
        linear-gradient(145deg, #031b3b, #020817 75%);
      z-index: 60;
    }

    .detail-art {
      position: fixed;
      inset: 0 0 0 44%;
      background: var(--detail-background);
      clip-path: polygon(25% 0, 100% 0, 100% 100%, 5% 100%, 0 72%, 16% 45%, 5% 18%);
      opacity: .75;
      pointer-events: none;
    }

    .detail-art::after {
      content: "";
      position: absolute;
      inset: 0;
      background:
        linear-gradient(90deg, #03152e 0, transparent 42%),
        linear-gradient(to top, rgba(1,8,20,.82), transparent);
    }

    .detail-inner {
      position: relative;
      z-index: 3;
      width: min(1260px, calc(100% - 50px));
      margin: auto;
      padding: 95px 0 70px;
    }

    .detail-index {
      color: var(--cyan);
      font-family: Inter, sans-serif;
      font-size: 12px;
      font-weight: 900;
      letter-spacing: .22em;
    }

    .detail-title {
      max-width: 760px;
      margin: 15px 0 22px;
      font-family: Inter, sans-serif;
      font-size: clamp(3.2rem, 6.5vw, 6.8rem);
      font-weight: 900;
      line-height: .78;
      letter-spacing: -.08em;
      text-transform: uppercase;
      text-shadow: 8px 9px 0 #0064d7;
      word-break: normal;
      overflow-wrap: break-word;
    }

    .detail-card {
      position: relative;
      width: min(620px, 100%);
      padding: 24px 28px 42px;
      background: rgba(2, 12, 28, 0.95);
      border: 1px solid #0c2b54;
      backdrop-filter: blur(20px);
      clip-path: polygon(0 0, 98% 1.5%, 100% 96%, 2% 100%);
    }

    /* P3R Left Border Loading Stream Bar */
    .detail-card-stream {
      position: absolute;
      top: 0;
      left: 0;
      bottom: 0;
      width: 5px;
      background: rgba(0, 136, 255, 0.14);
      pointer-events: none;
      z-index: 5;
      overflow: hidden;
    }

    .detail-card-stream-fill {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 0%;
      overflow: hidden;
      background: linear-gradient(180deg, #0055cc 0%, #0088ff 50%, #00e1ff 92%, #ffffff 100%);
      box-shadow: 0 0 10px rgba(0, 225, 255, 0.75), 0 0 20px rgba(0, 136, 255, 0.45);
    }

    /* Charging Spark Tip at the front of the flowing stream */
    .detail-card-stream-fill::after {
      content: "";
      position: absolute;
      bottom: -3px;
      left: -3px;
      right: -3px;
      height: 9px;
      background: #ffffff;
      box-shadow: 0 0 12px #00e1ff, 0 0 24px #0077ff, 0 0 4px #ffffff;
      border-radius: 2px;
      opacity: 0;
      transition: opacity 120ms ease;
    }

    .detail-card-stream-fill.is-flowing {
      animation: detailBorderStream 850ms cubic-bezier(0.14, 0.78, 0.2, 1) forwards;
    }

    .detail-card-stream-fill.is-flowing::after {
      opacity: 1;
    }

    /* Once fully loaded: spark dissolves and solid vibrant bar remains */
    .detail-card-stream-fill.is-loaded {
      height: 100%;
      background: linear-gradient(180deg, #0088ff 0%, #00a8ff 60%, #54e8ff 100%);
      box-shadow: 0 0 8px rgba(84, 232, 255, 0.65), 0 0 16px rgba(0, 136, 255, 0.4);
    }

    .detail-card-stream-fill.is-loaded::after {
      opacity: 0;
      transition: opacity 300ms ease;
    }

    /* Subtle ambient energy sheen that sweeps down every 4.5s after full load */
    .detail-card-stream-fill.is-loaded::before {
      content: "";
      position: absolute;
      top: -60px;
      left: -2px;
      right: -2px;
      height: 50px;
      background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.85), transparent);
      box-shadow: 0 0 14px #54e8ff;
      border-radius: 2px;
      animation: detailAmbientScan 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    }

    @keyframes detailBorderStream {
      0% {
        height: 0%;
      }
      15% {
        height: 14%;
      }
      40% {
        height: 46%;
      }
      70% {
        height: 82%;
      }
      95% {
        height: 98%;
      }
      100% {
        height: 100%;
      }
    }

    @keyframes detailAmbientScan {
      0%, 65% {
        top: -50px;
        opacity: 0;
      }
      70% {
        opacity: 0.9;
      }
      88% {
        top: calc(100% - 10px);
        opacity: 0.9;
      }
      94%, 100% {
        top: 100%;
        opacity: 0;
      }
    }


    .detail-description {
      margin: 0 0 20px;
      color: #f1f5f9;
      font-size: 14px;
      line-height: 1.75;
      white-space: pre-wrap;
      word-break: break-word;
      overflow-wrap: break-word;
    }

    .detail-info {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
    }

    .detail-info div {
      padding: 11px 13px;
      background: rgba(255,255,255,.055);
    }

    .detail-info small {
      display: block;
      color: #52b6ff;
      font-size: 9px;
      letter-spacing: .1em;
    }

    .detail-info strong {
      display: block;
      margin-top: 3px;
      font-size: 13px;
      color: #ffffff;
    }

    .features {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 0;
      margin: 14px 0 0;
      list-style: none;
    }

    .features li {
      position: relative;
      padding: 3px 0;
      color: #f1f5f9;
      font-size: 12.5px;
      line-height: 1.6;
      word-break: break-word;
      overflow-wrap: break-word;
    }

    .features li a {
      color: #52b6ff;
      text-decoration: underline;
      text-underline-offset: 3px;
      font-weight: 600;
      transition: color 150ms ease;
    }

    .features li a:hover {
      color: #8ed2ff;
      text-decoration: underline;
    }

    .features li::before {
      content: none;
      display: none;
    }

    .detail-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 25px;
    }

    .action-button {
      min-width: 120px;
      flex: 1 1 auto;
      padding: 13px 18px;
      cursor: pointer;
      color: #cbd5e1;
      background: #071933;
      border: 1px solid #0f2d57;
      font-family: Inter, sans-serif;
      font-size: 12px;
      font-weight: 900;
      transform: skew(-4deg, -1.2deg);
      transition: 180ms ease;
    }

    .action-button.primary {
      background: #0066ff;
      color: #ffffff;
      border: 0;
    }

    .action-button:hover {
      transform: translateY(-4px) skew(-4deg, -1.2deg);
      filter: drop-shadow(7px 8px 0 rgba(0, 107, 255, .45));
    }

    .action-button:disabled {
      cursor: not-allowed;
      opacity: .48;
      filter: grayscale(1);
    }

    .close-detail {
      position: fixed;
      z-index: 10;
      top: 25px;
      right: 27px;
      display: grid;
      place-items: center;
      width: 53px;
      height: 53px;
      cursor: pointer;
      color: var(--navy);
      background: var(--ice);
      border: 0;
      font-family: Inter, sans-serif;
      font-size: 20px;
      font-weight: 900;
      clip-path: polygon(15% 0, 100% 12%, 84% 100%, 0 82%);
      transition: 180ms ease;
    }

    .close-detail:hover {
      background: #0088ff;
      color: #ffffff;
      transform: rotate(8deg) scale(1.08);
    }

    /* ---------------- PATCH NOTES BUTTON (UNIFIED P3R THEME) ---------------- */

    .action-button.patch-notes-btn {
      color: #ffffff;
      background: #0c2140;
      border: 1px solid #163d72;
      box-shadow: none;
    }

    .action-button.patch-notes-btn:hover {
      background: #0066ff;
      color: #ffffff;
      transform: translateY(-4px) skew(-4deg, -1.2deg);
      filter: drop-shadow(7px 8px 0 rgba(0, 107, 255, .45));
    }

    .action-button.patch-notes-btn.active {
      background: #0066ff;
      color: #ffffff;
      transform: translateY(-2px) skew(-4deg, -1.2deg);
      filter: drop-shadow(6px 7px 0 rgba(0, 107, 255, .55));
    }


/* =========================================================
   DETAIL SHOWCASE & GALLERY ZONE
   ========================================================= */

    /* ---------------- P3R DETAIL SHOWCASE & GALLERY ZONE ---------------- */
    /* Detail card on left: fluid max-width and comfortable margins */
    .detail-screen.has-showcase .detail-inner {
      margin: 0;
      padding-left: clamp(25px, 3.5vw, 75px);
      padding-top: clamp(60px, 7vh, 90px);
      padding-bottom: clamp(30px, 5vh, 65px);
      max-width: min(580px, 34vw);
      box-sizing: border-box;
      transition: transform 620ms cubic-bezier(0.16, 1, 0.3, 1), opacity 420ms ease;
    }

    .detail-screen.has-showcase .detail-title {
      font-size: clamp(2.6rem, 5.2vw, 5.8rem);
      line-height: 0.82;
      margin: 10px 0 16px;
      word-break: normal;
      overflow-wrap: break-word;
    }

    .detail-screen.has-showcase .detail-card {
      width: 100%;
      padding: clamp(16px, 1.8vw, 24px) clamp(18px, 2vw, 28px) clamp(38px, 4vw, 48px);
    }

    /* Detail Showcase Zone: full area, non-colliding fluid placement */
    .detail-showcase-zone {
      position: absolute;
      inset: 0;
      min-height: 100%;
      pointer-events: none;
      z-index: 5;
      overflow: visible;
      display: none;
      transition: transform 680ms cubic-bezier(0.16, 1, 0.3, 1);
    }
    .detail-screen.has-showcase .detail-showcase-zone {
      display: block;
    }

    /* ---------------- P3R STAGE PANNING: PATCH NOTES ACTIVE ---------------- */
    .detail.patch-mode-active .detail-screen,
    .detail-screen.patch-mode-active {
      overflow-y: auto !important;
      overflow-x: hidden !important;
    }

    .detail.patch-mode-active .detail-inner,
    .detail-screen.patch-mode-active .detail-inner {
      position: absolute !important;
      top: 0 !important;
      left: 0 !important;
      width: 100% !important;
      max-height: 0 !important;
      overflow: hidden !important;
      pointer-events: none !important;
      opacity: 0 !important;
      transform: translateX(-120%) !important;
    }

    .detail.patch-mode-active .detail-showcase-zone,
    .detail-screen.patch-mode-active .detail-showcase-zone {
      transform: translateX(calc(-1 * (50vw - 30px)));
    }


    .showcase-backdrop {
      position: absolute;
      inset: 0;
      pointer-events: none;
      overflow: hidden;
    }
    .showcase-halo {
      position: absolute;
      right: 4%;
      top: 15%;
      width: 720px;
      height: 720px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(0, 115, 255, 0.24) 0%, rgba(2, 12, 28, 0) 70%);
      filter: blur(40px);
    }
    .showcase-slash-beam {
      position: absolute;
      right: 22%;
      top: -20%;
      width: 200px;
      height: 140%;
      background: linear-gradient(135deg, rgba(0, 102, 255, 0.08) 0%, transparent 80%);
      transform: rotate(14deg) skewX(-8deg);
      border-right: 1px solid rgba(82, 182, 255, 0.18);
    }

    /* Gallery Panel: Symmetrically aligned with .detail-card, foreground layer */
    .showcase-gallery-panel {
      position: absolute;
      right: clamp(80px, 8vw, 180px);
      top: clamp(190px, 28vh, 320px);
      bottom: auto;
      transform: none;
      z-index: 10;
      display: flex;
      flex-direction: column;
      gap: clamp(6px, 1vh, 9px);
      width: clamp(450px, 35vw, 680px);
      pointer-events: none;
      opacity: 0;
    }

    .detail-showcase-zone.showcase-in .showcase-gallery-panel {
      pointer-events: auto;
      animation: p3rGallerySlideIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both;
    }

    .gallery-header-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 4px 10px 6px;
      border-bottom: 2px solid #0c356e;
      background: rgba(2, 9, 22, 0.88);
      backdrop-filter: blur(10px);
      border-radius: 3px 3px 0 0;
      font-family: Inter, sans-serif;
    }
    .gallery-header-left {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .gallery-header-icon {
      color: #0088ff;
      font-size: 11px;
    }
    .gallery-header-title {
      font-size: clamp(10.5px, 0.9vw, 12.5px);
      font-weight: 900;
      letter-spacing: 0.14em;
      color: #52b6ff;
    }
    .gallery-header-counter {
      font-family: Inter, sans-serif;
      font-size: 12px;
      font-weight: 800;
      color: #64748b;
      letter-spacing: 0.08em;
    }
    .gallery-header-counter b {
      color: #ffffff;
      font-weight: 900;
    }

    /* Large Hero Frame - Symmetrical 16:9 ratio */
    .gallery-hero-frame {
      position: relative;
      width: 100%;
      height: auto;
      aspect-ratio: 16 / 9;
      flex-shrink: 0;
      cursor: pointer;
      background: #010814;
      border: 2px solid #0e3b79;
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 102, 255, 0.2);
      overflow: hidden;
      transition: border-color 220ms ease;
    }
    .gallery-hero-frame:hover {
      border-color: #52b6ff;
    }

    /* Slash light sweep sheen on entrance */
    .gallery-hero-sheen {
      position: absolute;
      inset: -50% -30%;
      background: linear-gradient(
        115deg,
        transparent 38%,
        rgba(255, 255, 255, 0.35) 48%,
        rgba(82, 182, 255, 0.75) 50%,
        rgba(255, 255, 255, 0.35) 52%,
        transparent 62%
      );
      transform: translateX(-140%) skewX(-22deg);
      pointer-events: none;
      z-index: 4;
      opacity: 0;
    }

    .detail-showcase-zone.showcase-in .gallery-hero-sheen {
      animation: heroSheenSweep 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.40s both;
    }

    @keyframes heroSheenSweep {
      0% {
        transform: translateX(-140%) skewX(-22deg);
        opacity: 0;
      }
      25% {
        opacity: 1;
      }
      100% {
        transform: translateX(140%) skewX(-22deg);
        opacity: 0;
      }
    }

    .gallery-hero-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transform: scale(1.015);
      transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1), opacity 180ms ease;
    }
    .gallery-hero-frame:hover .gallery-hero-img {
      transform: scale(1.05);
    }

    .gallery-hero-overlay {
      position: absolute;
      inset: auto 0 0 0;
      padding: clamp(16px, 1.8vw, 24px) clamp(16px, 1.8vw, 22px) clamp(12px, 1.4vw, 18px);
      background: linear-gradient(to top, rgba(1, 9, 24, 0.96) 0%, rgba(1, 9, 24, 0.72) 60%, transparent 100%);
      display: flex;
      flex-direction: column;
      gap: 4px;
      pointer-events: none;
      z-index: 5;
    }
    .gallery-hero-tag {
      font-family: Inter, sans-serif;
      font-size: 10.5px;
      font-weight: 900;
      letter-spacing: 0.16em;
      color: #52b6ff;
    }
    .gallery-hero-title {
      margin: 0;
      font-family: Inter, sans-serif;
      font-size: clamp(14px, 1.2vw, 18px);
      font-weight: 900;
      color: #ffffff;
      letter-spacing: 0.04em;
    }
    .gallery-hero-desc {
      margin: 0;
      font-family: 'Chakra Petch', sans-serif;
      font-size: clamp(11px, 0.95vw, 13px);
      color: #cbd5e1;
      line-height: 1.45;
    }

    /* 4 Selectable Thumbnails */
    .gallery-thumbs-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: clamp(6px, 0.8vw, 10px);
    }
    .gallery-thumb-item {
      position: relative;
      background: #020b18;
      border: 1.5px solid #0d2f5e;
      border-left: 3px solid #144686;
      padding: 0;
      cursor: pointer;
      overflow: hidden;
      transform: skewX(-3deg);
      transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms ease, box-shadow 180ms ease;
      opacity: 0;
    }

    .detail-showcase-zone.showcase-in .gallery-thumb-item {
      animation: p3rThumbPop 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    .detail-showcase-zone.showcase-in .gallery-thumb-item:nth-child(1) { animation-delay: 0.45s; }
    .detail-showcase-zone.showcase-in .gallery-thumb-item:nth-child(2) { animation-delay: 0.52s; }
    .detail-showcase-zone.showcase-in .gallery-thumb-item:nth-child(3) { animation-delay: 0.59s; }
    .detail-showcase-zone.showcase-in .gallery-thumb-item:nth-child(4) { animation-delay: 0.66s; }

    @keyframes p3rThumbPop {
      0% {
        opacity: 0;
        transform: skewX(-3deg) translateY(20px) scale(0.94);
      }
      100% {
        opacity: 1;
        transform: skewX(-3deg) translateY(0) scale(1);
      }
    }

    .thumb-img-wrap {
      width: 100%;
      height: clamp(40px, 5.8vh, 62px);
      overflow: hidden;
      background: #000;
    }
    .thumb-img-wrap img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: 0.65;
      transition: opacity 200ms ease, transform 250ms ease;
    }
    .gallery-thumb-item:hover .thumb-img-wrap img,
    .gallery-thumb-item.active .thumb-img-wrap img {
      opacity: 1;
      transform: scale(1.08);
    }

    .thumb-label {
      padding: clamp(4px, 0.5vw, 6px) clamp(5px, 0.6vw, 8px);
      background: #f4f8fd;
      color: #04142b;
      font-family: 'Chakra Petch', sans-serif;
      font-size: clamp(9.5px, 0.8vw, 11.5px);
      font-weight: 800;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .thumb-label span {
      font-family: Inter, sans-serif;
      font-size: 10px;
      font-weight: 900;
      color: #0066ff;
    }
    .gallery-thumb-item.active .thumb-label {
      background: #0066ff;
      color: #ffffff;
    }
    .gallery-thumb-item.active .thumb-label span {
      color: #ffffff;
    }

    /* Standing Character as Backdrop Behind Gallery (Live2D Idle & Smooth Glide Entrance) */
    .showcase-character-stand {
      position: absolute;
      right: clamp(80px, 8vw, 180px);
      width: clamp(450px, 35vw, 680px);
      top: 0;
      bottom: 0;
      height: 100%;
      overflow: hidden;
      z-index: 6; /* Behind the gallery panel (z-index: 10) */
      pointer-events: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      opacity: 0;
      transform: translateX(300px);
      mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 98%);
      -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 98%);
    }

    .detail-showcase-zone.showcase-in .showcase-character-stand {
      pointer-events: auto;
      animation: p3rCharSmoothSlideIn 2.2s cubic-bezier(0.12, 0.98, 0.24, 1) 0.15s both;
    }

    .character-stage {
      position: relative;
      height: 100%;
      width: 100%;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      padding-top: clamp(85px, 10vh, 120px);
      box-sizing: border-box;
      overflow: visible;
    }

    /* Live2D breathing & floating sway wrapper - Enlarged, Tilted -4.5deg, Ultra Slow & Smooth */
    .character-live2d-wrap {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      transform-origin: 50% 8%;
      animation: p3rLive2dIdle 9.2s ease-in-out infinite;
      overflow: visible;
    }

    .detail.open .character-live2d-wrap {
      will-change: transform;
    }

    @keyframes p3rLive2dIdle {
      0% {
        transform: translateY(0px) rotate(-4.5deg) scale(1.15);
      }
      25% {
        transform: translateY(-6px) rotate(-3.7deg) scale(1.158, 1.168);
      }
      50% {
        transform: translateY(-12px) rotate(-4.9deg) scale(1.166, 1.18);
      }
      75% {
        transform: translateY(-6px) rotate(-3.9deg) scale(1.156, 1.164);
      }
      100% {
        transform: translateY(0px) rotate(-4.5deg) scale(1.15);
      }
    }

    .char-transform-wrap {
      height: 100%;
      width: 100%;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      transform: translate(var(--bg-char-x, 0px), var(--bg-char-y, 0px)) scale(var(--bg-char-scale, 1));
      transform-origin: center top;
      transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
      overflow: visible;
    }

    .character-full-body {
      min-height: 600px;
      height: clamp(600px, 86vh, 980px);
      width: auto;
      max-width: none;
      flex-shrink: 0;
      object-fit: contain;
      filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.85));
      opacity: 0.50; /* Faded ambient backdrop */
      transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms ease;
    }

    .character-full-body.char-fade-out {
      opacity: 0;
      transform: scale(1.05);
      will-change: opacity, transform;
    }

    .character-identity-card {
      align-self: flex-end;
      margin-top: clamp(6px, 1vh, 10px);
      background: rgba(3, 13, 29, 0.96);
      backdrop-filter: blur(12px);
      border: 1.5px solid #0088ff;
      border-left: 5px solid #ffffff;
      padding: clamp(6px, 0.6vw, 8px) clamp(14px, 1.1vw, 20px);
      transform: skewX(-6deg);
      box-shadow: 4px 6px 0 #000, 0 0 20px rgba(0, 102, 255, 0.3);
      pointer-events: auto;
      z-index: 20;
      opacity: 1;
      min-width: clamp(210px, 18vw, 270px);
      box-sizing: border-box;
      transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1), opacity 420ms ease;
    }

    .character-identity-card.char-card-swap {
      opacity: 0;
      transform: skewX(-6deg) translateY(8px) scale(0.96);
    }

    .char-id-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }

    .char-id-tag {
      font-family: Inter, sans-serif;
      font-size: 8.5px;
      font-weight: 900;
      letter-spacing: 0.18em;
      color: #52b6ff;
      text-transform: uppercase;
    }

    /* P3R character switcher indicators */
    .char-indicators {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .char-dot {
      width: 8px;
      height: 8px;
      background: #0d2f5e;
      border: 1px solid #144686;
      transform: skewX(-12deg);
      cursor: pointer;
      transition: all 200ms ease;
      padding: 0;
    }

    .char-dot:hover {
      background: #52b6ff;
      border-color: #ffffff;
    }

    .char-dot.active {
      background: #00a2ff;
      border-color: #ffffff;
      box-shadow: 0 0 10px rgba(0, 162, 255, 0.95);
      transform: skewX(-12deg) scale(1.25);
    }

    .char-id-main {
      display: flex;
      align-items: baseline;
      gap: 8px;
      margin: 2px 0 1px;
    }
    .char-id-name {
      font-family: Inter, sans-serif;
      font-size: clamp(18px, 1.4vw, 22px);
      font-weight: 900;
      color: #ffffff;
      letter-spacing: 0.06em;
      line-height: 1.1;
      text-shadow: 0 0 12px rgba(0, 136, 255, 0.4);
    }
    .char-id-jp {
      font-family: 'Chakra Petch', sans-serif;
      font-size: clamp(13px, 1vw, 15px);
      font-weight: 900;
      color: #00d0ff;
      line-height: 1.1;
    }
    .char-id-sub {
      font-family: Inter, sans-serif;
      font-size: 8.5px;
      font-weight: 800;
      color: #94a3b8;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }

    @keyframes p3rGallerySlideIn {
      0% {
        opacity: 0;
        transform: translateX(75px) skewX(-6deg) scale(0.96);
        filter: blur(8px) brightness(1.3);
      }
      65% {
        opacity: 1;
        transform: translateX(-5px) skewX(1.5deg) scale(1.008);
        filter: blur(0) brightness(1.05);
      }
      100% {
        opacity: 1;
        transform: translateX(0) skewX(0) scale(1);
        filter: blur(0) brightness(1);
      }
    }

    @keyframes p3rCharSmoothSlideIn {
      0% {
        opacity: 0;
        transform: translateX(300px);
        filter: blur(8px) brightness(1.15);
      }
      50% {
        opacity: 0.65;
        filter: blur(2px) brightness(1.05);
      }
      100% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0) brightness(1);
      }
    }


/* =========================================================
   GALLERY SCREENSHOT MODAL
   ========================================================= */


    .gallery-hero-expand-badge {
      position: absolute;
      top: 10px;
      right: 12px;
      background: rgba(2, 10, 24, 0.9);
      border: 1px solid #0088ff;
      color: #52b6ff;
      font-family: Inter, sans-serif;
      font-size: 9px;
      font-weight: 900;
      letter-spacing: 0.14em;
      padding: 3px 9px;
      transform: skewX(-6deg);
      pointer-events: none;
      z-index: 6;
      opacity: 0.9;
      box-shadow: 2px 3px 0 #000;
      transition: all 180ms ease;
    }
    .gallery-hero-frame:hover .gallery-hero-expand-badge {
      background: #0088ff;
      color: #ffffff;
      border-color: #ffffff;
      opacity: 1;
      transform: skewX(-6deg) scale(1.06);
    }

    .gallery-modal {
      position: fixed;
      inset: 0;
      z-index: 9999;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: clamp(14px, 2vw, 30px);
      box-sizing: border-box;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 250ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 250ms;
    }

    .gallery-modal.open {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transition: opacity 250ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 0s;
    }

    .gallery-modal-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(1, 6, 18, 0.88);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      cursor: pointer;
    }

    .gallery-modal-dialog {
      position: relative;
      width: min(1040px, 94vw);
      max-height: 90vh;
      z-index: 2;
      opacity: 0;
      transform: translate3d(0, 20px, 0) scale(0.96);
      transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), opacity 220ms ease;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      box-sizing: border-box;
    }

    .gallery-modal.open .gallery-modal-dialog {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
    }

    /* Left Cobalt Wing with repeating pattern like Page 3 Tutorial Box */
    .gallery-modal-wing {
      position: absolute;
      left: -32px;
      top: -20px;
      height: 65%;
      width: 170px;
      background: #003cd6;
      clip-path: polygon(0 0, 100% 0, 84% 100%, 0 100%);
      z-index: 1;
      overflow: hidden;
      box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.6);
      pointer-events: none;
    }

    .gallery-wing-pattern {
      position: absolute;
      inset: -15px 0 0 4px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      transform: rotate(-14deg) skewX(-12deg);
      opacity: 0.32;
      user-select: none;
      pointer-events: none;
    }

    .gallery-wing-pattern span {
      font-family: Inter, sans-serif;
      font-weight: 900;
      font-size: 23px;
      color: #001038;
      letter-spacing: 0.04em;
      line-height: 0.95;
      white-space: nowrap;
    }

    /* Main Box Body (Dark Navy Angle Cut like Page 3 Tutorial Box) */
    .gallery-modal-main {
      position: relative;
      z-index: 2;
      margin-left: clamp(16px, 3.5vw, 55px);
      background: rgba(0, 12, 42, 0.96);
      border: 2px solid #005ce6;
      box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 35px rgba(0, 92, 230, 0.35);
      backdrop-filter: blur(16px);
      clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
      padding: clamp(14px, 1.8vw, 22px) clamp(16px, 2.2vw, 32px) clamp(12px, 1.6vw, 18px);
      display: flex;
      flex-direction: column;
      box-sizing: border-box;
    }

    /* Close Button X (Stylized P3R polygon cut) */
    .gallery-modal-close {
      position: absolute;
      top: -14px;
      right: -14px;
      display: grid;
      place-items: center;
      width: 42px;
      height: 42px;
      cursor: pointer;
      color: #001242;
      background: #eaf6ff;
      border: 0;
      font-family: Inter, sans-serif;
      font-size: 19px;
      font-weight: 900;
      clip-path: polygon(15% 0, 100% 12%, 84% 100%, 0 82%);
      box-shadow: 4px 4px 0 #000000;
      transition: all 180ms ease;
      z-index: 10;
    }

    .gallery-modal-close:hover {
      background: #0088ff;
      color: #ffffff;
      transform: rotate(8deg) scale(1.12);
      box-shadow: 6px 6px 0 #000000;
    }

    /* White Header Badge */
    .gallery-modal-header {
      background: #ffffff;
      color: #001242;
      padding: 6px clamp(16px, 2.5vw, 36px);
      align-self: center;
      margin-bottom: 14px;
      clip-path: polygon(0 0, 100% 0, 96% 100%, 4% 100%);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
      display: flex;
      align-items: center;
      gap: clamp(8px, 1.2vw, 16px);
    }

    .gallery-modal-tag {
      font-family: Inter, sans-serif;
      font-size: 9.5px;
      font-weight: 900;
      letter-spacing: 0.16em;
      color: #0066ee;
    }

    .gallery-modal-header h3 {
      margin: 0;
      font-family: Inter, "Chakra Petch", sans-serif;
      font-weight: 900;
      font-size: clamp(14px, 1.3vw, 18px);
      letter-spacing: -0.01em;
      color: #001242;
      text-align: center;
    }

    .gallery-modal-counter {
      font-family: Inter, sans-serif;
      font-size: 11px;
      font-weight: 800;
      color: #64748b;
    }
    .gallery-modal-counter b {
      color: #0066ee;
      font-weight: 900;
    }

    /* Image Wrapper with 16:9 ratio and high resolution */
    .gallery-modal-body {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .gallery-modal-img-wrap {
      position: relative;
      width: 100%;
      height: auto;
      aspect-ratio: 16 / 9;
      max-height: clamp(340px, 58vh, 580px);
      background: #010814;
      border: 2px solid #0e3b79;
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85);
      overflow: hidden;
    }

    .gallery-modal-img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      transition: opacity 160ms ease;
    }

    .gallery-modal-sheen {
      position: absolute;
      inset: -50% -30%;
      background: linear-gradient(
        115deg,
        transparent 38%,
        rgba(255, 255, 255, 0.25) 48%,
        rgba(82, 182, 255, 0.65) 50%,
        rgba(255, 255, 255, 0.25) 52%,
        transparent 62%
      );
      transform: translateX(-140%) skewX(-22deg);
      pointer-events: none;
      z-index: 4;
      opacity: 0;
    }

    .gallery-modal.open .gallery-modal-sheen {
      animation: heroSheenSweep 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
    }

    .gallery-modal-info {
      padding: 4px 6px;
    }

    .gallery-modal-desc {
      margin: 0;
      font-family: 'Chakra Petch', sans-serif;
      font-size: clamp(12px, 1vw, 14.5px);
      color: #cbd5e1;
      line-height: 1.5;
    }

    /* Pagination controls */
    .gallery-modal-pagination {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      margin-top: 10px;
    }

    .gallery-page-arrow {
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      background: #031430;
      border: 1.5px solid #0d3b75;
      color: #52b6ff;
      font-size: 20px;
      font-weight: 900;
      cursor: pointer;
      transform: skewX(-8deg);
      transition: all 180ms ease;
    }

    .gallery-page-arrow:hover {
      background: #0088ff;
      color: #ffffff;
      border-color: #ffffff;
      transform: skewX(-8deg) scale(1.12);
    }

    .gallery-dots-list {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .gallery-modal-dot {
      width: 9px;
      height: 9px;
      background: #0c2b54;
      border: 1px solid #164680;
      transform: skewX(-12deg);
      cursor: pointer;
      transition: all 180ms ease;
      padding: 0;
    }

    .gallery-modal-dot:hover {
      background: #52b6ff;
      border-color: #ffffff;
    }

    .gallery-modal-dot.active {
      background: #00a2ff;
      border-color: #ffffff;
      box-shadow: 0 0 10px rgba(0, 162, 255, 0.95);
      transform: skewX(-12deg) scale(1.25);
    }

    .gallery-modal-spinner {
      position: absolute;
      inset: 0;
      margin: auto;
      width: 38px;
      height: 38px;
      border: 3px solid rgba(0, 140, 255, 0.2);
      border-top-color: #00e1ff;
      border-radius: 50%;
      animation: gallerySpinnerRotate 0.75s linear infinite;
      z-index: 3;
      opacity: 0;
      pointer-events: none;
      transition: opacity 180ms ease;
    }

    .gallery-modal-img-wrap.is-loading .gallery-modal-spinner {
      opacity: 1;
    }

    @keyframes gallerySpinnerRotate {
      to { transform: rotate(360deg); }
    }

    @media (max-width: 860px) {
      .gallery-modal-wing {
        display: none;
      }
      .gallery-modal-main {
        margin-left: 0;
        padding: 14px 16px;
      }
      .gallery-modal-close {
        top: -10px;
        right: -10px;
        width: 36px;
        height: 36px;
        font-size: 16px;
      }
      .gallery-modal-img-wrap {
        max-height: 48vh;
      }
      /* Cut heavy animations on mobile for zero lag & maximum stability */
      .circle-transition {
        display: none !important;
      }
      .detail-card-stream {
        display: none !important;
      }
      .detail-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(2, 12, 28, 0.98);
      }
      .detail.transitioning,
      .detail.reveal-detail,
      .detail.open {
        transition: opacity 0.15s ease !important;
      }
      .detail.closing {
        opacity: 0 !important;
        transition: opacity 0.1s ease !important;
      }
    }

    /* Responsive Breakpoints: When window width is under 1360px */
    @media (max-width: 1360px) {
      .detail-screen.has-showcase .detail-inner {
        max-width: 38vw;
      }
      .showcase-gallery-panel {
        right: clamp(40px, 6vw, 100px);
        width: clamp(380px, 34vw, 500px);
      }
      .showcase-character-stand {
        right: clamp(40px, 6vw, 100px);
        width: clamp(380px, 34vw, 500px);
        height: 100%;
      }
    }

    /* Responsive Breakpoint: When window width is under 1100px */
    @media (max-width: 1100px) {
      .showcase-character-stand {
        opacity: 0.55;
      }
      .showcase-gallery-panel {
        right: clamp(20px, 3vw, 40px);
        width: min(520px, calc(100vw - 42vw - 50px));
      }
    }

    /* Mobile / Tablet vertical stack (< 860px) */
    @media (max-width: 860px) {
      .close-detail {
        top: 14px;
        right: 14px;
        width: 44px;
        height: 44px;
        font-size: 17px;
      }
      .detail-screen.has-showcase .detail-inner {
        max-width: 100%;
        margin: auto;
        padding-top: 48px;
        padding-left: 20px;
        padding-right: 20px;
      }
      .detail-screen.has-showcase .detail-title {
        padding-right: 48px;
      }
      .detail-showcase-zone {
        position: relative;
        inset: auto;
        padding: 10px 20px 36px;
        overflow: visible;
      }
      .showcase-gallery-panel {
        position: relative;
        right: auto;
        top: 0 !important;
        bottom: auto;
        width: 100%;
      }
      .showcase-character-stand,
      .character-identity-card,
      .showcase-backdrop,
      .showcase-halo,
      .showcase-slash-beam {
        display: none !important;
      }
      .detail.patch-mode-active .detail-showcase-zone,
      .detail-screen.patch-mode-active .detail-showcase-zone {
        transform: none;
        opacity: 0;
        pointer-events: none;
        display: none !important;
      }
      .detail.patch-mode-active .detail-inner,
      .detail-screen.patch-mode-active .detail-inner {
        display: none !important;
      }
      .patch-drawer-wrapper,
      .patch-panel {
        width: 100%;
      }
    }

    /* Vertical compact viewports (laptops <= 820px height) */
    @media (min-width: 861px) and (max-height: 820px) {
      .detail-screen.has-showcase .detail-inner {
        padding-top: clamp(35px, 4vh, 50px);
        padding-bottom: 20px;
      }
      .detail-screen.has-showcase .detail-title {
        font-size: clamp(2.4rem, 4.5vw, 4.5rem);
        margin: 6px 0 12px;
      }
      .detail-screen.has-showcase .detail-card {
        padding: 14px 18px 40px;
      }
      .detail-screen.has-showcase .detail-description {
        margin: 0 0 10px;
        font-size: 13px;
        line-height: 1.5;
      }
      .detail-screen.has-showcase .detail-info div {
        padding: 7px 10px;
      }
      .detail-screen.has-showcase .features li {
        padding: 3px 0;
        font-size: 12px;
        line-height: 1.55;
      }
      .detail-screen.has-showcase .detail-actions {
        margin-top: 14px;
        gap: 8px;
      }
      .detail-screen.has-showcase .action-button {
        padding: 9px 13px;
        font-size: 11px;
      }
      .showcase-gallery-panel {
        top: clamp(150px, 22vh, 220px);
        bottom: auto;
        gap: 6px;
        width: clamp(380px, 34vw, 480px);
      }
      .thumb-img-wrap {
        height: clamp(36px, 5vh, 52px);
      }
      .showcase-character-stand {
        height: 100%;
      }
      .character-stage {
        padding-top: clamp(36px, 5.5vh, 60px);
      }
      .character-full-body {
        min-height: 580px;
        height: clamp(580px, 86vh, 880px);
      }
    }


/* =========================================================
   P3R CIRCULAR REVEAL TRANSITION
   ========================================================= */

/* =========================================================
   P3R BOTTOM-LEFT CIRCULAR TRANSITION (IN & OUT)
   ========================================================= */

.detail.open .detail-screen {
  opacity: 1;
  visibility: visible;
  clip-path: circle(150% at 0% 100%);
}

.detail.detail-revealing .detail-screen {
  opacity: 1;
  visibility: visible;
  animation: p3rDetailWipeIn 0.58s cubic-bezier(0.16, 0.85, 0.35, 1) both;
  will-change: clip-path, opacity;
}

.detail.closing .detail-screen {
  opacity: 1;
  visibility: visible;
  animation: p3rDetailWipeOut 0.38s cubic-bezier(0.35, 0, 0.15, 1) both;
  will-change: clip-path, opacity;
}

.detail.closing .circle-close-arc {
  opacity: 1;
  visibility: visible;
  animation: p3rCloseArcShrink 0.38s cubic-bezier(0.35, 0, 0.15, 1) both;
}

.circle-close-arc {
  position: absolute;
  z-index: 65;
  left: 0;
  bottom: 0;
  width: 280vmax;
  height: 280vmax;
  border-radius: 50%;
  border: clamp(5px, 0.8vw, 12px) solid var(--circle-secondary, #45d8ff);
  box-shadow: 0 0 35px #45d8ff, inset 0 0 25px rgba(255, 255, 255, 0.5);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, 50%, 0) scale(0);
  backface-visibility: hidden;
}

/* Detail Content */
.detail .detail-inner {
  transform: translateY(0);
  opacity: 1;
}

/* Transition Overlay Container */
.circle-transition {
  --circle-primary: #078cff;
  --circle-secondary: #45d8ff;
  --circle-dark: #172278;

  position: fixed;
  z-index: 50;
  inset: 0;
  visibility: hidden;
  overflow: hidden;
  pointer-events: none;
}

.detail.transitioning .circle-transition,
.detail.detail-revealing .circle-transition {
  visibility: visible;
}

/* 1. Base Concentric Circle Layers (Matches P3R Video 1.5s - 3.5s) */
.circle-layer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 320vmax;
  height: 320vmax;
  border-radius: 50%;
  transform: translate3d(-50%, 50%, 0) scale(0);
  transform-origin: center;
  backface-visibility: hidden;
}

/* Layer 1: Solid Vibrant Cyan Circle */
.circle-layer-cyan {
  z-index: 1;
  background: var(--circle-secondary);
  box-shadow: 0 0 30px var(--circle-secondary);
}

/* Layer 2: Mid Blue Accent Layer */
.circle-layer-blue {
  z-index: 2;
  background: var(--circle-primary);
}

/* Layer 3: Solid Dark Navy Circle (Covers screen by ~0.68s) */
.circle-layer-navy {
  z-index: 4;
  background: var(--circle-dark);
}

/* --- IN ANIMATIONS --- */
.detail.transitioning .circle-layer-cyan {
  animation: p3rCircleExpand 0.70s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.detail.transitioning .circle-layer-blue {
  animation: p3rCircleExpand 0.68s 0.10s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.detail.transitioning .circle-layer-navy {
  animation: p3rCircleExpand 0.70s 0.20s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* 2. Luminous Cyan Arcs */
.circle-arc {
  position: absolute;
  z-index: 6;
  left: 0;
  bottom: 0;
  border-radius: 50%;
  opacity: 0;
  transform: translate3d(-50%, 50%, 0) scale(0);
  backface-visibility: hidden;
}

.circle-arc-large {
  width: 290vmax;
  height: 290vmax;
  border: clamp(5px, 0.75vw, 12px) solid var(--circle-secondary);
  box-shadow:
    0 0 35px var(--circle-secondary),
    inset 0 0 25px rgba(255, 255, 255, 0.45);
}

.circle-arc-small {
  width: 210vmax;
  height: 210vmax;
  border: clamp(2px, 0.35vw, 6px) solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.detail.transitioning .circle-arc-large {
  animation: p3rArcPulse 0.80s 0.26s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.detail.transitioning .circle-arc-small {
  animation: p3rArcPulse 0.76s 0.33s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* 3. Floating Polygon Glass Shards (All-Out Attack) */
.circle-shards {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.shard {
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0;
  transform-origin: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), var(--circle-secondary));
  box-shadow: 0 0 16px var(--circle-secondary);
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

.shard-1  { width: 28px; height: 38px; clip-path: polygon(50% 0%, 0% 100%, 100% 70%); --s-dist-x: 34vw; --s-dist-y: 62vh; --s-rot: 42deg; --s-delay: 0.04s; }
.shard-2  { width: 18px; height: 24px; clip-path: polygon(0 0, 100% 20%, 45% 100%); --s-dist-x: 18vw; --s-dist-y: 75vh; --s-rot: -65deg; --s-delay: 0.07s; }
.shard-3  { width: 34px; height: 46px; clip-path: polygon(30% 0, 100% 50%, 0 100%); --s-dist-x: 52vw; --s-dist-y: 44vh; --s-rot: 110deg; --s-delay: 0.09s; }
.shard-4  { width: 22px; height: 30px; clip-path: polygon(0 40%, 80% 0, 100% 100%); --s-dist-x: 26vw; --s-dist-y: 38vh; --s-rot: -35deg; --s-delay: 0.03s; }
.shard-5  { width: 30px; height: 40px; clip-path: polygon(50% 0%, 100% 100%, 0% 85%); --s-dist-x: 65vw; --s-dist-y: 28vh; --s-rot: 85deg; --s-delay: 0.11s; }
.shard-6  { width: 16px; height: 22px; clip-path: polygon(20% 0, 100% 30%, 60% 100%, 0 70%); --s-dist-x: 14vw; --s-dist-y: 48vh; --s-rot: -120deg; --s-delay: 0.05s; }
.shard-7  { width: 24px; height: 34px; clip-path: polygon(40% 0, 100% 80%, 10% 100%); --s-dist-x: 42vw; --s-dist-y: 70vh; --s-rot: 145deg; --s-delay: 0.08s; }
.shard-8  { width: 32px; height: 42px; clip-path: polygon(0 0, 90% 40%, 30% 100%); --s-dist-x: 58vw; --s-dist-y: 55vh; --s-rot: -80deg; --s-delay: 0.10s; }
.shard-9  { width: 15px; height: 20px; clip-path: polygon(50% 0, 100% 100%, 0 100%); --s-dist-x: 72vw; --s-dist-y: 19vh; --s-rot: 55deg; --s-delay: 0.06s; }
.shard-10 { width: 25px; height: 32px; clip-path: polygon(10% 0, 100% 20%, 80% 100%, 0 70%); --s-dist-x: 36vw; --s-dist-y: 26vh; --s-rot: -45deg; --s-delay: 0.02s; }

.detail.transitioning .shard {
  animation: p3rShardBurst 0.85s var(--s-delay) cubic-bezier(0.12, 0.88, 0.22, 1) both;
}

/* Optimized hardware acceleration - only promoted during active transitions */
.detail.transitioning .circle-layer,
.detail.detail-revealing .circle-layer,
.detail.closing .circle-layer,
.detail.transitioning .circle-arc,
.detail.detail-revealing .circle-arc,
.detail.closing .circle-arc,
.detail.transitioning .shard,
.detail.detail-revealing .shard,
.detail.closing .shard,
.detail.closing .circle-close-arc {
  will-change: transform, opacity;
}

/* 4. Project Label */
.circle-project-label {
  position: absolute;
  z-index: 9;
  left: clamp(28px, 6vw, 85px);
  bottom: clamp(28px, 6vw, 75px);
  opacity: 0;
  font-family: Inter, sans-serif;
  transform: translate(-30px, 30px) rotate(-4deg);
}

.circle-project-label small {
  display: block;
  margin-bottom: 6px;
  color: var(--circle-secondary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.28em;
}

.circle-project-label strong {
  display: block;
  color: #fff;
  font-size: clamp(4.5rem, 13vw, 11.5rem);
  font-weight: 900;
  line-height: 0.72;
  letter-spacing: -0.09em;
  text-shadow:
    6px 6px 0 var(--circle-primary),
    14px 14px 0 rgba(0, 0, 0, 0.32);
}

.detail.transitioning .circle-project-label {
  animation: p3rLabelSlide 0.80s 0.12s cubic-bezier(0.14, 0.88, 0.2, 1) both;
}

/* 5. Finish Fade */
.circle-transition.is-finishing {
  animation: p3rOverlayFade 0.25s ease forwards;
}


/* --- css/components/patch-panel.css --- */
    /* ---------------- P3R PATCH NOTES SIDE DRAWER PANEL ---------------- */

    .patch-drawer-wrapper {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      width: clamp(520px, 48vw, 840px);
      overflow: hidden;
      pointer-events: none;
      z-index: 75;
    }

    .patch-panel {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      width: 100%;
      z-index: 75;
      display: flex;
      flex-direction: column;
      background: #020817;
      border-left: 4px solid #0088ff;
      box-shadow: -12px 0 36px rgba(0, 0, 0, 0.85);
      transform: translateX(105%);
      transition: transform 540ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 540ms;
      visibility: hidden;
      overflow: hidden;
      pointer-events: none;
    }

    .patch-panel.open {
      visibility: visible;
      pointer-events: auto;
      transform: translateX(0);
      transition: transform 540ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 0s;
    }

    /* P3R Slash removed to keep UI clean and uncluttered */
    .patch-slash {
      display: none;
    }

    .patch-panel-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      padding: 30px 32px 18px;
      border-bottom: 2px solid #08244f;
      position: relative;
      z-index: 5;
    }

    .patch-header-title h3 {
      margin: 4px 0 2px;
      font-family: Inter, sans-serif;
      font-size: clamp(1.8rem, 3.2vw, 2.8rem);
      font-weight: 900;
      line-height: 0.85;
      letter-spacing: -0.05em;
      text-transform: uppercase;
      color: #ffffff;
      text-shadow: 2px 2px 0 #000000;
    }

    .patch-header-title h3 span {
      color: #52b6ff;
      -webkit-text-stroke: 0;
    }

    .patch-header-tag {
      display: inline-block;
      font-family: Inter, sans-serif;
      font-size: 10px;
      font-weight: 900;
      letter-spacing: 0.22em;
      color: #52b6ff;
    }

    .patch-header-title small {
      display: block;
      color: #8bbce0;
      font-size: 11px;
      letter-spacing: 0.05em;
      margin-top: 4px;
    }

    .close-patch-panel {
      display: grid;
      place-items: center;
      width: 42px;
      height: 42px;
      cursor: pointer;
      color: var(--navy);
      background: var(--ice);
      border: 0;
      font-family: Inter, sans-serif;
      font-size: 18px;
      font-weight: 900;
      clip-path: polygon(15% 0, 100% 12%, 84% 100%, 0 82%);
      box-shadow: 4px 4px 0 #000000;
      transition: 180ms ease;
    }

    .close-patch-panel:hover {
      background: #0088ff;
      color: #ffffff;
      transform: rotate(8deg) scale(1.08);
      box-shadow: 6px 6px 0 #000000;
    }

    /* Patch selection tabs: Clean P3R capsule pills */
    .patch-tabs-scroll {
      padding: 16px 32px 14px;
      border-bottom: 2px solid #08244f;
      overflow-x: auto;
      scrollbar-width: thin;
      scrollbar-color: #0088ff #020817;
      position: relative;
      z-index: 5;
    }

    .patch-tabs {
      display: flex;
      gap: 10px;
      min-width: max-content;
    }

    .patch-tab {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 7px 16px;
      cursor: pointer;
      background: #04142b;
      border: 1.5px solid #0c356f;
      border-radius: 20px;
      color: #8bbce0;
      font-family: Inter, sans-serif;
      font-size: 13px;
      font-weight: 800;
      box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.4);
      transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
    }

    .patch-tab:hover {
      color: #ffffff;
      background: #082c66;
      border-color: #0088ff;
      transform: translateY(-1px);
    }

    .patch-tab.active {
      color: #00122e;
      background: #ffffff;
      border-color: #ffffff;
      box-shadow: 3px 4px 0 #000000;
      transform: translateY(-1px);
    }

    .patch-tab-version {
      font-family: Inter, sans-serif;
      font-size: 12.5px;
      font-weight: 900;
      letter-spacing: -0.01em;
    }

    .patch-tab-tag {
      font-family: Inter, sans-serif;
      font-size: 9px;
      font-weight: 900;
      letter-spacing: 0.1em;
      padding: 2px 6px;
      background: rgba(0, 0, 0, 0.4);
      color: #52b6ff;
      border-radius: 10px;
    }

    .patch-tab.active .patch-tab-tag {
      background: #00122e;
      color: #ffffff;
    }

    /* Patch Content Card: Paper sliding over like P3R document layer */
    .patch-body {
      flex: 1;
      overflow-y: auto;
      padding: 22px 32px 36px;
      position: relative;
      z-index: 5;
      scrollbar-width: thin;
      scrollbar-color: #0d3878 #020c1f;
    }

    .patch-body::-webkit-scrollbar {
      width: 6px;
    }

    .patch-body::-webkit-scrollbar-track {
      background: #020c1f;
    }

    .patch-body::-webkit-scrollbar-thumb {
      background: #0d3878;
      border-radius: 3px;
    }

    .patch-body::-webkit-scrollbar-thumb:hover {
      background: var(--cyan);
    }

    .patch-card {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .patch-card.revealing {
      animation: p3rPaperSlideOver 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    @keyframes p3rPaperSlideOver {
      0% {
        opacity: 0;
        transform: translateX(80px) translateY(6px) rotate(-1.8deg);
        box-shadow: -22px 10px 30px rgba(0, 0, 0, 0.85);
      }
      50% {
        opacity: 1;
      }
      100% {
        opacity: 1;
        transform: translateX(0) translateY(0) rotate(0deg);
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
      }
    }

    .patch-card-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
    }

    .patch-card-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .patch-card-ver {
      font-family: Inter, sans-serif;
      font-size: 24px;
      font-weight: 900;
      color: #ffffff;
      letter-spacing: -0.03em;
      text-shadow: 3px 3px 0 #000000;
    }

    .patch-card-tag {
      font-family: Inter, sans-serif;
      font-size: 10px;
      font-weight: 900;
      letter-spacing: 0.15em;
      padding: 3px 9px;
      color: #00122e;
      background: var(--cyan);
      clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 100%, 0 100%);
    }

    .patch-card-date {
      font-family: Inter, sans-serif;
      font-size: 11px;
      font-weight: 700;
      color: #8bbce0;
      letter-spacing: 0.08em;
    }

    .patch-card-title {
      font-family: "Chakra Petch", sans-serif;
      font-size: 17px;
      font-weight: 700;
      line-height: 1.4;
      color: #ffffff;
      margin: 0;
      padding-left: 12px;
      border-left: 4px solid var(--cyan);
    }

    /* Lead Summary box */
    .patch-summary-lead {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 12px 16px;
      background: #f0f7ff;
      border: 1px solid #bad8f5;
      border-left: 5px solid #0066ee;
      box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.35);
      color: #0a1f3d;
      font-size: 13.5px;
      line-height: 1.6;
      font-weight: 500;
    }

    .patch-summary-lead .summary-icon {
      display: inline-grid;
      place-items: center;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: #0066ee;
      color: #ffffff;
      font-family: Inter, sans-serif;
      font-size: 11px;
      font-weight: 900;
      flex-shrink: 0;
      margin-top: 2px;
    }

    .patch-summary-lead a {
      color: #0066ee;
      text-decoration: underline;
      font-weight: 700;
    }

    .patch-summary-lead a:hover {
      color: #0044aa;
    }

    /* Categorized Section Blocks */
    .patch-section {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 6px;
    }

    .patch-section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding-bottom: 6px;
      border-bottom: 1.5px solid #0a2d64;
    }

    .patch-section-title {
      font-family: "Chakra Petch", sans-serif;
      font-size: 13.5px;
      font-weight: 700;
      letter-spacing: 0.03em;
      color: #ffffff;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .patch-section-title::before {
      content: "";
      display: inline-block;
      width: 4px;
      height: 13px;
      background: #52b6ff;
      transform: skewX(-12deg);
    }

    .patch-section-tag {
      font-family: Inter, sans-serif;
      font-size: 9.5px;
      font-weight: 800;
      letter-spacing: 0.12em;
      color: #004ecc;
      background: #e1efff;
      border: 1px solid #bcd8fa;
      padding: 2px 8px;
      border-radius: 12px;
      text-transform: uppercase;
    }

    /* Structured Section Lists */
    .patch-items-list {
      display: grid;
      gap: 8px;
      padding: 0;
      margin: 0;
      list-style: none;
    }

    .patch-item {
      position: relative;
      padding: 10px 14px;
      display: flex;
      align-items: flex-start;
      gap: 10px;
      color: #0d2342;
      font-size: 13px;
      line-height: 1.55;
      font-weight: 500;
      background: #f4f8fd;
      border: 1px solid #cfe0f2;
      border-left: 4px solid #0077ff;
      box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.25);
      transform: skewX(-2deg);
      transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
    }

    .patch-item:hover {
      transform: skewX(-2deg) translateX(3px);
      background: #ffffff;
      border-color: #0077ff;
    }

    .patch-item-bullet {
      font-size: 9px;
      line-height: 1.7;
      color: #0066ee;
      font-weight: 900;
      flex-shrink: 0;
      transform: skewX(2deg);
    }

    .patch-item-content {
      flex: 1;
      transform: skewX(2deg);
    }

    .patch-item-content strong {
      color: #00122e;
      font-weight: 800;
    }

    /* Pure Multiline Text Section */
    .patch-text-content {
      padding: 14px 18px;
      color: #0d2342;
      font-size: 13.5px;
      line-height: 1.75;
      font-weight: 500;
      background: #f4f8fd;
      border: 1px solid #cfe0f2;
      border-left: 4px solid #0077ff;
      box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.25);
      transform: skewX(-2deg);
      transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
    }

    .patch-text-content:hover {
      transform: skewX(-2deg) translateX(3px);
      background: #ffffff;
      border-color: #0077ff;
    }

    .patch-text-content-inner {
      transform: skewX(2deg);
      white-space: pre-wrap;
      word-break: break-word;
    }

    .patch-text-content-inner p {
      margin: 0 0 10px 0;
    }

    .patch-text-content-inner p:last-child {
      margin-bottom: 0;
    }

    .patch-text-content-inner strong {
      color: #00122e;
      font-weight: 800;
    }

    /* Flow Step Chain (How to Play) */
    .patch-flow-list {
      display: grid;
      gap: 10px;
    }

    .patch-flow-card {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 12px 14px;
      background: #eaf2fa;
      border: 1px solid #c0d7ed;
      border-left: 4px solid #0066ee;
      box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.25);
    }

    .patch-flow-chain {
      display: flex;
      align-items: stretch;
      gap: 8px;
      flex-wrap: wrap;
    }

    .patch-flow-step {
      display: flex;
      flex-direction: column;
      gap: 4px;
      background: #ffffff;
      border: 1px solid #b8d4f0;
      padding: 8px 12px;
      border-radius: 4px;
      flex: 1 1 180px;
      min-width: 140px;
    }

    .step-badge {
      font-family: Inter, sans-serif;
      font-size: 9px;
      font-weight: 900;
      letter-spacing: 0.1em;
      color: #0055cc;
    }

    .step-text {
      font-size: 12.5px;
      line-height: 1.45;
      color: #0d2342;
      font-weight: 600;
    }

    .step-arrow {
      display: grid;
      place-items: center;
      color: #0066ee;
      font-size: 13px;
      font-weight: 900;
      align-self: center;
      user-select: none;
    }

    /* Achievement Cards */
    .patch-achievements-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
      gap: 8px;
    }

    .patch-achievement-card {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 14px;
      background: #fffdf5;
      border: 1px solid #fed7aa;
      border-left: 4px solid #f59e0b;
      box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.25);
      transform: skewX(-2deg);
      transition: transform 180ms ease, background 180ms ease;
    }

    .patch-achievement-card:hover {
      transform: skewX(-2deg) translateX(3px);
      background: #ffffff;
    }

    .achievement-icon {
      font-size: 18px;
      flex-shrink: 0;
      transform: skewX(2deg);
    }

    .achievement-info {
      display: flex;
      flex-direction: column;
      transform: skewX(2deg);
    }

    .achievement-name {
      font-family: Inter, sans-serif;
      font-size: 12.5px;
      font-weight: 800;
      color: #1e293b;
      letter-spacing: 0.01em;
    }

    .achievement-sub {
      font-size: 9.5px;
      font-weight: 800;
      color: #d97706;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    /* Developer Schedule / Announcement Callout Box */
    .patch-notice-box {
      margin-top: 6px;
      padding: 14px 18px;
      background: #fff7ed;
      border: 1.5px solid #fdba74;
      border-left: 5px solid #ea580c;
      box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.3);
      position: relative;
    }

    .patch-notice-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
      color: #c2410c;
      font-family: "Chakra Petch", sans-serif;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    .patch-notice-header span.notice-icon {
      font-size: 15px;
    }

    .patch-notice-content {
      font-size: 12.5px;
      line-height: 1.6;
      color: #431407;
      font-weight: 500;
      margin: 0;
    }

    /* Backward compatibility: Classic highlights list */
    .patch-highlights-title {
      font-family: Inter, sans-serif;
      font-size: 11px;
      font-weight: 900;
      letter-spacing: 0.18em;
      color: #52b6ff;
      margin: 8px 0 4px;
    }

    .patch-highlights-list {
      display: grid;
      gap: 8px;
      padding: 0;
      margin: 0;
      list-style: none;
    }

    .patch-highlights-list li {
      position: relative;
      padding: 11px 14px;
      display: flex;
      align-items: flex-start;
      gap: 10px;
      color: #0d2342;
      font-size: 13px;
      line-height: 1.5;
      font-weight: 500;
      background: #f4f8fd;
      border: 1px solid #cfe0f2;
      border-left: 4px solid #0077ff;
      box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.25);
      transform: skewX(-2deg);
      transition: transform 180ms ease, background 180ms ease;
    }

    .patch-highlights-list li:hover {
      transform: skewX(-2deg) translateX(3px);
      background: #ffffff;
      border-color: #0077ff;
    }

    .patch-highlights-list li.highlight-active {
      background: #ffffff;
      color: #00122e;
      border: 1px solid #ffffff;
      border-top: 3px solid #ff1a55;
      border-left: 5px solid #0077ff;
      box-shadow: 3px 5px 0 #000000;
      font-weight: 700;
    }

    .patch-highlights-list li.highlight-active .highlight-bullet {
      color: #ff1a55;
    }

    .patch-highlights-list li.highlight-active .highlight-text {
      color: #00122e;
    }

    .highlight-bullet {
      font-size: 10px;
      line-height: 1.5;
      color: #0066ee;
      font-weight: 900;
      flex-shrink: 0;
      transform: skewX(2deg);
    }

    .highlight-text {
      flex: 1;
      transform: skewX(2deg);
    }

    .patch-download-btn {
      margin-top: 14px;
      width: 100%;
      text-align: center;
      padding: 16px 22px;
      font-size: 13px;
      font-weight: 900;
      letter-spacing: 0.05em;
      color: #ffffff;
      background: #0066ff;
      box-shadow: 5px 6px 0 #000000;
      clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%);
      transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
    }

    .patch-download-btn:hover {
      background: #0052cc;
      transform: translate(-3px, -3px) skewX(-7deg);
      box-shadow: 8px 9px 0 #000000;
    }

    /* Patch Images / Previews Section */
    .patch-images-wrapper {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin: 10px 0 6px;
      padding: 12px;
      background: rgba(4, 18, 42, 0.6);
      border: 1px solid rgba(82, 182, 255, 0.22);
      border-left: 3px solid #0088ff;
    }

    .patch-images-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 4px;
    }

    .patch-images-tag {
      font-family: Inter, sans-serif;
      font-size: 9px;
      font-weight: 900;
      letter-spacing: 0.14em;
      color: #004ecc;
      background: #cbe5ff;
      padding: 2px 7px;
      border-radius: 2px;
      text-transform: uppercase;
    }

    .patch-images-title {
      font-family: "Chakra Petch", sans-serif;
      font-size: 12px;
      font-weight: 700;
      color: #8ed2ff;
      letter-spacing: 0.02em;
    }

    .patch-images-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 10px;
    }

    .patch-images-grid.single-image {
      grid-template-columns: 1fr;
    }

    .patch-image-item {
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 4px;
      transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
      outline: none;
    }

    .patch-image-item:hover,
    .patch-image-item:focus-visible {
      transform: translateY(-2px);
    }

    .patch-image-thumb-wrap {
      position: relative;
      width: 100%;
      aspect-ratio: 16 / 9;
      overflow: hidden;
      background: #020b18;
      border: 1px solid rgba(82, 182, 255, 0.35);
      box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.4);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .patch-image-thumb {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      transition: transform 300ms ease, filter 300ms ease;
      color: #8ed2ff;
      font-size: 11px;
      text-align: center;
    }

    .patch-image-item:hover .patch-image-thumb,
    .patch-sec-image-wrap:hover .patch-image-thumb {
      transform: scale(1.06);
      filter: brightness(1.08);
    }

    .patch-image-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, transparent 40%, rgba(0, 20, 50, 0.85) 100%);
      display: flex;
      align-items: flex-end;
      justify-content: center;
      padding: 8px;
      opacity: 0;
      transition: opacity 200ms ease;
      pointer-events: none;
    }

    .patch-image-item:hover .patch-image-overlay,
    .patch-image-item:focus-visible .patch-image-overlay,
    .patch-sec-image-wrap:hover .patch-image-overlay,
    .patch-sec-image-wrap:focus-visible .patch-image-overlay {
      opacity: 1;
    }

    .patch-image-expand-icon {
      font-family: "Chakra Petch", sans-serif;
      font-size: 11px;
      font-weight: 700;
      color: #ffffff;
      background: rgba(0, 102, 255, 0.85);
      border: 1px solid #52b6ff;
      padding: 3px 9px;
      clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
      letter-spacing: 0.05em;
    }

    .patch-image-badge {
      position: absolute;
      top: 6px;
      left: 6px;
      font-family: Inter, sans-serif;
      font-size: 8.5px;
      font-weight: 900;
      letter-spacing: 0.1em;
      color: #ffffff;
      background: rgba(0, 60, 214, 0.88);
      border: 1px solid rgba(82, 182, 255, 0.6);
      padding: 2px 6px;
      border-radius: 2px;
      text-transform: uppercase;
      pointer-events: none;
    }

    .patch-image-caption {
      font-family: "Chakra Petch", sans-serif;
      font-size: 11px;
      color: #9eccf2;
      line-height: 1.35;
      padding: 0 2px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    /* Section-level Image */
    .patch-sec-image-wrap {
      cursor: pointer;
      margin: 6px 0;
      outline: none;
    }
    .patch-sec-image-wrap .patch-image-thumb-wrap {
      max-height: 220px;
    }

    @media (max-width: 860px) {
      .patch-drawer-wrapper {
        width: 100% !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
      }
      .patch-panel {
        width: 100% !important;
        border-left: none;
      }
      .patch-panel-header {
        padding: 20px 20px 14px;
      }
      .patch-header-title h3 {
        font-size: clamp(1.4rem, 5vw, 2.2rem);
      }
      .patch-tabs-scroll {
        padding: 0 16px;
      }
      .patch-body {
        padding: 16px 18px 36px;
      }
    }

    @media (max-width: 480px) {
      .patch-panel-header {
        padding: 14px 14px 10px;
      }
      .patch-header-title h3 {
        font-size: 1.35rem;
      }
      .patch-header-title small {
        font-size: 10px;
      }
      .close-patch-panel {
        width: 38px;
        height: 38px;
        font-size: 16px;
      }
      .patch-tabs-scroll {
        padding: 0 12px;
        gap: 6px;
      }
      .patch-tab {
        padding: 6px 12px;
        font-size: 11px;
      }
      .patch-body {
        padding: 12px 14px 30px;
      }
      .patch-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
      }
    }


/* --- css/components/guide.css --- */
    /* ---------------- SECTION 3: TUTORIAL / GUIDE (PERSONA 3 RELOAD STYLE) ---------------- */

    .guide-layout {
      position: relative;
      width: 100%;
      min-height: calc(100vh - 66px);
      height: auto;
      background: transparent;
      overflow: visible;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 0;
      box-sizing: border-box;
      z-index: 2;
    }

    .guide-layout[hidden] {
      display: none !important;
    }

    /* Ambient Water Ripples & Floating Bubbles (Matching Page 1/2) */
    .guide-water-ambient {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 1;
      overflow: hidden;
    }

    .guide-water-ripples {
      position: absolute;
      inset: -35%;
      opacity: 0.42;
      background:
        radial-gradient(circle at 65% 30%, rgba(84, 232, 255, 0.22), transparent 40%),
        repeating-radial-gradient(
          ellipse at 50% 120%,
          transparent 0 32px,
          rgba(84, 232, 255, 0.28) 35px,
          transparent 38px 65px
        );
      transform: perspective(650px) rotateX(62deg) translate3d(0, 20%, 0);
      animation: guideWaterMotion 10s linear infinite;
      will-change: transform;
      backface-visibility: hidden;
    }

    @keyframes guideWaterMotion {
      to {
        transform: perspective(650px) rotateX(62deg) translate3d(0, 32%, 0);
      }
    }

    .guide-ambient-bubbles {
      position: absolute;
      inset: 0;
    }

    .guide-ambient-bubbles i {
      position: absolute;
      left: var(--bx);
      bottom: -40px;
      width: var(--bs);
      height: var(--bs);
      border: 1.5px solid rgba(166, 238, 255, 0.85);
      border-radius: 48% 52% 58% 42%;
      box-shadow: 0 0 14px rgba(84, 232, 255, 0.45), inset 0 0 6px rgba(84, 232, 255, 0.3);
      animation: guideBubbleFloat var(--dur) var(--bd) linear infinite;
      will-change: transform, opacity;
      backface-visibility: hidden;
    }

    @keyframes guideBubbleFloat {
      0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(0.65) rotate(0deg);
      }
      12% {
        opacity: 0.85;
      }
      88% {
        opacity: 0.85;
      }
      100% {
        opacity: 0;
        transform: translate3d(0, -115vh, 0) scale(1.15) rotate(210deg);
      }
    }

    /* 1. Top Infinite Angled Marquee */
    .guide-marquee-track {
      position: absolute;
      top: clamp(24px, 5vh, 60px);
      left: -15%;
      width: 130%;
      height: 70px;
      display: flex;
      overflow: hidden;
      transform: rotate(-9deg) skewX(-14deg);
      pointer-events: none;
      user-select: none;
      z-index: 3;
      opacity: 0.9;
    }

    .guide-marquee-inner {
      display: flex;
      white-space: nowrap;
      animation: p3rMarqueeScroll 52s linear infinite;
      will-change: transform;
      backface-visibility: hidden;
    }

    .guide-marquee-content {
      display: flex;
      align-items: center;
      gap: 28px;
      padding-right: 28px;
      font-family: Inter, sans-serif;
      font-size: clamp(32px, 3.8vw, 54px);
      font-weight: 900;
      font-style: italic;
      letter-spacing: 0.08em;
      color: transparent;
      -webkit-text-stroke: 1.5px rgba(84, 232, 255, 0.7);
      text-shadow: 0 0 20px rgba(0, 180, 255, 0.4);
    }

    .guide-marquee-content span.solid {
      color: #00e1ff;
      -webkit-text-stroke: 0;
      text-shadow: 0 0 25px rgba(0, 225, 255, 0.85);
    }

    .guide-marquee-content span.dot {
      color: rgba(255, 255, 255, 0.35);
      -webkit-text-stroke: 0;
    }

    @keyframes p3rMarqueeScroll {
      0% { transform: translate3d(0, 0, 0); }
      100% { transform: translate3d(-50%, 0, 0); }
    }

    /* 2. P3R Diagonal Slash Split Wrapper & Scene */
    .guide-slash-fx-wrap {
      position: absolute;
      inset: 0;
      overflow: hidden;
      pointer-events: none;
      z-index: 8;
    }

    .p3r-portal-scene {
      position: relative;
      width: 100%;
      min-height: calc(100vh - 66px);
      height: auto;
      overflow: hidden;
      clip-path: polygon(0 58%, 100% 42%, 100% 42%, 0 58%);
      opacity: 0;
      pointer-events: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 30px 4vw 35px;
      box-sizing: border-box;
      z-index: 5;
      transform: translateZ(0);
      backface-visibility: hidden;
    }

    .guide-layout.is-revealed .p3r-portal-scene {
      opacity: 1;
      pointer-events: auto;
      will-change: clip-path, opacity;
      animation: p3rDiagonalSplitOpen 0.85s cubic-bezier(0.12, 0.95, 0.22, 1) 0.1s forwards;
    }

    @keyframes p3rDiagonalSplitOpen {
      0% {
        clip-path: polygon(0 58%, 100% 42%, 100% 42%, 0 58%);
      }
      35% {
        clip-path: polygon(0 38%, 100% 22%, 100% 62%, 0 78%);
      }
      72% {
        clip-path: polygon(0 14%, 100% -2%, 100% 86%, 0 102%);
      }
      100% {
        clip-path: polygon(0 0%, 100% 0%, 100% 100%, 0 100%);
      }
    }

    /* P3R Revealed Atmosphere Underlay (วิกเน็ตต์มืดลึกเบาบาง เกลี่ยขอบโปร่งใสผสานกับ water grid ของเว็บ) */
    .guide-p3r-noir {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 1;
      background: radial-gradient(
        ellipse 70% 60% at 50% 50%,
        rgba(0, 32, 90, 0.5) 0%,
        rgba(1, 8, 24, 0.35) 50%,
        transparent 80%
      );
    }

    /* Diagonal Slash Streak (-8.5 deg dynamic sword cut across center) */
    .guide-slash-streak {
      position: absolute;
      top: 50%;
      left: -25%;
      width: 150%;
      height: 6px;
      background: linear-gradient(90deg, transparent, #0088ff 15%, #ffffff 50%, #00e1ff 75%, transparent);
      box-shadow: 0 0 25px rgba(0, 225, 255, 0.85), 0 0 50px rgba(0, 136, 255, 0.45);
      transform: translate3d(0, -50%, 0) rotate(-8.5deg);
      pointer-events: none;
      z-index: 9;
      opacity: 0;
      will-change: transform, opacity;
      backface-visibility: hidden;
    }

    .guide-layout.is-revealed .guide-slash-streak {
      animation: p3rDiagonalSlashSweep 0.75s cubic-bezier(0.1, 0.85, 0.2, 1) forwards;
    }

    @keyframes p3rDiagonalSlashSweep {
      0% {
        opacity: 1;
        transform: translate3d(-85%, -50%, 0) rotate(-8.5deg) scaleY(2);
      }
      40% {
        opacity: 1;
        transform: translate3d(0%, -50%, 0) rotate(-8.5deg) scaleY(1.2);
      }
      80% {
        opacity: 0.7;
        transform: translate3d(70%, -50%, 0) rotate(-8.5deg) scaleY(0.6);
      }
      100% {
        opacity: 0;
        transform: translate3d(115%, -50%, 0) rotate(-8.5deg) scaleY(0.2);
      }
    }

    /* Diamond-style Diagonal Laser Flash along the parting cut */
    .p3r-horizontal-blade {
      position: absolute;
      top: 50%;
      left: -25%;
      width: 150%;
      height: 3px;
      transform: translate3d(0, -50%, 0) rotate(-8.5deg);
      background: #ffffff;
      box-shadow: 0 0 20px #ffffff, 0 0 45px #00e1ff, 0 0 70px #0088ff;
      opacity: 0;
      pointer-events: none;
      z-index: 8;
      will-change: transform, opacity;
      backface-visibility: hidden;
    }

    .guide-layout.is-revealed .p3r-horizontal-blade {
      animation: p3rDiagonalBladeFlash 0.7s cubic-bezier(0.12, 0.95, 0.25, 1) 0.08s forwards;
    }

    @keyframes p3rDiagonalBladeFlash {
      0% {
        opacity: 1;
        transform: translateY(-50%) rotate(-8.5deg) scaleY(1.8);
        background: #ffffff;
        box-shadow: 0 0 25px #ffffff, 0 0 50px #00e1ff;
      }
      28% {
        opacity: 0.9;
        transform: translateY(-50%) rotate(-8.5deg) scaleY(2.2);
        background: #00e1ff;
        box-shadow: 0 0 25px #00e1ff, 0 0 50px #0088ff;
      }
      60% {
        opacity: 0.45;
        transform: translateY(-50%) rotate(-8.5deg) scaleY(1);
        background: #0088ff;
        box-shadow: 0 0 15px #0088ff;
      }
      100% {
        opacity: 0;
        transform: translateY(-50%) rotate(-8.5deg) scaleY(0.2);
      }
    }

    /* Two separating laser lips on top & bottom edge of opening diagonal aperture */
    .p3r-lip-top, .p3r-lip-bottom {
      position: absolute;
      top: 50%;
      left: -25%;
      width: 150%;
      height: 2.5px;
      background: #00e1ff;
      box-shadow: 0 0 15px #00e1ff, 0 0 35px #0077ff;
      opacity: 0;
      z-index: 8;
      pointer-events: none;
      transform-origin: center center;
    }

    .guide-layout.is-revealed .p3r-lip-top {
      animation: diagLipMoveTop 0.85s cubic-bezier(0.12, 0.95, 0.22, 1) 0.1s forwards;
    }
    .guide-layout.is-revealed .p3r-lip-bottom {
      animation: diagLipMoveBottom 0.85s cubic-bezier(0.12, 0.95, 0.22, 1) 0.1s forwards;
    }

    @keyframes diagLipMoveTop {
      0% {
        transform: translateY(-50%) rotate(-8.5deg);
        opacity: 1;
      }
      35% {
        transform: translateY(calc(-50% - 210px)) rotate(-8.5deg);
        opacity: 0.9;
      }
      72% {
        transform: translateY(calc(-50% - 480px)) rotate(-8.5deg);
        opacity: 0.45;
      }
      100% {
        transform: translateY(calc(-50% - 700px)) rotate(-8.5deg);
        opacity: 0;
      }
    }

    @keyframes diagLipMoveBottom {
      0% {
        transform: translateY(-50%) rotate(-8.5deg);
        opacity: 1;
      }
      35% {
        transform: translateY(calc(-50% + 210px)) rotate(-8.5deg);
        opacity: 0.9;
      }
      72% {
        transform: translateY(calc(-50% + 480px)) rotate(-8.5deg);
        opacity: 0.45;
      }
      100% {
        transform: translateY(calc(-50% + 700px)) rotate(-8.5deg);
        opacity: 0;
      }
    }

    /* 3. Stage Container & Tutorial Box Pop-in */
    .guide-stage {
      position: relative;
      width: min(1040px, 95vw);
      margin: auto;
      z-index: 5;
    }

    .p3r-tutorial-box {
      position: relative;
      width: 100%;
      min-height: auto;
      margin: 10px auto 6px;
      opacity: 0;
      transform: scale(0.85) translateY(65px) skewX(-4deg);
      transition: opacity 0.4s ease;
    }

    .guide-layout.is-revealed .p3r-tutorial-box {
      opacity: 1;
      animation: p3rBoxPop 0.75s cubic-bezier(0.16, 1.12, 0.28, 1) 0.12s both;
    }

    @keyframes p3rBoxPop {
      0% {
        opacity: 0;
        transform: scale(0.82) translateY(75px) skewX(-5deg);
        filter: blur(6px);
      }
      60% {
        opacity: 1;
        transform: scale(1.025) translateY(-6px) skewX(1deg);
        filter: blur(0);
      }
      82% {
        transform: scale(0.99) translateY(2px) skewX(-0.5deg);
      }
      100% {
        opacity: 1;
        transform: scale(1) translateY(0) skewX(0deg);
        filter: blur(0);
      }
    }

    /* Left Cobalt Wing with TUTORIAL repeating text */
    .p3r-box-wing {
      position: absolute;
      left: -38px;
      top: -24px;
      height: 64%;
      width: 190px;
      background: #003cd6;
      clip-path: polygon(0 0, 100% 0, 84% 100%, 0 100%);
      z-index: 1;
      overflow: hidden;
      box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.6);
      opacity: 0;
      transform: translateX(-50px);
    }

    .guide-layout.is-revealed .p3r-box-wing {
      animation: p3rWingSlide 0.65s cubic-bezier(0.16, 1.05, 0.3, 1) 0.18s both;
    }

    @keyframes p3rWingSlide {
      0% {
        opacity: 0;
        transform: translateX(-70px) skewX(-14deg);
      }
      100% {
        opacity: 1;
        transform: translateX(0) skewX(0);
      }
    }

    .p3r-wing-pattern {
      position: absolute;
      inset: -20px 0 0 -20px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      transform: rotate(-14deg) skewX(-12deg);
      opacity: 0.28;
      user-select: none;
      pointer-events: none;
    }

    .p3r-wing-pattern span {
      font-family: Inter, sans-serif;
      font-weight: 900;
      font-size: 38px;
      color: #001038;
      letter-spacing: 0.05em;
      line-height: 0.9;
    }

    /* Huge P3R Stylized Outline '?' mark popping out of the box */
    .p3r-wing-qmark {
      position: absolute;
      top: -65px;
      left: 12px;
      font-family: Inter, sans-serif;
      font-weight: 900;
      font-size: 195px;
      line-height: 0.8;
      color: transparent;
      -webkit-text-stroke: 3.5px rgba(255, 255, 255, 0.95);
      text-shadow: 0 0 25px rgba(84, 232, 255, 0.85);
      transform: translate3d(0, 0, 0) rotate(-7deg) skewX(-6deg);
      user-select: none;
      pointer-events: none;
      z-index: 3;
      opacity: 0;
      will-change: transform, opacity;
      backface-visibility: hidden;
    }

    .guide-layout.is-revealed .p3r-wing-qmark {
      animation: p3rQMarkDrop 0.8s cubic-bezier(0.18, 1.25, 0.3, 1) 0.28s both;
    }

    @keyframes p3rQMarkDrop {
      0% {
        opacity: 0;
        transform: translate3d(0, -90px, 0) scale(1.6) rotate(-22deg);
      }
      60% {
        opacity: 1;
        transform: translate3d(0, 8px, 0) scale(0.94) rotate(-3deg);
      }
      80% {
        transform: translate3d(0, -4px, 0) scale(1.04) rotate(-8deg);
      }
      100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1) rotate(-7deg) skewX(-6deg);
      }
    }

    /* Main Box Body (Dark Navy Angle Cut) */
    .p3r-box-main {
      position: relative;
      z-index: 2;
      margin-left: 65px;
      background: rgba(0, 12, 42, 0.92);
      border: 2px solid #005ce6;
      box-shadow: 0 25px 65px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 92, 230, 0.35);
      backdrop-filter: blur(12px);
      clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
      padding: 18px 30px 14px;
      display: flex;
      flex-direction: column;
      box-sizing: border-box;
    }

    /* White Header Badge */
    .p3r-box-header {
      background: #ffffff;
      color: #001242;
      padding: 6px 36px;
      align-self: center;
      margin-bottom: 14px;
      clip-path: polygon(0 0, 100% 0, 96% 100%, 4% 100%);
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
      opacity: 0;
      transform: translateY(-16px);
    }

    .guide-layout.is-revealed .p3r-box-header {
      animation: p3rHeaderSlide 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.32s both;
    }

    @keyframes p3rHeaderSlide {
      0% {
        opacity: 0;
        transform: translateY(-22px) scaleY(0.7);
      }
      100% {
        opacity: 1;
        transform: translateY(0) scaleY(1);
      }
    }

    .p3r-box-header h3 {
      margin: 0;
      font-family: Inter, "Chakra Petch", sans-serif;
      font-weight: 900;
      font-size: 19px;
      letter-spacing: -0.01em;
      color: #001242;
      text-align: center;
    }

    /* Two-column Body: Left Image (Larger) + Right Text */
    .p3r-box-body {
      display: grid;
      grid-template-columns: 1.15fr 1fr;
      gap: 28px;
      align-items: center;
      margin-bottom: 12px;
    }

    @media (max-width: 860px) {
      .p3r-box-body {
        grid-template-columns: 1fr;
        gap: 18px;
      }
      .p3r-box-main {
        margin-left: 0;
        padding: 20px 20px 16px;
      }
      .p3r-box-wing {
        display: none;
      }
    }

    .p3r-box-media {
      position: relative;
      border-radius: 2px;
      overflow: hidden;
      border: 1px solid rgba(84, 232, 255, 0.4);
      background: #010a1c;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
      aspect-ratio: 16 / 10;
      max-height: 270px;
      opacity: 0;
      transform: translateX(-24px);
    }

    .guide-layout.is-revealed .p3r-box-media {
      animation: p3rMediaSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.36s both;
    }

    @keyframes p3rMediaSlide {
      0% {
        opacity: 0;
        transform: translateX(-30px) scale(0.96);
      }
      100% {
        opacity: 1;
        transform: translateX(0) scale(1);
      }
    }

    .p3r-tutorial-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
      display: block;
      transition: transform 0.35s ease, filter 0.35s ease, opacity 0.2s ease;
    }

    .p3r-box-media:hover .p3r-tutorial-img {
      transform: scale(1.03);
    }

    .p3r-media-tag {
      position: absolute;
      top: 10px;
      left: 10px;
      background: rgba(1, 10, 28, 0.85);
      border: 1px solid var(--cyan);
      color: var(--cyan);
      font-family: Inter, sans-serif;
      font-size: 8.5px;
      font-weight: 900;
      letter-spacing: 0.12em;
      padding: 3px 8px;
      border-radius: 2px;
      backdrop-filter: blur(6px);
      pointer-events: none;
    }

    /* Bullet List & Text */
    .p3r-box-text {
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .p3r-bullet-list {
      list-style: none;
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .p3r-bullet-list li {
      position: relative;
      padding-left: 20px;
      font-family: "Chakra Petch", sans-serif;
      font-size: 15px;
      line-height: 1.6;
      color: #e2f0fa;
      opacity: 0;
      transform: translateX(25px);
    }

    .guide-layout.is-revealed .p3r-bullet-list li {
      animation: p3rBulletIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    .guide-layout.is-revealed .p3r-bullet-list li:nth-child(1) { animation-delay: 0.42s; }
    .guide-layout.is-revealed .p3r-bullet-list li:nth-child(2) { animation-delay: 0.56s; }
    .guide-layout.is-revealed .p3r-bullet-list li:nth-child(3) { animation-delay: 0.7s; }

    .p3r-plain-text {
      font-family: "Chakra Petch", sans-serif;
      font-size: 15px;
      line-height: 1.75;
      color: #e2f0fa;
      opacity: 0;
      transform: translateX(25px);
      white-space: pre-wrap;
    }

    .guide-layout.is-revealed .p3r-plain-text {
      animation: p3rBulletIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.42s forwards;
    }

    .p3r-plain-text p {
      margin: 0 0 12px 0;
    }

    .p3r-plain-text p:last-child {
      margin-bottom: 0;
    }

    @keyframes p3rBulletIn {
      0% {
        opacity: 0;
        transform: translateX(28px);
      }
      100% {
        opacity: 1;
        transform: translateX(0);
      }
    }

    .p3r-bullet-list li::before {
      content: "•";
      position: absolute;
      left: 0;
      top: -1px;
      color: var(--cyan);
      font-size: 20px;
      line-height: 1;
    }

    .highlight-red {
      color: #ff4757;
      font-weight: 700;
      text-shadow: 0 0 10px rgba(255, 71, 87, 0.4);
    }

    .highlight-cyan {
      color: #00e5ff;
      font-weight: 700;
      text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
    }

    .highlight-yellow {
      color: #ffd32a;
      font-weight: 700;
      text-shadow: 0 0 10px rgba(255, 211, 42, 0.4);
    }

    /* Pagination Dots (No Next Button) */
    .p3r-box-pagination {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
      padding-top: 10px;
      margin-top: 4px;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .p3r-page-arrow {
      background: transparent;
      border: 0;
      color: rgba(84, 232, 255, 0.7);
      font-size: 24px;
      cursor: pointer;
      line-height: 1;
      padding: 2px 8px;
      transition: color 0.18s ease, transform 0.18s ease;
    }

    .p3r-page-arrow:hover {
      color: #ffffff;
      transform: scale(1.2);
    }

    .p3r-dots-list {
      display: flex;
      align-items: center;
      gap: 10px;
    }

            .p3r-dot {
      width: 44px;
      height: 44px;
      padding: 17px;
      background-clip: content-box;
      border-radius: 50%;
      background-color: rgba(255, 255, 255, 0.3);
      border: 1px solid rgba(255, 255, 255, 0.5);
      cursor: pointer;
      transition: all 0.2s ease;
      position: relative;
    }

    .p3r-dot:hover {
      background: rgba(84, 232, 255, 0.7);
      transform: scale(1.15);
    }

    .p3r-dot.active {
      width: 14px;
      height: 14px;
      background: var(--cyan);
      border: 2px solid #ffffff;
      box-shadow: 0 0 12px var(--cyan);
      position: relative;
    }

    .p3r-dot.active::after {
      content: "";
      position: absolute;
      inset: 2px;
      border-radius: 50%;
      background: #00122e;
    }

    /* 4. Bottom-Right Return to Game List Button (สไตล์ P3R) */
    .guide-back-btn {
      position: relative;
      bottom: auto;
      right: auto;
      margin: 18px 40px 0 auto;
      align-self: flex-end;
      background: transparent;
      border: 0;
      cursor: pointer;
      z-index: 25;
      padding: 0;
      outline: none;
      opacity: 1;
      pointer-events: auto;
      transform: none;
      display: inline-flex;
      transition: transform 0.2s ease;
    }

    .guide-layout.is-revealed .guide-back-btn {
      opacity: 1;
      pointer-events: auto;
      transform: none;
    }

    .guide-back-badge {
      display: flex;
      align-items: center;
      gap: 12px;
      background: rgba(1, 14, 38, 0.88);
      border: 1.5px solid rgba(84, 232, 255, 0.7);
      padding: 10px 22px 10px 16px;
      transform: skewX(-12deg);
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 168, 255, 0.25);
      backdrop-filter: blur(10px);
      transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .guide-back-arrow {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      background: #0044cc;
      color: #ffffff;
      font-size: 14px;
      font-weight: 900;
      clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%);
      box-shadow: 0 0 14px rgba(0, 100, 255, 0.6);
      transition: all 0.2s ease;
    }

    .guide-back-text {
      display: flex;
      flex-direction: column;
      text-align: left;
      transform: skewX(12deg);
    }

    .guide-back-sub {
      font-family: Inter, sans-serif;
      font-size: 9px;
      font-weight: 800;
      letter-spacing: 0.15em;
      color: var(--cyan);
      line-height: 1.2;
    }

    .guide-back-main {
      font-family: "Chakra Petch", sans-serif;
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 0.04em;
      color: #ffffff;
      line-height: 1.2;
      transition: color 0.2s ease;
    }

    .guide-back-btn:hover {
      transform: translateY(-4px) scale(1.04);
    }

    .guide-back-btn:hover .guide-back-badge {
      background: #00e1ff;
      border-color: #ffffff;
      box-shadow: 0 14px 35px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 225, 255, 0.75);
    }

    .guide-back-btn:hover .guide-back-arrow {
      background: #001238;
      color: #00e1ff;
      transform: translateY(-2px);
    }

    .guide-back-btn:hover .guide-back-sub {
      color: #002266;
    }

    .guide-back-btn:hover .guide-back-main {
      color: #001238;
    }

    @keyframes p3rMobilePortalIn {
      0% {
        opacity: 0;
      }
      100% {
        opacity: 1;
      }
    }

    @media (max-width: 860px) {
      .guide-layout {
        min-height: calc(100vh - 66px);
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 35px 14px 24px;
        overflow: visible;
        background: transparent;
      }

      .p3r-portal-scene {
        position: relative;
        inset: auto;
        width: 100%;
        height: auto;
        min-height: calc(100vh - 66px);
        padding: 0;
        overflow: visible;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
      }

      .guide-stage {
        width: 100%;
        max-width: 100%;
        margin: 0;
      }

      .p3r-tutorial-box {
        margin: 10px auto 0;
        min-height: auto;
      }

      .p3r-wing-qmark {
        font-size: 110px;
        top: -45px;
        left: -4px;
        opacity: 0.45;
      }

      .guide-back-btn {
        position: relative;
        bottom: auto;
        right: auto;
        margin: 16px auto 0;
        align-self: center;
        display: inline-flex;
        z-index: 25;
      }
    }

    @media (max-width: 600px) {
      .p3r-box-header {
        padding: 6px 14px;
        width: 100%;
        box-sizing: border-box;
      }

      .p3r-box-header h3 {
        font-size: 14px;
        line-height: 1.35;
      }

      .p3r-box-main {
        padding: 18px 14px 14px;
      }
    }

    /* Mobile Performance: Cut out heavy background & slash animations on mobile for zero lag (<= 860px) */
    @media (max-width: 860px) {
      .guide-water-ripples,
      .guide-ambient-bubbles,
      .guide-slash-streak,
      .p3r-horizontal-blade,
      .p3r-lip-top,
      .p3r-lip-bottom,
      .p3r-wing-qmark {
        display: none !important;
      }
      .guide-layout .p3r-portal-scene,
      .guide-layout.is-revealed .p3r-portal-scene {
        clip-path: none !important;
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        pointer-events: auto !important;
        transition: none !important;
      }
      .p3r-tutorial-box,
      .guide-layout.is-revealed .p3r-tutorial-box {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
      }
    }

@media (max-width: 860px) {
  .guide-marquee-track { display: none !important; }
}


