:root {
  --deep: #070333;
  --panel: rgba(224, 212, 255, 0.075);
  --line: rgba(209, 194, 255, 0.24);
  --white: #fff;
  --muted: rgba(246, 241, 255, 0.72);
  --purple: #7f35ff;
  --blue: #37ddff;
  --radius: 8px;
  --max: 1500px;
  --glow-border: rgba(202, 158, 255, 0.9);
  --glow-surface: radial-gradient(circle at 16% 46%, rgba(244, 237, 255, 0.42), transparent 20%), radial-gradient(circle at 50% 100%, rgba(127, 53, 255, 0.46), transparent 70%), linear-gradient(180deg, rgba(105, 37, 220, 0.5), rgba(80, 24, 178, 0.44) 54%, rgba(48, 16, 126, 0.46));
  --glow-surface-soft: radial-gradient(circle at 16% 46%, rgba(244, 237, 255, 0.26), transparent 20%), radial-gradient(circle at 50% 100%, rgba(127, 53, 255, 0.34), transparent 70%), linear-gradient(180deg, rgba(96, 34, 204, 0.42), rgba(72, 22, 160, 0.38) 54%, rgba(44, 15, 118, 0.4));
  --glow-shadow: 0 0 0 1px rgba(214, 184, 255, 0.3), 0 0 18px rgba(176, 78, 255, 0.52), 0 0 42px rgba(127, 53, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 20px rgba(205, 141, 255, 0.24), inset 0 -12px 30px rgba(127, 53, 255, 0.26);
  --glow-shadow-strong: 0 0 0 1px rgba(238, 230, 255, 0.44), 0 0 24px rgba(205, 141, 255, 0.82), 0 0 62px rgba(127, 53, 255, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 26px rgba(224, 205, 255, 0.28), inset 0 -16px 36px rgba(127, 53, 255, 0.32);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--deep);
  color: var(--white);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background:
    radial-gradient(circle at 8% 92%, rgba(24, 19, 93, 0.5), transparent 18%),
    linear-gradient(180deg, #0b073c 0%, #080433 48%, #050222 100%);
}

.metaverse-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }

.site-header {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 48px, 1220px);
  min-height: 76px;
  padding: 14px 18px;
  border: 1px solid rgba(221, 211, 255, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(246, 241, 255, 0.2), transparent 34%),
    radial-gradient(circle at 86% 8%, rgba(190, 158, 255, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(83, 54, 145, 0.56), rgba(54, 35, 116, 0.42)),
    rgba(36, 24, 86, 0.52);
  backdrop-filter: blur(20px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -14px 30px rgba(151, 120, 255, 0.08),
    0 18px 48px rgba(2, 1, 18, 0.24),
    0 0 24px rgba(190, 158, 255, 0.14);
  transform: translateX(-50%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #b89eff 45%, var(--purple));
  color: #160743;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 rgba(205, 141, 255, 0);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.nav a:hover,
.nav a.active {
  color: var(--white);
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.32), transparent 34%),
    linear-gradient(180deg, rgba(166, 124, 255, 0.5), rgba(104, 63, 205, 0.38));
  border-color: rgba(235, 226, 255, 0.5);
  box-shadow:
    0 0 0 1px rgba(224, 205, 255, 0.18),
    0 0 18px rgba(178, 142, 255, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -10px 22px rgba(127, 53, 255, 0.2);
  transform: translateY(-1px);
}

.menu-toggle { display: none; }

.back-home {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 55;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid var(--glow-border);
  border-radius: 50%;
  background: var(--glow-surface);
  box-shadow: var(--glow-shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.back-home.visible { opacity: 1; pointer-events: auto; }
.back-home:hover,
.back-home:focus-visible {
  box-shadow: var(--glow-shadow-strong);
  transform: translateY(-2px);
}
.back-home span {
  width: 19px;
  height: 19px;
  background: #fff;
  clip-path: polygon(6% 47%, 93% 8%, 63% 92%, 45% 60%);
  transform: translate(1px, -1px) rotate(-45deg);
}

.has-carousel-plane-nav {
  position: relative;
}

.carousel-plane-nav {
  position: absolute;
  top: 50%;
  z-index: 12;
  display: grid;
  width: clamp(36px, 3.4vw, 48px);
  height: clamp(36px, 3.4vw, 48px);
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  opacity: 0.95;
  overflow: visible;
  transform: translateY(-50%);
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease;
}

.carousel-plane-nav:hover,
.carousel-plane-nav:focus-visible {
  opacity: 1;
  outline: 0;
  filter: drop-shadow(0 0 18px rgba(160, 92, 255, 0.88));
  transform: translateY(-50%) scale(1.06);
}

.carousel-plane-nav span {
  width: clamp(18px, 1.7vw, 24px);
  height: clamp(18px, 1.7vw, 24px);
  background: linear-gradient(135deg, #ffffff 0%, #d8c7ff 34%, #8b4dff 100%);
  clip-path: polygon(6% 47%, 93% 8%, 63% 92%, 45% 60%);
  filter:
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.82))
    drop-shadow(0 0 18px rgba(142, 80, 255, 0.9));
  transform: translate(1px, -1px) rotate(var(--plane-rotate, 0deg));
}

.carousel-plane-prev {
  left: clamp(-34px, -2.2vw, -18px);
  --plane-rotate: 180deg;
}

.carousel-plane-next {
  right: clamp(-34px, -2.2vw, -18px);
}

.section {
  position: relative;
  isolation: isolate;
  width: min(100% - 40px, var(--max));
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(104px, 13vh, 178px) 0 clamp(96px, 12vh, 166px);
}

.project-info,
.strengths,
.contact {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.works {
  min-height: auto;
  padding-top: clamp(86px, 11vh, 138px);
  padding-bottom: clamp(86px, 11vh, 142px);
}

.strengths {
  min-height: auto;
  padding-bottom: 0;
}

.case-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 128px max(44px, calc((100vw - var(--max)) / 2)) 72px;
}

.case-hero::after,
.hero-bg::after,
.project-info::before,
.strengths::before,
.works::before,
.contact::before {
  position: absolute;
  pointer-events: none;
  content: "";
}

.case-hero::after {
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, transparent calc(100% - 22px), rgba(5, 3, 30, 0.62) calc(100% - 8px), #05031e 100%),
    linear-gradient(90deg, rgba(5, 3, 30, 0.28), transparent 42%, rgba(55, 221, 255, 0.04));
}

.hero-bg,
.hero-bg video {
  position: absolute;
  inset: 0;
}

.hero-bg { z-index: -2; background: #05031e; }
.hero-bg video { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-bg::after {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 3, 30, 0) calc(100% - 24px), rgba(5, 3, 30, 0.5) calc(100% - 9px), #05031e 100%),
    linear-gradient(90deg, rgba(5, 3, 30, 0.28), rgba(5, 3, 30, 0.08) 48%, rgba(5, 3, 30, 0.1));
}

.case-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 860px;
  pointer-events: none;
}

.case-hero.hero-copy-visible .case-hero-inner {
  pointer-events: auto;
}

.case-kicker,
.case-hero h1 span,
.hero-subtitle,
.case-hero .button.primary,
.hero-metrics article {
  opacity: 0;
  filter: blur(7px);
  transform: translateY(24px) scale(0.985);
  transition:
    opacity 1100ms ease,
    filter 1100ms ease,
    transform 1300ms cubic-bezier(0.2, 0.88, 0.22, 1);
}

.case-hero.hero-copy-visible .case-kicker,
.case-hero.hero-copy-visible h1 span,
.case-hero.hero-copy-visible .hero-subtitle,
.case-hero.hero-copy-visible .button.primary,
.case-hero.hero-copy-visible .hero-metrics article {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

.case-hero.hero-copy-visible h1 span:first-child { transition-delay: 0ms; }
.case-hero.hero-copy-visible h1 span:last-child { transition-delay: 140ms; }
.case-hero.hero-copy-visible .case-kicker { transition-delay: 520ms; }
.case-hero.hero-copy-visible .hero-subtitle { transition-delay: 760ms; }
.case-hero.hero-copy-visible .button.primary { transition-delay: 980ms; }
.case-hero.hero-copy-visible .hero-metrics article:nth-child(1) { transition-delay: 1180ms; }
.case-hero.hero-copy-visible .hero-metrics article:nth-child(2) { transition-delay: 1340ms; }
.case-hero.hero-copy-visible .hero-metrics article:nth-child(3) { transition-delay: 1500ms; }

.case-hero .button.primary:hover,
.case-hero .button.primary:focus-visible {
  transform: translateY(-2px) scale(1);
}

.case-hero .button.primary {
  display: grid;
  width: max-content;
}

.case-kicker {
  margin: 0 0 30px;
  color: rgba(238, 230, 255, 0.68);
  font-size: clamp(16px, 1.6vw, 24px);
  text-transform: uppercase;
}

h1 {
  margin: 0 0 38px;
  font-size: clamp(54px, 5.7vw, 86px);
  letter-spacing: 0.045em;
  line-height: 1.05;
  white-space: nowrap;
}

.case-hero h1 {
  background: linear-gradient(90deg, #fff 6%, #d8cbff 48%, var(--purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.case-hero h1 span {
  display: inline;
  background: none;
  color: transparent;
}
.hero-subtitle { margin: 0 0 38px; color: rgba(238, 230, 255, 0.78); font-size: 20px; }

.button {
  display: inline-grid;
  min-height: 58px;
  place-items: center;
  padding: 0 34px;
  border: 1px solid var(--glow-border);
  border-radius: 999px;
  background: var(--glow-surface);
  color: #fff;
  box-shadow: var(--glow-shadow);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.26);
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: var(--glow-shadow-strong);
  transform: translateY(-2px);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 640px;
  margin-top: 42px;
  padding-top: 20px;
}

.hero-metrics article,
.info-panel,
.profile-orb,
.skill-card,
.work-card,
.work-category,
.contact-content {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.026)),
    rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(18px);
}

.hero-metrics article {
  padding: 16px;
  border: 1px solid transparent;
  background:
    linear-gradient(135deg, rgba(5, 3, 30, 0), rgba(5, 3, 30, 0)) padding-box,
    linear-gradient(135deg, rgba(232, 214, 255, 0.78), rgba(174, 94, 255, 0.5) 44%, rgba(127, 53, 255, 0.16) 100%) border-box;
  box-shadow:
    inset 0 0 18px rgba(184, 128, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(214, 184, 255, 0.1),
    0 0 18px rgba(176, 78, 255, 0.34),
    0 0 46px rgba(127, 53, 255, 0.2);
  backdrop-filter: none;
}
.hero-metrics span, .hero-metrics em, .section-index strong, .work-card span, .contact-content p { color: var(--muted); font-size: 14px; font-style: normal; }
.hero-metrics strong { display: block; margin: 8px 0 5px; font-size: 26px; }

.section-index {
  display: grid;
  grid-template-columns: auto 82px 1fr;
  gap: 16px;
  align-items: center;
  width: min(100%, 360px);
  margin-bottom: clamp(46px, 6vh, 90px);
  color: rgba(246, 241, 255, 0.92);
  font-weight: 900;
}

.section-index i { height: 1px; background: rgba(255, 255, 255, 0.24); }

.mega-title {
  position: relative;
  min-height: clamp(104px, 14vh, 188px);
  margin-bottom: clamp(34px, 5vh, 70px);
}

.mega-title p {
  position: absolute;
  top: 0;
  left: clamp(16px, 7vw, 128px);
  z-index: -1;
  max-width: 100%;
  margin: 0;
  color: rgba(127, 53, 255, 0.34);
  font-size: clamp(36px, 4.2vw, 70px);
  font-weight: 900;
  line-height: 0.96;
  white-space: normal;
  overflow-wrap: anywhere;
  transform: translate3d(0, calc((0.5 - var(--stage-progress, 0.5)) * 120px), 0);
  transition: transform 120ms linear;
}

.mega-title h2,
.contact-content h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  background: linear-gradient(90deg, #fff 0%, #bfa8ff 48%, #7729f8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(38px, 5.2vw, 78px);
  font-weight: 900;
  line-height: 1.02;
}

.project-info .mega-title {
  margin-bottom: clamp(34px, 5vh, 70px);
}

.project-info .mega-title p {
  font-size: clamp(38px, 4.4vw, 72px);
}

.project-info .mega-title h2 {
  padding-top: clamp(62px, 9vh, 118px);
  font-size: clamp(34px, 4.8vw, 66px);
}

.works .mega-title {
  position: relative;
  min-height: clamp(72px, 9vh, 124px);
  margin-bottom: clamp(18px, 3vh, 42px);
}

.works .mega-title p {
  left: 0;
  right: 0;
  max-width: 100%;
  margin-bottom: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(143, 99, 255, 0.72));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(36px, 3.9vw, 68px);
  line-height: 0.96;
  white-space: normal;
  overflow-wrap: anywhere;
}
.works .mega-title h2 {
  display: none;
}

.works .section-index {
  margin-bottom: clamp(12px, 1.8vh, 22px);
}

.project-info { margin-top: 0; }
.project-info::before {
  left: 50%;
  top: -128px;
  bottom: 20px;
  z-index: -1;
  width: 100vw;
  transform: translateX(-50%);
  background:
    linear-gradient(180deg, rgba(5, 3, 30, 0), rgba(5, 3, 30, 0.7) 62%, rgba(5, 3, 30, 0.14)),
    radial-gradient(circle at 18% 42%, rgba(143, 99, 255, 0.1), transparent 28%);
}

.profile-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: stretch;
  min-height: 500px;
  margin-top: clamp(34px, 5vh, 72px);
}

.profile-orb {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}
.profile-orb::before { position: absolute; inset: 0; z-index: 1; content: ""; background: linear-gradient(180deg, transparent 44%, rgba(6, 3, 34, 0.72)); }
.profile-orb img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; object-position: center 20%; }

.info-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 16px;
  padding: 18px;
  border-color: rgba(202, 158, 255, 0.2);
  background: rgba(7, 3, 35, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(214, 196, 255, 0.035),
    0 0 22px rgba(127, 53, 255, 0.06);
  backdrop-filter: none;
}

.info-item,
.experience-card {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 0% 16%, rgba(126, 28, 255, 0.22), transparent 38%),
    radial-gradient(circle at 18% 104%, rgba(98, 15, 205, 0.28), transparent 54%),
    linear-gradient(135deg, rgba(48, 8, 112, 0.22), rgba(12, 6, 52, 0.48) 56%, rgba(7, 3, 35, 0.62) 100%) padding-box,
    linear-gradient(135deg, rgba(202, 158, 255, 0.5), rgba(127, 53, 255, 0.2) 46%, rgba(202, 158, 255, 0.06)) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -28px 62px rgba(77, 18, 170, 0.09),
    0 0 22px rgba(127, 53, 255, 0.06);
}

.info-item { padding: 18px 20px; }
.info-item span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.info-item strong { font-size: 24px; }

.experience-block {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.experience-card {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -34px 72px rgba(77, 18, 170, 0.1),
    0 0 24px rgba(127, 53, 255, 0.07);
}

.experience-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 10px;
}

.experience-title {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

.experience-title span {
  flex: 0 0 auto;
  color: rgba(238, 230, 255, 0.72);
  font-size: 13px;
}

.experience-title strong {
  min-width: 0;
  color: #fff;
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.25;
}

.experience-list {
  display: grid;
  gap: 6px;
  max-height: 154px;
  margin: 0;
  overflow: hidden;
  padding: 0 20px 20px;
  list-style: none;
  transition: max-height 260ms ease;
}

.experience-card.expanded .experience-list { max-height: 520px; }
.experience-list li { position: relative; padding-left: 16px; color: rgba(255, 255, 255, 0.68); font-size: 13px; line-height: 1.58; }
.experience-list li::before { position: absolute; top: 10px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--purple); content: ""; }

@media (min-width: 641px) {
  .experience-toggle {
    display: none;
  }

  .experience-list,
  .experience-card.expanded .experience-list {
    max-height: none;
    overflow: visible;
  }
}

.experience-toggle {
  position: relative;
  flex: 0 0 auto;
  margin: -3px 0 0;
  padding: 8px 32px 8px 14px;
  border: 1px solid var(--glow-border);
  border-radius: 999px;
  color: #fff;
  background: var(--glow-surface);
  box-shadow: var(--glow-shadow);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.experience-toggle:hover,
.experience-toggle:focus-visible {
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow: var(--glow-shadow-strong);
  transform: translateY(-1px);
}

.experience-toggle::after {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-65%) rotate(45deg);
}

.experience-card.expanded .experience-toggle::after { transform: translateY(-30%) rotate(225deg); }

.strengths-title {
  position: relative;
  max-width: none;
  min-height: clamp(112px, 15vh, 196px);
  margin: 0 0 clamp(34px, 5vh, 72px);
}

.strengths-title p {
  max-width: 100%;
  margin: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(143, 99, 255, 0.72));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(34px, 3.8vw, 66px);
  font-weight: 900;
  line-height: 0.98;
  white-space: normal;
  overflow-wrap: anywhere;
  transform: translate3d(0, calc((0.5 - var(--stage-progress, 0.5)) * 110px), 0);
  transition: transform 120ms linear;
}

.strengths-title h2 {
  margin: 0;
  color: rgba(238, 230, 255, 0.48);
  font-size: clamp(18px, 1.6vw, 26px);
  font-weight: 800;
  letter-spacing: 0;
}

.skill-grid,
.work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.strengths .skill-grid {
  gap: clamp(18px, 2vw, 30px);
  margin-bottom: 0;
}

.skill-card {
  min-height: 224px;
  padding: 24px;
  border: 1px solid transparent;
  background:
    radial-gradient(circle at 0% 16%, rgba(126, 28, 255, 0.22), transparent 38%),
    radial-gradient(circle at 18% 104%, rgba(98, 15, 205, 0.28), transparent 54%),
    linear-gradient(135deg, rgba(48, 8, 112, 0.22), rgba(12, 6, 52, 0.48) 56%, rgba(7, 3, 35, 0.62) 100%) padding-box,
    linear-gradient(135deg, rgba(202, 158, 255, 0.5), rgba(127, 53, 255, 0.2) 46%, rgba(202, 158, 255, 0.06)) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -28px 62px rgba(77, 18, 170, 0.09),
    0 0 22px rgba(127, 53, 255, 0.06);
  backdrop-filter: none;
}

.skill-card span {
  display: inline-flex;
  margin-bottom: 54px;
  color: rgba(238, 230, 255, 0.88);
  font-size: 16px;
  font-weight: 900;
}

.skill-card h3,
.work-card h3 { margin: 0; font-size: 22px; }

.skill-card h3 {
  margin-bottom: 12px;
  color: #fff;
  font-size: clamp(20px, 1.6vw, 26px);
}

.skill-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.72;
}

.work-category {
  scroll-margin-top: 120px;
  padding: clamp(40px, 5.5vh, 78px) 20px;
  animation: sectionBreath 7s ease-in-out infinite;
}

.work-category + .work-category { margin-top: clamp(54px, 7vh, 104px); }

.works .work-grid {
  gap: clamp(40px, 3vw, 64px);
}

.work-category-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(44px, 6vh, 88px);
}

.work-category-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ai-work-head,
.tabbed-work-head {
  position: relative;
  z-index: 400;
  justify-content: space-between;
  gap: 20px;
}

.ai-work-tabs,
.work-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(232, 222, 255, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(226, 214, 255, 0.14), rgba(178, 142, 255, 0.07)),
    rgba(16, 10, 48, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 22px rgba(178, 142, 255, 0.08);
  backdrop-filter: blur(12px);
}

.ai-tab-button,
.work-tab-button {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid var(--glow-border);
  border-radius: 999px;
  background: var(--glow-surface-soft);
  color: rgba(246, 241, 255, 0.92);
  box-shadow: var(--glow-shadow);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ai-tab-button:hover,
.ai-tab-button.active,
.work-tab-button:hover,
.work-tab-button.active {
  border-color: var(--glow-border);
  background: var(--glow-surface);
  box-shadow: var(--glow-shadow-strong);
  color: #fff;
  transform: translateY(-1px);
}

.ai-tab-panel[hidden],
.other-tab-panel[hidden] {
  display: none;
}

#poster .ai-work-tabs {
  padding: 0;
  border: 0;
  background: transparent;
}

#poster .ai-tab-button {
  border: 1px solid var(--glow-border);
}

#poster .ai-tab-button:hover,
#poster .ai-tab-button.active {
  border-color: rgba(255, 255, 255, 0.86);
}

.orbit-badge {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff, #dacfff 30%, rgba(155, 116, 255, 0.72) 64%, rgba(92, 62, 184, 0.68));
  box-shadow: 0 0 20px rgba(196, 169, 255, 0.28);
}

.orbit-badge::before {
  position: absolute;
  inset: 5px -7px;
  border: 1px solid rgba(238, 230, 255, 0.42);
  border-radius: 50%;
  content: "";
  transform: rotateX(68deg) rotateZ(-18deg);
  animation: orbitSpin 7s linear infinite;
}

.orbit-badge::after {
  position: absolute;
  right: -5px;
  top: 13px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  content: "";
  animation: tinyMoon 7s linear infinite;
}

.work-category-head h3 {
  margin: 0;
  background: linear-gradient(90deg, #fff 0%, #c9b6ff 46%, #7729f8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(30px, 3.7vw, 56px);
  line-height: 1.05;
}

.work-card {
  display: block;
  position: relative;
  min-height: 352px;
  overflow: hidden;
  padding: 20px;
  color: inherit;
  text-decoration: none;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.work-card:hover { transform: translateY(-6px); border-color: rgba(255, 255, 255, 0.5); box-shadow: 0 30px 80px rgba(143, 99, 255, 0.14); }
.work-card[data-category="amazon"] { min-height: 370px; padding: 0; }
.work-card[data-category="amazon"] .work-visual {
  position: absolute;
  inset: 0;
  height: auto;
  border: 0;
  border-radius: inherit;
}

#amazon {
  padding-top: clamp(24px, 4vh, 56px);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  animation: none;
}

#amazon .work-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 1.8vw, 30px);
  height: auto;
  margin-top: 10px;
  overflow: visible;
  perspective: none;
  mask-image: none;
}

#amazon .work-card[data-category="amazon"] {
  position: relative;
  left: auto;
  top: auto;
  width: auto;
  height: clamp(390px, 32vw, 520px);
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  box-shadow: none;
  opacity: 1;
  transform: none;
  transform-origin: center center;
  will-change: transform, opacity, filter;
}

#amazon .work-card[data-category="amazon"]::before {
  display: none;
}

#amazon .work-card[data-category="amazon"]:hover,
#amazon .work-card[data-category="amazon"]:focus-visible,
#amazon .work-card[data-category="amazon"].is-focused {
  border-color: transparent;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.3),
    0 0 36px rgba(190, 158, 255, 0.18);
}

#amazon .work-card[data-category="amazon"] .work-visual {
  position: absolute;
  inset: 0;
  height: auto;
  border: 0;
  border-radius: inherit;
  background: transparent;
}

#amazon .work-card[data-category="amazon"] .work-visual img {
  object-fit: contain;
  background: #fff;
}

#amazon .work-card[data-category="amazon"] .work-card-title {
  left: -1px;
  right: -1px;
  bottom: -1px;
  z-index: 3;
  width: calc(100% + 2px);
  margin: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  transition: opacity 220ms ease, transform 220ms ease, visibility 0ms linear 220ms;
}

#amazon .work-card[data-category="amazon"]:hover .work-card-title,
#amazon .work-card[data-category="amazon"]:focus-visible .work-card-title,
#amazon .work-card[data-category="amazon"].is-focused .work-card-title {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0ms;
}

#retouch,
#poster {
  animation: none;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#poster {
  display: flex;
  min-height: clamp(560px, 74svh, 760px);
  flex-direction: column;
  justify-content: center;
}

#retouch {
  display: flex;
  min-height: clamp(560px, 74svh, 760px);
  flex-direction: column;
  justify-content: center;
}

#retouch .work-category-head {
  margin-bottom: clamp(34px, 5.5vh, 78px);
}

#poster + #ai-video {
  margin-top: 24px;
}

#retouch .work-card,
#poster .work-card,
#other .work-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 352px;
  padding: 0;
  border: 1px solid transparent;
  background:
    linear-gradient(135deg, rgba(143, 99, 255, 0.08), rgba(255, 255, 255, 0.022) 48%, rgba(255, 255, 255, 0.006)) padding-box,
    linear-gradient(135deg, rgba(214, 196, 255, 0.5), rgba(143, 99, 255, 0.2) 42%, rgba(143, 99, 255, 0.02) 100%) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 28px rgba(143, 99, 255, 0.07);
}

#retouch .work-card::after,
#poster .work-card::after,
#other .work-card::after {
  position: absolute;
  inset: 36% 0 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(7, 3, 28, 0), rgba(28, 11, 62, 0.72) 62%, rgba(5, 3, 30, 0.92));
  content: "";
}

#retouch .work-card:hover,
#poster .work-card:hover,
#other .work-card:hover {
  border-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 24px 70px rgba(143, 99, 255, 0.14);
}

#retouch .work-visual,
#poster .work-visual,
#other .work-visual {
  position: absolute;
  inset: 0;
  height: auto;
  border: 0;
  border-radius: inherit;
  background: transparent;
}

#retouch .work-card span,
#poster .work-card span,
#other .work-card span {
  position: relative;
  z-index: 2;
  margin: 0 24px 8px;
}

#retouch .work-card h3,
#poster .work-card h3,
#other .work-card h3 {
  position: relative;
  z-index: 2;
  margin: 0 24px 24px;
}

.model-carousel {
  --model-card-height: clamp(300px, 29vw, 430px);
  --carousel-peek-width: clamp(112px, 13vw, 190px);
  position: relative;
  display: flex;
  width: 100%;
  height: clamp(380px, 37vw, 520px);
  overflow-x: auto;
  overflow-y: visible;
  padding: 54px calc(50% - var(--carousel-peek-width)) 68px;
  cursor: grab;
  scroll-behavior: auto;
  scroll-snap-type: none;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  touch-action: pan-x pan-y;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

.model-carousel::-webkit-scrollbar {
  display: none;
}

.model-carousel.is-dragging {
  cursor: grabbing;
}

.ai-showcase-strip {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  overflow: visible;
  transform-style: preserve-3d;
}

.model-carousel-card {
  position: relative;
  display: block;
  flex: 0 0 auto;
  min-height: 0;
  margin: 0 clamp(5px, 1vw, 16px);
  opacity: 0;
  transform: scale(0.82);
  transform-origin: center center;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  backface-visibility: hidden;
  touch-action: pan-x pan-y;
  transform-style: preserve-3d;
  transition:
    opacity 120ms linear,
    box-shadow 220ms ease,
    border-color 220ms ease;
  will-change: transform, opacity;
}

#poster .model-carousel-card {
  border: 0;
  background: transparent;
  box-shadow: none;
  min-height: 0;
  overflow: hidden;
}

#poster .model-carousel-card,
#poster .model-carousel-card * {
  touch-action: pan-x pan-y;
}

#poster.model-carousel-in-view .model-carousel-card {
  opacity: 1;
  transform: scale(1);
}

#poster .model-carousel-card::after {
  display: none;
}

#poster .model-carousel-card.is-center {
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.28),
    0 0 34px rgba(190, 158, 255, 0.14);
}

#retouch .retouch-showcase-track {
  height: clamp(390px, 38vw, 540px);
  padding-top: 48px;
  padding-bottom: 72px;
  --carousel-peek-width: clamp(118px, 13vw, 190px);
}

#retouch .retouch-card {
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  box-shadow: none;
}

#retouch .retouch-card::after {
  display: none;
}

#retouch .retouch-card.is-center {
  box-shadow: none;
}

.retouch-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 4px;
  overflow: hidden;
  border-radius: inherit;
  background: transparent;
}

.retouch-card-stacked .retouch-pair {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.retouch-pair figure {
  position: relative;
  aspect-ratio: var(--retouch-single-ratio);
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  background: #fff;
}

.retouch-pair figure.retouch-before,
.retouch-story-gallery figure.retouch-before {
  background: var(--retouch-before-bg, #f3f6ff);
}

.retouch-pair figure.retouch-after,
.retouch-story-gallery figure.retouch-after {
  background: #fff;
}

.retouch-pair span,
.retouch-story-gallery span {
  position: absolute;
  top: 14px;
  left: 14px;
  right: auto;
  bottom: auto;
  z-index: 2;
  display: inline-block;
  width: auto;
  max-width: max-content;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  background-image: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: rgba(8, 4, 51, 0.82);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: left;
  text-shadow: none;
  text-transform: uppercase;
  backdrop-filter: none;
  transform: none;
}

.retouch-pair img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
  object-fit: contain;
  background: #fff;
}

.retouch-pair .retouch-before img,
.retouch-story-gallery .retouch-before img {
  background: var(--retouch-before-bg, #f3f6ff);
}

.retouch-pair .retouch-after-white,
.retouch-story-gallery .retouch-after-white {
  background: #fff;
}

.retouch-pair .retouch-after-white img,
.retouch-story-gallery .retouch-after-white img {
  background: #fff;
  filter: brightness(1.04) contrast(1.04);
}

.retouch-story-mode .ai-lightbox-panel {
  width: min(100%, 1380px);
}

.retouch-story-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-items: start;
  align-content: start;
  gap: 16px;
}

.retouch-story-gallery.retouch-story-stacked {
  grid-template-columns: 1fr;
}

.retouch-story-gallery figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
}

.retouch-story-gallery img {
  width: 100%;
  height: auto;
  border-radius: inherit;
  object-fit: contain;
  background: #fff;
  transform: none;
}

.model-carousel-card .work-visual {
  background: transparent;
  overflow: hidden;
  border-radius: inherit;
}

.model-carousel-card .work-visual img {
  border-radius: inherit;
  object-fit: cover;
}

/* AI lightbox previews must show the full original image without edge cropping. */
.model-story-mode .model-story-item img,
.ecommerce-story-mode .ecommerce-story-item img,
.visual-story-mode .visual-story-figure img {
  object-fit: contain !important;
  transform: none !important;
  background: #000;
}

.ai-showcase-track-visual {
  z-index: 1;
  height: clamp(360px, 36vw, 500px);
  --model-card-height: clamp(240px, 22vw, 340px);
  --carousel-peek-width: clamp(96px, 11vw, 160px);
}

.ai-showcase-track-visual .model-carousel-card {
  transform-origin: center center;
}

.lightbox-open {
  overflow: hidden;
}

.lightbox-open main,
.lightbox-open .site-header {
  opacity: 0;
  pointer-events: none;
}

.ai-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(3, 1, 16, 0.58);
  backdrop-filter: none;
}

.ai-lightbox[hidden] {
  display: none;
}

.ai-lightbox-panel {
  position: relative;
  display: grid;
  width: min(100%, 1240px);
  max-height: min(86vh, 920px);
  gap: 18px;
  overflow: hidden;
  padding: 22px 22px 80px;
  border: 1px solid rgba(190, 158, 255, 0.38);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(143, 99, 255, 0.08), rgba(255, 255, 255, 0.04)),
    rgba(5, 3, 30, 0.92);
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.52), 0 0 36px rgba(143, 99, 255, 0.12);
}

.ai-lightbox-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.ai-lightbox-head span {
  color: rgba(238, 230, 255, 0.58);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-lightbox-head strong {
  font-size: clamp(22px, 2.4vw, 36px);
  line-height: 1.1;
}

.retouch-story-mode .ai-lightbox-head strong {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.94), #c8b6ff 48%, #7729f8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px rgba(127, 53, 255, 0.22);
}

.ai-lightbox-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  overflow: auto;
  padding-right: 4px;
}

.ai-lightbox-gallery.single {
  display: grid;
  place-items: center;
}

.ai-lightbox-gallery figure {
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  aspect-ratio: var(--poster-ratio);
}

.ai-lightbox-gallery.single figure {
  width: min(100%, calc(72vh * var(--poster-ratio)));
  max-height: 72vh;
}

.ai-lightbox-gallery img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  transform: scale(1.018);
  transform-origin: center;
}

.ai-lightbox-gallery figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(7, 3, 28, 0), rgba(7, 3, 28, 0.82) 34%, rgba(7, 3, 28, 0.94));
  pointer-events: none;
}

.ai-lightbox-gallery figcaption span {
  color: rgba(238, 230, 255, 0.62);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-lightbox-gallery figcaption strong {
  color: #fff;
  font-size: 18px;
  line-height: 1.1;
}

.ai-lightbox-gallery.ecommerce-story-wrap {
  display: grid;
  align-items: start;
  justify-self: center;
  width: min(100%, 1180px);
  height: min(82vh, 820px);
  max-height: none;
  overflow-y: auto;
  padding: 0;
  background: transparent;
  scrollbar-width: none;
}

.ai-lightbox-gallery.ecommerce-story-wrap::-webkit-scrollbar {
  display: none;
}

.ecommerce-story-mode .ai-lightbox-panel {
  width: min(100vw - 48px, 1500px);
  max-height: none;
  min-height: min(92vh, 980px);
  gap: 0;
  overflow: visible;
  padding: 0 24px 78px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ecommerce-story-mode .ai-lightbox-head {
  display: none;
}

.ecommerce-story-mode .ecommerce-story {
  height: 100%;
}

.visual-story-mode .ai-lightbox-panel {
  width: 100vw;
  height: 90vh;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.visual-story-wrap {
  position: relative;
  display: grid;
  width: 100%;
  height: 90vh;
  max-height: none;
  justify-self: center;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.visual-story-figure {
  display: grid;
  width: 100%;
  height: 90vh;
  margin: 0;
  place-items: center;
  overflow: visible;
  border: 0;
  border-radius: inherit;
  background: transparent;
  aspect-ratio: auto;
}

.visual-story-figure img {
  width: auto;
  max-width: calc(100vw - 48px);
  height: 90vh;
  border-radius: inherit;
  object-fit: contain;
  transform: none;
}

.ecommerce-story {
  display: grid;
  gap: 0;
  width: 100%;
  max-height: 100%;
  padding: 0;
}

.ecommerce-story h3,
.model-story-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  color: rgba(238, 230, 255, 0.82);
  font-size: 15px;
  line-height: 1.3;
}

.ecommerce-story h3 {
  display: none;
}

.ecommerce-story h3 span,
.model-story-section h3 span {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 3px solid #d99719;
  border-radius: 50%;
}

.model-story-mode .ai-lightbox-panel {
  width: min(100vw - 48px, 620px);
  max-height: min(90vh, 980px);
  padding: 22px 22px 78px;
  overflow: hidden;
  border: 0;
  background: #000;
  box-shadow: 0 0 40px rgba(143, 99, 255, 0.12);
}

.ai-lightbox-gallery.model-story {
  display: block;
  justify-self: center;
  width: 100%;
  max-height: calc(90vh - 152px);
  overflow-y: auto;
  padding: 0 8px 18px 0;
  background: #000;
  scrollbar-width: none;
}

.ai-lightbox-gallery.model-story::-webkit-scrollbar {
  display: none;
}

.model-story-mode .model-story-section h3 {
  display: none;
}

.model-story-section {
  display: grid;
  gap: 12px;
}

.model-story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.model-story-item {
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: #000;
  aspect-ratio: var(--poster-ratio);
  isolation: isolate;
  clip-path: inset(0 round var(--radius));
}

.model-story-item img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
  transform: none;
  transform-origin: center;
}

.model-story-coffee .model-story-grid,
.model-story-tea .model-story-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.model-story-mode .model-story-tea .model-story-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.model-story-coffee .model-story-item-1,
.model-story-tea .model-story-item-1 {
  grid-column: 1 / -1;
}

.model-story-coffee .model-story-item:not(.model-story-item-1) {
  aspect-ratio: 0.78;
}

.model-story-shoes .model-story-grid,
.model-story-soda .model-story-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-lightbox[data-story-slug="camp-chair"] .ai-lightbox-panel {
  grid-template-rows: minmax(0, 1fr);
}

.ai-lightbox[data-story-slug="camp-chair"] .ai-lightbox-head {
  display: none;
}

.model-story-camp-chair {
  display: grid;
  place-items: center;
  height: 100%;
}

.model-story-camp-chair .model-story-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  height: auto;
  gap: 10px;
  align-content: center;
}

.model-story-camp-chair .model-story-item {
  overflow: hidden;
  border-radius: var(--radius);
}

.model-story-camp-chair .model-story-item-1 {
  grid-column: 1 / -1;
}

.model-story-camp-chair .model-story-item img {
  object-fit: contain;
  transform: none;
}

.ecommerce-story-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 18px);
  width: 100%;
  height: auto;
  max-height: 100%;
  align-content: start;
  grid-auto-rows: auto;
}

.ecommerce-story-item {
  grid-column: span 3;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  min-height: 0;
  aspect-ratio: var(--poster-ratio);
}

.ai-lightbox-gallery .ecommerce-story-item {
  aspect-ratio: var(--poster-ratio);
}

.ecommerce-story-item-wide {
  grid-column: 1 / -1 !important;
}

.ecommerce-story-item img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
  transform: none;
  transform-origin: center;
}

.ecommerce-story-home .ecommerce-story-item-1,
.ecommerce-story-home .ecommerce-story-item-6,
.ecommerce-story-appliance .ecommerce-story-item-1,
.ecommerce-story-appliance .ecommerce-story-item-5,
.ecommerce-story-digital .ecommerce-story-item-1,
.ecommerce-story-digital .ecommerce-story-item-4 {
  grid-column: 1 / -1;
}

.ecommerce-story-appliance .ecommerce-story-item-2,
.ecommerce-story-appliance .ecommerce-story-item-3,
.ecommerce-story-appliance .ecommerce-story-item-4 {
  grid-column: span 2;
}

.ecommerce-story-beauty .ecommerce-story-item-1,
.ecommerce-story-beauty .ecommerce-story-item-2,
.ecommerce-story-beauty .ecommerce-story-item-6,
.ecommerce-story-beauty .ecommerce-story-item-7 {
  grid-column: span 3;
}

.ecommerce-story-beauty .ecommerce-story-item-3,
.ecommerce-story-beauty .ecommerce-story-item-4,
.ecommerce-story-beauty .ecommerce-story-item-5 {
  grid-column: span 2;
}

.ai-lightbox-close {
  position: absolute;
  z-index: 8;
  right: 22px;
  bottom: 18px;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--glow-border);
  border-radius: 50%;
  background: var(--glow-surface);
  box-shadow: var(--glow-shadow);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.ai-lightbox-close:hover,
.ai-lightbox-close:focus-visible {
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow: var(--glow-shadow-strong);
  transform: translateY(-2px);
}

.ai-lightbox-close::before {
  width: 18px;
  height: 18px;
  background: #fff;
  clip-path: polygon(6% 47%, 93% 8%, 63% 92%, 45% 60%);
  content: "";
  transform: translate(1px, -2px) rotate(-12deg);
}

.ai-lightbox-close::after {
  position: absolute;
  inset: -12px;
  content: "";
}

.model-story-mode .ai-lightbox-panel,
.ecommerce-story-mode .ai-lightbox-panel,
.visual-story-mode .ai-lightbox-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 90vw;
  height: 90vh;
  max-height: none;
  min-height: 0;
  gap: 12px;
  overflow: hidden;
  padding: 20px;
  border: 0;
  background: #000;
  box-shadow: 0 0 40px rgba(143, 99, 255, 0.12);
}

.model-story-mode .ai-lightbox-head,
.ecommerce-story-mode .ai-lightbox-head,
.visual-story-mode .ai-lightbox-head {
  min-height: 0;
}

.model-story-mode .ai-lightbox-gallery,
.ecommerce-story-mode .ai-lightbox-gallery,
.visual-story-mode .ai-lightbox-gallery {
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  padding: 0;
  background: #000;
}

.model-story-section,
.ecommerce-story {
  min-height: 0;
  height: 100%;
}

.model-story-grid,
.ecommerce-story-grid {
  height: 100%;
  gap: 10px;
}

.model-story-item,
.ecommerce-story-item,
.visual-story-figure {
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  isolation: isolate;
  clip-path: inset(0 round var(--radius));
}

.model-story-item img,
.ecommerce-story-item img,
.visual-story-figure img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
  transform: none;
}

.model-story-mode .model-story-item-wide {
  grid-column: 1 / -1;
  width: 100%;
  height: auto;
  aspect-ratio: var(--poster-ratio);
}

.model-story-mode .model-story-item-wide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
}

.visual-story-wrap {
  display: grid;
  place-items: stretch;
}

.visual-story-figure {
  width: 100%;
  height: 100%;
}

.ai-lightbox-close {
  right: 20px;
  bottom: 20px;
}

.ai-lightbox-dots {
  position: absolute;
  right: clamp(18px, 2.4vw, 42px);
  top: 50%;
  z-index: 5;
  display: none;
  transform: translateY(-50%);
}

.visual-story-mode .ai-lightbox-dots {
  display: grid;
  gap: 10px;
}

.ai-lightbox-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid var(--glow-border);
  border-radius: 50%;
  background: var(--glow-surface-soft);
  box-shadow: 0 0 12px rgba(176, 78, 255, 0.34), 0 0 22px rgba(127, 53, 255, 0.22);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.ai-lightbox-dots button.active {
  background: var(--glow-surface);
  box-shadow: var(--glow-shadow);
  transform: scale(1.35);
}

.visual-story-mode .ai-lightbox-panel {
  grid-template-rows: minmax(0, 1fr) !important;
  width: 100vw !important;
  height: 90vh !important;
  max-height: none !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.visual-story-mode .ai-lightbox-head {
  display: none !important;
}

.visual-story-mode .ai-lightbox-gallery,
.visual-story-mode .visual-story-wrap {
  display: block !important;
  width: 100% !important;
  height: 90vh !important;
  max-height: none !important;
  overflow-x: visible !important;
  overflow-y: auto !important;
  padding: 0 !important;
  background: transparent !important;
  scroll-snap-type: y mandatory !important;
  scrollbar-width: none !important;
}

.visual-story-mode .ai-lightbox-gallery::-webkit-scrollbar,
.visual-story-mode .visual-story-wrap::-webkit-scrollbar {
  display: none;
}

.visual-story-mode .visual-story-figure {
  display: grid !important;
  place-items: center !important;
  width: fit-content !important;
  max-width: calc(100vw - 48px) !important;
  height: 90vh !important;
  margin: 0 auto !important;
  overflow: hidden !important;
  border: 1px solid rgba(190, 158, 255, 0.26) !important;
  border-radius: 22px !important;
  background: #000 !important;
  box-shadow: 0 0 34px rgba(143, 99, 255, 0.14) !important;
  scroll-snap-align: start !important;
}

.visual-story-mode .ai-lightbox-gallery figure,
.visual-story-mode .visual-story-figure,
.visual-story-mode .visual-story-figure img {
  border-radius: 22px !important;
}

.visual-story-mode .visual-story-figure img {
  width: auto !important;
  max-width: calc(100vw - 48px) !important;
  height: 90vh !important;
  object-fit: contain !important;
  clip-path: inset(0 round 22px);
  transform: none !important;
  transform-origin: center !important;
}

.retouch-story-mode .ai-lightbox-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(92vw, 1500px);
  height: min(90dvh, 920px);
  max-height: none;
  min-height: 0;
  overflow: hidden;
  padding: 20px 20px 22px;
}

.retouch-story-mode .ai-lightbox-gallery {
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  padding: 0 4px 28px 0;
  scrollbar-width: none;
}

.retouch-story-mode .ai-lightbox-gallery::-webkit-scrollbar {
  display: none;
}

.retouch-story-gallery figure {
  height: auto !important;
  min-height: 0;
  aspect-ratio: auto !important;
}

.retouch-story-gallery img {
  display: block;
  width: 100%;
  height: auto !important;
  object-fit: contain !important;
  transform: none !important;
}

.model-story-mode .model-story-item {
  overflow: hidden !important;
  border-radius: var(--radius) !important;
  background: #000 !important;
  isolation: isolate;
  clip-path: inset(0 round var(--radius));
}

.model-story-mode .model-story-item img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  margin: 0;
  border-radius: 0 !important;
  object-fit: cover !important;
  transform: scale(1.035) !important;
  transform-origin: center;
}

.ecommerce-story-mode .ecommerce-story-item {
  overflow: hidden !important;
  border-radius: var(--radius) !important;
  background: #000 !important;
  isolation: isolate;
  clip-path: inset(0 round var(--radius));
}

.ecommerce-story-mode .ecommerce-story-item img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  margin: 0;
  border-radius: 0 !important;
  object-fit: cover !important;
  transform: scale(1.035) !important;
  transform-origin: center;
}

#ai-video {
  animation: none;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#other {
  min-height: clamp(760px, 92svh, 980px);
  animation: none;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#other .work-tabs {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#other .other-tab-panel {
  margin-top: clamp(54px, 7vh, 92px);
}

#other .other-tab-panel .work-grid {
  --carousel-peek-width: clamp(112px, 13vw, 190px);
  position: relative;
  display: flex;
  height: clamp(470px, 50vw, 650px);
  grid-template-columns: none;
  gap: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding: 54px calc(50% - var(--carousel-peek-width)) 68px;
  cursor: grab;
  perspective: 1300px;
  scroll-behavior: auto;
  scroll-snap-type: none;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  touch-action: pan-x pan-y;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

#other .other-tab-panel .work-grid::-webkit-scrollbar {
  display: none;
}

#other .other-tab-panel .work-grid.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

#other .other-tab-panel .work-card {
  flex: 0 0 clamp(260px, 23vw, 390px);
  height: clamp(340px, 34vw, 500px);
  min-height: 0;
  margin: 0 clamp(5px, 1vw, 16px);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  transform-origin: center center;
  transition: opacity 120ms linear, filter 120ms linear, box-shadow 180ms ease;
  will-change: transform, opacity, filter;
  touch-action: pan-x pan-y;
}

#other .other-tab-panel .work-card,
#other .other-tab-panel .work-card * {
  touch-action: pan-x pan-y;
}

#other .other-tab-panel .work-card.is-center {
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.28),
    0 0 34px rgba(190, 158, 255, 0.14);
}

#other .other-tab-panel .work-card:hover {
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.3),
    0 0 36px rgba(190, 158, 255, 0.18);
}

#other-tab-site .work-card,
#other-tab-site .work-visual,
#other-tab-site .work-visual img {
  overflow: hidden;
  border-radius: var(--radius);
}

#other-tab-site .work-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.video-showcase {
  position: relative;
  display: flex;
  min-height: clamp(620px, 92svh, 960px);
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  margin-inline: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.video-showcase::before {
  display: none;
}

.video-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  overflow-y: visible;
  margin-inline: calc(-1 * clamp(10px, 2vw, 28px));
  padding: clamp(30px, 5vh, 58px) calc(50% - min(28vw, 420px)) clamp(66px, 8vh, 96px);
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  touch-action: pan-x pan-y;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

.video-carousel.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.video-carousel::-webkit-scrollbar {
  display: none;
}

.video-card {
  position: relative;
  flex: 0 0 min(68vw, 960px);
  height: auto;
  max-height: clamp(360px, 70vh, 720px);
  aspect-ratio: 16 / 9;
  margin: 0 clamp(12px, 1.6vw, 32px);
  overflow: hidden;
  border-radius: var(--radius);
  background: #050318;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.32), 0 0 40px rgba(143, 99, 255, 0.12);
  cursor: pointer;
  opacity: 0.46;
  transform: scale(0.82);
  transform-origin: center;
  scroll-snap-align: center;
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.video-card.is-portrait {
  flex-basis: auto;
  width: clamp(240px, 38vh, 405px);
  max-width: 78vw;
  aspect-ratio: 9 / 16;
}

.video-card.is-square {
  flex-basis: auto;
  width: clamp(300px, 54vh, 560px);
  max-width: 82vw;
  aspect-ratio: 1 / 1;
}

.video-card.is-landscape {
  flex-basis: min(68vw, 960px);
  aspect-ratio: 16 / 9;
}

.video-card.active {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.42), 0 0 54px rgba(143, 99, 255, 0.18);
}

.video-card video {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
  pointer-events: none;
  box-shadow: inherit;
}

.video-card:not(.active) video {
  filter: brightness(0.64);
}

.video-card-play {
  position: absolute;
  top: clamp(12px, 1.5vw, 20px);
  right: clamp(12px, 1.5vw, 20px);
  left: auto;
  z-index: 3;
  display: grid;
  width: clamp(42px, 4vw, 54px);
  height: clamp(42px, 4vw, 54px);
  place-items: center;
  padding: 0;
  border: 1px solid rgba(238, 230, 255, 0.64);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.22) 28%, rgba(132, 82, 255, 0.62) 62%, rgba(82, 30, 181, 0.82));
  box-shadow:
    0 0 34px rgba(139, 82, 255, 0.52),
    inset 0 0 20px rgba(255, 255, 255, 0.22);
  cursor: pointer;
  opacity: 0.94;
  transform: none;
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.video-card-play:hover,
.video-card-play:focus-visible {
  opacity: 1;
  transform: scale(1.06);
  box-shadow:
    0 0 44px rgba(153, 95, 255, 0.68),
    inset 0 0 22px rgba(255, 255, 255, 0.26);
}

.video-card-play span {
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid #fff;
}

.video-card.playing .video-card-play {
  opacity: 0.96;
  pointer-events: auto;
}

.video-card.playing:hover .video-card-play,
.video-card.playing:focus-within .video-card-play {
  opacity: 1;
}

.video-card.playing .video-card-play span {
  width: 17px;
  height: 20px;
  margin-left: 0;
  border-top: 0;
  border-bottom: 0;
  border-left: 5px solid #fff;
  border-right: 5px solid #fff;
}

.video-card-meta {
  display: none;
}

.video-card-meta span {
  color: rgba(238, 230, 255, 0.62);
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 900;
  text-transform: uppercase;
}

.video-card-meta strong {
  color: #fff;
  font-size: clamp(24px, 3.4vw, 52px);
  line-height: 1.02;
}

.video-card-controls {
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 18px);
  padding: 10px clamp(12px, 1.5vw, 18px);
  border: 1px solid rgba(202, 158, 255, 0.34);
  border-radius: 999px;
  background: rgba(14, 7, 45, 0.64);
  box-shadow:
    0 0 24px rgba(119, 61, 255, 0.22),
    inset 0 0 18px rgba(255, 255, 255, 0.06);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.video-card.playing .video-card-controls {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.video-control-toggle {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(238, 230, 255, 0.5);
  border-radius: 50%;
  background: var(--glow-surface);
  box-shadow: 0 0 18px rgba(139, 82, 255, 0.38);
  cursor: pointer;
}

.video-control-toggle span {
  width: 12px;
  height: 15px;
  border-left: 4px solid #fff;
  border-right: 4px solid #fff;
}

.video-progress {
  position: relative;
  height: 8px;
  flex: 1;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(238, 230, 255, 0.16);
}

.video-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--video-progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #8c5cff, #e2cbff);
  box-shadow: 0 0 18px rgba(160, 101, 255, 0.62);
}

.video-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.video-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 1px solid rgba(202, 158, 255, 0.52);
  border-radius: 50%;
  background: var(--glow-surface-soft);
  box-shadow:
    inset 0 0 8px rgba(205, 141, 255, 0.2),
    0 0 10px rgba(127, 53, 255, 0.24);
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.video-dots button.active {
  width: 22px;
  border-radius: 999px;
  border-color: var(--glow-border);
  background: var(--glow-surface);
  box-shadow: var(--glow-shadow);
}

.video-lightbox-open {
  overflow: hidden;
}

.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 36px);
  background: rgba(3, 1, 16, 0.84);
}

.video-lightbox[hidden] {
  display: none;
}

.video-lightbox-panel {
  position: relative;
  display: grid;
  width: min(100%, 1680px);
  height: min(92vh, 960px);
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.62), 0 0 44px rgba(143, 99, 255, 0.18);
}

.video-lightbox-panel video {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  background: #000;
}

.video-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--glow-border);
  border-radius: 50%;
  background: var(--glow-surface);
  box-shadow: var(--glow-shadow);
  cursor: pointer;
}

.video-lightbox-close::before,
.video-lightbox-close::after {
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
  content: "";
}

.video-lightbox-close::before {
  transform: rotate(45deg);
}

.video-lightbox-close::after {
  transform: rotate(-45deg);
}

.work-card span { display: block; margin: 18px 4px 8px; text-transform: uppercase; }

.work-visual {
  position: relative;
  height: 230px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}

.work-visual img,
.work-visual video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.work-visual img {
  transform: scale(1.018);
  transform-origin: center;
}

.work-card-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: none;
  min-height: 58px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 0 0 var(--radius) var(--radius);
  background:
    linear-gradient(180deg, rgba(226, 214, 255, 0) 0%, rgba(202, 182, 255, 0.34) 42%, rgba(178, 154, 246, 0.72) 100%) padding-box,
    linear-gradient(180deg, rgba(226, 214, 255, 0), rgba(226, 214, 255, 0.5)) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 -10px 26px rgba(178, 154, 246, 0.16);
  backdrop-filter: blur(12px);
}

.work-card-title h3,
.work-card-title p {
  color: rgba(246, 241, 255, 0.96);
  text-shadow: 0 0 12px rgba(143, 99, 255, 0.14);
  white-space: nowrap;
}

.work-card-title h3 { font-size: 17px; }
.work-card-title p {
  margin: 0;
  padding-left: 10px;
  border-left: 1px solid rgba(226, 214, 255, 0.28);
  font-size: 11px;
}

.visual-b { background: radial-gradient(circle at 70% 24%, rgba(255, 255, 255, 0.34), transparent 22%), linear-gradient(135deg, #131028, #795d3d); }
.visual-f { background: radial-gradient(circle at 70% 24%, rgba(255, 255, 255, 0.36), transparent 24%), linear-gradient(135deg, #19122e, #795632); }
.visual-g { background: radial-gradient(circle at 70% 24%, rgba(143, 99, 255, 0.22), transparent 24%), linear-gradient(135deg, #090529, #294b86); }

.contact { padding-bottom: 42px; }
.contact-content { padding: clamp(32px, 6vw, 72px); }
.contact-content h2 { font-size: clamp(34px, 4.2vw, 58px); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.contact-links a {
  min-height: 50px;
  padding: 14px 20px;
  border: 1px solid var(--glow-border);
  border-radius: 999px;
  background: var(--glow-surface);
  box-shadow: var(--glow-shadow);
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow: var(--glow-shadow-strong);
  transform: translateY(-2px);
}

.detail-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 14%, rgba(143, 99, 255, 0.1), transparent 30%),
    linear-gradient(180deg, #08042d, #030212 72%);
}

.detail-back,
.detail-bottom-back {
  display: inline-grid;
  min-height: 54px;
  place-items: center;
  border: 1px solid var(--glow-border);
  border-radius: 999px;
  background: var(--glow-surface);
  color: #fff;
  box-shadow: var(--glow-shadow);
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.detail-back:hover,
.detail-back:focus-visible {
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: var(--glow-shadow-strong);
  transform: translateX(-50%) translateY(-2px);
}

.detail-bottom-back:hover,
.detail-bottom-back:focus-visible {
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: var(--glow-shadow-strong);
  transform: translateY(-2px);
}

.detail-back {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 20;
  width: min(100% - 48px, 1220px);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.detail-shell {
  width: min(100% - 48px, 1220px);
  margin: 0 auto;
  padding: 130px 0 64px;
}

.detail-hero {
  margin-bottom: 34px;
}

.detail-hero p {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.34);
  font-size: clamp(46px, 10vw, 128px);
  font-weight: 900;
  line-height: 0.9;
}

.detail-hero h1 {
  margin: -18px 0 16px;
  color: #f5f0ff;
  font-size: clamp(42px, 7vw, 86px);
}

.detail-hero span {
  color: var(--muted);
  font-weight: 800;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.detail-card {
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}

.detail-card img {
  width: 100%;
  height: auto;
  border-radius: inherit;
  background: transparent;
  transform: scale(1.018);
  transform-origin: center;
}

.detail-card figcaption {
  padding: 12px 14px;
  color: rgba(238, 230, 255, 0.72);
  font-size: 13px;
}

.detail-bottom-back {
  width: 100%;
  margin-top: 24px;
}

.reveal {
  opacity: 0;
  transform: translateY(72px) scale(0.985);
  filter: blur(7px);
  transition: opacity 980ms ease, transform 1120ms cubic-bezier(0.18, 0.86, 0.22, 1), filter 980ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.scroll-layer {
  --layer-y: calc(var(--module-layer-y, 54px) + var(--layer-offset-y, 0px));
  opacity: var(--module-layer-opacity, 0);
  filter: blur(var(--module-content-blur, 7px));
  transform: translate3d(var(--module-layer-x, -34px), var(--layer-y), 0) scale(var(--module-content-scale, 0.955));
  transition:
    opacity 260ms ease,
    filter 260ms ease,
    transform 360ms cubic-bezier(0.18, 0.86, 0.22, 1);
  transition-delay: calc(var(--layer-index, 0) * 36ms);
  will-change: opacity, transform, filter;
}

.scroll-stage.stage-visible > .scroll-layer {
  opacity: var(--module-layer-opacity, 1);
  filter: blur(var(--module-content-blur, 0px));
  transform: translate3d(var(--module-layer-x, 0), var(--layer-y), 0) scale(var(--module-content-scale, 1));
}

.scroll-stage.stage-visible > .scroll-layer:nth-child(1) { transition-delay: 0ms; }

.scroll-stage .section-index.scroll-layer {
  --layer-offset-y: 0px;
}

.scroll-stage .mega-title.scroll-layer,
.scroll-stage .strengths-title.scroll-layer,
.scroll-stage .work-category-head.scroll-layer {
  --layer-offset-y: 0px;
}

.scroll-stage .profile-grid.scroll-layer,
.scroll-stage .skill-grid.scroll-layer,
.scroll-stage .work-grid.scroll-layer,
.scroll-stage .video-showcase.scroll-layer,
.scroll-stage .ai-tab-panel.scroll-layer,
.scroll-stage .other-tab-panel.scroll-layer,
.scroll-stage .contact-links.scroll-layer {
  --layer-offset-y: 0px;
}

.scroll-stage > .section-index.scroll-layer,
.scroll-stage > .work-category-head.scroll-layer {
  gap: var(--module-title-gap, 20px);
  opacity: var(--module-label-opacity, 1);
  filter: blur(var(--module-title-blur, 0px));
  transform: translate3d(var(--module-title-x, 0), var(--module-title-y, 0), 0) scale(var(--module-title-scale, 1));
  transition: gap 260ms ease, opacity 260ms ease, filter 260ms ease, transform 360ms cubic-bezier(0.18, 0.86, 0.22, 1);
}

.scroll-stage > .section-index.scroll-layer {
  transform: translate3d(var(--module-title-x, 0), var(--module-title-y, 0), 0) scale(var(--module-title-scale, 1));
}

.scroll-stage > .work-category-head.scroll-layer {
  margin-bottom: var(--module-head-gap, clamp(44px, 6vh, 88px));
}

.scroll-stage > .mega-title.scroll-layer,
.scroll-stage > .strengths-title.scroll-layer {
  min-height: var(--module-mega-height, clamp(142px, 19vh, 260px));
  margin-bottom: var(--module-mega-gap, clamp(48px, 7vh, 96px));
}

.scroll-stage > .section-index.scroll-layer span {
  font-size: var(--module-label-size, 14px);
  opacity: var(--module-label-opacity, 1);
  transition: font-size 180ms linear, opacity 180ms linear;
}

.scroll-stage > .section-index.scroll-layer strong {
  font-size: var(--module-title-size, 14px);
  opacity: var(--module-title-opacity, 1);
  transition: font-size 180ms linear, opacity 180ms linear;
}

.scroll-stage > .work-category-head.scroll-layer h3,
.scroll-stage > .work-category-head.scroll-layer .work-category-title h3,
.scroll-stage > .strengths-title.scroll-layer h2 {
  max-width: 100%;
  opacity: var(--module-title-opacity, 1);
  filter: blur(var(--module-title-blur, 0px));
  font-size: var(--module-title-size, clamp(22px, 2.2vw, 30px));
  transform: translate3d(var(--module-title-x, 0), var(--module-title-y, 0), 0) scale(var(--module-title-scale, 1));
  transition: font-size 260ms ease, opacity 260ms ease, filter 260ms ease, transform 360ms cubic-bezier(0.18, 0.86, 0.22, 1);
}

.scroll-stage > .work-category-head.scroll-layer .work-category-title {
  gap: var(--module-title-gap, 16px);
  transform: translate3d(var(--module-title-x, 0), var(--module-title-y, 0), 0) scale(var(--module-title-scale, 1));
  transition: gap 260ms ease, transform 360ms cubic-bezier(0.18, 0.86, 0.22, 1);
}

.scroll-stage > .strengths-title.scroll-layer h2 {
  transform: translate3d(var(--module-title-x, 0), var(--module-title-y, 0), 0) scale(var(--module-title-scale, 1));
}

.scroll-stage.stage-visible .reveal:not(.scroll-layer) {
  opacity: 1;
  filter: blur(0);
}

@keyframes orbitSpin {
  from { transform: rotateX(68deg) rotateZ(-18deg); }
  to { transform: rotateX(68deg) rotateZ(342deg); }
}

@keyframes tinyMoon {
  from { transform: rotate(0deg) translateX(18px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(18px) rotate(-360deg); }
}

@keyframes showcaseFlow {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes sectionBreath {
  0%, 100% { transform: translate3d(0, 0, 0); border-color: rgba(232, 222, 255, 0.18); }
  50% { transform: translate3d(0, -3px, 0); border-color: rgba(232, 222, 255, 0.36); }
}

@media (max-width: 1120px) {
  .menu-toggle {
    display: inline-grid;
    gap: 5px;
    width: 42px;
    height: 42px;
    place-content: center;
    border: 1px solid var(--glow-border);
    border-radius: 50%;
    background: var(--glow-surface);
    box-shadow: var(--glow-shadow);
  }

  .menu-toggle span { width: 18px; height: 2px; background: #fff; }

  .menu-toggle:hover,
  .menu-toggle:focus-visible {
    border-color: rgba(255, 255, 255, 0.82);
    box-shadow: var(--glow-shadow-strong);
  }

  .nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: none;
    width: min(300px, 52vw);
    padding: 8px;
    border: 1px solid rgba(232, 222, 255, 0.32);
    border-radius: 8px;
    background:
      radial-gradient(circle at 18% 8%, rgba(55, 221, 255, 0.07), transparent 36%),
      radial-gradient(circle at 84% 12%, rgba(184, 158, 255, 0.1), transparent 40%),
      linear-gradient(180deg, rgba(18, 16, 52, 0.86), rgba(8, 6, 32, 0.78)),
      rgba(7, 5, 28, 0.82);
    backdrop-filter: blur(18px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      inset 0 -18px 36px rgba(55, 221, 255, 0.025),
      0 22px 56px rgba(5, 3, 30, 0.34),
      0 0 24px rgba(151, 120, 255, 0.08);
  }

  .nav.open { display: grid; gap: 4px; }
  .nav a { padding: 11px 12px; font-size: 13px; }

  .profile-grid { grid-template-columns: 1fr; min-height: auto; }
  .skill-grid, .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #amazon .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-gallery { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header { width: min(100% - 24px, var(--max)); }
  .brand span:last-child { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .section { width: min(100% - 24px, var(--max)); min-height: auto; padding: 104px 0; }
  .carousel-plane-nav {
    width: 34px;
    height: 34px;
  }
  .carousel-plane-nav span {
    width: 16px;
    height: 16px;
  }
  .carousel-plane-prev { left: -6px; }
  .carousel-plane-next { right: -6px; }
  .case-hero { min-height: 100svh; align-items: flex-start; padding: 36svh 24px 70px; }
  .case-hero-inner { width: min(74vw, 340px); pointer-events: auto; }
  .case-hero .case-kicker,
  .case-hero h1 span,
  .case-hero .hero-subtitle,
  .case-hero .button.primary {
    opacity: 1;
    filter: none;
    transform: none;
  }
  .case-kicker { margin-bottom: 22px; font-size: 14px; line-height: 1.35; }
  h1 { margin-bottom: 28px; font-size: clamp(38px, 10.8vw, 54px); white-space: normal; }
  h1 span { display: block; }
  .hero-subtitle { max-width: 280px; margin-bottom: 30px; font-size: 18px; line-height: 1.45; }
  .button.primary {
    border-color: var(--glow-border);
    background: var(--glow-surface);
    box-shadow: var(--glow-shadow);
    backdrop-filter: blur(8px);
  }
  .hero-metrics { display: none; }
  .section-index {
    grid-template-columns: auto 60px 1fr;
    gap: 12px;
    margin-bottom: 58px;
  }
  .strengths .section-index {
    margin-bottom: 24px;
  }
  .mega-title,
  .strengths-title {
    min-height: clamp(138px, 28vh, 220px);
    margin-bottom: 54px;
  }
  .strengths-title {
    --module-mega-height: clamp(116px, 20vh, 154px);
    --module-mega-gap: 34px;
    min-height: var(--module-mega-height);
    margin-bottom: var(--module-mega-gap);
  }
  .mega-title p,
  .strengths-title p,
  .works .mega-title p {
    left: 0;
    max-width: 100%;
    font-size: clamp(34px, 10.5vw, 56px);
    line-height: 0.86;
    white-space: normal;
  }
  .strengths-title p {
    line-height: 0.9;
    transform: translate3d(0, calc((0.5 - var(--stage-progress, 0.5)) * 46px), 0);
  }
  .mega-title h2,
  .contact-content h2 {
    font-size: clamp(36px, 11vw, 58px);
  }
  .ai-work-head,
  .tabbed-work-head { align-items: flex-start; flex-direction: column; }
  .ai-work-tabs,
  .work-tabs { width: 100%; }
  .ai-tab-button,
  .work-tab-button { flex: 1 1 0; }
  #poster {
    min-height: auto;
    padding-top: 34px;
    padding-bottom: 28px;
    justify-content: flex-start;
  }
  #poster .work-category-head {
    margin-bottom: 18px;
  }
  #poster .work-category-title h3 {
    font-size: 28px;
  }
  #poster .ai-work-tabs {
    gap: 6px;
  }
  #poster .ai-tab-button {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }
  .project-info .mega-title p { font-size: clamp(36px, 11vw, 58px); }
  .project-info .mega-title h2 {
    padding-top: 90px;
    white-space: normal;
    font-size: clamp(34px, 10vw, 48px);
  }
  .profile-orb { min-height: 360px; }
  .profile-grid { margin-top: 0; }
  .info-panel, .experience-block, .skill-grid, .work-grid { grid-template-columns: 1fr; }
  .strengths .skill-grid {
    gap: 24px;
  }
  .info-panel { gap: 14px; padding: 14px; }
  .experience-block { gap: 14px; }
  .experience-card-head { gap: 10px; padding: 18px 18px 12px; }
  .experience-title { flex-wrap: wrap; align-items: flex-start; }
  .experience-list {
    max-height: 142px;
    padding: 0 18px 22px;
  }
  .experience-card.expanded .experience-list { max-height: 640px; }
  .work-category {
    padding: 40px 0;
  }
  .work-category + .work-category { margin-top: 52px; }
  .work-category-head {
    margin-bottom: 28px;
  }
  .works {
    padding-top: 72px;
  }
  .works .section-index {
    margin-bottom: 12px;
  }
  .works .mega-title {
    min-height: 74px;
    margin-bottom: 18px;
  }
  #amazon {
    padding-top: 24px;
  }
  #poster + #ai-video { margin-top: 16px; }
  #ai-video > .work-category-head.scroll-layer {
    margin-bottom: 16px;
  }
  #ai-video .video-showcase {
    margin-top: -22px;
  }
  .works .work-grid { gap: 24px; }
  #retouch {
    min-height: 68svh;
    padding-top: 34px;
    padding-bottom: 28px;
    justify-content: flex-start;
  }
  #retouch .work-category-head {
    margin-bottom: 20px;
  }
  #retouch .retouch-showcase-track {
    --carousel-peek-width: min(30vw, 124px);
    height: 390px;
    padding: 20px calc(50% - var(--carousel-peek-width)) 50px;
  }
  #retouch .retouch-card {
    padding: 0;
  }
  .retouch-pair {
    gap: 4px;
  }
  .retouch-pair span,
  .retouch-story-gallery span {
    top: 10px;
    left: 10px;
    padding: 0;
    font-size: 10px;
  }
  #other {
    min-height: auto;
  }
  #other .other-tab-panel {
    margin-top: 28px;
  }
  #other .other-tab-panel .work-grid {
    --carousel-peek-width: min(30vw, 130px);
    height: 360px;
    padding: 18px calc(50% - var(--carousel-peek-width)) 38px;
  }
  #other .other-tab-panel .work-card {
    flex-basis: min(58vw, 264px);
    height: 304px;
    margin: 0 4px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }
  #amazon .work-grid {
    --carousel-peek-width: min(30vw, 130px);
    display: flex;
    height: 436px;
    gap: 0;
    margin-right: 0;
    overflow-x: auto;
    overflow-y: visible;
    padding: 18px calc(50% - var(--carousel-peek-width)) 38px;
    mask-image: none;
    perspective: 1200px;
    scroll-snap-type: none;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    touch-action: pan-x pan-y;
  }
  #amazon .work-grid::-webkit-scrollbar { display: none; }
  #amazon .work-card[data-category="amazon"] {
    position: relative;
    left: auto;
    top: auto;
    flex: 0 0 min(58vw, 264px);
    width: auto;
    height: 380px;
    margin: 0 4px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    scroll-snap-align: none;
    touch-action: pan-x pan-y;
  }
  #amazon .work-card[data-category="amazon"],
  #amazon .work-card[data-category="amazon"] * {
    touch-action: pan-x pan-y;
  }
  .video-showcase {
    min-height: auto;
    justify-content: flex-start;
    gap: 0;
    margin-inline: 0;
    padding: 0 0 10px;
  }
  .video-carousel {
    --mobile-video-width: min(76vw, 360px);
    --mobile-video-height: calc(var(--mobile-video-width) * 0.5625);
    align-items: center;
    margin-inline: -12px;
    padding: 4px calc(50% - min(32vw, 138px)) 26px;
    touch-action: pan-x pan-y;
  }
  .video-card {
    flex-basis: var(--mobile-video-width);
    width: var(--mobile-video-width);
    max-width: var(--mobile-video-width);
    height: var(--mobile-video-height);
    max-height: var(--mobile-video-height);
    aspect-ratio: auto;
    margin: 0 6px;
    opacity: 0.45;
    transform: scale(0.78);
  }
  .video-card.is-portrait {
    flex-basis: var(--mobile-video-width);
    width: var(--mobile-video-width);
    max-width: var(--mobile-video-width);
    height: var(--mobile-video-height);
    max-height: var(--mobile-video-height);
    aspect-ratio: auto;
  }
  .video-card.is-square {
    flex-basis: var(--mobile-video-width);
    width: var(--mobile-video-width);
    max-width: var(--mobile-video-width);
    height: var(--mobile-video-height);
    max-height: var(--mobile-video-height);
    aspect-ratio: auto;
  }
  .video-card.is-landscape {
    flex-basis: var(--mobile-video-width);
    width: var(--mobile-video-width);
    max-width: var(--mobile-video-width);
    height: var(--mobile-video-height);
    max-height: var(--mobile-video-height);
    aspect-ratio: auto;
  }
  .video-card.active {
    transform: scale(1);
  }
  .video-card-meta {
    padding: 14px;
  }
  .video-card-meta span {
    font-size: 10px;
  }
  .video-card-meta strong {
    font-size: 20px;
  }
  .video-card-play {
    top: 12px;
    right: 12px;
    left: auto;
    width: 38px;
    height: 38px;
    transform: none;
    box-shadow:
      0 0 20px rgba(139, 82, 255, 0.5),
      inset 0 0 14px rgba(255, 255, 255, 0.2);
  }
  .video-card-play:hover,
  .video-card-play:focus-visible {
    transform: scale(1.06);
  }
  .video-card-play span {
    margin-left: 3px;
    border-top-width: 6px;
    border-bottom-width: 6px;
    border-left-width: 10px;
  }
  .video-card-controls {
    top: calc(100% + 12px);
    padding: 8px 10px;
  }
  .video-control-toggle {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
  .video-lightbox {
    padding: 10px;
  }
  .video-lightbox-panel {
    width: 100%;
    height: 92svh;
  }
  .video-lightbox-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }
  .model-carousel {
    --model-card-height: min(62vh, 330px);
    --carousel-peek-width: min(30vw, 130px);
    height: 360px;
    padding: 18px calc(50% - var(--carousel-peek-width)) 38px;
  }
  .ai-showcase-track-visual {
    --carousel-peek-width: min(30vw, 130px);
    height: 360px;
  }
  .ai-lightbox { padding: 12px; }
  .ai-lightbox-panel { max-height: 90vh; padding: 18px 14px 74px; }
  .model-story-mode .ai-lightbox-panel,
  .ecommerce-story-mode .ai-lightbox-panel,
  .visual-story-mode .ai-lightbox-panel {
    width: 90vw;
    height: 90vh;
    max-height: none;
    padding: 20px;
  }
  .ai-lightbox-gallery { grid-template-columns: 1fr; }
  .retouch-story-mode .ai-lightbox-panel {
    height: 90dvh;
    max-height: none;
    padding: 16px 12px 18px;
  }
  .retouch-story-mode .ai-lightbox-gallery {
    height: 100%;
    overflow-y: auto;
    padding-bottom: 24px;
    scrollbar-width: none;
  }
  .retouch-story-mode .ai-lightbox-gallery::-webkit-scrollbar {
    display: none;
  }
  .retouch-story-gallery,
  .retouch-story-gallery.retouch-story-stacked {
    grid-template-columns: 1fr;
  }
  .model-story-mode .ai-lightbox-gallery,
  .ecommerce-story-mode .ai-lightbox-gallery,
  .visual-story-mode .ai-lightbox-gallery {
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
  }
  .model-story-grid,
  .ecommerce-story-grid {
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
    gap: 20px;
    align-content: start;
    grid-auto-rows: auto;
  }
  .model-story-section,
  .ecommerce-story {
    height: auto;
    min-height: 0;
  }
  .model-story-item,
  .ecommerce-story-item,
  .visual-story-figure {
    grid-column: 1 / -1;
    width: 100%;
    height: auto;
    margin: 0;
    scroll-snap-align: start;
    aspect-ratio: var(--poster-ratio);
  }
  .model-story-mode .model-story-item-wide {
    height: auto;
    aspect-ratio: var(--poster-ratio);
  }
  .model-story-bike .model-story-item-1,
  .model-story-bike .model-story-item-4 {
    margin-top: 0;
  }
  .model-story-camp-chair .model-story-grid {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 12px;
  }
  .model-story-camp-chair .model-story-item {
    height: auto;
    aspect-ratio: var(--poster-ratio);
  }
  .ai-lightbox-gallery.ecommerce-story-wrap {
    width: 100%;
    height: 100%;
    max-height: none;
    align-items: start;
    overflow-y: auto;
    padding: 0;
  }
  .ecommerce-story-mode .ai-lightbox-panel {
    min-height: 0;
    padding: 20px;
    border: 0;
    background: #000;
    box-shadow: 0 0 40px rgba(143, 99, 255, 0.12);
  }
  .ecommerce-story-grid { gap: 8px; }
  .visual-story-mode .ai-lightbox-gallery,
  .visual-story-mode .visual-story-wrap {
    height: 100% !important;
    padding: 0 0 72px !important;
  }
  .visual-story-mode .visual-story-figure {
    height: auto !important;
    aspect-ratio: var(--poster-ratio) !important;
  }
  .visual-story-mode .visual-story-figure img {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
  }
  .contact-links a { width: 100%; overflow-wrap: anywhere; }
  .detail-back, .detail-shell { width: min(100% - 24px, var(--max)); }
  .detail-shell { padding-top: 112px; }
  .detail-hero h1 { margin-top: -10px; }
}

.scroll-stage > .section-index.scroll-layer strong,
.scroll-stage > .work-category-head.scroll-layer h3,
.scroll-stage > .work-category-head.scroll-layer .work-category-title h3,
.scroll-stage > .strengths-title.scroll-layer h2 {
  font-size: var(--module-title-size, clamp(22px, 2.2vw, 30px)) !important;
}

/* Keep every card detail dialog the same viewport-relative size. */
.ai-lightbox-panel,
.retouch-story-mode .ai-lightbox-panel,
.model-story-mode .ai-lightbox-panel,
.ecommerce-story-mode .ai-lightbox-panel,
.visual-story-mode .ai-lightbox-panel,
.video-lightbox-panel {
  box-sizing: border-box;
  width: 90vw !important;
  min-width: 0;
  max-width: none !important;
  height: 90vh !important;
  min-height: 0 !important;
  max-height: none !important;
}

/* Unified return control for every detail lightbox. */
.ai-lightbox-close,
.video-lightbox-close {
  top: 14px !important;
  right: auto !important;
  bottom: auto !important;
  left: 14px !important;
  width: 40px;
  height: 40px;
  padding: 0;
}

.ai-lightbox-close::before,
.video-lightbox-close::before {
  width: 17px;
  height: 17px;
  border-radius: 0;
  background: #fff;
  clip-path: polygon(100% 16%, 0 50%, 100% 84%, 76% 50%);
  content: "";
  transform: none;
}

.video-lightbox-close::after {
  display: none;
}

/* Model poster details use the same full-canvas treatment as ecommerce posters. */
.model-story-mode .ai-lightbox-panel {
  grid-template-rows: minmax(0, 1fr);
}

.model-story-mode .ai-lightbox-head,
.model-story-mode .model-story-section h3 {
  display: none;
}

@media (min-width: 641px) {
  .model-story-mode .ai-lightbox-panel,
  .ecommerce-story-mode .ai-lightbox-panel,
  .retouch-story-mode .ai-lightbox-panel {
    grid-template-rows: minmax(0, 1fr) !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .model-story-mode .ai-lightbox-head,
  .ecommerce-story-mode .ai-lightbox-head,
  .retouch-story-mode .ai-lightbox-head,
  .model-story-section h3,
  .ecommerce-story h3 {
    display: none !important;
  }

  .model-story-mode .ai-lightbox-gallery,
  .ecommerce-story-mode .ai-lightbox-gallery,
  .retouch-story-mode .ai-lightbox-gallery {
    width: 100vw !important;
    height: 100vh !important;
    max-height: none !important;
    overflow: auto !important;
    padding: 5vh clamp(56px, 5vw, 92px) !important;
    background: transparent !important;
    scrollbar-width: none !important;
  }

  .model-story-mode .ai-lightbox-gallery::-webkit-scrollbar,
  .ecommerce-story-mode .ai-lightbox-gallery::-webkit-scrollbar,
  .retouch-story-mode .ai-lightbox-gallery::-webkit-scrollbar {
    display: none;
  }

  .model-story-section,
  .ecommerce-story {
    width: max-content !important;
    min-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  .model-story-grid,
  .ecommerce-story-grid,
  .retouch-story-gallery,
  .retouch-story-gallery.retouch-story-stacked {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, auto)) !important;
    justify-content: center !important;
    align-items: start !important;
    gap: clamp(10px, 1vw, 16px) !important;
    width: max-content !important;
    min-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .model-story-item,
  .ecommerce-story-item,
  .retouch-story-gallery figure {
    grid-column: auto !important;
    display: grid !important;
    width: min(calc(90vh * var(--poster-ratio, 0.75)), calc((100vw - clamp(128px, 12vw, 220px)) / 2)) !important;
    max-width: none !important;
    height: 90vh !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    place-items: center !important;
    overflow: hidden !important;
    border-radius: var(--radius) !important;
    background: #000 !important;
    clip-path: inset(0 round var(--radius)) !important;
  }

  .model-story-item img,
  .ecommerce-story-item img,
  .retouch-story-gallery img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    clip-path: none !important;
  }

  .model-story-tea .model-story-grid {
    grid-template-columns: repeat(2, minmax(0, auto)) !important;
  }

  .model-story-tea .model-story-item-1 {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    width: min(
      calc(90vh * var(--poster-ratio, 1.78)),
      calc(100vw - clamp(128px, 12vw, 220px))
    ) !important;
  }
}
