:root {
  color-scheme: dark;
  background: #070b10;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background: #070b10;
}

.living-window {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: #070b10;
}

.scene-poster,
.scene-poster img,
.scene-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.scene-video {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

html[data-playing="true"] .scene-video,
html[data-frame-ready="true"] .scene-video {
  opacity: 1;
}

/* Keep the television and coffee visible in the full-bleed portrait crop. */
@media (max-aspect-ratio: 1/1) {
  .scene-poster img,
  .scene-video {
    object-position: 50% 78%;
  }
}

/* On square portrait layouts prioritize the complete physical display. */
@media (min-aspect-ratio: 4/5) and (max-aspect-ratio: 1/1) {
  .scene-poster img,
  .scene-video { object-position: 50% 50%; }
}

/* The scene deliberately extends beneath display cutouts. Future interactive
   content should use env(safe-area-inset-*) without shrinking this background. */
@supports (height: 100svh) {
  .living-window {
    min-height: 100svh;
  }
}

.watch-stage {
  position: fixed;
  z-index: 2;
  left: var(--scene-screen-left, 0px);
  top: var(--scene-screen-top, 0px);
  width: var(--scene-screen-width, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  opacity: 0;
  pointer-events: none;
}
.watch-stage[data-scene-aligned="true"] { opacity: 1; pointer-events: auto; }
.player-shell { position: relative; width: 100%; }
.screen-definitions { position: absolute; pointer-events: none; }
/* The metal frame, depth and reflections are part of the actual scene video. */
.screen-bezel { display: none; }
/* The larger portrait television covers the original frame in the room.
   Landscape keeps the calibrated television from the scene itself. */
@media (max-aspect-ratio: 1/1) {
  .watch-stage[data-scene-layout="mobile"] .screen-bezel {
    display: block;
    position: absolute;
    left: -4px;
    top: calc(-1 * var(--mobile-bezel-top, 16px));
    width: calc(100% + 8px);
    height: calc(var(--scene-screen-height, 0px) + var(--mobile-bezel-top, 16px) + var(--mobile-bezel-bottom, 20px));
    overflow: visible;
    pointer-events: none;
    filter: drop-shadow(0 7px 9px #0009) drop-shadow(0 0 4px #0007);
  }
}
.foreground-steam {
  position: fixed;
  z-index: 3;
  display: block;
  pointer-events: none;
}
.player-surface {
  position: relative;
  width: 100%;
  height: var(--scene-screen-height, 0px);
  overflow: hidden;
  clip-path: url(#curved-screen);
  background: #000;
}
.player-surface iframe {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--twitch-viewport-width, 100%);
  height: var(--twitch-viewport-height, 100%);
  transform: translate(-50%, -50%) scale(var(--twitch-scale, 1));
  transform-origin: center;
  border: 0;
  display: block;
}
.player-external {
  position: absolute;
  inset: 0;
  clip-path: url(#curved-screen);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #f7f8fc;
  text-decoration: none;
  background: transparent;
}
.player-external-name { font-size: 1.25rem; font-weight: 650; }
.player-external-action { font-size: .9375rem; color: #e9ba80; }
[data-player-mode="embed"] .player-external { display: none; }

.social-links {
  position: absolute;
  right: calc(100% + clamp(20px, 2vw, 64px));
  top: 50%;
  transform: translateY(-50%);
  width: 122px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.social-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #dce9f12e;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff0d, #0a17242b);
  box-shadow: 0 6px 20px #0003, inset 0 1px #ffffff14;
  color: #f1f5f9;
  text-shadow: 0 1px 8px #000b;
  text-decoration: none;
  font-size: .9375rem;
  font-family: inherit;
  font-weight: 550;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .18s, background .18s, transform .18s;
}
.social-link svg { flex: none; width: 20px; height: 20px; }
.social-tiktok svg { color: #7fe4e9; }
.social-youtube svg { color: #ff7478; }
.social-email svg { color: #ebba7f; }
.social-link:not(:disabled):hover { transform: translateX(3px); border-color: #e8c18e96; background: #23354455; }
.social-pending { opacity: .65; cursor: default; }
.social-link:focus-visible,
.player-external:focus-visible { outline: 2px solid #83d4e6; outline-offset: 5px; }
@media (max-width: 1100px) {
  .social-links { width: 48px; right: calc(100% + 16px); }
  .social-link { width: 48px; padding: 0; justify-content: center; }
  .social-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
@media (max-aspect-ratio: 1/1) {
  .social-links {
    position: fixed;
    top: auto;
    bottom: max(18dvh, calc(env(safe-area-inset-bottom) + 20px));
    left: auto;
    right: max(12px, env(safe-area-inset-right));
    transform: none;
  }
}
@media (min-width: 2560px) {
  .social-links { width: 180px; gap: 18px; }
  .social-link { min-height: 64px; padding: 0 22px; gap: 14px; font-size: 1.25rem; }
  .social-link svg { width: 26px; height: 26px; }
}
@media (min-aspect-ratio: 4/5) and (max-aspect-ratio: 1/1) {
  .social-links {
    flex-direction: row;
    width: auto;
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(env(safe-area-inset-bottom) + 14px);
    top: auto;
    left: auto;
    transform: none;
  }
}
@media (max-width: 359px) and (max-aspect-ratio: 1/1) {
  .social-links { bottom: max(calc(env(safe-area-inset-bottom) + 20px), 12dvh); }
}
@media (prefers-reduced-motion: reduce) {
  .social-link { transition: none; }
  .social-link:hover { transform: none; }
}
