
.ycm-drive-gallery{margin:28px 0;padding:clamp(16px,3vw,26px);background:#fff;border:1px solid #e2e4e3;border-radius:16px;color:#172018;min-width:0}
.ycm-drive-gallery__heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
.ycm-drive-gallery__heading h4{font-size:clamp(1.25rem,3vw,1.6rem);margin:0}
.ycm-drive-gallery__count{border-radius:20px;background:#f1f4f1;padding:6px 12px;font-size:13px;font-weight:650}
.ycm-drive-gallery__hint{font-size:14px;color:#52605a;margin:10px 0 16px}
.ycm-drive-gallery__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:12px}
.ycm-drive-gallery__item{position:relative;display:block;aspect-ratio:1;background:#e9ece9;border:0;border-radius:12px;overflow:hidden;cursor:pointer;padding:0;width:100%;min-width:0}
.ycm-drive-gallery__item img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .2s}
.ycm-drive-gallery__item:hover img{transform:scale(1.045)}
.ycm-drive-gallery__item-label{position:absolute;bottom:0;left:0;right:0;padding:8px;color:#fff;background:linear-gradient(transparent,rgba(0,0,0,.7));font-size:12px;text-align:center}
.ycm-drive-gallery button:focus-visible,.ycm-drive-gallery a:focus-visible{outline:3px solid #eb511e;outline-offset:3px}
.ycm-drive-gallery__lightbox[hidden]{display:none!important}
.ycm-drive-gallery__lightbox{position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;background:rgba(8,15,12,.92);padding:12px}
.ycm-drive-gallery__dialog{width:min(100%,1100px);max-height:calc(100dvh - 24px);display:flex;flex-direction:column;color:#fff;gap:9px}
.ycm-drive-gallery__toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:14px}
.ycm-drive-gallery__close,.ycm-drive-gallery__stage button{background:#fff;color:#16251d;border:0;border-radius:30px;cursor:pointer;font-weight:700;min-width:42px;min-height:42px;font-size:24px}
.ycm-drive-gallery__stage{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;align-items:center;min-height:0;flex:1}
.ycm-drive-gallery__stage img{display:block;width:100%;max-height:calc(100dvh - 220px);height:auto;object-fit:contain;min-height:0;margin:auto}
.ycm-drive-gallery__footer{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.ycm-drive-gallery__footer a{display:inline-flex;padding:10px 14px;border-radius:8px;background:#d92f22;color:#fff!important;text-decoration:none!important;font-weight:600;font-size:14px}
.ycm-drive-gallery__footer a:hover{background:#a92118}
.ycm-drive-gallery__note{text-align:center;font-size:12px;color:#d6d9d7;margin:0}
.ycm-drive-gallery__notice{font-size:13px;color:#665}
@media(max-width:600px){.ycm-drive-gallery__grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.ycm-drive-gallery__stage{grid-template-columns:36px minmax(0,1fr) 36px;gap:4px}.ycm-drive-gallery__stage button{min-width:36px;min-height:40px}.ycm-drive-gallery__footer a{flex:1;text-align:center;justify-content:center}}
@media(prefers-reduced-motion:reduce){.ycm-drive-gallery__item img{transition:none}}

/* v0.14.61: broken-preview and delivery recovery states */
.ycm-drive-gallery__delivery-warning{padding:12px 14px;background:#fff5e8;color:#553618;border:1px solid #d6a86a;border-radius:9px;font-size:14px;line-height:1.5}
.ycm-drive-gallery__delivery-warning[hidden],.ycm-drive-gallery__broken-label[hidden],.ycm-drive-gallery__preview-error[hidden]{display:none!important}
.ycm-drive-gallery__item--broken img{visibility:hidden}
.ycm-drive-gallery__broken-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:16px;color:#26352d;background:#f0f2ef;font-size:13px;font-weight:700;text-align:center;line-height:1.4}
.ycm-drive-gallery__item--broken .ycm-drive-gallery__item-label{display:none}
.ycm-drive-gallery__preview{position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:190px}
.ycm-drive-gallery__preview img{max-width:100%}
.ycm-drive-gallery__preview-error{padding:22px;text-align:center;border:1px solid #718078;border-radius:12px;background:#1d2924;color:white;max-width:440px}
.ycm-drive-gallery__preview-error p{margin:0 0 15px}
.ycm-drive-gallery__preview-error button,.ycm-drive-gallery__preview-error a{display:inline-flex;align-items:center;justify-content:center;margin:4px;padding:11px 14px;border-radius:8px;border:1px solid #fff;color:#fff!important;background:#304339;text-decoration:none!important;font-size:14px;font-weight:600;cursor:pointer}
.ycm-drive-gallery__preview-error button:hover,.ycm-drive-gallery__preview-error a:hover{background:#445e50}

/* v0.14.63: batch-revealed photo tiles must remain hidden until requested. */
.ycm-drive-gallery__item[hidden],.ycm-drive-gallery__more[hidden]{display:none!important}
.ycm-drive-gallery__pagination{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;margin:18px 0}
.ycm-drive-gallery__more{background:#b92920;color:white;border:0;border-radius:8px;padding:12px 18px;min-height:44px;cursor:pointer;font-weight:700}
.ycm-drive-gallery__more:hover{background:#8f1f19}
.ycm-drive-gallery__pagination span{color:#52605a;font-size:13px}
