/* ==========================================================================
   UNISS — Missão Kaizen: Modo Pitch
   Folha de Estilos — Sistema Retro RPG, Diálogos Pokémon & Apresentação de KPIs
   ========================================================================== */

:root {
  --uniss-navy-950: #070d18;
  --uniss-navy-900: #0f172a;
  --uniss-navy-800: #1e293b;
  --uniss-black: #000000;
  --uniss-white: #ffffff;
  --uniss-text: #111111;
  --uniss-gray-100: #f1f5f9;
  --uniss-gray-200: #e2e8f0;
  --uniss-gray-400: #94a3b8;
  --uniss-green-600: #16a34a;
  --uniss-green-100: #dcfce7;
  --uniss-red-600: #dc2626;
  --uniss-red-100: #fee2e2;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background-color: var(--uniss-navy-950);
  color: var(--uniss-text);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ==========================================================================
   LAYOUT GERAL DA APLICAÇÃO (Ecrã Total sem Barra Superior)
   ========================================================================== */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* ==========================================================================
   CONTROLOS DE CANTO RETRO RPG (Menu e Ecrã Total)
   ========================================================================== */
.top-corner-controls {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-retro-control {
  background-color: #ffffff;
  color: #111111;
  border: 3px solid #000000;
  border-radius: 4px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000000;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease;
  user-select: none;
}

.btn-retro-control:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #000000;
  background-color: #f8fafc;
}

.btn-retro-control:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000000;
}

.control-icon {
  font-size: 0.95rem;
  font-weight: bold;
}

.control-label {
  display: inline-block;
}

/* ==========================================================================
   PALCO PRINCIPAL (CENÁRIO DA IPSS EM ECRÃ TOTAL)
   ========================================================================== */
.main-stage-layout {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--uniss-navy-950);
}

.scenario-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scenario-viewport {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.scenario-stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1376 / 768;
  overflow: hidden;
  background: #000000;
}

.scenario-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* Camada de Escurecimento do Cenário (Overlay 55% durante Diálogos) */
.scenario-dimming-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 10;
}

.scenario-dimming-overlay.active {
  opacity: 1;
}

/* Controlo Discreto de Observação entre Fases */
.observation-controls-bar {
  position: absolute;
  bottom: 32px;
  right: 36px;
  z-index: 30;
  transition: opacity 0.3s ease;
}

.observation-controls-bar.hidden {
  display: none;
}

.btn-continue-observation {
  background-color: #ffffff;
  color: #000000;
  border: 3px solid #000000;
  border-radius: 4px;
  box-shadow: 4px 4px 0 #000000;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
}

.btn-continue-observation:hover {
  transform: translate(-1px, -1px);
  background-color: #f8fafc;
  box-shadow: 5px 5px 0 #000000;
}

.btn-continue-observation:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000000;
}

/* ==========================================================================
   CAMADA DE DIÁLOGOS NARRATIVOS ESTILO POKÉMON (OVERLAY FIXO)
   ========================================================================== */
.dialogue-system-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
  z-index: 100;
}

/* Palco das Personagens (Posicionado imediatamente acima da caixa de diálogo) */
.portrait-stage-container {
  position: relative;
  width: 100vw;
  height: min(48vh, 440px);
  pointer-events: none;
  overflow: visible;
}

.portrait-stage {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.portrait-wrapper {
  position: absolute;
  bottom: 0;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease-in-out;
}

/* Gestora da UNISS — Exclusivamente no Lado Esquerdo */
.portrait-left {
  left: max(6vw, env(safe-area-inset-left));
}

/* Gestor da IPSS — Exclusivamente no Lado Direito */
.portrait-right {
  right: max(6vw, env(safe-area-inset-right));
}

/* Apenas a personagem ativa fica visível */
.portrait-wrapper.active {
  opacity: 1;
  visibility: visible;
}

.portrait-image {
  height: 100%;
  width: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: bottom;
  display: block;
}

/* ==========================================================================
   CAIXA DE DIÁLOGO BRANCA FIXA NA INFERIOR DO ECRÃ (100vw)
   ========================================================================== */
.dialogue-box-container {
  width: 100vw;
  position: relative;
  pointer-events: auto;
  flex-shrink: 0;
}

.dialogue-box-container.hidden {
  display: none !important;
}

.pokemon-dialogue-box {
  width: 100vw;
  background-color: #ffffff;
  color: #111111;
  border-top: 4px solid #000000;
  border-left: 4px solid #000000;
  border-right: 4px solid #000000;
  border-bottom: 4px solid #000000;
  border-radius: 4px 4px 0 0;
  padding: 24px 36px 28px 36px;
  min-height: 165px;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  user-select: none;
}

/* Nomeplate do Interlocutor (Cargo em Negrito Preto no Canto Superior Esquerdo) */
.dialogue-speaker-nameplate {
  font-size: 1.15rem;
  font-weight: 800;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  font-family: inherit;
  display: block;
}

/* Área de Conteúdo da Fala */
.dialogue-content-area {
  position: relative;
  min-height: 3.2em;
}

.dialogue-text-paragraph {
  font-size: 1.25rem;
  line-height: 1.5;
  color: #111111;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Indicador de Continuação Triangular Piscante (▼) */
.dialogue-advance-prompt {
  position: absolute;
  right: max(36px, env(safe-area-inset-right));
  bottom: 16px;
  display: none;
  pointer-events: none;
}

.dialogue-advance-prompt.visible {
  display: block;
}

.advance-triangle {
  display: inline-block;
  color: #000000;
  font-size: 1.3rem;
  animation: blinkTriangle 0.8s infinite ease-in-out;
}

@keyframes blinkTriangle {
  0%, 100% {
    opacity: 1;
    transform: translateY(0);
  }
  50% {
    opacity: 0.15;
    transform: translateY(4px);
  }
}

/* ==========================================================================
   MENU DE DECISÕES INTEGRADO DENTRO DA CAIXA BRANCA
   ========================================================================== */
.decision-menu-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: default;
}

.decision-question-prompt {
  font-size: 1.15rem;
  font-weight: 800;
  color: #000000;
  margin-bottom: 4px;
}

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

.choice-option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  background-color: transparent;
  transition: background-color 0.15s ease;
  user-select: none;
}

.choice-option-row:hover,
.choice-option-row.selected {
  background-color: #f1f5f9;
}

.choice-selector-arrow {
  font-size: 1.15rem;
  color: #000000;
  font-weight: bold;
  width: 1.2em;
  display: inline-block;
}

.choice-label {
  font-size: 1.15rem;
  font-weight: 600;
  color: #111111;
  line-height: 1.35;
}

/* ==========================================================================
   OVERLAY CENTRAL DE APRESENTAÇÃO DE KPIS (ESTILO RETRO RPG)
   ========================================================================== */
.kpi-presentation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(7, 13, 24, 0.78);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}

.kpi-presentation-overlay.hidden {
  display: none !important;
}

.kpi-presentation-box {
  background-color: #ffffff;
  color: #111111;
  border: 4px solid #000000;
  border-radius: 4px;
  box-shadow: 10px 10px 0 #000000;
  max-width: 620px;
  width: 100%;
  padding: 28px 32px;
  box-sizing: border-box;
  animation: retroPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes retroPopIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.kpi-inner-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi-panel-badge {
  display: inline-block;
  align-self: flex-start;
  background-color: #000000;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
}

.kpi-panel-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #000000;
  letter-spacing: -0.01em;
}

.kpi-intervention-subtitle {
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
  border-bottom: 2px dashed #000000;
  padding-bottom: 12px;
  margin-bottom: 8px;
}

.kpi-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi-card-row {
  border: 2px solid #000000;
  border-radius: 4px;
  padding: 12px 16px;
  background-color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-card-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111111;
}

.kpi-card-badge {
  font-weight: 800;
  font-size: 0.9rem;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1.5px solid;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-card-badge.kpi-positive {
  color: #15803d;
  background-color: #dcfce7;
  border-color: #16a34a;
}

.kpi-card-badge.kpi-negative {
  color: #b91c1c;
  background-color: #fee2e2;
  border-color: #dc2626;
}

.kpi-arrow-icon {
  font-size: 1.1rem;
  font-weight: 900;
}

.kpi-values-comparison {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 800;
}

.kpi-val-old {
  color: #64748b;
  text-decoration: line-through;
  font-size: 1.05rem;
}

.kpi-separator-arrow {
  color: #94a3b8;
  font-size: 1.1rem;
}

.kpi-val-new.highlighted {
  color: #000000;
  font-size: 1.35rem;
  font-weight: 900;
  background-color: #fef08a;
  padding: 2px 8px;
  border: 1.5px solid #000000;
  border-radius: 3px;
}

.kpi-panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.btn-retro-kpi-continue {
  background-color: #ffffff;
  color: #000000;
  border: 3px solid #000000;
  border-radius: 4px;
  box-shadow: 4px 4px 0 #000000;
  font-size: 1.05rem;
  font-weight: 900;
  padding: 10px 22px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease, color 0.1s ease;
}

.btn-retro-kpi-continue:hover {
  background-color: #000000;
  color: #ffffff;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4);
}

.btn-retro-kpi-continue:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000000;
}

.retro-arrow-prompt {
  font-size: 1rem;
}

/* ==========================================================================
   MENU RETRO RPG (SUBSTITUTO DA BARRA SUPERIOR)
   ========================================================================== */
.retro-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(7, 13, 24, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 250;
  padding: 1.5rem;
}

.retro-menu-overlay.hidden {
  display: none !important;
}

.retro-menu-box {
  background-color: #ffffff;
  color: #111111;
  border: 4px solid #000000;
  border-radius: 4px;
  box-shadow: 8px 8px 0 #000000;
  max-width: 520px;
  width: 100%;
  padding: 24px 28px;
  box-sizing: border-box;
  animation: retroPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.retro-menu-window {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.retro-menu-header {
  border-bottom: 2px solid #000000;
  padding-bottom: 10px;
  text-align: center;
}

.retro-menu-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #000000;
  letter-spacing: 0.05em;
}

.retro-menu-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.retro-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 3px;
  border: 2px solid transparent;
  cursor: pointer;
  background-color: transparent;
  transition: background-color 0.12s ease, border-color 0.12s ease;
  user-select: none;
}

.retro-menu-item:hover,
.retro-menu-item.selected {
  background-color: #f1f5f9;
  border-color: #000000;
}

.retro-menu-selector {
  font-size: 1.1rem;
  color: #000000;
  font-weight: 900;
  width: 1.2em;
  display: inline-block;
}

.retro-menu-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111111;
}

.retro-menu-footer {
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  font-weight: 600;
}

/* Subvistas do Menu */
.retro-info-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
}

.retro-phase-badge {
  display: inline-block;
  align-self: flex-start;
  background: #000000;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 2px;
}

.retro-phase-name {
  font-size: 1.25rem;
  font-weight: 900;
  color: #000000;
}

.retro-phase-desc {
  font-size: 0.95rem;
  line-height: 1.45;
  color: #334155;
  font-weight: 500;
}

/* Progresso de Melhorias Kaizen */
.retro-progress-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}

.retro-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 2px solid #000000;
  border-radius: 4px;
  background-color: #f8fafc;
}

.retro-progress-row.completed {
  background-color: #f0fdf4;
  border-color: #16a34a;
}

.retro-check-mark {
  font-family: monospace;
  font-size: 1.2rem;
  font-weight: 900;
  color: #000000;
}

.retro-progress-row.completed .retro-check-mark {
  color: #16a34a;
}

.retro-progress-title {
  font-size: 1rem;
  font-weight: 800;
  color: #111111;
}

/* Confirmação de Reinício */
.retro-confirm-prompt {
  font-size: 1.1rem;
  font-weight: 800;
  color: #000000;
  text-align: center;
  padding: 12px 0 6px;
  line-height: 1.4;
}

/* ==========================================================================
   MODAL / CARTÃO DE CONCLUSÃO FINAL DA MISSÃO (ESTILO RETRO RPG)
   ========================================================================== */
.completion-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(7, 13, 24, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 220;
  padding: 1.5rem;
}

.completion-modal-overlay.hidden {
  display: none !important;
}

.completion-card {
  background-color: #ffffff;
  color: #111111;
  border: 4px solid #000000;
  border-radius: 4px;
  box-shadow: 10px 10px 0 #000000;
  max-width: 650px;
  width: 100%;
  padding: 28px 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: retroPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.completion-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.completion-badge {
  display: inline-block;
  align-self: flex-start;
  background-color: #000000;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 2px;
  letter-spacing: 0.06em;
}

.completion-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: #000000;
  letter-spacing: -0.01em;
}

.completion-subtitle {
  font-size: 0.9rem;
  color: #475569;
  font-weight: 600;
  line-height: 1.4;
}

.completion-interventions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.completion-intervention-item {
  background-color: #f8fafc;
  border: 2px solid #000000;
  border-radius: 3px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.intervention-step-tag {
  font-size: 0.72rem;
  font-weight: 900;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.intervention-info h4 {
  font-size: 0.98rem;
  font-weight: 800;
  color: #000000;
}

.intervention-info p {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.4;
}

.completion-motto-box {
  background-color: #fef9c3;
  border: 2px solid #000000;
  border-radius: 3px;
  padding: 12px 16px;
  text-align: center;
}

.completion-motto {
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 800;
  color: #111111;
  line-height: 1.45;
}

.completion-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.btn-completion-restart {
  background-color: #ffffff;
  color: #000000;
  border: 3px solid #000000;
  box-shadow: 4px 4px 0 #000000;
  border-radius: 4px;
  font-weight: 900;
  font-size: 0.95rem;
  padding: 10px 20px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease, color 0.1s ease;
  font-family: inherit;
}

.btn-completion-restart:hover {
  background-color: #000000;
  color: #ffffff;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4);
}

.btn-completion-restart:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000000;
}

/* ==========================================================================
   OTIMIZAÇÃO EXCLUSIVA PARA MOBILE EM HORIZONTAL (LANDSCAPE)
   Requisitos:
   - Ocultar/adaptar espaço da barra do navegador (Google/Chrome)
   - Ajustar dimensões compactas das caixas de KPIs e Menu
   ========================================================================== */
@media screen and (orientation: landscape) and (max-height: 550px) {

  /* Controlos no topo: compactos e respeitando safe-area */
  .top-corner-controls {
    top: max(8px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    gap: 6px;
  }

  .btn-retro-control {
    padding: 5px 10px;
    font-size: 0.72rem;
    box-shadow: 2px 2px 0 #000000;
    border-width: 2px;
    gap: 4px;
  }

  .control-icon {
    font-size: 0.85rem;
  }

  /* Palco das Personagens: altura proporcional para não tapar o cenário */
  .portrait-stage-container {
    height: min(36vh, 135px);
  }

  .portrait-left {
    left: max(4vw, env(safe-area-inset-left));
  }

  .portrait-right {
    right: max(4vw, env(safe-area-inset-right));
  }

  /* Caixa de Diálogo Pokémon: mais compacta para maximizar visão do mapa */
  .pokemon-dialogue-box {
    padding: 8px 16px 10px 16px;
    min-height: 85px;
    border-top-width: 3px;
    border-left-width: 3px;
    border-right-width: 3px;
    border-bottom-width: 3px;
  }

  .dialogue-speaker-nameplate {
    font-size: 0.82rem;
    margin-bottom: 2px;
  }

  .dialogue-content-area {
    min-height: 2.2em;
  }

  .dialogue-text-paragraph {
    font-size: 0.92rem;
    line-height: 1.3;
    min-height: 2.4em;
  }

  .dialogue-advance-prompt {
    right: max(16px, env(safe-area-inset-right));
    bottom: 6px;
  }

  .advance-triangle {
    font-size: 0.95rem;
  }

  /* Menu de Opções dentro do diálogo */
  .decision-menu-container {
    gap: 4px;
  }

  .decision-question-prompt {
    font-size: 0.85rem;
    margin-bottom: 2px;
  }

  .decision-options-list {
    gap: 3px;
  }

  .choice-option-row {
    padding: 3px 8px;
    gap: 6px;
  }

  .choice-selector-arrow {
    font-size: 0.85rem;
    width: 0.9em;
  }

  .choice-label {
    font-size: 0.84rem;
    line-height: 1.25;
  }

  /* ========================================================================
     AJUSTE DO TAMANHO DA CAIXA DOS KPIS EM MOBILE HORIZONTAL
     - Grelha horizontal de 3 colunas para caber perfeitamente no ecrã largo
     ======================================================================== */
  .kpi-presentation-overlay {
    padding: 8px;
  }

  .kpi-presentation-box {
    max-width: 95vw;
    max-height: 94vh;
    max-height: 94dvh;
    padding: 10px 16px;
    overflow-y: auto;
    border-width: 3px;
    box-shadow: 5px 5px 0 #000000;
  }

  .kpi-inner-content {
    gap: 6px;
  }

  .kpi-panel-badge {
    font-size: 0.6rem;
    padding: 1px 6px;
    margin-bottom: 2px;
  }

  .kpi-panel-title {
    font-size: 1rem;
    margin-bottom: 2px;
  }

  .kpi-intervention-subtitle {
    font-size: 0.78rem;
    padding-bottom: 4px;
    margin-bottom: 6px;
  }

  /* 3 KPIs lado a lado na horizontal */
  .kpi-cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .kpi-card-row {
    padding: 6px 8px;
    gap: 4px;
    border-width: 1.5px;
  }

  .kpi-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .kpi-card-name {
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .kpi-card-badge {
    font-size: 0.7rem;
    padding: 1px 5px;
  }

  .kpi-values-comparison {
    font-size: 0.95rem;
    gap: 6px;
  }

  .kpi-val-old {
    font-size: 0.78rem;
  }

  .kpi-separator-arrow {
    font-size: 0.8rem;
  }

  .kpi-val-new.highlighted {
    font-size: 1rem;
    padding: 1px 5px;
  }

  .kpi-panel-actions {
    margin-top: 8px;
  }

  .btn-retro-kpi-continue {
    padding: 6px 14px;
    font-size: 0.82rem;
    border-width: 2px;
    box-shadow: 3px 3px 0 #000000;
  }

  /* ========================================================================
     AJUSTE DO TAMANHO DO MENU RETRO EM MOBILE HORIZONTAL
     ======================================================================== */
  .retro-menu-overlay {
    padding: 8px;
  }

  .retro-menu-box {
    max-width: 86vw;
    max-height: 94vh;
    max-height: 94dvh;
    padding: 10px 16px;
    border-width: 3px;
    box-shadow: 5px 5px 0 #000000;
    overflow-y: auto;
  }

  .retro-menu-window {
    gap: 6px;
  }

  .retro-menu-header {
    padding-bottom: 4px;
    border-bottom-width: 1.5px;
  }

  .retro-menu-title {
    font-size: 0.9rem;
  }

  /* 2 colunas para as opções do menu no mobile landscape */
  .retro-menu-list {
    gap: 4px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .retro-menu-item {
    padding: 5px 8px;
    gap: 5px;
  }

  .retro-menu-selector {
    font-size: 0.85rem;
    width: 0.9em;
  }

  .retro-menu-label {
    font-size: 0.82rem;
  }

  .retro-menu-footer {
    padding-top: 4px;
    font-size: 0.62rem;
  }

  .retro-info-body {
    padding: 4px 0;
    gap: 4px;
  }

  .retro-phase-badge {
    font-size: 0.6rem;
    padding: 1px 5px;
  }

  .retro-phase-name {
    font-size: 0.95rem;
  }

  .retro-phase-desc {
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .retro-progress-list {
    gap: 4px;
    padding: 4px 0;
  }

  .retro-progress-row {
    padding: 5px 8px;
    gap: 6px;
    border-width: 1.5px;
  }

  .retro-progress-title {
    font-size: 0.78rem;
  }

  .retro-check-mark {
    font-size: 0.9rem;
  }

  .retro-confirm-prompt {
    font-size: 0.85rem;
    padding: 4px 0;
  }

  /* Botão de Observação no Cenário */
  .observation-controls-bar {
    bottom: max(16px, env(safe-area-inset-bottom));
    right: max(16px, env(safe-area-inset-right));
  }

  .btn-continue-observation {
    padding: 6px 14px;
    font-size: 0.82rem;
    border-width: 2px;
    box-shadow: 3px 3px 0 #000000;
  }

  /* Modal de Conclusão */
  .completion-modal-overlay {
    padding: 8px;
  }

  .completion-card {
    max-width: 95vw;
    max-height: 94vh;
    max-height: 94dvh;
    overflow-y: auto;
    padding: 10px 16px;
    gap: 6px;
    border-width: 3px;
    box-shadow: 5px 5px 0 #000000;
  }

  .completion-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  .completion-title {
    font-size: 1rem;
  }

  .completion-subtitle {
    font-size: 0.75rem;
  }

  .completion-interventions-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .completion-intervention-item {
    padding: 5px 8px;
    gap: 2px;
    border-width: 1.5px;
  }

  .intervention-step-tag {
    font-size: 0.65rem;
  }

  .intervention-info h4 {
    font-size: 0.78rem;
  }

  .intervention-info p {
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .completion-motto-box {
    padding: 6px 8px;
    border-width: 1.5px;
  }

  .completion-motto {
    font-size: 0.78rem;
  }

  .btn-completion-restart {
    padding: 6px 14px;
    font-size: 0.82rem;
    border-width: 2px;
    box-shadow: 3px 3px 0 #000000;
  }
}
