.gm-page .gm-container{width:min(1440px,94%);max-width:1440px;margin-inline:auto;padding:0 16px}
.gm-page .gm-page-title{font-size:clamp(1.3rem,2vw,1.8rem);margin:0 0 24px;color:var(--od-text,#f0e8d9)}
.gm-library,.gm-single{--gm-line:#45413c;--gm-panel:#151619;--gm-muted:#c3bbae;--gm-accent:#e5c47e;color:#f3ecdf;font-family:var(--od-font-body,system-ui,sans-serif);line-height:1.5}
.gm-library *,.gm-single *{box-sizing:border-box}
.gm-library [hidden],.gm-single [hidden]{display:none!important}
.gm-heading{padding:clamp(24px,4vw,50px);margin-bottom:24px;border:1px solid var(--gm-line);border-radius:12px;background:radial-gradient(ellipse at top right,#45311c55,transparent 65%),#111215}
.gm-library .gm-eyebrow{font-size:.75rem;letter-spacing:.14em;color:var(--gm-accent);font-weight:700;margin:0 0 14px}
.gm-library .gm-heading h2{font-family:var(--od-font-heading,Georgia,serif);font-size:clamp(1.8rem,4vw,3.3rem);line-height:1.12;margin:0 0 16px;color:#f5eddd}
.gm-heading p:last-child{margin:0;max-width:64ch;color:var(--gm-muted)}
.gm-filters{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) auto;align-items:end;gap:14px;border-radius:10px}
.gm-filters label{display:grid;gap:7px;font-size:.85rem;font-weight:600;min-width:0}
.gm-library .gm-filters input,.gm-library .gm-filters select{display:block;width:100%;min-width:0;height:46px;padding:9px 12px;font:inherit;font-size:1rem;background:#090a0c;color:#f3ecdf;border:1px solid #6a6256;border-radius:6px;color-scheme:dark;margin:0}
.gm-library .gm-button,.gm-single .gm-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:10px 16px;border:1px solid #6a6256;border-radius:6px;background:#222225;color:#f3ecdf;font:600 .9rem/1.3 var(--od-font-body,system-ui,sans-serif);text-decoration:none;cursor:pointer;box-shadow:none;white-space:normal;text-align:center}
.gm-library .gm-button:hover,.gm-single .gm-button:hover{background:#38332a;border-color:var(--gm-accent);color:#fff}
.gm-library .gm-primary,.gm-library .gm-button[aria-pressed=true],.gm-single .gm-button[aria-pressed=true]{background:#e5c47e;color:#17130c;border-color:#e5c47e}
.gm-library :is(a,button,input,select):focus-visible,.gm-single :is(a,button):focus-visible{outline:3px solid #ffe0a0;outline-offset:4px}
.gm-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:24px 0 18px;flex-wrap:wrap}
.gm-views{display:flex;gap:8px;flex-wrap:wrap}.gm-views [data-save-count]{border-radius:20px;background:#0002;padding:1px 7px;font-size:.8rem}
.gm-count,.gm-device-note{font-size:.9rem;color:var(--gm-muted);margin:0}.gm-device-note{margin:0 0 18px}
.gm-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.gm-card{min-width:0;overflow:hidden;border:1px solid var(--gm-line);border-radius:10px;background:var(--gm-panel);margin:0;display:flex;flex-direction:column}
.gm-preview{display:block;position:relative;aspect-ratio:4/3;background:#24221f;overflow:hidden}
.gm-preview img{display:block;width:100%;height:100%;object-fit:contain;margin:0;transition:transform .18s ease}
.gm-preview:hover img{transform:scale(1.025)}
.gm-enlarge{position:absolute;right:10px;bottom:10px;padding:6px 10px;background:#08090de8;border:1px solid #74644b;border-radius:5px;font-size:.75rem;color:#fff}
.gm-card-body{padding:18px;display:flex;flex-direction:column;flex:1}
.gm-library .gm-book,.gm-single .gm-book{font-size:.72rem;color:var(--gm-accent);letter-spacing:.04em;margin:0 0 8px;overflow-wrap:anywhere}
.gm-card h3{font-size:1.2rem;line-height:1.3;margin:0 0 20px;overflow-wrap:anywhere}.gm-card h3 a{color:#f3ecdf;text-decoration:none}.gm-card h3 a:hover{text-decoration:underline}
.gm-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto}.gm-actions .gm-download{flex:1}
.gm-pagination{display:flex;justify-content:center;gap:12px;margin:30px 0 0}.gm-button:disabled{opacity:.6;cursor:wait}
.gm-empty{padding:44px 24px;text-align:center;border:1px dashed var(--gm-line);border-radius:10px;color:var(--gm-muted)}
.gm-message{font-size:.9rem;color:var(--gm-accent);min-height:1.5em;margin:16px 0;text-align:center}
.gm-dialog{max-width:96vw;width:1400px;max-height:94dvh;padding:0;border:1px solid #847151;border-radius:10px;background:#111215;color:#f3ecdf;overflow:auto}
.gm-dialog::backdrop{background:#000d}.gm-dialog-bar{position:sticky;top:0;display:flex;gap:12px;align-items:center;padding:14px;background:#151619;z-index:1;border-bottom:1px solid #45413c;flex-wrap:wrap}
.gm-dialog .gm-dialog-title{flex:1;min-width:120px;margin:0;font-size:1.1rem;overflow-wrap:anywhere}.gm-dialog-image{padding:14px;text-align:center}.gm-dialog-image img{display:block;max-width:100%;height:auto;margin:auto}
.gm-single{max-width:1050px;margin:auto}.gm-single .gm-preview{aspect-ratio:auto}.gm-single .gm-preview img{height:auto;max-height:75vh;object-fit:contain}.gm-description{margin:26px 0;overflow-wrap:anywhere}
.gm-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(max-width:960px){.gm-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.gm-filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.gm-filters>button{grid-column:1/-1}}
@media(max-width:620px){.gm-page .gm-container{width:100%;padding-inline:18px}.gm-grid{grid-template-columns:minmax(0,1fr);gap:18px}.gm-filters{grid-template-columns:minmax(0,1fr)}.gm-heading{padding:24px 20px}.gm-dialog-bar{gap:8px;padding:10px}.gm-dialog .gm-dialog-title{flex-basis:100%}.gm-dialog-image{padding:4px}.gm-dialog .gm-button{flex:1}.gm-views{width:100%}.gm-views>button{flex:1}}
@media(prefers-reduced-motion:reduce){.gm-preview img{transition:none}}

/* Map actions, shared by gallery cards and the preview dialog. */
.gm-library .gm-button.gm-download,.gm-single .gm-button.gm-download{background:#208440;border-color:#35b958;color:#fff;transition:background .15s ease,box-shadow .15s ease,border-color .15s ease}
.gm-library .gm-button.gm-download:is(:hover,:focus-visible,:active),.gm-single .gm-button.gm-download:is(:hover,:focus-visible,:active){background:#39ff69;border-color:#77ff98;color:#06220e;box-shadow:0 0 10px #39ff69b3,0 0 24px #39ff6970}
.gm-library .gm-button.gm-save,.gm-single .gm-button.gm-save{background:#addcff;border-color:#c5e8ff;color:#092842;transition:background .15s ease,box-shadow .15s ease,border-color .15s ease}
.gm-library .gm-button.gm-save:is(:hover,:focus-visible,:active,[aria-pressed=true]),.gm-single .gm-button.gm-save:is(:hover,:focus-visible,:active,[aria-pressed=true]){background:#2196ff;border-color:#77caff;color:#061d31;box-shadow:0 0 10px #2196ffb3,0 0 24px #2196ff70}
@media(prefers-reduced-motion:reduce){.gm-library .gm-button.gm-download,.gm-single .gm-button.gm-download,.gm-library .gm-button.gm-save,.gm-single .gm-button.gm-save{transition:none}}

/* Centered loading status; does not steal focus or block page controls. */
.gm-library .gm-loading{position:fixed;inset:0;z-index:2147483000;display:grid;place-items:center;padding:20px;background:rgba(5,8,12,.32);pointer-events:none}
.gm-library .gm-loading-card{display:flex;flex-direction:column;align-items:center;gap:12px;width:min(340px,100%);padding:30px 24px;text-align:center;border:1px solid #8b774f;border-radius:16px;background:linear-gradient(145deg,#24231f,#111317);color:#f3ecdf;box-shadow:0 20px 70px #0009,0 0 24px #e5c47e18}
.gm-library .gm-loading-card strong{font-size:1.2rem;line-height:1.4;letter-spacing:.02em}
.gm-library .gm-loading-card>span:last-child{font-size:.88rem;color:#c3bbae;line-height:1.5}
.gm-library .gm-loading-spinner{width:40px;height:40px;border:3px solid #e5c47e26;border-top-color:#e5c47e;border-right-color:#e5c47e;border-radius:50%;animation:gm-loading-spin .85s linear infinite}
@keyframes gm-loading-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.gm-library .gm-loading-spinner{animation:none}}
