:root {
  color-scheme: light;
  --ink: #293830;
  --green: #405e3d;
  --pale: #e9efdc;
  --bg: #f6f7f4;
  --line: #dde3d9;
  --muted: #58665b;
  font:
    16px/1.5 "DM Sans",
    "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a {
  touch-action: manipulation;
}
button,
.btn {
  cursor: pointer;
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #647eaf;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.52;
  cursor: wait;
}
button {
  background: #eaf0e4;
  border-radius: 14px;
  padding: 10px 15px;
}
img {
  max-width: 100%;
  display: block;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-weight: 650;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.045em;
  line-height: 1.22;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 16px;
}
small,
.muted,
time {
  color: var(--muted);
  font-size: 13px;
}
p {
  line-height: 1.75;
}
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 22px calc(104px + env(safe-area-inset-bottom));
}
header {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f6f7f4f5;
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.bar {
  max-width: 860px;
  padding: 12px 22px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font:
    600 23px Georgia,
    serif;
  letter-spacing: -1px;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.bar a:last-child:not(.brand) {
  font-size: 14px;
}
.bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.bottom a {
  width: min(22%, 180px);
  display: grid;
  justify-items: center;
  font-size: 12px;
  color: #5d655d;
  padding: 3px 0;
}
.bottom a.active {
  font-weight: 700;
  color: #385735;
}
.bottom a b {
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1.3;
  width: 52px;
  border-radius: 20px;
}
.bottom a.active b {
  background: #e3edd9;
}
.row,
.head,
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.head {
  justify-content: space-between;
  margin: 24px 0 12px;
}
.head a {
  font-size: 13px;
  color: var(--green);
}
.grow {
  flex: 1;
}
.hero {
  position: relative;
  min-height: 212px;
  overflow: hidden;
  border-radius: 24px;
  background: #dce9dc;
  display: flex;
  align-items: flex-end;
}
.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #162d22c9, transparent 85%);
}
.hero div {
  position: relative;
  color: white;
  z-index: 1;
  padding: 22px;
}
.hero p {
  font-size: 14px;
  margin-top: 5px;
}
.search {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  margin: 12px 0 18px;
  padding: 12px 16px;
  color: var(--muted);
}
.shortcuts,
.grid,
.split {
  display: grid;
  gap: 12px;
}
.shortcuts {
  grid-template-columns: repeat(4, 1fr);
}
.shortcut {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 5px;
  font-size: 14px;
}
.tileIcon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 20px;
  background: #e4eddb;
  font-size: 26px;
}
.shortcut:nth-child(3n + 2) .tileIcon {
  background: #f6e5da;
}
.shortcut:nth-child(3n) .tileIcon {
  background: #e1eaf2;
}
.grid {
  grid-template-columns: repeat(auto-fit, minmax(min(43%, 160px), 1fr));
}
.plantCard,
.coverCard,
.panel,
.feed {
  border-radius: 20px;
  overflow: hidden;
  background: white;
}
.plantCard,
.coverCard {
  display: block;
  padding: 12px;
}
.plantCard {
  background: #eaf1df;
}
.plantCard:nth-child(3n + 2) {
  background: #f5eadf;
}
.plantCard:nth-child(3n) {
  background: #e7edf0;
}
.plantCard img {
  width: 100%;
  height: 132px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.plantCard h3,
.coverCard h3 {
  margin: 6px 0 1px;
}
.coverCard img {
  width: 100%;
  height: 135px;
  object-fit: cover;
  border-radius: 12px;
}
.panel,
.feed {
  padding: 20px;
  margin: 12px 0;
}
.stack {
  display: grid;
  gap: 12px;
}
.primary,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: white;
  border-radius: 25px;
  padding: 11px 22px;
  font-weight: 600;
}
.plain,
.chip {
  border-radius: 25px;
  background: #e8ede4;
  padding: 8px 15px;
  display: inline-block;
}
.chip.sel {
  background: var(--green);
  color: white;
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  margin: 6px 0;
}
.chip {
  white-space: nowrap;
}
.back {
  font-size: 14px;
  display: inline-block;
  margin: 2px 0 12px;
  color: var(--green);
}
input,
textarea,
select {
  border: 1px solid #c5d0c5;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  max-width: 100%;
  width: 100%;
}
textarea {
  min-height: 84px;
  resize: vertical;
}
label {
  display: grid;
  gap: 4px;
  color: #4c584d;
  font-size: 14px;
}
form {
  display: grid;
  gap: 12px;
}
.field {
  margin: 12px 0;
}
.auth {
  max-width: 760px;
  margin: 28px auto;
  display: grid;
  grid-template-columns: 0.95fr 1fr;
  background: #fff;
  border-radius: 26px;
  overflow: hidden;
}
.auth .art {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}
.auth form {
  padding: 28px;
  align-content: center;
}
.auth .brand {
  margin-bottom: 7px;
}
.artPlant {
  width: 100%;
  height: 255px;
  object-fit: contain;
  background: #eaf0e3;
  border-radius: 22px;
  mix-blend-mode: multiply;
}
.articleImage {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 22px;
}
.articleBody {
  white-space: pre-line;
  font-size: 16px;
  line-height: 1.9;
  margin: 16px 0;
}
.list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-radius: 18px;
  overflow: hidden;
  margin: 10px 0;
}
.item {
  padding: 12px 14px;
  background: white;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
}
.item img {
  width: 64px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
}
.item strong {
  display: block;
}
.item p {
  font-size: 13px;
}
.num {
  font-size: 30px;
  font-family: Georgia, serif;
  color: var(--green);
}
.moods {
  display: flex;
  gap: 5px;
  justify-content: space-between;
}
.moods button {
  flex: 1;
  padding: 9px 2px;
  display: grid;
  justify-items: center;
  font-size: 12px;
}
.moods b {
  font-size: 24px;
}
.sel {
  box-shadow: inset 0 0 0 2px var(--green);
}
.feed img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 14px;
  margin: 10px 0;
}
.feed p,
.bubble {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.feed h3 {
  margin-bottom: 8px;
}
.bubble {
  padding: 12px 15px;
  background: #fff;
  border-radius: 16px;
  margin: 8px 15% 8px 0;
}
.mine {
  margin: 8px 0 8px 15%;
  background: var(--pale);
}
.breathing {
  width: 180px;
  height: 180px;
  margin: 38px auto;
  border-radius: 50%;
  background: radial-gradient(circle, #d6e9bb, #9bb78a);
  display: grid;
  place-items: center;
  font-size: 25px;
  border: 12px solid #e4ecd8;
}
.running {
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe {
  0%,
  100% {
    transform: scale(0.84);
  }
  50% {
    transform: scale(1.13);
  }
}
.center {
  text-align: center;
}
.story {
  max-width: 460px;
  margin: auto;
}
.story img {
  width: 100%;
  height: 48vh;
  object-fit: cover;
  border-radius: 20px;
}
.story blockquote {
  margin: 18px 0;
  font-size: 18px;
}
.controls {
  width: 100%;
  margin: 20px 0;
}
#notice {
  position: fixed;
  z-index: 12;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: #293b30;
  color: white;
  padding: 9px 17px;
  border-radius: 16px;
  max-width: 92vw;
  box-shadow: 0 4px 20px #0002;
}
#notice:empty {
  display: none;
}
.loading {
  margin: 20vh auto;
  text-align: center;
}
.empty {
  padding: 18px;
  background: #edf1e7;
  border-radius: 16px;
}
.histbar {
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.histbar meter {
  flex: 1;
}
.admin {
  max-width: 1150px;
}
.adminLayout {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  gap: 18px;
}
.adminLayout .panel {
  margin: 0;
}
.userBtn {
  display: block;
  text-align: left;
  width: 100%;
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.event {
  display: grid;
  grid-template-columns: 1fr auto;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  gap: 5px;
}
.event small {
  grid-column: 1/-1;
}
.secret {
  word-break: break-all;
  background: #eef2e9;
  padding: 12px;
  border-radius: 10px;
  user-select: all;
}
.onboarding {
  max-width: 600px;
}
.onboarding > .brand {
  margin-block: 12px;
}
.intro {
  margin: 12px 0;
}
.coverCard,
.plantCard,
.shortcut {
  transition: transform 0.18s;
}
.coverCard:hover,
.plantCard:hover,
.shortcut:hover {
  transform: translateY(-2px);
}
@media (max-width: 650px) {
  main {
    padding: 14px 16px calc(96px + env(safe-area-inset-bottom));
  }
  .bar {
    padding: 10px 16px;
  }
  .hero {
    min-height: 186px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .auth {
    margin: 6px 0;
    display: block;
  }
  .auth .art {
    height: 145px;
    min-height: 0;
    object-position: center 35%;
  }
  .auth form {
    padding: 20px;
  }
  .adminLayout {
    display: block;
  }
  .adminLayout .panel {
    margin: 10px 0;
  }
  .adminLayout aside {
    max-height: 320px;
    overflow: auto;
  }
  .panel {
    padding: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
.bar > .row {
  min-width: 0;
  flex-wrap: nowrap;
  max-width: 53%;
}
.bar > .row > a:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menuLink {
  flex-shrink: 0;
}
.bar > .brand,
.bar > a:first-child {
  flex-shrink: 0;
}
