body {
  background-color: #fff8fa;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  min-height: 100vh;
  padding: 2rem 1rem;
}

a {
  color: #ff8da1;
}

h2, h3 {
  color: #ff8da1;
}

h2 {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 3rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.text-love-dark {
  color: #333333;
}

.bg-love-primary {
  background-color: #ff8da1;
}

.bg-love-secondary {
  background-color: #ffc2d1;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.shadow-md {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.p-6 {
  padding: 1.5rem;
}

.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.md\:grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.gap-4 {
  gap: 1rem;
}

.object-cover {
  object-fit: cover;
}

.hover\:scale-105:hover {
  transform: scale(1.05);
}

.transition-transform {
  transition: transform 0.2s;
}

.text-xs {
  font-size: 0.75rem;
}

.text-center {
  text-align: center;
}

.inline-block {
  display: inline-block;
}

.max-w-4xl {
  max-width: 64rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.left-4 {
  left: 1rem;
}

.top-0 {
  top: 0;
}

.h-full {
  height: 100%;
}

.w-0\.5 {
  width: 0.125rem;
}

.bg-white {
  background-color: #ffffff;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.text-love-primary {
  color: #ff8da1;
}

.text-love-dark\/70 {
  color: rgba(51, 51, 51, 0.7);
}

.text-love-primary\/20 {
  color: rgba(255, 141, 161, 0.2);
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.rounded-full {
  border-radius: 9999px;
}

.timeline-line {
  position: absolute;
  left: 0.25rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #ff8da1, rgba(255, 194, 209, 0.25));
}

.diary-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.diary-editor-modal.hidden {
  display: none;
}

.diary-editor-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.diary-editor-panel {
  position: relative;
  z-index: 1;
  width: min(72rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border-radius: 0.75rem;
  background: #fff8fa;
  box-shadow: 0 18px 50px rgba(51, 51, 51, 0.28);
  padding: 1.25rem;
}

.diary-editor-header,
.diary-editor-output {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.diary-editor-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  color: #ff8da1;
  background: rgba(255, 141, 161, 0.12);
}

.diary-editor-fields {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(10rem, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}

.diary-editor-fields label,
.diary-editor-pane {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: #666666;
  font-size: 0.875rem;
}

.diary-editor-fields input,
.diary-editor-pane textarea {
  width: 100%;
  border: 1px solid rgba(255, 141, 161, 0.35);
  border-radius: 0.5rem;
  background: #ffffff;
  color: #333333;
  outline: none;
}

.diary-editor-fields input {
  min-height: 2.75rem;
  padding: 0 0.875rem;
}

.diary-editor-fields input:focus,
.diary-editor-pane textarea:focus {
  border-color: #ff8da1;
  box-shadow: 0 0 0 3px rgba(255, 141, 161, 0.16);
}

.diary-editor-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.diary-editor-pane textarea,
.diary-editor-preview {
  min-height: 26rem;
  padding: 1rem;
}

.diary-editor-pane textarea {
  resize: vertical;
  font-family: Consolas, "SFMono-Regular", "Microsoft YaHei", monospace;
  line-height: 1.65;
}

.diary-editor-preview {
  overflow: auto;
  border: 1px solid rgba(255, 141, 161, 0.25);
  border-radius: 0.5rem;
  background: #ffffff;
  color: #333333;
  line-height: 1.7;
}

.diary-editor-preview h1,
.diary-editor-preview h2,
.diary-editor-preview h3 {
  margin: 1rem 0 0.5rem;
}

.diary-editor-preview p,
.diary-editor-preview ul,
.diary-editor-preview ol,
.diary-editor-preview blockquote {
  margin-bottom: 0.75rem;
}

.diary-editor-preview ul,
.diary-editor-preview ol {
  padding-left: 1.5rem;
}

.diary-editor-preview blockquote {
  border-left: 3px solid #ffc2d1;
  padding-left: 0.75rem;
  color: #666666;
}

.diary-editor-preview-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 0.75rem 0;
}

.diary-editor-output code {
  display: block;
  margin-top: 0.25rem;
  color: #333333;
}

.diary-editor-status {
  min-height: 1.25rem;
  margin-top: 0.75rem;
  color: #666666;
  font-size: 0.875rem;
}

.diary-editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.diary-editor-primary-button,
.diary-editor-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.65rem 1rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.diary-editor-primary-button {
  background: #ff8da1;
  color: #ffffff;
}

.diary-editor-secondary-button {
  background: rgba(255, 141, 161, 0.12);
  color: #ff8da1;
}

.diary-editor-primary-button:hover,
.diary-editor-secondary-button:hover {
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .diary-editor-fields,
  .diary-editor-workspace {
    grid-template-columns: 1fr;
  }

  .diary-editor-header,
  .diary-editor-output {
    align-items: flex-start;
    flex-direction: column;
  }
}
