* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Malgun Gothic", sans-serif;
  background: #f7f7f8;
  color: #1a1a1a;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

header h1 {
  font-size: 22px;
  margin: 0;
}

header h1 a {
  color: inherit;
  text-decoration: none;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: #1d4ed8;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
}

.post-list li {
  border-bottom: 1px solid #eee;
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
}

.post-list a:hover {
  background: #f9fafb;
}

.post-title {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-meta {
  font-size: 13px;
  color: #888;
  white-space: nowrap;
  margin-left: 12px;
}

.empty {
  padding: 32px 16px;
  text-align: center;
  color: #888;
}

.card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 24px;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.card .post-meta {
  margin: 0 0 16px;
  display: block;
}

.card .post-content {
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 15px;
}

.card .form-actions {
  margin-top: 20px;
}

#delete-btn {
  background: #dc2626;
}

#delete-btn:hover {
  background: #b91c1c;
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 24px;
}

label {
  font-size: 13px;
  color: #555;
  margin-bottom: -6px;
}

input, textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: #2563eb;
  text-decoration: none;
  font-size: 14px;
}
