/* 참관용 표시 띠 + 참관 전용 가림 규칙 — 실앱 CSS(app/styles.css)는 건드리지 않고 이 파일만 위에 얹어요.
   D102 디자인 시스템 토큰만 써요(하드코딩 색 없음). */
:root { --demo-bar-h: 34px; }

.demo-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 60; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand-deep); color: var(--ink-on-accent);
  font-size: 13px; font-weight: 700; letter-spacing: -0.01em; pointer-events: none;
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(var(--demo-bar-h) + env(safe-area-inset-top, 0px));
  box-shadow: 0 1px 0 rgba(0, 0, 0, .12);   /* 고정 어두운 색 — 다크 모드에서 밝은 띠가 생기지 않게 */
}
/* 계속 눈에 들어오게 — 띠 위를 천천히 훑고 지나가는 빛.
   transform 만 움직여서(레이아웃·페인트 없음) 얇은 띠 하나에도 부담이 없어요. */
.demo-bar::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 0%,
    color-mix(in srgb, var(--ink-on-accent) 10%, transparent) 38%,
    color-mix(in srgb, var(--ink-on-accent) 26%, transparent) 50%,
    color-mix(in srgb, var(--ink-on-accent) 10%, transparent) 62%, transparent 100%);
  transform: translateX(-100%);
  animation: demoSweep 6s linear infinite;
}
.demo-bar > * { position: relative; z-index: 1; }
.demo-bar b { font-weight: 800; }
.demo-bar .demo-sep { opacity: .55; }
.demo-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ink-on-accent);
  animation: demoPulse 1.9s ease-in-out infinite;
}
@keyframes demoSweep { to { transform: translateX(100%); } }
@keyframes demoPulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.25); } }
/* 움직임을 줄여 달라고 설정한 분에게는 멈춰요(그래도 띠는 그대로 보여요). */
@media (prefers-reduced-motion: reduce) {
  .demo-bar::before, .demo-dot { animation: none; }
  .demo-bar::before { transform: none; opacity: .5; }
}

/* 띠 높이만큼 앱 셸을 내려요 — sticky 요소도 띠 아래에 붙게. */
.app { padding-top: calc(var(--demo-bar-h) + env(safe-area-inset-top, 0px)); }
.sidebar { top: calc(var(--demo-bar-h) + env(safe-area-inset-top, 0px)); height: calc(100dvh - var(--demo-bar-h) - env(safe-area-inset-top, 0px)); }
.topbar { top: calc(var(--demo-bar-h) + env(safe-area-inset-top, 0px)); }
.scrim { top: calc(var(--demo-bar-h) + env(safe-area-inset-top, 0px)); }

/* ── 참관용 로딩 표시 — 'D102' 를 선으로 그렸다 지웠다 ──────────────────
   기법 출처: uiverse.io/SelfMadeSystem/pretty-treefrog-77 (MIT) — 색은 D102 토큰으로 바꿨어요. */
.demo-loader { --demo-ld-h: 56px; display: flex; align-items: center; gap: 4px; }
.demo-ld-defs { position: absolute; width: 0; height: 0; }
.demo-ld-glyph { display: inline-block; height: var(--demo-ld-h); }
.demo-ld-dash { animation: demoDashArray 2s ease-in-out infinite, demoDashOffset 2s linear infinite; }
.demo-ld-spin {
  animation: demoSpinDashArray 2s ease-in-out infinite, demoGlyphSpin 8s ease-in-out infinite, demoDashOffset 2s linear infinite;
  transform-origin: center;
}
@keyframes demoDashArray {
  0% { stroke-dasharray: 0 1 359 0; }
  50% { stroke-dasharray: 0 359 1 0; }
  100% { stroke-dasharray: 359 1 0 0; }
}
@keyframes demoSpinDashArray {
  0% { stroke-dasharray: 270 90; }
  50% { stroke-dasharray: 0 360; }
  100% { stroke-dasharray: 270 90; }
}
@keyframes demoDashOffset { 0% { stroke-dashoffset: 365; } 100% { stroke-dashoffset: 5; } }
@keyframes demoGlyphSpin {
  0% { rotate: 0deg; }
  12.5%, 25% { rotate: 270deg; }
  37.5%, 50% { rotate: 540deg; }
  62.5%, 75% { rotate: 810deg; }
  87.5%, 100% { rotate: 1080deg; }
}
/* 다크 모드에서 GIF 를 흰 타일에 얹던 규칙은 이 로더엔 필요 없어요(획만 그려요). */
:root[data-theme="dark"] .demo-loader { background: none; box-shadow: none; padding: 0; }
@media (prefers-reduced-motion: reduce) {
  .demo-ld-dash, .demo-ld-spin { animation: none; stroke-dasharray: none; }
}
@media (max-width: 820px) { .demo-loader { --demo-ld-h: 46px; } }

/* ── 참관용 화면 안내 팝업 ────────────────────────────────────────────── */
/*  ⚠️ 가림막·그림자는 **고정 어두운 색**을 써요(실앱 `.scrim` 과 같은 방식).
    `var(--ink)` 로 만들면 다크 모드에서 잉크가 밝은 색이라 **가림막이 하얗게 떠요**(반대로 보여요). */
.demo-guide-wrap {
  position: fixed; inset: 0; z-index: 4200; display: grid; place-items: center; padding: 20px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: demoGuideFade .16s ease;
}
.demo-guide {
  width: min(540px, 100%); max-height: min(86vh, 760px); overflow: auto;
  background: var(--surface); border-radius: var(--r-lg, 18px);
  box-shadow: var(--shadow-pop);
  padding: 22px 22px 18px; animation: demoGuideRise .22s cubic-bezier(.2, .8, .3, 1);
}
.demo-guide-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.demo-guide-ico {
  flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--brand), var(--brand-deep)); color: var(--ink-on-accent);
}
.demo-guide-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--brand-deep); }
.demo-guide-title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.demo-guide-lead { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin: 0 0 16px; }
.demo-guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.demo-guide-step { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--canvas); }
.demo-guide-num {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-tint-strong); color: var(--brand-deep); font-size: 12px; font-weight: 800;
}
.demo-guide-sbody { min-width: 0; }
.demo-guide-term { display: block; font-size: 13px; font-weight: 700; color: var(--ink); }
.demo-guide-desc { display: block; font-size: 13px; line-height: 1.55; color: var(--ink-2); margin-top: 2px; }
.demo-guide-tip {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; padding: 10px 12px;
  border-radius: 12px; background: var(--accent-tint); color: var(--ink-2); font-size: 12.5px; line-height: 1.55;
}
.demo-guide-tip svg { flex: none; color: var(--brand-deep); margin-top: 1px; }
.demo-guide-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.demo-guide-off {
  border: 0; background: none; color: var(--ink-3); font-size: 13px; cursor: pointer; padding: 8px 4px;
  min-height: 44px;
}
.demo-guide-off:hover { color: var(--ink-2); }
.demo-guide-ok {
  border: 0; border-radius: 999px; padding: 0 22px; min-height: 44px; cursor: pointer;
  background: var(--accent); color: var(--ink-on-accent); font-size: 14px; font-weight: 700;
}
.demo-guide-ok:hover { background: var(--accent-hover, var(--brand-deep)); }
.demo-guide-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 4100;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--ink-on-accent); font-size: 20px; font-weight: 800;
  box-shadow: var(--shadow-pop);
  transition: transform var(--fast, .15s) ease;
}
.demo-guide-fab:hover { transform: translateY(-2px); }
@media (max-width: 820px) { .demo-guide-fab { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); } }
@keyframes demoGuideFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes demoGuideRise { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .demo-guide, .demo-guide-wrap { animation: none; } }

/* ── AI 미디어 생성: 만드는 화면은 보여주고, 지난 작업의 내용만 가려요 ──────
   🔴 **만드는 화면(스튜디오·업스케일 탭)은 그대로 보여줘요** — 이 도구를 어떻게 구현했는지
      보여주는 게 참관의 목적이에요(모델 고르기·프롬프트 칸·설정·생성 버튼까지 그대로).
   🔴 가리는 건 **우리가 이미 만든 결과물의 내용**뿐이에요 — 어떤 프롬프트·모델·설정으로
      만들었는지는 영업 자산이라 안 보여줘요. 자료(fixtures)에서 이미 비웠고 여기서 한 겹 더 가려요. */
.studio-lib-cap,
.studio-detail-model, .studio-detail-prompt, .studio-detail-params, .studio-detail-meta { display: none !important; }
/* 상세 팝업의 동작 줄(피드백·'이 설정으로 다시 만들기'·삭제) — 지난 작업의 설정을 되살리는 자리라 감춰요. */
.studio-detail-side .row.gap-sm { display: none !important; }
