/* project:src/styles.css */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: #f6f5f2;
  color: #2f3237;
  font-family:
    "Noto Sans SC",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    system-ui,
    -apple-system,
    sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
#root {
  min-height: 100vh;
  width: 100%;
}
.app {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid #e4e1da;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #4f6f52;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}
.brand h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.02em;
}
.brand-sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #8b8d86;
}
.btn {
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 9px 18px;
  transition:
    background-color 0.15s,
    color 0.15s,
    border-color 0.15s,
    transform 0.05s;
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: #4f6f52;
  color: #fff;
}
.btn.primary:hover {
  background: #45624a;
}
.btn.ghost {
  background: #fff;
  border-color: #d9d5cc;
  color: #4a4d45;
}
.btn.ghost:hover {
  background: #f1efe9;
}
.btn.danger {
  background: #fff;
  border-color: #e0c4bd;
  color: #a4493a;
}
.btn.danger:hover {
  background: #fbf0ed;
}
.notice {
  margin: 16px 0 0;
  padding: 9px 14px;
  border-radius: 10px;
  background: #eaf0e7;
  color: #3f5b41;
  font-size: 13.5px;
}
.list-meta {
  margin: 22px 0 12px;
  font-size: 13px;
  color: #8b8d86;
}
.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.entry-card {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  background: #fff;
  border: 1px solid #e6e3dc;
  border-radius: 14px;
  padding: 16px 18px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.05s;
}
.entry-card:hover {
  border-color: #c3cdbf;
  box-shadow: 0 6px 18px rgba(60, 70, 60, 0.07);
}
.entry-card:active {
  transform: translateY(1px);
}
.card-date {
  display: block;
  font-size: 12px;
  color: #8b8d86;
  letter-spacing: 0.02em;
}
.card-title {
  display: block;
  margin-top: 4px;
  font-size: 16.5px;
  font-weight: 600;
  color: #2f3237;
  overflow-wrap: anywhere;
}
.card-excerpt {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: #6b6e66;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.empty {
  text-align: center;
  padding: 56px 20px;
  background: #fff;
  border: 1px dashed #ddd8ce;
  border-radius: 16px;
  margin-top: 22px;
}
.empty-icon {
  font-size: 34px;
  margin: 0 0 8px;
}
.empty h2 {
  margin: 0 0 6px;
  font-size: 18px;
}
.empty p {
  margin: 0 auto 20px;
  max-width: 26em;
  color: #7c7f76;
  font-size: 14px;
}
.entry-detail {
  background: #fff;
  border: 1px solid #e6e3dc;
  border-radius: 16px;
  padding: 22px;
  margin-top: 22px;
}
.detail-date {
  margin: 0;
  font-size: 12.5px;
  color: #8b8d86;
}
.detail-title {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.detail-updated {
  margin: 6px 0 0;
  font-size: 12px;
  color: #9a9d94;
}
.detail-content {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0eee8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 15.5px;
  color: #3a3d36;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.editor {
  background: #fff;
  border: 1px solid #e6e3dc;
  border-radius: 16px;
  padding: 22px;
  margin-top: 22px;
}
.editor-title {
  margin: 0;
  font-size: 19px;
}
.editor-hint {
  margin: 4px 0 18px;
  font-size: 12.5px;
  color: #8b8d86;
}
.field {
  display: block;
  margin-bottom: 16px;
}
.field-label {
  display: block;
  font-size: 13px;
  color: #5c5f57;
  margin-bottom: 6px;
}
.field-optional,
.field-required {
  color: #9a9d94;
  font-size: 12px;
}
.input,
.textarea {
  width: 100%;
  max-width: 100%;
  font: inherit;
  color: #2f3237;
  background: #fbfaf8;
  border: 1px solid #ddd9d0;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s, background-color 0.15s;
}
.input:focus,
.textarea:focus {
  border-color: #7c9a7f;
  background: #fff;
}
.textarea {
  resize: vertical;
  min-height: 180px;
  line-height: 1.7;
}
.field-error {
  margin: -6px 0 14px;
  font-size: 13px;
  color: #a4493a;
}
.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(32, 34, 30, 0.42);
  padding: 20px;
}
.modal {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}
.modal h2 {
  margin: 0 0 8px;
  font-size: 17px;
}
.modal p {
  margin: 0;
  font-size: 14px;
  color: #6b6e66;
  overflow-wrap: anywhere;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .app {
    padding: 20px 14px 56px;
  }
  .app-header {
    align-items: stretch;
  }
  .app-header .btn.primary {
    width: 100%;
  }
  .brand h1 {
    font-size: 18px;
  }
  .entry-detail,
  .editor {
    padding: 18px 16px;
    border-radius: 14px;
  }
  .detail-title {
    font-size: 19px;
  }
  .detail-actions .btn,
  .editor-actions .btn,
  .modal-actions .btn {
    flex: 1 1 auto;
  }
}
