/* The film is another layer in the existing portal, never a separate card. */
.portal-entry { display: none; }
.portal-film { background: #05060f; }
.portal-film video { display: block; width: 100%; aspect-ratio: 16 / 9; }
.portal.has-trailer .portal-entry { position: absolute; z-index: 8; left: 16px; right: 16px; bottom: 7%; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.portal-entry span { flex-basis: 100%; text-align: center; font-size: 12px; color: #ddd5ed; }
.portal-entry button, .trailer-buttons button, .trailer-buttons a { border: 1px solid #74f5ef; border-radius: 0; background: #0b091ee8; color: #f0eafe; padding: 12px 16px; font: 13px var(--body); cursor: pointer; min-height: 44px; text-decoration: none; }
.portal-entry button:first-child { background: #74f5ef; color: #080d1a; }
.portal-entry button:focus-visible, .trailer-buttons :focus-visible { outline: 3px solid #ffa8de; outline-offset: 4px; }
.portal-entry[hidden], .trailer-ui[hidden] { display: none !important; }
.portal-live .portal.has-trailer { height: 460vh; height: 460svh; }
.portal-live .has-trailer .portal-film { position: absolute; inset: 0; z-index: 6; background: #05060f; opacity: var(--film, 0); visibility: hidden; pointer-events: none; transition: opacity .25s linear; }
.portal-live .has-trailer .portal-film.is-visible { visibility: visible; pointer-events: auto; }
.portal-live .has-trailer .portal-film video { width: 100%; height: 100%; object-fit: contain; aspect-ratio: auto; }
.portal-live .has-trailer .portal-hint { display: none; }
.trailer-ui { position: absolute; inset: auto 24px 24px; z-index: 7; color: #f0eafe; }
.trailer-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.trailer-ui p { width: fit-content; max-width: 100%; background: #05060fe8; padding: 5px 8px; margin: 8px 0 0; font: 11px/1.5 var(--body); letter-spacing: .5px; }
.trailer-status:empty { display: none; }
html:not(.portal-live) .has-trailer .portal-stage { height: auto; overflow: visible; }
html:not(.portal-live) .has-trailer .portal-wall, html:not(.portal-live) .has-trailer .portal-door, html:not(.portal-live) .has-trailer .portal-shuttle, html:not(.portal-live) .has-trailer .portal-cosmos, html:not(.portal-live) .has-trailer .portal-hint { display: none; }
html:not(.portal-live) .has-trailer .portal-title { position: static; transform: none; padding: 32px 16px; }
html:not(.portal-live) .has-trailer .portal-entry { position: static; margin: 16px; }
html:not(.portal-live) .has-trailer .trailer-ui { position: static; padding: 16px; }
@media (max-width: 720px) {
  .portal-live .has-trailer .trailer-ui { inset: auto 12px 18px; }
  .trailer-buttons button, .trailer-buttons a { font-size: 11px; padding: 10px; }
  .portal-live .has-trailer .portal-name { font-size: clamp(30px, 8vw, 56px); }
}
@media (forced-colors: active) { .portal.has-trailer { display: block; } .portal.has-trailer button, .portal.has-trailer a { forced-color-adjust: auto; } }
@media print { .portal.has-trailer { display: none !important; } }
/* End card remains in the original film. On completion it dissolves into the live world;
   the small replay/sound controls stay reachable against that same scene. */
.portal-live .has-trailer .portal-film.is-complete { background: transparent; transition: background 1.2s; }
.portal-live .has-trailer .portal-film.is-complete video { opacity: 0; transition: opacity 1.2s; }

.has-trailer:not(.trailer-ready) .trailer-buttons { display: none; }

/* Sound is the primary entry intent, activated only by an explicit click/keyboard action. */
.portal-door-enter { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.portal-door-enter[hidden] { display: none; }
.portal-door-enter:focus-visible { outline: 3px solid #74f5ef; outline-offset: 5px; }
.portal-entry [data-trailer-entry="quiet"] { background: transparent; border-color: transparent; color: #ddd5ed; text-decoration: underline; text-underline-offset: 4px; }
