:root {
  color-scheme: dark;
  background: #858683;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #858683;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

.portrait-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 100vw;
  height: 100vh;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgb(188 189 186 / 35%), transparent 31%),
    radial-gradient(circle at 88% 76%, rgb(99 100 98 / 38%), transparent 36%),
    #858683;
}

@supports (height: 100dvh) {
  .portrait-stage {
    height: 100dvh;
  }
}

.portrait-background {
  position: absolute;
  z-index: -2;
  inset: -12%;
  background: #858683 url("./assets/james-portrait.jpg") center 38% / cover no-repeat;
  filter: blur(76px) grayscale(1) contrast(0.72);
  opacity: 0.74;
  transform: scale(1.1);
}

.portrait-stage::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(115deg, rgb(229 230 226 / 10%), transparent 36%, rgb(35 35 34 / 12%)),
    rgb(128 129 126 / 18%);
  content: "";
  pointer-events: none;
}

.anam-frame {
  position: relative;
  width: min(100vw, 56.25vh);
  height: min(177.7778vw, 100vh);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #858683;
  box-shadow: 0 0 48px rgb(27 27 26 / 20%);
}

@supports (height: 100dvh) {
  .anam-frame {
    width: min(100vw, 56.25dvh);
    height: min(177.7778vw, 100dvh);
  }
}

anam-agent {
  display: block;
  width: 100%;
  height: 100%;
}

.fullscreen-toggle {
  position: fixed;
  z-index: 2147483647;
  right: 16px;
  right: max(16px, env(safe-area-inset-right));
  bottom: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 46%);
  border-radius: 50%;
  color: #fff;
  background: rgb(24 24 23 / 58%);
  box-shadow: 0 8px 28px rgb(0 0 0 / 28%);
  cursor: pointer;
  opacity: 0.72;
  touch-action: manipulation;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.fullscreen-toggle:active {
  transform: scale(0.96);
}

.fullscreen-toggle:focus-visible {
  opacity: 1;
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.fullscreen-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

html.fullscreen-active .fullscreen-toggle {
  opacity: 0.62;
}

html.fullscreen-active.fullscreen-controls-hidden .fullscreen-toggle {
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(0.92);
}

.fullscreen-status {
  position: fixed;
  z-index: 2147483647;
  right: 18px;
  bottom: max(82px, calc(env(safe-area-inset-bottom) + 82px));
  left: 18px;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: 12px;
  color: #fff;
  background: rgb(24 24 23 / 88%);
  box-shadow: 0 8px 28px rgb(0 0 0 / 28%);
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
  transition: opacity 180ms ease;
}

.fullscreen-status:empty {
  display: none;
}

@media (max-width: 520px) {
  .anam-frame {
    box-shadow: none;
  }

  .fullscreen-toggle {
    width: 48px;
    height: 48px;
  }
}
