body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 34% at 50% 0%, #eef0e5, transparent 70%),
    var(--paper);
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

.m-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: calc(18px + env(safe-area-inset-top)) 20px 12px;
  max-width: 640px;
  margin: 0 auto;
}

.m-brand {
  font: 700 24px/1 var(--serif);
  letter-spacing: 0.12em;
  color: #2c3d2e;
}

.m-date {
  margin-top: 7px;
  color: var(--quiet);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.m-link {
  margin-top: 4px;
  color: var(--grey);
  font-size: 11.5px;
  text-decoration: none;
  border-bottom: 1px solid #c9cdbd;
  padding-bottom: 2px;
  white-space: nowrap;
}

.m-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 4px 16px 0;
}

.block {
  margin-top: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 8px;
}

.section-label {
  margin: 0;
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.2em;
  color: #8d8a76;
}

.muted {
  color: var(--quiet);
  font-size: 11.5px;
}

.queue-badge {
  font-size: 10.5px;
  color: #8b5b3d;
  background: #f1e7cf;
  border-radius: 20px;
  padding: 4px 9px;
  white-space: nowrap;
}

.plan-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 12px;
  margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(58, 70, 51, 0.04);
}

.plan-card.today {
  border-color: #e0c9a8;
  background: #fdf8ee;
}

.plan-card.future {
  opacity: 0.66;
}

.plan-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.plan-date {
  font: 600 12px/1.2 var(--sans);
  color: #66735c;
  white-space: nowrap;
}

.plan-title {
  font: 600 16px/1.45 var(--serif);
  color: #3f4a3c;
  overflow-wrap: anywhere;
  flex: 1;
}

.today-tag {
  font-size: 10px;
  color: #ae5132;
  background: #f4e4d2;
  border-radius: 5px;
  padding: 3px 6px;
  white-space: nowrap;
}

.plan-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 7px;
  color: var(--quiet);
  font-size: 11.5px;
}

.plan-feel {
  margin: 8px 0 0;
  color: #6a7260;
  font: 400 12.5px/1.7 var(--serif);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plan-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.record-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 9px 15px;
  border-radius: 99px;
  background: var(--green);
  color: #fdfcf7;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.record-btn:disabled {
  background: #c9cdbd;
  color: #fff;
}

.photo-count {
  color: #8d8a76;
  font-size: 11px;
}

.empty-note {
  margin: 4px 4px 0;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--quiet);
  font-size: 12.5px;
  line-height: 1.8;
}

/* ---------- 记录面板 ---------- */
.sheet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  background: rgba(28, 38, 32, 0.42);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.sheet-card {
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  background: var(--paper);
  border-radius: 20px 20px 0 0;
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
  max-width: 640px;
  margin: 0 auto;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sheet-heading {
  min-width: 0;
}

.sheet-date {
  margin: 0;
  color: #8d8a76;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.sheet-head h2 {
  margin: 6px 0 0;
  font: 700 21px/1.4 var(--serif);
  color: #3f4a3c;
  overflow-wrap: anywhere;
}

.sheet-close {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  color: #7d857a;
  font-size: 15px;
}

.sheet-close:hover {
  background: #eef1e6;
}

.sheet-hint {
  margin: 10px 0 0;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.7;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.photo-grid:empty {
  display: none;
}

.ph {
  position: relative;
  margin: 0;
  border-radius: 9px;
  overflow: hidden;
  background: #e9e7da;
}

.ph img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.ph-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(10, 19, 27, 0.82);
  color: #fff1d6;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.photo-btn {
  flex: 1;
  text-align: center;
  border: 1px solid #d1d6c7;
  background: var(--card);
  border-radius: 9px;
  padding: 11px 10px;
  font-size: 12.5px;
  color: #55684e;
  cursor: pointer;
}

.photo-btn:active {
  background: #eff1e7;
}

.feeling-label {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  font-size: 12px;
  font-weight: 600;
  color: #54604c;
}

.feeling-label textarea {
  width: 100%;
  min-height: 84px;
  padding: 10px 11px;
  border: 1px solid #d5d2bd;
  border-radius: 8px;
  background: #fffefa;
  font: 400 13.5px/1.6 var(--sans);
  color: var(--ink);
  resize: vertical;
  outline: none;
}

.feeling-label textarea:focus {
  border-color: #7d9070;
  box-shadow: 0 0 0 3px #dbe3d5;
}

.save-btn {
  width: 100%;
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: 10px;
  background: var(--green);
  color: #fdfcf7;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.save-btn:disabled {
  opacity: 0.55;
}

.sheet-error {
  min-height: 18px;
  margin: 8px 0 0;
  color: #a14d37;
  font-size: 12px;
  line-height: 1.6;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  z-index: 80;
  transform: translate(-50%, 10px);
  background: #354a38;
  color: #fff;
  border-radius: 9px;
  padding: 10px 16px;
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 700px) {
  .sheet {
    align-items: center;
    justify-content: center;
  }
  .sheet-card {
    border-radius: 20px;
    max-width: 560px;
    margin: 0;
  }
}