/* Galerijos paieška: rėžių laukai ir pasirinkimo langai („Apvalumai“) */
.gl-side #gl-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px 10px}
.gl-side #gl-form .gl-f{min-width:0}
.gl-side #gl-form .gl-f--op,.gl-side #gl-form .gl-actions,.gl-side #gl-form .gl-nodata{grid-column:1/-1}
.gl-lab{font-size:12.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--gold-dd)}
.gl-trig{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:0 10px 0 14px;border-radius:16px;border:1px solid #E2D6C5;background:#fff;font:500 15.5px/1.2 'Figtree',system-ui,sans-serif;color:var(--ink);text-align:left;cursor:pointer;transition:border-color .25s,background-color .25s,box-shadow .25s}
.gl-trig:hover{border-color:#CDB48B;box-shadow:0 6px 18px -12px rgba(42,33,26,.45)}
.gl-trig:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.gl-trig-v{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gl-trig.is-set{background:#FBF5EA;border-color:#C9AE84}
.gl-trig.is-set .gl-trig-v{font-weight:650}
.gl-chev{flex:none;width:18px;height:18px;fill:none;stroke:var(--gold-d);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.gl-trig--op{min-height:64px;padding-left:8px}
.gl-trig-art{flex:none;display:grid;place-items:center;width:60px;height:46px;border-radius:12px;background:var(--cream)}
.gl-trig-art .gl-art{width:54px;height:36px}
.gl-nodata{margin:0;padding:12px 14px;border-radius:16px;background:var(--cream);font-size:14px;line-height:1.45;color:var(--muted)}
.gl-side #gl-form .gl-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin-top:4px}
.gl-go{display:none}
.gl-open .gl-badge,.gl-badge{color:#FFF9F0!important;display:inline-grid;place-items:center;min-width:22px;height:22px;margin-left:4px;padding:0 6px;border-radius:999px;background:var(--esp);color:#FFF9F0;font:700 12px/1 'Figtree',system-ui,sans-serif}

/* piešinukai */
.gl-art{display:block;overflow:visible}
.gl-art .k,.gl-art .m,.gl-art .a{fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.gl-art .k{stroke:var(--ink)}
.gl-art .m{stroke:#B9A68A;stroke-dasharray:3 3.5}
.gl-art .a{stroke:var(--gold-d);stroke-width:1.9}
.gl-art .t{stroke-width:1.2}
.gl-art .w{stroke-width:3.6;stroke-dasharray:none}
.gl-art .cut{stroke-dasharray:none;stroke-width:3}
.gl-art .f{fill:var(--ink);stroke:none}
.gl-art .f.g{fill:var(--gold-d)}
.gl-art .f.m2{fill:#8C7A66}
.gl-art .seg{fill:#E7DCCB}
.gl-art .seg.on{fill:var(--gold-d)}

/* langas */
html.gl-lock,html:has(.gl-dlg[open]){overflow:hidden}
.gl-dlg{font:400 16px/1.5 'Figtree',system-ui,sans-serif;-webkit-font-smoothing:antialiased;width:min(760px,calc(100vw - 32px));max-width:none;max-height:min(88dvh,860px);margin:auto;padding:0;border:0;border-radius:32px;background:var(--paper);color:var(--text);box-shadow:0 40px 90px -30px rgba(28,22,17,.55),0 0 0 1px rgba(42,33,26,.06);overflow:hidden}
.gl-dlg::backdrop{background:rgba(28,22,17,.46);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.gl-dlg[open]{display:flex;animation:glIn .42s cubic-bezier(.22,.61,.12,1)}
.gl-dlg[open]::backdrop{animation:glFade .35s ease}
@keyframes glIn{from{opacity:0;transform:translateY(14px) scale(.975)}to{opacity:1;transform:none}}
@keyframes glFade{from{opacity:0}to{opacity:1}}
.gl-dlg-in{display:flex;flex-direction:column;width:100%;max-height:inherit;min-height:0}
.gl-dlg-h{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:28px 28px 14px}
.gl-dlg-h h2{margin:0;font:500 clamp(24px,2.4vw,30px)/1.15 'Fraunces',Georgia,serif;font-variation-settings:"SOFT" 100;color:var(--ink)}
.gl-dlg-h p{margin:8px 0 0;max-width:56ch;font-size:15px;line-height:1.5;color:var(--muted)}
.gl-x{flex:none;display:grid;place-items:center;width:46px;height:46px;border-radius:999px;border:1px solid var(--line);background:#fff;color:var(--ink);cursor:pointer;transition:background-color .2s}
.gl-x:hover{background:var(--cream)}
.gl-x svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.gl-x:focus-visible,.gl-opt:focus-visible,.gl-op:focus-visible,.gl-v:focus-visible,.gl-mlg-h:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.gl-dlg-b{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:6px 28px 24px}
.gl-dlg-f{display:flex;justify-content:flex-end;align-items:center;gap:18px;padding:16px 28px 20px;border-top:1px solid var(--line);background:var(--paper)}
.gl-dlg-f .gl-reset{margin-right:auto}
.gl-dlg-f .ap-pb{min-width:220px}

/* pasirinkimų plytelės */
.gl-opts{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.gl-opts--few{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}
.gl-opt,.gl-op,.gl-mlg-h{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px 12px 14px;border-radius:24px;border:1px solid var(--line);background:#fff;font:inherit;color:var(--ink);text-align:center;cursor:pointer;transition:border-color .25s,background-color .25s,box-shadow .25s,transform .25s}
.gl-opt:hover,.gl-op:hover,.gl-mlg-h:hover{border-color:#CDB48B;box-shadow:0 14px 30px -20px rgba(42,33,26,.5);transform:translateY(-1px)}
.gl-opt .gl-art{width:76px;height:76px}
.gl-opt-l{font:600 16px/1.25 'Figtree',system-ui,sans-serif;color:var(--ink)}
.gl-opt-n{font-size:13px;color:var(--soft)}
.gl-opt[aria-pressed="true"],.gl-op[aria-pressed="true"],.gl-mlg-h[aria-pressed="true"]{background:#FBF5EA;border-color:var(--esp);box-shadow:inset 0 0 0 1px var(--esp)}
.gl-mlg-h[aria-pressed="mixed"]{background:#FDF9F2;border-color:#C9AE84}
.is-zero{opacity:.48}
.is-zero[aria-pressed="true"]{opacity:1}
.gl-chk{position:absolute;top:10px;right:10px;display:grid;place-items:center;width:24px;height:24px;border-radius:999px;border:1px solid #E2D6C5;background:#fff;transition:background-color .2s,border-color .2s}
.gl-chk svg{width:15px;height:15px;fill:none;stroke:#FFF9F0;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;opacity:0}
[aria-pressed="true"]>.gl-chk{background:var(--esp);border-color:var(--esp)}
[aria-pressed="true"]>.gl-chk svg{opacity:1}
[aria-pressed="mixed"]>.gl-chk{background:#C9AE84;border-color:#C9AE84}
[aria-pressed="mixed"]>.gl-chk svg{display:none}
[aria-pressed="mixed"]>.gl-chk::after{content:"";width:10px;height:2px;border-radius:2px;background:#fff}

/* implantų dydžiai */
.gl-ml{display:flex;flex-direction:column;gap:10px}
.gl-ml>.gl-opt--all{flex-direction:row;justify-content:flex-start;gap:14px;padding:10px 48px 10px 14px;text-align:left}
.gl-ml>.gl-opt--all .gl-art{width:44px;height:44px}
.gl-ml>.gl-opt--all .gl-opt-n{margin-left:auto}
.gl-mlg{display:grid;grid-template-columns:180px minmax(0,1fr);gap:10px;align-items:stretch;padding:8px;border-radius:28px;background:var(--cream)}
.gl-mlg-h{padding:12px 10px}
.gl-mlg-h .gl-art{width:60px;height:60px}
.gl-mlv{display:flex;flex-wrap:wrap;align-content:center;gap:8px;padding:6px 4px}
.gl-v{display:inline-flex;align-items:center;gap:8px;height:42px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:#fff;font:600 15px/1 'Figtree',system-ui,sans-serif;color:var(--ink);cursor:pointer;transition:background-color .2s,border-color .2s,color .2s}
.gl-v small{font:500 12.5px/1 'Fraunces',Georgia,serif;color:var(--gold-d)}
.gl-v:hover{border-color:#CDB48B}
.gl-v[aria-pressed="true"]{background:var(--esp);border-color:var(--esp);color:#FFF9F0}
.gl-v[aria-pressed="true"] small{color:#E6CFA3}

/* operacijos per visą langą */
.gl-dlg--full{width:100vw;height:100dvh;max-height:none;border-radius:0}
.gl-dlg--full .gl-dlg-in{max-height:none;height:100%;max-width:1480px;margin:0 auto}
.gl-dlg--full .gl-dlg-h{padding:clamp(22px,3vw,40px) clamp(16px,3vw,40px) 12px}
.gl-dlg--full .gl-dlg-h h2{font-size:clamp(28px,3.2vw,44px)}
.gl-dlg--full .gl-dlg-b{padding:8px clamp(16px,3vw,40px) 40px}
.gl-opsec{margin-top:26px}
.gl-opsec h3{margin:0 0 12px;font-size:12.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--gold-dd)}
.gl-opgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px}
.gl-op{padding:18px 14px 16px;gap:8px;border-radius:28px}
.gl-op .gl-art{width:100%;max-width:200px;height:auto;aspect-ratio:3/2;padding:6px 8px;border-radius:20px;background:var(--cream)}
.gl-op .gl-art .k,.gl-op .gl-art .m{stroke-width:2}
.gl-op .gl-art .a{stroke-width:2.2}
.gl-op .gl-art .t{stroke-width:1.4}
.gl-op[aria-pressed="true"] .gl-art{background:#F3E8D6}
.gl-op-l{font:600 16.5px/1.25 'Figtree',system-ui,sans-serif;color:var(--ink)}
.gl-op-n{font-size:13px;color:var(--soft)}
.gl-opgrid--top{grid-template-columns:minmax(0,1fr)}
.gl-op--all{flex-direction:row;justify-content:flex-start;gap:16px;padding:12px 50px 12px 12px;text-align:left}
.gl-op--all .gl-art{width:84px;flex:none}
.gl-op--all .gl-op-n{margin-left:auto}

@media (max-width:1000px){
  .gl-go{display:inline-flex;flex:1 1 auto}
}
@media (max-width:640px){
  .gl-dlg:not(.gl-dlg--full){width:calc(100vw - 20px);max-height:calc(100dvh - 20px);border-radius:26px}
  .gl-dlg-h{padding:22px 18px 10px}
  .gl-dlg-h p{font-size:14px}
  .gl-dlg-b{padding:4px 18px 18px}
  .gl-dlg-f{padding:12px 18px 16px;gap:12px}
  .gl-dlg-f .ap-pb{--h:50px;min-width:0;flex:1;padding:0 18px}
  .gl-opts,.gl-opts--few{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .gl-opt{padding:14px 8px 12px}
  .gl-opt .gl-art{width:54px;height:54px}
  .gl-opt-l{font-size:15px}
  .gl-mlg{grid-template-columns:minmax(0,1fr);gap:6px;padding:6px}
  .gl-mlg-h{flex-direction:row;justify-content:flex-start;gap:12px;padding:8px 44px 8px 10px;text-align:left}
  .gl-mlg-h .gl-art{width:40px;height:40px}
  .gl-mlg-h .gl-opt-n{margin-left:auto}
  .gl-mlv{padding:2px 2px 4px}
  .gl-v{height:40px;padding:0 12px;font-size:14.5px}
  .gl-opgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .gl-op{padding:12px 8px;border-radius:22px}
  .gl-op-l{font-size:14.5px}
  .gl-opgrid.gl-opgrid--top{grid-template-columns:minmax(0,1fr)}
  .gl-op--all .gl-art{width:64px}
  .gl-op--all{padding:12px 46px 12px 10px}
  .gl-opsec{margin-top:20px}
}
/* priminimas, kad pirmo pavyzdžio liniją galima tempti */
.gl-card .ap-ba .ap-ba-knob{transition:box-shadow .5s ease}
.gl-card .ap-ba.is-hint .ap-ba-knob{box-shadow:0 0 0 9px rgba(255,253,249,.34),0 12px 30px -10px rgba(42,32,25,.45)}
@media (prefers-reduced-motion:reduce){
  .gl-dlg[open],.gl-dlg[open]::backdrop{animation:none}
  .gl-opt,.gl-op,.gl-mlg-h,.gl-trig{transition:none}
}

/* tuščia ir klaidos būsena (galerija.js bsState): bendra kortelės išvaizda .bs-tuscia yra busenos.css, čia tik galerijos dalis ir piešinių judesys */
.gl-grid>.bs-tuscia{grid-column:1/-1}
.gl-grid:focus{outline:none}
.bs-act .ap-pb[disabled]{opacity:.6;cursor:progress}
#gl.is-klaida .gl-wrap{grid-template-columns:minmax(0,1fr)}
#gl.is-klaida .gl-side,#gl.is-klaida .gl-status,#gl.is-klaida .gl-chips,#gl.is-klaida .gl-moreb{display:none}
.gl-art.bs-art .fonas{fill:#F3EADD;stroke:none}
.gl-art.bs-art .lens{fill:rgba(255,253,249,.86)}
.gl-art.bs-art .h{stroke-width:3.2}
.gl-art.bs-art .g2{fill:var(--gold)}
@media (prefers-reduced-motion:no-preference){
  .bs-lupa{animation:bsLupa 13s ease-in-out infinite}
  .bs-gija-k{animation:bsGija 8s ease-in-out infinite}
  .bs-gija-d{animation:bsGija 8s ease-in-out -4s infinite}
}
@keyframes bsLupa{0%,100%{transform:translate(-10px,1px)}50%{transform:translate(10px,-2px)}}
@keyframes bsGija{0%,100%{transform:translate(-2.5px,.8px)}50%{transform:translate(2.5px,-.8px)}}
