/* 톤: 딥 그린블랙 + 볼트, 반투명 글래스 패널, 크게 둥근 카드, 필 버튼 + 원형 아이콘 */
:root {
  --bg: #0f1511;
  --ink: #0f1511;
  --deep: #2c302d;
  --cream: #f3f2e9;
  --volt: #e7fe55;
  --volt-2: #daed65;
  --text: #f3f2e9;
  --gray: #8d918c;
  --glass: rgba(243, 242, 233, 0.07);
  --glass-2: rgba(243, 242, 233, 0.12);
  --glass-line: rgba(243, 242, 233, 0.10);
  --blur: blur(22px) saturate(140%);
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --cond: "Barlow Condensed", "Arial Narrow", "Apple SD Gothic Neo", sans-serif;
  --body: "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { background: var(--bg); }
body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

/* 글래스 패널 뒤로 비쳐 보일 은은한 볼트 빛 */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 38% at 0% 18%, rgba(231, 254, 85, 0.22), transparent 70%),
    radial-gradient(55% 32% at 100% 78%, rgba(218, 237, 101, 0.12), transparent 70%),
    var(--bg);
}

[hidden] { display: none !important; }
button { font-family: inherit; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }

/* 공통 글래스 */
.glass, .upload, .stat-row, .line-btn, .seg, .chip, .back, .text-btn, .upload-change, .secondary, .modal-body {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}

/* ── 상단 ── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  padding: calc(10px + env(safe-area-inset-top)) 16px 0;
  background: rgba(15, 21, 17, 0.6);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-line);
}
.topbar-row { display: flex; align-items: center; gap: 10px; height: 40px; }
.back {
  display: grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border-radius: 12px; color: var(--text);
}
.back svg { width: 18px; height: 18px; stroke-width: 2.2; }
.brand { display: flex; align-items: center; font-family: var(--cond); font-weight: 800; font-size: 22px; letter-spacing: 1px; line-height: 1; }
.brand-mark { width: 30px; height: 30px; margin-right: 9px; }
.brand span { color: var(--volt); }
.step-count { margin-left: auto; font-family: var(--cond); font-weight: 600; font-size: 15px; letter-spacing: 1px; color: var(--gray); }
.step-count b { color: var(--text); font-weight: 700; }

.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 12px 0 10px; }
.step { background: none; border: 0; padding: 0; text-align: left; color: var(--gray); }
.step i { display: block; height: 3px; border-radius: 3px; background: var(--glass-2); margin-bottom: 7px; }
.step span { font-family: var(--cond); font-weight: 600; font-size: 12px; letter-spacing: 1.5px; }
.step.done i { background: var(--cream); }
.step.active i { background: var(--volt); box-shadow: 0 0 10px rgba(231, 254, 85, 0.6); }
.step.active span { color: var(--text); }

main { max-width: 560px; margin: 0 auto; padding: 24px 16px 0; }
.panel { display: none; }
.panel.active { display: block; }

h2, h3 { margin: 0; }
.hint { color: var(--gray); font-size: 14px; margin: 0; line-height: 1.55; }
.hint.small { font-size: 12px; }
.center { text-align: center; }

/* ── 단계 헤드라인 ── */
.step-head { margin-bottom: 22px; }
.step-head h2 {
  font-family: var(--cond); font-weight: 800; font-size: 56px; line-height: 0.9;
  letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 14px;
}
.step-head .hint { max-width: 300px; }

/* ── 업로드 카드 ── */
.upload {
  position: relative; display: block; overflow: hidden; cursor: pointer;
  border-radius: var(--r-lg);
  transition: transform .15s, border-color .2s;
}
.upload:active { transform: scale(0.99); }
.upload-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px 36px; }
.upload.tall .upload-empty { padding: 80px 20px 76px; }
.upload-icon {
  display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 18px;
  border-radius: 22px; background: var(--volt); color: var(--ink);
  box-shadow: 0 10px 30px -10px rgba(231, 254, 85, 0.7);
}
.upload-icon svg { width: 30px; height: 30px; stroke-width: 1.7; }
.upload-empty strong { font-family: var(--cond); font-weight: 700; font-size: 22px; letter-spacing: 1.2px; }
.upload-empty small { margin-top: 6px; font-size: 13px; color: var(--gray); }

.upload.filled { background: rgba(0, 0, 0, 0.35); }
.upload.filled .upload-empty { display: none; }
.upload img, .upload canvas { display: block; margin: 0 auto; max-width: 100%; max-height: min(440px, 52vh); object-fit: contain; }
.upload-change {
  display: none; position: absolute; right: 12px; bottom: 12px;
  padding: 9px 16px; border-radius: 999px;
  background: rgba(15, 21, 17, 0.55);
  font-family: var(--cond); font-weight: 700; font-size: 14px; letter-spacing: 1.5px; color: var(--text);
}
.upload.filled .upload-change { display: block; }

/* ── OCR 진행 ── */
.status { margin-top: 14px; font-size: 12px; color: var(--gray); }
.bar { height: 4px; border-radius: 4px; background: var(--glass-2); overflow: hidden; margin-bottom: 8px; }
.bar > div { height: 100%; width: 0; border-radius: 4px; background: var(--volt); transition: width .2s; }

/* ── 섹션 제목 ── */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 32px 0 12px; }
.section-head h3 { font-family: var(--cond); font-weight: 700; font-size: 20px; letter-spacing: 1px; }
.section-head h3 small { margin-left: 6px; font-family: var(--body); font-weight: 500; font-size: 12px; letter-spacing: 0; color: var(--gray); }

/* ── 기록 목록: 둥근 글래스 카드 ── */
.stat-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.stat-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) 48px 30px; column-gap: 12px; row-gap: 0; align-items: center;
  grid-template-areas: "chk label unit rm" "chk value unit rm";
  padding: 10px 10px 10px 14px; border-radius: var(--r-md);
}
.stat-row input[type="checkbox"] { grid-area: chk; }
.stat-row input.label { grid-area: label; }
.stat-row input.value { grid-area: value; }
.stat-row input.unit { grid-area: unit; }
.stat-row .remove { grid-area: rm; }
.stat-row.off { opacity: .4; }
.stat-row input[type="text"] {
  width: 100%; min-width: 0; background: transparent; color: var(--text);
  border: 0; border-bottom: 1px solid transparent; border-radius: 0; padding: 4px 0;
}
.stat-row input[type="text"]:focus { outline: none; border-bottom-color: var(--volt); }
.stat-row input.label { font-size: 11px; letter-spacing: 0.6px; color: var(--gray); padding: 0; }
.stat-row input.value { font-family: var(--cond); font-weight: 700; font-size: 26px; letter-spacing: 0.3px; }
.stat-row input.unit { font-size: 13px; color: var(--gray); }
.stat-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--glass-line); background: var(--glass);
}
.stat-row input[type="checkbox"]:checked {
  border-color: var(--volt);
  background: var(--volt) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%230f1511' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 15px no-repeat;
}
.stat-row .remove {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 50%; background: var(--glass-2); color: var(--gray); font-size: 13px;
}
.empty {
  color: var(--gray); font-size: 13px; padding: 18px; text-align: center;
  border-radius: var(--r-md); border: 1px dashed var(--glass-line);
}

/* ── 버튼: 필 + 오른쪽 원형 아이콘 ── */
.primary, .secondary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  height: 60px; border: 0; border-radius: 999px; padding: 0 8px 0 26px; text-decoration: none;
  font-family: var(--cond); font-weight: 800; font-size: 20px; letter-spacing: 2px;
  transition: transform .15s, background .2s, color .2s;
}
.primary:active, .secondary:active { transform: scale(0.98); }
.primary svg, .secondary svg {
  flex: none; width: 44px; height: 44px; padding: 13px; border-radius: 50%;
  stroke-width: 2.4; background: var(--ink); color: var(--volt);
}
.primary { background: var(--volt); color: var(--ink); box-shadow: 0 12px 34px -14px rgba(231, 254, 85, 0.8); }
.primary:disabled { background: var(--deep); color: var(--gray); box-shadow: none; }
.primary:disabled svg { background: var(--glass-2); color: var(--gray); }
.secondary { color: var(--text); justify-content: center; padding: 0 20px; }

.line-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  height: 52px; border-radius: 999px; color: var(--text);
  font-family: var(--cond); font-weight: 700; font-size: 16px; letter-spacing: 1.5px;
}
.line-btn svg { width: 26px; height: 26px; padding: 6px; border-radius: 50%; background: var(--volt); color: var(--ink); stroke-width: 2.6; }
.line-btn:active { background: var(--glass-2); }

.text-btn {
  padding: 9px 16px; border-radius: 999px; color: var(--text);
  font-family: var(--cond); font-weight: 700; font-size: 14px; letter-spacing: 1.5px;
}

/* 화면 아래 고정 버튼 */
.cta-bar {
  position: sticky; bottom: 0; z-index: 5; margin: 32px -16px 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(15, 21, 17, 0), var(--bg) 40%);
}

.raw { margin-top: 18px; color: var(--gray); font-size: 12px; }
.raw summary { cursor: pointer; }
.raw pre { white-space: pre-wrap; background: var(--glass); border-radius: var(--r-sm); padding: 12px; max-height: 220px; overflow: auto; }

/* ── 편집 화면 ── */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; }
.seg { display: flex; gap: 2px; padding: 4px; border-radius: 999px; }
.seg button {
  background: none; border: 0; color: var(--gray); padding: 8px 14px; border-radius: 999px;
  font-family: var(--cond); font-weight: 700; font-size: 15px; letter-spacing: 1.2px;
}
.seg button.on { background: var(--cream); color: var(--ink); }

.stage-wrap {
  position: relative;
  display: flex; justify-content: center; overflow: hidden; margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.4); border-radius: var(--r-lg); border: 1px solid var(--glass-line);
}
/* 미리보기 왼쪽 위 카운트업 토글 */
.motion-toggle {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px 8px 11px; border-radius: 999px; border: 1px solid var(--volt);
  background: var(--volt); color: var(--ink);
  font-family: var(--cond); font-weight: 700; font-size: 14px; letter-spacing: 1.2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.motion-toggle svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.motion-toggle.off {
  background: rgba(15, 21, 17, 0.72); color: var(--text); border-color: var(--glass-line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.motion-toggle[hidden] { display: none; }
.motion-hint { color: var(--volt); margin-top: 4px; }

#stage { display: block; max-width: 100%; max-height: min(68vh, calc(100vh - 300px)); max-height: min(68vh, calc(100dvh - 300px)); touch-action: none; }

/* 양식·필터 썸네일 */
.templates {
  display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px 6px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.templates::-webkit-scrollbar { display: none; }
.tpl {
  flex: 0 0 auto; background: none; border: 0; padding: 0; color: var(--gray);
  font-size: 12px; font-weight: 600; text-align: center; scroll-snap-align: start;
}
.tpl canvas {
  display: block; width: 96px; margin-bottom: 8px; border-radius: 16px;
  outline: 2px solid transparent; outline-offset: 2px;
}
.tpl.on { color: var(--text); }
.tpl.on canvas { outline-color: var(--volt); }
.tpl.filter canvas { width: 72px; height: 72px; object-fit: cover; border-radius: 20px; }

/* 글자 색: 팔레트처럼 원형 칩 */
.swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 36px)); gap: 8px; padding: 4px; }
.swatch {
  width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--glass-line); padding: 0;
  outline: 2px solid transparent; outline-offset: 3px;
}
.swatch.on { outline-color: var(--volt); }
.swatch.auto { background: var(--deep); color: var(--text); font-family: var(--cond); font-weight: 700; font-size: 11px; letter-spacing: 0.5px; }
.swatch.auto::after { content: 'AUTO'; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 9px 14px; border-radius: 999px; color: var(--ink); background: var(--cream); border-color: var(--cream); font-size: 13px; font-weight: 600; }
.chip.off { color: var(--gray); background: var(--glass); border-color: var(--glass-line); }

/* ── 결과 팝업 ── */
.modal {
  position: fixed; inset: 0; z-index: 50; background: rgba(15, 21, 17, 0.7);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-body { max-width: 400px; width: 100%; padding: 12px; border-radius: 32px; background: rgba(44, 48, 45, 0.6); }
.modal-body img { width: 100%; max-height: calc(100vh - 330px); max-height: calc(100dvh - 330px); object-fit: contain; display: block; border-radius: 22px; }
.save-tip {
  display: flex; align-items: center; gap: 14px; margin: 12px 0;
  padding: 14px 16px; border-radius: var(--r-md); background: var(--volt); color: var(--ink);
}
.save-tip-icon {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px;
  background: var(--ink); color: var(--volt);
}
.save-tip-icon svg { width: 24px; height: 24px; stroke-width: 1.8; }
.save-tip p { margin: 0; font-size: 14px; line-height: 1.4; }
.save-tip strong { font-size: 17px; font-weight: 800; }
.modal-body .row { display: flex; gap: 8px; }
.modal-body .row > * { flex: 1; }

.modal-body .save-row { margin-bottom: 8px; }
.modal-body .save-row .primary { padding: 0 6px 0 20px; font-size: 18px; }
.modal-body .save-row .primary svg { width: 40px; height: 40px; padding: 11px; }
.modal-body .row .secondary { height: 52px; font-size: 17px; }
.modal-body .new-card { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.brand { cursor: pointer; }

/* ── 로그인 화면 ── */
body.locked .topbar, body.locked main { display: none; }
.auth {
  min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: calc(32px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
}
.auth-inner { width: 100%; max-width: 380px; }
.auth-logo { width: 64px; height: 64px; margin-bottom: 28px; filter: drop-shadow(0 12px 30px rgba(231, 254, 85, 0.45)); }
.auth h1 {
  font-family: var(--cond); font-weight: 800; font-size: 72px; line-height: 0.88; letter-spacing: 0.5px;
  margin: 0 0 14px;
}
.auth h1 span { color: var(--volt); }
.auth-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 36px; }
.sns {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 56px; border: 0; border-radius: 999px; font-size: 16px; font-weight: 700;
  transition: transform .15s;
}
.sns:active { transform: scale(0.98); }
.sns svg { position: absolute; left: 20px; width: 22px; height: 22px; }
.google { background: #fff; color: #1f1f1f; }
.apple { background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); }
.auth-message {
  margin: 16px 0 0; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--glass); border: 1px solid var(--glass-line); color: var(--light, #e0e0e0); font-size: 13px; line-height: 1.5;
}
#devBypass { margin-top: 14px; }
.auth-legal { margin: 28px 0 0; color: var(--gray); font-size: 12px; line-height: 1.6; text-align: center; }
.auth-legal a { color: var(--text); }

/* ── 상단 계정 메뉴 ── */
.account { position: relative; margin-left: 12px; }
.account-btn {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: var(--volt); color: var(--ink); font-family: var(--cond); font-weight: 800; font-size: 16px;
}
.account-menu {
  position: absolute; right: 0; top: 44px; z-index: 20; min-width: 200px;
  display: flex; flex-direction: column; gap: 4px; padding: 16px;
  border-radius: var(--r-md); background: rgba(44, 48, 45, 0.92);
  border: 1px solid var(--glass-line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.account-menu strong { font-size: 15px; }
.account-menu small { color: var(--gray); font-size: 12px; margin-bottom: 10px; word-break: break-all; }
.account-menu .text-btn { align-self: flex-start; }
.account-menu .danger { margin-top: 6px; padding: 0; min-height: 0; font-size: 12px; letter-spacing: 0.5px; color: #ff7a6b; text-decoration: underline; }

/* ── 작은 화면(구형 안드로이드 등) 보정 ── */
.primary, .secondary, .line-btn, .text-btn, .seg button { white-space: nowrap; }

@media (max-width: 380px) {
  main { padding-left: 14px; padding-right: 14px; }
  .cta-bar { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .seg button { padding: 8px 10px; font-size: 14px; letter-spacing: 0.8px; }
  .text-btn { padding: 8px 12px; }
  .modal { padding: 10px; }
  .modal-body { padding: 10px; border-radius: 26px; }
  .save-tip { padding: 10px 12px; gap: 10px; margin: 10px 0; }
  .save-tip-icon { width: 38px; height: 38px; border-radius: 12px; }
  .save-tip p { font-size: 13px; }
  .save-tip strong { font-size: inherit; }
  .modal-body .save-row .primary { font-size: 16px; letter-spacing: 1.2px; padding: 0 5px 0 16px; }
  .modal-body .row .secondary { font-size: 15px; letter-spacing: 1px; padding: 0 10px; }
}

@media (max-height: 700px) {
  .step-head h2 { font-size: 48px; }
  .step-head { margin-bottom: 18px; }
  .cta-bar { margin-top: 24px; padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .primary, .secondary { height: 52px; font-size: 18px; }
  .primary svg, .secondary svg { width: 38px; height: 38px; padding: 11px; }
  .modal-body .row .secondary { height: 46px; }
  .upload-empty { padding: 30px 18px 28px; }
  .upload.tall .upload-empty { padding: 56px 18px 52px; }
  .upload-icon { width: 58px; height: 58px; margin-bottom: 14px; }
}
.step-count { white-space: nowrap; }
@media (max-width: 340px) {
  .topbar-row { gap: 8px; }
  .brand { font-size: 19px; }
  .brand-mark { width: 26px; height: 26px; margin-right: 7px; }
  .step-count { font-size: 13px; }
  .account { margin-left: 6px; }
  .account-btn { width: 30px; height: 30px; font-size: 14px; }
  .back { width: 34px; height: 34px; }
}

/* ── 앱 안 브라우저(카카오톡·인스타 등) 안내 배너 ── */
.inapp-banner {
  position: fixed; left: 10px; right: 10px; top: calc(10px + env(safe-area-inset-top)); z-index: 100;
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--volt); color: var(--ink); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  font-size: 13px; line-height: 1.45;
}
.inapp-banner p { margin: 0 0 10px; }
.inapp-banner strong { display: block; font-size: 15px; font-weight: 800; margin-bottom: 2px; }
.inapp-actions { display: flex; gap: 8px; }
.inapp-actions button {
  flex: 1; height: 40px; border: 0; border-radius: 999px; background: var(--ink); color: var(--volt);
  font-family: var(--cond); font-weight: 800; font-size: 14px; letter-spacing: 1px; white-space: nowrap;
}

/* ── 저장 팝업 안내: 버튼으로 오해하지 않게 박스 없이 글자만 ── */
.save-tip {
  display: block; margin: 14px 4px 12px; padding: 0;
  background: none; color: var(--gray); text-align: center;
}
.save-tip-icon { display: none; }
.save-tip p { margin: 0; font-size: 13px; line-height: 1.5; }
.save-tip strong { color: var(--text); font-size: inherit; font-weight: 500; }

/* ── CHANGE 버튼: 사진 오른쪽 위, 잘 보이게 ── */
.upload-change {
  top: 12px; right: 12px; bottom: auto;
  display: none; align-items: center; gap: 6px;
  padding: 9px 14px 9px 11px; border-radius: 999px;
  background: var(--volt); color: var(--ink); border: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  font-family: var(--cond); font-weight: 800; font-size: 14px; letter-spacing: 1.2px;
}
.upload-change svg { width: 15px; height: 15px; stroke-width: 2.4; }
.upload.filled .upload-change { display: flex; }

/* ── 단계 설명 앞 번호 (볼트) ── */
.step-hint { display: flex; align-items: flex-start; gap: 10px; }
/* 업로드 카드 안 단계 번호와 같은 모양: 볼트 원 + 검정 숫자 */
.hint-num {
  flex: none; width: 22px; height: 22px; margin-top: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--volt); color: var(--ink);
  font-family: var(--cond); font-weight: 800; font-size: 13px; line-height: 1;
}

/* ── 1단계 업로드 카드: 작은 볼트 아이콘 버튼 + 번호 2 안내 ── */
#recordDrop .upload-icon {
  width: 52px; height: 52px; margin-bottom: 14px; border-radius: 16px;
  box-shadow: 0 8px 22px -8px rgba(231, 254, 85, 0.7);
}
#recordDrop .upload-icon svg { width: 24px; height: 24px; }
/* 설명 앞 번호 2 (볼트 원) */
.upload-empty small.num-desc {
  display: flex; align-items: flex-start; justify-content: center; gap: 10px;
  max-width: 300px; margin-top: 10px; text-align: left; line-height: 1.5;
}

/* ── 랜딩: 결과물 예시 3×4 격자 ── */
.volt { color: var(--volt); }
body.on-landing .progress, body.on-landing .step-count { display: none; }
.showcase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.showcase img {
  display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: 14px; border: 1px solid var(--glass-line); background: var(--glass);
}
body.on-landing .account { margin-left: auto; }

/* ── MY RUNS: 보관함 ── */
.runs-entry { margin-bottom: 16px; }
.runs-entry b {
  min-width: 26px; padding: 2px 8px; border-radius: 999px; background: var(--volt); color: var(--ink);
  font-size: 14px; letter-spacing: 0.5px;
}
.runs-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.runs-bar[hidden] { display: none; }
.runs-bar span { color: var(--gray); font-size: 13px; }
.runs-bar div { display: flex; gap: 4px; }
.runs-delete { color: #ff7a6b; }
.runs-delete:disabled { opacity: 0.35; }
.runs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.run-tile {
  position: relative; padding: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 9 / 16;
  background: #000; border: 2px solid transparent; transition: border-color .15s, opacity .15s;
  opacity: 0.45;
}
.run-tile.on { border-color: var(--volt); opacity: 1; }
.run-tile img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* 오른쪽 위 선택 표시 */
.run-tile i {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(243, 234, 219, 0.8); background: rgba(15, 21, 17, 0.5);
}
.run-tile.on i { border-color: var(--volt); background: var(--volt); }
.run-tile.on i::after {
  content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid var(--ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.run-tile span {
  position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 999px;
  background: rgba(15, 21, 17, 0.7); color: var(--text); font-size: 11px; font-weight: 600;
}

/* ── 동영상 배경 ── */
.media-badge {
  position: absolute; left: 12px; top: 12px; padding: 5px 10px; border-radius: 999px;
  background: var(--ink); color: var(--volt); font-size: 12px; font-weight: 800; letter-spacing: 1.2px;
}
.modal-body video { width: 100%; max-height: calc(100vh - 330px); max-height: calc(100dvh - 330px); object-fit: contain; display: block; border-radius: 22px; background: #000; }
.rec-box { padding: 26px 22px; text-align: center; }
.rec-box strong { display: block; font-family: "Barlow Condensed", sans-serif; font-size: 24px; letter-spacing: 1.5px; margin-bottom: 14px; }
.rec-box .bar { height: 6px; }
.rec-box small { color: var(--gray); font-size: 13px; }

/* ── 영상 구간 자르기 ── */
.trim { position: relative; height: 64px; margin-top: 10px; border-radius: 14px; overflow: hidden; background: var(--glass); touch-action: none; user-select: none; -webkit-user-select: none; }
.trim canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.45; }
.trim-sel { position: absolute; top: 0; bottom: 0; border: 3px solid var(--volt); border-left-width: 16px; border-right-width: 16px; border-radius: 12px; cursor: grab; }
.trim-sel::before { content: ''; position: absolute; inset: 0; background: rgba(231, 254, 85, 0.06); }
.trim-h { position: absolute; top: 0; bottom: 0; width: 34px; }
.trim-h[data-h="l"] { left: -26px; }
.trim-h[data-h="r"] { right: -26px; }
.trim-h::after { content: ''; position: absolute; top: 50%; left: 50%; width: 3px; height: 20px; margin: -10px 0 0 -1.5px; border-radius: 2px; background: var(--ink); }
.trim-play { position: absolute; top: 4px; bottom: 4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--cream); box-shadow: 0 0 6px rgba(0,0,0,.6); pointer-events: none; }
