/* The last film frame stays in place while the room notifications appear. */
.film-ready #regie { height: calc(var(--stage) + 190svh); }
.film-ready.hub-ready .stage {
  --media-height: 100%;
  --film-footer-height: 84px;
}
.film-ready.hub-ready .copy-deck {
  inset-block: 55px calc(max(var(--route-height), var(--film-footer-height)) + 12px);
  align-items: stretch;
}
.film-ready.hub-ready .regie-copy { width: 100%; min-height: 0; }
.film-ready .control-hub { display: flex; flex-direction: column; height: 100%; }
.hub-controls { display: grid; gap: 12px; }
.film-ready .hub-controls {
  flex: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(min-content, 1fr));
  align-items: center;
}
:is(.console-control, .room-dialog) {
  --notification-accent: #81bfeb;
  --notification-header: #17425e;
}
.console-control {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  align-items: center;
  column-gap: 10px;
  width: min(100%, 320px);
  border: 1px solid var(--notification-accent);
  border-radius: 7px;
  background: #102637;
  color: #fff;
  box-shadow: 0 8px 28px #0006;
  pointer-events: auto;
  transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease;
}
:is(.console-control[data-room-panel="depot"], #room-depot) {
  --notification-accent: #78c5e4;
  --notification-header: #1b536c;
}
:is(.console-control[data-room-panel="energy"], #room-energy) {
  --notification-accent: #f4ba60;
  --notification-header: #684114;
}
:is(.console-control[data-room-panel="insight"], #room-insight) {
  --notification-accent: #91d0ae;
  --notification-header: #215b43;
}
:is(.console-control[data-room-panel="support"], #room-support) {
  --notification-accent: #ffa395;
  --notification-header: #85392e;
}
.console-control:is(:hover, [aria-expanded="true"]) { background: #1d3b50; }
.console-control:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.console-label {
  grid-column: 1 / -1;
  border-radius: 6px 6px 0 0;
  padding: 6px 11px;
  background: var(--notification-header);
  font: 700 10px/1.2 Montserrat, sans-serif;
  letter-spacing: .08em;
}
.console-symbol { margin-left: 10px; color: var(--notification-accent); }
.console-icon { display: block; width: 22px; height: 22px; }
.console-copy { padding-block: 8px; }
.console-copy strong {
  display: block;
  font: 700 14px/1.3 Montserrat, sans-serif;
  letter-spacing: -.02em;
  overflow-wrap: normal;
}
.console-copy small { display: block; margin-top: 3px; color: #d6e3ec; font-size: 12px; line-height: 1.3; }
.console-control > .icon-arrow {
  margin-right: 10px;
  color: #fff;
  background: var(--notification-header);
}
.film-ready .console-control:not([data-visible]),
.film-ready .hub-footer:not([data-visible]) { visibility: hidden; opacity: 0; transform: translateY(8px); }
.film-ready .console-control:nth-child(1) { grid-area: 1 / 1; }
.film-ready .console-control:nth-child(2) { grid-area: 1 / 3; justify-self: end; }
.film-ready .console-control:nth-child(3) { grid-area: 2 / 1; }
.film-ready .console-control:nth-child(4) { grid-area: 2 / 3; justify-self: end; }
.film-ready .console-control:nth-child(5) { grid-area: 3 / 2; justify-self: center; }
.hub-footer { align-self: end; margin-top: 4px; transition: opacity 180ms ease, transform 180ms ease; }
.hub-footer a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-inline: 10px;
  background: #102637;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.hub-footer .icon-arrow { background: #17425e; color: #fff; }
.film:not(.film-ready) .control-hub { margin-top: 28px; }
.film:not(.film-ready) .hub-controls { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.film:not(.film-ready) #regie { display: block; position: relative; padding-block: 30px; background: #10271f; }
.film:not(.film-ready) #regie .chapter-still { position: absolute; inset: 0; height: 100%; opacity: .3; }
.film:not(.film-ready) .regie-copy { position: relative; max-width: 800px; }

body[data-cms-page="home"] .footer-details {
  --line: #426253;
  color: #fff;
}
body[data-cms-page="home"] > .footer-details { background: #10271f; }
body[data-cms-page="home"] .footer-details :is(address, p) { color: #fff; }
body[data-cms-page="home"] .footer-details a:focus-visible { outline-color: var(--lime); }

.stage .footer-details {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0 14px;
  height: var(--film-footer-height);
  padding-block: 0 14px;
  background: transparent;
  font-size: 13px;
  text-shadow: 0 1px 5px #000, 0 0 10px #000;
  animation: enter 230ms ease both;
}
.stage .footer-details nav { justify-content: center; gap: 0 14px; }
.stage .footer-details nav a { min-height: 32px; }
.stage .footer-details .footer-credit {
  margin: 0;
  padding: 0;
  border: 0;
  text-align: center;
}
.stage .footer-company :is(address, p) { margin-top: 2px; font-size: 12px; line-height: 1.35; }
.stage .footer-company p { display: flex; flex-wrap: wrap; column-gap: 8px; }
.stage .footer-company p span { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1050px) {
  .stage .footer-details { grid-template-columns: auto minmax(105px, 1fr) auto; column-gap: 10px; }
  .stage .footer-details nav { gap: 0 12px; }
}

.room-dialog {
  position: fixed;
  inset: 12px auto auto 12px;
  margin: 0;
  width: 360px;
  max-width: calc(100% - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--notification-accent);
  border-radius: 7px;
  color: #fff;
  background: #102637;
  box-shadow: 0 12px 36px #0008;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}
.room-dialog::backdrop { background: #07131a24; }
.room-dialog-top {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-inline: 13px 3px;
  background: var(--notification-header);
}
.room-dialog-top > span { font: 700 10px/1.2 Montserrat, sans-serif; letter-spacing: .08em; }
.room-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: 25px/1 Roboto, sans-serif;
  cursor: pointer;
}
.room-close:hover > span { opacity: .75; }
.room-dialog .room-close:focus { outline: none; }
.room-close:focus-visible > span { transform: scale(1.2); color: var(--notification-accent); }
.room-dialog a:focus-visible {
  outline: 2px solid var(--notification-accent);
  outline-offset: -3px;
}
.room-dialog-body {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 14px;
}
.room-topic-symbol { color: var(--notification-accent); }
.room-dialog h2 { font-size: 19px; line-height: 1.2; letter-spacing: -.03em; }
.room-dialog-body > :is(p, ul, a) { grid-column: 1 / -1; }
.room-dialog-body > p { color: #d6e3ec; font-size: 14px; line-height: 1.45; }
.room-dialog ul { list-style: none; padding: 0; margin: 0; }
.room-dialog li { display: flex; gap: 8px; padding-block: 6px; border-top: 1px solid #ffffff2b; font-size: 13px; line-height: 1.35; }
.room-dialog li::before { content: '+'; color: var(--notification-accent); }
.room-dialog .room-link {
  width: 100%;
  min-height: 44px;
  padding: 6px 12px;
  background: var(--notification-header);
  color: #fff;
}
.room-dialog .room-link:hover { box-shadow: inset 0 0 0 1px var(--notification-accent); }
html.room-open { overflow: hidden; }
@media (max-width: 780px) {
  .console-control > .icon-arrow { margin-block: 3px; }
}
@media (max-width: 900px) {
  .film-ready.hub-ready .stage { --film-footer-height: 110px; }
  .stage .footer-details {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-content: center;
    padding-inline: 14px;
    padding-bottom: 8px;
    font-size: 12px;
  }
  .stage .footer-company :is(address, p) { font-size: 11px; }
  .stage .footer-company p { column-gap: 5px; }
  .stage .footer-details .footer-credit { font-size: 12px; }
  .stage .footer-details nav { grid-column: 1 / -1; justify-content: center; gap: 0 8px; }
}
@media (max-width: 560px) {
  .film-ready.hub-ready .stage { --film-footer-height: 126px; }
}
@media (max-width: 360px) {
  .film-ready.hub-ready .stage { --film-footer-height: 150px; }
}
@media (max-width: 780px) and (min-height: 481px), (max-width: 550px) {
  .film-ready.hub-ready .copy-deck {
    inset: 44px 16px calc(max(var(--route-height), var(--film-footer-height)) + 6px);
  }
  .film-ready .hub-controls {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(5, minmax(min-content, 1fr));
    gap: 6px;
  }
  .film-ready .hub-controls .console-control {
    grid-area: auto;
    width: min(100%, 310px);
    justify-self: start;
  }
  .film-ready .hub-controls .console-control:nth-child(even) { justify-self: end; }
  .console-copy strong { font-size: 13px; }
  .console-copy small { display: none; }
}
@media (max-height: 600px) {
  .film-ready.hub-ready .copy-deck { inset-block-start: 10px; }
  .film-ready .hub-controls { gap: 4px; }
  .hub-footer { margin-top: 0; }
  .console-copy small { display: none; }
  .console-label { padding-block: 4px; }
  .console-copy { padding-block: 5px; }
}
@media (max-height: 480px) and (min-width: 551px) {
  .film-ready .control-hub { position: relative; }
  .film-ready .hub-footer { position: absolute; inset: auto 0 0 auto; }
  .film-ready.hub-ready .copy-deck { inset-block-start: 4px; }
}
@media (max-height: 480px) and (min-width: 551px) and (max-width: 780px) {
  .film-ready.hub-ready .copy-deck { inset-inline: 12px; }
  .console-label { padding-block: 3px; }
  .console-copy { padding-block: 4px; }
  .console-copy strong { font-size: 12px; }
  .console-control > .icon-arrow { margin-block: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .console-control, .hub-footer { transition: none; }
}
