/* quote-studio 공통 스타일 — 차분한 독서용 톤 */
:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #2b2a26;
  --muted: #8a8578;
  --line: #e4e0d6;
  --accent: #4a6b57;
  --accent-ink: #ffffff;
  --danger: #a04b3c;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 15px; line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line);
}
header.topbar .brand { font-weight: 700; font-size: 17px; }
header.topbar .spacer { flex: 1; }

main { max-width: 960px; margin: 24px auto; padding: 0 16px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 20px 24px; margin-bottom: 20px;
}
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }

table.board { width: 100%; border-collapse: collapse; }
table.board th, table.board td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line);
}
table.board th { color: var(--muted); font-weight: 600; font-size: 13px; }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge.draft { background: #eee9dd; color: #7a7059; }
.badge.approved { background: #dcebe2; color: #2f5a44; }
.badge.mood { background: #e8e4f4; color: #574d7d; }
.badge.generating { background: #e3ecf6; color: #3a5a80; }
.badge.generated { background: #dcebe2; color: #2f5a44; }
.badge.failed { background: #f6e3de; color: #a04b3c; }
.badge.publish_approved { background: #f2ead4; color: #7d6420; }
.badge.scheduled { background: #e8e4f4; color: #574d7d; }
.badge.published { background: #d9e8d2; color: #38602c; }

button, .btn {
  display: inline-block; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink);
  padding: 8px 16px; font-size: 14px; cursor: pointer;
}
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.danger { background: var(--card); border-color: var(--danger); color: var(--danger); }
button:hover { filter: brightness(0.96); }

form.stack label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 13px; color: var(--muted); }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: #fdfcf9;
}
textarea { resize: vertical; }

.alert { padding: 10px 14px; border-radius: 8px; margin: 10px 0; }
.alert.error { background: #f6e3de; color: var(--danger); }

.scene { border-left: 3px solid var(--line); padding: 8px 14px; margin: 12px 0; }
.scene .scene-type { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.quote-box {
  background: #faf8f2; border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 22px; margin: 12px 0; font-size: 17px;
}
.quote-box .author { color: var(--muted); font-size: 14px; margin-top: 6px; }

.versions li { margin: 6px 0; }
.meta { color: var(--muted); font-size: 13px; }

/* HTMX 로딩 표시 */
.htmx-indicator { display: none; color: var(--muted); font-size: 13px; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline; }
.htmx-request button[type=submit] { opacity: 0.5; pointer-events: none; }

/* 생성 진행 배너 (스피너 + 실시간 경과) */
.gen-banner {
  margin-top: 14px; padding: 14px 18px; border-radius: 10px;
  background: #e6efe8; border: 1px solid #b9d2bf; color: #2f5a44;
  font-weight: 600; font-size: 15px;
}
.gen-banner.htmx-request { display: flex; align-items: center; gap: 12px; }
.gen-banner .elapsed { font-variant-numeric: tabular-nums; }
.spinner {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  border: 3px solid #b9d2bf; border-top-color: #2f5a44;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
