* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: #f5f6f8;
  color: #17191e;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #e7e9ed;
}
.topbar h1 { font-size: 18px; margin: 0; }
.handle { color: #7a7f8a; font-weight: 400; font-size: 14px; }
.status { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: #eef0f3; }
.status.ok { background: #e3f6ec; color: #16865e; }
.status.warn { background: #fdecec; color: #c74f58; }

main { max-width: 880px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.card { background: #fff; border: 1px solid #e7e9ed; border-radius: 14px; padding: 20px 24px; }
.card h2 { font-size: 15px; margin: 0 0 12px; }
.card.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.hint { color: #7a7f8a; font-size: 13px; margin: 4px 0; }
.empty { color: #9aa0ab; font-size: 13px; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
button {
  border: none; border-radius: 999px; padding: 8px 16px; font-size: 13px;
  background: #17191e; color: #fff; cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: default; }
button.secondary { background: #eef0f3; color: #17191e; }
button.danger { background: #fdecec; color: #c74f58; }

.result { font-size: 13px; color: #16865e; min-height: 18px; }
.result.error { color: #c74f58; }

.persona-block { margin-bottom: 12px; }
.persona-block h3 { font-size: 13px; color: #7a7f8a; margin: 0 0 4px; }
.persona-block p { white-space: pre-wrap; margin: 0; font-size: 14px; line-height: 1.6; }

.period-switch { display: flex; gap: 6px; margin-bottom: 10px; }
.period-btn {
  background: #eef0f3; color: #17191e; padding: 5px 12px; font-size: 12px;
}
.period-btn.active { background: #17191e; color: #fff; }

.analyze-list-btn { margin-bottom: 10px; }

.post-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.post-list li { border: 1px solid #eef0f3; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.post-list .meta { color: #7a7f8a; font-size: 12px; margin-bottom: 4px; }
.post-thumb { max-width: 100%; max-height: 240px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; display: block; }

.analysis-block {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e7e9ed;
  display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 1.6;
}
.analysis-block strong { color: #17191e; }
.analysis-block .save-suggestion { align-self: flex-start; margin-top: 2px; }

.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.inline-form input { flex: 1 1 160px; padding: 8px 10px; border: 1px solid #dfe2e7; border-radius: 8px; font-size: 13px; }
.inline-form input[type="number"] { flex: 0 0 80px; }

.draft-card { border: 1px solid #eef0f3; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.draft-card textarea {
  width: 100%; min-height: 90px; padding: 10px; border: 1px solid #dfe2e7; border-radius: 8px;
  font-size: 14px; font-family: inherit; resize: vertical;
}
.draft-card .reasoning { color: #7a7f8a; font-size: 12px; margin: 6px 0; }
.draft-card .row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.draft-card input[type="datetime-local"] { padding: 6px 8px; border: 1px solid #dfe2e7; border-radius: 8px; font-size: 13px; }
