.culture-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.culture-cards .culture-family-card{height:100%;min-width:0;grid-template-columns:76px minmax(0,1fr);padding:18px}.culture-cards .culture-family-art{width:76px}.culture-cards .culture-family-action{grid-column:2}.gallery-home-card{background:linear-gradient(128deg,#213e49,#142c3c);border-color:rgba(149,194,221,.29)}.gallery-home-art{width:76px;color:#b7d8e9;background:linear-gradient(145deg,rgba(183,216,233,.13),rgba(145,191,218,.05));border:1px solid rgba(183,216,233,.17);border-radius:20px;padding:8px;height:98px;display:flex;align-items:center}.gallery-home-art svg{fill:none;stroke:currentColor;stroke-width:3}.gallery-home-art circle{fill:#e5c48b;stroke:none}.gallery-home-card .culture-family-copy>span{display:block;font-size:12px;line-height:1.9;color:#bdcbd1}
.gallery-dialog{direction:rtl;width:min(1200px,96vw);max-width:96vw;height:min(900px,94dvh);max-height:94dvh;border:1px solid #e1e6df;border-radius:26px;padding:0;background:#f8faf7;color:#24382e;font-family:inherit;box-shadow:0 30px 100px #10281d40}.gallery-dialog::backdrop{background:#10231ed1;backdrop-filter:blur(8px)}.gallery-dialog *{box-sizing:border-box}.gallery-dialog [hidden]{display:none!important}.gallery-dialog button,.gallery-dialog input,.gallery-dialog textarea,.gallery-dialog select{font:inherit}.gallery-dialog button{cursor:pointer}.gallery-dialog button:disabled{opacity:.5;cursor:wait}.gallery-dialog button:focus-visible,.gallery-dialog input:focus-visible,.gallery-dialog textarea:focus-visible,.gallery-dialog select:focus-visible{outline:3px solid #cf9947;outline-offset:3px}.gallery-top{position:sticky;top:0;z-index:2;background:#f8faf7f5;padding:16px 26px;display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid #e2e8df}.gallery-top strong{font-size:17px}.gallery-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.gallery-btn{border:1px solid #d8e0d6;background:white;color:#294836;border-radius:12px;padding:10px 16px;min-height:44px}.gallery-primary{background:#264c39;color:#fff;border-color:#264c39}.gallery-close{border:0;background:transparent;color:inherit;width:44px;height:44px;font-size:26px}.gallery-body{padding:26px}.gallery-hero{padding:18px 0 30px;display:flex;align-items:end;justify-content:space-between;gap:20px}.gallery-hero small{color:#8b6833;letter-spacing:.03em}.gallery-hero h2{font-size:clamp(28px,4vw,46px);font-weight:800;margin:10px 0;line-height:1.5}.gallery-hero p{color:#657367;margin:0;line-height:1.9;max-width:600px}.gallery-search{display:flex;gap:8px;min-width:250px}.gallery-search input{width:100%;min-width:0;border:1px solid #d9e2d6;border-radius:12px;padding:12px;background:white}.gallery-chips{display:flex;gap:8px;overflow-x:auto;padding:5px 0 18px}.gallery-chips button{white-space:nowrap;flex-shrink:0}.gallery-chips [aria-pressed=true]{background:#294c39;color:#fff}.gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.gallery-photo{border:1px solid #e2e8df;background:white;border-radius:20px;overflow:hidden;text-align:right;padding:0;color:inherit;transition:transform .2s,box-shadow .2s}.gallery-photo:hover{transform:translateY(-3px);box-shadow:0 12px 30px #1f42231a}.gallery-photo img{display:block;width:100%;height:240px;object-fit:cover;background:#e8ede4}.gallery-photo:nth-child(4n+2) img{object-position:center 40%}.gallery-photo-copy{padding:16px;display:grid;gap:8px}.gallery-photo-copy small{color:#846637}.gallery-photo-copy strong{font-size:17px;line-height:1.6}.gallery-photo-copy span{color:#657264;font-size:12px;line-height:1.8}.gallery-state{text-align:center;padding:20px;line-height:1.9;color:#657367}.gallery-state.error{color:#9b3932}.gallery-empty{padding:60px 20px;border:1px dashed #c8d4c4;border-radius:20px;text-align:center;grid-column:1/-1;line-height:2}.gallery-more{display:block;margin:24px auto 0}.gallery-detail{width:min(1300px,96vw);background:#111e19;color:#f5f5ed}.gallery-detail .gallery-top{background:#14231d;border-color:#2c3e33}.gallery-detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;min-height:calc(100% - 80px)}.gallery-detail-stage{background:#0d1713;display:flex;align-items:center;justify-content:center;min-height:350px;padding:20px}.gallery-detail-stage img{max-width:100%;max-height:74dvh;object-fit:contain}.gallery-detail-info{padding:26px;line-height:2;overflow-wrap:anywhere}.gallery-detail-info h2{line-height:1.7;font-size:24px}.gallery-detail-info p{white-space:pre-wrap;color:#c5d2c8}.gallery-detail-info dl{display:grid;gap:6px}.gallery-detail-info dt{color:#a5bba8;font-size:12px}.gallery-detail-info dd{margin:0 0 12px}.gallery-detail .gallery-btn{background:#24372c;color:#fff;border-color:#425447}.gallery-upload{width:min(640px,96vw);height:auto}.gallery-form{display:grid;gap:18px;padding:24px}.gallery-form label{display:grid;gap:8px;line-height:1.7}.gallery-form input,.gallery-form select,.gallery-form textarea{width:100%;padding:12px;border:1px solid #ced9c9;border-radius:12px;background:#fff;color:#24382e}.gallery-form small{color:#657367;line-height:1.8}.gallery-upload-preview{width:100%;max-height:260px;object-fit:contain;border-radius:14px;background:#e9eee6}.gallery-form .gallery-consent{display:flex;align-items:start;font-size:13px}.gallery-consent input{width:20px;height:20px;flex-shrink:0}.gallery-status-badge{font-weight:600;color:#8b6833!important}.gallery-skeleton{height:330px;border-radius:20px;background:linear-gradient(110deg,#e7ede3 25%,#f3f6f0 45%,#e7ede3 65%);background-size:200% 100%;animation:gallery-loading 1.5s infinite}@keyframes gallery-loading{to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.gallery-skeleton{animation:none}.gallery-photo{transition:none}}@media(max-width:760px){.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.gallery-photo img{height:190px}.gallery-hero{display:block}.gallery-search{margin-top:20px}.gallery-detail-layout{grid-template-columns:1fr}.gallery-detail-stage{min-height:240px}.gallery-detail-stage img{max-height:55dvh}.gallery-body{padding:18px}.gallery-top{padding:10px 14px}.culture-cards .culture-family-card{display:flex;flex-direction:column;align-items:flex-start;padding:16px;gap:12px}.culture-cards .culture-family-action{margin-top:auto}.gallery-top strong{font-size:14px}.gallery-actions .gallery-btn{padding:8px 10px;font-size:12px}}@media(max-width:420px){.gallery-photo img{height:155px}.gallery-photo-copy{padding:11px}.gallery-photo-copy strong{font-size:14px}.gallery-dialog{max-width:100vw;width:100vw;max-height:100dvh;height:100dvh;border-radius:0}.gallery-upload{height:auto;max-height:96dvh;border-radius:22px}.culture-cards{gap:10px}}
.gallery-home-card{color:#faf3e3}.gallery-home-card .culture-family-copy small{color:#a3cddc}.gallery-home-card .culture-family-action{color:#e8cb94}.gallery-home-art{grid-row:1 / span 2;align-self:center}
.gallery-dialog .gallery-close{font-size:26px;flex-shrink:0}@media(max-width:600px){.gallery-top{display:grid;grid-template-columns:1fr auto;gap:10px}.gallery-top>strong{grid-column:1/-1;padding-inline-end:44px}.gallery-top>.gallery-actions{display:contents}.gallery-top .gallery-close{position:absolute;left:10px;top:6px}.gallery-top .gallery-btn{font-size:12px}.gallery-detail .gallery-top{grid-template-columns:1fr 1fr}}
.gallery-dialog{margin:auto;inset:0}

/* Shared family-tree visual language, with blue-green accents for photography. */
.gallery-dialog{background:#eff3f2;color:#263f46;border-color:#c6d5d6;box-shadow:0 18px 60px #16313b44}
.gallery-dialog::backdrop{background:rgba(14,32,39,.65)}
.gallery-top{background:#112c37;color:#faf3e3;border-color:rgba(183,216,233,.17)}
.gallery-top .gallery-btn{background:rgba(183,216,233,.08);border-color:rgba(183,216,233,.24);color:#e8f1f3}
.gallery-top .gallery-primary{background:#d8be88;border-color:#d8be88;color:#20343c}
.gallery-dialog .gallery-close{background:rgba(183,216,233,.08);border:1px solid rgba(183,216,233,.17);border-radius:12px}
.gallery-hero{margin-bottom:18px;padding:24px;border:1px solid #cbd9d9;border-radius:20px;background:linear-gradient(110deg,#e1ebeb,#f6f0e2)}
.gallery-hero h2{color:#2a4850}.gallery-hero p{color:#526b70}.gallery-hero small{color:#806338}
.gallery-btn{color:#2d505b;border-color:#c8d8dc;background:#fffdf8}.gallery-primary,.gallery-chips [aria-pressed=true]{background:#315d68;border-color:#315d68;color:#fffdf2}
.gallery-photo{background:#fffdf8;border-color:#cfdddd}.gallery-photo-copy span,.gallery-state{color:#526c72}.gallery-photo-copy small{color:#816437}
.gallery-form input,.gallery-form select,.gallery-form textarea,.gallery-search input{background:#fffdf9;color:#29464e;border-color:#c2d4d7}.gallery-form small{color:#557078}
.gallery-detail{background:#edf2f2;color:#263f46}.gallery-detail .gallery-top{background:#112c37;border-color:#34505b}.gallery-detail-stage{background:#0b202b}.gallery-detail-info p{color:#4d6770}.gallery-detail-info dt{color:#607780}
.gallery-detail .gallery-btn{background:rgba(183,216,233,.08);color:#e8f1f3;border-color:rgba(183,216,233,.24)}
.gallery-state.error{color:#a04138}.gallery-btn:hover:not(:disabled){filter:brightness(.96)}
@media(max-width:760px){.gallery-hero{padding:18px}.gallery-hero h2{font-size:26px}.gallery-search{min-width:0}}
/* One content scroller per dialog; fixed chrome never competes with the page. */
html:has(.gallery-dialog[open]),body:has(.gallery-dialog[open]){overflow:hidden;overscroll-behavior:none}
.gallery-dialog{overflow:hidden}.gallery-dialog[open]{display:flex;flex-direction:column}.gallery-top{position:relative;flex:none}.gallery-body,.gallery-form,.gallery-detail-layout{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#92aeb3 transparent;-webkit-overflow-scrolling:touch}.gallery-body,.gallery-form{flex:1}.gallery-detail-layout{flex:1;min-height:0}.gallery-viewer{position:relative;min-width:0;background:#0b202b;display:flex;flex-direction:column;justify-content:center}.gallery-detail-stage{height:64dvh;min-height:0;overflow:hidden;touch-action:none;position:relative;padding:0;cursor:grab}.gallery-detail-stage img{width:auto;height:auto;max-width:100%;max-height:100%;transform-origin:center;user-select:none;will-change:transform}.gallery-detail-stage.is-zoomed:active{cursor:grabbing}.gallery-zoom-tools{display:flex;justify-content:center;gap:8px;padding:12px;direction:ltr}.gallery-zoom-tools button{height:42px;min-width:44px;border:1px solid #59717a;border-radius:12px;background:#213b46;color:#f7efdf;font:inherit;cursor:pointer}.gallery-zoom-tools [data-zoom=reset]{min-width:76px}.gallery-zoom-hint{text-align:center;color:#aac3cb;padding:0 12px 14px;font-size:11px}.gallery-detail-info{align-self:start}.gallery-chips{scrollbar-width:none}.gallery-chips::-webkit-scrollbar{display:none}
@media(max-width:760px){
 .gallery-dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0;margin:0}
 .gallery-top{padding:calc(12px + env(safe-area-inset-top)) 16px 12px;gap:12px}
 .gallery-top>strong{font-size:15px;padding-inline-end:44px;min-height:32px;display:flex;align-items:center}
 .gallery-top .gallery-close{top:calc(8px + env(safe-area-inset-top));left:12px}
 .gallery-top .gallery-btn{min-height:44px;padding:10px 16px;border-radius:12px}
 .gallery-body{padding:16px 16px calc(24px + env(safe-area-inset-bottom));scrollbar-width:none}
 .gallery-body::-webkit-scrollbar,.gallery-form::-webkit-scrollbar,.gallery-detail-layout::-webkit-scrollbar{display:none}
 .gallery-form,.gallery-detail-layout{scrollbar-width:none}
 .gallery-hero{background:none;border:0;border-radius:0;padding:4px 0 12px;margin:0}
 .gallery-hero small{font-size:10px}.gallery-hero h2{font-size:25px;margin:8px 0}.gallery-hero p{font-size:12px;line-height:1.9}
 .gallery-search{margin-top:14px;gap:8px}.gallery-search input{font-size:14px;padding:12px}
 .gallery-chips{margin:0 -16px;padding:8px 16px 12px;gap:7px}.gallery-chips .gallery-btn{font-size:12px;min-height:40px;padding:8px 14px;border-radius:22px}
 .gallery-state{padding:8px 0;margin:0 0 12px;font-size:12px;text-align:start}
 .gallery-grid{grid-template-columns:minmax(0,1fr);gap:18px}.gallery-photo{border-radius:18px;box-shadow:0 5px 18px #16313b08}
 .gallery-photo img{height:auto;aspect-ratio:4/3;max-height:360px;object-fit:cover}
 .gallery-photo-copy{padding:14px 16px;gap:5px}.gallery-photo-copy strong{font-size:17px}.gallery-photo-copy span{font-size:12px}.gallery-photo-copy small{font-size:11px}
 .gallery-empty{padding:36px 20px;font-size:13px}.gallery-detail-layout{display:block}.gallery-detail-stage{height:48dvh}.gallery-detail-info{padding:20px;line-height:1.9}.gallery-detail-info h2{font-size:21px}.gallery-detail-info dl{grid-template-columns:1fr 1fr;column-gap:16px}.gallery-detail-info dt{grid-column:1}.gallery-detail-info dd{grid-column:2}
 .gallery-upload{height:100dvh;max-height:100dvh;border-radius:0}.gallery-form{padding:18px 18px calc(24px + env(safe-area-inset-bottom));gap:16px}.gallery-form input,.gallery-form textarea,.gallery-form select{font-size:16px}.gallery-form>button[type=submit]{min-height:48px}.gallery-form label{font-size:13px}
}
/* Gallery edition: quiet paper surfaces, deep teal chrome, restrained brass. */
.gallery-dialog{--paper:#f8f1df;--muted:#9fbbb9;--amber-soft:#e4c68e;--teal-soft:#8fc5bd;--bg-deep3:#15353d;background:#f4f3ee;border-color:#9bb6b14a;box-shadow:0 32px 100px #061c2673,inset 0 1px #fff8}
.gallery-dialog::backdrop{background:#071e28b8;backdrop-filter:blur(14px)}
.gallery-top{background:linear-gradient(115deg,#163a42,#0c252f);border-bottom:1px solid #d4b67c45;padding:18px 26px}
.gallery-top strong{display:flex;align-items:center;gap:12px}.gallery-brand-mark{display:grid;place-items:center;width:42px;height:46px;border:1px solid #dfc38950;border-radius:14px;color:#e4c891;font-size:29px;background:linear-gradient(135deg,#dfc38914,transparent)}
#galleryTitle small{display:block;font-size:10px;color:#adc2c1;font-weight:500;line-height:1.8;margin-top:3px}
.gallery-top .gallery-btn{font-weight:700;font-size:12px;background:#ffffff08;box-shadow:inset 0 1px #ffffff08;border-color:#bad9d326}
.gallery-top .gallery-primary{background:linear-gradient(120deg,#ecd4a1,#c9a96e);color:#233c3d;border:1px solid #edd7ad80;box-shadow:0 4px 16px #0002,inset 0 1px #fff8}
.gallery-dialog .gallery-close{border-radius:50%;border-color:#b7d8d226;background:#ffffff06;width:40px;height:40px}
.gallery-body{background:radial-gradient(ellipse at 95% 0%,#e5ebe2 0,transparent 48%),#f4f3ee;padding:28px 30px}
.gallery-hero{position:relative;isolation:isolate;overflow:hidden;padding:32px;border:1px solid #d3d9cb;border-radius:24px;background:linear-gradient(110deg,#e7eeea,#f7f3e7);box-shadow:inset 0 1px #fff9;margin-bottom:22px}
.gallery-hero::before{content:"";position:absolute;z-index:-1;width:200px;height:200px;border:1px solid #a58b4f20;border-radius:50%;left:28%;top:-120px;box-shadow:0 0 0 25px #a58b4f08,0 0 0 55px #a58b4f06;pointer-events:none}
.gallery-hero small{display:inline-flex;align-items:center;gap:8px;font-size:11px;color:#8c703d}.gallery-hero small::before{content:"";width:22px;height:1px;background:#af8d50}
.gallery-hero h2{font-size:clamp(26px,3.3vw,40px);line-height:1.65;margin:12px 0;color:#20434a;font-weight:850}.gallery-hero h2 em{font-style:normal;color:#49685f}.gallery-hero p{font-size:12px;max-width:470px;line-height:2;color:#67796e}
.gallery-search{background:#fffdf4;border:1px solid #c8d4cd;border-radius:16px;padding:4px;box-shadow:0 5px 16px #26443105;align-items:center}.gallery-search input{background:transparent;border:0;padding:10px;outline-offset:0}.gallery-search .gallery-btn{background:#284e54;color:#faf4e4;border-color:#284e54;border-radius:12px;font-size:12px}
.gallery-chips{gap:9px}.gallery-chips .gallery-btn{border-radius:22px;font-size:12px;background:#fffdf7;border-color:#d3ddd5;color:#5e7269;transition:background .18s,box-shadow .18s}
.gallery-chips [aria-pressed=true]{background:#23474d;color:#fcf4e4;border-color:#23474d;box-shadow:0 4px 10px #23474d19}
.gallery-state{font-size:11px;color:#7a877c;padding:8px 0 14px;margin:0;text-align:start}
.gallery-photo{border:1px solid #d5dfd4;border-radius:20px;background:#fffdf7;box-shadow:0 5px 20px #1a353209;overflow:hidden}.gallery-photo img{background:#dfe7e1}.gallery-photo-copy{padding:18px 20px;gap:7px}.gallery-photo-copy small{font-size:10px;color:#95763d;letter-spacing:.02em}.gallery-photo-copy strong{font-size:17px;font-weight:800;color:#29484c}.gallery-photo-copy>span:not(.gallery-status-badge){padding-top:9px;margin-top:2px;border-top:1px solid #e7e8db;color:#728177;font-size:11px}
.gallery-empty{border:1px solid #d5ddcf;background:#faf9f1;border-radius:22px;color:#546b62;box-shadow:inset 0 1px white}.gallery-empty::before{content:"▧";display:block;margin:0 auto 14px;width:60px;height:64px;line-height:64px;font-size:38px;color:#a68c53;border:1px solid #c9b37b50;border-radius:18px;background:#efe9d84a}.gallery-empty p{font-size:12px;color:#7c887a}
.gallery-loading{grid-column:1/-1;min-height:250px;gap:12px;--paper:#294c51;--muted:#7b8e85}.gallery-loading b{font-size:13px}.gallery-loading small{font-size:11px}.gallery-loading .service-spinner{flex-shrink:0}
.gallery-detail-stage .gallery-loading{--paper:#f4ecd8;--muted:#a2bcb9}.gallery-form .gallery-loading{min-height:120px;padding:12px}.gallery-form .gallery-loading .service-spinner{width:44px;height:44px}
.gallery-btn.is-loading{position:relative;padding-inline-start:44px}.gallery-btn.is-loading::after{content:"";position:absolute;right:14px;top:calc(50% - 8px);width:16px;height:16px;border:2px solid currentColor;border-left-color:transparent;border-radius:50%;animation:loader-orbit 1.05s linear infinite}
.gallery-viewer{background:radial-gradient(ellipse at 50% 20%,#21464b,#081f2a)}.gallery-detail-stage{background:transparent}.gallery-zoom-tools{gap:0;width:max-content;margin:12px auto;padding:4px;border:1px solid #a6c1b82b;background:#17383dcc;border-radius:26px;box-shadow:0 10px 24px #0002}.gallery-zoom-tools button{background:transparent;border:0;border-radius:22px}.gallery-zoom-hint{font-size:10px;color:#9aafaa}
.gallery-detail-info{background:#f5f3eb}.gallery-detail-info>small{font-size:11px;color:#a18041}.gallery-detail-info h2{font-size:24px;color:#28494c;margin:12px 0}.gallery-detail-info p{font-size:13px;line-height:2.1;color:#647a6e}.gallery-detail-info dl{border-top:1px solid #dce0d3;padding-top:18px}.gallery-detail-info dt{font-size:11px;color:#8a927f}.gallery-detail-info dd{font-size:13px}
.gallery-form{background:linear-gradient(#f7f6ee,#f0f2eb)}.gallery-file-field{padding:22px 18px;background:#e9eee5;border:1px dashed #aabca8;border-radius:20px;text-align:center}.gallery-file-heading{display:grid;gap:7px}.gallery-file-heading::before{content:"＋";width:46px;height:46px;line-height:44px;margin:0 auto 8px;border:1px solid #b6c8b7;border-radius:15px;color:#6b856b;font-size:27px;background:#f8f9ef}.gallery-file-heading b{font-size:14px;color:#3e5d51}.gallery-file-field input[type=file]{background:#fffdf5;font-size:12px}.gallery-file-field input::file-selector-button{border:0;border-radius:8px;background:#2d5456;color:#fff5dc;padding:9px 12px;margin-inline-end:10px;font:inherit;cursor:pointer}
.gallery-form input,.gallery-form textarea,.gallery-form select{border-color:#cdd8c9;background:#fffef7;border-radius:13px}.gallery-form label{color:#496253}.gallery-form .gallery-primary{background:linear-gradient(120deg,#37615b,#20454d);box-shadow:0 8px 20px #2a4f4c22;border-color:#315951}.gallery-form .gallery-consent{padding:14px;background:#e6ecdf66;border:1px solid #dce2d2;border-radius:14px;line-height:2;color:#687761}
@media(max-width:760px){.gallery-top{padding:calc(10px + env(safe-area-inset-top)) 16px 12px}.gallery-brand-mark{width:32px;height:36px;font-size:23px;border-radius:10px}#galleryTitle{font-size:13px;gap:9px}#galleryTitle small{font-size:9px}.gallery-body{padding:18px 16px calc(24px + env(safe-area-inset-bottom))}.gallery-hero{padding:20px 18px;border-radius:20px;margin-bottom:12px;display:block}.gallery-hero h2{font-size:25px;line-height:1.65;margin:10px 0}.gallery-hero p{font-size:11px;line-height:1.9}.gallery-hero small{font-size:9px}.gallery-search{margin-top:16px}.gallery-search input{font-size:13px;padding:10px 6px}.gallery-search .gallery-btn{padding:10px 12px;min-height:42px}.gallery-photo-copy{padding:16px 18px}.gallery-photo img{aspect-ratio:5/4}.gallery-state{padding:3px 0 12px}.gallery-grid{gap:20px}.gallery-top .gallery-btn{min-height:42px}.gallery-detail-info{padding:22px}.gallery-file-field{padding:18px 14px}.gallery-loading{min-height:230px}}
@media(prefers-reduced-motion:reduce){.gallery-btn.is-loading::after{animation:none}.gallery-chips .gallery-btn{transition:none}}
