@font-face{font-family:"Noto Sans KR";src:url("/fonts/noto-sans-kr.woff") format("woff");font-style:normal;font-weight:100 900;font-display:swap}
:root {
  --bg: #f4f5f8;
  --panel: #ffffff;
  --ink: #16171b;
  --muted: #6f7480;
  --line: #e5e7ec;
  --accent: #6d4aff;
  --primary: var(--accent);
  --border: var(--line);
  --accent-2: #ff4d8d;
  --dark: #17151f;
  --success: #12805c;
  --good: var(--success);
  --warning: #a56600;
  --danger: #b42318;
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.25fr 0.75fr; }
.hero-panel { background: radial-gradient(circle at 15% 15%, #8c63ff 0, transparent 38%), radial-gradient(circle at 86% 76%, #ff5ca5 0, transparent 35%), #17151f; color: white; padding: clamp(48px, 8vw, 120px); display: flex; flex-direction: column; justify-content: center; }
.brand-mark { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; font-weight: 900; letter-spacing: -0.04em; box-shadow: 0 16px 50px rgba(109,74,255,.35); }
.brand-mark.small { width: 38px; height: 38px; border-radius: 12px; font-size: 14px; }
.eyebrow { margin: 24px 0 8px; font-size: 12px; letter-spacing: .18em; font-weight: 800; opacity: .66; }
.hero-panel h1 { margin: 0; font-size: clamp(44px, 6vw, 88px); line-height: .98; letter-spacing: -.055em; max-width: 850px; }
.hero-copy { max-width: 700px; margin: 32px 0; color: rgba(255,255,255,.72); font-size: 18px; line-height: 1.7; }
.feature-row { display: flex; flex-wrap: wrap; gap: 10px; }
.feature-row span { border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 10px 14px; color: rgba(255,255,255,.82); font-size: 13px; }
.auth-card { align-self: center; margin: 48px; padding: 36px; background: white; border: 1px solid var(--line); border-radius: 28px; box-shadow: 0 30px 80px rgba(20,20,30,.12); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #f0f1f5; padding: 5px; border-radius: 14px; margin-bottom: 26px; }
.auth-tab { border: 0; background: transparent; padding: 12px; border-radius: 10px; color: var(--muted); font-weight: 700; }
.auth-tab.active { background: white; color: var(--ink); box-shadow: 0 2px 10px rgba(20,20,30,.08); }
.stack-form { display: grid; gap: 16px; }
.stack-form.compact { gap: 12px; }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 700; color: #444852; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 12px; padding: 12px 13px; outline: none; transition: .15s ease; }
textarea { resize: vertical; min-height: 150px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(109,74,255,.1); }
button.primary, button.secondary, button.ghost { border-radius: 12px; padding: 11px 16px; font-weight: 800; border: 1px solid transparent; }
button.primary { background: linear-gradient(135deg, var(--accent), #835cff); color: white; box-shadow: 0 8px 22px rgba(109,74,255,.22); }
button.secondary { background: white; color: var(--ink); border-color: var(--line); }
button.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
button.danger { color: var(--danger); border: 1px solid #f3c5c1; background: #fff7f6; border-radius: 10px; padding: 9px 12px; font-weight: 700; }
button:disabled { opacity: .55; cursor: not-allowed; }
.wide { width: 100%; }
.fine-print { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 18px 0 0; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--dark); color: white; padding: 22px; display: flex; flex-direction: column; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; font-size: 18px; padding: 4px 4px 28px; }
.sidebar nav { display: grid; gap: 7px; }
.nav-item { border: 0; color: rgba(255,255,255,.64); background: transparent; padding: 13px 14px; border-radius: 12px; text-align: left; font-weight: 700; }
.nav-item.active, .nav-item:hover { color: white; background: rgba(255,255,255,.09); }
.sidebar-bottom { margin-top: auto; display: grid; gap: 12px; }
.plan-badge { border-radius: 12px; padding: 12px; text-align: center; background: linear-gradient(135deg, rgba(109,74,255,.32), rgba(255,77,141,.25)); border: 1px solid rgba(255,255,255,.12); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.sidebar .ghost { color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.16); }
.workspace { min-width: 0; padding: 28px clamp(24px, 4vw, 60px) 64px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; }
.topbar .eyebrow { margin: 0 0 6px; color: var(--accent); opacity: 1; }
.topbar h2 { margin: 0; font-size: 30px; letter-spacing: -.035em; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.usage-text { color: var(--muted); font-size: 12px; text-align: right; line-height: 1.5; }
.page-section { animation: fade .18s ease; }
@keyframes fade { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 8px 30px rgba(24,25,32,.045); }
.padded { padding: 24px; }
.toolbar { padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 22px; }
.toolbar h3, .section-heading h3, .card h3 { margin: 0 0 6px; letter-spacing: -.02em; }
.toolbar p, .section-heading p, .card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.inline-form { display: flex; gap: 10px; min-width: min(100%, 520px); }
.inline-form input { flex: 1; }
.topic-refresh-form { min-width: min(100%, 760px); }
.topic-refresh-form select { flex: 0 0 176px; width: 176px; }
.topic-refresh-form input { flex: 1 1 300px; min-width: 260px; }
.topic-refresh-form button { flex: 0 0 auto; white-space: nowrap; }
.topic-origin-tabs { display: flex; gap: 8px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.topic-origin-tabs button { border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); padding: 11px 14px; font-weight: 900; cursor: pointer; }
.topic-origin-tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.topic-utility-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -10px 0 18px; padding: 0 4px; color: var(--muted); font-size: 12px; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.topic-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; min-height: 400px; box-shadow: 0 8px 24px rgba(24,25,32,.04); }
.topic-image { aspect-ratio: 16/10; background: linear-gradient(135deg, #26213f, #7b4fff 55%, #ff5f9c); overflow: hidden; }
.topic-image img { width: 100%; height: 100%; object-fit: cover; }
.topic-body { padding: 17px; display: flex; flex-direction: column; flex: 1; }
.topic-meta { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; margin-bottom: 10px; }
.topic-card h4 { margin: 0; font-size: 18px; line-height: 1.4; letter-spacing: -.02em; }
.topic-card p { color: var(--muted); font-size: 13px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.topic-actions { margin-top: auto; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.topic-actions a { border: 1px solid var(--line); color: var(--muted); text-decoration: none; display: grid; place-items: center; border-radius: 11px; padding: 10px 12px; font-size: 12px; font-weight: 700; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.post-grid { display: grid; gap: 18px; }
.post-card { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: grid; grid-template-columns: 190px 1fr; gap: 18px; }
.post-media { width: 190px; aspect-ratio: 4/5; border-radius: 14px; object-fit: cover; background: #eee; }
.post-video { width: 190px; aspect-ratio: 9/16; border-radius: 14px; background: #111; }
.post-content { min-width: 0; }
.post-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.post-head h4 { margin: 0; font-size: 17px; }
.status { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 9px; font-size: 10px; font-weight: 900; letter-spacing: .06em; background: #f0f1f5; color: #555; }
.status.PUBLISHED { color: var(--success); background: #e9f8f2; }
.status.SCHEDULED { color: var(--warning); background: #fff5df; }
.status.FAILED { color: var(--danger); background: #fff0ef; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.post-actions button { padding: 9px 12px; }
.error-message { color: var(--danger); font-size: 12px; margin: 8px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.list-stack { display: grid; gap: 10px; margin-top: 18px; }
.list-row { border: 1px solid var(--line); border-radius: 13px; padding: 13px; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.list-row strong { display: block; font-size: 14px; }
.list-row small { display: block; max-width: 420px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); margin-top: 4px; }
.status-panel { margin: 18px 0; padding: 16px; background: #f7f7fa; border-radius: 14px; line-height: 1.65; color: #4d515b; font-size: 13px; }
.notice-card { margin-top: 20px; border-left: 4px solid var(--accent); }
.generator-dialog { width: min(760px, calc(100vw - 32px)); border: 0; border-radius: 24px; padding: 0; box-shadow: 0 28px 100px rgba(10,10,20,.28); }
.generator-dialog::backdrop { background: rgba(14,12,22,.64); backdrop-filter: blur(5px); }
.generator-dialog form { padding: 25px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.dialog-head .eyebrow { color: var(--accent); margin: 0 0 5px; opacity: 1; }
.dialog-head h3 { margin: 0; font-size: 24px; }
.icon-btn { border: 0; background: #f0f1f5; width: 36px; height: 36px; border-radius: 50%; font-size: 25px; color: #555; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.generator-dialog .form-grid { align-items: start; }
.generator-dialog .form-grid > label { align-self: start; }
.generator-dialog input, .generator-dialog select { min-height: 46px; height: 46px; }
.generator-dialog .reference-input-grid { margin-top: 15px; }
.generator-dialog .reference-input-grid small { color: var(--muted); font-size: 11px; line-height: 1.45; font-weight: 500; }
.reference-discovery-panel { margin-top: 15px; padding: 14px; border: 1px solid #ded8ff; border-radius: 16px; background: #fbfaff; }
#generatorDialog.reference-only .form-grid:not(.reference-input-grid) > label:not(:has(select[name="language"])),
#generatorDialog.reference-only .reference-input-grid > label:first-child,
#generatorDialog.reference-only .advanced-panel,
#generatorDialog.reference-only .reference-discovery-panel,
#generatorDialog.reference-only > form > label { display: none !important; }
#generatorDialog.reference-only .form-grid:not(.reference-input-grid) { display: grid; grid-template-columns: 1fr; }
#generatorDialog.reference-only .reference-input-grid { display: block; }
.reference-profile-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.reference-profile-row button { min-height: 46px; white-space: nowrap; }
.reference-discovery-help { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.5; font-weight: 500; }
.reference-post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 12px; max-height: 390px; overflow-y: auto; }
.reference-post-card { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.reference-post-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(109,74,255,.12); }
.reference-post-card img, .reference-post-placeholder { width: 68px; height: 68px; border-radius: 9px; object-fit: cover; background: linear-gradient(135deg, #ece9ff, #f6dfe9); }
.reference-post-placeholder { display: grid; place-items: center; color: var(--muted); font-size: 10px; text-align: center; padding: 5px; }
.reference-post-card > div { min-width: 0; display: grid; gap: 4px; }
.reference-post-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.reference-post-card small { color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
.reference-post-card button { justify-self: start; border: 0; padding: 0; background: transparent; color: var(--accent); font-size: 11px; font-weight: 800; }
.reference-selection-status { min-height: 1.4em; margin: 10px 0 0; color: var(--success); font-size: 12px; font-weight: 700; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.toast { position: fixed; z-index: 1000; top: 18px; right: 18px; max-width: 430px; background: #17151f; color: white; padding: 14px 16px; border-radius: 13px; box-shadow: 0 14px 50px rgba(0,0,0,.25); font-size: 13px; line-height: 1.5; }
.toast.error { background: #7b201a; }
.empty { grid-column: 1 / -1; padding: 55px 20px; text-align: center; color: var(--muted); border: 1px dashed #ccd0d8; border-radius: 18px; background: rgba(255,255,255,.55); }
.loading { opacity: .6; pointer-events: none; }
@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .hero-panel { min-height: 48vh; padding: 52px 28px; }
  .auth-card { margin: 24px; }
  .app-shell { grid-template-columns: 76px 1fr; }
  .sidebar { padding: 14px 10px; }
  .sidebar-brand strong, .nav-item { font-size: 0; }
  .nav-item::first-letter { font-size: 16px; }
  .sidebar-brand { justify-content: center; }
  .plan-badge { font-size: 9px; padding: 9px 3px; }
  .toolbar, .topbar { align-items: stretch; flex-direction: column; }
  .top-actions { justify-content: space-between; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 10px 14px; flex-direction: row; align-items: center; overflow-x: auto; }
  .sidebar-brand, .sidebar-bottom { display: none; }
  .sidebar nav { display: flex; }
  .nav-item { font-size: 12px; white-space: nowrap; }
  .workspace { padding: 20px 14px 50px; }
  .inline-form { flex-direction: column; min-width: 0; width: 100%; }
  .topic-refresh-form select, .topic-refresh-form input, .topic-refresh-form button { width: 100%; min-width: 0; flex: 1 1 auto; }
  .topic-utility-row { align-items: stretch; flex-direction: column; }
  .reference-profile-row { grid-template-columns: 1fr; }
  .reference-profile-row button { width: 100%; }
  .post-card { grid-template-columns: 1fr; }
  .post-media, .post-video { width: 100%; max-height: 420px; }
  .form-grid { grid-template-columns: 1fr; }
  .top-actions { flex-direction: column; align-items: stretch; }
  .usage-text { text-align: left; }
}

.checkbox-label { display: flex; align-items: center; gap: 10px; align-self: end; min-height: 46px; }
.checkbox-label input { width: 18px; height: 18px; margin: 0; }
.review-gate { display: grid; gap: 2px; margin-top: 16px; padding: 12px 14px; border: 1px solid #dcd5ff; border-radius: 12px; background: #faf8ff; }
.review-gate small { color: var(--muted); line-height: 1.55; padding-left: 28px; }
.muted{color:var(--muted)}
.filter-strip{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:14px 0}.filter-strip input{max-width:320px}.filter-strip label{display:flex;align-items:center;gap:7px;font-size:13px}.filter-strip label input{width:auto}
.batch-topics-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:16px 0;padding:14px 16px;border:1px solid #ddd6ff;background:#faf9ff}.batch-topics-bar>div{display:grid;gap:3px}.batch-topics-bar strong{font-size:14px}.batch-topics-bar span{font-size:12px;color:var(--accent);font-weight:800}.batch-topics-bar small{color:var(--muted);line-height:1.45}.topic-select{display:flex;align-items:center;gap:7px;margin-bottom:12px;color:var(--accent);font-size:12px;font-weight:800}.topic-select input{width:17px;height:17px;margin:0;accent-color:var(--accent)}.topic-card.is-selected{border-color:var(--accent);box-shadow:0 0 0 2px rgba(112,87,255,.12)}
.social-account-row{display:grid;grid-template-columns:minmax(0,1fr) 190px auto;align-items:center;gap:10px;margin-top:10px;padding:10px 0;border-top:1px solid var(--line)}.social-account-row>span{display:grid;gap:3px}.social-account-row small{color:var(--muted);font-size:11px}.social-account-channel{min-width:0}
.batch-select-all{display:flex;align-items:center;gap:7px;margin-top:5px;color:var(--accent);font-size:12px;font-weight:800}.batch-select-all input{width:17px;height:17px;margin:0;accent-color:var(--accent)}
.button-row{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.secondary-link{display:inline-flex;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:10px;text-decoration:none;color:var(--ink);font-size:12px;font-weight:700}
.admin-curation-post{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:13px}.curation-post-main{display:flex;align-items:flex-start;gap:10px;min-width:0}.curation-post-main>div{display:grid;gap:3px;min-width:0}.curation-post-main strong,.curation-post-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.curation-post-main small{display:block;color:var(--muted);font-size:11px}.curation-post-main a{font-size:11px;color:var(--accent);font-weight:700}.curation-post-check{width:17px;height:17px;margin-top:2px;accent-color:var(--accent)}
.carousel-preview{width:240px;min-width:0}.carousel-track{display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;border-radius:14px}.carousel-track img{width:220px;aspect-ratio:4/5;object-fit:cover;scroll-snap-align:start;border-radius:14px;background:#eee}.carousel-count{font-size:11px;color:var(--muted);margin-top:7px;text-align:center}
.preset-grid{display:grid;gap:10px;max-height:650px;overflow:auto}.preset-card{text-align:left;border:1px solid var(--line);background:#fff;border-radius:14px;padding:14px;display:grid;gap:5px}.preset-card:hover{border-color:var(--accent);transform:translateY(-1px)}.preset-card span{font-size:10px;font-weight:900;color:var(--accent)}.preset-card strong{font-size:15px}.preset-card small{color:var(--muted);line-height:1.4}.preset-card.global{background:#faf8ff}.prompt-layout{align-items:start}.compact-heading{margin-bottom:14px}
.settings-card{margin-top:20px}.guide-mini{font-size:13px;line-height:1.7}.guide-mini ol{padding-left:20px}.text-button{border:0;background:none;color:var(--accent);padding:0;font-weight:800}.guide-hero{margin-bottom:18px}.step-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.step-grid>div{border:1px solid var(--line);border-radius:14px;padding:14px;display:grid;gap:5px}.step-grid b{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--accent);color:#fff}.step-grid strong{font-size:14px}.step-grid span{font-size:11px;color:var(--muted)}.guide-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}.guide-card{line-height:1.75}.guide-card ol,.guide-card ul{padding-left:22px}.callout{background:#f3efff;border-left:4px solid var(--accent);padding:12px;border-radius:8px;font-size:13px}
.advanced-panel{margin-top:18px;border:1px solid var(--line);border-radius:14px;padding:14px}.advanced-panel summary{cursor:pointer;font-weight:800}.advanced-grid{margin-top:16px}.check-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:14px}.check-grid label{display:flex;align-items:center;gap:8px;font-size:12px}.check-grid input{width:auto}.generator-dialog label small{color:var(--muted);display:block;margin-top:4px}
@media(max-width:980px){.step-grid{grid-template-columns:repeat(2,1fr)}.guide-grid{grid-template-columns:1fr}.carousel-preview{width:100%}.carousel-track img{width:min(78vw,320px)}}
@media(max-width:680px){.check-grid{grid-template-columns:1fr}.step-grid{grid-template-columns:1fr}}
@media(max-width:680px){.batch-topics-bar{align-items:stretch;flex-direction:column}.batch-topics-bar button{width:100%}}
.integration-summary{display:grid;gap:7px;margin:-6px 0 14px}.integration-summary small{color:var(--muted);overflow-wrap:anywhere}.setup-dialog{width:min(860px,calc(100vw - 28px))}.setup-dialog form{max-height:min(88vh,900px);overflow:auto}.full-span{grid-column:1/-1}.setup-steps{line-height:1.75;padding-left:22px}.setup-steps a{color:var(--accent);font-weight:800}.setup-dialog .callout{margin-bottom:18px}.setup-dialog .fine-print{margin-top:18px}.setup-dialog input[readonly]{background:#f3f4f7;color:#555}
@media(max-width:680px){.full-span{grid-column:auto}}

/* v1.5 responsive layout and preview fixes */
.workspace, .page-section, .post-grid, .topic-grid { min-width: 0; }
.topic-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 285px), 1fr)); align-items: stretch; }
.topic-card { min-width: 0; min-height: 440px; }
.topic-image { position: relative; aspect-ratio: 16 / 9; background: #1b1d23; }
.topic-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.topic-image-badge { position: absolute; top: 12px; left: 12px; padding: 6px 9px; border-radius: 999px; background: rgba(15,16,20,.78); color: #fff; font-size: 10px; line-height: 1; font-weight: 900; letter-spacing: .12em; backdrop-filter: blur(6px); }
.topic-body { min-width: 0; gap: 0; }
.topic-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; line-height: 1.45; }
.topic-card h3 { margin: 0; font-size: 18px; line-height: 1.42; letter-spacing: -.025em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; word-break: keep-all; }
.topic-card p { margin: 10px 0 16px; min-height: 4.8em; overflow-wrap: anywhere; word-break: keep-all; }
.topic-card .button-row { margin-top: auto; }
.topic-growth-reasons{display:block;margin:0 0 10px;color:#6f52ee;font-size:11px;font-weight:700;line-height:1.45}
.growth-kit-dialog{width:min(760px,calc(100vw - 28px));max-height:calc(100vh - 28px);padding:0;border:0;border-radius:22px;box-shadow:0 24px 80px rgba(22,18,42,.28);background:#fff;color:var(--ink)}
.growth-kit-dialog::backdrop{background:rgba(12,12,20,.52)}
.growth-kit-shell{padding:24px;display:grid;gap:16px;overflow:auto;max-height:calc(100vh - 28px)}
.growth-kit-shell section{border:1px solid var(--line);border-radius:16px;padding:15px;background:#fff}
.growth-kit-shell h4{margin:0 0 10px;font-size:14px}.growth-kit-shell p{margin:7px 0;line-height:1.55;font-size:13px}.growth-kit-shell ol,.growth-kit-shell ul{margin:8px 0 0;padding-left:20px;line-height:1.65;font-size:13px}
.growth-score-box{display:grid;gap:4px;padding:14px 16px;border-radius:14px;background:linear-gradient(135deg,#f2efff,#faf9ff);color:#5639d2}.growth-score-box strong{font-size:18px}.growth-score-box span{font-size:12px;color:#665c86}
.growth-variant-list{display:grid;gap:8px}.growth-variant,.growth-cover{display:flex;align-items:flex-start;gap:9px;padding:11px 12px;border:1px solid var(--line);border-radius:12px;cursor:pointer;line-height:1.45;font-size:13px}.growth-variant:has(input:checked),.growth-cover:has(input:checked){border-color:var(--accent);background:#faf9ff;box-shadow:0 0 0 2px rgba(112,87,255,.1)}
.growth-cover-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.growth-cover{display:grid;gap:4px}.growth-cover span{font-size:12px;color:var(--muted)}
.growth-platform-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:12px}.growth-platform-grid>div{display:grid;gap:3px;padding:10px;border-radius:12px;background:#f7f7fa}.growth-platform-grid span,.growth-platform-grid small{font-size:12px;color:var(--muted);line-height:1.4}.growth-recommendation{padding:10px;border-radius:10px;background:#effaf4;color:#23734a;font-size:12px}.growth-recommendation.warn{background:#fff7e5;color:#8a5d00}.growth-kit-loading{padding:30px;font-weight:800}
.topic-card .button-row > * { min-width: 0; }
.topic-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 54px; margin: 16px 0 6px; }
.topic-pagination small { color: var(--muted); }
.post-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 62px; margin: 18px 0 8px; }
.post-pagination small { color: var(--muted); font-size: 12px; }
.post-pagination button { min-width: 132px; }

.post-grid { width: 100%; }
.post-tabs { display: flex; gap: 8px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.post-tabs button { border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.post-tabs button.active { border-bottom-color: var(--accent); color: var(--accent); }
.post-card { width: 100%; min-width: 0; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: clamp(18px, 2.2vw, 30px); padding: clamp(16px, 2vw, 24px); align-items: start; overflow: hidden; }
.post-content, .post-content > *, .post-content label { min-width: 0; max-width: 100%; }
.post-head { min-width: 0; }
.post-head > div { min-width: 0; }
.post-select { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: var(--accent); font-size: 12px; font-weight: 800; }
.post-select input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.post-growth-select { color: #5b43d6; }
.post-reel-convert-select { color: #147a62; }
.post-card.is-growth-selected { border-color: #7c63ea; box-shadow: 0 0 0 2px rgba(124,99,234,.12); }
.post-card.is-reel-convert-selected { border-color: #36a88a; box-shadow: 0 0 0 2px rgba(54,168,138,.12); }
.batch-topics-bar small { display: block; margin-top: 5px; color: var(--muted); line-height: 1.45; }
.post-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(112,87,255,.12); }
.post-head h4 { overflow-wrap: anywhere; word-break: keep-all; line-height: 1.45; }
.post-head small { display: block; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.caption-field { display: block; width: 100%; }
.caption-edit-hint { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.4; }
.post-caption { display: block; width: 100%; max-width: 100%; height: clamp(190px, 28vh, 330px); min-height: 160px; max-height: 430px; resize: vertical; overflow-x: hidden; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; line-height: 1.65; }
.post-meta-grid { margin-top: 14px; }
.post-meta-grid input { min-width: 0; text-overflow: ellipsis; }
.post-actions { align-items: center; }
.publish-reel-option { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 12px; font-weight: 800; }
.publish-reel-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.publish-channel-badge { color: var(--good, #17834b); font-size: 11px; font-weight: 800; }
.publish-channel-badge.processing { color: var(--accent, #6d4aff); }
.publish-channel-badge.failed { color: var(--danger, #c53030); }
.post-actions a { color: var(--accent); font-size: 13px; font-weight: 800; text-decoration: none; padding: 8px; }
.generation-warning { display: grid; gap: 5px; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #fff7e7; color: #855400; font-size: 12px; line-height: 1.5; }
.post-analytics-summary { color: #5f43d7 !important; font-weight: 600; }
.review-required { display: grid; gap: 3px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #f1d38a; border-radius: 12px; background: #fff9e9; color: #6f4d00; font-size: 12px; line-height: 1.5; }
.ai-voice-disclosure { display: inline-block; margin: 0 0 8px; padding: 4px 8px; border-radius: 999px; background: #eef2ff; color: #3949ab; font-size: 11px; font-weight: 700; }
.review-required strong { font-size: 13px; color: #5c3d00; }

.post-preview-shell, .carousel-preview { width: 100%; min-width: 0; }
.carousel-stage { position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: #111318; box-shadow: 0 12px 34px rgba(13,15,22,.13); }
.carousel-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; visibility: hidden; transform: scale(.995); transition: opacity .18s ease, transform .18s ease; }
.carousel-slide.active { opacity: 1; visibility: visible; transform: scale(1); }
.carousel-nav { position: absolute; z-index: 2; top: 50%; width: 38px; height: 38px; margin-top: -19px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: #18191e; font-size: 28px; line-height: 1; display: grid; place-items: center; box-shadow: 0 4px 18px rgba(0,0,0,.24); }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }
.carousel-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 4px 0; }
.carousel-dots { min-width: 0; display: flex; gap: 5px; justify-content: center; flex: 1; }
.carousel-dot { width: 6px; height: 6px; border-radius: 50%; background: #c8cbd3; }
.carousel-dot.active { width: 16px; border-radius: 999px; background: var(--accent); }
.carousel-count { flex: 0 0 auto; margin: 0; font-size: 11px; color: var(--muted); }
.post-video { display: block; width: 100%; max-width: 340px; aspect-ratio: 9 / 16; max-height: 620px; object-fit: contain; border-radius: 16px; background: #111; }

.generator-dialog { max-height: calc(100vh - 24px); overflow: hidden; }
.generator-dialog form { max-height: calc(100vh - 24px); overflow-y: auto; overflow-x: hidden; }
.generator-dialog textarea { min-height: 110px; max-height: 260px; }
.form-grid > label, .advanced-grid > label { min-width: 0; }
.form-grid input, .form-grid select, .form-grid textarea { min-width: 0; }

@media (max-width: 1180px) {
  .post-card { grid-template-columns: minmax(260px, 310px) minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .post-card { grid-template-columns: 1fr; }
  .carousel-preview, .post-preview-shell { width: min(100%, 440px); margin: 0 auto; }
  .post-video { margin: 0 auto; }
  .post-caption { height: 240px; }
}
@media (max-width: 520px) {
  .topic-grid { grid-template-columns: 1fr; }
  .post-card { padding: 13px; border-radius: 16px; }
  .post-head { flex-direction: column; }
  .post-caption { height: 220px; min-height: 150px; }
  .carousel-nav { width: 34px; height: 34px; margin-top: -17px; }
}
.post-content { overflow: hidden; }
.post-content textarea, .post-content input { box-sizing: border-box; }
.topic-image img { color: transparent; }

/* v1.6 generation progress and OAuth guidance */
.meta-user-connect-panel{display:flex;align-items:center;gap:12px;justify-content:space-between;margin:14px 0;padding:14px;border:1px solid var(--line);border-radius:14px;background:#f8f8fc}.meta-user-connect-panel small{color:var(--muted);line-height:1.55;flex:1}.generation-progress{margin-top:18px;padding:16px;border:1px solid #dcd5ff;border-radius:16px;background:linear-gradient(180deg,#faf8ff,#f5f2ff)}.generation-progress-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.generation-progress-head strong{font-size:14px}.generation-progress-head span{font-weight:900;color:var(--primary)}.generation-progress progress{display:block;width:100%;height:14px;accent-color:var(--primary)}.generation-progress p{margin:10px 0 4px;font-size:13px;font-weight:700;line-height:1.55}.generation-progress small{display:block;color:var(--muted);line-height:1.5}.generator-dialog.is-generating .dialog-head .icon-btn,.generator-dialog.is-generating #cancelGeneratorBtn{opacity:.45;pointer-events:none}.topic-image img{background:#171b25}.topic-image[data-preview-state="placeholder"]::after{content:"원문 대표 사진 없음";position:absolute;right:10px;bottom:10px;padding:5px 8px;border-radius:999px;background:rgba(0,0,0,.68);color:#fff;font-size:10px;font-weight:800}
.batch-generation-progress{margin-top:12px;padding:14px 16px;border:1px solid #dcd5ff;border-radius:16px;background:#fff}.batch-generation-progress .generation-progress-head{margin-bottom:8px}.batch-generation-progress .generation-progress-head span{font-size:11px;color:var(--muted);font-weight:600}.batch-progress-table-wrap{overflow-x:auto}.batch-progress-table{width:100%;border-collapse:collapse;font-size:12px}.batch-progress-table th,.batch-progress-table td{padding:9px 6px;border-bottom:1px solid #eceaf5;text-align:left;vertical-align:middle}.batch-progress-table th{color:var(--muted);font-weight:700}.batch-progress-table progress{display:block;width:min(240px,30vw);height:10px;accent-color:var(--primary)}.batch-progress-title{min-width:180px;max-width:340px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.batch-progress-percent{width:48px;font-weight:900;color:var(--primary)}.batch-progress-state{display:inline-block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}.batch-progress-state.completed{color:#168153;font-weight:800}.batch-progress-state.failed{color:#c23232;font-weight:800}
.batch-generation-progress{margin-top:12px;padding:14px 16px;border:1px solid #dcd5ff;border-radius:16px;background:#fff}.batch-generation-progress .generation-progress-head{margin-bottom:8px}.batch-generation-progress .generation-progress-head span{font-size:11px;color:var(--muted);font-weight:600}.batch-progress-table-wrap{overflow-x:auto}.batch-progress-table{width:100%;border-collapse:collapse;font-size:12px}.batch-progress-table th,.batch-progress-table td{padding:9px 6px;border-bottom:1px solid #eceaf5;text-align:left;vertical-align:middle}.batch-progress-table th{color:var(--muted);font-weight:700}.batch-progress-table progress{display:block;width:min(240px,30vw);height:10px;accent-color:var(--primary)}.batch-progress-title{min-width:180px;max-width:340px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.batch-progress-percent{width:48px;font-weight:900;color:var(--primary)}.batch-progress-state{display:inline-block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}.batch-progress-state.completed{color:#168153;font-weight:800}.batch-progress-state.failed{color:#c23232;font-weight:800}
@media(max-width:700px){.meta-user-connect-panel{align-items:stretch;flex-direction:column}.meta-user-connect-panel button{width:100%}}

/* v1.8 onboarding, setup and progress */
.role-guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:16px}.role-guide-grid>section{border:1px solid var(--border);border-radius:18px;padding:18px;background:#fff}.role-chip{display:inline-flex;align-items:center;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:800;letter-spacing:.04em}.role-chip.user{background:#eaf4ff;color:#1558a6}.role-chip.admin{background:#f1eaff;color:#6338b7}.wide-guide-card{grid-column:1/-1}.value-map{display:grid;gap:10px;margin-top:12px}.value-map>div{display:grid;grid-template-columns:minmax(180px,.7fr) 1.25fr 1.25fr;gap:12px;padding:12px;border:1px solid var(--border);border-radius:12px;background:#fafbff}.value-map span,.value-map code{overflow-wrap:anywhere}.admin-only-setup{margin-top:18px;padding-top:18px;border-top:1px solid var(--border)}.admin-setup-title{display:flex;gap:12px;align-items:flex-start;margin-bottom:14px}.admin-setup-title h4{margin:2px 0 4px}.admin-setup-title p{margin:0;color:var(--muted)}.meta-user-connect-panel{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px;border:1px solid #dce5ff;background:#f7f9ff;border-radius:16px}.meta-user-connect-panel>div{display:grid;gap:4px}.meta-user-connect-panel small{color:var(--muted)}.redirect-compare-box{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;margin-top:14px;padding:14px;border-radius:14px;background:#f8f9fc}.redirect-compare-box p{grid-column:1/-1;margin:0}.generation-progress-meta{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:12px;margin-top:4px}.good-text{color:#137333!important}.error-message{color:#b42318!important}.generator-dialog code,.guide-card code{word-break:break-all}
/* 생성 중에도 팝업을 닫아 백그라운드 작업으로 전환할 수 있어야 한다. */
.generator-dialog.is-generating #cancelGeneratorBtn{opacity:1;pointer-events:auto}
.generator-dialog.is-generating .dialog-head .icon-btn{opacity:1;pointer-events:auto}
@media(max-width:900px){.role-guide-grid,.value-map{grid-template-columns:1fr}.value-map>div{grid-template-columns:1fr}.meta-user-connect-panel{align-items:stretch;flex-direction:column}.redirect-compare-box{grid-template-columns:1fr}.redirect-compare-box button{width:100%}}


/* v1.8.5 privacy policy and consent */
.privacy-consent{align-items:flex-start;gap:9px;font-size:.85rem;line-height:1.45}.privacy-consent input{margin-top:3px;flex:0 0 auto}.privacy-consent a,.legal-link,.fine-print a{color:var(--accent,#7057ff);text-decoration:underline;text-underline-offset:2px}.legal-links{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.legal-link{font-size:.78rem;text-align:center;display:block;margin:4px 0 8px}.sidebar-bottom{gap:6px}

/* v1.8.8 text-only topic cards: preview images are intentionally not requested */
.topic-card.topic-card-text-only { min-height: 285px; }
.topic-card.topic-card-text-only .topic-body { height: 100%; padding: 22px; }
.topic-card.topic-card-text-only h3 { -webkit-line-clamp: 4; font-size: 19px; line-height: 1.48; }
  .topic-card.topic-card-text-only p { min-height: 6.4em; -webkit-line-clamp: 4; }
  .topic-meta { display: grid; gap: 7px; letter-spacing: 0; }
  .topic-meta-category, .topic-meta-details { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
  .topic-meta-details { color: var(--muted); font-size: 11px; font-weight: 700; }
  .topic-card.is-posted { border-color: #b8dec9; }
  .topic-posted-badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; background: #eaf8f0; color: #13794b; border: 1px solid #b8dec9; font-size: 10px; font-weight: 900; letter-spacing: 0; }
  .topic-category-badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; letter-spacing: 0; background: #f1efff; color: #6247c7; }
  .topic-category-badge.light { background: #fff3df; color: #986000; }
  .topic-category-badge.news { background: #eef3ff; color: #315aa5; }
  .topic-category-badge.event { background: #e8fbf3; color: #147a62; }
  .topic-category-badge.event { background: #e8fbf3; color: #147a62; }

  /* v1.8.8 RSS recommendation library */
.rss-recommend-card { margin-top: 18px; }
.rss-recommend-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 10px; }
.rss-recommend-item { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.rss-recommend-item > div { min-width: 0; display: grid; gap: 5px; }
.rss-recommend-item strong { font-size: 14px; }
.rss-recommend-item small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rss-recommend-item button { flex: 0 0 auto; }
.generator-dialog.is-generating.batch-running .dialog-head .icon-btn,.generator-dialog.is-generating.batch-running #cancelGeneratorBtn{opacity:1;pointer-events:auto}
.caption-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 13px; font-weight: 800; }
.caption-save-status { min-height: 1em; color: var(--muted); font-size: 11px; font-weight: 600; }
.caption-save-status.saving { color: #8a6500; }
.caption-save-status.saved { color: #1b7d4b; }
.caption-save-status.error { color: #b42318; }
.carousel-actions { display: flex; justify-content: center; padding-top: 9px; }
.carousel-regenerate { position: static; transform: none; border: 0; border-radius: 999px; padding: 8px 13px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; white-space: nowrap; cursor: pointer; box-shadow: 0 5px 18px rgba(0,0,0,.16); }
.carousel-regenerate:hover:not(:disabled) { background: rgba(112,87,255,.95); }
.carousel-regenerate:disabled { cursor: wait; opacity: .72; }
.reference-discovery-panel { display: none !important; }

/* v1.8.8 action layout cleanup */
.topic-utility-row { align-items: center; margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fbfbfe; }
.topic-utility-row > span { flex: 1 1 auto; min-width: 0; line-height: 1.5; }
.topic-utility-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.topic-refresh-form { align-items: center; }
.filter-strip { padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fbfbfd; }
.filter-strip select, .filter-strip input { min-height: 40px; }
.batch-topics-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; margin: 14px 0 18px; }
.batch-topics-bar > div:first-child { min-width: 0; display: grid; gap: 4px; }
.batch-topics-bar strong { font-size: 13px; }
.batch-topics-bar small { color: var(--muted); line-height: 1.45; }
.batch-topics-bar .primary { flex: 0 0 auto; white-space: nowrap; }
.topic-card-text-only .topic-body { display: flex; }
.topic-card-text-only .topic-body > .button-row { margin-top: auto; padding-top: 14px; align-items: stretch; }
.topic-card-text-only .topic-body > .button-row { flex-wrap: nowrap; }
.topic-card-text-only .topic-body > .button-row > * { flex: 1 1 0; min-width: 0; min-height: 48px; text-align: center; white-space: nowrap; line-height: 1.15; }
.topic-card-text-only .topic-body > .button-row > .generate-btn { font-size: 13px; letter-spacing: -.04em; padding-inline: 10px; }
.topic-card-text-only .topic-body > .button-row > .secondary-link { font-size: 14px; font-weight: 800; padding-inline: 10px; }
.post-actions { align-items: stretch; padding-top: 12px; border-top: 1px solid #eef0f4; }
.post-actions > button, .post-actions > a, .post-actions > label { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; }
.caption-label-row { align-items: center; }
.caption-label-tools { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.caption-regenerate { padding: 6px 10px; border-radius: 9px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.caption-label-tools .caption-save-status { white-space: nowrap; }
@media (max-width: 700px) {
  .topic-utility-row { align-items: stretch; flex-direction: column; }
  .topic-utility-actions { justify-content: stretch; }
  .topic-utility-actions button { flex: 1 1 0; }
  .batch-topics-bar { align-items: stretch; flex-direction: column; }
  .batch-topics-bar .primary { width: 100%; }
  .filter-strip { align-items: stretch; }
  .filter-strip select, .filter-strip input, .filter-strip label { width: 100%; max-width: none; }
  .caption-label-row { align-items: flex-start; flex-direction: column; }
  .caption-label-tools { width: 100%; justify-content: space-between; }
}
.generator-dialog.is-generating .dialog-head .icon-btn,.generator-dialog.is-generating #cancelGeneratorBtn{opacity:.8;pointer-events:auto}

/* Final interaction pass: predictable focus, readable mobile controls and
   an explicit busy state for async actions. */
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid rgba(112,87,255,.38);outline-offset:2px}
button[aria-busy="true"]{cursor:wait;opacity:.7}
.user-advertisement-card{margin-top:18px}
.user-advertisement-list{display:grid;gap:16px}
.user-ad-account{padding:16px;border:1px solid var(--line);border-radius:14px;background:#fbfbfd}
.user-ad-account-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.user-ad-account-heading>div{display:grid;gap:4px}
.user-ad-account-heading small{color:var(--muted)}
.user-ad-upload-form{display:grid;grid-template-columns:minmax(150px,1fr) minmax(180px,1fr) auto;gap:8px;align-items:center;padding-bottom:14px;border-bottom:1px solid var(--line)}
.user-ad-upload-form small{grid-column:1/-1;color:var(--muted)}
.user-ad-items{display:grid;gap:8px;margin-top:14px}
.user-ad-item{display:grid;grid-template-columns:54px minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:8px;border:1px solid var(--line);border-radius:11px;background:#fff}
.user-ad-item>img{width:54px;height:68px;object-fit:cover;border-radius:7px;background:#eef0f4}
.user-ad-item-main{display:grid;gap:4px;min-width:0}
.user-ad-item-main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.user-ad-item-main small{color:var(--muted);line-height:1.35}
.user-ad-toggle{min-height:0;white-space:nowrap}
.user-ad-managed{color:var(--muted);font-size:11px;white-space:nowrap}
@media(max-width:700px){
  .user-ad-upload-form{grid-template-columns:1fr}
  .user-ad-upload-form small{grid-column:auto}
  .user-ad-upload-form button{width:100%}
  .user-ad-item{grid-template-columns:48px minmax(0,1fr) auto}
  .user-ad-item>img{width:48px;height:60px}
  .user-ad-item>.user-ad-managed,.user-ad-item>.user-ad-delete{grid-column:2/-1;justify-self:start}
}
@media(max-width:480px){
  .topic-card-text-only .topic-body{padding:16px}
  .topic-card-text-only h3{font-size:17px}
  .topic-card-text-only .topic-body>.button-row{gap:7px}
  .topic-card-text-only .topic-body>.button-row>.generate-btn,.topic-card-text-only .topic-body>.button-row>.secondary-link{font-size:12px;padding-inline:7px}
  .dialog-head{gap:8px}
  .generator-dialog{width:calc(100vw - 20px);max-width:none}
  .caption-label-tools{align-items:stretch;flex-direction:column}
  .caption-label-tools .caption-regenerate{width:100%}
}

/* v1.9 content library workspace: filters, selection and actions stay in one
   predictable control surface instead of competing with each post card. */
.post-filter-strip{display:grid;grid-template-columns:auto minmax(0,1fr);gap:14px;align-items:center;margin:16px 0 10px;padding:12px 14px;background:#fff;border-color:#e7e5ef;box-shadow:0 5px 18px rgba(24,25,32,.035)}
.post-filter-title{display:grid;gap:3px;min-width:145px}.post-filter-title strong{font-size:13px}.post-filter-title span{color:var(--muted);font-size:11px;font-weight:700;white-space:nowrap}
.post-filter-controls{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;min-width:0}.post-filter-controls input{flex:1 1 220px;min-width:160px;max-width:none}.post-filter-controls select{flex:0 1 145px;min-width:120px}.post-filter-controls button{min-height:40px;white-space:nowrap}
.post-bulk-panel{display:grid;gap:8px;margin:0 0 18px;padding:14px 16px;border:1px solid #ded9f7;border-radius:16px;background:linear-gradient(135deg,#faf9ff,#fff);box-shadow:0 8px 24px rgba(65,45,145,.045)}
.post-bulk-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 2px 4px}.post-bulk-panel-head>div{display:grid;gap:3px}.post-bulk-panel-head strong{font-size:13px}.post-bulk-panel-head small,.post-bulk-panel-head span{color:var(--muted);font-size:11px;line-height:1.4}.post-bulk-panel-head span{white-space:nowrap}
.post-bulk-panel .batch-topics-bar{margin:0;padding:10px 2px;border:0;border-top:1px solid #eceaf7;border-radius:0;background:transparent;box-shadow:none}.post-bulk-panel .batch-topics-bar:first-of-type{border-top:0}.post-bulk-panel .batch-topics-bar>div:first-child{gap:3px}.post-bulk-panel .batch-topics-bar strong{font-size:12px}.post-bulk-panel .batch-topics-bar small{font-size:11px}.post-bulk-panel .batch-topics-bar .primary,.post-bulk-panel .batch-topics-bar button{min-height:38px}
.post-card-selectors{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:0 0 10px}.post-card-selectors .post-select{margin:0;padding:6px 9px;border:1px solid #e5e3ed;border-radius:999px;background:#fafaff;color:#5b4ab0;font-size:11px;line-height:1.1}.post-card-selectors .post-select:has(input:checked){border-color:#ad9bf9;background:#f0ecff;color:#5337bd}.post-card-selectors .post-select input{width:15px;height:15px}
.post-actions{display:flex;align-items:center;gap:7px;padding-top:14px}.post-actions>button,.post-actions>a{min-height:37px}.post-actions>.post-publish{order:1}.post-actions>.post-approve,.post-actions>.post-reel-retry{order:2}.post-actions>.post-more-actions{order:3;margin-left:auto}.post-more-actions{position:relative;min-width:72px}.post-more-actions summary{display:flex;align-items:center;justify-content:center;min-height:37px;padding:8px 11px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-size:12px;font-weight:800;cursor:pointer;list-style:none}.post-more-actions summary::-webkit-details-marker{display:none}.post-more-actions[open] summary{border-color:#b9adf7;background:#f7f4ff;color:#5337bd}.post-more-actions-list{position:absolute;z-index:5;right:0;bottom:calc(100% + 7px);display:grid;min-width:145px;gap:5px;padding:7px;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:0 12px 30px rgba(20,18,35,.16)}.post-more-actions-list>button,.post-more-actions-list>a{width:100%;min-height:34px;padding:7px 9px!important;border-radius:8px;text-align:left;justify-content:flex-start;font-size:11px}.post-more-actions-list .danger{color:var(--danger)}
#generationAccountOption{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr);gap:5px;padding:10px 12px;border:1px solid #ded9f7;border-radius:12px;background:#faf9ff}#generationAccountOption>span{font-size:12px;font-weight:800}#generationAccountOption select{min-height:42px}#generationAccountOption small{color:var(--muted);font-size:11px}
@media(max-width:760px){.post-filter-strip{grid-template-columns:1fr}.post-filter-controls{justify-content:stretch}.post-filter-controls input,.post-filter-controls select,.post-filter-controls button{flex:1 1 100%;width:100%;max-width:none}.post-bulk-panel-head{align-items:flex-start;flex-direction:column}.post-bulk-panel-head span{white-space:normal}.post-bulk-panel .batch-topics-bar{align-items:stretch;flex-direction:column}.post-bulk-panel .batch-topics-bar button{width:100%}.post-actions{align-items:stretch;flex-wrap:wrap}.post-actions>.post-publish,.post-actions>.post-approve,.post-actions>.post-reel-retry{flex:1 1 calc(50% - 7px)}.post-actions>.post-more-actions{margin-left:0;flex:1 1 100%}.post-more-actions-list{position:static;margin-top:6px}.post-more-actions[open] .post-more-actions-list{display:grid}}

:is(.card,.panel,.modal,.dialog,.btn,button,input,select,textarea){border-radius:12px}:is(input[type=checkbox],input[type=radio]){width:18px;height:18px;min-height:18px;padding:0;accent-color:#4264c5}

/* Editorial news list with restrained color and legible metadata. */
.hero-panel{background:#18242c;color:#f7f8f7}
.hero-panel .eyebrow{opacity:1;color:#b7d8cd;letter-spacing:.08em}
.hero-panel h1{font-size:clamp(40px,5vw,72px);line-height:1.12;letter-spacing:-.045em;text-wrap:balance}
.hero-panel .hero-copy{color:#e0e9e5;font-size:17px;line-height:1.75}
.hero-panel .feature-row span{border-radius:4px;border-color:#61716e;color:#e5eeeb}
.topic-grid{grid-template-columns:1fr!important;gap:0}
.topic-card.topic-card-text-only{min-height:0;border:0;border-bottom:1px solid #d9dee1;border-radius:0!important;background:transparent;box-shadow:none}
.topic-card.topic-card-text-only .topic-body{height:auto;padding:22px 5px}
.topic-card.topic-card-text-only h3{font-size:20px;line-height:1.42;-webkit-line-clamp:2;color:#202e35}
.topic-card.topic-card-text-only p{min-height:0;-webkit-line-clamp:2;color:#4a5960;font-size:14px;line-height:1.65}
.topic-card.topic-card-text-only .topic-meta-details{color:#51616a;font-size:12px}
.topic-card.topic-card-text-only .topic-body>.button-row{margin-top:3px;padding-top:12px;justify-content:flex-start}
.topic-card.topic-card-text-only .topic-body>.button-row>*{flex:0 0 auto;min-height:39px;padding-inline:15px}
.topic-card.topic-card-text-only .topic-body>.button-row>.secondary-link{font-size:13px}
.toolbar.card{border-radius:6px;background:#f7f9f8;box-shadow:none}
.toolbar p,.section-heading p{color:#506069;font-size:14px}
@media(max-width:600px){.topic-card.topic-card-text-only .topic-body{padding:19px 2px}.topic-card.topic-card-text-only h3{font-size:18px}.topic-card.topic-card-text-only .topic-body>.button-row>*{flex:1 1 0}}

/* === v15 p19 FULL UI/FUNCTION REPAIR === */
html,body{min-width:320px;overflow-x:hidden}body,button,input,select,textarea{font-family:"Pretendard","Noto Sans KR","Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif!important}:where(h1,h2,h3,p,span,label,button,a,td,th,small,strong,b){word-break:keep-all!important;overflow-wrap:normal!important}:where(a[href^="http"],code,.url-text){overflow-wrap:anywhere!important;word-break:normal!important}.app-shell,.main-content,.content,.container{min-width:0!important}.card,.panel,.topic-card,.post-card{min-width:0!important}.table-scroll,.tableWrap{width:100%!important;max-width:100%!important;overflow-x:auto!important}.table-scroll table,.tableWrap table{width:100%!important;min-width:900px!important;table-layout:auto!important}:where(button,.button){display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:40px!important;line-height:1.25!important;text-align:center!important;white-space:nowrap!important}:where(input,select,textarea){max-width:100%!important;box-sizing:border-box!important}.modal,.generator-dialog,.dialog{max-width:calc(100vw - 32px)!important;max-height:calc(100dvh - 32px)!important}.legal-links{display:flex!important;gap:10px!important;flex-wrap:wrap!important}.post-card-text,.caption-text,.topic-card p{white-space:normal!important;overflow:visible!important;text-overflow:clip!important}

/* v15.20 common finish */
footer nav,.footer-links{margin-left:auto!important;text-align:right!important}.button,button,input,select{min-height:40px}.button,button{display:inline-flex;align-items:center;justify-content:center}.card,.panel{min-width:0}.card p,.panel p{word-break:keep-all;overflow-wrap:normal}
/* 회원 탈퇴: 주 행동과 떨어진 설정 화면 맨 아래, 확인 창을 거친다 */
.account-withdraw-card{margin-top:40px}
.account-withdraw-card button,#accountWithdrawDialog button{min-height:44px}
#accountWithdrawDialog{width:min(520px,calc(100vw - 32px))}
#accountWithdrawError{color:var(--danger);font-size:14px;margin:0}
#accountWithdrawError:empty{display:none}
