/* Passada — telas */

.topbar__server { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-13); color: var(--ink-3); font-weight: 600; }

.page-head { padding-block: 32px 24px; display: grid; gap: 10px; justify-items: start; }
.page-head p { max-width: 70ch; }

/* ---------- início ---------- */
.home-hero { padding-top: 24px; }
.home-hero__plate {
  min-height: clamp(420px, 62vh, 640px);
  display: grid;
  align-items: end;
}
.live-chrono { position: absolute; inset: 0; width: 100%; height: 100%; }
.home-hero__copy {
  position: relative;
  z-index: 1;
  padding: clamp(24px, 4vw, 56px);
  max-width: 640px;
  display: grid;
  gap: 20px;
}
.home-hero__copy h1 {
  font-size: clamp(3rem, 7.4vw, 6.4rem);
  font-weight: 850;
  font-stretch: 66%;
  line-height: .9;
  letter-spacing: -.02em;
  color: var(--plate-text);
  text-shadow: -.06em 0 0 rgba(168, 149, 255, .22), -.12em 0 0 rgba(168, 149, 255, .08);
}
.home-hero__copy p { color: var(--plate-text-2); font-size: var(--fs-18); max-width: 52ch; }
.home-list .sessions td:first-child b { font-stretch: var(--w-semi); }
.score-pill { display: inline-grid; place-items: center; min-width: 46px; height: 30px; padding: 0 8px; border-radius: 8px; background: var(--ink); color: var(--chalk); font-weight: 750; font-size: var(--fs-16); }
.score-pill.is-empty { background: var(--chalk-deep); color: var(--ink-3); }

/* celular */
.m-home { padding: 12px 12px 40px; display: grid; gap: 16px; }
.m-home__hero { min-height: 52vh; display: grid; align-items: end; }
.m-home__copy { position: relative; z-index: 1; padding: 22px; display: grid; gap: 8px; }
.m-home__copy h1 { color: var(--plate-text); font-size: 2.7rem; font-stretch: 66%; line-height: .92; }
.m-home__copy p { color: var(--plate-text-2); }
.m-home__actions { display: grid; gap: 10px; }
.m-home__list { display: grid; gap: 8px; }
.m-home__list h3 { margin: 12px 0 4px; }
.m-card { display: grid; grid-template-columns: 56px 1fr 20px; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-panel); background: var(--paper); border: 1px solid var(--rule); text-decoration: none; }
.m-card__score { font-size: 1.7rem; font-weight: 800; text-align: center; }
.m-card__body { display: grid; gap: 2px; }

/* ---------- nova análise (computador) ---------- */
.new-session__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .85fr); gap: var(--gap); align-items: start; padding-bottom: 64px; }
.new-session__form { display: grid; gap: var(--gap); }
.new-session__form h3 { margin-bottom: 18px; }
.new-session__capture { display: grid; gap: 16px; position: sticky; top: calc(var(--topbar-h) + 16px); }
.capture-card { padding: 22px; display: grid; gap: 16px; }
.capture-card h3 { color: var(--plate-text); }
.plate-muted { color: var(--plate-text-2); }
.capture-card__qr { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.qr { border-radius: 12px; overflow: hidden; background: var(--paper); padding: 6px; }
.qr svg { width: 100%; height: 100%; }
.url { display: block; font-size: var(--fs-12); color: var(--plate-text); background: rgba(255, 255, 255, .08); padding: 6px 8px; border-radius: 6px; word-break: break-all; margin-top: 6px; }
.capture-card__status { list-style: none; display: grid; gap: 8px; }
.capture-card__status li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.capture-card__dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--plate-text-3); }
.capture-card__status li.is-done .capture-card__dot { background: #5BE3A1; border-color: #5BE3A1; box-shadow: 0 0 10px rgba(91, 227, 161, .7); }
.dropzones { display: grid; gap: 10px; margin-top: 12px; }
.dropzone {
  display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center;
  padding: 14px; border-radius: 12px; border: 1.5px dashed var(--rule-strong); background: var(--chalk);
  cursor: pointer; transition: all var(--t-fast) var(--ease);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--ghost-ink); background: var(--ghost-tint); }
.dropzone.is-filled { border-style: solid; border-color: var(--ok); }
.dropzone__icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--paper); border: 1px solid var(--rule); }
.dropzone.is-filled .dropzone__icon { color: var(--ok); }
.dropzone__text { display: grid; gap: 2px; min-width: 0; }
.dropzone__text .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone .bar { grid-column: 1 / -1; }
.guide-panel .guide { margin: 8px 0 4px; }

/* formulários */
.field--wide { grid-column: 1 / -1; }
.history-fields { display: grid; gap: 20px; }
.flags { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.flags legend { font-size: var(--fs-14); font-weight: 600; color: var(--ink-2); margin-bottom: 8px; font-stretch: var(--w-semi); }
.flag { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rule); background: var(--paper); font-size: var(--fs-14); cursor: pointer; }
.flag input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--priority); }
.flag.is-on { border-color: var(--priority); background: var(--priority-tint); }
.alert { padding: 14px 16px; border-radius: 12px; background: var(--watch-tint); color: var(--ink); font-size: var(--fs-14); border: 1px solid color-mix(in srgb, var(--watch) 35%, transparent); }
.alert--priority { background: var(--priority-tint); border-color: color-mix(in srgb, var(--priority) 35%, transparent); }
input[type="range"] { width: 100%; accent-color: var(--ink); }

/* mapa de dor */
.painmap { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 20px; align-items: center; }
.painmap svg { width: 100%; max-height: 300px; }
/* corpo: contorno por baixo (só a borda de fora aparece) e preenchimento por cima */
.pm-outline path, .pm-outline ellipse { fill: var(--rule-strong); stroke: var(--rule-strong); stroke-width: 2.2; stroke-linejoin: round; }
.pm-fill path, .pm-fill ellipse { fill: #E7E9E4; stroke: none; }
.pm-detail path { fill: none; stroke: var(--rule-strong); stroke-width: .8; stroke-linecap: round; opacity: .7; }
.pm-cap { font-size: 11px; fill: var(--ink-3); font-weight: 600; }
.pm-hot { cursor: pointer; }
.pm-hot circle:not(.pm-hit) { fill: rgba(18, 20, 23, .08); stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 2 2; transition: all var(--t-fast) var(--ease); }
.pm-hot .pm-hit { fill: transparent; }
.pm-hot:hover circle:not(.pm-hit) { fill: var(--watch-tint); stroke: var(--watch); }
.pm-hot.is-on circle:not(.pm-hit) { fill: var(--heat-2); stroke: var(--heat-3); stroke-dasharray: none; filter: drop-shadow(0 0 6px rgba(255, 120, 30, .8)); }
.pm-hot:focus-visible circle:not(.pm-hit) { stroke: var(--ghost-ink); stroke-width: 2.5; }

/* guia de câmera */
.guide { width: 100%; max-width: 420px; }
.g-belt { fill: rgba(18, 20, 23, .06); stroke: var(--ink-3); stroke-width: 1.5; }
.g-lines { stroke: var(--rule-strong); stroke-dasharray: 4 6; }
.g-runner circle { fill: var(--ink); }
.g-dir { stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.g-fov { fill: rgba(91, 63, 230, .08); stroke: var(--ghost-ink); stroke-width: 1; stroke-dasharray: 3 4; animation: fov 2.4s var(--ease-io) infinite alternate; }
@keyframes fov { from { fill: rgba(91, 63, 230, .04); } to { fill: rgba(91, 63, 230, .14); } }
.g-phone rect { fill: var(--ink); }
.g-phone circle { fill: var(--ghost); }
.g-dim, .g-dim-end { stroke: var(--ink-3); stroke-width: 1.2; fill: none; }
.g-right { stroke: var(--ink-3); fill: none; }
.g-text { font-size: 13px; font-weight: 700; fill: var(--ink); font-stretch: 80%; }
.g-text--muted { font-size: 11px; font-weight: 600; fill: var(--ink-3); }
.plate .g-belt { fill: rgba(255, 255, 255, .05); stroke: var(--plate-text-3); }
.checklist { list-style: none; display: grid; gap: 8px; margin: 14px 0; }
.checklist li { position: relative; padding-left: 26px; font-size: var(--fs-14); color: var(--ink-2); }
.checklist li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 10px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }

/* ---------- captura (celular) ---------- */
.capture { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; background: var(--chalk); }
.capture__head { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; background: color-mix(in srgb, var(--chalk) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.capture__head .wordmark { font-size: 20px; }
.capture__steps { display: flex; gap: 5px; }
.capture__steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--chalk-deep); }
.capture__steps i.is-done { background: var(--ink-3); }
.capture__steps i.is-current { background: var(--ink); }
.capture__body { padding: 20px 16px 110px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; }
.capture__body h2 { font-size: 2.2rem; }
.capture__foot { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--chalk) 30%); }
.capture .grid-fields { grid-template-columns: 1fr 1fr; }
.capture .grid-fields .field:has(.seg) { grid-column: 1 / -1; }
/* opções em grade: com 6 opções (Objetivo) "5 km" e "10 km" quebravam em duas linhas e "Trilha" sobrava sozinha (29/11/2026) */
.capture .seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 4px; }
.capture .seg button { white-space: nowrap; }
.capture .painmap { grid-template-columns: 1fr; }
.picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.picker__buttons { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.picker__buttons .btn { white-space: normal; height: auto; min-height: 52px; padding: 8px 10px; justify-content: center; text-align: center; }
.picker__preview video { width: 100%; max-height: 260px; background: #000; }
.picker__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-14); color: var(--ink-2); }
.send-list { display: grid; gap: 10px; }
.send-item { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--rule); }
.send-item .bar { grid-column: 1 / -1; }
.capture--done { grid-template-rows: 1fr auto; padding: 16px; gap: 16px; }
.capture__done { padding: 32px 24px; display: grid; gap: 14px; align-content: center; justify-items: start; }
.capture__done h2 { color: var(--plate-text); font-size: 2.6rem; }
.capture__done p { color: var(--plate-text-2); }
.done-mark { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: #1E9561; color: #fff; box-shadow: 0 0 0 10px rgba(30, 149, 97, .18); animation: pop .5s var(--ease); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.capture__actions { display: grid; gap: 10px; }

/* ---------- processamento ---------- */
.process { padding-bottom: 64px; display: grid; gap: 22px; }
.quick-athlete { display: grid; gap: 12px; }
.quick-athlete.is-missing { border-color: var(--watch); box-shadow: inset 4px 0 0 var(--watch); }
.quick-athlete__head { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.folder-files ul { list-style: none; display: grid; gap: 8px; margin-top: 12px; }
.folder-files li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: var(--chalk); border: 1px solid var(--rule); }
.folder-files__name { display: grid; gap: 2px; min-width: 0; }
.folder-files__name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-files__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.process__screen.is-portrait { aspect-ratio: 3 / 4; max-height: 70vh; }
.process .warn { margin: 0; }
/* checagem rápida do vídeo */
.vcheck { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--rule); }
.vcheck.is-running { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: var(--fs-14); }
.vcheck__title { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; }
.vcheck--ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.vcheck--ok .vcheck__title { color: var(--ok); }
.vcheck--watch { border-color: color-mix(in srgb, var(--watch) 45%, transparent); background: var(--watch-tint); }
.vcheck--watch .vcheck__title { color: var(--watch); }
.vcheck--priority { border-color: color-mix(in srgb, var(--priority) 45%, transparent); background: var(--priority-tint); }
.vcheck--priority .vcheck__title { color: var(--priority); }
.vcheck ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.vcheck li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: start; font-size: var(--fs-14); line-height: 1.35; color: var(--ink); }
.vcheck li svg { margin-top: 2px; }
.vcheck li.is-ok svg { color: var(--ok); }
.vcheck li.is-watch svg { color: var(--watch); }
.vcheck li.is-priority svg { color: var(--priority); }
.process__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.process__grid.is-single { grid-template-columns: minmax(0, 860px); }
.process__item { display: grid; gap: 14px; align-content: start; }
.process__screen { aspect-ratio: 16 / 9; }
.process__screen video, .process__overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.process__overlay { pointer-events: none; }
.process__label { position: absolute; left: 14px; top: 12px; font-size: var(--fs-13); font-weight: 700; color: var(--plate-text); background: rgba(0, 0, 0, .5); padding: 4px 10px; border-radius: 99px; }
.process__hud { position: absolute; right: 12px; top: 10px; display: flex; gap: 6px; }
.process__item.is-active .process__screen { box-shadow: 0 0 0 2px var(--ghost), var(--shadow-plate); }
.process__progress { display: grid; gap: 8px; font-size: var(--fs-14); }
.process__actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 16px; align-items: end; }
.process__analyzing { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.trim { display: grid; gap: 8px; }
.trim__track { position: relative; height: 34px; }
.trim__track i { position: absolute; top: 13px; height: 8px; border-radius: 8px; background: var(--ink); }
.trim__track::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 8px; border-radius: 8px; background: var(--chalk-deep); }
.trim__track input { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.trim__track input::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 20px; height: 28px; border-radius: 6px; background: var(--paper); border: 2px solid var(--ink); cursor: ew-resize; }
.trim__track input::-moz-range-thumb { pointer-events: auto; width: 18px; height: 26px; border-radius: 6px; background: var(--paper); border: 2px solid var(--ink); cursor: ew-resize; }

/* ---------- figuras de exercício ---------- */
.figure { width: 100%; height: 100%; }
.figure3d, .figure2d { display: block; width: 100%; height: 100%; }
.figure3d.is-interactive { cursor: grab; touch-action: pan-y; }
.figure3d.is-interactive:active { cursor: grabbing; }
.ex-detail__fig { position: relative; }
.ex-detail__hint { position: absolute; right: 14px; bottom: 10px; font-size: var(--fs-13); color: var(--plate-text-2); pointer-events: none; }
.ex-detail__stage { position: sticky; top: 18px; aspect-ratio: var(--fig-ar, 1); max-height: calc(100vh - 120px); }
.ex-detail__step { position: absolute; left: 12px; bottom: 6px; right: 12px; font-size: var(--fs-14); font-weight: 650; color: var(--ink-2); pointer-events: none; }
.ex-detail__step--tempo { bottom: 34px; }
/* compasso do movimento: um trecho por fase (largura = duração), a pausa listrada, a marca andando */
.ex-tempo { position: absolute; left: 12px; right: 12px; bottom: 6px; height: 6px; display: flex; pointer-events: none; }
.ex-tempo__seg { position: relative; min-width: 0; height: 6px; background: #D5DAE2; box-shadow: inset -2px 0 0 #fff; transition: background .15s; }
.ex-tempo__seg:first-child { border-radius: 3px 0 0 3px; }
.ex-tempo__seg:nth-last-child(2) { border-radius: 0 3px 3px 0; box-shadow: none; }
.ex-tempo__seg--hold { background: repeating-linear-gradient(135deg, #D5DAE2 0 3px, #EEF0F4 3px 6px); }
.ex-tempo__seg.is-on { background: #12161D; }
.ex-tempo__seg--hold.is-on { background: repeating-linear-gradient(135deg, #12161D 0 3px, #8D95A3 3px 6px); }
.ex-tempo__seg span { position: absolute; left: 0; right: 2px; bottom: 9px; text-align: center; font-size: 10.5px; font-style: normal; font-weight: 650; line-height: 1; color: #8D95A3; white-space: nowrap; overflow: hidden; }
.ex-tempo__seg.is-on span { color: #12161D; }
.ex-tempo__head { position: absolute; top: -3px; bottom: -3px; left: var(--at, 0%); width: 3px; margin-left: -1.5px; border-radius: 2px; background: #E6434F; box-shadow: 0 0 0 1.5px #fff; }
/* ilustração flat dos exercícios: papel branco, como a figura de um livro */
.illus { position: relative; background: #FFFFFF; border-radius: var(--r-plate); overflow: hidden; isolation: isolate; box-shadow: inset 0 0 0 1px var(--rule); }
.ex-detail__mus {
  position: absolute; left: 6px; top: 0; display: inline-flex; align-items: center; gap: 7px;
  min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--rule);
  background: #FFFFFF; color: var(--ink-2); font: 650 var(--fs-13) / 1 var(--font); cursor: pointer;
}
.ex-detail__mus i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #C9CED6; background: transparent; }
.ex-detail__mus[aria-pressed="true"] { color: var(--ink); border-color: #F2B8BC; background: #FFF4F4; }
.ex-detail__mus[aria-pressed="true"] i { border-color: #E6434F; background: #E6434F; }
.ex-detail__mus:hover { border-color: var(--ink-3); }
.figure--plate .fig-ground { stroke: rgba(255, 255, 255, .28); stroke-width: .6; }
.fig-prop { fill: rgba(255, 255, 255, .07); stroke: rgba(255, 255, 255, .35); stroke-width: .6; }
.fig-wall { stroke: rgba(255, 255, 255, .4); stroke-width: 1.4; fill: none; }
.fig-mat { fill: rgba(168, 149, 255, .22); }
.fig-joints circle { fill: rgba(16, 18, 24, .5); }
.fig-trail path { fill: none; stroke: #A895FF; stroke-width: .9; stroke-linecap: round; stroke-linejoin: round; }
/* atleta ilustrado (exercícios): halo claro + contorno escuro por baixo, cores por cima */
.ath-halo { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 2.4; stroke-linejoin: round; }
.ath-ol { fill: #05070B; stroke: #05070B; stroke-width: 1.15; stroke-linejoin: round; }
.ath .sk { fill: #E2AE8A; } .ath .skf { fill: #B07F62; }
.ath .ts { fill: #2F8CFF; } .ath .tsf { fill: #1F5FAE; }
.ath .sh { fill: #3B4352; } .ath .shf { fill: #2A303B; }
.ath .fo { fill: #F2F5FA; } .ath .fof { fill: #AEB6C4; }
.ath .so { fill: #FF6A1F; } .ath .sof { fill: #B9521D; }
.ath .hair { fill: #3A2A22; }
.ath-mus { mix-blend-mode: screen; pointer-events: none; }
/* manequim: contorno escuro por baixo e preenchimento opaco por cima = silhueta sem linhas internas */
.mq-ol { fill: #07080C; stroke: #07080C; stroke-width: 1.3; stroke-linejoin: round; }
.mq { stroke: none; }
.mq--twin { fill: #B9C0CE; }
.mq--torso { fill: #E3E7EF; }
.mq-head { fill: #EEF1F7; stroke: #07080C; stroke-width: .65; }
.fig-band { stroke: #FF9A1F; fill: none; stroke-linecap: round; }
.fig-strap { stroke: rgba(255, 255, 255, .6); stroke-dasharray: 2 1.5; fill: none; }
.fig-bar { stroke: rgba(255, 255, 255, .8); stroke-width: 1.6; }
.fig-plate { fill: none; stroke: #A895FF; stroke-width: 1.6; }
.fig-foot { fill: rgba(255, 255, 255, .06); stroke: #F2F5FA; stroke-width: 1.4; }
.fig-label { fill: rgba(238, 241, 246, .8); font-size: 4.2px; font-weight: 650; font-family: var(--font); }
.fig-arch { fill: none; stroke: #A895FF; stroke-width: 1.6; stroke-dasharray: 2 2; }

.ex-mini {
  display: grid; grid-template-rows: auto 1fr; gap: 10px; text-align: left;
  padding: 0; border: 0; background: none; color: inherit; min-width: 0;
}
.ex-mini__fig { aspect-ratio: 4 / 3; border-radius: 14px; padding: 6px; transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.ex-mini:hover .ex-mini__fig { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--ghost), var(--shadow-plate); }
.ex-mini__body { display: grid; gap: 2px; }
.ex-mini__body b { font-stretch: var(--w-semi); font-weight: 700; line-height: 1.2; }
.ex-mini.is-highlight .ex-mini__fig { box-shadow: 0 0 0 2px var(--ghost), var(--shadow-plate); }

.ex-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.ex-detail__fig { border-radius: var(--r-plate) 0 0 var(--r-plate); min-height: 420px; padding: 18px; display: block; box-shadow: inset -1px 0 0 var(--rule); }
.ex-detail__body { padding: 30px 30px 34px; display: grid; gap: 12px; align-content: start; }
.ex-detail__body h2 { font-size: 2.4rem; }
.ex-detail__body h4 { margin-top: 10px; }
.ex-detail__short { font-size: var(--fs-18); color: var(--ink-2); }
.ex-dose { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 0; }
.ex-dose div { padding: 12px; border-radius: 12px; background: var(--paper); border: 1px solid var(--rule); }
.ex-dose dt { font-size: var(--fs-12); color: var(--ink-3); font-weight: 650; }
.ex-dose dd { margin: 4px 0 0; font-weight: 650; font-size: var(--fs-14); }
.ex-steps, .ex-errors { padding-left: 20px; display: grid; gap: 6px; font-size: var(--fs-14); }
.ex-errors { list-style: none; padding-left: 0; }
.ex-errors li { padding-left: 22px; position: relative; }
.ex-errors li::before { content: "×"; position: absolute; left: 4px; top: -1px; color: var(--priority); font-weight: 800; }
.ex-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; font-size: var(--fs-14); }
.dialog--wide { width: min(1120px, 100%); }
.dialog { position: relative; }
.dialog__close { position: absolute; right: 12px; top: 12px; z-index: 2; background: var(--paper); }
.chip--violet { background: var(--ghost-tint); color: var(--ghost-ink); }
.chip--pain { background: color-mix(in srgb, var(--heat-2) 18%, var(--chalk)); color: #8A3B00; }

.evidence { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 6px; font-size: var(--fs-12); font-weight: 750; font-stretch: var(--w-semi); border: 1px solid currentColor; }
.evidence--A { color: var(--ok); }
.evidence--B { color: #2D6FB0; }
.evidence--C { color: var(--ink-3); }
.evidence--D { color: var(--ink-4); border-style: dashed; }

/* ---------- biblioteca ---------- */
.library { padding-bottom: 80px; }
.library__filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.library__search { max-width: 320px; }
.library__group { margin-top: 36px; }
.library__group h3 { margin-bottom: 16px; }
.library__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px 18px; }
.strategy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.strategy { display: grid; gap: 8px; align-content: start; }

/* ---------- método ---------- */
.method { padding-bottom: 80px; }
.method-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 36px; }
.method-summary h4 { margin-bottom: 6px; }
.method-summary p { font-size: var(--fs-14); color: var(--ink-2); }
.md { max-width: 78ch; }
.md h2 { font-size: 2.6rem; margin: 10px 0 18px; }
.md h3 { font-size: 1.7rem; margin: 40px 0 12px; }
.md h4 { margin: 24px 0 8px; }
.md p { margin: 0 0 14px; line-height: 1.62; color: var(--ink-2); }
.md a { color: var(--ghost-ink); }
.md ul, .md ol { padding-left: 22px; margin-bottom: 14px; display: grid; gap: 6px; color: var(--ink-2); }
.md-table { overflow-x: auto; margin: 18px 0 24px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); }
.md-table table { border-collapse: collapse; width: 100%; font-size: var(--fs-13); }
.md-table th, .md-table td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.md-table th { font-weight: 700; color: var(--ink); background: var(--chalk-deep); }

@media (max-width: 1100px) {
  .new-session__grid { grid-template-columns: 1fr; }
  .new-session__capture { position: static; }
  .method-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .process__grid { grid-template-columns: 1fr; }
  .ex-detail { grid-template-columns: 1fr; }
  .ex-detail__fig { border-radius: var(--r-plate) var(--r-plate) 0 0; min-height: 0; box-shadow: inset 0 -1px 0 var(--rule); }
  .ex-detail__stage { position: relative; top: 0; aspect-ratio: 4 / 3; }
  .ex-detail__body { padding: 20px; }
  .ex-dose { grid-template-columns: 1fr; }
  .ex-grid2 { grid-template-columns: 1fr; }
  .painmap { grid-template-columns: 1fr; }
  .method-summary { grid-template-columns: 1fr; }
  .capture-card__qr { grid-template-columns: 1fr; }
  .library__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* trecho sugerido pela varredura (views/process.js, pose/window.js) */
.trim__sug { display: grid; gap: 6px; margin: 6px 0 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rule); background: color-mix(in srgb, var(--signal, #45D0FF) 8%, transparent); }
.trim__sug p { margin: 0; }
.trim__sug .spinner { width: 14px; height: 14px; vertical-align: -2px; }
.trim__keep { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.trim__keep input { margin-top: 3px; width: 18px; height: 18px; flex: none; }

/* como gravar (views/capture.js): passos do app de câmera e o plano B */
.howrec .btn { white-space: normal; height: auto; min-height: 52px; padding-top: 8px; padding-bottom: 8px; }
.howrec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px; border-radius: 16px; border: 1px solid var(--rule); background: var(--paper); }
.howrec h3 { margin: 0; font-size: var(--fs-18, 18px); line-height: 1.2; }
.howrec p { margin: 0; }
.howrec--b { background: transparent; }
.howrec__steps { list-style: none; margin: 2px 0 6px; padding: 0; display: grid; gap: 10px; }
.howrec__steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; font-size: var(--fs-16, 16px); line-height: 1.35; }
.howrec__steps b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: var(--signal, #45D0FF); color: #021018; }
.checklist--short { margin: 4px 0; }
.capture__tips > summary { min-height: 44px; display: flex; align-items: center; }
.clipcheck__retake { margin-top: 10px; }

/* câmera dentro do app (ui/recorder.js): vídeo em tela cheia, moldura, nível, avisos */
.recorder { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; overflow: hidden; }
.recorder__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.recorder__frame { position: absolute; inset: 9% 7% 21% 7%; pointer-events: none; --fc: rgba(255, 255, 255, .85); }
.recorder__frame.is-ok { --fc: #5BE3A1; }
.recorder__corner { position: absolute; width: 34px; height: 34px; border: 3px solid var(--fc); filter: drop-shadow(0 0 3px rgba(0, 0, 0, .7)); }
.recorder__corner--tl { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.recorder__corner--tr { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.recorder__corner--bl { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.recorder__corner--br { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.recorder__line { position: absolute; left: 44px; right: 44px; text-align: center; font-size: 11.5px; font-weight: 650; color: var(--fc); text-shadow: 0 1px 3px #000; border-top: 1.5px dashed var(--fc); padding-top: 3px; }
.recorder__line--head { top: 0; }
.recorder__line--feet { bottom: 0; border-top: 0; border-bottom: 1.5px dashed var(--fc); padding: 0 0 3px; }
.recorder__level { position: absolute; left: 50%; top: 44%; width: 46%; height: 0; transform: translateX(-50%); pointer-events: none; --lc: #FFD166; }
.recorder__level.is-ok { --lc: #5BE3A1; }
.recorder__level i { position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--lc); box-shadow: 0 0 4px rgba(0, 0, 0, .8); transform-origin: 50% 50%; }
.recorder__level b { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); padding: 1px 8px; border-radius: 999px; font-size: 12px; background: rgba(0, 0, 0, .6); color: var(--lc); }
.recorder__top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: linear-gradient(rgba(0, 0, 0, .6), transparent); }
.recorder__close { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 18px; cursor: pointer; }
.recorder__title { font-size: 14px; font-weight: 650; text-shadow: 0 1px 3px #000; }
.recorder__msg { position: absolute; left: 16px; right: 16px; top: 40%; text-align: center; font-size: 16px; display: grid; gap: 12px; justify-items: center; }
.recorder__checks { position: absolute; left: 10px; bottom: calc(168px + env(safe-area-inset-bottom)); list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-width: min(78%, 340px); }
.recorder__checks li { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 10px; font-size: 13.5px; line-height: 1.25; background: rgba(0, 0, 0, .62); }
.recorder__checks li span { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: #5BE3A1; color: #04210F; }
.recorder__checks li.is-bad span { background: #FFD166; color: #3A2A00; }
.recorder__checks li.is-tip span { background: rgba(255, 255, 255, .8); color: #000; }
.recorder__bottom { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px 12px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .75) 40%); }
.recorder__hint { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 14px; text-shadow: 0 1px 3px #000; }
.recorder__shutter { grid-column: 2; width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 0; cursor: pointer; display: grid; place-items: center; }
.recorder__shutter i { width: 54px; height: 54px; border-radius: 50%; background: #FF4A36; transition: all .15s; }
.recorder__shutter.is-go { border-color: #5BE3A1; }
.recorder__shutter.is-rec i { width: 28px; height: 28px; border-radius: 6px; }
.recorder__time { grid-column: 3; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.recorder__bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.recorder__bar i { display: block; height: 100%; background: #5BE3A1; }
@media (orientation: landscape) { .recorder__checks { bottom: 12px; } .recorder__frame { inset: 8% 16% 8% 16%; } .recorder__bottom { left: auto; top: 0; width: 132px; grid-template-columns: 1fr; justify-items: center; align-content: center; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .7) 40%); } .recorder__shutter, .recorder__time, .recorder__hint, .recorder__bar { grid-column: 1; } .recorder__hint { font-size: 12.5px; } }
