:root{
  color-scheme:dark;
  --bg:#05070b;
  --surface:rgba(12,17,25,.86);
  --surface-strong:#111925;
  --text:#f5f8fc;
  --muted:#99a8ba;
  --line:rgba(255,255,255,.10);
  --accent:#83bfff;
  --shadow:0 18px 46px rgba(0,0,0,.24);
  --page:1500px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg)}
body{margin:0;min-height:100vh;color:var(--text);background:var(--bg);line-height:1.5}
body.light{color-scheme:light;--bg:#eef3f8;--surface:rgba(255,255,255,.88);--surface-strong:#fff;--text:#18222f;--muted:#657488;--line:rgba(24,34,47,.13);--accent:#2d6d9a;--shadow:0 18px 46px rgba(45,67,88,.12)}
button,input,select{font:inherit}a{color:inherit;text-decoration:none}img{max-width:100%}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid color-mix(in srgb,var(--accent) 62%,transparent);outline-offset:3px}
[data-protected-media]{-webkit-user-drag:none;user-select:none;-webkit-touch-callout:none}
.gallery-bg{position:fixed;inset:0;z-index:-2;background:linear-gradient(180deg,rgba(5,7,11,.42),rgba(5,7,11,.96)),url('/asset/mainbgdark.webp') center top/cover fixed no-repeat}
body.light .gallery-bg{background:linear-gradient(180deg,rgba(247,250,253,.72),rgba(238,243,248,.97)),url('/asset/mainbglight.webp') center top/cover fixed no-repeat}
.gallery-shell{width:min(calc(100% - 2rem),var(--page));margin-inline:auto}
.gallery-topbar{position:sticky;top:0;z-index:30;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--bg) 80%,transparent);backdrop-filter:blur(20px)}
.gallery-topbar__inner{min-height:70px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:1rem}
.gallery-brand{display:flex;align-items:center;gap:.7rem;font-weight:850;letter-spacing:-.02em}.gallery-brand img{width:34px;height:34px;object-fit:contain}
.gallery-topbar nav{display:flex;justify-content:center;gap:.25rem;flex-wrap:wrap}.gallery-topbar nav a,.gallery-footer nav a{padding:.5rem .7rem;border-radius:999px;color:var(--muted);font-size:.87rem}.gallery-topbar nav a:hover,.gallery-topbar nav a[aria-current="page"],.gallery-footer nav a:hover{color:var(--text);background:color-mix(in srgb,var(--surface-strong) 78%,transparent)}
.gallery-theme{width:40px;height:40px;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--text);cursor:pointer}
.gallery-hero{display:flex;align-items:end;justify-content:space-between;gap:1rem;padding:clamp(2.3rem,5vw,4.5rem) 0 1.4rem;border-bottom:1px solid var(--line)}
.gallery-eyebrow{margin:0 0 .45rem;color:var(--accent);font-size:.7rem;font-weight:850;letter-spacing:.17em;text-transform:uppercase}.gallery-hero h1{margin:0;font-size:clamp(2.6rem,6vw,5.5rem);line-height:.94;letter-spacing:-.06em}
.gallery-count{display:flex;align-items:baseline;gap:.45rem;margin:0;padding:.75rem .95rem;border:1px solid var(--line);border-radius:16px;background:var(--surface)}.gallery-count strong{font-size:1.45rem;line-height:1}.gallery-count span{color:var(--muted);font-size:.75rem;text-transform:uppercase;letter-spacing:.08em}
.gallery-tools{display:grid;grid-template-columns:minmax(220px,1fr) minmax(150px,190px) auto auto;gap:.7rem;align-items:end;margin:1rem 0 1.15rem;padding:.7rem;border:1px solid var(--line);border-radius:17px;background:var(--surface)}
.gallery-search,.gallery-sort{display:grid;gap:.3rem}.gallery-search span,.gallery-sort span{color:var(--muted);font-size:.66rem;font-weight:780;letter-spacing:.08em;text-transform:uppercase}.gallery-search input,.gallery-sort select{width:100%;min-height:44px;border:1px solid var(--line);border-radius:12px;padding:.68rem .8rem;background:var(--surface-strong);color:var(--text)}
.gallery-button{display:inline-flex;justify-content:center;align-items:center;min-height:44px;padding:.66rem .9rem;border:1px solid var(--line);border-radius:12px;background:var(--surface-strong);color:var(--text);cursor:pointer}.gallery-shuffle{white-space:nowrap}.gallery-results{margin:0;padding:.75rem .55rem;color:var(--muted);font-size:.82rem;text-align:right;white-space:nowrap}
.gallery-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.75rem;padding-bottom:4rem}.gallery-grid[hidden]{display:none}
.gallery-card{min-width:0;align-self:start;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:var(--shadow);transition:transform .18s ease,border-color .18s ease,background .18s ease}.gallery-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--accent) 34%,var(--line));background:color-mix(in srgb,var(--surface-strong) 88%,transparent)}.gallery-card[hidden]{display:none}
.gallery-card__open{display:block;width:100%;padding:0;border:0;background:none;color:inherit;cursor:zoom-in}.gallery-card__media{display:grid;place-items:center;width:100%;aspect-ratio:1/1;padding:.5rem;overflow:hidden;background:color-mix(in srgb,var(--surface-strong) 76%,var(--bg))}.gallery-card__media img{display:block;width:100%;height:100%;object-fit:contain;transition:transform .24s ease,opacity .2s ease}.gallery-card:hover img,.gallery-card__open:focus-visible img{transform:scale(1.025)}
.gallery-empty,.gallery-no-results{display:grid;justify-items:center;gap:.7rem;min-height:38vh;align-content:center;text-align:center;border:1px dashed var(--line);border-radius:20px;margin:1rem 0 4rem;padding:2.5rem;background:var(--surface)}.gallery-empty h2,.gallery-no-results h2{margin:0}.gallery-empty p{margin:0;color:var(--muted)}
.gallery-footer{border-top:1px solid var(--line);background:color-mix(in srgb,var(--bg) 90%,transparent)}.gallery-footer .gallery-shell{min-height:82px;display:flex;justify-content:space-between;align-items:center;gap:1rem;color:var(--muted)}.gallery-footer nav{display:flex;gap:.25rem;flex-wrap:wrap}
.gallery-back-top{position:fixed;right:max(1rem,env(safe-area-inset-right));bottom:max(1rem,env(safe-area-inset-bottom));z-index:45;width:46px;height:46px;border:1px solid var(--line);border-radius:50%;background:color-mix(in srgb,var(--surface-strong) 92%,transparent);color:var(--text);box-shadow:var(--shadow);cursor:pointer;backdrop-filter:blur(14px);transition:opacity .18s ease,transform .18s ease}.gallery-back-top[hidden]{display:none}.gallery-back-top:hover{transform:translateY(-2px)}
.gallery-modal{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:.75rem;background:rgba(2,4,8,.9);backdrop-filter:blur(14px)}.gallery-modal[hidden]{display:none}.gallery-modal__dialog{width:min(98vw,1500px);height:min(97vh,1000px);display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;overflow:hidden;border:1px solid rgba(255,255,255,.12);border-radius:20px;background:#070a10;box-shadow:0 34px 100px rgba(0,0,0,.62)}
.gallery-modal__topbar,.gallery-modal__footer{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.65rem .8rem;color:#f5f8fc}.gallery-modal__topbar{border-bottom:1px solid rgba(255,255,255,.09)}.gallery-modal__footer{border-top:1px solid rgba(255,255,255,.09)}.gallery-modal__topbar>span,.gallery-modal__footer>span{color:#9caabd;font-size:.76rem}
.gallery-modal__close,.gallery-modal__nav,.gallery-modal__tools button{border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:#fff;cursor:pointer}.gallery-modal__close{width:40px;height:40px;border-radius:50%;font-size:1.35rem}.gallery-modal__nav{min-height:38px;padding:.48rem .75rem;border-radius:999px}
.gallery-modal__stage{position:relative;display:grid;place-items:center;min-height:0;overflow:hidden;padding:.7rem;touch-action:none;overscroll-behavior:contain;cursor:zoom-in}.gallery-modal__stage.is-zoomed{cursor:grab}.gallery-modal__stage.is-panning{cursor:grabbing!important}.gallery-modal__surface{display:block;flex:none;transform-origin:center center;will-change:transform;touch-action:none}.gallery-modal__surface img{display:block;width:100%;height:100%;object-fit:contain;opacity:0;transition:opacity .16s ease;-webkit-user-drag:none;user-select:none;touch-action:none}.gallery-modal__surface img.is-ready{opacity:1}.gallery-modal__loading,.gallery-modal__error{position:absolute;inset:auto;margin:0;padding:.7rem .9rem;border-radius:12px;background:rgba(5,7,11,.72);color:#dce7f5;font-size:.82rem;backdrop-filter:blur(10px)}
.gallery-modal__tools{display:flex;align-items:center;justify-content:center;gap:.45rem;padding:.55rem .75rem;color:#f5f8fc}.gallery-modal__tools button,.gallery-modal__tools output{min-height:37px;padding:.42rem .7rem;border-radius:999px;color:#fff;font:inherit;font-size:.76rem;font-weight:800}.gallery-modal__tools output{min-width:68px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.04);text-align:center}
html.gallery-modal-open{overflow:hidden}
@media(max-width:1220px){.gallery-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:900px){.gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.gallery-shell{width:min(calc(100% - 1.2rem),var(--page))}.gallery-topbar__inner{grid-template-columns:1fr auto;grid-template-areas:"brand theme" "nav nav";gap:.25rem .7rem;padding:.45rem 0}.gallery-brand{grid-area:brand}.gallery-theme{grid-area:theme}.gallery-topbar nav{grid-area:nav;justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;padding-bottom:.1rem;scrollbar-width:none}.gallery-topbar nav::-webkit-scrollbar{display:none}.gallery-topbar nav a{white-space:nowrap}.gallery-tools{grid-template-columns:minmax(0,1fr) 145px auto}.gallery-results{grid-column:1/-1;text-align:left;padding:.1rem .2rem}.gallery-modal__dialog{height:100dvh;width:100vw;border:0;border-radius:0}.gallery-modal{padding:0}.gallery-modal__footer>span{display:none}}
@media(max-width:620px){.gallery-shell{width:min(calc(100% - .8rem),var(--page))}.gallery-hero{align-items:flex-start;flex-direction:column;padding-top:1.8rem}.gallery-hero h1{font-size:clamp(2.5rem,14vw,3.7rem)}.gallery-count{padding:.58rem .75rem}.gallery-tools{grid-template-columns:1fr 120px}.gallery-shuffle{grid-column:1/-1}.gallery-results{grid-column:1/-1}.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem}.gallery-card{border-radius:12px}.gallery-card__media{padding:.28rem}.gallery-modal__stage{padding:.35rem}.gallery-modal__tools{justify-content:flex-start;overflow-x:auto;padding:.48rem .5rem;scrollbar-width:none}.gallery-modal__tools::-webkit-scrollbar{display:none}.gallery-modal__tools button,.gallery-modal__tools output{flex:0 0 auto}.gallery-modal__topbar,.gallery-modal__footer{padding:.55rem}.gallery-modal__nav{min-height:36px;padding:.42rem .58rem;font-size:.74rem}.gallery-back-top{width:44px;height:44px}}
@media(max-width:350px){.gallery-grid{gap:.3rem}.gallery-card{border-radius:9px}.gallery-tools{grid-template-columns:1fr}.gallery-sort{grid-row:2}.gallery-shuffle{grid-row:3}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}.gallery-card:hover{transform:none}}
@media(max-width:900px){.gallery-bg{background-attachment:scroll}}
