[hidden] { display: none !important; }
:root {
  --bg: #0b1724; --panel: #13263a; --panel2: #1a3249; --line: #26425e;
  --text: #e8f0f7; --muted: #8fa6bb; --accent: #2f8cff; --ok: #2fbf71; --warn: #f2a93b; --bad: #ef4d4d;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
/* Layout de altura total: cabeçalho / conteúdo / abas — ajusta-se à altura real da tela (dvh), sem rolagem na medição */
body { width: 100%; height: 100vh; height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; overflow-x: hidden; overflow: hidden; padding-top: var(--safe-t); overscroll-behavior: none; }
main { min-height: 0; min-width: 0; position: relative; }
.top, .tabs, .tools, .actions, .points { min-width: 0; }
h2 { font-size: 1.1rem; margin: 10px 0 8px; } h3 { font-size: .95rem; margin: 0 0 8px; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.small { font-size: .78rem; } .muted { color: var(--muted); } .danger { color: var(--bad); }
a { color: var(--accent); }

.top { background: var(--bg); padding: 6px 10px 5px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tag { font-size: .62rem; background: var(--warn); color: #222; border-radius: 6px; padding: 1px 5px; flex: none; }
.ctx { flex: 1; min-width: 0; font-size: .7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.lang { flex: none; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; font-size: .7rem; padding: 3px 6px; }
.points { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin-top: 5px; }
.points button { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 3px 1px; font-size: .66rem; line-height: 1.1; }
.points button.sel { border-color: var(--accent); background: #173a63; }
.points button .v { display: block; font-weight: 700; font-size: .72rem; }
.points button.ACEITA .v { color: var(--ok); } .points button.PROLONGAR .v, .points button.REPOSICIONAR .v { color: var(--warn); } .points button.REJEITADA .v { color: var(--bad); }

.view { display: none; height: 100%; } .view.active { display: block; }
.view.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 12px 16px; }
#view-medir.active { display: flex; flex-direction: column; gap: 6px; padding-bottom: 6px; }

/* câmera ocupa todo o espaço que sobra */
.stage { position: relative; flex: 1 1 auto; min-height: 0; background: #000; overflow: hidden; touch-action: none; }
.stage video, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.start-cover { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 20px; background: rgba(5, 12, 20, .9); }
.guidance { position: absolute; left: 8px; right: 112px; top: 6px; z-index: 2; font-size: .74rem; font-weight: 600; color: #ffd166; text-shadow: 0 1px 2px #000; pointer-events: none; }
.guidance .ok { color: #6ee7a8; }
.badge { position: absolute; top: 6px; right: 6px; z-index: 2; min-width: 100px; max-width: 46%; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .15); border-radius: 10px; padding: 5px 8px; pointer-events: none; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.b-top { display: flex; align-items: baseline; gap: 4px; } .b-icl { font-size: 1.35rem; font-weight: 800; } .b-lbl { font-size: .6rem; color: var(--muted); }
.b-u { margin-left: auto; font-size: .72rem; white-space: nowrap; } .b-state { font-size: .7rem; font-weight: 700; } .b-sub { font-size: .62rem; color: #cfe0ee; }
.badge > div { overflow: hidden; text-overflow: ellipsis; }
.badge.ok .b-icl { color: var(--ok); } .badge.warn .b-icl { color: var(--warn); } .badge.bad .b-icl { color: var(--bad); }
.readout { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; justify-content: space-between; align-items: end; padding: 18px 10px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); pointer-events: none; }
.readout .right { text-align: right; } .lbl { font-size: .64rem; color: #c3d3e1; }
.big { font-size: clamp(1.3rem, 6.5vw, 1.9rem); font-weight: 700; } .mid { font-size: clamp(.9rem, 4.2vw, 1.15rem); font-weight: 700; }
.mode-badge { position: absolute; bottom: 62px; left: 50%; transform: translateX(-50%); z-index: 3; background: var(--accent); color: #fff; padding: 4px 10px; border-radius: 20px; font-size: .78rem; white-space: nowrap; }

.tools { display: grid; grid-template-columns: 1.1fr 1fr .75fr .8fr .8fr 1.2fr; gap: 4px; padding: 0 8px; }
.actions .btn, .points button { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tools .btn { min-width: 0; padding: 6px 2px; font-size: .7rem; line-height: 1.1; white-space: normal; overflow-wrap: anywhere; min-height: 38px; }
.actions { display: grid; grid-template-columns: .9fr 1.1fr 2fr; gap: 6px; padding: 0 8px; }
.actions .btn { padding: 11px 6px; font-size: .92rem; }
.zoom { display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: .8rem; } .zoom input { flex: 1; }
@media (max-height: 700px) { .tools .btn { padding: 6px 2px; font-size: .7rem; } .actions .btn { padding: 9px 6px; } .points button { padding: 2px 1px; } }

.btn { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 8px; font-size: .85rem; font-weight: 600; text-decoration: none; text-align: center; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { background: #4a1f25; border-color: #7a2c35; }
.btn.toggle[aria-pressed="true"], .btn.on { background: var(--warn); color: #222; }
.btn:disabled { opacity: .45; } .btn.recording { background: var(--bad); border-color: var(--bad); }
.btn.sm { padding: 5px 8px; font-size: .75rem; }
.wide { display: block; width: 100%; margin: 8px 0; padding: 12px; } .wide-link { display: block; }
.row { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; }
.kv > div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.kv > div:last-child { border-bottom: 0; } .kv .src { display: block; font-size: .68rem; color: var(--muted); }
.kv .val { text-align: right; font-variant-numeric: tabular-nums; }
.form { display: grid; gap: 8px; } .grid2 { grid-template-columns: 1fr 1fr; }
.form label, dialog label { display: flex; flex-direction: column; gap: 3px; font-size: .74rem; color: var(--muted); }
input, select, textarea { background: #0e1e2e; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px; font-size: 16px; width: 100%; }
.check { flex-direction: row !important; align-items: center; gap: 8px !important; font-size: .9rem !important; color: var(--text) !important; margin: 8px 0; } .check input { width: auto; }
details { margin-top: 8px; } summary { color: var(--accent); font-size: .9rem; margin-bottom: 8px; }

.dim { margin: 8px 0; } .dim .bar { height: 6px; border-radius: 3px; background: #2a3e52; overflow: hidden; } .dim .bar i { display: block; height: 100%; }
.dim .h { display: flex; justify-content: space-between; font-size: .85rem; } .dim p { margin: 2px 0 0; font-size: .7rem; color: var(--muted); }
table.six { width: 100%; border-collapse: collapse; } .six td, .six th { border: 1px solid var(--line); padding: 6px; text-align: center; font-size: .85rem; }
.six td b { display: block; font-variant-numeric: tabular-nums; } .six td small { color: var(--muted); } .six td.sel { outline: 2px solid var(--accent); }
.rec { display: grid; grid-template-columns: 60px 1fr; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin: 8px 0; }
.rec img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; background: #000; }
.st { font-size: .7rem; font-weight: 700; } .st.ACEITA { color: var(--ok); } .st.REJEITADA { color: var(--bad); } .st.PROLONGAR, .st.REPOSICIONAR { color: var(--warn); }
.reg-item { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
table.log { width: 100%; border-collapse: collapse; font-size: .72rem; } .log td, .log th { border-bottom: 1px solid var(--line); padding: 4px; text-align: left; vertical-align: top; }

.tabs { display: grid; grid-template-columns: repeat(6, 1fr); background: #08121d; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabs button { background: none; border: 0; color: var(--muted); padding: 6px 0 5px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tabs button b { font-size: 1rem; line-height: 1; } .tabs button span { font-size: .62rem; } .tabs button.active { color: var(--accent); }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; width: min(94vw, 480px); padding: 14px; }
dialog.full { max-height: 88dvh; overflow: auto; } dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 14px 0 0; } dialog label { margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .chips button { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 4px 10px; }
.blk { color: var(--bad); margin: 4px 0; font-size: .85rem; } .wrn { color: var(--warn); margin: 4px 0; font-size: .8rem; }
table.budget { width: 100%; border-collapse: collapse; font-size: .78rem; } .budget td { padding: 4px; border-bottom: 1px solid var(--line); } .budget td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.toast { position: fixed; left: 50%; bottom: calc(70px + var(--safe-b)); transform: translateX(-50%); background: #000d; color: #fff; padding: 8px 14px; border-radius: 20px; font-size: .85rem; opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 20; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; }

/* v0.3 — Configurações em grupos, mapa do navio e ícones ⓘ */
.cfg-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .cfg-head .row { margin: 0; }
.shipmap { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); display: block; }
.shipmap .hot { cursor: pointer; } .shipmap .hot text { fill: #fff; font-size: 10px; font-weight: 600; paint-order: stroke; stroke: #0008; stroke-width: 2px; }
.shipmap .hot:active, .shipmap .hot:hover { filter: brightness(1.35); }
.grp { scroll-margin-top: 8px; } .grp > h3 { display: flex; align-items: center; gap: 6px; font-size: 1rem; }
.grp.flash { animation: flash 1.2s ease; } @keyframes flash { 0% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: none; } }
.item { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; } .item .lab { display: flex; align-items: center; gap: 6px; font-size: .84rem; }
.item input:not([type=checkbox]), .item select { width: 110px; padding: 6px 8px; font-size: 16px; } .item .wide { grid-column: 1 / -1; width: 100%; margin: 0; }
.info { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--accent); background: transparent; color: var(--accent); font: 700 .78rem/1 serif; font-style: italic; padding: 0; }
.status-pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .72rem; font-weight: 700; }
.status-pill.ok { background: #1d4d33; color: #8ef0b8; } .status-pill.no { background: #4d3a1d; color: #ffd38e; }
.profile { margin-top: 8px; padding: 8px; border-radius: 8px; background: #0e1e2e; border: 1px dashed var(--line); }
.calwrap { position: relative; margin-top: 8px; } .calwrap canvas { width: 100%; height: auto; border-radius: 8px; touch-action: none; display: block; }
.steps { padding-left: 18px; margin: 6px 0; font-size: .85rem; } .steps li { margin: 4px 0; }

/* v0.4 */
#view-adv .item input:not([type=checkbox]) { width: 96px; } .adv-changed input, .adv-changed select { border-color: var(--warn) !important; } .wrn { color: var(--warn); }

/* v0.4.1 — modo de teste com arquivo de vídeo */
.filebar { display: flex; align-items: center; gap: 6px; padding: 0 8px; } .filebar input[type=range] { flex: 1; min-width: 0; }
.tag-test { background: #9b7cf2; color: #fff; font-size: .62rem; font-weight: 800; border-radius: 6px; padding: 2px 6px; }
.stage.filemode::after { content: 'MODO TESTE · ARQUIVO'; position: absolute; left: 8px; bottom: 56px; z-index: 2; background: #9b7cf2cc; color: #fff; font-size: .6rem; font-weight: 800; padding: 2px 6px; border-radius: 6px; pointer-events: none; }

.ver { font-size: .62rem; color: var(--muted); flex: none; }

/* v0.5.2: confirmação do metro ancorada na parte de baixo, para a marca destacada (amarela) continuar visível no vídeo */
#meterDialog { margin: auto auto max(10px, env(safe-area-inset-bottom)) auto; max-height: 46vh; overflow: auto; }
#meterDialog::backdrop { background: rgba(0, 0, 0, .15); }

/* v0.6.0 — ajuste global da escala */
.scalebar { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin: 0 8px; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.sb-row { display: grid; grid-template-columns: 1fr .8fr 1.3fr .8fr 1fr; gap: 5px; }
.sb-row .btn { min-height: 46px; padding: 6px 2px; } .sb-big { font-size: 1.05rem; } .sb-sm { font-size: .85rem; color: var(--muted); }
.sb-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0d1b29; border: 1px solid var(--line); border-radius: 10px; line-height: 1.1; }
.sb-mid small { font-size: .6rem; color: var(--muted); } .sb-mid b { font-size: 1.05rem; } #sbDelta { font-size: .66rem; color: var(--warn); min-height: .8em; }
.sb-row2 { display: grid; grid-template-columns: auto auto auto auto 1fr auto; gap: 5px; align-items: center; } .sb-row2 .check { font-size: .72rem; white-space: nowrap; display: flex; align-items: center; gap: 4px; } .sb-row2 .btn.sm { min-height: 34px; }
.btn.sm { padding: 6px 8px; font-size: .78rem; }
.scalebar.flash .sb-mid { border-color: var(--accent); }
/* v0.6.0 — lupa de arraste e selo de ensaio */
.stage canvas.loupe { position: absolute; inset: auto; z-index: 5; width: 132px; height: 132px; border-radius: 50%; border: 2px solid #ffe600; box-shadow: 0 2px 10px #000a; pointer-events: none; background: #000; }
.trial-badge { position: absolute; left: 8px; bottom: 58px; z-index: 3; background: #7c4dff; color: #fff; font-size: .7rem; font-weight: 800; padding: 3px 8px; border-radius: 12px; pointer-events: none; }
.ref-table { width: 100%; border-collapse: collapse; font-size: .78rem; margin: 6px 0; } .ref-table td, .ref-table th { border-bottom: 1px solid var(--line); padding: 4px 3px; text-align: left; }
.ref-table input, .ref-table select { width: 100%; min-width: 0; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 5px; font-size: .8rem; }
.calbox { background: var(--panel); border: 1px solid #5b3fb0; border-radius: 10px; padding: 8px; margin: 8px 0; }
.ok-t { color: var(--ok); } .bad-t { color: var(--bad); }
.cklist label { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .85rem; }

/* ───────────── v0.7.0 ───────────── */
/* (1) iOS: impede a lupa nativa de seleção de texto sobre a imagem — fica só a lupa amarela do app */
.stage, .stage *, .scalebar, .tools, .fab { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.stage input, .scalebar input { -webkit-user-select: auto; user-select: auto; }
/* (4) retorno visual ao toque */
button, .btn, .chip, .fab { transition: transform .08s ease, filter .08s ease, background-color .15s; }
button:active, .btn:active, .chip:active, .fab:active, .tap { transform: scale(.94); filter: brightness(1.45); }
/* (3) seletor de modo */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 2px; margin-top: 5px; gap: 2px; }
.seg button { background: none; border: 0; color: var(--muted); font-weight: 700; font-size: .78rem; padding: 5px 4px; border-radius: 8px; }
.seg button.on { background: var(--accent); color: #fff; }
.seg.manual button.on { background: var(--warn); color: #222; }
/* (5/8) contexto no topo da imagem */
.stage-top { position: absolute; left: 6px; right: 112px; top: 6px; z-index: 3; display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.ctxbar { display: flex; flex-wrap: wrap; gap: 4px; pointer-events: auto; }
.chip { background: rgba(0, 0, 0, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .28); border-radius: 14px; padding: 4px 9px; font-size: .72rem; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.chip.empty { border-style: dashed; color: #ffd38e; }
.stage-top .guidance { position: static; }
/* (6/13) botões flutuantes */
.fab { position: relative; z-index: 3; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; color: #fff; background: rgba(15, 25, 38, .55); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); padding: 0; }
.fab.on { background: rgba(239, 77, 77, .7); }
.fab.toggle[aria-pressed="false"] { opacity: .45; } .fab.toggle[aria-pressed="false"]::after { content: ''; position: absolute; left: 9px; right: 9px; top: 50%; border-top: 2px solid #fff; transform: rotate(-35deg); }
#btnVessel.fab[aria-pressed="true"] { background: rgba(242, 169, 59, .8); opacity: 1; } #btnVessel.fab[aria-pressed="true"]::after { display: none; }
.fabs-right { position: absolute; right: 6px; top: 96px; z-index: 3; display: flex; flex-direction: column; gap: 8px; }
.fabs-left { position: absolute; left: 8px; bottom: 10px; z-index: 3; display: flex; gap: 8px; }
.fab.go { position: absolute; right: 8px; bottom: 10px; width: auto; height: 50px; border-radius: 26px; padding: 0 16px; font-size: .9rem; font-weight: 800; background: rgba(47, 140, 255, .75); border-color: #7fb6ff; gap: 6px; }
.fab.go:disabled { opacity: .4; } .fab.go.recording { background: rgba(239, 77, 77, .8); border-color: #ff9a9a; }
.readout { bottom: 62px; background: none; text-shadow: 0 1px 3px #000; }
.mode-badge { bottom: 124px; } .trial-badge { bottom: 124px; } .stage.filemode::after { bottom: 118px; }
/* (8) dock de referências */
.tools { grid-template-columns: repeat(4, 1fr); gap: 5px; }
.tools .dock-h { grid-column: 1 / -1; font-size: .58rem; letter-spacing: .08em; color: var(--muted); margin-bottom: -2px; }
.tools .btn { font-size: .74rem; min-height: 40px; }
/* (7) escala como painel sobre a imagem */
.stage .scalebar { position: absolute; left: 6px; right: 6px; bottom: 6px; z-index: 6; margin: 0; background: rgba(19, 38, 58, .96); }
.sb-h { font-size: .78rem; } .sb-h small { font-size: .66rem; }
.sb-row2 { grid-template-columns: auto auto auto auto 1fr auto; }
/* resultado: leitura do inspetor */
.opbox { background: var(--panel2); border: 1px solid var(--accent); border-radius: 12px; padding: 10px; margin-top: 10px; }
.opbox.manual { border-color: var(--warn); }
.stepper { display: grid; grid-template-columns: .8fr 1fr 1.8fr 1fr .8fr; gap: 5px; margin-top: 6px; } .stepper .btn { min-height: 44px; padding: 4px 2px; } .stepper input { text-align: center; font-size: 1.3rem; font-weight: 800; }
.disc { margin-top: 8px; padding: 6px 8px; border-radius: 8px; font-size: .8rem; } .disc.ok { background: #1d4d33; } .disc.warn { background: #4d3a1d; } .disc.block { background: #4a1f25; }
.disc select { margin-top: 6px; }
.offer { background: #2a1f12; border: 1px solid var(--warn); border-radius: 12px; padding: 10px; margin-top: 10px; font-size: .85rem; } .offer .row { justify-content: flex-end; }
.appgrey { color: var(--muted); } .appgrey b { color: #9fb0bf; }
/* registros: busca */
.rec-filter { position: sticky; top: 0; background: var(--bg); padding: 4px 0; z-index: 2; } .rec-filter .row { flex-wrap: nowrap; } .rec-filter .rec-dt { gap: 6px; align-items: center; } .rec-filter .rec-dt label { display: flex; align-items: center; gap: 4px; font-size: 13px; flex: 1 1 0; min-width: 0; } .rec-filter .rec-dt input { font-size: 14px; padding: 5px; min-width: 0; flex: 1 1 0; } .rec-filter select { font-size: 14px; padding: 6px; }
.st.MANUAL { color: var(--warn); } .points button.MANUAL .v { color: #ffd38e; }
/* configurações: nível, pesos, ⓘ */
.sens { display: grid; gap: 4px; } .sens input[type=range] { width: 100%; padding: 0; } .sens .ticks { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); }
.info-meta { width: 100%; border-collapse: collapse; font-size: .78rem; margin: 8px 0; } .info-meta td { border-bottom: 1px solid var(--line); padding: 4px; } .info-meta td:first-child { color: var(--muted); width: 40%; }
.reg-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
#btnVessel.fab[aria-pressed="false"]::after { display: none; }
.btn.flash { animation: flash 1.2s ease 2; }
/* contexto e botões 🌊/⛅ disponíveis também com a câmera desligada */
.stage-top, .fabs-left { z-index: 5; }

/* ───────────── v0.8.0 ───────────── */
.acq-prog { position: absolute; left: 8px; right: 8px; bottom: 150px; z-index: 3; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px; padding: 5px 8px; pointer-events: none; }
.ap-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .18); overflow: hidden; } .ap-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.acq-prog.done .ap-bar i { background: var(--ok); } .acq-prog.noconv .ap-bar i { background: var(--warn); }
.ap-txt { font-size: .78rem; font-weight: 700; margin-top: 3px; } .ap-det { color: #cfe0ee; font-size: .66rem; }
.mpp-chip { position: absolute; right: 60px; top: 100px; z-index: 3; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px; padding: 3px 8px; font: 700 .72rem ui-monospace, monospace; pointer-events: none; }
.mpp-chip.ok { color: #8ef0b8; } .mpp-chip.bad { color: #ffd38e; }
.zoom { gap: 6px; } .zoom select { width: auto; max-width: 45%; padding: 5px; font-size: 14px; } .zoom-l { display: flex; align-items: center; gap: 6px; flex: 1; } .zoom-l input { flex: 1; }
.filebar select { width: auto; padding: 4px; font-size: 13px; max-width: 34%; }
.diag { border-radius: 12px; padding: 10px; margin-top: 10px; border: 1px solid var(--line); background: var(--panel2); font-size: .85rem; }
.diag .act { font-weight: 800; margin-top: 4px; } .diag ul { margin: 4px 0 0; padding-left: 18px; } .diag table { width: 100%; border-collapse: collapse; font-size: .76rem; margin-top: 6px; } .diag td, .diag th { border-bottom: 1px solid var(--line); padding: 3px; text-align: left; }
.seal { border-radius: 10px; padding: 8px 10px; margin-top: 10px; font-weight: 700; font-size: .85rem; } .seal.ok { background: #1d4d33; color: #8ef0b8; } .seal.no { background: #4d3a1d; color: #ffd38e; } .seal small { display: block; font-weight: 500; color: var(--text); margin-top: 2px; }
.fileq { background: #2a1f12; border: 1px solid var(--warn); border-radius: 10px; padding: 8px; margin-top: 8px; font-size: .8rem; }
.acq-prog { position: static; margin: 0 8px; background: var(--panel); border-color: var(--line); pointer-events: auto; }
/* v0.8.3: progresso no lugar do rodapé (sem mudar o tamanho da imagem) */
.acq-prog { box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; }
.acq-prog[hidden] { display: none !important; }
/* v0.8.3: chips numa única linha (Local · Navio · Operador) e botões 🌊 ⛅ ⚓ em coluna vertical */
.ctxbar { flex-wrap: nowrap; overflow: hidden; } .ctxbar .chip { flex: 0 1 auto; min-width: 0; max-width: 40%; }
.fabs-left { bottom: auto; top: 112px; left: 6px; flex-direction: column; }
#btnShip.fab[aria-pressed="false"] { opacity: .5; } #btnShip.fab[aria-pressed="false"]::after { content: ''; position: absolute; left: 9px; right: 9px; top: 50%; border-top: 2px solid #fff; transform: rotate(-35deg); }
#btnShip.fab[aria-pressed="true"] { background: rgba(47, 140, 255, .75); opacity: 1; } #btnShip.fab[aria-pressed="true"]::after { display: none; }
/* v0.8.3: × no canto superior direito dos diálogos longos */
dialog.full { padding-top: 34px; position: relative; }
.dlg-x { position: sticky; top: -20px; float: right; margin: -26px -6px 0 8px; z-index: 5; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-size: 1.1rem; line-height: 1; }

/* v0.8.3 — guia ilustrado da calibração */
.calguide{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:6px 0}
.calguide figure{margin:0;background:rgba(127,127,127,.1);border-radius:10px;padding:6px}
.calguide img{width:100%;height:auto;display:block;border-radius:8px}
.calguide figcaption{font-size:.78rem;margin-top:4px;line-height:1.3}
@media (max-width:420px){.calguide{grid-template-columns:1fr}}

/* v0.8.4 — opção travada */
.locked{display:inline-flex;align-items:center;gap:4px;opacity:.6;cursor:not-allowed}.locked input{pointer-events:none}

/* v0.8.5 — diálogo de exportação */
.exp-form{display:grid;gap:8px}.exp-form label{display:flex;align-items:center;gap:8px;justify-content:space-between}.exp-form label:has(input[type=checkbox]){justify-content:flex-start}.exp-form input[type=date],.exp-form select,.exp-form input[type=number]{max-width:58%}
.exp-form label{display:flex !important;flex-direction:row !important;align-items:center !important;justify-content:space-between;gap:10px;text-align:left !important;margin:0 !important}
.exp-form label > input[type=checkbox]{flex:0 0 auto;width:20px;height:20px;margin:0}
.exp-form label:has(> input[type=checkbox]){justify-content:flex-start}
.exp-form input[type=date],.exp-form select,.exp-form input[type=number]{flex:0 1 58%;width:58%}
.exp-form > b{margin-top:6px}

/* v0.8.5 — calibração: lupa e controle flutuante de ajuste fino */
.calwrap .cal-loupe{position:absolute;width:150px;height:150px;border-radius:50%;border:2px solid #ffe600;box-shadow:0 2px 10px #000a;pointer-events:none;background:#000;z-index:3}
.cal-pad{position:fixed;left:8px;top:8px;z-index:50;background:rgba(15,26,36,.72);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.25);border-radius:14px;padding:6px;box-shadow:0 4px 16px #0008;user-select:none;-webkit-user-select:none;touch-action:none}
.cal-pad-handle{cursor:grab;font-size:.72rem;color:#cfe2f5;text-align:center;padding:2px 4px 6px;white-space:nowrap;touch-action:none}
.cal-pad-grid{display:grid;grid-template-columns:repeat(3,44px);grid-template-rows:repeat(3,44px);gap:4px}
.cal-pad-grid button{border:1px solid rgba(255,255,255,.3);border-radius:10px;background:rgba(255,255,255,.12);color:#fff;font-size:1.05rem;touch-action:manipulation}
.cal-pad-grid button:active{background:rgba(47,140,255,.5)}
.cal-pad-grid button[aria-pressed=true]{background:rgba(255,230,0,.35);border-color:#ffe600}
/* v0.8.6 — zoom óptico fixo, calibração por zoom e relatório final */
.zoom-presets{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.zoom-presets .zp{min-width:44px;padding:6px 10px;border-radius:18px;border:1px solid var(--line,#345);background:rgba(255,255,255,.08);color:inherit;font-weight:700}
.zoom-presets .zp.on{background:#ffe600;color:#111;border-color:#ffe600}
table.zcal{width:100%;border-collapse:collapse}table.zcal td{padding:4px;border-bottom:1px solid rgba(127,127,127,.2)}
.chip-ck{display:inline-flex;align-items:center;gap:6px;margin:2px 8px 2px 0;font-size:.85rem}
.rep-form{display:grid;gap:6px;width:100%}.rep-fields{display:flex;flex-direction:column;gap:2px;margin-bottom:6px}
.logo-prev{max-height:40px;max-width:120px;background:#fff;border-radius:4px;padding:2px}
#repSigs{width:100%}

.item.stack{flex-direction:column !important;align-items:stretch !important;gap:8px}
.item.stack > *:not(.lab){width:100%}
.item.stack .rep-fields .chip-ck{justify-content:flex-start;text-align:left;width:100%}
.item.stack .rep-fields .chip-ck input{flex:0 0 auto}
.item.stack .rep-form input{width:100%}
.item.stack{grid-template-columns:1fr !important}
.item.stack .rep-form input,.item.stack textarea{width:100% !important}
.item.stack .rep-fields{display:flex;flex-direction:column;align-items:stretch}
.item.stack .rep-fields .chip-ck{display:flex;flex-direction:row;align-items:flex-start;margin:4px 0}
.item.stack .rep-fields .chip-ck input{margin-top:3px}
.rep-fields .chip-ck input[type=checkbox]{width:20px !important;height:20px;flex:0 0 20px !important;margin:2px 0 0}
.rep-fields .chip-ck{gap:10px}
.rep-form .rl{display:flex;flex-direction:column;gap:2px;font-size:.74rem;color:var(--muted)}

/* v0.9.1 — topo só com píer/berço e navio (texto completo), modo de marcação limpo e aviso de sincronização */
.ctx-text{flex-direction:column;align-items:flex-start;gap:0;flex-wrap:nowrap;overflow:visible;max-width:78%}
.ctx-t{background:none;border:0;padding:1px 2px;color:#fff;font-weight:700;font-size:.86rem;text-align:left;white-space:normal;line-height:1.25;text-shadow:0 1px 3px #000,0 0 8px #000a}
.ctx-t.empty{color:#ffd38e;font-weight:600}
.stage.picking .fabs-left,.stage.picking .fabs-right,.stage.picking #btnAcq,.stage.picking .badge,.stage.picking .readout,.stage.picking .stage-top,
.stage.picking #mppChip,.stage.picking #trialBadge,.stage.picking #modeBadge,.stage.picking #cloudFab,.stage.picking .scalebar{display:none !important}
.pick-bar{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);z-index:20;background:rgba(10,20,30,.78);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.25);border-radius:16px;padding:8px 10px;display:flex;flex-direction:column;gap:6px;align-items:center;width:min(92%,420px)}
.pick-bar #pickTxt{color:#fff;font-size:.82rem;text-align:center}
.pick-btns{display:flex;gap:10px;width:100%}.pick-btns .btn{flex:1}
.cloud-fab{position:absolute;right:10px;top:8px;z-index:6;background:#f2a93b;color:#111;border:0;border-radius:16px;padding:4px 10px;font-weight:700;font-size:.8rem;box-shadow:0 2px 8px #0008}

.fab.cloud-fab{position:relative;right:auto;top:auto;background:#f2a93b !important;color:#111;font-size:1.1rem;padding:0;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1}
.fab.cloud-fab[hidden]{display:none !important}
.fab.cloud-fab b{font-size:.7rem}
.ctx-text{max-width:56%}
.fab.cloud-fab{border-radius:50% !important}

/* v0.10.0: carregamento, vistoria compartilhada e escolha de conflito */
.fab.load-fab{display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1;font-size:1.05rem}
.fab.load-fab b{font-size:.62rem;margin-top:1px}
.fab.load-fab.run{background:#6b4a0c;border-color:var(--warn);color:#ffe2ad}
.fab.load-fab.stop{background:#14432c;border-color:var(--ok);color:#c9f5dc}
.fab.load-fab.unk{opacity:.85}
.load-opts{display:grid;gap:8px;margin:8px 0}
.load-opts .btn.run{border-color:var(--warn)} .load-opts .btn.stop{border-color:var(--ok)}
.points button.conf{border-color:var(--warn)} .points button.conf .v{color:var(--warn)}
.sh-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.sh-code{font-size:1.7rem;font-weight:800;letter-spacing:.12em}
.sh-qr svg{width:116px;height:116px;border-radius:6px;display:block}
.sh-join{gap:8px;margin-top:8px} .sh-join input{flex:1;min-width:0;text-transform:uppercase;letter-spacing:.1em;font-weight:700}
.sh-grid td{vertical-align:top;cursor:pointer} .sh-grid td .pl{font-size:.7rem;color:var(--muted)} .sh-grid td small{display:block}
.sh-grid td .btn{margin-top:4px;padding:3px 8px;font-size:.72rem}
.sh-grid td.sh-done b{color:var(--ok)} .sh-grid td.sh-busy{background:#1d2e45} .sh-grid td.sh-busy b{color:#9cc8ff}
.sh-grid td.sh-conf{background:#3a2a0c} .sh-grid td.sh-conf b{color:var(--warn)}
table.conf-t{width:100%;border-collapse:collapse;font-size:.85rem;margin:6px 0}
.conf-t th,.conf-t td{padding:6px 5px;border-bottom:1px solid var(--line);text-align:center}
.conf-t th:first-child,.conf-t td:first-child{text-align:left;color:var(--muted)}
.conf-t th.sug{background:#163a28;border-radius:8px 8px 0 0}
.conf-t tr.tot td{font-weight:700;border-bottom:0}
.c-g{color:#3fd17f;font-weight:700} .c-y{color:#f0b429;font-weight:700} .c-n{color:var(--text)}
.badge-sug{display:inline-block;font-size:.66rem;background:var(--ok);color:#06210f;border-radius:6px;padding:1px 6px;margin-top:2px}
@media (prefers-color-scheme: light){.c-y{color:#a86b00}.c-g{color:#1a8a4a}}

/* v0.10.2: declinação magnética travada (NOAA WMM2025) */
input.locked{background:var(--panel2);color:var(--muted);border-style:dashed;pointer-events:none}
#declNote{display:block;margin-top:4px;line-height:1.3}
/* v0.10.3: opção única de vídeo na nuvem */
.vid-opts{display:grid;gap:6px;width:100%}
.vid-opts label.radio{display:flex;gap:8px;align-items:flex-start;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--panel2)}
.vid-opts label.radio input{margin-top:3px}
.vid-opts label.radio:has(input:checked){border-color:var(--accent)}
.vid-opts label.radio{justify-content:flex-start;text-align:left;width:100%;box-sizing:border-box}
.vid-opts label.radio input[type=radio]{width:auto;flex:0 0 auto;margin-left:0}
.vid-opts label.radio span{flex:1}

/* v0.11.0: barra esquerda — ícones em traço, só aceso / apagado; aviso rápido (0,5 s) */
.fab.lit{color:#8ea3b6;background:rgba(10,24,38,.6);border:1.5px solid rgba(160,185,210,.45);opacity:1}
.fab.lit::after{display:none!important}
.fab.lit svg{width:26px;height:26px}
.fab.lit[aria-pressed="true"]{color:#ffd166;border-color:#f2a93b;background:rgba(60,42,8,.82)!important;box-shadow:0 0 0 3px rgba(242,169,59,.25),0 0 12px rgba(255,209,102,.45)}
.fab.lit.unk{border-style:dashed}
.flash-msg{position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);z-index:9;background:rgba(0,0,0,.55);color:#fff;font-weight:700;font-size:1rem;padding:10px 16px;border-radius:12px;pointer-events:none;opacity:0;transition:opacity .12s;white-space:nowrap;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
.flash-msg.show{opacity:1}
.night-opts{display:grid;gap:8px;margin:8px 0}

/* ───────── v0.11.1: repaginação da tela Medir (sem sobreposições) ───────── */
.readbar{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;padding:6px 10px;background:var(--panel);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.readbar .readout{position:static!important;display:contents;background:none!important;padding:0;text-shadow:none}
.readbar .readout>div{min-width:0}
.readbar .readout .big{font-size:1.45rem;line-height:1.1}
.readbar .readout .right{text-align:left}
.readbar .readout .mid{font-size:1.02rem;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.readbar .lbl{font-size:.6rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.readbar .fab.go{position:static!important;height:44px;border-radius:22px;padding:0 14px;font-size:.84rem;white-space:nowrap}
body.picking .readbar{visibility:hidden}
/* selo do ICL: largura limitada e escala (mm/px) dentro dele */
.badge{max-width:52%;top:6px;right:6px}
.badge .mpp-chip{position:static!important;display:inline-block;margin-top:3px;padding:1px 6px;font-size:.66rem;border-radius:8px}
.badge .mpp-chip[hidden]{display:none}
/* topo: contexto e orientações sem invadir o selo */
.stage-top{right:calc(52% + 10px)!important;left:6px}
.stage-top .guidance{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
/* barra esquerda compacta; em telas baixas vira 2 colunas */
.fabs-left{top:auto!important;bottom:8px!important;left:6px;gap:6px!important;flex-direction:column;flex-wrap:wrap-reverse;max-height:calc(100% - 96px);align-content:flex-start}
.fabs-left .fab{width:38px;height:38px}
.fabs-left .fab.lit svg{width:22px;height:22px}
/* câmera/vídeo no canto inferior direito da imagem */
.fabs-right{top:auto!important;bottom:8px!important;right:6px;gap:6px!important}
.fabs-right .fab{width:40px;height:40px;font-size:1.05rem}
/* selos e marcas d'água no alto, centralizados (fora das colunas de botões) */
.stage.filemode::after{left:50%!important;right:auto;transform:translateX(-50%);bottom:8px!important;top:auto}
.mode-badge{bottom:auto!important;top:auto;left:50%;transform:translateX(-50%);bottom:30px!important}
.trial-badge{left:50%!important;transform:translateX(-50%);bottom:52px!important}
.flash-msg{top:40%}
@media (max-height:720px){.readbar .readout .big{font-size:1.2rem}.readbar .fab.go{height:40px;font-size:.78rem}.badge{font-size:.9em}}
/* formulários de cadastro agrupados */
.form .fgroup{grid-column:1/-1;font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--accent);border-bottom:1px solid var(--line);padding:8px 0 2px;margin-top:4px}
.form .full{grid-column:1/-1}
.form .inline-btn{display:flex;align-items:flex-end}
/* v0.11.1 (ajuste): barra esquerda em grade — 1 coluna em telas altas, 2 colunas de 3 em telas baixas */
.fabs-left{display:grid!important;grid-auto-flow:column;grid-template-rows:repeat(7,auto);gap:6px!important;max-height:none}
.fabs-left .fab.cloud-fab[hidden]{display:none!important}
@media (max-height:780px){.fabs-left{grid-template-rows:repeat(3,auto);grid-auto-columns:38px}}
.badge{max-width:46%}
.stage-top{right:calc(46% + 8px)!important}
.stage-top .ctx-t{font-size:.76rem}
.readbar .readout .mid{font-size:.98rem}.readbar .readout .mid .u{font-size:.85em}.readbar .readout .mid .k{font-size:.62em;color:var(--muted)}
.form.grid2>label:not(.check){display:flex;flex-direction:column;justify-content:flex-end}
.stage.scale-open .fabs-left,.stage.scale-open .fabs-right{visibility:hidden}
/* ───────── v0.11.2: cabeçalho, faixa de leitura, barra única e rótulo do instantâneo ───────── */
.brand2{justify-content:space-between;align-items:center}
.brand2 .ttl{display:flex;flex-direction:column;line-height:1.1;min-width:0}
.brand2 .ttl strong{font-size:1.02rem;letter-spacing:-.2px;white-space:nowrap}
.brand2 .ttl small{font-size:.62rem;color:var(--muted);white-space:nowrap}
.brand2 .ttl small .ver{font-size:inherit;color:inherit;margin:0;padding:0;background:none}
.hchips{display:flex;align-items:center;gap:6px;flex:none}
.test-chip{background:#9b7cf2;color:#fff;font-size:.58rem;font-weight:800;padding:2px 7px;border-radius:6px;white-space:nowrap}
.test-chip[hidden]{display:none}
#modeSeg{margin-top:4px}#modeSeg button{padding:3px 4px;font-size:.74rem}
#modeSeg{grid-template-columns:1fr 1.6fr}
.stage.filemode::after{content:none!important;display:none!important}
/* faixa: onda (Hs, período) · representativo · botão */
.readbar{grid-template-columns:auto minmax(0,1fr) auto!important}
.readbar .readout{display:contents}
.wavebox,.repbox{display:flex;align-items:center;gap:6px;min-width:0}
.wavebox{border-right:1px solid var(--line);padding-right:8px}
.wavebox .ic{width:22px;height:26px;color:#8fb4d6;flex:none}
.repbox .ic{width:22px;height:22px;color:#8fb4d6;flex:none}
.wv{display:flex;flex-direction:column;font-size:.7rem;line-height:1.25}.wv small{color:var(--muted)}.wv b{font-size:.78rem}
.rv{min-width:0;overflow:hidden}
.rv .lbl{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.readbar .readout .rv .mid{font:800 1.25rem ui-monospace,monospace;letter-spacing:-.3px;white-space:nowrap;line-height:1.15}
.readbar .readout .rv .mid .u{font-size:.68em;color:#cfe}
.kline{font-size:.6rem;color:var(--muted);white-space:nowrap}
@media (max-width:380px){.readbar .readout .rv .mid{font-size:1.05rem}.readbar .fab.go{padding:0 10px;font-size:.74rem}.wv{font-size:.64rem}.wavebox .ic,.repbox .ic{width:18px}}
/* barra esquerda: sempre uma coluna */
.fabs-left{display:flex!important;flex-direction:column!important;grid-template-rows:none!important;flex-wrap:nowrap!important}
@media (max-height:780px){.fabs-left .fab{width:34px!important;height:34px!important}.fabs-left .fab.lit svg{width:20px;height:20px}.fabs-left{gap:5px!important}}
/* ícone de upload */
.fab svg.up{width:22px;height:22px}.upbtn{display:inline-flex;align-items:center;gap:6px}.upbtn svg.up{width:18px;height:18px}
/* tela inicial: texto curto e fora dos ícones */
.start-cover{padding:20px 56px!important}

/* ═════════ v0.12.0 — vidro (sem cobrir o vídeo), toque, Modo Sol e configurações estilo iOS ═════════ */
body{background:radial-gradient(120% 60% at 50% 0%,#12304a 0%,var(--bg) 60%) fixed,var(--bg)}
header.top,.readbar,.tabs{background:rgba(16,34,52,.55)!important;-webkit-backdrop-filter:blur(20px) saturate(160%);backdrop-filter:blur(20px) saturate(160%);border-color:rgba(255,255,255,.08)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.06)}
header.top{position:relative;z-index:8}
.tabs{border-top:1px solid rgba(255,255,255,.10)!important}
/* toque: micro-animação de pressão */
.fab,#btnAcq,.btn,.tabs button,.seg button,.sun-chip,.lang,.adv-go,.seg-ios button{transition:transform .12s ease,filter .12s ease;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.fab:active,#btnAcq:active,.btn:active,.tabs button:active,.seg button:active,.sun-chip:active,.lang:active,.adv-go:active,.seg-ios button:active{transform:scale(.92);filter:brightness(1.15)}
/* área de toque para o polegar (coluna única) */
.fabs-left .fab{width:42px;height:42px}
.fabs-right .fab{width:46px;height:46px}
#btnAcq{min-height:44px;min-width:92px}
@media (max-height:780px){.fabs-left .fab{width:36px!important;height:36px!important}.fabs-right .fab{width:42px;height:42px}}
/* ☀ Modo Sol — só exibição */
.sun-chip{flex:none;display:inline-flex;align-items:center;justify-content:center;width:28px;height:24px;border-radius:8px;border:1px solid var(--line);background:var(--panel2);color:var(--muted);padding:0}
.sun-chip.on{background:#ffd34d;color:#111;border-color:#ffd34d;box-shadow:0 0 10px #ffd34d88}
body.solar #video{filter:contrast(1.45) brightness(1.05) saturate(.85)}
body.solar .readbar,body.solar header.top,body.solar .tabs{background:rgba(0,0,0,.82)!important}
body.solar .readbar #repDraft,body.solar .readbar #bandHs{color:#fff;text-shadow:0 0 1px #000}
body.solar .fab{box-shadow:0 0 0 2px #fff8,0 2px 8px #000c}
/* ☁︎ fila local: leituras + arquivos; sem sinal */
.fab.cloud-fab .cf-files{font-style:normal;font-size:.55rem;font-weight:700;line-height:1}
.fab.cloud-fab.offline{background:#8a96a3!important;color:#111}
.fab.cloud-fab.offline::after{content:"";position:absolute;right:-2px;top:-2px;width:11px;height:11px;border-radius:50%;background:#ef4d4d;border:2px solid var(--bg)}
/* configurações estilo iOS */
#view-cfg .card.grp,#view-adv .card.grp{border-radius:16px;border:1px solid rgba(255,255,255,.07);background:rgba(19,38,58,.75)}
#view-cfg .card.grp h3,#view-adv .card.grp h3{font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:700}
#view-cfg .item+.item{border-top:1px solid rgba(255,255,255,.06)}
.adv-cta{padding:0!important;overflow:hidden;border:1px solid #2f8cff66!important;background:linear-gradient(135deg,#173a5e,#122c46)!important}
.adv-go{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:12px;width:100%;padding:14px 14px;cursor:pointer;color:var(--text)}
.adv-go .adv-ic{font-size:1.6rem;width:44px;height:44px;border-radius:12px;background:#2f8cff33;display:flex;align-items:center;justify-content:center;flex:none}
.adv-go .adv-tx{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.adv-go .adv-tx b{font-size:1rem}.adv-go .adv-tx small{font-size:.72rem;color:var(--muted)}.adv-go .adv-tx small.wrn{color:#f2a93b}
.adv-go .adv-chev{font-size:1.6rem;color:var(--muted);flex:none}
.seg-ios{display:inline-flex;background:#0006;border-radius:9px;padding:2px;gap:2px}
.seg-ios button{border:0;background:none;color:var(--muted);padding:5px 10px;border-radius:7px;font-size:.8rem;font-weight:600}
.seg-ios button.on{background:var(--panel2);color:var(--text);box-shadow:0 1px 3px #0008}
.ios-switch{position:relative;display:inline-block;width:46px;height:28px;flex:none}
.ios-switch input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer;z-index:1}
.ios-switch i{position:absolute;inset:0;border-radius:14px;background:#3a4b5d;transition:background .18s}
.ios-switch i::after{content:"";position:absolute;left:2px;top:2px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0006;transition:transform .18s}
.ios-switch input:checked+i{background:#34c759}.ios-switch input:checked+i::after{transform:translateX(18px)}
.sys-card .ios-row{display:flex;justify-content:space-between;align-items:center;padding:10px 2px;color:var(--text);text-decoration:none;border-bottom:1px solid rgba(255,255,255,.06);margin-bottom:8px}
.sys-card .ios-row::after{content:"›";color:var(--muted);font-size:1.3rem}

/* ═════════ v0.12.1 — letras maiores, botões da coluna esquerda padronizados (referência: meteorologia), tela cheia no iPhone ═════════ */
html, body { font-size: 16px; }
/* App da Tela de Início no iOS 26.1+: falha conhecida do WebKit (bug 301994) — barra de status fosca sobre o topo e faixa
   desenhada pelo sistema embaixo, com a cor do fundo da página. Barra de status "black" (o conteúdo começa abaixo dela) e
   fundo do <html> igual ao das abas, para a faixa de baixo parecer continuação da barra de abas. */
html { background: #0e1d2d; }
.small { font-size: .84rem; }
.tabs button span { font-size: .74rem; } .tabs button b { font-size: 1.15rem; }
.points button { font-size: .78rem; }
.wv { font-size: .8rem !important; } .wv b { font-size: .9rem !important; }
.rv .lbl { font-size: .78rem; }
.readbar .readout .rv .mid { font-size: 1.2rem; }
.ctx, .brand2 .ttl small { font-size: .78rem; }
.seg button { font-size: .9rem; }
@media (max-width:380px){ .readbar .readout .rv .mid{font-size:1.15rem} .wv{font-size:.72rem!important} .points button{font-size:.72rem} }
/* coluna esquerda: mesmo contorno, cor e fundo quando apagados; aceso = padrão da meteorologia */
.fabs-left .fab.lit, .fabs-left .fab.lit[aria-pressed="false"], .fabs-left .fab.lit.unk {
  opacity: 1 !important; color: #a9bfd3 !important; background: rgba(10,24,38,.62) !important;
  border: 1.5px solid rgba(160,185,210,.5) !important; border-style: solid !important; box-shadow: none !important; }
.fabs-left .fab.lit[aria-pressed="true"] {
  color: #ffd166 !important; border: 1.5px solid #f2a93b !important; background: rgba(60,42,8,.82) !important;
  box-shadow: 0 0 0 3px rgba(242,169,59,.25), 0 0 12px rgba(255,209,102,.45) !important; }
.fabs-left .fab.lit::after { display: none !important; }
/* carregamento não informado: pequeno “?” no canto, sem mudar o contorno */
.fabs-left .fab.lit.unk::before { content: "?"; position: absolute; right: -3px; top: -3px; width: 15px; height: 15px; border-radius: 50%; background: #3a4b5d; color: #e8f0f7; font: 700 10px/15px -apple-system, sans-serif; text-align: center; }
#udMenu{display:flex;flex-direction:column;gap:8px;padding:0;margin:12px 0 0}#udMenu .btn{width:100%;margin:0}
#udSel{width:100%;font-size:1rem;padding:8px;margin-top:4px}
/* v0.12.1: com letras maiores, o “7,852m ±2,3cm” precisa caber inteiro — em telas estreitas some o ícone das marcas e o Adquirir encolhe */
@media (max-width:420px){ .repbox .ic{display:none} #btnAcq{min-width:80px} .readbar .fab.go{padding:0 12px} .readbar{gap:6px;padding:6px 8px} .wavebox{padding-right:6px} }

/* v0.12.2: validação do método — Bland–Altman e rejeição por condição */
.val-box{margin:8px 0}.val-opts{align-items:center;gap:10px;margin:6px 0}.val-opts select{background:var(--panel2);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:5px;font-size:.82rem}
.ba-svg{width:100%;height:auto;display:block;background:#0a1a29;border-radius:10px;margin:6px 0}
.ba-grid{stroke:#ffffff14;stroke-width:1}.ba-zero{stroke:#8fa6bb;stroke-width:1;stroke-dasharray:2 3}
.ba-tick{fill:#8fa6bb;font:10px ui-monospace,monospace}.ba-axis{fill:#a9bfd3;font:10.5px -apple-system,sans-serif}.ba-lab{fill:#e8f0f7;font:600 10px ui-monospace,monospace;paint-order:stroke;stroke:#0a1a29;stroke-width:3px}
.ba-bias{stroke:#2f8cff;stroke-width:2}.ba-loa{stroke:#f2a93b;stroke-width:1.5;stroke-dasharray:6 4}
.ba-cib{fill:#2f8cff26}.ba-ci{fill:#f2a93b1f}
.ba-pt{stroke-width:2}.ba-pt.ok{fill:#2fbf71;stroke:#2fbf71}.ba-pt.no{fill:#f2a93b;stroke:#f2a93b}.ba-pt.vid{fill:transparent}
.ba-tab td:last-child{text-align:right}.tscroll{overflow-x:auto}.rej-tab th{font-size:.72rem;vertical-align:bottom}.rej-tab td.mono{text-align:right}
.rej-tab .grp-row td{color:var(--muted);font-weight:700;text-transform:uppercase;font-size:.7rem;letter-spacing:.03em;padding-top:8px}
.rej-tab th,.rej-tab td{padding:4px 4px;white-space:nowrap}.rej-tab th{white-space:normal;min-width:2.6em}

/* v0.12.5 — guia de zoom/distância (alvo de mm/px) */
.zg { position: relative; border-radius: 10px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.22); overflow: hidden; pointer-events: none; }
.zg[hidden] { display: none; }
.zg-fill { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: #ffbe46; transition: width .25s; }
.zg.ok .zg-fill { background: #50dc96; } .zg.fov .zg-fill { background: #ff5a5a; }
.zg-txt { position: relative; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding: 3px 8px 7px; font: 700 .68rem/1.25 ui-monospace, monospace; color: #fff; text-shadow: 0 1px 2px #000; }
body.solar .zg { background: rgba(0,0,0,.9); border-color: #fff; }

/* v0.12.8/9 — botões redondos empilhados à direita (mesmo padrão dos botões da esquerda); deslizar para ocultar */
.fabs-right { align-items: flex-end; }
.viewstack { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; margin-bottom: 4px; transition: transform .22s ease, opacity .22s ease; touch-action: pan-y; }
.viewstack.side-hidden { transform: translateX(70px); opacity: 0; pointer-events: none; }
.viewstack .fab { width: 38px !important; height: 38px !important; }
.viewstack .fab.lit svg { width: 22px; height: 22px; }
.vs-grip { width: 38px; height: 16px; border: 0; border-radius: 8px; background: rgba(10,24,38,.55); color: #9fb3c8; font: 800 .8rem/1 -apple-system, sans-serif; padding: 0; }
.vs-handle { position: absolute; right: 0; bottom: 150px; z-index: 4; width: 20px; height: 54px; border: 0; border-radius: 10px 0 0 10px; background: rgba(10,24,38,.62); color: #ffd166; font: 800 1rem/1 -apple-system, sans-serif; padding: 0; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); touch-action: pan-y; }
.vs-handle[hidden] { display: none; }
.zg { pointer-events: auto; cursor: pointer; }
.zg-txt { white-space: pre-line; -webkit-line-clamp: 6; }

/* v0.13.0 — alças centrais nas duas colunas, carregamento de vídeo, ICL oculto, pontos maiores, topo */
.vs-handle { top: 50%; bottom: auto; transform: translateY(-50%); display: block !important; z-index: 6; width: 20px; height: 56px; opacity: .85; }
.vs-handle[hidden] { display: block !important; }
.vs-handle.vs-r { right: 54px; left: auto; border-radius: 10px 0 0 10px; color: #9fb3c8; transition: none; }
.vs-handle.vs-r.is-hidden { right: 0; color: #ffd166; }
.vs-handle.vs-l { left: 50px; right: auto; border-radius: 0 10px 10px 0; background: rgba(10,24,38,.62); color: #9fb3c8; border: 0; padding: 0; position: absolute; font: 800 1rem/1 -apple-system, sans-serif; transition: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.vs-handle.vs-l.is-hidden { left: 0; color: #ffd166; }
.fabs-left { transition: transform .22s ease, opacity .22s ease; }
.fabs-left.side-hidden-l { transform: translateX(-70px); opacity: 0; pointer-events: none; }
.vid-loading { position: absolute; inset: 0; z-index: 12; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(6,14,24,.72); color: #fff; font-weight: 700; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.vid-loading[hidden] { display: none; }
.vid-loading i { width: 54px; height: 54px; border-radius: 50%; border: 5px solid rgba(255,255,255,.22); border-top-color: #ffd166; animation: vidspin .9s linear infinite; }
@keyframes vidspin { to { transform: rotate(360deg); } }
.badge.icl-off { display: none !important; }
.points button .v { font-size: 1rem; font-weight: 800; margin-top: 1px; }
.points button.NM .v { color: #7f8fa0; font-weight: 600; }
.points button.MANUAL .v { color: #6cb4ff; }
.st.MANUAL { color: #6cb4ff; }
header.top { padding-top: 10px; }
#chipPier { font-size: 1.12rem; font-weight: 800; line-height: 1.2; }
#chipVessel { font-size: .95rem; }

/* v0.14.0 — cabeçalho com píer/navio, Ajustar valores arrastável, anotação manual */
.ctxrow { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); gap: 6px; margin-top: 5px; align-items: stretch; }
.ctxrow .ctx-t { background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 9px; padding: 5px 9px; color: #fff; text-align: left; text-shadow: none; overflow: hidden; text-overflow: clip; white-space: nowrap; font-weight: 700; }
.ctxrow #chipPier { font-weight: 800; } .ctxrow #chipVessel { font-weight: 800; }
.ctxrow .ctx-t.empty { color: #ffd38e; font-weight: 600; } .ctxrow .chip { grid-column: 1 / -1; }
.sb-drag { cursor: grab; touch-action: none; user-select: none; } .sb-short { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; }
#resManualRow { margin: 6px 0; } #resManualRow input:disabled + span { opacity: .85; }
#noteDialog select, #noteDialog input { width: 100%; margin: 4px 0 8px; } #noteDialog .row { display: flex; gap: 8px; justify-content: flex-end; }
#btnFocus.lit { color: #ffd166; border-color: #f2a93b; }
.points button .pen { font-style: normal; font-size: .66rem; margin-right: 2px; vertical-align: 1px; }

/* v0.15.0 — avançadas por categoria, acesso por perfil, administração */
.adv-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; position: sticky; top: 0; z-index: 3; padding: 6px 0; background: var(--bg); }
.adv-nav .chip { font-size: .78rem; padding: 5px 10px; }
h2.adv-cat { font-size: 1.05rem; margin: 18px 0 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.adv-help { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); font-size: .75rem; text-decoration: none; margin-left: 6px; vertical-align: middle; }
.adv-go.adv-locked { filter: grayscale(1); opacity: .55; }
.adm-out { margin: 8px 0; overflow-x: auto; } .adm-t { width: 100%; border-collapse: collapse; font-size: .8rem; } .adm-t th, .adm-t td { border-bottom: 1px solid var(--line); padding: 4px 6px; text-align: left; }
#admEmail { flex: 1; min-width: 0; }

/* v0.14.1 — barras translúcidas atrás das colunas de botões; aviso como pop-up na validação */
.viewstack { position: relative; }
.fabs-left::before, .viewstack::before { content: ''; position: absolute; z-index: -1; inset: -5px -4px; border-radius: 22px; background: rgba(8,20,32,.16); border: 1px solid rgba(255,255,255,.06); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); pointer-events: none; }
.fabs-left { isolation: isolate; } .viewstack { isolation: isolate; }
#resOffer { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(4,10,18,.62); margin: 0; border: 0; border-radius: 0; }
#resOffer[hidden] { display: none; }
.offer-card { background: #2a1f12; border: 2px solid var(--warn); border-radius: 14px; padding: 14px; width: min(100%, 420px); box-shadow: 0 12px 40px #000a; font-size: .9rem; }
.offer-act { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.offer-act .btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px; font-weight: 700; } .offer-act .btn small { font-weight: 400; opacity: .8; font-size: .72rem; }
.offer-act .warnbtn { background: var(--warn); color: #222; border-color: var(--warn); }
.opbox menu { margin-top: 12px; }

/* v0.16.0 — mensagem de botão embaixo, alças coladas nas barras, pontos em 3×2 conforme o bordo atracado */
.flash-msg { top: auto !important; bottom: 64px; transform: translateX(-50%) !important; }
.points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.points button { padding: 4px 2px; }
.vs-handle { width: 18px; height: 52px; background: rgba(8,20,32,.16) !important; border: 1px solid rgba(255,255,255,.06) !important; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); color: #cfe0ee; transition: none; }
.vs-handle.vs-r { border-radius: 14px 0 0 14px; border-right: 0 !important; } .vs-handle.vs-l { border-radius: 0 14px 14px 0; border-left: 0 !important; }
.vs-handle.is-hidden { background: rgba(8,20,32,.5) !important; }

/* ───────── v0.17.0: botões ajustados à altura; barra dos 6 pontos compacta (linha única por ponto) ───────── */
.stage .fabs-left .fab { width: var(--fab-l, 36px) !important; height: var(--fab-l, 36px) !important; }
.stage .fabs-right .fab:not(.go), .stage .viewstack .fab { width: var(--fab-r, 38px) !important; height: var(--fab-r, 38px) !important; }
.stage .fabs-left .fab.lit svg { width: calc(var(--fab-l, 36px) * .6); height: calc(var(--fab-l, 36px) * .6); }
.stage .viewstack .fab.lit svg { width: calc(var(--fab-r, 38px) * .6); height: calc(var(--fab-r, 38px) * .6); }
.stage .fabs-right .fab svg.up { width: calc(var(--fab-r, 38px) * .55); height: calc(var(--fab-r, 38px) * .55); }
.stage .fabs-left, .stage .fabs-right { max-height: calc(100% - 12px); }
.points { gap: 3px; margin-top: 4px; }
.points button { display: flex; align-items: baseline; justify-content: center; gap: 5px; padding: 4px 2px; white-space: nowrap; }
.points button .v { display: inline; font-size: .78rem; }
.stage .badge { right: calc(var(--fab-r, 38px) + 14px) !important; max-width: calc(46% - var(--fab-r, 38px) + 12px) !important; }
.pt-menu { min-width: min(86vw, 340px); } .pt-menu h3 { margin: 0 0 2px; } .pt-menu .offer-act .btn { display: flex; flex-direction: column; align-items: center; }
#ptMenu { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.ctxrow { display: block; }
.ctxrow .ctxbox { display: flex; align-items: center; gap: .7em; width: 100%; box-sizing: border-box; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 9px; padding: 5px 9px; overflow: hidden; white-space: nowrap; font-size: 15px; font-weight: 800; }
.ctxrow .ctxbox .ctx-t { flex: 0 0 auto; background: none; border: 0; padding: 0; font: inherit; color: #fff; overflow: visible; white-space: nowrap; }
.ctxrow .ctxbox .ctx-t.empty { color: #ffd38e; font-weight: 600; }
.ctxrow #chipPier, .ctxrow #chipVessel { font-size: inherit !important; }
/* v0.17.0: barra do vídeo — só tempo decorrido/total; play e voltar maiores */
.filebar #seek { display: none; }
.filebar .vb { min-width: 48px; height: 44px; font-size: 1.5rem; line-height: 1; padding: 0 12px; }
.filebar #fileTime { white-space: nowrap; flex: 1 1 auto; text-align: center; font-size: .95rem; }
.filebar { gap: 8px; }
.filebar .vb { min-width: 42px; width: 42px; height: 40px; padding: 0; font-size: 1.35rem; }
.filebar #fileTime { font-size: .82rem; min-width: 0; }
.filebar select { flex: 0 1 auto; min-width: 0; max-width: 30%; font-size: 12px; }
.filebar .btn.sm { padding: 6px 8px; }
.calfull h3 { margin: 14px 0 4px; font-size: .95rem; } .calt { width: 100%; border-collapse: collapse; font-size: .82rem; } .calt td { border-top: 1px solid var(--line); padding: 5px 4px; vertical-align: top; } .calt td:last-child { color: var(--accent); }
#calGuideDlg { max-height: 88dvh; overflow: auto; } #calGuideDlg .calguide { display: grid; gap: 8px; } #calGuideDlg .calguide figure { margin: 0; background: rgba(127,127,127,.08); border-radius: 10px; padding: 8px; } #calGuideDlg .calguide img { width: 100%; height: auto; border-radius: 8px; } #calGuideDlg figcaption { font-size: .82rem; margin-top: 5px; }
/* v0.17.1: guia de zoom sem cortar o texto; a coluna esquerda começa abaixo dele */
.stage-top .zg-txt { display: block !important; -webkit-line-clamp: unset !important; overflow: visible !important; font-size: .64rem; padding: 4px 8px 9px; }
.stage.zg-compact .stage-top .zg-txt { display: -webkit-box !important; -webkit-line-clamp: 3 !important; overflow: hidden !important; }
.stage.zg-compact .stage-top .guidance { -webkit-line-clamp: 2; }

/* ───────── v0.17.2 ───────── */
#preDlg { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 14px; max-width: min(92vw, 380px); }
#preDlg ul { margin: 6px 0; padding-left: 18px; } #preDlg li { margin: 3px 0; font-size: .9rem; } #preDlg menu { display: flex; flex-direction: column; gap: 8px; padding: 0; margin: 12px 0 0; }
/* leitura manual em violeta (verde = aceita, âmbar = prolongar/reposicionar, vermelho = rejeitada) */
.points button.MANUAL .v, .st.MANUAL { color: #b388ff !important; }
/* barra do vídeo: seletor de visada em linha própria; o tempo final deixa de ficar sob ele */
.filebar { flex-wrap: wrap; row-gap: 4px; }
.filebar select#selPitch { order: 10; flex: 1 1 100%; max-width: 100%; width: 100%; }
/* seis calados do topo: ocupam toda a largura, com 12 px de folga das bordas */
.points { margin-left: 2px !important; margin-right: 2px !important; gap: 6px !important; }   /* .top já tem 10 px de padding → 12 px da borda */
.points button { padding: 8px 2px !important; font-size: var(--pt-fs, 1rem) !important; border-radius: 10px; }
.points button .v { font-size: 1em !important; font-weight: 800; }   /* v0.17.3: rótulo e valor na mesma letra; tamanho único calculado em fitPoints() */

/* ───────── v0.17.3: caixa de orientações com altura fixa ───────── */
.stage-top .guidance { display: block !important; -webkit-line-clamp: unset !important; position: relative; box-sizing: content-box; height: 2.6em; line-height: 1.3; overflow-y: auto; overflow-x: hidden; pointer-events: auto; touch-action: pan-y; cursor: pointer; scrollbar-width: none; border-radius: 8px; padding: 0 2px; }
.stage-top .guidance::-webkit-scrollbar { display: none; }
.stage-top .guidance.empty { display: none !important; }
.stage-top .guidance.open { height: 7.8em; margin-bottom: -5.2em; background: rgba(0,0,0,.6); padding: 3px 6px; box-sizing: border-box; z-index: 9; }
.stage.g-open .stage-top { z-index: 9; }
.stage-top .guidance.more { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - .45em), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - .45em), transparent); }

/* v0.17.3: no app da Tela de Início do iPhone o sistema esmaece o conteúdo colado na borda superior (título "Leitor de Calado" ficava translúcido) → folga extra acima do cabeçalho */
html.standalone .top { padding-top: calc(6px + var(--edge-t, 18px)); }

/* v0.17.3: base — o corpo ocupa a altura REAL da janela (no app da Tela de Início do iPhone 100dvh podia ficar menor e deixar uma faixa vazia sob as abas) */
html.standalone body { position: fixed; top: 0; left: 0; right: 0; bottom: 0; height: auto; }
html.standalone { background: #08121d; }
.tabs { padding-bottom: max(var(--safe-b), 0px); }

/* v0.17.4: histórico da caixa de orientações (itens que sumiram ficam esmaecidos) */
.stage-top .guidance .gold { color: #9fb3c8; font-weight: 500; opacity: .85; } .stage-top .guidance .gold small { opacity: .8; }
/* v0.17.4: caixa de progresso da aquisição com altura FIXA (2 linhas de texto + 2 de detalhe) — o palco e os botões laterais deixam de mudar de tamanho */
.acq-prog { height: calc(8px + 2 * 1.3 * .78rem + 2 * 1.3 * .66rem + 10px + 2px + 12px) !important; overflow: hidden; justify-content: flex-start !important; }
.acq-prog .ap-txt, .acq-prog .ap-det { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.acq-prog .ap-txt { -webkit-line-clamp: 2; min-height: calc(2 * 1.3 * .78rem); } .acq-prog .ap-det { -webkit-line-clamp: 2; min-height: calc(2 * 1.3 * .66rem); }

/* v0.17.4: modos de altura no iPhone instalado (ver applyScreenFit) + abas um pouco mais baixas (o iOS esmaece só a faixa do indicador de início) */
html.standalone.fit-lvh body { position: fixed; top: 0; left: 0; right: 0; bottom: auto; height: 100lvh; }
html.standalone.fit-px body { position: fixed; top: 0; left: 0; right: 0; bottom: auto; height: var(--app-h); }
html.standalone.fit-lvh .tabs, html.standalone.fit-px .tabs { padding-bottom: max(calc(var(--safe-b) - 12px), 4px); }
#fitDlg { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 14px; max-width: min(92vw, 380px); } #fitDlg menu { display: flex; gap: 8px; padding: 0; margin: 12px 0 0; }

/* v0.17.7 — aproveitamento da altura no iPhone instalado (medido com a régua da v0.17.6: janela 812 de 874 pt; esmaecimento do sistema até ~66 pt no topo; sem esmaecimento embaixo) */
html.standalone { --edge-t: 8px; }
html.standalone.win-short .tabs { padding-bottom: 6px; }

/* ───────── v0.17.8 ───────── */
/* topo: o sistema esmaece até ~86 pt (título a 79 pt ficava esmaecido em 1/3) → folga de volta a 18 px; título e versão na mesma linha (ganha uma linha) */
html.standalone { --edge-t: 18px; }
.brand2 .ttl { flex-direction: row !important; align-items: baseline; gap: 6px; flex: 1 1 auto; overflow: hidden; }
.brand2 .ttl strong { flex: none; }
.brand2 .ttl small { font-size: .6rem !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* mensagens em primeiro plano */
.toast { z-index: 2000; max-width: min(92vw, 420px); }
/* botão da visada junto de Limpar: ícone em cima, valor embaixo */
.tools.has-pitch { grid-template-columns: repeat(5, 1fr); }
.tools .pitch-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px 0 !important; overflow: hidden; }
.tools .pitch-btn[hidden] { display: none !important; }
.tools .pitch-btn .pi { font-size: 1.1rem; line-height: 1; pointer-events: none; margin-top: 3px; }
.tools .pitch-btn select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; color: inherit; font: inherit; font-size: .72rem; font-weight: 700; text-align: center; text-align-last: center; padding: 0; width: 100%; max-width: 100%; position: absolute; inset: 0; padding-top: 22px; }
.tools .btn { font-size: .8rem; }

/* v0.17.10 — botões de Referências uniformes (ícone em cima, texto embaixo), reprodução, ícones das abas */
.tools .rb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px 2px !important; min-height: 46px; position: relative; overflow: hidden; line-height: 1.05; }
.tools .rb .ri { font-style: normal; font-size: 1.15rem; line-height: 1; display: block; pointer-events: none; }
.tools .rb > span { font-size: .72rem; font-weight: 600; line-height: 1.05; }
.tools .pitch-btn select { padding-top: 0; inset: auto 0 0 0; height: 1.5em; bottom: 4px; font-size: .72rem; }
.tools .pitch-btn .pi { margin-top: 0; }
.tabs button .ti { width: 24px; height: 24px; display: block; flex: none; }
.filebar .vb, .filebar .btn.sm { min-width: 44px; width: auto; height: 40px; padding: 0 12px; font-size: 1.1rem; font-weight: 600; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.filebar .vb { width: 44px; padding: 0; }

.filebar .vb.sp { width: auto; min-width: 52px; padding: 0 10px; font-size: 1rem; }

/* v0.17.10 — casco na tela dos 6 pontos (vista de cima; cais embaixo) */
.hull { position: relative; width: 100%; aspect-ratio: 2 / 1; min-height: 210px; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.hull-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hull-svg path { fill: rgba(125,200,255,.07); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.hull-svg .cl { stroke: var(--line); stroke-dasharray: 4 5; fill: none; stroke-width: 1; }
.hull[data-side=BB] .hgrid { inset: 15% 6% 15% 38%; } .hull[data-side=BE] .hgrid { inset: 15% 38% 15% 6%; } .hull[data-side=BB] .hull-svg { transform: scaleX(-1); }
.hgrid { position: absolute; inset: 15% 15% 15% 7%; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; gap: 8px; pointer-events: none; }
.hgrid > * { pointer-events: auto; }
.hc .nm { font-style: normal; font-size: .62rem; color: var(--accent); font-weight: 700; letter-spacing: .03em; }
.hc { border: 1px solid var(--line); border-radius: 8px; background: var(--bg2, #0e1c2c); text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 3px 2px; min-height: 0; cursor: pointer; }
.hc b { display: block; font-variant-numeric: tabular-nums; font-size: .9rem; } .hc small { color: var(--muted); font-size: .62rem; line-height: 1.15; }
.hc.sel { outline: 2px solid var(--accent); }
.hl { position: absolute; font-size: .66rem; color: var(--muted); letter-spacing: .06em; pointer-events: none; }
.hl-t { top: 2px; left: 50%; transform: translateX(-50%); } .hl-b { bottom: 2px; left: 50%; transform: translateX(-50%); }
.hull-hint { margin: 4px 0 0; text-align: center; }
.tools .pitch-btn { justify-content: flex-start; padding-top: 4px !important; }
.tools .pitch-btn select { position: absolute; inset: 26px 0 2px 0; height: auto; bottom: 2px; padding: 0; width: 100%; line-height: 1.1; font-size: .72rem; }

/* v0.17.9 — referência visual dos 6 pontos */
#refCard h4 { margin: 14px 0 2px; font-size: .95rem; } .rf-now { margin: 0 0 6px; }
.rf-grid { display: grid; grid-template-columns: 3.6em repeat(3, 1fr); gap: 5px; align-items: stretch; }
.rf-l { font-size: .62rem; color: var(--muted); display: flex; align-items: center; line-height: 1.1; }
.rf-c { border: 1px solid var(--line); border-radius: 8px; padding: 2px 2px 4px; text-align: center; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.rf-c b { font-size: .64rem; color: var(--lc); } .rf-c small { font-size: .55rem; color: var(--muted); line-height: 1.1; }
.rf-c.on { outline: 2px solid var(--lc); background: color-mix(in srgb, var(--lc) 14%, transparent); }
.rf-blank { border: 0; } .rf-svg { width: 100%; height: auto; display: block; }

/* v0.17.10 — rótulo "Manual" em amarelo (sem o símbolo da mão); texto de inversão de bordo menor */
.hc small .mlab, .st.MANUAL { color: #ffd24a !important; font-style: normal; font-weight: 700; }
.hull-hint { font-size: .62rem; margin-top: 2px; } #sideTxt { font-size: .74rem; line-height: 1.3; } #sideTitle { font-size: 1rem; }

/* v0.17.13 — guia de zoom mais estreito, com quebra de linha e sem corte da última linha */
.stage-top .zg { align-self: flex-start; width: max-content; max-width: min(100%, 10.5rem); }
.stage-top .zg-txt, .stage.zg-compact .stage-top .zg-txt { display: block !important; -webkit-line-clamp: unset !important; overflow: visible !important; white-space: pre-line; overflow-wrap: anywhere; font-size: .62rem; line-height: 1.25; padding: 4px 8px 10px; }

/* ───────── v0.17.14: ícones minimalistas no lugar de emojis; barras laterais em colunas (sem encolher); ícone acima do texto ───────── */
/* (tamanho base de .ei e cores dos pontos: injetados por js/icons.js) */
.fab > .ei { width: 52%; height: 52%; vertical-align: 0; }
.tools .rb .ri .ei { width: 1.35rem; height: 1.35rem; vertical-align: baseline; }
.ctxrow .ctx-t .ei, .ctxrow .chip .ei { width: 1.15em; height: 1.15em; vertical-align: -.24em; margin-right: .3em; }
h2 .ei, h3 .ei { width: 1.05em; height: 1.05em; margin-right: .2em; }
.toast .ei, .flash-msg .ei { vertical-align: -.22em; }
/* barras laterais: tamanho fixo; se a altura não comporta, duas colunas (esquerda cresce p/ a direita; direita, p/ a esquerda) */
.stage .fabs-left { display: flex !important; flex-direction: column !important; flex-wrap: wrap !important; align-content: flex-start; align-items: flex-start; gap: var(--fab-gap-l, 6px) !important; column-gap: 6px !important; max-height: calc(100% - 12px); }
.stage .viewstack { display: flex; flex-direction: column; flex-wrap: wrap-reverse; align-content: flex-end; align-items: flex-end; gap: var(--fab-gap-r, 6px); max-height: calc(100% - 12px); flex: none; }
.stage .fabs-right { gap: var(--fab-gap-r, 6px) !important; }
.stage .viewstack[data-cols="2"], .stage .viewstack[data-cols="3"] { column-gap: 6px; row-gap: 6px; }
.stage .fabs-left .fab, .stage .viewstack .fab { flex: none; }
.stage .badge { right: calc(var(--fab-rw, var(--fab-r, 44px)) + 14px) !important; max-width: calc(46% - var(--fab-rw, var(--fab-r, 44px)) + 12px) !important; }
/* ícone centralizado e texto abaixo, onde o espaço permite (grupos de botões com rótulo) */
.row.stk { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.row.stk > .btn { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; text-align: center; line-height: 1.15; padding: 9px 4px; font-size: .78rem; }
.row.stk > .btn .ei { width: 1.7rem; height: 1.7rem; vertical-align: 0; }
/* v0.17.15: botões do vídeo com ícones maiores (reiniciar tinha um glifo pequeno) */
.filebar .vb .ei { width: 26px; height: 26px; vertical-align: 0; display: block; margin: 0 auto; }

/* v0.17.28 — campo numérico com sinal: botão ± ao lado (o teclado decimal do iPhone não tem “−”) */
.sgnwrap { display: flex; gap: 6px; align-items: stretch; } .sgnwrap input { flex: 1 1 auto; min-width: 0; } .sgnbtn { flex: 0 0 auto; min-width: 44px; font-size: 1.05rem; padding: 0 10px; }

/* v0.18.2 — Ajuda em painel de tela cheia e selos de base no "i" */
dialog.helpdlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-radius: 0; background: #0b1724; }
dialog.helpdlg::backdrop { background: rgba(0,0,0,.6); }
dialog.helpdlg iframe { width: 100%; height: 100%; border: 0; display: block; background: #0b1724; }
.bdg { display: inline-block; font-size: .7rem; font-weight: 700; border-radius: 9px; padding: 0 7px; border: 1px solid currentColor; vertical-align: middle; white-space: nowrap; }
.bN { color: #5fb3ff; } .bB { color: #2fbf71; } .bC { color: #f2a93b; } .bF { color: #c39bff; } .bL { color: #7fd6d6; } .bU { color: #8fa6bb; }
.finfo { margin-left: 4px; width: 20px; height: 20px; padding: 0; font-size: .72rem; line-height: 1; border-radius: 50%; }
