:root {
  --bg: #faf9f7; --surface: #ffffff; --ink: #141311; --ink-soft: #6b6862; --ink-faint: #9c988f;
  --line: #e9e6e0; --line-strong: #d8d4cc; --accent: #ff3d17; --accent-ink: #d42b09; --accent-soft: #fff1ed;
  --daebak-bg: #ffe6e0; --daebak-ink: #d42b09; --rising-bg: #fff3d6; --rising-ink: #a86a00;
  --good-bg: #e3f5e6; --good-ink: #1c7d33; --normal-bg: #efedea; --normal-ink: #6b6862;
  --radius: 10px; --shadow: 0 1px 2px rgba(20,19,17,0.04), 0 4px 16px rgba(20,19,17,0.05);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Pretendard Variable", Pretendard, -apple-system, "Malgun Gothic", sans-serif; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 0 28px; height: 58px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: baseline; gap: 7px; text-decoration: none; color: var(--ink); }
.brand-mark { color: var(--accent); font-size: 15px; transform: translateY(-1px); }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -0.03em; }
.brand-sub { font-size: 11px; color: var(--accent-ink); font-weight: 800; letter-spacing: 0.08em; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 13.5px; padding: 7px 12px; border-radius: 8px; transition: color 0.15s, background 0.15s; }
.nav a:hover { color: var(--ink); background: var(--bg); }
.nav a.active { color: #fff; background: var(--ink); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.mode-chip { font: inherit; font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; cursor: pointer; transition: filter 0.15s; }
.mode-chip:hover { filter: brightness(0.96); }
.mode-demo { color: var(--accent-ink); background: var(--accent-soft); border: 1px solid #ffd2c6; }
.mode-live { color: var(--good-ink); background: var(--good-bg); border: 1px solid #bfe5c6; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink-soft); cursor: pointer; font: inherit; transition: color 0.15s, border-color 0.15s, transform 0.4s; }
.btn-icon:hover { color: var(--ink); border-color: var(--ink); transform: rotate(30deg); }
.page { max-width: 1280px; margin: 0 auto; padding: 26px 28px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.crumb { font-size: 12px; color: var(--ink-faint); font-weight: 600; margin-bottom: 6px; }
h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -0.035em; }
.page-desc { margin: 0; color: var(--ink-soft); font-size: 13.5px; }
.quota-box { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 10px; row-gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 16px 13px; box-shadow: var(--shadow); white-space: nowrap; }
.quota-label { font-size: 12px; color: var(--ink-faint); font-weight: 600; }
.quota-value { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.quota-bar { grid-column: 1 / -1; display: block; height: 4px; border-radius: 999px; background: var(--normal-bg); overflow: hidden; }
.quota-fill { display: block; height: 100%; border-radius: 999px; background: var(--good-ink); transition: width 0.4s ease; }
.quota-fill.quota-low { background: var(--accent); }
.onboard { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: linear-gradient(105deg, #16150f 0%, #2a1c12 70%, #47210f 100%); color: #f5f1ea; border-radius: 14px; padding: 16px 22px; margin-bottom: 22px; box-shadow: var(--shadow); }
.onboard-text { font-size: 13.5px; line-height: 1.6; }
.onboard-text strong { color: #ffb59f; font-weight: 800; margin-right: 6px; }
.onboard-text u { text-underline-offset: 3px; }
.onboard-actions { display: flex; gap: 8px; }
.search-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 16px; }
.field label { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); letter-spacing: 0.02em; margin-bottom: 6px; }
.field input, .field select { width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 11px; font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface); outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.field input:focus, .field select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20,19,17,0.08); }
.field-keyword { margin-bottom: 16px; }
.keyword-row { display: flex; gap: 10px; }
.keyword-row input { height: 46px; font-size: 15.5px; font-weight: 600; flex: 1; }
.keyword-row input::placeholder { font-weight: 400; color: var(--ink-faint); }
.btn-search { height: 46px; flex: 0 0 auto; }
.chips-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.chips-label { font-size: 11.5px; font-weight: 700; color: var(--ink-faint); flex: 0 0 auto; }
.chips-clear { font: inherit; font-size: 11.5px; font-weight: 600; color: var(--ink-faint); background: none; border: none; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; padding: 0; }
.chips-clear:hover { color: var(--accent-ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; transition: color 0.12s, border-color 0.12s, background 0.12s; }
.chip:hover { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.filter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, 1.4fr)); gap: 12px; margin-bottom: 16px; }
.range-pair { display: flex; align-items: center; gap: 6px; }
.range-tilde { color: var(--ink-faint); }
.search-actions { display: flex; align-items: center; gap: 18px; }
.btn-primary { height: 40px; padding: 0 32px; background: var(--accent); color: #fff; font: inherit; font-size: 14px; font-weight: 800; letter-spacing: 0.01em; border: none; border-radius: 8px; cursor: pointer; transition: transform 0.08s, background 0.15s, box-shadow 0.15s; box-shadow: 0 2px 8px rgba(255,61,23,0.25); }
.btn-primary:hover { background: var(--accent-ink); box-shadow: 0 3px 12px rgba(255,61,23,0.32); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.55; cursor: wait; }
.btn-sm { height: 34px; padding: 0 16px; font-size: 13px; }
.check { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; user-select: none; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.search-cost { margin-left: auto; font-size: 12px; color: var(--ink-faint); }
.btn-text { font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-soft); background: none; border: none; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.btn-text:hover { color: var(--accent-ink); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow); }
.stat-label { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-faint); margin-bottom: 4px; }
.stat-value { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-accent { border-color: #ffd2c6; background: linear-gradient(180deg, #fff, var(--accent-soft)); }
.stat-accent .stat-value { color: var(--accent-ink); }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.results-head h2 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.results-head h2 .cache-tag { font-size: 11.5px; color: var(--ink-faint); font-weight: 600; margin-left: 8px; }
.results-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.legend { display: flex; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge em { font-style: normal; font-weight: 600; opacity: 0.75; font-size: 10.5px; }
.badge-daebak { background: var(--daebak-bg); color: var(--daebak-ink); }
.badge-rising { background: var(--rising-bg); color: var(--rising-ink); }
.badge-good { background: var(--good-bg); color: var(--good-ink); }
.badge-normal { background: var(--normal-bg); color: var(--normal-ink); }
.btn-ghost { height: 34px; padding: 0 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-saved.active { border-color: var(--rising-ink); background: var(--rising-bg); color: var(--rising-ink); }
.btn-saved #saved-count { font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg-btn { font: inherit; font-size: 14px; width: 38px; height: 34px; background: var(--surface); border: none; color: var(--ink-faint); cursor: pointer; transition: background 0.12s, color 0.12s; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line-strong); }
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: var(--ink); color: #fff; }
.btn-danger { color: var(--accent-ink); }
.btn-danger:hover { border-color: var(--accent-ink); background: var(--accent-soft); }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1040px; }
thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; text-align: left; font-size: 11.5px; font-weight: 700; color: var(--ink-faint); letter-spacing: 0.03em; padding: 12px 14px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
thead th.num { text-align: right; }
thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { color: var(--ink); }
thead th.sorted-desc::after { content: " ↓"; color: var(--accent); }
thead th.sorted-asc::after { content: " ↑"; color: var(--accent); }
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.1s; }
tbody tr:hover { background: #fdfcfa; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.perf { font-weight: 800; font-size: 14.5px; letter-spacing: -0.01em; }
td.perf.perf-hot { color: var(--accent-ink); }
.col-thumb { width: 100px; }
.thumb-box { position: relative; width: 88px; }
.thumb, .thumb-ph { width: 88px; height: 50px; border-radius: 6px; object-fit: cover; display: block; background: var(--normal-bg); }
.thumb-ph { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; color: #fff; }
.thumb-dur { position: absolute; right: 3px; bottom: 3px; font-size: 10px; font-weight: 700; color: #fff; background: rgba(0,0,0,0.75); border-radius: 4px; padding: 0 4px; line-height: 15px; font-variant-numeric: tabular-nums; }
.title-cell { max-width: 380px; }
.title-cell a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.title-cell a:hover { color: var(--accent-ink); }
.tag-shorts { display: inline-block; font-size: 10px; font-weight: 800; color: #fff; background: var(--ink); border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px; }
.channel-cell { color: var(--ink-soft); font-weight: 600; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.date-cell { color: var(--ink-soft); white-space: nowrap; }
.col-star { width: 36px; }
.star-cell { padding-right: 0; }
.star-btn { font: inherit; font-size: 17px; line-height: 1; color: var(--ink-faint); background: none; border: none; cursor: pointer; padding: 4px; transition: color 0.12s, transform 0.12s; }
.star-btn:hover { color: var(--rising-ink); transform: scale(1.15); }
.star-btn.on { color: #f5a623; }
.table-empty { text-align: center; padding: 40px !important; color: var(--ink-faint); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card-grid .table-empty { grid-column: 1 / -1; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.vcard { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: transform 0.12s, box-shadow 0.12s; }
.vcard:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(20,19,17,0.1); }
.vcard-thumb { display: block; position: relative; aspect-ratio: 16 / 9; background: var(--normal-bg); }
.vcard-thumb .thumb-box { position: static; width: 100%; }
.vcard-thumb .thumb, .vcard-thumb .thumb-ph { width: 100%; height: 100%; position: absolute; inset: 0; border-radius: 0; font-size: 28px; }
.vcard-thumb .thumb-dur { right: 8px; bottom: 8px; font-size: 11px; line-height: 18px; padding: 0 6px; }
.vcard-badge { position: absolute; top: 8px; left: 8px; }
.vcard > .star-btn { position: absolute; top: 6px; right: 6px; z-index: 2; font-size: 19px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.6); padding: 6px; }
.vcard > .star-btn.on { color: #ffc94d; }
.vcard-body { padding: 12px 14px 14px; }
.vcard-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 13.5px; line-height: 1.4; min-height: 2.8em; }
.vcard-title:hover { color: var(--accent-ink); }
.vcard-meta { margin-top: 6px; font-size: 12px; color: var(--ink-soft); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard-stats { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.vcard-perf { margin-left: auto; font-weight: 800; font-size: 15px; letter-spacing: -0.01em; color: var(--ink); }
.vcard-perf.perf-hot { color: var(--accent-ink); }
.empty-state { text-align: center; padding: 90px 0; color: var(--ink-faint); }
.empty-mark { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 20px; }
.empty-state p { margin: 0; font-size: 14px; }
.row-skeleton td { padding: 14px; }
.sk { height: 14px; border-radius: 6px; background: linear-gradient(90deg, #f0eeea 25%, #f8f6f3 50%, #f0eeea 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.sk-thumb { width: 88px; height: 50px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.error-banner { background: var(--accent-soft); border: 1px solid #ffd2c6; color: var(--accent-ink); border-radius: 10px; padding: 12px 16px; font-weight: 600; margin-bottom: 16px; }
.modal-overlay { position: fixed; inset: 0; background: rgba(20,19,17,0.45); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { width: 560px; max-width: 100%; max-height: 90vh; overflow: auto; background: var(--surface); border-radius: 16px; box-shadow: 0 24px 60px rgba(20,19,17,0.25); animation: modal-in 0.18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.modal-head .btn-icon:hover { transform: none; }
.modal-body { padding: 20px 22px; }
.guide { margin-bottom: 20px; display: grid; gap: 10px; }
.guide-step { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.guide-step a { color: var(--accent-ink); font-weight: 700; }
.guide-step strong { color: var(--ink); }
.step-no { flex: 0 0 22px; height: 22px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.key-row { display: flex; gap: 8px; }
.key-row input { flex: 1; font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.02em; height: 38px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 11px; font-size: 13.5px; outline: none; }
.key-row input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20,19,17,0.08); }
.key-row .btn-ghost { height: 38px; }
.key-status { margin: 8px 0 0; font-size: 12.5px; font-weight: 700; min-height: 18px; }
.key-ok { color: var(--good-ink); }
.key-fail { color: var(--accent-ink); }
.key-privacy { margin: 16px 0 0; font-size: 12px; color: var(--ink-faint); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; line-height: 1.55; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); }
.modal-foot-right { display: flex; gap: 8px; }
.modal-foot .btn-primary { height: 36px; padding: 0 20px; font-size: 13px; }
.modal-foot .btn-ghost { height: 36px; }
.footer { max-width: 1280px; margin: 0 auto; padding: 0 28px 40px; color: var(--ink-faint); font-size: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.feedback-link { color: var(--ink-soft); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.feedback-link:hover { color: var(--accent-ink); }
@media (max-width: 1080px) { .filter-grid { grid-template-columns: repeat(3, 1fr); } .nav { display: none; } .stats { grid-template-columns: repeat(2, 1fr); } .page-head { flex-direction: column; align-items: flex-start; } }
@media (max-width: 760px) { .topbar-inner { padding: 0 16px; gap: 12px; } .brand-name { font-size: 17px; } .page { padding: 18px 16px 48px; } .search-card { padding: 16px; } .filter-grid { grid-template-columns: repeat(2, 1fr); } .keyword-row { flex-direction: column; } .btn-search { width: 100%; } .search-actions { flex-wrap: wrap; gap: 12px; } .search-cost { margin-left: 0; flex-basis: 100%; } .stats { gap: 8px; } .stat-card { padding: 10px 12px; } .stat-value { font-size: 18px; } .results-head { flex-direction: column; align-items: flex-start; } .results-tools { width: 100%; justify-content: space-between; gap: 8px; } .legend { order: 5; flex-basis: 100%; flex-wrap: wrap; } .onboard { flex-direction: column; align-items: flex-start; padding: 14px 16px; } .card-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; } .vcard-body { padding: 10px 12px 12px; } .footer { padding: 0 16px 32px; } }
