/* Custom Host, artwork review, and Audience layout. */
#cmCustomPresentationDialog {
  position: fixed;
  inset: 2vh 2vw;
  width: 96vw;
  height: 96vh;
  max-width: none;
  max-height: none;
  box-sizing: border-box;
  margin: 0;
  padding: 16px;
  background: #f4f6f9;
  color: #17202d;
  z-index: 11000;
  border: 1px solid #7386a1;
  border-radius: 12px;
  overflow: auto;
}
#cmCustomPresentationDialog::backdrop {
  background: #000b;
}
.cp-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0;
}
.cp-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.cp-layout aside {
  min-width: 0;
  overflow-wrap: anywhere;
}
.cp-layout aside select {
  width: 100%;
  padding: 8px;
}
.cp-inspection {
  white-space: pre-wrap;
  margin: 12px 0;
  padding: 12px;
  background: #fff;
  border: 1px solid #cbdcff;
  border-radius: 8px;
}
.cp-stage {
  position: relative;
  aspect-ratio: 16/9;
  width: 100%;
  background: #020b1c;
  overflow: hidden;
  container-type: size;
  color: white;
}
.cp-root {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  container-type: size;
  background: radial-gradient(ellipse at 50% 0%, #112e59, #020b1c 70%);
  color: #fff;
  font-family: Montserrat, Arial, sans-serif;
  overflow: hidden;
}
.cp-root .cp-brand {
  position: absolute;
  top: 2%;
  right: 3%;
  width: 23%;
  height: 13%;
  object-fit: contain;
}
.cp-kicker {
  position: absolute;
  top: 6%;
  left: 5%;
  font-size: 2cqw;
  font-weight: 900;
  color: #f4c400;
  letter-spacing: 0.12em;
}
.cp-intro-art {
  position: absolute;
  left: 9%;
  top: 16%;
  width: 82%;
  height: 65%;
  object-fit: contain;
}
.cp-instructions {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 6%;
  margin: 0;
  text-align: center;
  font-size: 1.45cqw;
  line-height: 1.4;
  color: #d8e7fb;
}
.cp-footer {
  position: absolute;
  bottom: 1.5%;
  left: 5%;
  right: 5%;
  text-align: center;
  font-size: 0.95cqw;
  color: #a9c4e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-overview .cp-brand {
  left: 3%;
  right: auto;
  width: 20%;
  height: 11%;
}
.cp-overview-heading {
  position: absolute;
  top: 2%;
  left: 25%;
  right: 4%;
  margin: 0;
  text-align: right;
  font-size: 3.1cqw;
  line-height: 1.3;
  color: white;
}
.cp-lineup {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 16%;
  bottom: 5%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 1.2cqw;
}
.cp-tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 1px solid #2879d6;
  border-radius: 0.7cqw;
  background: #061735;
}
.cp-tile-position {
  position: absolute;
  top: 3%;
  left: 5%;
  right: 5%;
  font-size: 1.15cqw;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #f4c400;
  text-align: center;
}
.cp-tile-art {
  position: absolute;
  left: 3%;
  top: 17%;
  width: 94%;
  height: 81%;
  object-fit: contain;
}
.cp-header-art {
  position: absolute;
  left: 3%;
  top: 2%;
  width: 28%;
  height: 24%;
  object-fit: contain;
}
.cp-question-position {
  position: absolute;
  left: 33%;
  right: 3%;
  top: 20%;
  font-size: 1.5cqw;
  color: #f4c400;
  letter-spacing: 0.1em;
  font-weight: 800;
}
.cp-root .cp-body {
  position: absolute !important;
  left: 7% !important;
  right: 7% !important;
  top: 31% !important;
  height: 50% !important;
  box-sizing: border-box !important;
  padding: 3cqw !important;
  border-radius: 1.5cqw !important;
}
.cp-root .cp-body [data-fit] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
  width: 100% !important;
  line-height: 1.12 !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  font-size: var(--cp-text-size, 4.1cqw) !important;
  box-sizing: border-box;
}
.cp-root .cp-body {
  font-size: 4.1cqw;
}
.cp-review-list {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 25%;
  bottom: 17%;
  margin: 0;
  padding-left: 3%;
  font-size: 1.65cqw;
  line-height: 1.3;
  overflow: hidden;
}
.cp-review-list li {
  margin-bottom: 1.1cqw;
}
.cp-timer {
  position: absolute;
  inset: 27% 5% 20%;
  display: grid;
  place-items: center;
  font-size: 12cqw;
  font-weight: 900;
  color: #f4c400;
}
.cp-score-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: #020b1cf5;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2cqw;
  font:
    1.8cqw Montserrat,
    Arial,
    sans-serif;
  text-align: center;
  padding: 5%;
  box-sizing: border-box;
}
.cp-score-overlay .cp-brand {
  width: 30%;
  height: 20%;
  object-fit: contain;
}
.cp-score-overlay h1 {
  font-size: 4cqw;
  margin: 0;
  color: #fff;
}
.cp-score-note {
  position: absolute;
  bottom: 4%;
  left: 8%;
  right: 8%;
  font-size: 1.6cqw;
  color: white;
  text-align: center;
}
.cp-asset-error {
  color: #ffd6d6;
  font-size: 2cqw;
  text-align: center;
}
body.cp-external {
  margin: 0 !important;
  background: #020b1c !important;
  display: grid;
  place-items: center;
  min-height: 100vh;
}
body.cp-external > .cp-stage {
  width: min(100vw, calc(100vh * 16 / 9));
  height: auto;
}
.cp-preview-label {
  font-weight: 800;
  color: #6c4100;
  background: #fff3cf;
  padding: 8px;
  border-radius: 6px;
}
.cp-host-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: clamp(12px, 2vw, 20px);
}
.cp-host-heading .cp-preview-label {
  margin: 0;
  padding: 0;
  background: none;
  color: inherit;
  font-size: clamp(18px, 3vw, 24px);
  overflow-wrap: anywhere;
}
.cp-host-name {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .78em;
}
.cp-host-heading .btn {
  min-height: 44px;
  margin: 0;
  white-space: nowrap;
}
.cp-host-position {
  flex: 0 0 100%;
  box-sizing: border-box;
  border-radius: 8px;
}
#cmCustomPresentationDialog.cp-host {
  top: 2dvh;
  height: 96dvh;
  overscroll-behavior: contain;
}
.cp-host .cp-layout select, .cp-host .cp-layout [data-go-to-slide] {
  min-height: 44px;
}
.cp-host-preview > .btn {
  display: block;
  min-height: 44px;
  margin: 0 0 8px auto;
}
.cp-readiness {
  white-space: pre-wrap;
  max-height: 180px;
  overflow: auto;
}
@media (max-width: 800px) {
  .cp-layout {
    grid-template-columns: 1fr;
  }
  .cp-layout aside {
    order: 2;
  }
  #cmCustomPresentationDialog {
    padding: 10px;
  }
  .cp-controls .btn {
    padding: 8px 10px;
  }
}

.cp-final-tile .cp-tile-art {
  top: 3%;
  height: 94%;
}
.cp-root .cp-numeric-answer [data-fit] {
  height: 58% !important;
}
.cp-range-guide {
  font-size: 1.15cqw;
  line-height: 1.2;
  text-align: center;
}
.cp-range-guide > div {
  margin-top: 0.5cqw !important;
}

body.cp-external {
  box-sizing: border-box;
  padding-top: 24px;
}
body.cp-external > .cp-stage {
  width: min(100vw, calc((100vh - 24px) * 16 / 9));
}
.cp-external-review-note {
  position: fixed;
  top: 2px;
  left: 8px;
  color: #ffe7ab;
  font: 12px system-ui;
  z-index: 30;
}

/* Five-percent television/projector title-safe margins; shared intrinsic logo ratio. */
.cp-overview .cp-brand {
  left: 5%;
  top: 5%;
  height: 10%;
  width: 20%;
}
.cp-overview-heading {
  top: 5%;
  right: 5%;
}
.cp-lineup {
  left: 5%;
  right: 5%;
  top: 18%;
  bottom: 5%;
}
#cmCustomScoreEditor {
  padding: 12px;
  background: #fff;
  overflow: auto;
}
.cp-root .cp-brand {
  top: 5%;
  right: 5%;
}
.cp-root .cp-header-art {
  left: 5%;
  top: 5%;
  width: 26%;
  height: 21%;
}

.cp-text-title {
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 900;
  line-height: 1.05;
}
.cp-tile-art.cp-text-title, .cp-header-art.cp-text-title { font-size: 3cqw; }
.cp-intro-art.cp-text-title { font-size: 9cqw; }

.cp-root .cp-picture-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: 3cqw;
  top: 27% !important;
  height: 58% !important;
  padding: 1.2cqw 2cqw !important;
}
.cp-question-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.cp-picture-review {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.2cqw;
  padding-left: 2cqw;
}
.cp-picture-review li {
  min-width: 0;
  overflow-wrap: anywhere;
}
.cp-review-picture {
  display: block;
  width: 100%;
  height: 24cqh;
  margin-top: 0.8cqw;
  object-fit: contain;
  object-position: top center;
}
