/* 전투 컷인(src/cutin.js). 전장을 덮지 않는 '띠' 연출.
   반투명 빛 번짐·네온 대신 단단한 면·굵은 선·망점·속도선, 그리고 GPT 클로즈업 원화(assets/cutin).
   띠 = 화면 위쪽 1/3(조작 캐릭터는 화면 가운데, 버튼은 아래) · 쪽띠 = 왼쪽 중간 · 연계기만 화면 전체. */
#cutin {
  position: fixed; inset: 0; display: none; overflow: hidden; pointer-events: none; z-index: 3;
  --ink: #05060b; --gold: #ffd760;
  --band-y: 13.5vh; --band-h: clamp(72px, 23vh, 330px); --band-k: 2.35;   /* k = 원화 높이 ÷ 띠 높이 */
  --strip-y: 40vh; --strip-h: clamp(38px, 8.6vh, 104px); --strip-w: min(40vw, 580px); --strip-k: 4.4;
  --tilt: -3deg;
  --sans: 'CutinSans', 'Noto Sans KR', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  --serif: 'CutinSerif', 'Noto Serif KR', 'Batang', serif;
}
#cutin.show { display: block; }
/* 정지 연출: 멈춘 전장을 살짝 가라앉혀 띠를 띄운다(연계기는 자체 어둠이 있다) */
#cutin.paused-stage:not(.link-stage) { background: #04060c59; transition: background .12s; }

/* ---------- 공통: 띠 한 장 ---------- */
#cutin .cb { position: absolute; --c: #ff5a8a; }
#cutin .cb-in { position: absolute; inset: 0; overflow: hidden; background: var(--ink); }
#cutin .cb-bg { position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--ink) 0 20%, color-mix(in srgb, var(--c) 30%, var(--ink)) 55%, color-mix(in srgb, var(--c) 55%, var(--ink)) 100%); }
/* 망점(만화 스크린톤): 글자 쪽에서 원화 쪽으로 옅어진다 */
#cutin .cb-tone { position: absolute; inset: 0; opacity: .5;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 75%, #fff) 0 1.3px, transparent 1.7px) 0 0 / 7px 7px;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #0009 26%, transparent 52%); mask-image: linear-gradient(90deg, #000 0%, #0009 26%, transparent 52%); }
#cutin .cb-art { position: absolute; inset: 0; }
#cutin .cb-art img { position: absolute; top: 50%; right: 6vw; width: auto; max-width: none; height: calc(var(--band-h) * var(--band-k));
  translate: 0 calc(var(--fy, 46) * -1%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%); mask-image: linear-gradient(90deg, transparent 0%, #000 30%); }
/* 클로즈업이 없는 인물: 세로 원화의 얼굴 쪽 */
#cutin .cb-art img.tall { height: calc(var(--band-h) * 3.6);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%, #000 75%, transparent); mask-image: linear-gradient(90deg, transparent, #000 35%, #000 75%, transparent); }
/* 속도선: 원화가 향하는 쪽(왼쪽)으로 흐른다 */
#cutin .cb-speed { position: absolute; inset: 0; }
#cutin .cb-speed i { position: absolute; left: 100%; background: linear-gradient(90deg, transparent, #fff 25%, color-mix(in srgb, var(--c) 45%, #fff) 70%, transparent);
  opacity: .7; animation: cbStreak .34s linear infinite; }
@keyframes cbStreak { to { transform: translateX(-190vw); } }
/* 테두리: 흰 선 + 캐릭터 색 선 + 먹선. 셔터와 함께 가운데에서 벌어진다 */
#cutin .cb-edge { position: absolute; z-index: 2; left: 0; right: 0; height: 3px; background: #fff; }
#cutin .cb-edge.t { top: -1px; box-shadow: 0 -4px 0 var(--c), 0 -6px 0 var(--ink); }
#cutin .cb-edge.b { bottom: -1px; box-shadow: 0 4px 0 var(--c), 0 6px 0 var(--ink); }
#cutin .cb-flash { position: absolute; inset: 0; z-index: 3; background: #fff; opacity: 0; }
#cutin .cb.band .cb-in::after { content: ''; position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, #05060b99 0 12%, transparent 46%); }
#cutin .cb.band.boss .cb-in::after { background: linear-gradient(270deg, #05060b99 0 12%, transparent 46%); }
/* 글자: 태그(작은 영문) · 기술명(굵은 고딕) · 이름 */
#cutin .cb-text { position: absolute; z-index: 4; top: 0; bottom: 0; left: calc(6vw + max(3.4vw, 14px)); max-width: 58vw;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: .55vh; }
#cutin .cb-text em { font: 900 clamp(8px, 1.45vh, 14px)/1 var(--sans); font-style: normal; letter-spacing: .34em; color: var(--ink);
  background: var(--c); padding: .5em .8em .45em .75em; transform: skewX(-14deg); box-shadow: 3px 3px 0 var(--ink); }
#cutin .cb-text b { font: 900 clamp(20px, 6.3vh, 78px)/1.02 var(--sans); color: #fff; white-space: nowrap; letter-spacing: -.01em;
  transform: skewX(-8deg); transform-origin: 0 60%;
  text-shadow: -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 2px 2px 0 var(--ink), 0 3px 0 var(--ink),
    5px 5px 0 var(--c), 7px 7px 0 var(--ink); }
#cutin .cb-text span { font: 900 clamp(9px, 1.75vh, 19px)/1.2 var(--sans); color: #f6efdb; letter-spacing: .14em;
  text-shadow: 1px 1px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink); }

/* ---------- 섬광 띠(내 궁극기) ---------- */
#cutin .cb.band { left: -6vw; right: -6vw; top: var(--band-y); height: var(--band-h); rotate: var(--tilt); }
#cutin .cb.band .cb-in { animation: cbOpen .14s cubic-bezier(.3,.9,.25,1) both; }
#cutin .cb.band .cb-edge.t { animation: cbEdgeT .14s cubic-bezier(.3,.9,.25,1) both; }
#cutin .cb.band .cb-edge.b { animation: cbEdgeB .14s cubic-bezier(.3,.9,.25,1) both; }
#cutin .cb.band .cb-flash { animation: cbFlash .22s .02s ease-out both; }
#cutin .cb.band .cb-art { animation: cbArtIn .45s cubic-bezier(.1,.9,.2,1) both; }
#cutin .cb.band .cb-art img { animation: cbDrift 1.6s linear both; }
#cutin .cb.band .cb-text em { animation: cbTag .2s .04s cubic-bezier(.2,.9,.2,1) both; }
#cutin .cb.band .cb-text b { animation: cbSlam .28s .07s cubic-bezier(.15,.95,.25,1) both; }
#cutin .cb.band .cb-text span { animation: cbTag .22s .16s cubic-bezier(.2,.9,.2,1) both; }
@keyframes cbOpen { from { clip-path: inset(50% 0 50% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes cbEdgeT { from { translate: 0 calc(var(--band-h) / 2); } }
@keyframes cbEdgeB { from { translate: 0 calc(var(--band-h) / -2); } }
@keyframes cbFlash { from { opacity: .95; } to { opacity: 0; } }
@keyframes cbArtIn { from { transform: translateX(14%) scale(1.14); } }
@keyframes cbDrift { from { transform: translateX(1.5%); } to { transform: translateX(-2.5%); } }
@keyframes cbTag { from { opacity: 0; translate: -2.4em 0; } }
@keyframes cbSlam { 0% { opacity: 0; transform: skewX(-8deg) translateX(-.3em) scale(1.8); } 55% { opacity: 1; transform: skewX(-8deg) scale(.96); } 100% { transform: skewX(-8deg); } }
/* 퇴장: 셔터가 가운데 한 줄로 닫힌다 */
#cutin .cb.band.out .cb-in { animation: cbShut .2s cubic-bezier(.6,0,.8,.4) forwards; }
#cutin .cb.band.out .cb-edge.t { animation: cbEdgeTOut .2s cubic-bezier(.6,0,.8,.4) forwards; }
#cutin .cb.band.out .cb-edge.b { animation: cbEdgeBOut .2s cubic-bezier(.6,0,.8,.4) forwards; }
#cutin .cb.band.out :is(.cb-text, .cb-chain) { animation: cbTextOut .16s ease-in forwards; }
@keyframes cbShut { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(50% 0 50% 0); } }
@keyframes cbEdgeTOut { to { translate: 0 calc(var(--band-h) / 2); opacity: .2; } }
@keyframes cbEdgeBOut { to { translate: 0 calc(var(--band-h) / -2); opacity: .2; } }
@keyframes cbTextOut { to { opacity: 0; translate: -4vw 0; } }
/* 다음 띠에 베여 밀려난다 */
#cutin .cb.band.gone { z-index: 0; animation: cbCut .26s cubic-bezier(.5,0,.8,.5) forwards; }
#cutin .cb.band.gone :is(.cb-text, .cb-chain) { opacity: 0; }
@keyframes cbCut { to { translate: -10vw -70%; opacity: 0; clip-path: inset(0 0 55% 0); } }
/* 정지 연출: 잠깐 멈춘 전장 위에 조금 더 크게 */
#cutin .cb.band.pause { --band-h: clamp(84px, 28vh, 380px); }
/* 조작 캐릭터를 피해서(cutin.js focus): 캐릭터가 화면 위쪽이면 띠를 아래로, 왼쪽 가운데면 쪽띠를 위로 */
#cutin .cb.band.low { top: calc(100vh - var(--band-y) - var(--band-h) - 16vh); }
/* 위쪽 자리: 스테이지 판·작전 판의 오른쪽(판 위에 포개져 이름을 서로 가렸다). 화면 가장자리에서 떨어지므로 왼쪽도 비스듬히 자른다 */
#cutin .cb.strip.high:not(.under) { top: calc(12vh + var(--slot, 0) * (var(--strip-h) + 7px)); left: calc(var(--hud-left-r, 270px) + 8px);
  clip-path: polygon(calc(var(--strip-h) * .55) 0, 100% 0, calc(100% - var(--strip-h) * .55) 100%, 0 100%); }
#cutin .cb.strip.high:not(.under) .cb-text { left: calc(var(--strip-h) * .62); }
/* 위쪽 띠 아래 줄: 띠가 -3도 기울어 왼쪽 끝이 5.5vw 만큼 더 내려온다 */
#cutin .cb.strip.under { top: calc(var(--band-y) + var(--band-h) + 3.4vw + 10px + var(--slot, 0) * (var(--strip-h) + 7px)); transition: top .16s ease-out; }

/* 체인: 앞선 사람들의 눈매 칸 + CHAIN ×n. 띠 아래 오른쪽에 붙는다(HUD 의 체인 표시가 있던 쪽).
   띠 위 왼쪽에 두면 스테이지 목표 판 위에 글자가 걸쳤다. 아래 왼쪽은 동료 쪽띠 자리다 */
#cutin .cb-chain { position: absolute; z-index: 5; right: calc(6vw + max(2.4vw, 12px)); top: calc(100% + 9px);
  display: flex; align-items: flex-start; gap: 7px; animation: cbTag .24s .1s cubic-bezier(.2,.9,.2,1) both; }
#cutin .cb-chain .chip { position: relative; overflow: hidden; width: calc(var(--band-h) * .92); height: calc(var(--band-h) * .24);
  background: var(--ink); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--c), 3px 3px 0 2px var(--ink); transform: skewX(-14deg); }
#cutin .cb-chain .chip img { position: absolute; top: 50%; left: 50%; height: calc(var(--band-h) * .24 * 5.2); width: auto; max-width: none;
  translate: calc(var(--fx, 50) * -1%) calc(var(--fy, 46) * -1%); transform: skewX(14deg); filter: saturate(.9) brightness(.9); }
#cutin .cb-chain .chip img.tall { height: calc(var(--band-h) * .24 * 7); }
#cutin .cb-chain b { margin-left: 6px; font: 900 clamp(14px, 3.4vh, 38px)/1 var(--sans); color: var(--gold); transform: skewX(-8deg);
  text-shadow: -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 2px 2px 0 var(--ink), 4px 4px 0 #b3570c, 6px 6px 0 var(--ink); }
#cutin .cb-chain b small { font-size: .62em; margin: 0 .05em; }

/* ---------- 보스 경고 띠: 반대로 기울고, 원화는 왼쪽, 글자는 오른쪽, 붉은 경고 줄무늬 ---------- */
#cutin .cb.band.boss { rotate: calc(var(--tilt) * -1); --c: #ff2b2b; }
#cutin .cb.boss .cb-bg { background: linear-gradient(270deg, var(--ink) 0 20%, #2c0507 55%, #5c0a0d 100%); }
#cutin .cb.band.boss { --band-k: 2.75; }
#cutin .cb.boss .cb-tone { -webkit-mask-image: linear-gradient(270deg, #000 0%, #0009 26%, transparent 52%); mask-image: linear-gradient(270deg, #000 0%, #0009 26%, transparent 52%);
  background-image: radial-gradient(circle, #ff5a4a 0 1.3px, transparent 1.7px); }
#cutin .cb.boss .cb-art img { right: auto; left: 6vw; -webkit-mask-image: linear-gradient(270deg, transparent 0%, #000 30%); mask-image: linear-gradient(270deg, transparent 0%, #000 30%); }
#cutin .cb.boss .cb-art { animation-name: cbArtInR; }
#cutin .cb.boss .cb-art img { animation-name: cbDriftR; }
#cutin .cb.boss .cb-speed i { left: auto; right: 100%; animation-name: cbStreakR; background: linear-gradient(270deg, transparent, #fff 25%, #ff7a6a 70%, transparent); }
#cutin .cb.boss .cb-edge { height: 6px; background: repeating-linear-gradient(-45deg, #ff2b2b 0 9px, var(--ink) 9px 18px); }
#cutin .cb.boss .cb-edge.t { top: -3px; box-shadow: 0 -2px 0 var(--ink); }
#cutin .cb.boss .cb-edge.b { bottom: -3px; box-shadow: 0 2px 0 var(--ink); }
#cutin .cb.boss .cb-text { left: auto; right: calc(6vw + max(3.4vw, 14px)); align-items: flex-end; text-align: right; }
#cutin .cb.boss .cb-text em { background: #ff2b2b; color: #fff; text-shadow: 1px 1px 0 var(--ink); transform: skewX(14deg); }
#cutin .cb.boss .cb-text b { color: #ffeae4; transform: skewX(8deg); transform-origin: 100% 60%; animation-name: cbSlamR;
  text-shadow: -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 2px 2px 0 var(--ink), 0 3px 0 var(--ink), -5px 5px 0 #b3080c, -7px 7px 0 var(--ink); }
#cutin .cb.boss .cb-text em, #cutin .cb.boss .cb-text span { animation-name: cbTagR; }
#cutin .cb.band.boss.gone { animation-name: cbCutR; }
@keyframes cbArtInR { from { transform: translateX(-14%) scale(1.14); } }
@keyframes cbDriftR { from { transform: translateX(-1.5%); } to { transform: translateX(2.5%); } }
@keyframes cbStreakR { to { transform: translateX(190vw); } }
@keyframes cbTagR { from { opacity: 0; translate: 2.4em 0; } }
@keyframes cbSlamR { 0% { opacity: 0; transform: skewX(8deg) translateX(.3em) scale(1.8); } 55% { opacity: 1; transform: skewX(8deg) scale(.96); } 100% { transform: skewX(8deg); } }
@keyframes cbCutR { to { translate: 10vw -70%; opacity: 0; clip-path: inset(0 0 55% 0); } }
/* 보스 띠가 떠 있는 동안 화면 가장자리가 붉게 조인다(전장 가운데는 그대로). 회전한 띠 안에서는 화면 전체를 못 덮으므로 무대(#cutin)에 */
#cutin::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s ease-in;
  background: radial-gradient(ellipse 62% 58% at 50% 56%, transparent 58%, #ff1a1a30 80%, #6a000066 100%); }
#cutin.boss-stage::before { opacity: 1; transition-duration: .08s; }

/* ---------- 쪽띠(동료 자동 궁극기): 왼쪽 중간, 작게, 전투는 그대로 ---------- */
#cutin .cb.strip { left: 0; top: calc(var(--strip-y) + var(--slot, 0) * (var(--strip-h) + 7px)); width: var(--strip-w); height: var(--strip-h);
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--strip-h) * .55) 100%, 0 100%);
  transition: top .22s cubic-bezier(.2,.8,.2,1); animation: stIn .18s cubic-bezier(.2,.9,.2,1) both; }
#cutin .cb.strip .cb-bg { background: linear-gradient(90deg, var(--ink) 0 22%, color-mix(in srgb, var(--c) 42%, var(--ink)) 70%, color-mix(in srgb, var(--c) 60%, var(--ink))); }
#cutin .cb.strip .cb-art img { right: calc(var(--strip-h) * .3); height: calc(var(--strip-h) * var(--strip-k)); }
#cutin .cb.strip .cb-art img.tall { height: calc(var(--strip-h) * 6); }
#cutin .cb.strip .cb-edge { height: 2px; }
#cutin .cb.strip .cb-edge.t { top: 0; box-shadow: 0 2px 0 var(--c); }
#cutin .cb.strip .cb-edge.b { bottom: 0; box-shadow: 0 -2px 0 var(--c); }
#cutin .cb.strip .cb-flash { animation: cbFlash .18s ease-out both; }
#cutin .cb.strip .cb-speed { display: none; }
#cutin .cb.strip .cb-in::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #05060bf0 0 18%, #05060bb0 42%, transparent 66%); }
#cutin .cb.strip .cb-text { left: max(1.3vw, 9px); gap: .25vh; max-width: calc(var(--strip-w) * .7); }
#cutin .cb.strip .cb-text b { font-size: clamp(13px, 3.3vh, 36px); text-shadow: -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink), 1px 1px 0 var(--ink), 3px 3px 0 var(--c), 4px 4px 0 var(--ink);
  animation: cbSlam .22s .05s cubic-bezier(.15,.95,.25,1) both; }
#cutin .cb.strip .cb-text span { order: -1; font-size: clamp(8px, 1.35vh, 14px); animation: cbTag .2s .08s both; }
#cutin .cb.strip.out, #cutin .cb.strip.gone { animation: stOut .2s cubic-bezier(.6,0,.8,.4) forwards; }
@keyframes stIn { from { translate: -105% 0; } }
@keyframes stOut { to { translate: -105% 0; } }

/* ---------- 연계기: 두 띠가 X 자로 부딪힌다 → 섬광 → 두 사람 원화 + 금빛 이름 ---------- */
#cutin .cl { position: absolute; inset: 0; --c2: var(--c); }
#cutin .cl-dim { position: absolute; inset: 0; background: #04060ccc; animation: clDim .12s ease-out both; }
@keyframes clDim { from { opacity: 0; } }
#cutin .cl-x { left: -25vw; right: -25vw; top: calc(50% - var(--band-h) * .5); height: var(--band-h); z-index: 2; }
#cutin .cl-x .cb-art img { right: 25vw; }
#cutin .cl-x.a { rotate: -13deg; animation: clInA .2s cubic-bezier(.2,.9,.25,1) both; }
#cutin .cl-x.b { rotate: 13deg; --c: var(--c2); animation: clInB .2s .06s cubic-bezier(.2,.9,.25,1) both; }
/* 오른쪽에서 들어오는 두 번째 사람은 원화를 뒤집어 얼굴이 왼쪽 아래를 향하게 */
#cutin .cl-x.b .cb-bg { background: linear-gradient(270deg, var(--ink) 0 20%, color-mix(in srgb, var(--c) 30%, var(--ink)) 55%, color-mix(in srgb, var(--c) 55%, var(--ink)) 100%); }
#cutin .cl-x.b .cb-art img { right: auto; left: 25vw; scale: -1 1; }
#cutin .cl-x.b .cb-speed i { left: auto; right: 100%; animation-name: cbStreakR; }
#cutin .cl-x .cb-art { animation: cbArtIn .5s cubic-bezier(.1,.9,.2,1) both; }
#cutin .cl-x.b .cb-art { animation-name: cbArtInR; }
@keyframes clInA { from { transform: translateX(-135vw); } }
@keyframes clInB { from { transform: translateX(135vw); } }
/* 교차점의 문장: 두 사람 색의 마름모가 맞물린다 */
#cutin .cl-crest { position: absolute; z-index: 3; left: 50%; top: 50%; width: 26vh; height: 17vh; translate: -50% -50%;
  animation: clCrest .32s .12s cubic-bezier(.2,1.5,.4,1) both; }
#cutin .cl-crest i { position: absolute; top: 50%; width: 14vh; height: 14vh; margin-top: -7vh; rotate: 45deg; background: #05060bd8;
  border: max(4px, .95vh) solid var(--c); box-shadow: 0 0 0 max(2px, .4vh) var(--ink), inset 0 0 0 max(2px, .35vh) #fff; }
#cutin .cl-crest i:first-child { left: 0; }
#cutin .cl-crest i + i { right: 0; border-color: var(--c2); }
#cutin .cl-crest b { position: absolute; inset: 0; display: grid; place-items: center; font: 900 clamp(14px, 4.4vh, 48px)/1 var(--sans);
  letter-spacing: .12em; color: var(--gold); text-shadow: -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 2px 2px 0 var(--ink), 4px 4px 0 #8a4a08; }
@keyframes clCrest { from { opacity: 0; transform: scale(2.6) rotate(-35deg); } }
/* 공개: 섬광, 띠는 제 방향으로 날아가고, 배경이 두 사람 색으로 갈린다 */
#cutin .cl-flash { position: absolute; inset: 0; z-index: 9; background: #fff; opacity: 0; }
#cutin .cl.reveal .cl-flash { animation: clFlash .2s ease-out both; }
@keyframes clFlash { from { opacity: .9; } to { opacity: 0; } }
#cutin .cl.reveal .cl-x.a { animation: clOutA .24s cubic-bezier(.5,0,.9,.4) forwards; }
#cutin .cl.reveal .cl-x.b { animation: clOutB .24s cubic-bezier(.5,0,.9,.4) forwards; }
#cutin .cl.reveal .cl-crest { animation: clCrestOut .22s ease-in forwards; }
@keyframes clOutA { from { transform: none; } to { transform: translateX(150vw); } }
@keyframes clOutB { from { transform: none; } to { transform: translateX(-150vw); } }
@keyframes clCrestOut { from { opacity: 1; } to { opacity: 0; transform: scale(.3) rotate(25deg); } }
#cutin .cl-bg { position: absolute; inset: 0; opacity: 0; overflow: hidden; }
#cutin .cl.reveal .cl-bg { opacity: 1; }
#cutin .cl-half { position: absolute; inset: 0; }
#cutin .cl-half.a { background: linear-gradient(112deg, color-mix(in srgb, var(--c) 62%, var(--ink)) 0%, color-mix(in srgb, var(--c) 22%, var(--ink)) 49.7%, transparent 49.8%); }
#cutin .cl-half.b { background: linear-gradient(112deg, transparent 50.2%, color-mix(in srgb, var(--c2) 22%, var(--ink)) 50.3%, color-mix(in srgb, var(--c2) 62%, var(--ink)) 100%); }
#cutin .cl.reveal .cl-half.a { animation: clHalfA .3s cubic-bezier(.2,.9,.2,1) both; }
#cutin .cl.reveal .cl-half.b { animation: clHalfB .3s cubic-bezier(.2,.9,.2,1) both; }
@keyframes clHalfA { from { transform: translate(-30vw, -12vh); } }
@keyframes clHalfB { from { transform: translate(30vw, 12vh); } }
#cutin .cl-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(112deg, transparent 49.55%, #fff 49.7% 50.3%, transparent 50.45%); }
/* 집중선(정지 그림: 화면보다 훨씬 큰 층을 돌리면 휴대폰 메모리를 크게 먹는다) */
#cutin .cl-rays { position: absolute; inset: 0; background: repeating-conic-gradient(from 3deg at 50% 44%, #ffffff1e 0 2.2deg, transparent 2.2deg 9deg);
  -webkit-mask-image: radial-gradient(circle at 50% 44%, transparent 18%, #000 60%); mask-image: radial-gradient(circle at 50% 44%, transparent 18%, #000 60%); }
#cutin .cl.reveal .cl-rays { animation: clRays .5s cubic-bezier(.2,.9,.2,1) both; }
@keyframes clRays { from { opacity: 0; transform: scale(1.25); } }
#cutin .cl-duo { position: absolute; z-index: 4; left: 50%; top: 44%; height: min(72vh, 58vw); aspect-ratio: 1280 / 853; translate: -50% -50%; opacity: 0; }
#cutin .cl-duo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff) drop-shadow(8px 10px 0 #05060b99); }
#cutin .cl.reveal .cl-duo { opacity: 1; animation: clDuo .5s cubic-bezier(.15,.95,.25,1) both; }
#cutin .cl.reveal .cl-duo img { animation: clDuoDrift 1.6s linear both; }
@keyframes clDuo { 0% { opacity: 0; transform: scale(1.4); } 25% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes clDuoDrift { from { transform: scale(1); } to { transform: scale(1.045); } }
#cutin .cl-text { position: absolute; z-index: 5; left: 0; right: 0; bottom: 6vh; display: flex; flex-direction: column; align-items: center; gap: .8vh; opacity: 0; }
#cutin .cl.reveal .cl-text { opacity: 1; }
#cutin .cl-text em { font: 900 clamp(8px, 1.6vh, 16px)/1 var(--sans); font-style: normal; letter-spacing: .42em; color: var(--ink); padding: .5em 1.3em .45em 1.4em;
  background: linear-gradient(90deg, var(--c), var(--gold) 30% 70%, var(--c2)); transform: skewX(-14deg); box-shadow: 3px 3px 0 var(--ink); }
#cutin .cl-text b { font: 900 clamp(26px, 9.2vh, 108px)/1.05 var(--serif); letter-spacing: .02em; white-space: nowrap; color: #ffe38a;
  background: linear-gradient(180deg, #fffbea 8%, #ffe07a 42%, #f2a82c 72%, #b86a10 96%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(2px 0 0 var(--ink)) drop-shadow(-2px 0 0 var(--ink)) drop-shadow(0 2px 0 var(--ink)) drop-shadow(0 -2px 0 var(--ink)) drop-shadow(5px 6px 0 #5a2c00); }
#cutin .cl-text span { font: 900 clamp(10px, 2.1vh, 22px)/1.2 var(--sans); color: #fff; letter-spacing: .18em;
  text-shadow: 1px 1px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink); }
#cutin .cl-text span i { font-style: normal; color: var(--gold); margin: 0 .4em; }
#cutin .cl.reveal .cl-text em { animation: cbTag .24s .08s cubic-bezier(.2,.9,.2,1) both; }
#cutin .cl.reveal .cl-text b { animation: clName .34s .1s cubic-bezier(.15,.95,.25,1) both; }
#cutin .cl.reveal .cl-text span { animation: cbTag .24s .2s cubic-bezier(.2,.9,.2,1) both; }
@keyframes clName { 0% { opacity: 0; transform: scale(1.9); letter-spacing: .4em; } 55% { opacity: 1; transform: scale(.97); } 100% { transform: none; } }
/* 두 번째부터(짧은 연출): X 교차 없이 섬광과 함께 바로 공개 */
#cutin .cl.quick :is(.cl-x, .cl-crest) { display: none; }
#cutin .cl.quick.noduo .cl-bg { opacity: 1; }
/* 두 사람 원화가 없으면 X 가 흩어지지 않고 그대로 이름을 받친다 */
#cutin .cl.noduo.reveal .cl-x.a, #cutin .cl.noduo.reveal .cl-x.b { animation: none; }
#cutin .cl.out { animation: clOut .3s ease-in forwards; }
@keyframes clOut { to { opacity: 0; transform: scale(1.04); } }
#cutin .cl.gone { animation: clOut .2s ease-in forwards; }

/* ---------- 연계 게이지(ui.js · battle.js LINK_RULE): 궁극기와 별개. 파티 카드 바로 위, 차면 금빛 + 짝의 카드에 '연계' ---------- */
/* 파티 카드 묶음의 오른쪽 위 옆: 파티가 몇 명이든(카드가 위로 쌓여도) 왼쪽 ⚙·목표 패널과 부딪히지 않는다 */
#hud #linkg { position: absolute; left: calc(100% + 6px); top: 0; bottom: auto; display: flex; align-items: center; gap: 5px; box-sizing: border-box;
  width: 104px; height: 17px; padding: 0 5px; margin: 0; border: 0; border-radius: 0; background: #0b1220e6;
  box-shadow: 0 0 0 1px #05060b, 0 0 0 2px #6b5a2e; font: 900 9px/1 'CutinSans', 'Noto Sans KR', sans-serif; letter-spacing: .12em; color: #d9c48c; cursor: default; }
#hud #linkg i { flex: 1; height: 5px; background: #1c1a14; box-shadow: inset 0 0 0 1px #05060b; overflow: hidden; }
#hud #linkg u { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #a8781f, #ffd760); transition: width .12s linear; }
#hud #linkg kbd { display: none; padding: 0 3px; font: 900 9px/13px 'CutinSans', sans-serif; color: #1a0e00; background: #fff8d8; box-shadow: 0 0 0 1px #05060b; }
#hud #linkg.full { cursor: pointer; color: #1a0e00; background: linear-gradient(90deg, #fff1a8, #ffc23a); box-shadow: 0 0 0 1px #05060b, 0 0 0 3px #ffd760; animation: lkPulse .45s ease-in-out infinite alternate; }
#hud #linkg.full i { background: #05060b40; }
#hud #linkg.full u { background: #fffbe8; }
html.kbd #hud #linkg.full kbd, html:not(.vp-touch) #hud #linkg.full kbd { display: inline-block; }
#hud #linkg.wait { color: #ffd760; }   /* 찼지만 짝 근처에 적이 없다 */
#hud .pi .lk { display: none; }
#hud .pi.link { border-color: #ffd760; box-shadow: 0 0 0 2px #05060b, 0 0 0 4px #ffd760; }
#hud .pi.link .uq { display: none; }
/* 카드 가운데 아래(직업 아이콘·번호를 피해서). 깜빡임은 게이지만: 여러 장이 동시에 깜빡이면 어지럽다 */
#hud .pi.link .lk { display: grid; place-items: center; position: absolute; z-index: 7; pointer-events: none; left: -1px; right: -1px; top: 52%; height: 13px;
  font: 900 9px/1 'CutinSans', 'Noto Sans KR', sans-serif; letter-spacing: .06em; color: #1a0e00; background: linear-gradient(90deg, #fff1a8, #ffc23a);
  border-block: 1px solid #05060b; padding: 0; margin: 0; box-sizing: border-box; line-height: 11px; text-align: center; }
html.vp-touch #hud #linkg { height: calc(22px / var(--vs, 1)); font-size: calc(10px / var(--vs, 1)); width: calc(112px / var(--vs, 1)); }
html.vp-touch #hud #linkg i { height: calc(6px / var(--vs, 1)); }
@media (max-width: 600px) { #hud #linkg { left: auto; right: 0; top: calc(100% + 4px); } }   /* 좁은 화면: 파티가 위쪽 한 줄 */
html.vp-touch #hud .pi.link .lk { height: calc(15px / var(--vs, 1)); font-size: calc(10px / var(--vs, 1)); }
@keyframes lkPulse { to { filter: brightness(1.25); scale: 1.08; } }

/* ---------- 작은 화면: 띠를 조금 더 두껍게(글자가 읽히게) ---------- */
@media (max-height: 480px) {
  #cutin { --band-y: 12vh; --band-h: clamp(64px, 26vh, 140px); --strip-y: 40vh; --strip-h: clamp(34px, 9.5vh, 56px); --strip-w: min(46vw, 360px); }
  #cutin .cb-text b { font-size: clamp(18px, 7vh, 34px); }
}

@media (prefers-reduced-motion: reduce) {
  #cutin :is(.cb, .cb *, .cl, .cl *) { animation-duration: .01s !important; animation-delay: 0s !important; transition: none !important; }
  #cutin .cb-speed, #cutin .cl-rays { display: none; }
}
