@font-face {
  font-family: "Saira";
  src: url("./assets/fontes/Saira-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Saira";
  src: url("./assets/fontes/Saira-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
}

@font-face {
  font-family: "Open Sans";
  src: url("./assets/fontes/TIPOLOGIA/OpenSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Open Sans";
  src: url("./assets/fontes/TIPOLOGIA/OpenSans-Semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Open Sans";
  src: url("./assets/fontes/TIPOLOGIA/OpenSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

:root {
  --bg: #eef2f5;
  --bg-soft: #dfe7ec;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #004b9b;
  --panel-secondary: #7b8c96;
  --line: rgba(123, 140, 150, 0.18);
  --line-strong: rgba(0, 75, 155, 0.22);
  --text: #333b41;
  --muted: #6c7c86;
  --accent: #F6921E;
  --accent-soft: rgba(246, 146, 30, 0.12);
  --success: #00904C;
  --warning: #FDC24E;
  --danger: #F6921E;
  --shadow: 0 24px 70px rgba(0, 42, 104, 0.12);
  --radius: 24px;
  --radius-sm: 16px;
  --font-display: "Saira", "Segoe UI", sans-serif;
  --font-body: "Open Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  position: relative;
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at top left, rgba(0, 75, 155, 0.1), transparent 28%),
    radial-gradient(circle at bottom right, rgba(147, 189, 228, 0.22), transparent 32%),
    linear-gradient(180deg, #f7f9fb 0%, #e7edf1 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  background-repeat: no-repeat;
  background-size: contain;
}

body::before {
  top: -18px;
  left: -10px;
  width: min(34vw, 420px);
  height: min(20vw, 220px);
  background-image: url("./assets/elementos-graficos/FIPS-ICONES-ATIVIDADE-PRINCIPAL.svg");
}

body::after {
  right: -24px;
  bottom: -12px;
  width: min(38vw, 520px);
  height: min(22vw, 260px);
  opacity: 0.08;
  background-image: url("./assets/elementos-graficos/1x/Ativo 1.png");
}

button {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--panel-strong);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(246, 146, 30, 0.6);
  box-shadow: 0 10px 24px rgba(0, 75, 155, 0.12);
}

button.primary {
  background: linear-gradient(135deg, #004B9B, #315491);
  border-color: rgba(0, 42, 104, 0.45);
  color: #fff;
}

button.ghost {
  padding: 11px 14px;
}

.validation-reset {
  min-height: 42px;
}

.game-app {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: visible;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  flex-shrink: 0;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(135deg, #004B9B, #315491 72%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.topbar::before {
  content: "";
  position: absolute;
  left: -24px;
  top: -14px;
  width: 260px;
  height: 74px;
  opacity: 0.24;
  background: url("./assets/elementos-graficos/FIPS-ICONES-ATIVIDADE-PRINCIPAL.svg") left center / contain no-repeat;
  pointer-events: none;
}

.topbar::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -72px;
  width: 420px;
  height: 180px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar .eyebrow,
.topbar h1 {
  position: relative;
  z-index: 1;
  color: #fff;
}

.topbar button {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.topbar .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
}

h1 {
  font-size: 31px;
  line-height: 1.04;
}

h2 {
  font-size: 22px;
}

p {
  margin: 0;
  line-height: 1.5;
  color: var(--muted);
}

.topbar-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.progress-chip,
.mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-family: var(--font-display);
  color: #fff;
}

.layout {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  gap: 18px;
  min-height: 0;
  overflow: visible;
}

.layout.overlay-focus {
  display: block;
}

.board-section {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  position: relative;
}

.board-section::before,
.intro-hero::before,
.map-modal::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 88px;
  border-radius: var(--radius) var(--radius) 54px 54px;
  background: linear-gradient(135deg, #004B9B, #315491);
  pointer-events: none;
}

.board-section > *,
.side-panel > *,
.intro-hero > *,
.map-modal > * {
  position: relative;
  z-index: 1;
}

.board-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-shrink: 0;
  padding-top: 10px;
}

.board-head .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.board-head h2 {
  color: #fff;
}

.board-head-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.board-stage {
  flex: 0 0 auto;
  width: 100%;
  min-height: auto;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
}

.board-frame {
  position: relative;
  width: min(100%, 1180px);
  aspect-ratio: 15 / 8;
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(9, 21, 27, 0.35), rgba(9, 21, 27, 0.16)),
    url("./assets/tabuleiro-e-layout/tabuleiro_v3.png") center/cover no-repeat;
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.board-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(8, 1fr);
  z-index: 1;
}

.route-assets,
.route-vehicles {
  position: absolute;
  inset: 0;
}

.route-assets {
  z-index: 2;
}

.route-vehicles {
  z-index: 5;
  pointer-events: none;
}

.board-cell {
  position: relative;
  border-right: 1px solid rgba(8, 18, 24, 0.45);
  border-bottom: 1px solid rgba(8, 18, 24, 0.45);
}

.board-cell.terrain-land {
  background: rgba(130, 163, 95, 0.2);
}

.board-cell.terrain-water {
  background: rgba(74, 149, 185, 0.22);
}

.board-cell.terrain-pending {
  background: rgba(246, 211, 101, 0.1);
}

.route-tile,
.route-train {
  position: absolute;
  width: calc(100% / 15);
  height: calc(100% / 8);
}

.route-tile {
  display: grid;
  place-items: center;
  transition: opacity 0.18s ease, transform 0.18s ease, filter 0.18s ease, scale 0.18s ease;
  z-index: 2;
}

.route-tile img,
.route-train img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.26));
}

.route-tile.station img {
  width: 88%;
  height: 88%;
}

.route-tile.station {
  z-index: 3;
}

.route-tile.station.locked img {
  opacity: 0.92;
  filter: saturate(0.82) brightness(0.84) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.26));
}

.route-tile.station.unlocked img {
  opacity: 1;
}

.route-tile.station.locked::after {
  content: "";
  position: absolute;
  inset: 18%;
  background: url("./assets/trilhos/9-simbolo-bloqueio.png") center / contain no-repeat;
  pointer-events: none;
  z-index: 4;
}

.route-tile.start img,
.route-tile.finish img {
  width: 92%;
  height: 92%;
}

.route-tile.completed {
  opacity: 1;
}

.route-tile.hidden {
  opacity: 0;
  pointer-events: none;
}

.route-tile.revealed {
  opacity: 0.26;
}

.route-tile.current {
  opacity: 1;
  transform: scale(1.04);
}

.route-tile.next {
  opacity: 1;
  filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0.1));
}

.route-tile.next::after,
.route-tile.current::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 16px;
  border: 2px solid rgba(246, 146, 30, 0.86);
  box-shadow: 0 0 0 4px rgba(246, 146, 30, 0.16);
}

.route-tile.current::after {
  border-color: rgba(0, 144, 76, 0.92);
  box-shadow: 0 0 0 4px rgba(0, 144, 76, 0.16);
}

.route-tile.reviewable {
  cursor: pointer;
  z-index: 3;
  transform-origin: center;
  transition: transform 160ms ease, filter 160ms ease;
}

.route-tile.reviewable:hover {
  transform: scale(0.96);
  filter: brightness(1.04);
}

.route-tile.reviewable:focus-visible {
  transform: scale(0.96);
  filter: brightness(1.04);
  outline: none;
}

.route-tile.reviewable img {
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 12px rgba(223, 135, 87, 0.18));
}

.route-tile.reviewable .route-label {
  background: rgba(246, 146, 30, 0.96);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  font-weight: 700;
}

.route-tile.content-track.hidden,
.route-tile.terminal-track.hidden {
  opacity: 0;
  visibility: hidden;
}

.route-tile.content-track.completed,
.route-tile.terminal-track.completed {
  opacity: 1;
}

.route-label {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  min-width: 58px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(0, 75, 155, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 10px;
  font-family: var(--font-display);
  text-align: center;
  color: #fff;
  z-index: 3;
}

.route-train {
  display: grid;
  place-items: center;
}

.journey-footer {
  flex-shrink: 0;
  min-height: 0;
  display: grid;
  gap: 10px;
  overflow: hidden;
}

.wagon-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  overflow: hidden;
}

.wagon-card,
.status-box,
.turn-card,
.history-entry,
.offer-card,
.terminal-choice,
.task-card {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 242, 246, 0.98));
}

.wagon-card,
.status-box,
.turn-card,
.history-entry,
.task-card {
  padding: 10px;
}

.wagon-card img {
  width: 100%;
  aspect-ratio: 3.4 / 1;
  object-fit: contain;
  display: block;
  margin-bottom: 6px;
}

.wagon-card.locked img {
  opacity: 0.25;
}

.side-panel {
  flex: 0 0 min(420px, 32vw);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 320px;
  min-height: auto;
  overflow: visible;
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(244, 247, 249, 0.98)),
    url("./assets/elementos-graficos/FIPS-ICONES-SINALIZACOES.svg") right -70px bottom 12px / 220px auto no-repeat;
}

.side-panel.is-hidden {
  display: none;
}

.status-card {
  display: grid;
  gap: 6px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.status-box {
  padding: 9px 8px 8px;
  text-align: center;
}

.status-box strong {
  display: block;
  margin-bottom: 3px;
  font-size: 24px;
  line-height: 1;
}

.status-box-highlight {
  border-color: rgba(0, 75, 155, 0.2);
  background:
    linear-gradient(180deg, rgba(147, 189, 228, 0.22), rgba(255, 255, 255, 0.9)),
    rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.status-box span,
.wagon-card p,
.wagon-card strong {
  font-size: 10px;
  line-height: 1.2;
}

.wagon-card {
  min-width: 0;
  padding: 5px 4px;
  text-align: center;
  border-radius: 12px;
}

.wagon-card strong {
  display: block;
  margin-bottom: 1px;
}

.wagon-card p:last-child {
  opacity: 0.88;
}

.wagon-card p:nth-of-type(2) {
  display: none;
}

.wagon-card img {
  width: 100%;
  max-width: 44px;
  height: 24px;
  aspect-ratio: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 3px;
}

.wagon-card strong,
.wagon-card p {
  font-size: 8px;
  line-height: 1.05;
}

.experience-card {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
  display: grid;
  gap: 14px;
  align-content: start;
  align-items: start;
}

.turn-card {
  display: grid;
  gap: 10px;
  align-content: start;
  color: var(--text);
}

.turn-card-feedback {
  min-height: 260px;
  align-content: center;
}

.turn-card-offer {
  align-content: start;
  justify-items: center;
  gap: 10px;
  padding-block: 6px;
  text-align: center;
}

.turn-card-offer > * {
  width: 100%;
}

.turn-card-offer h3,
.turn-card-offer p {
  max-width: 30rem;
  justify-self: center;
}

.turn-card h3 {
  font-size: 20px;
  color: var(--panel-strong);
}

.turn-card p strong,
.turn-card strong {
  color: var(--text);
}

.action-row,
.offer-grid,
.metrics-row,
.task-list,
.choice-list,
.history-list {
  display: grid;
  gap: 12px;
}

.action-row {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.metrics-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.offer-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.offer-card,
.terminal-choice {
  padding: 12px;
  text-align: left;
}

.turn-card-offer .offer-grid {
  width: min(100%, 22rem);
  justify-self: center;
}

.turn-card-offer .offer-card {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 164px;
  padding: 10px 8px;
  text-align: center;
}

.offer-card img {
  width: 100%;
  max-width: 112px;
  height: 82px;
  object-fit: contain;
  display: block;
  margin: 0 auto 10px;
}

.offer-card.selected {
  border-color: rgba(0, 75, 155, 0.44);
  background: var(--accent-soft);
}

.turn-card-offer .action-row {
  width: min(100%, 22rem);
  justify-self: center;
}

.feedback {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.94);
}

.feedback.good {
  border-color: rgba(0, 144, 76, 0.3);
  background: rgba(0, 144, 76, 0.09);
  color: #136440;
}

.feedback.bad {
  border-color: rgba(246, 146, 30, 0.36);
  background: rgba(246, 146, 30, 0.12);
  color: #8d4f11;
}

.feedback.warn {
  border-color: rgba(253, 194, 78, 0.5);
  background: rgba(253, 194, 78, 0.16);
  color: #7c5a0e;
}

.terminal-feedback-screen {
  display: grid;
  align-items: center;
  min-height: 140px;
}

.terminal-feedback-screen .feedback {
  padding: 18px 20px;
  font-size: 1.05rem;
  line-height: 1.55;
}

.map-modal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.98);
  border: none;
  box-shadow: none;
  pointer-events: auto;
  overflow: hidden;
  animation: mapModalEnter 240ms ease-out both;
}

.map-modal::before {
  display: none;
}

.map-overlay-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  padding: 0;
  background: rgba(0, 42, 104, 0.18);
  backdrop-filter: none;
  overflow: hidden;
}

.map-overlay-layer.has-modal {
  display: block;
  pointer-events: auto;
}

.map-modal-head,
.map-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-modal-head {
  flex: 0 0 auto;
  min-height: 64px;
  padding: 12px clamp(14px, 2vw, 28px);
  background: rgba(0, 44, 96, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.map-modal-head > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.map-modal-head .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.map-modal-head h3 {
  font-size: clamp(17px, 1.8vw, 24px);
  line-height: 1.15;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-modal-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  display: grid;
  gap: 0;
  padding: 0;
  scrollbar-gutter: auto;
}

.map-modal-content {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}

.map-modal-content .map-modal-body {
  justify-items: stretch;
  align-content: stretch;
  grid-auto-rows: minmax(0, 1fr);
}

.content-embed-shell {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  aspect-ratio: auto;
  min-height: 0;
  max-height: none;
  padding: 0;
  border-radius: 0;
  border: none;
  background: #fff;
  overflow: hidden;
}

.map-modal-content .content-embed-shell,
.map-modal-content .content-video-shell {
  width: 100%;
  height: 100%;
  max-width: 100%;
  margin-inline: auto;
}

.map-modal-content .content-embed-shell {
  min-height: 0;
}

.content-video-shell {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  aspect-ratio: auto;
  min-height: 0;
  max-height: none;
  padding: 0;
  border-radius: 0;
  border: none;
  background: #05070c;
  overflow: hidden;
}

.content-embed-shell.content-video-shell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-modal-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  min-height: 0;
  margin-left: auto;
}

.map-modal-actions button {
  min-height: 40px;
  padding: 9px 14px;
}

.content-embed-shell > * {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-width: 100%;
}

.content-embed-shell iframe,
.content-embed-shell .genially-embed,
.content-embed-shell .container-wrapper-genially {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  max-width: 100% !important;
  border: none !important;
}

.content-video-shell > * {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: 100%;
}

.content-embed-shell.content-video-shell > .content-video-shell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-video-shell video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.45);
  border-radius: calc(var(--radius-sm) - 2px);
}

.map-modal-content .content-video-shell {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-modal-content .content-video-shell video {
  width: 100%;
  height: 100%;
  max-height: 100%;
}

.overlay-progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(253, 194, 78, 0.42);
  background: rgba(253, 194, 78, 0.18);
  color: #7c5a0e;
}

.map-modal-head .overlay-progress-copy {
  max-width: min(540px, 46vw);
  padding: 9px 12px;
  border-radius: 10px;
  color: #fff;
  background: rgba(253, 194, 78, 0.2);
  border-color: rgba(253, 194, 78, 0.45);
}

@keyframes mapModalEnter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.history-list {
  grid-template-columns: 1fr;
}

.history-entry small {
  color: var(--muted);
}

.task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-card.done {
  border-color: rgba(0, 144, 76, 0.34);
  background: rgba(0, 144, 76, 0.08);
}

.intro-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at top center, rgba(246, 146, 30, 0.18), transparent 24%),
    radial-gradient(circle at right 18%, rgba(255, 255, 255, 0.08), transparent 18%),
    linear-gradient(180deg, rgba(0, 23, 57, 0.9), rgba(0, 42, 104, 0.82)),
    url("./assets/elementos-graficos/FIPS-ICONES-ATIVIDADE-PRINCIPAL.svg") left -80px top -30px / 320px auto no-repeat;
  z-index: 20;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.intro-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-shell {
  width: min(820px, 100%);
}

.intro-hero {
  display: grid;
  gap: 18px;
  padding: 34px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 250, 0.98)),
    url("./assets/elementos-graficos/FIPS-ICONES-COLABORADORES.svg") right -26px bottom -8px / 280px auto no-repeat;
  border: 1px solid rgba(123, 140, 150, 0.14);
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.intro-hero h2 {
  font-size: 36px;
  line-height: 1.06;
  color: var(--panel-strong);
  margin-top: 26px;
}

.intro-hero .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.intro-hero p:not(.eyebrow) {
  max-width: 56ch;
  margin-inline: auto;
}

.intro-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.intro-actions-centered {
  justify-content: center;
}

.intro-actions button {
  min-width: 220px;
  padding: 15px 22px;
  font-size: 16px;
}

@media (max-width: 1366px) and (min-width: 768px) {
  .game-app {
    padding: 14px;
    gap: 14px;
    overflow: visible;
  }

  .topbar {
    padding: 14px 18px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 20px;
  }

  .layout {
    display: flex;
    gap: 14px;
    min-height: 0;
  }

  .board-section,
  .side-panel {
    padding: 16px;
  }

  .board-section {
    gap: 14px;
    min-height: 0;
  }

  .board-head {
    gap: 12px;
  }

  .board-frame {
    width: min(100%, 1080px);
  }

  .side-panel {
    flex: 0 0 320px;
    min-width: 320px;
    max-width: 320px;
  }

  .experience-card {
    gap: 10px;
    overflow: visible;
  }

  .turn-card {
    gap: 10px;
    padding: 12px;
  }

  .turn-card h3 {
    font-size: 18px;
  }

  .offer-grid {
    gap: 8px;
  }

  .turn-card-offer .offer-card {
    min-height: 144px;
  }

  .offer-card img {
    max-width: 92px;
    height: 68px;
    margin-bottom: 8px;
  }

  .journey-footer {
    gap: 8px;
    overflow: hidden;
  }

  .status-card {
    gap: 8px;
  }

  .status-box {
    padding: 8px 6px;
    text-align: center;
  }

  .status-box strong {
    font-size: 18px;
    line-height: 1;
    margin-bottom: 2px;
  }

  .status-box span {
    display: block;
    font-size: 9px;
    line-height: 1.15;
  }

  .wagon-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
  }

  .wagon-card {
    padding: 4px 3px;
    border-radius: 12px;
  }

  .wagon-card img {
    max-width: 38px;
    height: 20px;
    margin-bottom: 2px;
  }

  .wagon-card strong,
  .wagon-card p {
    font-size: 7px;
    line-height: 1.1;
  }

  .wagon-card strong {
    margin-bottom: 1px;
  }

  .map-modal-content {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
  }

  .map-modal-content .content-embed-shell,
  .map-modal-content .content-video-shell {
    width: 100%;
    height: 100%;
  }

  .map-modal-content .content-embed-shell {
    min-height: 0;
    max-height: none;
  }

  .map-modal-content .content-video-shell {
    min-height: 0;
    max-height: none;
  }

  .map-modal-content .content-video-shell video {
    height: 100%;
    max-height: 100%;
  }
}

@media (max-width: 1024px) {
  .layout {
    flex-direction: column;
  }

  .side-panel {
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
  }

  .journey-footer {
    gap: 8px;
  }

  .status-card {
    min-width: 0;
  }
}

@media (max-width: 920px) {
  .game-app {
    padding: 14px;
  }

  .topbar,
  .board-section,
  .side-panel {
    padding: 16px;
  }

  .topbar,
  .board-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .wagon-strip,
  .status-grid,
  .metrics-row,
  .offer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey-footer {
    gap: 8px;
  }

  .turn-card-offer {
    align-content: start;
    justify-items: stretch;
    text-align: left;
  }

  .turn-card-offer h3,
  .turn-card-offer p,
  .turn-card-offer .offer-grid,
  .turn-card-offer .action-row {
    max-width: none;
    width: 100%;
    justify-self: stretch;
  }

  .turn-card-offer .offer-card {
    min-height: 152px;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .topbar-actions,
  .status-grid,
  .metrics-row,
  .offer-grid,
  .action-row {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    display: grid;
    width: 100%;
  }

  h1 {
    font-size: 26px;
  }

  .intro-hero h2 {
    font-size: 28px;
  }

  .route-label {
    display: none;
  }

  .overlay-progress-copy {
    flex-direction: column;
    align-items: flex-start;
  }

  .journey-footer {
    gap: 10px;
  }

  .wagon-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .map-overlay-layer {
    padding: 0;
  }

  .map-modal {
    border-radius: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    max-height: none;
  }

  .map-modal-content {
    width: 100%;
    height: 100%;
  }

  .map-modal-content .content-embed-shell,
  .map-modal-content .content-video-shell {
    width: 100%;
  }

  .content-embed-shell {
    max-height: none;
  }

  .content-video-shell,
  .content-video-shell video {
    max-height: 100%;
  }
}

@media (max-width: 767px) {
  html,
  body {
    height: auto;
    min-height: 100%;
  }

  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .game-app {
    width: 100%;
    height: auto;
    min-height: 100vh;
    padding: 12px;
    gap: 12px;
    overflow: visible;
  }

  .topbar,
  .layout,
  .board-section,
  .side-panel {
    width: 100%;
    min-width: 0;
  }

  .topbar {
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .topbar .eyebrow {
    margin-bottom: 8px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 10px;
  }

  .progress-chip,
  .mini-badge,
  .validation-reset {
    width: 100%;
  }

  .layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
  }

  .board-section,
  .side-panel {
    padding: 16px;
    overflow: visible;
  }

  .journey-footer {
    padding: 0;
    overflow: visible;
  }

  .board-section {
    gap: 14px;
  }

  .board-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }

  .board-head > div:first-child {
    width: 100%;
  }

  .board-head-meta {
    width: 100%;
    justify-content: center;
  }

  .board-stage {
    overflow: auto;
    padding-right: 0;
  }

  .board-frame {
    width: 100%;
    border-radius: 18px;
    background-position: center;
    background-size: cover;
  }

  .route-tile img,
  .route-train img {
    width: 98%;
    height: 98%;
  }

  .route-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    bottom: 4px;
    min-width: 52px;
    padding: 4px 6px;
    font-size: 9px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .side-panel {
    flex: 0 0 auto;
  }

  .experience-card {
    overflow: visible;
  }

  .turn-card {
    gap: 10px;
    padding: 14px;
  }

  .turn-card-offer {
    justify-items: stretch;
    text-align: left;
  }

  .turn-card-offer h3,
  .turn-card-offer p {
    max-width: none;
    width: 100%;
    text-align: left;
  }

  .turn-card-offer h3 {
    font-size: 20px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .offer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .offer-card,
  .turn-card-offer .offer-card {
    min-height: 0;
    padding: 10px 6px;
    gap: 6px;
    align-content: start;
    justify-items: center;
    text-align: center;
  }

  .offer-card img {
    width: 100%;
    max-width: 72px;
    height: 56px;
    margin-bottom: 4px;
  }

  .offer-card strong {
    display: block;
    font-size: 11px;
    line-height: 1.2;
    word-break: break-word;
  }

  .turn-card-offer .action-row {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .turn-card-offer .action-row .primary {
    width: 100%;
    justify-self: center;
  }

  .journey-footer {
    gap: 8px;
  }

  .status-card {
    gap: 8px;
  }

  .status-card .eyebrow {
    text-align: center;
  }

  .status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .status-box {
    padding: 8px 6px;
    text-align: center;
  }

  .status-box strong {
    margin-bottom: 2px;
    font-size: 18px;
    line-height: 1;
  }

  .status-box span {
    display: block;
    font-size: 10px;
    line-height: 1.2;
  }

  .wagon-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  .wagon-card {
    padding: 5px 4px;
  }

  .wagon-card img {
    max-width: 38px;
    height: 20px;
    margin-bottom: 2px;
  }

  .wagon-card strong,
  .wagon-card p {
    font-size: 8px;
    line-height: 1.1;
  }

  .metrics-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-row {
    grid-template-columns: 1fr;
  }

  .map-overlay-layer {
    padding: 0;
  }

  .map-modal {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    padding: 0;
    border-radius: 0;
  }

  .map-modal-head {
    align-items: flex-start;
    flex-wrap: wrap;
    min-height: 0;
    padding: 10px 12px;
  }

  .map-modal-actions {
    width: 100%;
    margin-left: 0;
  }

  .map-modal-head .overlay-progress-copy {
    width: 100%;
    max-width: none;
    flex-wrap: wrap;
  }

  .map-modal-head h3 {
    font-size: clamp(16px, 4.8vw, 22px);
    white-space: normal;
  }

  .content-embed-shell {
    max-height: none;
    padding: 0;
    border-radius: 0;
  }

  .map-modal-content .content-embed-shell {
    min-height: 0;
  }

  .map-modal-body {
    align-content: start;
  }

  .map-modal-content .content-embed-shell:has(iframe),
  .map-modal-terminal .content-embed-shell:has(iframe) {
    flex: 0 0 auto;
    width: max(100%, 760px);
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .map-modal-content .map-modal-body:has(iframe),
  .map-modal-terminal .map-modal-body:has(iframe) {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .content-video-shell {
    padding: 0;
    border-radius: 0;
    max-height: none;
  }

  .map-modal-content .content-video-shell {
    min-height: 0;
  }

  .content-video-shell video {
    height: 100%;
    max-height: 100%;
  }
}

.map-overlay-layer .map-modal.map-modal-content,
.map-overlay-layer .map-modal.map-modal-terminal {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}

.map-overlay-layer .map-modal.map-modal-content .map-modal-body,
.map-overlay-layer .map-modal.map-modal-terminal .map-modal-body {
  flex: 1 1 auto;
  width: 100%;
  aspect-ratio: auto;
  overflow: hidden;
}

.map-overlay-layer .map-modal.map-modal-content .content-embed-shell,
.map-overlay-layer .map-modal.map-modal-content .content-video-shell,
.map-overlay-layer .map-modal.map-modal-terminal .content-embed-shell,
.map-overlay-layer .map-modal.map-modal-terminal .content-video-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
}

@media (max-width: 767px) {
  .map-overlay-layer .map-modal.map-modal-content .map-modal-body:has(iframe),
  .map-overlay-layer .map-modal.map-modal-terminal .map-modal-body:has(iframe) {
    overflow: auto;
    align-content: start;
    -webkit-overflow-scrolling: touch;
  }

  .map-overlay-layer .map-modal.map-modal-content .content-embed-shell:has(iframe),
  .map-overlay-layer .map-modal.map-modal-terminal .content-embed-shell:has(iframe) {
    flex: 0 0 auto;
    width: max(100%, 760px);
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}
