:root {
  --paper: #f5f6ef;
  --green: #466447;
  --ink: #29392b;
  --muted: #738071;
  --line: #d1d8c8;
  --terra: #b66c4c;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #b66c4c;
  outline-offset: 4px;
}
main {
  max-width: 1180px;
  margin: auto;
  padding: 26px 48px 18px;
}
.topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
}
.topline a {
  color: var(--green);
  text-decoration: none;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 42px;
}
.quiet {
  font-size: 13px;
  color: var(--green);
  letter-spacing: 3px;
  margin: 0 0 13px;
}
h1,
h2,
h3 {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-weight: 600;
}
h1 {
  font-size: clamp(30px, 3.4vw, 44px);
  letter-spacing: 2px;
  margin: 0;
}
h2 {
  font-size: 28px;
  margin: 0 0 12px;
}
h3 {
  font-size: 20px;
  margin: 0;
}
.intro {
  font-size: 14px;
  color: var(--muted);
  margin: 14px 0 0;
}
.outline {
  border: 1px solid var(--green);
  color: var(--green);
  background: transparent;
  padding: 12px 20px;
  border-radius: 2px;
  white-space: nowrap;
  font-size: 14px;
}
.outline:hover {
  background: #e7ecdf;
}
.balcony {
  margin-top: 34px;
}
.shelf-heading {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
}
.plants {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  padding: 3px 15px 0;
}
.plant {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 170px;
  max-width: 220px;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--ink);
  padding: 0 10px 19px;
  border-bottom: 3px solid transparent;
}
.plant svg {
  width: 100%;
  height: 218px;
  display: block;
  filter: drop-shadow(5px 8px 4px #2338230c);
  transition: transform 0.18s ease;
}
.plant:hover svg {
  transform: translateY(-5px);
}
.plant.selected {
  border-color: var(--green);
}
.plant.selected:after {
  content: "";
  width: 7px;
  height: 7px;
  position: absolute;
  bottom: 8px;
  background: var(--green);
  border-radius: 50%;
}
.plant-name {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 21px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.plant-plan {
  font-size: 11px;
  color: var(--muted);
  margin: 3px 0 9px;
}
.plant-plan.due {
  color: #9d593b;
}
.wooden-shelf {
  height: 15px;
  background: #c8b28d;
  border-top: 5px solid #d8c5a5;
  box-shadow: 0 10px 15px #5463440b;
}
.plant-detail {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 52px;
  margin-top: 34px;
  min-height: 220px;
}
.record-summary .number {
  font-family: Georgia, serif;
  font-size: 38px;
  letter-spacing: -1px;
  margin-right: 8px;
  color: var(--green);
}
.plan-description {
  margin: 17px 0 15px;
  font-size: 14px;
  color: var(--muted);
}
.detail-title {
  display: flex;
  align-items: center;
  gap: 18px;
}
.text-button {
  background: none;
  border: 0;
  padding: 7px 0;
  color: var(--green);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.record-form {
  display: flex;
  gap: 10px;
  align-items: end;
  margin-top: 19px;
  flex-wrap: wrap;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}
input {
  max-width: 100%;
  min-width: 0;
  border: 1px solid #bdc6b6;
  border-radius: 2px;
  padding: 10px 11px;
  background: #fffef9;
  color: var(--ink);
  height: 43px;
}
input[type="date"] {
  font-size: 14px;
}
.primary {
  border: 1px solid var(--green);
  border-radius: 2px;
  background: var(--green);
  color: white;
  padding: 11px 20px;
  font-size: 14px;
  min-height: 43px;
}
.primary:hover {
  background: #334f35;
}
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.history-header span {
  font-size: 12px;
  color: var(--muted);
}
.history-list {
  padding: 0;
  margin: 0;
  list-style: none;
  max-height: 240px;
  overflow: auto;
}
.history-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 13px;
}
.history-list .date {
  flex: 1;
  font-variant-numeric: tabular-nums;
}
.water-dot {
  height: 8px;
  width: 8px;
  background: #88a387;
  border-radius: 50%;
}
.history-list button {
  background: none;
  border: 0;
  padding: 5px;
  color: var(--muted);
  font-size: 12px;
}
.history-list button:hover {
  color: var(--green);
  text-decoration: underline;
}
.empty {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}
.status {
  min-height: 24px;
  font-size: 13px;
  color: var(--green);
  margin: 15px 0 7px;
}
footer {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}
footer p {
  max-width: 700px;
}
footer button {
  white-space: nowrap;
}
dialog {
  border: 1px solid #aebea9;
  border-radius: 4px;
  padding: 28px;
  width: min(440px, calc(100% - 32px));
  color: var(--ink);
  background: var(--paper);
}
dialog::backdrop {
  background: #23332360;
}
dialog h2 {
  font-size: 23px;
  margin: 0;
}
dialog label {
  margin: 20px 0;
}
.dialog-top {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
}
.dialog-top button {
  font-size: 25px;
  text-decoration: none;
}
.hint {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
#form-error {
  font-size: 13px;
  color: #984d32;
  margin-bottom: 0;
}
.editing-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.editing-row input {
  max-width: 160px;
}
.delete-plant {
  margin-top: 20px;
  color: #9d593b;
}
.plant-detail:empty {
  display: none;
}
@media (max-width: 700px) {
  main {
    padding: 20px 22px;
  }
  .topline {
    font-size: 10px;
    letter-spacing: 0;
  }
  header {
    margin-top: 31px;
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
  }
  .quiet {
    font-size: 11px;
  }
  h1 {
    font-size: 29px;
    letter-spacing: 1px;
  }
  header .outline {
    padding: 10px 14px;
  }
  .balcony {
    margin-top: 25px;
  }
  .shelf-heading {
    font-size: 10px;
    letter-spacing: 0;
  }
  .plants {
    gap: 8px;
    padding: 8px 0 0;
    justify-content: center;
  }
  .plant {
    flex: 0 1 calc(50% - 4px);
    max-width: 210px;
    padding: 0 0 19px;
  }
  .plant svg {
    height: 173px;
  }
  .plant-name {
    font-size: 18px;
  }
  .plant-plan {
    font-size: 10px;
  }
  .plant-detail {
    grid-template-columns: 1fr;
    gap: 27px;
    margin-top: 29px;
  }
  .record-form {
    gap: 9px;
  }
  .record-form label {
    flex: 1;
  }
  .record-form input {
    width: 100%;
  }
  .record-form button {
    flex: 0 0 auto;
  }
  .history-list {
    max-height: none;
  }
  footer {
    align-items: flex-start;
    gap: 12px;
  }
  footer p {
    margin-top: 12px;
  }
  footer button {
    margin-top: 5px;
  }
  .status {
    line-height: 1.8;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
