@font-face {
  font-family: 'Kanit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/kanit-v17-thai-400.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Kanit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/kanit-v17-latin-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Kanit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/kanit-v17-thai-600.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

@font-face {
  font-family: 'Kanit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/kanit-v17-latin-600.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #302c26;
  --muted: #536659;
  --line: #d7e8dc;
  --white: #fff;
  --paper: #f2faf5;
  --green: #206a48;
  --light: #e4f5ec;
  --forest: #20271e;
  --rust: #8e4332;
  --amber: #89571e;
  --radius: 16px;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  --font: Kanit,"Noto Sans Thai",Thonburi,system-ui,sans-serif;
  --gap-1: 8px;
  --gap-2: 12px;
  --gap-3: 16px;
  --gap-4: 24px;
  --gap-5: 32px;
  --page-gutter: clamp(20px,3.1vw,48px);
  --card-padding: clamp(16px,1.7vw,24px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(ellipse at 100% 0, #ddf3e8 0, transparent 47%),
    radial-gradient(ellipse at 2% 43%, #e5f8ec 0, transparent 32%), var(--paper);
  color: var(--ink);
  background-attachment: fixed;
}

a {
  color: var(--green);
}

button,input,select,textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .65;
}

button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible {
  outline: 3px solid #70a779;
  outline-offset: 3px;
}

[hidden] {
  display: none!important;
}

.layout {
  display: grid;
  grid-template-columns: clamp(212px,18vw,250px) minmax(0,1fr);
  min-height: 100dvh;
}

.sidebar {
  background: #f8fffbcc;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  padding: var(--gap-4) var(--gap-3);
  position: sticky;
  top: 0;
  height: 100dvh;
  border-right: 1px solid #d8eaded4;
  backdrop-filter: blur(18px);
  gap: var(--gap-5);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--gap-2);
  color: var(--ink);
  text-decoration: none;
  margin: 0;
  white-space: normal;
  min-width: 0;
}

.brand strong {
  font: 600 1.18rem/1.2 var(--font);
  letter-spacing: -.014em;
  display: block;
}

.brand small {
  font-size: .77rem;
  color: var(--muted);
  display: block;
  margin-top: 4px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sidebar nav {
  display: grid;
  gap: var(--gap-1);
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 10px;
  color: #496054;
  text-decoration: none;
  font-size: .94rem;
  font-weight: 600;
  white-space: nowrap;
}

.sidebar nav a:hover {
  background: #edf8f2;
  color: #1e5039;
}

.sidebar nav a[aria-current="page"] {
  background: #d8f0e2;
  color: #174630;
  box-shadow: inset 0 1px 0 #fbfffc;
}

.sidebar nav a>span {
  width: 22px;
  text-align: center;
  color: #438062;
  font: 600 1.31rem system-ui,sans-serif;
}

.sidebar nav b {
  margin-left: auto;
  background: #dcebd4;
  color: #28462d;
  border-radius: 20px;
  min-width: 22px;
  text-align: center;
  font-size: .75rem;
  padding: 1px 5px;
}

.workspace {
  min-width: 0;
}

.topbar {
  height: auto;
  background: #ffffff8c;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--gap-1) var(--page-gutter);
  color: var(--muted);
  font-size: .89rem;
  backdrop-filter: blur(14px);
  min-height: 56px;
  gap: var(--gap-2);
}

main {
  max-width: 1440px;
  margin: auto;
  padding: var(--gap-4) var(--page-gutter) 56px;
}

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(115deg, #f9fffb 9%, #e5f7eb 58%, #d1efdd 100%);
  border: 1px solid #cbe7d7;
  min-height: 156px;
  border-radius: 20px;
  padding: clamp(20px,3vw,36px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--gap-4);
  color: #233f2a;
  box-shadow: 0 8px 22px #3a775613, inset 0 1px 0 #fff;
}

.hero:before,.hero:after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -104px;
  bottom: -250px;
  width: 560px;
  height: 510px;
  border-radius: 46%;
  transform: rotate(-23deg);
  background: repeating-radial-gradient(ellipse at 47% 87%,transparent 0 19px,#4f85442a 20px 23px,transparent 24px 36px);
  pointer-events: none;
}

.hero:after {
  right: -184px;
  bottom: -145px;
  width: 340px;
  height: 330px;
  background: #d0f1e54d;
}

.hero p {
  margin: 7px 0 0;
  color: #47624a;
}

.hero h1,.heading h1 {
  font-size: clamp(1.65rem,3vw,2.5rem);
  letter-spacing: -.015em;
  line-height: 1.2;
  margin: 0;
  font-weight: 600;
}

.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: var(--gap-4);
}

.heading p,.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.section {
  margin-top: var(--gap-5);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--gap-2);
}

.section-head h2,.card h2 {
  margin: 0;
  font-size: 1.18rem;
}

.subtle,.muted {
  color: var(--muted);
  font-size: .88rem;
}

.sourcelink {
  font-weight: 600;
  font-size: .86rem;
  text-underline-offset: 3px;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid var(--line);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn:hover {
  border-color: #9cb19b;
  background: #f4f8f2;
}

.btn.primary {
  background: linear-gradient(135deg, #2b805a, #236c4b);
  color: white;
  border-color: var(--green);
  box-shadow: 0 4px 10px #2d855a2e;
}

.btn.primary:hover {
  background: #1b5e3e;
}

.btn.text {
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 5px 3px;
  min-height: 36px;
}

.btn.danger {
  color: var(--rust);
}

.btn.small {
  min-height: 36px;
  font-size: .85rem;
  padding: 5px 10px;
}

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

.grid {
  display: grid;
  gap: var(--gap-3);
}

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

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

.two {
  grid-template-columns: minmax(0,1.65fr) minmax(300px,1fr);
}

.card {
  background: #ffffffd6;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  padding: var(--card-padding);
  box-shadow: 0 6px 18px #486c5310, inset 0 1px 0 #fff;
}

.price .card-top {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.crop-mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--crop);
  display: inline-block;
  flex: 0 0 12px;
}

.price strong {
  font: 600 clamp(1.65rem,3vw,2.3rem)/1.02 var(--font);
  letter-spacing: -.045em;
}

.price h3 {
  font-size: 1rem;
  margin: 0;
}

.price .price-unit {
  font-size: .84rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 6px;
}

.price .price-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 11px;
  color: var(--muted);
  font-size: .82rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  padding: 3px 9px;
  background: var(--light);
  color: #235338;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}

.tag.warn {
  background: #f5ecdc;
  color: #69471e;
}

.tag.bad {
  background: #f8e6e0;
  color: #812e21;
}

.tag.neutral {
  background: #edf0ea;
  color: #50594b;
}

.metric small {
  display: block;
  color: var(--muted);
  font-size: .86rem;
}

.metric strong {
  font: 600 clamp(1.24rem,2.5vw,1.66rem)/1.35 var(--font);
  display: block;
  word-break: break-word;
  margin-top: 4px;
}

.metric strong.negative {
  color: var(--rust);
}

.chart-card {
  padding-bottom: 11px;
}

.chart-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.chart-card canvas {
  display: block;
  width: 100%;
  height: 225px;
  margin-top: 12px;
}

.chart-legend {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
  font-size: .85rem;
  margin-top: 12px;
}

.chart-legend span {
  display: flex;
  gap: 6px;
  align-items: center;
}

.card hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 15px 0;
}

.empty {
  padding: 24px 8px;
  text-align: center;
  color: var(--muted);
  font-size: .94rem;
}

.empty strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  margin-bottom: 3px;
}

.empty .btn {
  margin-top: 12px;
}

.rows {
  margin-top: 12px;
  display: grid;
}

.minirow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.minirow:last-child {
  border: 0;
}

.minirow>div {
  min-width: 0;
  flex: 1;
}

.minirow strong {
  display: block;
  overflow-wrap: anywhere;
}

.minirow small {
  display: block;
  color: var(--muted);
  font-size: .81rem;
}

.inline-alert {
  background: #faf1e4;
  border: 1px solid #e7d7b9;
  color: #63431f;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: .91rem;
  margin-bottom: 14px;
}

.section .inline-alert {
  margin-top: 12px;
}

.plot-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plot-card h2 {
  overflow-wrap: anywhere;
}

.plot-card .btn {
  align-self: flex-start;
}

.plot-summary {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.plot-summary b {
  display: block;
}

.progress {
  height: 7px;
  width: 100%;
  background: #e8eee5;
  border-radius: 20px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: #438351;
  border-radius: inherit;
}

.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filters input {
  flex: 0 1 265px;
}

select,input:not([type="checkbox"]),textarea {
  min-height: 42px;
  border: 1px solid #cfdacc;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 8px 11px;
  min-width: 0;
}

select {
  appearance: none;
  padding-right: 28px;
  background-image: linear-gradient(45deg,transparent 50%,#596b54 50%),linear-gradient(135deg,#596b54 50%,transparent 50%);
  background-position: calc(100% - 15px) 50%,calc(100% - 10px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

input[type="file"] {
  width: 100%;
  max-width: 100%;
}

table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  font-size: .9rem;
}

td,th {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: .85rem;
  background: #f6f9f4;
}

td.wrap {
  white-space: normal;
  min-width: 155px;
  overflow-wrap: anywhere;
}

tr:last-child td {
  border-bottom: 0;
}

.table {
  overflow: auto;
  padding: 0;
}

.align-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.muted-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  display: inline-block;
  margin-bottom: 10px;
}

.pill-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.thumbs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.thumbs img {
  width: 68px;
  height: 61px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
}

.photos img {
  width: 110px;
  height: 83px;
}

.report-month {
  display: grid;
  gap: 8px;
}

.report-month h3 {
  margin: 0;
}

.report-month p {
  margin: 0;
  color: var(--muted);
}

dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  max-width: min(565px,calc(100vw - 25px));
  width: 100%;
  max-height: calc(100dvh - 25px);
  padding: 21px;
  color: var(--ink);
  box-shadow: 0 18px 60px #121b163f;
  background: #fbfefc;
}

dialog::backdrop {
  background: #233c3166;
  backdrop-filter: blur(4px);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.dialog-head h2 {
  font-size: 1.28rem;
  margin: 0;
}

.dialog-head button {
  border: 0;
  background: #edf3ea;
  border-radius: 50%;
  width: 37px;
  height: 37px;
  color: var(--ink);
  font-size: 1.25rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: var(--gap-3);
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: .91rem;
  font-weight: 400;
}

.form-grid .wide {
  grid-column: 1/-1;
}

.form-grid textarea {
  min-height: 80px;
  resize: vertical;
}

.form-extra {
  display: contents;
}

.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  align-items: center;
}

.form-error {
  color: var(--rust);
  font-size: .89rem;
  margin: 10px 0 0;
}

.form-hint {
  font-size: .82rem;
  font-weight: 400;
  color: var(--muted);
}

#toast {
  position: fixed;
  bottom: 17px;
  right: 17px;
  z-index: 10;
  max-width: min(390px,calc(100vw - 34px));
  background: var(--forest);
  color: #fff;
  border-radius: 10px;
  padding: 11px 16px;
  box-shadow: 0 8px 25px #171e1745;
}

#toast:empty {
  display: none;
}

.loading {
  padding: 38px;
  color: var(--muted);
}

.compare-label {
  max-width: 260px;
}

.price-controls {
  align-items: flex-start;
}

.hero:before {
  background: repeating-radial-gradient(ellipse at 47% 87%, transparent 0 19px, #56a47c2a 20px 23px, transparent 24px 36px);
}

.bottom-nav {
  display: none;
}

.quick-menu, .feed {
  display: grid;
  gap: 10px;
}

.quick-menu .btn {
  justify-content: flex-start;
  min-height: 48px;
}

.feed-post header, .feed-date {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.feed-post header {
  justify-content: space-between;
}

.feed-post p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
  margin: 13px 0 5px;
}

.feed-gallery {
  gap: 8px;
}

.feed-gallery a {
  flex: 1 1 125px;
  max-width: 300px;
}

.feed-gallery img {
  width: 100%;
  height: clamp(115px, 23vw, 240px);
  object-fit: cover;
}

.feed-video {
  display: block;
  width: min(100%, 640px);
  max-height: 360px;
  aspect-ratio: 16/9;
  border-radius: 12px;
  background: #18352e;
  margin-top: 12px;
}

.label-gallery {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f1faf4;
}

.label-gallery .thumbs {
  margin-top: 0;
}

.label-gallery img {
  width: clamp(66px, 9vw, 112px);
  height: clamp(66px, 9vw, 112px);
  object-fit: contain;
  background: white;
}

.form-grid .check-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.form-grid .check-row input {
  accent-color: var(--green);
}

.brand-mark {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(155deg, #edfff3, #cef1da);
  border: 1px solid #d7efde;
}
.brand-mark img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.brand > span:last-child {
  min-width: 0;
}
.brand strong, .brand small {
  overflow-wrap: anywhere;
}
.topbar time {
  flex: 0 0 auto;
}
.price-note {
  margin: var(--gap-1) 0 0;
  color: var(--muted);
  font-size: .85rem;
}
.price-value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
}
.price .price-unit {
  margin-left: 0;
  white-space: nowrap;
}
.area-fields, .batch-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--gap-2);
  margin: 0;
}
.area-fields legend, .batch-item legend {
  padding: 0 var(--gap-1);
  font-weight: 600;
  font-size: .9rem;
}
.batch-items {
  display: grid;
  gap: var(--gap-3);
  margin-top: var(--gap-3);
}
.batch-details .form-grid {
  margin-top: var(--gap-2);
}
.batch-summary {
  font-weight: 600;
}
.product-results, .comparison-periods {
  display: grid;
  gap: var(--gap-1);
}
.product-results button {
  display: grid;
  grid-template-columns: 1fr auto 16px;
  align-items: center;
  text-align: left;
  gap: var(--gap-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4fbf7;
  color: var(--ink);
  padding: var(--gap-1) var(--gap-2);
  overflow-wrap: anywhere;
}
.product-results button:hover {
  background: #dff3e7;
}
.product-results small {
  color: var(--muted);
}
.product-results p {
  margin: 0;
}
.add-product, .remove-product {
  justify-self: start;
}
input::file-selector-button {
  font: inherit;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #eff8f2;
  color: var(--green);
  padding: 4px 10px;
  margin-right: var(--gap-1);
  cursor: pointer;
}
.chart-body {
  position: relative;
}
.chart-body canvas {
  touch-action: pan-y;
}
.chart-body canvas:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}
.chart-tooltip {
  z-index: 1;
  pointer-events: none;
  position: absolute;
  left: clamp(0px, var(--point-x), max(0px, 100% - 218px));
  inset-block-start: 8px;
  width: min(218px, 100%);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 5px 18px #264b3528;
  font-size: .82rem;
}
.chart-tooltip output {
  display: grid;
  gap: 4px;
}
.chart-tooltip output b {
  display: block;
}
.comparison-periods {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.compare-form {
  margin-bottom: var(--gap-3);
}
.compare-form .actions {
  margin-top: var(--gap-3);
}
.compare-results {
  display: grid;
  gap: var(--gap-3);
}
.survey-filter {
  min-width: min(100%, 165px);
}
@media (max-width: 1180px) {
  .four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .sidebar {
    height: auto;
    position: static;
    padding: var(--gap-2) var(--page-gutter);
    min-height: 60px;
    align-items: flex-start;
    justify-content: center;
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  
  .sidebar nav {
    display: none;
  }
  
  .layout { display: block; }
  .topbar { min-height: 38px; }
  main {
    padding-bottom: calc(107px + env(safe-area-inset-bottom));
  }
  .bottom-nav {
    position: fixed;
    z-index: 5;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1.1fr 1fr 1fr;
    align-items: center;
    min-height: 67px;
    border-top: 1px solid #d1e9dc;
    background: #f8fffbef;
    box-shadow: 0 -7px 28px #2a56461c;
    padding: 2px 6px max(3px, env(safe-area-inset-bottom));
    backdrop-filter: blur(20px);
  }
  .bottom-nav a, .bottom-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 0;
    margin: 0 3px;
    padding: 4px 1px;
    min-height: 50px;
    gap: 3px;
    background: transparent;
    color: #526c5f;
    text-decoration: none;
    line-height: 1.2;
    font-size: .73rem;
  }
  .bottom-nav a[aria-current="page"], .bottom-more.current {
    color: #1c6747;
    background: #e1f4e9;
  }
  .bottom-nav a>span, .bottom-more>span {
    font: 700 1.31rem/1 system-ui,sans-serif;
  }
  .bottom-add {
    place-self: center;
    width: 63px;
    height: 63px;
    display: grid;
    place-items: center;
    position: relative;
    margin-top: -24px;
    padding: 0;
    border-radius: 50%;
    border: 4px solid #fafffc;
    background: linear-gradient(150deg,#62b795,#277c56);
    color: #fff;
    box-shadow: 0 5px 14px #23684c4d;
    font: 400 2rem/1 system-ui,sans-serif;
  }
  .bottom-add span {
    transform: translateY(-2px);
  }
  #toast {
    bottom: calc(83px + env(safe-area-inset-bottom));
  }
}

@media(max-width: 520px) {
  .timeline-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
  }
  .timeline-table tbody, .timeline-table tr {
    display: block;
  }
  .timeline-table tr {
    display: grid;
    grid-template-columns: minmax(95px, .8fr) minmax(0, 1.25fr);
    align-items: start;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    gap: 4px 8px;
    white-space: normal;
  }
  .timeline-table tr:last-child {
    border: 0;
  }
  .timeline-table td {
    border: 0;
    padding: 0;
    min-width: 0;
    text-align: left;
  }
  .timeline-table td:nth-child(1) {grid-column: 1;grid-row: 1;}
  .timeline-table td:nth-child(2) {grid-column: 1;grid-row: 2;color: var(--muted);}
  .timeline-table td:nth-child(3) {grid-column: 2;grid-row: 1;}
  .timeline-table td:nth-child(4) {grid-column: 2;grid-row: 2;}
  .timeline-table td:nth-child(5) {grid-column: 2;grid-row: 3;}
  .timeline-table td:nth-child(6) {grid-column: 2;grid-row: 4;}
  .timeline-table td:nth-child(n+5):empty {display: none;}
  .timeline-table td:nth-child(6) .btn {margin-top: 2px;}
}

@media (max-width: 600px) {
  :root { --page-gutter: 16px; --gap-5: 24px; }
  .hero, .heading, .section-head, .chart-card header { flex-wrap: wrap; }
  .hero { gap: var(--gap-2); }
  .price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-1); }
  .price-grid .price { padding: var(--gap-1); }
  .price-grid .card-top { gap: 5px; }
  .price-grid .price-foot { font-size: .75rem; }
  .price-grid .tag { white-space: normal; }
  .three.plot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-card canvas { height: 205px; }
}
@media (max-width: 440px) {
  .form-grid, .three.plot-grid { grid-template-columns: 1fr; }
  .area-fields .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comparison-periods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-results button { grid-template-columns: 1fr 16px; }
  .product-results button small { grid-row: 2; }
  .product-results button span { grid-row: 1; grid-column: 2; }
}

.season-card h3 {
  display: flex;
  align-items: center;
  gap: var(--gap-1);
  margin: 0 0 var(--gap-2);
}
.season-card ul {
  margin: var(--gap-1) 0 var(--gap-2);
  padding-inline-start: var(--gap-4);
}
.season-card .subtle {
  margin: var(--gap-2) 0;
}
.season-details {
  margin-top: var(--gap-2);
}
.season-details > div {
  display: grid;
  grid-template-columns: 1fr auto;
  padding-block: 4px;
  column-gap: var(--gap-1);
}
.season-details small {
  color: var(--muted);
  grid-column: 1 / -1;
}
@media (max-width: 650px) {
  .season-grid { grid-template-columns: 1fr; }
}
