/* 인스타 비서 — 모체와 같은 파스텔 톤(핑크), 휴대폰 먼저 */
:root { --bg: #fbf7fa; --card: #fff; --ink: #1d1a22; --muted: #6f6878; --line: #ece4ec; --pink: #e0457b; --pink2: #fde7ef; --warn: #b4441a; --warnbg: #fff1e8; --ok: #1f7a57; --okbg: #eaf7f1; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Pretendard Variable', Pretendard, 'Noto Sans KR', sans-serif; font-size: 16px; line-height: 1.65; }
a { color: var(--pink); }
.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: rgb(255 255 255 / .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, #ff9ab8, #e0457b); }
.brand b { font-size: 18px; }
.brand .sub { font-size: 14px; color: var(--muted); }
.who { display: flex; gap: 14px; font-size: 15px; color: var(--muted); align-items: center; }
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 96px; }
h1 { font-size: 26px; margin: 8px 0 8px; letter-spacing: -.02em; }
h2 { font-size: 18px; margin: 0; }
.lead { color: var(--muted); margin: 0 0 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin-bottom: 16px; box-shadow: 0 6px 20px rgb(224 69 123 / .05); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.fld em { font-style: normal; font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--pink2); border-color: var(--pink); }
.row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; }
.actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.top-actions { justify-content: space-between; margin-bottom: 16px; }
.status { margin-right: auto; color: var(--muted); font-size: 15px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.primary { background: linear-gradient(135deg, #f0628f, #d83a72); color: #fff; border: 0; }
.btn[disabled] { opacity: .5; cursor: default; }
.h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.copy { font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--pink2); color: var(--pink); border-radius: 10px; padding: 8px 12px; cursor: pointer; min-height: 40px; }
.titles { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.titles li { font-size: 17px; font-weight: 600; }
.titles button { margin-left: 8px; font-size: 13px; padding: 4px 8px; min-height: 32px; }
.big { font-size: 20px; font-weight: 700; margin: 0; }
.pre { white-space: pre-wrap; margin: 0 0 10px; }
.tags { color: var(--pink); margin: 0; word-break: keep-all; }
.scene { display: grid; grid-template-columns: 88px 1fr; gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.scene:last-child { border-bottom: 0; }
.scene .sec { color: var(--pink); font-weight: 700; font-size: 15px; }
.scene .screen { font-weight: 700; }
.scene .voice { grid-column: 2; color: #3c3644; }
.chk { border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.chk.bad { background: var(--warnbg); color: var(--warn); border: 1px solid #f6c9b0; }
.chk.ok { background: var(--okbg); color: var(--ok); border: 1px solid #bfe6d3; }
.chk ul { margin: 6px 0 0; padding-left: 20px; }
.chk b.tag { display: inline-block; font-size: 13px; padding: 1px 8px; border-radius: 999px; background: #fff; margin-right: 6px; }
.banner { background: #fff7e0; border: 1px solid #f1d88a; color: #6e5300; border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; }
.foot { color: var(--muted); font-size: 14px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--pink); border-radius: 50%; animation: sp .8s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1d1a22; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; z-index: 20; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } .scene { grid-template-columns: 1fr; } .scene .voice { grid-column: 1; } h1 { font-size: 23px; } }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hook { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.hook.rec { border-color: var(--pink); background: var(--pink2); }
.hook .t { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hook .t b { color: var(--pink); }
.hook .line { font-size: 19px; font-weight: 700; margin: 4px 0; }
.hook .sub { font-size: 15px; color: #3c3644; }
.kw { margin: 0 0 8px; color: var(--muted); }
.kw b { color: var(--ink); margin-left: 6px; }
.plain { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

.grow { flex: 1; }
.print-head { display: none; }
/* PDF로 저장(인쇄)할 때: 메뉴·버튼은 빼고 내용만 */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff; font-size: 12.5pt; }
  .top, .top-actions, .copy, .toast, #v-form, #v-login, .banner { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .print-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--pink); padding-bottom: 6px; margin-bottom: 14px; font-size: 15pt; }
  .print-head span { font-size: 10.5pt; color: var(--muted); }
  .card, .chk { box-shadow: none; break-inside: avoid; page-break-inside: avoid; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
  .hook { break-inside: avoid; }
  .scene { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* 위쪽 탭 · 내 콘텐츠 팩 */
.tabs { display: flex; gap: 6px; }
.tabs button { font: inherit; font-size: 15px; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 8px 14px; min-height: 40px; cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--pink2); color: var(--pink); border-color: var(--pink); font-weight: 700; }
.packs { list-style: none; margin: 0; padding: 0; }
.packs li { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.packs li:last-child { border-bottom: 0; }
.packs .open { flex: 1; min-width: 0; text-align: left; font: inherit; background: none; border: 0; padding: 14px 4px; cursor: pointer; display: grid; gap: 2px; }
.packs .open b { font-size: 17px; overflow-wrap: anywhere; }
.packs .open span { font-size: 14px; color: var(--muted); }
.packs .open:hover b { color: var(--pink); }
.copy.really { background: var(--warn); color: #fff; border-color: var(--warn); }
@media print { .tabs { display: none !important; } }
@media (max-width: 560px) { .top { gap: 8px; } .tabs button { padding: 6px 10px; font-size: 14px; } }
