/* shortform scene: script, voice, avatar video, four platforms */
.shortform { width: 100%; padding: 14px; display: grid; gap: 12px; font-family: var(--sans); color: var(--ink); }
.shortform-rs, .shortform-rs * { transition: none !important; animation: none !important; }
.shortform svg { display: block; }
.shortform-top { display: grid; grid-template-columns: minmax(0, 1fr) 184px; gap: 12px; align-items: stretch; }
.shortform-left { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; min-width: 0; }

.shortform-pan { position: relative; min-width: 0; padding: 12px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line-2); transition: border-color .5s, background .5s, box-shadow .5s; }
.shortform-pan.act { border-color: rgba(245,185,66,.5); background: var(--paper-2); box-shadow: 0 0 0 4px rgba(245,185,66,.06); }
.shortform-pan.done { border-color: rgba(61,214,140,.28); }
.shortform-hd { position: relative; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; line-height: 1; white-space: nowrap; }
.shortform-hd i { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 600 10px var(--mono); font-style: normal; color: var(--mute); background: rgba(255,255,255,.07); transition: background .4s, color .4s; }
.shortform-hd b { font-weight: 600; color: var(--mute); transition: color .4s; overflow: hidden; text-overflow: ellipsis; }
.shortform-hd small { margin-left: auto; font: 500 10px var(--mono); color: var(--dim); }
.shortform-hd em { position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; transform: scale(0); transition: transform .45s var(--ease); }
.shortform-hd em svg { width: 12px; height: 12px; fill: none; stroke: #06140D; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.shortform-pan.act .shortform-hd i { background: var(--amber); color: #201400; }
.shortform-pan.act .shortform-hd b, .shortform-pan.done .shortform-hd b { color: var(--ink); }
.shortform-pan.done .shortform-hd em { transform: scale(1); }

/* 1 script */
.shortform-s1 { display: flex; flex-direction: column; }
.shortform-ft { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; opacity: 0; transform: translateY(4px); transition: opacity .5s, transform .5s var(--ease); }
.shortform-ft span { height: 22px; padding: 0 9px; border-radius: 999px; background: rgba(255,255,255,.06); font: 500 10px/22px var(--mono); color: var(--mute); white-space: nowrap; }
.shortform-s1.done .shortform-ft { opacity: 1; transform: none; }
.shortform-txt { min-height: 132px; font-size: 16px; line-height: 1.55; color: var(--ink); letter-spacing: -.005em; }
.shortform-txt u { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -3px; background: var(--amber); opacity: 0; text-decoration: none; }
.shortform-s1.act .shortform-txt u { opacity: 1; animation: shortform-blink .8s steps(2) infinite; }
@keyframes shortform-blink { 50% { opacity: 0; } }

/* 2 voice */
.shortform-wave { display: flex; align-items: center; gap: 3px; height: 54px; }
.shortform-wave i { flex: 1; min-width: 0; height: 3px; border-radius: 2px; background: rgba(255,255,255,.16); transition: height .55s var(--ease), background .4s; transition-delay: calc(var(--k) * 34ms); }
.shortform-s2.act .shortform-wave i, .shortform-s2.done .shortform-wave i { height: var(--h); background: #F3F1EC; }
.shortform-s2.done .shortform-wave i { background: rgba(243,241,236,.55); transition-delay: 0s; }

/* 3 avatar video */
.shortform-s3 { display: flex; flex-direction: column; }
.shortform-frame { position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #0B0C10; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.shortform-frame::before { content: ''; position: absolute; inset: 0; background: radial-gradient(90% 60% at 50% 38%, #51638F 0%, #2B3350 46%, #12141F 100%); opacity: 0; transition: opacity .8s; }
.shortform-person { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; filter: blur(10px); transform: scale(1.06); transition: opacity .8s, filter .9s, transform 1.2s var(--ease); }
.shortform-s3.play .shortform-frame::before, .shortform-s3.play .shortform-person { opacity: 1; }
.shortform-s3.play .shortform-person { filter: none; transform: none; }
.shortform-wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font: 500 10.5px var(--mono); color: var(--dim); opacity: .0; transition: opacity .4s; }
.shortform-wait span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.12); border-top-color: var(--amber); animation: shortform-spin .9s linear infinite; }
@keyframes shortform-spin { to { transform: rotate(360deg); } }
.shortform-s3.act .shortform-wait { opacity: 1; } .shortform-s3.play .shortform-wait { opacity: 0; }
.shortform-cap { position: absolute; left: 8px; right: 8px; bottom: 19%; height: 24px; }
.shortform-cap div { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; gap: 5px; opacity: 0; white-space: nowrap; font: 700 15px/1 var(--sans); letter-spacing: -.01em; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.75), 0 0 1px #000; }
.shortform-cap div.on { opacity: 1; }
.shortform-cap span { opacity: 0; transform: translateY(5px) scale(.9); transition: opacity .16s, transform .24s var(--ease), color .2s; }
.shortform-cap span.on { opacity: 1; transform: none; } .shortform-cap span.cur { color: #FFE14D; }
.shortform-s3.done .shortform-cap { opacity: 0; transition: opacity .4s; }
.shortform-scrub { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.22); opacity: 0; transition: opacity .4s; }
.shortform-scrub i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: #fff; }
.shortform-scrub i::after { content: ''; position: absolute; right: -4px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.6); }
.shortform-s3.play .shortform-scrub { opacity: 1; } .shortform-s3.play .shortform-scrub i { width: 100%; transition: width 3.7s linear; }
.shortform-ready { position: absolute; left: 50%; bottom: 17%; display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px 0 7px; border-radius: 999px; background: var(--ok); color: #06140D; font-size: 11.5px; font-weight: 600; white-space: nowrap; opacity: 0; transform: translate(-50%, 8px) scale(.9); transition: opacity .4s, transform .5s var(--ease); }
.shortform-ready svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.shortform-s3.done .shortform-ready { opacity: 1; transform: translate(-50%, 0); }

/* 4 platforms */
.shortform-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.shortform-tile { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 10px; align-items: center; height: 68px; padding: 0 10px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line-2); transition: border-color .5s, background .5s; }
.shortform-tile::before { content: ''; position: absolute; left: 10px; top: 50%; width: 24px; height: 42px; margin-top: -21px; border-radius: 5px; border: 1px dashed rgba(255,255,255,.16); transition: opacity .4s; transition-delay: calc(var(--i) * 140ms + .5s); }
.shortform.fan .shortform-tile::before { opacity: 0; }
.shortform-tx { display: grid; gap: 5px; min-width: 0; justify-items: start; }
.shortform-tx > span { max-width: 100%; font-size: 11.5px; font-weight: 500; line-height: 1; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .4s; }
.shortform.fan .shortform-tx > span { color: var(--ink); }
.shortform-tile.ok { border-color: rgba(61,214,140,.35); background: linear-gradient(180deg, rgba(61,214,140,.07), rgba(61,214,140,0) 70%), var(--paper); }
.shortform-mini { width: 24px; height: 42px; border-radius: 5px; overflow: hidden; background: #1A1F33 center / cover no-repeat; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 6px 14px -4px #000; opacity: 0; transform: translate(calc(372px - var(--i) * 127px), -175px) scale(2.6); transition: transform .95s var(--ease), opacity .35s; transition-delay: calc(var(--i) * 140ms); position: relative; z-index: 2; }
.shortform.fan .shortform-mini { opacity: 1; transform: none; }
.shortform-tl { display: flex; align-items: center; height: 16px; }
.shortform-tl > img, .shortform-tl > svg, .shortform-tt { flex: none; width: 16px; height: 16px; object-fit: contain; }
.shortform-tl > svg { width: 20px; height: 14px; }
.shortform-tt { display: grid; place-items: center; border-radius: 4px; background: #000; box-shadow: 0 0 0 1px rgba(255,255,255,.16); } .shortform-tt img { width: 10px; height: 10px; object-fit: contain; display: block; }
.shortform-ok { display: flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 500; color: var(--dim); line-height: 1; transition: color .4s; }
.shortform-ok svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.4); transition: opacity .3s, transform .45s var(--ease), margin .45s var(--ease); margin-left: -15px; }
.shortform-tile.ok .shortform-ok { color: var(--ok); } .shortform-tile.ok .shortform-ok svg { opacity: 1; transform: none; margin-left: -2px; }

.shortform-out { justify-self: center; display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 16px 6px 10px; border-radius: 999px; background: var(--ok-bg); border: 1px solid rgba(61,214,140,.3); font-size: 13.5px; color: var(--ink); opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .6s var(--ease); }
.shortform-out.on { opacity: 1; transform: none; }
.shortform-out b { font-weight: 600; color: var(--ok); }
.shortform-out svg { flex: none; width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--ok); fill: none; stroke: #06140D; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 600px) {
  .shortform { padding: 10px; gap: 10px; }
  .shortform-top { grid-template-columns: minmax(0, 1fr) 128px; gap: 8px; }
  .shortform-left { gap: 8px; }
  .shortform-pan { padding: 9px; border-radius: 14px; }
  .shortform-hd { font-size: 11px; gap: 6px; margin-bottom: 8px; } .shortform-hd small { display: none; }
  .shortform-txt { font-size: 12.5px; line-height: 1.45; min-height: 112px; }
  .shortform-ft span { height: 19px; line-height: 19px; font-size: 9px; padding: 0 7px; }
  .shortform-wave { height: 36px; gap: 2px; }
  .shortform-cap div { font-size: 11.5px; gap: 4px; } .shortform-cap { left: 4px; right: 4px; }
  .shortform-ready { font-size: 10.5px; height: 23px; }
  .shortform-tiles { gap: 6px; }
  .shortform-tile { grid-template-columns: minmax(0, 1fr); justify-items: center; row-gap: 7px; height: auto; padding: 9px 2px; }
  .shortform-tile::before { left: 50%; top: 9px; margin: 0 0 0 -12px; }
  .shortform-mini { transform: translate(calc(178px - var(--i) * 78px), -150px) scale(2.2); }
  .shortform-tx { justify-items: center; gap: 4px; } .shortform-tx > span { font-size: 10px; }
  .shortform-tl { height: 14px; } .shortform-tl > img, .shortform-tt { width: 14px; height: 14px; } .shortform-tl > svg { width: 17px; height: 12px; }
  .shortform-ok { font-size: 10px; }
  .shortform-out { font-size: 12px; padding-right: 13px; text-align: left; }
}
