:root {
  color-scheme: dark;
  --bg: #080c12;
  --surface: rgba(13, 20, 30, 0.86);
  --surface-strong: rgba(12, 19, 29, 0.94);
  --surface-card: rgba(16, 24, 36, 0.9);
  --surface-raised: rgba(22, 33, 48, 0.94);
  --panel: #0e1621;
  --panel-raised: #152130;
  --line: rgba(176, 210, 232, 0.14);
  --line-strong: rgba(131, 224, 240, 0.34);
  --text: #eef6fb;
  --text-soft: #b8c7d4;
  --muted: #8fa3b4;
  --ice: #67d8eb;
  --ice-bright: #b6f3fd;
  --ice-deep: #1d96b4;
  --gold: #eab95c;
  --danger: #f08a8a;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Chakra Petch", "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
  --font-body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* GPU-composited fixed backdrop: keeps the original landscape & portrait artwork with 0 scroll repaint lag */
body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(7, 11, 18, 0.62) 0%, rgba(7, 11, 18, 0.74) 52%, rgba(7, 11, 18, 0.88) 100%),
    url("/images/mod-vault-landscape.png");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  transform: translate3d(0, 0, 0);
  pointer-events: none;
  content: "";
}

@media (orientation: portrait) {
  body::before {
    background-image:
      linear-gradient(180deg, rgba(7, 11, 18, 0.56) 0%, rgba(7, 11, 18, 0.74) 55%, rgba(7, 11, 18, 0.9) 100%),
      url("/images/mod-vault-portrait.png");
  }
}

body.gate-locked {
  overflow: hidden;
}

/* Subtle static ambient accents using pure radial-gradient (no expensive CSS blur filter) */
.ambient {
  position: fixed;
  z-index: -1;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
}

.ambient--one {
  top: -160px;
  left: -180px;
  background: radial-gradient(circle, rgba(54, 178, 212, 0.14) 0%, rgba(54, 178, 212, 0) 68%);
}

.ambient--two {
  right: -180px;
  bottom: -140px;
  background: radial-gradient(circle, rgba(45, 134, 178, 0.11) 0%, rgba(45, 134, 178, 0) 68%);
}

@media (max-width: 720px) {
  .ambient {
    display: none;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: #f3f9fd;
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

button,
input,
select,
textarea {
  font: inherit;
  touch-action: manipulation;
}

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

:is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 2px;
}

.is-hidden {
  display: none !important;
}

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

/* Smooth GPU-only view reveal */
.view-enter {
  animation: view-fade-up 0.2s var(--ease-out) both;
}

@keyframes view-fade-up {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* --- Header & Brand --- */
.site-header {
  width: min(1180px, calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--ice);
}

.brand-mark svg {
  width: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark--image {
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #0d1622;
}

.brand-mark--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: #f3f9fd;
}

.brand-name>span {
  color: var(--ice);
}

.brand-name small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font: 500 10.5px/1.2 var(--font-body);
  letter-spacing: 0.04em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 18, 28, 0.78);
}

.nav-link {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav-link:hover,
.nav-link--active {
  color: #f5fcff;
  background: rgba(103, 216, 235, 0.13);
}

/* --- Animated Color-Shifting Tuyển CTV Banner on Header Bar --- */
@keyframes ctv-gradient-shift {
  0% {
    background-position: 0% 50%;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.35), inset 0 0 12px rgba(255, 255, 255, 0.18);
  }

  50% {
    background-position: 100% 50%;
    box-shadow: 0 0 22px rgba(6, 182, 212, 0.5), inset 0 0 14px rgba(255, 255, 255, 0.25);
  }

  100% {
    background-position: 0% 50%;
    box-shadow: 0 0 16px rgba(236, 72, 153, 0.4), inset 0 0 12px rgba(255, 255, 255, 0.18);
  }
}

@keyframes ctv-pulse-ring {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.35);
    opacity: 0.55;
  }
}

.ctv-banner {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: linear-gradient(120deg, #f59e0b, #ec4899, #8b5cf6, #06b6d4, #10b981, #f59e0b);
  background-size: 300% 300%;
  animation: ctv-gradient-shift 4.5s ease infinite;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s var(--ease-out), filter 0.18s ease;
}

.ctv-banner:hover {
  transform: translate3d(0, -2px, 0) scale(1.03);
  filter: brightness(1.12);
}

.ctv-banner--gate {
  margin-top: 14px;
  width: 100%;
  justify-content: center;
  padding: 10px 18px;
}

.ctv-badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fde047;
  box-shadow: 0 0 8px #fde047;
  animation: ctv-pulse-ring 1.4s ease-in-out infinite;
}

.ctv-icon {
  font-size: 16px;
  line-height: 1;
}

.ctv-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.ctv-text strong {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.ctv-text small {
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.nav-link--ctv {
  background: linear-gradient(120deg, #f59e0b, #ec4899, #06b6d4);
  background-size: 250% 250%;
  animation: ctv-gradient-shift 4s ease infinite;
  color: #ffffff !important;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* --- Sub-Header Green/Blue Support Group Banner ("NHÓM HỖ TRỢ AE MOD") & Coin Mission Bar --- */
.header-subbar {
  width: min(1180px, calc(100% - 48px));
  margin: 12px auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.coin-mission-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.38);
  background: rgba(15, 23, 36, 0.9);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.18);
}

.coin-balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.42);
  color: #fde68a;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.coin-balance-pill strong {
  color: #ffffff;
  font-size: 14px;
}

.coin-mission-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 15px;
  border-radius: 999px;
  border: 1px solid rgba(253, 224, 71, 0.55);
  background: linear-gradient(120deg, #f59e0b, #ea580c, #d97706, #eab308);
  background-size: 240% 240%;
  animation: ctv-gradient-shift 3.5s ease infinite;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  transition: transform 0.16s var(--ease-out), filter 0.16s ease;
}

.coin-mission-btn:hover {
  transform: translate3d(0, -1px, 0) scale(1.02);
  filter: brightness(1.12);
}

.toolbar-coin-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
}

.toolbar-right-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.toolbar-mission-btn {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: var(--radius-sm);
  color: #fef08a;
  background: rgba(146, 64, 14, 0.45);
  font-size: 12px;
  font-weight: 700;
}

.toolbar-mission-btn:hover {
  border-color: rgba(253, 224, 71, 0.8);
  background: rgba(180, 83, 9, 0.65);
  color: #ffffff;
}

.public-pack-badges-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 245px;
  flex: 0 0 auto;
}

.pack-coin-box {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  background: linear-gradient(155deg, rgba(24, 34, 48, 0.96), rgba(13, 20, 31, 0.96));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36), inset 0 0 16px rgba(245, 158, 11, 0.08);
  display: grid;
  gap: 10px;
}

.pack-coin-box-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.18);
}

.pack-coin-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.45);
  font-size: 18px;
}

.pack-coin-title {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.pack-coin-title span {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fde68a;
}

.pack-coin-title strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.pack-coin-title strong em {
  font-style: normal;
  color: #fbbf24;
}

.pack-coin-rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-soft);
}

.pack-coin-rules li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pack-coin-rules strong {
  color: #fde68a;
  font-family: var(--font-display);
  font-weight: 700;
}

.pack-coin-earn-btn {
  width: 100%;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(253, 224, 71, 0.55);
  background: linear-gradient(120deg, #f59e0b, #ea580c, #d97706);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.15s var(--ease-out), filter 0.15s ease;
}

.pack-coin-earn-btn:hover {
  transform: translate3d(0, -1px, 0);
  filter: brightness(1.1);
}

/* --- Created PACK ZIP History List Below Builder --- */
.created-packs-history {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.created-packs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.created-packs-head>div {
  min-width: 0;
  flex: 1;
}

.created-packs-head h3 {
  margin: 3px 0 0;
  font-size: clamp(15px, 2.2vw, 20px);
  line-height: 1.25;
}

.created-packs-head h3 span {
  color: var(--gold);
}

.created-packs-badge {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(234, 185, 92, 0.36);
  background: rgba(234, 185, 92, 0.12);
  color: #f6d486;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
}

.created-packs-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.created-pack-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(103, 216, 235, 0.25);
  background: rgba(13, 23, 35, 0.9);
  transition: border-color 0.16s ease, transform 0.16s var(--ease-out);
}

.created-pack-card:hover {
  border-color: rgba(103, 216, 235, 0.55);
  transform: translate3d(0, -2px, 0);
}

.created-pack-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.created-pack-card-top strong {
  color: #f3f9fd;
  font-size: 14.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.created-pack-tag {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(103, 216, 235, 0.3);
  background: rgba(103, 216, 235, 0.1);
  color: var(--ice-bright);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
}

.created-pack-skins {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.created-pack-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(176, 210, 232, 0.1);
}

.created-pack-meta {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
}

.created-pack-dl-btn {
  min-height: 36px;
  padding: 0 13px;
  font-size: 12px;
}

.zarchiver-guide-box {
  width: 100%;
  margin-top: 10px;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.38);
  background: rgba(8, 25, 22, 0.85);
  text-align: left;
  color: #d1fae5;
  font-size: 12.5px;
  line-height: 1.55;
}

.zarchiver-guide-box strong {
  color: #6ee7b7;
}

.zarchiver-guide-box ol {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
}

.zarchiver-guide-box code {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.16);
  color: #a7f3d0;
  font-family: var(--font-display);
  font-size: 11.5px;
}

.no-coin-dialog {
  border-color: rgba(251, 191, 36, 0.52);
  text-align: center;
}

.no-coin-badge {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(240, 138, 138, 0.45);
  background: rgba(127, 29, 29, 0.38);
  color: #fecaca;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.no-coin-dialog h2 span {
  color: #fbbf24;
}

.no-coin-actions {
  display: grid;
  gap: 10px;
}

@keyframes support-ae-glow {
  0% {
    background-position: 0% 50%;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.42), inset 0 0 12px rgba(255, 255, 255, 0.2);
  }

  50% {
    background-position: 100% 50%;
    box-shadow: 0 0 26px rgba(6, 182, 212, 0.6), inset 0 0 14px rgba(255, 255, 255, 0.28);
  }

  100% {
    background-position: 0% 50%;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.42), inset 0 0 12px rgba(255, 255, 255, 0.2);
  }
}

.support-ae-banner {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 183, 0.55);
  background: linear-gradient(120deg, #059669, #10b981, #06b6d4, #0284c7, #10b981);
  background-size: 280% 280%;
  animation: support-ae-glow 4s ease infinite;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s var(--ease-out), filter 0.18s ease;
}

.support-ae-banner:hover {
  transform: translate3d(0, -2px, 0) scale(1.03);
  filter: brightness(1.12);
}

.support-ae-banner--gate {
  margin-top: 10px;
  width: 100%;
  justify-content: center;
  padding: 10px 18px;
}

.support-ae-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 10px #34d399;
  animation: ctv-pulse-ring 1.4s ease-in-out infinite;
}

.admin-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(13, 21, 32, 0.82);
  color: #d6e4ee;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.16s ease, color 0.16s ease, transform 0.16s var(--ease-out);
}

.admin-link:hover {
  border-color: var(--line-strong);
  color: #ffffff;
  transform: translate3d(0, -1px, 0);
}

.admin-dot,
.live-pulse,
.status-pulse {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ice);
}

.status-pulse {
  background: #4ade80;
}

/* --- Buttons & Inputs --- */
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  transition: transform 0.15s var(--ease-out), background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.button:active {
  transform: scale(0.975);
}

.button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

.button--primary {
  background: linear-gradient(180deg, #5ed5e8 0%, #2cb2cc 100%);
  border-color: rgba(182, 243, 253, 0.45);
  color: #04131a;
}

.button--primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #7be0f0 0%, #3ac2dc 100%);
  transform: translate3d(0, -1px, 0);
}

.button--pack {
  background: linear-gradient(180deg, #f1c76b 0%, #d59d34 100%);
  border-color: rgba(255, 232, 175, 0.5);
  color: #191003;
}

.button--pack:hover:not(:disabled) {
  background: linear-gradient(180deg, #f6d486 0%, #e1ac42 100%);
  transform: translate3d(0, -1px, 0);
}

.button--quiet {
  border-color: rgba(168, 208, 230, 0.24);
  background: rgba(16, 26, 39, 0.86);
  color: #e4f2fa;
}

.button--quiet:hover:not(:disabled) {
  border-color: rgba(103, 216, 235, 0.56);
  background: rgba(24, 44, 62, 0.94);
  color: #ffffff;
  transform: translate3d(0, -1px, 0);
}

.text-button {
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.text-button:hover {
  color: #ffffff;
}

.key-form input,
.admin-login input,
.admin-form input,
.admin-form select,
.admin-form textarea,
.gate-key-form input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(176, 210, 232, 0.22);
  border-radius: var(--radius-sm);
  outline: 0;
  color: var(--text);
  background: rgba(7, 12, 19, 0.92);
  font-size: 14px;
  transition: border-color 0.16s ease;
}

.key-form input::placeholder,
.admin-form input::placeholder,
.admin-form textarea::placeholder,
.gate-key-form input::placeholder {
  color: #6b8092;
}

.key-form input:focus,
.admin-login input:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus,
.gate-key-form input:focus {
  border-color: var(--ice);
}

/* --- Hero Section --- */
.hero {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0 42px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: 36px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ice);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-line {
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: var(--ice);
}

.hero h1 {
  margin: 14px 0 14px;
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.hero h1>span,
.section-heading h2>span,
.how-heading h2>span {
  color: var(--ice);
}

.hero-copy>p {
  max-width: 500px;
  margin-bottom: 24px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-proof {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 18, 28, 0.74);
  color: var(--muted);
  font-size: 12px;
}

.hero-proof strong {
  color: var(--text);
  font-weight: 600;
}

.proof-icon {
  color: var(--ice);
  font-size: 13px;
}

.proof-separator {
  height: 12px;
  border-left: 1px solid var(--line);
}

.hero-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hero-video-link {
  position: relative;
  width: 100%;
  max-width: 510px;
  aspect-ratio: 16 / 9;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(154, 214, 236, 0.28);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #10202e, #09111a);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease;
}

.hero-video-link:not([aria-disabled="true"]):hover {
  transform: translate3d(0, -3px, 0);
  border-color: rgba(103, 216, 235, 0.65);
}

.hero-video-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video-thumbnail:not([src]),
.hero-video-thumbnail[src=""] {
  display: none;
}

.hero-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  color: var(--text-soft);
  text-align: center;
}

.hero-video-placeholder strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.1em;
}

.hero-video-placeholder span {
  font-size: 12.5px;
  color: var(--muted);
}

.hero-video-link.has-thumbnail .hero-video-placeholder {
  display: none;
}

.hero-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  padding-left: 3px;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(8, 14, 22, 0.78);
  font-size: 17px;
  transform: translate3d(-50%, -50%, 0);
  transition: transform 0.18s var(--ease-out), background-color 0.18s ease, color 0.18s ease;
}

.hero-video-link:not([aria-disabled="true"]):hover .hero-video-play {
  background: var(--ice);
  border-color: var(--ice);
  color: #05131a;
  transform: translate3d(-50%, -50%, 0) scale(1.06);
}

.hero-video-label {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid rgba(186, 224, 240, 0.18);
  border-radius: var(--radius-sm);
  color: #eef8fc;
  background: rgba(7, 13, 21, 0.86);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero-video-label span {
  color: var(--ice);
}

.art-caption {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.art-caption>span:last-child {
  color: #6d8294;
}

/* --- Main Sections --- */
.library-section,
.how-section,
.public-pack-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.library-section {
  padding: 36px 0 42px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2,
.how-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.2;
}

.section-index {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 18, 28, 0.72);
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.section-index span {
  margin: 0 5px;
  color: #5d7385;
}

.category-kicker {
  display: inline-block;
  color: var(--ice);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --- Access Panel (Inline fallback when locked) --- */
.access-panel {
  position: relative;
  padding: 24px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(300px, 0.9fr);
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(103, 216, 235, 0.24);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
}

.access-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(103, 216, 235, 0.28);
  border-radius: var(--radius-md);
  color: var(--ice);
  background: rgba(103, 216, 235, 0.08);
}

.access-icon svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.access-copy h3 {
  margin: 4px 0 6px;
  font-size: 19px;
}

.access-copy p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.key-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.key-form .form-message {
  position: static;
  grid-column: 1 / -1;
  margin: 2px 0 0;
}

.form-message {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.5;
}

.get-key-row {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.get-key-row .form-message {
  margin: 0;
  color: var(--text-soft);
}

/* --- File Library Container --- */
.file-library {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

body.category-view .hero,
body.category-view .how-section,
body.category-view .public-pack-section,
body.category-view .site-footer {
  display: none;
}

body.category-view .library-section {
  min-height: calc(100vh - 76px);
  padding-top: 20px;
  border-top: 0;
}

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(9, 15, 23, 0.78);
}

.access-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.status-expiry {
  color: var(--ice-bright);
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}

.library-logout {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(240, 138, 138, 0.34);
  border-radius: var(--radius-sm);
  color: #ffd9d9;
  background: rgba(112, 36, 46, 0.34);
  font-size: 12px;
  font-weight: 700;
}

.library-logout:hover {
  border-color: rgba(240, 138, 138, 0.65);
  background: rgba(145, 42, 56, 0.5);
  color: #ffffff;
}

/* --- Category Grid --- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: 18px;
}

.category-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  cursor: pointer;
  contain: layout style paint;
  transition: transform 0.18s var(--ease-out), border-color 0.18s ease;
}

.category-card:hover {
  border-color: var(--line-strong);
  transform: translate3d(0, -3px, 0);
}

.category-card:active {
  transform: scale(0.985);
}

.category-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0b1420;
  border-bottom: 1px solid var(--line);
}

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

.category-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px 16px 16px;
}

.category-title-row,
.file-group-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.category-title-row>div {
  min-width: 0;
}

.category-info h3 {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: #f3f9fd;
}

.category-count,
.group-total {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid rgba(103, 216, 235, 0.22);
  border-radius: 999px;
  background: rgba(103, 216, 235, 0.09);
  color: var(--ice-bright);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.category-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.category-jump {
  margin-top: auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid rgba(103, 216, 235, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(20, 48, 66, 0.56);
  color: #e4f7fc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.category-card:hover .category-jump {
  border-color: rgba(103, 216, 235, 0.65);
  background: rgba(30, 82, 108, 0.72);
}

/* --- Category Detail, Breadcrumbs, Platform Segmented Tabs & Search --- */
.category-detail {
  scroll-margin-top: 20px;
}

.category-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 0 14px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(15, 25, 38, 0.88);
  color: #e4f2fa;
  font-size: 13px;
  font-weight: 600;
}

.category-back:hover {
  border-color: var(--line-strong);
  background: rgba(24, 42, 60, 0.95);
}

.lq-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(10, 16, 25, 0.72);
  color: var(--muted);
  font-size: 12.5px;
}

.lq-breadcrumbs button {
  padding: 3px 7px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ice);
  cursor: pointer;
  font-weight: 600;
}

.lq-breadcrumbs button:hover {
  background: rgba(103, 216, 235, 0.12);
}

.lq-breadcrumbs [aria-current="page"] {
  color: #f3f9fd;
  font-weight: 700;
}

.breadcrumb-separator {
  color: #54697b;
}

.category-detail .file-group-heading {
  align-items: flex-end;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.category-detail .file-group-heading h3 {
  margin: 4px 0 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
}

.category-detail .file-group-heading p {
  max-width: 680px;
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13.5px;
}

/* Segmented Platform Switcher */
.platform-tabs {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(120px, 1fr);
  gap: 6px;
  margin-top: 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(9, 15, 24, 0.85);
}

.platform-tab {
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.platform-tab:hover {
  color: var(--text);
  background: rgba(103, 216, 235, 0.08);
}

.platform-tab[aria-selected="true"] {
  border-color: rgba(103, 216, 235, 0.45);
  background: linear-gradient(180deg, rgba(44, 154, 184, 0.34), rgba(22, 84, 108, 0.48));
  color: #ffffff;
}

/* Hero Search */
.hero-search {
  display: block;
  width: min(100%, 420px);
  margin-top: 16px;
}

.hero-search-control {
  position: relative;
  display: block;
}

.hero-search-control svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.9;
  stroke-linecap: round;
  pointer-events: none;
  transform: translateY(-50%);
}

.hero-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px 0 40px;
  border: 1px solid rgba(154, 202, 228, 0.24);
  border-radius: var(--radius-sm);
  outline: 0;
  color: var(--text);
  background: rgba(8, 14, 22, 0.9);
  font-size: 14px;
  transition: border-color 0.16s ease;
}

.hero-search input::placeholder {
  color: #6d8294;
}

.hero-search input:focus {
  border-color: var(--ice);
}

.platform-note {
  margin: 14px 0 0;
  padding: 12px 15px;
  border: 1px solid rgba(103, 216, 235, 0.24);
  border-radius: var(--radius-sm);
  color: #d0ecf4;
  background: rgba(15, 36, 48, 0.72);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

/* --- Hero / Skin / Mod Cards Grid --- */
.file-grid,
.category-detail .file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr));
  gap: 16px;
  margin-top: 18px;
}

.entity-card,
.file-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  content-visibility: auto;
  contain-intrinsic-size: auto 255px;
  contain: layout style paint;
  transition: transform 0.18s var(--ease-out), border-color 0.18s ease;
}

.entity-card {
  cursor: pointer;
}

.entity-card:hover,
.file-card:hover {
  border-color: var(--line-strong);
  transform: translate3d(0, -3px, 0);
}

.entity-card:active {
  transform: scale(0.98);
}

.entity-card-image,
.file-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  flex: 0 0 auto;
  overflow: hidden;
  background: #0a131e;
  border-bottom: 1px solid rgba(176, 210, 232, 0.08);
}

.entity-card-image img,
.mod-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entity-card-body,
.file-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 13px 13px;
}

.file-card-type {
  color: var(--ice);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.entity-card h4,
.file-card h4 {
  margin: 0;
  color: #f3f9fd;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.entity-card p,
.file-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.entity-card-open {
  margin-top: auto;
  width: 100%;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgba(103, 216, 235, 0.26);
  border-radius: var(--radius-sm);
  background: rgba(18, 44, 62, 0.56);
  color: #e4f7fc;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.entity-card:hover .entity-card-open {
  border-color: rgba(103, 216, 235, 0.62);
  background: rgba(29, 86, 114, 0.72);
}

.file-card-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(176, 210, 232, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

.download-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(182, 243, 253, 0.4);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #5ed5e8 0%, #2cb2cc 100%);
  color: #04131a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 0.15s var(--ease-out), background 0.16s ease;
}

.download-button:hover {
  background: linear-gradient(180deg, #7be0f0 0%, #3ac2dc 100%);
  transform: translate3d(0, -1px, 0);
}

.download-button:active {
  transform: scale(0.97);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px 16px;
  border: 1px dashed rgba(176, 210, 232, 0.22);
  border-radius: var(--radius-md);
  color: var(--muted);
  text-align: center;
  font-size: 13.5px;
}

/* --- Skin Detail Card --- */
.lq-skin-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 28px;
  align-items: center;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-card);
}

.lq-skin-detail-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(176, 210, 232, 0.12);
  background: #0a121c;
  object-fit: cover;
  display: block;
}

.lq-skin-detail-copy h4 {
  margin: 6px 0 12px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.22;
}

.lq-skin-detail-copy p {
  margin: 0 0 20px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.lq-skin-message {
  min-height: 18px;
  margin-top: 10px;
}

/* --- Prebuilt PACK SKIN Panel inside LQ Category --- */
.lq-packs-panel {
  margin: 16px 0 4px;
  padding: 18px;
  border: 1px solid rgba(103, 216, 235, 0.22);
  border-radius: var(--radius-md);
  background: rgba(11, 22, 34, 0.88);
}

.lq-packs-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.lq-packs-heading h3 {
  margin: 4px 0 4px;
  font-size: clamp(18px, 2.2vw, 22px);
}

.lq-packs-heading h3 span {
  color: var(--ice);
}

.lq-packs-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.lq-packs-count {
  padding: 4px 9px;
  border: 1px solid rgba(103, 216, 235, 0.22);
  border-radius: 999px;
  color: var(--ice-bright);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
}

.lq-pack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lq-pack-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(15, 25, 38, 0.88);
}

.lq-pack-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.lq-pack-card-heading h4 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
}

.lq-pack-card-heading>span {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid rgba(103, 216, 235, 0.24);
  border-radius: 999px;
  color: var(--ice-bright);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
}

.lq-pack-description,
.lq-pack-skin-list {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.lq-pack-skin-list {
  color: var(--text-soft);
}

.lq-pack-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(176, 210, 232, 0.1);
}

.lq-pack-footer>span {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}

.lq-pack-download {
  min-height: 36px;
  padding: 0 13px;
  font-size: 12px;
}

.lq-packs-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* --- Public PACK SKIN AOV Builder --- */
.public-pack-section {
  margin-top: 10px;
  margin-bottom: 48px;
  scroll-margin-top: 20px;
}

.public-pack-panel {
  position: relative;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(234, 185, 92, 0.26);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
}

.public-pack-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.public-pack-heading h2 {
  margin: 6px 0 8px;
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1.2;
}

.public-pack-heading h2 span {
  color: var(--gold);
}

.public-pack-heading p {
  max-width: 680px;
  margin: 0;
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.6;
}

.public-pack-limit {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid rgba(234, 185, 92, 0.34);
  border-radius: 999px;
  background: rgba(234, 185, 92, 0.1);
  color: #f6d486;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.public-pack-form,
.public-pack-fields {
  position: relative;
  display: grid;
  gap: 18px;
}

.public-pack-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.public-pack-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #d6e4ee;
  font-size: 13px;
  font-weight: 600;
}

.public-pack-platform-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(7, 13, 21, 0.72);
}

.public-pack-platform-tabs {
  margin: 0;
}

.public-pack-platform-hint {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}

.public-pack-field input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(176, 210, 232, 0.22);
  border-radius: var(--radius-sm);
  outline: 0;
  color: var(--text);
  background: rgba(7, 12, 19, 0.9);
  font-size: 14px;
  font-weight: 400;
  transition: border-color 0.16s ease;
}

.public-pack-field input:focus {
  border-color: var(--ice);
}

.public-pack-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 13px;
  border: 1px solid rgba(176, 210, 232, 0.24);
  border-radius: var(--radius-sm);
  background: rgba(7, 12, 19, 0.92);
  color: var(--ice);
  font-size: 18px;
}

.public-pack-search-wrap:focus-within {
  border-color: var(--ice);
}

.public-pack-search-wrap input {
  border: 0;
  background: transparent;
  padding-left: 4px;
}

.public-pack-selection-heading,
.public-pack-selected-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: #edf6fc;
  font-size: 14px;
}

.public-pack-selection-heading span,
.public-pack-selected-heading span {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(103, 216, 235, 0.11);
  color: var(--ice-bright);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
}

.public-pack-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(7, 12, 19, 0.65);
}

.public-pack-option,
.public-pack-selected-item {
  display: flex;
  align-items: center;
  gap: 10px;
  gap: 11px;
  min-width: 0;
  padding: 10px 11px;
  padding: 8px 10px;
  border: 1px solid rgba(176, 210, 232, 0.14);
  border-radius: 8px;
  border-radius: 9px;
  background: rgba(17, 27, 40, 0.88);
  content-visibility: auto;
  contain-intrinsic-size: auto 62px;
  contain-intrinsic-size: auto 66px;
  contain: layout style paint;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.public-pack-option:hover {
  border-color: rgba(103, 216, 235, 0.36);
}

.public-pack-option-thumb {
  flex: 0 0 auto;
  width: 58px;
  height: 44px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(131, 224, 240, 0.28);
  background: #0a131f;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.public-pack-option-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.public-pack-option.is-selected {
  border-color: rgba(103, 216, 235, 0.45);
  background: rgba(19, 47, 64, 0.72);
}

.public-pack-option-details {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.public-pack-option-details strong {
  overflow: hidden;
  color: #eef6fb;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-pack-option-details small {
  color: var(--muted);
  font-size: 11.5px;
}

.public-pack-add,
.public-pack-remove {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(103, 216, 235, 0.36);
  border-radius: 8px;
  color: var(--ice-bright);
  background: rgba(24, 72, 92, 0.45);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.14s var(--ease-out), background-color 0.14s ease, border-color 0.14s ease;
}

.public-pack-add:hover:not(:disabled) {
  background: rgba(36, 118, 146, 0.7);
  border-color: var(--ice);
}

.public-pack-add:active:not(:disabled),
.public-pack-remove:active {
  transform: scale(0.92);
}

.public-pack-add:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.public-pack-remove {
  border-color: rgba(240, 138, 138, 0.34);
  background: rgba(112, 36, 46, 0.34);
  color: #ffd4d4;
}

.public-pack-remove:hover {
  border-color: rgba(240, 138, 138, 0.7);
  background: rgba(145, 42, 56, 0.52);
}

.public-pack-selected-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.public-pack-selected-item {
  border-color: rgba(103, 216, 235, 0.28);
  background: rgba(17, 42, 58, 0.62);
}

.public-pack-selected-number {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(103, 216, 235, 0.14);
  color: var(--ice-bright);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
}

.public-pack-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px 14px;
  border: 1px dashed rgba(176, 210, 232, 0.18);
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.public-pack-status {
  min-height: 18px;
  margin: 0;
  color: var(--ice-bright);
  font-size: 13px;
}

.public-pack-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.public-pack-result {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 26px 20px;
  border: 1px solid rgba(103, 216, 235, 0.34);
  border-radius: var(--radius-md);
  background: rgba(15, 40, 56, 0.56);
  text-align: center;
}

.public-pack-result-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--ice);
  border-radius: 50%;
  color: var(--ice-bright);
  background: rgba(103, 216, 235, 0.14);
  font-size: 24px;
  font-weight: 700;
}

.public-pack-result h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--ice-bright);
}

.public-pack-result>strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #f3f9fd;
  font-size: 15px;
}

.public-pack-result>span {
  color: var(--ice);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}

.public-pack-result>p {
  margin: 0 0 6px;
  max-width: 420px;
  color: var(--text-soft);
  font-size: 13px;
}

.public-pack-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  border-radius: inherit;
  text-align: center;
  background: rgba(7, 13, 21, 0.94);
}

.public-pack-overlay strong {
  color: var(--ice-bright);
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.08em;
}

.public-pack-overlay>span:last-child {
  max-width: 340px;
  color: var(--text-soft);
  font-size: 13px;
}

.public-pack-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(103, 216, 235, 0.22);
  border-top-color: var(--ice);
  border-radius: 50%;
  animation: loading-spin 0.72s linear infinite;
}

/* --- Contact / How Section --- */
.how-section {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
}

.how-heading {
  text-align: center;
}

.how-heading .eyebrow {
  justify-content: center;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  transition: border-color 0.18s ease, transform 0.18s var(--ease-out);
}

.step:hover {
  border-color: var(--line-strong);
  transform: translate3d(0, -2px, 0);
}

.step-number {
  position: absolute;
  top: 18px;
  right: 18px;
  color: #62788a;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.step-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid rgba(103, 216, 235, 0.24);
  border-radius: var(--radius-sm);
  background: rgba(103, 216, 235, 0.08);
  font-size: 19px;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.step p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.contact-link {
  align-self: flex-start;
  margin-top: auto;
  min-height: 40px;
}

/* --- Video Reward Section ("🎬 LÀM VIDEO ĐỔI TIỀN 💸") --- */
.button--reward {
  border: 1.5px solid rgba(251, 191, 36, 0.72);
  color: #fef08a;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24) 0%, rgba(244, 63, 94, 0.24) 100%);
  box-shadow: 0 4px 18px rgba(251, 191, 36, 0.16);
}

.button--reward:hover {
  border-color: #fde047;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.38) 0%, rgba(244, 63, 94, 0.38) 100%);
  transform: translate3d(0, -1px, 0);
}

.video-reward-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 36px;
  scroll-margin-top: 24px;
}

.vr-section-head {
  text-align: center;
  margin-bottom: 18px;
}

.vr-section-head .eyebrow {
  justify-content: center;
}

.vr-section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.2;
}

.vr-section-head h2 span {
  color: #fcd34d;
}

.vr-card {
  max-width: 820px;
  margin: 0 auto;
  border-radius: 16px;
  padding: 20px 18px;
  color: #ffffff;
  background: linear-gradient(160deg, #1b1340 0%, #0e0e1c 70%);
  border: 2px solid #fbbf24;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5), 0 0 28px rgba(251, 191, 36, 0.16);
}

.vr-head {
  text-align: center;
}

.vr-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fcd34d;
}

.vr-title {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 4.6vw, 32px);
  line-height: 1.2;
  font-weight: 900;
  background: linear-gradient(90deg, #fde047, #fb923c, #f43f5e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.vr-tiers {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.vr-tier {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 8px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.16s var(--ease-out);
}

.vr-tier:hover {
  transform: translate3d(0, -2px, 0);
}

.vr-tier--hot {
  background: linear-gradient(160deg, #f59e0b55, #f43f5e55);
  border: 2px solid #fbbf24;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.22);
}

.vr-tier-view {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
  color: #7dd3fc;
}

.vr-tier-unit {
  font-size: 11px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.6);
}

.vr-tier-money {
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 900;
  color: #4ade80;
}

.vr-tier-mult {
  margin-top: 5px;
  display: inline-block;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 900;
  padding: 1px 8px;
}

.vr-tier-mult--amber {
  background: #fbbf24;
  color: #000000;
}

.vr-tier-mult--orange {
  background: #fb923c;
  color: #000000;
}

.vr-tier-mult--rose {
  background: #f43f5e;
  color: #ffffff;
}

.vr-slogan {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  color: #fcd34d;
}

.vr-unit-note {
  margin-top: 2px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.52);
}

.vr-notice {
  margin-top: 12px;
  border-radius: 12px;
  padding: 9px 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  background: #22c55e22;
  border: 1px dashed #4ade80;
  color: #ffffff;
}

.vr-text-green {
  color: #86efac;
}

.vr-text-amber {
  color: #fcd34d;
}

.vr-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.48;
}

.vr-rule {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 9px 12px;
  color: #f8fafc;
}

.vr-rule--warn {
  color: #fda4af;
}

.vr-cta {
  display: block;
  text-align: center;
  margin-top: 14px;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: linear-gradient(90deg, #0068ff, #00c6ff);
  box-shadow: 0 8px 22px rgba(0, 132, 255, 0.34);
  transition: transform 0.16s var(--ease-out), filter 0.16s ease;
}

.vr-cta:hover {
  transform: translate3d(0, -2px, 0);
  filter: brightness(1.08);
  color: #ffffff;
}

/* --- Footer --- */
.site-footer {
  width: min(1180px, calc(100% - 48px));
  min-height: 82px;
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
}

.brand--footer .brand-mark--image {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.brand--footer .brand-name {
  font-size: 13px;
}

.brand--footer .brand-name small {
  font-size: 10px;
}

.site-footer>p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.site-footer>p span {
  margin-left: 10px;
  color: #6b8092;
}

.site-copyright-note {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 24px;
  color: #7c92a4;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

/* --- Entry Gate (preserves mod-vault-waiting.jpg background) --- */
.entry-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 20px;
  background-color: #060a14;
  background-image:
    linear-gradient(135deg, rgba(6, 10, 22, 0.84) 0%, rgba(8, 14, 28, 0.62) 52%, rgba(6, 10, 22, 0.86) 100%),
    url("/images/mod-vault-waiting.jpg");
  background-position: center 42%;
  background-size: cover;
  background-repeat: no-repeat;
}

.entry-gate-card {
  position: relative;
  width: min(440px, 100%);
  padding: 32px 28px;
  border: 1px solid rgba(140, 206, 236, 0.28);
  border-radius: var(--radius-lg);
  background: rgba(10, 17, 28, 0.92);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.56);
  animation: view-fade-up 0.28s var(--ease-out) both;
}

.gate-brand {
  margin-bottom: 28px;
}

.entry-gate-card>.eyebrow {
  margin-bottom: 10px;
}

.entry-gate-card h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 8vw, 44px);
  line-height: 1.08;
}

.entry-gate-card h1 span {
  color: var(--ice);
}

.gate-get-key,
.gate-link {
  position: relative;
  width: 100%;
  min-height: 48px;
  font-size: 14px;
  letter-spacing: 0.08em;
}

/* GPU-only subtle pulse using opacity/transform on pseudo-element */
.gate-get-key::after {
  position: absolute;
  inset: -3px;
  border: 1.5px solid rgba(103, 216, 235, 0.55);
  border-radius: 9px;
  pointer-events: none;
  content: "";
  animation: gate-ring-pulse 2.4s var(--ease-out) infinite;
}

.gate-get-key.is-loading::after {
  animation: none;
  opacity: 0;
}

@keyframes gate-ring-pulse {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(1.045, 1.16);
  }
}

.gate-link {
  margin-top: 10px;
}

.gate-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: #c2dce8;
  font-size: 13px;
  line-height: 1.55;
}

.gate-existing-key {
  display: block;
  margin: 14px auto 0;
  padding: 8px 12px;
  min-height: 40px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.gate-existing-key:hover {
  color: var(--ice-bright);
  background: rgba(103, 216, 235, 0.08);
}

.gate-key-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.gate-key-form .button {
  width: 100%;
}

.gate-footnote {
  margin: 22px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* --- Dialog, Toast & Floating Music Toggle (Bottom-Left so Header is never blocked!) --- */
.subscribe-dialog {
  position: fixed;
  width: min(440px, calc(100% - 32px));
  padding: 28px;
  border: 1px solid rgba(103, 216, 235, 0.34);
  border-radius: var(--radius-lg);
  color: var(--text);
  background: #0d1624;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
}

.subscribe-dialog::backdrop {
  background: rgba(4, 8, 14, 0.78);
}

.subscribe-dialog h2 {
  margin: 10px 0 10px;
  font-size: clamp(19px, 4.8vw, 23px);
  line-height: 1.32;
}

.subscribe-dialog p {
  margin-bottom: 20px;
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.6;
}

.subscribe-link {
  width: 100%;
  min-height: 46px;
}

.toast {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 35;
  max-width: min(360px, calc(100% - 88px));
  padding: 12px 16px;
  border: 1px solid rgba(103, 216, 235, 0.36);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: #0e1825;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.44);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 10px, 0);
  transition: opacity 0.18s ease, transform 0.18s var(--ease-out);
}

.toast.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.music-toggle {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: max(18px, env(safe-area-inset-left));
  z-index: 30;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(154, 214, 236, 0.28);
  border-radius: 50%;
  color: var(--text-soft);
  background: rgba(11, 19, 30, 0.92);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  transition: transform 0.16s var(--ease-out), border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.music-toggle:hover {
  transform: translate3d(0, -2px, 0);
  border-color: var(--ice);
  color: #ffffff;
}

.music-toggle:active {
  transform: scale(0.94);
}

.music-toggle[aria-pressed="true"] {
  border-color: var(--ice);
  color: #04131a;
  background: var(--ice);
}

.music-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.music-toggle svg ellipse {
  fill: currentColor;
}

/* --- Loading Helpers (loading.js) --- */
.loading-spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid rgba(103, 216, 235, 0.28);
  border-top-color: var(--ice);
  border-radius: 50%;
  animation: loading-spin 0.68s linear infinite;
}

.button.is-loading {
  cursor: wait;
  transform: none;
}

.button--primary.is-loading .loading-spinner,
.button--pack.is-loading .loading-spinner {
  border-color: rgba(4, 19, 26, 0.26);
  border-top-color: #04131a;
}

.loading-label {
  animation: loading-fade-in 0.14s ease both;
}

.loading-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 36px;
  padding: 8px 12px;
  color: var(--ice-bright);
  font-size: 13px;
  text-align: center;
  animation: loading-fade-in 0.14s ease both;
  transition: opacity 0.16s ease;
}

.loading-status.is-leaving {
  opacity: 0;
}

.is-shaking {
  animation: loading-shake 0.32s ease-in-out;
}

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

@keyframes loading-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes loading-shake {

  20%,
  60% {
    transform: translate3d(-5px, 0, 0);
  }

  40%,
  80% {
    transform: translate3d(5px, 0, 0);
  }
}

/* --- Desktop-only subtle glass on static modal --- */
@media (hover: hover) and (pointer: fine) {
  .entry-gate-card {
    background: rgba(10, 17, 28, 0.84);
    backdrop-filter: blur(8px);
  }
}

/* --- Responsive Breakpoints --- */
@media (max-width: 1060px) {
  .site-header {
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 10px 14px;
  }

  .header-nav {
    order: 4;
    width: 100%;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .header-nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 0 28px;
  }

  .hero-video-link {
    max-width: 100%;
  }

  .access-panel {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .key-form,
  .get-key-row {
    grid-column: 1 / -1;
  }

  .public-pack-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lq-skin-detail {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {

  /* Prevent iOS Safari auto-zoom on input focus by enforcing >=16px font on inputs */
  .key-form input,
  .admin-login input,
  .admin-form input,
  .admin-form select,
  .admin-form textarea,
  .gate-key-form input,
  .hero-search input,
  .public-pack-field input {
    font-size: 16px;
  }

  .site-header,
  .header-subbar,
  .hero,
  .library-section,
  .video-reward-section,
  .how-section,
  .public-pack-section,
  .site-footer,
  .site-copyright-note {
    width: calc(100% - 24px);
  }

  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    min-height: auto;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark--image {
    width: 38px;
    height: 38px;
    border-radius: 9px;
  }

  .brand-name {
    font-size: 14px;
    letter-spacing: 0.04em;
  }

  .brand-name small {
    font-size: 9.5px;
    margin-top: 2px;
  }

  .admin-link {
    grid-column: 2;
    grid-row: 1;
    min-height: 36px;
    padding: 0 11px;
    font-size: 11.5px;
    border-radius: 999px;
  }

  .site-header>.ctv-banner {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 12px;
  }

  /* Scrollable quick-navigation bar on mobile instead of hiding navigation */
  .header-nav {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    justify-content: space-between;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-link {
    flex: 1 0 auto;
    text-align: center;
    padding: 8px 10px;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 8px;
  }

  .nav-link--ctv {
    display: none;
    display: inline-block;
  }

  .video-reward-section {
    padding: 20px 0 26px;
  }

  .vr-card {
    padding: 15px 12px;
    border-radius: 14px;
  }

  .vr-kicker {
    font-size: 10.5px;
    letter-spacing: 0.06em;
  }

  .vr-tiers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .vr-tier--hot {
    grid-column: 1 / -1;
  }

  .vr-rules {
    grid-template-columns: 1fr;
    font-size: 12.5px;
  }

  .vr-cta {
    font-size: 14px;
    padding: 11px 12px;
  }

  .header-subbar {
    margin-top: 10px;
    gap: 8px;
  }

  .support-ae-banner {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    white-space: normal;
  }

  .coin-mission-bar {
    width: 100%;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 12px;
  }

  .coin-balance-pill {
    font-size: 11.5px;
    padding: 6px 10px;
  }

  .coin-mission-btn {
    flex: 1;
    justify-content: center;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 9px;
  }

  .ctv-text strong {
    font-size: 12px;
  }

  .ctv-text small {
    font-size: 10px;
  }

  /* Entry gate mobile layout */
  .entry-gate {
    padding: 14px;
    align-items: center;
  }

  .entry-gate-card {
    padding: 22px 18px;
    border-radius: 14px;
  }

  .gate-brand {
    margin-bottom: 18px;
  }

  .entry-gate-card h1 {
    font-size: clamp(26px, 7.5vw, 34px);
    margin-bottom: 14px;
  }

  .ctv-banner--gate,
  .support-ae-banner--gate {
    padding: 10px 12px;
    border-radius: 10px;
    white-space: normal;
  }

  /* Hero section mobile layout */
  .hero {
    padding: 18px 0 22px;
    gap: 18px;
  }

  .hero h1 {
    margin: 10px 0 10px;
    font-size: clamp(26px, 7.5vw, 34px);
    line-height: 1.15;
  }

  .hero-copy>p {
    font-size: 13.5px;
    margin-bottom: 16px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .hero-actions .button:first-child {
    grid-column: 1 / -1;
    min-height: 46px;
  }

  .hero-actions .button {
    width: 100%;
    padding: 0 12px;
    font-size: 12.5px;
  }

  .hero-proof {
    width: 100%;
    justify-content: center;
    margin-top: 16px;
    padding: 8px 10px;
    font-size: 11.5px;
    border-radius: 10px;
  }

  /* Access panel mobile */
  .access-panel {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 14px;
  }

  .access-icon {
    width: 40px;
    height: 40px;
  }

  /* Library section mobile */
  .library-section {
    padding: 24px 0 32px;
  }

  .file-library {
    padding: 14px;
    gap: 16px;
    border-radius: 12px;
  }

  .section-heading {
    margin-bottom: 14px;
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .category-detail .file-group-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .platform-tabs {
    display: grid;
    width: 100%;
    grid-auto-columns: minmax(0, 1fr);
  }

  .platform-tab {
    padding: 8px 10px;
    font-size: 12.5px;
  }

  .hero-search {
    width: 100%;
  }

  .file-grid,
  .category-detail .file-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .entity-card-body,
  .file-card-body {
    padding: 10px;
    gap: 7px;
  }

  .entity-card h4,
  .file-card h4 {
    font-size: 12.5px;
  }

  .entity-card-open,
  .download-button {
    min-height: 38px;
    font-size: 11.5px;
    padding: 0 8px;
    width: 100%;
  }

  .file-card-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .file-card-foot>span {
    display: none;
  }

  .lq-skin-detail {
    padding: 14px;
    gap: 14px;
  }

  .lq-pack-grid,
  .created-packs-list,
  .public-pack-meta,
  .public-pack-options,
  .public-pack-selected-list,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .public-pack-panel {
    padding: 13px 12px;
    border-radius: 12px;
  }

  .public-pack-heading {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 13px;
    padding-bottom: 12px;
  }

  .public-pack-heading h2 {
    font-size: 20px;
    margin: 4px 0 6px;
  }

  .public-pack-heading p {
    font-size: 12px;
    line-height: 1.5;
  }

  .public-pack-badges-col {
    width: 100%;
    align-items: stretch;
    gap: 8px;
  }

  .public-pack-limit {
    align-self: flex-start;
    padding: 4px 10px;
    font-size: 10px;
  }

  .pack-coin-box {
    padding: 10px 12px;
    gap: 7px;
    border-radius: 10px;
  }

  .pack-coin-box-top {
    gap: 8px;
    padding-bottom: 6px;
  }

  .pack-coin-icon {
    width: 30px;
    height: 30px;
    font-size: 15px;
    border-radius: 8px;
  }

  .pack-coin-title span {
    font-size: 9.5px;
  }

  .pack-coin-title strong {
    font-size: 15px;
  }

  .pack-coin-rules {
    font-size: 11px;
    gap: 2px;
  }

  .pack-coin-earn-btn {
    min-height: 32px;
    font-size: 11px;
    padding: 5px 10px;
  }

  .public-pack-form,
  .public-pack-fields {
    gap: 12px;
  }

  .public-pack-platform-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 10px;
    gap: 6px;
  }

  .public-pack-platform-hint {
    font-size: 11.5px;
  }

  .public-pack-field {
    font-size: 12px;
    gap: 5px;
  }

  .public-pack-field input {
    min-height: 38px;
    padding: 0 10px;
  }

  .public-pack-selection-heading,
  .public-pack-selected-heading {
    font-size: 12.5px;
  }

  .public-pack-selection-heading span,
  .public-pack-selected-heading span {
    font-size: 10.5px;
    padding: 2px 8px;
  }

  .public-pack-options {
    max-height: 240px;
    gap: 7px;
    padding: 5px;
  }

  .public-pack-selected-list {
    gap: 7px;
  }

  .public-pack-option,
  .public-pack-selected-item {
    padding: 7px 9px;
    gap: 8px;
    border-radius: 7px;
    padding: 6px 8px;
    gap: 9px;
    border-radius: 8px;
  }

  .public-pack-option-thumb {
    width: 50px;
    height: 38px;
    border-radius: 6px;
  }

  .public-pack-selected-number {
    width: 22px;
    height: 22px;
    font-size: 10.5px;
    width: 21px;
    height: 21px;
    font-size: 10px;
    border-radius: 5px;
  }

  .public-pack-option-details {
    gap: 1px;
  }

  .public-pack-option-details strong {
    font-size: 12px;
  }

  .public-pack-option-details small {
    font-size: 10.5px;
  }

  .public-pack-add,
  .public-pack-remove {
    width: 30px;
    height: 30px;
    font-size: 16px;
    border-radius: 6px;
  }

  .public-pack-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .public-pack-actions .button {
    min-height: 40px;
    font-size: 12px;
  }

  .created-packs-history {
    margin-top: 18px;
    padding-top: 14px;
  }

  .created-packs-head {
    gap: 8px;
    margin-bottom: 10px;
  }

  .created-packs-head .category-kicker {
    font-size: 9.5px;
    letter-spacing: 0.08em;
  }

  .created-packs-head h3 {
    font-size: 15px;
  }

  .created-packs-badge {
    padding: 3px 9px;
    font-size: 10px;
  }

  .created-pack-card {
    padding: 11px 12px;
    gap: 7px;
    border-radius: 8px;
  }

  .created-pack-card-top strong {
    font-size: 13px;
  }

  .created-pack-tag {
    font-size: 9.5px;
    padding: 2px 7px;
  }

  .created-pack-skins {
    font-size: 11px;
  }

  .created-pack-foot {
    padding-top: 8px;
  }

  .created-pack-dl-btn {
    min-height: 32px;
    font-size: 11px;
    padding: 0 10px;
  }

  .public-pack-actions .button,
  .lq-skin-detail-copy .button,
  .contact-link {
    width: 100%;
  }

  .key-form {
    grid-template-columns: 1fr;
  }

  .key-form .button,
  .get-key-row .button {
    width: 100%;
  }

  .library-toolbar {
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 8px;
  }

  .access-label {
    display: none;
  }

  .step {
    padding: 16px;
  }

  .site-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .site-footer>p span {
    display: block;
    margin: 2px 0 0;
  }

  .site-copyright-note {
    padding-bottom: 62px;
  }

  .subscribe-dialog {
    padding: 20px 16px;
    width: calc(100% - 24px);
  }

  .toast {
    left: 68px;
    right: 12px;
    bottom: max(14px, env(safe-area-inset-bottom));
    max-width: none;
    font-size: 12.5px;
    padding: 10px 12px;
  }

  .music-toggle {
    width: 38px;
    height: 38px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    opacity: 0.88;
  }

  .music-toggle svg {
    width: 17px;
    height: 17px;
  }
}

@media (max-width: 390px) {
  .brand-name {
    font-size: 13px;
  }

  .admin-link {
    padding: 0 9px;
    font-size: 11px;
  }

  .nav-link {
    padding: 7px 6px;
    font-size: 11.5px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}