/* 03 광고 레퍼런스: 팀 화면 03번 카드 색(옐로)을 왼쪽 메뉴에, 본문은 무채색. 매체만 대표색 */
:root { --agent: #ffc700; --ink: #161514; --sub: #5f5a54; --muted: #9a948b; --line: #ece7df; --bg: #f7f5f1; --card: #fff;
  --ig: #e1306c; --yt: #ff0000; --tt: #111111; --web: #6b7280; --ai: #7c3aed; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Pretendard, -apple-system, "Malgun Gothic", sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; word-break: keep-all; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.layout { display: grid; grid-template-columns: 228px 1fr; height: 100vh; }
.side { background: var(--agent); color: var(--ink); display: flex; flex-direction: column; padding: 20px 12px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; padding: 0 8px; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--agent); display: grid; place-items: center; font-weight: 300; font-size: 16px; }
.brand-sub { margin: 8px 8px 16px; font-size: 12px; color: rgba(22,21,20,.7); }
.bpick { display: block; margin: 0 4px 14px; background: rgba(255,255,255,.45); border-radius: 12px; padding: 8px 10px; }
.bpick span { display: block; font-size: 11px; font-weight: 700; color: rgba(22,21,20,.65); }
.bpick select { width: 100%; background: transparent; border: 0; font-weight: 800; font-size: 15px; outline: none; cursor: pointer; }
nav { display: flex; flex-direction: column; gap: 2px; }
nav a { padding: 10px 12px; border-radius: 10px; font-weight: 700; color: rgba(22,21,20,.85); }
nav a:hover { background: rgba(255,255,255,.4); }
nav a.on { background: var(--ink); color: #fff; }
.navsep { border: 0; border-top: 1px solid rgba(22,21,20,.18); margin: 8px 6px; }
.foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(22,21,20,.18); display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.foot a, .foot button { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: rgba(22,21,20,.75); }
main { overflow-y: auto; padding: 26px 30px 70px; }
.head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.head h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.grow { flex: 1; }
.muted { color: var(--muted); font-size: 13px; } .small { font-size: 12px; }
.tag { display: inline-block; background: #f1efeb; color: #44403c; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 14px; }
.panel h2 { margin: 0 0 12px; font-size: 16px; }
.empty { border: 1.5px dashed var(--line); border-radius: 14px; padding: 34px 16px; text-align: center; color: var(--muted); line-height: 1.7; }
.btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #c8c1b6; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.y { background: var(--agent); border-color: var(--agent); color: var(--ink); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.danger { color: #dc2626; border-color: #fecaca; }
.btn:disabled { opacity: .55; cursor: default; }
.field { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; }
.field:focus { outline: 2px solid #ffe58a; border-color: #e0b100; }
textarea.field { resize: vertical; }
.field.sm { width: auto; padding: 6px 9px; font-size: 13px; }
.err { color: #dc2626; font-size: 12.5px; min-height: 16px; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 11px; border-radius: 8px; font-size: 12.5px; color: var(--sub); font-weight: 700; cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; }
.bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.pf { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; color: #fff; border-radius: 6px; padding: 2px 7px; background: var(--pc); }
.pf.instagram { --pc: var(--ig); } .pf.youtube { --pc: var(--yt); } .pf.tiktok { --pc: var(--tt); } .pf.web { --pc: var(--web); } .pf.ai { --pc: var(--ai); }

/* 레퍼런스 카드 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s; }
.card:hover { box-shadow: 0 10px 24px rgba(0,0,0,.07); }
.thumb { position: relative; aspect-ratio: 1 / 1; background: #eeeae4; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .pf { position: absolute; left: 8px; top: 8px; }
.thumb .rt { position: absolute; right: 8px; top: 8px; background: rgba(22,21,20,.8); color: #fff; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 7px; }
.thumb .kd { position: absolute; right: 8px; bottom: 8px; background: rgba(255,255,255,.9); font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; }
.cb { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cb .who { display: flex; justify-content: space-between; font-size: 12px; } .cb .who b { font-size: 12.5px; }
.cap { font-size: 12.5px; color: #3f3a35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.mx { display: flex; gap: 10px; font-size: 12px; color: var(--sub); font-weight: 700; }
.acts { display: flex; gap: 5px; margin-top: auto; flex-wrap: wrap; }
.note { font-size: 12px; background: #fffbe6; border-radius: 8px; padding: 6px 8px; }

/* 브랜드 아카이브 */
.blist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.bc { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.bc-h { display: flex; gap: 10px; align-items: center; }
.av { width: 44px; height: 44px; border-radius: 50%; background: #eeeae4; overflow: hidden; flex: none; display: grid; place-items: center; font-weight: 800; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.bc-h b { font-size: 16px; } .mine { font-size: 11px; font-weight: 800; background: var(--agent); border-radius: 5px; padding: 1px 6px; margin-left: 4px; }
.chs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ch { background: var(--bg); border-radius: 10px; padding: 7px 8px; font-size: 11.5px; }
.ch b { display: block; font-size: 15px; } .ch.off { opacity: .45; }
.strip { display: flex; gap: 4px; } .strip img { width: calc((100% - 16px) / 5); aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #eeeae4; }
.addform { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.addform .full { grid-column: 1 / -1; }
.ef { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--sub); }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: right; font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t th:first-child, .t td:first-child { text-align: left; }
.t td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.t tr.mine td { background: #fffbe6; }
.hbar { display: inline-block; height: 7px; border-radius: 9px; background: var(--ink); vertical-align: middle; margin-right: 6px; }

/* 트렌드 */
.cloud { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; align-items: center; padding: 18px; min-height: 260px; line-height: 1.15; }
.cloud button { border: 0; background: none; cursor: pointer; font-weight: 800; letter-spacing: -.02em; padding: 0; }
.cloud button:hover { text-decoration: underline; }
.trow { display: grid; grid-template-columns: 1.2fr 3fr 1fr 1fr; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.trow i { display: block; height: 8px; border-radius: 9px; background: var(--agent); }
.twocol { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }

/* 소재 제작 */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.cc { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; }
.cc .ci { aspect-ratio: 1; background: #eeeae4; display: grid; place-items: center; overflow: hidden; }
.cc .ci img { width: 100%; height: 100%; object-fit: cover; }
.cc .cn { padding: 9px 11px; font-size: 13px; font-weight: 700; }
.making { font-size: 12.5px; color: var(--sub); text-align: center; padding: 10px; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.stage { background: #2a2826; border-radius: 16px; padding: 16px; display: grid; place-items: center; }
.stage canvas { max-width: 100%; max-height: 72vh; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.ctrl { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.why { font-size: 12.5px; background: #fffbe6; border-radius: 10px; padding: 8px 10px; color: #6b5300; }

/* AI 에이전트 */
.chat { max-width: 920px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; flex-direction: column; gap: 8px; }
.msg.user { align-items: flex-end; }
.bubble { max-width: 80%; border-radius: 16px; padding: 12px 16px; line-height: 1.6; white-space: pre-wrap; }
.msg.user .bubble { background: var(--ink); color: #fff; }
.msg.ai .bubble { background: #fff; border: 1px solid var(--line); max-width: 100%; }
.refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.refs .card .cap { -webkit-line-clamp: 2; }
.ask { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding-top: 18px; }
.askbox { display: flex; gap: 8px; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 8px; }
.askbox textarea { flex: 1; border: 0; resize: none; outline: none; padding: 8px; min-height: 48px; }
.hints { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.hints button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; }
.hero { text-align: center; padding: 40px 0 10px; } .hero h1 { font-size: 28px; margin: 0 0 6px; letter-spacing: -.03em; }

.drawer { position: fixed; inset: 0; background: rgba(22,21,20,.4); z-index: 50; display: flex; justify-content: center; align-items: center; padding: 16px; }
.mbox { background: #fff; border-radius: 18px; padding: 20px 22px; width: min(560px, 100%); max-height: 92vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.mbox h2 { margin: 0; font-size: 18px; }
.kbtns { display: flex; gap: 8px; flex-wrap: wrap; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13.5px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; }
#toast.on { opacity: 1; }
.login-body { background: var(--bg); }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login form { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px 22px; width: min(340px, 100%); display: flex; flex-direction: column; gap: 9px; }
.login-logo { width: 48px; height: 48px; border-radius: 13px; background: var(--agent); display: grid; place-items: center; font-weight: 300; font-size: 20px; margin: 0 auto 4px; }
.login-title { font-size: 19px; font-weight: 800; text-align: center; }
.btn.lg { width: 100%; padding: 11px; }
@media (max-width: 1100px) { .editor, .twocol { grid-template-columns: 1fr; } .addform { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; }
  .side { flex-direction: row; overflow-x: auto; padding: 8px; gap: 6px; align-items: center; }
  .brand span:not(.logo), .brand-sub, .foot, .navsep { display: none; }
  nav { flex-direction: row; } nav a { white-space: nowrap; padding: 8px 10px; }
  .bpick { margin: 0; min-width: 120px; }
  main { padding: 18px 12px 60px; overflow: visible; }
}
