/* Garden planner (/garden-planner). Tokens (--ink, --moss, --soil, …) and fonts come from styles.css. */

.pl-app {
  --pl-text: #2F3A31;
  --pl-muted: #5A6358;
  --pl-label: #5A5540;
  --pl-eyebrow: #6A6450;
  --pl-line: rgba(19, 32, 26, .12);
  --pl-chip: #E3E8DF;
  --pl-frost-bg: #E6ECF1;
  --pl-icon-bg: #EEF1E6;
  --pl-date-bg: #F4EAD2;
  --pl-sun: #B4852C;
  --pl-pale: #D6C5A2;
  --pl-count: #F3E9D2;
  --pl-ready-ink: #3D2708;
  --pl-light: #F1F4EE;
  --pl-focus-light: #F6E7B8;
  --pl-sticky: 16px;
  color: var(--ink);
  font-family: var(--sans, "Atkinson Hyperlegible Next", system-ui, sans-serif);
  background: var(--dawn);
}

.pl-app [hidden] { display: none !important; }

.pl-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:where(.pl-app) button { font: inherit; color: inherit; cursor: pointer; }
:where(.pl-app) button:disabled { cursor: default; opacity: .5; }
.pl-app :focus-visible { outline: 3px solid var(--moss); outline-offset: 3px; }
.pl-app svg { flex-shrink: 0; }

.pl-title,
.pl-library-title,
.pl-card-name,
.pl-jobs-title,
.pl-summary-month,
.pl-step-month,
.pl-job-day,
.pl-dialog-title,
.pl-sheet-title {
  font-family: var(--display, "Bricolage Grotesque", system-ui, sans-serif);
  font-stretch: 88%;
  font-optical-sizing: auto;
  font-weight: 460;
  letter-spacing: -.02em;
}

/* ---- Top: title, place chips, ZIP and print ---- */

.pl-top {
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px 32px 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 10px;
}

.pl-title { margin: 0 14px 0 0; font-size: 34px; line-height: 1; }

.pl-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.15;
  margin: 0;
}
.pl-chip.is-frost { background: var(--pl-frost-bg); color: var(--frost-ink); }

.pl-zip {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 52px;
  box-sizing: border-box;
  padding: 4px 4px 4px 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(19, 32, 26, .16);
}
.pl-zip:focus-within { box-shadow: inset 0 0 0 2px var(--moss); }
.pl-zip-input {
  width: 130px;
  min-width: 0;
  height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  font: 500 16px/1 var(--sans, sans-serif);
  color: var(--ink);
}
.pl-zip-input:focus-visible { outline: none; }
.pl-zip-input::placeholder, .pl-search-input::placeholder { color: #5F6B62; }
.pl-zip-btn {
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--pl-light);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}
.pl-zip-btn:hover { background: var(--moss-deep); }
.pl-zip-msg { flex-basis: 100%; margin: 0; font-size: 15px; line-height: 1.4; color: var(--pl-text); text-align: right; }
.pl-zip-msg:empty { display: none; }

.pl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}
.pl-btn.is-outline { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(19, 32, 26, .4); }
.pl-btn.is-outline:hover { background: rgba(19, 32, 26, .06); }
.pl-btn.is-dark { background: var(--ink); color: var(--pl-light); }
.pl-btn.is-dark:hover { background: var(--moss-deep); }
.pl-btn.is-ghost { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(19, 32, 26, .3); }

.pl-text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pl-text);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}
.pl-text-btn:hover { background: rgba(19, 32, 26, .07); }
.pl-text-btn.is-moss { color: var(--moss); }
.pl-text-btn.is-tomato { color: var(--tomato); }

.pl-icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.pl-icon-btn:hover { background: rgba(19, 32, 26, .07); }

/* ---- Layout: library, bed, details ---- */

.pl-layout {
  max-width: 1440px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 18px 32px 40px;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

/* ---- Library ---- */

.pl-library {
  position: sticky;
  top: var(--pl-sticky);
  max-height: calc(100vh - 2 * var(--pl-sticky));
  max-height: calc(100dvh - 2 * var(--pl-sticky));
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.pl-library-title { margin: 0; font-size: 34px; line-height: 1; }

.pl-library-panel { display: flex; flex-direction: column; gap: 14px; min-height: 0; flex: 1; }

.pl-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0 14px;
  border-radius: 14px;
  background: #fff;
  color: #4E5A51;
  box-shadow: inset 0 0 0 1.5px rgba(19, 32, 26, .14);
}
.pl-search:focus-within { box-shadow: inset 0 0 0 2px var(--moss); }
.pl-search-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  font: 500 16px/1 var(--sans, sans-serif);
  color: var(--ink);
}
.pl-search-input:focus-visible { outline: none; }

.pl-filters { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
.pl-filter {
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--pl-chip);
  color: var(--pl-text);
  font-weight: 700;
  font-size: 14px;
  position: relative;
  transition: background .2s, color .2s;
}
.pl-filter::after { content: ""; position: absolute; inset: -4px 0; }
.pl-filter:hover { background: #D7DED2; }
.pl-filter[aria-pressed="true"] { background: var(--ink); color: var(--pl-light); }

.pl-crops {
  position: relative;
  margin: 4px -8px 0 0;
  padding: 0 8px 8px 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  scrollbar-width: thin;
}

.pl-crop {
  position: relative;
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 4px 6px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  transition: background .2s;
}
.pl-crop:hover { background: rgba(19, 32, 26, .06); }
.pl-crop[aria-pressed="true"] { background: var(--ink); color: var(--pl-light); }
.pl-crop-img { flex-shrink: 0; width: 38px; height: 38px; }
.pl-crop-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pl-crop-name { font-weight: 700; font-size: 16px; line-height: 1.1; }
.pl-crop-hint, .pl-crop-n { font-weight: 500; font-size: 13px; line-height: 1.15; color: var(--pl-muted); }
.pl-crop-hint { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.pl-crop-n { font-weight: 700; white-space: nowrap; }
.pl-crop[aria-pressed="true"] .pl-crop-hint, .pl-crop[aria-pressed="true"] .pl-crop-n { color: #C9D5CC; }

.pl-none { margin: 6px 6px 0; font-size: 15px; color: var(--pl-text); }

/* ---- Bed bar: tabs and tools ---- */

.pl-main { min-width: 0; display: flex; flex-direction: column; }

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

.pl-tabs {
  display: flex;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 3px;
  margin: -3px;
}
.pl-tabs::-webkit-scrollbar { display: none; }

.pl-tab {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pl-text);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.pl-tab:hover { background: rgba(19, 32, 26, .07); }
.pl-tab[aria-selected="true"] { background: var(--ink); color: var(--pl-light); }

.pl-bedtools { display: flex; align-items: center; gap: 2px; }

.pl-sun {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--brown-ink);
  white-space: nowrap;
}
.pl-sun svg { color: var(--pl-sun); }

/* ---- The bed ---- */

.pl-bedpanel { display: flex; flex-direction: column; }

.pl-bedwrap {
  --pl-sq: 168px;
  position: relative;
  box-sizing: border-box;
  width: min(100%, 700px, calc(var(--cols, 4) * (var(--pl-sq) + 5px) + 41px));
  margin: 18px auto 0;
}

.pl-frame {
  box-sizing: border-box;
  width: 100%;
  padding: 18px;
  border-radius: 8px;
  background: var(--wood) repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 13px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), inset 0 -6px 0 rgba(0, 0, 0, .16), 0 50px 70px -45px rgba(70, 48, 20, .75);
  overflow-x: auto;
  scrollbar-width: thin;
}

.pl-grid {
  box-sizing: border-box;
  min-width: calc(var(--cols, 4) * 53px + 5px);
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
  background: var(--twine);
}

.pl-row { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(48px, 1fr)); gap: 5px; }

.pl-cell { min-width: 0; }

.pl-sq {
  container-type: inline-size;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--soil) radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .08), transparent 65%);
  overflow: hidden;
  transition: box-shadow .25s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.pl-sq:hover { box-shadow: inset 0 0 0 2px rgba(246, 231, 184, .6); }
.pl-app .pl-sq:focus-visible { outline: 4px solid var(--pl-focus-light); outline-offset: -4px; box-shadow: inset 0 0 0 7px rgba(62, 45, 32, .9); }

.pl-n {
  position: absolute;
  left: 6.5cqi;
  top: 5.6cqi;
  font-weight: 700;
  font-size: clamp(11px, 8cqi, 14px);
  line-height: 1;
  color: var(--pl-count);
}

.pl-dots {
  position: absolute;
  inset: 16cqi 6cqi 6cqi;
  display: grid;
  grid-template-columns: repeat(var(--k), var(--s));
  grid-auto-rows: var(--s);
  gap: var(--g);
  align-content: center;
  justify-content: center;
}
.pl-dots.is-n1 { --k: 1; --s: 70cqi; --g: 0px; }
.pl-dots.is-n2 { --k: 2; --s: 36cqi; --g: 6cqi; }
.pl-dots.is-n2 > :nth-child(2) { grid-column: 2; grid-row: 2; }
.pl-dots.is-n4 { --k: 2; --s: 35cqi; --g: 5.6cqi; }
.pl-dots.is-n8 { --k: 4; --s: 19cqi; --g: 2.6cqi; }
.pl-dots.is-n9 { --k: 3; --s: 23cqi; --g: 3.6cqi; }
.pl-dots.is-n16 { --k: 4; --s: 17.5cqi; --g: 2.5cqi; }

.pl-plant { display: block; width: var(--s); height: var(--s); object-fit: contain; user-select: none; -webkit-user-drag: none; }
.pl-sq.is-young .pl-plant { transform: scale(.66); transform-origin: 50% 100%; }

.pl-badge {
  position: absolute;
  right: 5cqi;
  top: 4.4cqi;
  padding: .38em .7em;
  border-radius: 999px;
  background: var(--ready);
  color: var(--pl-ready-ink);
  font-weight: 700;
  font-size: clamp(10px, 7.5cqi, 13px);
  line-height: 1;
}

.pl-ghost {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6cqi;
  padding: 0 4cqi;
  text-align: center;
}
.pl-ghost-img { width: 36cqi; height: 36cqi; opacity: .32; filter: grayscale(.85); }
.pl-ghost-text { font-weight: 700; font-size: clamp(11px, 8.75cqi, 15px); line-height: 1.15; color: var(--pl-pale); }

.pl-add {
  position: absolute;
  inset: 7.5cqi;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5cqi;
  padding: 4px;
  border: 2px dashed rgba(214, 197, 162, .5);
  border-radius: 10px;
  color: var(--pl-pale);
  font-weight: 700;
  font-size: clamp(11px, 8.75cqi, 14px);
  line-height: 1.15;
  text-align: center;
}
.pl-add svg { width: max(14px, 13.5cqi); height: max(14px, 13.5cqi); }
.pl-sq:hover .pl-add { border-color: rgba(246, 231, 184, .8); color: var(--pl-focus-light); }

@container (max-width: 90px) {
  .pl-add-text { display: none; }
  .pl-add { border-radius: 6px; }
}
@container (max-width: 76px) {
  .pl-badge { width: 10px; height: 10px; padding: 0; font-size: 0; }
}

.pl-north {
  position: absolute;
  right: -40px;
  top: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  color: var(--brown-ink);
}
.pl-north svg { transition: transform .3s; }
.pl-north.is-rotated svg { transform: rotate(90deg); }

@keyframes pl-pop {
  0% { transform: scale(.55); opacity: 0; }
  70% { transform: scale(1.06); opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.pl-app .is-pop { animation: pl-pop .55s cubic-bezier(.2, .7, .2, 1) both; }

/* ---- Phone: the crop in hand, above the season ---- */

.pl-brushbar { display: none; }

/* ---- The season: play, months, summary ---- */

.pl-season {
  width: min(100%, 700px);
  margin: 22px auto 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.pl-play {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(19, 32, 26, .5);
  border-radius: 50%;
  background: transparent;
}
.pl-play:hover { background: rgba(19, 32, 26, .06); }
.pl-play .pl-icon-pause, .pl-play.is-playing .pl-icon-play { display: none; }
.pl-play.is-playing .pl-icon-pause { display: block; }

.pl-months {
  position: relative;
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 3px;
}

.pl-month {
  position: relative;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pl-text);
  font-weight: 700;
  font-size: 15px;
  transition: background .2s, color .2s;
}
.pl-month:hover { background: rgba(19, 32, 26, .08); }
.pl-month[aria-checked="true"] { background: var(--ink); color: var(--pl-light); }
.pl-month.is-today::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--moss);
}
.pl-month.is-today[aria-checked="true"]::after { background: var(--ready); }

.pl-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 2px;
  background: rgba(19, 32, 26, .14);
}
.pl-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--fill, 0%);
  border-radius: 2px;
  background: var(--moss);
  transition: width .5s;
}

.pl-stepper, .pl-ticks { display: none; }
.pl-app.is-rare .pl-season, .pl-app.is-rare .pl-ticks, .pl-app.is-rare .pl-summary-month { display: none; }

.pl-summary {
  width: min(100%, 700px);
  margin: 26px auto 0;
  font-size: 18px;
  line-height: 1.4;
  color: var(--pl-text);
}
.pl-summary-month { margin-right: 6px; font-size: 26px; font-weight: 520; line-height: 1; color: var(--ink); }

/* ---- Details: the crop card and the jobs ---- */

.pl-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.pl-card {
  padding: 22px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 30px 60px -44px rgba(70, 48, 20, .6);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pl-card-head { display: flex; align-items: center; gap: 14px; }
.pl-card-icon {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--pl-icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pl-card-img { width: 58px; height: 58px; }
.pl-card-titles { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pl-eyebrow { font-weight: 700; font-size: 13px; line-height: 1; letter-spacing: .08em; text-transform: uppercase; color: var(--pl-eyebrow); }
.pl-card-name { margin: 0; font-size: 36px; line-height: .95; overflow-wrap: anywhere; }

.pl-kv { margin: 0; display: flex; flex-direction: column; border-top: 1.5px solid var(--pl-line); }
.pl-row-kv { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1.5px solid var(--pl-line); }
.pl-row-kv dt { white-space: nowrap; font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--pl-label); }
.pl-row-kv dd { margin: 0; text-align: right; font-weight: 700; font-size: 15px; line-height: 1.35; }

.pl-card-note { margin: 0; font-size: 15px; line-height: 1.4; color: var(--pl-label); }

.pl-friends-wrap { display: flex; flex-direction: column; gap: 9px; }
.pl-friends-title { font-weight: 600; font-size: 15px; line-height: 1; color: var(--pl-label); }
.pl-friends { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-friend {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 5px 12px 5px 6px;
  border: 0;
  border-radius: 999px;
  background: var(--pl-icon-bg);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
}
.pl-friend.is-here { background: var(--sage-light); }
.pl-friend:hover { background: #DDE6D5; }
.pl-friend img { width: 30px; height: 30px; }
.pl-friend svg { color: var(--moss); }

.pl-card-link { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; margin: -6px 0; color: var(--ink); font-weight: 700; font-size: 15px; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.pl-card-link:hover { color: var(--moss); }

.pl-hint { margin: 0; display: flex; align-items: center; gap: 9px; font-weight: 500; font-size: 14px; line-height: 1.4; color: var(--pl-label); }

.pl-jobs {
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(19, 32, 26, .08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pl-jobs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pl-jobs-title { margin: 0; font-size: 26px; line-height: 1; }
.pl-jobs-label { font-weight: 600; font-size: 13px; line-height: 1; color: var(--pl-eyebrow); white-space: nowrap; }

.pl-job-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.pl-job { position: relative; display: flex; align-items: center; gap: 12px; }
.pl-job-date {
  flex-shrink: 0;
  width: 48px;
  height: 50px;
  border-radius: 11px;
  background: var(--pl-date-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.pl-job-mon { font-weight: 700; font-size: 11px; line-height: 1; letter-spacing: .1em; color: var(--tomato); }
.pl-job-day { font-size: 22px; line-height: 1; font-weight: 520; }
.pl-job-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-weight: 700; font-size: 15px; line-height: 1.3; }
.pl-job-note { font-weight: 500; font-size: 14px; line-height: 1.35; color: var(--pl-label); }
.pl-job-img { flex-shrink: 0; width: 36px; height: 36px; }
.pl-jobs-empty { margin: 0; font-size: 15px; line-height: 1.4; color: var(--pl-label); }

.pl-ics-btn { margin-top: 4px; width: 100%; }
.pl-ics-msg { margin: 0; font-size: 14px; line-height: 1.4; color: var(--pl-label); }
.pl-ics-msg:empty { display: none; }

.pl-noscript { max-width: 700px; margin: 24px auto; padding: 0 20px; font-size: 18px; }

/* ---- Dialogs: add or edit a bed, and the phone crop sheet ---- */

.pl-dialog, .pl-sheet {
  box-sizing: border-box;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: var(--card-2);
  box-shadow: 0 40px 80px -30px rgba(19, 32, 26, .55);
}
.pl-dialog::backdrop, .pl-sheet::backdrop { background: rgba(19, 32, 26, .45); }

.pl-dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 32px); border-radius: 24px; }
.pl-dialog-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 22px 22px; }
.pl-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-right: -10px; }
.pl-dialog-title, .pl-sheet-title { margin: 0; font-size: 30px; line-height: 1.05; }

.pl-label { display: block; margin: 6px 0 0; padding: 0; font-weight: 700; font-size: 15px; color: var(--pl-label); }
.pl-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(19, 32, 26, .18);
  font: 500 16px/1 var(--sans, sans-serif);
  color: var(--ink);
}
.pl-input:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--moss); }

.pl-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pl-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-choices.is-stack { flex-direction: column; align-items: flex-start; }
.pl-choice { position: relative; display: inline-flex; cursor: pointer; }
.pl-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pl-choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--pl-chip);
  font-weight: 700;
  font-size: 15px;
  color: var(--pl-text);
}
.pl-choice input:checked + span { background: var(--ink); color: var(--pl-light); }
.pl-choice input:focus-visible + span { outline: 3px solid var(--moss); outline-offset: 2px; }

.pl-custom { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pl-custom-field { font-weight: 700; font-size: 15px; color: var(--pl-label); }
.pl-num { width: 84px; }
.pl-times { font-weight: 700; color: var(--pl-label); }

.pl-dialog-note { margin: 2px 0 0; min-height: 1.4em; font-size: 15px; line-height: 1.4; color: var(--pl-label); }
.pl-dialog-extra { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 -14px; }
.pl-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.pl-sheet {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: 100%;
  height: min(86dvh, 720px);
  max-height: 100dvh;
  margin: 0;
  border-radius: 24px 24px 0 0;
  background: var(--dawn);
}
.pl-sheet[open] { display: flex; flex-direction: column; }
.pl-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 6px 20px; }
.pl-sheet-title { font-size: 28px; }
.pl-sheet-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 16px; }
.pl-sheet-body .pl-library-panel { flex: 1; min-height: 0; }
.pl-sheet-body .pl-crops { padding-bottom: max(16px, env(safe-area-inset-bottom)); }

/* ---- Tablet: library and bed side by side, details below the bed ---- */

@media (max-width: 1179px) {
  .pl-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 24px; padding: 16px 24px 36px; }
  .pl-top { padding: 20px 24px 4px; }
  .pl-library { grid-row: span 2; }
  .pl-side { grid-column: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
  .pl-bedwrap { margin-top: 34px; }
  .pl-north { right: 2px; top: -28px; flex-direction: row; gap: 4px; }
}

/* ---- Phone: bed first, the library in a bottom sheet ---- */

@media (max-width: 759px) {
  .pl-top {
    padding: 16px 16px 2px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }
  .pl-title { font-size: 30px; margin: 0; align-self: center; }
  .pl-print-btn { grid-column: 2; grid-row: 1; padding: 0 14px; min-height: 44px; }
  .pl-print-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pl-chip { grid-column: 1 / -1; justify-self: start; font-size: 14px; min-height: 36px; padding: 0 12px; }
  .pl-zip { grid-column: 1 / -1; margin: 0; }
  .pl-zip-input { flex: 1; width: auto; }
  .pl-zip-msg { grid-column: 1 / -1; text-align: left; }

  .pl-layout { display: flex; flex-direction: column; align-items: stretch; gap: 22px; padding: 14px 16px 32px; }
  .pl-library { display: none; }

  .pl-bedbar { gap: 4px 6px; }
  .pl-tabs { flex: 1 1 100%; }
  .pl-tab { padding: 0 15px; font-size: 14px; }
  .pl-bedtools { margin-left: -10px; }
  .pl-text-btn { padding: 0 10px; font-size: 14px; }
  .pl-sun { margin-left: auto; font-size: 13px; gap: 6px; }

  .pl-bedwrap { --pl-sq: 160px; width: min(100%, calc(var(--cols, 4) * (var(--pl-sq) + 4px) + 28px)); margin-top: 34px; }
  .pl-frame { padding: 12px; }
  .pl-grid { gap: 4px; padding: 4px; min-width: calc(var(--cols, 4) * 52px + 4px); }
  .pl-row { gap: 4px; grid-template-columns: repeat(var(--cols, 4), minmax(48px, 1fr)); }

  .pl-brushbar {
    position: sticky;
    bottom: 10px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 8px 8px 8px 10px;
    border-radius: 999px;
    background: var(--card-2);
    box-shadow: 0 16px 34px -16px rgba(19, 32, 26, .55), inset 0 0 0 1.5px rgba(19, 32, 26, .08);
  }
  .pl-brush-img { width: 40px; height: 40px; flex-shrink: 0; }
  .pl-brush-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
  .pl-brush-name { font-weight: 700; font-size: 17px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pl-brush-btn { min-height: 44px; padding: 0 16px; }

  .pl-season { margin-top: 18px; gap: 10px; }
  .pl-months { display: none; }
  .pl-stepper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    border-radius: 999px;
    background: rgba(255, 252, 244, .75);
  }
  .pl-step { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; }
  .pl-step:hover { background: rgba(19, 32, 26, .07); }
  .pl-step-month { font-size: 26px; line-height: 1; font-weight: 520; }
  .pl-ticks { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; width: min(100%, 700px); box-sizing: border-box; margin: 12px auto 0; padding-left: 58px; }
  .pl-tick { height: 4px; border-radius: 2px; background: rgba(19, 32, 26, .14); }
  .pl-tick.is-on { background: var(--moss); }
  .pl-summary { margin-top: 16px; font-size: 17px; }
  .pl-summary-month { font-size: 22px; }

  .pl-side { display: flex; flex-direction: column; align-items: stretch; grid-column: auto; }
  .pl-card-name { font-size: 32px; }
  .pl-card-icon { width: 64px; height: 64px; }
  .pl-card-img { width: 52px; height: 52px; }

  .pl-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: 92dvh; }
  .pl-dialog-body { padding-bottom: max(22px, env(safe-area-inset-bottom)); }
}

@media (max-width: 359px) {
  .pl-chip { font-size: 13px; }
  .pl-zip-btn { padding: 0 12px; }
  .pl-sun { display: none; }
  .pl-brush-btn { padding: 0 14px; }
  .pl-brush-btn svg { display: none; }
}

@media (hover: none) {
  .pl-sq:hover { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pl-app *, .pl-app *::before, .pl-app *::after { animation: none !important; transition: none !important; }
}

/* ---- Print: only the plan ---- */

.pl-print { display: none; }

@media print {
  @page { margin: 12mm; }
  body > :not(main) { display: none !important; }
  main { padding: 0 !important; margin: 0 !important; }
  .pl-app { display: none !important; }
  .pl-print { display: block; color: #000; font: 10pt/1.35 var(--sans, sans-serif); }
  .pp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; border-bottom: 1.5pt solid #000; padding-bottom: 6pt; margin-bottom: 10pt; }
  .pp-head h2 { margin: 0; font: 600 20pt/1 var(--display, sans-serif); }
  .pp-head p { margin: 0; }
  .pp-site { margin-left: auto !important; color: #444; }
  .pp-bed { break-inside: avoid; margin-bottom: 12pt; }
  .pp-bed h3 { margin: 0 0 6pt; font-size: 12pt; }
  .pp-bed h3 span { font-weight: 400; color: #444; }
  .pp-grid { display: grid; gap: 0; border: 1.5pt solid #6b5236; width: max-content; max-width: 100%; }
  .pp-sq { width: 20mm; height: 20mm; box-sizing: border-box; border: .5pt solid #b49a74; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1mm; position: relative; text-align: center; }
  .pp-sq img { width: 9mm; height: 9mm; }
  .pp-name { font-size: 7pt; line-height: 1.05; padding: 0 1mm; }
  .pp-n { position: absolute; left: 1mm; top: .5mm; font-size: 6.5pt; color: #555; }
  .pp-cols-1 { grid-template-columns: repeat(1, 20mm); }
  .pp-cols-2 { grid-template-columns: repeat(2, 20mm); }
  .pp-cols-3 { grid-template-columns: repeat(3, 20mm); }
  .pp-cols-4 { grid-template-columns: repeat(4, 20mm); }
  .pp-cols-5 { grid-template-columns: repeat(5, 20mm); }
  .pp-cols-6 { grid-template-columns: repeat(6, 20mm); }
  .pp-cols-7 { grid-template-columns: repeat(7, 20mm); }
  .pp-cols-8 { grid-template-columns: repeat(8, 20mm); }
  .pp-cols-9 { grid-template-columns: repeat(9, 18mm); }
  .pp-cols-10 { grid-template-columns: repeat(10, 16.5mm); }
  .pp-cols-11 { grid-template-columns: repeat(11, 15mm); }
  .pp-cols-12 { grid-template-columns: repeat(12, 14mm); }
  .pp-cols-9 .pp-sq { width: 18mm; height: 18mm; }
  .pp-cols-10 .pp-sq { width: 16.5mm; height: 16.5mm; }
  .pp-cols-11 .pp-sq { width: 15mm; height: 15mm; }
  .pp-cols-12 .pp-sq { width: 14mm; height: 14mm; }
  .pp-table { width: 100%; margin-top: 6pt; border-collapse: collapse; font-size: 9pt; }
  .pp-table th, .pp-table td { padding: 2.5pt 5pt; border-bottom: .5pt solid #999; text-align: left; vertical-align: top; }
  .pp-table thead th { border-bottom: 1pt solid #000; font-weight: 700; }
  .pp-note { margin: 4pt 0 0; color: #444; }
  .pp-jobs h3 { margin: 4pt 0 6pt; font-size: 12pt; break-after: avoid; }
  .pp-months { columns: 2; column-gap: 10mm; }
  .pp-month { break-inside: avoid; margin-bottom: 6pt; }
  .pp-month h4 { margin: 0 0 2pt; font-size: 10pt; }
  .pp-month ul { margin: 0; padding: 0; list-style: none; }
  .pp-date { display: inline-block; min-width: 13mm; font-weight: 700; }
  .pp-job-note { color: #444; }
}
