/* Artwork gallery — visual language shared with Universe Home. */
main.site-container{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}

:root{
  --gallery-bg:#f3f4f6;
  --gallery-bg-image:url("/static/main_img/NoIMG/NoIMG_bg_LIGHT.webp");
  --gallery-panel:rgba(255,255,255,.86);
  --gallery-surface:rgba(255,255,255,.82);
  --gallery-soft:rgba(17,24,39,.055);
  --gallery-border:rgba(17,24,39,.13);
  --gallery-text:#17191d;
  --gallery-muted:rgba(17,24,39,.68);
  --gallery-accent:rgba(34,197,94,.95);
  --gallery-accent-hover:rgba(22,163,74,.98);
  --gallery-accent-text:#fff;
  --gallery-shadow:0 12px 30px rgba(0,0,0,.11);
  --gallery-radius:16px;
}

body.theme-dark,body.dark,html[data-theme="dark"] body{
  --gallery-bg:#0b0b0b;
  --gallery-bg-image:url("/static/main_img/NoIMG/NoIMG_bg_NIGHT.webp");
  --gallery-panel:rgba(15,15,15,.78);
  --gallery-surface:rgba(24,24,24,.82);
  --gallery-soft:rgba(255,255,255,.075);
  --gallery-border:rgba(255,255,255,.12);
  --gallery-text:#fff;
  --gallery-muted:rgba(255,255,255,.74);
  --gallery-accent:rgba(34,197,94,.92);
  --gallery-accent-hover:rgba(22,163,74,.96);
  --gallery-accent-text:#fff;
  --gallery-shadow:0 14px 34px rgba(0,0,0,.3);
}

.artwork-gallery-bg{
  min-height:100vh;min-height:100dvh;padding:10px 0 36px;box-sizing:border-box;
  background-color:var(--gallery-bg);background-image:var(--gallery-bg-url-light,var(--gallery-bg-image));
  background-position:center;background-repeat:no-repeat;background-size:cover;background-attachment:fixed;
  color:var(--gallery-text);font-family:Arial,sans-serif
}
body.theme-dark .artwork-gallery-bg,body.dark .artwork-gallery-bg,html[data-theme="dark"] body .artwork-gallery-bg{
  background-image:var(--gallery-bg-url-dark,var(--gallery-bg-url-light,var(--gallery-bg-image)))
}
.artwork-gallery-page-shell{width:min(1280px,94vw);margin:0 auto}

.artwork-gallery-header{
  position:relative;display:flex;min-height:clamp(210px,24vw,300px);align-items:flex-end;
  justify-content:space-between;gap:30px;padding:clamp(26px,4vw,52px);box-sizing:border-box;
  overflow:hidden;border:0;border-radius:18px;
  background:radial-gradient(circle at 84% 15%,rgba(114,167,255,.34),transparent 31%),
    radial-gradient(circle at 8% 110%,rgba(116,205,166,.24),transparent 35%),
    linear-gradient(135deg,rgba(11,18,31,.94),rgba(27,39,60,.84));
  box-shadow:var(--gallery-shadow);color:#fff
}
.artwork-gallery-header-image{position:absolute;inset:0;z-index:0;display:block;width:100%;height:100%;object-fit:cover;object-position:center;filter:none}
.theme-img-dark{display:none}
body.theme-dark .theme-img-light,body.dark .theme-img-light,html[data-theme="dark"] body .theme-img-light{display:none}
body.theme-dark .theme-img-dark,body.dark .theme-img-dark,html[data-theme="dark"] body .theme-img-dark{display:block}
.artwork-gallery-heading,.artwork-gallery-actions,.artwork-gallery-admin{position:relative;z-index:2}
.artwork-gallery-back{
  position:absolute;top:12px;left:12px;z-index:3;display:inline-flex;min-height:40px;
  align-items:center;gap:7px;padding:8px 13px;box-sizing:border-box;border:1px solid rgba(255,255,255,.2);
  border-radius:999px;background:rgba(0,0,0,.5);color:#fff;font-size:.9rem;font-weight:700;
  text-decoration:none;backdrop-filter:blur(6px);transition:background-color .2s ease,transform .15s ease
}
.artwork-gallery-back:hover{background:rgba(0,0,0,.7);transform:translateY(-1px)}
.artwork-gallery-back-icon{
  display:inline-block;width:15px;height:15px;flex:0 0 15px;background:currentColor;
  -webkit-mask:url("/static/main_img/icons/back_simple.svg") center/contain no-repeat;
  mask:url("/static/main_img/icons/back_simple.svg") center/contain no-repeat
}
.artwork-gallery-heading{
  max-width:760px;font-family:"Space Grotesk",system-ui,sans-serif;font-weight:700;
  color:#fff;text-shadow:0 6px 24px rgba(0,0,0,.5),0 0 16px rgba(34,197,94,.18)
}
.artwork-gallery-heading h1{margin:0;font-family:"Space Grotesk",system-ui,sans-serif;font-size:clamp(2rem,4vw,3.5rem);font-weight:700;line-height:1.05;letter-spacing:.02em;color:#fff;text-shadow:0 6px 24px rgba(0,0,0,.55),0 0 14px rgba(34,197,94,.15)}
.artwork-eyebrow{margin:0 0 10px;color:#fff;font-family:"Space Grotesk",system-ui,sans-serif;font-size:.76rem;font-weight:700;letter-spacing:.15em;text-transform:uppercase;text-shadow:0 6px 24px rgba(0,0,0,.5),0 0 16px rgba(34,197,94,.18)}
.artwork-gallery-intro{max-width:680px;margin:14px 0 0;color:rgba(255,255,255,.82);font-family:"Space Grotesk",system-ui,sans-serif;font-size:clamp(.94rem,1.35vw,1.06rem);font-weight:500;line-height:1.3;letter-spacing:.01em;text-shadow:0 4px 16px rgba(0,0,0,.45)}
.artwork-gallery-admin{position:absolute;top:4px;right:2px;z-index:5}
.artwork-gallery-actions{display:flex;flex:0 0 auto;flex-wrap:wrap;justify-content:flex-end;gap:9px}

.artwork-button{
  display:inline-flex;min-height:42px;align-items:center;justify-content:center;padding:9px 16px;
  box-sizing:border-box;border:1px solid rgba(255,255,255,.2);border-radius:12px;
  font-size:.92rem;font-weight:750;line-height:1.2;text-align:center;text-decoration:none;
  transition:transform .15s ease,background-color .2s ease,border-color .2s ease
}
.artwork-button--primary{border-color:#fff;background:#fff;color:#172033}
.artwork-button--secondary{background:rgba(0,0,0,.28);color:#fff;backdrop-filter:blur(6px)}
.artwork-button-plus{display:none}
.artwork-button:hover{transform:translateY(-1px)}
.artwork-button--primary:hover{background:#e9f1ff}
.artwork-button--secondary:hover{background:rgba(0,0,0,.48)}

.artwork-gallery-panel{
  margin-top:18px;padding:clamp(12px,1.6vw,22px);border:0;
  border-radius:18px;background:var(--gallery-panel);box-shadow:var(--gallery-shadow);backdrop-filter:blur(8px)
}
.artwork-filters{display:flex;gap:8px;overflow-x:auto;margin:0 0 22px;padding:2px 1px 8px;scrollbar-width:thin}
.artwork-filter{
  flex:0 0 auto;padding:9px 15px;border:1px solid var(--gallery-border);border-radius:999px;
  background:var(--gallery-surface);color:var(--gallery-muted);font-size:.9rem;font-weight:700;
  text-decoration:none;transition:color .15s ease,background-color .15s ease,border-color .15s ease,transform .15s ease
}
.artwork-filter:hover{color:var(--gallery-text);transform:translateY(-1px)}
.artwork-filter.is-active{border-color:var(--gallery-accent);background:var(--gallery-accent);color:var(--gallery-accent-text)}
.artwork-filter.is-active:hover{border-color:var(--gallery-accent-hover);background:var(--gallery-accent-hover);color:var(--gallery-accent-text)}

.artwork-masonry{column-count:5;column-gap:17px}
.artwork-card{display:inline-block;width:100%;margin:0 0 21px;break-inside:avoid;vertical-align:top}
.artwork-card-media{
  position:relative;display:block;overflow:hidden;border:1px solid var(--gallery-border);
  border-radius:var(--gallery-radius);background:var(--gallery-soft);box-shadow:0 5px 15px rgba(0,0,0,.11);
  text-decoration:none;transform:translateZ(0)
}
.artwork-card-media img{display:block;width:100%;height:auto;color:transparent;transition:transform .28s ease}
.artwork-card-media:hover img{transform:scale(1.018)}
.artwork-card-shade{position:absolute;inset:auto 0 0;height:32%;background:linear-gradient(to top,rgba(0,0,0,.34),transparent);opacity:0;pointer-events:none;transition:opacity .18s ease}
.artwork-card-media:hover .artwork-card-shade{opacity:1}
.artwork-age-badge{
  position:absolute;top:11px;right:11px;display:inline-flex;min-width:39px;min-height:31px;
  align-items:center;justify-content:center;padding:4px 9px;border:1px solid rgba(255,255,255,.48);
  border-radius:999px;background:rgba(26,22,20,.78);color:#fff;font-size:.78rem;font-weight:900;backdrop-filter:blur(8px)
}
.artwork-sensitive-label{position:absolute;right:12px;bottom:11px;left:12px;color:#fff;font-size:.76rem;font-weight:800;text-align:center;text-shadow:0 1px 7px rgba(0,0,0,.75)}
.artwork-card-info{padding:10px 5px 0}
.artwork-card-title{margin:0;font-size:.98rem;line-height:1.3}
.artwork-card-title a{color:var(--gallery-text);text-decoration:none}
.artwork-card-title a:hover{color:var(--gallery-accent)}
.artwork-card-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:6px;color:var(--gallery-muted);font-size:.78rem;line-height:1.35}
.artwork-card-author{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.artwork-card-author a{color:inherit;font-weight:700;text-decoration:none}
.artwork-card-author a:hover{color:var(--gallery-accent)}
.artwork-empty{display:grid;min-height:300px;place-items:center;align-content:center;padding:42px 20px;border:1px dashed var(--gallery-border);border-radius:18px;background:var(--gallery-surface);text-align:center}
.artwork-empty-mark{margin-bottom:8px;color:var(--gallery-accent);font-size:2rem}
.artwork-empty h2{margin:0;font-size:1.3rem}
.artwork-empty p{margin:8px 0 0;color:var(--gallery-muted)}

@media(max-width:1400px){.artwork-masonry{column-count:4}}
@media(max-width:1050px){.artwork-masonry{column-count:3}.artwork-gallery-page-shell{width:min(1100px,94vw)}}
@media(max-width:760px){
  .artwork-gallery-bg{padding-top:8px;background-attachment:scroll}
  .artwork-gallery-header{min-height:270px;align-items:flex-start;flex-direction:column;justify-content:flex-end;gap:18px;padding:58px 22px 24px}
  .artwork-gallery-actions{width:100%;justify-content:flex-start}
  .artwork-gallery-panel{padding:12px}
  .artwork-masonry{column-count:2;column-gap:11px}
  .artwork-card{margin-bottom:16px}
  .artwork-card-info{padding-right:2px;padding-left:2px}
  .artwork-card-meta{align-items:flex-start;flex-direction:column;gap:5px}
}
@media(max-width:480px){
  .artwork-gallery-page-shell{width:96vw}
  .artwork-gallery-header{border-radius:16px;padding-right:16px;padding-left:16px}
  .artwork-gallery-heading h1{font-size:clamp(1.75rem,9vw,2.25rem)}
  .artwork-gallery-panel{margin-top:10px;border-radius:16px}
  .artwork-gallery-back{top:8px;left:8px;min-height:38px;padding:7px 11px;font-size:.82rem}
}
@media(max-width:600px){
  .artwork-gallery-actions .artwork-button--primary{
    position:fixed;right:16px;bottom:max(16px,env(safe-area-inset-bottom));z-index:120;
    width:52px;height:52px;min-height:52px;padding:0;border-radius:50%;
    border-color:var(--gallery-accent);background:var(--gallery-accent);color:var(--gallery-accent-text);
    box-shadow:0 10px 28px rgba(0,0,0,.28)
  }
  .artwork-gallery-actions .artwork-button--primary:hover{border-color:var(--gallery-accent-hover);background:var(--gallery-accent-hover)}
  .artwork-gallery-actions .artwork-button-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .artwork-gallery-actions .artwork-button-plus{display:block;font-size:2rem;font-weight:400;line-height:1}
}
@media(min-width:1600px){.artwork-gallery-page-shell{width:min(1280px,82vw)}}
@media(max-width:900px),(hover:none){.artwork-gallery-panel{backdrop-filter:none}}
@media(prefers-reduced-motion:reduce){.artwork-card-media img,.artwork-filter,.artwork-button{transition:none}}
