/* ContentLens(ugc_analyzer/static/style.css)의 색·모양을 따른다: 연회색 배경, 흰 패널 + 1px 회색 선, 파란 포인트, 시스템 글꼴 */
:root {
  --bg: #f5f5f7; --surface: #fff; --surface-2: #f5f5f7; --fg: #1d1d1f; --muted: #6e6e73; --line: #d9d9de;
  --accent: #0071e3; --accent-soft: #e5f1fd; --ok: #1e8a3d; --ok-soft: #e3f3e7; --warn: #c8720a; --warn-soft: #fdf0dc;
  --bad: #d70015; --bad-soft: #fde8ea; --r1: #e3effc; --r2: #e1f3e6;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Pretendard", "Noto Sans KR", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--fg); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.topnav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); font-weight: 600; }
.topnav form { margin: 0; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 24px 16px 64px; display: flex; flex-direction: column; gap: 18px; }
.grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (max-width: 800px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: baseline; }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 8px; padding: 7px 14px; font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { opacity: .85; color: #fff; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; margin: 0; }
input[type=text], input[type=email], input[type=date], select, textarea { font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 113, 227, .15); outline: none; }
textarea { resize: vertical; min-height: 64px; }
label { font-size: 12px; color: var(--muted); font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.chip.ok { color: var(--ok); background: var(--ok-soft); }
.chip.warn { color: var(--warn); background: var(--warn-soft); }
.chip.bad { color: var(--bad); background: var(--bad-soft); }
.chip.info { color: var(--accent); background: rgba(0, 113, 227, .1); }
.chip.plain { border: 1px solid var(--line); color: var(--muted); }
.chip.new { background: var(--accent); color: #fff; font-weight: 700; letter-spacing: .04em; }
.ic { vertical-align: -3px; flex: none; }

.flash { background: var(--ok-soft); color: var(--ok); border-radius: 10px; padding: 8px 14px; font-weight: 500; }
.reason { border-radius: 10px; padding: 10px 12px; background: var(--bad-soft); border-left: 4px solid var(--bad); font-size: 13px; }
.reason.warn { background: var(--warn-soft); border-left-color: var(--warn); }
.reason b { display: block; }
details summary { cursor: pointer; font-size: 12px; color: var(--accent); }

.hero { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.hero .eyebrow { color: var(--muted); font-size: 12px; font-weight: 500; }
.hero h2 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.todo { display: flex; flex-wrap: wrap; gap: 10px; }
.todo-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 18px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; }
.todo-btn:hover { opacity: .88; text-decoration: none; }
.todo-btn.warn { background: var(--warn); }
.todo-ok { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; font-size: 15px; min-height: 48px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--surface-2); border-radius: 10px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.tile .ic { color: var(--accent); }
.tile b { display: block; font-size: 22px; font-weight: 600; line-height: 1.1; }
.tile span { font-size: 12px; color: var(--muted); }

.guide { background: #f0f6fd; border: 1px solid #cfe3f8; border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.guide-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: center; }
.guide-list { display: flex; flex-direction: column; gap: 6px; }
.guide-list div { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag { font-family: var(--mono); font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--fg); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tag:hover { border-color: var(--accent); }
.tag.must { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.tag.plus { border: 0; background: none; color: var(--muted); font-family: var(--font); cursor: default; padding: 0 2px; }
.tag.copyall { font-family: var(--font); font-weight: 600; color: var(--accent); border-color: var(--accent); }
.big-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--accent); color: var(--accent); font-weight: 600; }
.big-btn:hover { background: var(--accent-soft); text-decoration: none; }

.up { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.up-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.up-card b { display: block; font-size: 16px; line-height: 1.2; }
.up-card span { font-size: 12px; color: var(--muted); }
.up-card em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); }
.up-card.payment { background: rgba(0, 113, 227, .1); }
.up-card.payment .ic { color: var(--accent); }
.up-card.sign_deadline { background: var(--bad-soft); }
.up-card.sign_deadline .ic { color: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--line); margin-right: 5px; vertical-align: -1px; }
.sw.r1 { background: var(--r1); } .sw.r2 { background: var(--r2); } .sw.gd { background: var(--accent); }
.scroll-x { overflow-x: auto; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(84px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); min-width: 600px; }
.cal-h, .cal-c { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 5px 6px; }
.cal-h { font-size: 11px; color: var(--muted); text-align: center; font-weight: 600; background: var(--surface-2); }
.cal-c { min-height: 92px; display: flex; flex-direction: column; gap: 3px; font-size: 11px; background: var(--surface); }
.cal-c.empty { background: var(--surface-2); }
.cal-c.r1 { background: var(--r1); } .cal-c.r2 { background: var(--r2); }
.cal-c .dn { font-weight: 700; font-size: 11px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; }
.cal-c.today .dn { background: var(--accent); color: #fff; }
.ev { line-height: 1.25; padding: 2px 6px; border-radius: 6px; background: var(--surface); font-size: 10.5px; }
.ev.dl { background: var(--bad-soft); color: var(--bad); }
.ev.pay { background: var(--accent); color: #fff; font-weight: 700; }
.ev.gd { background: rgba(0, 113, 227, .1); color: var(--accent); font-weight: 600; }

.plat { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 11px; color: #fff; flex: none; }
.plat.tt { background: #121212; } .plat.ig { background: #c2255c; } .plat.yt { background: #d70015; }
.video { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.video:first-child { border-top: 0; padding-top: 0; }
.video-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: center; }
.vt { display: flex; gap: 12px; align-items: center; min-width: 0; }
.vcol { display: flex; flex-direction: column; min-width: 0; }
.video-title { font-weight: 600; overflow-wrap: anywhere; }
.steps, .step-labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-left: 48px; }
.seg { height: 6px; border-radius: 3px; background: var(--line); display: block; }
.seg.on { background: var(--ok); } .seg.cur { background: var(--accent); } .seg.bad { background: var(--bad); }
.step-labels { font-size: 10.5px; color: var(--muted); }
.video > .reason, .video > .pills, .video > .row-actions, .video > form, .video > .field { margin-left: 48px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(0, 113, 227, .1); color: var(--accent); }
.pay-pill.dl { background: var(--bad-soft); color: var(--bad); } .pay-pill.none { background: var(--surface-2); color: var(--muted); }
.acct { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.acct:first-child { border-top: 0; padding-top: 0; }
.acct-id { display: flex; gap: 12px; align-items: center; min-width: 0; }

.login-box { max-width: 420px; margin: 56px auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }

/* 팀(사이트 B): ContentLens 사이드바 */
.shell { display: flex; min-height: 100vh; }
.side { width: 200px; flex: none; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; }
.side-brand { font-size: 14px; font-weight: 600; padding: 0 8px 14px; }
.sidebar-link { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; font-weight: 500; padding: 8px 10px; border-radius: 8px; }
.sidebar-link:hover { background: var(--surface-2); color: var(--fg); text-decoration: none; }
.sidebar-link.active { background: rgba(0, 113, 227, .1); color: var(--accent); font-weight: 600; }
.sidebar-link.dim { opacity: .55; cursor: default; }
.side-user { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; }
.main { flex: 1; min-width: 0; padding: 32px 24px 80px; display: flex; flex-direction: column; gap: 18px; max-width: 1400px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 3px; gap: 3px; }
.tabs a { padding: 5px 14px; border-radius: 7px; color: var(--muted); font-weight: 500; }
.tabs a.on { background: rgba(0, 113, 227, .1); color: var(--accent); font-weight: 600; text-decoration: none; }
.lock { border-left: 4px solid var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 8px 14px; }
.log { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.log li { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.log li:first-child { border-top: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1d1d1f; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; z-index: 50; }
@media (max-width: 800px) {
  .shell { flex-direction: column; }
  .side { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .side-user { margin: 0 0 0 auto; border: 0; padding: 0; }
  .main { padding: 16px 12px 40px; }
}

/* 폰: 7일이 한 화면에 들어오도록 일정은 짧은 칩으로 */
.ev .short { display: none; }
@media (max-width: 560px) {
  .cal { min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cal-h, .cal-c { padding: 3px 2px; }
  .cal-c { min-height: 58px; font-size: 10px; }
  .cal-c .dn { width: 20px; height: 20px; font-size: 10px; }
  .ev .full { display: none; }
  .ev .short { display: inline; }
  .ev { padding: 1px 3px; font-size: 9.5px; text-align: center; }
}

.plat-img { width: 36px; height: 36px; border-radius: 8px; flex: none; display: block; }

.modal-back { position: fixed; inset: 0; background: rgba(8, 24, 25, .5); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; max-width: 460px; width: 100%; display: flex; flex-direction: column; gap: 14px; max-height: 90vh; overflow: auto; }
.modal ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }

.thread { margin-left: 14px; padding-left: 14px; border-left: 3px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.thread .t-bot { color: var(--accent); }

.notice { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.notice + .notice { margin-top: 8px; }
.notice summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; list-style: none; cursor: pointer; font-weight: 600; }
.notice summary::-webkit-details-marker { display: none; }
.notice.unread { border-color: var(--accent); background: #f7fbff; }
.notice summary .nt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notice summary .nm { display: flex; gap: 8px; align-items: center; flex: none; font-weight: 400; }
.nbody { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.nbody ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.readbar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.readbar i { display: block; height: 100%; background: var(--accent); }

/* 탭 */
.narrow { max-width: 760px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.pane { display: none; flex-direction: column; gap: 18px; }
.pane.on { display: flex; }
.tabbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: flex; justify-content: center; gap: 4px; padding: 6px; max-width: 760px; width: 100%; margin: 0 auto; }
.tab { position: relative; display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; padding: 9px 16px; border-radius: 10px; }
.tab:hover { background: var(--surface-2); text-decoration: none; }
.tab.on { color: var(--accent); background: var(--accent-soft); }
.dot { background: var(--bad); color: #fff; font-size: 11px; font-weight: 600; min-width: 18px; height: 18px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; line-height: 1; }
.avatarbtn { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--accent-soft); color: var(--accent); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.avatarbtn:hover { text-decoration: none; border-color: var(--accent); }
.avatarbtn.on { background: var(--accent); color: #fff; }
.avatarbtn .dot { position: absolute; top: -4px; right: -4px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex: none; }
.prof { flex-direction: row; align-items: center; }
a.tile { color: inherit; }
a.tile:hover { text-decoration: none; border-color: var(--accent); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 0 8px; color: var(--muted); text-align: center; }
.empty b { color: var(--fg); }
@media (max-width: 640px) {
  .tabbar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; max-width: none; border-radius: 0; border-width: 1px 0 0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); gap: 0; }
  .tab { flex: 1; flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 11px; justify-content: center; }
  .tab .dot { position: absolute; top: 2px; left: calc(50% + 6px); }
  .wrap { padding-bottom: 96px; }
}

.topright { display: flex; align-items: center; gap: 10px; }
.faqbtn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-weight: 600; }
.faqbtn:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }

.a2hs { display: flex; align-items: center; gap: 12px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 12px; padding: 10px 12px; }
.a2hs[hidden] { display: none; }
.a2hs-ic { color: var(--accent); display: flex; }
.a2hs-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.a2hs-t span { font-size: 12px; color: var(--muted); }
.a2hs-x { border: 0; background: none; color: var(--muted); padding: 6px; border-radius: 8px; display: flex; cursor: pointer; }

/* 폰: 숫자 카드 3개를 한 줄에, 아이콘은 위·글자는 아래 */
@media (max-width: 640px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tile { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px; }
  .tile b { font-size: 18px; white-space: nowrap; }
  .tile span { font-size: 11px; white-space: nowrap; }
}

/* 로그인 화면 */
.login-box { max-width: 380px; margin: 40px auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 48px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); font-weight: 600; font-size: 15px; }
.gbtn:hover { border-color: var(--accent); text-decoration: none; }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-link { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 10px; padding: 12px 14px; color: var(--muted); }
.login-link .ic { color: var(--accent); }
.login-problem { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
