/* Identidade LiquiLar: preto + laranja #F4780A + creme #F5F3EC; títulos em serifa (Latin Modern Roman), texto em Poppins */
@font-face { font-family: Pop; src: url(fonts/Poppins-Light.ttf); font-weight: 300; font-display: swap; }
@font-face { font-family: Pop; src: url(fonts/Poppins-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Pop; src: url(fonts/Poppins-Medium.ttf); font-weight: 500 700; font-display: swap; }
@font-face { font-family: Disp; src: url(fonts/lmroman17-regular.otf); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: Disp; src: url(fonts/lmroman12-italic.otf); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --bg: #f5f3ec; --card: #ffffff; --ink: #121212; --mut: #7c776f; --line: #d9d3c6;
  --or: #f4780a; --or-ink: #b95300; --black: #000;
  --ok: #2e7d4f; --bad: #c0392b; --nt: #7c776f;
  --shadow: 0 1px 2px rgba(18,18,18,.05), 0 6px 18px rgba(18,18,18,.05);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --card: #161513; --ink: #ede9e0; --mut: #9c978d; --line: #2c2b28; --or-ink: #f4780a; --ok: #4cc38a; --bad: #ff7b6b; --nt: #9c978d; --shadow: none; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
html, body { overflow-x: hidden; max-width: 100%; }
main > *, .amb > *, .top > * { min-width: 0; }
.top .ico, .top .chip, .top .logo { flex: none; }
body { margin: 0; font: 300 15.5px/1.5 Pop, system-ui, sans-serif; color: var(--ink); background: var(--bg); padding-bottom: env(safe-area-inset-bottom); }
main { max-width: 640px; margin: 0 auto; padding: 16px 16px 48px; display: flex; flex-direction: column; gap: 12px; }
b, strong { font-weight: 500; }
small, .muted { color: var(--mut); font-size: 12.5px; }
p { margin: 4px 0; }

/* tipografia de marca */
h1 { font: 400 20px/1.15 Disp, Georgia, serif; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
h1 em, .hero em { font-style: italic; color: var(--or); }
h2 { font: 500 11px/1 Pop, sans-serif; text-transform: uppercase; letter-spacing: .22em; color: var(--or-ink); margin: 18px 0 2px; }
.hero { font: 400 34px/1.05 Disp, Georgia, serif; margin: 8px 0 0; }
.hero-sub { font: italic 400 16px/1.3 Disp, Georgia, serif; color: var(--mut); margin: 0 0 6px; }

/* barra superior preta */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: var(--black); color: #f5f3ec; border-bottom: 2px solid var(--or); }
.top .ico { background: none; border: 0; color: #f5f3ec; font-size: 26px; width: 40px; height: 40px; cursor: pointer; }
.top .logo { height: 34px; width: auto; display: block; }
.top .sp { flex: 1; }
.top h1 { color: #f5f3ec; }
.chip { font: 500 11px/1 Pop, sans-serif; padding: 6px 10px; border-radius: 99px; background: #2c2b28; color: #ede9e0; white-space: nowrap; letter-spacing: .02em; }
.chip.ok { background: #1f5a3a; } .chip.bad { background: #8c2a20; }

button, select, input, textarea { font: inherit; color: inherit; }
.btn { min-height: 48px; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 500; cursor: pointer; transition: transform .06s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--or); border-color: var(--or); color: #121212; font-weight: 600; }
.btn.dark { background: var(--black); border-color: var(--black); color: #f5f3ec; }
@media (prefers-color-scheme: dark) { .btn.dark { background: #f5f3ec; color: #000; border-color: #f5f3ec; } }
.btn.danger { color: var(--bad); }
.btn.big { min-height: 56px; font-size: 16px; letter-spacing: .01em; }
.btn:disabled { opacity: .5; }
.lnk { background: none; border: 0; color: var(--or-ink); padding: 6px 2px; font: 500 13px/1 Pop, sans-serif; cursor: pointer; }
.lnk.bad { color: var(--bad); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.vcard { display: flex; flex-direction: column; gap: 3px; text-align: left; width: 100%; cursor: pointer; position: relative; padding-left: 20px; }
.vcard::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--or); }
.vcard b { font: 400 19px/1.15 Disp, Georgia, serif; }
.warn { color: var(--or-ink); font-weight: 500; } .okc { color: var(--ok); font-weight: 500; }
.info b { font-weight: 500; }

label { display: flex; flex-direction: column; gap: 6px; font: 500 11px/1 Pop, sans-serif; text-transform: uppercase; letter-spacing: .14em; color: var(--mut); }
input, select, textarea { width: 100%; min-height: 48px; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 400 16px/1.3 Pop, sans-serif; text-transform: none; letter-spacing: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--or); outline-offset: 0; border-color: var(--or); }

/* caminhamento */
.amb { display: flex; gap: 8px; align-items: stretch; }
.ambmain { flex: 1; display: flex; gap: 14px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); cursor: pointer; }
.ambmain .cod { font: 400 22px/1 Disp, Georgia, serif; color: var(--or); font-variant-numeric: tabular-nums; min-width: 46px; }
.ambmain .nm { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ambmain .nm b { font-weight: 500; }
.bar { display: block; height: 4px; background: var(--line); border-radius: 9px; overflow: hidden; margin-top: 4px; }
.bar u { display: block; height: 100%; background: var(--or); }
.mv { display: flex; flex-direction: column; gap: 6px; }
.mv button { flex: 1; width: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--mut); cursor: pointer; }
.mv button:disabled { opacity: .3; }

.tools { display: flex; gap: 8px; flex-wrap: wrap; }
.tools .btn { flex: 1; min-width: 96px; min-height: 42px; font-size: 13.5px; }
.vbar[hidden] { display: none; }
.vbar { position: sticky; top: 62px; z-index: 4; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--or); color: #121212; font-weight: 500; }
.vbar span { flex: 1; } .vbar .btn { min-height: 38px; background: #121212; color: #f5f3ec; border-color: #121212; }

/* itens do roteiro */
.item { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; border-left: 4px solid var(--line); box-shadow: var(--shadow); }
.item.done { border-left-color: var(--or); }
.item.na { flex-direction: row; align-items: center; gap: 10px; opacity: .55; box-shadow: none; }
.item.na b { flex: 1; text-decoration: line-through; font-weight: 400; }
.ih { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.ih b { flex: 1; font-weight: 500; }
.tag { font: 500 11px/1 Pop, sans-serif; background: var(--line); padding: 5px 9px; border-radius: 99px; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 500; font-size: 14px; cursor: pointer; }
.seg button.on { color: #fff; border-color: transparent; }
.seg button.on.ok { background: var(--ok); } .seg button.on.bad { background: var(--bad); } .seg button.on.nt { background: #3b3a37; }
.qty { display: flex; gap: 6px; align-items: stretch; }
.qty button:not(.mic) { width: 50px; font-size: 22px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.qty input[type=number] { text-align: center; font: 400 20px/1 Disp, Georgia, serif; }
.qty textarea { min-height: 64px; resize: vertical; }
.mic { width: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 18px; cursor: pointer; }
.shots { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.shots .cam { background: var(--or); border-color: var(--or); color: #121212; font-weight: 600; }
.th { width: 58px; height: 58px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; }
.foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.foot .lnk { padding: 2px; font-size: 12.5px; }

/* ---- v2: abas, chips de condição, itens hierárquicos, saída, modelos, relatório ---- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; position: sticky; top: 58px; z-index: 3; background: var(--bg); }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font: 500 13px/1 Pop, sans-serif; cursor: pointer; white-space: nowrap; }
.tab small { color: var(--mut); margin-left: 4px; }
.tab.on { background: var(--black); border-color: var(--black); color: #f5f3ec; }
.tab.on small { color: var(--or); }
@media (prefers-color-scheme: dark) { .tab.on { background: #f5f3ec; color: #000; border-color: #f5f3ec; } .tab.on small { color: #b95300; } }
.rep .gpsl { font-size: 9.5px; color: #4a4741; margin: -2px 0 6px; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; }
.ro { pointer-events: none; opacity: .72; }
.ro .item { box-shadow: none; }
.dono { color: var(--mut); font-weight: 500; }
.dono.eu { color: var(--or-ink); }
.pessoa { display: flex; flex-direction: column; gap: 8px; }
.card .chk { margin: 4px 0; }
.amb select, .item > select { min-height: 40px; font-size: 14px; margin-top: 4px; }
.aviso-l { font-size: 13px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--or) 14%, transparent); border: 1px solid var(--or); }
.more summary { cursor: pointer; font: 500 12.5px/1 Pop, sans-serif; color: var(--or-ink); padding: 8px 2px; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "＋ "; }
.more[open] summary::before { content: "－ "; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); font: 500 14px/1.2 Pop, sans-serif; cursor: pointer; }
.tile span { font-size: 22px; } .tile small { font-weight: 300; }
.num { font: 400 15px/1.2 Disp, Georgia, serif; color: var(--or-ink); min-width: 26px; font-variant-numeric: tabular-nums; }
.item.subi { margin-left: 16px; border-left-color: var(--line); background: color-mix(in srgb, var(--card) 70%, var(--bg)); }
.item.subi.done { border-left-color: var(--or); }
.ih .ed { background: none; border: 1px solid var(--line); border-radius: 8px; width: 32px; height: 32px; color: var(--mut); cursor: pointer; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { flex: 1 1 auto; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font: 500 13.5px/1 Pop, sans-serif; cursor: pointer; }
.chips button.on { border-color: transparent; color: #fff; }
.chips button.on.BOM, .chips button.on.PINTURA_NOVA { background: var(--ok); }
.chips button.on.REGULAR { background: #b7791f; }
.chips button.on.AVARIA { background: var(--bad); }
.chips button.on.NAO_ACESSIVEL { background: #3b3a37; }
.chips button.on.V { background: var(--black); }
@media (prefers-color-scheme: dark) { .chips button.on.V { background: #f5f3ec; color: #000; } }
.qty .ql { align-self: center; font: 500 11px/1 Pop, sans-serif; text-transform: uppercase; letter-spacing: .14em; color: var(--mut); min-width: 34px; }
.refbox { font-size: 12.5px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--or) 10%, transparent); border: 1px dashed var(--or); }
.refbox.now { background: transparent; border-style: solid; border-color: var(--line); }
.refbox .bad { color: var(--bad); font-weight: 500; }
.thw { position: relative; display: inline-block; }
.thw .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-style: normal; font-size: 18px; background: rgba(0,0,0,.35); border-radius: 10px; pointer-events: none; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid figure { margin: 0; font-size: 10.5px; line-height: 1.25; color: var(--mut); }
.grid .thw.big, .grid .thw.big img { width: 100%; display: block; }
.grid img { aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); width: 100%; cursor: pointer; }
.viewer video { max-width: 100%; max-height: 62vh; border-radius: 10px; }
.chk { flex-direction: row !important; align-items: center; gap: 10px; font: 400 14px/1.3 Pop, sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; color: var(--ink) !important; }
.chk input { width: 20px; height: 20px; min-height: 0; flex: none; accent-color: var(--or); }
.mrow { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.mrow.subi { margin-left: 18px; }
.mtop { display: flex; gap: 6px; } .mtop input { min-height: 42px; }
.mv-b { flex: none; width: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--mut); cursor: pointer; }
.mv-b.bad { color: var(--bad); }
.mflags { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mflags select { width: auto; min-height: 38px; padding: 6px 10px; font-size: 14px; }
.mflags .chk { font-size: 13px !important; }

/* ---- assistente de pré-cadastro ---- */
.tipos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tipo { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); cursor: pointer; min-height: 118px; }
.tipo span { font-size: 26px; line-height: 1; }
.tipo b { font: 400 18px/1.15 Disp, Georgia, serif; }
.tipo small { color: var(--mut); font-size: 12px; line-height: 1.3; }
.tipo:active { border-color: var(--or); }
.var { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.var > span { flex: 1; font-size: 14px; }
.var .qty { flex: none; }
.var .qty input { width: 54px; text-align: center; font: 400 20px/1 Disp, Georgia, serif; }
.var .qty button { width: 44px; min-height: 44px; }
.var.chk { margin: 0; }
.ambmain.static { cursor: default; }

/* ---- passeio guiado (câmera do app) ---- */
body.cam-aberta { overflow: hidden; }
#cam { position: fixed; inset: 0; z-index: 40; background: #000; color: #f5f3ec; overflow: hidden; }
#cam[hidden] { display: none; }
#cam .cv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
#cam .flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .12s; }
#cam .flash.on { opacity: .85; }
.ctop { position: absolute; left: 0; right: 0; top: 0; padding: calc(8px + env(safe-area-inset-top)) 10px 10px; background: linear-gradient(#000c, #0000); }
.ctrow { display: flex; align-items: center; gap: 6px; }
.ctinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ctinfo b { font: 400 16px/1.15 Disp, Georgia, serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctinfo small { color: #d9d3c6; font-size: 11.5px; }
.cb { flex: none; width: 40px; height: 40px; border-radius: 99px; border: 1px solid #ffffff40; background: #00000066; color: #f5f3ec; font-size: 16px; cursor: pointer; }
.cb.on { background: var(--or); border-color: var(--or); color: #121212; }
.cbar { display: block; height: 3px; background: #ffffff33; border-radius: 9px; margin-top: 8px; overflow: hidden; }
.cbar u { display: block; height: 100%; background: var(--or); }
.cbot { position: absolute; left: 0; right: 0; bottom: 0; max-height: 68vh; overflow-y: auto; padding: 30px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(#0000, #000d 22%, #000f); display: flex; flex-direction: column; gap: 10px; }
.cprompt { font: 400 24px/1.15 Disp, Georgia, serif; }
.cfields { display: flex; flex-direction: column; gap: 8px; }
#cam .chips button, #cam .qty button, #cam .mic { background: #1c1b19; border-color: #3a3835; color: #f5f3ec; }
#cam .chips button.on { color: #fff; }
#cam .chips button.on.V { background: #f5f3ec; color: #000; }
#cam input, #cam textarea { background: #1c1b19; border-color: #3a3835; color: #f5f3ec; }
.cf { display: flex; gap: 8px; }
#cam .refbox { background: #f4780a22; color: #f5f3ec; }
.aviso { font-size: 13px; padding: 8px 10px; border-radius: 10px; background: #f4780a26; border: 1px solid var(--or); color: #ffd7b0; }
.cthumbs { display: flex; gap: 6px; align-items: center; overflow-x: auto; }
.cthumbs .th { width: 44px; height: 44px; }
.cthumbs small { color: #d9d3c6; flex: none; }
/* roda de seleção (condição / verificação) */
.wheels { display: flex; gap: 10px; }
.wcol { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wcol > small { color: #d9d3c6; font: 500 10.5px/1 Pop, sans-serif; letter-spacing: .18em; text-transform: uppercase; text-align: center; }
.wheel { position: relative; height: 132px; border-radius: 16px; background: #1c1b19; border: 1px solid #3a3835; overflow: hidden; }
.wh-band { position: absolute; left: 6px; right: 6px; top: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--or); background: #f4780a1f; pointer-events: none; z-index: 1; }
.wh-list { position: absolute; inset: 0; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.wh-list::-webkit-scrollbar { display: none; }
.wh-list .sp { display: block; height: 44px; flex: none; }
.wi { display: block; width: 100%; height: 44px; border: 0; background: none; color: #bdb8ae; font: 500 16px/44px Pop, sans-serif; scroll-snap-align: center; scroll-snap-stop: always; cursor: pointer; white-space: nowrap; padding: 0 6px; }
.wi.on { color: #fff; font-weight: 600; }
.wi.on::before { content: "✓ "; color: var(--or); }
.cctl3.dois { grid-template-columns: 1fr 1fr; }
.cbig.sim { background: var(--or); border-color: var(--or); color: #121212; }
.muted-l { margin: 0; color: #d9d3c6; font-size: 13px; }
/* seletor de lente/zoom sobre a imagem */
.zbar { position: absolute; right: 10px; top: 92px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.zb { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #ffffff55; background: #000a; color: #f5f3ec; font: 600 12px/1 Pop, sans-serif; cursor: pointer; }
.zb.on { background: var(--or); border-color: var(--or); color: #121212; }
/* transição entre ambientes */
.ctrans { position: absolute; inset: 0; z-index: 8; background: #000; display: flex; align-items: center; justify-content: center; text-align: center; animation: tfade .35s ease both; }
.ctrans[hidden] { display: none; }
.tcard { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 24px; animation: tup .5s ease both; }
.tcard small { font: 500 11px/1 Pop, sans-serif; letter-spacing: .28em; color: var(--or); }
.tn { font: 400 clamp(34px, 9vw, 56px)/1.05 Disp, Georgia, serif; color: #f5f3ec; max-width: 14ch; text-wrap: balance; }
.tl { display: block; width: 72px; height: 3px; background: var(--or); border-radius: 3px; transform-origin: left; animation: tline .9s ease .15s both; }
@keyframes tfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tup { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes tline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .ctrans, .tcard, .tl { animation: none; } }
.cshut { display: flex; justify-content: center; }
.cctl3 { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 8px; }
.cbig { min-height: 64px; border-radius: 16px; border: 1px solid #ffffff40; background: #ffffff14; color: #f5f3ec; font: 600 16px/1.1 Pop, sans-serif; cursor: pointer; padding: 6px 8px; }
.cbig:active { transform: scale(.97); }
.cbig:disabled { opacity: .35; }
.cbig.na { background: #3b3a37; border-color: #5a5853; }
.hhint { display: none; align-self: center; font: 500 12px/1 Pop, sans-serif; letter-spacing: .04em; color: #121212; background: var(--or); padding: 7px 12px; border-radius: 99px; }
@media (orientation: portrait) { .hhint { display: inline-block; } }
.cprompt .ear { font-size: 15px; opacity: .6; margin-left: 4px; }
.cprompt { cursor: pointer; }
.aviso-s { color: #ffb066 !important; }
.thw .vert { position: absolute; top: -4px; right: -4px; font-style: normal; font-size: 12px; background: var(--or); color: #121212; border-radius: 99px; width: 18px; height: 18px; display: grid; place-items: center; }
.gate { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 8px 4px; }
.gate .rot { font-size: 44px; line-height: 1; display: flex; align-items: center; gap: 6px; }
.gate .rot span { color: var(--or); font-size: 40px; }
.gate .gt { font: 400 26px/1.1 Disp, Georgia, serif; text-transform: none; letter-spacing: 0; color: #f5f3ec; margin: 0; }
.gate p { margin: 0; color: #d9d3c6; max-width: 34ch; }
.gate .btn.big { width: 100%; }
/* câmera em paisagem: painel lateral, imagem à esquerda */
@media (orientation: landscape) and (max-height: 560px) {
  .cbot { top: 0; right: 0; left: auto; bottom: 0; width: min(46vw, 400px); max-height: none; padding: calc(10px + env(safe-area-inset-top)) 12px calc(10px + env(safe-area-inset-bottom)); background: #000e; justify-content: center; }
  .ctop { right: min(46vw, 400px); }
  .cprompt { font-size: 20px; }
  .cbig { min-height: 52px; }
  .shutter { width: 64px; height: 64px; }
  .wheel { height: 114px; } .wh-band { top: 38px; height: 38px; } .wh-list .sp { height: 38px; } .wi { height: 38px; line-height: 38px; font-size: 15px; }
  .zbar { right: calc(min(46vw, 400px) + 10px); top: 70px; }
}
/* passeio rápido: imagem em tela cheia, controles sobrepostos (vale em retrato e em paisagem) */
.cbot:has(.rap) { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: none; overflow: visible; background: linear-gradient(#0000, #0007); padding: 24px calc(12px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left)); }
#cam:has(.rap) .ctop { right: 0; }
#cam:has(.rap) .zbar { right: calc(10px + env(safe-area-inset-right)); top: 78px; }
.rap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; }
.rl { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rb { display: flex; gap: 6px; }
.rr { display: flex; justify-content: flex-end; }
.rbtn { min-height: 44px; padding: 0 12px; border-radius: 14px; border: 1px solid #ffffff55; background: #000a; color: #f5f3ec; font: 600 14px/1 Pop, sans-serif; cursor: pointer; }
.rbtn:disabled { opacity: .35; }
.rbtn.pr { background: #000b; border-color: var(--or); min-width: 96px; }
.rap .cthumbs .th { width: 38px; height: 38px; }
.rap .shutter { width: 68px; height: 68px; }
/* a imagem aparece inteira (igual à câmera do celular): o que você vê é exatamente o que é salvo, 4:3, sem corte */
#cam:has(.rap) .cv { object-fit: contain; }
/* paisagem: a imagem 4:3 ocupa o centro; as faixas pretas laterais ficam para os botões (nada cobre a foto) */
@media (orientation: landscape) and (max-height: 560px) {
  .cbot:has(.rap) { top: 0; left: auto; right: 0; bottom: 0; width: max(124px, calc((100vw - 133.33vh) / 2)); padding: calc(8px + env(safe-area-inset-top)) calc(8px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) 8px; background: none; justify-content: center; }
  #cam:has(.rap) .ctop { left: 0; right: 0; background: linear-gradient(#0009, #0000); }
  #cam:has(.rap) .zbar { right: auto; left: calc(8px + env(safe-area-inset-left)); top: 50%; transform: translateY(-50%); }
  .rap { display: flex; flex-direction: column; align-items: stretch; gap: 8px; height: 100%; justify-content: center; }
  .rl, .rr { display: contents; }
  .rbtn.pr { order: 1; width: 100%; }
  .rap .shutter { order: 2; align-self: center; }
  .rb { order: 3; flex-direction: column; }
  .rbtn { width: 100%; min-height: 40px; }
  .rap .cthumbs { order: 4; justify-content: center; }
}
.cctl { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cctl.fim { flex-wrap: wrap; }
.cside { flex: 1; min-height: 52px; border-radius: 14px; border: 1px solid #ffffff40; background: #ffffff14; color: #f5f3ec; font: 500 15px/1 Pop, sans-serif; cursor: pointer; }
.cside:disabled { opacity: .35; }
.shutter { flex: none; width: 76px; height: 76px; border-radius: 50%; border: 5px solid #f5f3ec; background: #f4780a; cursor: pointer; box-shadow: 0 0 0 3px #0008; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; }
.shutter:active { transform: scale(.93); }
.shutter.vid { background: #c0392b; }
.shutter.rec { border-radius: 18px; }
.csub { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.lnk.lt { color: #ffb066; }
.rectime { color: #ff6b5b; font-weight: 500; font-size: 13px; }
.csheet { position: absolute; inset: 0; background: #000c; display: flex; align-items: center; justify-content: center; }
.csheet[hidden] { display: none; }
.csheet .sheet { background: #161513; color: #f5f3ec; }

/* ---- relatório de backup ---- */
.rep { max-width: 820px; margin: 0 auto; padding: 14px; background: #fff; color: #121212; font: 300 11px/1.4 Pop, sans-serif; }
.rep .toolbar { display: flex; gap: 8px; margin-bottom: 12px; }
.rcover { background: #000; color: #f5f3ec; text-align: center; padding: 18px 12px 16px; border-bottom: 3px solid #f4780a; }
.rcover img { height: 54px; }
.rt { font: 400 20px/1.1 Disp, Georgia, serif; margin-top: 10px; letter-spacing: .02em; }
.rs { font: 500 10px/1 Pop, sans-serif; letter-spacing: .3em; color: #f4780a; margin-top: 8px; }
.rc { font: italic 400 14px/1 Disp, Georgia, serif; margin-top: 8px; color: #d9d3c6; }
.rh { font: 500 10.5px/1 Pop, sans-serif; letter-spacing: .2em; margin: 16px 0 6px; color: #121212; border-bottom: 1px solid #d9d3c6; padding-bottom: 4px; }
.rh span { color: #b95300; margin-right: 6px; }
.rep .tb { width: 100%; border-collapse: collapse; margin: 4px 0; }
.rep .tb th, .rep .tb td { border: 1px solid #d9d3c6; padding: 4px 6px; text-align: left; vertical-align: top; font-size: 10px; }
.rep .tb th { background: #f5f3ec; font-weight: 500; letter-spacing: .04em; }
.rep .kv th { width: 34%; }
.rep .inv .sub td:nth-child(2) { padding-left: 16px; }
.rep .inv tr.na td { color: #7c776f; }
.rep em { color: #7c776f; font-style: normal; font-size: 9.5px; }
.rep .ambh { background: #000; color: #f5f3ec; font: 500 11px/1 Pop, sans-serif; letter-spacing: .12em; padding: 8px 10px; margin: 10px 0 6px; border-left: 4px solid #f4780a; }
.rep .oc { border-left: 3px solid #f4780a; background: #fff8f0; padding: 5px 8px; margin: 6px 0; font-size: 10px; }
.rep .sub-h { font: 500 9.5px/1 Pop, sans-serif; letter-spacing: .18em; margin: 10px 0 5px; color: #b95300; }
.rep .grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.rep .grade figure { margin: 0; text-align: center; }
.rep .grade img { width: 100%; max-height: 2.8cm; object-fit: contain; background: #f5f3ec; display: block; }
.rep .grade figcaption { font-size: 6pt; line-height: 1.2; color: #4a4741; margin-top: 2px; }
.rep .vid { height: 2.8cm; display: flex; align-items: center; justify-content: center; background: #121212; color: #f5f3ec; font-size: 9px; }
.rep .mut { color: #7c776f; }
.rfoot { margin-top: 18px; font-size: 8.5px; color: #7c776f; text-align: center; border-top: 1px solid #d9d3c6; padding-top: 6px; }
@media (prefers-color-scheme: dark) { .rep { box-shadow: 0 0 0 1px #2c2b28; } }
@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff !important; }
  .noprint, #toast, #overlay { display: none !important; }
  .rep { max-width: none; padding: 0; }
  .rep .pg { break-before: page; }
  .rep .grade.pg { break-before: page; }
  .rep .tb tr, .rep figure { break-inside: avoid; }
  .rcover, .rep .ambh, .rep .tb th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: #121212; color: #f5f3ec; padding: 11px 18px; border-radius: 99px; font: 400 14px/1.2 Pop, sans-serif; opacity: 0; pointer-events: none; transition: .2s; z-index: 30; max-width: 90vw; border: 1px solid #2c2b28; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#overlay { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; overflow: auto; }
#overlay[hidden] { display: none; }
.viewer { display: flex; flex-direction: column; gap: 10px; max-width: 100%; max-height: 100%; padding: 12px; color: #f5f3ec; }
.viewer img { max-width: 100%; max-height: 68vh; object-fit: contain; border-radius: 10px; }
.vinfo { font-size: 12.5px; }
.vbtns { display: flex; gap: 8px; } .vbtns .btn { flex: 1; }
.sheet { background: var(--bg); width: min(92vw, 420px); max-height: 88vh; overflow: auto; border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.sheet h2 { margin: 0 0 6px; }

/* contestação do locatário */
.fld { display: flex; flex-direction: column; gap: 4px; font: 500 13px/1.2 Pop, sans-serif; color: var(--mut); }
.fld textarea { min-height: 90px; resize: vertical; }
.pc-fotos { display: flex; gap: 8px; flex-wrap: wrap; }
.pc-fotos img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.pc-link { display: block; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); overflow-wrap: anywhere; font-size: 12.5px; user-select: all; }
.pc-amb > summary { cursor: pointer; padding: 4px 0; }
.pc-amb[open] > summary { margin-bottom: 10px; }
.pc-amb { display: flex; flex-direction: column; gap: 10px; }
.pc-item .btn { align-self: flex-start; min-height: 44px; }

.thw .vert.q { top: auto; bottom: -4px; background: #c47f00; color: #fff; }
.tile.pend { border-color: var(--or); box-shadow: 0 0 0 2px color-mix(in srgb, var(--or) 35%, transparent); }

.pnl { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.pnl b { font: 400 19px/1.15 Disp, Georgia, serif; }
.pnl .tools { margin-top: 6px; }
.pnl-cnt button { flex: 1 1 45%; }

.card.pend { border-color: var(--warn, #b7791f); }
.card.pend ul { margin: 6px 0 6px 18px; padding: 0; }
