.journal {
  max-width: 920px;
  margin: 0 auto;
  --journal-green: #275b42;
  --journal-line: #dce5de;
  padding-bottom: 24px;
}
/* Work settings expand in the season plan; the map and other stages stay mounted. */
.season-plan-editor {
  margin: 6px 0 20px;
  padding: 18px 22px;
  background: #f9fcf8;
  border: 1px solid #dce7db;
  border-left: 3px solid var(--stage, #47795c);
  border-radius: 0 16px 16px 0;
  scroll-margin-top: 110px;
  animation: season-editor-in 0.16s ease-out;
}
.season-plan-editor[hidden] {
  display: none !important;
}
.season-plan-editor > .journal {
  padding: 0;
  max-width: none;
}
.season-plan-editor .journal h2 {
  font-size: 22px;
  margin: 8px 0 16px;
  letter-spacing: -0.4px;
  clear: both;
}
.season-plan-editor .journal-back {
  font-size: 14px;
  min-height: 44px;
  padding: 6px 0;
}
.season-plan-editor .season-editor-options {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #dce5de;
  border-radius: 0;
  padding: 10px 0;
  margin: 8px 0;
}
.season-editor-options > summary {
  font-size: 14px;
  color: #42664f;
  padding: 6px 0;
}
.season-editor-options > fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
.season-editor-options > fieldset > legend {
  display: none;
}
.season-plan-editor .ey {
  display: block;
  margin: 8px 0 0;
  color: #607567;
}
.journal .season-editor-collapse {
  float: right;
  background: transparent;
  border: 0;
  color: #3e6650;
  font-size: 13px;
  padding: 6px 0 6px 16px;
  min-height: 44px;
}
.season-plan-overview {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  background: #f6f8f2ee;
  backdrop-filter: blur(12px);
  padding: 8px 0;
  margin: 10px 0 14px;
  border-bottom: 1px solid #dce7db;
}
.journal .season-plan-overview button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #637768;
  font-size: 11px;
  line-height: 1.2;
  min-width: 0;
  overflow-wrap: anywhere;
}
.season-plan-overview svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}
.season-plan-overview small {
  font-size: 10px;
  font-weight: 400;
  color: #667d6c;
}
.journal .season-plan-overview [aria-current] {
  background: #dfeede;
  color: #244e35;
  font-weight: 700;
}
.season-plan-group {
  scroll-margin-top: 110px;
}
.season-plan-group.is-editing > header h4 {
  color: #275b42;
}
.season-plan-group.is-editing [data-editor-toggle] {
  background: var(--stage-soft);
  color: var(--stage);
}
.season-plan-group [data-editor-toggle][aria-expanded='true'] svg {
  transform: rotate(45deg);
}
.season-plan-editor .journal-add-choices {
  gap: 0;
  margin: 12px 0;
}
.season-plan-editor .journal-add-choices button {
  border: 0;
  border-bottom: 1px solid #dce6d9;
  border-radius: 0;
  background: transparent;
  min-height: 76px;
  padding: 14px 4px;
}
.season-plan-editor .journal-add-choices button:last-child {
  border-bottom: 0;
}
.season-plan-editor .journal-add-choices button:hover {
  background: #edf4e9;
}
.season-plan-editor .journal-product-row {
  background: #eef4ea;
  padding: 12px;
  margin: 14px 0;
}
.season-plan-editor .journal-product-row h3 {
  font-size: 17px;
}
.field-detail-modern .season-plan-editor .journal-bottom {
  display: block;
  position: static;
  margin: 16px 0 0;
  padding: 10px 0 0;
  background: none;
  z-index: auto;
}
.season-draft-warning {
  padding: 12px 14px;
  margin: 0 0 12px;
  background: #f6edda;
  border-radius: 10px;
  color: #665329;
  font-size: 14px;
}
.season-draft-warning p {
  margin: 0 0 8px;
}
.season-draft-warning > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
@keyframes season-editor-in {
  from {
    opacity: 0.5;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 540px) {
  .season-plan-editor {
    padding: 12px;
    border-radius: 0 12px 12px 0;
    margin-left: 0;
  }
  .season-plan-editor .journal .two {
    gap: 10px;
    min-width: 0;
  }
  .season-plan-editor .two > label {
    min-width: 0;
  }
  .season-plan-editor input,
  .season-plan-editor select {
    width: 100%;
    min-width: 0;
  }
  .season-plan-editor .journal fieldset {
    padding: 0;
  }
  .season-plan-overview {
    gap: 2px;
  }
  .journal .season-plan-overview button {
    font-size: 10px;
    padding: 8px 2px;
  }
}
@media (max-width: 360px) {
  .season-plan-editor #journal-work-form > .two:first-child {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .season-plan-editor {
    animation: none;
  }
}
.journal-base-group {
  grid-column: 1/-1;
  border: 1px solid #dce5de;
  border-radius: 16px;
  padding: 18px;
  background: #edf2e9;
}
.journal-base-group > .secondary {
  margin-top: 14px;
}
.journal-base-group .journal-field-grid {
  margin-top: 12px;
}
.journal * {
  box-sizing: border-box;
}
.journal button,
.journal input,
.journal select {
  min-height: 46px;
}
.journal button {
  cursor: pointer;
}
.journal input,
.journal select,
.journal textarea {
  font-size: 16px;
  max-width: 100%;
}
.journal button:focus-visible,
.journal summary:focus-visible {
  outline: 3px solid #ab863b;
  outline-offset: 3px;
}
.journal button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.journal-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin: 22px 0;
}
.journal h2 {
  font-size: clamp(26px, 5vw, 38px);
  margin: 4px 0 8px;
}
.journal h3 {
  margin: 8px 0;
  font-size: 20px;
}
.journal p {
  line-height: 1.55;
}
.journal-area {
  font-size: 26px;
  margin: 0;
}
.journal-year {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-shrink: 0;
}
.journal-year label {
  font-size: 12px;
  display: grid;
  gap: 5px;
  margin: 0;
}
.journal-year button {
  min-width: 44px;
  border: 1px solid var(--journal-line);
  background: white;
  border-radius: 10px;
  font-size: 26px;
}
.journal-year select {
  width: 104px;
}
.journal-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.journal-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.journal-field-card {
  text-align: left;
  position: relative;
  color: inherit;
  width: 100%;
  padding: 24px;
  border: 1px solid var(--journal-line);
  background: #fff;
}
.journal-field-card:hover {
  border-color: var(--journal-green);
  box-shadow: 0 4px 18px #275b4214;
}
.journal-field-card p {
  font-size: 16px;
}
.journal-field-card small {
  display: block;
  color: #59695e;
}
.journal-card-arrow {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 22px;
  color: var(--journal-green);
}
.journal-preview {
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  background: #e9eee6;
  z-index: 0;
}
.journal-overview-map {
  height: 260px;
  border-radius: 16px;
  overflow: hidden;
  z-index: 0;
}
.journal-no-map {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 25px;
  color: #64705d;
}
.journal-preview .leaflet-control-attribution {
  font-size: 9px;
}
.journal-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--journal-line);
  margin: 20px 0;
}
.journal-tabs button {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #59675b;
  font-weight: 700;
  padding: 14px 5px;
}
.journal-tabs button[aria-selected='true'] {
  border-color: var(--journal-green);
  color: var(--journal-green);
}
.journal-back {
  border: 0;
  background: transparent;
  color: var(--journal-green);
  padding: 8px 0;
  font-size: 16px;
}
.journal-notice:empty {
  display: none;
}
.journal-notice {
  padding: 12px;
  border-radius: 10px;
  background: #f3ecd7;
  overflow-wrap: anywhere;
}
.journal-operation {
  background: #fff;
  border: 1px solid var(--journal-line);
  border-left: 4px solid #bb963f;
  padding: 20px;
  border-radius: 14px;
  margin: 12px 0;
}
.journal-operation.completed {
  border-left-color: #528465;
}
.journal-operation-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #64705d;
}
.journal-badge {
  background: #f6edcf;
  border-radius: 20px;
  padding: 5px 10px;
  color: #6d5527;
}
.completed .journal-badge {
  background: #e9f2e8;
  color: #275b42;
}
.journal-operation p {
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.journal-operation small {
  display: block;
  color: #657062;
}
.journal-operation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.journal-operation-actions button {
  padding: 8px 14px;
  font-size: 14px;
}
.journal-delete {
  background: transparent;
  border: 0;
  color: #975240;
  text-decoration: underline;
}
.journal-month {
  text-transform: capitalize;
  font-size: 16px !important;
  color: #5e6b5f;
  margin-top: 28px !important;
}
.journal-bottom {
  position: sticky;
  bottom: 0;
  z-index: 600;
  padding: 14px 0 max(14px, env(safe-area-inset-bottom));
  margin-top: 24px;
  background: linear-gradient(transparent, #f4f6ef 18%);
}
.journal-bottom .primary {
  width: 100%;
  min-height: 54px;
  font-size: 17px;
}
.journal-recent {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.journal-recent button {
  font-size: 13px;
  padding: 6px 10px;
}
.wrap:has(.journal-detail) > #title,
.wrap:has(.journal-detail) > #intro,
.wrap:has(.journal-detail) > .ey {
  display: none;
}
.journal-detail {
  scroll-margin-top: 12px;
}
.journal-crop,
.journal-history,
.journal-more {
  border: 1px solid var(--journal-line);
  border-radius: 12px;
  padding: 16px;
  margin: 14px 0;
  background: #fff;
}
.journal summary {
  cursor: pointer;
  min-height: 28px;
  font-weight: 600;
  line-height: 1.6;
}
.journal details[open] > summary {
  margin-bottom: 16px;
}
.journal-history small {
  display: block;
  font-weight: 400;
  color: #657062;
}
.journal-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.journal-type-grid button {
  text-align: left;
  min-height: 62px;
  padding: 14px;
}
.journal form label {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  color: #465a49;
}
.journal .two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.journal-input-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}
.journal-input-unit input {
  min-width: 0;
  flex: 1;
}
.journal-input-unit > span {
  color: #637362;
  white-space: nowrap;
}
.journal-product-row {
  padding: 12px 16px;
  background: #edf2e9;
  border-radius: 12px;
  margin: 16px 0;
}
.journal-targets > label,
.journal-check {
  display: flex !important;
  align-items: center;
  gap: 12px !important;
  padding: 10px;
  border-bottom: 1px solid var(--journal-line);
}
.journal-targets input,
.journal-check input {
  width: 22px;
  flex: 0 0 22px;
  min-height: 22px;
  accent-color: var(--journal-green);
}
.journal-targets small {
  display: block;
  font-size: 13px;
  margin-top: 5px;
}
.journal-total {
  padding: 16px;
  background: #e9f1e5;
  border-radius: 12px;
  margin: 20px 0;
}
.journal-total p {
  margin: 5px 0;
}
.journal fieldset {
  border: 1px solid var(--journal-line);
  border-radius: 12px;
  margin: 20px 0;
  padding: 16px;
}
.journal-confirm {
  border-top: 1px solid var(--journal-line);
  margin-top: 14px;
  padding-top: 10px;
}
.journal-confirm button {
  margin-right: 8px;
}
@media (max-width: 600px) {
  .journal-top {
    flex-direction: column;
    gap: 14px;
  }
  .journal-year {
    width: 100%;
    justify-content: space-between;
  }
  .journal-year label {
    flex: 1;
  }
  .journal-year select {
    width: 100%;
  }
  .journal-field-grid {
    grid-template-columns: 1fr;
  }
  .journal-preview {
    height: 160px;
  }
  .journal-operation {
    padding: 16px;
  }
  .journal-operation-actions button {
    flex: 1;
  }
  .journal-operation-actions .primary {
    flex-basis: 100%;
  }
  .journal .two {
    gap: 10px;
  }
  .journal-type-grid {
    gap: 10px;
  }
  .journal-overview-actions button {
    flex: 1;
  }
  .journal .ey {
    font-size: 11px;
  }
  .journal .journal-bottom {
    margin-bottom: -20px;
  }
  .journal-operation-top time {
    white-space: nowrap;
  }
}

.journal-field-delete {
  margin: 24px 0 8px;
  border-top: 1px solid var(--journal-line);
  padding-top: 12px;
}
.journal-delete-warning {
  padding: 16px;
  background: #fff1e9;
  border: 1px solid #d5aa94;
  border-radius: 12px;
}
.journal-delete-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}
.journal-delete-actions button {
  flex: 1;
  min-width: 200px;
  min-height: 52px;
}

.journal-costs {
  padding: 12px 14px;
  margin: 14px 0;
  background: #edf3e9;
  border-radius: 12px;
  text-align: left;
}
.journal-costs p {
  margin: 4px 0;
}
.journal-costs small {
  display: block;
  line-height: 1.5;
  color: #52644f;
}
.journal-field-card .journal-costs {
  padding: 8px 10px;
  font-size: 14px;
}

.journal-tabs {
  overflow-x: auto;
}
.journal-tabs button {
  flex: 1 0 auto;
  white-space: nowrap;
}

.field-note-dialog {
  width: min(94vw, 460px);
  max-height: 90dvh;
  overflow: auto;
  border: 0;
  border-radius: 16px;
  padding: 22px;
}
.field-note-dialog label {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.field-note-dialog button {
  min-height: 48px;
  margin: 4px;
}
.field-note-dialog textarea,
.field-note-dialog select {
  width: 100%;
  font-size: 16px;
}
.field-note-dialog [role='alert'] {
  color: #9b341b;
}
.journal-detail:has([data-journal-tab='markers'][aria-selected='true']) .journal-preview {
  height: 340px;
}
.profit-breakdown {
  margin: 8px 0;
}
.profit-breakdown > summary {
  font-size: 13px;
  cursor: pointer;
  color: #315b3b;
  padding: 8px 0;
}
.profit-breakdown[open] {
  border-top: 1px solid #cbd8c5;
}
.profit-breakdown p {
  padding: 6px 0;
}
/* Unified season plan and contextual work creation. */
.journal.field-detail-modern .journal-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.journal.field-detail-modern .journal-tabs button {
  font-size: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
  padding: 12px 3px;
}
.journal .journal-add-choices {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}
.journal .journal-add-choices button,
.journal .cultivation-field-model {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid #dce6d9;
  border-radius: 15px;
  padding: 20px 16px;
  min-height: 90px;
  color: #244d36;
}
.journal-add-choices svg,
.cultivation-field-model svg {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}
.journal-add-choices strong,
.cultivation-field-model strong {
  display: block;
  font-size: 16px;
  line-height: 1.35;
}
.journal-add-choices small,
.cultivation-field-model small {
  display: block;
  margin-top: 5px;
  color: #687b6b;
  font-weight: 400;
  line-height: 1.5;
}
.journal-add-choices button > span:last-child,
.cultivation-field-model > span:last-child {
  margin-left: auto;
  font-size: 24px;
}
.journal .cultivation-field-model {
  min-height: 76px;
  margin: 10px 0;
}
.journal .cultivation {
  padding: 0;
}
.journal .season-plan-entry {
  padding-bottom: 12px;
  margin-bottom: 8px;
}
.journal .season-work-complete {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin: 0 0 0 56px;
  padding: 4px 0 12px;
  max-width: 550px;
}
.journal .season-work-complete label {
  font-size: 12px;
  margin: 0;
  min-width: 0;
}
.journal .season-work-complete .journal-check {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 46px;
  font-size: 14px;
}
.journal .season-work-complete input[type='checkbox'] {
  width: 22px;
  height: 22px;
  min-height: 22px;
  accent-color: #285d3d;
}
.journal .season-work-complete input[type='date'] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: 14px;
  padding: 8px;
  min-height: 44px;
}
.journal .season-work-complete button {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 13px;
}
.journal .season-work-complete :disabled {
  opacity: 0.55;
}
.season-complete-error {
  grid-column: 1/-1;
  margin: 0;
  color: #973c29;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.season-complete-error:empty {
  display: none;
}
.journal .season-work-done {
  margin: 0 0 10px 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #236039;
  font-size: 13px;
  font-weight: 700;
}
.season-work-done time {
  font-weight: 400;
}
.journal .season-plan-entry.completed .season-plan-work {
  border-color: #9abb9d;
}
.journal .season-plan-entry.completed summary strong {
  color: #3f6750;
}
@media (max-width: 540px) {
  .journal.field-detail-modern:has(.field-plan-content) .field-work-actions {
    grid-template-columns: 1fr;
  }
  .journal.field-detail-modern:has(.field-plan-content) #journal-copy-year {
    max-width: none;
    min-height: 44px;
    justify-self: start;
  }
  .journal .season-work-complete {
    margin-left: 26px;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .journal .season-work-complete button {
    grid-column: 2;
    justify-self: stretch;
  }
  .journal .season-work-done {
    margin-left: 51px;
  }
}

.season-pending-work {
  padding: 10px 0;
  border-top: 1px solid #dce6df;
}
.season-pending-work > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  list-style: none;
}
.season-pending-work > summary::-webkit-details-marker {
  display: none;
}
.season-pending-work > summary::after {
  content: '⌄';
  margin-left: auto;
  color: #52685a;
}
.season-pending-work[open] > summary::after {
  transform: rotate(180deg);
}
.season-pending-work > summary small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #756230;
}
.season-draft-description {
  color: #52685a;
  font-size: 14px;
  margin: 0 0 12px;
}
.season-draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.season-draft-actions button {
  min-height: 44px;
}
.season-pending-work:not([open]) > .season-draft-body,
.work-section-card:not([open]) > .work-section-body {
  display: none;
}
.season-save-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  margin-top: 18px;
  background: #e8f2eb;
  border-radius: 16px;
}
.season-save-all small {
  display: block;
  margin-top: 5px;
  color: #52685a;
}
@media (max-width: 540px) {
  .season-save-all {
    flex-direction: column;
    align-items: stretch;
  }
}
.journal-crop-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0 18px;
  margin-bottom: 12px;
  border-bottom: 1px solid #dbe4d9;
  color: #244f35;
}
.journal-crop-summary > svg {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}
.journal-crop-summary > div {
  min-width: 0;
}
.journal-crop-summary strong {
  display: block;
  margin-top: 3px;
  font-size: 19px;
  overflow-wrap: anywhere;
}
.journal-crop-summary small,
.journal-crop-summary p {
  font-size: 13px;
  color: #607267;
}
.journal-crop-summary p {
  margin: 4px 0 0;
}
.journal .journal-sowing-crop {
  padding: 0 0 12px;
  border-bottom: 1px solid #dbe4d9;
  margin-bottom: 12px;
}
.journal-sowing-crop select {
  min-width: 0;
  width: 100%;
}
@media (max-width: 540px) {
  .journal .journal-sowing-crop {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .journal-crop-summary strong {
    font-size: 17px;
  }
}
.plan-nutrition {
  margin: 4px 0 20px;
  border-bottom: 1px solid #dce7dc;
  color: #244e38;
}
.journal .plan-nutrition > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  padding: 12px 16px;
  border-radius: 12px;
  background: #edf3ea;
  font-size: 15px;
  min-height: 52px;
}
.plan-nutrition > summary::-webkit-details-marker {
  display: none;
}
.plan-nutrition > summary small {
  display: block;
  font-weight: 400;
  color: #617365;
  font-size: 12px;
  margin-top: 3px;
}
.plan-nutrition[open] > summary > span:last-child {
  transform: rotate(180deg);
}
.plan-nutrition-body {
  padding: 4px 16px 18px;
}
.plan-yield-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.plan-yield-heading h5 {
  font-size: 19px;
  margin: 4px 0;
}
.plan-yield-heading small {
  font-size: 12px;
  color: #617365;
}
.plan-yield-heading button {
  font-size: 12px;
  min-height: 42px;
}
.plan-nutrition-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #57785d;
}
.journal .plan-yield-label {
  max-width: 290px;
  font-size: 14px;
  font-weight: 650;
}
.plan-yield-label > span {
  display: flex;
  align-items: center;
  gap: 10px;
}
.plan-yield-label input {
  width: 100%;
  min-width: 0;
  font-size: 23px;
  font-weight: 650;
  background: #fff;
  border: 1px solid #95b29b;
  border-radius: 10px;
  min-height: 52px;
}
.plan-yield-label strong {
  white-space: nowrap;
}
.plan-yield-form > small {
  font-size: 12px;
  color: #66746a;
}
.plan-nutrition-status {
  font-size: 13px;
  color: #5d7062;
  min-height: 20px;
  margin: 16px 0 10px;
}
.plan-nutrient-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.plan-nutrient-grid > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 14px;
  border-radius: 12px;
  background: #f0f5ed;
  min-width: 0;
  gap: 4px;
}
.plan-nutrient-grid > div:nth-child(2) {
  background: #f7f2e7;
}
.plan-nutrient-grid > div:nth-child(3) {
  background: #edf3f3;
}
.plan-nutrient-symbol {
  font-size: 12px;
  font-weight: 750;
  color: #52715c;
}
.plan-nutrient-grid strong {
  font-size: 25px;
  color: #213e2e;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.plan-nutrient-grid small {
  font-size: 11px;
  min-height: 28px;
  color: #68766b;
}
.plan-nutrient-grid > div > span:not(.plan-nutrient-symbol) {
  font-size: 13px;
}
.plan-nutrition-limits {
  font-size: 12px;
  line-height: 1.5;
  color: #596e60;
}
.plan-nutrition-basis {
  margin: 16px 0;
}
.plan-nutrition-basis > summary {
  font-size: 13px;
}
.plan-nutrition-basis p,
.plan-nutrition-basis a {
  font-size: 12px;
  line-height: 1.5;
}
.plan-nutrition-basis a {
  display: block;
  margin: 8px 0;
}
.plan-nutrition-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.plan-nutrition-inputs select {
  min-width: 0;
}
.plan-nutrition-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #dce7dc;
}
.plan-nutrition-footer > span {
  font-size: 12px;
  color: #647768;
}
.plan-nutrition-footer button {
  white-space: nowrap;
}
.plan-yield-form [role='alert'] {
  font-size: 13px;
  color: #933c2c;
}
@media (max-width: 540px) {
  .plan-nutrition-body {
    padding: 4px 2px 14px;
  }
  .plan-yield-heading {
    align-items: flex-start;
  }
  .plan-yield-heading h5 {
    font-size: 17px;
  }
  .plan-yield-heading button {
    max-width: 120px;
    line-height: 1.3;
  }
  .plan-nutrient-grid {
    gap: 6px;
  }
  .plan-nutrient-grid > div {
    padding: 10px 8px;
  }
  .plan-nutrient-grid strong {
    font-size: 22px;
  }
  .plan-nutrition-footer {
    align-items: flex-start;
  }
  .plan-nutrition-footer button {
    font-size: 13px;
  }
  .plan-nutrition-inputs {
    gap: 0 8px;
  }
}

/* Compact individual-work chooser, including narrow phone screens. */
.journal .journal-add-choices.journal-work-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.journal .journal-work-options button {
  justify-content: center;
  gap: 7px;
  min-height: 52px;
  padding: 10px 8px;
  border: 1px solid #dce6d9;
  border-radius: 10px;
  text-align: center;
  background: #f2f6ef;
}
.journal .journal-work-options button:last-child {
  border-bottom: 1px solid #dce6d9;
}
.journal .journal-work-options svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
.journal .journal-work-options strong {
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.journal-single-work-choice .journal-notice:empty {
  display: none;
}
.season-plan-editor .journal-single-work-choice > h2 {
  font-size: 17px;
  margin: 6px 0 12px;
}
.journal-single-work-choice .journal-work-options {
  margin-top: 6px;
}
.journal-single-work-choice > #journal-target-picker:empty {
  display: none;
}

/* Field-specific extra actions stay inline without replacing the plan. */
.journal.field-detail-modern .journal-tabs #journal-more:is([aria-expanded='true'], .is-current) {
  background: linear-gradient(125deg, #467857, #275b3b);
  color: #fff;
}
.journal-more-options {
  margin: -6px 0 16px;
  padding: 6px;
  border: 1px solid #dce6de;
  border-radius: 16px;
  background: #f3f7f2;
}
.journal-more-options[hidden] {
  display: none;
}
.journal-more-options > button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #285b3c;
  text-align: left;
}
.journal-more-options > button:hover,
.journal-more-options > button:focus-visible {
  background: #e3eee2;
}
.journal-more-options svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.journal-more-options strong,
.journal-more-options small {
  display: block;
}
.journal-more-options small {
  margin-top: 4px;
  color: #617064;
  font-size: 12px;
  font-weight: 400;
}

.journal.field-detail-modern .field-hero-compact {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px 14px;
  margin: 14px 0 18px;
}
.journal.field-detail-modern .field-hero-compact h2 {
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 0;
}
.journal.field-detail-modern .field-hero-compact > .journal-area {
  font-size: 20px;
  font-weight: 500;
  color: #627265;
  white-space: nowrap;
}

/* Compact crop-parcel selection with a clear selected state. */
.journal .parcel-picker {
  margin: 12px 0 18px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.journal .parcel-picker .parcel-picker-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 2px 9px;
  align-items: baseline;
}
.journal .parcel-picker-heading > strong {
  font-size: 14px;
  color: #355342;
}
.journal .parcel-picker-heading > small {
  font-size: 11px;
  color: #758178;
}
.journal .parcel-picker .field-parcel-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 8px;
  overflow: visible;
  padding: 0;
}
.journal .parcel-picker .field-parcel-options button {
  min-width: 0;
  min-height: 82px;
  padding: 12px 14px;
  border: 1px solid #e0e7df;
  border-radius: 14px;
  background: #fff;
  color: #263d2f;
  box-shadow: none;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.journal .parcel-picker .field-parcel-options button[aria-pressed='true'] {
  background: #edf5eb;
  border-color: #51815c;
  box-shadow: inset 3px 0 #3c714a;
  color: #214d30;
}
.journal .parcel-picker .field-parcel-options button:hover {
  border-color: #7fa488;
}
.journal .parcel-picker .field-parcel-options button:focus-visible {
  outline: 3px solid #93b99b;
  outline-offset: 3px;
}
.journal .parcel-choice-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.journal .parcel-choice-heading > strong {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.journal .parcel-choice-check {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  border: 1px solid #cfdbcf;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.journal [aria-pressed='true'] .parcel-choice-check {
  background: #356846;
  border-color: #356846;
  color: #fff;
}
.journal .parcel-choice-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
}
.journal .parcel-choice-details .field-crop-pill {
  margin: 0;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 500;
}
.journal .parcel-choice-details .field-crop-pill svg {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}
.journal .parcel-choice-area {
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  color: #45634e;
}
.journal .parcel-no-crop {
  font-size: 12px;
  font-weight: 400;
  color: #7a847b;
}

/* Keep the initial work chooser light; field selection remains discoverable. */
.journal .target-picker-compact {
  margin: 8px 0 12px;
  border: 1px solid #dfe7dc;
  border-radius: 11px;
  background: #f6f9f3;
}
.journal .target-picker-compact > summary {
  cursor: pointer;
  padding: 11px 12px;
  font-size: 13px;
  color: #365740;
  min-height: 44px;
  box-sizing: border-box;
}
.journal .target-picker-compact > summary strong {
  display: inline-block;
  margin-left: 4px;
  background: #dfecdc;
  border-radius: 12px;
  padding: 2px 7px;
  font-size: 12px;
}
.journal .target-picker-compact > summary small {
  margin-left: 10px;
  color: #6c7b6e;
  font-size: 11px;
}
.journal .target-picker-compact .target-picker {
  border: 0;
  background: transparent;
  margin: 0;
  padding: 10px 12px;
}
.journal .target-picker-compact .target-picker h3 {
  display: none;
}
.journal .journal-single-work-choice .journal-work-options,
.journal-single-work-choice .journal-work-options {
  margin: 8px 0;
  gap: 7px;
}
.journal .journal-work-options button {
  min-height: 44px;
  padding: 9px 8px;
  border-radius: 10px;
  gap: 6px;
}
.journal .journal-work-options strong {
  font-size: 12px;
  font-weight: 600;
}
.journal .journal-work-options svg {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.journal .target-summary-names {
  font-weight: 500;
  overflow-wrap: anywhere;
  color: #365740;
}

/* Avoid native scroll anchoring fighting the inline editor position. */
.season-plan {
  overflow-anchor: none;
}
.season-plan-editor > .season-plan-overview {
  position: static;
  margin: 0 0 10px;
}

.spray-row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.spray-row-heading strong {
  font-size: 14px;
}
.journal .spray-remove {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #e2cfc8;
  border-radius: 10px;
  background: #fff7f3;
  color: #8d4432;
  font-size: 13px;
  white-space: nowrap;
}

[data-seed-other][hidden] {
  display: none !important;
}

/* Shared, touch-friendly work sections. Existing controls remain mounted. */
.work-section-form {
  --work-card-border: #dce6de;
}
.work-section-card {
  background: #fff;
  border: 1px solid var(--work-card-border);
  border-radius: 14px;
  margin: 10px 0;
  overflow: clip;
}
.work-section-card > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
  color: #203e30;
  font-size: 14px;
  min-height: 44px;
  box-sizing: border-box;
}
.work-section-card > summary::-webkit-details-marker {
  display: none;
}
.work-section-card > summary::after {
  content: '⌄';
  margin-left: auto;
  color: #61776b;
}
.work-section-card[open] > summary::after {
  transform: rotate(180deg);
}
.work-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e6f1e6;
  color: #2c6745;
  flex-shrink: 0;
}
.work-section-icon svg {
  width: 22px;
  height: 22px;
}
.work-section-body {
  padding: 0 12px 12px;
}
.work-section-form .work-section-body label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #52695c;
}
.work-section-form .work-section-body input,
.work-section-form .work-section-body select {
  min-height: 44px;
  padding: 9px 10px;
  font-size: 16px;
  border-radius: 8px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}
.work-section-form .work-section-body .two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.work-section-form .journal-products {
  border: 0;
  padding: 0;
  background: transparent;
}
.work-section-form .work-section-body > .journal-product-row {
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
  background: transparent;
}
.work-section-form .work-section-body > .journal-product-row h3 {
  display: none;
}
.work-section-form .fertilizer-dose-balance {
  background: #f2f7f1;
  border: 0;
  border-radius: 10px;
  padding: 10px;
  margin-top: 10px;
}
.work-section-form .fertilizer-dose-control {
  margin-top: 4px;
}
.work-section-form .fertilizer-dose-control input[data-product-rate] {
  font-size: 22px;
  padding: 8px 0;
}
.work-section-form .fertilizer-dose-control button {
  min-height: 44px;
}
.work-section-form .fertilizer-dose-control select[data-product-unit] {
  width: 82px;
}
.work-section-form .journal-more,
.work-section-form .fertilizer-balance-details {
  background: #fff;
  border: 1px solid var(--work-card-border);
  border-radius: 10px;
  padding: 0 10px;
  margin: 8px 0;
}
.work-section-form .journal-more > summary,
.work-section-form .fertilizer-balance-details > summary {
  padding: 10px 2px;
  font-size: 13px;
  min-height: 42px;
  box-sizing: border-box;
}
.work-section-form .work-section-body fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.work-section-form .work-section-body fieldset legend {
  display: none;
}
.work-section-form .journal-bottom button[type='submit'] {
  width: 100%;
  border-radius: 10px;
  min-height: 48px;
}
.season-plan-editor:has(.work-section-form) {
  padding: 12px;
  border-left-width: 1px;
  border-radius: 16px;
  background: #f5f8f3;
}
.season-plan-editor:has(.work-section-form) .season-plan-overview {
  border: 1px solid #dce6de;
  border-radius: 12px;
  background: #fff;
  padding: 4px;
  gap: 2px;
}
.season-plan-editor:has(.work-section-form) .season-plan-overview button {
  min-width: 0;
  padding: 8px 3px;
}
@media (max-width: 380px) {
  .work-section-form .work-section-body .two {
    gap: 6px;
  }
  .work-section-body {
    padding: 0 9px 10px;
  }
}

.work-settings-template [hidden] {
  display: none !important;
}

.batch-work-editor {
  box-sizing: border-box;
  width: 100%;
  margin: 0 auto 20px;
  overflow-anchor: none;
}
.batch-work-editor .season-plan-overview {
  position: static;
}
.journal .batch-phase-hint {
  margin: 0 0 12px;
  color: #607567;
  font-size: 12px;
  line-height: 1.5;
}
.batch-pending {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.batch-pending strong {
  width: 100%;
  color: #365740;
  font-size: 13px;
}
.batch-phase-sections {
  display: grid;
  gap: 18px;
  margin: 20px 0;
}
.batch-phase-section {
  border-top: 1px solid #dce6dc;
  padding-top: 16px;
}
.batch-phase-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.batch-phase-section > header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.05rem;
}
.batch-phase-section > header svg {
  width: 26px;
  height: 26px;
}
.batch-phase-section > header button {
  min-height: 44px;
  white-space: nowrap;
}
.batch-phase-body > .journal {
  padding: 12px 0;
}
.batch-phase-body > .journal > h2 {
  display: none;
}
.batch-phase-section [data-phase-saved] {
  display: block;
  margin-top: 5px;
  color: #607567;
  font-size: 12px;
}
.journal [data-new-work-context] {
  margin: 12px 0 18px;
  padding-left: 12px;
  border-left: 3px solid #55906b;
}
.journal .journal-new-work-label {
  display: grid;
  gap: 4px;
  margin: 0;
}
.journal-new-work-label strong {
  color: var(--journal-green);
  font-size: 15px;
}
.journal-new-work-label span,
.journal .journal-no-existing-work {
  color: #607567;
  font-size: 12px;
  line-height: 1.5;
}
.journal .journal-no-existing-work {
  margin: 6px 0 0;
}
.journal-existing-work {
  margin-top: 8px;
}
.journal-existing-work > summary {
  min-height: 44px;
  padding: 6px 0;
  box-sizing: border-box;
  color: #365740;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.journal-existing-work > summary small {
  display: block;
  color: #607567;
  font-size: 12px;
  font-weight: 400;
}
.journal-existing-work ul {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.journal-existing-work li {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-top: 1px solid var(--journal-line);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.journal-existing-work li small {
  color: #607567;
  line-height: 1.5;
}
