:root {
  --bg-color: #121316;
  --surface-color: #1f1f23;
  --surface-low: #0d0e11;
  --surface-high: #292a2d;
  --surface-highest: #343538;
  --primary-color: #ffb800;
  --primary-shadow: #6b4c00;
  --secondary-color: #fd591e;
  --secondary-shadow: #521300;
  --tertiary-color: #30D158;
  --tertiary-shadow: #00531a;
  --error-color: #ff5a5f;
  --error-shadow: #690005;
  --text-on-surface: #e3e2e6;
  --text-variant: #d5c4ab;
  --outline-variant: #514532;
  
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  background-color: var(--bg-color);
  font-family: var(--font-body);
  color: var(--text-on-surface);
  overflow: hidden;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Subtle Film Grain Texture Overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* O app ocupa a tela inteira em qualquer aparelho. No celular o conteúdo vai de borda
   a borda; em tablet e computador ele fica numa coluna centralizada que cresce com a
   resolução (--app-column), com o topo e o menu de baixo alinhados a ela. */
:root {
  --app-column: 100%;
  --screen-pad: 14px;
}

@media (min-width: 641px) {
  :root { --app-column: 640px; --screen-pad: 24px; }
}

@media (min-width: 1024px) {
  :root { --app-column: 760px; --screen-pad: 28px; }
}

.phone-container {
  width: 100%;
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  background-color: var(--bg-color);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Espaço lateral que alinha topo, avisos e menu de baixo com a coluna do conteúdo. */
.phone-container { --column-gutter: max(0px, calc((100% - var(--app-column)) / 2)); }

/* Header Bar (Full Safe-Area Aware) */
.phone-header-bar {
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(54px + env(safe-area-inset-top, 0px));
  background-color: rgba(18, 19, 22, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: max(16px, env(safe-area-inset-left, 0px), calc(var(--column-gutter) + var(--screen-pad)));
  padding-right: max(16px, env(safe-area-inset-right, 0px), calc(var(--column-gutter) + var(--screen-pad)));
  border-bottom: 1px solid rgba(81, 69, 50, 0.3);
  z-index: 100;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn, .help-btn {
  background: transparent;
  border: none;
  color: var(--text-on-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.help-btn {
  color: var(--primary-color);
}

/* Phone Content & Screens (Fluid Scrollable Viewport) */
.phone-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 14px 14px 24px 14px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background-color: var(--bg-color);
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  z-index: 10;
}

/* Version & Tape Badges */
.version-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: var(--secondary-color);
  color: black;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 6px;
  transform: rotate(4deg);
  box-shadow: 2px 2px 0px #121316;
  border: 1px solid black;
  z-index: 20;
}

.tape-badge {
  display: inline-block;
  background: var(--secondary-color);
  color: black;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  padding: 3px 6px;
  transform: rotate(-2deg);
  box-shadow: 2px 2px 0px #121316;
  border: 1px solid #121316;
}

/* Golden Reference: Screen 1 Landing */
.hero-card-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/11;
  max-height: 38vh;
  margin-bottom: 12px;
  transform: rotate(-1.5deg);
  background-color: var(--surface-color);
  border: 1px solid var(--surface-highest);
  box-shadow: 4px 4px 0px #0d0e11;
  overflow: hidden;
  flex-shrink: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(125%) brightness(90%);
  opacity: 0.9;
  padding: 4px;
}

.hero-overlay-border {
  position: absolute;
  inset: 0;
  border: 3px solid var(--surface-low);
  pointer-events: none;
  margin: 3px;
  mix-blend-mode: overlay;
}

.hero-logo-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 30;
  padding: 12px;
}

.flipaai-logo-img {
  width: 80%;
  max-height: 75%;
  height: auto;
  filter: drop-shadow(0 0 15px rgba(0,0,0,0.95));
}

.hero-text-block {
  position: relative;
  margin-bottom: 12px;
}

.yellow-accent-bar {
  position: absolute;
  left: -12px;
  top: 2px;
  width: 4px;
  height: 44px;
  background-color: var(--primary-color);
}

.main-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 8vw, 36px);
  line-height: 1.1;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-left: 4px;
  text-shadow: 2px 2px 0px var(--primary-shadow);
  margin-bottom: 6px;
}

.sub-headline-card {
  background-color: var(--surface-color);
  border: 1px solid var(--surface-highest);
  padding: 10px 12px;
  box-shadow: 3px 3px 0px var(--surface-low);
  transform: rotate(0.5deg);
  margin-top: 6px;
}

.sub-headline-title {
  font-family: var(--font-display);
  font-size: clamp(14px, 4vw, 16px);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-on-surface);
  margin-bottom: 3px;
  line-height: 1.25;
}

.sub-headline-body {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-variant);
}

/* Tactile Buttons */
.tactile-btn-primary {
  width: 100%;
  background-color: var(--primary-color);
  color: black;
  font-family: var(--font-display);
  font-size: clamp(14px, 4vw, 16px);
  font-weight: 900;
  text-transform: uppercase;
  padding: 12px 14px;
  border: 1px solid #2E3038;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 0px var(--primary-shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.08s ease-out;
  text-decoration: none;
  flex-shrink: 0;
}

.tactile-btn-primary:active {
  box-shadow: 0 0px 0px var(--primary-shadow);
  transform: translateY(4px);
}

.btn-text {
  text-align: left;
  display: flex;
  flex-direction: column;
}

.btn-subtext {
  font-size: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.btn-arrow {
  font-size: 24px;
  font-weight: bold;
}

.privacy-note {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10.5px;
  color: rgba(213, 196, 171, 0.7);
}

/* Diagnosis Screen */
.step-indicator {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 3px;
  display: block;
}

.screen-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 5.5vw, 22px);
  font-weight: 900;
  margin-bottom: 4px;
  text-transform: uppercase;
  line-height: 1.2;
}

.screen-desc {
  font-size: 11.5px;
  color: var(--text-variant);
  margin-bottom: 12px;
  line-height: 1.35;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.option-card {
  background-color: var(--surface-color);
  border: 1px solid var(--surface-high);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 2px 2px 0px #0d0e11;
}

.option-card:hover, .option-card.selected {
  border-color: var(--primary-color);
  background-color: #24252a;
  transform: translateX(2px);
}

.option-card h3, .option-card h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-on-surface);
}

.option-card p {
  font-size: 10.5px;
  color: var(--text-variant);
  line-height: 1.3;
}

/* Day Chip Multi-Select */
.day-chip {
  background: #1a1b20;
  border: 1px solid #343538;
  border-radius: 6px;
  padding: 6px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  box-shadow: 1px 1px 0 #121316;
  transition: all 0.1s ease;
}

.day-chip.selected {
  background: var(--primary-color);
  color: black;
  border-color: black;
  box-shadow: 1px 1px 0 #6b4c00;
}

/* Overworld Map */
.map-header {
  padding: 10px 12px;
  background-color: rgba(18, 19, 22, 0.95);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--surface-high);
  flex-shrink: 0;
}

.map-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-variant);
}

.streak-pill {
  background-color: rgba(253, 89, 30, 0.15);
  border: 1px solid var(--secondary-color);
  color: var(--secondary-color);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
}

/* Mapa da trilha (TracksHelper#track_map_layout). A moldura quadriculada azul vem
   do mapa antigo; dentro dela o mapa ocupa a altura disponível e rola na vertical,
   com a barra de rolagem à direita. */
.track-map-frame {
  flex: 1;
  min-height: 240px; /* cabe inteiro com o cartão "Módulo atual" até em celular de 568px */
  display: flex;
  padding: 4px;
  background: repeating-conic-gradient(#2f7de1 0 25%, #0d0e11 0 50%) 0 0 / 8px 8px;
  border-radius: 6px;
}

.track-map {
  flex: 1;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 3px;
  background-color: #1b6683; /* a mesma água do mapa */
  scrollbar-width: auto;
  scrollbar-color: var(--primary-color) #0d0e11;
}

/* Safari (iPhone) usa estes; Chrome e Edge usam o scrollbar-color acima. */
.track-map::-webkit-scrollbar { width: 10px; }
.track-map::-webkit-scrollbar-track { background: #0d0e11; }
.track-map::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border: 2px solid #0d0e11;
  border-radius: 6px;
}

/* Tem a proporção do desenho (aspect-ratio vem da view): as posições em % caem
   sempre sobre a rua, em qualquer largura de tela. Os textos usam "cqi" (1% da
   largura do mapa) para encolher junto em celulares estreitos. */
.track-map-canvas {
  position: relative;
  width: 100%;
  container-type: inline-size;
}

/* Cenário do mapa (tracks/_map_scene): água, ilhas da cidade, a rua da trilha e as
   pontes. As peças (prédios, pistas, sujeira) estão em tracks/_map_symbols. */
.map-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Letras dos grafites (muro e galpão). */
.map-graffiti {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-anchor: middle;
  stroke: #16171b;
  stroke-width: 2.6px;
  stroke-linejoin: round;
  paint-order: stroke fill;
}

.map-water  { fill: #1b6683; }
.map-foam   { fill: none; stroke: #bfe9f4; stroke-width: 5; stroke-opacity: 0.45; }
.map-ground { fill: #6f6c66; stroke: #a5a197; stroke-width: 1.5; }

/* Rua de cada módulo, onde fica a placa. */
.map-street      { fill: #2b2c31; stroke: #9a968c; stroke-width: 2; }
.map-street-line { fill: none; stroke: #ffb800; stroke-opacity: 0.7; stroke-width: 1.6; stroke-dasharray: 9 7; }

.map-road-curb,
.map-road-asphalt,
.map-road-line,
.map-bridge-shadow,
.map-bridge-rail,
.map-bridge-deck,
.map-bridge-planks {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-road-curb    { stroke: #b4afa4; stroke-width: 36; }
.map-road-asphalt { stroke: #2b2c31; stroke-width: 28; }

/* Faixa tracejada no meio da rua da trilha. */
.map-road-line { stroke: #f4e6bc; stroke-width: 3; stroke-dasharray: 10 9; }

/* Nos canais a rua vira uma ponte de tábuas com guarda-corpo vermelho. */
.map-bridge-shadow { stroke: #000; stroke-opacity: 0.28; stroke-width: 32; }
.map-bridge-rail   { stroke: #c0392b; stroke-width: 36; }
.map-bridge-deck   { stroke: #6b4a2e; stroke-width: 28; }
.map-bridge-planks { stroke: #9a6c42; stroke-width: 26; stroke-dasharray: 3.5 1.6; stroke-linecap: butt; }
.map-bridge-post   { fill: #8e2b22; stroke: #16171b; stroke-width: 1.2; }

/* Placa azul com o nome do módulo, como as placas de rua do mapa antigo. */
.map-sign {
  position: absolute;
  transform: translateY(-50%);
  padding: 4px 10px;
  background: #2f6fd6;
  border: 2px solid #e3e2e6;
  border-radius: 5px;
  box-shadow: 2px 2px 0 #0d0e11;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(8px, 2.8cqi, 10px);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 4;
}

.map-sign.is-left  { left: 10px; }
.map-sign.is-right { right: 10px; }

.map-flag {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 2px solid #0d0e11;
  border-radius: 20px;
  box-shadow: 2px 2px 0 #0d0e11;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 4;
}

.map-flag .material-symbols-outlined { font-size: 16px; }
.map-flag.is-start  { background: var(--tertiary-color); color: #0d0e11; }
.map-flag.is-finish { background: #e3e2e6; color: #0d0e11; }

.map-node {
  position: absolute;
  width: 40px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #24252a;
  border: 3px solid #8e9099; /* borda clara: a bolinha bloqueada aparece em cima do asfalto */
  color: #b9bcc3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%);
  transition: transform 0.2s;
  text-decoration: none;
  z-index: 3;
}

.map-node .map-node-icon {
  font-size: 18px;
  font-weight: 800;
}

/* Nome da tarefa ao lado da bolinha, como os adesivos do mapa antigo. Fica do
   lado em que a rua não passa (is-left / is-right). */
.map-node-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 7px;
  background: #e3e2e6;
  border: 2px solid #0d0e11;
  border-radius: 5px;
  box-shadow: 2px 2px 0 #0d0e11;
  color: #0d0e11;
  font-family: var(--font-display);
  font-size: clamp(8.5px, 2.8cqi, 10px);
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
  /* Nome comprido quebra a linha em vez de passar da borda do mapa. */
  width: max-content;
  max-width: 40cqi;
}

.map-node-label.is-right { left: calc(100% + 8px); }
.map-node-label.is-left  { right: calc(100% + 8px); }

.map-node:not(.is-completed):not(.is-current):not(.is-open) .map-node-label {
  background: #b4b3b8; /* bloqueada: mais apagada, mas legível em cima da cidade */
}

.map-node.is-current .map-node-label {
  background: var(--primary-color);
}

.map-node.is-completed {
  background: #30D158;
  border-color: #1a1b20;
  color: #0d0e11;
}

/* Liberado mas ainda não treinado (ex.: pulado pelo diagnóstico): dá para abrir. */
.map-node.is-open {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.map-node.is-current {
  background: #fd591e;
  border-color: #ffb800;
  color: #1a1b20;
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 10;
}

.map-node.is-current .map-node-icon {
  font-size: 24px;
}

.floating-lesson-card {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(31, 31, 35, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(0,0,0,0.8);
  z-index: 30;
}

.lesson-step {
  font-size: 9px;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: 0.5px;
}

.lesson-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-on-surface);
}

/* Drill & Video Player */
.video-container {
  width: 100%;
  height: clamp(160px, 26vh, 200px);
  background-color: black;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--surface-highest);
  margin-bottom: 10px;
  flex-shrink: 0;
}

.play-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.video-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,0.85);
  font-size: 9px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 4px;
}

.instructions-card {
  background-color: var(--surface-color);
  border: 1px solid var(--surface-high);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 11.5px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Checklist Items */
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-color);
  border: 1px solid var(--surface-high);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.1s ease;
  box-shadow: 0 3px 0 #121316;
}

.check-item.done {
  border-color: #30D158;
  background: #18231c;
}

.check-box-square {
  width: 22px;
  height: 22px;
  border: 2px solid var(--outline-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.check-item.done .check-box-square {
  background: #30D158;
  border-color: #30D158;
  color: black;
}

.check-item.done .check-text {
  text-decoration: line-through;
  opacity: 0.7;
}

/* Feedback & IA Scanner */
.ia-loader-card {
  background: var(--surface-color);
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-lg);
  padding: 20px 14px;
  width: 100%;
}

.pulse-icon {
  font-size: 34px;
  color: var(--primary-color);
  margin-bottom: 8px;
  animation: pulse 1s infinite;
}

.progress-bar-rail {
  width: 100%;
  height: 6px;
  background: #0d0e11;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--primary-color);
  transition: width 3s linear;
}

.feedback-block {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  font-size: 11.5px;
  line-height: 1.4;
}

.feedback-block.good {
  background: rgba(48, 209, 88, 0.12);
  border-left: 4px solid #30D158;
}

.feedback-block.alert {
  background: rgba(253, 89, 30, 0.12);
  border-left: 4px solid var(--secondary-color);
}

.feedback-block.action {
  background: rgba(255, 184, 0, 0.12);
  border-left: 4px solid var(--primary-color);
}

.feedback-tag {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

/* Laser Scan Animation */
@keyframes laserScan {
  0% { top: 0%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.laser-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
  box-shadow: 0 0 12px var(--primary-color);
  z-index: 20;
  animation: laserScan 2.5s ease-in-out infinite;
}

/* Drawer Menu (Screen Switcher) */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-menu {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, 80vw);
  background: #16171b;
  border-right: 2px solid #343538;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 10px 0 25px rgba(0,0,0,0.8);
}

.drawer-menu.open {
  transform: translateX(0);
}

.drawer-header {
  padding-top: max(14px, env(safe-area-inset-top, 0px));
  padding-left: 14px;
  padding-right: 14px;
  padding-bottom: 12px;
  background: #0d0e11;
  border-bottom: 1px solid #292a2d;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  -webkit-overflow-scrolling: touch;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #e3e2e6;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  background: #1f1f23;
  border: 1px solid transparent;
  transition: all 0.1s ease;
}

.drawer-item:hover, .drawer-item.active {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: #24252a;
}

.drawer-item-num {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  color: var(--text-variant);
  background: #0d0e11;
  padding: 2px 5px;
  border-radius: 4px;
}

/* Bottom Nav (Full Safe-Area Aware) */
.phone-bottom-nav {
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  background: rgba(18, 19, 22, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(81, 69, 50, 0.4);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding-left: max(4px, env(safe-area-inset-left, 0px), var(--column-gutter));
  padding-right: max(4px, env(safe-area-inset-right, 0px), var(--column-gutter));
  position: relative;
  flex-shrink: 0;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-variant);
  text-decoration: none;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  gap: 1px;
  flex: 1;
  transition: all 0.15s ease;
  padding-top: 2px;
}

.nav-icon {
  font-size: 20px;
  transition: transform 0.15s ease;
}

.nav-btn:hover, .nav-btn.active {
  color: var(--primary-color);
}

/* Floating Action Button for Camera/Scanner */
.nav-fab-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: -22px;
  flex: 1;
  z-index: 110;
}

.nav-fab-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: black;
  border: 2px solid black;
  box-shadow: 0 4px 0px var(--primary-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.08s ease-out;
}

.nav-fab-btn:active {
  transform: translateY(3px);
  box-shadow: 0 0px 0px var(--primary-shadow);
}

.nav-fab-label {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--primary-color);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Mini Avatar in Nav */
.nav-avatar-mini {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--primary-color);
  padding: 1px;
  background-color: #121316;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.secondary-link-btn {
  background: transparent;
  border: none;
  color: var(--text-variant);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px;
  text-align: center;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Auth Screens (cadastro, login, recuperação de senha e conta)
   Espaçamento por gap/flex: o reset global (* { margin: 0 }) anula as
   margens utilitárias do Tailwind, então estas telas não dependem delas. */
.auth-screen {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 12px 2px 8px;
}

.auth-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-icon {
  font-size: 32px;
  color: var(--primary-color);
}

.auth-head .screen-title,
.auth-head .screen-desc {
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-on-surface);
}

.auth-input {
  width: 100%;
  background: var(--bg-color);
  border: 1px solid var(--surface-highest);
  border-radius: 6px;
  color: var(--text-on-surface);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px;
  transition: border-color 0.15s ease;
}

.auth-input::placeholder {
  color: rgba(213, 196, 171, 0.45);
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.auth-input-code {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.4em;
  text-align: center;
}

.auth-hint {
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--text-variant);
  opacity: 0.8;
}

.auth-form .tactile-btn-primary {
  margin-top: 6px;
}

.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.auth-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: none;
  cursor: pointer;
}

.auth-muted-link {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-variant);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-errors {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  padding: 10px 12px;
  border: 1px solid rgba(255, 90, 95, 0.45);
  border-radius: var(--radius-md);
  background: rgba(255, 90, 95, 0.08);
  font-size: 12px;
  line-height: 1.35;
  color: var(--error-color);
}

.auth-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--surface-color);
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
  box-shadow: 3px 3px 0 var(--surface-low);
}

.auth-card-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-variant);
}

.auth-card-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-on-surface);
  word-break: break-all;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-actions form {
  width: 100%;
}

.auth-secondary-btn {
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-sm);
  color: var(--text-on-surface);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

/* "Avançar para a próxima tarefa" nas páginas da trilha (link ou botão com aviso). */
.maneuver-advance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.maneuver-advance .material-symbols-outlined {
  font-size: 18px;
}

.auth-secondary-btn.danger {
  border-color: rgba(255, 90, 95, 0.45);
  color: var(--error-color);
}

.auth-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10.5px;
  color: rgba(213, 196, 171, 0.7);
}

/* Flash (avisos após redirecionamento) */
.flash-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px calc(var(--column-gutter) + var(--screen-pad)) 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 184, 0, 0.4);
  border-radius: var(--radius-md);
  background: var(--surface-color);
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-on-surface);
}

.flash-message .material-symbols-outlined {
  font-size: 18px;
  color: var(--primary-color);
}

.flash-message.alert {
  border-color: rgba(255, 90, 95, 0.45);
}

.flash-message.alert .material-symbols-outlined {
  color: var(--error-color);
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-variant);
  text-decoration: none;
}

.auth-back .material-symbols-outlined {
  font-size: 16px;
}

/* Tela "Gravar" (câmera/upload, preview e progresso) */
a.nav-fab-btn {
  text-decoration: none;
}

.rec-screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 12px 2px 8px;
}

.rec-screen [hidden] {
  display: none !important;
}

.rec-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rec-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rec-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  text-align: left;
  color: var(--text-on-surface);
  font-family: var(--font-body);
}

.rec-option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary-color);
  color: black;
  font-size: 24px;
}

.rec-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rec-option-text strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.rec-option-text small {
  font-size: 11px;
  color: var(--text-variant);
}

.rec-hidden-input {
  display: none;
}

.rec-stage {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rec-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 52vh;
  overflow: hidden;
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
  background: #000;
  box-shadow: 3px 3px 0 var(--surface-low);
}

.rec-video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.rec-timer {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: var(--text-on-surface);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.rec-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rec-record-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid var(--error-color);
  border-radius: var(--radius-sm);
  background: var(--error-color);
  box-shadow: 0 4px 0 var(--error-shadow);
  color: black;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.rec-record-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: black;
}

.rec-record-btn.recording .rec-record-dot {
  border-radius: 2px;
  animation: pulse 1s infinite;
}

.rec-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: none;
}

.rec-checklist legend {
  margin-bottom: 8px;
}

.rec-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
  background: #1a1b20;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-on-surface);
  cursor: pointer;
}

.rec-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--primary-color);
}

.rec-check:has(input:checked) {
  border-color: var(--primary-color);
}

.rec-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rec-progress-rail {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--surface-highest);
  border-radius: 999px;
  background: var(--surface-low);
}

.rec-progress-fill {
  width: 0;
  height: 100%;
  background: var(--primary-color);
  transition: width 0.15s ease-out;
}

.rec-form .tactile-btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Aba "Zine" (vídeos gravados + andamento da análise) */
.zine-screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 12px 2px 8px;
}

.zine-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  border: 1px dashed var(--surface-highest);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 12px;
  color: var(--text-variant);
}

.zine-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
}

.zine-card {
  overflow: hidden;
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
  background: var(--surface-color);
  box-shadow: 3px 3px 0 var(--surface-low);
}

.zine-video {
  aspect-ratio: 16 / 9;
  background: #000;
}

.zine-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.zine-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 14px;
}

.zine-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.zine-title-row h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text-on-surface);
}

.zine-code {
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-highest);
  font-size: 10px;
  font-weight: 800;
  color: var(--text-variant);
}

.zine-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.zine-status .material-symbols-outlined {
  font-size: 18px;
}

.zine-status.info  { color: var(--primary-color); }
.zine-status.warn  { color: var(--secondary-color); }
.zine-status.ok    { color: var(--tertiary-color); }
.zine-status.error { color: var(--error-color); }

.zine-spin {
  animation: zine-spin 1.4s linear infinite;
}

@keyframes zine-spin {
  to { transform: rotate(360deg); }
}

.zine-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  list-style: none;
}

.zine-steps li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(213, 196, 171, 0.5);
}

.zine-steps li span {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-highest);
}

.zine-steps li.done { color: var(--text-variant); }
.zine-steps li.done span { background: var(--tertiary-color); }
.zine-steps li.current { color: var(--primary-color); }
.zine-steps li.current span { background: var(--primary-color); animation: pulse 1.2s infinite; }
.zine-steps li.error { color: var(--error-color); }
.zine-steps li.error span { background: var(--error-color); }

.zine-headline {
  padding-left: 10px;
  border-left: 3px solid var(--tertiary-color);
  font-size: 12px;
  font-style: italic;
  color: var(--text-on-surface);
}

.zine-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary-color);
  text-decoration: none;
}

.zine-action .material-symbols-outlined {
  font-size: 16px;
}

/* Erros de formulário fora das telas auth-* (que já usam gap). */
.screen > .auth-errors {
  margin-bottom: 12px;
}

/* Cartões de escolha (radio) das telas Ajuda e Retorno.
   O input fica escondido dentro do label; :has destaca o marcado sem JS. */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: none;
}

.choice-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-color);
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: 2px 2px 0 var(--surface-low);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card:has(input:checked) {
  border-color: var(--primary-color);
  background: #24252a;
}

.choice-card:has(input:focus-visible) {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.choice-card.danger:has(input:checked) {
  border-color: var(--error-color);
}

.choice-icon {
  flex-shrink: 0;
  color: var(--primary-color);
}

.choice-card.danger .choice-icon {
  color: var(--error-color);
}

.choice-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.choice-text strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-on-surface);
}

.choice-text small {
  font-size: 10.5px;
  line-height: 1.3;
  color: var(--text-variant);
}

/* Bolinha de seleção à direita do cartão. */
.choice-mark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--surface-highest);
  transition: all 0.15s ease;
}

.choice-card:has(input:checked) .choice-mark {
  border: 6px solid var(--primary-color);
}

.choice-card.danger:has(input:checked) .choice-mark {
  border-color: var(--error-color);
}

/* Lista de itens dentro de um auth-card (drills recomendados, aquecimentos). */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  list-style: none;
}

.card-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-on-surface);
}

.card-list .material-symbols-outlined {
  font-size: 18px;
  color: var(--primary-color);
}

.card-list-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Guias dos drills (app/views/maneuvers/guides/): conteúdo abaixo do vídeo. */
.guide {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.guide-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guide-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--text-on-surface);
}

.guide-lead,
.guide-specs-intro {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-variant);
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--surface-color);
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
  box-shadow: 3px 3px 0 var(--surface-low);
}

.guide-card-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--primary-color);
}

/* Abas Rua / Bowl: radio escondido, :has mostra o painel do estilo marcado. */
.guide-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.guide-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-sm);
  background: var(--surface-low);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text-variant);
  cursor: pointer;
}

.guide-tab input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.guide-tab .material-symbols-outlined {
  font-size: 18px;
}

.guide-tab:has(input:checked) {
  background: var(--primary-color);
  border-color: black;
  color: black;
  box-shadow: 0 3px 0 var(--primary-shadow);
}

.guide-tab:has(input:focus-visible) {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.guide-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide:has(input[value="rua"]:checked) .guide-panel-bowl,
.guide:has(input[value="bowl"]:checked) .guide-panel-rua {
  display: none;
}

.guide-specs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-specs div {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--surface-high);
}

.guide-specs dt {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary-color);
  padding-top: 1px;
}

.guide-specs dd,
.guide-list li,
.guide-steps li {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-on-surface);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.guide-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-variant);
  padding-bottom: 4px;
}

.guide-table td {
  padding: 6px 0;
  border-top: 1px solid var(--surface-high);
  color: var(--text-on-surface);
}

.guide-table td:last-child {
  font-weight: 800;
  color: var(--primary-color);
}

.guide-hint {
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--text-variant);
  opacity: 0.85;
}

.guide-tip {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #1a1b20;
  border-left: 4px solid var(--primary-color);
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-variant);
}

.guide-tip .material-symbols-outlined {
  font-size: 18px;
  color: var(--primary-color);
}

.guide-tip strong {
  color: var(--text-on-surface);
}

.guide-list,
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 18px;
}

/* O Tailwind zera os marcadores de lista (list-style: none); os guias precisam deles. */
.guide-list {
  list-style: disc;
}

.guide-steps {
  list-style: decimal;
}

.guide-list li::marker,
.guide-steps li::marker {
  color: var(--primary-color);
  font-weight: 800;
}

.guide-details {
  background: var(--surface-color);
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
  padding: 12px;
}

.guide-details summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text-on-surface);
  cursor: pointer;
  list-style: none;
}

.guide-details summary::-webkit-details-marker {
  display: none;
}

.guide-details summary::after {
  content: "expand_more";
  font-family: "Material Symbols Outlined";
  font-size: 20px;
  margin-left: auto;
  color: var(--primary-color);
  transition: transform 0.2s;
}

.guide-details[open] summary::after {
  transform: rotate(180deg);
}

.guide-details summary .material-symbols-outlined {
  font-size: 18px;
  color: var(--primary-color);
}

.guide-details[open] .guide-steps {
  margin: 12px 0 10px;
}

/* Coluna de rótulos mais larga para nomes maiores (ex.: guia de equipamento). */
.guide-specs.is-wide div {
  grid-template-columns: 82px 1fr;
}

/* Lista de equipamentos do guia 0.2: nome + etiqueta e, abaixo, para que serve. */
.guide-gear {
  display: flex;
  flex-direction: column;
  list-style: none;
}

.guide-gear li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 0;
  border-top: 1px solid var(--surface-high);
}

.guide-gear-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-on-surface);
}

.guide-gear p {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-variant);
}

.guide-tag {
  padding: 1px 6px;
  border: 1px solid var(--surface-highest);
  border-radius: 10px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text-variant);
}

.guide-tag.is-must {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: black;
}

.guide-tag.is-start {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Abas feitas de links (ex.: Zine do mentor): mesmo visual das abas dos guias. */
a.guide-tab {
  text-decoration: none;
}

.guide-tab.is-active {
  background: var(--primary-color);
  border-color: black;
  color: black;
  box-shadow: 0 3px 0 var(--primary-shadow);
}

/* Zine do mentor: um grupo por aprendiz, com os vídeos dele dentro. */
.mentor-learners {
  display: flex;
  flex-direction: column;
  gap: 18px;
  list-style: none;
}

.mentor-learner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mentor-learner-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius-sm);
  background: var(--surface-color);
}

.mentor-learner-head > .material-symbols-outlined {
  color: var(--primary-color);
}

.mentor-learner-name {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mentor-learner-name strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-on-surface);
  overflow-wrap: anywhere;
}

.mentor-outcome {
  font-size: 12px;
  color: var(--text-variant);
}

.mentor-outcome strong {
  color: var(--text-on-surface);
}

/* Três abas na área do mentor: mais compactas que as abas dos guias. */
.guide-tabs.mentor-tabs {
  grid-template-columns: repeat(3, 1fr);
}

.mentor-tabs .guide-tab {
  gap: 4px;
  padding: 8px 4px;
  font-size: 11px;
}

.mentor-tabs .guide-tab .material-symbols-outlined {
  font-size: 16px;
}

/* Pedido de mentor: cartão com a experiência contada e os botões de decisão. */
.mentor-request-note {
  font-size: 12px;
  font-style: italic;
  line-height: 1.4;
  color: var(--text-on-surface);
}

.mentor-request-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.mentor-request-actions form {
  display: flex;
}

.mentor-request-actions .tactile-btn-primary,
.mentor-request-actions .auth-secondary-btn {
  width: 100%;
}

/* Devolutiva no cartão do vídeo (mentor/reviews/_form): rótulos coloridos iguais
   aos blocos que o aprendiz vê. */
.review-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--surface-highest);
}

.review-label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.review-label .material-symbols-outlined {
  font-size: 16px;
}

.review-label.is-good,
.review-summary .is-good  { color: var(--tertiary-color); }
.review-label.is-fix,
.review-summary .is-fix   { color: var(--secondary-color); }
.review-label.is-focus,
.review-summary .is-focus { color: var(--primary-color); }

.review-input { resize: vertical; }
.review-input.is-good  { border-color: rgba(48, 209, 88, 0.55); }
.review-input.is-fix   { border-color: rgba(253, 89, 30, 0.55); }
.review-input.is-focus { border-color: rgba(255, 184, 0, 0.55); }

.review-extra summary,
.review-revise summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-color);
}

.review-extra summary::-webkit-details-marker,
.review-revise summary::-webkit-details-marker { display: none; }
.review-extra[open] summary { margin-bottom: 6px; }
.review-revise summary .material-symbols-outlined { font-size: 17px; }

/* Devolutiva já enviada, em poucas linhas (aba Todos). */
.review-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--surface-low);
  border-left: 3px solid var(--tertiary-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-on-surface);
}

.review-summary strong { font-family: var(--font-display); font-size: 13px; }
.review-summary span { font-weight: 800; }

.review-go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
}

.review-go .material-symbols-outlined { font-size: 17px; text-decoration: none; }

/* Zine: botão discreto para o aprendiz apagar o próprio vídeo. */
.zine-delete {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  padding: 0;
  border: none;
  background: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-variant);
  opacity: 0.8;
  cursor: pointer;
}

.zine-delete .material-symbols-outlined {
  font-size: 15px;
}

.zine-delete:hover {
  color: var(--error-color);
  opacity: 1;
}

/* Mapa de Picos (spots/index): pedido de localização, mapa, formulário do rolê e as
   listas "Seus rolês" e "Picos da galera". */
.spots-screen,
.spots-content,
.spots-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spots-screen { gap: 16px; }

.spots-gate {
  align-items: center;
  gap: 10px;
  text-align: center;
}

.spots-gate strong {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-on-surface);
}

.spots-gate.is-denied .auth-icon { color: var(--error-color); }

.spots-how {
  text-align: left;
  font-size: 11px;
}

.spots-map {
  width: 100%;
  height: clamp(280px, 52vh, 460px);
  border: 2px solid var(--surface-highest);
  border-radius: var(--radius-md);
  box-shadow: 3px 3px 0 var(--surface-low);
  overflow: hidden;
  background: var(--surface-low);
}

/* "Você está aqui": bolinha azul com borda branca. */
.spots-me {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3b8cff;
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(59, 140, 255, 0.3);
}

/* Alfinete do mapa open source (lib/open_map.js): a cor vem do JavaScript. O botão é maior
   que o desenho, para o toque acertar; a ponta fica no meio da base, no lugar exato. */
.spots-pin {
  width: 40px;
  height: 40px;
  background: none;
  border: 0;
  cursor: pointer;
}

.spots-pin::before,
.spots-pin::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.spots-pin::before {
  left: 8px;
  top: 11px;
  width: 24px;
  height: 24px;
  background: var(--pin-color);
  border: 2px solid var(--pin-border);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.spots-pin::after {
  left: 16px;
  top: 19px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-low);
}

/* Botões de zoom e créditos do mapa open source no tema do app (no MapLibre são brancos). */
.spots-map .maplibregl-ctrl-group {
  background: var(--surface-color);
  border: 2px solid var(--surface-highest);
  box-shadow: none;
}

.spots-map .maplibregl-ctrl-group button {
  width: 40px;
  height: 40px;
}

.spots-map .maplibregl-ctrl-group button + button { border-top-color: var(--surface-highest); }

/* Botão "onde estou" (spots_map_controller#locateButton): a mira dos apps de mapa. */
.spots-locate {
  display: grid;
  place-items: center;
  color: var(--text-on-surface);
}

.spots-locate .material-symbols-outlined { font-size: 22px; }

/* No mapa do Google (a reserva), o botão não vem dentro de uma caixa do MapLibre. */
.spots-locate.is-google {
  width: 40px;
  height: 40px;
  margin: 10px;
  background: var(--surface-color);
  border: 2px solid var(--surface-highest);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.spots-map .maplibregl-ctrl-icon { filter: invert(1); }

.spots-map .maplibregl-ctrl-attrib {
  background: rgba(13, 14, 17, 0.8);
  color: var(--text-variant);
}

.spots-map .maplibregl-ctrl-attrib a { color: var(--text-on-surface); }

.spots-unavailable {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-variant);
}

.spots-form { gap: 12px; }

.spots-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.spots-safety {
  justify-content: flex-start;
  text-align: left;
  line-height: 1.35;
}

.spots-form-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spots-card { gap: 6px; transition: border-color 0.3s, box-shadow 0.3s; }

/* Ao tocar num alfinete, o cartão do pico ou do rolê pisca em amarelo. */
.spots-card.is-highlighted {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-color);
}

.spots-card.is-meetup { border-left: 4px solid var(--secondary-color); }

.spots-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-color);
}

.spots-card-head strong {
  flex: 1;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-on-surface);
}

.spots-card-when {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-color);
}

.spots-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}

.spots-card-actions .auth-secondary-btn { flex: 1 1 100%; }
.spots-cancel { color: var(--error-color); }

.spots-share-value { word-break: normal; }

/* Perfil (/conta): nível e XP, números, abas Avatar/Skate e a conta. */
.profile-screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface-color);
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
  box-shadow: 3px 3px 0 var(--surface-low);
}

.profile-hero-avatar {
  flex: 0 0 92px;
  height: 128px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at 50% 35%, #2b2c33, var(--surface-low));
  overflow: hidden;
}

.profile-hero-avatar .avatar { height: 100%; }

.profile-hero-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-hero-info .screen-title { margin: 0; }

.profile-xp {
  height: 10px;
  background: var(--surface-low);
  border: 1px solid var(--surface-highest);
  border-radius: 6px;
  overflow: hidden;
}

.profile-xp span {
  display: block;
  height: 100%;
  min-width: 4px;
  background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
  border-radius: 6px;
}

.profile-xp-label {
  font-size: 11px;
  color: var(--text-variant);
}

.profile-xp-label strong { color: var(--primary-color); }

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--surface-color);
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
}

.profile-stat .material-symbols-outlined { color: var(--primary-color); font-size: 22px; }
.profile-stat.is-streak .material-symbols-outlined { color: var(--secondary-color); }

.profile-stat strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  color: var(--text-on-surface);
}

.profile-stat > span:last-child {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-variant);
}

/* Rank: lugar reservado, ainda sem regra. */
.profile-stat.is-soon { border-style: dashed; opacity: 0.7; }
.profile-stat.is-soon .material-symbols-outlined { color: var(--text-variant); }

/* Abas Avatar / Skate, só com CSS (radios). */
.profile-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  scroll-margin-top: 12px;
}

.profile-tabs input { position: absolute; opacity: 0; pointer-events: none; }

.profile-tabs label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-variant);
  cursor: pointer;
}

.profile-tabs input:checked + label {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #0d0e11;
}

.profile-tabs input:focus-visible + label { outline: 2px solid var(--primary-color); outline-offset: 2px; }

.profile-screen:has(#profile-tab-avatar:checked) .profile-panel.is-skate,
.profile-screen:has(#profile-tab-skate:checked) .profile-panel.is-avatar { display: none; }

.profile-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* A prévia fica grudada no topo enquanto a pessoa rola pelas opções. */
.profile-preview {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 10px;
  background: radial-gradient(circle at 50% 35%, #2b2c33, var(--surface-low));
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
}

.profile-preview.is-avatar .avatar { width: auto; height: 300px; }
@media (max-height: 700px) { .profile-preview.is-avatar .avatar { height: 230px; } }
.profile-preview.is-deck .deck { width: auto; max-width: 100%; height: clamp(220px, 40dvh, 320px); }

.customizer-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: none;
}

.customizer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.customizer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--surface-highest);
  border-radius: 20px;
  background: var(--surface-color);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-on-surface);
  cursor: pointer;
}

.customizer-chip input { position: absolute; opacity: 0; pointer-events: none; }

.customizer-chip:has(input:checked) {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 1px var(--primary-color);
  color: var(--primary-color);
}

.customizer-chip:has(input:focus-visible) { outline: 2px solid var(--primary-color); outline-offset: 2px; }

.customizer-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.customizer-swatch.is-vitiligo { background: radial-gradient(circle at 35% 35%, #f6e8de 0 30%, #a2663f 32%); }
.choice-text .customizer-print { color: var(--primary-color); }

.profile-account {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--surface-high);
}

/* Desenho do avatar (avatars/_avatar), no estilo dos jogos de skate de hoje. As cores
   vêm das variáveis --av-* (e --deck-* para o skate na mão); o volume vem dos
   degradês de sombra desenhados por cima de cada parte. */
.avatar { display: block; width: 100%; height: auto; }
.avatar .av-skin { fill: var(--av-skin); }
.avatar .av-hair { fill: var(--av-hair); }
.avatar .av-eyes { fill: var(--av-eyes); }
.avatar .av-top { fill: var(--av-top); }
.avatar .av-vitiligo { fill: #f6e8de; }
.avatar .av-stubble { opacity: 0.32; }
.avatar .av-buzz { opacity: 0.8; }
.avatar .av-line { fill: none; stroke: var(--av-skin-shade); stroke-width: 0.9; stroke-linecap: round; stroke-opacity: 0.9; }
.avatar .av-line.is-soft { stroke-opacity: 0.5; stroke-width: 0.7; }
.avatar .av-line.is-nose { stroke-width: 1.1; }
.avatar .av-lid { fill: none; stroke: #2a1a14; stroke-width: 1.1; stroke-linecap: round; }
.avatar .av-lashes { fill: none; stroke: #1a1210; stroke-width: 1.5; stroke-linecap: round; }
.avatar .av-brow { fill: none; stroke: var(--av-hair); stroke-width: 2.3; stroke-linecap: round; }
.avatar .av-brow.is-thin { stroke-width: 1.6; }
.avatar .av-lip { fill: #8f3f3a; opacity: 0.5; }
.avatar .av-lip.is-lower { opacity: 0.36; }
.avatar .av-shine { fill: none; stroke: #fff; stroke-opacity: 0.18; stroke-width: 2.4; stroke-linecap: round; }
.avatar .av-curls circle { stroke: #000; stroke-opacity: 0.25; stroke-width: 0.9; }
.avatar .av-plait { stroke: #000; stroke-opacity: 0.35; stroke-width: 0.8; }
.avatar .av-bead { fill: var(--primary-color); }
.avatar .av-loc-outline { fill: none; stroke: #000; stroke-opacity: 0.45; stroke-width: 5.4; stroke-linecap: round; }
.avatar .av-loc { fill: none; stroke: var(--av-hair); stroke-width: 3.8; stroke-linecap: round; }
.avatar .av-sock { fill: #efece4; }
.avatar .av-sock.is-black { fill: #26272b; }
.avatar .av-stripe-a { fill: var(--primary-color); }
.avatar .av-stripe-b { fill: var(--secondary-color); }
.avatar .av-jeans { fill: #a9bccd; }
.avatar .av-khaki { fill: #b98953; }
.avatar .av-cargo { fill: #2b2c31; }
.avatar .av-jorts { fill: #2a2b2f; }
.avatar .av-print { fill: #ecebe6; }
.avatar .av-print-line { fill: none; stroke: var(--av-top); stroke-width: 0.9; }
.avatar .av-print-stroke { stroke: #ecebe6; stroke-width: 1.6; stroke-linecap: round; }
.avatar .av-print-big {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.5px;
  text-anchor: middle;
  fill: #ecebe6;
}
.avatar .av-board-word {
  font-family: var(--font-display);
  font-size: 5.6px;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: var(--primary-color);
}
.avatar .av-trucks { fill: var(--deck-trucks, #b8bcc4); stroke: #0d0e11; stroke-width: 0.6; }
.avatar .av-wheels { fill: var(--deck-wheels, #f2efe6); }
/* Rosto e sobrancelha de cada base. */
.avatar[data-base="feminino"] .av-only-m,
.avatar:not([data-base="feminino"]) .av-only-f { display: none; }
/* De boné ou capacete, o volume do cabelo que passaria por cima some. */
.avatar:not([data-head="nenhum"]) .hair-top { display: none; }
/* A base feminina tem os ombros um pouco mais estreitos. */
.avatar .av-upper { transform-origin: 100px 150px; }
.avatar[data-base="feminino"] .av-upper { transform: scale(0.92, 1); }

/* Desenho do skate (decks/_deck): lixa, estampa com trucks e perfil. Rodas e trucks
   vêm de --deck-wheels / --deck-trucks; as estampas ficam em decks/prints/. */
.deck { display: block; width: 100%; height: auto; }
.deck .deck-wheel { fill: var(--deck-wheels); stroke: #0d0e11; stroke-width: 1; }
.deck .deck-truck { fill: var(--deck-trucks); stroke: #0d0e11; stroke-width: 1; }
.deck .deck-bolt { fill: #2a2b30; stroke: #d6d9de; stroke-width: 0.6; }
.deck .deck-print-word { font-family: var(--font-display); font-size: 9px; font-weight: 900; letter-spacing: 3px; }
.deck .deck-print-word.is-tight { letter-spacing: 1.5px; }
.deck .deck-print-word.is-script { font-size: 15px; font-style: italic; letter-spacing: 0; }
.deck .deck-graffiti {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -2px;
  text-anchor: middle;
  stroke-width: 5px;
  stroke-linejoin: round;
  paint-order: stroke fill;
}
.deck .deck-graffiti.is-shine { stroke-width: 1px; stroke-opacity: 0.55; }

/* Cartão da ofensiva no Perfil: é um botão que abre /ofensiva. */
.profile-stat.is-button {
  position: relative;
  text-decoration: none;
  transition: border-color 0.2s;
}

.profile-stat.is-button:hover,
.profile-stat.is-button:focus-visible { border-color: var(--secondary-color); }

.profile-stat .profile-stat-go {
  position: absolute;
  top: 10px;
  right: 8px;
  color: var(--text-variant);
  font-size: 20px;
}

/* Página da ofensiva (/ofensiva). */
.streak-screen,
.streak-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.streak-screen { gap: 16px; }

.streak-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-variant);
}

.streak-steps li { display: flex; align-items: flex-start; gap: 8px; }
.streak-steps .material-symbols-outlined { flex: 0 0 auto; font-size: 20px; color: var(--primary-color); }
.streak-steps strong { color: var(--text-on-surface); }

.streak-status { gap: 10px; }
.streak-status.is-lost { border-color: rgba(255, 90, 95, 0.4); }

.streak-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--secondary-color);
}

.streak-count .material-symbols-outlined { font-size: 30px; align-self: center; }

.streak-count strong {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  color: var(--text-on-surface);
}

.streak-count > span:not(.material-symbols-outlined):not(.guide-tag) {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-variant);
}

.streak-count .guide-tag { margin-left: auto; align-self: center; }
.streak-status.is-lost .streak-count { color: var(--error-color); }

.streak-sessions li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.streak-reason {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-on-surface);
  white-space: pre-line;
}

.streak-justification { gap: 8px; }
.streak-justification.is-approved { border-color: rgba(48, 209, 88, 0.45); }
.streak-justification.is-rejected { border-color: rgba(255, 90, 95, 0.45); }

.streak-review { gap: 10px; }

/* Lista de tarefas (/tarefas): botão "Tarefas concluídas" do Perfil. */
.profile-stat.is-tasks.is-button:hover,
.profile-stat.is-tasks.is-button:focus-visible { border-color: var(--primary-color); }

.streak-count.is-tasks { color: var(--primary-color); }
.tasks-summary { gap: 10px; }

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
}

.tasks-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-color);
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-sm);
  color: var(--text-on-surface);
  text-decoration: none;
}

.tasks-item:hover,
.tasks-item:focus-visible { border-color: var(--primary-color); }

.tasks-item > .material-symbols-outlined { font-size: 22px; color: var(--text-variant); }
.tasks-item.is-done > .material-symbols-outlined { color: var(--tertiary-color); }
.tasks-item.is-current { border-color: var(--secondary-color); }
.tasks-item.is-current > .material-symbols-outlined { color: var(--secondary-color); }
.tasks-item.is-open > .material-symbols-outlined { color: var(--primary-color); }
.tasks-item.is-locked { opacity: 0.6; }

.tasks-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tasks-item-text strong {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.tasks-item-text small { font-size: 11px; color: var(--text-variant); }

/* Aviso na tela Gravar quando a pessoa está no horário de um rolê. */
.rec-meetup {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-on-surface);
  border-color: var(--secondary-color);
}

.rec-meetup .material-symbols-outlined { color: var(--secondary-color); }

/* Instalar o app na tela do celular (pages/install, install_controller.js). */
.install-preview {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 18px 12px;
  background: radial-gradient(circle at 50% 30%, #2b2c33, var(--surface-low));
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
}

.install-preview-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-on-surface);
}

.install-preview-app img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6), 0 0 0 2px var(--primary-color);
}

/* Os outros apps da tela inicial, só a silhueta. */
.install-preview-app.is-ghost {
  width: 52px;
  height: 52px;
  align-self: center;
  border-radius: 14px;
  background: var(--surface-high);
  opacity: 0.6;
}

.install-status {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-on-surface);
}

.install-status[hidden] { display: none; }
.install-status.is-done { border-color: var(--tertiary-color); }
.install-status.is-done .material-symbols-outlined { color: var(--tertiary-color); }
.install-status.is-warning { border-color: var(--secondary-color); }
.install-status.is-warning .material-symbols-outlined { color: var(--secondary-color); }

.install-screen .tactile-btn-primary[hidden] { display: none; }

.install-platform {
  background: var(--surface-color);
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
}

.install-platform.is-mine { border-color: var(--primary-color); }

.install-platform summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  min-height: 48px;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-on-surface);
}

.install-platform summary::-webkit-details-marker { display: none; }
.install-platform summary > .material-symbols-outlined:first-child { color: var(--primary-color); }
.install-platform-title { flex: 1; }
.install-mine { display: none; }
.install-platform.is-mine .install-mine { display: inline-block; }
.install-platform-chevron { color: var(--text-variant); transition: transform 0.2s; }
.install-platform[open] .install-platform-chevron { transform: rotate(180deg); }

.install-platform > .auth-hint { padding: 0 14px 14px; }

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 14px 12px;
  list-style: none;
}

.install-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-on-surface);
}

.install-step-number {
  flex: 0 0 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-color);
  color: #121316;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
}

.install-step-text { flex: 1; }
.install-step-text strong { color: var(--primary-color); }
.install-step-icon { font-size: 22px; color: var(--text-variant); }

.install-perks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-on-surface);
}

.install-perks li { display: flex; align-items: center; gap: 10px; }
.install-perks .material-symbols-outlined { font-size: 20px; color: var(--primary-color); }
.install-skip { display: block; text-decoration: underline; }

/* Atalho "Instalar" no topo da Trilha e no Perfil: some quando o app já está instalado. */
.install-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--primary-color);
  border-radius: 14px;
  background: rgba(255, 184, 0, 0.12);
  color: var(--primary-color);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
}

.install-pill .material-symbols-outlined { font-size: 15px; }

.install-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.install-link .material-symbols-outlined { font-size: 18px; text-decoration: none; }

.is-standalone .install-pill,
.is-standalone .install-link { display: none; }

@media (display-mode: standalone) {
  .install-pill,
  .install-link { display: none; }
}

/* Abas da área do mentor (4, ou 5 para o administrador): ícone em cima do nome. */
.mentor-tabs .guide-tab {
  flex-direction: column;
  gap: 2px;
  padding: 7px 2px;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
}

/* Chat entre aprendiz e mentores (chats/_thread, chat_controller.js). */
.chat-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-sm);
  background: var(--surface-low);
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-variant);
}

.chat-note .material-symbols-outlined { font-size: 18px; color: var(--primary-color); }

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 200px;
  max-height: calc(100dvh - 380px);
  padding: 12px;
  overflow-y: auto;
  list-style: none;
  background: var(--surface-color);
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
  overscroll-behavior: contain;
}

.chat-empty {
  margin: auto;
  max-width: 260px;
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-variant);
}

.chat-bubble {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 82%;
  padding: 8px 11px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.4;
}

.chat-bubble.is-theirs {
  align-self: flex-start;
  background: var(--surface-high);
  color: var(--text-on-surface);
  border-bottom-left-radius: 4px;
}

.chat-bubble.is-mine {
  align-self: flex-end;
  background: var(--primary-color);
  color: #121316;
  border-bottom-right-radius: 4px;
}

.chat-author { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; opacity: 0.75; }
.chat-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-bubble time { align-self: flex-end; font-size: 10px; opacity: 0.65; }

.chat-form { display: flex; flex-direction: column; gap: 8px; }

.chat-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-input { flex: 1; resize: none; font-size: 16px; } /* 16px: o iPhone não dá zoom ao tocar */

.chat-send {
  flex: 0 0 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 3px 0 var(--primary-shadow);
  color: #121316;
  cursor: pointer;
}

.chat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(253, 89, 30, 0.25);
}

/* Lista de conversas do mentor. */
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.chat-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  min-height: 56px;
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
  background: var(--surface-color);
  color: var(--text-on-surface);
  text-decoration: none;
}

.chat-list-item.is-unread { border-color: var(--secondary-color); }
.chat-list-icon { color: var(--primary-color); }

.chat-list-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-list-text strong { display: flex; align-items: center; gap: 6px; font-size: 13px; overflow-wrap: anywhere; }
.chat-list-text small { font-size: 11.5px; color: var(--text-variant); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list-item.is-unread .chat-list-text small { color: var(--text-on-surface); font-weight: 700; }

.chat-list-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-variant);
}

/* Atalhos para o chat: no cabeçalho de cada aprendiz (mentor) e na Zine do aprendiz. */
.mentor-chat-link {
  margin-left: auto;
  flex: 0 0 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--surface-highest);
  border-radius: 50%;
  color: var(--primary-color);
  text-decoration: none;
}

.zine-chat-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
  background: var(--surface-color);
  color: var(--text-on-surface);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.zine-chat-link > .material-symbols-outlined:first-child { color: var(--primary-color); }
.zine-chat-link > span:nth-child(2) { flex: 1; }
.zine-chat-link.is-unread { border-color: var(--secondary-color); }

/* Botão "Continuar com o Google" (shared/_google_button), no tema escuro que o Google
   define para o botão: fundo #131314, borda #8E918F e o "G" de quatro cores sem mudar. */
.google-form { display: flex; }

.google-btn {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid #8e918f;
  border-radius: 26px;
  background: #131314;
  color: #e3e3e3;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.google-btn:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.google-btn .google-g { width: 20px; height: 20px; flex-shrink: 0; }

/* Tela do nickname#0000 (nicknames/edit). */
.nickname-fields {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.nickname-name { flex: 1; min-width: 0; }
.nickname-tag { flex: 0 0 92px; }
.nickname-tag .auth-input { text-align: center; letter-spacing: 2px; font-variant-numeric: tabular-nums; }

.nickname-hash {
  padding-bottom: 12px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--primary-color);
}

.nickname-preview { font-size: 13px; color: var(--text-variant); overflow-wrap: anywhere; }
.nickname-preview strong { color: var(--primary-color); font-family: var(--font-display); font-size: 15px; }
.profile-handle { font-weight: 700; overflow-wrap: anywhere; }

/* Sem os menus (antes da trilha): o conteúdo vai de ponta a ponta e respeita o
   entalhe e a barra do iPhone, que antes ficavam por conta dos menus. Os 12px a mais
   em cima dão um respiro no lugar do menu de cima. */
.phone-container.no-app-menus .phone-content {
  padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Primeira tela (pages/landing): a logo e as opções de entrar. */
.splash {
  flex: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.splash-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}

.splash-logo {
  width: 100%;
  max-width: 360px;
  height: auto;
}

.splash-tagline {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-on-surface);
  text-wrap: balance;
}

.splash-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.splash-secondary {
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  text-decoration: none;
}

/* "Começar agora!" na tela da logo: o botão principal, com o texto no meio. */
.splash-start {
  min-height: 56px;
  justify-content: center;
  gap: 10px;
  font-size: 18px;
}

.splash-start:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Painel do super administrador (admin/*). */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
}

/* Número que sobra sozinho na última linha ocupa a linha toda. */
.admin-stats li:last-child:nth-child(odd) { grid-column: 1 / -1; }

.admin-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: var(--text-on-surface);
}

.admin-stat .material-symbols-outlined { color: var(--primary-color); font-size: 22px; }
.admin-stat strong { font-family: var(--font-display); font-size: 26px; font-weight: 900; line-height: 1; }

.admin-search {
  display: flex;
  gap: 8px;
}

.admin-search .auth-input { flex: 1; min-width: 0; }
.admin-search .auth-secondary-btn { width: auto; min-width: 48px; display: flex; align-items: center; justify-content: center; }

.admin-video summary { cursor: pointer; width: fit-content; }
.admin-video[open] { display: flex; flex-direction: column; gap: 8px; }
.admin-video-player { width: 100%; max-height: 420px; border-radius: var(--radius-sm); background: #000; }

.admin-review-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.admin-review-text dt { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-variant); }
.admin-review-text dd { color: var(--text-on-surface); overflow-wrap: anywhere; }
.admin-user .mentor-request-actions,
.admin-feedback .mentor-request-actions { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.admin-email { overflow-wrap: anywhere; } /* e-mail comprido não estoura o cartão no celular */

/* Opinião sobre o app no painel: mantém as quebras de linha que a pessoa escreveu. */
.admin-feedback-text {
  font-size: 14px;
  color: var(--text-on-surface);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* Fim da tela de Ajuda: o cartão "Sua opinião sobre o app". */
.feedback-card { gap: 10px; padding: 16px; }

.feedback-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  text-transform: uppercase;
  color: var(--text-on-surface);
}

.feedback-title .material-symbols-outlined { color: var(--primary-color); }

/* Coluna do conteúdo (layout): borda a borda no celular, centralizada e mais larga em
   tablet e computador. */
.screen.app-column {
  width: 100%;
  padding: 14px calc(var(--column-gutter) + var(--screen-pad)); /* a rolagem fica na borda da janela */
}

/* Menu de baixo da conta de mentor (shared/_mentor_nav): número em cada ícone. */
.nav-icon-wrap,
.mentor-nav .nav-fab-btn {
  position: relative;
  display: inline-flex;
}

.nav-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 2px solid var(--bg-color);
  background: var(--secondary-color);
  color: #000;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.mentor-nav .nav-fab-btn .nav-badge { top: -4px; right: -6px; }
.mentor-nav .nav-fab-btn.is-active { outline: 2px solid var(--primary-color); outline-offset: 3px; }

/* Perfil: cartão "Seus dados" (LGPD). */
.profile-privacy { gap: 10px; }
.profile-privacy .auth-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  width: fit-content;
}
.profile-privacy .auth-link { text-decoration: none; }
.profile-privacy .link-text { text-decoration: underline; text-underline-offset: 3px; }
.profile-privacy .material-symbols-outlined { font-size: 18px; }
.danger-link { color: var(--error-color); }

/* Política de Privacidade e Termos de Uso (pages/privacy, pages/terms). */
.legal-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 640px;
  width: 100%;
  margin-inline: auto;
  padding-bottom: 12px;
}

.legal-summary {
  padding: 12px 14px;
  border: 1px solid rgba(255, 184, 0, 0.4);
  border-radius: var(--radius-md);
  background: var(--surface-color);
  font-size: 13px;
  line-height: 1.5;
}

.legal-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-variant);
}

.legal-section h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text-on-surface);
}

.legal-section strong { color: var(--text-on-surface); }

.legal-section ul,
.legal-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 18px;
}

.legal-list { padding: 12px 14px 12px 32px; font-size: 13px; line-height: 1.5; }

/* Aceite dos termos (tela de idade): a linha toda marca a caixa, com área de toque grande. */
.legal-accept {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
  background: #1a1b20;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-on-surface);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.legal-accept:has(input:checked) { border-color: var(--primary-color); }
.legal-accept input { width: 24px; height: 24px; flex-shrink: 0; margin: 0; accent-color: var(--primary-color); }
.legal-read { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--text-variant); }
.legal-read a { display: inline-flex; align-items: center; min-height: 32px; }
.splash-legal { margin-top: -4px; }
.splash-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; min-height: 24px; display: inline-flex; align-items: center; }

/* Zine do aprendiz: devolutiva que chegou e ainda não foi aberta. */
.zine-new {
  margin-right: auto; /* fica colada ao nome da manobra */
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--secondary-color);
  color: #000;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Prazo do vídeo (apagado sozinho 1 mês depois do envio). */
.zine-expiry {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-variant);
}

.zine-expiry .material-symbols-outlined { font-size: 16px; }
.zine-expiry.is-soon { color: var(--secondary-color); font-weight: 700; }

/* Tela de envio do vídeo (recordings/_sending): anel que enche com o upload. */
.send-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 0 8px;
  text-align: center;
}

.send-screen[hidden] { display: none; }

.send-ring {
  position: relative;
  width: 168px;
  height: 168px;
  flex-shrink: 0;
}

.send-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.send-ring circle { fill: none; stroke-width: 10; }
.send-ring-track { stroke: var(--surface-highest); }

.send-ring-fill {
  stroke: var(--primary-color);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.25s ease-out, stroke 0.2s ease;
}

.send-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.send-ring-icon { font-size: 34px; color: var(--primary-color); }
.send-ring-center strong { font-family: var(--font-display); font-size: 26px; font-weight: 900; color: var(--text-on-surface); }

.send-screen[data-upload-sender-state-value="offline"] .send-ring-icon,
.send-screen[data-upload-sender-state-value="error"] .send-ring-icon { color: var(--secondary-color); }
.send-screen[data-upload-sender-state-value="done"] .send-ring-fill,
.send-screen[data-upload-sender-state-value="empty"] .send-ring-fill { stroke: var(--tertiary-color); }
.send-screen[data-upload-sender-state-value="done"] .send-ring-icon,
.send-screen[data-upload-sender-state-value="empty"] .send-ring-icon { color: var(--tertiary-color); font-size: 56px; }
.send-screen[data-upload-sender-state-value="offline"] .send-ring-fill { stroke: var(--secondary-color); }

.send-actions {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.send-next { justify-content: center; gap: 8px; }
.send-actions [hidden] { display: none; }

/* Aviso do topo: vídeo guardado no aparelho esperando envio. */
.pending-upload {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px calc(var(--column-gutter) + var(--screen-pad)) 0;
  padding: 10px 12px;
  border: 1px solid var(--secondary-color);
  border-radius: var(--radius-md);
  background: var(--surface-color);
  color: var(--text-on-surface);
  font-size: 12px;
  text-decoration: none;
}

.pending-upload[hidden] { display: none; }
.pending-upload .material-symbols-outlined { color: var(--secondary-color); }
.pending-upload strong { margin-left: auto; color: var(--primary-color); white-space: nowrap; }

/* Checklist pré-sessão (training_sessions/new): o marcado vem do checkbox (:has). */
.check-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.check-item .check-box-square { border-radius: 6px; color: transparent; }
.check-item .check-box-square .material-symbols-outlined { font-size: 16px; }
.check-item .check-text { font-size: 12px; font-weight: 700; color: var(--text-on-surface); }

.check-item:has(.check-input:checked) { border-color: #30D158; background: #18231c; }
.check-item:has(.check-input:checked) .check-box-square { background: #30D158; border-color: #30D158; color: #000; }
.check-item:has(.check-input:focus-visible) { outline: 2px solid var(--primary-color); outline-offset: 2px; }

.check-hint { text-align: center; }
.check-hint[hidden] { display: none; }

/* Botão principal desligado (ex.: checklist incompleto): fica claro que não dá para tocar. */
.tactile-btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none;
}

/* Gravar: trocar entre câmera traseira e frontal. */
.rec-switch-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.rec-switch-btn[hidden] { display: none; }
.rec-switch-btn .material-symbols-outlined { font-size: 28px; }
.rec-switch-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.rec-switch-btn:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }

/* A câmera frontal aparece espelhada na tela (o vídeo gravado fica normal). */
.rec-video-frame video.is-mirrored { transform: scaleX(-1); }

/* Gravar: barra de corte (clip_trim_controller). O trecho escolhido tem borda amarela e
   alças grossas nas pontas, por fora do trecho: dá para pegar mesmo num trecho curto. */
.rec-trim {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
  background: #1a1b20;
}

.rec-trim-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.rec-trim-length {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-variant);
  font-variant-numeric: tabular-nums;
}

.rec-trim-length strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  color: var(--primary-color);
}

.rec-trim-bar {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
}

.rec-trim-play {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 3px 0 var(--primary-shadow);
  color: black;
  cursor: pointer;
}

.rec-trim-play .material-symbols-outlined { font-size: 28px; font-variation-settings: "FILL" 1; }
.rec-trim-play:focus-visible,
.rec-trim-handle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* A barra, com uma marquinha por segundo (--trim-tick vem do JavaScript). As margens
   deixam lugar para as alças quando o trecho encosta no começo ou no fim. */
.rec-trim-track {
  position: relative;
  height: 48px;
  margin: 0 16px;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px) 0 50% / var(--trim-tick, 10%) 40% repeat-x,
    var(--surface-low);
  touch-action: none; /* arrastar no celular não rola a página */
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}

.rec-trim-range {
  position: absolute;
  top: 0;
  bottom: 0;
  border-top: 3px solid var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
  background: rgba(255, 184, 0, 0.18);
  cursor: grab;
}

.rec-trim-track.is-dragging .rec-trim-range { cursor: grabbing; }

.rec-trim-handle {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  cursor: ew-resize;
}

.rec-trim-handle.is-start { right: 100%; border-radius: 6px 0 0 6px; }
.rec-trim-handle.is-end   { left: 100%;  border-radius: 0 6px 6px 0; }

/* O risquinho da alça e uma área de toque de 44px, maior que a alça. */
.rec-trim-handle::after {
  content: "";
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.55);
}

.rec-trim-handle::before {
  content: "";
  position: absolute;
  inset: -8px -14px;
}

/* Onde o vídeo está tocando. */
.rec-trim-playhead {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.rec-trim-times {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-variant);
  font-variant-numeric: tabular-nums;
}

.rec-trim-times strong { color: var(--text-on-surface); font-weight: 800; }

.rec-trim-tips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  counter-reset: dica;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-variant);
}

.rec-trim-tips li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  counter-increment: dica;
}

.rec-trim-tips li::before {
  content: counter(dica);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-highest);
  color: var(--primary-color);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
}

/* Texto só para leitor de tela (ex.: "8 rolamentos" num ícone). */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Rolamentos: a nota do aprendiz ao mentor (RolamentosHelper#rolamento_icon). */
.rolamento {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--primary-color);
}

/* "◎ 8,7 · 12 alunos avaliaram" */
.mentor-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-variant);
  font-variant-numeric: tabular-nums;
}

.mentor-score strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  color: var(--primary-color);
}

.mentor-name {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--text-on-surface);
}

.mentor-name small {
  margin-left: 2px;
  font-family: var(--font-body);
  font-size: 0.8em;
  font-weight: 600;
  color: var(--text-variant);
}

/* Escolha do mentor (telas Gravar e Resultado): cartões de escolha com o resumo. */
.mentor-picker legend { margin-bottom: 4px; }
.mentor-choice { align-items: flex-start; }
.mentor-choice .choice-icon { margin-top: 2px; }
.mentor-choice .choice-text { gap: 4px; }
.mentor-choice .mentor-name { font-size: 14px; }
.mentor-choice .mentor-bio { font-size: 11.5px; line-height: 1.4; }
.mentor-choice .choice-mark { margin-top: 2px; }
.result-mentor-picker { margin-top: 14px; }

/* Na devolutiva e na espera: quem avaliou (ou vai avaliar) e a média. */
.review-mentor {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 10px 12px;
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
  background: #1a1b20;
}

.review-mentor > .material-symbols-outlined { color: var(--primary-color); }

.review-mentor-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 140px;
}

.review-mentor .mentor-name { font-size: 15px; }

/* Avaliar o mentor: 10 rolamentos para tocar (acendem até o escolhido, só com CSS). */
.review-rating { margin-top: 4px; }

.review-rating-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-rating-form .auth-card-label small {
  font-weight: 600;
  text-transform: none;
  color: var(--text-variant);
}

.rolamentos-input {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  border: none;
}

.rolamentos-input input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rolamentos-input label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 40px;
  border-radius: 6px;
  color: var(--surface-highest);
  cursor: pointer;
  transition: color 0.1s ease, transform 0.1s ease;
}

.rolamentos-input .rolamento {
  width: 26px;
  height: 26px;
  color: inherit;
}

.rolamentos-input label:has(~ input:checked),
.rolamentos-input input:checked + label { color: var(--primary-color); }
.rolamentos-input input:checked + label { transform: scale(1.12); }
.rolamentos-input input:focus-visible + label { outline: 2px solid var(--primary-color); outline-offset: 1px; }

.rolamentos-scale {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-variant);
}

.rolamentos-given {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
}

.rolamentos-given .rolamento { width: 20px; height: 20px; color: var(--surface-highest); }
.rolamentos-given .rolamento.is-on { color: var(--primary-color); }
.rolamentos-given strong { margin-left: 6px; font-family: var(--font-display); color: var(--primary-color); }

.review-rating-comment {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-on-surface);
}

/* Perfil da conta de mentor: nome, média, resumo e o que os alunos disseram. */
.mentor-profile, .review-rating { gap: 8px; }
.mentor-profile .mentor-name { font-size: 18px; }
.mentor-profile .auth-form { gap: 8px; }

.mentor-feedback {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.mentor-feedback li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-on-surface);
}

.mentor-feedback small { color: var(--text-variant); }

/* Perfil do aprendiz (área do mentor): números, respostas do cadastro e observações. */
.learner-profile {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 2px 8px;
}

.learner-profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

/* No chat, o cartão com o nome abre o perfil. */
.mentor-learner-head.is-link {
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.mentor-learner-head.is-link:hover { background: #24252a; }
.mentor-learner-head.is-link:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.mentor-learner-go { color: var(--text-variant); }

.mentor-learner-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--surface-highest);
  text-underline-offset: 3px;
}

.learner-answers dl {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.learner-answers dt {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-variant);
}

.learner-answers dd {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-on-surface);
}

.learner-answers dd:not(:last-child) { margin-bottom: 6px; }

.learner-answers,
.learner-notes { gap: 8px; }

.learner-notes .auth-form { gap: 8px; }

.learner-notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.learner-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-left: 3px solid var(--primary-color);
  border-radius: var(--radius-sm);
  background: #1a1b20;
}

.learner-note-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.learner-note-head .mentor-name { font-size: 13px; }
.learner-note-head small { flex: 1; font-size: 10.5px; color: var(--text-variant); }

.learner-note p {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-on-surface);
  white-space: pre-line; /* mantém as quebras de linha que o mentor escreveu */
  overflow-wrap: anywhere;
}

.learner-note-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-variant);
  cursor: pointer;
}

.learner-note-delete:hover,
.learner-note-delete:focus-visible { color: var(--error-color); }
.learner-note-delete .material-symbols-outlined { font-size: 20px; }

/* Com o menu de baixo, o botão do meio (Gravar / Na fila) sobe ~26px acima do menu.
   O espaço no fim do conteúdo garante que o último botão da tela (ex.: "Enviar vídeo")
   pare acima dele. É um item no fim da coluna (e não padding), porque o padding de baixo
   não entra na rolagem quando o conteúdo passa da altura da tela. */
.phone-container:not(.no-app-menus) .screen.active::after {
  content: "";
  display: block;
  flex: 0 0 auto;
  height: 40px;
}

/* Perguntas do cadastro: a opção marcada fica destacada também quando a pessoa volta à
   pergunta (antes, o destaque só aparecia ao tocar). O !important vence o estilo da tela. */
.option-card:has(input:checked) { border-color: var(--primary-color) !important; }
.diagnosis-back { align-self: flex-start; margin-bottom: 4px; }

/* Menu do ☰ (shared/_app_menu): painel abaixo do topo, sobre um fundo escuro que fecha
   ao tocar. No app instalado, o atalho "Instalar" some. */
.app-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0, 0, 0, 0.5);
}

.app-menu-panel {
  position: fixed;
  top: calc(54px + env(safe-area-inset-top, 0px) + 6px);
  left: max(8px, env(safe-area-inset-left, 0px), var(--column-gutter));
  z-index: 200;
  width: min(300px, calc(100vw - 16px));
  max-height: calc(100dvh - 54px - env(safe-area-inset-top, 0px) - 24px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--surface-highest);
  border-radius: var(--radius-md);
  background: var(--surface-color);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.app-menu-backdrop[hidden],
.app-menu-panel[hidden] { display: none; }

.app-menu-panel ul { display: flex; flex-direction: column; gap: 2px; list-style: none; }

.app-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-on-surface);
  font: 600 14px var(--font-body);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.app-menu-item .material-symbols-outlined { color: var(--primary-color); font-size: 22px; }
.app-menu-item:hover,
.app-menu-item:focus-visible { background: #24252a; outline: none; }
.app-menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--primary-color); }
.app-menu-item.is-exit .material-symbols-outlined { color: var(--error-color); }
.app-menu-panel form { display: block; }
.is-standalone .app-menu-install { display: none; }

/* Celular e tablet (toque): campos com letra de pelo menos 16px. Com o zoom liberado,
   o iPhone dá zoom sozinho ao tocar num campo com letra menor (e a tela fica torta).
   O !important vence os tamanhos menores das telas antigas (estilo na própria tag).
   O campo do ano (24px) já é maior. */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(.auth-input-code),
  select,
  textarea {
    font-size: 16px !important;
  }
}
