:root {
  color-scheme: light dark;
  --paper: #f8f6ef;
  --ink: #283329;
  --muted: #546055;
  --line: #cbd2c6;
  --leaf: #31573c;
  font:
    100%/1.5 system-ui,
    sans-serif;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}
header,
main {
  max-width: 65rem;
  margin: auto;
  padding: 1.2rem clamp(1rem, 4vw, 3rem);
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  min-height: 4rem;
}
header b {
  font:
    700 1.5rem Georgia,
    serif;
}
h1,
h2 {
  font-family: Georgia, serif;
  line-height: 1.1;
}
h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  margin: 0.55em 0 0.4em;
}
h2 {
  font-size: 2rem;
  margin: 1.4em 0 0.6em;
}
.entry {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  align-items: center;
  gap: 3rem;
  padding: 2rem 0;
}
.entry > img {
  width: 100%;
  height: auto;
  border-radius: 48% 48% 0.9rem 0.9rem;
}
.entry p,
#journal-info,
small {
  color: var(--muted);
}
form {
  max-width: 22rem;
  display: grid;
  gap: 0.55rem;
  margin-top: 1.5rem;
}
input,
button {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.65rem 0.95rem;
}
input {
  background: var(--paper);
  color: var(--ink);
}
button {
  cursor: pointer;
  background: var(--leaf);
  color: #fff;
  font-weight: 600;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid #a87a19;
  outline-offset: 3px;
}
#logout {
  background: transparent;
  color: var(--ink);
}
#plants {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}
article {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  overflow-wrap: anywhere;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  flex-direction: column;
}
article img {
  width: 100%;
  height: 9rem;
  object-fit: contain;
  background: #f1ede4;
  border-radius: 0.6rem;
}
article h3,
article p {
  margin: 0;
}
article button {
  margin-top: auto;
}
#journal {
  padding: 0;
  list-style: none;
}
li {
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
li img {
  display: block;
  max-height: 12rem;
  max-width: 100%;
  margin-top: 0.6rem;
}
li p {
  margin: 0.25rem 0;
  white-space: pre-wrap;
}
@media (max-width: 640px) {
  .entry {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }
  .entry > img {
    max-width: 15rem;
    order: -1;
    justify-self: center;
    margin-top: 1rem;
  }
  .entry h1 {
    margin-top: 0.25em;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #20241f;
    --ink: #f3f3e8;
    --muted: #bbc8b8;
    --line: #495446;
    --leaf: #3f694b;
  }
}
.methods { display:flex; flex-wrap:wrap; align-items:center; gap:.65rem; margin:1rem 0 }
.methods:empty { display:none }
.methods p { margin:0; padding:.4rem .65rem; border:1px solid var(--line); border-radius:.55rem }
summary { cursor:pointer; padding:.7rem 0; font-weight:600 }
.secondary { background:transparent; color:var(--ink) }
#mail-panel, #merge-panel { max-width:32rem; margin:1.5rem 0; border-top:1px solid var(--line) }
#mail-panel form { margin-bottom:.75rem }
select, textarea { font:inherit; color:var(--ink); background:var(--paper); border:1px solid var(--line); border-radius:.55rem; padding:.65rem; max-width:100% }
textarea { resize:vertical }
#plant-form, #new-note { padding:1rem; border:1px solid var(--line); border-radius:1rem }
#plant-form h2 { margin:0 }
#plants { margin-top:1rem }
#journal-plant { margin:.6rem 0 }
