:root { color-scheme: light; font-family: ui-rounded, "Avenir Next", "Trebuchet MS", sans-serif; color: #463366; background: #f6efff; }
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 18% 30%, #ffe4ef 0, transparent 50%), radial-gradient(ellipse at 86% 65%, #dff6fa 0, transparent 50%), #f6efff; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
button:focus-visible, a:focus-visible { outline: 3px solid #8851c7; outline-offset: 5px; }
button:hover { background-color: #fff; }
button:active { transform: scale(.96); }
[hidden] { display: none !important; }
.app { min-height: 100svh; height: 100dvh; display: flex; flex-direction: column; padding: max(20px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); max-width: 1700px; margin: auto; }
header { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-shrink: 0; }
.brand { flex: 1; text-align: center; }
.eyebrow { font-size: 10px; letter-spacing: .2em; font-weight: 800; color: #8d72a8; }
h1 { font-size: clamp(24px, 3.5vw, 38px); margin: 6px 0 0; letter-spacing: -.04em; }
h1 span { color: #dcac56; }
.icon-button { flex-shrink: 0; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #ffffffb3; box-shadow: 0 4px 18px #6554840a; text-decoration: none; font-size: 28px; color: #78569b; }
header:has(#fullscreen[hidden])::after { content: ""; width: 52px; }
main { flex: 1; min-height: 180px; display: flex; flex-direction: column; }
.viewer { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; gap: 20px; margin-top: 12px; }
.viewer::before { content: ""; position: absolute; width: min(66vw, 640px); height: 90%; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(ellipse, #ffffffaf, #ffffff00 70%); pointer-events: none; }
.picture-area { flex: 1; align-self: stretch; position: relative; min-width: 0; display: grid; place-items: center; touch-action: pan-y pinch-zoom; }
#picture { position: absolute; width: auto; height: auto; max-width: calc(100% - 24px); max-height: calc(100% - 24px); border-radius: 18px; object-fit: contain; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 12px 14px #69548025); }
.arrow { z-index: 1; font-size: 46px; line-height: 1; padding-bottom: 6px; }
.sparkle { position: absolute; pointer-events: none; color: #cda354; font-size: 36px; }
.sparkle-one { top: 20%; left: 18%; transform: rotate(12deg); }
.sparkle-two { top: 15%; right: 21%; font-size: 22px; color: #b298d8; }
.sparkle-three { bottom: 15%; right: 17%; color: #d894b6; }
.caption { flex-shrink: 0; text-align: center; margin-top: 12px; }
h2 { margin: 6px 0; font-size: 26px; letter-spacing: -.025em; }
.hint { text-align: center; color: #947ea9; font-size: 12px; margin: 5px 0 18px; }
.hint span { margin-left: 6px; }
footer { flex-shrink: 0; }
#thumbnails { display: flex; gap: 10px; padding: 8px; width: fit-content; max-width: 100%; margin: auto; overflow-x: auto; overscroll-behavior-x: contain; border-radius: 23px; background: #ffffff7d; scrollbar-width: thin; scrollbar-color: #d7c4e8 transparent; }
.thumbnail { position: relative; width: clamp(52px, 7.2vw, 86px); height: clamp(58px, 8vw, 88px); flex-shrink: 0; border-radius: 16px; background: #ffffff73; border: 2px solid transparent; transition: background .15s, border-color .15s; padding: 7px; }
.thumbnail img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; pointer-events: none; }
.thumbnail[aria-current="true"] { border-color: #a07bd0; background: white; box-shadow: 0 3px 10px #805da41c; }
.thumbnail[aria-current="true"]::after { content: ""; position: absolute; bottom: 3px; left: calc(50% - 2px); width: 4px; height: 4px; border-radius: 50%; background: #9363c5; }
.footer-line { display: flex; justify-content: space-between; gap: 14px; align-items: center; color: #947ea9; font-size: 11px; margin-top: 8px; }
.footer-line button { background: transparent; min-height: 44px; padding: 8px; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.footer-line span span { color: #d688ae; font-size: 15px; }
dialog { border: 0; border-radius: 24px; background: #fffaff; color: #463366; padding: 24px; width: min(520px, calc(100% - 32px)); max-height: 80dvh; box-shadow: 0 20px 80px #39245540; }
dialog::backdrop { background: #39245566; backdrop-filter: blur(5px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
dialog p, dialog li { line-height: 1.6; }
dialog ul { padding-left: 20px; }
dialog a { color: #76519f; }
#image-error { text-align: center; z-index: 1; }
#retry { padding: 14px 20px; border-radius: 20px; background: white; }
.noscript { position: fixed; left: 0; right: 0; top: 100px; text-align: center; background: #fff; padding: 16px; }
@media (max-width: 600px) {
  .app { padding-left: 12px; padding-right: 12px; padding-top: max(14px, env(safe-area-inset-top)); }
  header { gap: 8px; }
  .eyebrow { font-size: 8px; letter-spacing: .16em; }
  .icon-button, header:has(#fullscreen[hidden])::after { width: 44px; height: 44px; }
  .viewer { gap: 0; }
  #picture { max-width: 100%; max-height: calc(100% - 16px); border-radius: 12px; }
  .sparkle-one { left: 14%; }
  .sparkle-three { right: 12%; }
  h2 { font-size: 23px; }
  .footer-line { justify-content: center; }
  .footer-line > span { display: none; }
  #thumbnails { gap: 7px; }
}
@media (max-height: 540px) and (orientation: landscape) {
  .app { padding-top: 10px; padding-bottom: 6px; }
  .brand .eyebrow, .hint, .footer-line > span { display: none; }
  h1 { font-size: 24px; margin: 0; }
  .icon-button { width: 44px; height: 44px; }
  .viewer { margin-top: 0; }
  .caption { margin-top: 0; }
  .caption h2 { font-size: 18px; margin: 2px 0 6px; }
  .thumbnail { width: 50px; height: 50px; border-radius: 10px; }
  #thumbnails { padding: 4px; border-radius: 14px; }
  .footer-line { justify-content: center; margin: 0; }
  .footer-line button { min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
