
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg:#10150f;
  --panel:#192018;
  --panel2:#20291d;
  --line:#3e4a38;
  --lime:#c5f576;
  --white:#ecf0df;
  --muted:#a1ad94;
  --gold:#edc77b;
  --red:#ed8973
}
* {
  box-sizing:border-box
}
html {
  scroll-behavior:smooth
}
body {
  margin:0;
  background:radial-gradient(ellipse at 55% -20%,#304528 0%,transparent 60%),var(--bg);
  color:var(--white);
  font-family:'Space Grotesk',sans-serif
}
button,input {
  font:inherit
}
button {
  cursor:pointer
}
button:disabled {
  cursor:not-allowed;
  opacity:.4
}
.wrap {
  max-width:1500px;
  margin:auto;
  padding:0 24px
}
header {
  border-bottom:1px solid var(--line);
  background:#11170fdd;
  position:sticky;
  top:0;
  z-index:10;
  backdrop-filter:blur(15px)
}
header .wrap {
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:69px;
  gap:20px
}
.logo {
  font-weight:700;
  letter-spacing:-1.4px;
  font-size:21px
}
.logo b {
  color:var(--lime)
}
.navmeta {
  font:11px 'DM Mono',monospace;
  letter-spacing:1.2px;
  color:var(--muted);
  text-transform:uppercase
}
.pill {
  border:1px solid var(--line);
  padding:9px 13px;
  border-radius:50px;
  color:var(--lime)
}
.hero {
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:22px;
  padding:58px 0 37px;
  border-bottom:1px solid var(--line)
}
.eyebrow {
  color:var(--lime);
  font:12px 'DM Mono',monospace;
  letter-spacing:2px;
  text-transform:uppercase
}
h1 {
  font-size:clamp(55px,8.8vw,132px);
  letter-spacing:-.09em;
  margin:9px 0 12px;
  line-height:.85;
  font-weight:700
}
h1 em {
  font-style:normal;
  color:var(--lime)
}
.hero p {
  font-size:16px;
  color:var(--muted);
  max-width:510px;
  line-height:1.6;
  margin:20px 0 0
}
.hero-right {
  text-align:right;
  min-width:185px;
  color:var(--muted);
  font:11px 'DM Mono',monospace;
  line-height:2
}
.main-grid {
  display:grid;
  grid-template-columns:minmax(0,1.12fr) minmax(360px,.88fr);
  gap:20px;
  padding-top:24px
}
.panel {
  background:linear-gradient(145deg,#1c251a,#151d15);
  border:1px solid var(--line);
  border-radius:13px;
  padding:23px
}
.sectionhead {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:15px
}
.sectionhead h2 {
  font-size:17px;
  letter-spacing:-.5px;
  margin:0
}
.tiny {
  font:10px 'DM Mono',monospace;
  color:var(--muted);
  letter-spacing:.5px;
  text-transform:uppercase
}
.controls {
  display:flex;
  gap:9px;
  margin-bottom:15px
}
.search {
  flex:1;
  min-width:0;
  padding:12px 14px;
  background:#0e140e;
  color:var(--white);
  border:1px solid var(--line);
  border-radius:7px;
  font-size:13px;
  outline:none
}
.search:focus {
  border-color:var(--lime)
}
.jar:disabled {
  opacity:.4;
  cursor:not-allowed;
  filter:grayscale(.5)
}
#stockfilter {
  max-width:145px;
  min-width:100px
}
 .smallbtn {
  background:#273222;
  color:var(--white);
  border:1px solid var(--line);
  padding:10px 13px;
  border-radius:7px;
  font-size:12px
}
.strains {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  max-height:532px;
  overflow:auto;
  scrollbar-color:#485a3c transparent;
  padding-right:3px
}
.jar {
  border:1px solid #42503b;
  background:linear-gradient(150deg,#263323,#182219);
  min-height:158px;
  border-radius:10px;
  position:relative;
  overflow:hidden;
  text-align:left;
  color:var(--white);
  padding:12px;
  touch-action:manipulation;
  user-select:none;
  -webkit-user-select:none
}
.jar:focus-visible,.jar:hover {
  border-color:var(--lime)
}
.jar:active,.jar.pouring {
  background:#34472a
}
.jar:before {
  content:'';
  position:absolute;
  inset:auto -20px -42px 20px;
  height:113px;
  border-radius:50%;
  background:radial-gradient(circle,var(--bud),transparent 67%);
  opacity:.52
}
.jar .number {
  font:10px 'DM Mono',monospace;
  color:var(--muted);
  position:relative
}
.bud {
  height:56px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  filter:drop-shadow(0 5px 10px #0007)
}
.bud svg {
  width:69px;
  height:61px
}
.jarname {
  font-weight:700;
  line-height:1.06;
  font-size:15px;
  position:relative;
  min-height:32px
}
.jardetail {
  font:10px 'DM Mono',monospace;
  color:var(--muted);
  margin-top:7px;
  position:relative
}
.hint {
  color:var(--muted);
  font-size:12px;
  margin:13px 0 0
}
.bench {
  display:flex;
  flex-direction:column;
  gap:20px
}
.tray {
  min-height:267px;
  border:1px solid #4a5840;
  border-radius:11px;
  background:radial-gradient(ellipse at center,#323d2e,#0d130e 75%);
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex-direction:column;
  padding:25px
}
.tray:after {
  content:'';
  pointer-events:none;
  position:absolute;
  inset:12px;
  border:1px solid #54634c;
  border-radius:50%;
  transform:scaleY(.69);
  box-shadow:inset 0 0 30px #000a
}
.tray-visual {
  display:flex;
  gap:5px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  max-width:320px;
  min-height:70px;
  position:relative;
  z-index:1
}
.particle {
  display:inline-block;
  border-radius:50% 40% 60% 43%;
  transform:rotate(20deg);
  width:19px;
  height:16px;
  box-shadow:inset -4px -4px 8px #0007,0 3px 3px #0007
}
.empty {
  color:#829578;
  font:12px 'DM Mono',monospace;
  z-index:1
}
.tray-caption {
  z-index:1;
  margin-top:20px;
  color:var(--muted);
  font:11px 'DM Mono',monospace;
  text-align:center
}
.meter {
  height:8px;
  border:1px solid #4b6044;
  border-radius:10px;
  overflow:hidden;
  background:#0d130e;
  margin:12px 0 7px
}
.meterfill {
  width:0%;
  height:100%;
  background:linear-gradient(90deg,#678f3e,var(--lime));
  transition:width .2s
}
.statline {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  font:12px 'DM Mono',monospace
}
.statline span {
  color:var(--muted)
}
.recipe {
  margin-top:15px;
  min-height:74px;
  border-top:1px solid var(--line);
  padding-top:13px;
  display:flex;
  align-items:flex-start;
  gap:7px;
  flex-wrap:wrap
}
.chip {
  border:1px solid #52654a;
  background:#2b3925;
  border-radius:30px;
  padding:7px 10px;
  font:11px 'DM Mono',monospace;
  color:var(--white)
}
.chip button {
  background:transparent;
  border:0;
  color:var(--red);
  font-size:14px;
  padding:0 0 0 5px
}
.actions {
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px
}
.primary {
  padding:17px;
  background:var(--lime);
  color:#10160b;
  border:0;
  border-radius:8px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:1px
}
.secondary {
  border:1px solid var(--line);
  background:#283323;
  color:var(--white);
  border-radius:8px;
  padding:14px 19px
}
.presets {
  display:flex;
  gap:7px;
  flex-wrap:wrap
}
.presets .smallbtn {
  font:11px 'DM Mono',monospace
}
.vault {
  margin:20px 0 60px
}
.vaultgrid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px
}
.vaultitem {
  border:1px solid var(--line);
  border-radius:9px;
  padding:16px;
  background:#202a1c;
  min-height:160px
}
.vaultitem strong {
  display:block;
  font-size:17px;
  margin:10px 0 5px
}
.vaultitem small {
  font:10px 'DM Mono',monospace;
  color:var(--muted);
  display:block;
  line-height:1.6
}
.vaultbuttons {
  display:flex;
  gap:6px;
  margin-top:15px;
  flex-wrap:wrap
}
.vaultbuttons button {
  border:1px solid var(--line);
  border-radius:4px;
  padding:7px 9px;
  color:var(--white);
  background:#35432d;
  font-size:11px
}
.vaultbuttons .delete {
  color:var(--red)
}
.stamp {
  font:10px 'DM Mono',monospace;
  color:var(--lime);
  letter-spacing:1px
}
.foot {
  padding:0 0 32px;
  color:var(--muted);
  font:11px 'DM Mono',monospace;
  line-height:1.7
}
.modalback {
  position:fixed;
  inset:0;
  background:#070a06d9;
  z-index:30;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  backdrop-filter:blur(9px)
}
.modalback.show {
  display:flex
}
.result {
  width:min(520px,100%);
  border:1px solid #78975c;
  background:radial-gradient(ellipse at 50% 0%,#31452a,#161f16 70%);
  border-radius:16px;
  padding:30px;
  text-align:center;
  box-shadow:0 20px 110px #000b
}
.result-icon {
  font-size:73px;
  margin:10px 0 17px
}
.result h2 {
  font-size:clamp(29px,6vw,47px);
  letter-spacing:-2px;
  margin:8px 0
}
.result p {
  color:var(--muted);
  line-height:1.55;
  font-size:13px
}
.traitgrid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
  margin:20px 0
}
.trait {
  border:1px solid var(--line);
  background:#10180f;
  border-radius:7px;
  padding:13px 4px
}
.trait b {
  display:block;
  font-size:19px;
  color:var(--lime)
}
.trait span {
  color:var(--muted);
  font:9px 'DM Mono',monospace;
  text-transform:uppercase
}
.result input {
  width:100%;
  padding:13px;
  background:#0d150d;
  border:1px solid #64775b;
  border-radius:6px;
  color:var(--white);
  margin:0 0 12px;
  text-align:center
}
.result .modalactions {
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px
}
.note {
  font-size:10px!important;
  color:#8c9984!important
}
.toast {
  position:fixed;
  bottom:25px;
  left:50%;
  transform:translateX(-50%);
  background:var(--lime);
  color:#10160b;
  padding:11px 18px;
  border-radius:7px;
  z-index:50;
  font-weight:700;
  font-size:12px;
  display:none;
  white-space:nowrap
}
.toast.show {
  display:block
}
@media(max-width:930px) {
  .main-grid {
    grid-template-columns:1fr
  }
  .bench {
    display:contents
  }
  .main-grid>.panel:first-child {
    order:2
  }
  .main-grid>.panel:last-child {
    order:1
  }
  .vaultgrid {
    grid-template-columns:repeat(2,1fr)
  }
  
}
@media(max-width:600px) {
  .controls {
    flex-wrap:wrap
  }
  .controls .search {
    flex-basis:100%
  }
  #stockfilter {
    flex:1;
    max-width:none
  }
  .wrap {
    padding:0 13px
  }
  header .wrap {
    height:60px
  }
  .logo {
    font-size:17px
  }
  .navmeta {
    font-size:9px
  }
  .navmeta.hidden-sm {
    display:none
  }
  .hero {
    padding:38px 0 25px
  }
  .hero-right {
    display:none
  }
  .hero p {
    font-size:13px
  }
  .panel {
    padding:14px
  }
  .strains {
    grid-template-columns:repeat(2,minmax(0,1fr));
    max-height:430px
  }
  .jar {
    min-height:145px
  }
  .vaultgrid {
    grid-template-columns:1fr 1fr
  }
  .result {
    padding:20px
  }
  .vaultitem {
    padding:11px
  }
  
}


/* V4: a composition bar, not a capacity indicator. */
.meter  {
   height: 19px;
   border-radius: 5px;
   background: #0d130e;
   
}

.meterfill  {
   display: flex;
   overflow: hidden;
   background: none;
   transition: width .2s;
   
}

.blend-segment  {
   height: 100%;
   min-width: 0;
   box-shadow: inset -1px 0 0 #0c110c99;
   transition: width .2s;
   
}



/* V5 — compact above-the-fold splicing workstation.
   Keeps the library and splicing rules unchanged. */
.hero {
  padding: 14px 0 15px;
  align-items: center;
  gap: 16px;
}
.hero h1 {
  font-size: clamp(45px, 5.15vw, 74px);
  letter-spacing: -.075em;
  line-height: .88;
  margin: 5px 0 4px;
}
.hero p {
  font-size: 12px;
  line-height: 1.35;
  max-width: 690px;
  margin: 6px 0 0;
}
.hero-right { line-height: 1.5; }
.eyebrow { font-size: 10px; }
.main-grid { padding-top: 12px; gap: 12px; }

/* On desktops, the entire active workstation is viewport-bound.
   Only the strain catalog scrolls internally; the vault remains below. */
@media (min-width: 931px) and (min-height: 560px) {
  header .wrap { height: 56px; }
  .hero { height: 112px; }
  .main-grid {
    height: calc(100dvh - 56px - 112px - 12px);
    min-height: 0;
    align-items: stretch;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
  }
  .main-grid > .panel {
    min-height: 0;
    height: 100%;
    padding: 14px;
    display: flex;
    flex-direction: column;
  }
  .main-grid .sectionhead { margin-bottom: 9px; flex-shrink: 0; }
  .main-grid .controls { margin-bottom: 9px; flex-shrink: 0; }
  .main-grid .search { padding: 9px 12px; }
  .main-grid .smallbtn { padding: 8px 10px; }
  .main-grid .strains {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
    overflow-y: auto;
    align-content: start;
    gap: 8px;
  }
  .main-grid .jar { min-height: 125px; padding: 9px; }
  .main-grid .bud { height: 45px; }
  .main-grid .bud svg { width: 55px; height: 47px; }
  .main-grid .jarname { font-size: 13px; min-height: 28px; }
  .main-grid .jardetail { margin-top: 4px; font-size: 9px; }
  .main-grid .hint { font-size: 10px; line-height: 1.3; margin-top: 8px; flex-shrink: 0; }
  .main-grid .tray { min-height: 90px; flex: 1 1 auto; padding: 10px; }
  .main-grid .tray-visual { min-height: 36px; }
  .main-grid .tray-caption { margin-top: 8px; }
  .main-grid .particle { width: 15px; height: 13px; }
  .main-grid .meter { flex: 0 0 15px; height: 15px; margin: 9px 0 6px; }
  .main-grid .statline { font-size: 11px; flex-shrink: 0; }
  .main-grid .recipe {
    min-height: 47px;
    margin-top: 9px;
    padding-top: 8px;
    align-content: flex-start;
    overflow-y: auto;
    flex: 0 1 auto;
  }
  .main-grid .chip { padding: 5px 8px; font-size: 10px; }
  .main-grid .actions { flex-shrink: 0; }
  .main-grid .primary { padding: 12px; }
  .main-grid .secondary { padding: 10px 13px; }
  .main-grid .actions + div { margin-top: 10px !important; flex-shrink: 0; }
  .main-grid .actions + div .sectionhead { margin-bottom: 7px; }
  .main-grid .presets { gap: 6px; }
  .vault { margin-top: 16px; }
}
@media (max-width: 930px) {
  .hero { padding: 17px 0 15px; }
  .hero h1 { font-size: clamp(44px, 7vw, 72px); }
  .main-grid { padding-top: 12px; }
  /* On narrow screens place the splicer above the long catalog. */
  .main-grid > .panel:nth-child(2) { grid-row: 1; }
  .main-grid > .panel:nth-child(1) { grid-row: 2; }
  .tray { min-height: 190px; }
}
@media (max-width: 600px) {
  .hero { padding: 13px 0; }
  .hero h1 { font-size: clamp(40px, 11vw, 60px); }
  .hero p { font-size: 11px; line-height: 1.3; }
  .tray { min-height: 165px; }
  .recipe { min-height: 50px; }
}

/* V8: progressive illustrated garden replaces the particle tray. */
.tray.garden-tray, .main-grid .tray {
  padding:0;
  border:1px solid #64734d;
  background:#eab72a;
  border-radius:10px;
  overflow:hidden;
  display:block;
  position:relative;
  isolation:isolate;
}
.tray:after { display:none; }
.grow-scene {position:absolute;inset:0;overflow:hidden;background:#e8ac22;}
.grow-image {
  width:100%;height:100%;display:block;object-fit:cover;
  object-position:center 62%;
}
.grow-overlay {
  position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,transparent 60%,rgba(12,22,14,.75) 100%);
}
.grow-stage,.grow-scene .tray-caption {
  position:absolute;z-index:2;bottom:12px;
  color:#fff0c8;font:10px 'DM Mono',monospace;
  letter-spacing:.07em;text-shadow:0 1px 5px #000;
  margin:0;
}
.grow-stage {left:14px;max-width:52%;}
.grow-scene .tray-caption {right:14px;max-width:46%;text-align:right;}
@media (min-width:931px) and (min-height:560px){
  .main-grid .tray {min-height:175px;flex:1 1 auto;padding:0;}
}
@media (max-width:930px){
  .tray {height:clamp(245px,48vw,470px);min-height:245px;}
}
@media (max-width:600px){
  .tray {height:clamp(215px,58vw,310px);min-height:215px;}
  .grow-stage,.grow-scene .tray-caption {font-size:9px;bottom:10px;}
}


/* V9 — fixed geometry: adding strain chips must not resize the garden. */
.hero {
  min-width: 0;
  overflow: visible;
}
.hero-main {
  display:flex;
  align-items:center;
  gap: clamp(16px, 2.8vw, 48px);
  flex:1 1 auto;
  min-width:0;
}
.hero-title {
  flex:0 0 auto;
  min-width:0;
}
.hero .eyebrow {
  margin:0 0 4px;
  line-height:1.3;
}
.hero h1 {
  margin:0;
  line-height:1.06;
  white-space:nowrap;
  letter-spacing:-.075em;
}
.hero .hero-description {
  flex:1 1 230px;
  max-width:405px;
  min-width:0;
  margin:0;
  line-height:1.4;
}
.hero-right {
  flex:0 0 auto;
}
.recipe,
.main-grid .recipe {
  box-sizing:border-box;
  height:76px;
  min-height:76px;
  max-height:76px;
  flex:0 0 76px;
  overflow-y:auto;
  overflow-x:hidden;
  align-content:flex-start;
  scrollbar-width:thin;
  overscroll-behavior:contain;
}
.tray,
.main-grid .tray {
  min-height:0;
}
@media (min-width:931px) and (min-height:560px) {
  .hero {
    height:112px;
    min-height:112px;
    padding:12px 0;
  }
  .hero h1 {
    font-size:clamp(40px,4.7vw,68px);
  }
  .main-grid > .panel:nth-child(2) {
    overflow:hidden;
  }
  .main-grid .tray {
    flex:1 1 0;
    min-height:0;
    height:auto;
    overflow:hidden;
  }
  .main-grid .recipe {
    flex:0 0 76px;
    height:76px;
    min-height:76px;
    max-height:76px;
  }
}
@media (max-width:930px) {
  .hero {
    height:auto;
    min-height:0;
  }
  .hero-main { gap:16px; }
  .hero .hero-description { max-width:340px; }
  .tray { flex:none; }
}
@media (max-width:600px) {
  .hero-main {
    flex-wrap:wrap;
    align-items:flex-start;
    gap:8px;
  }
  .hero h1 { font-size:clamp(38px,10vw,60px); }
  .hero .hero-description { flex:1 1 100%; max-width:none; }
  .recipe,.main-grid .recipe { height:76px; min-height:76px; max-height:76px; }
}

/* V11: Saved splice export sheet */
.export-backdrop {
  display:none;position:fixed;inset:0;z-index:9999;background:rgba(5,12,7,.86);
  padding:16px;align-items:center;justify-content:center;
}
.export-backdrop.show {display:flex}
.export-dialog {
  width:min(96vw,510px);max-height:95dvh;overflow:auto;
  background:#1e281b;border:1px solid #536747;border-radius:12px;padding:15px;
  box-shadow:0 24px 60px rgba(0,0,0,.52);
}
.export-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;color:#f1f2e0;font:700 13px 'DM Mono',monospace}
.export-heading button {font-size:25px;line-height:1;cursor:pointer;color:#f1f2e0;background:transparent;border:0}
#export-status {font:11px/1.6 'DM Mono',monospace;color:#bec9ab;margin:10px 0}
#export-preview {display:block;max-width:100%;width:auto;max-height:62dvh;aspect-ratio:2/3;margin:0 auto;object-fit:contain;border-radius:5px;background:#151d13}
#export-preview:not([src]) {display:none}
.export-actions {display:flex;gap:9px;flex-wrap:wrap;margin-top:12px}
.export-actions button,.export-actions a {
  display:inline-flex;justify-content:center;align-items:center;flex:1 1 160px;
  padding:12px 10px;border-radius:6px;background:#c4d88e;
  color:#162010;text-decoration:none;font:700 12px 'DM Mono',monospace;border:0;cursor:pointer;
}
.export-actions [hidden] {display:none}
.vaultbuttons [data-export] {background:#b9ce87;color:#15220f;border-color:#b9ce87;font-weight:700}
.vaultbuttons .delete {border-color:#a45e5e;color:#f1a2a2}


/* V16 — mobile layout only: 01 stock, then 02 chamber.
   The chamber illustration appears BELOW the controls and blend details. */
@media (max-width:930px) {
  .main-grid {
    display:grid;
    grid-template-columns:minmax(0,1fr);
  }
  .main-grid > .panel:nth-child(1) {
    order:0;
    grid-row:1;
    min-width:0;
  }
  .main-grid > .panel:nth-child(2) {
    order:0;
    grid-row:2;
    min-width:0;
    display:flex;
    flex-direction:column;
    overflow:visible;
  }
  .main-grid > .panel:nth-child(2) > .sectionhead { order:0; }
  .main-grid > .panel:nth-child(2) > .meter { order:1; }
  .main-grid > .panel:nth-child(2) > .statline { order:2; }
  .main-grid > .panel:nth-child(2) > .recipe {
    order:3;
    box-sizing:border-box;
    flex:0 0 auto;
    height:auto;
    max-height:none;
    min-height:64px;
    overflow:visible;
    padding:12px 0 10px;
    margin-top:12px;
    align-content:flex-start;
    flex-wrap:wrap;
    gap:8px;
    width:100%;
  }
  .main-grid > .panel:nth-child(2) > .actions {
    order:4;
    margin-top:3px;
  }
  .main-grid > .panel:nth-child(2) > .tray {
    order:5;
    display:block;
    position:relative;
    width:100%;
    height:clamp(285px,58vw,460px);
    min-height:285px;
    max-height:none;
    flex:none;
    margin-top:14px;
    overflow:hidden;
  }
  .main-grid > .panel:nth-child(2) > div[style*="margin-top"] {
    order:6;
  }
  .main-grid > .panel:nth-child(2) .chip {
    display:inline-flex;
    align-items:center;
    gap:3px;
    min-width:0;
    max-width:100%;
    overflow-wrap:anywhere;
    white-space:normal;
    line-height:1.25;
  }
  .main-grid > .panel:nth-child(2) .chip button {
    flex:none;
    min-width:24px;
    min-height:24px;
    font-size:18px;
  }
}
@media (max-width:600px) {
  .main-grid > .panel:nth-child(2) > .tray {
    height:clamp(245px,76vw,365px);
    min-height:245px;
  }
  .main-grid > .panel:nth-child(2) > .recipe {
    min-height:56px;
    height:auto;
    max-height:none;
  }
}

/* V17 - mobile: three compact, non-overflowing selected-input chips per row. */
.catalog-disclaimer { margin:16px 0 0; padding:12px 14px; background:#1a2419; border:1px solid var(--line); border-radius:10px; }
.catalog-disclaimer .hint { margin:0; font-size:11px; line-height:1.5; color:var(--muted); }
@media (max-width:930px) {
  /* Explicitly override earlier rigid viewport height rules: content follows the two panels. */
  .main-grid { height:auto; min-height:0; align-items:start; }
  .main-grid > .panel:nth-child(1), .main-grid > .panel:nth-child(2) {height:auto; min-height:0;}
  .main-grid > .panel:nth-child(1) .strains { flex:0 0 auto; height:min(380px,50dvh); min-height:220px; max-height:none; overflow-y:auto; }
  .main-grid > .panel:nth-child(2) > .recipe,
  .main-grid .recipe {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-auto-rows:minmax(30px,auto);
    gap:5px;
    padding:8px 0 6px;
    margin:8px 0 5px;
    height:auto; min-height:0; max-height:none;
    flex:0 0 auto;
    overflow:visible;
    align-items:stretch;
    align-content:start;
  }
  .main-grid > .panel:nth-child(2) .chip {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:2px;
    box-sizing:border-box;
    width:100%; max-width:100%; min-width:0;
    min-height:30px;
    padding:4px 5px 4px 7px;
    border-radius:9px;
    font-size:9px;
    line-height:1.15;
    overflow:hidden;
    white-space:nowrap;
  }
  .main-grid > .panel:nth-child(2) .chip-label {
    display:block;
    overflow:hidden;
    min-width:0;
    flex:1 1 auto;
    white-space:nowrap;
    text-overflow:ellipsis;
  }
  .main-grid > .panel:nth-child(2) .chip-label small {
    font-size:8px;
    color:#c5d9ac;
  }
  .main-grid > .panel:nth-child(2) .chip button {
    flex:0 0 17px;
    width:17px; min-width:17px;
    height:24px; min-height:24px;
    padding:0;
    font-size:15px;
    line-height:24px;
    cursor:pointer;
  }
  .main-grid > .panel:nth-child(2) > .actions {margin-top:4px;}
}
@media (max-width:360px) {
  .main-grid > .panel:nth-child(2) .chip {font-size:8px;padding-left:4px;}
  .main-grid > .panel:nth-child(2) .chip-label small {font-size:7px;}
}
