* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #213127;
  background: #f6f4ef;
  font-family: Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  background: #ffffff;
  border-bottom: 1px solid #dedbd1;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
}

.more-button {
  padding: 7px 10px;
  background: #f6f4ef;
  border: 1px solid #dedbd1;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 16px;
}

nav a {
  text-decoration: none;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
}

.markdown-page {
  max-width: 820px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

.markdown-page h1,
.markdown-page h2,
.markdown-page h3 {
  margin-bottom: 10px;
}

.markdown-page h2,
.markdown-page h3 {
  margin-top: 28px;
}

.markdown-page ul {
  padding-left: 22px;
}

.markdown-page pre {
  overflow-x: auto;
  padding: 14px;
  background: #f6f4ef;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

.markdown-page img {
  margin: 14px 0 24px;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

.login-page {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  min-height: 100vh;
}

.login-card {
  padding: 28px;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

.login-logo {
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
}

.login-card p {
  color: #667067;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.login-form button {
  width: 100%;
}

.login-collage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.collage-tile {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid #dedbd1;
  border-radius: 8px;
  background: #ffffff;
}

.collage-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collage-tile img + img {
  opacity: 0;
  transition: opacity 1.4s ease;
}

.collage-tile.show-alt img + img {
  opacity: 1;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.page-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 18px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.edit-toggle {
  padding: 7px 10px;
  color: #17372b;
  background: #ffffff;
  border: 1px solid #c9c5ba;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.edit-toggle[aria-pressed="true"] {
  background: #eef5ec;
  border-color: #4f9b62;
}

.page-title p,
.muted {
  color: #667067;
}

.clear-filter {
  display: inline-block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 24px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

.gallery-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.gallery-stats a {
  padding: 12px;
  color: inherit;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
  text-decoration: none;
}

.gallery-stats strong {
  display: block;
  font-size: 24px;
}

.gallery-stats span {
  color: #667067;
  font-size: 13px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.filter-group > span {
  color: #667067;
  font-size: 13px;
  font-weight: 700;
}

.filter-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-pill span,
.filter-pill-link {
  display: block;
  padding: 7px 10px;
  background: #f6f4ef;
  border: 1px solid #d8d4ca;
  border-radius: 999px;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.filter-pill > span,
.filter-pill-link {
  min-width: 70px;
  text-align: center;
}

.filter-pill > span > span,
.filter-pill-link span {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.filter-pill strong,
.filter-pill-link strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  line-height: 1;
}

.filter-pill input:checked + span,
.filter-pill-link.active {
  color: #ffffff;
  background: #2f6f4e;
  border-color: #2f6f4e;
}

input,
select,
textarea,
button {
  width: 100%;
  font: inherit;
}

input,
select,
textarea {
  padding: 9px 10px;
  color: #213127;
  background: #ffffff;
  border: 1px solid #c9c5bb;
  border-radius: 6px;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

button {
  width: auto;
  padding: 9px 14px;
  color: #ffffff;
  background: #2f6f4e;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.button-link {
  display: inline-block;
  padding: 9px 14px;
  color: #ffffff;
  background: #2f6f4e;
  border-radius: 6px;
  text-decoration: none;
}

.filters input,
.filters select {
  width: auto;
  min-width: 180px;
}

.filters input[type="checkbox"] {
  width: auto;
  min-width: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.empty-state {
  padding: 18px;
  color: #667067;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

.card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  color: inherit;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
  text-decoration: none;
}

.planted-flag {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  padding: 4px 7px;
  color: #ffffff;
  background: #2f6f4e;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e6e2d8;
}

.card-body {
  display: grid;
  grid-template-rows: 44px minmax(28px, auto) auto;
  align-content: start;
  gap: 8px;
  padding: 12px;
}

.card h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 6px;
  min-height: 28px;
}

.card-details {
  display: grid;
  gap: 4px;
}

.card-badges span {
  padding: 2px 6px;
  color: #3f4b43;
  background: #f1efe8;
  border: 1px solid #dedbd1;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: #667067;
  font-size: 14px;
  line-height: 1.3;
}

.card-status {
  color: #244f35;
  font-weight: 700;
}

.card .late-text {
  color: #b32118;
  font-weight: 700;
}

.detail {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 28px;
  margin-top: 18px;
  margin-bottom: 28px;
}

.detail img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 22px 0 0;
}

.facts div,
.sections > div,
.plan-item,
.flash {
  padding: 14px;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

dt {
  color: #667067;
  font-size: 13px;
}

dd {
  margin: 0;
  font-weight: 700;
}

.sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-header h2 {
  margin-bottom: 0;
}

.edit-form[hidden] {
  display: none;
}

.edit-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

.edit-form label {
  display: grid;
  gap: 5px;
  font-weight: 700;
}

.edit-form textarea,
.edit-form button {
  grid-column: 1 / -1;
}

.plan-list {
  display: grid;
  gap: 10px;
}

.print-task-list {
  display: none;
}

.inline-action {
  margin-bottom: 18px;
}

.planned-seeds {
  margin-bottom: 24px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

.planned-seeds .section-header {
  margin-bottom: 10px;
}

.planned-seeds .section-header p {
  margin-bottom: 0;
}

.planned-seed-list {
  display: grid;
  gap: 8px;
}

.planned-seed-add {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.planned-seed-add label {
  display: grid;
  gap: 5px;
  font-weight: 700;
}

.planned-seed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: #f9f8f4;
  border: 1px solid #dedbd1;
  border-radius: 6px;
}

.planned-seed a {
  font-weight: 700;
}

.planned-seed button {
  flex: 0 0 auto;
}

.print-heading {
  margin-bottom: 18px;
}

.print-heading p {
  color: #667067;
}

.calendar-list {
  display: grid;
  gap: 28px;
  margin-bottom: 30px;
}

.calendar-month {
  break-inside: avoid;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid #dedbd1;
  border-left: 1px solid #dedbd1;
  background: #ffffff;
}

.weekday,
.calendar-day {
  border-right: 1px solid #dedbd1;
  border-bottom: 1px solid #dedbd1;
}

.weekday {
  padding: 8px;
  color: #667067;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.calendar-day {
  min-height: 126px;
  padding: 7px;
  background: #ffffff;
}

.calendar-day.clickable-day {
  cursor: pointer;
}

.calendar-day.clickable-day:hover,
.calendar-day.clickable-day:focus {
  outline: 2px solid #2f6f4e;
  outline-offset: -2px;
  background: #fbfdfb;
}

.calendar-day.outside-month {
  background: #f3f1eb;
}

.calendar-day time,
.calendar-date {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  color: #667067;
  background: transparent;
  border-radius: 0;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.calendar-day time {
  color: #667067;
  padding-left: 0;
}

.calendar-event {
  display: block;
  margin-bottom: 5px;
  padding: 5px;
  color: inherit;
  background: #edf7ef;
  border-left: 3px solid #2f6f4e;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.25;
}

.calendar-event strong,
.calendar-event span {
  display: block;
  overflow-wrap: anywhere;
}

.calendar-more {
  display: block;
  padding: 5px;
  color: #667067;
  background: #f3f1eb;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.day-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.day-task-list {
  display: grid;
  gap: 18px;
}

.day-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.day-filters a {
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 6px;
  text-decoration: none;
}

.day-filters a.active {
  color: #ffffff;
  background: #2f6f4e;
  border-color: #2f6f4e;
}

.day-task {
  padding: 16px;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

.task-badge {
  align-self: start;
  padding: 6px 10px;
  color: #ffffff;
  background: #2f6f4e;
  border-radius: 6px;
  white-space: nowrap;
}

.planting-instructions {
  margin-top: 16px;
}

.planting-instructions p {
  margin-bottom: 10px;
}

.planting-list {
  display: grid;
  gap: 8px;
}

.planting-list a,
.planting-list > div {
  display: grid;
  gap: 2px;
  padding: 9px;
  color: inherit;
  background: #f9f8f4;
  border: 1px solid #dedbd1;
  border-radius: 6px;
  text-decoration: none;
}

.planting-list span {
  color: #667067;
  font-size: 14px;
}

.add-to-tray {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #dedbd1;
}

.add-to-tray label {
  display: grid;
  gap: 5px;
  font-weight: 700;
}

.print-map-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.tray-print-sheet {
  background: #ffffff;
}

.tray-print-sheet header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.tray-print-sheet h1,
.tray-print-sheet p {
  margin-bottom: 0;
}

.tray-print-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tray-print-cell {
  position: relative;
  min-height: 190px;
  padding: 12px;
  background: #ffffff;
  border: 2px solid #213127;
  border-radius: 8px;
}

.tray-print-cell::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background: var(--flag-color);
  border-bottom-left-radius: 8px;
  content: "";
}

.print-cell-header {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 8px;
  padding-right: 22px;
}

.print-cell-header strong {
  font-size: 18px;
}

.print-cell-header span {
  color: #667067;
  font-size: 13px;
}

.tray-print-cell h2 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.15;
}

.tray-print-cell p {
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.25;
}

.tray-section {
  margin-bottom: 30px;
}

.tray-name {
  display: grid;
  gap: 5px;
  max-width: 360px;
  margin-bottom: 14px;
  font-weight: 700;
}

.tray-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 640px), 1fr));
  gap: 20px;
}

.sprout-summary {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

.sprout-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.sprout-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.sprout-stats div,
.sprout-stats a,
.sprout-overview div {
  color: inherit;
  padding: 12px;
  background: #f4f7f1;
  border: 1px solid #dbe3d5;
  border-radius: 6px;
  text-decoration: none;
}

.sprout-stats a:hover {
  border-color: #9eb592;
  background: #eef5ec;
}

.sprout-stats strong,
.sprout-overview strong {
  display: block;
  font-size: 24px;
}

.sprout-stats span,
.sprout-overview span {
  color: #667067;
  font-size: 13px;
}

.tray-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tray-index a {
  padding: 6px 10px;
  color: #213127;
  background: #ffffff;
  border: 1px solid #d8d4ca;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.sprout-list {
  display: grid;
  gap: 8px;
}

.sprout-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid #edeae2;
}

.sprout-row img,
.sprout-thumb-empty {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  border: 1px solid #dedbd1;
}

.sprout-thumb {
  display: block;
  width: 52px;
  height: 52px;
}

.sprout-row img {
  object-fit: cover;
}

.sprout-thumb-empty {
  display: block;
  background: #f4f1e9;
}

.sprout-row a,
.sprout-row strong {
  font-weight: 700;
}

.sprout-row span {
  display: block;
  margin-top: 3px;
  color: #667067;
  font-size: 13px;
  line-height: 1.35;
}

.sprout-count b {
  color: #667067;
  font-size: 11px;
  text-transform: uppercase;
}

.sprout-count {
  width: 300px;
  padding: 8px 0 8px 12px;
  text-align: left;
}

.sprout-count dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.sprout-count dl div {
  display: grid;
  grid-template-columns: 112px 58px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.sprout-count dt,
.sprout-count dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
}

.sprout-count dt {
  color: #667067;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.sprout-count dd {
  color: #14251c;
  font-weight: 700;
}

.sprout-count .late-note {
  color: #b32118;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.sprout-count em {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 5px;
  color: #8f2d22;
  background: #ffe2dc;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.tray-card {
  padding: 18px;
  color: inherit;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

.tray-card h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.tray-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.icon-link {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #c9c5bb;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
}

.tray-card p {
  margin-bottom: 6px;
  color: #667067;
}

.tray-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.tray-preview a,
.tray-preview .empty-cell {
  display: grid;
  position: relative;
  align-content: start;
  gap: 5px;
  aspect-ratio: 1 / 1;
  min-height: 132px;
  overflow: hidden;
  padding: 12px;
  color: inherit;
  background: #f9f8f4;
  border: 3px solid #dedbd1;
  border-radius: 6px;
  text-decoration: none;
}

.tray-preview a {
  border-color: #4f9b62;
  background: #e9f8ed;
}

.tray-preview a.waiting {
  border-color: #d5b12f;
  background: #fff8cf;
}

.tray-preview a.late {
  border-color: #c53b2f;
  background: #ffe7e2;
}

.tray-preview a.ready {
  border-color: #2d6fb2;
  background: #e2f0ff;
}

.tray-preview a.uppotted {
  border-color: #73777d;
  background: #eeeeee;
}

.tray-preview a.seed-match {
  box-shadow: 0 0 0 5px #13281b;
}

.tray-preview a::before,
.tray-cell:not(.empty)::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: var(--flag-color);
  border-bottom-left-radius: 6px;
  content: "";
}

.tray-preview strong {
  font-size: 17px;
}

.tray-preview span {
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.tray-preview .seed-name {
  font-weight: 700;
}

.tray-preview a span:not(.seed-name) {
  font-size: 13px;
}

.tray-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.tray-cell {
  display: grid;
  position: relative;
  gap: 9px;
  min-width: 0;
  padding: 14px;
  background: #ffffff;
  border: 2px solid #dedbd1;
  border-radius: 8px;
}

.tray-cell.empty {
  background: #f9f8f4;
}

.tray-cell.waiting {
  border-color: #d2a94d;
}

.tray-cell.sprouted {
  border-color: #4f9b62;
}

.tray-cell.ready {
  border-color: #3971a8;
}

.tray-cell.late {
  border-color: #b84a3a;
}

.tray-cell.uppotted {
  border-color: #8b8f96;
  background: #f2f3f3;
}

.cell-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
  padding-right: 18px;
}

.cell-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.clear-cell {
  justify-self: start;
  padding: 5px 8px;
  color: #6f241b;
  background: #fff1ee;
  border: 1px solid #f1c2ba;
  border-radius: 6px;
  font-size: 12px;
}

.uppot-cell {
  justify-self: start;
  padding: 7px 10px;
  color: #ffffff;
  background: #2f6f4e;
  border: 1px solid #265b40;
  border-radius: 6px;
  font-size: 13px;
}

.tray-cell .move-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.tray-cell .move-cell[hidden] {
  display: none;
}

.tray-cell .move-cell select {
  width: 150px;
  padding: 5px;
  font-size: 12px;
}

.move-cell-button {
  justify-self: start;
  padding: 7px 10px;
  color: #24445d;
  background: #eef6ff;
  border: 1px solid #bdd7ee;
  border-radius: 6px;
  font-size: 13px;
}

.cell-header span {
  font-size: 13px;
  text-align: right;
}

.status-badge {
  padding: 3px 7px;
  color: #213127;
  background: #f3f1eb;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.2;
}

.tray-cell.sprouted .status-badge {
  color: #245c35;
  background: #dff2e4;
}

.tray-cell.late .status-badge {
  color: #8f2d22;
  background: #ffe2dc;
}

.tray-cell.waiting .status-badge {
  color: #735c17;
  background: #fff3c0;
}

.tray-cell.ready .status-badge {
  color: #245681;
  background: #dceeff;
}

.tray-cell.uppotted .status-badge {
  color: #545961;
  background: #e5e6e8;
}

.tray-cell label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
}

.tray-cell select,
.tray-cell input,
.tray-cell textarea {
  min-width: 0;
  padding: 7px;
  font-size: 14px;
}

.flag-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.flag-field legend {
  padding: 0;
  font-size: 13px;
  font-weight: 700;
}

.flag-swatches {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 7px;
}

.flag-swatches label {
  display: block;
}

.flag-swatches input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.flag-swatches span {
  display: block;
  width: 34px;
  height: 28px;
  overflow: hidden;
  background: var(--swatch-color);
  border: 2px solid #c9c5bb;
  border-radius: 5px;
  color: transparent;
  cursor: pointer;
}

.flag-swatches input:checked + span {
  border-color: #14251c;
  box-shadow: 0 0 0 2px #14251c;
}

.tray-cell textarea {
  min-height: 58px;
}

.tray-cell p {
  margin-bottom: 0;
  color: #667067;
  font-size: 13px;
}

.save-tray {
  margin-bottom: 20px;
}

.layout-save:disabled {
  cursor: default;
  opacity: 0.45;
}

.grow-tent {
  display: grid;
  grid-template-columns: repeat(8, minmax(105px, 1fr));
  grid-auto-rows: minmax(185px, auto);
  gap: 12px;
  margin-bottom: 22px;
  overflow-x: auto;
}

.grow-spot {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 185px;
  padding: 8px;
  background: #f7f6f0;
  border: 1px dashed #c9c5ba;
  border-radius: 8px;
}

.grow-spot.drop-target,
.unplaced-list.drop-target {
  border-color: #3971a8;
  background: #eef5fb;
}

.grow-position {
  color: #687069;
  font-size: 12px;
  font-weight: 700;
}

.grow-bag {
  display: grid;
  gap: 4px;
  padding: 9px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  cursor: grab;
  background: #ffffff;
  border: 2px solid #4f9b62;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(31, 45, 37, 0.08);
}

.grow-bag.dragging {
  opacity: 0.6;
}

.grow-bag.selected {
  border-color: #3971a8;
  box-shadow: 0 0 0 3px rgba(57, 113, 168, 0.18);
}

.grow-bag strong {
  font-size: 15px;
}

.grow-bag-name {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.grow-bag span {
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.grow-bag-edit {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  color: #4f5b52;
  font-size: 12px;
  font-weight: 700;
}

.grow-bag-edit[hidden] {
  display: none;
}

.grow-bag-edit input {
  width: 100%;
  min-width: 0;
  padding: 5px;
  font-size: 12px;
}

.return-grow-bag {
  justify-self: start;
  margin-top: 4px;
  padding: 5px 7px;
  color: #6f241b;
  background: #fff1ee;
  border: 1px solid #f1c2ba;
  border-radius: 6px;
  font-size: 12px;
}

.unplaced-grow-bags {
  margin-bottom: 18px;
}

.unplaced-grow-bags h2 {
  font-size: 18px;
}

.unplaced-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 72px;
  padding: 10px;
  border: 1px dashed #d9d4c7;
  border-radius: 8px;
}

.unplaced-list .grow-bag {
  width: min(190px, 100%);
}

.summary-grow-bags {
  margin-bottom: 20px;
}

.summary-grow-bag-list {
  gap: 8px;
}

.summary-grow-bag {
  min-height: 72px;
}

.summary-grow-bag-thumb,
.summary-grow-bag-thumb img,
.summary-grow-bag-thumb-empty {
  width: 52px;
  height: 52px;
  border-radius: 6px;
}

.summary-grow-bag-thumb {
  display: block;
}

.summary-grow-bag-thumb img {
  display: block;
  object-fit: cover;
  border: 1px solid #dedbd1;
}

.summary-grow-bag-thumb-empty {
  display: block;
  background: #f4f1e9;
  border: 1px solid #dedbd1;
}

.summary-grow-bag-main {
  min-width: 0;
}

.summary-grow-bag-main a,
.summary-grow-bag-main strong {
  display: block;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.summary-grow-bag-main span,
.summary-grow-bag-age {
  display: block;
  margin-top: 3px;
  color: #4f5b52;
  font-size: 13px;
  line-height: 1.35;
}

.summary-grow-bag-info {
  width: 300px;
  margin: 0;
  padding: 8px 0 8px 12px;
}

.summary-grow-bag-info div {
  display: grid;
  grid-template-columns: 112px 58px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.summary-grow-bag-info dt,
.summary-grow-bag-info dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
}

.summary-grow-bag-info dt {
  color: #667067;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.summary-grow-bag-info dd {
  color: #14251c;
  font-weight: 700;
}

.summary-grow-bag-info em,
.summary-grow-bag-age {
  color: #667067;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  white-space: nowrap;
}

.weather-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

.weather-location-card {
  grid-column: 1;
  min-width: 0;
}

.weather-location-card div {
  display: grid;
  gap: 2px;
}

.weather-location-card strong {
  color: #0d2b2c;
  font-size: 28px;
}

.weather-location-card span {
  color: #667067;
  display: block;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.weather-location-card .weather-updated {
  font-size: 14px;
}

.weather-settings form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.weather-settings label {
  display: grid;
  gap: 4px;
  color: #4f5b52;
  font-size: 12px;
  font-weight: 700;
}

.weather-settings input {
  width: 150px;
}

.weather-settings-actions {
  grid-column: 2;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.weather-location-card ~ #weather-location-form {
  grid-column: 1;
}

.weather-location-card ~ .weather-settings-actions {
  grid-row: 1 / span 2;
}

.weather-settings-actions form {
  display: block;
}

.weather-icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #17372b;
  background: #ffffff;
  border: 1px solid #c9c5ba;
  border-radius: 999px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

@media (max-width: 760px) {
  .weather-settings {
    grid-template-columns: 1fr;
  }

  .weather-location-card,
  .weather-location-card ~ #weather-location-form,
  .weather-settings-actions,
  .weather-location-card ~ .weather-settings-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .weather-settings-actions {
    grid-template-columns: auto auto;
    justify-content: end;
  }
}

.weather-error {
  padding: 10px;
  color: #6f241b;
  background: #fff1ee;
  border: 1px solid #f1c2ba;
  border-radius: 6px;
}

.weather-current,
.weather-history {
  margin-bottom: 20px;
}

.weather-current .section-header,
.weather-history .section-header {
  align-items: baseline;
  margin-bottom: 10px;
}

.weather-current-panel {
  display: grid;
  gap: 12px;
}

.weather-current-measures,
.weather-sun-grid {
  display: grid;
  gap: 12px;
}

.weather-current-measures {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.weather-sun-grid {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.weather-current-measures div,
.weather-sun-grid div {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 6px;
}

.weather-current-measures div {
  background: #f8faf6;
  border-color: #dbe3d5;
}

.weather-current-measures span,
.weather-sun-grid span:not(.weather-sun-icon) {
  color: #667067;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.weather-current-measures strong,
.weather-sun-grid strong {
  color: #0d2b2c;
  font-size: 22px;
  line-height: 1.1;
}

.weather-sun-grid em {
  color: #4f5b52;
  font-size: 12px;
  font-style: normal;
}

.weather-sun-icon {
  font-size: 20px;
  line-height: 1;
}

@media (max-width: 760px) {
  .weather-current-measures {
    grid-template-columns: 1fr;
  }
}

.weather-history .section-header span {
  color: #667067;
  font-size: 14px;
}

.weather-history-dashboard {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(150px, 0.8fr);
  gap: 12px;
}

.weather-history-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #f8faf6;
  border: 1px solid #dbe3d5;
  border-radius: 6px;
}

.weather-history-card strong {
  display: block;
  color: #0d2b2c;
  font-size: 30px;
  line-height: 1;
}

.weather-history-label,
.weather-history-note,
.weather-history-meta {
  color: #667067;
  font-size: 13px;
}

.weather-history-range {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.weather-history-range span {
  color: #5a665d;
  font-size: 20px;
  font-weight: 700;
}

.weather-history-bar {
  height: 8px;
  overflow: hidden;
  background: #dce9e1;
  border-radius: 999px;
}

.weather-history-bar span {
  display: block;
  width: 68%;
  height: 100%;
  background: linear-gradient(90deg, #4b93b5, #d58b45);
  border-radius: inherit;
}

.weather-history-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 760px) {
  .weather-history-dashboard {
    grid-template-columns: 1fr;
  }
}

.precip-meter {
  margin-bottom: 22px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

.precip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.precip-total {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: #f4f9fc;
  border: 1px solid #cfe0ef;
  border-radius: 8px;
}

.precip-total strong {
  color: #0f5f87;
  font-size: 28px;
}

.precip-total span {
  color: #4f5b52;
  font-size: 13px;
}

.precip-bar {
  height: 10px;
  overflow: hidden;
  background: #dcecf6;
  border-radius: 999px;
}

.precip-bar span {
  display: block;
  height: 100%;
  min-width: 4px;
  background: linear-gradient(90deg, #5cbce7, #0f77a8);
  border-radius: inherit;
}

.upcoming-rain {
  margin-top: 14px;
}

.upcoming-rain h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.upcoming-rain > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upcoming-rain a {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 7px;
  align-items: center;
  padding: 7px 9px;
  color: #14251c;
  background: #eef5fb;
  border: 1px solid #cfe0ef;
  border-radius: 6px;
  text-decoration: none;
}

.upcoming-rain em {
  color: #4f5b52;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.weather-quicklook {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.weather-quicklook > div {
  padding: 14px;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

.weather-quicklook h2 {
  margin-top: 0;
}

.weather-action-list {
  display: grid;
  gap: 8px;
}

.weather-action-list:empty::after {
  content: "No urgent items.";
  color: #667067;
  font-size: 14px;
}

.weather-action-list a {
  display: grid;
  grid-template-columns: 34px 70px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px;
  color: #14251c;
  background: #f7f6f0;
  border: 1px solid #e2ded4;
  border-radius: 6px;
  text-decoration: none;
}

.weather-action-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 6px;
  font-size: 20px;
}

.weather-day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}

.weather-day {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 260px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
}

.weather-day-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
  align-items: start;
  gap: 12px;
  color: #14251c;
}

.weather-day-header > div:first-child {
  display: grid;
  gap: 2px;
}

.weather-day-header strong {
  font-size: 18px;
}

.weather-day-header span:not(.weather-icon) {
  color: #667067;
  font-size: 13px;
}

.weather-temp-main {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.weather-temp-main div {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  background: #f8faf6;
  border: 1px solid #dbe3d5;
  border-radius: 6px;
}

.weather-temp-main strong {
  color: #0d2b2c;
  font-size: 26px;
  line-height: 1;
}

.weather-temp-main span {
  color: #667067;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.weather-temp-main .temp-risk {
  color: #b32118;
}

.weather-icon-stack {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  display: grid;
  justify-items: center;
}

.weather-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 10px;
  font-size: 34px;
}

@media (max-width: 760px) {
  .weather-day-grid {
    grid-template-columns: 1fr;
  }

  .weather-day {
    min-height: 0;
  }

  .weather-temp-main strong {
    font-size: 24px;
  }
}

.weather-icon-sun {
  background: #fff4d7;
  border: 1px solid #f2c96c;
}

.weather-icon-cloud {
  background: #eef3f5;
  border: 1px solid #c9d7dd;
}

.weather-icon-rain {
  background: #e7f3ff;
  border: 1px solid #9fc8ea;
}

.weather-condition,
.weather-advice {
  margin: 0;
}

.weather-condition {
  min-height: 42px;
  color: #14251c;
  font-weight: 700;
}

.weather-day dl {
  display: grid;
  gap: 4px;
  margin: 0;
}

.weather-day dl div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
}

.weather-day dt,
.weather-day dd {
  margin: 0;
  font-size: 13px;
}

.weather-day dt {
  color: #667067;
  font-weight: 700;
  text-transform: uppercase;
}

.weather-day dd {
  font-weight: 700;
}

.weather-water {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 8px;
  background: #eef5fb;
  border: 1px solid #cfe0ef;
  border-radius: 6px;
}

.weather-water span {
  font-size: 20px;
}

.weather-water-empty {
  background: transparent;
  border-color: transparent;
}

.weather-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.weather-warnings span {
  padding: 2px 6px;
  color: #8f2d22;
  background: #ffe2dc;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.calendar-day.weather-window-good {
  background: #f1f8ed;
  border-color: #a8c99a;
}

.calendar-day.weather-window-caution {
  background: #fff8e8;
  border-color: #e3c577;
}

.calendar-day.weather-window-avoid {
  background: #fff1ee;
  border-color: #e8a095;
}

.calendar-weather {
  display: grid;
  justify-items: center;
  gap: 2px;
  margin-bottom: 6px;
  padding: 5px;
  color: #14251c;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #e2ded4;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.calendar-weather-icon {
  font-size: 24px;
  line-height: 1;
}

.calendar-weather-condition {
  line-height: 1.15;
}

.calendar-weather-temps {
  display: flex;
  gap: 4px;
  align-items: baseline;
}

.calendar-weather-temps strong:first-child {
  color: #c01c28;
  font-size: 17px;
}

.calendar-weather-temps strong:last-child {
  color: #168bbd;
  font-size: 15px;
}

.calendar-weather-temps .temp-risk {
  color: #b32118;
}

.calendar-weather-rain {
  color: #14251c;
}

.weather-protect {
  margin: 0;
  padding: 8px;
  color: #6f241b;
  background: #fff1d6;
  border: 1px solid #f0cf8a;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.plan-item {
  display: grid;
  grid-template-columns: 150px 150px 1fr;
  gap: 12px;
  text-decoration: none;
}

.flash {
  margin-bottom: 18px;
  border-color: #9fc5a8;
  background: #edf7ef;
}

@media (max-width: 700px) {
  .site-header,
  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-header,
  .header-left,
  nav {
    flex-wrap: wrap;
  }

  .login-page {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .login-collage {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .detail,
  .plan-item,
  .add-to-tray,
  .planned-seed-add {
    grid-template-columns: 1fr;
  }

  .tray-grid {
    grid-template-columns: 1fr;
  }

  .grow-tent {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sprout-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .sprout-count {
    grid-column: 2;
    width: 100%;
    padding-left: 0;
  }

  .filters input,
  .filters select,
  .filters button {
    width: 100%;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
    font-size: 11px;
  }

  .site-header,
  .filters,
  .calendar-list,
  .day-actions,
  .day-filters,
  .add-to-tray,
  .planned-seeds,
  .print-map-actions,
  main > h1,
  .flash {
    display: none;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .print-heading {
    margin-bottom: 10px;
  }

  .print-task-list {
    display: block;
  }

  .print-task-list h2 {
    margin-bottom: 8px;
    font-size: 16px;
  }

  .print-task {
    display: grid;
    grid-template-columns: 90px 110px 1fr;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #cccccc;
    break-inside: avoid;
  }

  .calendar-list {
    gap: 16px;
    margin-bottom: 0;
  }

  .calendar-month {
    page-break-inside: avoid;
  }

  .calendar-month h2 {
    margin-bottom: 6px;
    font-size: 16px;
  }

  .weekday {
    padding: 4px;
    font-size: 10px;
  }

  .calendar-day {
    min-height: 92px;
    padding: 4px;
  }

  .calendar-event {
    padding: 3px;
    background: #ffffff;
    border: 1px solid #999999;
    border-left: 3px solid #000000;
    font-size: 9px;
  }

  .calendar-date,
  .calendar-day time {
    padding: 0;
    color: #000000;
    background: transparent;
    font-size: 10px;
  }

  .calendar-more {
    display: block;
    padding: 3px;
    background: #ffffff;
    border: 1px solid #999999;
    font-size: 9px;
  }

  .day-task {
    break-inside: avoid;
    padding: 10px 0;
    border: 0;
    border-top: 1px solid #999999;
    border-radius: 0;
  }

  .day-task .section-header a {
    display: none;
  }

  .task-badge {
    color: #000000;
    background: #ffffff;
    border: 1px solid #000000;
  }

  .facts div {
    padding: 6px;
    border-color: #999999;
  }

  .tray-print-sheet header {
    margin-bottom: 8px;
  }

  .tray-print-sheet header h1 {
    font-size: 18px;
  }

  .tray-print-grid {
    gap: 8px;
  }

  .tray-print-cell {
    min-height: 145px;
    padding: 8px;
    border-color: #000000;
    break-inside: avoid;
  }

  .tray-print-cell h2 {
    font-size: 13px;
  }

  .tray-print-cell p,
  .print-cell-header span {
    font-size: 10px;
  }

  .print-cell-header strong {
    font-size: 14px;
  }

  a {
    text-decoration: none;
  }
}
