/* THREAD AUTOPILOT — 커머스 자동화 SaaS UI (모바일 우선) */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f1f3f6; --border: #e3e6eb; --text: #14171c; --muted: #5d6673; --faint: #8a93a0;
  --brand: #3b5bfd; --brand-ink: #ffffff; --brand-soft: #eef1ff;
  --ok: #138a52; --ok-soft: #e7f6ee; --warn: #b26a00; --warn-soft: #fff4e0; --bad: #c62d3a; --bad-soft: #fdecee; --info-soft: #eaf3ff;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --sidebar: 236px; --topbar: 56px; --bottombar: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1216; --surface: #161a20; --surface-2: #1d222a; --border: #2a313b; --text: #e8ebef; --muted: #a3acb8; --faint: #7a8490;
    --brand: #6f8bff; --brand-ink: #0b0d12; --brand-soft: #1e2645; --ok: #3ccb83; --ok-soft: #12291e; --warn: #f0a83a; --warn-soft: #2c2312;
    --bad: #ff6b78; --bad-soft: #301a1d; --info-soft: #172334; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1216; --surface: #161a20; --surface-2: #1d222a; --border: #2a313b; --text: #e8ebef; --muted: #a3acb8; --faint: #7a8490;
  --brand: #6f8bff; --brand-ink: #0b0d12; --brand-soft: #1e2645; --ok: #3ccb83; --ok-soft: #12291e; --warn: #f0a83a; --warn-soft: #2c2312;
  --bad: #ff6b78; --bad-soft: #301a1d; --info-soft: #172334; --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--brand); text-decoration: none; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
h1 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }
small, .muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 레이아웃 ---------- */
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px; font-weight: 800; letter-spacing: .02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 14px; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: 0; }
.nav { padding: 6px 10px; overflow-y: auto; flex: 1; }
.nav-group { margin: 12px 8px 4px; font-size: 11px; font-weight: 700; color: var(--faint); letter-spacing: .04em; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; min-height: 40px; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .badge { margin-left: auto; }
.sidebar-foot { padding: 12px 14px; border-top: 1px solid var(--border); font-size: 13px; }
.main { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; gap: 10px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar .title { font-weight: 700; font-size: 16px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
.content { padding: 24px; max-width: 1180px; width: 100%; margin: 0 auto; flex: 1; }
.bottombar { display: none; }
.scrim { display: none; }

@media (max-width: 920px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; width: min(84vw, 300px); box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }
  .main { margin-left: 0; }
  .menu-btn { display: grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 16px 16px calc(var(--bottombar) + 24px); }
  .bottombar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--bottombar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); z-index: 20; }
  .bottombar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); }
  .bottombar a.active { color: var(--brand); font-weight: 700; }
  .bottombar svg { width: 22px; height: 22px; }
  .has-actionbar .content { padding-bottom: calc(var(--bottombar) + 96px); }
}

/* ---------- 공통 컴포넌트 ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 920px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .12s; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn.block { width: 100%; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); outline: none; }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.6; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.hint { font-size: 12.5px; color: var(--muted); }
.counter { font-size: 12px; color: var(--faint); text-align: right; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

.alert { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; border: 1px solid transparent; }
.alert.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.alert.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert.info { background: var(--info-soft); }
.alert b { display: block; margin-bottom: 2px; }
.alert .code { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--faint); }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat .value { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--faint); }

.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { width: 36px; height: 36px; color: var(--faint); margin: 0 auto 8px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; min-height: 42px; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 0 12px; min-height: 36px; border-radius: 8px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* 체크 카드 (넓은 터치 영역) */
.check-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; min-height: 64px; }
.check-card input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.check-card.on { border-color: var(--brand); background: var(--brand-soft); }
.check-card b { display: block; }
.check-card small { display: block; }

/* 스레드 게시물 카드 */
.post { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 12px; }
.post .thumb { width: 72px; height: 96px; border-radius: 8px; background: var(--surface-2); object-fit: cover; }
.post .text { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
.metrics { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.metrics b { color: var(--text); font-variant-numeric: tabular-nums; }

/* 미디어 그리드 */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; min-width: 0; }
.media .frame { aspect-ratio: 3/4; background: var(--surface-2); position: relative; cursor: zoom-in; }
.media .frame img, .media .frame video { width: 100%; height: 100%; object-fit: cover; }
.media .frame .tag { position: absolute; left: 6px; top: 6px; }
.media .frame .order { position: absolute; right: 6px; top: 6px; background: rgba(0,0,0,.6); color: #fff; border-radius: 6px; padding: 0 6px; font-size: 12px; font-weight: 700; }
.media .frame .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; pointer-events: none; }
.media .frame .play svg { width: 36px; height: 36px; filter: drop-shadow(0 1px 4px rgba(0,0,0,.5)); }
.media .meta { padding: 8px 10px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.media .meta .row { gap: 4px; }
.media.excluded .frame { opacity: .4; }
.media .acts { display: flex; border-top: 1px solid var(--border); }
.media .acts button { flex: 1; border: 0; background: none; min-height: 38px; cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 600; }
.media .acts button + button { border-left: 1px solid var(--border); }
.media .acts button:hover { background: var(--surface-2); color: var(--text); }

/* 작업 단계 */
.stepper { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 6px; margin-bottom: 16px; }
.stepper a { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; min-width: 0; }
.stepper a .bar { height: 4px; border-radius: 4px; background: var(--border); }
.stepper a.done .bar { background: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.stepper a.current { color: var(--brand); }
.stepper a.current .bar { background: var(--brand); }
.stepper a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .stepper a span { display: none; } .stepper a.current span { display: block; position: absolute; left: 0; right: 0; top: 12px; } .stepper { position: relative; padding-bottom: 24px; } }
.product-head { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 12px; align-items: center; margin-bottom: 14px; }
.product-head img, .product-head .ph { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.product-head .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actionbar { position: sticky; bottom: 0; margin: 18px -24px -24px; padding: 12px 24px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; z-index: 10; }
@media (max-width: 920px) { .actionbar { position: fixed; left: 0; right: 0; bottom: calc(var(--bottombar) + env(safe-area-inset-bottom)); margin: 0; padding: 10px 16px; } }
.actionbar .btn { flex: none; }
.actionbar .grow { flex: 1; min-width: 0; font-size: 13px; }

/* 비용 미터 */
.meter { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; position: relative; }
.meter > i { position: absolute; inset: 0 auto 0 0; background: var(--ok); border-radius: 999px; }
.meter.warn > i { background: var(--warn); }
.meter.bad > i { background: var(--bad); }
.cost-big { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.timeline { display: flex; height: 34px; border-radius: 8px; overflow: hidden; gap: 2px; }
.timeline > div { display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; min-width: 0; overflow: hidden; white-space: nowrap; }
.tl-real { background: #0f9d6b; } .tl-ai { background: #6b5bfd; } .tl-motion { background: #c28a12; }

/* 진행 상태 */
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.steps-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.steps-list .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--faint); font-size: 12px; font-weight: 700; }
.steps-list .ic.ok { background: var(--ok-soft); color: var(--ok); }
.steps-list .ic.bad { background: var(--bad-soft); color: var(--bad); }
.steps-list .ic.run { background: var(--brand-soft); color: var(--brand); }

/* 모달·토스트 */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 16px; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 20px; }
.modal.wide { width: min(900px, 100%); }
.modal.media-view { background: #000; padding: 0; width: auto; max-width: 96vw; }
.modal.media-view img, .modal.media-view video { max-height: 88vh; max-width: 96vw; margin: auto; }
.toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast { background: var(--text); color: var(--bg); padding: 12px 14px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.bad { background: var(--bad); color: #fff; }

/* 인증 화면 */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: min(420px, 100%); padding: 26px; }
.auth .brand { padding: 0 0 18px; }

.kv { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 6px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.evidence td:first-child { white-space: nowrap; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--faint); padding: 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--muted); font-size: 13px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 16px; }
@keyframes sk { to { background-position: -200% 0; } }
.hide-mobile { } @media (max-width: 600px) { .hide-mobile { display: none !important; } }
.only-mobile { display: none; } @media (max-width: 600px) { .only-mobile { display: initial; } }

/* ---------- 쇼핑 스레드 만들기 (통합 흐름) ---------- */
.hero { border-radius: 16px; padding: 22px 24px; margin-bottom: 14px; color: #fff; background: linear-gradient(120deg, #173f35 0%, #1f5a49 55%, #2f7a60 100%); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%); }
.hero h1 { font-size: 24px; margin: 6px 0 4px; }
.hero p { margin: 0; opacity: .85; font-size: 14px; }
.hero-kicker { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 700; color: #b9f5d8; }
.hero-kicker svg { width: 15px; height: 15px; }
.flow { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.flow a { display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: var(--muted); font-weight: 600; font-size: 14px; border-right: 1px solid var(--border); border-bottom: 3px solid transparent; min-width: 0; }
.flow a:last-child { border-right: 0; }
.flow a .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 13px; flex: none; }
.flow a .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow a.current { color: var(--text); background: color-mix(in srgb, #1f5a49 9%, var(--surface)); border-bottom-color: #1f5a49; }
.flow a.current .num { background: #1f5a49; color: #fff; }
.flow a.done .num { background: color-mix(in srgb, #1f5a49 22%, var(--surface)); color: #1f5a49; }
.flow a.locked { opacity: .55; cursor: default; }
@media (max-width: 720px) { .flow a { flex-direction: column; gap: 4px; padding: 10px 4px; font-size: 11.5px; text-align: center; } }
@media (max-width: 380px) { .flow a .lbl { display: none; } .flow a.current .lbl { display: block; } }
.create-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 14px; align-items: start; }
.create-side { position: sticky; top: calc(var(--topbar) + 12px); display: flex; flex-direction: column; gap: 14px; }
.create-side .card + .card { margin-top: 0; }
@media (max-width: 1080px) { .create-grid { grid-template-columns: minmax(0,1fr); } .create-side { position: static; } }
.create-main .card { margin-bottom: 14px; }
.create-main .card + .card { margin-top: 0; }
.th-phone { border: 1px solid var(--border); border-radius: 18px; padding: 12px; background: var(--surface); }
.th-top { text-align: center; font-weight: 800; font-size: 15px; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.th-post { display: flex; gap: 10px; }
.th-reply { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.th-av { width: 34px; height: 34px; border-radius: 50%; background: #1f5a49; color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.th-av.sm { width: 26px; height: 26px; font-size: 12px; }
.th-user { font-weight: 700; font-size: 13px; }
.th-text { white-space: pre-wrap; font-size: 13.5px; line-height: 1.5; margin-top: 2px; word-break: break-word; max-height: 320px; overflow: auto; }
.th-media { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; }
.th-m { width: 110px; flex: none; aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; background: var(--surface-2); position: relative; }
.th-m img { width: 100%; height: 100%; object-fit: cover; }
.th-vid { position: absolute; left: 4px; bottom: 4px; }
.th-icons { color: var(--muted); font-size: 15px; margin-top: 8px; }
.pchip { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; min-height: 38px; padding: 0 14px; font-weight: 600; cursor: pointer; color: var(--muted); }
.pchip.on { border-color: #e2602b; color: #d2511d; background: color-mix(in srgb, #e2602b 8%, var(--surface)); }
.gen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.gen { text-align: left; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 76px; }
.gen small { color: var(--muted); font-size: 12px; }
.gen.on { border-color: #e2602b; background: color-mix(in srgb, #e2602b 7%, var(--surface)); }
.media.picked { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.card-head h3 svg, .card-head h2 svg { width: 16px; height: 16px; vertical-align: -3px; }
@media (max-width: 600px) { .hero { padding: 14px 16px; } .hero h1 { font-size: 19px; margin: 2px 0 0; } .hero p { display: none; } }
.ref-item.on { border-color: #e2602b !important; background: color-mix(in srgb, #e2602b 6%, var(--surface)); }
