/* 만들기 화면 배치(2026-11-07 시제품 → 2026-11-08 운영 — video.html · image.html, Asset 칸은 desk.css). 디노 「지금 아래로 길게 왼쪽 거의 전체가 프롬프트로 채워진건 나쁘지 않아 … 보조책상 … 옆에 달려있는 칸을 하나 더 만들어서 접엇다 폇다 … 이름을 Asset」.
   넓은 화면(640px 이상) = 「작업대 | Asset | 결과」 세 칸. 작업대는 화면 높이만큼 — 프롬프트 칸이 남는 높이를 다 쓰고 접히지 않는다(아래 카드는 min(168px, 24vh)에서 멈추고 두 줄로 접혔다).
   Asset 칸은 작업대와 같은 높이로 붙어 있고, 접으면 40px 띠(html.dk-collapsed — desk.js). 좁은 화면은 운영처럼 작업대가 아래, Asset은 아래 서랍. 운영 styles.css 위에 덧씌우기만 한다. */

/* 설정 칸의 겉 — 모든 폭(넷째 판, 디노 「하단에있는 이 설정창 디자인이 너무 직사각형이고 투박해보이는데 … 이런것들이 글씨 안짤리게」).
   테두리 상자 대신 옅은 면의 둥근 칸 — 릴스 화면의 「너무 각져보여 → 둥글둥글하고 크리에이티브」와 같은 결(팔레트 · 글꼴은 시네마 그대로). 펼친 칸만 샴페인 선 한 줄.
   글자는 자르지 않는다 — 운영은 모델 이름을 260px에서 말줄임했다. 길면 칸 안에서 줄을 바꾼다 */
#st-form .chip { height: auto; min-height: 34px; border: 1px solid transparent; border-radius: 10px; background: rgba(232, 227, 218, .055); color: var(--text-strong); transition: background-color .15s ease, border-color .15s ease; }
#st-form .chip:hover { background: rgba(232, 227, 218, .09); border-color: transparent; }
#st-form .chip[aria-expanded="true"] { background: rgba(232, 227, 218, .09); border-color: rgba(196, 173, 134, .6); }
#st-form .chip:focus-visible { outline: 1px solid #C4AD86; outline-offset: 1px; }
#st-form .chip.off { opacity: .5; }
#st-form .chip-model { max-width: 100%; }
#st-form .chip-model b { overflow: visible; white-space: normal; text-overflow: clip; text-align: left; }
#st-form .st-frame { border-radius: 10px; }   /* Start frame · End frame 칸도 에셋 칸(10px)과 같은 모서리 */
#st-form .st-submit { border-radius: 10px; }   /* 시네마 주 키(샴페인 선 → 올리면 샴페인 면) 그대로, 모서리만 둥글게 */
/* 예상 크레딧 — 글자 기준선을 맞추고(큰 숫자 때문에 잔액이 떠 보였다), 길면 잘리지 않고 다음 줄로 */
#st-form .st-est { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.3em; row-gap: 2px; white-space: normal; min-width: 0; }
#st-form .st-est .st-off { margin-left: 0.3rem; white-space: nowrap; }
#st-form .st-est .st-bal { white-space: nowrap; }

@media (min-width: 640px) {
  .st-main { display: grid; grid-template-columns: clamp(300px, 30vw, 420px) var(--dk-col, 228px) minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 14px; align-items: start; }
  html.dk-collapsed .st-main { --dk-col: 40px; }
  .st-main > #st-form, .st-main > .dk { position: sticky; top: calc(var(--top-h, 60px) + 0.9rem); grid-row: 1 / span 3; height: calc(100vh - var(--top-h, 60px) - 1.8rem); }
  .st-main > #st-form { grid-column: 1; bottom: auto; width: auto; max-width: none; margin: 0; display: flex; flex-direction: column; border-radius: 14px; padding: 0.75rem 0.8rem 0.8rem; }
  .st-main > .dk { grid-column: 2; }
  .st-main > #st-gallery { grid-column: 3; grid-row: 1; min-height: 60vh; }
  .st-main > .st-more-wrap { grid-column: 3; grid-row: 2; }
  #st-form .st-refs { flex: none; max-height: 34%; overflow-y: auto; }
  #st-form .st-pbox { flex: 1 1 auto; min-height: 9rem; display: flex; flex-direction: column; position: relative; }
  #st-form #st-prompt { flex: 1 1 auto; height: auto !important; max-height: none !important; min-height: 8rem; overflow-y: auto; }   /* 168px 상한 · 두 줄 접힘을 푼다 */
  .st-composer.p-folded textarea { overflow-y: auto; -webkit-mask-image: none; mask-image: none; }
  .st-composer.p-folded.p-more .st-pmirror { -webkit-mask-image: none; mask-image: none; }
  #st-form .st-bar { flex: none; flex-direction: column; align-items: stretch; gap: 0.65rem; padding-top: 0.7rem; border-top: 1px solid rgba(232, 227, 218, .08); margin-top: 0.4rem; }
  #st-form .st-err { flex: none; }

  /* 설정 칸의 배치 — 모델 · 방식은 한 묶음 카드(위 모델 · 아래 방식)에 칸 폭 전체: 「Reference to video」 같은 긴 이름도 한 줄에 다 보인다.
     나머지는 이름표 위 · 값 아래 타일. 한 줄을 고르게 나눠 채우되 글자보다 좁아지지 않는다(min-width: max-content) — 모자라면 잘리지 않고 다음 줄로 */
  #st-form .st-chips { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; }
  #st-form .chip { position: relative; min-height: 44px; white-space: nowrap; text-align: left; }
  #st-form .chip .chip-k { font-size: 0.7rem; letter-spacing: .01em; }
  #st-form .chip b { font-size: 0.88rem; }
  #st-form .chip-model, #st-form .chip[data-pop="mode"] { display: flex; flex: 1 1 100%; min-height: 42px; padding: 0 12px; gap: 10px; }
  #st-form .chip-model b { font-size: 0.92rem; }
  #st-form .chip-model .chip-caret, #st-form .chip[data-pop="mode"] .chip-caret { margin-left: auto; }
  #st-form .chip-model:has(+ .chip[data-pop="mode"]) { border-radius: 10px 10px 0 0; }
  #st-form .chip-model + .chip[data-pop="mode"] { margin-top: -6px; border-radius: 0 0 10px 10px; box-shadow: inset 0 1px 0 rgba(232, 227, 218, .08); }
  #st-form .chip[data-pop="mode"] .chip-k { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* 「방식」은 읽기 도구에만 — 이름이 스스로 말한다 */
  #st-form .chip[data-pop="mode"] b { font-weight: 500; }
  /* 해상도 · 품질 · 길이 · 비율 · 장수 — 이름표 위 · 값 아래 */
  #st-form .chip:not(.chip-model):not([data-pop="mode"]) { flex: 1 1 0; min-width: max-content; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 6px 11px; line-height: 1.25; }
  #st-form .chip:not(.chip-model):not([data-pop="mode"]) .chip-caret { display: none; }   /* 타일 전체가 누르는 자리 — 꺾쇠 대신 면이 밝아진다 */
  #st-form .chip-pair { flex: 1 1 0; min-width: max-content; display: flex; align-items: center; gap: 5px; }
  #st-form .chip-pair .chip { flex: 1 1 auto; }
  #st-form .st-count { flex: 1 1 100%; margin: 0; text-align: right; }
  #st-form .st-count:empty { display: none; }

  /* 예상 크레딧 한 줄(잔액은 오른쪽 끝) · 만들기는 칸 폭 전체 */
  #st-form .st-go { margin-left: 0; flex-direction: column; align-items: stretch; gap: 0.5rem; }
  #st-form .st-est { line-height: 1.5; font-size: 0.8rem; min-height: 1.2em; padding: 0 2px; }
  #st-form .st-est b { font-size: 0.95rem; }
  #st-form .st-est .st-bal { margin-left: auto; padding-left: 0.75rem; }
  #st-form .st-submit { width: 100%; height: 44px; font-size: 0.98rem; letter-spacing: 0.06em; }
}
/* 중간 폭(640~1099px) — 칸으로 세우면 결과가 100px 안팎으로 찌그러진다(앱 패널 689px 실측). 칸 자리는 늘 40px 띠만, 펴면 Asset이 결과 위로 덮이는 서랍이 된다 */
@media (min-width: 640px) and (max-width: 1099px) {
  .st-main { --dk-col: 40px; }
  .st-main > .dk:not(.dk-collapsed) { width: 236px; z-index: 6; box-shadow: 18px 0 48px rgba(0, 0, 0, .55); }
}
