/* A galeria de edição usa fotos grandes; a prévia mantém o mosaico do cartão. */
.gallery-panel{container-type:inline-size}.gallery-panel .category-panel-heading{margin-bottom:20px}.gallery-panel .category-panel-heading p strong{color:var(--brand);font-weight:650}
.gallery-featured-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:13px}.gallery-featured-heading h3{font-weight:650;line-height:1.5;font-family:inherit;font-size:14px;line-height:1.4}.gallery-featured-heading>span{font-size:12px;color:var(--muted);text-align:right;max-width:160px}
.gallery-featured{display:grid;grid-template-columns:1.3fr 1fr;grid-template-rows:1fr 1fr;gap:9px;aspect-ratio:1.6;margin-bottom:22px}.gallery-slot{position:relative;min-width:0;min-height:0;padding:0;border:1px solid #d7dfe9;border-radius:10px;overflow:hidden;background:#edf2f8;text-align:left;cursor:grab}.gallery-slot:first-child{grid-row:span 2}.gallery-slot img{width:100%;height:100%;object-fit:cover}.gallery-slot:after{content:'';position:absolute;inset:40% 0 0;background:linear-gradient(transparent,#0a1931c9);pointer-events:none}.gallery-slot-label{position:absolute;z-index:1;left:10px;right:8px;bottom:10px;display:flex;align-items:center;gap:7px;color:#fff;font-size:12px;font-weight:600;line-height:1.35}.gallery-slot-label b{display:grid;place-items:center;flex-shrink:0;background:#ffd450;color:#0c285c;border-radius:5px;width:21px;height:21px;font-size:12px}.gallery-slot:first-child .gallery-slot-label{font-size:14px}.gallery-slot.is-empty{display:grid;place-items:center;cursor:pointer;border-style:dashed}.gallery-slot.is-empty:after{display:none}.gallery-slot.is-empty>.ui-icon{color:#9aaabe;width:26px;height:26px}.gallery-slot.is-empty .gallery-slot-label{color:#66768d}
.gallery-dropzone{border:1px dashed #b2c1d6;border-radius:10px;background:#f7f9fc;display:flex;align-items:center;gap:12px;padding:18px;margin:0 0 24px;outline-offset:4px}.gallery-dropzone:focus-visible{outline:3px solid #6386bb}.gallery-dropzone>.ui-icon{color:#728bad;width:26px;height:26px}.gallery-dropzone>div{min-width:0;flex:1}.gallery-dropzone strong{font-size:14px;line-height:1.45;display:block}.gallery-dropzone p{font-size:12px;color:var(--muted);line-height:1.6;margin-top:5px}.gallery-dropzone>.secondary{position:relative;white-space:nowrap;cursor:pointer;font-size:13px;padding:10px 13px}.gallery-dropzone input[type=file]{position:absolute;width:1px;height:1px;opacity:0}.gallery-dropzone label:focus-within{outline:3px solid var(--brand);outline-offset:3px}.gallery-dropzone .is-disabled{opacity:.45;cursor:default}.gallery-dropzone.is-over{background:#fff6d7;border-color:#0c285c;box-shadow:inset 0 0 0 1px #0c285c}.gallery-dropzone.is-full{background:#f5f7f6;border-color:#bacbc1}.gallery-upload-status{margin:-12px 0 20px;color:var(--brand);font-size:13px;font-weight:600}
.gallery-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 17px}.gallery-toolbar h3{font-family:inherit;font-size:14px;font-weight:650;display:flex;align-items:center;gap:7px}.gallery-toolbar h3>span{font-size:12px;color:#748398;background:#edf1f6;border-radius:5px;padding:2px 6px}.gallery-view-switch{display:flex;padding:3px;background:#edf1f6;border:1px solid #dfe5ed;border-radius:8px;gap:3px}.gallery-view-switch button{display:flex;align-items:center;gap:6px;font-size:13px;padding:8px 10px;border-radius:5px;color:#6b788d;min-height:36px}.gallery-view-switch .ui-icon{width:16px;height:16px}.gallery-view-switch button[aria-pressed=true]{background:var(--brand);color:#fff;box-shadow:0 1px 3px #0c285c22}
.gallery-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.gallery-item{min-width:0;border:1px solid #dfe4eb;background:#fff;border-radius:11px;overflow:hidden;scroll-margin-top:140px}.gallery-item.is-featured{border-color:#9aadca}.gallery-item-image{position:relative;aspect-ratio:4/3;background:#e9edf3;cursor:grab}.gallery-item-image>img{width:100%;height:100%;object-fit:cover}.gallery-photo-badge{position:absolute;bottom:9px;left:9px;background:#fffefc;color:#334155;font-size:12px;line-height:1.4;border-radius:5px;padding:4px 7px;font-weight:600;box-shadow:0 1px 5px #0002}.is-featured .gallery-photo-badge{background:var(--brand);color:#fff}.gallery-grip{position:absolute;top:8px;right:8px;width:34px;height:34px;border-radius:6px;background:#ffffffef;color:#21334e;font-size:23px;line-height:1;cursor:grab;box-shadow:0 1px 4px #0002}.gallery-grip:active{cursor:grabbing}.gallery-item-body{min-width:0;padding:14px}.gallery-item .field{margin-bottom:4px}.gallery-item .field-label{font-size:13px}.gallery-item .field input{font-size:14px!important;padding:10px!important}.gallery-photo-links{display:flex;align-items:center;gap:8px;justify-content:space-between;flex-wrap:wrap;margin:2px 0 9px}.gallery-photo-links .upload-button,.gallery-photo-links .text-button{font-size:12px;min-height:36px;padding:5px 0}.gallery-order{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:9px;border-top:1px solid #e7ebf0;padding-top:12px}.gallery-order>label{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted)}.gallery-order select{max-width:112px;border:1px solid #d9e0ea;border-radius:6px;background:#f9fafc;min-height:36px;padding:6px;color:#334155;font-size:12px}.gallery-order>div{display:flex;gap:5px}.gallery-order button{border:1px solid #dfe4eb;border-radius:6px;background:white;color:var(--brand);min-width:34px;height:36px}.gallery-order .gallery-remove{color:#854854;font-size:20px}.gallery-order-help{font-size:12px;line-height:1.7;color:var(--muted);margin-top:17px}
.gallery-panel[data-gallery-view=list] .gallery-items{grid-template-columns:1fr;gap:12px}.gallery-panel[data-gallery-view=list] .gallery-item{display:grid;grid-template-columns:minmax(116px,31%) minmax(0,1fr);align-items:start;padding:12px;gap:14px}.gallery-panel[data-gallery-view=list] .gallery-item-image{border-radius:7px;overflow:hidden}.gallery-panel[data-gallery-view=list] .gallery-item-body{padding:0}.gallery-panel[data-gallery-view=list] .gallery-photo-badge{font-size:12px;left:6px;bottom:6px;padding:3px 5px}.gallery-panel[data-gallery-view=list] .gallery-grip{width:28px;height:28px;top:5px;right:5px;font-size:20px}.gallery-panel[data-gallery-view=list] .gallery-photo-links{margin-bottom:7px}.gallery-panel[data-gallery-view=list] .gallery-order{padding-top:9px}
.gallery-item.is-drop-target,.gallery-slot.is-drop-target{outline:3px solid #e9b822;outline-offset:2px;box-shadow:0 0 0 5px #fff3bc}.gallery-slot.is-dragging,.gallery-item-image.is-dragging{opacity:.45}.gallery-item .gallery-grip.is-dragging{opacity:.5}
@container(max-width:500px){.gallery-dropzone{flex-wrap:wrap;padding:16px}.gallery-dropzone>div{flex-basis:calc(100% - 45px)}.gallery-dropzone>.secondary{margin-left:38px}.gallery-order>label{flex-basis:100%}.gallery-order>div{margin-left:auto}.gallery-panel[data-gallery-view=list] .gallery-order>label{flex-basis:auto}.gallery-panel[data-gallery-view=list] .gallery-order>div{margin-left:0}}
@container(max-width:360px){.gallery-toolbar{align-items:flex-start;flex-wrap:wrap}.gallery-featured-heading{align-items:start}.gallery-featured-heading>span{max-width:130px}.gallery-featured{aspect-ratio:1.25;gap:7px}.gallery-slot-label{left:7px;bottom:7px;font-size:12px;gap:5px}.gallery-slot:first-child .gallery-slot-label{font-size:13px}.gallery-items{grid-template-columns:1fr}.gallery-panel[data-gallery-view=list] .gallery-item{grid-template-columns:84px minmax(0,1fr);padding:10px;gap:11px}.gallery-panel[data-gallery-view=list] .gallery-photo-badge{position:static;border-radius:0;font-size:11px;box-shadow:none;display:block;text-align:center}.gallery-panel[data-gallery-view=list] .gallery-item-image{aspect-ratio:auto}.gallery-panel[data-gallery-view=list] .gallery-item-image>img{aspect-ratio:4/3;height:auto}.gallery-panel[data-gallery-view=list] .gallery-grip{width:25px;height:25px;font-size:19px}.gallery-panel[data-gallery-view=list] .gallery-photo-links{display:block}.gallery-panel[data-gallery-view=list] .gallery-photo-links .text-button{display:block}.gallery-panel[data-gallery-view=list] .gallery-order>label{flex-basis:100%}.gallery-item .field-label{font-size:13px}.gallery-panel[data-gallery-view=list] .gallery-item .field input{font-size:13px!important}}

.gallery-options>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:14px;font-weight:600;color:var(--brand)}.gallery-options[open]{padding-bottom:10px}.gallery-item-body{padding:6px 10px}.gallery-order{flex-wrap:wrap;gap:4px}.gallery-order>div{display:flex;flex:1;justify-content:space-between}.gallery-order button{min-height:44px;min-width:40px}.gallery-order>label{display:none}.gallery-options .field textarea{min-height:88px}.gallery-items{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.gallery-photo-badge{font-size:11px}.gallery-grip{width:44px;height:44px}.gallery-featured-heading,.gallery-featured{display:none}@container(max-width:360px){.gallery-items{grid-template-columns:repeat(2,minmax(0,1fr))}.gallery-item-body{padding:4px 6px}.gallery-order{padding-top:0}.gallery-order button{min-width:36px}.gallery-options>summary{font-size:13px}.gallery-photo-badge{font-size:10px;left:4px;bottom:4px}.gallery-grip{top:3px;right:3px}}

/* Galeria v2: grade compacta no formato de mosaico, ações sobre a foto e arrastar para organizar */
.gal .gal-topo{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:16px}
.gal .gal-topo h2{margin:0;font-size:20px}
.gal .gal-topo p{margin:4px 0 0;font-size:13px;color:var(--muted)}
.gal .gal-topo p strong{color:var(--brand)}
.gal-acoes{display:flex;flex-wrap:wrap;gap:8px}
.gal-acoes :is(button,label){display:inline-flex;align-items:center;gap:7px;width:auto;min-height:40px;padding:0 14px;font-size:13.5px;cursor:pointer;white-space:nowrap}
.gal-acoes svg{width:17px;height:17px}
.gal-acoes .is-disabled{opacity:.5;pointer-events:none}
.gal-melhorar svg{color:#b08300}
.gal-status{margin:0 0 12px;font-size:13px;color:var(--brand)}
.gal.is-over{outline:2px dashed var(--accent-hover);outline-offset:6px;background:var(--accent-soft)}
.gal-grade{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:12px;border:1.5px dashed #f0c9a8;border-radius:16px}
@container (max-width:520px){.gal-grade{grid-template-columns:repeat(3,minmax(0,1fr))}}
@container (max-width:340px){.gal-grade{grid-template-columns:repeat(2,minmax(0,1fr))}}
.gal-foto{position:relative;margin:0;aspect-ratio:1;border-radius:14px;overflow:visible;cursor:grab;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:manipulation;outline:none}
.gal-foto>img{display:block;width:100%;height:100%;object-fit:cover;border-radius:14px;border:1.5px dashed #f3c6a4;background:#eef1f5;transition:filter .15s,transform .15s}
.gal-foto.is-previa>img{border:2px solid var(--accent)}
.gal-foto:focus-visible>img{outline:3px solid var(--brand);outline-offset:2px}
.gal-previa{position:absolute;left:8px;bottom:8px;padding:2px 8px;border-radius:99px;background:var(--brand);color:#fff;font-size:11px;font-weight:800;pointer-events:none}
.gal-foto figcaption{position:absolute;left:6px;right:6px;bottom:6px;padding:3px 7px;border-radius:7px;background:#0a1931b3;color:#fff;font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
.gal-foto.is-previa figcaption{left:44px}
.gal-botao{position:absolute;z-index:2;display:grid;place-items:center;width:34px;height:34px;min-height:0;padding:0;border:0;border-radius:50%;box-shadow:0 3px 10px #0a193140;opacity:0;transform:scale(.85);transition:opacity .15s,transform .15s;cursor:pointer}
.gal-botao svg{width:17px;height:17px}
.gal-editar{top:-9px;left:-9px;background:var(--accent);color:var(--brand)}
.gal-remover{top:-9px;right:-9px;background:#e5484d;color:#fff}
.gal-remover.confirmar{width:auto;padding:0 10px;border-radius:99px;opacity:1;transform:none}
.gal-remover.confirmar::after{content:'Remover?';margin-left:4px;font-size:11.5px;font-weight:800}
.gal-ver{top:50%;left:50%;width:48px;height:48px;margin:-24px 0 0 -24px;background:#ffffffe6;color:var(--brand)}
.gal-ver svg{width:24px;height:24px}
.gal-foto:is(:hover,:focus-within) .gal-botao{opacity:1;transform:none}
.gal-foto:hover>img{filter:brightness(.82)}
@media (hover:none){.gal-editar,.gal-remover{opacity:1;transform:none;width:30px;height:30px}.gal-ver{display:none}}
.gal-nova{display:grid;place-items:center;align-content:center;gap:4px;aspect-ratio:1;border:1.5px dashed #c9d3df;border-radius:14px;color:var(--muted);font-size:12.5px;font-weight:700;cursor:pointer;background:#fbfcfd}
.gal-nova svg{width:24px;height:24px}
.gal-nova:hover{border-color:var(--brand);color:var(--brand)}
.gal-ajuda{margin:10px 2px 0;font-size:12.5px;color:var(--muted)}
.gal-vazia{display:grid;justify-items:center;gap:6px;padding:36px 18px;border:1.5px dashed #c9d3df;border-radius:16px;text-align:center;cursor:pointer;background:#fbfcfd}
.gal-vazia strong{font-size:15px;color:var(--brand)}
.gal-vazia span{font-size:12.5px;color:var(--muted)}
/* Arrastando */
.ordenar-arrastando{opacity:.35}
.ordenar-arrastando :is(.gal-botao,.vid-botao){display:none}
.ordenar-fantasma{box-shadow:0 18px 40px #0a193159;border-radius:14px;transition:none}
.ordenar-fantasma :is(.gal-botao,.vid-botao){display:none}
html.ordenar-ativo,html.ordenar-ativo *{cursor:grabbing!important}
/* Ver ampliada */
.gal-visor{width:min(1100px,calc(100vw - 24px));max-width:none;height:min(86dvh,900px);padding:0;border:0;border-radius:18px;background:#0a1220;overflow:hidden}
.gal-visor::backdrop{background:#050a14d9}
.gal-visor>img{display:block;width:100%;height:calc(100% - 58px);object-fit:contain}
.gal-visor-barra{display:flex;align-items:center;justify-content:space-between;gap:12px;height:58px;padding:0 14px;color:#dbe3ee;font-size:13.5px}
.gal-visor-barra>div{display:flex;gap:8px}
.gal-visor-barra .secondary{min-height:38px;padding:0 14px;width:auto}
.gal-visor-fechar{width:38px;height:38px;min-height:0;padding:0;border:0;border-radius:10px;background:#ffffff1a;color:#fff;font-size:22px}
.gal-visor-nav{position:absolute;top:calc(50% - 50px);display:grid;place-items:center;width:46px;height:46px;min-height:0;padding:0;border:0;border-radius:50%;background:#ffffffd9;color:#0a1931}
.gal-visor-nav svg{width:22px;height:22px}.gal-visor-nav.esq{left:14px}.gal-visor-nav.dir{right:14px}
