/* MGM스튜디오 (46차)
   디자인 토큰은 styles.css 의 :root 를 그대로 씁니다. 새 색을 만들지 않습니다.
   스튜디오 = "가상 스튜디오"라는 성격에 맞춰 상단만 --ink 로 어둡게 두고,
   실제 정보는 종이색(--paper) 위에 기존 카드 문법으로 얹습니다. */

/* ── 상단 카드 (hero · 탭 · 검색을 한 장으로 묶음) ──────────── */
/* 50차: 참고 이미지 반영. 화면 끝까지 채우던 먹색 띠를 '여백이 있는 둥근 카드'로 바꿨습니다.
   카드 위쪽 = 먹색 hero(우상단 금빛 글로우), 아래쪽 = 크림색 탭·검색 영역.
   MY 페이지 상단(.my-head)과 같은 문법을 씁니다. */
.st-topcard {
  margin: calc(10px + env(safe-area-inset-top)) 14px 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(214, 196, 160, .42);
  box-shadow: 0 8px 24px rgba(16, 13, 10, .13), 0 1px 2px rgba(16, 13, 10, .06);
}

/* ── 먹색 hero ───────────────────────────────────────────── */
.st-hero {
  position: relative; overflow: hidden;
  padding: 18px 18px 20px;
  color: var(--paper);
  background: linear-gradient(166deg, #2B2521 0%, #18140F 54%, #100D0A 100%);
}
/* 금빛 앰비언트 — 스튜디오 조명 느낌. 정보를 가리지 않도록 우상단 모서리에만 둡니다. */
.st-hero::after {
  content: ''; position: absolute; top: -110px; right: -70px; width: 260px; height: 260px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle,
    rgba(228, 192, 126, .42) 0%, rgba(200, 158, 92, .18) 38%, rgba(184, 137, 63, 0) 70%);
}
.st-hero > * { position: relative; z-index: 1; }
.st-hero .st-eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  color: rgba(233, 222, 203, .64); font-weight: 700; }
.st-hero h1 { font-family: var(--serif); font-size: 26px; font-weight: 800; letter-spacing: -.025em;
  margin: 8px 0 8px; color: #FBF5E7; }
.st-hero p { margin: 0; font-size: 12.5px; line-height: 1.68; color: rgba(245, 242, 235, .68); max-width: 320px; }

/* 파이프 칩 — 참고 이미지처럼 얇은 금테 알약 + '›' 구분자 */
.st-pipe { display: flex; align-items: center; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.st-pipe span { font-size: 10.5px; font-weight: 700; padding: 4.5px 10px; border-radius: 999px;
  border: 1px solid rgba(206, 174, 116, .50);
  background: rgba(255, 255, 255, .045);
  color: rgba(250, 244, 232, .90); white-space: nowrap; }
.st-pipe i { font-style: normal; font-size: 11.5px; line-height: 1; color: rgba(214, 186, 136, .58); }

/* ── 모드 전환 (스튜디오 / 내 상담) ───────────────────────── */
/* 카드 안쪽 크림 영역의 첫 줄. 활성 탭만 금장 밑줄을 긋습니다.
   (카드가 overflow:hidden 이라 이전의 position:sticky 는 동작하지 않아 제거했습니다.) */
.st-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: linear-gradient(180deg, #FBF8F1 0%, #F6F1E7 100%);
  border-bottom: 1px solid var(--line-2); }
.st-modes button { position: relative; height: 46px; font-size: 13.5px; font-weight: 700;
  color: var(--mute); letter-spacing: -.02em; }
.st-modes button.on { color: var(--ink); }
.st-modes button.on::after { content: ''; position: absolute; left: 16%; right: 16%; bottom: 0;
  height: 2px; border-radius: 1px;
  background: linear-gradient(90deg, #C2A05F 0%, #EBD3A0 45%, #8E6B31 100%); }
.st-modes button .st-n { font-family: var(--mono); font-size: 11px; margin-left: 4px; color: var(--brass); }

/* ── 카드 안 검색창 ──────────────────────────────────────── */
.st-searchwrap { padding: 12px 14px 14px; background: linear-gradient(180deg, #FBF8F1 0%, #F6F1E7 100%); }
.st-search { display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  border: 1px solid #DCD3C5; border-radius: 999px;
  background: #FDFBF7;
  box-shadow: inset 0 1px 2px rgba(120, 92, 42, .05); }
.st-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none;
  background: transparent; font-size: 13.5px; color: var(--ink); }
.st-search input::placeholder { color: #8C8275; }

/* ── 물건 카드 ────────────────────────────────────────────── */
.st-list { padding: 16px 20px 8px; display: grid; gap: 14px; }
.st-card { display: block; width: 100%; text-align: left; background: var(--card);
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden; transition: transform .18s; }
.st-card:active { transform: scale(.99); }
.st-card .ph { position: relative; aspect-ratio: 16 / 9; background: var(--ink); overflow: hidden; }
.st-card .ph img { width: 100%; height: 100%; object-fit: cover; opacity: .95; }
.st-card .ph .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(18,32,28,.60); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.st-card .ph .st-tag { position: absolute; left: 10px; top: 10px; }
.st-card .ph .st-ai { position: absolute; right: 10px; bottom: 10px; font-size: 10px; font-weight: 700;
  padding: 3px 7px; border-radius: 2px; background: rgba(18,32,28,.78); color: rgba(245,242,235,.92); letter-spacing: .02em; }
.st-card .body { padding: 13px 14px 15px; }
.st-card h3 { margin: 0 0 5px; font-size: 16px; font-weight: 800; letter-spacing: -.03em; }
.st-card .goal { font-size: 13px; color: var(--ink-2); font-weight: 600; margin-bottom: 4px; }
.st-card .meta { font-size: 12px; color: var(--mute); display: flex; flex-wrap: wrap; gap: 4px 8px; }
.st-card .meta b { color: var(--brass); font-weight: 700; }

/* 상태 배지 — 스펙 §2.3 코드값 */
.st-st { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 2px;
  font-size: 11px; font-weight: 700; white-space: nowrap; flex: none; }
.st-st.ACTIVE { background: var(--accent); color: #fff; }
.st-st.PAUSED { background: var(--ink); color: #fff; }
.st-st.SOLD { background: #EEF0EC; color: var(--mute); }
.st-st.REVIEW { background: var(--brass-soft); color: #7A5A22; }

/* ── 상세 ─────────────────────────────────────────────────── */
.st-detail-top { background: var(--ink); padding-bottom: 4px; }
.st-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.st-frame iframe, .st-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.st-titlebox { padding: 15px 20px 18px; }
.st-titlebox .st-st { margin-bottom: 8px; }
.st-titlebox h2 { font-family: var(--serif); font-size: 22px; font-weight: 800; margin: 0 0 4px;
  color: var(--paper); letter-spacing: -.02em; line-height: 1.3; }
.st-titlebox .sub { font-size: 12.5px; color: rgba(245,242,235,.66); }

.st-spec { display: grid; grid-template-columns: 84px 1fr; gap: 0; padding: 4px 0 0; }
.st-spec dt { font-size: 12px; font-weight: 700; color: var(--mute); padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.st-spec dd { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); padding: 11px 0;
  border-bottom: 1px solid var(--line-2); line-height: 1.5; }
.st-spec dd.pri { color: var(--ink); font-weight: 800; font-size: 14.5px; letter-spacing: -.02em; }
.st-spec dt:last-of-type, .st-spec dd:last-of-type { border-bottom: 0; }

.st-sec { padding: 20px 20px 0; }
.st-sec h4 { margin: 0 0 10px; font-size: 13.5px; font-weight: 800; letter-spacing: -.02em; }
.st-points { display: grid; gap: 8px; }
.st-points li { list-style: none; display: flex; gap: 9px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.st-points li i { font-style: normal; flex: none; width: 17px; height: 17px; margin-top: 2px; border-radius: 2px;
  background: var(--brass-soft); color: #7A5A22; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }

/* AI 고지 · 법적 고지 — 스펙 §3.5, 유튜브 'AI 사용' 공개 요건 */
.st-ai { margin: 20px 20px 0; padding: 13px 15px; border-radius: 4px;
  background: #E7F0F4; border-left: 3px solid #23405A; }
.st-ai b { display: block; font-size: 12.5px; color: #23405A; margin-bottom: 4px; }
.st-ai span { font-size: 12px; line-height: 1.6; color: #2F5670; }

.st-legal { margin: 14px 20px 0; padding: 14px 15px; border-radius: 4px;
  background: var(--brass-soft); border-left: 3px solid var(--brass); }
.st-legal b { display: block; font-size: 12px; color: #5A4419; margin-bottom: 6px; letter-spacing: .02em; }
.st-legal p { margin: 0; }
.st-legal li { font-size: 11.5px; line-height: 1.72; color: #7A5A22; }

/* 하단 CTA — 탭바(64px) 위에 고정 */
.st-cta { position: sticky; bottom: 0; z-index: 6; display: flex; gap: 8px;
  background: var(--paper); border-top: 1px solid var(--line);
  padding: 11px 20px calc(11px + env(safe-area-inset-bottom)); }
.st-cta .btn { height: 48px; font-size: 14.5px; }
.st-cta .btn.call { background: var(--ink); color: #fff; flex: 1; }
.st-cta .btn.form { background: var(--accent); color: #fff; flex: 1; }
.st-cta .btn.ico { width: 48px; flex: none; border: 1px solid var(--line); background: var(--card); }

/* ── 상담 신청 시트 ───────────────────────────────────────── */
.st-field { margin-bottom: 15px; }
.st-field > label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.st-field > label i { font-style: normal; color: var(--accent); }
.st-field .input { height: 48px; }
.st-agree { display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border-radius: 4px;
  background: var(--card); border: 1px solid var(--line); margin-bottom: 14px; cursor: pointer; }
.st-agree input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--ink); }
.st-agree span { font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.st-agree span b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.st-note { font-size: 11px; line-height: 1.65; color: var(--mute-2); margin-top: 12px; }

/* 자동 등록 결과 */
.st-done { text-align: center; padding: 10px 4px 4px; }
.st-done .mark { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--forest); color: #fff; display: grid; place-items: center; }
.st-done h3 { margin: 0 0 8px; font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.st-done p { margin: 0 0 4px; font-size: 13px; line-height: 1.65; color: var(--mute); }
.st-flowbox { margin: 18px 0 0; padding: 0; display: grid; gap: 1px; background: var(--line-2); border-radius: 4px; overflow: hidden; text-align: left; }
.st-flowbox li { list-style: none; background: var(--card); padding: 11px 14px; display: flex; gap: 9px; align-items: flex-start; }
.st-flowbox li i { font-style: normal; flex: none; width: 18px; height: 18px; border-radius: 50%;
  font-size: 10px; font-weight: 800; display: grid; place-items: center; margin-top: 1px;
  background: var(--line); color: var(--mute); }
.st-flowbox li.on i { background: var(--forest); color: #fff; }
.st-flowbox li b { display: block; font-size: 12.5px; font-weight: 700; }
.st-flowbox li small { font-size: 11px; color: var(--mute); line-height: 1.55; }

/* ── 내 상담 (로그인 회원) ────────────────────────────────── */
.st-lead { display: flex; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.st-lead:last-child { border-bottom: 0; }
.st-lead .av { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--paper);
  display: grid; place-items: center; font-size: 14px; font-weight: 800; color: var(--forest); }
.st-lead .info { flex: 1; min-width: 0; }
.st-lead .info b { font-size: 14px; font-weight: 700; }
.st-lead .info .sm { font-size: 12px; color: var(--mute); line-height: 1.55; margin-top: 2px; }
.st-lead .lk { flex: none; font-size: 10.5px; font-weight: 700; padding: 3px 7px; border-radius: 2px; align-self: flex-start; white-space: nowrap; }
.st-lead .lk.연결완료 { background: #E4F2EA; color: var(--ok); }
.st-lead .lk.연결대기 { background: var(--brass-soft); color: #7A5A22; }
.st-lead .lk.중복 { background: #EEF0EC; color: var(--mute); }
.st-lead .lk.보류 { background: #F7E6E1; color: var(--accent); }

/* 연결 현황 요약 */
.st-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden; margin: 0 20px; }
.st-sum div { background: var(--card); padding: 14px 8px; text-align: center; }
.st-sum b { display: block; font-family: var(--mono); font-size: 19px; font-weight: 700; color: var(--ink); }
.st-sum span { display: block; font-size: 11px; color: var(--mute); margin-top: 3px; }

/* ── 연동 안내 (외부 서비스) ──────────────────────────────── */
.st-conn { margin: 18px 20px 0; padding: 14px 15px; border: 1px dashed var(--line); border-radius: 4px; }
.st-conn b { display: block; font-size: 12px; font-weight: 800; color: var(--ink-2); margin-bottom: 8px; }
.st-conn .r { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--mute); padding: 5px 0; }
.st-conn .r i { font-style: normal; width: 6px; height: 6px; border-radius: 50%; background: var(--mute-2); flex: none; }
.st-conn .r.on i { background: var(--ok); }
.st-conn .r span { flex: 1; }
.st-conn .r em { font-style: normal; font-weight: 700; color: var(--ink-2); }

/* 좁은 화면 보정 */
/* 50차: 파이프 칩 4개가 한 줄에 들어가도록 폭을 줄입니다.
   실측 — 칩 4개 + '›' 3개 + gap 6px = 297px, 가용폭은 (화면폭 - 66px)이라
   375px 미만(가용 ≤309 → 361~374px는 295~308)에서는 2줄로 접혔습니다.
   gap 4px · 좌우 패딩 8px 로 줄이면 269px 이 되어 360px(가용 294)까지 한 줄에 들어갑니다. */
@media (max-width: 374px) {
  .st-pipe { gap: 4px; }
  .st-pipe span { padding: 4px 8px; }
}
/* 320px대에서는 한 번 더 조입니다(실측 231px / 가용 254px). */
@media (max-width: 340px) {
  .st-pipe { gap: 3px; }
  .st-pipe span { padding: 4px 6px; font-size: 10px; }
  .st-pipe i { font-size: 10.5px; }
}
@media (max-width: 360px) {
  .st-hero h1 { font-size: 22px; }
  .st-spec { grid-template-columns: 72px 1fr; }
  .st-cta { padding-left: 14px; padding-right: 14px; }
  .st-cta .btn { font-size: 13.5px; }
}
