:root {
  color-scheme: light;
  --ink: #1f2624;
  --muted: #61706b;
  --line: #dbe4df;
  --surface: #ffffff;
  --soft: #f4f8f6;
  --brand: #24b8a6;
  --brand-dark: #167c72;
  --accent: #c6324a;
  --gold: #b89446;
  --shadow: 0 14px 34px rgba(31, 38, 36, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #e7eeea;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0;
}

body.home-screen {
  background:
    linear-gradient(rgba(20, 23, 22, 0.46), rgba(20, 23, 22, 0.5)),
    url("assets/entrada.jpg") center / cover fixed;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: 0 0 45px rgba(31, 38, 36, 0.16);
  position: relative;
  overflow: hidden;
}

body.home-screen .app-shell {
  background: transparent;
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.28);
}

.home-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.topbar {
  display: none;
  height: 0;
  padding: 12px 16px;
  background: #273c37;
  color: #fff;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1,
.topbar p {
  margin: 0;
  text-align: center;
}

.topbar h1 {
  font-size: 17px;
  line-height: 1.2;
}

.eyebrow {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 25px;
  line-height: 1;
}

.app-content {
  min-height: 100vh;
  padding: 24px 22px 78px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: min(100%, 430px);
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  z-index: 20;
}

.nav-item {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  min-height: 56px;
  display: grid;
  place-items: center;
  gap: 2px;
  font-size: 12px;
}

.nav-item span {
  font-size: 20px;
}

.nav-item.active {
  color: var(--brand-dark);
  background: #eaf8f5;
}

.brand-mark {
  display: grid;
  place-items: center;
  gap: 10px;
  margin: 0 0 36px;
}

.welcome-title {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.15;
  text-align: center;
}

.brand-logo {
  width: 86px;
  height: 86px;
  object-fit: contain;
  border-radius: 8px;
}

.mark-symbol {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 0 40%, var(--accent) 41% 58%, transparent 59%),
    linear-gradient(45deg, transparent 0 40%, #2f55a2 41% 58%, transparent 59%);
  border: 1px solid var(--line);
}

.brand-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.04;
  text-align: center;
  text-transform: uppercase;
}

.brand-title small {
  display: block;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 12px;
  letter-spacing: 0.24em;
  margin-top: 7px;
}

.section-title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.14;
  text-align: center;
}

.lead {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 auto 26px;
  text-align: center;
  max-width: 32ch;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 auto 44px;
  max-width: 280px;
}

.language-button {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  gap: 4px;
  box-shadow: 0 8px 18px rgba(31, 38, 36, 0.07);
}

.language-button.active {
  border-color: var(--brand);
  outline: 3px solid rgba(36, 184, 166, 0.18);
}

.flag {
  font-size: 22px;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 52px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
}

.primary-button {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow);
}

.secondary-button {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.download-meta {
  margin: 12px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.progress-track {
  height: 7px;
  border-radius: 8px;
  background: #dbe4df;
  overflow: hidden;
  margin: 24px 0 12px;
}

.progress-fill {
  width: var(--progress, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  transition: width 240ms ease;
}

.route-list {
  display: grid;
  gap: 14px;
  margin-bottom: 0;
}

.home-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 900;
  margin-bottom: 14px;
}

.route-button {
  min-height: 170px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #18211f;
  color: #fff;
  position: relative;
  text-align: left;
  box-shadow: var(--shadow);
}

.route-button img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.route-button strong,
.route-button span,
.route-button small {
  position: relative;
  z-index: 1;
}

.route-button small {
  display: inline-flex;
  margin: 18px 18px 0;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.route-button strong {
  display: block;
  padding: 30px 18px 14px;
  font-size: 24px;
  line-height: 1.08;
}

.route-button span {
  display: inline-flex;
  margin-left: 18px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.route-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(31, 38, 36, 0.42);
}

.route-modal[hidden] {
  display: none;
}

.route-modal-panel {
  width: min(100%, 430px);
  background: #fff;
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
}

.route-modal-panel h2 {
  margin: 6px 0 12px;
  font-size: 24px;
  line-height: 1.14;
}

.route-modal-panel p {
  color: #3f4946;
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(36, 184, 166, 0.38);
  background: #effbf8;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.status-strip p {
  margin: 0;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

.point-list {
  display: grid;
  gap: 14px;
}

.section-break {
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
}

.section-break strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
}

.point-card {
  border: 0;
  border-radius: 8px;
  background: #fff;
  min-height: 108px;
  display: grid;
  grid-template-columns: 128px 1fr;
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow);
}

.point-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.point-body {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 12px;
}

.pin {
  color: var(--brand);
  font-size: 22px;
}

.point-title {
  margin: 0;
  font-weight: 800;
  line-height: 1.22;
}

.point-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.number-display {
  height: 86px;
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
  margin: 28px 0 20px;
  font-size: 34px;
  font-weight: 800;
  color: var(--brand-dark);
}

.number-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.number-pad button {
  min-height: 76px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: #65706d;
  font-size: 25px;
  font-weight: 800;
}

.number-pad button:nth-child(3n) {
  border-right: 0;
}

.number-pad button:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.detail-hero {
  margin: -24px -22px 0;
  min-height: 340px;
  position: relative;
}

.detail-hero img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
}

.detail-panel {
  background: #fff;
  border-radius: 8px 8px 0 0;
  margin: -28px -6px 0;
  position: relative;
  padding: 24px 18px 0;
}

.detail-panel h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.12;
}

.detail-copy {
  color: #3f4946;
  line-height: 1.5;
  margin: 0 0 20px;
}

.audio-control {
  width: 100%;
  margin: 0 0 16px;
}

.player {
  border-top: 1px solid var(--line);
  padding: 14px 0 0;
}

.player-times {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.player-controls {
  display: grid;
  grid-template-columns: 1fr 62px 1fr;
  align-items: center;
  justify-items: center;
  gap: 14px;
  margin-top: 12px;
}

.round-play {
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 24px;
}

.ghost-control {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: #eef4f1;
  color: var(--muted);
  font-size: 20px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.map-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft);
}

.map-stage {
  min-height: 360px;
  position: relative;
  background:
    linear-gradient(90deg, transparent 49%, rgba(31, 38, 36, 0.12) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(31, 38, 36, 0.12) 50%, transparent 51%),
    #f8fbfa;
}

.map-room {
  position: absolute;
  border: 2px solid #92b7ad;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.map-dot {
  position: absolute;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.empty-note {
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 360px) {
  .app-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .point-card {
    grid-template-columns: 112px 1fr;
  }

  .route-button strong {
    font-size: 24px;
  }
}
