:root { color-scheme: dark; }
[hidden] { display: none !important; }
.gallery-body button { font: inherit; cursor: pointer; }
.gallery-body :focus-visible { outline: 2px solid #b9a9ef; outline-offset: 4px; }
.gallery-page { position: relative; isolation: isolate; width: min(1120px,100%); margin: 0 auto; padding: 108px 28px max(28px,env(safe-area-inset-bottom)); }
.gallery-page::before { content: ""; position: absolute; z-index: -1; pointer-events: none; top: 0; height: 740px; left: calc(50% - 50vw); right: calc(50% - 50vw); background: radial-gradient(ellipse at 50% 12%,#1f163e 0,#0f0a1f 35%,#060509 66%,transparent 85%); opacity: .7; mask-image: linear-gradient(transparent,#000 18%,#000 76%,transparent); }
.gallery-page .profile { margin: 0 auto 40px; text-align: center; }
.gallery-page .profile .pricing-link { margin-top: 22px; border: 1px solid #ccbff84d; background: #ccbff80d; color: #d3c7fa; }
.gallery-page .profile .pricing-link:hover { background: #ccbff81a; border-color: #ccbff880; }
.gallery-page .intro { max-width: 760px; margin: 0 auto; color: #b9a9ef; font-size: clamp(2rem,4.5vw,3.5rem); font-weight: 600; line-height: 1.1; letter-spacing: -.055em; text-wrap: balance; }
@supports ((background-clip:text) or (-webkit-background-clip:text)) {
  .gallery-page .intro { background: linear-gradient(180deg,#977af6 0%,#c5b5fa 100%); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
}
.gallery-page svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.gallery-page .grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.gallery-page .tile { display: block; position: relative; aspect-ratio: 4/5; overflow: hidden; border: 1px solid #7966ba60; border-radius: 16px; background: #0a0810; }
.gallery-page .tile img { width: 100%; height: 100%; display: block; object-fit: cover; }
.gallery-page .tile .stack { position: absolute; top: 10px; right: 10px; width: 19px; height: 19px; color: #fff; filter: drop-shadow(0 1px 2px #0008); fill: #fff; stroke: #fff; }
.gallery-page .tile:hover { border-color: #b9a9ef; }
.gallery-page .tile:hover img { filter: brightness(1.04); }
.gallery-page #load-status { text-align: center; color: #9e9aad; padding: 24px; font-size: 14px; }
.gallery-page #detail { max-width: 600px; margin: 0 auto; }
.gallery-page .detail-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.gallery-page #back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid #7966ba; border-radius: 99px; color: #e0d8fb; background: #171122; font-size: 14px; font-weight: 600; }
.gallery-page #back:hover { background: #251c37; border-color: #b9a9ef; }
.gallery-page #back svg { width: 18px; height: 18px; }
.gallery-page .swipe-hint { margin: 12px 0; min-height: 24px; display: flex; justify-content: center; align-items: center; gap: 7px; color: #b9b3cc; font-size: 13px; }
.gallery-page .viewer { position: relative; overflow: hidden; border: 1px solid #7966ba60; border-radius: 16px; background: #0a0810; }
.gallery-page .slides { display: flex; width: 100%; aspect-ratio: var(--ratio,4/5); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; }
.gallery-page .slides::-webkit-scrollbar { display: none; }
.gallery-page .slide { flex: 0 0 100%; width: 100%; height: 100%; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.gallery-page .slide img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.gallery-page .counter { position: absolute; top: 12px; right: 12px; padding: 5px 9px; border-radius: 20px; color: #fff; background: #0a0810cc; font-size: 12px; pointer-events: none; }
.gallery-page .arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 1px solid #ffffff33; padding: 11px; color: #f7f5fa; background: #0a0810e6; border-radius: 50%; box-shadow: 0 1px 5px #0002; }
.gallery-page .arrow svg { width: 20px; height: 20px; }
.gallery-page .arrow:disabled { visibility: hidden; }
.gallery-page .previous { left: 10px; }
.gallery-page .next { right: 10px; }
.gallery-page .pagination { display: flex; justify-content: center; align-items: center; min-height: 48px; }
.gallery-page .dot { display: grid; place-items: center; width: 32px; height: 44px; padding: 0; border: 0; background: none; }
.gallery-page .dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ffffff35; }
.gallery-page .dot[aria-current="true"]::after { background: #a891f5; }
.gallery-page .page-footer { display: flex; justify-content: center; gap: 24px; margin-top: 40px; font-size: 11px; line-height: 1.6; }
.gallery-page .page-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.gallery-page .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width:760px) {
  .gallery-page { padding: 72px 18px max(24px,env(safe-area-inset-bottom)); }
  .gallery-page .profile { margin-bottom: 28px; }
  .gallery-page .intro { max-width: 460px; }
  .gallery-page .grid { gap: 8px; }
  .gallery-page .tile { border-radius: 8px; }
  .gallery-page .tile .stack { width: 16px; height: 16px; top: 7px; right: 7px; }
}
@media (pointer:coarse) { .gallery-page .arrow { display: none; } }
@media (prefers-reduced-motion:reduce) { .gallery-page .slides { scroll-behavior: auto; } }
@media (forced-colors:active) { .gallery-page .intro { background: none; color: CanvasText; -webkit-text-fill-color: CanvasText; } }
