@font-face {
  font-family: "Poppins";
  src: url("../../../assets/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Poppins";
  src: url("../../../assets/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
}

@font-face {
  font-family: "Noto Sans SC";
  src: url("../../../assets/fonts/NotoSansSC-Regular.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Noto Sans SC";
  src: url("../../../assets/fonts/NotoSansSC-SemiBold.ttf") format("truetype");
  font-weight: 600;
}

:root {
  --ink: #281b49;
  --ink-soft: #685c7f;
  --purple: #7450bd;
  --purple-deep: #4d2d87;
  --yellow: #fff2a8;
  --gold: #d7a62f;
  --gold-bright: #f3ce68;
  --pearl: #fffaf0;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-width: 320px;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at 50% 4%, rgba(255, 255, 255, 0.98) 0 8%, transparent 30%),
    radial-gradient(circle at 8% 31%, rgba(197, 228, 255, 0.52), transparent 28%),
    radial-gradient(circle at 91% 22%, rgba(189, 159, 239, 0.4), transparent 31%),
    radial-gradient(circle at 52% 94%, rgba(255, 218, 115, 0.25), transparent 30%),
    linear-gradient(145deg, #edf8ff 0%, #f4f8ff 39%, #f1ecff 72%, #fff8dc 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(117, 84, 170, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 84, 170, 0.05) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(circle at center, #000 0, transparent 73%);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.bubble-canvas,
.ambient-layer,
.network-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bubble-canvas {
  z-index: 0;
}

.ambient-layer {
  z-index: 0;
  overflow: hidden;
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.38;
  animation: ambient-drift 13s ease-in-out infinite alternate;
}

.glow-gold {
  width: 28vw;
  height: 28vw;
  left: 35vw;
  bottom: -18vw;
  background: rgba(246, 201, 82, 0.32);
}

.glow-purple {
  width: 30vw;
  height: 30vw;
  right: -12vw;
  top: 4vh;
  background: rgba(132, 87, 206, 0.26);
  animation-delay: -5s;
}

.glow-rose {
  width: 22vw;
  height: 22vw;
  left: -8vw;
  top: 40vh;
  background: rgba(225, 147, 181, 0.2);
  animation-delay: -8s;
}

.network-layer {
  z-index: 1;
  opacity: 0.7;
}

.network-layer path {
  fill: none;
  stroke: url("#networkStroke");
  stroke-width: 1.7;
  stroke-dasharray: 6 15;
  animation: network-flow 10s linear infinite;
}

.network-layer circle {
  fill: rgba(255, 250, 218, 0.92);
  stroke: rgba(126, 88, 190, 0.55);
  stroke-width: 1.5;
  animation: node-pulse 3.4s ease-in-out infinite;
}

.resource-shell {
  position: relative;
  z-index: 2;
  width: min(1480px, calc(100% - 38px));
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding: 18px 0 16px;
  overflow: hidden;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 64px;
}

.back-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  padding: 9px 15px;
  border: 1px solid rgba(113, 78, 174, 0.16);
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 254, 226, 0.9), rgba(255, 237, 151, 0.72));
  color: var(--ink);
  font-size: 0.8rem;
  text-decoration: none;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.72), 0 8px 20px rgba(112, 77, 151, 0.1);
  transition: transform 180ms ease, background 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
}

.back-link:hover {
  transform: translateY(-2px);
  border-color: rgba(205, 158, 47, 0.38);
  background: rgba(255, 248, 215, 0.74);
}

.back-link::after,
.download-action::after {
  content: "";
  position: absolute;
  top: -90%;
  left: -55%;
  width: 42%;
  height: 280%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.88), transparent);
  opacity: 0;
  transform: rotate(20deg);
}

.back-link:hover,
.back-link:focus-visible,
.back-link.is-activated,
.back-link:active {
  border-color: rgba(181, 124, 10, 0.86);
  background: linear-gradient(135deg, #fff3a5 0%, #f6c847 45%, #dca21b 100%);
  color: #3e285b;
  box-shadow:
    inset 0 2px 12px rgba(255, 255, 255, 0.88),
    inset 0 -8px 16px rgba(175, 111, 5, 0.2),
    0 10px 28px rgba(98, 55, 143, 0.22),
    0 0 24px rgba(248, 203, 70, 0.58);
}

.back-link:hover::after,
.back-link:focus-visible::after,
.back-link.is-activated::after {
  opacity: 1;
  animation: button-shine 520ms ease forwards;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 1px solid rgba(221, 170, 52, 0.46);
  border-radius: 50%;
  background: rgba(255, 250, 232, 0.62);
  box-shadow: 0 8px 25px rgba(115, 76, 165, 0.13);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: circle(50%);
}

.brand-lockup > span:last-child {
  display: grid;
}

.brand-lockup strong {
  font-size: 1rem;
  letter-spacing: 0.12em;
}

.brand-lockup small {
  color: var(--ink-soft);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.page-label {
  justify-self: end;
  color: rgba(79, 53, 119, 0.45);
  font-family: "Poppins", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
}

.resource-heading {
  margin-top: 16px;
  text-align: center;
}

.heading-kicker,
.document-type,
.card-number {
  font-family: "Poppins", sans-serif;
  letter-spacing: 0.18em;
}

.heading-kicker {
  color: rgba(116, 80, 189, 0.62);
  font-size: 0.64rem;
  font-weight: 600;
}

.resource-heading h1 {
  margin: 5px 0 0;
  font-size: clamp(2rem, 3vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  text-shadow: 0 10px 28px rgba(88, 58, 139, 0.13);
}

.resource-heading p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.document-grid {
  --card-size: clamp(174px, 13.2vw, 218px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: clamp(12px, 1.35vw, 20px);
  width: min(1220px, 96vw);
  max-height: calc(var(--card-size) * 2 + 24px);
  margin: clamp(20px, 3.2vh, 34px) auto 0;
}

.download-card {
  position: relative;
  flex: 0 0 var(--card-size);
  width: var(--card-size);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px 13px 14px;
  border: 1px solid rgba(225, 185, 75, 0.54);
  border-radius: 28px;
  outline: none;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.94), transparent 31%),
    linear-gradient(145deg, rgba(255, 252, 225, 0.88), rgba(255, 237, 145, 0.62));
  box-shadow:
    inset 0 0 35px rgba(255, 255, 255, 0.74),
    0 18px 48px rgba(100, 72, 139, 0.13),
    0 0 0 7px rgba(249, 219, 125, 0.08);
  cursor: pointer;
  isolation: isolate;
  backdrop-filter: blur(14px) saturate(1.16);
  transition: transform 360ms cubic-bezier(.2,.82,.3,1), border-color 360ms ease, box-shadow 360ms ease, background 360ms ease;
}

.download-card::before {
  content: "";
  position: absolute;
  inset: -55%;
  z-index: -2;
  opacity: 0.32;
  background: conic-gradient(from 20deg, transparent, rgba(113, 70, 183, 0.34), transparent 24%, rgba(255, 215, 91, 0.58), transparent 57%, rgba(255, 255, 255, 0.86), transparent 78%);
  animation: card-spin 13s linear infinite;
}

.download-card::after {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 21px;
  opacity: 0.72;
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.download-card:hover,
.download-card:focus-visible {
  transform: translateY(-7px);
  border-color: rgba(132, 86, 197, 0.46);
  box-shadow: inset 0 0 38px rgba(255, 255, 255, 0.78), 0 24px 58px rgba(98, 64, 150, 0.2), 0 0 0 8px rgba(245, 208, 104, 0.12);
}

.download-card:hover,
.download-card:focus-visible,
.download-card.is-selected {
  transform: translateY(-9px) scale(1.025);
  border-color: rgba(183, 129, 16, 0.82);
  background:
    radial-gradient(circle at 26% 17%, rgba(255, 255, 255, 0.98), transparent 25%),
    radial-gradient(circle at 74% 78%, rgba(255, 235, 124, 0.72), transparent 38%),
    linear-gradient(145deg, #fff2a6 0%, #f4c644 48%, #d99c12 100%);
  box-shadow:
    inset 0 3px 22px rgba(255, 255, 255, 0.9),
    inset 0 -18px 38px rgba(167, 98, 3, 0.16),
    0 28px 72px rgba(99, 58, 147, 0.3),
    0 0 0 8px rgba(126, 77, 190, 0.13),
    0 0 54px rgba(244, 191, 48, 0.54);
  filter: saturate(1.12) brightness(1.04);
  animation: gold-arrive 560ms cubic-bezier(.2,.82,.3,1);
}

.download-card:hover::after,
.download-card:focus-visible::after,
.download-card.is-selected::after {
  border-color: rgba(111, 67, 174, 0.36);
  box-shadow: inset 0 0 26px rgba(255, 248, 205, 0.54);
}

.card-number {
  position: absolute;
  top: 13px;
  left: 15px;
  color: rgba(86, 54, 126, 0.48);
  font-size: 0.6rem;
  font-weight: 600;
}

.document-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 7px;
  border: 1px solid rgba(132, 87, 191, 0.2);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 11px 26px rgba(87, 55, 134, 0.11);
  transition: transform 340ms ease, background 340ms ease, box-shadow 340ms ease;
}

.document-icon img {
  width: 29px;
  height: 29px;
  filter: sepia(0.28) saturate(1.2) hue-rotate(218deg);
}

.download-card:hover .document-icon,
.download-card:focus-visible .document-icon,
.download-card.is-selected .document-icon {
  transform: translateY(-3px) rotate(-2deg);
  background: rgba(255, 250, 223, 0.78);
  box-shadow: 0 12px 30px rgba(92, 53, 142, 0.2), 0 0 24px rgba(255, 224, 119, 0.52);
}

.document-type {
  color: rgba(101, 64, 157, 0.66);
  font-size: 0.53rem;
  font-weight: 600;
}

.download-card h2 {
  margin: 5px 0 0;
  font-size: clamp(0.86rem, 1.05vw, 1.05rem);
  letter-spacing: 0.05em;
}

.download-card p {
  display: -webkit-box;
  min-height: 34px;
  margin: 6px 0 9px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.55rem;
  line-height: 1.4;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.download-action {
  position: relative;
  overflow: hidden;
  min-width: 94px;
  padding: 7px 13px;
  border: 1px solid rgba(210, 162, 38, 0.46);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(255, 255, 232, 0.98), rgba(255, 235, 144, 0.9));
  color: var(--purple-deep);
  font-size: 0.64rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 8px rgba(255, 255, 255, 0.9), 0 7px 18px rgba(104, 71, 144, 0.12);
  transition: background 280ms ease, color 280ms ease, border-color 280ms ease, box-shadow 280ms ease, transform 180ms ease;
}

.download-card:hover .download-action,
.download-card:focus-visible .download-action,
.download-card.is-selected .download-action {
  border-color: rgba(255, 250, 211, 0.9);
  background: linear-gradient(135deg, #fff5a8 0%, #f8cb42 44%, #d8970d 100%);
  color: #42285d;
  box-shadow:
    inset 0 2px 9px rgba(255, 255, 255, 0.96),
    inset 0 -6px 12px rgba(166, 95, 0, 0.2),
    0 10px 25px rgba(87, 46, 132, 0.26),
    0 0 24px rgba(255, 220, 88, 0.72);
}

.download-card:hover .download-action::after,
.download-card:focus-visible .download-action::after,
.download-card.is-selected .download-action::after {
  opacity: 1;
  animation: button-shine 620ms ease forwards;
}

.download-action:hover {
  transform: translateY(-2px);
}

.card-orbit {
  position: absolute;
  z-index: 2;
  display: block;
  border: 1px solid rgba(122, 79, 180, 0.24);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.9), rgba(245, 206, 89, 0.46) 52%, rgba(111, 68, 173, 0.12));
  box-shadow: 0 7px 20px rgba(94, 54, 146, 0.12);
  transition: transform 420ms cubic-bezier(.2,.84,.28,1), inset 420ms ease, opacity 420ms ease;
}

.orbit-one {
  width: 36px;
  height: 36px;
  top: -9px;
  right: 22px;
}

.orbit-two {
  width: 23px;
  height: 23px;
  bottom: 18px;
  left: -8px;
}

.download-card:hover .orbit-one,
.download-card:focus-visible .orbit-one,
.download-card.is-selected .orbit-one {
  top: 14px;
  right: 17px;
  transform: scale(0.7);
}

.download-card:hover .orbit-two,
.download-card:focus-visible .orbit-two,
.download-card.is-selected .orbit-two {
  bottom: 16px;
  left: 15px;
  transform: scale(0.65);
}

.selection-tip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: clamp(24px, 4vh, 42px) 0 0;
  color: rgba(79, 57, 104, 0.55);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
}

.selection-tip span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(215, 166, 47, 0.64);
}

.page-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  max-width: calc(100% - 30px);
  padding: 11px 19px;
  border: 1px solid rgba(123, 77, 185, 0.22);
  border-radius: 999px;
  background: rgba(255, 251, 232, 0.88);
  color: var(--ink);
  box-shadow: 0 18px 46px rgba(78, 48, 119, 0.2);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.page-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes ambient-drift { to { transform: translate3d(4vw, -3vh, 0) scale(1.1); } }
@keyframes network-flow { to { stroke-dashoffset: -84; } }
@keyframes node-pulse { 0%, 100% { opacity: 0.38; } 50% { opacity: 1; transform: scale(1.16); } }
@keyframes card-spin { to { transform: rotate(360deg); } }
@keyframes gold-arrive { 0% { transform: translateY(-5px) scale(0.98); } 55% { transform: translateY(-11px) scale(1.045); } 100% { transform: translateY(-9px) scale(1.025); } }
@keyframes button-shine { from { left: -55%; } to { left: 125%; } }

@media (max-height: 760px) and (min-width: 761px) {
  .resource-heading { margin-top: 4px; }
  .resource-heading p { margin-top: 6px; }
  .document-grid { --card-size: 174px; margin-top: 14px; }
  .selection-tip { margin-top: 20px; }
}

@media (max-width: 760px) {
  .resource-shell { width: calc(100% - 20px); padding-top: 8px; }
  .topbar { min-height: 52px; }
  .page-label { display: none; }
  .brand-mark { width: 42px; height: 42px; }
  .back-link { padding: 7px 10px; font-size: 0.7rem; }
  .resource-heading { margin-top: 6px; }
  .resource-heading h1 { font-size: 1.8rem; }
  .resource-heading p { margin-top: 5px; font-size: 0.72rem; }
  .document-grid {
    --card-size: clamp(128px, 40vw, 144px);
    display: grid;
    grid-auto-columns: var(--card-size);
    grid-auto-flow: column;
    grid-template-rows: repeat(2, var(--card-size));
    justify-content: start;
    align-content: start;
    gap: 8px;
    width: 100%;
    max-height: none;
    margin-top: 18px;
    padding: 5px 5px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .document-grid::-webkit-scrollbar { display: none; }
  .download-card { padding: 13px 6px 8px; border-radius: 18px; scroll-snap-align: start; }
  .document-icon { width: 34px; height: 34px; margin-bottom: 4px; border-radius: 12px; }
  .document-icon img { width: 20px; height: 20px; }
  .document-type { display: none; }
  .download-card h2 { margin-top: 3px; font-size: 0.68rem; }
  .download-card p {
    min-height: 25px;
    margin: 3px 0 5px;
    font-size: 0.42rem;
    line-height: 1.28;
    -webkit-line-clamp: 2;
  }
  .download-action { min-width: 68px; padding: 5px 7px; font-size: 0.5rem; }
  .selection-tip { margin-top: 14px; font-size: 0.57rem; }
  .card-number { top: 12px; left: 14px; }
}

@media (max-width: 430px), (max-height: 650px) {
  .resource-heading p,
  .selection-tip {
    display: none;
  }
  .document-grid { margin-top: 10px; }
  .download-card { padding-top: 11px; }
}

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