/* ==========================================================================
   03 AI (miracle/ai.php · assets/js/sx/ai.js) — "노이즈에서 이미지가 생성됨"
   ========================================================================== */
.sub--ai { --accent: var(--y); --mono: "SFMono-Regular", Consolas, monospace; }

/* ---------- Hero: 노이즈가 걷히며 생성 ---------- */
.ai-hero { position: relative; height: 100vh; height: 100svh; min-height: 680px; overflow: hidden; background: var(--k); color: var(--on-dark); isolation: isolate; }
.ai-hero__img { position: absolute; inset: 0; z-index: -2; }
.ai-hero__img img { width: 100%; height: 100%; object-fit: cover; filter: blur(var(--blur, 24px)) saturate(var(--sat, .2)) brightness(.8); transform: scale(1.06); }
.ai-hero__noise { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; image-rendering: pixelated; }
.ai-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, var(--b-3), transparent 55%), linear-gradient(transparent 50%, var(--b-4)); }
.ai-hero__top { position: absolute; left: 0; right: 0; top: calc(var(--hd-h) + 24px); display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.ai-hero__meta { display: flex; gap: 20px; font-family: var(--mono); font-size: var(--fs-2xs); color: var(--on-dark-3); }
.ai-hero__meta b { color: var(--on-dark); font-weight: 600; }
.ai-hero__mid { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-62%); }
.ai-hero__word { font-family: var(--f-display); font-size: max(var(--fs-11xl), min(var(--fs-12xl), (100vw - 960px) * 999), min(var(--fs-13xl), (100vw - 1280px) * 999)); font-weight: 800; line-height: .8; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.ai-hero__word.is-scr { color: var(--y); }
.ai-hero__foot { position: absolute; left: 0; right: 0; bottom: clamp(32px, 6vh, 64px); display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.ai-prompt { width: min(480px, 42vw); padding: 18px 20px; background: var(--b-3); border: 1px solid var(--w-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-family: var(--mono); font-size: var(--fs-xs); }
.ai-prompt__q { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; line-height: 1.7; color: var(--on-dark); }
.ai-prompt__q small { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--y); }
.ai-prompt__q i { display: inline-block; width: 7px; height: 1.1em; margin-left: -8px; vertical-align: -2px; background: var(--y); animation: sx-caret 1s steps(1) infinite; }
.ai-prompt__bar { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--w-line); color: var(--on-dark-3); }
.ai-prompt__bar span { flex: 1; height: 3px; background: var(--w-line); }
.ai-prompt__bar span i { display: block; width: 0; height: 100%; background: var(--y); }
.ai-prompt__bar em { font-style: normal; color: var(--on-dark); font-variant-numeric: tabular-nums; }

/* ---------- 소개: 해독 ---------- */
.ai-intro { padding: round(clamp(120px, 14vw, 220px), 4px) 0; }
.ai-intro .eyebrow { margin-bottom: 40px; }
.ai-intro__text { max-width: 1200px; font-family: var(--f-display); font-size: max(var(--fs-xl), min(var(--fs-2xl), (100vw - 640px) * 999), min(var(--fs-4xl), (100vw - 960px) * 999), min(var(--fs-5xl), (100vw - 1280px) * 999)); font-weight: 600; line-height: 1.42; letter-spacing: -.04em; }
.sx-motion .ai-intro__text .w { opacity: .12; transition: opacity .3s, color .6s; }
.sx-motion .ai-intro__text .w.is-on { opacity: 1; }
.sx-motion .ai-intro__text .w.is-scr { color: var(--y); font-family: var(--mono); letter-spacing: 0; }

/* ---------- 전·후: 스캔 빔 ---------- */
.ai-cmp__top { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 32px; margin-bottom: 48px; }
.ai-cmp__top .sx-head { margin-bottom: 0; }
.ai-cmp__ctrl { display: grid; justify-items: end; gap: 16px; }
.ai-cmp__prompt { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid var(--line); font-family: var(--mono); font-size: var(--fs-sm); }
.ai-cmp__prompt small { font-size: var(--fs-2xs); font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.ai-cmp__prompt span::after { content: ""; display: inline-block; width: 7px; height: 1.1em; margin-left: 4px; vertical-align: -3px; background: var(--y); animation: sx-caret 1s steps(1) infinite; }
.ai-cmp__view { position: relative; aspect-ratio: 21 / 9; overflow: hidden; background: var(--k2); user-select: none; }
.ai-cmp__view > img, .ai-cmp__after img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.ai-cmp__after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--x)); }
.ai-cmp__beam { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: var(--y); box-shadow: 0 0 24px 4px var(--y-a2); pointer-events: none; }
.ai-cmp__beam i { position: absolute; top: 0; bottom: 0; left: 1px; width: 80px; background: linear-gradient(90deg, var(--y-a2), transparent); opacity: .5; }
.ai-cmp__beam b { position: absolute; left: 12px; bottom: 16px; padding: 4px 8px; background: var(--y); color: var(--k); font-family: var(--mono); font-size: var(--fs-2xs); }
.ai-cmp__tag { position: absolute; top: 18px; padding: 8px 12px; background: var(--b-3); font-family: var(--mono); font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; pointer-events: none; }
.ai-cmp__tag.is-l { left: 18px; } .ai-cmp__tag.is-r { right: 18px; }
.ai-cmp__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ai-cmp__view:has(.ai-cmp__range:focus-visible) { outline: 2px solid var(--y); outline-offset: 4px; }

/* ---------- 종류: 잠재 공간 ---------- */
.ai-latent { background: var(--k2); }
.ai-latent__in { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: round(clamp(32px, 4vw, 80px), 4px); }
.ai-latent__list { border-top: 1px solid var(--w-line); }
.ai-latent__list button { display: grid; grid-template-columns: 44px 1fr; gap: 12px; width: 100%; padding: 20px 0; border-bottom: 1px solid var(--w-line); text-align: left; color: var(--on-dark-3); transition: color .4s; }
.ai-latent__list button b { font-size: var(--fs-xs); padding-top: 6px; }
.ai-latent__list button span { display: grid; gap: 4px; }
.ai-latent__list strong { font-size: var(--fs-xl); letter-spacing: -.03em; }
.ai-latent__list small { font-size: var(--fs-xs); }
.ai-latent__list button:hover { color: var(--on-dark-2); }
.ai-latent__list button.is-on { color: var(--on-dark); }
.ai-latent__list button.is-on b { color: var(--y); }
.ai-latent__list button { position: relative; }
.ai-latent__time { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; overflow: hidden; }
.ai-latent__time em { display: block; height: 100%; width: 0; background: var(--y); }
.ai-latent__list button.is-on .ai-latent__time em { animation: ai-time var(--dur, 5s) linear both; }
@keyframes ai-time { to { width: 100%; } }
/* 생성 창: 위에서부터 스캔선을 따라 새 이미지 */
.ai-gen-frame { border: 1px solid var(--w-line); background: var(--k); box-shadow: var(--sh-xl); font-family: var(--mono); font-size: var(--fs-2xs); color: var(--on-dark-3); }
.ai-gen-frame__bar, .ai-gen-frame__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; }
.ai-gen-frame__bar { border-bottom: 1px solid var(--w-line); }
.ai-gen-frame__bar span:first-child { display: flex; align-items: center; gap: 8px; }
.ai-gen-frame__bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--y); animation: sx-caret 1s steps(1) infinite; }
.ai-gen-frame__bar b, .ai-gen-frame__foot b { color: var(--on-dark); font-weight: 500; }
.ai-gen-frame__foot { border-top: 1px solid var(--w-line); }
.ai-gen-frame__view { position: relative; aspect-ratio: 4 / 5; max-height: 68vh; margin-inline: auto; overflow: hidden; background: var(--k2); }
.ai-gen-frame__img { --g: 100%; position: absolute; inset: 0; clip-path: inset(0 0 calc(100% - var(--g)) 0); }
.ai-gen-frame__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.06 - var(--s, 1) * .06)); }
.ai-gen-frame__img.is-in { z-index: 2; }
.ai-gen-frame__img.is-in::after { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--g) - 70px); height: 70px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background: linear-gradient(transparent, var(--y-a1)); }
.ai-gen-frame__line { position: absolute; z-index: 3; left: 0; right: 0; top: var(--ly, -10px); height: 2px; background: var(--y); box-shadow: 0 0 20px 4px var(--y-a2); opacity: var(--lo, 0); pointer-events: none; }

/* ---------- 이유: 설정 패널 ---------- */
.ai-why__in { display: grid; grid-template-columns: .8fr 1.2fr; align-items: start; gap: round(clamp(32px, 5vw, 96px), 4px); }
.ai-panel { border: 1px solid var(--line); background: var(--k2); font-size: var(--fs-sm); }
.ai-panel__bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-3); }
.ai-panel__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--y); box-shadow: 0 0 0 4px var(--y-a1); }
.ai-set { display: grid; grid-template-columns: 1fr minmax(160px, 220px); align-items: center; gap: 24px; padding: 22px 20px; border-bottom: 1px solid var(--line); }
.ai-set:last-child { border-bottom: 0; }
.ai-set p { display: grid; grid-template-columns: 32px 1fr; gap: 2px 8px; }
.ai-set p b { grid-row: 1 / 3; font-family: var(--mono); font-size: var(--fs-2xs); color: var(--accent); padding-top: 4px; }
.ai-set p strong { font-size: var(--fs-md); letter-spacing: -.02em; }
.ai-set p span { font-size: var(--fs-xs); color: var(--fg-2); }
.ai-set__slider { position: relative; display: block; height: 3px; background: var(--w-line); }
.ai-set__slider::before { content: ""; position: absolute; left: 0; top: 0; height: 100%; width: var(--v, 50%); background: var(--y); transition: width 1.6s var(--ease) calc(var(--i) * .15s + .2s); }
.ai-set__slider i { position: absolute; top: 50%; left: var(--v, 50%); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--on-dark); box-shadow: 0 0 0 4px var(--y-a1); transition: left 1.6s var(--ease) calc(var(--i) * .15s + .2s); }
.ai-set__slider em, .ai-set__switch em { position: absolute; left: 0; top: 12px; font-family: var(--mono); font-size: var(--fs-2xs); font-style: normal; color: var(--on-dark-3); }
.ai-set__switch { position: relative; justify-self: end; width: 52px; height: 28px; border-radius: 14px; background: var(--w-mid); transition: background .4s calc(var(--i) * .15s + .4s); }
.ai-set__switch i { position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--on-dark); transition: transform .5s var(--ease) calc(var(--i) * .15s + .4s); }
.ai-set__switch em { left: auto; right: 0; top: 34px; white-space: nowrap; }
.ai-panel.in .ai-set.is-cost .ai-set__slider { --v: 12%; }
.ai-panel.in .ai-set.is-speed .ai-set__slider { --v: 94%; }
.ai-panel.in .ai-set.is-custom .ai-set__slider { --v: 100%; }
.ai-set.is-rights .ai-set__switch { background: var(--y); }
.ai-set.is-rights .ai-set__switch i { transform: translateX(24px); }
.ai-panel.in .ai-set.is-rights .ai-set__switch { background: var(--w-mid); }
.ai-panel.in .ai-set.is-rights .ai-set__switch i { transform: none; }
.ai-panel.in .ai-set.is-brand .ai-set__switch { background: var(--y); }
.ai-panel.in .ai-set.is-brand .ai-set__switch i { transform: translateX(24px); background: var(--k); }

/* ---------- 활용: 시드 변형 ---------- */
.ai-uses__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: round(clamp(16px, 2vw, 32px), 4px); }
.ai-use { display: grid; gap: 6px; }
.ai-use__img { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; margin-bottom: 18px; background: var(--k2); }
.ai-use__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.ai-use__img b { position: absolute; left: 14px; top: 14px; padding: 4px 8px; background: var(--b-3); font-family: var(--mono); font-size: var(--fs-2xs); font-weight: 500; }
.ai-use__img b em { font-style: normal; color: var(--y); }
.ai-use.is-var .ai-use__img img { animation: ai-var .9s steps(6) both; }
@keyframes ai-var {
  0% { filter: hue-rotate(0) contrast(1); transform: scale(1); }
  20% { filter: hue-rotate(60deg) contrast(1.3) blur(2px); transform: scale(1.08) translateX(-2%); }
  40% { filter: hue-rotate(-40deg) saturate(1.8); transform: scale(1.04) translateY(2%); }
  60% { filter: grayscale(1) contrast(1.4); transform: scale(1.1); }
  80% { filter: hue-rotate(20deg) blur(1px); transform: scale(1.02); }
  100% { filter: none; transform: scale(1.03); }
}
.ai-use small { font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.ai-use strong { font-size: var(--fs-xl); letter-spacing: -.03em; }
.ai-use > span:last-child { font-size: var(--fs-sm); color: var(--fg-2); }

/* ---------- 과정: 단계마다 바뀌는 작업 화면 ---------- */
.ai-flow { position: relative; background: var(--k); }
.ai-flow__sticky { padding: 120px 0; }
.ai-flow__in { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: round(clamp(32px, 4vw, 80px), 4px); }
.ai-flow__side .sx-head { margin-bottom: 32px; }
.ai-flow__steps li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--w-line); color: var(--on-dark-3); transition: color .4s; }
.ai-flow__steps b { font-family: var(--mono); font-size: var(--fs-xs); font-weight: 500; padding-top: 4px; }
.ai-flow__steps span { display: grid; gap: 2px; }
.ai-flow__steps strong { font-size: var(--fs-lg); letter-spacing: -.02em; }
.ai-flow__steps small { max-height: 0; overflow: hidden; font-size: var(--fs-xs); transition: max-height .5s var(--ease); }
.ai-flow__steps li.is-on { color: var(--on-dark); }
.ai-flow__steps li.is-on b { color: var(--y); }
.ai-flow__steps li.is-on small { max-height: 3em; color: var(--on-dark-2); }
.ai-screen { border: 1px solid var(--w-line); background: var(--k2); box-shadow: var(--sh-xl); }
.ai-screen__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--w-line); font-family: var(--mono); font-size: var(--fs-2xs); color: var(--on-dark-3); }
.ai-screen__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--w-mid); }
.ai-screen__bar span { margin-left: 12px; color: var(--on-dark); }
.ai-screen__bar b { margin-left: auto; font-weight: 500; }
.ai-screen__bar em { font-style: normal; color: var(--y); }
.ai-screen__view { position: relative; aspect-ratio: 16 / 11; overflow: hidden; }
.ai-scene { position: absolute; inset: 0; padding: 6%; opacity: 0; visibility: hidden; transition: opacity .5s, visibility 0s .5s; }
.ai-scene.is-on { opacity: 1; visibility: visible; transition: opacity .5s; }
.ai-scene > * { transition: transform .8s var(--ease), opacity .6s; }
.ai-scene:not(.is-on) > * { opacity: 0; transform: translateY(24px); }
/* 1 상담: 대화 */
.ai-scene.is-chat { display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.ai-bubble { max-width: 70%; padding: 14px 18px; font-size: var(--fs-sm); line-height: 1.6; border-radius: 16px; }
.ai-bubble.is-them { align-self: flex-start; background: var(--k4); border-bottom-left-radius: 4px; }
.ai-bubble.is-us { align-self: flex-end; background: var(--y); color: var(--k); border-bottom-right-radius: 4px; }
.ai-scene.is-chat > :nth-child(2) { transition-delay: .25s; }
.ai-scene.is-chat > :nth-child(3) { transition-delay: .5s; }
.ai-scene.is-chat > :nth-child(4) { transition-delay: .75s; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ai-chips span { padding: 6px 12px; border: 1px solid var(--y-a2); font-family: var(--mono); font-size: var(--fs-2xs); color: var(--y); }
/* 2 컨셉: 무드보드 */
.ai-scene.is-mood { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr auto; gap: 18px; align-items: center; }
.ai-mood__img { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--white); padding: 6px; box-shadow: var(--sh-lg); transform: rotate(var(--r)); }
.ai-scene:not(.is-on) .ai-mood__img { transform: rotate(0) translateY(40px); }
.ai-mood__img:nth-child(2) { transition-delay: .12s; }
.ai-mood__img:nth-child(3) { transition-delay: .24s; }
.ai-mood__img img { width: 100%; height: 100%; object-fit: cover; }
.ai-mood__sw { display: flex; gap: 6px; }
.ai-mood__sw i { width: 34px; height: 34px; border: 1px solid var(--w-line); }
.ai-mood__tags { grid-column: 2 / 4; display: flex; gap: 8px; justify-content: flex-end; font-family: var(--mono); font-size: var(--fs-xs); color: var(--on-dark-2); }
/* 3 생성: 후보 4장 중 하나를 고름 */
.ai-scene.is-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-content: center; }
.ai-cand { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; outline: 1px solid var(--w-line); transition-delay: calc(var(--j) * .1s) !important; }
.ai-cand img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.55) saturate(.6); transition: filter .6s .9s; }
.ai-cand b { position: absolute; left: 8px; top: 8px; font-family: var(--mono); font-size: var(--fs-2xs); font-weight: 500; color: var(--on-dark-2); }
.ai-cand.is-pick { outline: 2px solid var(--y); }
.ai-scene.is-on .ai-cand.is-pick { transform: scale(1.06); z-index: 1; }
.ai-scene.is-on .ai-cand.is-pick img { filter: none; }
.ai-cand.is-pick::after { content: "✓ Selected"; position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; background: var(--y); color: var(--k); font-family: var(--mono); font-size: var(--fs-2xs); font-weight: 700; }
/* 4 보정: 브러시 + 레이어 */
.ai-scene.is-retouch { display: grid; grid-template-columns: 1fr 160px; gap: 18px; align-items: center; }
.ai-retouch__img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.ai-retouch__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.ai-brush { position: absolute; left: 40%; top: 35%; width: 64px; height: 64px; margin: -32px; border: 1.5px solid var(--on-dark); border-radius: 50%; box-shadow: 0 0 0 1px var(--b-3), inset 0 0 20px rgba(255, 255, 255, .35); animation: ai-brush 3.4s ease-in-out infinite; }
@keyframes ai-brush { 0%, 100% { left: 38%; top: 30%; } 25% { left: 56%; top: 34%; } 50% { left: 52%; top: 52%; } 75% { left: 42%; top: 46%; } }
.ai-layers { display: grid; gap: 4px; font-family: var(--mono); font-size: var(--fs-2xs); }
.ai-layers li { padding: 8px 10px; border: 1px solid var(--w-line); color: var(--on-dark-3); animation: ai-layer 3.4s steps(1) infinite; animation-delay: calc(var(--n, 0) * .85s); }
.ai-layers li:nth-child(2) { --n: 1; }
.ai-layers li:nth-child(3) { --n: 2; }
.ai-layers li:nth-child(4) { --n: 3; }
@keyframes ai-layer { 0% { background: var(--y); color: var(--k); border-color: var(--y); } 25% { background: none; color: var(--on-dark-3); border-color: var(--w-line); } }
/* 5 완성: 매체별 비율 */
.ai-scene.is-final { display: flex; justify-content: center; align-items: center; gap: 16px; }
.ai-crop { position: relative; flex: none; height: 78%; overflow: hidden; outline: 1px solid var(--w-mid); }
.ai-crop:nth-child(2) { transition-delay: .12s; }
.ai-crop:nth-child(3) { transition-delay: .24s; }
.ai-crop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.ai-crop b { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; background: var(--y); color: var(--k); font-family: var(--mono); font-size: var(--fs-2xs); }
.sx-motion .ai-flow { height: calc(var(--n) * 70vh + 100vh); }
.sx-motion .ai-flow__sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; padding: var(--hd-h) 0 0; overflow: hidden; }
.sx-motion .ai-flow__sticky > .wrap { width: 100%; }

/* ---------- 작업: 스캔선 ---------- */
.ai-works__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: round(clamp(48px, 6vw, 88px), 4px); }
.ai-works__top .sx-head { margin-bottom: 0; }
.ai-works__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: round(clamp(12px, 1.6vw, 24px), 4px); }
.ai-gen { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--k2); }
.ai-gen img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.ai-gen__scan { position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--y); box-shadow: 0 0 18px 4px var(--y-a2); opacity: 0; }
.ai-gen em { position: absolute; left: 12px; bottom: 12px; padding: 3px 8px; background: var(--b-3); font-family: var(--mono); font-size: var(--fs-2xs); font-style: normal; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .5s var(--ease); }
.ai-gen:hover img { transform: scale(1.05); }
.ai-gen:hover .ai-gen__scan { animation: ai-scan 1.1s var(--ease) both; }
.ai-gen:hover em { opacity: 1; transform: none; }
@keyframes ai-scan { 0% { top: -2px; opacity: 1; } 100% { top: 100%; opacity: 0; } }

@media (max-width: 1180px) {
  .ai-works__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .ai-hero__meta { display: none; }
  .ai-hero__foot { flex-direction: column; align-items: flex-start; }
  .ai-prompt { width: 100%; }
  .ai-cmp__top, .ai-latent__in, .ai-why__in, .ai-flow__in { grid-template-columns: 1fr; }
  .ai-flow__steps li:not(.is-on) { display: none; }
  .ai-screen__view { aspect-ratio: 4 / 3; }
  .ai-cmp__ctrl { justify-items: start; }
  .ai-cmp__view { aspect-ratio: 4 / 3; }
  .ai-uses__grid { grid-template-columns: 1fr 1fr; }
  .ai-works__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ai-uses__grid { grid-template-columns: 1fr 1fr; }
  .ai-scene.is-grid { grid-template-columns: 1fr 1fr; }
  .ai-scene.is-retouch { grid-template-columns: 1fr; }
  .ai-layers { display: none; }
  .ai-set { grid-template-columns: 1fr; }
  .ai-set__switch { justify-self: start; }
}
