/* 얼굴 자동 모자이크: 왼쪽 결과, 오른쪽 설정 (휴대폰에서는 위아래) */
.mode-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-top: 16px; background: #fff; }
.mode-tabs button { border: 0; background: none; padding: 8px 26px; cursor: pointer; font-size: 15px; font-weight: 600; }
.mode-tabs button.active { background: var(--ink); color: #fff; }

.fb-layout { max-width: 1100px; margin: 12px auto 24px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.fb-options { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; }
.fb-options h2 { margin-bottom: 0; }
.fb-options input[type="range"] { width: 100%; }

.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 220px; padding: 24px; background: var(--card); border: 1.5px dashed #c8c8c8; border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--ink); background: #f4f4f4; }
.drop-title { display: inline-block; background: var(--ink); color: #fff; padding: 12px 26px; border-radius: 999px; font-weight: 700; font-size: 16px; }
.drop-sub { color: var(--ink-3); font-size: 13px; text-align: center; }

.styles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.styles button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px; cursor: pointer; font-size: 13.5px; }
.styles button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; }
.thumb { position: relative; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: #eee; }
.thumb.active { border-color: var(--ink); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .n { position: absolute; right: 3px; bottom: 3px; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; border-radius: 6px; padding: 0 5px; }
.thumb.add { display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--ink-3); border: 1.5px dashed #c8c8c8; background: #fff; }

.canvas-wrap { background: repeating-conic-gradient(#f1f1f1 0 25%, #fff 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; justify-content: center; touch-action: none; }
.canvas-wrap canvas { max-width: 100%; max-height: 70vh; height: auto; display: block; cursor: crosshair; }
#video-canvas { cursor: default; }
#video-canvas.drawing { cursor: crosshair; }

.progress { height: 6px; background: #ececec; border-radius: 3px; overflow: hidden; margin-top: 10px; }
.progress > i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }

#video-result { margin-top: 14px; }
#video-out { width: 100%; max-height: 60vh; background: #000; border-radius: 10px; margin-bottom: 10px; }

.fb-stage .actions { margin-top: 10px; }

@media (max-width: 860px) {
  .fb-layout { grid-template-columns: 1fr; }
  .fb-options { position: static; }
  .drop { min-height: 160px; }
}
