




html, body {
  height: 100%;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}



#app {
  box-sizing: border-box;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
}



#landing {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
#landing[hidden] { display: none; }
#landing-text {
  margin: 0;
  font-size: 17px;
  color: #fff;
}



#bridge-check {
  flex: 1;
  overflow-y: auto;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  font-size: 14px;
  line-height: 1.4;
}
#bridge-check h2 { margin: 0 0 4px; font-size: 20px; }
#bridge-check h3 { margin: 20px 0 8px; font-size: 16px; }
.bridge-check-lead { margin: 0 0 12px; color: #c8cbd8; }
.bridge-check-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bridge-check-step {
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 4px solid #8a8fa3;
  background: #15171f;
  overflow-wrap: anywhere;
}
.bridge-check-step[data-verdict="pass"] { border-left-color: #3fb67a; }
.bridge-check-step[data-verdict="warn"] { border-left-color: #e0a12e; }
.bridge-check-step[data-verdict="fail"] { border-left-color: #e5536f; }
.bridge-check-head { margin: 0 0 4px; display: flex; gap: 8px; align-items: baseline; }
.bridge-check-verdict { font-weight: 700; min-width: 4.5em; }
.bridge-check-title { font-weight: 600; }
.bridge-check-line { margin: 2px 0 0; color: #d9dbe5; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.bridge-check-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bridge-check-button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #4b5068;
  border-radius: 8px;
  background: #23263a;
  color: #fff;
  font: inherit;
}




#avatar-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #111;
  overflow: hidden;



  isolation: isolate;
}





















#backdrop-stack {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: var(--layer-opacity, 1);
  transition: opacity var(--backdrop-fade-ms, 400ms) ease;
}
















































#backdrop-a,
#backdrop-b,
#backdrop-video-a,
#backdrop-video-b,
#backdrop-video-c {
  position: absolute;
  inset: 0;
  translate: var(--layer-offset-x, 0%) var(--layer-offset-y, 0%);
  scale: var(--layer-scale, none);
  transform: scaleX(var(--layer-flip, 1));
  object-position: var(--layer-crop-x, 50%) var(--layer-crop-y, 50%);
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--backdrop-fade-ms, 400ms) ease;
}

#backdrop-a[data-visible="true"],
#backdrop-b[data-visible="true"],
#backdrop-video-a[data-visible="true"],
#backdrop-video-b[data-visible="true"],
#backdrop-video-c[data-visible="true"] {
  opacity: 1;
}





#backdrop-video-c {
  transition-duration: 120ms;
}
















#avatar-frame[data-tilt-pan="x"] {
  touch-action: pan-y;
}
#avatar-frame[data-tilt-pan="xy"] {
  touch-action: none;
}








@media (prefers-reduced-motion: no-preference) {
  :is(#backdrop-video-a, #backdrop-video-b, #backdrop-video-c)[data-tilt-pan="x"] {
    inset: var(--layer-offset-y, 0%) auto calc(-1 * var(--layer-offset-y, 0%)) calc(50% + var(--layer-offset-x, 0%));
    width: auto;
    min-width: 100%;
    translate: none;
    scale: none;
    transform: translate3d(calc(-50% + var(--tilt-pan-x, 0px)), 0, 0) scale(var(--layer-scale, 1)) scaleX(var(--layer-flip, 1));
  }
}











@media (prefers-reduced-motion: no-preference) {
  :is(#backdrop-a, #backdrop-b)[data-tilt-pan="x"] {
    inset: var(--layer-offset-y, 0%) auto calc(-1 * var(--layer-offset-y, 0%)) calc(50% + var(--layer-offset-x, 0%));
    width: auto;
    min-width: 100%;
    translate: calc(-50% + var(--tilt-pan-x, 0px)) 0;
  }
  :is(#backdrop-a, #backdrop-b)[data-tilt-pan="xy"] {
    inset: calc(50% + var(--layer-offset-y, 0%)) auto auto calc(50% + var(--layer-offset-x, 0%));
    width: var(--tilt-pan-w, 130%);
    height: var(--tilt-pan-h, 130%);
    object-fit: cover;
    translate: calc(-50% + var(--tilt-pan-x, 0px)) calc(-50% + var(--tilt-pan-y, 0px));
  }
}


























@media (prefers-reduced-motion: no-preference) {
  :is(#backdrop-video-a, #backdrop-video-b, #backdrop-video-c)[data-tilt-pan="xy"] {
    inset: calc(50% + var(--layer-offset-y, 0%)) auto auto calc(50% + var(--layer-offset-x, 0%));
    width: var(--tilt-pan-w, 130%);
    height: var(--tilt-pan-h, 130%);
    object-fit: cover;
    translate: none;
    scale: none;
    transform: translate3d(calc(-50% + var(--tilt-pan-x, 0px)), calc(-50% + var(--tilt-pan-y, 0px)), 0) scale(var(--layer-scale, 1)) scaleX(var(--layer-flip, 1));
  }
}




















[id^="parallax-layer-"] {
  position: absolute;
  inset: 0;
  translate: var(--layer-offset-x, 0%) var(--layer-offset-y, 0%);
  scale: var(--layer-scale, none);
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: var(--layer-opacity, 1);
  transition: opacity var(--layer-fade-ms, 0ms) ease;
}


[id^="parallax-layer-"][data-visible="false"] {
  opacity: 0;
}









[id^="parallax-layer-"] > :is(img, video) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--layer-crop-x, 50%) var(--layer-crop-y, 50%);
  transform: scaleX(var(--layer-flip, 1));
}




[id^="parallax-layer-"]:not([data-tilt-pan="x"], [data-tilt-pan="xy"]) > [data-fit="contain"] {
  object-fit: contain;
}









@media (prefers-reduced-motion: no-preference) {
  [id^="parallax-layer-"]:is([data-tilt-pan="x"], [data-tilt-pan="xy"]) {
    inset: calc(50% + var(--layer-offset-y, 0%)) auto auto calc(50% + var(--layer-offset-x, 0%));
    width: var(--parallax-w, 100%);
    height: var(--parallax-h, 100%);
    translate: none;
    scale: none;
    transform: translate3d(calc(-50% + var(--parallax-x, 0px)), calc(-50% + var(--parallax-y, 0px)), 0) scale(var(--layer-scale, 1));
  }
}

















#backdrop-a[data-ken-burns],
#backdrop-b[data-ken-burns],
[id^="parallax-image-"][data-ken-burns] {
  animation-duration: 24s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-fill-mode: both;
}




#backdrop-a[data-ken-burns-speed="slow"],
#backdrop-b[data-ken-burns-speed="slow"],
[id^="parallax-image-"][data-ken-burns-speed="slow"] {
  animation-duration: 48s;
}
#backdrop-a[data-ken-burns-speed="fast"],
#backdrop-b[data-ken-burns-speed="fast"],
[id^="parallax-image-"][data-ken-burns-speed="fast"] {
  animation-duration: 12s;
}
[data-ken-burns="drift"] { animation-name: ken-burns-drift; }
[data-ken-burns="zoom-in"] { animation-name: ken-burns-zoom-in; }
[data-ken-burns="zoom-out"] { animation-name: ken-burns-zoom-out; }
[data-ken-burns="pan-left"] { animation-name: ken-burns-pan-left; }
[data-ken-burns="pan-right"] { animation-name: ken-burns-pan-right; }
@keyframes ken-burns-drift {
  from { transform: scale(1.1) translate(-2%, -1%); }
  to { transform: scale(1.1) translate(2%, 1%); }
}
@keyframes ken-burns-zoom-in {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}
@keyframes ken-burns-zoom-out {
  from { transform: scale(1.15); }
  to { transform: scale(1); }
}

@keyframes ken-burns-pan-left {
  from { transform: scale(1.15) translateX(5%); }
  to { transform: scale(1.15) translateX(-5%); }
}
@keyframes ken-burns-pan-right {
  from { transform: scale(1.15) translateX(-5%); }
  to { transform: scale(1.15) translateX(5%); }
}


[data-layer-flip][data-ken-burns="drift"] { animation-name: ken-burns-drift-flip; }
[data-layer-flip][data-ken-burns="zoom-in"] { animation-name: ken-burns-zoom-in-flip; }
[data-layer-flip][data-ken-burns="zoom-out"] { animation-name: ken-burns-zoom-out-flip; }
[data-layer-flip][data-ken-burns="pan-left"] { animation-name: ken-burns-pan-left-flip; }
[data-layer-flip][data-ken-burns="pan-right"] { animation-name: ken-burns-pan-right-flip; }
@keyframes ken-burns-drift-flip {
  from { transform: scale(1.1) translate(-2%, -1%) scaleX(-1); }
  to { transform: scale(1.1) translate(2%, 1%) scaleX(-1); }
}
@keyframes ken-burns-zoom-in-flip {
  from { transform: scale(1) scaleX(-1); }
  to { transform: scale(1.15) scaleX(-1); }
}
@keyframes ken-burns-zoom-out-flip {
  from { transform: scale(1.15) scaleX(-1); }
  to { transform: scale(1) scaleX(-1); }
}
@keyframes ken-burns-pan-left-flip {
  from { transform: scale(1.15) translateX(5%) scaleX(-1); }
  to { transform: scale(1.15) translateX(-5%) scaleX(-1); }
}
@keyframes ken-burns-pan-right-flip {
  from { transform: scale(1.15) translateX(-5%) scaleX(-1); }
  to { transform: scale(1.15) translateX(5%) scaleX(-1); }
}











.layer-fx,
#backdrop-fx {
  display: none;
}
@media (prefers-reduced-motion: no-preference) {
  [id^="parallax-layer-"][data-fx-swim] {
    animation: layer-swim 7s ease-in-out infinite alternate;
  }
  .layer-fx {
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    transform: scaleX(var(--layer-flip, 1));
    -webkit-mask-image: var(--fx-mask);
    mask-image: var(--fx-mask);
    -webkit-mask-size: cover;
    mask-size: cover;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: var(--layer-crop-x, 50%) var(--layer-crop-y, 50%);
    mask-position: var(--layer-crop-x, 50%) var(--layer-crop-y, 50%);
  }
  .layer-fx[data-ken-burns] {
    animation-duration: 24s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-fill-mode: both;
  }
  .layer-fx[data-ken-burns-speed="slow"] { animation-duration: 48s; }
  .layer-fx[data-ken-burns-speed="fast"] { animation-duration: 12s; }
  .layer-fx > i {
    position: absolute;
    display: none;
    will-change: transform, opacity;
  }


  .layer-fx[data-layer-fx~="glitter"] > .fx-glitter {
    display: block;
    inset: -10%;
    background-image:
      radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.95) 0 1.2px, transparent 2.6px),
      radial-gradient(circle at 70% 60%, rgba(255, 246, 214, 0.9) 0 1px, transparent 2.2px),
      radial-gradient(circle at 45% 85%, rgba(214, 240, 255, 0.9) 0 1.4px, transparent 3px);
    background-size: 46px 52px, 61px 43px, 83px 71px;
    animation: fx-twinkle 2.6s ease-in-out infinite, fx-glint-drift 9s ease-in-out infinite alternate;
  }
  .layer-fx[data-layer-fx~="glitter"] > .fx-glitter::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      radial-gradient(circle at 60% 20%, rgba(255, 255, 255, 1) 0 1.4px, transparent 3px),
      radial-gradient(circle at 15% 75%, rgba(255, 236, 250, 0.9) 0 1px, transparent 2.4px);
    background-size: 57px 67px, 39px 49px;
    animation: fx-twinkle 3.4s ease-in-out -1.7s infinite;
  }

  .layer-fx[data-layer-fx~="sheen"] > .fx-sheen {
    display: block;
    top: -20%;
    bottom: -20%;
    left: 0;
    width: 45%;
    background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.42) 50%, rgba(255, 255, 255, 0) 70%, transparent 100%);
    animation: fx-sheen 7s ease-in-out 1.2s infinite;
  }



  .layer-fx[data-layer-fx~="shimmer"] > .fx-shimmer {
    display: block;
    top: -25%;
    bottom: -25%;
    left: -60%;
    width: 220%;
    background: linear-gradient(110deg,
      transparent 0%, transparent 28%,
      rgba(255, 214, 246, 0.34) 38%, rgba(214, 255, 252, 0.5) 46%, rgba(255, 255, 255, 0.62) 50%,
      rgba(255, 244, 205, 0.48) 55%, rgba(226, 214, 255, 0.32) 63%,
      transparent 72%, transparent 100%);
    animation: fx-shimmer-glide 6.5s ease-in-out infinite alternate, fx-shimmer-breathe 3.1s ease-in-out infinite;
  }
  #backdrop-fx {
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
  }
  #backdrop-fx > i {
    position: absolute;
    display: none;
    inset: 0;
  }

  #backdrop-fx[data-layer-fx~="rays"] > .fx-rays {
    display: block;
    inset: -20% -30% 20% -30%;
    transform-origin: 50% 0;
    background: repeating-linear-gradient(100deg, transparent 0 7%, rgba(255, 255, 240, 0.16) 9%, transparent 12% 19%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
    mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
    will-change: transform, opacity;
    animation: fx-rays 16s ease-in-out infinite alternate;
  }
  #backdrop-fx[data-layer-fx~="bubbles"] > .fx-bubbles {
    display: block;
  }
  #backdrop-fx .fx-bubbles > b {
    position: absolute;
    bottom: -12px;
    left: var(--x, 50%);
    width: var(--size, 6px);
    height: var(--size, 6px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.7) 0 18%, rgba(255, 255, 255, 0.08) 45%, transparent 70%);
    opacity: 0;
    will-change: transform, opacity;
    animation: fx-bubble var(--rise, 10s) linear var(--delay, 0s) infinite;
  }
}
@keyframes layer-swim {
  from { translate: 0 -4px; rotate: -0.6deg; }
  to { translate: 0 4px; rotate: 0.6deg; }
}
@keyframes fx-twinkle {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 1; }
}
@keyframes fx-glint-drift {
  from { transform: translate3d(-6px, -4px, 0); }
  to { transform: translate3d(6px, 4px, 0); }
}
@keyframes fx-sheen {
  0% { transform: translate3d(-120%, 0, 0) skewX(-8deg); opacity: 0; }
  4% { opacity: 1; }
  30% { transform: translate3d(330%, 0, 0) skewX(-8deg); opacity: 1; }
  31%, 100% { transform: translate3d(330%, 0, 0) skewX(-8deg); opacity: 0; }
}
@keyframes fx-shimmer-glide {
  from { transform: translate3d(-22%, 0, 0); }
  to { transform: translate3d(22%, 0, 0); }
}
@keyframes fx-shimmer-breathe {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
@keyframes fx-rays {
  from { transform: rotate(-3deg) translate3d(-2%, 0, 0); opacity: 0.55; }
  to { transform: rotate(3deg) translate3d(2%, 0, 0); opacity: 1; }
}
@keyframes fx-bubble {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  10% { opacity: 0.8; }
  50% { transform: translate3d(8px, -50vh, 0); }
  90% { opacity: 0.6; }
  100% { transform: translate3d(-4px, -105vh, 0); opacity: 0; }
}





@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

#avatar-poster {
  display: block;
  width: 100%;
  height: 100%;


  object-fit: contain;


  visibility: hidden;
}

#avatar-poster[data-loaded="true"] {
  visibility: visible;
}

#avatar-poster[data-covered="true"] {
  visibility: hidden;
}

#avatar-video,
#avatar-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  visibility: hidden;
}

#avatar-video[data-visible="true"],
#avatar-image[data-visible="true"] {
  visibility: visible;
}






#avatar-frame[data-window] #avatar-poster,
#avatar-frame[data-window] #avatar-video,
#avatar-frame[data-window] #avatar-image {
  position: absolute;
  inset: auto;
  width: auto;
  height: 38%;
  aspect-ratio: 9 / 16;
  max-width: 44%;
  border-radius: 12px;
  background: #111;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

#avatar-frame[data-window="window-top-left"] :is(#avatar-poster, #avatar-video, #avatar-image) { top: 16px; left: 16px; }
#avatar-frame[data-window="window-top-right"] :is(#avatar-poster, #avatar-video, #avatar-image) { top: 16px; right: 16px; }
#avatar-frame[data-window="window-bottom-left"] :is(#avatar-poster, #avatar-video, #avatar-image) { bottom: 16px; left: 16px; }
#avatar-frame[data-window="window-bottom-right"] :is(#avatar-poster, #avatar-video, #avatar-image) { bottom: 16px; right: 16px; }




#avatar-frame[data-chat-mode="audio"] #avatar-video,
#avatar-frame[data-chat-mode="audio"] #avatar-image {
  visibility: hidden;
}

#avatar-frame[data-chat-mode="audio"] #avatar-poster[data-loaded="true"] {
  visibility: visible;
}







#caption-area {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
}






#speaking-pill {
  align-self: flex-start;
  margin: 0 0 8px 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.7);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

#speaking-pill[hidden] { display: none; }

#speaking-pill::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;

  background: #2ecc71;
}






#captions {
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom)) 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8) 40%);
  border-left: 4px solid #ff7a45;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  min-height: 1.35em;
}





#notice {
  position: absolute;
  left: 50%;
  bottom: calc(3.5em + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  box-sizing: border-box;
  width: min(28rem, calc(100% - 32px));
  padding: 14px 16px;
  border: 1px solid var(--lc-line);
  border-top: 4px solid var(--lc-notice-rule, var(--lc-line));
  border-radius: 12px;
  background: var(--lc-panel);
  color: var(--lc-text);
  box-shadow: 0 8px 24px var(--lc-shadow);
  font-size: 15px;
  line-height: 1.45;
}

#notice[hidden] { display: none; }
#notice[data-tone="info"] { --lc-notice-rule: var(--lc-tone-info-fg); }
#notice[data-tone="warn"] { --lc-notice-rule: var(--lc-tone-warn-fg); }
#notice[data-tone="error"] { --lc-notice-rule: var(--lc-tone-error-fg); }

#notice-text {
  margin: 0;
}

#notice-action,
#notice-takeover,
#notice-connect-again {
  margin-top: 12px;


  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--lc-btn-border);
  background: var(--lc-btn-bg);
  color: var(--lc-text);
}

#notice-takeover,
#notice-connect-again { margin-right: 8px; }
#notice-action:hover,
#notice-takeover:hover,
#notice-connect-again:hover { background: var(--lc-btn-hover); }
#notice-action[hidden],
#notice-takeover[hidden],
#notice-connect-again[hidden] { display: none; }

#notice-action:focus-visible,
#notice-takeover:focus-visible,
#notice-connect-again:focus-visible {
  outline: 3px solid var(--lc-focus);
  outline-offset: 2px;
}

@media (min-width: 720px) {
  #notice {
    padding: 18px 20px;
    font-size: 16px;
  }
}



#tap-prompt {
  position: absolute;
  left: 50%;
  top: 80%;
  translate: -50% -50%;
  box-sizing: border-box;
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: rgba(211, 211, 211, 0.35);
  animation: tap-prompt-in 200ms ease-out, tap-prompt-pulse 1.6s ease-in-out 200ms infinite;
}
#tap-prompt[hidden] { display: none; }
#tap-prompt:focus-visible {
  outline: 3px solid var(--lc-focus);
  outline-offset: 3px;
}
#tap-prompt > img,
#tap-prompt > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}



@property --tap-hold { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
#tap-prompt::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(rgba(255, 255, 255, 0.95) var(--tap-hold), transparent 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
  pointer-events: none;
}
#tap-prompt[data-holding] { touch-action: none; user-select: none; -webkit-touch-callout: none; }
#tap-prompt[data-holding]::after { animation: tap-prompt-hold var(--tap-hold-seconds) linear forwards; }
@keyframes tap-prompt-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tap-prompt-pulse { 50% { transform: scale(1.08); } }
@keyframes tap-prompt-hold { to { --tap-hold: 360deg; } }


@media (prefers-reduced-motion: reduce) {
  #tap-prompt[data-holding]::after { animation: tap-prompt-hold var(--tap-hold-seconds) steps(4, end) forwards !important; }
}




#story-ending {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  box-sizing: border-box;
  text-align: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}

#story-ending[hidden] { display: none; }

#story-ending-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

#story-ending-text {
  margin: 0;
  max-width: 32rem;
  font-size: 15px;
  line-height: 1.4;
}






#disclosure {
  margin: 0;
  padding: 10px 16px 0;
  background: #000;
  color: #ccc;
  font-size: 13px;
  line-height: 1.4;
}
#disclosure[hidden] { display: none; }

#disclosure-banner {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  width: min(22rem, calc(100% - 32px));
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--lc-panel);
  color: var(--lc-text);
  box-shadow: 0 8px 24px var(--lc-shadow);
  pointer-events: none;
}
#disclosure-banner[hidden] { display: none; }

#disclosure-banner:not([hidden]) { animation: disclosure-in 200ms ease-out; }

@keyframes disclosure-in {
  from { opacity: 0; }
  to { opacity: 1; }
}





#disclosure-banner-label {
  margin: 0 0 4px;
  color: var(--lc-warm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#disclosure-banner-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

#controls {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #000;
}







#call-icons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  width: min(220px, 100%);
  margin: 0 auto;
}



#keyboard-button { grid-column: 1; grid-row: 1; justify-self: center; }
#mic-button { grid-column: 2; grid-row: 1; justify-self: center; }
#end-button { grid-column: 3; grid-row: 1; justify-self: center; }

button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

#start-button {
  background: #fff;
  color: #000;
}


#start-button:disabled {
  background: #9a9a9a;
  cursor: not-allowed;
}


#mic-button {
  background: #0d0d0d;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85), 0 0 22px 6px rgba(139, 92, 246, 0.55);
}



#mic-button[aria-pressed="true"] {
  background: #444;
  color: #ff9d9d;
  box-shadow: none;
}



#mic-button[data-blocked="true"] {
  background: #444;
  color: #fff;
  box-shadow: none;
}








#mic-button,
#keyboard-button,
#end-button {
  position: relative;
  padding: 0;
  overflow: hidden;
  text-indent: 150%;
  white-space: nowrap;
}

#mic-button::before,
#keyboard-button::before,
#end-button::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-repeat: no-repeat;
  mask-position: center;
}


#mic-button {
  width: 64px;
  height: 64px;
}

#mic-button::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11h-2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11h-2Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 28px;
  mask-size: 28px;
}



#mic-button[aria-pressed="true"]::before,
#mic-button[data-blocked="true"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11h-2Z'/%3E%3Crect x='-2' y='10.5' width='28' height='3' rx='1.5' transform='rotate(-45 12 12)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11h-2Z'/%3E%3Crect x='-2' y='10.5' width='28' height='3' rx='1.5' transform='rotate(-45 12 12)'/%3E%3C/svg%3E");
}




#app[data-look="classic"][data-mic="push-to-talk"] #mic-button {
  min-width: 44px;
  min-height: 44px;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  transition: background-color .15s ease, transform .15s ease;
}

#app[data-look="classic"][data-mic="push-to-talk"] #mic-button[aria-pressed="true"]:not([data-blocked="true"]) {
  background: #fff;
  color: #0d0d0d;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.9), 0 0 28px 10px rgba(139, 92, 246, 0.7);
  transform: scale(.96);
}

#app[data-look="classic"][data-mic="push-to-talk"] #mic-button[aria-pressed="true"]:not([data-blocked="true"])::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11h-2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-3.08A7 7 0 0 0 19 11h-2Z'/%3E%3C/svg%3E");
}


#mic-recovery {
  margin: 0;
  padding: 10px 16px 0;
  background: #000;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}
#mic-recovery[hidden] { display: none; }





#rotate-overlay {
  display: none;
}
@media (orientation: landscape) and (max-height: 500px) {
  html[data-shape="webview"] #rotate-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #000;
    color: #fff;
    font-size: 17px;
    text-align: center;
  }
}


#keyboard-button,
#end-button {
  background: transparent;
  color: #fff;
  width: 48px;
  height: 48px;
}

#keyboard-button::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z'/%3E%3C/svg%3E");
  -webkit-mask-size: 26px;
  mask-size: 26px;
}


#keyboard-button[aria-expanded="true"] {
  color: #b79cff;
}

#end-button::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 20px;
  mask-size: 20px;
}



#controls button {
  min-height: 44px;
  min-width: 44px;
}




#controls button:focus-visible,
#controls input:focus-visible {
  outline: 3px solid #8ea2ff;
  outline-offset: 2px;
}




#composer[hidden] {
  display: none;
}


#composer[data-collapsed="true"] {
  display: none;
}

#composer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;


  flex: 1 1 14rem;
  min-width: 0;
}

#composer-input {
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid #444;
  background: #1a1a1a;
  color: #fff;
  padding: 8px 14px;



  font-size: 16px;
}

#composer-send {
  background: #fff;
  color: #000;
}


#composer-error {
  flex-basis: 100%;
  margin: 0;
  padding: 0 14px;
  font-size: 13px;
  color: #ff6b6b;
}

#composer-input[aria-invalid="true"] {
  border-color: #ff6b6b;
}

#status {
  margin-left: auto;
  font-size: 13px;
  color: #aaa;
  text-align: right;
}



#status[data-quiet="true"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}



#connection-dot {
  position: absolute;
  top: 39px;
  right: 16px;
  display: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5a5a;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45);
}
#connection-dot[data-state="ok"] { background: #2ecc71; }
#app:has(#end-button:not([hidden])) #connection-dot { display: block; }



#controls:has(#end-button:not([hidden])) #status {
  flex-basis: 100%;
  margin-left: 0;
  text-align: center;
}



#report-button {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  right: 10px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
}
#report-button[hidden] { display: none; }
#report-button:hover { background: rgba(0, 0, 0, 0.7); }
#report-button:focus-visible,
#report-sheet button:focus-visible,
#report-sheet input:focus-visible {
  outline: 3px solid var(--lc-focus);
  outline-offset: 2px;
}

#report-status {
  position: absolute;
  top: calc(60px + env(safe-area-inset-top));
  right: 10px;
  max-width: min(18rem, calc(100% - 20px));
  margin: 0;
  font-size: 13px;
  color: #ddd;
  text-align: right;
}
#report-status:empty { display: none; }

#report-sheet {
  box-sizing: border-box;
  width: min(28rem, 100%);
  margin: auto auto 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  border: 1px solid var(--lc-line);
  border-radius: 16px 16px 0 0;
  background: var(--lc-panel);
  color: var(--lc-text);
}
#report-sheet::backdrop { background: rgba(0, 0, 0, 0.35); }
#report-title { margin: 0 0 12px; font-size: 17px; }
#report-options {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  font-size: 15px;
}


#report-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.report-actions { display: flex; justify-content: flex-end; gap: 8px; }
#report-cancel,
#report-send { min-height: 44px; }
#report-cancel { background: transparent; color: var(--lc-text); border: 1px solid var(--lc-btn-border); }
#report-send { background: #fff; color: #000; }



#character-clip {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
#character-clip[hidden] { display: none; }
#character-clip-video { width: 100%; height: 100%; object-fit: contain; }
#character-clip-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--lc-btn-border);
  border-radius: 8px;
  background: var(--lc-btn-bg);
  color: var(--lc-text);
  font: inherit;
}
#character-clip-close:hover { background: var(--lc-btn-hover); }
#character-clip-close:focus-visible { outline: 3px solid var(--lc-focus); outline-offset: 2px; }





#safety-overlay {
  box-sizing: border-box;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: calc(56px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, var(--lc-device-calm) 0%, var(--lc-device-bg) 45%, var(--lc-device-bg) 70%, var(--lc-device-calm) 100%);
  color: var(--lc-dplus-white);
  font: 400 15px/23px Inspire, 'Avenir Next', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  letter-spacing: -.1px;
  -webkit-font-smoothing: antialiased;
}
#safety-overlay[open] { display: flex; flex-direction: column; }
#safety-overlay *, #safety-overlay *::before, #safety-overlay *::after { box-sizing: border-box; }
#safety-overlay::backdrop { background: var(--lc-device-bg); }
.safety-takeover-bar { display: flex; justify-content: flex-end; margin: 0 0 48px; }
#safety-overlay-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: none;
  color: var(--lc-dplus-white);
  cursor: pointer;
}
.safety-takeover-close-icon { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; }

.safety-takeover-body { flex: 1; overflow-y: auto; scrollbar-width: none; margin: -4px; padding: 4px; }
.safety-takeover-body::-webkit-scrollbar { display: none; }
#safety-overlay-title { margin: 0 0 12px; font-size: 32px; line-height: 1.2; font-weight: 600; color: var(--lc-device-text); }
#safety-overlay-text { margin: 0 0 28px; font-size: 15px; line-height: 1.45; color: var(--lc-device-muted); overflow-wrap: anywhere; }
#safety-overlay-resources { display: flex; flex-direction: column; gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; }
#safety-overlay-resources[hidden], #safety-overlay-fine[hidden] { display: none; }
.safety-takeover-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  border-radius: 9999px;
  background: var(--lc-dplus-btn-dark);
  color: var(--lc-dplus-white);
  font: 700 15px/23px Inspire, 'Avenir Next', 'Helvetica Neue', sans-serif;
  letter-spacing: 1.76px;
  text-transform: uppercase;
  text-decoration: none;
}
.safety-takeover-pill--primary { background: var(--lc-dplus-white); color: var(--lc-dplus-black); }

button.safety-takeover-pill { width: 100%; border: 0; cursor: default; }
#safety-overlay-fine { margin: 0; }
.safety-overlay-actions { margin: 0; }
#safety-overlay-dismiss {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lc-dplus-link);
  font: inherit;
  font-size: 13px;
  line-height: 19px;
  letter-spacing: 0;
  cursor: pointer;
}
#safety-overlay-dismiss:focus-visible,
#safety-overlay-close:focus-visible,
.safety-takeover-pill:focus-visible {
  outline: 2px solid var(--lc-dplus-link);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}


#draft-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 6px 12px;
  background: #b45309;
  color: #fff;
  font: 600 14px/1.3 system-ui, sans-serif;
  text-align: center;
  letter-spacing: 0.02em;
}
#draft-banner[hidden] { display: none; }
