/* The range (kits/range) in Budling's look: the closed row under "Hang it on the wall" a quiet strip of the herbarium's
   paper, the menu a sheet of the same paper, each card the plant on its thing with the name in the serif's italic. */
.range {
  margin: 0 0 12px;
}
.range-row {
  width: 100%;
  padding: 6px 12px 6px 8px;
  border: 1px solid rgb(47 38 34 / 0.18);
  border-radius: 12px;
  background: var(--paper2) var(--grain);
  color: var(--ink);
  font: 600 15px/1.2 var(--sans);
  text-align: left;
}
.range-row-picture {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 1px 1.5px rgb(47 38 34 / 0.28));
}
.range-row-label {
  flex: 1;
}
.range-row-label::after {
  content: ' ›';
  color: var(--muted);
}
.range-row:focus-visible,
.range-add:focus-visible,
.range-place:focus-visible,
.range-close:focus-visible,
.range-previous:focus-visible,
.range-next:focus-visible {
  outline: 3px solid var(--leaf);
  outline-offset: 2px;
}

.range-dialog {
  --range-backdrop: rgb(47 38 34 / 0.45);
  font: 16px/1.4 var(--sans);
  color: var(--ink);
}
.range-sheet {
  --range-sheet: var(--paper);
  background-image: var(--grain);
  color: var(--ink);
  border-radius: 20px 20px 0 0;
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgb(47 38 34 / 0.22);
}
.range-head {
  padding: 4px 16px 12px;
}
.range-grip {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgb(47 38 34 / 0.25);
}
.range-title {
  margin: 0;
  font: italic 24px/1.15 var(--serif);
}
.range-close {
  width: 44px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink);
  transition: background-color 0.15s;
}
.range-close:hover {
  background: rgb(47 38 34 / 0.07);
}
.range-cross {
  width: 18px;
  height: 18px;
  stroke-width: 1.7;
}
.range-card {
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  background: var(--paper2);
  box-shadow:
    0 1px 0 rgb(47 38 34 / 0.12),
    0 6px 18px rgb(47 38 34 / 0.08);
}
.range-picture {
  padding: 8px;
  filter: drop-shadow(0 3px 5px rgb(47 38 34 / 0.24));
}
.range-name {
  margin: 4px 0 0;
  font: italic 19px/1.2 var(--serif);
}
.range-price {
  margin: 0;
  font: 600 17px var(--sans);
}
.range-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.range-note a {
  color: var(--ink);
}
.range-add,
.range-place,
.range-take,
.range-pick,
.range-another,
.range-back {
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--ink);
  color: #fbf6ea;
  font: 600 16px/1.2 var(--sans);
}
.range-place,
.range-pick,
.range-another,
.range-back {
  background: none;
  color: var(--ink);
}
.range-add[data-state='added'] {
  border-color: var(--leaf);
  background: var(--paper2);
  color: var(--ink);
}
.range-check {
  color: var(--leaf);
}
.range-error,
.range-wall-error {
  margin: 0;
  color: var(--terra);
  font-size: 14px;
}
.range-steps {
  padding: 8px 16px 0;
}
.range-previous,
.range-next {
  padding: 0 16px;
  border: 1px solid rgb(47 38 34 / 0.18);
  border-radius: 999px;
  background: var(--paper2);
  color: var(--ink);
  font: 600 15px var(--sans);
}

.range-wall {
  --range-wall: var(--paper);
  --range-shadow: rgb(47 38 34 / 0.35);
  color: var(--ink);
  font: 16px/1.4 var(--sans);
  padding: calc(10px + env(safe-area-inset-top)) 14px calc(12px + env(safe-area-inset-bottom));
  gap: 10px;
}
.range-wall-title {
  margin: 0;
  font: italic 22px/1.15 var(--serif);
}
.range-wall-t,
.range-wall-hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.range-wall-stage {
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper2);
}

/* off while the seed packet's design can't be ordered (app.js showThings) */
.range[data-off] {
  display: none;
}

/* ---- on a laptop the right column has room under "Hang it on the wall", so the row becomes a second step there: a
   heading, then the three things as large as the column gives them, each named under its picture (a tap opens the
   sheet at its card). A phone has no second column, and a screen too short for the form (a phone held sideways) has
   no height for the larger pictures under it, so both keep the closed row */
.more-h {
  display: none;
}
@media (min-width: 820px) and (min-height: 560px) {
  /* its cards' foot is the sheet's foot from 660px high; below that they end at the tools' foot (style.css, the
     designer on a laptop) */
  .more {
    grid-column: 2;
    padding: 4px 0 0;
  }
  .more:has(> .range:not([hidden], [data-off])) .more-h {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    font: italic 16px/1.2 var(--serif);
    color: var(--muted);
  }
  .more-h::before,
  .more-h::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgb(47 38 34 / 0.16);
  }
  .more .range {
    margin: 0;
  }
  .more .range-row {
    padding: 0;
    border: 0;
    background: none;
    position: relative;
  }
  /* out of sight, kept as the button's name: the names under the pictures are aria-hidden */
  .more .range-row-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .more .range-row-pictures {
    flex: 1;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 10px;
  }
  .more .range-row-thing {
    display: grid;
    grid-template-rows: auto auto;
    justify-items: center;
    gap: 6px;
    padding: 12px 6px 10px;
    border-radius: 14px;
    background: var(--paper2) var(--grain);
    box-shadow:
      0 1px 0 rgb(47 38 34 / 0.12),
      0 6px 18px rgb(47 38 34 / 0.07);
    transition:
      transform 0.3s var(--spring),
      box-shadow 0.3s;
  }
  .more .range-row-thing:hover {
    transform: translateY(-2px);
    box-shadow:
      0 1px 0 rgb(47 38 34 / 0.12),
      0 10px 24px rgb(47 38 34 / 0.12);
  }
  .more .range-row-picture {
    width: 100%;
    height: clamp(72px, calc(var(--screen) * 0.11), 112px);
    filter: drop-shadow(0 2px 3px rgb(47 38 34 / 0.24));
  }
  /* in the form's labels' letter (style.css --label-*), so the names read as the poster's own fields, not its title */
  .more .range-row-name {
    display: block;
    font: var(--label-size) / 1.2 var(--sans);
    letter-spacing: var(--label-tracking);
    color: var(--label-ink);
    text-align: center;
  }
}
