/*
 * Views editor (garden_views/editor.js, toast.js): the view picture, the
 * tray, the bottom sheet, resize handles and toasts. Linked by Your space's
 * view tab (lane shell). Tokens from DESIGN.md: garden-deep #164825,
 * garden-mid #3A8C4B, garden-light #e8f2e5, surfaces #faf8f4 / #fcfbf8 /
 * #f5f3ed, border #e5e3db, ink #111827 / #4b5563 / #6b7280. One radius
 * (8px) except pills (labels) and the sheet's top (elevated, 16px).
 */

.gv-editor {
    position: relative;
}

/* The sheet, toasts, drag ghost and decoration catalogue live on <body>: they need the tokens too. */
.gv-editor,
.gv-room3d,
.gv-isheet,
.gv-isheet-out,
.gv-toasts,
.gv-ghost,
.gv-dcat {
    /* DESIGN.md: expo ease-out, never bounce (tailwind.css --ease-out-expo) */
    --gv-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --gv-deep: #164825;
    --gv-mid: #3a8c4b;
    --gv-light: #e8f2e5;
    --gv-surface: #faf8f4;
    --gv-tint: #fcfbf8;
    --gv-alt: #f5f3ed;
    --gv-border: #e5e3db;
    --gv-ink: #111827;
    --gv-ink2: #4b5563;
    --gv-muted: #6b7280;
    /* green text (fills keep --gv-deep with white text) */
    --gv-brand-ink: #164825;
    --gv-danger: #b91c1c;
    --gv-note: #fdf6e3;
    /* the ground behind a pot's thumbnail: none in light mode */
    --gv-art-ground: transparent;
}

/* Dark: the app's dark surface tokens (tailwind.css), class first, then the OS unless forced light.
 * The picture itself keeps its daylight colours. */
html.dark :is(.gv-editor, .gv-room3d, .gv-isheet, .gv-isheet-out, .gv-toasts, .gv-ghost, .gv-dcat) {
    --gv-deep: #1f5a32;
    --gv-mid: #5cae79;
    --gv-light: #1a2e1f;
    --gv-surface: #121212;
    --gv-tint: #1e1e1e;
    --gv-alt: #2a2a2a;
    --gv-border: #3a3a3a;
    --gv-ink: #e5e5e5;
    --gv-ink2: #a3a3a3;
    --gv-muted: #8f8f8f;
    --gv-brand-ink: #8ac9a2;
    --gv-danger: #f87171;
    --gv-note: #2a2416;
    /* the List cards' dark ground (owner 21:37: the cream tiles ignored dark mode) */
    --gv-art-ground: linear-gradient(180deg, #1e2924 0%, #252620 100%);
}

@media (prefers-color-scheme: dark) {
    html:not(.light) :is(.gv-editor, .gv-room3d, .gv-isheet, .gv-isheet-out, .gv-toasts, .gv-ghost, .gv-dcat) {
        --gv-deep: #1f5a32;
        --gv-mid: #5cae79;
        --gv-light: #1a2e1f;
        --gv-surface: #121212;
        --gv-tint: #1e1e1e;
        --gv-alt: #2a2a2a;
        --gv-border: #3a3a3a;
        --gv-ink: #e5e5e5;
        --gv-ink2: #a3a3a3;
        --gv-muted: #8f8f8f;
        --gv-brand-ink: #8ac9a2;
        --gv-danger: #f87171;
        --gv-note: #2a2416;
        /* the List cards' dark ground (owner 21:37: the cream tiles ignored dark mode) */
        --gv-art-ground: linear-gradient(180deg, #1e2924 0%, #252620 100%);
    }
}

/* --- the picture ---------------------------------------------------------- */

.gv-scroll {
    position: relative; /* the panel's scroll room (.gv-room) and stage.offsetLeft measure from here */
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 8px;
    background: var(--gv-alt);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

/* Zoomed in (editor.js layoutZoom): the picture keeps its fit height and pans inside it */
.gv-scroll.is-zoomed {
    overflow: auto;
    overscroll-behavior: contain;
}

.gv-pic {
    position: relative;
}

/* The picture's top-right corner (editor.js): the fit button (phones, while zoomed), the zoom pill
   (desktop) and the Sky control, side by side in one row, the Sky control last */
.gv-corner {
    position: absolute;
    top: 8px;
    right: var(--gv-corner-inset, 8px);
    z-index: 5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
}

.gv-corner > * {
    pointer-events: auto;
}

/* Back to the whole picture: a round button in the corner while zoomed in */
.gv-fit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--gv-border);
    background: var(--gv-tint);
    color: var(--gv-brand-ink);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    animation: gv-fit-in 0.2s var(--gv-ease);
}

.gv-fit[hidden] {
    display: none;
}

.gv-fit:focus-visible {
    outline: 2px solid #3f6eb5;
    outline-offset: 2px;
}

@keyframes gv-fit-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
}

.gv-stage {
    position: relative;
    margin: 0 auto;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: pan-x pan-y;
}

.gv-svg {
    display: block;
    overflow: hidden;
}

.gv-stage.is-dragging,
body.gv-dragging {
    cursor: grabbing;
}

body.gv-dragging {
    -webkit-user-select: none;
    user-select: none;
}

.gv-item {
    transition: opacity 0.15s ease;
}

.gv-hit {
    cursor: pointer;
}

.gv-empty {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--gv-light);
    color: var(--gv-ink2);
    font-size: 0.875rem;
}

.gv-empty[hidden] {
    display: none;
}

.gv-empty strong {
    color: var(--gv-brand-ink);
}

/* --- buttons ----------------------------------------------------------------- */

.gv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--gv-border);
    background: var(--gv-tint);
    color: var(--gv-ink);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.gv-btn--primary {
    background: var(--gv-deep);
    border-color: var(--gv-deep);
    color: #fff;
}

.gv-btn--ghost {
    background: transparent;
    color: var(--gv-brand-ink);
}

.gv-btn--wide {
    width: 100%;
}

.gv-btn:focus-visible,
.gv-card:focus-visible,
.gv-nudge:focus-visible,
.gv-group:focus-visible,
.gv-ogrip:focus-visible,
.gv-size-label:focus-visible {
    outline: 2px solid #3f6eb5;
    outline-offset: 2px;
}

/* --- the tray ------------------------------------------------------------------- */

.gv-tray {
    margin-top: 12px;
    padding: 4px 6px 4px 4px;
    border-radius: 8px;
    background: var(--gv-tint);
    border: 1px solid var(--gv-border);
    transition:
        background 0.15s,
        border-color 0.15s;
}

.gv-tray.is-drop {
    border-style: dashed;
    border-color: var(--gv-mid);
}

.gv-tray.is-over {
    background: var(--gv-light);
}

.gv-tray__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 8px;
}

/* "Add a plant" and "+ Add pot or bed" (plan D12'): together at the bar's end, wrapping as one */
.gv-tray__adds {
    display: flex;
    flex-wrap: wrap;
    gap: 0 4px;
    margin-left: auto;
}

/* Phones (F66): the two adds take their own row under the title, lined up
   with the title and the cards, half the row each */
@media (max-width: 767px) {
    .gv-tray__adds {
        flex: 1 1 100%;
        gap: 6px;
        margin: 0 0 6px;
        padding: 0 4px;
    }

    .gv-tray__adds > .gv-btn {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0 6px;
        white-space: normal;
        line-height: 1.2;
    }
}

/* Collapsible (owner 18:25): the bar is a toggle; "+ Add pot" stays beside it */
.gv-tray__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    /* the title keeps one line in every language (F12, F31): never narrower
       than its words; "+ Add pot or bed" goes under it when both don't fit */
    flex: 1 0 auto;
    max-width: 100%;
    min-height: 44px;
    padding: 0 8px;
    border-radius: 8px;
    color: var(--gv-ink);
    text-align: left;
}

.gv-tray__toggle:focus-visible {
    outline: 2px solid #3f6eb5;
    outline-offset: 2px;
}

.gv-tray__toggle .gv-chev {
    flex: none;
    margin-left: auto;
    color: var(--gv-muted);
    transition: transform 0.26s var(--gv-ease);
}

.gv-tray.is-open .gv-tray__toggle .gv-chev {
    transform: rotate(180deg);
}

/* Nothing waiting: a quieter one-line note in the bar */
.gv-tray__title.is-quiet {
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 0.875rem;
    color: var(--gv-ink2);
}

/* The body folds open and shut (grid rows 0fr <-> 1fr), never a jump */
.gv-tray__body {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition:
        grid-template-rows 0.28s var(--gv-ease),
        opacity 0.2s ease-out;
}

.gv-tray.is-open .gv-tray__body {
    grid-template-rows: 1fr;
    opacity: 1;
}

.gv-tray__body > div {
    min-height: 0;
    overflow: hidden;
    padding: 0 8px;
}

.gv-tray.is-open .gv-tray__body > div {
    padding-bottom: 8px;
}

.gv-tray__body .gv-tray__plan {
    display: block;
    margin: 0 0 2px;
}

.gv-tray__title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    font-family: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--gv-ink);
    flex: 1 1 auto;
    white-space: nowrap;
}

.gv-count {
    display: inline-block;
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--gv-alt);
    color: var(--gv-ink2);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.gv-tray__plan {
    font-size: 0.75rem;
    color: var(--gv-muted);
    font-variant-numeric: tabular-nums;
}

.gv-tray__done,
.gv-tray__drop {
    margin: 8px 0 0;
    font-size: 0.875rem;
    color: var(--gv-muted);
}

.gv-tray__drop {
    color: var(--gv-brand-ink);
    font-weight: 600;
}

/* The tray's search (owner 20:44): the plant browser's field (magnifier, clear cross,
   44 px, rounded), as wide as the tray at any width; 16 px text on touch so iOS never zooms */
.gv-tsearch {
    position: relative;
    display: block;
    margin: 2px 0 4px;
}

.gv-tray.is-drop .gv-tsearch {
    display: none;
}

.gv-tsearch__icon {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: var(--gv-muted);
    pointer-events: none;
}

.gv-tsearch__input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 40px 8px 36px;
    border: 1px solid var(--gv-border);
    border-radius: 12px;
    background: var(--gv-surface);
    color: var(--gv-ink);
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
}

/* a mouse: the plant browser's 14 px (the placeholder fits the narrow column beside the picture) */
@media (pointer: fine) {
    .gv-tsearch__input {
        font-size: 0.875rem;
    }
}

/* empty (no clear button yet): the placeholder may use the clear button's room */
.gv-tsearch__input:placeholder-shown {
    padding-right: 10px;
}

.gv-tsearch__input::placeholder {
    color: var(--gv-muted);
}

.gv-tsearch__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.gv-tsearch__input:focus {
    outline: none;
    border-color: var(--gv-mid);
    box-shadow: 0 0 0 2px var(--gv-mid);
}

.gv-tsearch__clear {
    position: absolute;
    right: 2px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    transform: translateY(-50%);
    border-radius: 999px;
    color: var(--gv-muted);
}

.gv-tsearch__clear[hidden] {
    display: none;
}

.gv-tsearch__clear:hover {
    color: var(--gv-ink);
}

.gv-tsearch__clear:focus-visible {
    outline: 2px solid #3f6eb5;
    outline-offset: -2px;
}

.gv-tsearch__none {
    margin: 10px 0 4px;
    font-size: 0.875rem;
    color: var(--gv-muted);
}

.gv-tray__row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 2px 2px;
    scrollbar-width: thin;
}

.gv-tray__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
    padding: 6px 0 2px;
}

.gv-tray__shelf {
    margin: 10px 0 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gv-muted);
}

.gv-card {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 84px;
    min-height: 92px;
    padding: 6px 4px 8px;
    border-radius: 8px;
    border: 1px solid var(--gv-border);
    background: var(--gv-surface);
    color: var(--gv-ink);
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    transition:
        transform 0.15s,
        box-shadow 0.15s;
}

.gv-tray__grid .gv-card {
    width: auto;
}

.gv-card.is-sel {
    border-color: var(--gv-mid);
    background: var(--gv-light);
}

.gv-card.is-armed {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.gv-card__art {
    display: block;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: var(--gv-art-ground);
}

/* a plant in the ground's thumbnail (ground.js groundThumbSVG): its art standing on the bottom */
.gv-gthumb {
    display: block;
    /* its box, not the art's own ratio (preflight's img height: auto) */
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 100%;
    padding: 3%;
    box-sizing: border-box;
}

/* The number runs on with the name ("Glazed / pot 3"), in its weight, so it
   reads as part of the name, not as a count dropped in the corner (F21; the
   count is the "×4" badge). Three lines hold every name the cards see. */
.gv-card__name {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
    font-size: 0.75rem;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: break-word;
    hyphens: auto;
}

.gv-card__name .gv-name__num {
    font-weight: inherit;
}

.gv-name__num {
    flex: none;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.gv-card__count {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--gv-deep);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

.gv-group {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--gv-alt);
    color: var(--gv-ink2);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: left;
}

.gv-group > span:first-child {
    flex: 1 1 auto;
}

.gv-chev {
    width: 18px;
    height: 18px;
    transition: transform 0.15s;
}

.gv-group[aria-expanded='true'] .gv-chev {
    transform: rotate(180deg);
}

.gv-ghost {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1005;
    width: 64px;
    height: 64px;
    pointer-events: none;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.25));
}

/* over a bed or pot: where the drop asks to put it ("In Bed 1"), above the thumbnail so the finger never covers it (F94) */
.gv-ghost__tag {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(22, 72, 37, 0.92);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.gv-ghost__tag[hidden] {
    display: none;
}

/* ...and a light tile behind the plant, so a rose still reads over a bed of roses */
.gv-ghost:has(> .gv-ghost__tag:not([hidden])) {
    border-radius: 12px;
    background: color-mix(in srgb, var(--gv-tint) 88%, transparent);
    outline: 2px solid #16a34a;
}

/* --- the sheet --------------------------------------------------------------------- */

.gv-isheet,
.gv-isheet-out {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000; /* above the phone's bottom nav */
    max-width: 560px;
    margin: 0 auto;
    padding: 6px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-radius: 16px 16px 0 0;
    background: var(--gv-tint);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.16);
    color: var(--gv-ink);
}

/* Wide screens: the same controls in a card beside the picture (editor.js WIDE_QUERY). */
.gv-isheet.is-docked,
.gv-isheet-out.is-docked {
    position: static;
    max-width: none;
    margin: 0;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--gv-border);
    box-shadow: none;
}

.gv-isheet__grab {
    width: 40px;
    height: 4px;
    margin: 2px auto 8px;
    border-radius: 999px;
    background: var(--gv-border);
}

.gv-isheet__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.gv-isheet__art {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--gv-art-ground);
}

.gv-isheet__title {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* No gap: nameHTML already puts a no-break space between stem and number,
   and a flex gap on top doubled it ("Apple   #2"). */
.gv-isheet__title strong {
    display: flex;
    min-width: 0;
    font-size: 1rem;
    white-space: nowrap;
}

.gv-isheet__title strong .gv-name__stem {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The docked card is narrow: a long name ("Greenhouse Heater", "Stack of
   Terracotta Pots") wraps to two lines instead of an ellipsis after a word.
   Laid inline, the number follows the last word ("Hydrangea #1"), or
   starts the next line when it doesn't fit (the header joins them with a
   plain space); a flex row gave the wrapped stem the whole width and left
   "#1" at the far edge (F116). */
.gv-isheet.is-docked .gv-isheet__title strong {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
    /* one long German word ("Rispenhortensie") breaks at a syllable */
    hyphens: auto;
}

.gv-isheet.is-docked .gv-isheet__title strong .gv-name__stem {
    display: inline;
}

.gv-isheet.is-docked .gv-isheet__title strong .gv-name__num {
    white-space: nowrap;
}

/* A drop's question, docked: the name gets the card's whole width and its quiet Cancel the line
   under it, so one long German word ("Rispenhortensie #1") never breaks beside it (F135) */
.gv-isheet.is-docked .gv-isheet__head:has(> .gv-isheet__cancel) {
    flex-wrap: wrap;
    row-gap: 0;
}

.gv-isheet.is-docked .gv-isheet__head:has(> .gv-isheet__cancel) > .gv-isheet__title {
    flex-basis: calc(100% - 64px);
}

.gv-isheet.is-docked .gv-isheet__head > .gv-isheet__cancel {
    margin-left: auto;
    min-height: 32px;
}

/* the one readout line: "45 cm from the left · on the floor · 20 cm from the front" */
.gv-isheet__title > span {
    font-size: 0.8rem;
    line-height: 1.3;
    color: var(--gv-muted);
    font-variant-numeric: tabular-nums;
}

/* each part whole, its "·" leading it: a wrap falls between parts (statusHTML) */
.gv-isheet__part {
    white-space: nowrap;
}

/* the arrow pad: left, right, down, up in one row */
.gv-pad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.gv-isheet__row {
    display: flex;
    flex-wrap: wrap; /* a long Remove (de "Aus dem Bereich nehmen") moves under the button, never clipped (final F-a) */
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.gv-nudge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 48px;
    height: 48px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--gv-border);
    background: var(--gv-surface);
    color: var(--gv-brand-ink);
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.gv-nudge svg {
    width: 22px;
    height: 22px;
}

.gv-nudge--lbl {
    height: 44px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.gv-nudge:disabled {
    opacity: 0.35;
}

.gv-isheet__hint {
    margin: 4px 0 10px;
    font-size: 0.875rem;
    color: var(--gv-ink2);
}

.gv-isheet .gv-btn--wide,
.gv-isheet-out .gv-btn--wide {
    margin-top: 6px;
}

/* A tray plant dropped on a bed or pot asks first (editor.js askHTML, F78): the question, a
   make-room list or a refusal's reason, then the choices stacked full width (long German labels
   such as "Stell sie hier auf den Boden" need the whole row at 375 px). */
.gv-isheet__ask {
    margin: 4px 0 8px;
    font-size: 0.9375rem;
    color: var(--gv-ink);
}

.gv-isheet__ask--warn {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.875rem;
    background: #fffbeb;
    color: #78350f;
}

html.dark .gv-isheet__ask--warn {
    background: rgba(120, 53, 15, 0.3);
    color: #fde68a;
}

.gv-isheet__changes {
    margin: 0 0 8px;
    padding-left: 20px;
    list-style: disc;
    font-size: 0.875rem;
    color: var(--gv-ink);
}

.gv-isheet__changes li + li {
    margin-top: 4px;
}

.gv-isheet__choices {
    display: flex;
    flex-direction: column;
    max-height: 40vh;
    overflow-y: auto;
}

/* A bed's plants (plan D10): about three rows at 390, then the list scrolls inside the
   sheet; in the docked card the card itself is the one scroller (F85). A row: photo,
   then the name (Tight beside it) with Take out and Move at its end, then the
   steppers. Each stepper is 44 px buttons around a middle of one shared width, so
   count and size line up when stacked. */
.gv-bplants__list {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    max-height: min(24rem, 50vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid var(--gv-border);
}

.gv-isheet.is-docked .gv-bplants__list {
    max-height: none;
    overflow: visible;
}

.gv-bplant {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-areas:
        "img head"
        "img ctrls";
    align-items: start;
    column-gap: 8px;
    padding: 2px 0 4px;
    border-bottom: 1px solid var(--gv-border);
}

.gv-bplant > .plant-row__img,
.gv-bplant > :first-child {
    grid-area: img;
    width: 40px;
    height: 40px;
    margin-top: 2px;
    border-radius: 8px;
    object-fit: cover;
}

/* the name and the row's text actions on one line; when both don't fit the
   actions wrap under it, so a German name is never cut for "Herausnehmen" (F86) */
.gv-bplant__head {
    grid-area: head;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 8px;
    min-width: 0;
}

.gv-bplant__acts {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.gv-bplant__name {
    flex: 1 0 auto;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 32px;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gv-ink);
}

.gv-bplant__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* count and size stacked on one grid: their - and + buttons line up */
.gv-bplant__ctrls {
    grid-area: ctrls;
    display: grid;
    /* the last track takes the rest: the steppers stay on the first three, the open row's
       Undo, refusal and hint lines (grid-column 1 / -1) get the row's whole width (F136) */
    grid-template-columns: 44px minmax(0, max-content) 44px minmax(0, 1fr);
    justify-content: start;
    align-items: center;
    margin-left: -12px;
}

.gv-bplant__step {
    display: contents;
}

/* each stepper starts a new line of the grid */
.gv-bplant__step > .gv-bplant__btn:first-of-type {
    grid-column: 1;
}

/* a line's count has no buttons (the line's length sets it): plain words at the
   row's left edge, under the name, not a bold middle with no stepper round it (F87) */
.gv-bplant__count > .gv-bplant__n {
    grid-column: 1 / -1;
    padding-left: 12px;
    line-height: 36px;
    text-align: left;
    font-weight: 400;
    color: var(--gv-ink2);
}

.gv-bplant__btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--gv-ink);
    font-size: 1.25rem;
    line-height: 1;
}

.gv-bplant__btn:disabled {
    color: var(--gv-muted);
    opacity: 0.45;
}

.gv-bplant__n,
.gv-bplant__wide {
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    font-size: 0.8125rem;
}

.gv-bplant__n {
    font-weight: 600;
    color: var(--gv-ink);
    font-variant-numeric: tabular-nums;
}

.gv-bplant__wide {
    color: var(--gv-ink2);
}

/* Tight is the bed page's own chip (_tight.html): a tap opens its reason on a
   line of its own under the name */
.gv-bplant__name:has(> .beds-crop__tight-wrap > [aria-expanded="true"]) {
    flex-wrap: wrap;
}

.gv-bplant__name .beds-crop__tight {
    margin-left: 0;
}

.gv-bplant__name .beds-crop__tight-why {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--gv-ink2);
}

.gv-bplant__take {
    min-height: 32px;
    padding: 0 4px;
    white-space: nowrap;
    border: 0;
    background: none;
    color: var(--gv-muted);
    font-size: 0.8125rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* F136: the bed's From above plan on top of the rows (the bed page's own picture), and
   each row's name a toggle for its steppers, collapsed, one open at a time
   (picture_panel.js); the open row is the plant selected in the plan */
.gv-bplants__plan {
    margin-top: 10px;
}

/* with the plan on top, about three folded rows, then the list scrolls; the sheet never
   grows past the screen (its own scroll as the last resort) */
.gv-isheet:not(.is-docked) .gv-bplants[data-pic-section] .gv-bplants__list {
    max-height: min(15rem, 28vh);
}

/* docked, the column scrolls as a whole: the plan stays in view over the rows it selects */
.gv-isheet.is-docked .gv-bplants__plan {
    position: sticky;
    top: -12px;
    z-index: 2;
    margin: 10px -12px 0;
    padding: 4px 12px 6px;
    background: var(--gv-tint);
}

.gv-isheet:not(.is-docked):has(.gv-bplants[data-pic-section]) {
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.gv-bplants__ui .pic-hint {
    margin-top: 8px;
}

.gv-bplant__toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

/* The name opens the row and, once open, the plant's card (owner 29 Nov,
   picture_panel.js); the chevron beside it opens and closes the row. They
   sit as the one toggle did: the chevron 4px after the name, its tap area
   wider than it looks */
.gv-bplant__name .gv-bplant__card {
    flex: 0 1 auto;
    min-height: 44px;
    cursor: pointer;
}

.gv-bplant__chev-btn {
    flex: none;
    justify-content: center;
    min-width: 28px;
    margin-left: -9px;
    padding: 0 7px;
}

.gv-bplant__chev {
    flex: none;
    width: 14px;
    height: 14px;
    color: var(--gv-muted);
    transition: transform 0.15s ease;
}

.gv-bplant__toggle[aria-expanded="true"] .gv-bplant__chev {
    transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
    .gv-bplant__chev {
        transition: none;
    }
}

.gv-bplant:has(> [data-pic-panel]:not([hidden])) {
    background: color-mix(in srgb, var(--gv-brand-ink) 8%, transparent);
    border-radius: 8px;
}

.gv-bplant__ctrls[hidden] {
    display: none;
}

.gv-bplant__hint {
    grid-column: 1 / -1;
}

.gv-bplant__hint {
    margin: 0 0 4px;
    padding: 0 8px 0 12px;
    font-size: 0.75rem;
    color: var(--gv-ink2);
}

/* A line's heading row: its plants' names and "+ Add a plant to this line" */
.gv-bline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 8px;
    padding: 6px 0 0;
}

.gv-bline__title {
    margin: 0;
    min-width: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gv-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gv-bline__add {
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    background: none;
    color: var(--gv-brand-ink);
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: left;
}

/* Add a plant and Open pot / Open bed: one row of two equal buttons under the controls */
.gv-isheet__acts {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.gv-isheet__acts .gv-btn {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 8px;
    text-align: center;
    text-decoration: none;
    /* "Pflanze hinzufügen" in the docked panel's half-width button (F50) */
    white-space: normal;
    overflow-wrap: anywhere;
    hyphens: auto;
}

/* the docked column (~290 px): each button's label on one line; when the two don't fit side by
   side ("Pflanze hinzufügen" + "Beet öffnen") they stack at full width, never one wrapped
   beside one not (F137) */
.gv-isheet.is-docked .gv-isheet__acts {
    flex-wrap: wrap;
}

.gv-isheet.is-docked .gv-isheet__acts .gv-btn {
    flex: 1 1 max-content;
    white-space: nowrap;
}

/* Remove: a quiet text link at the row's end */
.gv-remove {
    margin-left: auto;
    min-height: 44px;
    padding: 0 4px;
    color: var(--gv-muted);
    font-size: 0.8125rem;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gv-remove:hover {
    color: var(--gv-danger);
}

/* An item wider than the view: the note and "Widen view to fit". */
.gv-isheet__wide {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--gv-note);
    color: var(--gv-ink2);
    font-size: 0.8125rem;
}

.gv-isheet__wide p {
    flex: 1 1 160px;
    margin: 0;
}

/* On a greenhouse bench or shelf: a small label over Front / Middle / Back, so they read apart
 * from the arrows above; a pot deeper than the top gets the chips greyed under a note. */
.gv-isheet__spots-wrap {
    margin-top: 8px;
}

.gv-isheet__spots-label {
    margin: 0 0 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gv-ink2);
}

.gv-isheet__spots .gv-chip:disabled {
    opacity: 0.45;
}

.gv-isheet__spots-note {
    margin: 6px 0 0;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--gv-note);
    color: var(--gv-ink2);
    font-size: 0.8125rem;
}

/* --- desktop (editor.js WIDE_QUERY, owner 2026-11-19 21:23) ----------------------------
 * The picture takes the whole width; the empty note and the tray sit under it at full width;
 * the zoom pill joins the corner row; the selection's panel (.gv-dock) floats over the picture's
 * right edge under that row while something is picked (editor.js placePanel sets its top and
 * height); Resize's Size sheet sits under the picture (.gv-under). */

.gv-dock,
.gv-zoombar,
.gv-room {
    display: none;
}

@media (min-width: 1024px) {
    .gv-fit {
        display: none !important;
    }

    .gv-zoombar {
        display: flex;
        gap: 2px;
        padding: 2px;
        border-radius: 999px;
        border: 1px solid var(--gv-border);
        background: var(--gv-tint);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    }

    .gv-zoombar button {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: var(--gv-brand-ink);
        font-size: 1.25rem;
        font-weight: 600;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .gv-zoombar .gv-zoombar__all {
        padding: 0 12px;
        font-size: 0.8125rem;
        white-space: nowrap;
    }

    .gv-zoombar button:hover:not(:disabled) {
        background: var(--gv-light);
    }

    .gv-zoombar button:focus-visible {
        outline: 2px solid #3f6eb5;
        outline-offset: 1px;
    }

    .gv-zoombar button:disabled {
        opacity: 0.35;
        cursor: default;
    }

    .gv-dock {
        display: block;
        position: absolute;
        right: 8px;
        top: 60px;
        z-index: 6;
        width: 300px;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        border-radius: 10px;
        pointer-events: none;
    }

    .gv-dock > * {
        pointer-events: auto;
    }

    .gv-dock .gv-isheet.is-docked,
    .gv-dock .gv-isheet-out.is-docked {
        background: var(--gv-tint);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    }

    /* the scroll room past the picture's end while the panel is open (editor.js panelRoom) */
    .gv-room {
        display: block;
        position: absolute;
        top: 0;
        height: 1px;
        pointer-events: none;
    }

    .gv-scroll.can-pan .gv-stage {
        cursor: grab;
    }

    .gv-under:not(:empty) {
        margin-top: 12px;
    }

    .gv-under .gv-isheet.is-docked {
        max-width: 640px;
    }

    /* the tray under the picture: rows wrap into a wide grid */
    .gv-tray__row {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .gv-tray__hint {
        margin: 0 0 10px;
        color: var(--gv-muted);
        font-size: 0.875rem;
    }
}

/* a mouse drag on empty space pans the picture (editor.js) */
body.gv-panning,
body.gv-panning * {
    cursor: grabbing !important;
    user-select: none;
}


/* --- the shared "goes" pill (editor.js goingMarkup, fix3) ----------------------------------
   One pill when the marks' own pills would not fit the wall: it may reach past a narrow wall's
   sides (the stage does not clip). Lines break between words only, never inside one. */
.gv-going-pill {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    width: max-content;
    padding: 3px 8px;
    border: 1.5px solid #dc2626;
    border-radius: 8px;
    background: rgb(255 255 255 / 0.94);
    color: #991b1b;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: manual;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

/* --- a picked door's or window's grips (editor.js gripsHTML, views-menus) ----------------- */

/* the hit area: 44 px, transparent; the pill inside it is what shows */
.gv-ogrip {
    position: absolute;
    z-index: 3;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
}

.gv-ogrip--left,
.gv-ogrip--right {
    cursor: ew-resize;
}

.gv-ogrip--top,
.gv-ogrip--bottom {
    cursor: ns-resize;
}

.gv-ogrip span {
    display: block;
    width: 10px;
    height: 30px;
    border-radius: 999px;
    background: #16a34a;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    /* on the opening's edge when the 44 px box is kept inside the picture (editor.js gripSpots) */
    transform: translate(var(--gv-grip-dx, 0), var(--gv-grip-dy, 0));
}

.gv-ogrip--top span,
.gv-ogrip--bottom span {
    width: 30px;
    height: 10px;
}

/* being dragged: the pill grows so the finger sees it caught */
.gv-ogrip.is-active span {
    transform: translate(var(--gv-grip-dx, 0), var(--gv-grip-dy, 0)) scale(1.25);
    background: #15803d;
}

/* the body: a keyboard focus target over the opening; a pointer goes through to the picture */
.gv-ogrip--body {
    pointer-events: none;
    border-radius: 4px;
}

/* tap targets: 44 px tall (plan UX "Touch targets") */
.gv-size-label,
.gv-size-input {
    position: absolute;
    z-index: 3;
    min-height: 44px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--gv-border);
    color: var(--gv-deep);
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.gv-size-input {
    width: 84px;
    border-radius: 8px;
    border-color: var(--gv-mid);
}

/* A resting readout over an item lets it show through; a hover or focus brings it back */
.gv-size-label.is-over-item {
    opacity: 0.55;
    transition: opacity 150ms ease-out;
}

.gv-size-label.is-over-item:hover,
.gv-size-label.is-over-item:focus-visible {
    opacity: 1;
}

/* The live readout while a handle is dragged */
.gv-size-label.is-live {
    background: var(--gv-deep);
    border-color: var(--gv-deep);
    color: #fff;
    font-size: 0.95rem;
}

/* --- toasts ------------------------------------------------------------------------------ */

.gv-toasts {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    /* above the app's modal backdrop (2000): Edit view's notices show while it is open */
    z-index: 2100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(92vw, 480px);
    transform: translateX(-50%);
    pointer-events: none;
}

/* The app-wide toasts (base.html show-toast: a bed sheet row's count, size or
   take-out answer) sit above the item sheet too, not over its rows. The
   editor keeps --gv-isheet-h at the sheet's height (0 when docked). */
body.gv-isheet-open .toast-root {
    padding-bottom: calc(var(--gv-isheet-h, 0px) + 12px + var(--safe-area-bottom, 0px));
}

/* toast.js sets `bottom` above the sheet and the phone's nav; `is-top` when that would cover the selected item */
.gv-toasts.is-top .gv-toast,
.gv-toasts.is-top .gv-toast-out {
    animation-name: gv-toast-down;
}

.gv-toast,
.gv-toast-out {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 6px 6px 6px 14px;
    border-radius: 8px;
    background: #12381d;
    color: #fff;
    font-size: 0.875rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    animation: gv-toast-in 0.24s var(--gv-ease);
}

/* A closing toast (toast.js): fades and folds away, so the one under it slides into its place */
.gv-toast-out {
    overflow: hidden;
    pointer-events: none;
    animation: gv-toast-out 0.16s ease-in forwards;
}

.gv-toasts.is-top .gv-toast-out {
    animation-name: gv-toast-out;
}

.gv-toast__text {
    flex: 1 1 auto;
}

.gv-toast__undo {
    min-height: 40px;
    min-width: 44px;
    padding: 0 12px;
    border-radius: 8px;
    color: #bbf7d0;
    font-weight: 700;
}

/* Plants were taken out (a resize from a view): the app's warning toast colour (tailwind.css .toast--warning) */
.gv-toast--warning {
    background: #b45309;
}

.gv-toast--warning .gv-toast__undo {
    color: #fef3c7;
}

@keyframes gv-toast-down {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
}

@keyframes gv-toast-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

@keyframes gv-toast-out {
    to {
        opacity: 0;
        height: 0;
        min-height: 0;
        margin-top: -8px;
        padding-top: 0;
        padding-bottom: 0;
        transform: scale(0.98);
    }
}

/* --- motion (editor.js, motion.js) ----------------------------------------------------------
 * The picture's items glide in motion.js (the SVG is redrawn on every change, so CSS can't carry
 * them); the sheet, the tray cards, the drag ghost and the toasts move here. */

/* The item sheet rises from the bottom; in the column beside the picture it fades in a touch below */
.gv-isheet {
    animation: gv-sheet-in 0.28s var(--gv-ease);
}

.gv-isheet.is-docked {
    animation: gv-dock-in 0.22s var(--gv-ease);
}

/* Closing (editor.js closeSheet): quicker than it came */
.gv-isheet-out {
    pointer-events: none;
    animation: gv-sheet-out 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.gv-dock__top {
    position: relative;
}

.gv-isheet-out.is-docked {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    animation: gv-dock-out 0.14s ease-in forwards;
}

@keyframes gv-sheet-in {
    from {
        transform: translateY(100%);
    }
}

@keyframes gv-sheet-out {
    to {
        transform: translateY(100%);
    }
}

@keyframes gv-dock-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
}

@keyframes gv-dock-out {
    to {
        opacity: 0;
        transform: translateY(-4px);
    }
}


/* A card back in the tray (Remove from view, dropped on the tray): it settles in */
.gv-card[data-arriving] {
    animation: gv-card-arrive 0.36s var(--gv-ease) both;
}

@keyframes gv-card-arrive {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.94);
    }
}

/* The drag thumbnail dropped on the tray sinks into it */
.gv-ghost {
    transition: filter 0.15s;
}

.gv-ghost.is-sinking {
    animation: gv-ghost-sink 0.18s ease-in forwards;
}

@keyframes gv-ghost-sink {
    to {
        opacity: 0;
        filter: none;
        scale: 0.6;
    }
}

@keyframes gv-fade-in {
    from {
        opacity: 0;
    }
}

@keyframes gv-fade-out {
    to {
        opacity: 0;
    }
}

/* Reduced motion: nothing travels; what fades still fades, briefly */
@media (prefers-reduced-motion: reduce) {
    .gv-toast,
    .gv-isheet,
    .gv-isheet.is-docked,
    .gv-card[data-arriving],
    .gv-fit {
        animation: gv-fade-in 0.15s linear;
    }

    .gv-toast-out,
    .gv-isheet-out,
    .gv-isheet-out.is-docked {
        animation: gv-fade-out 0.12s linear forwards;
    }

    .gv-card,
    .gv-ghost,
    .gv-tray__body,
    .gv-tray__toggle .gv-chev {
        transition: none;
    }

    .gv-ghost.is-sinking {
        animation: none;
    }
}

/* --- decorations (garden_views/decor.js; docs/plans/views-ground-plants-and-decor.md) ------------- */

/* "+ Add decoration": right-aligned under the picture, above the tray */
.gv-decor-bar {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0 2px;
}

.gv-decor-add {
    min-height: 44px;
}

/* A selected strand of lights: a soft band along it (the end handles do the rest) */
.gv-item.is-focus[data-kind="decor"] .gv-decor-hit {
    stroke: rgba(47, 125, 79, 0.22);
}

/* The lights' ends and a span's length: round 44 px grips over the picture */
.gv-dhandle {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: transparent;
    touch-action: none;
    cursor: grab;
}

.gv-dhandle span {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #fff;
    border: 3px solid var(--gv-mid);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

/* the end the pad moves: filled, so it reads apart from the other end */
.gv-dhandle.is-chosen span,
.gv-dhandle.is-active span {
    background: var(--gv-mid);
    border-color: #fff;
    width: 26px;
    height: 26px;
}

.gv-dhandle--len {
    cursor: ew-resize;
}

.gv-dhandle:focus-visible {
    outline: 3px solid var(--color-focus-ring, #3f6eb5);
    outline-offset: 2px;
}

/* The lights' Left end / Right end and a two-part colour's parts */
.gv-seg {
    display: inline-flex;
    gap: 0;
    margin-bottom: 8px;
    border: 1px solid var(--gv-border);
    border-radius: 10px;
    overflow: hidden;
}

.gv-seg__btn {
    min-height: 44px;
    padding: 0 14px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gv-ink);
    background: var(--gv-surface);
}

.gv-seg__btn + .gv-seg__btn {
    border-left: 1px solid var(--gv-border);
}

.gv-seg__btn.is-on {
    background: var(--gv-deep);
    color: #fff;
}

.gv-btn.is-on {
    border-color: var(--gv-deep);
    box-shadow: inset 0 0 0 1px var(--gv-deep);
}

/* Colour: the designer's fixture picker (part buttons "Seat · Slate Grey", the part's swatches,
   Original, a Custom colour) */
.gv-decor-colour {
    margin-top: 10px;
}

.gv-dparts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gv-dpart {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 4px 8px;
    border: 1px solid var(--gv-border);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--gv-ink);
}

.gv-dpart.is-on {
    border-color: var(--gv-deep);
    box-shadow: inset 0 0 0 1px var(--gv-deep);
}

.gv-dpart__dot {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.18);
}

.gv-dpart__dot.is-natural {
    background: conic-gradient(#c98a4b 0 25%, #e9cfa3 0 50%, #c98a4b 0 75%, #e9cfa3 0);
}

.gv-dpart__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gv-dcolour__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 10px 0 6px;
    font-size: 0.8125rem;
    color: var(--gv-muted);
}

.gv-dcolour__head strong {
    color: var(--gv-ink);
}

.gv-dcolour__orig {
    min-height: 44px;
    padding: 0 6px;
    font-size: 0.8125rem;
    color: var(--gv-muted);
}

.gv-dcolour__orig.is-on {
    font-weight: 600;
    color: var(--gv-ink);
}

.gv-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gv-swatch {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.14);
}

.gv-swatch.is-on {
    box-shadow: 0 0 0 2px var(--gv-surface), 0 0 0 4px var(--gv-deep);
}

/* Custom: a rainbow square with a plus over the native colour input */
.gv-swatch--custom {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    color: #fff;
    background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
}

.gv-swatch--custom svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4));
}

.gv-swatch--custom input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

/* The catalogue sheet: groups folded to one row of four, More shows the rest */
.gv-dcat__full {
    margin: 0 0 12px;
}

.gv-dcat__group + .gv-dcat__group {
    margin-top: 16px;
}

.gv-dcat__title {
    margin: 0 0 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--gv-ink2, var(--gv-muted));
}

.gv-dcat__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    /* an open family's panel spans the row under its tile; the tiles after it fill that tile's row */
    grid-auto-flow: row dense;
}

/* folded: the first four entries (plain tiles and family tiles), never an open family's types */
.gv-dcat__group.is-folded .gv-dcat__grid > .gv-dtile.is-extra {
    display: none;
}

/* Searching (owner 20:50): every match shows, folded or not; no-match tiles and groups hide */
.gv-dcat .gv-tsearch {
    margin: 0 0 12px;
}

.gv-dcat.is-searching .gv-dcat__group.is-folded .gv-dcat__grid > .gv-dtile.is-extra:not([hidden]) {
    display: flex;
}

/* a hidden group before the first match leaves no gap */
.gv-dcat.is-searching .gv-dcat__group {
    margin-top: 0;
}

.gv-dcat.is-searching .gv-dcat__group:not([hidden]) ~ .gv-dcat__group:not([hidden]) {
    margin-top: 16px;
}

.gv-dcat .gv-dtile[hidden],
.gv-dcat__group[hidden],
.gv-dcat.is-searching .gv-dcat__more {
    display: none;
}

.gv-dtile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 4px 8px;
    border-radius: 12px;
    border: 1px solid var(--gv-border);
    background: var(--gv-tint);
    color: var(--gv-ink);
    font-size: 0.8125rem;
    line-height: 1.2;
    text-align: center;
}

.gv-dtile:hover {
    border-color: var(--gv-mid);
}

.gv-dtile:disabled {
    opacity: 0.45;
}

.gv-dtile__art {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
}

.gv-dtile__art img {
    max-width: 88%;
    max-height: 48px;
    object-fit: contain;
}

.gv-dtile__art img.is-bulb {
    max-height: 40px;
}

.gv-dtile__blank {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px dashed var(--gv-border);
}

.gv-dtile__label {
    /* German compounds break at a word boundary (hyphenated where the browser can), never mid-letter */
    overflow-wrap: break-word;
    hyphens: auto;
    /* held to the tile's width: a browser with no hyphenation for the language (F50: "Außenwasserhahn"
       ran out of its tile) breaks the word at the edge rather than spill over it */
    max-width: 100%;
    min-width: 0;
}

/* Bunting: three of its flags along a slack cord, in its first colours (decor.js FLAG_HUES) */
.gv-dtile__flags {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    width: 88%;
    height: 34px;
    border-top: 2px solid #b8a27a;
    border-radius: 50% 50% 0 0 / 8px 8px 0 0;
}

.gv-dtile__flags img {
    width: 30%;
    max-height: 30px;
}

.gv-dtile__flags img:nth-child(2) {
    filter: hue-rotate(205deg);
}

.gv-dtile__flags img:nth-child(3) {
    filter: hue-rotate(125deg);
}

/* The rug lies flat on the floor: its tile shows it squashed like on the view, fringe at both ends */
.gv-dtile__rug {
    display: flex;
    align-items: stretch;
    width: 88%;
    height: 22px;
}

.gv-dtile__rug img {
    display: block;
    height: 100%;
    max-height: none;
    max-width: none;
    object-fit: fill;
}

.gv-dtile__rug img.is-mid {
    flex: 1 1 auto;
    min-width: 0;
}

.gv-dtile__rug img.is-end {
    flex: 0 0 4px;
    width: 4px;
}

.gv-dtile__rug img.is-end-r {
    transform: scaleX(-1);
}

.gv-dcat__more {
    display: block;
    margin: 6px 0 0 auto;
    min-height: 44px;
    padding: 0 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gv-brand-ink);
}

.gv-dcat__none {
    color: var(--gv-muted);
    font-size: 0.875rem;
}

/* A family tile (docs/plans/views-decor-families.md): its first type's picture, how many types, a chevron */
.gv-dtile--family {
    position: relative;
}

.gv-dtile--family .gv-dtile__label {
    font-weight: 700;
}

.gv-dtile__count {
    position: absolute;
    top: 5px;
    right: 5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--gv-light);
    color: var(--gv-brand-ink);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 18px;
}

/* the name's last word and the chevron share a line (a chevron alone on a third line read as a stray mark) */
.gv-dtile__tail {
    white-space: nowrap;
}

/* right after the name (a corner chevron sat on the name of a phone's narrow tile) */
.gv-dtile__chev {
    display: inline-block;
    margin-left: 2px;
    vertical-align: -1px;
    color: var(--gv-muted);
    transition: transform 0.2s var(--gv-ease);
}

.gv-dtile--family[aria-expanded="true"] {
    border-color: var(--gv-deep);
    box-shadow: 0 0 0 1px var(--gv-deep);
    background: var(--gv-light);
}

.gv-dtile--family[aria-expanded="true"] .gv-dtile__count {
    background: var(--gv-surface);
    box-shadow: inset 0 0 0 1px var(--gv-border);
}

.gv-dtile--family[aria-expanded="true"] .gv-dtile__chev {
    transform: rotate(180deg);
    color: var(--gv-brand-ink);
}

/* its types: a tinted panel across the grid, right under the tile */
.gv-dfam {
    grid-column: 1 / -1;
    padding: 10px;
    border-radius: 12px;
    background: var(--gv-light);
}

.gv-dfam[hidden] {
    display: none;
}

.gv-dfam__head {
    margin: 0 0 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gv-brand-ink);
}

.gv-dfam__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.gv-dfam .gv-dtile {
    background: var(--gv-surface);
}

/* a roof kind on a view with no roof: off and dashed; the line under it says why */
.gv-dcat .gv-dtile.is-roof-off {
    border-style: dashed;
    background: transparent;
}

.gv-dcat__roofnote {
    display: none;
}

/* why a tile or type is off (the cap, no roof): one look everywhere, the cap line's note box */
.gv-dcat__full,
.gv-dcat__roofnote,
.gv-dtype__note {
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--gv-note);
    color: var(--gv-ink);
    font-size: 0.875rem;
    line-height: 1.35;
}

.gv-dcat__roofnote,
.gv-dtype__note {
    margin: 8px 0 0;
}

/* the line shows only while such a tile does: in an open family, or as a group's own tile */
.gv-dfam:has(.is-roof-off:not([hidden])) > .gv-dcat__roofnote,
.gv-dcat__group:has(> .gv-dcat__grid > .gv-dtile.is-roof-off:not([hidden])) > .gv-dcat__roofnote {
    display: block;
}

/* folded away behind More, the group's roof tile says nothing */
.gv-dcat:not(.is-searching) .gv-dcat__group.is-folded:not(:has(> .gv-dcat__grid > .gv-dtile.is-roof-off:not(.is-extra, [hidden]))) > .gv-dcat__roofnote {
    display: none;
}

/* the card's Type row: the family's types, the current one ringed; a tap swaps it in place */
.gv-dtype {
    margin-top: 10px;
}

/* a house number's or name plaque's own text, under the Type row */
.gv-dsign {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.gv-dsign__label {
    font-size: 0.875rem;
    color: var(--gv-ink2, var(--gv-muted));
}

.gv-dsign__input {
    width: 100%;
    box-sizing: border-box;
}

.gv-dtype__head {
    margin: 0 0 6px;
    font-size: 0.875rem;
    color: var(--gv-ink2, var(--gv-muted));
}

.gv-dtype__head strong {
    color: var(--gv-ink);
}

/* every type shows: rows of up to 5 on a phone's card, 4 in the desktop card (no hidden scroll) */
.gv-dtype__row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
    gap: 6px;
}

/* as the pot card's Which pot (.qe-pot): surface tile, inset ring + tint when on, dimmed while saving */
.gv-dtype__opt {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-height: 44px;
    padding: 5px 2px 6px;
    border-radius: 10px;
    border: 1px solid var(--gv-border);
    background: var(--gv-surface);
    color: var(--gv-ink);
}

.gv-dtype__opt:hover:not(:disabled, [aria-disabled="true"]) {
    border-color: var(--gv-mid);
}

.gv-dtype__opt.is-on {
    border-color: var(--gv-deep);
    box-shadow: inset 0 0 0 1px var(--gv-deep);
    background: var(--gv-tint);
}

.gv-dtype__opt.is-busy {
    opacity: 0.6;
}

.gv-dtype__opt:disabled {
    opacity: 0.45;
    border-style: dashed;
}

.gv-dtype__art {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 34px;
}

.gv-dtype__art img {
    max-width: 86%;
    max-height: 34px;
    object-fit: contain;
}

.gv-dtype__label {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--gv-ink);
    text-align: center;
    overflow-wrap: break-word;
    hyphens: auto;
    /* held to the option's width (F50): never past its edge where the browser can't hyphenate */
    max-width: 100%;
    min-width: 0;
}

.gv-dtype__opt.is-on .gv-dtype__label {
    color: var(--gv-brand-ink);
    font-weight: 700;
}


/* --- plants in the ground (ground.js) ------------------------------------- */

/* The tray's "Plants in the ground" group: small cards, 3 a row on phones, 4 from 768 px */
.gv-tray__ground {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 2px 0;
}

@media (min-width: 768px) {
    .gv-tray__ground {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* desktop: the full-width tray under the picture, eight a row (ground.js cardsPerRow 'desk') */
@media (min-width: 1024px) {
    .gv-tray__ground {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}

.gv-tray__ground .gv-card {
    width: auto;
    min-width: 0;
}

.gv-tray__all {
    width: 100%;
    margin-top: 6px;
}

/* the item sheet's Height row: "Height 4.0 m full-grown · Change", or the field while typing */
.gv-gheight {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-top: 10px;
    padding: 4px 4px 4px 12px;
    min-height: 52px;
    border-radius: 8px;
    background: var(--gv-tint);
    font-size: 0.9375rem;
    font-variant-numeric: tabular-nums;
}

.gv-gheight__label {
    color: var(--gv-muted);
}

.gv-gheight__value {
    color: var(--gv-ink);
    white-space: nowrap;
}

.gv-gheight__note {
    color: var(--gv-muted);
    font-size: 0.8125rem;
}

.gv-gheight__tall {
    margin: 6px 0 0;
    padding: 0 4px;
}

.gv-gheight__change {
    margin-left: auto;
    min-height: 44px;
    padding: 0 10px;
    color: var(--gv-brand-ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gv-gheight.is-editing {
    padding: 8px 12px;
}

.gv-gheight.is-editing .gv-gheight__in {
    width: 6.5rem;
    height: 44px;
    padding: 0 10px;
    border: 1px solid var(--gv-border);
    border-radius: 8px;
    background: var(--gv-surface);
    color: var(--gv-ink);
    font-size: 1rem; /* 16 px: iOS doesn't zoom into the field */
    font-variant-numeric: tabular-nums;
}

.gv-gheight.is-editing .gv-gheight__in[aria-invalid='true'] {
    border-color: var(--gv-danger);
}

.gv-gheight__preview,
.gv-gheight__hint {
    flex-basis: 100%;
    margin: 0;
    font-size: 0.8125rem;
}

.gv-gheight__preview {
    min-height: 1.2em;
    color: var(--gv-ink);
    font-weight: 600;
}

.gv-gheight__preview.is-error {
    color: var(--gv-danger);
}

.gv-gheight__preview:empty {
    display: none;
}

.gv-gheight__hint {
    color: var(--gv-muted);
}

/* the narrow column beside the picture: the label over the field, so Save and Cancel stay on its line */
.gv-isheet.is-docked .gv-gheight.is-editing .gv-gheight__label {
    flex-basis: 100%;
}

.gv-isheet.is-docked .gv-gheight.is-editing .gv-gheight__in {
    flex: 1 1 4rem;
    min-width: 0;
}

/* --- the sky choice (sky.js): the dashboard's sky, light and lamps on the picture ----- */

/* the stage keeps the sky behind its picture and the washes' screen blend inside it */
.gv-stage {
    isolation: isolate;
}

/* Two .garden-scene boxes, so garden_scene.css's sky (gradient, stars, sun, moon, clouds,
   washes, fireflies) applies as on the dashboard; here they only cover the picture. */
.gv-skyback.garden-scene,
.gv-skyfx.garden-scene {
    position: absolute;
    left: 0;
    top: 0;
    /* sky.js fitLayers: the painted size, zoomed to the picture's (the sky zooms with it every frame) */
    width: 100%;
    height: 100%;
    zoom: var(--gv-sky-zoom, 1);
    border-radius: 0;
    overflow: hidden;
    pointer-events: none;
}

.gv-skyback.garden-scene {
    z-index: -1;
}

/* the washes blend with the picture under them (no stacking context of their own) */
.gv-skyfx.garden-scene {
    background: none !important;
    isolation: auto;
}

.gv-skyback.garden-scene::after,
.gv-skyfx.garden-scene::after {
    content: none;
}

.gv-skyback[hidden],
.gv-skyfx[hidden] {
    display: none;
}

/* A room's wall turn (editor.js turnWall, wall_turn.js): the old wall's picture in a box over the
   scroller where it stood, swinging away as the stage's new picture swings in; nothing in the
   picture takes taps (a tap finishes the turn), no handles. */
.gv-turn {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 8px;
    pointer-events: none;
}

.gv-turn__box {
    position: absolute;
    isolation: isolate;
}

/* the margins' covers in a turn between walls of different widths (wall_turn.js marginCovers): over
   both walls, under the corner's controls */
.gv-turn__margins {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 6px;
    pointer-events: none;
}

.gv-pic.is-turning > .gv-scroll {
    overflow: hidden;
}

.gv-pic.is-turning .gv-stage {
    pointer-events: none;
}

.gv-pic.is-turning .gv-stage :is(.gv-ogrip, .gv-size-label, .gv-size-input, .gv-dhandle) {
    visibility: hidden;
}

/* lit lamps over the picture (panorama.js lightsGlow), as .garden-scene__view-glow */
.gv-skyglow {
    position: absolute;
    left: 0;
    top: 0;
    mix-blend-mode: screen;
    pointer-events: none;
}

/* the control: a round button at the picture's top-right corner, the dashboard's Sky pills under it */
.gv-skyctl {
    position: relative;
}

.gv-skyctl__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--gv-border);
    background: var(--gv-tint);
    color: var(--gv-brand-ink);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    cursor: pointer;
}

.gv-skyctl__btn:focus-visible {
    outline: 2px solid #3f6eb5;
    outline-offset: 2px;
}

.gv-skyctl__panel.garden-scene-settings-panel {
    top: 52px;
    right: 0;
    bottom: auto;
    width: max-content;
    min-width: 0;
    max-width: calc(100vw - 32px);
    max-height: none;
}

.gv-skyctl__panel[hidden] {
    display: none;
}

/* the pills keep the dashboard's look, a little larger to tap on the picture */
.gv-skyctl .garden-scene-theme-pill {
    min-height: 32px;
    padding: 4px 12px;
    font-size: 13px;
}

/* the editor's grips and size labels stay over the sky's washes and fireflies (z-index up to 40) */
.gv-stage:has(> .gv-skyfx) :is(.gv-ogrip, .gv-size-label, .gv-size-input, .gv-dhandle) {
    z-index: 45;
}


/* The picture's height in a turn (editor.js glideHeight): the page's colour over what the picture
   shows past its eased bottom edge, sliding with it. Over the picture, under what follows it. */
.gv-turn__cover {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 6;
    pointer-events: none;
}

/* Finished this season (finished plants plan): the view tray's folded group of
   perennials removed this season; their cards fade as their pictures do */
.gv-group--finished {
    font-family: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
    font-weight: 500;
    background: transparent;
    padding: 0 2px;
}

.gv-count--muted {
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-weight: 400;
    color: var(--gv-ink2);
    opacity: 0.8;
}

/* (the owner's cleared-plants look, --finished-opacity on <html>: a tray card is
   never hidden, Hide fades it as Faded) */
.gv-card--finished .gv-card__art,
.gv-isheet__art--finished {
    opacity: var(--finished-opacity, 0.45);
}

/* A finished card keeps its line off the border at 390 ("Removed 23 Nov",
   "Eliminada 23 nov"): more inner room than a live card (Neon 9) */
.gv-card--finished {
    padding-inline: 8px;
}

/* A finished plant's line ("Removed 3 Mar"): full muted strength (only the
   picture fades), wrapping between words (balanced), never cut off */
.gv-card__finished {
    max-width: 100%;
    text-wrap: balance;
    font-size: 0.6875rem;
    line-height: 1.2;
    text-align: center;
    color: var(--gv-ink2);
    overflow-wrap: break-word;
}

/* A mouse over a door, window, wall or floor a click would pick (editor.js onHover): a pointer and a
   light outline, desktop's cue that the picture takes clicks. Beats the pan cursor (.can-pan). */
.gv-scroll .gv-stage.is-pickable {
    cursor: pointer;
}

.gv-hover {
    position: absolute;
    z-index: 1;
    box-sizing: border-box;
    border: 2px solid rgba(22, 163, 74, 0.55);
    border-radius: 6px;
    background: rgba(22, 163, 74, 0.05);
    pointer-events: none;
}

/* The bed or pot a dragged tray plant would go in (editor.js showInto, F78): a firmer outline. */
.gv-into {
    position: absolute;
    z-index: 2;
    box-sizing: border-box;
    border: 3px solid rgba(22, 163, 74, 0.9);
    border-radius: 8px;
    background: rgba(22, 163, 74, 0.12);
    pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
    .gv-hover {
        transition: opacity 0.12s ease;
    }
}

/* --- the item sheet's quick edits (quick_edit.js, docs/plans/views-quick-edit.md) ------------- */

/* "Change · Size · Kind · Name · Colour": one row under the controls, the sheet's text size */
.qe-change {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--gv-border);
}

.qe-change__label {
    flex: 0 0 auto;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gv-muted);
}

.qe-change__btns {
    flex: 1 1 auto;
    display: grid;
    gap: 6px;
}

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

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

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

.qe-mini {
    min-width: 0;
    padding: 0 6px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* a panel's head: back, what it changes over the item's name, Done */
.qe-back {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--gv-border);
    background: var(--gv-surface);
    color: var(--gv-brand-ink);
}

.qe-panel {
    padding-bottom: 4px;
}

/* Size: label, then - [field] + with big targets */
.qe-step {
    display: grid;
    grid-template-columns: 1fr 52px auto 52px;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.qe-step__label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gv-ink);
}

.qe-step__btn {
    height: 48px;
    border-radius: 10px;
    border: 1px solid var(--gv-border);
    background: var(--gv-surface);
    color: var(--gv-brand-ink);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.qe-step__type {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qe-step__type span {
    font-size: 0.875rem;
    color: var(--gv-muted);
}

.qe-step__input {
    width: 76px;
    min-width: 0;
    min-height: 48px;
    padding: 0 6px;
    border-radius: 10px;
    border: 1px solid var(--gv-border);
    background: var(--gv-surface);
    color: var(--gv-ink);
    font-size: 1.0625rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.qe-step__input:focus {
    outline: 2px solid var(--gv-deep);
    outline-offset: 0;
}

.qe-step__btn:disabled,
.qe-step__input:disabled {
    opacity: 0.4;
}

.qe-fit {
    margin: 10px 0 0;
    font-size: 0.9375rem;
    color: var(--gv-ink2);
}

.qe-fit--out {
    color: #92400e;
    font-weight: 600;
}

.gv-isheet .qe-save {
    margin-top: 12px;
    min-height: 48px;
}

.qe-save:disabled {
    opacity: 0.45;
}

/* a refused size or pot: why, in the panel */
.qe-refusal {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 0.9375rem;
    line-height: 1.4;
}

.qe-refusal p {
    margin: 0;
}

.qe-refusal__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
    color: #991b1b;
    text-decoration: underline;
    text-underline-offset: 3px;
}

html.dark .qe-refusal {
    background: rgba(127, 29, 29, 0.25);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

html.dark .qe-refusal__link {
    color: #fecaca;
}

html.dark .qe-fit--out {
    color: #fbbf24;
}

/* Save size's question, under the steppers (make_room.html's words) */
.qe-mr {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gv-border);
}

.qe-mr__title {
    margin: 0 0 4px;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--gv-ink);
}

.qe-mr__hand {
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--gv-note);
    font-size: 0.875rem;
    color: var(--gv-ink);
}

.qe-mr__intro {
    margin: 0;
    font-size: 0.875rem;
    color: var(--gv-ink2);
}

.qe-mr__lines {
    margin: 6px 0 12px;
    padding-left: 20px;
    list-style: disc;
    font-size: 0.9375rem;
    color: var(--gv-ink);
    font-variant-numeric: tabular-nums;
}

.gv-isheet .qe-mr__btn {
    min-height: 48px;
    margin-top: 8px;
}

/* Kind: the wall drawn, then the words; two to a row */
.qe-kinds {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.qe-kind {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 48px;
    padding: 0 12px 0 10px;
    border-radius: 10px;
    border: 1px solid var(--gv-border);
    background: var(--gv-surface);
    color: var(--gv-ink);
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: left;
}

.qe-kind__art {
    flex: 0 0 auto;
}

.qe-kind.is-on,
.qe-pot.is-on,
.qe-seg__opt.is-on {
    border-color: var(--gv-deep);
    box-shadow: inset 0 0 0 1px var(--gv-deep);
    background: var(--gv-tint);
}

/* Colour: Edit bed's swatches, 44 px circles; "As its kind" under the striped one */
.qe-swatches {
    display: grid;
    grid-template-columns: repeat(6, 44px);
    justify-content: space-between;
    row-gap: 14px;
    align-items: start;
}

.qe-swatch-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 44px;
}

.qe-swatch {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: var(--qe-swatch, #fff);
}

.qe-swatch--kind {
    background: repeating-linear-gradient(135deg, #e7e2d6 0 6px, #f6f3ec 6px 12px);
}

.qe-swatch.is-on {
    box-shadow:
        0 0 0 3px var(--gv-tint, #fff),
        0 0 0 5px var(--gv-deep);
}

.qe-swatch__cap {
    font-size: 0.6875rem;
    line-height: 1.1;
    color: var(--gv-muted);
    text-align: center;
    white-space: nowrap;
}

.qe-note {
    margin: 12px 0 0;
    font-size: 0.8125rem;
    color: var(--gv-muted);
}

/* Name */
.qe-name {
    display: block;
}

.qe-name__input {
    width: 100%;
    min-height: 48px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--gv-border);
    background: var(--gv-surface);
    color: var(--gv-ink);
    font-size: 1rem;
}

/* Which pot: a drawing over its name, one scrolling row */
.qe-pots {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.qe-pots::-webkit-scrollbar {
    display: none;
}

.qe-pot {
    flex: 0 0 104px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 96px;
    padding: 6px 4px;
    border-radius: 10px;
    border: 1px solid var(--gv-border);
    background: var(--gv-surface);
    color: var(--gv-ink);
}

.qe-pot.is-busy {
    opacity: 0.6;
}

.qe-pots--loading .qe-pot {
    background: var(--gv-tint);
}

.qe-pot__art {
    display: block;
    width: 40px;
    height: 40px;
}

.qe-pot__art svg {
    display: block;
}

.qe-pot__label {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
}

.qe-seg {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.qe-seg__opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: 10px;
    border: 1px solid var(--gv-border);
    background: var(--gv-surface);
    color: var(--gv-ink);
    font-size: 0.9375rem;
    font-weight: 600;
}

.qe-seg__opt small {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gv-muted);
}

/* A bed with plants listed: Change folds into one button beside Remove (editor.js foldChips, F85) */
.gv-unfold {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 40px;
    padding: 0 10px;
}

.gv-unfold svg {
    width: 16px;
    height: 16px;
}

/* The docked card with a mouse: the picture's height is all it has (about 400 px at 1280 x 800),
   so its arrows and the plant steppers are a little shorter and two plant rows show on opening
   (F85). Touch keeps the 44-48 px targets. */
@media (pointer: fine) {
    .gv-isheet.is-docked .gv-isheet__head {
        margin-bottom: 8px;
    }

    .gv-isheet.is-docked .gv-nudge {
        height: 40px;
    }

    .gv-isheet.is-docked .gv-isheet__row {
        margin-top: 6px;
    }

    .gv-isheet.is-docked .gv-remove {
        min-height: 36px;
    }

    .gv-isheet.is-docked .gv-unfold {
        min-height: 36px;
    }

    .gv-isheet.is-docked .gv-bplant__btn {
        height: 36px;
    }

    .gv-isheet.is-docked .gv-bplant__count > .gv-bplant__n {
        line-height: 32px;
    }

    .gv-isheet.is-docked .gv-bplant__take {
        min-height: 28px;
    }

    .gv-isheet.is-docked .gv-bplant__name {
        min-height: 28px;
    }

    .gv-isheet.is-docked .gv-bplant__toggle,
    .gv-isheet.is-docked .gv-bplant__name .gv-bplant__card {
        min-height: 32px;
    }
}

/* A drop's question: the header's dismiss is text, not a button that competes with its yes (F103) */
.gv-isheet__cancel {
    border-color: transparent;
    padding-inline: 8px;
    color: var(--gv-ink2);
    text-decoration: underline;
    text-underline-offset: 2px;
}
