

:root {
  --ink: #17181c;
  --muted: #747984;
  --paper: #f4f1e8;
  --panel: #fbfaf5;
  --line: rgba(39, 42, 48, .14);
  --gold: #a98443;
  --gold-light: #d8bd7f;
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background:
  radial-gradient(circle at 12% -10%, rgba(216,189,127,.22), transparent 31rem),
  linear-gradient(180deg, #f8f5ec 0, var(--paper) 35rem);
  font-family: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
}
body.lightbox-open { overflow: hidden; }
img { -webkit-user-drag: none; user-select: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.masthead { height: 88px; padding: 0 4vw; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; background: rgba(248,245,236,.76); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 42px; height: 42px; border: 1px solid var(--gold); color: var(--gold); border-radius: 50%; display: grid; place-items: center; font-size: 18px; }
.brand p, .brand h1 { margin: 0; }
.brand p { font-family: ui-sans-serif, system-ui; font-size: 9px; letter-spacing: .25em; color: var(--muted); }
.brand h1 { margin-top: 3px; font-size: 19px; font-weight: 600; letter-spacing: .06em; }
.collection-count { text-decoration: none; border: 1px solid var(--ink); border-radius: 100px; padding: 11px 18px; font-family: ui-sans-serif, system-ui; font-size: 13px; transition: .25s ease; }
.collection-count:hover { background: var(--ink); color: white; transform: translateY(-1px); }
.collection-count-label { cursor: default; }
.collection-count-label:hover { background: transparent; color: var(--ink); transform: none; }

.intro { max-width: 1440px; margin: 0 auto; padding: 82px 4vw 58px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 60px; }
.eyebrow { display: block; color: var(--gold); font-family: ui-sans-serif, system-ui; font-size: 11px; font-weight: 700; letter-spacing: .2em; }
.intro h2 { font-size: clamp(42px, 6vw, 82px); font-weight: 500; line-height: 1.12; letter-spacing: -.035em; margin: 18px 0 24px; }
.intro p { margin: 0; max-width: 650px; color: var(--muted); font-family: ui-sans-serif, system-ui; font-size: 15px; line-height: 1.9; }
.stats { display: flex; border: 1px solid var(--line); background: rgba(255,255,255,.46); border-radius: 18px; overflow: hidden; }
.stats div { width: 130px; padding: 22px; border-right: 1px solid var(--line); }
.stats div:last-child { border: 0; }
.stats strong, .stats span { display: block; }
.stats strong { color: var(--gold); font-size: 32px; font-weight: 500; }
.stats span { margin-top: 5px; color: var(--muted); font-family: ui-sans-serif, system-ui; font-size: 11px; }

.controls { max-width: 1440px; margin: 0 auto; padding: 28px 4vw; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 22px; }
.search-wrap { max-width: 480px; height: 48px; border: 1px solid var(--line); background: var(--panel); display: flex; align-items: center; gap: 10px; padding: 0 15px; border-radius: 10px; }
.search-wrap > span { color: var(--gold); font-size: 24px; }
.search-wrap input { width: 100%; border: 0; outline: 0; background: transparent; font-family: ui-sans-serif, system-ui; font-size: 14px; }
.search-wrap button { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 20px; }
.filter-group { display: grid; grid-template-columns: 110px 1fr; gap: 22px; align-items: start; }
.filter-label { padding-top: 8px; font-family: ui-sans-serif, system-ui; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1px solid var(--line); background: rgba(255,255,255,.4); padding: 8px 13px; border-radius: 100px; cursor: pointer; font-family: ui-sans-serif, system-ui; font-size: 12px; transition: .2s; }
.chips button:hover { border-color: var(--gold); color: var(--gold); }
.chips button.active { border-color: var(--ink); background: var(--ink); color: white; }
.chips i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 2px; box-shadow: 0 0 8px currentColor; }

.result-bar { max-width: 1440px; margin: 0 auto; padding: 26px 4vw 18px; display: flex; justify-content: space-between; align-items: center; font-family: ui-sans-serif, system-ui; color: var(--muted); font-size: 12px; }
.result-bar p { margin: 0; }
.result-bar strong { color: var(--ink); font-size: 16px; }
.result-bar button { background: none; border: 0; text-decoration: underline; cursor: pointer; color: var(--gold); }

.gallery { max-width: 1440px; margin: 0 auto; padding: 0 4vw 72px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.card { min-width: 0; padding: 0; text-align: left; border: 0; background: transparent; cursor: pointer; animation: reveal .55s both; transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.card:active { transform: scale(.975); }
@keyframes reveal { from { opacity: 0; transform: translateY(15px); } }
.image-wrap { position: relative; aspect-ratio: 0.48; overflow: hidden; border-radius: 4px; background: #ddd7c9; box-shadow: 0 8px 28px rgba(37,31,20,.08); }
.image-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .35s; }
.card:hover .image-wrap img { transform: scale(1.025); filter: saturate(1.05) contrast(1.02); }
.view { position: absolute; right: 10px; bottom: 10px; transform: translateY(10px); opacity: 0; background: rgba(20,21,24,.88); color: white; padding: 8px 11px; border-radius: 5px; font-family: ui-sans-serif, system-ui; font-size: 10px; transition: .25s; }
.card:hover .view { opacity: 1; transform: none; }
.card-info { padding: 13px 2px 4px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: .04em; }
.card small { color: var(--gold); font-family: ui-sans-serif, system-ui; font-size: 9px; }
.tags { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tags span { font-family: ui-sans-serif, system-ui; color: var(--muted); font-size: 9px; white-space: nowrap; }
.tags span:last-child { font-weight: 700; }

.anemo { color: #45a995 !important; } .geo { color: #b58429 !important; } .electro { color: #8b63bc !important; }
.dendro { color: #6c9938 !important; } .hydro { color: #438dc7 !important; } .pyro { color: #c85d46 !important; }
.cryo { color: #5e9eac !important; } .multi { color: #9b754e !important; } .special { color: #31527c !important; } .unknown { color: #8a8c91 !important; }

.empty { min-height: 420px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--muted); }
.empty > span { color: var(--gold); font-size: 28px; }
.empty h3 { color: var(--ink); font-size: 24px; margin: 15px 0 5px; }
.empty p { font-family: ui-sans-serif, system-ui; font-size: 13px; }
.empty button { margin-top: 12px; border: 1px solid var(--ink); background: transparent; border-radius: 100px; padding: 9px 16px; cursor: pointer; }

footer { max-width: 1440px; margin: 0 auto; padding: 32px 4vw 54px; border-top: 1px solid var(--line); display: flex; justify-content: center; gap: 14px; color: var(--muted); font-family: ui-sans-serif, system-ui; font-size: 11px; }
footer p { margin: 0; } footer span { color: var(--gold); }

.lightbox { position: fixed; inset: 0; z-index: 50; background: #000; display: grid; place-items: center; padding: 24px; animation: lightboxFade .32s ease both; }
@keyframes lightboxFade { from { opacity: 0; } to { opacity: 1; } }
.close { position: fixed; right: 28px; top: 22px; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.25); color: white; width: 44px; height: 44px; border-radius: 50%; font-size: 27px; cursor: pointer; z-index: 2; }
.close { transition: transform .2s ease, background .2s ease; }
.close:hover { transform: rotate(90deg) scale(1.06); background: rgba(255,255,255,.14); }
.lightbox-content { max-width: 980px; max-height: calc(100vh - 48px); display: grid; grid-template-columns: auto 280px; background: #080808; box-shadow: 0 30px 90px rgba(0,0,0,.8); overflow: hidden; animation: lightboxRise .42s cubic-bezier(.16,1,.3,1) both; }
@keyframes lightboxRise { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
.lightbox-image img { height: calc(100vh - 48px); max-height: 900px; width: auto; max-width: 66vw; object-fit: contain; background: #000; }
.lightbox aside { padding: 38px 30px; display: flex; flex-direction: column; color: #f7f3ea; background: #080808; }
.lightbox h2 { font-size: 38px; font-weight: 500; margin: 14px 0 2px; }
.variant { color: var(--gold); margin: 0; font-family: ui-sans-serif, system-ui; font-size: 12px; }
.lightbox dl { margin: 32px 0; }
.lightbox dl div { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.lightbox dt { color: var(--muted); font-family: ui-sans-serif, system-ui; font-size: 10px; margin-bottom: 6px; }
.lightbox dd { margin: 0; font-size: 17px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 1100px) { .gallery { grid-template-columns: repeat(4, 1fr); } .intro { grid-template-columns: 1fr; } .stats { width: max-content; } }
@media (max-width: 760px) {
  .masthead { height: 72px; } .brand p { display: none; } .brand h1 { font-size: 15px; } .brand-mark { width: 34px; height: 34px; }
  .collection-count { padding: 9px 12px; font-size: 10px; }
  .intro { padding-top: 52px; } .intro h2 { font-size: 46px; } .stats { width: 100%; } .stats div { flex: 1; width: auto; padding: 16px; }
  .filter-group { grid-template-columns: 1fr; gap: 8px; } .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; } .card h3 { font-size: 15px; }
  .lightbox { padding: 10px; } .lightbox-content { max-height: calc(100vh - 20px); grid-template-columns: 1fr; overflow-y: auto; } .lightbox-image img { width: 100%; height: auto; max-height: none; max-width: none; }
  .lightbox aside { padding: 24px; min-height: 280px; } .close { right: 15px; top: 15px; }
}
@media (max-width: 430px) { .intro h2 { font-size: 38px; } .stats span { font-size: 9px; } .tags { display: none; } }

[hidden] { display: none !important; }
.site-navigation { min-height: 74px; padding: 18px 4vw; display: flex; gap: 24px; align-items: center; justify-content: space-between; color: #eee; background: #0c0d0f; font-family: ui-sans-serif, system-ui; }
.site-brand { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .04em; text-decoration: none; white-space: nowrap; }
.site-navigation nav { display: flex; align-items: center; gap: 28px; font-size: 12px; letter-spacing: .08em; }
.site-navigation nav > a, .site-navigation summary { color: #ddd; text-decoration: none; cursor: pointer; }
.site-navigation summary { list-style: none; }
.site-navigation summary::-webkit-details-marker { display: none; }
.site-navigation summary::after { content: '⌄'; margin-left: 6px; }
.site-navigation details { position: relative; }
.site-navigation .dropdown-menu { position: absolute; z-index: 30; top: calc(100% + 12px); right: 0; min-width: 235px; padding: 10px; border: 1px solid #333; border-radius: 10px; background: #111; box-shadow: 0 12px 24px #0004; }
.site-navigation .dropdown-menu a { display: block; padding: 12px; color: #ddd; text-decoration: none; letter-spacing: .03em; }
.site-navigation .dropdown-menu a:hover, .site-navigation .dropdown-menu a:focus-visible { background: #242424; color: #fff; }
.site-navigation details[open] summary { color: #d8bd7f; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.collection-count { cursor: default; }
.collection-count:hover { background: transparent; color: var(--ink); transform: none; }
.image-protected { position: relative; -webkit-touch-callout: none; user-select: none; }
.image-protected img { display: block; pointer-events: none; -webkit-touch-callout: none; }
.image-shield { position: absolute; inset: 0; z-index: 1; }
.view { z-index: 2; pointer-events: none; }
.lightbox { margin: 0; width: 100%; height: 100%; max-width: none; max-height: none; border: 0; color: var(--ink); }
.lightbox:not([open]) { display: none; }
.lightbox::backdrop { background: #000; }
.lightbox-image { min-width: 0; background: #000; }
.no-script { text-align: center; padding: 32px; }
.gallery-status { max-width: 1440px; margin: 0 auto; padding: 16px 4vw; font: 13px/1.7 ui-sans-serif, system-ui; color: var(--muted); }
@media (max-width: 760px) {
  .site-navigation { flex-wrap: wrap; justify-content: center; gap: 16px; padding: 18px 4vw; }
  .site-navigation nav { gap: 18px; font-size: 11px; }
  .site-navigation .dropdown-menu { right: auto; left: -65px; min-width: 215px; }
}
@media print { .image-protected { visibility: hidden; } .lightbox { display: none !important; } }
.site-navigation nav{flex-wrap:wrap}.site-navigation .dropdown-menu{max-height:70vh;overflow-y:auto}.site-navigation .dropdown-menu a{overflow-wrap:anywhere}
