/* ============================================================
   AI 오피스 — 픽셀 사무실 시각화
   자산 들어오기 전엔 색상 박스 placeholder로 동작.
   각 캐릭터에 .of-asset-ready 추가하면 sprite 배경 활성화.
   ============================================================ */

:root {
  --bg: #1B1B2F;
  --bg-elev: #232342;
  --card: #2A2A48;
  --card-hover: #33335a;
  --border: rgba(255,255,255,0.08);
  --text: #F5F5FA;
  --text-sub: #B5B5CC;
  --text-dim: #7A7A99;
  --accent: #E04345;
  --accent-bg: rgba(224,67,69,0.12);
  --coral: #FFA39C;
  --gold: #F5C76A;
  --teal: #5EE2C9;

  /* 캐릭터별 색상 (placeholder + 강조) */
  --c-op:    #5EE2C9; /* 운영이 — teal (안정·관리) */
  --c-con:   #F5C76A; /* 콘텐츠씨 — gold (창작) */
  --c-res:   #B59CFF; /* 연구쟁이 — violet (지식) */
  --c-coach: #FFA39C; /* 코치쌤 — coral (감정) */
  --c-exe:   #E04345; /* 실행이 — accent red (액션) */
  --c-sys:   #6BA6FF; /* 시스템맨 — blue (기술) */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; padding: 20px 16px 80px; max-width: 1320px; margin: 0 auto; }

#navBar { width: 100%; }
/* embed 모드 (iframe 임베드용) — 상단 navbar 통째 숨김 */
html.of-embed #navBar { display: none !important; }

.page-header {
  margin: 12px 0 18px;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.page-header h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }

.of-page-info { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.of-pill {
  padding: 6px 12px; border-radius: 999px;
  background: var(--card); font-size: 13px; color: var(--text-sub); font-weight: 600;
}
.of-pill strong { color: var(--coral); font-weight: 800; }
.of-pill-time { font-variant-numeric: tabular-nums; }

/* ===== 사무실 무대 ===== */
.of-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: 1280px;
  margin: 0 auto;
  container-type: inline-size;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* 배경 — 자산 들어오면 .of-bg.of-asset-ready 로 활성화 */
/* 사무실: 위 30% = 따뜻한 베이지 벽, 아래 70% = 밝은 우드 바닥 */
.of-bg {
  position: absolute; inset: 0;
  background:
    /* 부드러운 비네팅 (모서리만 살짝 어둡게) */
    radial-gradient(ellipse at 50% 60%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.18) 100%),
    /* 벽-바닥 구분 */
    linear-gradient(180deg,
      #e8d9bc 0%,
      #e8d9bc 28%,
      #c19872 28.5%,
      #c19872 30%,
      #a87a4d 30%,
      #8b5e34 100%);
}
.of-bg.of-asset-ready {
  background: url('/office/assets/bg.png') center/cover no-repeat !important;
}

/* 우드 바닥 패턴 — 가로 결만 살짝 (수직 패턴 X, 더 자연스러움) */
.of-floor {
  position: absolute;
  left: 0; right: 0; top: 30%; bottom: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.06) 0px,
      rgba(255,255,255,0.06) 1px,
      transparent 1px,
      transparent 60px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0,0,0,0.10) 0px,
      rgba(0,0,0,0.10) 1px,
      transparent 1px,
      transparent 240px
    );
  pointer-events: none;
}
.of-bg.of-asset-ready ~ .of-floor,
.of-bg.of-asset-ready ~ .of-furniture { display: none; }

/* ===== 회사 가구 (미니멀 — 단조로운 톤) ===== */
.of-furniture {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 1;
}
.of-furniture > * {
  position: absolute;
  border-radius: 3px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* 창문 (좌측 벽) */
.of-window {
  left: 6%; top: 9%;
  width: 12%; height: 16%;
  background: linear-gradient(180deg, #f0e4c8 0%, #d8c8a4 100%);
  border: 2px solid #6d5e48;
  opacity: 0.55;
}

/* 시계 (벽 정상) — 작은 원만 */
.of-wall-clock {
  left: 50%; top: 13%;
  transform: translate(-50%, 0);
  width: 2.5%;
  aspect-ratio: 1;
  background: #4a3a2a;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

/* 화이트보드 (콘텐츠씨 위 벽) */
.of-whiteboard {
  left: 22%; top: 5%;
  transform: translate(-50%, 0);
  width: 12%; height: 14%;
  background: #e0d4b8;
  border: 2px solid #6d5e48;
}

/* 책장 (연구쟁이 위 벽) */
.of-bookshelf {
  right: 22%; top: 5%;
  transform: translate(50%, 0);
  width: 13%; height: 18%;
  background: linear-gradient(180deg, #5d4332 0%, #3d2c20 100%);
  border: 2px solid #2e1f15;
}
.of-bookshelf::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 33%; bottom: 33%;
  border-top: 1px solid rgba(0,0,0,0.4);
  border-bottom: 1px solid rgba(0,0,0,0.4);
}

/* 콘텐츠씨 책상 — 노트북 + 노트 (모노톤) */
.of-desk-con {
  left: 20%; top: 38%;
  transform: translate(-50%, 0);
  width: 14%; height: 6%;
  background: linear-gradient(180deg, #6d4f3a 0%, #4a3322 100%);
}
.of-desk-con::before {
  content: '';
  position: absolute;
  left: 28%; top: 18%;
  width: 28%; height: 64%;
  background: #2a2a30;
  border-radius: 1px;
  box-shadow: inset 0 1px 0 rgba(201,169,97,0.2);
}
.of-desk-con::after {
  content: '';
  position: absolute;
  right: 16%; top: 22%;
  width: 18%; height: 56%;
  background: #e8d9bc;
  border-radius: 1px;
}

/* 연구쟁이 책상 — 책 더미 + 머그 (모노톤) */
.of-desk-res {
  right: 20%; top: 38%;
  transform: translate(50%, 0);
  width: 14%; height: 6%;
  background: linear-gradient(180deg, #6d4f3a 0%, #4a3322 100%);
}
.of-desk-res::before {
  content: '';
  position: absolute;
  left: 18%; top: 16%;
  width: 22%; height: 68%;
  background: linear-gradient(180deg,
    #4a3a2a 0% 33%,
    #2a2a30 33% 66%,
    #5d4332 66%);
  border-radius: 1px;
}
.of-desk-res::after {
  content: '';
  position: absolute;
  right: 22%; top: 24%;
  width: 14%; height: 52%;
  background: #e8d9bc;
  border-radius: 0 0 4px 4px;
  border: 1px solid #4a3a2a;
}
.of-desk-exe { display: none; }

/* 회의 테이블 (정중앙) — 노트북 4개 모노톤 */
.of-table {
  left: 50%; top: 55%;
  transform: translate(-50%, -50%);
  width: 28%; height: 14%;
  background: linear-gradient(180deg, #6d4f3a 0%, #4a3322 100%);
  border: 1px solid rgba(0,0,0,0.3);
  box-shadow: 0 10px 22px rgba(0,0,0,0.4);
}
.of-table::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 6% 18% at 22% 30%, #2a2a30 0 90%, transparent 95%),
    radial-gradient(ellipse 6% 18% at 50% 30%, #2a2a30 0 90%, transparent 95%),
    radial-gradient(ellipse 6% 18% at 78% 30%, #2a2a30 0 90%, transparent 95%),
    radial-gradient(ellipse 4% 12% at 35% 75%, #e8d9bc 0 90%, transparent 95%),
    radial-gradient(ellipse 4% 12% at 65% 75%, #e8d9bc 0 90%, transparent 95%);
}

/* 회의실 모니터 (벽 끝) — 단색 */
.of-monitor {
  left: 50%; top: 32%;
  transform: translate(-50%, 0);
  width: 11%; height: 6%;
  background: #1a1a22;
  border: 2px solid #2a2a30;
  border-radius: 2px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

/* 펜던트 라이트 (회의 테이블 위 천장) */
.of-pendant {
  position: absolute;
  width: 2.5%; height: 4%;
  background: linear-gradient(180deg, transparent 0%, transparent 30%, #4a3a2a 30%, #2e1f15 100%);
  border-radius: 0 0 50% 50%;
  box-shadow: none;
}
.of-pendant::before {
  content: '';
  position: absolute;
  left: 50%; top: -300%;
  width: 1px; height: 300%;
  background: #2e1f15;
  transform: translateX(-50%);
  opacity: 0.5;
}
.of-pendant-1 { left: 44%; top: 38%; }
.of-pendant-2 { left: 56%; top: 38%; }

/* 출입문 (우측 벽) */
.of-door {
  right: 4%; top: 8%;
  width: 7%; height: 22%;
  background: linear-gradient(180deg, #5d4332 0%, #3d2c20 100%);
  border: 2px solid #2e1f15;
  border-radius: 4px 4px 0 0;
}
.of-door::after {
  content: '';
  position: absolute;
  right: 14%; top: 52%;
  width: 6px; height: 6px;
  background: #c9a961;
  border-radius: 50%;
}

/* 서버랙 (우측 끝) */
.of-serverrack {
  right: 3%; top: 38%;
  width: 7%; height: 26%;
  background: linear-gradient(180deg, #2a2a30 0%, #18181c 100%);
  border: 1px solid #4a4640;
}
.of-serverrack::after {
  content: '';
  position: absolute;
  left: 22%; right: 22%; top: 20%; bottom: 20%;
  background: repeating-linear-gradient(
    0deg,
    rgba(201,169,97,0.2) 0px, rgba(201,169,97,0.2) 1px,
    transparent 1px, transparent 8px
  );
  border-radius: 1px;
}

/* 소파 (좌하 라운지) — 등받이 + 쿠션 (모노톤) */
.of-sofa {
  left: 20%; top: 70%;
  transform: translate(-50%, 0);
  width: 24%; height: 17%;
  background: linear-gradient(180deg, #2a3450 0%, #1a2540 100%);
  border-radius: 12px 12px 4px 4px;
  border: 1px solid rgba(0,0,0,0.3);
  box-shadow: 0 8px 18px rgba(0,0,0,0.35);
}
.of-sofa::before {
  /* 등받이 */
  content: '';
  position: absolute;
  left: 5%; right: 5%; top: 6%;
  height: 36%;
  background: linear-gradient(180deg, #3a4560 0%, #243050 100%);
  border-radius: 10px 10px 3px 3px;
}
.of-sofa::after {
  /* 쿠션 3개 (베이지 모노) */
  content: '';
  position: absolute;
  left: 6%; right: 6%; bottom: 8%;
  height: 32%;
  background:
    radial-gradient(ellipse at 17% 50%, #d8c8a4 0% 15%, transparent 16%),
    radial-gradient(ellipse at 50% 50%, #c9a961 0% 15%, transparent 16%),
    radial-gradient(ellipse at 83% 50%, #d8c8a4 0% 15%, transparent 16%);
}

/* 커피 테이블 (소파 옆) */
.of-coffee-table {
  left: 36%; top: 79%;
  width: 5%; height: 6%;
  background: linear-gradient(180deg, #5d4332 0%, #3d2c20 100%);
  border-radius: 50%;
  border: 1px solid #2e1f15;
}

/* 카펫 (라운지 영역) */
.of-rug {
  left: 22%; top: 80%;
  transform: translate(-50%, 0);
  width: 30%; height: 18%;
  background: radial-gradient(ellipse at 50% 50%, #a89878 0%, #6d5e48 60%, transparent 75%);
  border-radius: 50%;
  z-index: 0;
  opacity: 0.35;
  box-shadow: none;
}

/* 체크보드 (실행이 위 벽) */
.of-checkboard {
  right: 20%; top: 70%;
  transform: translate(50%, 0);
  width: 13%; height: 16%;
  background: #e0d4b8;
  border: 2px solid #6d5e48;
}

/* 화분 5개 (사방 액센트) */
.of-plant {
  position: absolute;
  width: 3.5%; height: 7%;
  box-shadow: none;
}
.of-plant::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0; height: 65%;
  background: radial-gradient(ellipse at 50% 60%, #6d8a78 0%, #3d5a48 60%, transparent 70%);
  border-radius: 50%;
}
.of-plant::after {
  content: '';
  position: absolute;
  bottom: 0; left: 25%;
  width: 50%; height: 35%;
  background: #5d4332;
  border-radius: 2px 2px 4px 4px;
}
.of-plant-1 { left: 5%; top: 92%; }
.of-plant-2 { right: 30%; top: 92%; width: 3%; height: 6%; }
.of-plant-3 { left: 35%; top: 24%; width: 2.5%; height: 5%; }
.of-plant-4 { right: 35%; top: 24%; width: 2.5%; height: 5%; }
.of-plant-5 { left: 6%; top: 36%; width: 3%; height: 6%; }

/* 카페 코너 (하단 중앙) — 우드 카운터 + 어두운 머신 */
.of-cafe {
  left: 50%; top: 87%;
  transform: translate(-50%, 0);
  width: 14%; height: 12%;
  background: linear-gradient(180deg, #6d4f3a 0%, #4a3322 100%);
  border: 1px solid #2e1f15;
  border-radius: 3px 3px 0 0;
}
.of-cafe::before {
  /* 카운터 상판 (밝은 우드) */
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 26%;
  background: #a87a4d;
  border-radius: 3px 3px 0 0;
}
.of-cafe::after {
  /* 에스프레소 머신 (좌) + 컵 줄 (우) */
  content: '';
  position: absolute;
  left: 8%; right: 8%; top: 32%; bottom: 12%;
  background:
    /* 머신 */
    linear-gradient(180deg, #2a2a30 0% 70%, #18181c 70% 100%) 0% 0% / 25% 100% no-repeat,
    /* 컵 4개 */
    radial-gradient(circle at 18% 60%, #e8d9bc 0 16%, transparent 18%) 30% 0% / 70% 100% no-repeat,
    radial-gradient(circle at 38% 60%, #e8d9bc 0 16%, transparent 18%) 30% 0% / 70% 100% no-repeat,
    radial-gradient(circle at 58% 60%, #e8d9bc 0 16%, transparent 18%) 30% 0% / 70% 100% no-repeat,
    radial-gradient(circle at 78% 60%, #e8d9bc 0 16%, transparent 18%) 30% 0% / 70% 100% no-repeat;
}

/* 액자 (좌측 벽) */
.of-picture {
  left: 9%; top: 3%;
  width: 6%; height: 5%;
  background: #d8c8a4;
  border: 2px solid #6d5e48;
  border-radius: 1px;
}

@keyframes of-led-blink {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.7; }
}

/* ===== 캐릭터 ===== */
.of-character {
  position: absolute;
  /* stage 폭에 비례 — 데스크탑 최대 200px, 화면 줄면 비례 축소 (모바일 전원 보이게) */
  width: clamp(44px, 15.6cqw, 200px); height: clamp(44px, 15.6cqw, 200px);
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 5;
  display: flex; flex-direction: column; align-items: center;
  /* left/top transition은 시퀀스 이동에 사용. transform/filter는 호버 효과. */
  transition: left 1.6s cubic-bezier(0.4, 0, 0.2, 1),
              top 1.6s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.2s;
}
.of-character {
  /* 항상 캐릭터 아래 부드러운 바닥 그림자 — 공중부양 방지 */
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.45));
}
.of-character.of-moving { z-index: 15; filter: drop-shadow(0 8px 14px rgba(0,0,0,0.6)); }
.of-character:hover { z-index: 20; }

.of-char-body {
  width: clamp(44px, 15.6cqw, 200px); height: clamp(44px, 15.6cqw, 200px);
  border-radius: clamp(8px, 1.9cqw, 24px);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(18px, 6.2cqw, 80px);
  font-weight: 800;
  color: white;
  position: relative;
  box-shadow: 0 10px 24px rgba(0,0,0,0.5);
  transition: transform 0.15s;
  /* placeholder 색상은 data-id 별 셀렉터에서 지정 */
}

.of-character[data-id="op"]    .of-char-body { background: var(--c-op); }
.of-character[data-id="con"]   .of-char-body { background: var(--c-con); }
.of-character[data-id="res"]   .of-char-body { background: var(--c-res); }
.of-character[data-id="coach"] .of-char-body { background: var(--c-coach); }
.of-character[data-id="exe"]   .of-char-body { background: var(--c-exe); }
.of-character[data-id="sys"]   .of-char-body { background: var(--c-sys); }

/* 자산 들어오면 색상 박스 위에 단일 포즈 이미지 덮음 (64×64 PNG 1장) */
.of-character.of-asset-ready .of-char-body {
  background-color: transparent !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  image-rendering: pixelated;
  box-shadow: none;
}
.of-character.of-asset-ready[data-id="op"]    .of-char-body { background-image: url('/office/assets/op.png') !important; }
.of-character.of-asset-ready[data-id="con"]   .of-char-body { background-image: url('/office/assets/con.png') !important; }
.of-character.of-asset-ready[data-id="res"]   .of-char-body { background-image: url('/office/assets/res.png') !important; }
.of-character.of-asset-ready[data-id="coach"] .of-char-body { background-image: url('/office/assets/coach.png') !important; }
.of-character.of-asset-ready[data-id="exe"]   .of-char-body { background-image: url('/office/assets/exe.png') !important; }
.of-character.of-asset-ready[data-id="sys"]   .of-char-body { background-image: url('/office/assets/sys.png') !important; }

/* idle = 단일 이미지든 placeholder든 위아래 살짝 끄덕거림 */
.of-character .of-char-body {
  animation: of-bob 2s ease-in-out infinite;
}
@keyframes of-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.of-character:hover .of-char-body { transform: scale(1.1); }

.of-char-label {
  margin-top: 10px;
  padding: 5px 14px;
  background: rgba(0,0,0,0.78);
  color: white;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

/* ===== 말풍선 (호버 시) ===== */
.of-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elev);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  width: 220px;
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  z-index: 30;
}
.of-tooltip::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--bg-elev);
}
.of-character:hover .of-tooltip { opacity: 1; }

.of-tooltip-name {
  font-weight: 800; color: var(--coral); font-size: 13px; margin-bottom: 4px;
}
.of-tooltip-role { color: var(--text-sub); font-size: 11px; margin-bottom: 6px; }
.of-tooltip-mission {
  margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border);
  color: var(--text); font-size: 11px;
}

/* ===== 상태 인디케이터 ===== */
.of-char-status {
  position: absolute;
  top: -4px; right: -4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--text-dim);
  border: 2px solid var(--bg);
}
.of-character[data-state="working"] .of-char-status { background: var(--gold); animation: of-pulse 1s ease-in-out infinite; }
.of-character[data-state="done"]    .of-char-status { background: var(--teal); }
.of-character[data-state="idle"]    .of-char-status { background: var(--text-dim); }

@keyframes of-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.6; }
}

/* ===== 모달 ===== */
.of-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.of-modal-backdrop[hidden] { display: none; }
.of-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  max-width: 480px; width: 100%;
  max-height: 80vh; overflow-y: auto;
  position: relative;
}
.of-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: transparent; border: none;
  color: var(--text-dim); font-size: 24px; cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px;
}
.of-modal-close:hover { color: var(--text); background: var(--bg-elev); }
.of-modal-head { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.of-modal-avatar {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: white;
}
.of-modal-name { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.of-modal-role { color: var(--text-sub); font-size: 13px; margin-top: 2px; }

.of-modal-section { margin-bottom: 16px; }
.of-section-label {
  font-size: 11px; color: var(--text-dim); font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px;
}
.of-modal-section ul { list-style: none; padding: 0; }
.of-modal-section ul li {
  padding: 6px 10px; background: var(--bg-elev); border-radius: 8px;
  margin-bottom: 4px; font-size: 13px;
}
.of-modal-section code {
  display: inline-block; padding: 4px 8px;
  background: var(--bg-elev); border-radius: 6px;
  font-family: ui-monospace, monospace; font-size: 12px;
  color: var(--coral);
}

/* ===== 시퀀스 말풍선 (workflow 재생 시 동적 생성) ===== */
.of-bubble {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: #1B1B2F;
  padding: 8px 14px;
  border-radius: 14px;
  border: 2px solid var(--bg);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  pointer-events: none;
  z-index: 25;
  opacity: 0;
  animation: of-bubble-pop 1.6s ease forwards;
}
.of-bubble::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: white;
  margin-top: -2px;
}
@keyframes of-bubble-pop {
  0%   { opacity: 0; transform: translateX(-50%) translateY(8px) scale(0.8); }
  15%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.05); }
  25%  { transform: translateX(-50%) translateY(0) scale(1); }
  85%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(0.95); }
}

/* ===== 워크플로우 컨트롤 패널 ===== */
.of-controls {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.of-btn {
  padding: 10px 16px;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.01em;
  transition: all 0.15s;
  display: flex; align-items: center; gap: 6px;
}
.of-btn:hover {
  background: var(--card-hover);
  border-color: var(--coral);
  color: var(--coral);
  transform: translateY(-1px);
}
.of-btn:active { transform: translateY(0); }
.of-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.of-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.of-btn.of-btn-stop {
  background: transparent;
  color: var(--text-sub);
  border-color: var(--border);
  margin-left: auto;
}
.of-btn.of-btn-stop:hover {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: var(--accent);
}
.of-btn-emoji { font-size: 16px; }

/* ===== 진행률 바 ===== */
.of-progress {
  margin: 14px 0 0;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0.4;
  transition: opacity 0.2s;
}
.of-progress.of-active { opacity: 1; }
.of-progress-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}
.of-progress-title { font-weight: 700; color: var(--text); }
.of-progress-count {
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.of-progress-bar {
  width: 100%; height: 6px;
  background: var(--bg-elev);
  border-radius: 999px;
  overflow: hidden;
}
.of-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--coral), var(--accent));
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* ===== 반응형 ===== */
@media (max-width: 700px) {
  body { padding: 14px 10px 60px; }
  .page-header h1 { font-size: 20px; }
  /* 캐릭터 크기는 .of-stage cqw 비례(clamp)로 자동 — px 고정 override 제거 (모바일 전원 보이게) */
  .of-char-label { font-size: 12px; }
  .of-tooltip { width: 180px; font-size: 11px; }
  .of-btn { padding: 8px 12px; font-size: 12px; }
  .of-bubble { font-size: 11px; padding: 6px 10px; }
}
