:root {
  --ink: #111827;
  --panel: rgba(255, 255, 255, 0.42);
  --panel-2: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-soft: rgba(255, 255, 255, 0.34);
  --line: rgba(15, 23, 42, 0.11);
  --line-bright: rgba(255, 255, 255, 0.72);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #7dd3fc;
  --accent-2: #a7f3d0;
  --accent-3: #f0abfc;
  --focus: #2563eb;
  --screen-fit: contain;
  --video-scale: 0.96;
  --video-x: 0px;
  --video-y: 0px;
  --custom-bg-color: #ffffff;
  --custom-bg-image: none;
  --scene-page-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0 26%, rgba(218, 241, 255, 0.84) 26% 52%, rgba(255, 237, 245, 0.9) 52% 78%, rgba(236, 255, 246, 0.92) 78% 100%),
    conic-gradient(from 210deg at 55% 46%, rgba(125, 211, 252, 0.28), rgba(240, 171, 252, 0.22), rgba(167, 243, 208, 0.24), rgba(255, 255, 255, 0.34), rgba(125, 211, 252, 0.28)),
    #f8fbff;
  --scene-stage-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 252, 255, 0.92)),
    #ffffff;
  --scene-controls-bg:
    linear-gradient(155deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42)),
    #ffffff;
  --scene-text: #151515;
  --phone-rotation: 0deg;
  --model-preview-scale: 1;
  --frame-aspect: 1469 / 3000;
  --frame-height-factor: 2.042;
  --frame-mask-image: url("./assets/iphone-frame-overlay.png");
  --screen-mask-image: url("./assets/iphone-green-screen-mask.png");
  --annotation-color: #ff2b2b;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0 26%, rgba(218, 241, 255, 0.84) 26% 52%, rgba(255, 237, 245, 0.9) 52% 78%, rgba(236, 255, 246, 0.92) 78% 100%),
    conic-gradient(from 210deg at 55% 46%, rgba(125, 211, 252, 0.28), rgba(240, 171, 252, 0.22), rgba(167, 243, 208, 0.24), rgba(255, 255, 255, 0.34), rgba(125, 211, 252, 0.28)),
    #f8fbff;
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
  transition:
    transform 180ms cubic-bezier(.2, .8, .2, 1),
    box-shadow 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

button:active {
  transform: translateY(1px) scale(0.99);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 18px;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding: 18px;
}

.stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 252, 255, 0.92)),
    #ffffff;
  color: var(--text);
  overflow: hidden;
  border: 1px solid var(--line-bright);
  border-radius: 30px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -40px 80px rgba(255, 255, 255, 0.22),
    0 24px 70px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(28px) saturate(1.45);
  -webkit-backdrop-filter: blur(28px) saturate(1.45);
}

.topbar,
.timeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.timeline,
.controls {
  backdrop-filter: blur(26px) saturate(1.4);
  -webkit-backdrop-filter: blur(26px) saturate(1.4);
}

.timeline {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.28));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 16px 34px rgba(15, 23, 42, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.video-shell-home-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: clamp(132px, 10.4vw, 190px);
  min-height: 42px;
  padding: 0 clamp(12px, 1.05vw, 20px);
  overflow: visible;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  outline: none;
  background:
    linear-gradient(180deg, rgba(172, 222, 255, 0.96), rgba(103, 166, 232, 0.94)),
    rgba(119, 184, 244, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -10px 22px rgba(34, 116, 205, 0.16),
    0 16px 34px rgba(55, 117, 190, 0.18);
  transition:
    filter 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.video-shell-home-logo::before {
  content: "";
  position: absolute;
  inset: 3px 5px auto;
  z-index: 1;
  height: 42%;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.44), transparent);
  pointer-events: none;
}

.video-shell-home-logo:hover,
.video-shell-home-logo:focus-visible {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -10px 22px rgba(34, 116, 205, 0.18),
    0 18px 38px rgba(55, 117, 190, 0.22);
}

.video-shell-home-logo:active {
  transform: translateY(2px);
}

.video-shell-home-logo__text {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: clamp(16px, 1.3vw, 24px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow:
    0 2px 0 rgba(44, 109, 185, 0.28),
    0 5px 12px rgba(30, 91, 166, 0.26);
}

.video-shell-home-clouds {
  position: absolute;
  inset: -18px -40px 4px -24px;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}

.video-shell-home-cloud {
  position: absolute;
  z-index: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #fff;
  image-rendering: pixelated;
  animation: videoShellCloudMove 18s ease-in-out infinite alternate;
}

.video-shell-home-cloud--1 {
  top: 3px;
  left: 2px;
  width: 18px;
  height: 10px;
  box-shadow:
    0 0 0 3px #fff,
    13px 0 #fff,
    -6px 6px #fff,
    7px 6px #fff,
    18px 6px #fff,
    -12px 12px #fff,
    0 12px #fff,
    13px 12px #fff,
    23px 12px #fff;
}

.video-shell-home-cloud--2 {
  right: 8px;
  bottom: 24px;
  width: 22px;
  height: 14px;
  box-shadow:
    4px 0 #fff,
    -6px 7px #fff,
    4px -1px #fff,
    17px 7px #fff,
    0 12px #fff,
    11px 10px #fff;
  animation-duration: 22s;
}

@keyframes videoShellCloudMove {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(32px);
  }
}

.orientation-switch,
.media-switch {
  width: min(220px, 100%);
}

.not_found_logo_link {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: clamp(250px, 22vw, 350px);
  margin-top: -12px;
  margin-bottom: -10px;
  color: inherit;
  text-decoration: none;
  outline: none;
  filter: drop-shadow(0 8px 12px rgba(93, 137, 175, 0.12));
}

.not_found_logo_link:hover .not_found_logo_svg,
.not_found_logo_link:focus-visible .not_found_logo_svg {
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.not_found_logo_link:active .not_found_logo_svg {
  transform: translateY(3px);
}

.not_found_logo_svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

.not_found_st0 {
  fill: #fff;
}

.not_found_st2 {
  fill: #5d89af;
}

.not_found_st3 {
  fill: #709abf;
}

.not_found_st4,
.not_found_st6 {
  fill: #fff;
  stroke: #b3dcdf;
  stroke-miterlimit: 10;
}

.not_found_st6 {
  stroke: #5d89af;
  stroke-width: 2;
}

.not_found_st7,
.not_found_st8,
.not_found_st9 {
  stroke: #709abf;
  stroke-miterlimit: 10;
}

.not_found_st7 {
  stroke-width: 5;
  stroke-linecap: round;
  fill: none;
}

.not_found_st8,
.not_found_st9 {
  fill: #fff;
}

.not_found_st9 {
  fill: none;
}

.not_found_logo_ground {
  fill: #b3dcdf;
}

.not_found_rail,
.not_found_sleepers {
  fill: none;
  stroke: #709abf;
  stroke-linecap: round;
  stroke-miterlimit: 10;
}

.not_found_rail {
  stroke-width: 4;
}

.not_found_sleepers {
  stroke-width: 3;
}

.not_found_train_body,
.not_found_train_nose,
.not_found_train_roof {
  stroke-linejoin: round;
}

.not_found_train_body {
  stroke-width: 2;
}

.not_found_train_nose,
.not_found_train_roof {
  stroke-width: 1.6;
}

.not_found_train_window,
.not_found_train_line {
  fill: none;
  stroke: #709abf;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-miterlimit: 10;
}

.not_found_train_window {
  stroke-width: 2;
}

.not_found_train_line {
  stroke-width: 1.8;
}

.not_found_bogie {
  fill: #b3dcdf;
  stroke: #5d89af;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.not_found_wheel {
  fill: #5d89af;
  stroke: #fff;
  stroke-width: 3;
}

.not_found_wheel_core {
  fill: #fff;
  stroke: #709abf;
  stroke-width: 2;
}

#not_found_cloud1 {
  animation: not_found_cloud003 15s linear infinite;
}

#not_found_cloud2 {
  animation: not_found_cloud002 25s linear infinite;
}

#not_found_cloud3 {
  animation: not_found_cloud003 20s linear infinite;
}

#not_found_cloud4 {
  animation: not_found_float 4s linear infinite;
}

#not_found_cloud5 {
  animation: not_found_float 8s linear infinite;
}

#not_found_tracks {
  animation: not_found_slide 650ms linear infinite;
}

#not_found_bumps {
  animation: not_found_land 10000ms linear infinite;
}

#not_found_car-layers {
  animation: not_found_jig 0.35s linear infinite;
}

.not_found_logo_text {
  fill: #fff;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 37px;
  font-weight: 900;
  letter-spacing: 0;
  paint-order: stroke fill;
  stroke: #709abf;
  stroke-width: 1.7px;
}

@keyframes not_found_pulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

@keyframes not_found_jig {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(1px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes not_found_land {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(1000px);
  }
}

@keyframes not_found_slide {
  from {
    transform: translateX(0px);
  }
  to {
    transform: translateX(100px);
  }
}

@keyframes not_found_cloud002 {
  0% {
    transform: translateX(-1000px) translateY(3px);
  }
  100% {
    transform: translateX(1000px) translateY(0);
  }
}

@keyframes not_found_cloud003 {
  0% {
    transform: translateX(-1000px) translateY(3px);
  }
  100% {
    transform: translateX(1000px) translateY(0);
  }
}

@keyframes not_found_float {
  0% {
    transform: translateY(0px) translateX(0);
  }
  50% {
    transform: translateY(8px) translateX(5px);
  }
  100% {
    transform: translateY(0px) translateX(0);
  }
}

#not_found_bracefront,
#not_found_braceback {
  animation: not_found_braces 1s linear infinite;
}

@keyframes not_found_braces {
  0% {
    transform: translateX(-2px);
  }
  25% {
    transform: translateX(3px);
  }
  50% {
    transform: translateX(-2px);
  }
  75% {
    transform: translateX(3px);
  }
  100% {
    transform: translateX(-2px);
  }
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
}

.brand p {
  margin-top: 4px;
  color: rgba(15, 23, 42, 0.64);
  font-size: 12px;
}

.status {
  min-width: 80px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 999px;
  color: rgba(15, 23, 42, 0.68);
  font-size: 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.topbar {
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.topbar .status {
  display: none;
}

.preview-wrap {
  display: grid;
  grid-template-columns: minmax(50px, 64px) minmax(0, 1fr) minmax(50px, 64px);
  align-items: center;
  justify-items: center;
  column-gap: 14px;
  position: relative;
  min-height: 0;
  padding: 2px 0 10px;
  overflow: hidden;
  isolation: isolate;
}

.preview-wrap > .preview-switch {
  grid-row: 1;
  align-self: center;
  width: 56px;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.42));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 4px 12px rgba(15, 23, 42, 0.035);
  z-index: 14;
}

.preview-wrap > .preview-switch::before {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 3px 8px rgba(15, 23, 42, 0.035);
}

.preview-wrap > .orientation-switch {
  grid-column: 1;
  justify-self: start;
}

.preview-wrap > .media-switch {
  grid-column: 3;
  justify-self: end;
}

.preview-wrap > .preview-switch .chip {
  min-height: 48px;
  padding: 0 8px;
  border-radius: 16px;
}

.preview-wrap::before,
.preview-wrap::after {
  content: none;
  position: absolute;
  inset: auto;
  z-index: -2;
  pointer-events: none;
}

.preview-wrap::before {
  width: min(68vw, 760px);
  aspect-ratio: 1.75;
  background:
    linear-gradient(116deg, transparent 0 18%, rgba(125, 211, 252, 0.56) 18% 31%, transparent 31% 100%),
    linear-gradient(294deg, transparent 0 24%, rgba(240, 171, 252, 0.34) 24% 39%, transparent 39% 100%);
  transform: rotate(-5deg);
  filter: blur(0.2px);
  opacity: 0.7;
}

.preview-wrap::after {
  width: min(56vw, 640px);
  aspect-ratio: 2.5;
  bottom: 7%;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.22);
  filter: blur(32px);
}

.backplate {
  display: none;
  position: absolute;
  width: min(74vw, 820px);
  height: min(52vh, 480px);
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.18);
  transform: skewY(-4deg) rotate(-1.5deg);
  z-index: -1;
  pointer-events: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 24px 80px rgba(15, 23, 42, 0.09);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.phone {
  --device-width: clamp(250px, 27vw, 390px);
  --screen-x: 0%;
  --screen-y: 0%;
  --screen-w: 100%;
  --screen-h: 100%;
  --screen-mask-bleed: 0.25px;
  --screen-mask-bottom-bleed: 2px;
  position: relative;
  grid-column: 2;
  grid-row: 1;
  width: auto;
  height: min(calc(var(--device-width) * var(--frame-height-factor)), calc(90% - 20px), 68vw);
  aspect-ratio: var(--frame-aspect);
  background: transparent;
  transform: rotate(var(--phone-rotation)) scale(var(--model-preview-scale));
  transform-origin: center;
  transition:
    height 260ms cubic-bezier(.2, .8, .2, 1),
    transform 320ms cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
  backface-visibility: hidden;
}

.device-frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 28px 42px rgba(15, 23, 42, 0.2));
  image-rendering: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.phone::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.28;
  background:
    radial-gradient(ellipse 19.5% 3.3% at 50% 6.24%, rgba(0, 0, 0, 0.96) 0 57%, rgba(0, 0, 0, 0.36) 66%, transparent 76%),
    linear-gradient(180deg, transparent 0 80%, rgba(0, 0, 0, 0.32) 89%, rgba(0, 0, 0, 1) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.16) 7%, transparent 17% 83%, rgba(0, 0, 0, 0.16) 93%, rgba(0, 0, 0, 0.78)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.1) 9%, transparent 24% 76%, rgba(0, 0, 0, 0.16) 91%, rgba(0, 0, 0, 0.78));
  mix-blend-mode: multiply;
  mask: var(--frame-mask-image) center / 100% 100% no-repeat;
  -webkit-mask: var(--frame-mask-image) center / 100% 100% no-repeat;
}

.phone.dark-shell::before {
  opacity: 0.46;
}

body[data-device="iphone"] .phone.model-iphone-air::before,
body[data-device="ipad"] .phone::before,
body[data-device="mac"] .phone::before {
  display: none;
}

.phone.no-shadow .device-frame {
  filter: none;
}

.phone.model-imac .device-frame {
  filter: none;
}

.phone.model-iphone-16,
.phone.model-iphone-16-pro {
  --device-width: clamp(252px, 28vw, 366px);
}

.phone.model-iphone-17,
.phone.model-iphone-17e,
.phone.model-iphone-17-pro,
.phone.model-iphone-16e,
.phone.model-iphone-15,
.phone.model-iphone-14,
.phone.model-iphone-13,
.phone.model-iphone-13-pro,
.phone.model-iphone-12,
.phone.model-iphone-12-pro,
.phone.model-iphone-11,
.phone.model-iphone-xr {
  --device-width: clamp(260px, 30vw, 384px);
}

.phone.model-iphone-air {
  --device-width: clamp(268px, 31vw, 396px);
}

.phone.model-iphone-17-pro-max,
.phone.model-iphone-16-plus,
.phone.model-iphone-16-pro-max,
.phone.model-iphone-14-plus {
  --device-width: clamp(274px, 30.5vw, 404px);
}

.phone.model-iphone-15-plus,
.phone.model-iphone-15-pro-max,
.phone.model-iphone-14-pro-max,
.phone.model-iphone-13-pro-max,
.phone.model-iphone-12-pro-max,
.phone.model-iphone-11-pro-max,
.phone.model-iphone-xs-max {
  --device-width: clamp(268px, 30vw, 394px);
}

.phone.model-iphone-15-pro,
.phone.model-iphone-14-pro,
.phone.model-iphone-11-pro,
.phone.model-iphone-xs,
.phone.model-iphone-x {
  --device-width: clamp(246px, 27.2vw, 354px);
}

.phone.model-iphone-13-mini,
.phone.model-iphone-12-mini {
  --device-width: clamp(226px, 25vw, 326px);
}

.phone.model-ipad-pro-13,
.phone.model-ipad-air-13 {
  --device-width: clamp(280px, 31vw, 440px);
}

.phone.model-ipad-pro-11,
.phone.model-ipad-air-11,
.phone.model-ipad {
  --device-width: clamp(258px, 29vw, 408px);
}

.phone.model-ipad-mini {
  --device-width: clamp(230px, 25vw, 360px);
}

body[data-device="ipad"] .phone {
  --screen-mask-bleed: 0px;
  --screen-mask-bottom-bleed: 0px;
}

.phone.model-macbook-air,
.phone.model-macbook-neo,
.phone.model-macbook-pro,
.phone.model-imac {
  --device-width: clamp(720px, 58vw, 1040px);
  --screen-mask-bleed: 0px;
  --screen-mask-bottom-bleed: 0px;
}

.phone.model-imac {
  --device-width: clamp(920px, 70vw, 1280px);
}

.phone[data-orientation="landscape"] {
  height: min(calc(var(--device-width) * var(--frame-height-factor)), calc(84% - 18px), 58vw);
}

.phone[data-orientation="landscape"]::before {
  opacity: 0.36;
}

.screen {
  position: absolute;
  inset: calc(-1 * var(--screen-mask-bleed));
  z-index: 2;
  width: auto;
  height: auto;
  overflow: hidden;
  background: #050506;
  mask: var(--screen-mask-image) center top / 100% calc(100% + var(--screen-mask-bottom-bleed)) no-repeat;
  -webkit-mask: var(--screen-mask-image) center top / 100% calc(100% + var(--screen-mask-bottom-bleed)) no-repeat;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.screen::after {
  content: "";
  position: absolute;
  left: 38.15%;
  top: 6.1%;
  width: 23.7%;
  height: 3.85%;
  border-radius: 999px;
  background: #000000;
  box-shadow:
    0 0 0 1.4px rgba(0, 0, 0, 0.94),
    0 0 0 2.2px rgba(0, 0, 0, 0.24);
  pointer-events: none;
  z-index: 3;
}

.screen::before {
  content: "";
  position: absolute;
  left: 8.8%;
  right: 8.8%;
  bottom: 2.55%;
  height: 2.8%;
  border-radius: 0 0 26px 26px;
  background: #000000;
  box-shadow:
    0 -1px 0 rgba(0, 0, 0, 0.96),
    0 1px 0 rgba(0, 0, 0, 0.92);
  pointer-events: none;
  z-index: 3;
}

video,
.screen-image {
  position: absolute;
  left: var(--screen-x);
  top: var(--screen-y);
  width: var(--screen-w);
  height: var(--screen-h);
  display: block;
  object-fit: var(--screen-fit);
  transform: translate(var(--video-x), var(--video-y)) scale(var(--video-scale));
  transform-origin: center;
  z-index: 1;
}

.screen-image {
  display: none;
  user-select: none;
  pointer-events: none;
}

.phone.model-iphone-air .screen::after,
body[data-device="ipad"] .screen::after,
body[data-device="mac"] .screen::after {
  display: none;
}

body[data-media="video"][data-device="iphone"] .phone.has-video .screen {
  z-index: 8;
}

body[data-media="video"][data-device="iphone"] .phone.has-video {
  --screen-mask-bleed: 0px;
  --screen-mask-bottom-bleed: 0px;
}

body[data-media="video"][data-device="iphone"] .phone.has-video .screen-gloss {
  z-index: 9;
}

body[data-media="video"][data-device="iphone"] .phone.has-video .screen::after {
  display: none;
}

.phone.model-macbook-pro .screen::after {
  display: block;
  left: 43.2%;
  top: 1.15%;
  width: 13.6%;
  height: 6.1%;
  border-radius: 0 0 8% 8% / 0 0 24% 24%;
  background: #000;
  box-shadow: none;
}

.phone.model-macbook-pro .screen,
.phone.model-macbook-pro .screen-gloss {
  mask: var(--screen-mask-image) center -2px / calc(100% + 4px) calc(100% + 4px) no-repeat;
  -webkit-mask: var(--screen-mask-image) center -2px / calc(100% + 4px) calc(100% + 4px) no-repeat;
}

body[data-media="image"] video {
  display: none;
}

body[data-media="image"] .phone.has-media .screen-image {
  display: block;
}

.annotation-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

body[data-media="image"] .annotation-layer {
  pointer-events: auto;
  cursor: default;
}

body[data-media="image"] .annotation-layer[data-tool="arrow"],
body[data-media="image"] .annotation-layer[data-tool="circle"],
body[data-media="image"] .annotation-layer[data-tool="image"],
body[data-media="image"] .annotation-layer[data-tool="mosaic"],
body[data-media="image"] .annotation-layer[data-tool="rect"],
body[data-media="image"] .annotation-layer[data-tool="text"] {
  cursor: crosshair;
}

.annotation-text-editor {
  position: absolute;
  right: clamp(58px, 7vw, 96px);
  top: 50%;
  z-index: 20;
  display: grid;
  gap: 12px;
  width: clamp(180px, 20vw, 240px);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(237, 249, 255, 0.42)),
    rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 22px 52px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  transform: translateY(-50%);
}

.annotation-text-editor[hidden] {
  display: none !important;
}

.annotation-text-field {
  display: grid;
  gap: 8px;
  color: rgba(15, 23, 42, 0.68);
  font-size: 13px;
  font-weight: 760;
}

.annotation-text-field textarea {
  width: 100%;
  min-height: 94px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 18px;
  padding: 12px;
  outline: none;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.44));
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 24px rgba(15, 23, 42, 0.06);
}

.annotation-text-field textarea:focus {
  border-color: rgba(14, 165, 233, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 3px rgba(14, 165, 233, 0.12),
    0 12px 28px rgba(15, 23, 42, 0.08);
}

.annotation-text-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.annotation-context-menu {
  position: absolute;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 6px;
  min-height: 44px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(237, 249, 255, 0.44)),
    rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 36px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(26px) saturate(1.45);
  -webkit-backdrop-filter: blur(26px) saturate(1.45);
}

.annotation-context-menu[hidden] {
  display: none !important;
}

.annotation-context-menu button {
  min-width: 54px;
  min-height: 32px;
  border: 0;
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.58));
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 8px 18px rgba(15, 23, 42, 0.08);
}

.annotation-context-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.annotation-crop-editor {
  position: absolute;
  z-index: 31;
  display: grid;
  gap: 9px;
  width: min(220px, calc(100% - 28px));
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(237, 249, 255, 0.5)),
    rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 18px 42px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(28px) saturate(1.45);
  -webkit-backdrop-filter: blur(28px) saturate(1.45);
}

.annotation-crop-editor[hidden] {
  display: none !important;
}

.annotation-crop-title {
  color: rgba(15, 23, 42, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.annotation-crop-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.annotation-item {
  position: absolute;
  pointer-events: auto;
  touch-action: none;
  cursor: move;
  user-select: none;
}

.annotation-item.is-editing {
  filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.22));
}

.annotation-item.is-selected {
  filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.18));
}

.annotation-item.is-selected::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px dashed rgba(14, 165, 233, 0.72);
  border-radius: 12px;
  pointer-events: none;
}

.annotation-rect,
.annotation-circle {
  border: 4px solid var(--annotation-color);
  background: color-mix(in srgb, var(--annotation-color) 8%, transparent);
}

.annotation-rect {
  border-radius: 4px;
}

.annotation-circle {
  border-radius: 50%;
}

.annotation-mosaic,
.annotation-mosaic-light {
  border-radius: 6px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.annotation-mosaic {
  background:
    repeating-conic-gradient(rgba(14, 23, 34, 0.72) 0 25%, rgba(226, 232, 240, 0.72) 0 50%) 0 0 / 14px 14px;
}

.annotation-mosaic-light {
  background:
    repeating-conic-gradient(rgba(255, 255, 255, 0.82) 0 25%, rgba(226, 232, 240, 0.74) 0 50%) 0 0 / 14px 14px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.24);
}

.annotation-image {
  border-radius: 6px;
}

.annotation-image-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.annotation-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  transform-origin: left top;
  pointer-events: none;
  user-select: none;
}

.annotation-image.is-cropping {
  cursor: move;
}

.annotation-image.is-cropping::before {
  inset: -8px;
  border-style: solid;
  border-color: rgba(14, 165, 233, 0.84);
  background:
    linear-gradient(rgba(14, 165, 233, 0.18), rgba(14, 165, 233, 0.18)) top / 100% 1px no-repeat,
    linear-gradient(rgba(14, 165, 233, 0.18), rgba(14, 165, 233, 0.18)) bottom / 100% 1px no-repeat,
    linear-gradient(90deg, rgba(14, 165, 233, 0.18), rgba(14, 165, 233, 0.18)) left / 1px 100% no-repeat,
    linear-gradient(90deg, rgba(14, 165, 233, 0.18), rgba(14, 165, 233, 0.18)) right / 1px 100% no-repeat;
}

.annotation-crop-handle {
  position: absolute;
  z-index: 4;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.96);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.92),
    0 8px 18px rgba(15, 23, 42, 0.24);
  pointer-events: auto;
}

.annotation-crop-handle-top,
.annotation-crop-handle-bottom {
  left: 18px;
  right: 18px;
  height: 8px;
  cursor: ns-resize;
}

.annotation-crop-handle-top {
  top: -13px;
}

.annotation-crop-handle-bottom {
  bottom: -13px;
}

.annotation-crop-handle-left,
.annotation-crop-handle-right {
  top: 18px;
  bottom: 18px;
  width: 8px;
  cursor: ew-resize;
}

.annotation-crop-handle-left {
  left: -13px;
}

.annotation-crop-handle-right {
  right: -13px;
}

.annotation-image.annotation-image-transparent {
  background:
    linear-gradient(45deg, rgba(203, 213, 225, 0.45) 25%, transparent 25% 75%, rgba(203, 213, 225, 0.45) 75%),
    linear-gradient(45deg, rgba(203, 213, 225, 0.45) 25%, transparent 25% 75%, rgba(203, 213, 225, 0.45) 75%);
  background-color: rgba(255, 255, 255, 0.56);
  background-position: 0 0, 6px 6px;
  background-size: 12px 12px;
}

.annotation-text {
  color: var(--annotation-color);
  font-weight: 800;
  font-size: clamp(18px, 5vw, 42px);
  line-height: 1.1;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.5),
    0 0 1px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  transform-origin: center;
}

.annotation-arrow {
  height: 4px;
  background: var(--annotation-color);
  border-radius: 999px;
  transform-origin: 0 50%;
}

.annotation-arrow::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 20px;
  height: 20px;
  border-top: 4px solid var(--annotation-color);
  border-right: 4px solid var(--annotation-color);
  transform: translateY(-50%) rotate(45deg);
}

.annotation-handle {
  position: absolute;
  z-index: 2;
  width: 15px;
  height: 15px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--annotation-color);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.18),
    0 4px 10px rgba(15, 23, 42, 0.24);
  pointer-events: auto;
}

.annotation-resize-handle {
  right: -8px;
  bottom: -8px;
  cursor: nwse-resize;
}

.annotation-text .annotation-resize-handle {
  right: -18px;
  bottom: -18px;
}

.annotation-handle-start {
  left: -8px;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: grab;
}

.annotation-handle-end {
  right: -8px;
  top: 50%;
  transform: translate(50%, -50%);
  cursor: grab;
}

.annotation-mobile-delete-handle {
  position: absolute;
  z-index: 12;
  display: none;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #ff2b2b;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.12),
    0 6px 14px rgba(15, 23, 42, 0.24);
  transform: translate(-50%, -50%);
  touch-action: manipulation;
  cursor: pointer;
}

.annotation-mobile-delete-handle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.empty-state {
  position: absolute;
  left: var(--screen-x);
  top: var(--screen-y);
  width: var(--screen-w);
  height: var(--screen-h);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.74);
  border: 0;
  font-size: 18px;
  font-weight: 760;
  background:
    linear-gradient(118deg, rgba(88, 106, 122, 0.34), transparent 34%),
    linear-gradient(312deg, rgba(116, 74, 126, 0.22), transparent 42%),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.045) 0 14px,
      rgba(255, 255, 255, 0.012) 14px 28px
    ),
    #050506;
  cursor: pointer;
  z-index: 6;
}

.empty-glyph {
  width: 88px;
  height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 28px;
  position: relative;
  background: rgba(255, 255, 255, 0.07);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 14px 24px rgba(0, 0, 0, 0.24);
}

.empty-glyph::before,
.empty-glyph::after {
  content: "";
  position: absolute;
  background: #c8ff5b;
}

.empty-glyph::before {
  width: 32px;
  height: 4px;
  left: 28px;
  top: 42px;
}

.empty-glyph::after {
  width: 4px;
  height: 32px;
  left: 42px;
  top: 28px;
}

.screen-gloss {
  position: absolute;
  inset: calc(-1 * var(--screen-mask-bleed));
  width: auto;
  height: auto;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.28), transparent 17% 100%),
    linear-gradient(295deg, transparent 0 76%, rgba(255, 255, 255, 0.08) 76% 100%);
  mix-blend-mode: screen;
  mask: var(--screen-mask-image) center top / 100% calc(100% + var(--screen-mask-bottom-bleed)) no-repeat;
  -webkit-mask: var(--screen-mask-image) center top / 100% calc(100% + var(--screen-mask-bottom-bleed)) no-repeat;
  z-index: 2;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.empty-state[hidden] {
  display: none !important;
}

.phone.has-video .empty-state,
.phone.has-media .empty-state {
  display: none !important;
}

.phone.polished-metal::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0.44;
  background:
    linear-gradient(90deg, transparent 0 3.8%, rgba(255, 255, 255, 0.34) 5.4%, transparent 8.4% 91.4%, rgba(255, 255, 255, 0.32) 94.2%, transparent 97.4%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 16% 92%, rgba(255, 255, 255, 0.01)),
    linear-gradient(118deg, transparent 0 40%, rgba(255, 255, 255, 0.16) 45%, transparent 52% 100%);
  mix-blend-mode: screen;
  mask: var(--frame-mask-image) center / 100% 100% no-repeat;
  -webkit-mask: var(--frame-mask-image) center / 100% 100% no-repeat;
}

.phone.polished-metal.dark-shell::after {
  opacity: 0.05;
  background:
    linear-gradient(90deg, transparent 0 4%, rgba(255, 255, 255, 0.08) 5.6%, transparent 8.4% 91.6%, rgba(255, 255, 255, 0.07) 94.4%, transparent 97%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 18% 100%);
}

.edge-blackout {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0 90.8%, rgba(0, 0, 0, 0.72) 94%, #000000 98% 100%);
  mask: var(--frame-mask-image) center / 100% 100% no-repeat;
  -webkit-mask: var(--frame-mask-image) center / 100% 100% no-repeat;
}

body[data-device="ipad"] .edge-blackout,
body[data-device="mac"] .edge-blackout {
  display: none;
}

.phone.no-glint .screen-gloss {
  display: none;
}

.timeline {
  padding: 10px 12px;
}

.annotation-tools {
  display: none;
  flex: 1;
  gap: 6px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  max-width: 700px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.annotation-colors {
  display: grid;
  grid-template-columns: repeat(8, 28px);
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.annotation-color-menu {
  position: relative;
  display: none;
  flex: 0 0 auto;
}

.annotation-tool-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  left: var(--popover-x, 50%);
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(2, minmax(98px, auto));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(242, 250, 255, 0.76));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 18px 42px rgba(15, 23, 42, 0.14);
  transform: translateX(-50%);
  backdrop-filter: blur(24px) saturate(1.42);
  -webkit-backdrop-filter: blur(24px) saturate(1.42);
}

.annotation-tool-popover[hidden] {
  display: none !important;
}

.annotation-tool-choice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 46px;
  min-width: 0;
  padding: 6px 11px 6px 7px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.annotation-tool-choice.active {
  border-color: rgba(14, 165, 233, 0.48);
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.62));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 0 0 2px rgba(14, 165, 233, 0.12);
}

.mosaic-style-icon,
.image-import-icon {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 5px 12px rgba(15, 23, 42, 0.1);
}

.mosaic-style-icon.is-dark {
  background:
    repeating-conic-gradient(rgba(15, 23, 42, 0.82) 0 25%, rgba(226, 232, 240, 0.82) 0 50%) 0 0 / 11px 11px;
}

.mosaic-style-icon.is-light {
  background:
    repeating-conic-gradient(rgba(255, 255, 255, 0.96) 0 25%, rgba(203, 213, 225, 0.8) 0 50%) 0 0 / 11px 11px;
}

.image-import-icon.is-normal {
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.74), rgba(167, 243, 208, 0.72)),
    #ffffff;
}

.image-import-icon.is-transparent {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(203, 213, 225, 0.72) 25%, transparent 25% 75%, rgba(203, 213, 225, 0.72) 75%),
    linear-gradient(45deg, rgba(203, 213, 225, 0.72) 25%, transparent 25% 75%, rgba(203, 213, 225, 0.72) 75%),
    #ffffff;
  background-position: 0 0, 7px 7px, 0 0;
  background-size: 14px 14px, 14px 14px, auto;
}

.image-import-icon.is-transparent::after {
  content: "";
  position: absolute;
  inset: 8px 7px 7px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.84), rgba(167, 243, 208, 0.82));
}

.annotation-color-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 8px 4px 15px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.62));
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 10px 22px rgba(15, 23, 42, 0.08);
}

.annotation-color-trigger[aria-expanded="true"] {
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 28px rgba(14, 165, 233, 0.13);
}

.annotation-color-preview {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: var(--annotation-color);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 4px 10px rgba(15, 23, 42, 0.14);
}

.annotation-color-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(242, 250, 255, 0.74));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 18px 42px rgba(15, 23, 42, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transform-origin: calc(100% - 36px) 100%;
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(.2, .8, .2, 1);
}

.annotation-color-menu.is-open .annotation-color-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.annotation-color-chip {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  z-index: 1;
  width: 28px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: transparent;
}

.annotation-color-chip::after {
  content: "";
  position: absolute;
  inset: 6px 3px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background: var(--annotation-swatch);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 4px 10px rgba(15, 23, 42, 0.08);
}

.annotation-color-chip.active::after {
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 0 2px rgba(37, 99, 235, 0.45),
    0 5px 12px rgba(15, 23, 42, 0.1);
}

.annotation-color {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 4px 8px 4px 13px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.38);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.annotation-color input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  min-width: 34px;
  aspect-ratio: 1;
  padding: 2px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
}

.annotation-color input::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 50%;
}

.annotation-color input::-webkit-color-swatch {
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
}

.annotation-color input::-moz-color-swatch {
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
}

body[data-media="image"] .timeline {
  justify-content: center;
}

body[data-media="image"] #playButton,
body[data-media="image"] #seekRange,
body[data-media="image"] #timeLabel {
  display: none;
}

body[data-media="image"] .annotation-tools {
  display: grid;
}

body[data-media="image"] .annotation-color-menu {
  display: inline-flex;
}

.icon-button,
.primary,
.secondary,
.chip,
.swatch {
  border: 0;
  appearance: none;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.74));
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 22px rgba(15, 23, 42, 0.08);
}

.timeline input[type="range"] {
  flex: 1;
  width: 100%;
}

input[type="range"] {
  --range-progress: 0%;
  height: 20px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  accent-color: #ffffff;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 7px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(56, 189, 248, 0.72), rgba(167, 243, 208, 0.72), rgba(240, 171, 252, 0.72)) 0 / var(--range-progress) 100% no-repeat,
    rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 1px 4px rgba(15, 23, 42, 0.08);
}

input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6.5px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 3px 8px rgba(15, 23, 42, 0.16);
  appearance: none;
  -webkit-appearance: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 6px 16px rgba(14, 165, 233, 0.2);
}

input[type="range"]::-moz-range-track {
  height: 7px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

input[type="range"]::-moz-range-progress {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.72), rgba(167, 243, 208, 0.72), rgba(240, 171, 252, 0.72));
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 3px 8px rgba(15, 23, 42, 0.16);
}

time {
  width: 112px;
  color: rgba(15, 23, 42, 0.62);
  font-size: 12px;
  text-align: right;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 30px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.3));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 24px 70px rgba(15, 23, 42, 0.12);
}

.panel-section {
  display: grid;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.panel-section:last-child {
  border-bottom: 0;
}

.panel-section h2 {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.62);
  font-weight: 700;
}

.file-drop {
  display: grid;
  gap: 8px;
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 14px 28px rgba(15, 23, 42, 0.07);
  cursor: pointer;
}

.file-drop.dragging {
  border-color: rgba(14, 165, 233, 0.48);
  background:
    linear-gradient(145deg, rgba(224, 242, 254, 0.82), rgba(240, 253, 244, 0.52));
}

.file-drop input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-title {
  font-size: 18px;
  font-weight: 750;
}

.file-name {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.device-type-toggle {
  margin-top: 12px;
}

.segmented,
.orientation-switch,
.media-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.device-type-toggle.segmented {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.orientation-switch .chip:disabled {
  cursor: default;
  opacity: 0.58;
}

.sliding-control {
  position: relative;
  isolation: isolate;
  --glider-x: 4px;
  --glider-y: 4px;
  --glider-w: 0px;
  --glider-h: 0px;
}

.sliding-control::before,
.color-grid::before {
  content: "";
  position: absolute;
  top: var(--glider-y);
  left: var(--glider-x);
  z-index: -1;
  width: var(--glider-w);
  height: var(--glider-h);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.68));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 10px 20px rgba(15, 23, 42, 0.08);
  transition:
    left 260ms cubic-bezier(.2, .8, .2, 1),
    top 260ms cubic-bezier(.2, .8, .2, 1),
    width 260ms cubic-bezier(.2, .8, .2, 1),
    height 260ms cubic-bezier(.2, .8, .2, 1);
}

.actions.sliding-control {
  display: grid;
  gap: 10px;
}

.actions.sliding-control::before {
  z-index: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.28));
}

.chip {
  position: relative;
  z-index: 1;
  min-height: 36px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.chip.active {
  color: var(--ink);
}

.actions .primary,
.actions .secondary {
  position: relative;
  z-index: 1;
}

.slider-row,
.select-row,
.color-row,
.toggle-row {
  display: grid;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 13px;
}

.select-row {
  grid-template-columns: 44px minmax(0, 1fr);
}

.color-row {
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
}

.select-row select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 16px;
  padding: 0 34px 0 12px;
  color: var(--ink);
  background:
    linear-gradient(45deg, transparent 50%, #0f172a 50%) calc(100% - 18px) 16px / 6px 6px no-repeat,
    linear-gradient(135deg, #0f172a 50%, transparent 50%) calc(100% - 13px) 16px / 6px 6px no-repeat,
    var(--panel-2);
  appearance: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.slider-row {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}

.slider-row input {
  min-width: 0;
}

output {
  color: var(--muted);
  text-align: right;
  font-size: 12px;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  position: relative;
  isolation: isolate;
  --glider-x: 0px;
  --glider-y: 0px;
  --glider-w: 0px;
  --glider-h: 0px;
}

.color-grid::before {
  z-index: -1;
}

.color-button {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 14px;
  padding: 0 10px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition:
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.color-button span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.color-button.active {
  border-color: rgba(14, 165, 233, 0.54);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.4);
}

.color-dot {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(21, 21, 21, 0.16);
  border-radius: 50%;
  background: var(--swatch);
}

.toggle-row {
  grid-template-columns: 1fr auto;
}

.toggle-row input {
  width: 42px;
  height: 24px;
  accent-color: var(--ink);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  position: relative;
  --glider-x: 0px;
  --glider-y: 0px;
  --glider-w: 0px;
  --glider-h: 0px;
  isolation: isolate;
}

.swatches::before {
  content: "";
  position: absolute;
  top: calc(var(--glider-y) - 4px);
  left: calc(var(--glider-x) - 4px);
  z-index: -1;
  width: calc(var(--glider-w) + 8px);
  height: calc(var(--glider-h) + 8px);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.22));
  opacity: 1;
  transform: scale(1);
  transition:
    left 240ms cubic-bezier(.2, .8, .2, 1),
    top 240ms cubic-bezier(.2, .8, .2, 1),
    width 240ms cubic-bezier(.2, .8, .2, 1),
    height 240ms cubic-bezier(.2, .8, .2, 1),
    opacity 160ms ease,
    transform 180ms ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 26px rgba(15, 23, 42, 0.1);
}

.swatches.is-hovering::before,
.swatches:focus-within::before {
  opacity: 1;
  transform: scale(1);
}

.swatch {
  position: relative;
  z-index: 1;
  height: 44px;
  border-radius: 15px;
  outline: 1px solid rgba(255, 255, 255, 0.62);
  outline-offset: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 20px rgba(15, 23, 42, 0.07);
}

.swatch.active {
  outline: 3px solid rgba(37, 99, 235, 0.72);
  outline-offset: 2px;
}

.swatch[data-bg="white"] {
  background: #ffffff;
}

.swatch[data-bg="soft-blue"] {
  background: #eef8ff;
}

.swatch[data-bg="mist-gray"] {
  background: #f5f7fb;
}

.swatch[data-bg="warm-white"] {
  background: #fff8f0;
}

.swatch[data-bg="mint"] {
  background: #effdf5;
}

.swatch[data-bg="blush"] {
  background: #fff1f5;
}

.swatch[data-bg="lavender"] {
  background: #f5f3ff;
}

.swatch[data-bg="porcelain"] {
  background: #f8fbff;
}

.swatch[data-bg="gradient-sky"] {
  background: linear-gradient(145deg, #ffffff, #e9f7ff 48%, #f5f0ff);
}

.swatch[data-bg="gradient-peach"] {
  background: linear-gradient(145deg, #ffffff, #fff2e5 50%, #f6efff);
}

.swatch[data-bg="gradient-mint"] {
  background: linear-gradient(145deg, #ffffff, #ecfff7 48%, #eff6ff);
}

.swatch[data-bg="gradient-lilac"] {
  background: linear-gradient(145deg, #ffffff, #f4f1ff 48%, #eaf8ff);
}

.custom-bg-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.custom-bg-row input {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 14px;
  padding: 4px;
  background: var(--panel-2);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.custom-bg-upload {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  position: relative;
  overflow: hidden;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 16px;
  padding: 10px 12px;
  background: var(--panel-2);
  font-size: 13px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 10px 22px rgba(15, 23, 42, 0.06);
}

.custom-bg-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.custom-bg-upload small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.save-location {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.secondary.compact {
  min-height: 36px;
  font-size: 13px;
}

.actions {
  padding-top: 6px;
}

.primary,
.secondary {
  min-height: 46px;
  border-radius: 16px;
  font-weight: 750;
}

.primary {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.7));
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 18px 34px rgba(15, 23, 42, 0.08);
}

.primary:disabled,
.secondary:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.secondary {
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: var(--panel-2);
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 10px 24px rgba(15, 23, 42, 0.06);
}

.meter {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.1);
}

.meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #a7f3d0, #f0abfc);
  transition: width 140ms ease;
}

body.bg-studio,
body[data-bg="studio"] {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0 28%, rgba(226, 232, 240, 0.86) 28% 56%, rgba(199, 210, 254, 0.38) 56% 100%),
    conic-gradient(from 200deg at 54% 44%, rgba(125, 211, 252, 0.18), rgba(148, 163, 184, 0.22), rgba(240, 171, 252, 0.12), rgba(255, 255, 255, 0.28)),
    #eef4fb;
}

body.bg-white,
body.bg-custom,
body.bg-gradient-sky,
body.bg-gradient-peach,
body.bg-gradient-mint,
body.bg-gradient-lilac,
body[data-bg="white"],
body[data-bg="custom"],
body[data-bg="gradient-sky"],
body[data-bg="gradient-peach"],
body[data-bg="gradient-mint"],
body[data-bg="gradient-lilac"] {
  background:
    var(--custom-bg-image, none) center / cover no-repeat,
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(235, 248, 255, 0.76)),
    var(--custom-bg-color, #ffffff);
}

body.bg-gradient-sky,
body[data-bg="gradient-sky"] {
  background: linear-gradient(145deg, #ffffff 0%, #e9f7ff 42%, #f5f0ff 100%);
}

body.bg-gradient-peach,
body[data-bg="gradient-peach"] {
  background: linear-gradient(145deg, #ffffff 0%, #fff2e5 45%, #f6efff 100%);
}

body.bg-gradient-mint,
body[data-bg="gradient-mint"] {
  background: linear-gradient(145deg, #ffffff 0%, #ecfff7 46%, #eff6ff 100%);
}

body.bg-gradient-lilac,
body[data-bg="gradient-lilac"] {
  background: linear-gradient(145deg, #ffffff 0%, #f4f1ff 42%, #eaf8ff 100%);
}

body.bg-edge,
body[data-bg="edge"] {
  background:
    linear-gradient(145deg, rgba(9, 11, 20, 0.96), rgba(15, 23, 42, 0.92)),
    conic-gradient(from 210deg at 53% 45%, rgba(56, 189, 248, 0.32), rgba(240, 171, 252, 0.18), rgba(167, 243, 208, 0.16), rgba(15, 23, 42, 0.3));
}

body.bg-paper,
body[data-bg="paper"] {
  background:
    linear-gradient(145deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.88)),
    conic-gradient(from 230deg at 50% 44%, rgba(56, 189, 248, 0.14), rgba(251, 146, 60, 0.16), rgba(167, 243, 208, 0.16), rgba(255, 255, 255, 0.34));
}

body.bg-carbon,
body[data-bg="carbon"] {
  background:
    linear-gradient(145deg, rgba(5, 8, 16, 0.98), rgba(17, 24, 39, 0.96)),
    linear-gradient(45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.045) 50% 75%, transparent 75%);
  background-size: auto, 28px 28px;
}

body.bg-white .stage,
body.bg-custom .stage,
body[data-bg="white"] .stage,
body[data-bg="custom"] .stage {
  background:
    var(--custom-bg-image, none) center / cover no-repeat,
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(235, 248, 255, 0.62)),
    var(--custom-bg-color, #ffffff);
  color: #151515;
}

body.bg-custom .app-shell,
body[data-bg="custom"] .app-shell {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.3), rgba(235, 248, 255, 0.18)),
    var(--custom-bg-image, none) center / cover no-repeat,
    var(--custom-bg-color, #ffffff);
}

body.bg-custom .controls,
body[data-bg="custom"] .controls {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.34)),
    var(--custom-bg-image, none) center / cover no-repeat,
    var(--custom-bg-color, #ffffff);
}

body.bg-edge .stage,
body[data-bg="edge"] .stage {
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.9)),
    conic-gradient(from 220deg at 58% 45%, rgba(56, 189, 248, 0.24), rgba(240, 171, 252, 0.16), rgba(167, 243, 208, 0.14), rgba(15, 23, 42, 0.26));
  background-size: auto;
  color: #fbfaf5;
}

body.bg-studio .stage,
body[data-bg="studio"] .stage {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(226, 232, 240, 0.72)),
    linear-gradient(116deg, transparent 0 17%, rgba(255, 255, 255, 0.62) 17% 31%, transparent 31% 100%),
    linear-gradient(294deg, transparent 0 28%, rgba(148, 163, 184, 0.2) 28% 42%, transparent 42% 100%);
  background-size: auto;
  color: #151515;
}

body.bg-paper .stage,
body[data-bg="paper"] .stage {
  background:
    linear-gradient(145deg, rgba(255, 251, 235, 0.94), rgba(255, 247, 237, 0.76)),
    linear-gradient(118deg, transparent 0 16%, rgba(125, 211, 252, 0.16) 16% 30%, transparent 30% 100%),
    linear-gradient(300deg, transparent 0 24%, rgba(251, 146, 60, 0.14) 24% 40%, transparent 40% 100%);
  background-size: auto;
  color: #151515;
}

body.bg-carbon .stage,
body[data-bg="carbon"] .stage {
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.84), rgba(2, 6, 23, 0.94)),
    linear-gradient(45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.045) 50% 75%, transparent 75%);
  background-size: auto, 28px 28px;
  color: #fbfaf5;
}

body.bg-white .stage,
body[data-bg="white"] .stage {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(235, 248, 255, 0.68)),
    #ffffff;
}

body.bg-custom .stage,
body[data-bg="custom"] .stage {
  background:
    var(--custom-bg-image, none) center / cover no-repeat,
    var(--custom-bg-color, #ffffff);
}

body.bg-white .preview-wrap::before,
body.bg-white .preview-wrap::after,
body.bg-white .backplate,
body.bg-custom .preview-wrap::before,
body.bg-custom .preview-wrap::after,
body.bg-custom .backplate {
  display: none;
}

body.bg-studio .brand p,
body.bg-paper .brand p,
body.bg-white .brand p,
body.bg-custom .brand p,
body.bg-studio time,
body.bg-paper time,
body.bg-white time,
body.bg-custom time,
body.bg-studio .status,
body.bg-paper .status,
body.bg-white .status,
body.bg-custom .status {
  color: rgba(21, 21, 21, 0.64);
}

body.bg-edge time,
body.bg-carbon time,
body.bg-edge .status,
body.bg-carbon .status {
  color: rgba(255, 255, 255, 0.74);
}

body.bg-edge .timeline,
body.bg-carbon .timeline {
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
}

body.bg-studio .status,
body.bg-paper .status,
body.bg-white .status,
body.bg-custom .status {
  border-color: rgba(21, 21, 21, 0.12);
  background: rgba(21, 21, 21, 0.04);
}

.stage[data-bg="white"] {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 255, 0.72)),
    #ffffff !important;
  color: #151515 !important;
}

.stage[data-bg="edge"] {
  background: url("./assets/scene-edge.svg") center / cover no-repeat !important;
  color: #151515 !important;
}

.stage[data-bg="studio"] {
  background: url("./assets/scene-studio.svg") center / cover no-repeat !important;
  color: #151515 !important;
}

.stage[data-bg="paper"] {
  background: url("./assets/scene-paper.svg") center / cover no-repeat !important;
  color: #151515 !important;
}

.stage[data-bg="carbon"] {
  background: url("./assets/scene-carbon.svg") center / cover no-repeat !important;
  color: #fbfaf5 !important;
}

.stage[data-bg="custom"] {
  background:
    var(--custom-bg-image, none) center / cover no-repeat,
    var(--custom-bg-color, #ffffff) !important;
  color: #151515 !important;
}

.stage[data-bg="white"] .preview-wrap::before,
.stage[data-bg="white"] .preview-wrap::after,
.stage[data-bg="white"] .backplate,
.stage[data-bg="custom"] .preview-wrap::before,
.stage[data-bg="custom"] .preview-wrap::after,
.stage[data-bg="custom"] .backplate {
  display: none;
}

.stage[data-bg="white"] {
  background: #ffffff !important;
  color: #151515 !important;
}

.stage[data-bg="soft-blue"] {
  background: #eef8ff !important;
  color: #151515 !important;
}

.stage[data-bg="mist-gray"] {
  background: #f5f7fb !important;
  color: #151515 !important;
}

.stage[data-bg="warm-white"] {
  background: #fff8f0 !important;
  color: #151515 !important;
}

.stage[data-bg="mint"] {
  background: #effdf5 !important;
  color: #151515 !important;
}

.stage[data-bg="blush"] {
  background: #fff1f5 !important;
  color: #151515 !important;
}

.stage[data-bg="lavender"] {
  background: #f5f3ff !important;
  color: #151515 !important;
}

.stage[data-bg="porcelain"] {
  background: #f8fbff !important;
  color: #151515 !important;
}

.stage[data-bg="gradient-sky"] {
  background: linear-gradient(145deg, #ffffff 0%, #e9f7ff 42%, #f5f0ff 100%) !important;
  color: #151515 !important;
}

.stage[data-bg="gradient-peach"] {
  background: linear-gradient(145deg, #ffffff 0%, #fff2e5 45%, #f6efff 100%) !important;
  color: #151515 !important;
}

.stage[data-bg="gradient-mint"] {
  background: linear-gradient(145deg, #ffffff 0%, #ecfff7 46%, #eff6ff 100%) !important;
  color: #151515 !important;
}

.stage[data-bg="gradient-lilac"] {
  background: linear-gradient(145deg, #ffffff 0%, #f4f1ff 42%, #eaf8ff 100%) !important;
  color: #151515 !important;
}

.stage[data-bg="custom"] {
  background:
    var(--custom-bg-image, none) center / cover no-repeat,
    var(--custom-bg-color, #ffffff) !important;
  color: #151515 !important;
}

.stage[data-bg] .preview-wrap::before,
.stage[data-bg] .preview-wrap::after,
.stage[data-bg] .backplate {
  display: none;
}

body[data-bg] {
  background: var(--scene-page-bg) !important;
}

body[data-bg] .app-shell {
  background: var(--scene-page-bg) !important;
}

body[data-bg] .stage {
  background: var(--scene-stage-bg) !important;
  color: var(--scene-text) !important;
}

body[data-bg] .controls {
  background: var(--scene-controls-bg) !important;
}

@media (max-width: 940px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    gap: 14px;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 14px;
  }

  .stage {
    grid-template-rows: auto minmax(420px, 62vh) auto;
    min-height: 620px;
    padding: 18px;
    border-radius: 26px;
  }

  .preview-wrap {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    column-gap: 10px;
  }

  .controls {
    border-radius: 26px;
  }

  .phone {
    height: min(540px, calc(86% - 20px), 120vw);
  }

  body[data-device="mac"] .phone {
    --device-width: clamp(360px, 68vw, 720px);
    height: min(calc(var(--device-width) * var(--frame-height-factor)), calc(86% - 20px), 44vw);
  }

  .phone[data-orientation="landscape"] {
    height: min(540px, calc(82% - 16px), 108vw);
  }

  .preview-wrap::before {
    width: 92vw;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
    padding: 0;
  }

  .status {
    display: none;
  }

  .video-shell-home-logo {
    min-width: min(50vw, 172px);
    min-height: 38px;
    padding-inline: 12px;
    border-radius: 14px;
  }

  .video-shell-home-logo__text {
    font-size: clamp(15px, 5vw, 20px);
  }

  .preview-wrap {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    column-gap: 8px;
  }

  .preview-wrap > .preview-switch {
    width: 48px;
    border-radius: 18px;
  }

  .preview-wrap > .preview-switch .chip {
    min-height: 44px;
    padding: 0 6px;
    border-radius: 14px;
    font-size: 12px;
  }

  .stage {
    min-height: 560px;
    padding: 16px;
    border-radius: 24px;
  }

  .phone {
    height: min(480px, calc(86% - 20px), 138vw);
  }

  body[data-device="mac"] .phone {
    --device-width: min(calc(100vw - 88px), 360px);
    grid-column: 1 / -1;
    justify-self: center;
    width: min(calc(100vw - 88px), 360px);
    max-width: calc(100vw - 88px);
    height: auto;
    max-height: calc(86% - 20px);
  }

  .phone[data-orientation="landscape"] {
    height: min(480px, calc(82% - 16px), 122vw);
  }

  .timeline {
    gap: 10px;
  }

  body[data-media="image"] .annotation-mobile-delete-handle {
    display: grid;
  }

  time {
    width: 92px;
  }

  .controls {
    padding: 18px;
    border-radius: 24px;
  }

  .slider-row {
    grid-template-columns: 42px minmax(0, 1fr) 38px;
  }
}

@media (min-width: 941px) and (max-height: 860px) {
  .app-shell {
    padding: 12px;
    gap: 12px;
  }

  .stage {
    padding: 16px;
    border-radius: 24px;
  }

  .timeline {
    padding: 8px 10px;
    border-radius: 20px;
  }

  .video-shell-home-logo {
    min-width: 166px;
    min-height: 38px;
  }

  .video-shell-home-logo__text {
    font-size: 20px;
  }

  .phone {
    height: min(calc(var(--device-width) * 1.92), calc(84% - 18px), 64vw);
  }

  body[data-device="mac"] .phone {
    height: min(calc(var(--device-width) * var(--frame-height-factor)), calc(82% - 18px), 52vw);
  }

  .phone[data-orientation="landscape"] {
    height: min(calc(var(--device-width) * 1.92), calc(82% - 16px), 56vw);
  }
}

body[data-media] .screen {
  background: #ffffff;
}

body[data-media="video"] .phone.has-video .screen {
  background: #050506;
}

body[data-media] .empty-state {
  display: grid !important;
  color: rgba(15, 23, 42, 0.58);
  background: transparent;
}

body[data-media] .empty-glyph {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 12px 28px rgba(15, 23, 42, 0.08);
}

body[data-media] .empty-glyph::before,
body[data-media] .empty-glyph::after {
  background: #a3e635;
}

body[data-device="mac"][data-media] .empty-state {
  color: rgba(15, 23, 42, 0.72);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
}

body[data-device="mac"][data-media] .empty-glyph {
  border-color: rgba(15, 23, 42, 0.16);
  background:
    linear-gradient(#84cc16, #84cc16) center / 32px 4px no-repeat,
    linear-gradient(#84cc16, #84cc16) center / 4px 32px no-repeat,
    rgba(255, 255, 255, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 16px 30px rgba(15, 23, 42, 0.12);
}

body[data-device="mac"][data-media] .empty-glyph::before,
body[data-device="mac"][data-media] .empty-glyph::after {
  display: none;
}

body[data-media] .phone.model-imac .empty-state {
  gap: 10px;
  font-size: 16px;
}

body[data-media] .phone.model-imac .empty-glyph {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  background:
    linear-gradient(#84cc16, #84cc16) center / 30px 4px no-repeat,
    linear-gradient(#84cc16, #84cc16) center / 4px 30px no-repeat,
    rgba(255, 255, 255, 0.68);
}

body[data-media] .screen-gloss {
  display: none;
}

body[data-media] .screen::before,
body[data-media] .screen::after,
body[data-media] .edge-blackout {
  display: none;
}

body[data-device="iphone"] .phone:not(.model-iphone-air) .edge-blackout {
  display: block;
  z-index: 2;
  background: url("./assets/iphone-frame-black-backing.png") center / 100% 100% no-repeat;
  mask: none;
  -webkit-mask: none;
}

body[data-media="video"][data-device="iphone"] .phone.has-video:not(.model-iphone-air) .edge-blackout {
  z-index: 7;
  background-image: url("./assets/iphone-video-black-support.png");
}

body[data-media] .phone::before {
  content: none;
}

body[data-media] .phone.has-video .empty-state,
body[data-media] .phone.has-media .empty-state {
  display: none !important;
}

.topbar {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
