@font-face {
  font-family: "Bricolage";
  src: url("fonts/Bricolage-500-800-latin.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Albert Sans";
  src: url("fonts/AlbertSans-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Albert Sans";
  src: url("fonts/AlbertSans-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Albert Sans";
  src: url("fonts/AlbertSans-800-latin.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --rain: #DDEDE5;
  --rain-deep: #C7DFD4;
  --glass: #EDF6F1;
  --white: #FFFFFF;
  --ink: #173E36;
  --ink-soft: #48665E;
  --rule: #A8C4B8;
  --soil: #5A382E;
  --soil-light: #7A5041;
  --timber: #B8804F;
  --timber-light: #D5A66D;
  --leaf: #78A94D;
  --leaf-dark: #39733D;
  --marigold: #F3B83F;
  --marigold-soft: #FFE3A0;
  --beet: #A63F62;
  --label: #FFFBEF;
  --danger: #A33D34;
  --shadow: rgba(23, 62, 54, 0.16);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ad-pad: 0px;
  font-family: "Albert Sans", "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--rain);
  color: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--rain);
  color: var(--ink);
  overflow-x: hidden;
}

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

button,
select,
input[type="checkbox"] {
  cursor: pointer;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid var(--beet);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.app-shell {
  min-height: 100vh;
}

.side-rail {
  position: fixed;
  inset: 0 auto var(--ad-pad) 0;
  z-index: 20;
  display: flex;
  width: 244px;
  flex-direction: column;
  padding: calc(28px + var(--safe-top)) 22px calc(24px + var(--safe-bottom));
  background: var(--ink);
  color: white;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: block;
  width: 57px;
  height: 57px;
  flex: 0 0 auto;
}

.mark-ground {
  fill: var(--soil);
  stroke: var(--marigold);
  stroke-width: 2.8;
  stroke-linejoin: round;
}

.mark-edge {
  fill: var(--timber);
  stroke: var(--marigold);
  stroke-width: 2.8;
  stroke-linejoin: round;
}

.mark-plants path {
  fill: var(--leaf);
  stroke: #E9F6D9;
  stroke-width: 1.2;
  stroke-linejoin: round;
}

.brand-name {
  margin: 0;
  font-family: "Bricolage", sans-serif;
  font-size: 21px;
  font-weight: 750;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.brand-tag {
  margin: 8px 0 0;
  color: #B9D4C8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.rail-nav {
  display: grid;
  gap: 7px;
  margin-top: 54px;
}

.nav-button {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 10px 13px;
  border: 0;
  border-radius: 8px 18px 18px 8px;
  background: transparent;
  color: #CFE3DA;
  text-align: left;
  font-weight: 600;
}

.nav-button::before {
  position: absolute;
  left: -22px;
  width: 5px;
  height: 0;
  border-radius: 0 5px 5px 0;
  background: var(--marigold);
  content: "";
  transition: height 160ms ease;
}

.nav-button svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-button.is-active {
  background: rgba(255, 255, 255, 0.11);
  color: white;
}

.nav-button.is-active::before {
  height: 32px;
}

.nav-count,
.bottom-count {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--marigold);
  color: var(--ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.rail-foot {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: #B9D4C8;
  font-size: 11px;
  line-height: 1.45;
}

.rail-settings {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: white;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.rail-foot svg {
  width: 25px;
  fill: none;
  stroke: var(--marigold);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-foot p {
  margin: 0;
}

.rail-foot strong {
  color: white;
}

.mobile-header,
.bottom-nav {
  display: none;
}

.main-content {
  min-height: 100vh;
  margin-left: 244px;
  padding: 42px clamp(28px, 4vw, 70px) calc(56px + var(--ad-pad));
}

.view-panel {
  width: min(1420px, 100%);
  margin: 0 auto;
}

.view-panel[hidden],
.volume-panel[hidden] {
  display: none !important;
}

.view-heading {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-end;
  margin-bottom: 25px;
}

.view-heading h1 {
  margin: 0;
  font-family: "Bricolage", sans-serif;
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 740;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.view-heading p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.45;
}

.text-button,
.small-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.text-button {
  padding: 10px 3px;
}

.text-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.plan-workbench {
  display: grid;
  grid-template-columns: minmax(480px, 1.45fr) minmax(350px, 0.8fr);
  gap: clamp(25px, 3.2vw, 50px);
  align-items: start;
}

.visual-column,
.control-bench {
  min-width: 0;
}

.quantity-ribbon {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  min-height: 102px;
  padding: 18px 28px 18px 24px;
  background: var(--ink);
  color: white;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  box-shadow: 0 18px 30px var(--shadow);
}

.quantity-ribbon::after {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 22px;
  height: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.45);
  transform: rotate(45deg);
  content: "";
}

.quantity-main {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.quantity-main span:first-child {
  color: var(--marigold);
  font-family: "Bricolage", sans-serif;
  font-size: clamp(49px, 6vw, 76px);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.07em;
  font-variant-numeric: tabular-nums;
}

.quantity-main span:last-child {
  font-size: 15px;
  font-weight: 700;
}

.quantity-detail,
.quantity-area {
  display: grid;
  gap: 4px;
}

.quantity-detail {
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.quantity-detail strong,
.quantity-area strong {
  font-size: 16px;
}

.quantity-detail span,
.quantity-area span {
  color: #B9D4C8;
  font-size: 12px;
}

.quantity-area {
  text-align: right;
}

.drawing-board {
  position: relative;
  margin: -1px 18px 0;
  border: 1px solid var(--rule);
  border-top: 0;
  background-color: var(--glass);
  background-image:
    linear-gradient(rgba(23, 62, 54, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 62, 54, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  box-shadow: 0 16px 28px rgba(23, 62, 54, 0.08);
}

.board-tools {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 17px 19px 13px;
  border-bottom: 1px solid var(--rule);
  background: rgba(237, 246, 241, 0.92);
}

.board-tools > div {
  display: grid;
  gap: 2px;
}

.board-tools strong {
  font-size: 14px;
}

.board-tools span {
  color: var(--ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.draw-button {
  display: inline-flex;
  min-height: 39px;
  gap: 7px;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: var(--marigold);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.draw-button[aria-pressed="true"] {
  background: var(--beet);
  color: white;
}

.draw-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bed-stage-wrap {
  position: relative;
  min-height: 320px;
}

.bed-stage {
  display: block;
  width: 100%;
  height: auto;
  min-height: 320px;
  max-height: min(52vh, 560px);
  touch-action: pan-y;
  user-select: none;
}

.bed-stage.is-drawing {
  cursor: crosshair;
  touch-action: none;
}

.bed-stage .plot-border {
  fill: rgba(255, 255, 255, 0.22);
  stroke: var(--rule);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.bed-stage .bed-shadow {
  fill: rgba(23, 62, 54, 0.2);
}

.bed-stage .bed-timber {
  fill: var(--timber);
  stroke: var(--ink);
  stroke-width: 2.2;
}

.bed-stage .bed-timber-inner {
  fill: var(--soil);
  stroke: var(--timber-light);
  stroke-width: 6;
}

.bed-stage .timber-grain {
  fill: none;
  stroke: rgba(80, 45, 34, 0.5);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.bed-stage .row-guide {
  stroke: rgba(243, 184, 63, 0.52);
  stroke-width: 1.6;
  stroke-dasharray: 5 5;
}

.bed-stage .plant-leaf-a {
  fill: #91C761;
  stroke: #224D34;
  stroke-width: 0.45;
}

.bed-stage .plant-leaf-b {
  fill: #70B24D;
  stroke: #224D34;
  stroke-width: 0.45;
}

.bed-stage .plant-heart {
  fill: var(--marigold);
  stroke: #224D34;
  stroke-width: 0.7;
}

.bed-stage .stagger-ring {
  fill: none;
  stroke: var(--beet);
  stroke-width: 0.8;
  opacity: 0.7;
}

.bed-stage .dimension-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.bed-stage .dimension-text {
  fill: var(--ink);
  font-family: "Albert Sans", sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-anchor: middle;
}

.bed-stage .sample-note {
  fill: var(--ink-soft);
  font-family: "Albert Sans", sans-serif;
  font-size: 11px;
  text-anchor: end;
}

.bed-stage .draw-ghost {
  fill: rgba(243, 184, 63, 0.28);
  stroke: var(--beet);
  stroke-width: 3;
  stroke-dasharray: 9 6;
}

.draw-instruction {
  position: absolute;
  left: 50%;
  top: 18px;
  z-index: 3;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 30px);
  padding: 8px 12px;
  border-radius: 20px;
  background: var(--beet);
  color: white;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 5px 15px rgba(61, 28, 40, 0.25);
  pointer-events: none;
}

.board-caption {
  min-height: 39px;
  margin: 0;
  padding: 10px 19px 13px;
  border-top: 1px solid var(--rule);
  background: rgba(237, 246, 241, 0.92);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.35;
}

.control-bench,
.volume-controls,
.label-form-column {
  background: rgba(237, 246, 241, 0.54);
  border-top: 5px solid var(--ink);
}

.control-section,
.label-form,
.label-list-section {
  padding: 22px 23px;
  border-bottom: 1px solid var(--rule);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-family: "Bricolage", sans-serif;
  font-size: 20px;
  font-weight: 720;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.35;
}

.section-symbol {
  color: var(--beet);
  font-family: "Bricolage", sans-serif;
  font-size: 25px;
  font-weight: 800;
}

.section-leaf {
  width: 34px;
  height: 34px;
  fill: var(--leaf);
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.field-wide {
  width: 100%;
}

.field-pair,
.field-triple {
  display: grid;
  gap: 12px;
}

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

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

.field + .field,
.field-wide + .field-pair,
.field-pair + .field,
.field-pair + .field-pair,
.field-group-label + .field-pair,
.field-pair + .field-group-label {
  margin-top: 13px;
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 9px 11px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.field input::placeholder {
  color: #789087;
  font-weight: 400;
}

.field input:focus,
.field select:focus {
  border-color: var(--beet);
  background: white;
}

.input-with-unit {
  position: relative;
  display: block;
}

.input-with-unit input {
  padding-right: 45px;
}

.input-with-unit b {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.pattern-fieldset {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.pattern-fieldset legend {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.pattern-picker,
.shape-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pattern-option,
.shape-picker button {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 9px;
  align-items: center;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.62);
  text-align: left;
}

.pattern-option[aria-pressed="true"],
.shape-picker button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--marigold-soft);
  box-shadow: inset 0 -3px 0 var(--marigold);
}

.pattern-option > span:last-child {
  display: grid;
  gap: 2px;
}

.pattern-option strong {
  font-size: 12px;
}

.pattern-option small {
  color: var(--ink-soft);
  font-size: 9px;
}

.pattern-icon {
  position: relative;
  display: block;
  width: 38px;
  height: 36px;
  border: 1px solid var(--timber);
  background: var(--soil);
}

.pattern-icon i {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid #224D34;
  border-radius: 50%;
  background: var(--leaf);
}

.pattern-icon i:nth-child(1) { left: 5px; top: 5px; }
.pattern-icon i:nth-child(2) { left: 15px; top: 5px; }
.pattern-icon i:nth-child(3) { left: 25px; top: 5px; }
.pattern-icon i:nth-child(4) { left: 5px; top: 22px; }
.pattern-icon i:nth-child(5) { left: 15px; top: 22px; }
.pattern-icon i:nth-child(6) { left: 25px; top: 22px; }
.stagger-icon i:nth-child(4) { left: 10px; }
.stagger-icon i:nth-child(5) { left: 20px; }
.stagger-icon i:nth-child(6) { display: none; }

.spacing-fields {
  margin-top: 14px;
}

.fine-tune {
  margin-top: 14px;
  border-top: 1px dashed var(--rule);
}

.fine-tune summary {
  padding: 13px 0 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.fine-tune summary::-webkit-details-marker {
  display: none;
}

.fine-tune summary::before {
  display: inline-block;
  margin-right: 7px;
  color: var(--beet);
  content: "+";
  font-size: 16px;
  font-weight: 800;
}

.fine-tune[open] summary::before {
  content: "−";
}

.fine-tune-content {
  padding: 8px 0 1px;
}

.fine-tune-content .field {
  max-width: 190px;
}

.check-field {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--beet);
}

.inline-message {
  margin: 13px 23px 0;
  padding: 11px 13px;
  border-left: 4px solid var(--danger);
  background: #F9E3DE;
  color: #6C2A24;
  font-size: 12px;
  line-height: 1.4;
}

.primary-action,
.print-action {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  width: calc(100% - 46px);
  min-height: 52px;
  margin: 20px 23px 23px;
  padding: 12px 16px;
  border: 1px solid var(--ink);
  border-radius: 6px 18px 6px 6px;
  background: var(--ink);
  color: white;
  font-weight: 800;
  text-align: left;
  box-shadow: 5px 5px 0 var(--marigold);
}

.primary-action svg,
.print-action svg {
  width: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(620px, 100%);
  margin: 0 0 24px;
  border-bottom: 2px solid var(--ink);
}

.mode-switch button {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 9px;
  align-items: center;
  min-height: 49px;
  padding: 10px 15px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
}

.mode-switch button::after {
  position: absolute;
  inset: auto 0 -2px;
  height: 5px;
  background: transparent;
  content: "";
}

.mode-switch button[aria-pressed="true"] {
  color: var(--ink);
}

.mode-switch button[aria-pressed="true"]::after {
  background: var(--marigold);
}

.mode-switch svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.volume-panel {
  display: grid;
  grid-template-columns: minmax(450px, 1.2fr) minmax(350px, 0.8fr);
  gap: clamp(25px, 3.2vw, 50px);
  align-items: start;
}

.volume-visual {
  position: sticky;
  top: 30px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  background-color: var(--glass);
  background-image:
    linear-gradient(rgba(23, 62, 54, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 62, 54, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  box-shadow: 0 16px 28px rgba(23, 62, 54, 0.08);
}

.volume-result {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 20px;
  align-items: end;
  padding: 22px 24px;
  background: var(--ink);
  color: white;
}

.volume-result > span {
  color: #B9D4C8;
  font-size: 12px;
  font-weight: 700;
}

.volume-result > strong {
  grid-row: span 2;
  font-family: "Bricolage", sans-serif;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 0.9;
  letter-spacing: -0.055em;
  color: var(--marigold);
  font-variant-numeric: tabular-nums;
}

.volume-result > strong b {
  font-weight: 800;
}

.volume-result p {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0;
  font-size: 12px;
}

.volume-result p i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--marigold);
}

.volume-visual > svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 280px;
}

.cutaway-back {
  fill: var(--timber-light);
  stroke: var(--ink);
  stroke-width: 3;
}

.cutaway-soil {
  fill: var(--soil);
  stroke: var(--ink);
  stroke-width: 2;
}

.cutaway-soil-specks {
  fill: url("#soilSpecks");
  color: var(--timber-light);
  opacity: 0.55;
}

#soilSpecks circle {
  fill: var(--timber-light);
}

.cutaway-front {
  fill: var(--timber);
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linejoin: round;
}

.depth-line {
  fill: none;
  stroke: var(--beet);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.depth-text {
  fill: var(--beet);
  font-family: "Albert Sans", sans-serif;
  font-size: 16px;
  font-weight: 800;
}

.cutaway-seedlings path {
  fill: var(--leaf);
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linejoin: round;
}

.order-section {
  background: rgba(255, 251, 239, 0.6);
}

.worked-line {
  margin-top: 18px;
  padding: 12px 0 6px;
  border-top: 1px dashed var(--rule);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.micro-copy {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.shape-picker {
  margin-bottom: 17px;
}

.shape-picker button {
  grid-template-columns: 34px 1fr;
  font-size: 12px;
  font-weight: 700;
}

.round-pot-mini,
.box-pot-mini {
  position: relative;
  display: block;
  width: 29px;
  height: 25px;
  border: 2px solid var(--ink);
  background: var(--timber-light);
}

.round-pot-mini {
  border-radius: 50% 50% 37% 37%;
  clip-path: polygon(0 10%, 100% 10%, 82% 100%, 18% 100%);
}

.box-pot-mini {
  clip-path: polygon(0 10%, 100% 10%, 88% 100%, 12% 100%);
}

.field-group-label {
  margin: 9px 0 0;
  color: var(--beet);
  font-size: 11px;
  font-weight: 800;
}

.pot-shell {
  fill: var(--timber);
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linejoin: round;
}

.pot-soil {
  fill: var(--soil);
  stroke: var(--ink);
  stroke-width: 3;
}

.pot-fill-line {
  fill: none;
  stroke: var(--marigold);
  stroke-width: 4;
  stroke-dasharray: 8 6;
}

.pot-measure {
  fill: none;
  stroke: var(--beet);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pot-text {
  fill: var(--beet);
  font-family: "Albert Sans", sans-serif;
  font-size: 15px;
  font-weight: 800;
}

.pot-leaf {
  fill: var(--leaf);
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linejoin: round;
}

.label-total {
  display: grid;
  flex: 0 0 auto;
  text-align: right;
}

.label-total strong {
  color: var(--beet);
  font-family: "Bricolage", sans-serif;
  font-size: 42px;
  line-height: 0.85;
  font-weight: 800;
}

.label-total span {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.labels-workbench {
  display: grid;
  grid-template-columns: minmax(360px, 0.76fr) minmax(460px, 1.24fr);
  gap: clamp(25px, 3.2vw, 50px);
  align-items: start;
}

.label-stick-icon {
  width: 32px;
  fill: var(--label);
  stroke: var(--beet);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.label-form .primary-action {
  width: 100%;
  margin: 21px 0 4px;
}

.copies-field {
  width: 110px;
  margin-top: 13px;
}

.label-form .inline-message {
  margin: 13px 0 0;
}

.label-list-section {
  padding-bottom: 13px;
}

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

.empty-labels {
  padding: 17px 0 9px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.label-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px dashed var(--rule);
}

.label-row:first-child {
  border-top-style: solid;
}

.label-row > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.label-row strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-row span {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-row-actions {
  display: flex;
  gap: 5px;
}

.label-row-actions button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: white;
}

.label-row-actions button:last-child {
  color: var(--danger);
}

.label-row-actions svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sheet-column {
  min-width: 0;
}

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

.sheet-toolbar > div:first-child {
  display: grid;
  gap: 2px;
}

.sheet-toolbar strong {
  font-size: 13px;
}

.sheet-toolbar span {
  color: var(--ink-soft);
  font-size: 10px;
}

.compact-segment {
  display: flex;
  border: 1px solid var(--ink);
  border-radius: 20px;
  overflow: hidden;
}

.compact-segment button {
  min-height: 35px;
  padding: 6px 13px;
  border: 0;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.compact-segment button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}

.sheet-preview-wrap {
  display: grid;
  min-height: 570px;
  place-items: center;
  padding: 28px;
  background-color: var(--rain-deep);
  background-image:
    linear-gradient(rgba(23, 62, 54, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 62, 54, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  border: 1px solid var(--rule);
}

.sheet-preview {
  display: grid;
  width: min(100%, 430px);
  aspect-ratio: 210 / 297;
  align-content: start;
  gap: 0;
  padding: 7.3% 7.1%;
  background: white;
  box-shadow: 0 15px 28px rgba(23, 62, 54, 0.2);
}

.sheet-preview.garden-format {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(7, 1fr);
}

.sheet-preview.large-format {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(5, 1fr);
  padding: 9.5%;
}

.preview-label,
.preview-empty {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px dashed #9A9A8F;
  background: var(--label);
}

.preview-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7% 9%;
}

.preview-label::before {
  position: absolute;
  right: 7%;
  top: 10%;
  width: 11px;
  height: 17px;
  border-radius: 100% 0 100% 0;
  background: var(--leaf);
  transform: rotate(-18deg);
  content: "";
}

.preview-label strong {
  max-width: 82%;
  overflow: hidden;
  color: var(--ink);
  font-family: "Bricolage", sans-serif;
  font-size: clamp(5px, 1.3vw, 11px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-label em {
  max-width: 85%;
  overflow: hidden;
  margin-top: 3px;
  color: var(--beet);
  font-size: clamp(4px, 0.85vw, 8px);
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-label span {
  max-width: 90%;
  overflow: hidden;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: clamp(3px, 0.72vw, 7px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-empty {
  background: rgba(255, 255, 255, 0.68);
}

.print-action {
  width: 100%;
  margin: 16px 0 0;
  justify-content: flex-start;
  border-radius: 6px;
  box-shadow: 5px 5px 0 var(--beet);
}

.print-action > span {
  display: grid;
  gap: 2px;
}

.print-action small {
  color: #B9D4C8;
  font-size: 10px;
  font-weight: 500;
}

.local-note {
  display: flex;
  justify-content: center;
  gap: 7px;
  align-items: center;
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.local-note svg {
  width: 18px;
  fill: none;
  stroke: var(--leaf-dark);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast {
  position: fixed;
  left: calc(50% + 122px);
  bottom: calc(25px + var(--ad-pad));
  z-index: 100;
  width: max-content;
  max-width: min(420px, calc(100vw - 40px));
  padding: 11px 15px;
  border-radius: 7px;
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(23, 62, 54, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.settings-dialog {
  width: min(470px, calc(100vw - 28px));
  max-height: calc(100vh - 32px - var(--ad-pad));
  padding: 0;
  border: 0;
  border-radius: 24px 8px 24px 8px;
  background: transparent;
  color: var(--ink);
  box-shadow: 0 26px 70px rgba(23, 62, 54, 0.35);
}

.settings-dialog::backdrop {
  background: rgba(13, 40, 34, 0.62);
  backdrop-filter: blur(4px);
}

.settings-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 26px;
  background: var(--glass);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--white);
  font-size: 24px;
  line-height: 1;
}

.settings-heading {
  display: flex;
  gap: 13px;
  align-items: center;
  padding-right: 38px;
}

.settings-heading p,
.settings-heading h2,
.ad-free-card p,
.settings-note {
  margin: 0;
}

.settings-heading p {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.settings-heading h2 {
  font-family: "Bricolage", sans-serif;
  font-size: 29px;
  letter-spacing: -0.035em;
}

.settings-leaf {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 18px 5px 18px 5px;
  background: var(--ink);
  color: var(--marigold);
  font-size: 28px;
}

.ad-free-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: 7px 20px 7px 20px;
  background: var(--white);
}

.ad-free-card strong {
  font-family: "Bricolage", sans-serif;
  font-size: 19px;
}

.ad-free-card p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.settings-primary {
  min-height: 46px;
  padding: 10px 15px;
  border: 0;
  border-radius: 5px 15px 5px 15px;
  background: var(--beet);
  color: white;
  font-weight: 800;
}

.settings-primary span {
  margin-left: 5px;
  color: var(--marigold-soft);
}

.settings-link {
  justify-self: center;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
}

.settings-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--white);
}

.settings-list > * {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 47px;
  padding: 9px 14px;
  border: 0;
  border-bottom: 1px solid var(--rain-deep);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.settings-list > *:last-child {
  border-bottom: 0;
}

.settings-list b {
  color: var(--beet);
  font-size: 11px;
}

.settings-note {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1180px) {
  .side-rail {
    width: 210px;
    padding-inline: 18px;
  }

  .main-content {
    margin-left: 210px;
    padding-inline: 26px;
  }

  .plan-workbench,
  .volume-panel {
    grid-template-columns: minmax(410px, 1.15fr) minmax(320px, 0.85fr);
    gap: 24px;
  }

  .labels-workbench {
    grid-template-columns: minmax(330px, 0.85fr) minmax(400px, 1.15fr);
    gap: 24px;
  }

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

@media (max-width: 860px) {
  .side-rail,
  .desktop-only {
    display: none;
  }

  .app-shell {
    padding-top: calc(66px + var(--safe-top));
    padding-bottom: calc(78px + var(--safe-bottom) + var(--ad-pad));
  }

  .mobile-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: calc(66px + var(--safe-top));
    padding: var(--safe-top) 16px 0;
    border-bottom: 1px solid var(--rule);
    background: rgba(221, 237, 229, 0.96);
    backdrop-filter: blur(12px);
  }

  .mobile-header-actions {
    display: flex;
    gap: 7px;
  }

  .mobile-brand {
    display: flex;
    gap: 9px;
    align-items: center;
  }

  .mobile-brand .brand-mark {
    width: 43px;
    height: 43px;
  }

  .mobile-brand > div {
    display: grid;
    gap: 1px;
  }

  .mobile-brand strong {
    font-family: "Bricolage", sans-serif;
    font-size: 17px;
    line-height: 1;
    letter-spacing: -0.035em;
  }

  .mobile-brand span {
    color: var(--ink-soft);
    font-size: 9px;
    font-weight: 700;
  }

  .icon-button {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--ink);
    border-radius: 50%;
    background: transparent;
  }

  .icon-button svg {
    width: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .bottom-nav {
    position: fixed;
    inset: auto 0 var(--ad-pad);
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: calc(70px + var(--safe-bottom));
    padding: 5px 8px var(--safe-bottom);
    border-top: 1px solid var(--rule);
    background: rgba(237, 246, 241, 0.97);
    backdrop-filter: blur(14px);
  }

  .bottom-nav button {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 1px;
    align-content: center;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    font-size: 9px;
    font-weight: 700;
  }

  .bottom-nav button::before {
    position: absolute;
    top: 0;
    width: 0;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: var(--beet);
    content: "";
    transition: width 150ms ease;
  }

  .bottom-nav button.is-active {
    color: var(--ink);
  }

  .bottom-nav button.is-active::before {
    width: 36px;
  }

  .bottom-nav svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .bottom-count {
    position: absolute;
    left: calc(50% + 9px);
    top: 5px;
    min-width: 18px;
    height: 18px;
    font-size: 9px;
  }

  .main-content {
    min-height: 0;
    margin: 0;
    padding: 21px 15px 28px;
  }

  .view-heading {
    margin-bottom: 19px;
  }

  .view-heading h1 {
    font-size: clamp(31px, 10vw, 45px);
  }

  .view-heading p {
    margin-top: 7px;
    font-size: 12px;
  }

  .plan-workbench,
  .volume-panel,
  .labels-workbench {
    display: block;
  }

  .control-bench,
  .volume-controls,
  .label-form-column {
    margin-top: 22px;
  }

  .drawing-board {
    margin-inline: 7px;
  }

  .quantity-ribbon {
    min-height: 86px;
    padding: 16px 20px 15px 17px;
    gap: 12px;
  }

  .quantity-main {
    display: grid;
    gap: 0;
  }

  .quantity-main span:first-child {
    font-size: 50px;
  }

  .quantity-main span:last-child {
    font-size: 10px;
  }

  .quantity-detail {
    padding-left: 12px;
  }

  .quantity-detail strong,
  .quantity-area strong {
    font-size: 12px;
  }

  .quantity-detail span,
  .quantity-area span {
    font-size: 9px;
  }

  .bed-stage-wrap {
    min-height: 240px;
  }

  .bed-stage {
    min-height: 240px;
  }

  .volume-visual {
    position: static;
  }

  .volume-visual > svg {
    min-height: 230px;
  }

  .sheet-column {
    margin-top: 26px;
  }

  .sheet-preview-wrap {
    min-height: 0;
    padding: 20px;
  }

  .toast {
    left: 50%;
    bottom: calc(87px + var(--safe-bottom) + var(--ad-pad));
  }

  .settings-card {
    padding: 22px 18px;
  }
}

@media (max-width: 430px) {
  .main-content {
    padding-inline: 12px;
  }

  .view-heading {
    align-items: start;
  }

  .view-heading h1 {
    font-size: 34px;
  }

  .label-total strong {
    font-size: 34px;
  }

  .board-tools {
    padding-inline: 13px;
  }

  .board-tools strong {
    font-size: 12px;
  }

  .draw-button {
    padding-inline: 10px;
  }

  .control-section,
  .label-form,
  .label-list-section {
    padding: 19px 16px;
  }

  .inline-message {
    margin-inline: 16px;
  }

  .primary-action {
    width: calc(100% - 32px);
    margin-inline: 16px;
  }

  .label-form .primary-action {
    width: 100%;
    margin-inline: 0;
  }

  .pattern-option {
    grid-template-columns: 35px 1fr;
    padding-inline: 7px;
  }

  .pattern-icon {
    width: 33px;
  }

  .pattern-icon i:nth-child(3),
  .pattern-icon i:nth-child(6) {
    display: none;
  }

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

  .volume-result {
    padding: 17px;
    gap: 4px 10px;
  }

  .volume-result > strong {
    font-size: 39px;
  }

  .volume-result p {
    gap: 5px;
    font-size: 9px;
  }

  .sheet-toolbar {
    align-items: end;
  }

  .compact-segment button {
    padding-inline: 10px;
  }
}

.legal-page {
  min-height: 100vh;
  padding: 32px 16px 60px;
  background:
    radial-gradient(circle at 12% 7%, rgba(243, 184, 63, 0.32), transparent 24rem),
    var(--rain);
}

.legal-wrap {
  width: min(760px, 100%);
  margin: 0 auto;
}

.legal-brand {
  display: inline-block;
  margin: 0 0 18px;
  color: var(--ink);
  font-family: "Bricolage", sans-serif;
  font-weight: 800;
  text-decoration: none;
}

.legal-card {
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--rule);
  border-radius: 8px 32px 8px 32px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 60px var(--shadow);
}

.legal-card h1,
.legal-card h2 {
  font-family: "Bricolage", sans-serif;
}

.legal-card h1 {
  margin: 4px 0 8px;
  font-size: clamp(42px, 9vw, 66px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.legal-card h2 {
  margin: 30px 0 8px;
  font-size: 21px;
}

.legal-card p,
.legal-card li {
  color: var(--ink-soft);
  line-height: 1.65;
}

.legal-card a {
  color: var(--beet);
  font-weight: 700;
}

.legal-eyebrow {
  margin: 0;
  color: var(--beet) !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.legal-stamp {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 11px;
  border-radius: 4px 12px 4px 12px;
  background: var(--ink);
  color: white;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

@media (max-width: 345px) {
  .quantity-area {
    display: none;
  }

  .quantity-ribbon {
    grid-template-columns: auto 1fr;
  }

  .field-pair,
  .field-triple {
    grid-template-columns: 1fr;
  }

  .pattern-picker,
  .shape-picker {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
