/* 셀러쇼츠 — 모바일 우선, 테일윈드풍(밝은 회색 바탕·흰 카드·둥근 모서리), 구글 폰트 Noto Sans KR */
:root {
  --bg: #f8fafc;            /* slate-50 */
  --card: #ffffff;
  --border: #e2e8f0;        /* slate-200 */
  --ink: #0f172a;           /* slate-900 */
  --ink-2: #475569;         /* slate-600 */
  --ink-3: #94a3b8;         /* slate-400 */
  --primary: #4f46e5;       /* indigo-600 */
  --primary-press: #4338ca; /* indigo-700 */
  --primary-soft: #eef2ff;  /* indigo-50 */
  --ok: #059669;            /* emerald-600 */
  --warn: #d97706;          /* amber-600 */
  --danger: #dc2626;        /* red-600 */

  --font: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --r-lg: 16px;
  --r-md: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, canvas, video { max-width: 100%; }

/* 휴대폰 폭 고정 열 — PC 에서도 같은 화면 */
.col { max-width: 440px; margin: 0 auto; padding: 0 16px; }

/* 상단바 */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(248,250,252,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar .inner { max-width: 440px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 17px; }
.logo-mark { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--ink); position: relative; flex: none; }
.logo-mark::after { content: ""; position: absolute; inset: 2.5px; border-radius: 50%; background: var(--primary); }
.topbar .spacer { flex: 1; }
.topbar a.plain { color: var(--ink-2); font-size: 14px; font-weight: 500; padding: 6px 8px; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--r-md);
  font-size: 16px; font-weight: 700;
  padding: 14px 20px; min-height: 48px;
  transition: background .12s ease, transform .08s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-press); }
.btn-primary:disabled { background: #c7d2fe; cursor: not-allowed; }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-line { background: #fff; color: var(--ink); border: 1px solid var(--border); }
.btn-block { width: 100%; }

/* 홈 */
.hero { text-align: center; padding: 52px 0 36px; }
.hero h1 { font-size: 32px; font-weight: 900; line-height: 1.3; letter-spacing: -0.03em; margin: 0 0 14px; }
.hero h1 .accent { color: var(--primary); }
.hero .sub { color: var(--ink-2); font-size: 16px; margin: 0 0 28px; }
.hero .sub b { color: var(--ink); }

.feature-list { display: grid; gap: 12px; padding-bottom: 40px; }
.feature {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 18px 18px; display: flex; gap: 14px; align-items: flex-start;
}
.feature .emoji { font-size: 24px; line-height: 1.2; flex: none; }
.feature b { display: block; font-size: 16px; margin-bottom: 2px; }
.feature p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; }

footer { padding: 28px 16px calc(44px + env(safe-area-inset-bottom)); text-align: center; color: var(--ink-3); font-size: 13px; }
footer p { margin: 4px 0; }

/* 만들기 화면 */
main.maker { padding: 16px 0 140px; }
.step {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 20px 18px; margin: 0 16px 14px;
}
@media (min-width: 441px) { .step { margin-left: auto; margin-right: auto; max-width: 408px; } }
.step h2 { font-size: 18px; font-weight: 800; margin: 0 0 4px; display: flex; align-items: center; gap: 9px; }
.step h2 .num {
  width: 24px; height: 24px; border-radius: 8px; flex: none;
  background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.step .hint { color: var(--ink-3); font-size: 13.5px; margin: 0 0 14px; line-height: 1.5; }

/* 사진·동영상 올리기 */
.dropzone {
  display: block; cursor: pointer;
  border: 1.5px dashed #cbd5e1; border-radius: var(--r-md);
  padding: 26px 14px; text-align: center; color: var(--ink-2); font-size: 15px;
  background: var(--bg);
}
.dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dropzone strong { color: var(--primary); font-weight: 700; }
.dropzone small { color: var(--ink-3); font-size: 12.5px; }

/* 화면에는 안 보이지만 label 터치로 열리는 파일 선택칸 (display:none 은 일부 모바일에서 안 열림) */
.sr-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0, 0, 0, 0); }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 12px; }
.thumb { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); aspect-ratio: 3/4; background: #0f172a; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ord { position: absolute; top: 5px; left: 5px; background: rgba(15,23,42,.75); color: #fff; font-size: 11px; border-radius: 6px; padding: 1px 6px; font-weight: 700; }
.thumb .kind { position: absolute; top: 5px; right: 5px; background: var(--primary); color: #fff; font-size: 10px; border-radius: 6px; padding: 1px 6px; font-weight: 700; }
.thumb .ops { position: absolute; bottom: 0; left: 0; right: 0; display: flex; }
.thumb .ops button { flex: 1; border: none; background: rgba(15,23,42,.6); color: #fff; font-size: 13px; padding: 7px 0; }
.thumb .ops button:active { background: var(--primary); }

/* 켜고 끄는 스위치 */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 12px 14px; background: var(--bg); border-radius: var(--r-md); }
.switch-row .txt b { font-size: 14.5px; display: block; }
.switch-row .txt span { font-size: 12.5px; color: var(--ink-3); }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; }
.switch .knob { position: absolute; inset: 0; background: #cbd5e1; border-radius: 100px; transition: background .15s; pointer-events: none; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .knob { background: var(--primary); }
.switch input:checked + .knob::after { left: 23px; }

/* 입력 */
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input[type="text"] {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--r-md);
  padding: 13px 14px; font-size: 16px; font-family: inherit;
  outline: none; background: #fff; color: var(--ink);
}
.field input[type="text"]:focus { border-color: var(--primary); }
.field input::placeholder { color: var(--ink-3); }

/* 템플릿 */
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tpl { border: 2px solid var(--border); border-radius: var(--r-md); padding: 0; overflow: hidden; background: #fff; text-align: center; }
.tpl.sel { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tpl .swatch { height: 56px; display: flex; align-items: center; justify-content: center; }
.tpl .swatch .chip { font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 8px; }
.tpl .meta { padding: 8px 6px 10px; }
.tpl .meta b { display: block; font-size: 13.5px; }
.tpl .meta span { font-size: 11.5px; color: var(--ink-3); }

/* 배경음악 */
.bgm-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg); border-radius: var(--r-md); margin-top: 4px; }
.bgm-box .info { flex: 1; min-width: 0; }
.bgm-box .info b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bgm-box .info span { font-size: 12.5px; color: var(--ink-3); }
.bgm-box .del { border: none; background: none; color: var(--danger); font-size: 14px; font-weight: 700; padding: 8px; }
.vol-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.vol-row label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); flex: none; }
.vol-row input[type="range"] { flex: 1; accent-color: var(--primary); height: 28px; }
.vol-row output { font-size: 13.5px; color: var(--ink-2); width: 40px; text-align: right; }

/* 미리보기 */
.preview-wrap { padding: 0 16px; }
.phone { background: #0f172a; border-radius: 22px; padding: 10px; box-shadow: var(--shadow); max-width: 300px; margin: 0 auto; }
.phone canvas { width: 100%; border-radius: 14px; display: block; background: #111; aspect-ratio: 9/16; }
.meta-line { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); text-align: center; }

.progress { height: 10px; border-radius: 8px; background: var(--border); overflow: hidden; margin: 12px 16px 0; display: none; }
.progress .bar { height: 100%; width: 0%; background: var(--primary); transition: width .15s; }
.status { margin: 10px 16px 0; font-size: 14px; color: var(--ink-2); text-align: center; min-height: 20px; line-height: 1.5; }
.status.ok { color: var(--ok); font-weight: 600; }
.status.warn { color: var(--warn); font-weight: 600; }

.notice {
  margin: 16px 16px 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 14px 16px; font-size: 12.5px; color: var(--ink-3); line-height: 1.6;
}
@media (min-width: 441px) { .notice, .preview-wrap { max-width: 440px; margin-left: auto; margin-right: auto; } }

/* 하단 고정 바 */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.bottombar .inner { max-width: 440px; margin: 0 auto; display: flex; gap: 10px; }
.bottombar .btn-line { flex: none; width: 54px; padding: 0; font-size: 18px; }
.bottombar .btn-primary { flex: 1; }
