html.bo27-scroll-locked,
html.bo27-scroll-locked body {
  overflow: hidden;
  overscroll-behavior: none;
}

.bo27-dialog {
  --bo27-text: #edf6fb;
  --bo27-subtle: #b4cad8;
  --bo27-accent: #a6eaf8;
  --bo27-divider: #76cadd69;
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(920px, 62vw, calc((78vh - 176px) / 9 * 16 + 54px));
  width: min(920px, 62vw, calc((78dvh - 176px) / 9 * 16 + 54px));
  max-width: none;
  max-height: 82vh;
  max-height: 82dvh;
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--bo27-divider);
  border-radius: 20px;
  color: var(--bo27-text);
  background: linear-gradient(150deg, #0c1a2b, #0a1422 74%);
  box-shadow: 0 28px 96px #01060dbd;
  color-scheme: dark;
  font: 400 16px/1.35 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bo27-dialog:not([open]),
.bo27-dialog [hidden] {
  display: none !important;
}

.bo27-dialog::backdrop {
  background: #040b18b8;
}

.bo27-panel {
  position: relative;
  padding: 16px 26px;
}

.bo27-panel::before {
  display: block;
  height: 1px;
  margin: 0 0 10px;
  background: linear-gradient(90deg, #75d7eb44, #75d7eb72 62%, #75d7eb22);
  content: "";
}

.bo27-heading {
  padding: 0 44px;
  text-align: center;
}

.bo27-dialog .bo27-brand,
.bo27-dialog .bo27-title {
  margin: 0;
}

.bo27-dialog .bo27-brand {
  color: var(--bo27-accent);
  font: 650 10px/1.3 system-ui, sans-serif;
  letter-spacing: .31em;
}

.bo27-dialog .bo27-title {
  margin-top: 6px;
  font-size: clamp(20px, 1.9vw, 28px);
  font-weight: 560;
  line-height: 1.05;
  letter-spacing: .043em;
  text-transform: uppercase;
  text-wrap: balance;
}

.bo27-dialog button {
  box-sizing: border-box;
  border: 1px solid var(--bo27-divider);
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.bo27-dialog button:focus-visible {
  outline: 2px solid white;
  outline-offset: 4px;
}

.bo27-dialog button:active {
  transform: translateY(1px);
}

.bo27-dialog svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bo27-dialog .bo27-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  color: var(--bo27-text);
  background: #13293b;
}

.bo27-dialog .bo27-close:hover {
  background: #244359;
}

.bo27-media {
  position: relative;
  width: min(100%, 116vh);
  width: min(100%, 116dvh);
  aspect-ratio: 16/9;
  margin: 10px auto 0;
  overflow: hidden;
  border: 1px solid #8fcbe531;
  border-radius: 12px;
  background: #081522;
  isolation: isolate;
}

.bo27-dialog .bo27-picture,
.bo27-dialog .bo27-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  pointer-events: none;
}

.bo27-dialog .bo27-picture {
  z-index: 1;
}

.bo27-media.has-video .bo27-picture {
  visibility: hidden;
}

.bo27-camera-labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 116vh);
  width: min(100%, 116dvh);
  margin: 7px auto 0;
  gap: 10px;
  color: var(--bo27-subtle);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.bo27-actions {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.bo27-dialog .bo27-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 19px;
  gap: 10px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 625;
  line-height: 1.16;
  color: #041827;
  background: var(--bo27-accent);
}

.bo27-dialog .bo27-continue:hover {
  background: #d6f8ff;
}

@media (max-width: 900px) {
  .bo27-dialog {
    width: min(720px, 88vw, calc((88vh - 176px) / 9 * 16 + 54px));
    width: min(720px, 88vw, calc((88dvh - 176px) / 9 * 16 + 54px));
    max-height: 90vh;
    max-height: 90dvh;
  }
}

@media (max-width: 650px) {
  .bo27-dialog {
    width: calc(100% - 30px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - max(32px, env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px)));
    border-radius: 19px;
  }

  .bo27-panel {
    padding: 30px clamp(11px, 3.7vw, 24px) 22px;
  }

  .bo27-panel::before {
    position: absolute;
    top: 0;
    left: 23px;
    width: 42%;
    margin: 0;
  }

  .bo27-heading {
    padding: 0 10px;
  }

  .bo27-dialog .bo27-brand {
    font-size: 10px;
  }

  .bo27-dialog .bo27-title {
    margin-top: 13px;
    font-size: clamp(17px, 5.1vw, 29px);
    letter-spacing: .015em;
  }

  .bo27-year {
    display: block;
    margin-top: 4px;
    font-size: clamp(37px, 12vw, 63px);
    font-weight: 405;
    letter-spacing: -.06em;
  }

  .bo27-year::after {
    display: block;
    width: 31px;
    height: 1px;
    margin: 8px auto 0;
    background: var(--bo27-divider);
    content: "";
  }

  .bo27-dialog .bo27-close {
    top: 9px;
    right: 9px;
  }

  .bo27-media {
    margin-top: 15px;
    border-radius: 9px;
  }

  .bo27-camera-labels {
    font-size: clamp(11px, 3.2vw, 14px);
  }

  .bo27-actions {
    margin-top: 14px;
  }

  .bo27-dialog .bo27-continue {
    width: 100%;
    min-height: 48px;
    padding: 9px 10px;
    gap: 6px;
    border-radius: 90px;
    font-size: clamp(11px, 3.8vw, 15px);
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .bo27-panel { padding-block: 12px; }
  .bo27-panel::before { display: none; }
  .bo27-dialog .bo27-title { font-size: 21px; }
  .bo27-year { display: inline; font: inherit; letter-spacing: inherit; }
  .bo27-year::after { display: none; }
  .bo27-media,
  .bo27-camera-labels { width: min(100%, 98vh); }
  .bo27-media {
    width: min(100%, 98vh, calc((100vh - 220px) / 9 * 16));
    width: min(100%, 98dvh, calc((100dvh - 220px) / 9 * 16));
  }
  .bo27-camera-labels { margin-top: 6px; }
  .bo27-actions { margin-top: 8px; }
}

@media (prefers-reduced-motion: no-preference) {
  .bo27-dialog[open] {
    animation: bo27-enter .26s ease-out both;
  }

  @keyframes bo27-enter {
    from { opacity: 0; transform: translateY(9px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media print {
  .bo27-dialog,
  .bo27-dialog::backdrop {
    display: none !important;
  }
}

#welcome-screen[data-bo-estreno-sustituida] {
  display: none !important;
}
