.test-gallery {
  --ink:#0b2246; --paper:#eef5ff; --red:#175bb4; --blue:#174e9b; --muted:#47617e;
  --accent:#145db9; --pale:#e5efff; --edge:#cfdef2;
  background:radial-gradient(ellipse at 18% 0,#dcecff 0,transparent 48%),#f2f7ff;
  min-height:100vh;
  padding:0 clamp(14px,4vw,32px) calc(87px + env(safe-area-inset-bottom));
}
.test-gallery [hidden]{display:none!important}
.test-gallery dialog:not([open]){display:none}
.test-gallery button{font:inherit;color:inherit;cursor:pointer}
.test-gallery :focus-visible{outline:3px solid #0b58aa;outline-offset:3px}
.test-gallery svg:not(.symbols){width:1.2em;height:1.2em;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.symbols{position:absolute;width:0;height:0;overflow:hidden}
.test-header,.test-gallery main,.test-credit{max-width:940px;margin-inline:auto}
.test-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-block:clamp(24px,5vw,48px) clamp(20px,4vw,30px)}
.test-brand{display:flex;gap:12px;align-items:center;min-width:0}
.test-mark{display:block;width:auto;height:clamp(69px,12vw,94px);object-fit:contain;flex:none}
.test-brand p{margin:5px 0 0;color:var(--muted);font-size:clamp(.74rem,2vw,1rem);font-weight:700;line-height:1.25}
.test-brand h1{margin:0;line-height:1;letter-spacing:-.035em;font-size:clamp(1.48rem,5.3vw,3rem)}
.original{font-size:clamp(.69rem,2vw,.88rem);font-weight:700;white-space:nowrap;text-decoration:none;border:1px solid var(--edge);padding:.7em .8em;border-radius:14px;background:#f9fcff}
.test-header-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;flex-shrink:0}
#galleryLanguage{color:inherit;font-family:inherit;cursor:pointer;max-width:100%}
.test-overview{margin:0 0 17px}
.test-overview p{margin:0 0 10px;color:var(--muted);line-height:1.45;font-size:clamp(.83rem,2.3vw,1rem)}
.test-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:0}
.test-totals div{display:flex;flex-direction:column-reverse;gap:2px;padding:8px;border:1px solid var(--edge);border-radius:13px;background:#f9fcff;text-align:center}
.test-totals dt{font-size:clamp(.65rem,2.2vw,.86rem);color:var(--muted);overflow-wrap:anywhere}
.test-totals dd{margin:0;color:var(--blue);font-size:clamp(1rem,3vw,1.36rem);font-weight:800}
.test-gallery:dir(ltr) .dialog-close{left:auto;right:18px}
.test-search{display:flex;gap:9px}
.test-search label,.test-search button{display:flex;align-items:center;gap:8px;border-radius:999px;min-height:47px;padding:0 13px}
.test-search label{background:#fff;border:1px solid var(--edge);flex:1;min-width:0;color:#2b5b96}
.test-search input{min-width:0;width:100%;background:none;border:0;color:var(--ink);font:inherit;outline:none!important}
.test-search label:focus-within{outline:3px solid #0b58aa;outline-offset:2px}
.test-search button{border:0;color:white;background:var(--accent);font-weight:700}
.quick-filters{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}
.quick-filters button{border:1px solid transparent;border-radius:999px;background:var(--pale);padding:.45em .8em;font-size:clamp(.76rem,2.35vw,.96rem);font-weight:700}
.quick-filters button[aria-pressed=true]{background:var(--accent);color:white}
.test-gallery #filterPanel{margin-top:12px;padding:12px;background:white;border:1px solid var(--edge);border-radius:16px}
.test-gallery .filters{grid-template-columns:repeat(3,minmax(0,1fr));margin:0;padding:0;background:none;border:0}
.test-gallery .filters select{border:1px solid var(--edge);border-radius:9px;padding-inline:6px}
.test-gallery .share-controls button,.test-gallery .event-actions button{color:white;background:var(--accent);border-radius:10px}
.test-gallery .active-filters:empty{display:none}
.test-gallery .result-count{margin:15px 2px 8px;font-size:.82rem}
.test-gallery .event-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(9px,2vw,19px)}
.test-card{position:relative;min-width:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid #e1eaf7;border-radius:clamp(15px,3vw,25px);background:#fff;box-shadow:0 6px 16px #183d7420;transition:box-shadow .18s}
.test-card:hover{box-shadow:0 8px 22px #183d7433}
.lead-card{grid-column:1/-1}
.test-open{position:absolute;inset:0;z-index:1;width:100%;height:100%;border:0;background:transparent;border-radius:inherit}
.test-open:focus-visible{outline-offset:-4px}
.test-visual{position:relative;aspect-ratio:2.25;min-height:43px;background:linear-gradient(125deg,#dae9ff,#f4f8ff)}
.lead-card.has-cover .test-visual{aspect-ratio:2.65;min-height:135px}
.test-visual img{width:100%;height:100%;position:absolute;inset:0;object-fit:cover}
.test-visual time,.test-save{position:absolute;top:7px;display:flex;align-items:center;border-radius:999px}
.test-visual time{inset-inline-start:7px;max-width:calc(100% - 47px);gap:3px;background:#124e9d;color:white;padding:.43em .65em;font-size:clamp(.62rem,2vw,.9rem);font-weight:700}
.test-save{inset-inline-end:6px;z-index:2;justify-content:center;width:34px;height:34px;border:1px solid #c5d9f7;background:#f8fbff;color:#1455a6!important}
.test-save[aria-pressed=true]{background:#dbeaff}
.test-save[aria-pressed=true] svg{fill:currentColor}
.test-card-body{padding:clamp(8px,2vw,19px);display:flex;align-items:flex-start;flex-direction:column;flex:1;min-width:0}
.test-type{border-radius:999px;background:#e5efff;color:#1c5396;padding:.25em .67em;font-size:clamp(.65rem,2vw,.86rem);font-weight:700}
.test-card h2{font-size:clamp(.98rem,3vw,1.58rem);line-height:1.12;margin:.38em 0;overflow-wrap:anywhere}
.lead-card h2{font-size:clamp(1.38rem,5vw,2.4rem)}
.test-place{margin:0 0 .55em;display:flex;align-items:baseline;gap:3px;color:var(--muted);font-size:clamp(.69rem,2vw,.96rem)}
.test-place svg{align-self:flex-start;color:#2666b4}
.test-counts{display:flex;flex-wrap:wrap;gap:4px;margin-top:auto;padding-top:3px}
.test-counts span{display:flex;align-items:center;gap:3px;background:#edf3fc;color:#244974;border-radius:999px;padding:.38em .55em;font-size:clamp(.63rem,2vw,.88rem);font-weight:700;white-space:nowrap}
.test-empty{grid-column:1/-1;padding:1rem;background:white;border-radius:16px}
.test-gallery .load-more{border:1px solid var(--edge);border-radius:999px;background:white;padding:10px 20px}
.test-credit{display:block;text-align:center;margin-top:20px;padding:10px 0;background:none;color:var(--muted);font-size:.76rem}
.test-nav{position:fixed;z-index:3;inset:auto 0 0;display:grid;grid-template-columns:repeat(4,1fr);margin:auto;width:min(100%,940px);border:1px solid var(--edge);border-bottom:0;border-radius:20px 20px 0 0;background:#f8fbff;box-shadow:0 -4px 24px #163c6718;padding:6px 8px calc(6px + env(safe-area-inset-bottom))}
.test-nav a,.test-nav button{display:flex;justify-content:center;align-items:center;gap:5px;min-height:44px;border:0;border-radius:14px;text-decoration:none;background:transparent;color:#47617e;font-weight:700;font-size:clamp(.76rem,2vw,1rem)}
.test-nav [aria-current=page],.test-nav [aria-pressed=true]{background:var(--pale);color:#1557a8}
@media(max-width:560px){.test-header-actions{flex-direction:column;align-items:flex-end}.test-nav a,.test-nav button{flex-direction:column;gap:3px;font-size:clamp(.61rem,2.7vw,.85rem);overflow-wrap:anywhere}}
.test-gallery #eventDialog{border-radius:20px}
.test-gallery .dialog-close{font-size:34px}
.test-gallery .dialog-inner h2{font-size:clamp(1.5rem,5vw,2.65rem)}
.test-gallery .dialog-tags span,.test-gallery .media-item{border-radius:10px}
@media(max-width:420px){.test-gallery .filters{grid-template-columns:repeat(2,minmax(0,1fr))}.test-visual time{font-size:.6rem}.test-visual time svg{display:none}.test-save{width:28px;height:28px}.test-counts span{gap:2px;padding-inline:.37em}}
