/* Your space's views shell (beds_pages/views/*.html, garden_views/shell.js):
   the tab row, a view tab's head, and the New view / Edit view sheets'
   insides. The sheets' frame is the beds sheet frame (_sheet_frame.html). */

/* --- Tab row: All | views | "+" pinned at the end, 44 px pills; the row
   scrolls sideways (long German names) and fades at an edge only while more
   of it lies past that edge (tab_row.js updateTabFades; 28 px = TAB_FADE).
   tab_row.js scrolls the open tab clear of both fades. --- */
.gv-tabs { display: flex; align-items: center; gap: 6px; margin: -8px 0 16px; }
.gv-tabs__scroll {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 4px;
}
.gv-tabs__scroll.is-fade-r {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
.gv-tabs__scroll.is-fade-l {
  -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent);
}
.gv-tabs__scroll.is-fade-l.is-fade-r {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}
.gv-tabs__scroll::-webkit-scrollbar { display: none; }
.gv-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  max-width: 16rem;
  padding: 0 16px;
  border-radius: 9999px;
  border: 1px solid var(--color-surface-border);
  background: var(--color-surface-tint);
  color: var(--color-content-primary);
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* a link on the pages under Your space (_space_top.html) */
  text-decoration: none;
}
/* A name tab is a plain block so text-overflow draws its "…" (a flex box
   ignores it); 42 px line + 1 px borders = 44 px */
.gv-tab:not(.gv-tab--new) { display: inline-block; line-height: 42px; }
.gv-tab:hover { background: var(--color-surface-alt); }
.gv-tab:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
.gv-tab.is-on { background: var(--color-brand); border-color: var(--color-brand); color: var(--color-brand-on); }
/* The open tab may grow to the row less its fades: its whole name where it fits */
.gv-tab.is-on { max-width: calc(100% - 64px); }
.gv-tab--new { flex: none; padding: 0 12px; min-width: 44px; justify-content: center; border-style: dashed; color: var(--color-content-secondary); }
.gv-tab--new svg { width: 18px; height: 18px; fill: currentColor; }

/* --- A view's tab --- */
.gv-view__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.gv-view__title {
  min-width: 0;
  margin: 0;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-weight: 500;
  font-size: 1.125rem;
  color: var(--color-content-primary);
  /* A long name wraps to two lines rather than cutting off */
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.gv-view__actions { display: flex; flex: none; gap: 8px; }
.gv-edit { flex: none; white-space: nowrap; }
/* Add decoration: the sparkle in warm gold, the button itself as quiet as Resize (owner 22:15) */
.gv-edit--fun svg { color: #c9971c; }
html.dark .gv-edit--fun svg { color: #e8b84a; }
@media (prefers-color-scheme: dark) { html:not(.light) .gv-edit--fun svg { color: #e8b84a; } }
/* Resize on: the button reads as pressed */
.gv-edit[aria-pressed="true"], .gv-edit[data-shared="true"] { background: var(--color-brand-light); border-color: var(--color-brand); color: var(--color-brand); }
/* Too long to sit beside the name (shell.js fitEditButton): the pencil only */
.gv-edit.is-icon { padding-left: 0; padding-right: 0; width: 44px; justify-content: center; }
.gv-edit.is-icon .gv-edit__label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.gv-editor { min-height: 240px; }
/* The placeholder takes the picture's shape before the editor draws it, so the
   page doesn't jump when it lands (F26): width over the sky (backdrop.js: at
   least 240 cm, else 60 cm over the structure), half the depth and the 8 cm
   front edge; _view.html sets the view's numbers. Wide screens cap the picture
   at the window under it (editor.js pictureMaxHeight). */
.gv-editor__skeleton {
  position: relative; /* .beds-skeleton is a card's absolute strip: here it stands in for the whole picture */
  inset: auto;
  width: 100%;
  height: auto;
  aspect-ratio: var(--gv-w, 300) / calc(max(240, var(--gv-top, 100) + 60) + var(--gv-d, 100) * 0.5 + 8);
  border-radius: 16px;
}
@media (min-width: 1024px) { .gv-editor__skeleton { max-height: max(280px, calc(100vh - 273px)); } }

/* --- Sheets --- */
.gv-sheet { display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px; }
.gv-field { display: flex; flex-direction: column; gap: 6px; }
.gv-field__label { font-size: 0.8125rem; font-weight: 600; color: var(--color-content-secondary); padding: 0; }
.gv-input {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--color-surface-border);
  background: var(--color-surface-tint);
  color: var(--color-content-primary);
  font-size: 1rem;
}
.gv-input:focus { outline: 2px solid var(--color-focus-ring); outline-offset: 1px; }
.gv-input--num { width: 5.5rem; text-align: right; }
.gv-unit { font-size: 0.875rem; color: var(--color-content-muted); }

.gv-presets { border: 0; margin: 0; padding: 0; min-width: 0; }
.gv-presets__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
/* wider screens: 2 rows of 5, so Walls, Size and the questions stay above the fold (des#4); a phone keeps 3 */
@media (min-width: 640px) { .gv-presets__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.gv-preset {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 4px 4px 6px;
  border-radius: 12px;
  border: 2px solid var(--color-surface-border);
  background: var(--color-surface-tint);
  color: var(--color-content-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  min-height: 44px;
}
.gv-preset.is-on { border-color: var(--color-brand); background: var(--color-brand-light); }
.dark .gv-preset.is-on { background: rgba(var(--color-brand-rgb) / 0.35); }
.gv-preset:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
.gv-preset__thumb { display: block; aspect-ratio: 3 / 2; border-radius: 8px; overflow: hidden; background: var(--color-surface-alt); }
.gv-preset__thumb svg { display: block; width: 100%; height: 100%; }
.gv-preset__label { text-align: center; line-height: 1.2; overflow-wrap: normal; hyphens: manual; } /* two lines when a word needs it (fr "Rebord de fenêtre", O30) */

.gv-chips { display: flex; gap: 6px; }
.gv-chips--wrap { flex-wrap: wrap; }
/* a chip row's own small label over its chips (a greenhouse bench's "Made of", "Held up by") */
.gv-chips__label { flex-basis: 100%; grid-column: 1 / -1; font-size: 0.8125rem; font-weight: 600; color: var(--color-content-secondary); }
/* a greenhouse wall's layout chips on a phone: three even columns, so "3 shelves" never drops onto a line alone */
@media (max-width: 479px) {
  .gv-chips--layout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gv-chips--layout .gv-chip { padding: 0 6px; }
}
.gv-chip {
  min-height: 44px;
  min-width: 44px; /* "Ja" alone was 43 px wide */
  padding: 0 14px;
  border-radius: 9999px;
  border: 1px solid var(--color-surface-border);
  background: var(--color-surface-tint);
  color: var(--color-content-primary);
  font-size: 0.875rem;
  font-weight: 600;
}
.gv-chip.is-on { background: var(--color-brand); border-color: var(--color-brand); color: var(--color-brand-on); }
.gv-chip:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
/* the frame colour swatches (Edit view): the chips' ring, not the browser's (des#7) */
.gv-swatch:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
[hidden].gv-chips, .gv-switch[hidden], .gv-chip.gv-pic-tile[hidden] { display: none; }

/* Back, Floor and Behind as picture tiles, like the preset tiles */
/* auto-fill at 96 px: three to a row on a phone, so the longest single word
   (de "Altstadtdächer") fits a tile without breaking */
.gv-pic-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; align-self: stretch; }
.gv-chip.gv-pic-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 4px 6px;
  border-radius: 12px;
  border: 2px solid var(--color-surface-border);
  background: var(--color-surface);
  font-size: 0.75rem;
  line-height: 1.2;
}
.gv-chip.gv-pic-tile.is-on { border-color: var(--color-brand); background: var(--color-brand-light); color: var(--color-content-primary); }
.dark .gv-chip.gv-pic-tile.is-on { background: rgba(var(--color-brand-rgb) / 0.35); }
.gv-pic-tile__pic { display: block; aspect-ratio: 11 / 7; border-radius: 8px; overflow: hidden; background: var(--color-surface-alt); }
.gv-pic-tile__pic svg { display: block; width: 100%; height: 100%; }
.gv-pic-tile__label { text-align: center; overflow-wrap: normal; word-break: normal; hyphens: manual; min-height: 2.4em; display: flex; align-items: center; justify-content: center; }

.gv-switch { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 0.9375rem; color: var(--color-content-primary); }
.gv-switch input { width: 20px; height: 20px; accent-color: var(--color-brand); }

.gv-rows { display: flex; flex-direction: column; border-top: 1px solid var(--color-surface-border); }
.gv-row { border-bottom: 1px solid var(--color-surface-border); }
.gv-row__head { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 52px; text-align: left; color: var(--color-content-primary); }
.gv-row__title { font-weight: 600; flex: none; min-width: 4.5rem; }
.gv-row__value { flex: 1; min-width: 0; color: var(--color-content-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.gv-row__caret { flex: none; width: 16px; height: 16px; color: var(--color-content-muted); transition: transform 0.15s; }
.gv-row__head[aria-expanded="true"] .gv-row__caret { transform: rotate(180deg); }
/* a room's layout chips: a plain field in the rows' list, no head (neon#12) */
.gv-row__field { padding: 12px 0 14px; }
.gv-row__panel { padding: 0 0 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.gv-row__panel[hidden], .gv-heights[hidden], .gv-questions[hidden], .gv-confirm[hidden], .gv-error[hidden] { display: none; }

.gv-link { min-height: 44px; font-weight: 600; color: var(--color-link); text-decoration: underline; text-underline-offset: 2px; }
.gv-heights { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.gv-height { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.9375rem; color: var(--color-content-primary); }
.gv-height__input { display: inline-flex; align-items: center; gap: 6px; }
/* One structure's heights (New view keeps one set per structure; only the picked one shows) */
.gv-heights__set { display: contents; }
.gv-heights__set[hidden], .gv-link[hidden] { display: none; }

/* views-menus: Behind as one strip (label, live picture, one scrolling row of tiles), New view's size up front,
   and Edit view's rows into the tap sheets (a caret pointing on, not down) */
.gv-behind { display: flex; flex-direction: column; gap: 8px; }
.gv-behind[hidden] { display: none; }
/* not sticky in the strip; z-index auto too: a flex item keeps its z-index unpositioned and painted over New view's sticky Create bar (vis#10) */
.gv-behind .gv-preview { position: static; z-index: auto; }
/* New view: the picture's caption as a chip on the picture (grey text under it went unread), then the Behind
   label set apart from it (it labels the tiles, not the picture) */
.gv-preview-wrap { position: relative; isolation: isolate; } /* the chip stays under the sticky Create bar (vis#10) */
.gv-preview-chip {
  position: absolute; left: 8px; bottom: 8px; z-index: 1; max-width: calc(100% - 16px);
  display: flex; align-items: flex-start; gap: 6px; margin: 0; padding: 6px 12px 6px 8px;
  border-radius: 12px; background: rgb(255 255 255 / 0.94); box-shadow: 0 2px 8px rgb(0 0 0 / 0.18);
  font-size: 0.8125rem; font-weight: 500; line-height: 1.35; color: #1f2937; /* fixed: a white chip over the picture in dark mode too */
}
.gv-preview-chip__icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: #164825; }
.gv-behind__label--after { margin-top: 8px; }
/* the end fades out as the tap sheets' strips do (neon#8: a hard cut mid-word); the room past the last tile scrolls it clear of the fade */
.gv-behind__tiles { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; margin-inline: -2px; padding-inline: 2px 40px; scroll-padding-left: 2px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.gv-behind__tiles .gv-pic-tile { flex: 0 0 96px; scroll-snap-align: start; }
.gv-new-size { gap: 8px; }
.gv-new-size[hidden] { display: none; }
.gv-new-size__row { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.gv-new-size__field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 0; min-width: 164px; }
.gv-new-size__label { font-size: 0.875rem; color: var(--color-content-primary); }
.gv-new-size .gv-stepper { gap: 4px; }
.gv-new-size .gv-input--num { width: 3.25rem; padding-inline: 4px; }
.gv-new-size .gv-hint { margin: 0; font-size: 0.8125rem; color: var(--color-content-muted); }
.gv-row__caret--next { transform: rotate(-90deg); }
.gv-rows--sheets .gv-row__panel .gv-link { align-self: flex-start; }

/* New view: one closed row holding Edit view's rows and questions */
.gv-more { border-top: 1px solid var(--color-surface-border); border-bottom: 1px solid var(--color-surface-border); }
.gv-more__panel { display: flex; flex-direction: column; gap: 14px; padding: 0 0 14px; }
.gv-more__panel[hidden] { display: none; }

.gv-line { font-size: 0.9375rem; color: var(--color-content-secondary); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gv-line[hidden] { display: none; }
/* A sentence then its link on a line of its own (the 44 px link sat off the wrapped text's lines) */
.gv-line--stack { flex-direction: column; align-items: flex-start; gap: 0; }
.gv-questions { display: flex; flex-direction: column; gap: 14px; padding: 12px; border-radius: 12px; background: var(--color-surface-alt); }
.gv-question p { margin: 0 0 6px; font-weight: 600; color: var(--color-content-primary); }
.gv-question .gv-hint { font-weight: 400; font-size: 0.8125rem; color: var(--color-content-muted); }

.gv-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.gv-danger-link { padding: 0 12px; margin-inline-start: -12px; /* text on the rows' edge (O23) */ font-weight: 600; color: var(--color-danger); border-radius: 10px; }
.gv-danger-link:hover { background: rgba(220, 38, 38, 0.08); }
.gv-confirm { padding: 12px; border-radius: 12px; border: 1px solid var(--color-danger); }
.gv-confirm p { margin: 0 0 10px; color: var(--color-content-primary); }
.gv-confirm__buttons { display: flex; justify-content: flex-end; gap: 8px; }
/* walls added: an offer, not a warning */
.gv-confirm--offer { border-color: var(--color-surface-border); background: var(--color-surface-tint); }
.gv-error { margin: 0; font-size: 0.875rem; color: var(--color-danger); }

/* New view's subtitle wraps on phones instead of being cut off (the frame truncates subtitles). */
[data-beds-sheet="view-new"] .beds-sheet__subtitle {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/* Live preview of the view at the top of Edit view / New view's More options:
   sticky so a change in the rows below shows while the user scrolls them */
.gv-preview {
  position: sticky;
  top: 0;
  z-index: 3;
  --gv-preview-min: 110px;
  --gv-preview-max: 140px;
  height: 128px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(#bcdcef, #eef5ee);
  box-shadow: 0 0 0 6px var(--color-surface), 0 8px 10px -8px rgb(0 0 0 / 0.25);
}
.gv-preview[hidden] { display: none; }
.gv-preview__svg { display: block; width: 100%; height: 100%; }
@media (min-width: 640px) { .gv-preview { --gv-preview-min: 150px; --gv-preview-max: 220px; height: 190px; } }

/* Size row: − field + steppers */
.gv-stepper { display: inline-flex; align-items: center; gap: 6px; }
/* between − and + the number sits in the middle (neon 9); a lone height field stays right-aligned */
.gv-stepper .gv-input--num { text-align: center; }
/* an imperial user's length field (units.js): "10 ft 11 in" fits, centred; its unit is in the text */
.gv-input--len { width: 6.25rem; text-align: center; padding-inline: 4px; }
.gv-new-size .gv-input--len { width: 5.75rem; }
/* two of them side by side overflow a phone: an imperial field takes its own row there */
.gv-new-size__field:has(.gv-input--len) { min-width: 200px; }
/* no native spin buttons beside our − and +: their gutter pushed the number off centre on desktop (neon#9) */
.gv-stepper .gv-input--num { -moz-appearance: textfield; appearance: textfield; }
.gv-stepper .gv-input--num::-webkit-outer-spin-button,
.gv-stepper .gv-input--num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gv-step {
  min-width: 44px;
  min-height: 44px;
  border-radius: 9999px;
  border: 1px solid var(--color-surface-border);
  background: var(--color-surface-tint);
  color: var(--color-content-primary);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  touch-action: manipulation;
  user-select: none;
}
.gv-step:active { background: var(--color-brand-light); }
.gv-step:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
.gv-rows--size .gv-row__panel .gv-link { align-self: flex-start; margin-top: 4px; }
.gv-rows--size .gv-height { align-self: stretch; }

/* Resize (resize_edit.js): the grips, the Size sheet */
.gv-handle:focus-visible { outline: 3px solid var(--color-focus-ring); outline-offset: 2px; }
.gv-resize-on .gv-tray__hint { display: none; }
.gv-struct-sheet .gv-struct-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.9375rem; margin-top: 8px; }
.gv-struct-sheet .gv-input--num { width: 4.5rem; }
.gv-resize-clamp { margin: 4px 0 0; text-align: right; font-size: 0.875rem; font-weight: 600; color: var(--color-content-primary); }
.gv-resize-clamp[hidden] { display: none; }

/* --- Discoverability (docs/plans/views.md): users with no view. The "+" chip
   leads, filled in terracotta (the secondary CTA colour; brand green is the
   open tab's), and a "New:" bubble under the row points at it (its arrow at
   --arrow-x, set by shell.js placeCallout). Kept in one block. --- */
.gv-tab--lead { padding: 0 16px 0 12px; border-style: solid; border-color: #a85a38; background: #a85a38; color: #fff; }
.gv-tab--lead:hover { background: #8c4b2e; border-color: #8c4b2e; }
.dark .gv-tab--lead { border-color: #c46f46; background: #c46f46; color: #1f120b; }
.dark .gv-tab--lead:hover { background: #d4896a; border-color: #d4896a; }
.gv-callout {
  --arrow-x: 50%;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -2px 0 16px;
  padding: 10px 6px 10px 14px;
  border: 1.5px solid #d4896a;
  border-radius: 14px;
  background: #fdf5f2;
  color: var(--color-content-primary);
}
.gv-callout__arrow {
  position: absolute;
  top: -9.5px;
  left: calc(var(--arrow-x) - 9px);
  width: 18px;
  height: 18px;
  background: inherit;
  border-left: 1.5px solid #d4896a;
  border-top: 1.5px solid #d4896a;
  transform: rotate(45deg);
  border-top-left-radius: 3px;
}
.gv-callout__text { flex: 1; margin: 2px 0 0; font-size: 0.875rem; line-height: 1.4; }
.gv-callout__text strong { color: #8c4b2e; }
.gv-callout__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -10px 0 -10px -6px;
  border-radius: 9999px;
  color: var(--color-content-secondary);
}
.gv-callout__close:hover { background: rgba(168, 90, 56, 0.1); }
.gv-callout__close svg { width: 16px; height: 16px; }
.dark .gv-callout { background: #2c1a12; border-color: #a85a38; }
.dark .gv-callout__arrow { border-color: #a85a38; }
.dark .gv-callout__text strong { color: #edb09a; }
/* --- end Discoverability --- */

/* Resize, phone: while the floor depth drags, the Size sheet slides down to its top
   strip so the front-edge grip it grows toward stays in sight (editor.js onHandleDown). */
.gv-resize-sheet:not(.is-docked) {
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.gv-resize-sheet.is-lowered {
    transform: translateY(calc(100% - 40px));
}
@media (prefers-reduced-motion: reduce) {
    .gv-resize-sheet:not(.is-docked) { transition: none; }
}

/* --- A room's tab row (docs/plans/views-multi-wall.md "Navigation", shots 01, 04):
   the 3D tab, then the walls in one segmented group, each with a glyph of its
   position (the room from above, its own side thick). 44 px targets. Narrow rows
   fall back by container queries on the row (thresholds by wall count), and
   shell.js fitWalls steps one level further while a name is still cut:
   1. glyph beside the name; 2. glyph over a small name (.is-stacked);
   3. the selected wall keeps its full name, the others show their type (.is-compact). */
.gv-walls { container: gvwalls / inline-size; display: flex; align-items: stretch; gap: 8px; margin: -2px 0 12px; min-height: 50px; }
.gv-walls:empty { visibility: hidden; }
.gv-walls__group {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--color-surface-border);
  border-radius: 9999px;
  background: var(--color-surface-tint);
}
.gv-wtab {
  flex: 0 1 auto;
  min-width: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9999px;
  background: transparent;
  color: var(--color-content-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.15;
  white-space: nowrap;
  transition: background-color 160ms cubic-bezier(.16, 1, .3, 1), color 160ms cubic-bezier(.16, 1, .3, 1);
}
.gv-walls__group .gv-wtab { flex-grow: 1; }
.gv-wtab:hover { color: var(--color-content-primary); background: var(--color-surface-alt); }
.gv-wtab:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
/* One family with the view pills above (design 14): the same tinted pill, border and type; the
   open view is solid brand, the wall (or 3D) shown in it the light brand tint of the same green,
   so the second row reads as the first one's child, not a different control */
.gv-wtab[aria-selected="true"] { background: var(--color-brand-light); border-color: rgb(var(--color-brand-rgb) / 0.35); color: var(--color-brand); }
.gv-wtab--3d { flex: none; min-width: 44px; border-color: var(--color-surface-border); background: var(--color-surface-tint); color: var(--color-content-primary); padding: 0 16px; }
.gv-wtab--3d[aria-selected="true"] { border-color: rgb(var(--color-brand-rgb) / 0.35); background: var(--color-brand-light); color: var(--color-brand); }
.gv-wtab__glyph { flex: none; width: 22px; height: 16px; }
.gv-wtab--3d .gv-wtab__glyph { width: 20px; height: 20px; }
/* max-width: in a stacked (column) tab the text is centred, not stretched: without a cap it took
   its content's width and ran past the tab, so the name never measured as cut (adversarial 6) */
.gv-wtab__text { min-width: 0; max-width: 100%; display: block; }
.gv-wtab__name { display: block; overflow: hidden; text-overflow: ellipsis; }
.gv-wtab__type { display: none; }
@media (prefers-reduced-motion: reduce) { .gv-wtab { transition: none; } }

/* 2. glyph over a small name */
@container gvwalls (max-width: 520px) {
  .gv-walls__group[data-count="3"] .gv-wtab,
  .gv-walls__group[data-count="4"] .gv-wtab,
  .gv-walls:has(.gv-walls__group[data-count="3"]) .gv-wtab--3d,
  .gv-walls:has(.gv-walls__group[data-count="4"]) .gv-wtab--3d { flex-direction: column; gap: 2px; padding: 4px 8px; font-size: 0.75rem; border-radius: 22px; }
  .gv-walls:has(.gv-walls__group[data-count="3"]) .gv-walls__group,
  .gv-walls:has(.gv-walls__group[data-count="4"]) .gv-walls__group { border-radius: 24px; }
}
@container gvwalls (max-width: 300px) {
  .gv-walls__group[data-count="2"] .gv-wtab, .gv-walls:has(.gv-walls__group[data-count="2"]) .gv-wtab--3d { flex-direction: column; gap: 2px; padding: 4px 8px; font-size: 0.75rem; border-radius: 22px; }
  .gv-walls:has(.gv-walls__group[data-count="2"]) .gv-walls__group { border-radius: 24px; }
}
.gv-walls.is-stacked .gv-wtab { flex-direction: column; gap: 2px; padding: 4px 8px; font-size: 0.75rem; border-radius: 22px; }
.gv-walls.is-stacked .gv-walls__group { border-radius: 24px; }

/* 3. the selected wall's full name, the others their type */
@container gvwalls (max-width: 330px) {
  .gv-walls__group[data-count="4"] .gv-wtab:not([aria-selected="true"]) .gv-wtab__name { display: none; }
  .gv-walls__group[data-count="4"] .gv-wtab:not([aria-selected="true"]) .gv-wtab__type { display: block; overflow: hidden; text-overflow: ellipsis; }
}
/* the 3D tab has no short label: it keeps "3D" (hiding it left a nameless button) */
.gv-walls.is-compact .gv-wtab:not([aria-selected="true"], .gv-wtab--3d) .gv-wtab__name { display: none; }
.gv-walls.is-compact .gv-wtab:not([aria-selected="true"], .gv-wtab--3d) .gv-wtab__type { display: block; overflow: hidden; text-overflow: ellipsis; }

/* 3D shown: the 2D editor is hidden (kept mounted, so 2D opens at once) and the head keeps only Edit view */
.gv-editor.is-off { display: none; }
.gv-view.is-3d [data-decor-add],
.gv-room3d { position: relative; }
.gv-room3d[hidden] { display: none; }
/* the Sky button over 3D, where 2D has it (shell.js drawSky3d) */
.gv-room3d__corner { z-index: 6; }
/* the stage's focus ring inside its clipped box (room3d sets outline-offset inline) */
.gv-room3d .gv-room3d__stage:focus-visible { outline-offset: -3px !important; }

/* --- Walls (docs/plans/views-multi-wall.md "Setup"): the layout chips, a
   room's plan from above (room_plan.js) and the picked side under it
   (walls_sheet.js). Three side states on the plan: a solid wall, a hatched
   Building, a dashed Open. Kept in one block. --- */
.gv-layouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gv-layouts__chip { display: inline-flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; padding: 6px 4px; border-radius: 12px; min-height: 52px; line-height: 1.15; text-align: center; font-size: 0.8125rem; }
.gv-layouts__chip span { overflow-wrap: anywhere; hyphens: auto; }
.gv-layouts__pic { width: 22px; height: 16px; flex: none; }
.gv-layouts__floor { fill: var(--color-surface); stroke: var(--color-content-faint); stroke-width: 1; stroke-dasharray: 2 2; }
.gv-layouts__wall { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.gv-layouts__chip.is-on .gv-layouts__floor { fill: transparent; stroke: rgba(255, 255, 255, 0.55); }
@media (min-width: 640px) { .gv-layouts__chip { flex-direction: row; gap: 8px; min-height: 44px; } }
.gv-field--layouts { display: flex; flex-direction: column; gap: 6px; }

/* A greenhouse's frame colour (edit_sheet.html): each swatch a little bar of its metal, lit from the
   top left, in its finish's light, mid and dark tones (backdrop.js FRAME_COLORS) */
.gv-frame[hidden] { display: none; }
.gv-frame__name { font-weight: 400; color: var(--color-content-primary); }
.gv-frame__swatch { cursor: pointer; }
/* the sheet sits outside the editor's --gv-* tokens: its pressed ring in the sheet's own (as .gv-chip.is-on) */
.gv-frame .gv-frame__swatch.is-on { box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-brand); }
.gv-frame__swatch[data-gv-frame-choice="aluminium"] { background: linear-gradient(135deg, #d3d9dc 0%, #9aa4aa 40%, #8b949b 62%, #6f777c 100%); }
.gv-frame__swatch[data-gv-frame-choice="black"] { background: linear-gradient(135deg, #737b82 0%, #3a3f44 40%, #2d3135 62%, #16181a 100%); }
.gv-frame__swatch[data-gv-frame-choice="dark_green"] { background: linear-gradient(135deg, #86a08c 0%, #3b5c49 40%, #2f4d3c 62%, #1a2c22 100%); }
.gv-frame__swatch[data-gv-frame-choice="white"] { background: linear-gradient(135deg, #ffffff 0%, #eceeeb 40%, #e4e6e3 62%, #a9afac 100%); }
.gv-frame__swatch[data-gv-frame-choice="bronze"] { background: linear-gradient(135deg, #a69a8e 0%, #615346 40%, #54473c 62%, #2a231d 100%); }

.gv-wallset { display: flex; flex-direction: column; gap: 12px; }
.gv-plan { border-radius: 12px; background: var(--color-surface-alt); overflow: hidden; min-height: 120px; }
.gv-plan[hidden] { display: none; }
.gv-wallset__hint { margin-top: -4px; text-align: center; } /* New view: the one line under the plan */
.gv-plan__svg { display: block; margin: 0 auto; max-width: 100%; height: auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.gv-plan__floor { fill: var(--color-surface); stroke: var(--color-surface-border); stroke-width: 1; }
.gv-plan__grid { fill: none; stroke: var(--color-surface-border); stroke-width: 0.75; }
.gv-plan__item { pointer-events: none; }
.gv-plan__item--pot { fill: #c98a63; fill-opacity: 0.55; stroke: #a85a38; stroke-opacity: 0.5; stroke-width: 1; }
.gv-plan__item--bed { fill: #8b6b4a; fill-opacity: 0.4; stroke: #6f5338; stroke-opacity: 0.5; stroke-width: 1; }
.gv-plan__item--ground { fill: #5f8f5a; fill-opacity: 0.45; }
.gv-plan__side { cursor: pointer; outline: none; }
.gv-plan__hit { stroke: transparent; stroke-width: 44; stroke-linecap: butt; }
.gv-plan__wall { stroke: var(--color-content-secondary); stroke-width: 6; stroke-linecap: round; }
.gv-plan__wall--glass { stroke: #6f9cc2; }
.gv-plan__wall--thin { stroke-width: 3; }
.gv-plan__wall--none { stroke: var(--color-content-faint); stroke-width: 3; stroke-dasharray: 1 6; }
.gv-plan__open { stroke: var(--color-content-faint); stroke-width: 2; stroke-dasharray: 6 5; }
.gv-plan__building { stroke: none; }
.gv-plan__hatch-bg { fill: var(--color-surface-alt); }
.gv-plan__hatch-line { stroke: var(--color-content-faint); stroke-width: 1.6; }
.gv-plan__building-edge { stroke: var(--color-content-muted); stroke-width: 1.5; }
.gv-plan__label { pointer-events: none; }
.gv-plan__name-bg { fill: var(--color-surface); fill-opacity: 0.9; stroke: none; }
.gv-plan__name { font-size: 12px; font-weight: 600; fill: var(--color-content-muted); pointer-events: none; paint-order: stroke; stroke: var(--color-surface); stroke-width: 3px; stroke-linejoin: round; }
.gv-plan__dim { font-size: 12px; font-weight: 600; fill: var(--color-content-secondary); font-variant-numeric: tabular-nums; }
.gv-plan__tick { fill: none; stroke: var(--color-content-faint); stroke-width: 1; }
/* the picked side in brand green, whatever its state */
.gv-plan__side.is-on .gv-plan__wall, .gv-plan__side.is-on .gv-plan__open, .gv-plan__side.is-on .gv-plan__building-edge { stroke: var(--color-brand); }
.gv-plan__side.is-on .gv-plan__open { stroke-width: 2.5; }
.gv-plan__side.is-on .gv-plan__building-edge { stroke-width: 3; }
.gv-plan__side.is-on .gv-plan__name { fill: var(--color-brand); font-weight: 700; }
.gv-plan__side:focus-visible .gv-plan__hit { stroke: var(--color-focus-ring); stroke-opacity: 0.35; }
.gv-plan__handle { cursor: nwse-resize; outline: none; }
.gv-plan__handle-hit { fill: transparent; }
.gv-plan__handle-dot { fill: var(--color-brand); stroke: var(--color-surface); stroke-width: 3; transition: r 0.15s ease-out; }
/* the two-way diagonal arrow inside it says it drags (neon 9) */
.gv-plan__handle-glyph { fill: none; stroke: var(--color-brand-on, #fff); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.gv-plan__handle.is-dragging .gv-plan__handle-dot, .gv-plan__handle:hover .gv-plan__handle-dot { r: 11; }
.gv-plan__handle:focus-visible .gv-plan__handle-hit { fill: var(--color-focus-ring); fill-opacity: 0.3; }
.dark .gv-plan__item--pot { fill: #d4896a; }
.dark .gv-plan__grid { stroke-opacity: 0.45; }

.gv-side { display: flex; flex-direction: column; gap: 10px; }
.gv-side[hidden] { display: none; } /* New view: no wall picked yet */
.gv-side__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.gv-side__label { min-width: 0; font-weight: 600; color: var(--color-content-primary); }
.gv-side .gv-input--num { width: 5rem; }
.gv-side .gv-link { align-self: flex-start; }
.gv-side__hint { margin: 0; font-size: 0.875rem; color: var(--color-content-muted); }
/* a typed length went to its limit: said once, in the text colour (not an error: it saved) */
.gv-side__clamp { margin: 0; font-size: 0.875rem; font-weight: 600; color: var(--color-content-primary); }
.gv-side__clamp[hidden] { display: none; }
/* Doors and windows (walls_sheet.js openingsMarkup): the wall's picture, then one row per
   door or window like the sheet's other rows; the open one tinted, its fields under it */
.gv-openings { gap: 12px; }
.gv-openings__pic { display: flex; justify-content: center; border-radius: 12px; overflow: hidden; background: linear-gradient(#bcdcef, #eef5ee); }
.gv-openings__pic .gv-preview__svg { flex: none; }
.gv-openings__rows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--color-surface-border); }
.gv-opening-row { border-bottom: 1px solid var(--color-surface-border); }
.gv-opening-row__head { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 10px; text-align: left; color: var(--color-content-primary); border-radius: 10px; }
.gv-opening-row__head:hover { background: var(--color-surface-alt); }
.gv-opening-row__head:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: -2px; }
.gv-opening-row__head[aria-expanded="true"] .gv-row__caret { transform: rotate(180deg); }
.gv-opening-row__label { flex: 1; min-width: 0; font-weight: 600; }
.gv-opening-row__icon { flex: none; box-sizing: border-box; width: 14px; height: 20px; border: 2px solid currentColor; border-bottom-width: 0; border-radius: 3px 3px 0 0; color: var(--color-content-muted); }
.gv-opening-row__icon[data-type="window"] { width: 18px; height: 16px; border-bottom-width: 2px; border-radius: 2px; background: linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat; }
.gv-opening-row.is-open { background: var(--color-brand-light); border-radius: 12px; border-bottom-color: transparent; }
.gv-opening-row.is-open .gv-opening-row__head { color: var(--color-brand); }
.gv-opening-row.is-open .gv-opening-row__icon { color: var(--color-brand); }
.gv-opening-row__fields { padding: 4px 10px 14px; }
.gv-side__narrow { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 8px 10px; border-radius: 8px; background: rgba(217, 119, 6, 0.1); color: var(--color-content-primary); font-size: 0.875rem; }
.gv-side__narrow svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: #b45309; }
.gv-side__narrow[hidden], .gv-pic-tiles[hidden] { display: none; }
.dark .gv-side__narrow svg { color: #f59e0b; }

.gv-wall-confirm__title { margin: 0 0 6px; font-weight: 700; font-size: 0.9375rem; color: var(--color-content-primary); }
.gv-wall-confirm__title[hidden] { display: none; }
/* the per-kind lines (spec "Setup") read as the heading's detail: small and tight, so a U-shape's two walls don't push the plan off a phone (neon 10) */
.gv-wall-confirm__lines { margin: 0 0 10px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; color: var(--color-content-secondary); font-size: 0.8125rem; line-height: 1.35; }
/* the chip or tile tapped while its removal warning waits: dashed, so the pressed one still reads as current */
.gv-chip.is-pending { border: 2px dashed var(--color-danger); }

/* Building and Open tiles */
.gv-open-pic__sky { fill: #e3eef6; }
.gv-open-pic__ground { fill: #d8c8ab; }
.gv-open-pic__edge { stroke: #8a8478; stroke-width: 1.6; stroke-dasharray: 4 4; }

/* Edit view: the picked side's name heads its settings (design review 8) */
.gv-side__name { margin: 0; font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; font-weight: 500; font-size: 1.125rem; color: var(--color-content-primary); overflow-wrap: anywhere; } /* a serif heading over its sans "Length" row (DESIGN.md headings, proto shot 06; neon 9) */
.gv-side__name:empty { display: none; }
/* the walls toast's Undo, reachable inside the sheet */
.gv-sheet-undo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 4px 4px 4px 12px; border-radius: 10px; background: var(--color-surface-tint); color: var(--color-content-primary); font-size: 0.875rem; }
.gv-sheet-undo[hidden] { display: none; }
/* One Undo on screen, the toast's: this keyboard copy shows only while it holds the focus (Tab to it) */
.gv-sheet-undo:not(:focus-within) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gv-sheet-undo__btn { flex: none; min-height: 44px; min-width: 44px; padding: 0 12px; font-weight: 600; }
.gv-confirm__shared { margin-top: 4px; font-weight: 600; }
