/* Shared orange/graphite gallery controls. */
.cscom-main #fgGallery .fg-gallery__main{position:relative;overflow:hidden;border-radius:13px}
.cscom-main #fgGallery .fg-gallery__main-link{position:relative;cursor:zoom-in}
.cscom-gallery-open-hint{position:absolute;left:14px;bottom:14px;display:inline-flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid #ff7a2f55;border-radius:10px;background:#10141ce8;color:#fff;font:700 11px 'Manrope',sans-serif;box-shadow:0 4px 16px #0006;pointer-events:none;transition:background .2s,border-color .2s}
.cscom-gallery-open-hint svg{width:17px;height:17px;color:#ff8a3e}
.fg-gallery__main-link:hover .cscom-gallery-open-hint{background:#a3380aea;border-color:#ff9b55}
.cscom-gallery-step{position:absolute;top:50%;transform:translateY(-50%);z-index:2;display:grid;place-items:center;width:38px;height:44px;padding:0;border:1px solid #ffffff35;border-radius:11px;background:#0e131de6;color:#fff;cursor:pointer;box-shadow:0 4px 18px #0006}
.cscom-gallery-step svg{width:21px;height:21px}.cscom-gallery-step--previous{left:10px}.cscom-gallery-step--next{right:10px}
.cscom-gallery-step:hover{background:#c4470a;border-color:#ff9c51}
.cscom-main #fgGallery .fg-gallery__thumb{position:relative;border-radius:11px;transition:border-color .2s,box-shadow .2s}
.cscom-main #fgGallery .fg-gallery__thumb::after{content:attr(data-gallery-number);position:absolute;inset:auto 5px 5px auto;z-index:4;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:auto;min-width:22px;height:22px;margin:0;padding:0 5px;border:1px solid #ffffff24;border-radius:6px;background:#0b111bdc;color:#fff;font:700 10px/1 'Manrope',sans-serif;font-variant-numeric:tabular-nums;text-align:center;opacity:1;transform:none;box-shadow:0 2px 8px #0007;transition:none;pointer-events:none}
.cscom-main #fgGallery .fg-gallery__thumb.is-active{border-color:#ff782b!important;box-shadow:0 0 0 1px #ff782b55,inset 0 0 0 1px #ff782b55}
.fg-entry-gallery a[data-cscom-lightbox]{cursor:zoom-in}
.cscom-gallery-step:focus-visible,.cscom-gallery-dialog button:focus-visible,.cscom-gallery-dialog a:focus-visible{outline:2px solid #ff9b54!important;outline-offset:3px}
/* Do not allow author display rules to leave a closed dialog on the page. */
.cscom-image-viewer:not([open]){display:none!important}
.cscom-gallery-dialog{position:fixed;inset:0;box-sizing:border-box;width:min(1320px,calc(100vw - 32px));height:min(940px,calc(100vh - 32px));height:min(940px,calc(100dvh - 32px));max-width:none;max-height:none;margin:auto;padding:0;overflow:hidden;border:1px solid #39404d;border-radius:18px;color:#eaf0f8;background:#10141c;box-shadow:0 30px 120px #000c;font-family:'Manrope',sans-serif}
.cscom-gallery-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.cscom-gallery-dialog::backdrop{background:#03060bdf;backdrop-filter:blur(7px)}
.cscom-gallery-dialog *{box-sizing:border-box}
.cscom-gallery-dialog [hidden]{display:none!important}
.cgv-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:12px 16px;border-bottom:1px solid #ffffff12;background:linear-gradient(115deg,#1f1d20,#151a24 60%)}
.cgv-heading{display:flex;align-items:center;gap:11px;min-width:0}.cgv-brand{display:grid;place-items:center;flex:none;width:40px;height:40px;border:1px solid #ff8d3545;border-radius:12px;background:linear-gradient(145deg,#ec4d08,#ff7a17);box-shadow:0 5px 18px #ff550025;color:#fff}.cgv-brand svg{width:22px;height:22px}
.cgv-titles{display:flex;flex-direction:column;min-width:0;gap:3px}.cgv-titles strong{font:800 15px 'Exo 2','Manrope',sans-serif;color:#fff}.cgv-material-title{max-width:52vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#9daabd;font-size:11px}
.cgv-tools{display:flex;align-items:center;gap:7px;flex:none}
.cscom-gallery-dialog .cgv-tool{position:static;display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:none;min-width:44px;height:44px;margin:0;padding:0 11px;border:1px solid #ffffff18;border-radius:11px;background:#212733;color:#dfe7f3;font:700 11px 'Manrope',sans-serif;text-decoration:none;cursor:pointer;transition:border-color .16s,background .16s}
.cscom-gallery-dialog .cgv-tool svg{width:19px;height:19px}.cscom-gallery-dialog .cgv-tool:hover{background:#30303a;border-color:#ff8d3d80;color:#ff9d59}.cscom-gallery-dialog .cgv-close{color:#fff;border-color:#ff793f50;background:#42251e}.cscom-gallery-dialog .cgv-close:hover{background:#d7470b;color:#fff}.cscom-gallery-dialog button:disabled{opacity:.35;cursor:default}
.cgv-stage{position:relative;min-width:0;min-height:0;overflow:hidden;background:radial-gradient(ellipse at 50% 35%,#20242c55,transparent 70%),#070a0f}
.cgv-viewport{width:100%;height:100%;display:grid;place-items:center;overflow:hidden;touch-action:pan-y pinch-zoom;overscroll-behavior:contain}
.cscom-gallery-dialog .cgv-image{display:block;width:auto;height:auto;min-width:0;min-height:0;max-width:100%;max-height:100%;margin:0;object-fit:contain;user-select:none;-webkit-user-drag:none}
.cgv-viewport.is-zoomed{display:block;overflow:auto;cursor:grab;touch-action:pan-x pan-y pinch-zoom}
.cgv-viewport.is-panning{cursor:grabbing}
.cscom-gallery-dialog .cgv-viewport.is-zoomed .cgv-image{width:200%;height:200%;max-width:none;max-height:none;object-fit:contain}
.cscom-gallery-dialog .cgv-arrow{position:absolute;z-index:2;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:44px;height:52px;padding:0;border:1px solid #ffffff30;border-radius:12px;background:#141b28d9;color:#fff;cursor:pointer;box-shadow:0 5px 20px #0008;transition:background .16s,border-color .16s}
.cgv-arrow svg{width:23px;height:23px}.cscom-gallery-dialog .cgv-previous{left:12px}.cscom-gallery-dialog .cgv-next{right:12px}.cscom-gallery-dialog .cgv-arrow:hover{background:#c2460ce6;border-color:#ff9c5b}
.cgv-loading,.cgv-error{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:14px 20px;border:1px solid #ffffff15;border-radius:12px;background:#121925ed;color:#c7d2e1;font-size:12px;text-align:center;box-shadow:0 5px 30px #0008;max-width:80%}
.cgv-loading{pointer-events:none}.cgv-error{display:flex;flex-direction:column;align-items:center;gap:12px}.cscom-gallery-dialog .cgv-retry{position:static;display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:100px;min-height:44px;padding:8px 16px;border:1px solid #f97c35;border-radius:8px;background:#c64a0f;color:white;font:700 12px 'Manrope',sans-serif;cursor:pointer}
.cgv-footer{min-width:0;padding:11px 16px 10px;border-top:1px solid #ffffff12;background:linear-gradient(180deg,#171c26,#10151e)}
.cgv-info{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px;min-width:0}.cgv-description{display:flex;align-items:baseline;gap:12px;min-width:0}.cgv-caption{font-size:11px;color:#d0d9e6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cgv-size{flex:none;font:10px 'Manrope',sans-serif;color:#758295}.cgv-count{flex:none;min-width:58px;padding:5px 9px;border:1px solid #ff8e303a;border-radius:8px;background:#ff6a0912;color:#ff9b50;font:800 12px 'Manrope',sans-serif;text-align:center}
.cgv-thumbnails{display:flex;gap:8px;max-width:100%;overflow-x:auto;overflow-y:hidden;padding:2px 2px 6px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#ff762c66 transparent}
.cscom-gallery-dialog .cgv-thumbnail{position:relative;display:block;flex:0 0 84px;width:84px;height:54px;margin:0;padding:0;overflow:hidden;border:2px solid #344052;border-radius:9px;background:#0a1019;cursor:pointer;opacity:.65;transition:opacity .16s,border-color .16s}
.cscom-gallery-dialog .cgv-thumbnail img{width:100%;height:100%;object-fit:cover;display:block}.cgv-thumbnail span{position:absolute;right:2px;bottom:2px;min-width:16px;border-radius:4px;background:#08101bd9;color:#fff;font:700 9px 'Manrope',sans-serif;text-align:center;padding:1px 4px}.cscom-gallery-dialog .cgv-thumbnail[aria-current="true"]{border-color:#ff7b2b;box-shadow:0 0 0 1px #ff7b2b55;opacity:1}.cscom-gallery-dialog .cgv-thumbnail:hover{opacity:1;border-color:#ffa865}
.cgv-help{display:block;margin-top:4px;color:#748297;font-size:10px;line-height:1.5}
.cscom-gallery-dialog .cgv-thumbnail>span{inset:auto 2px 2px auto;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:auto;min-width:16px;height:16px;margin:0;padding:0 4px;line-height:1;font-variant-numeric:tabular-nums;transform:none;pointer-events:none}
html.cscom-gallery-open{overflow:hidden!important;overscroll-behavior:none}
@media(max-width:640px){
 .cscom-gallery-dialog{width:calc(100vw - 12px);height:calc(100vh - 12px);height:calc(100dvh - 12px);border-radius:13px}
 .cgv-header{padding:8px;gap:6px}.cgv-heading{gap:7px}.cgv-brand{width:32px;height:36px;border-radius:9px}.cgv-brand svg{width:19px;height:19px}.cgv-titles strong{font-size:12px}.cgv-material-title{max-width:29vw;font-size:9px}
 .cgv-tools{gap:4px}.cscom-gallery-dialog .cgv-tool{min-width:40px;height:42px;padding:0 9px;border-radius:9px}.cgv-tool span{display:none}.cscom-gallery-dialog .cgv-tool svg{width:18px;height:18px}
 .cscom-gallery-dialog .cgv-arrow{width:38px;height:46px;border-radius:10px}.cscom-gallery-dialog .cgv-previous{left:6px}.cscom-gallery-dialog .cgv-next{right:6px}
 .cgv-footer{padding:9px}.cgv-info{margin-bottom:6px}.cgv-size{display:none}.cgv-caption{font-size:10px}.cgv-count{padding:4px 8px;font-size:11px}.cgv-thumbnails{gap:6px}.cscom-gallery-dialog .cgv-thumbnail{flex-basis:68px;width:68px;height:44px}.cgv-help{font-size:9px}.cgv-help::after{content:' · можно листать свайпом'}
 .cscom-gallery-open-hint{left:8px;bottom:8px;padding:7px 9px;font-size:10px}.cscom-gallery-step{width:34px;height:40px}.cscom-gallery-step--previous{left:6px}.cscom-gallery-step--next{right:6px}
}
@media(max-height:480px){.cgv-header{padding-block:6px}.cgv-footer{padding-block:6px}.cgv-help,.cgv-material-title{display:none}.cscom-gallery-dialog .cgv-thumbnail{height:36px}.cgv-info{margin-bottom:5px}}
@media(prefers-reduced-motion:reduce){.cscom-gallery-dialog *,.cscom-gallery-step,.cscom-gallery-open-hint{transition:none!important;scroll-behavior:auto!important}}
