/* Câmera dedicada A&D. Carrega por último: apenas apresentação, sem tocar no vídeo, recorte ou captura.
   O visor sempre preserva 3:4 (mesma relação do arquivo 900×1200); guias e referência ficam no mesmo retângulo. */
#app-shell .camera-page .camera-screen{max-width:560px;margin-inline:auto}
#app-shell .camera-page .camera-header{grid-template-columns:44px minmax(0,1fr) 44px;min-height:48px;margin:0 auto 8px;padding:0 4px}
#app-shell .camera-page .camera-header .icon-button{width:44px;height:44px;min-width:44px;min-height:44px;border-radius:50%;background:transparent!important;border:0!important;box-shadow:none!important;color:var(--ad-ink)!important}
#app-shell .camera-page .camera-header h1{font-size:17px;font-weight:600;margin:0}
#app-shell .camera-page .camera-workspace{display:block}
#app-shell .camera-page .camera-device{max-width:none;width:100%;margin:0;border-radius:0;box-shadow:none;overflow:visible!important;background:transparent!important}
#app-shell .camera-page .camera-device .viewfinder,
body.phone-preview #app-shell .camera-page .camera-device .viewfinder{width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:3/4!important;margin:0;border-radius:14px;overflow:hidden}
#app-shell .camera-page #viewfinder.is-native-only{aspect-ratio:auto!important}
#app-shell .camera-page .viewfinder .guide-hint{display:none}
#app-shell .camera-page .viewfinder .distance-overlay{white-space:nowrap}
#app-shell .camera-page .viewfinder .distance-overlay span{display:none}
#app-shell .camera-page .camera-mode{white-space:nowrap}
#app-shell .camera-page .viewfinder:not(.is-live) .camera-state{padding-top:52px}

/* Console branco compacto */
#app-shell .camera-page .camera-workspace,#app-shell .camera-page .camera-device,#app-shell .camera-page .camera-console,#app-shell .camera-page .camera-console>*{min-width:0;max-width:100%}
#app-shell .camera-page .camera-console{position:relative;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:8px 12px 4px;border:0!important;box-shadow:none!important;background:var(--ad-surface)!important}
#app-shell .camera-page .camera-toolbar{position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;gap:4px;min-width:0}
#app-shell .camera-page .camera-toolbar>*{min-width:0}
#app-shell .camera-page .camera-tool{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:100%;min-width:0;min-height:52px;padding:4px 2px;border:0!important;border-radius:12px;background:transparent!important;color:var(--ad-ink)!important;font-size:11px;font-weight:500;line-height:1.1;cursor:pointer;list-style:none}
#app-shell .camera-page .camera-tool span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#app-shell .camera-page .camera-tool::-webkit-details-marker{display:none}
#app-shell .camera-page .camera-tool svg{width:20px;height:20px;flex:none}
#app-shell .camera-page .camera-tool:focus-visible{outline:2px solid var(--ad-gold-text);outline-offset:2px}
#app-shell .camera-page .camera-tool:is([aria-pressed="true"],[aria-checked="true"],[aria-expanded="true"]),
#app-shell .camera-page .camera-tool-details[open]>.camera-tool{background:var(--ad-gold-soft)!important;color:var(--ad-gold-text)!important}
#app-shell .camera-page .overlay-row{display:flex;justify-content:center;align-items:stretch;min-width:0;gap:0;padding:0;margin:0;border:0!important;background:transparent!important}
#app-shell .camera-page .overlay-row[hidden]{display:none}
#app-shell .camera-page .overlay-toggle .switch{display:none}
#app-shell .camera-page .camera-tool-details{position:static}
#app-shell .camera-page .camera-tool-details>:not(summary){position:absolute;z-index:8;left:0;right:0;bottom:calc(100% + 6px);padding:8px;border-radius:14px;background:var(--ad-surface)!important;box-shadow:0 8px 24px rgb(0 0 0 / 14%)}
#app-shell .camera-page .shot-tabs{margin:0}
#app-shell .camera-page .shutter-row{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;justify-items:center;gap:16px;padding:2px 0 0}
#app-shell .camera-page .console-action{display:grid;grid-template:22px/22px;place-content:center;gap:0;width:48px;height:48px;min-width:48px;min-height:48px;padding:0;border-radius:50%;border:1px solid var(--ad-border)!important;background:var(--ad-surface)!important;color:var(--ad-ink)!important}
#app-shell .camera-page .console-action svg{display:block;width:22px;height:22px;margin:0}
#app-shell .camera-page .console-action span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
#app-shell .camera-page .shutter{width:74px;height:74px;padding:5px;border-radius:50%}
#app-shell .camera-page .camera-next{display:grid;gap:8px}
#app-shell .camera-page .camera-next:not(:has(button:not([hidden]))){display:none}

/* Painéis (Modelos e Opções): só visibilidade; o vídeo continua montado. */
#app-shell .camera-page .camera-sheet{position:fixed;z-index:60;left:0;right:0;bottom:0;max-width:560px;margin:0 auto;max-height:78dvh;overflow-y:auto;display:grid;gap:10px;align-content:start;padding:8px 18px calc(18px + env(safe-area-inset-bottom));border:0!important;border-radius:18px 18px 0 0;background:var(--ad-surface)!important;color:var(--ad-ink)!important;box-shadow:0 -10px 36px rgb(0 0 0 / 18%)}
#app-shell .camera-page .camera-sheet[hidden]{display:none!important}
#app-shell .camera-page .camera-sheet-head{position:sticky;top:-8px;z-index:1;display:flex;align-items:center;justify-content:space-between;min-height:48px;margin:0 -18px;padding:0 10px 0 18px;background:var(--ad-surface)}
#app-shell .camera-page .camera-sheet-head h2{margin:0;font-size:17px;font-weight:600}
#app-shell .camera-page .camera-sheet-head .text-button{min-height:44px;min-width:44px;font-weight:600;color:var(--ad-gold-text)!important}
#app-shell .camera-page.camera-sheet-open::after{content:"";position:fixed;inset:0;z-index:55;background:rgb(0 0 0 / 28%);pointer-events:none}

/* Celular / app iOS: tela dedicada sem a barra global; visor de borda a borda. */
@media(max-width:700px){
  body.camera-immersive #app-shell #bottom-nav{display:none!important}
  body.camera-immersive #app-shell #content.camera-page,
  html[data-ad-mobile="ios"] body.camera-immersive #content.camera-page{padding:4px 0 max(12px,env(safe-area-inset-bottom))!important}
  html:not([data-ad-mobile="ios"]) body.camera-immersive #app-shell #content.camera-page{padding-top:max(4px,env(safe-area-inset-top))!important}
  #app-shell .camera-page .camera-device .viewfinder,
  body.phone-preview #app-shell .camera-page .camera-device .viewfinder{border-radius:0}
  #app-shell .camera-page .camera-demo-credit{margin:0 12px 8px}
}
/* Viewports curtos: a barra de ferramentas ocupa a borda inferior do vídeo.
   O visor continua 3:4 em toda a largura; somente o console avança sobre sua borda. */
@media(max-width:700px) and (max-height:760px){
  #app-shell .camera-page .camera-header{margin-bottom:4px}
  #app-shell .camera-page .camera-device:has(.viewfinder.is-live) .camera-console{z-index:7;margin-top:-64px;gap:4px;padding:4px 12px 0;background:transparent!important}
  #app-shell .camera-page .viewfinder.is-live .viewfinder-bottom{bottom:76px}
  #app-shell .camera-page .camera-device:has(.viewfinder.is-live) .camera-console:has(.shot-tabs){margin-top:-100px}
  #app-shell .camera-page .camera-device:has(.shot-tabs) .viewfinder.is-live .viewfinder-bottom{bottom:112px}
  #app-shell .camera-page .camera-device:has(.viewfinder.is-live) .camera-toolbar{padding:4px;border-radius:12px;background:color-mix(in srgb,var(--ad-surface) 94%,transparent);box-shadow:0 1px 8px rgb(0 0 0 / 10%)}
  #app-shell .camera-page .camera-device:has(.viewfinder.is-live) .shutter-row{margin:0;padding-top:0;background:var(--ad-surface)}
}
body.phone-preview.camera-immersive #app-shell #bottom-nav{display:none!important}
html[data-ad-mobile="ios"] body.camera-immersive #toast{bottom:calc(24px + env(safe-area-inset-bottom))}
@media(min-width:701px){#app-shell .camera-page .camera-screen{max-width:max(360px,min(520px,calc((100dvh - 300px) * .75)))}}
#app-shell .camera-page .camera-sheet-head small{display:block;color:var(--ad-muted);font-size:13px}
#app-shell .camera-page .camera-sheet-head h2:focus{outline:none}
#app-shell .camera-page .camera-sheet-head h2:focus-visible{outline:2px solid var(--ad-gold-text);outline-offset:2px}
#app-shell .camera-page .camera-reference-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--ad-border)}
#app-shell .camera-page .camera-reference-row:has(#overlay-change[hidden]){display:none}
#app-shell .camera-page .camera-reference-row p{margin:2px 0 0;color:var(--ad-muted);font-size:13px}
#app-shell .camera-page .camera-reference-row button{min-height:44px;min-width:88px;flex:none}
