:root {
  --banner-green: #276b5a;
  --banner-green-dark: #1f594b;
  --banner-ink: #17231f;
  --banner-muted: #64736c;
  --banner-line: #dce9e4;
  --banner-bg: #f4f8f6;
  --banner-gold: #a96f18;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--banner-bg); color: var(--banner-ink); font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.banner-page { max-width: 1240px; margin: 0 auto; padding: 28px 22px 72px; }
.banner-header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 18px 0 22px; }
.banner-eyebrow { margin: 0 0 4px; color: var(--banner-green); font-size: 13px; font-weight: 900; letter-spacing: .08em; }
.banner-header h1 { margin: 0; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.045em; line-height: 1.2; }
.banner-header p { margin: 8px 0 0; color: var(--banner-muted); font-size: 16px; }
.site-key { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.site-key label { color: var(--banner-muted); font-size: 14px; font-weight: 800; }
.site-key input { width: 160px; }
.banner-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); gap: 18px; align-items: start; }
.banner-panel { border: 1px solid var(--banner-line); border-radius: 18px; background: #fff; box-shadow: 0 8px 28px rgba(27, 71, 57, .06); }
.preview-panel { min-height: 730px; padding: 16px; position: sticky; top: 76px; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 14px; border-bottom: 1px solid #edf3f0; }
.preview-toolbar h2 { margin: 0; font-size: 18px; }
.preview-location-note { margin: 10px 0 0; padding: 9px 11px; border: 1px solid #d8ebe3; border-radius: 9px; background: #f3fbf7; color: var(--banner-green); font-size: 13px; font-weight: 800; }
.device-switch { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: #eef4f1; }
.device-switch button { border: 0; border-radius: 7px; padding: 7px 10px; background: transparent; color: var(--banner-muted); font-size: 13px; font-weight: 800; cursor: pointer; }
.device-switch button.on { background: #fff; color: var(--banner-green); box-shadow: 0 2px 8px rgba(27, 71, 57, .1); }
.preview-stage { display: flex; justify-content: center; min-height: 650px; padding: 26px 12px; background: linear-gradient(135deg, #eef6f2, #f8fbfa); border-radius: 0 0 14px 14px; overflow: hidden; }
.preview-browser { position: relative; width: 100%; min-height: 580px; padding: 20px 22px; border: 1px solid #dce9e4; border-radius: 13px; background: #fff; box-shadow: 0 14px 32px rgba(27, 71, 57, .1); transition: width .2s ease; overflow: hidden; }
.preview-browser.mobile { width: 360px; }
.preview-browser .fake-url { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 8px; background: #f2f6f4; color: #89968f; font-size: 12px; }
.preview-browser .fake-url i { width: 7px; height: 7px; border-radius: 50%; background: #b7d2c5; }
.preview-article { max-width: 660px; margin: 30px auto; }
.preview-article .tag { color: var(--banner-green); font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.preview-article h3 { margin: 7px 0 14px; font-size: clamp(23px, 3vw, 31px); line-height: 1.25; letter-spacing: -.04em; }
.preview-article p { margin: 0 0 15px; color: #5f7068; font-size: 16px; }
.preview-placeholder { height: 104px; margin: 20px 0; border-radius: 11px; background: linear-gradient(115deg, #e7f2ed, #fafcfb); }
.preview-placement-slot { display: none; margin: 20px 0; padding: 8px; border: 1px dashed #b7d9cb; border-radius: 12px; background: #f8fcfa; }
.preview-placement-slot.is-target { display: block; }
.preview-placement-slot::before { display: block; margin: 0 0 6px; color: var(--banner-green); content: '배너 표시 위치 · ' attr(data-label); font-size: 11px; font-weight: 850; }
.preview-slot-top { margin-top: 18px; }
.preview-placement-slot .hlb-banner { margin: 0; }
.preview-overlay { position: absolute; right: 0; bottom: 0; left: 0; min-height: 0; pointer-events: none; }
.preview-overlay .hlb-banner { position: relative; right: auto; bottom: auto; pointer-events: auto; }
.settings-panel { padding: 20px; }
.settings-panel h2 { margin: 0 0 4px; font-size: 19px; }
.settings-panel > .hint { margin: 0 0 16px; }
.setting-section { padding: 18px 0; border-top: 1px solid #edf3f0; }
.setting-section:first-of-type { border-top: 0; padding-top: 0; }
.setting-section h3 { margin: 0 0 4px; font-size: 16px; }
.setting-section .section-hint { margin: 0 0 12px; color: var(--banner-muted); font-size: 14px; }
.field { margin-top: 12px; }
.field label { display: block; margin-bottom: 5px; color: #51635b; font-size: 14px; font-weight: 800; }
.field input, .field select, .field textarea, .site-key input { width: 100%; border: 1px solid #cfded7; border-radius: 9px; padding: 10px 11px; color: var(--banner-ink); background: #fff; outline: 0; }
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .site-key input:focus { border-color: var(--banner-green); box-shadow: 0 0 0 3px rgba(39, 107, 90, .12); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.campaign-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; }
.campaign-bar select { flex: 1; min-width: 0; border: 1px solid #cfded7; border-radius: 9px; padding: 10px; background: #fff; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 9px; padding: 10px 13px; color: #fff; background: var(--banner-green); font-size: 14px; font-weight: 850; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--banner-green-dark); }
.btn.secondary { color: var(--banner-ink); background: #edf3f0; }
.btn.danger { color: #a4342b; background: #fff0ee; }
.btn:disabled { opacity: .55; cursor: wait; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 10px; background: #f3f8f5; }
.switch-row label { margin: 0; font-size: 14px; font-weight: 800; }
.switch-row input { width: 19px; height: 19px; accent-color: var(--banner-green); }
.notice { margin-top: 13px; padding: 11px 12px; border: 1px solid #d8ebe2; border-radius: 10px; background: #f3fbf7; color: #35675a; font-size: 13px; }
.notice.warning { border-color: #f1dfbd; background: #fff9ed; color: #805c20; }
.save-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding-top: 16px; border-top: 1px solid #edf3f0; }
.status { color: var(--banner-muted); font-size: 13px; }
.status.error { color: #b42318; }
.embed-box { margin-top: 12px; padding: 11px; border-radius: 10px; background: #17231f; color: #e8f4ee; font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; }
.gate { max-width: 620px; margin: 90px auto; padding: 30px; border: 1px solid var(--banner-line); border-radius: 18px; background: #fff; text-align: center; box-shadow: 0 10px 30px rgba(27,71,57,.07); }
.gate h1 { margin: 0 0 8px; font-size: 26px; }
.gate p { margin: 0 0 18px; color: var(--banner-muted); font-size: 16px; }
.empty { padding: 18px 0; color: var(--banner-muted); font-size: 14px; }
@media (max-width: 900px) { .banner-grid { grid-template-columns: 1fr; } .preview-panel { position: static; min-height: 0; } }
@media (max-width: 580px) { .banner-page { padding: 18px 12px 52px; } .banner-header { display: block; } .site-key { margin-top: 14px; } .site-key input { flex: 1; width: auto; } .two-col { grid-template-columns: 1fr; } .preview-panel, .settings-panel { padding: 14px; } .preview-stage { padding: 18px 8px; } .preview-browser { padding: 14px; } .save-row { align-items: stretch; flex-direction: column; } .save-row .btn { width: 100%; } }
