@font-face {
  font-family: "Chanel Couture";
  src: url("./asset/font/abchanelcouturereg.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Chanel Couture";
  src: url("./asset/font/abchanelcouturesmbd.ttf") format("truetype");
  font-weight: 600;
}

:root {
  --background: #fafafa;
  --surface: #ffffff;
  --surface-soft: #f1f1f0;
  --text: #0c0c0e;
  --muted: #626266;
  --border: #dededb;
  --line: rgba(12, 12, 14, 0.72);
  --radius: 11px;
  --max: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background: var(--background);
  font-family: "Chanel Couture", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

button,
a {
  font: inherit;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  min-height: 100vh;
  overflow: hidden;
  background: var(--background);
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(18px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(250, 250, 250, 0.92), rgba(250, 250, 250, 0));
}

.brand,
.nav-links a {
  text-decoration: none;
}

.brand {
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links a {
  transition: color 160ms ease;
}

.nav-links a:hover {
  color: var(--text);
}

.bag-screen {
  position: relative;
  min-height: 100svh;
  width: 100%;
  margin: 0 auto;
  padding: 88px clamp(18px, 4vw, 56px) 24px;
  display: grid;
  grid-template-columns: minmax(340px, 0.44fr) minmax(720px, 1fr);
  align-items: center;
  gap: clamp(12px, 2vw, 40px);
}

.hero-copy {
  position: relative;
  z-index: 5;
  max-width: 470px;
}

.kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}

#hero-kicker {
  white-space: nowrap;
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
  line-height: 1.04;
}

h1 {
  font-size: 48px;
}

#page-title {
  max-width: 440px;
}

h2 {
  font-size: 52px;
}

.hero-copy p:last-child,
.detail-lede,
.detail-body p {
  color: var(--muted);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.bag-stage {
  position: relative;
  width: min(64vw, 92svh, 1040px);
  aspect-ratio: 1;
  justify-self: end;
  border: 0;
  border-radius: 0;
  background: var(--background);
  box-shadow: none;
}

.bag-image {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.bag-prop {
  position: absolute;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
  user-select: none;
  cursor: pointer;
  transform: translate(-50%, -50%) scale(var(--scene-scale, 1)) rotate(var(--scene-rotation, 0deg));
  transform-origin: center center;
  transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
}

.bag-prop img {
  width: 100%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.bag-prop-cv {
  z-index: 0;
  width: 24%;
  border-radius: 10px;
  filter:
    saturate(0.96)
    drop-shadow(0 18px 18px rgba(18, 18, 18, 0.12));
}

.bag-prop-plastic {
  z-index: 1;
  width: 12%;
  border-radius: 18px;
  filter:
    saturate(0.98)
    contrast(1.03)
    drop-shadow(0 18px 20px rgba(18, 18, 18, 0.18));
}

.bag-prop::after {
  content: "";
  position: absolute;
  inset: -1.5%;
  border: 1.5px solid transparent;
  border-radius: inherit;
  box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, box-shadow 180ms ease;
}

.bag-prop:hover,
.bag-prop:focus-visible {
  z-index: 7;
  transform: translate(-50%, -50%) scale(calc(var(--scene-scale, 1) * 1.06)) rotate(var(--scene-rotation, 0deg));
}

.bag-prop:hover::after,
.bag-prop:focus-visible::after {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.82),
    0 0 14px rgba(255, 255, 255, 0.84),
    0 0 26px rgba(255, 255, 255, 0.46);
}

.bag-prop:focus-visible {
  outline: 0;
}

.bag-overlay {
  position: absolute;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, filter 220ms ease, transform 220ms ease;
  transform-origin: center center;
}

.bag-overlay img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bag-stage:has(.object-phone:hover) .overlay-phone,
.bag-stage:has(.object-phone:focus-visible) .overlay-phone,
.bag-stage:has(.object-passport:hover) .overlay-passport,
.bag-stage:has(.object-passport:focus-visible) .overlay-passport,
.bag-stage:has(.object-calculator:hover) .overlay-calculator,
.bag-stage:has(.object-calculator:focus-visible) .overlay-calculator,
.bag-stage:has(.object-brume:hover) .overlay-brume,
.bag-stage:has(.object-brume:focus-visible) .overlay-brume,
.bag-stage:has(.object-camera:hover) .overlay-camera,
.bag-stage:has(.object-camera:focus-visible) .overlay-camera {
  opacity: 1;
  filter:
    drop-shadow(0 0 1px #fff)
    drop-shadow(0 0 4px #fff)
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.86));
}

.bag-object {
  position: absolute;
  z-index: 4;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bag-object:hover,
.bag-object:focus-visible {
  z-index: 6;
}

.bag-object span {
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: max-content;
  max-width: 190px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #ffffff;
  background: rgba(12, 12, 14, 0.9);
  font-size: 12px;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.bag-object:hover span,
.bag-object:focus-visible span {
  opacity: 1;
  transform: translate(-50%, -8px);
}

.bag-object:focus-visible {
  outline: 0;
}

.object-phone {
  left: 27.7%;
  top: 20.3%;
  width: 22.5%;
  height: 33%;
}

.object-passport {
  left: 46.8%;
  top: 21.1%;
  width: 30%;
  height: 34%;
}

.object-calculator {
  left: 48.8%;
  top: 43.4%;
  width: 24%;
  height: 28%;
}

.object-brume {
  left: 37.1%;
  top: 56.9%;
  width: 27.5%;
  height: 27.5%;
}

.object-camera {
  left: 31.4%;
  top: 56.2%;
  width: 17.8%;
  height: 23.8%;
  border-radius: 16px;
}

.object-camera::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 18px;
  transition: border-color 160ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.object-camera:hover::before,
.object-camera:focus-visible::before {
  border-color: #fff;
  box-shadow: 0 0 0 1px #fff, 0 0 18px rgba(255, 255, 255, 0.9);
  transform: scale(1.02);
}

.detail-screen {
  position: fixed;
  z-index: 40;
  inset: 0;
  min-height: 100svh;
  padding: clamp(16px, 3vw, 42px);
  background: rgba(250, 250, 250, 0.97);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 240ms ease, transform 240ms ease, visibility 240ms ease;
}

.detail-screen.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1fr);
  gap: clamp(18px, 3vw, 42px);
  width: min(var(--max), 100%);
  height: calc(100svh - clamp(32px, 6vw, 84px));
  margin: 0 auto;
}

.detail-media,
.detail-content {
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.detail-media {
  position: relative;
  overflow: hidden;
}

.detail-media-track {
  display: flex;
  width: 200%;
  height: 100%;
  transform: translateX(0);
  transition: transform 460ms cubic-bezier(0.22, 1, 0.36, 1);
}

.detail-media.is-files-view .detail-media-track {
  transform: translateX(-50%);
}

.detail-media-pane {
  position: relative;
  display: grid;
  place-items: center;
  width: 50%;
  min-width: 50%;
  height: 100%;
  overflow: hidden;
}

.detail-media img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
  transition: opacity 320ms ease, transform 320ms ease, filter 320ms ease;
}

.passport-book {
  position: relative;
  display: none;
  width: min(calc(var(--passport-book-width, 96) * 1%), 900px);
  aspect-ratio: 1.42 / 1;
  perspective: calc(var(--passport-perspective, 1600) * 1px);
  cursor: grab;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.detail-media[data-panel="passport"] #detail-image {
  display: none;
}

.detail-media[data-panel="passport"] .passport-book {
  display: block;
}

.detail-media[data-panel="brume"] #detail-image {
  cursor: pointer;
}

.moodboard-reveal {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  display: inline-block;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: opacity 220ms ease;
  animation: none;
}

.moodboard-reveal::after {
  content: none;
}

.detail-media[data-panel="brume"] .moodboard-reveal {
  opacity: 0.76;
  pointer-events: auto;
}

.detail-media[data-panel="brume"] .moodboard-reveal:hover {
  opacity: 1;
}

.detail-media.is-moodboard-view .moodboard-reveal {
  opacity: 0;
  pointer-events: none;
  animation: none;
}

.detail-media.is-revealing .moodboard-reveal {
  opacity: 0;
  pointer-events: none;
  animation: none;
}

.detail-media.is-moodboard-view #detail-image,
.detail-media.is-moodboard-view .passport-book {
  opacity: 0;
  transform: scale(0.985);
  filter: blur(8px);
  pointer-events: none;
}

.detail-media.is-revealing #detail-image,
.detail-media.is-revealing .passport-book {
  opacity: 0;
  transform: scale(0.985);
  filter: blur(8px);
  pointer-events: none;
}

.moodboard-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: block;
  padding: 14px 18px 40px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.985);
  transition: opacity 320ms ease, transform 320ms ease;
  background: var(--background);
}

.detail-media.is-moodboard-view .moodboard-overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.detail-media.is-moodboard-view {
  border-color: transparent;
  background: transparent;
}

.moodboard-toolbar {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 30;
}

.moodboard-reset {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(12, 12, 14, 0.14);
  border-radius: 999px;
  color: rgba(12, 12, 14, 0.82);
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 8px 18px rgba(24, 24, 24, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.moodboard-reset:hover {
  transform: rotate(-18deg) scale(1.05);
  box-shadow:
    0 12px 24px rgba(24, 24, 24, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.moodboard-board {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.moodboard-board::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 255, 255, 0.8), transparent 24%),
    radial-gradient(circle at 82% 34%, rgba(228, 228, 224, 0.18), transparent 30%);
  pointer-events: none;
}

.moodboard-board::after {
  content: none;
}

.moodboard-track {
  position: relative;
  display: flex;
  width: calc(var(--moodboard-page-count, 1) * 100%);
  height: 100%;
  will-change: transform;
  transition: transform 780ms cubic-bezier(0.22, 1, 0.36, 1);
}

.moodboard-page {
  position: relative;
  flex: 0 0 calc(100% / var(--moodboard-page-count, 1));
  width: calc(100% / var(--moodboard-page-count, 1));
  height: 100%;
  opacity: 0.96;
  transform: scale(0.995);
  transition: opacity 520ms ease, transform 780ms cubic-bezier(0.22, 1, 0.36, 1);
}

.moodboard-page.is-active {
  opacity: 1;
  transform: scale(1);
}

.moodcard {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 1px;
  background: transparent;
  box-shadow: none;
  transform-origin: center center;
  transform: rotate(var(--mood-rotate, 0deg)) scale(var(--mood-scale, 1));
  transition:
    left 220ms ease,
    top 220ms ease,
    width 220ms ease,
    height 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease,
    opacity 220ms ease;
  user-select: none;
  touch-action: none;
  cursor: grab;
}

.moodcard::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  z-index: 4;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 45%),
    linear-gradient(135deg, #d8d8d5, #8d8d88);
  box-shadow:
    0 1px 1px rgba(255, 255, 255, 0.9) inset,
    0 4px 8px rgba(12, 12, 14, 0.24);
  transform: translateX(-50%);
}

.moodcard::after {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: -10px;
  z-index: -1;
  height: 24px;
  border-radius: inherit;
  background: rgba(15, 14, 12, 0.16);
  filter: blur(12px);
  pointer-events: none;
}

.moodcard:hover {
  z-index: 9;
}

.moodcard.is-dragging,
.moodcard.is-resizing {
  transition: none;
  z-index: 15;
  cursor: grabbing;
}

.moodcard.is-text {
  gap: 10px;
  padding: 16px 16px 20px;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 250, 248, 0.97)),
    #fff;
  box-shadow:
    0 20px 30px rgba(30, 28, 24, 0.14),
    0 5px 9px rgba(30, 28, 24, 0.08);
  overflow: hidden;
}

.moodcard.is-text .moodcard-title {
  flex: 0 0 auto;
  overflow-wrap: anywhere;
}

.moodcard.is-text .moodcard-body {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
}

.moodcard.is-text.is-expanded {
  z-index: 16;
  transform: rotate(var(--mood-rotate, 0deg)) scale(calc(var(--mood-scale, 1) * 1.18));
  overflow: auto;
}

.moodcard.is-text.is-expanded .moodcard-body {
  -webkit-line-clamp: unset;
  display: block;
}

.moodcard.is-media {
  overflow: visible;
}

.moodcard.is-media img,
.moodcard.is-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  background: transparent;
  box-shadow:
    0 20px 30px rgba(30, 28, 24, 0.16),
    0 5px 9px rgba(30, 28, 24, 0.08);
  filter: saturate(0.98) contrast(0.99);
}

.moodcard-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(11px, 1.05vw, 15px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.moodcard-body {
  color: rgba(12, 12, 14, 0.76);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(10px, 0.9vw, 12px);
  line-height: 1.42;
  white-space: pre-line;
}

.moodcard-resize {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px 0 0 0;
  background: transparent;
  appearance: none;
  cursor: nwse-resize;
}

.moodcard:hover .moodcard-resize {
  background: transparent;
}

.moodcard-video {
  background: #0d0d0f;
}

.moodcard.is-video.is-selected {
  outline: 2px solid rgba(12, 12, 14, 0.5);
  outline-offset: 5px;
}

.moodcard-sound {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 6;
  display: none;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 999px;
  color: #fff;
  background: rgba(12, 12, 14, 0.58);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.moodcard.is-video.is-selected .moodcard-sound,
.moodcard.is-video:hover .moodcard-sound {
  display: inline-flex;
}

.moodboard-pages {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 32;
  display: inline-flex;
  gap: 8px;
  transform: translateX(-50%);
}

.moodboard-page-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(12, 12, 14, 0.12);
  border-radius: 999px;
  color: rgba(12, 12, 14, 0.62);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(20, 20, 20, 0.08);
  cursor: pointer;
  font-size: 11px;
}

.moodboard-page-dot.is-active {
  color: #fff;
  background: rgba(12, 12, 14, 0.86);
}

@keyframes moodboardPromptFloat {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-4px);
  }
}

.passport-book:active {
  cursor: grabbing;
}

.passport-spread,
.passport-cover {
  position: absolute;
}

.passport-spread {
  z-index: 1;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transform: translate(calc(var(--passport-book-pre-x, 0) * 1px), calc(var(--passport-book-pre-y, 0) * 1px)) scale(var(--passport-book-pre-zoom, 1));
  transform-origin: center center;
  transition:
    opacity calc(var(--passport-spread-fade-duration, 240) * 1ms) ease,
    transform calc(var(--passport-spread-zoom-duration, 520) * 1ms) cubic-bezier(
      var(--passport-spread-ease-x1, 0.22),
      var(--passport-spread-ease-y1, 1),
      var(--passport-spread-ease-x2, 0.36),
      var(--passport-spread-ease-y2, 1)
    );
}

.passport-book.is-open .passport-spread {
  z-index: 3;
  opacity: 1;
  transform: translate(calc(var(--passport-book-pre-x, 0) * 1px), calc(var(--passport-book-pre-y, 0) * 1px)) scale(var(--passport-book-pre-zoom, 1));
}

.passport-book.is-open.is-settled .passport-spread {
  z-index: 3;
  transform: translate(calc(var(--passport-book-pre-x, 0) * 1px), calc(var(--passport-book-pre-y, 0) * 1px)) scale(var(--passport-book-settled-zoom, 1.14));
}

.passport-spread-bg,
.detail-media .passport-spread-bg {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.passport-cover {
  z-index: 2;
  top: 0;
  left: calc(var(--passport-cover-closed-left, 25) * 1%);
  width: calc(var(--passport-cover-width, 50) * 1%);
  height: 100%;
  display: grid;
  place-items: center;
  background: transparent;
  transform: rotateY(0deg);
  transform-origin: calc(var(--passport-cover-axis-x, 0) * 1%) center;
  transform-style: preserve-3d;
  transition:
    left calc(var(--passport-cover-duration, 860) * 1ms) cubic-bezier(
      var(--passport-cover-ease-x1, 0.22),
      var(--passport-cover-ease-y1, 1),
      var(--passport-cover-ease-x2, 0.36),
      var(--passport-cover-ease-y2, 1)
    ),
    transform calc(var(--passport-cover-duration, 860) * 1ms) cubic-bezier(
      var(--passport-cover-ease-x1, 0.22),
      var(--passport-cover-ease-y1, 1),
      var(--passport-cover-ease-x2, 0.36),
      var(--passport-cover-ease-y2, 1)
    ),
    filter calc(var(--passport-cover-duration, 860) * 1ms) ease;
  will-change: left, transform;
}

.passport-cover img {
  width: calc(var(--passport-cover-image-scale, 142) * 1%);
  max-width: 350px;
  max-height: 108%;
  object-fit: contain;
  backface-visibility: hidden;
  filter: drop-shadow(0 26px 38px rgba(6, 18, 34, 0.18));
}

.passport-book.is-open .passport-cover {
  left: calc(var(--passport-cover-open-left, 0) * 1%);
  filter: brightness(0.82);
  transform: rotateY(calc(var(--passport-cover-rotation, -180) * 1deg));
}

.passport-book.is-open .passport-cover img {
  filter: drop-shadow(-18px 18px 26px rgba(6, 18, 34, 0.12));
}

.passport-book.is-open.is-settled .passport-cover {
  z-index: 1;
}

.passport-hint {
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.76;
}

.passport-book.is-open .passport-hint {
  opacity: 0;
}

.back-button {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.84);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.folder-arrow {
  position: absolute;
  top: 50%;
  right: 22px;
  z-index: 4;
  width: 58px;
  height: 58px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.84);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  transform: translateY(-50%);
  animation: folderArrowNudge 4.8s cubic-bezier(0.77, 0, 0.18, 1) infinite;
  transition: transform 180ms ease, background 180ms ease;
}

.folder-arrow:hover {
  animation: none;
  transform: translate(6px, -50%);
  background: rgba(255, 255, 255, 0.96);
}

.detail-media.is-files-view .folder-arrow {
  display: none;
}

.detail-media:not([data-panel="phone"]) .folder-arrow {
  display: none;
}

@keyframes folderArrowNudge {
  0%,
  68%,
  100% {
    transform: translateY(-50%) translateX(0);
  }

  73% {
    transform: translateY(-50%) translateX(9px);
  }

  79% {
    transform: translateY(-50%) translateX(-5px);
  }

  86% {
    transform: translateY(-50%) translateX(6px);
  }

  93% {
    transform: translateY(-50%) translateX(0);
  }
}

.folder-pane {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.58), transparent 24%),
    radial-gradient(circle at 80% 30%, rgba(178, 204, 206, 0.22), transparent 28%),
    linear-gradient(180deg, #e7eff0 0%, #d7e2e4 100%);
}

.folder-pane::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(30, 45, 48, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(30, 45, 48, 0.06) 1px, transparent 1px);
  background-size: 5px 5px;
  mix-blend-mode: multiply;
}

.folder-board {
  position: relative;
  z-index: 1;
  width: min(calc(var(--folder-board-width, 84) * 1%), 660px);
  height: min(calc(var(--folder-board-height, 82) * 1%), 720px);
  transform: scale(var(--folder-board-scale, 0.78));
  transform-origin: center center;
}

.folder-card {
  --folder-radius-bottom: 10px;
  position: absolute;
  left: 0;
  right: 0;
  height: calc(var(--folder-height, 42) * 1%);
  border-radius: 7px 18px var(--folder-radius-bottom) var(--folder-radius-bottom);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
    #e7e0cf;
  box-shadow:
    0 18px 34px rgba(80, 73, 62, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: top 320ms cubic-bezier(0.22, 1, 0.36, 1), transform 260ms ease, box-shadow 260ms ease;
}

.folder-card::before {
  content: none;
}

.folder-tab {
  position: absolute;
  top: calc(var(--folder-tab-top, -58) * 1px);
  left: 0;
  display: flex;
  align-items: center;
  width: calc(var(--folder-tab-width, 64) * 1%);
  min-height: calc(var(--folder-tab-height, 72) * 1px);
  padding: 16px 26px 14px;
  border-radius: 16px 20px 0 0;
  background: inherit;
  clip-path: polygon(0 100%, 0 28%, 40% 28%, 50% 0, 100% 0, 100% 100%);
  color: rgba(39, 49, 52, 0.8);
  font-size: 14px;
  line-height: 1.15;
  text-transform: uppercase;
}

.folder-tab span {
  white-space: nowrap;
}

.folder-sellout .folder-tab {
  width: 68%;
  font-size: 13px;
}

.folder-storyboard {
  top: calc(var(--folder-back-top, 23) * 1%);
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)),
    #e9e3d4;
}

.folder-sellout {
  top: calc(var(--folder-front-top, 52) * 1%);
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    #b9d1d9;
}

.folder-card:hover,
.folder-card.is-open {
  z-index: 4;
  transform: translateY(calc(var(--folder-hover-lift, 22) * -1px));
  box-shadow:
    0 28px 48px rgba(80, 73, 62, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.folder-card.is-playing {
  z-index: 5;
  transform: translateY(calc(var(--folder-playing-lift, 34) * -1px));
}

.folder-board.is-storyboard-playing .folder-storyboard {
  top: calc(var(--folder-front-top, 52) * 1%);
  z-index: 5;
}

.folder-board.is-storyboard-playing .folder-sellout {
  top: calc(var(--folder-back-top, 23) * 1%);
  z-index: 1;
  transform: translateY(0);
}

.folder-board.is-sellout-playing .folder-storyboard {
  top: calc(var(--folder-back-top, 23) * 1%);
  z-index: 1;
  transform: translateY(0);
}

.folder-board.is-sellout-playing .folder-sellout {
  top: calc(var(--folder-front-top, 52) * 1%);
  z-index: 5;
}

.folder-video-shell {
  position: absolute;
  left: calc(var(--folder-video-left, 8) * 1%);
  bottom: calc(var(--folder-video-bottom, 24) * 1px);
  z-index: 3;
  width: calc(var(--folder-video-width, 84) * 1%);
  height: calc(var(--folder-video-height, 54) * 1%);
  border: 1px solid rgba(72, 84, 88, 0.18);
  border-radius: var(--folder-radius-bottom);
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
  box-shadow: 0 18px 26px rgba(34, 42, 44, 0.1);
}

.folder-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #0b0d0e;
  object-fit: cover;
  transform: scale(var(--folder-video-scale, 1.18));
}

.folder-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  color: transparent;
  background: rgba(12, 16, 18, 0.7);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.folder-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 53%;
  width: 0;
  height: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 20px solid #fff;
  transform: translate(-50%, -50%);
}

.folder-play:hover {
  background: rgba(12, 16, 18, 0.86);
  transform: translate(-50%, -50%) scale(1.05);
}

.folder-card.is-playing .folder-play {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  overflow: auto;
  padding: clamp(24px, 4vw, 56px);
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0;
}

.fact-grid div {
  min-width: 0;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.fact-grid dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.fact-grid dd {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: break-word;
  hyphens: auto;
}

.detail-body {
  display: grid;
  gap: 14px;
}

.detail-body p {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

@media (max-width: 980px) {
  .site-header {
    position: absolute;
  }

  .nav-links {
    display: none;
  }

  .bag-screen {
    min-height: auto;
    padding-top: 84px;
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .hero-copy {
    max-width: 680px;
  }

  h1 {
    font-size: 46px;
  }

  h2 {
    font-size: 38px;
  }

  .bag-stage {
    width: min(112vw, 780px);
    justify-self: center;
    margin-top: 8px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    height: calc(100svh - 32px);
    overflow: auto;
  }

  .detail-media {
    min-height: 46svh;
  }
}

@media (max-width: 620px) {
  .bag-screen {
    padding: 72px 28px 34px;
  }

  h1 {
    font-size: 34px;
    line-height: 1.05;
  }

  .hero-copy p:last-child,
  .detail-lede,
  .detail-body p {
    font-size: 15px;
  }

  .hero-copy {
    max-width: 100%;
    overflow: hidden;
  }

  .hero-copy p:last-child {
    max-width: 31ch;
  }

  .bag-stage {
    width: 128vw;
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
  }

  .bag-object span {
    display: none;
  }

  .bag-object {
    transform: scale(1.32);
    transform-origin: center center;
  }

  .detail-screen {
    padding: 10px;
  }

  .passport-book {
    width: 118%;
  }
  .detail-content {
    padding: 22px;
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }
}

.folder-arrow {
  display: none !important;
}

.ai-reveal {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  display: none;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.76;
}

.detail-media[data-panel="phone"] .ai-reveal {
  display: inline-block;
  transform: translateX(-50%);
}

.detail-media.is-ai-view .ai-reveal,
.detail-media.is-ai-revealing .ai-reveal {
  opacity: 0;
  pointer-events: none;
}

.detail-media.is-ai-view #detail-image,
.detail-media.is-ai-revealing #detail-image {
  opacity: 0;
  transform: scale(0.985);
  filter: blur(8px);
  pointer-events: none;
}

.ai-overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.985);
  transition: opacity 320ms ease, transform 320ms ease;
  background: var(--background);
}

.detail-media.is-ai-view .ai-overlay {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.ai-track {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform 780ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-page {
  position: relative;
  flex: 0 0 50%;
  width: 50%;
  height: 100%;
  padding: 46px 42px 62px;
}

.interaction-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  color: rgba(12, 12, 14, 0.78);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.interaction-header span {
  color: rgba(12, 12, 14, 0.38);
  font-size: 12px;
}

.interaction-header h3 {
  margin: 0;
  font-size: clamp(14px, 1.3vw, 20px);
  line-height: 1.1;
}

.storyboard-workbench,
.sellout-workbench {
  position: relative;
  height: calc(100% - 42px);
}

.storyboard-video-panel {
  position: absolute;
  left: 0;
  top: 0;
  width: 45%;
  padding: 14px;
  border: 1px solid rgba(12, 12, 14, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 20px 40px rgba(12, 12, 14, 0.08);
}

.storyboard-source {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: #111;
}

.storyboard-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.storyboard-controls input {
  grid-column: 1 / -1;
  width: 100%;
}

.storyboard-controls button,
.automation-folder-button {
  border: 1px solid rgba(12, 12, 14, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: rgba(12, 12, 14, 0.78);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 9px 12px;
  text-transform: uppercase;
}

.storyboard-canvas-area {
  position: absolute;
  right: 0;
  top: 0;
  width: 51%;
  height: 72%;
  border: 1px dashed rgba(12, 12, 14, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.45);
}

.story-frame,
.automation-folder {
  position: absolute;
  margin: 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.story-frame img,
.automation-folder video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 18px 34px rgba(12, 12, 14, 0.16);
}

.story-frame figcaption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff;
  background: rgba(12, 12, 14, 0.58);
  font-size: 10px;
}

.card-resizer {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: nwse-resize;
}

.automation-folder {
  z-index: 10;
}

.automation-folder video {
  display: none;
  background: #111;
}

.automation-folder.is-open {
  width: 48% !important;
  height: 34% !important;
}

.automation-folder.is-open video {
  display: block;
}

.automation-folder.is-open .automation-folder-button {
  position: absolute;
  left: 12px;
  top: -38px;
  z-index: 2;
}

.sellout-table {
  width: 66%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 34px rgba(12, 12, 14, 0.08);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(9px, 0.75vw, 12px);
}

.sellout-table th,
.sellout-table td {
  border: 1px solid rgba(12, 12, 14, 0.35);
  padding: 4px 6px;
  text-align: right;
  white-space: nowrap;
}

.sellout-table th:first-child,
.sellout-table td:first-child {
  text-align: left;
}

.sellout-table .highlight td:first-child {
  background: #ffff00;
}

.sellout-table .negative {
  color: #9d1330;
  background: #f0dce2;
}

.rank-card {
  position: absolute;
  right: 3%;
  top: 8%;
  display: grid;
  gap: 8px;
  width: 25%;
  padding: 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 46px rgba(12, 12, 14, 0.14);
}

.rank-card strong {
  color: rgba(12, 12, 14, 0.56);
  font-size: 38px;
  line-height: 1;
}

.rank-card input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(12, 12, 14, 0.16);
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 5px 0;
}

.ai-pages {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 20;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.ai-pages button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(12, 12, 14, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: rgba(12, 12, 14, 0.64);
  cursor: pointer;
}

.ai-pages button.is-active {
  color: #fff;
  background: rgba(12, 12, 14, 0.86);
}

.moodcard.is-text {
  overflow: visible;
}

.storyboard-page .interaction-header {
  max-width: 82%;
  margin: 10px auto 24px;
}

.storyboard-page .interaction-header h3 {
  font-size: clamp(22px, 2.4vw, 38px);
  letter-spacing: 0.12em;
  line-height: 1.08;
}

.storyboard-workbench {
  display: grid;
  grid-template-columns: 39% 1fr;
  gap: 38px;
  align-items: start;
  max-width: 86%;
  height: calc(100% - 112px);
  margin: 0 auto;
}

.storyboard-video-panel {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  padding: 24px 26px 28px;
  border-color: rgba(12, 12, 14, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow:
    0 28px 60px rgba(12, 12, 14, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.storyboard-panel-label,
.storyboard-slide-bar {
  color: rgba(12, 12, 14, 0.44);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.storyboard-panel-label {
  margin: 0 0 12px;
}

.storyboard-source {
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(12, 12, 14, 0.15);
}

.storyboard-controls {
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.storyboard-controls span {
  align-self: center;
  color: var(--text);
  font-size: clamp(24px, 2.2vw, 36px);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.storyboard-controls button {
  min-height: 48px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(12, 12, 14, 0.05);
  font-size: 11px;
  font-weight: 700;
}

.storyboard-controls [data-align-frames] {
  max-width: 150px;
}

.storyboard-slide {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11.5;
  border: 1px solid rgba(12, 12, 14, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(12, 12, 14, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(12, 12, 14, 0.035) 1px, transparent 1px),
    #fff;
  background-size: 28px 28px;
  box-shadow: 0 26px 58px rgba(12, 12, 14, 0.08);
  overflow: hidden;
}

.storyboard-slide-bar {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 14px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
}

.storyboard-canvas-area {
  position: absolute;
  inset: 42px 24px 24px;
  width: auto;
  height: auto;
  border: 1px dashed rgba(12, 12, 14, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.story-frame {
  border: 1px solid rgba(12, 12, 14, 0.16);
  box-shadow: 0 18px 32px rgba(12, 12, 14, 0.13);
}

.story-frame.is-selected {
  outline: none;
}

.story-frame img {
  border-radius: 0;
}

.frame-corner {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(12, 12, 14, 0.42);
  background: #fff;
}

.frame-corner-tl {
  left: -5px;
  top: -5px;
}

.frame-corner-tr {
  right: -5px;
  top: -5px;
}

.frame-corner-bl {
  left: -5px;
  bottom: -5px;
}

.story-frame .card-resizer {
  right: -9px;
  bottom: -9px;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(12, 12, 14, 0.5);
  background: #fff;
}

.automation-folder {
  overflow: visible;
  border-radius: 0;
}

.automation-folder-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(12, 12, 14, 0.14);
  border-radius: 0 16px 16px 16px;
  background: linear-gradient(180deg, #f5efe2, #e9dcc9);
  box-shadow:
    0 20px 36px rgba(12, 12, 14, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.85) inset;
  color: rgba(12, 12, 14, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  transform-origin: left top;
  transition: transform 260ms ease, opacity 180ms ease;
}

.automation-folder-button::before {
  content: "";
  position: absolute;
  left: 0;
  top: -32%;
  width: 54%;
  height: 42%;
  border: 1px solid rgba(12, 12, 14, 0.12);
  border-bottom: 0;
  border-radius: 14px 22px 0 0;
  background: linear-gradient(180deg, #f7f1e7, #eee2ce);
}

.automation-folder.is-open .automation-folder-button {
  opacity: 0;
  pointer-events: none;
  transform: rotateX(72deg) translateY(12px);
}

.automation-folder video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.96);
  transition: opacity 260ms ease, transform 260ms ease;
}

.automation-folder.is-open video {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.automation-folder .card-resizer {
  right: -11px;
  bottom: -11px;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(12, 12, 14, 0.42);
  border-radius: 4px;
  background:
    linear-gradient(135deg, transparent 48%, rgba(12, 12, 14, 0.48) 49%, rgba(12, 12, 14, 0.48) 55%, transparent 56%),
    #fff;
  opacity: 0;
  pointer-events: none;
}

.automation-folder.is-open .card-resizer {
  opacity: 1;
  pointer-events: auto;
}

.automation-folder.is-open {
  z-index: 30;
}

.storyboard-page .interaction-header {
  position: absolute;
  left: 50%;
  top: 56px;
  z-index: 6;
  margin: 0;
  max-width: none;
  transform: translateX(-50%);
}

.storyboard-page .interaction-header h3 {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  white-space: nowrap;
}

.storyboard-workbench {
  position: absolute;
  inset: 92px 46px 74px;
  display: block;
  max-width: none;
  height: auto;
  margin: 0;
}

.storyboard-video-panel {
  position: absolute;
  z-index: 12;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.storyboard-panel-label {
  position: absolute;
  left: 50%;
  top: -24px;
  margin: 0;
  transform: translateX(-50%);
}

.storyboard-panel-label,
.storyboard-controls,
.storyboard-controls button,
.storyboard-controls select,
.storyboard-slide,
.automation-folder-button,
.automation-close {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.storyboard-source {
  width: 100%;
  height: calc(100% - 92px);
  object-fit: cover;
  border-radius: 14px;
}

.storyboard-controls {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 82px);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.storyboard-controls input {
  grid-column: 1 / -1;
}

.storyboard-controls span {
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.storyboard-controls button,
.storyboard-controls select {
  min-height: 28px;
  border: 1px solid rgba(12, 12, 14, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 20px rgba(12, 12, 14, 0.05);
  color: rgba(12, 12, 14, 0.72);
  cursor: pointer;
  padding: 8px 10px;
}

.storyboard-controls [data-align-frames] {
  max-width: none;
}

.storyboard-slide {
  position: absolute;
  inset: 0;
  width: auto;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.storyboard-canvas-area {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.story-frame,
.story-frame-video {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: 0 22px 34px rgba(12, 12, 14, 0.16);
}

.story-frame img,
.story-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.story-frame figcaption {
  left: 6px;
  bottom: 6px;
  font-size: 9px;
}

.frame-corner {
  display: none;
}

.story-frame .card-resizer,
.storyboard-video-panel .card-resizer,
.automation-folder .card-resizer {
  right: -10px;
  bottom: -10px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  opacity: 1;
  pointer-events: auto;
}

.automation-folder {
  z-index: 20;
  overflow: visible;
  filter: drop-shadow(0 22px 28px rgba(12, 12, 14, 0.2));
}

.automation-folder::before {
  content: "";
  position: absolute;
  inset: -8% -5% 3%;
  z-index: 0;
  border-radius: 17px;
  background: linear-gradient(180deg, #1c1c1d, #050505);
  box-shadow: 0 18px 28px rgba(12, 12, 14, 0.24);
}

.automation-folder video {
  position: absolute;
  left: 8%;
  top: -18%;
  z-index: 1;
  display: block;
  width: 84%;
  height: 82%;
  object-fit: cover;
  border-radius: 10px;
  opacity: 1;
  pointer-events: none;
  transform: none;
}

.automation-folder:not(.is-open) video::-webkit-media-controls {
  display: none !important;
}

.automation-folder-button {
  position: absolute;
  inset: 28% 0 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 72%;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12));
  color: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.32) inset,
    0 -18px 34px rgba(255, 255, 255, 0.08) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.automation-folder-button::before,
.automation-folder-button::after {
  content: "";
  position: absolute;
  z-index: -1;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  filter: blur(0.2px);
}

.automation-folder-button::before {
  left: 18%;
  top: -54%;
  width: 28%;
  height: 60%;
  transform: rotate(-9deg);
}

.automation-folder-button::after {
  right: 18%;
  top: -48%;
  width: 32%;
  height: 58%;
  transform: rotate(10deg);
}

.automation-folder.is-open::before,
.automation-folder.is-open .automation-folder-button {
  display: none;
}

.automation-folder.is-open video {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
  pointer-events: auto;
  background: #050505;
}

.automation-close {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 4;
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: rgba(12, 12, 14, 0.72);
  cursor: pointer;
  padding: 7px 9px;
}

.automation-folder.is-open .automation-close {
  display: block;
}

.automation-move-handle {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  display: none;
  width: 100%;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: grab;
}

.automation-folder.is-open .automation-move-handle {
  display: block;
}

/* Final storyboard interaction model: free canvas, one movable source video, keyboard copy/paste. */
.storyboard-page .interaction-header {
  top: 58px;
}

.storyboard-page .interaction-header h3 {
  font-size: 10px !important;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.storyboard-workbench {
  inset: 96px 48px 72px;
}

.storyboard-video-panel {
  aspect-ratio: 16 / 9;
  height: auto !important;
  cursor: default;
}

.storyboard-video-panel.is-selected .storyboard-source,
.story-frame.is-selected img {
  outline: none;
}

.source-move-handle {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: 100%;
  height: 24px;
  border: 0;
  background: transparent;
  cursor: grab;
}

.source-move-handle:hover {
  cursor: grab;
}

.storyboard-video-panel.is-dragging .source-move-handle {
  cursor: grabbing;
}

.storyboard-source {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0 !important;
  object-fit: cover;
  box-shadow: 0 20px 36px rgba(12, 12, 14, 0.16);
}

.storyboard-source::-webkit-media-controls {
  display: none !important;
}

.storyboard-controls {
  top: calc(100% + 10px);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.storyboard-controls input {
  grid-column: 1 / 2;
  width: 100%;
}

.storyboard-controls span {
  grid-column: 2 / 3;
  font-size: 10px !important;
  white-space: nowrap;
}

.storyboard-controls button,
.storyboard-controls select {
  display: none !important;
}

.storyboard-controls .capture-frame-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  grid-column: 3 / 4;
  width: 22px;
  height: 22px;
  min-height: 0;
  padding: 0;
  border: 1.5px solid rgba(12, 12, 14, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: rgba(12, 12, 14, 0.7);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.storyboard-controls .capture-frame-btn:hover {
  border-color: rgba(12, 12, 14, 0.5);
  background: #fff;
  color: rgba(12, 12, 14, 0.9);
}

.storyboard-controls .capture-frame-btn:active {
  background: rgba(12, 12, 14, 0.06);
}

.storyboard-slide,
.storyboard-canvas-area {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  pointer-events: none;
}

.storyboard-canvas-area {
  width: 100% !important;
  height: 100% !important;
}

.story-frame {
  aspect-ratio: 16 / 9;
  height: auto !important;
  cursor: grab;
  z-index: 15;
  background: transparent !important;
  pointer-events: auto;
}

.story-frame img {
  border-radius: 0;
  box-shadow: 0 18px 30px rgba(12, 12, 14, 0.16);
}

.story-frame figcaption {
  display: none;
}

.story-frame .card-resizer,
.storyboard-video-panel .card-resizer {
  right: -14px;
  bottom: -14px;
  width: 42px;
  height: 42px;
  opacity: 1;
  cursor: nwse-resize;
}

.automation-folder {
  cursor: grab;
}

.automation-folder::before {
  inset: 7% 2% 8%;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 18, 19, 0.98), rgba(4, 4, 5, 0.98));
}

.automation-folder video {
  left: 14%;
  top: 4%;
  width: 72%;
  height: 58%;
  opacity: 0.62;
  filter: saturate(0.78) contrast(0.86);
}

.automation-folder-button {
  inset: 33% 0 0;
  height: 67%;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.16));
  color: rgba(255, 255, 255, 0.92);
}

.automation-folder-button::before,
.automation-folder-button::after {
  display: none !important;
}

.automation-folder:not(.is-open) .card-resizer {
  display: none !important;
}

.automation-folder.is-open {
  cursor: grab;
}

.detail-media.is-ai-view {
  background: transparent;
  border-color: transparent;
}

.story-frame {
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

.story-frame img {
  border-radius: 0 !important;
}

.ai-auto-btn {
  position: absolute;
  right: 7%;
  bottom: 6%;
  z-index: 25;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(12, 12, 14, 0.18), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  color: rgba(12, 12, 14, 0.82);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  transition: background 0.15s, box-shadow 0.15s;
}

.ai-auto-btn:hover {
  background: rgba(255, 255, 255, 0.36);
  box-shadow: 0 10px 28px rgba(12, 12, 14, 0.22), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.ai-auto-close-icon {
  display: none;
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1;
}

.ai-auto-btn.is-open .ai-auto-label {
  display: none;
}

.ai-auto-btn.is-open .ai-auto-close-icon {
  display: block;
}

.ai-auto-player {
  position: absolute;
  z-index: 50;
  aspect-ratio: 16 / 9;
  height: auto !important;
  border-radius: 14px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  background: #050505;
  box-shadow: 0 28px 56px rgba(12, 12, 14, 0.32);
  transition: opacity 0.22s ease;
}

.ai-auto-player.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ai-player-handle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  z-index: 2;
  cursor: grab;
}

.ai-player-handle:active {
  cursor: grabbing;
}

.ai-auto-player video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ai-auto-player .card-resizer {
  right: -12px;
  bottom: -12px;
  width: 38px;
  height: 38px;
  opacity: 1;
  background: transparent;
  border: 0;
}

.automation-folder.is-open video {
  filter: none;
  opacity: 1;
  box-shadow: 0 20px 38px rgba(12, 12, 14, 0.2);
}

.automation-folder.is-open .card-resizer {
  display: block !important;
  right: -14px;
  bottom: -14px;
  width: 42px;
  height: 42px;
  opacity: 1;
  background: transparent !important;
  border: 0 !important;
  cursor: nwse-resize;
}

/* ============================================================
   v10: Sellout page layout + Rank card + AI Auto animations
   ============================================================ */

/* Sellout page header: match page 1 style (10px, centered, absolute) */
.sellout-page .interaction-header {
  position: absolute;
  left: 50%;
  top: 58px;
  z-index: 6;
  margin: 0;
  max-width: none;
  transform: translateX(-50%);
  justify-content: center;
}

.sellout-page .interaction-header h3 {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  white-space: nowrap;
}

/* Sellout workbench: absolute fill, flex column, table top / rank card bottom */
.sellout-page .sellout-workbench {
  position: absolute;
  inset: 96px 48px 108px;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sellout-page .sellout-table {
  width: 100%;
  position: static;
}

/* Rank card: wide horizontal bar at bottom */
.rank-card {
  position: static;
  right: auto;
  top: auto;
  width: 100%;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 46px rgba(12, 12, 14, 0.14);
  overflow: hidden;
}

.rank-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  border-right: 1px solid rgba(12, 12, 14, 0.08);
}

.rank-col:last-child {
  border-right: 0;
}

.rank-col--no5 {
  flex: 0 0 auto;
  min-width: 56px;
  align-items: center;
  justify-content: center;
  background: rgba(12, 12, 14, 0.03);
}

.rank-col-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(12, 12, 14, 0.44);
  line-height: 1;
}

.rank-col--no5 .rank-col-label {
  font-size: 20px;
  font-weight: 700;
  color: rgba(12, 12, 14, 0.56);
  letter-spacing: -0.01em;
  text-transform: none;
}

.rank-col input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(12, 12, 14, 0.16);
  background: transparent;
  color: rgba(12, 12, 14, 0.88);
  font: inherit;
  font-size: clamp(10px, 0.85vw, 13px);
  padding: 3px 0;
  margin-top: auto;
  outline: none;
}

.rank-growth.is-positive { color: #1a7a1a; }
.rank-growth.is-negative { color: #9d1330; }

.rank-sellout-display {
  font-size: 9px;
  letter-spacing: 0.06em;
  color: rgba(12, 12, 14, 0.44);
  min-height: 12px;
}

/* AI Auto inner wrapper */
.ai-auto-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  pointer-events: none;
}

/* Idle bounce on the whole button when closed */
/* ai-auto-idle-bounce defined later with physics-based version */

/* Clockwise spin on open */
@keyframes ai-auto-spin-open {
  0%   { transform: rotate(0deg) scale(1); }
  60%  { transform: rotate(390deg) scale(0.92); }
  100% { transform: rotate(360deg) scale(1); }
}

.ai-auto-btn.is-spinning {
  animation: ai-auto-spin-open 0.56s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Video controls visible inside player */
.ai-auto-player video::-webkit-media-controls {
  opacity: 1;
}

/* ─── v12: frosted backdrop, product cards, updated bounce ─── */

/* Frosted glass backdrop — dims the page content, no backdrop-filter */
.ai-video-backdrop {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: rgba(248, 248, 246, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
}

.ai-overlay.has-player-open .ai-video-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* Blur page content only — ai-auto-btn is a sibling of ai-page-content so it stays sharp */
/* Note: no transition on base state — prevents Safari from creating a compositing layer
   that causes <video> elements inside to render as black */
.ai-overlay.has-player-open .ai-page-content {
  filter: blur(8px);
  transition: filter 0.26s ease;
}

/* Storyboard page: iframe is the content layer — blur it directly.
   Filter on the <iframe> element (parent document side) is safe and does not
   create compositor issues for the video element inside the iframe's document. */
.ai-overlay.has-player-open .storyboard-page > iframe {
  filter: blur(8px);
  transition: filter 0.26s ease;
}

/* Nav buttons must sit above the backdrop */
.ai-pages {
  z-index: 22;
}

/* Remove dark fallback bg — container should be transparent once video loads */
.ai-auto-player {
  background: transparent;
}

/* ─── Top-5 product cards ─── */
.top5-cards {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 0 1.5%;
}

.product-card {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 8px 7px 10px;
}

.pc-rank {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(12, 12, 14, 0.4);
  text-align: center;
}

.pc-img {
  aspect-ratio: 3 / 4;
  border: 1.5px dashed rgba(12, 12, 14, 0.22);
  border-radius: 6px;
  background: rgba(12, 12, 14, 0.03);
  margin-bottom: 2px;
}

.pc-brand {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(12, 12, 14, 0.18);
  background: transparent;
  font: inherit;
  font-size: clamp(7px, 0.65vw, 10px);
  font-weight: 700;
  color: rgba(12, 12, 14, 0.88);
  text-align: center;
  padding: 2px 0;
  outline: none;
}

.pc-name {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(12, 12, 14, 0.12);
  background: transparent;
  font: inherit;
  font-size: clamp(6px, 0.58vw, 9px);
  color: rgba(12, 12, 14, 0.64);
  text-align: center;
  padding: 2px 0;
  outline: none;
  margin-bottom: 2px;
}

.pc-metric {
  display: flex;
  align-items: baseline;
  gap: 2px;
  justify-content: center;
}

.pc-lbl {
  font-size: clamp(5px, 0.5vw, 7px);
  letter-spacing: 0.07em;
  color: rgba(12, 12, 14, 0.44);
  white-space: nowrap;
  flex-shrink: 0;
}

.pc-unit {
  font-size: clamp(5px, 0.5vw, 7px);
  color: rgba(12, 12, 14, 0.44);
  white-space: nowrap;
  flex-shrink: 0;
}

.pc-metric input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid rgba(12, 12, 14, 0.14);
  background: transparent;
  font: inherit;
  font-size: clamp(6px, 0.58vw, 9px);
  color: rgba(12, 12, 14, 0.88);
  text-align: center;
  padding: 2px 0;
  outline: none;
}

.pc-growth.is-positive { color: #1a7a1a; }
.pc-growth.is-negative { color: #9d1330; }

/* ─── Idle bounce: gravity-physics, big amplitude, elastic secondary ─── */
@keyframes ai-auto-idle-bounce {
  0% {
    transform: translateY(0) scale(1, 1);
    animation-timing-function: cubic-bezier(0.12, 0, 0.35, 0);
  }
  14% {
    transform: translateY(-26px) scale(1.06, 0.94);
    animation-timing-function: cubic-bezier(0.65, 0, 0.88, 1);
  }
  28% {
    transform: translateY(0) scale(0.94, 1.06);
    animation-timing-function: cubic-bezier(0.12, 0, 0.35, 0);
  }
  37% {
    transform: translateY(-9px) scale(1.02, 0.98);
    animation-timing-function: cubic-bezier(0.65, 0, 0.88, 1);
  }
  46%, 100% {
    transform: translateY(0) scale(1, 1);
  }
}

.ai-auto-btn:not(.is-open):not(.is-spinning) {
  animation: ai-auto-idle-bounce 2.6s linear infinite;
}

/* ─── Storyboard v2 ── sb-* classes, zero backdrop-filter near video ─── */
.sb-workbench {
  position: absolute;
  inset: 80px 32px 56px;
}

.sb-source {
  /* position/size set by drag system via inline style */
  aspect-ratio: 16 / 9;
  height: auto !important;
  cursor: default;
}

.sb-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  box-shadow: 0 20px 36px rgba(12, 12, 14, 0.16);
  /* No filter, no backdrop-filter, no transition — all kill Safari video */
}

.sb-video::-webkit-media-controls {
  display: none !important;
}

.sb-handle {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: 100%;
  height: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: grab;
}

.sb-source:active .sb-handle { cursor: grabbing; }

.sb-controls {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 6px;
}

.sb-range {
  grid-column: 1;
  width: 100%;
  cursor: pointer;
}

.sb-time {
  grid-column: 2;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--muted, rgba(12, 12, 14, 0.5));
}

.sb-capture {
  grid-column: 3;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1.5px solid rgba(12, 12, 14, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: rgba(12, 12, 14, 0.7);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sb-capture:hover {
  border-color: rgba(12, 12, 14, 0.5);
  background: #fff;
}

.sb-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sb-frame {
  position: absolute;
  cursor: grab;
  aspect-ratio: 16 / 9;
  height: auto !important;
  pointer-events: auto;
  z-index: 15;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

.sb-frame img {
  display: block;
  width: 100%;
  border-radius: 0;
  box-shadow: 0 18px 30px rgba(12, 12, 14, 0.16);
}

.sb-frame figcaption {
  display: none;
}

.sb-frame .card-resizer,
.sb-source .sb-resizer {
  right: -14px;
  bottom: -14px;
  width: 42px;
  height: 42px;
  opacity: 1;
  cursor: nwse-resize;
}

.sb-frame.is-selected img {
  outline: 2px solid rgba(12, 12, 14, 0.4);
  outline-offset: 2px;
}

/* ─── Storyboard v3 (stv-*) — copied from storyboard-test.html, zero GPU compositing ─── */
.stv-canvas {
  position: absolute;
  inset: 72px 0 0;
  /* NO transform · NO will-change · NO filter · NO backdrop-filter */
}

.stv-source {
  position: absolute;
  cursor: default;
}

.stv-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(12, 12, 14, 0.18);
  background: #111;
  /* NOTHING that triggers compositing: no transform, no will-change, no filter, no transition */
}

.stv-video::-webkit-media-controls { display: none !important; }

.stv-handle {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 22px;
  z-index: 2;
  border: 0; padding: 0;
  background: transparent;
  cursor: grab;
  border-radius: 6px 6px 0 0;
}

.stv-controls {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stv-range {
  flex: 1;
  cursor: pointer;
  accent-color: rgba(12, 12, 14, 0.7);
}

.stv-time {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: rgba(12, 12, 14, 0.5);
  white-space: nowrap;
  min-width: 52px;
}

.stv-capture {
  width: 24px; height: 24px;
  flex-shrink: 0;
  border: 1.5px solid rgba(12, 12, 14, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: rgba(12, 12, 14, 0.7);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.stv-capture:hover { background: #fff; border-color: rgba(12, 12, 14, 0.45); }
.stv-capture:active { background: rgba(12, 12, 14, 0.06); }

.stv-resize {
  right: -12px;
  bottom: -12px;
  width: 32px; height: 32px;
  opacity: 1;
  cursor: nwse-resize;
}

/* Story frames inside stv-canvas */
.stv-canvas .story-frame {
  pointer-events: auto;
  z-index: 15;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

/* ── Wallet scene (landing page contact cards) ── */
.wallet-scene {
  position: absolute;
  z-index: 3;
  left: 323px;
  top: 202px;
  width: 353px;
  --ws-rot: 28deg;
  --ws-scale: 1;
  transform: rotate(var(--ws-rot)) scale(var(--ws-scale));
  transform-origin: center center;
}

.wallet-bg {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.wallet-card {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  text-decoration: none;
  cursor: pointer;
  transform: rotate(var(--wc-rot, 0deg));
  transform-origin: center center;
  transition: transform 180ms ease;
}
.wallet-card::after {
  content: '';
  position: absolute;
  inset: -2%;
  border: 1.5px solid transparent;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, box-shadow 180ms ease;
}
.wallet-card:hover {
  transform: scale(1.06) rotate(var(--wc-rot, 0deg));
  z-index: 10;
}
.wallet-card:hover::after {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.75),
    0 0 14px rgba(255, 255, 255, 0.8),
    0 0 28px rgba(255, 255, 255, 0.4);
}
.wallet-card img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

/* individual card positions — z-index: linkedin (top) > cvfr > cven (back) */
.wallet-card-linkedin {
  left: 91.8px;
  top: 170.8px;
  width: 169.2px;
  z-index: 4;
  --wc-rot: 0.16deg;
}
.wallet-card-cvfr {
  left: 91.5px;
  top: 153.4px;
  width: 171.4px;
  z-index: 3;
  --wc-rot: 0deg;
}
.wallet-card-cven {
  left: 91.2px;
  top: 137.6px;
  width: 171.6px;
  z-index: 2;
  --wc-rot: 0deg;
}

/* ── Calculator reveal ── */

.calc-reveal {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  display: inline-block;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: opacity 220ms ease;
  white-space: nowrap;
}

.detail-media[data-panel="calculator"] .calc-reveal {
  opacity: 0.76;
  pointer-events: auto;
}

.detail-media[data-panel="calculator"] .calc-reveal:hover {
  opacity: 1;
}

.detail-media.is-calc-view .calc-reveal,
.detail-media.is-calc-revealing .calc-reveal {
  opacity: 0;
  pointer-events: none;
}

.detail-media.is-calc-revealing #detail-image,
.detail-media.is-calc-view #detail-image {
  opacity: 0;
  transform: scale(0.985);
  filter: blur(8px);
  pointer-events: none;
}

.calc-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.985);
  transition: opacity 320ms ease, transform 320ms ease;
  background: var(--background);
  overflow: hidden;
}

.detail-media.is-calc-view .calc-overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.calc-overlay-toolbar {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.calc-pane {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: hidden;
  min-height: 0;
}

.calc-pane-cap {
  flex-shrink: 0;
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 4px 6px 2px;
  border-top: none;
  text-align: center;
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.calc-pane-img {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calc-pane-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.calc-canvas-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.calc-canvas-wrap canvas {
  position: absolute;
  inset: 0;
  display: block;
}

.calc-kw-inner {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 0;
  padding: 6px 6px 2px;
  overflow: hidden;
}

.calc-kw-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.calc-kw-col:first-child {
  padding-right: 5px;
  border-right: 1px solid var(--border);
  margin-right: 5px;
}

.calc-kw-label {
  font-size: 7.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.calc-kw-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  min-height: 0;
}

.calc-kw-tag {
  display: block;
  width: 100%;
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  font-size: 8.5px;
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
  transition: color 200ms ease, background 200ms ease, border-color 200ms ease;
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  position: relative;
}

.calc-kw-tag::after {
  content: '';
  position: absolute;
  left: 5px;
  right: 5px;
  top: 50%;
  height: 1px;
  background: var(--muted);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.calc-kw-tag:hover {
  background: var(--surface-soft);
}

.calc-kw-tag.is-struck {
  color: var(--muted);
  border-color: transparent;
  background: var(--surface-soft);
}

.calc-kw-tag.is-struck::after {
  transform: scaleX(1);
}

.calc-h5-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.calc-h5-scroll img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: initial;
  transform: none;
  transition: none;
  filter: none;
}
