:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --ink: #202124;
  --muted: #5f6368;
  --line: #dadce0;
  --line-strong: #bdc1c6;
  --hover: #f1f3f4;
  --active: #202124;
  --active-ink: #ffffff;
  --preview-bg: #f8f9fa;
  --radius: 4px;
  --font: "Roboto", "Helvetica Neue", sans-serif;
  --mono: "Roboto Mono", ui-monospace, monospace;
  /* Match home brand title (Syne / Noto Serif SC) */
  --font-brand: "Syne", "Noto Serif SC", "Songti SC", serif;
  --header-h: 56px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Hide until applyI18n() — also injected by i18n-boot.js for first paint */
html.i18n-pending,
html.i18n-pending body {
  visibility: hidden;
}

html.i18n-ready,
html.i18n-ready body {
  visibility: visible;
}

body {
  display: flex;
  flex-direction: column;
}

a {
  color: var(--ink);
}

.top {
  min-height: var(--header-h);
  height: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
}

.top h1 {
  display: flex;
  align-items: flex-start;
  margin: 0;
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
  position: relative;
}

.top h1 .brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  color: inherit;
  text-decoration: none;
  padding-top: 2px;
}

.top h1 .brand-link:hover {
  text-decoration: none;
}

.top h1 .brand-link:hover .brand-text {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.brand-mark {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.brand-text {
  display: block;
  line-height: 22px;
  height: 22px;
}

.top .meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 28vw;
}

.top-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.top .nav-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 20px;
  border: 0;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.top .nav-link:hover {
  color: var(--ink);
  background: rgba(60, 64, 67, 0.08);
}

.top .nav-link.is-active {
  color: var(--ink);
  background: rgba(60, 64, 67, 0.12);
}

/* Corner mark on brand title (top-right of Geometry Lab) */
.badge {
  flex-shrink: 0;
  margin: -2px 0 0 3px;
  padding: 0 4px;
  font-family: var(--font);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.45;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.search {
  margin-left: auto;
  width: min(420px, 36vw);
}

.search input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  font: inherit;
  font-size: 14px;
  background: var(--preview-bg);
  outline: none;
}

.search input:focus {
  border-color: var(--ink);
  background: var(--panel);
}

/* Header account chip — same voice as .nav-link / soft header controls */
.auth-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 30px;
  margin: 0;
  padding: 0 4px 0 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--preview-bg);
  font-size: 13px;
  line-height: 1.2;
}

.auth-user:has(> .auth-login-btn:only-child) {
  padding: 0;
  border: 0;
  background: transparent;
}

.auth-user-label {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.actions .auth-logout-btn,
.actions .auth-login-btn,
.auth-logout-btn,
.auth-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.actions .auth-login-btn,
.auth-login-btn {
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  font-size: 13px;
  color: var(--muted);
}

.actions .auth-logout-btn:hover,
.actions .auth-login-btn:hover,
.auth-logout-btn:hover,
.auth-login-btn:hover {
  color: var(--ink);
  background: rgba(60, 64, 67, 0.08);
  border-color: var(--line);
}

.actions .auth-login-btn:hover,
.auth-login-btn:hover {
  border-color: var(--line-strong);
  background: var(--hover);
}

.auth-gate-error {
  padding: 16px 20px;
  background: #fce8e6;
  color: #c5221f;
  font-size: 13px;
}

.auth-gate-error a {
  color: #c5221f;
  font-weight: 500;
}

/* Language pill — match nav / login header controls */
.lang-toggle {
  display: inline-flex;
  flex-shrink: 0;
  margin-left: 4px;
}

.lang-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 30px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lang-pill-btn:hover {
  color: var(--ink);
  background: rgba(60, 64, 67, 0.08);
  border-color: var(--line-strong);
}

.lang-pill-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.lang-pill-btn:active {
  background: rgba(60, 64, 67, 0.12);
}

.layout {
  flex: 1;
  min-height: 0;
  display: grid;
  /* Tree · List · Preview · Parameters */
  grid-template-columns:
    minmax(160px, 14%) minmax(260px, 24%) minmax(360px, 1fr) minmax(280px, 26%);
  gap: 0;
}

.panel-params {
  background: var(--panel);
}

.params-panel {
  padding: 12px 14px 24px;
  overflow: auto;
  height: calc(100% - 45px);
}

.params-panel.empty {
  color: var(--muted);
  font-size: 13px;
  padding: 20px 16px;
}

.panel {
  min-height: 0;
  overflow: auto;
  background: var(--panel);
  border-right: 1px solid var(--line);
}

.panel:last-child {
  border-right: none;
}

.panel h2 {
  margin: 0;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}

.panel h2 #count {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 6px;
}

.tree {
  padding: 8px 10px 16px;
  font-size: 13px;
}

.tree details {
  margin-left: 8px;
}

.tree > details {
  margin-left: 0;
}

.tree summary {
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius);
  list-style-position: outside;
  color: var(--ink);
}

.tree summary:hover,
.tree .doc:hover,
.list-item:hover {
  background: var(--hover);
}

.tree .doc,
.list-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 4px 8px 4px 18px;
  border-radius: var(--radius);
}

.tree .doc.active,
.list-item.active {
  background: var(--active);
  color: var(--active-ink);
}

.list {
  padding: 8px 10px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.list-item {
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.list-item .name {
  font-weight: 500;
  font-size: 13px;
}

.list-item .desc {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.list-item.active .desc {
  color: rgba(255, 255, 255, 0.72);
}

.list-item .tags {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 10px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.list-item.active .tag {
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
}

.detail {
  padding: 16px 20px 28px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.detail.empty {
  color: var(--muted);
  font-size: 13px;
  padding: 24px 20px;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail h3 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 400;
}

.detail .desc {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.thumb-wrap {
  display: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 1;
  justify-content: flex-end;
  max-width: 100%;
}

.actions button,
.actions .btn-link {
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  border-radius: 2px;
  padding: 7px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  letter-spacing: 0.01em;
}

.actions button:hover,
.actions .btn-link:hover {
  background: var(--hover);
  border-color: var(--ink);
}

.actions .btn-link.primary {
  background: var(--ink);
  color: var(--active-ink);
  border-color: var(--ink);
}

.top-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.top-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--ink);
}

.actions .btn-link.primary:hover {
  background: #000;
}

.download-menu {
  position: relative;
  display: inline-flex;
}

.actions .download-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px 0 11px;
  border: none;
  border-radius: 15px;
  background: #1a73e8;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.actions .download-trigger:hover {
  background: #1765cc;
  border-color: transparent;
}

.actions .download-trigger:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

.actions .download-trigger:active {
  background: #1558b0;
}

.download-menu.is-open .download-trigger {
  background: #1558b0;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.2);
}

.download-trigger .download-icon {
  flex-shrink: 0;
  opacity: 0.95;
}

.download-trigger .download-caret {
  flex-shrink: 0;
  margin-left: 0;
  opacity: 0.85;
  transition: transform 0.15s ease;
}

.download-menu.is-open .download-caret {
  transform: rotate(180deg);
}

.download-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 11.5rem;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.1),
    0 4px 16px rgba(60, 64, 67, 0.14);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.download-dropdown[hidden] {
  display: none !important;
}

.actions .download-dropdown button {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.actions .download-dropdown button:hover {
  background: rgba(26, 115, 232, 0.08);
  color: #174ea6;
  border-color: transparent;
}

.actions .download-dropdown button:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: -2px;
}

.actions .download-dropdown .dl-fmt {
  font-weight: 500;
}

.actions .download-dropdown .dl-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

.actions .download-dropdown button:hover .dl-hint {
  color: #174ea6;
  opacity: 0.75;
}

.actions .download-dropdown button[hidden] {
  display: none !important;
}

.geo-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--preview-bg);
  padding: 12px;
  margin-bottom: 16px;
  min-height: 420px;
  height: clamp(420px, 58vh, 720px);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.geo-preview.hidden {
  display: none !important;
}

.geo-preview svg {
  width: 100%;
  height: 100%;
  max-height: 100%;
}

.geo-preview .placeholder {
  color: var(--muted);
  font-size: 13px;
}

.kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 12px;
  font-size: 12px;
  margin-bottom: 16px;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  word-break: break-all;
}

.section-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--line-strong);
}

table.params {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 12px;
}

table.params th,
table.params td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
}

table.params th {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.params td.mono {
  font-family: var(--mono);
  font-size: 11px;
}

.status-pill {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 2px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.status-pill.both {
  border-color: var(--ink);
  color: var(--ink);
}

.status-pill.catalog_only {
  border-color: var(--line-strong);
  color: var(--muted);
}

.status-pill.generator_only {
  background: var(--preview-bg);
  color: var(--ink);
}

.note {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--preview-bg);
  font-size: 12px;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

/* Author `display:` rules (e.g. .canvas-bar-check) beat the UA [hidden]
   stylesheet — keep the HTML hidden attribute authoritative. */
[hidden] {
  display: none !important;
}

/* Parametric Studio: tree | preview | parameters */
.studio-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 280px) 1fr minmax(280px, 300px);
}

.studio-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}

.studio-side .section-title {
  padding: 0;
  margin-bottom: 0;
}

.studio-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 0 16px;
  flex-shrink: 0;
}

.nav-mode {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.nav-mode-btn {
  border: 1px solid var(--line);
  background: var(--preview-bg);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: var(--radius);
}

.nav-mode-btn + .nav-mode-btn {
  margin-left: 0;
}

.nav-mode-btn.is-active {
  background: var(--active);
  border-color: var(--active);
  color: var(--active-ink);
}

.nav-mode-btn:hover:not(.is-active) {
  background: var(--hover);
  color: var(--ink);
}

.studio-search {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.studio-side .picker-nav {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 4px 0 12px;
}

.studio-search input {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  font: inherit;
  font-size: 13px;
  background: var(--preview-bg);
  outline: none;
}

.studio-search input:focus {
  border-color: var(--ink);
  background: var(--panel);
}

.studio-side .tree {
  flex: 1;
  min-height: 0;
  overflow: auto;
  /* Keep left pad so <details> disclosure markers are not clipped */
  padding: 4px 10px 12px 14px;
}

.studio-side .tree summary {
  list-style-position: inside;
  padding-left: 2px;
}

.studio-side .tree .doc {
  padding-left: 22px;
}

.studio-head {
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--preview-bg);
  flex-shrink: 0;
}

.inspector-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
  min-height: 36px;
}

.inspector-bar-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.inspector-bar .pick-inspector {
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.inspector-bar-opts {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 4px;
  margin-left: auto;
}

.inspector-bar-opts .top-check {
  margin-left: 0;
  white-space: nowrap;
}

.studio-params .empty,
.preview .canvas.empty {
  color: var(--muted);
  font-size: 13px;
  padding: 16px;
}

/* Studio / param panels: catalog | preview | parameters */
.lab-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 300px) 1fr minmax(280px, 320px);
}

.lab-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}

.lab-picker {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.picker-current {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--preview-bg);
}

.picker-crumb {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.picker-title {
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
}

.picker-id {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.picker-search {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.picker-search input {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  font: inherit;
  font-size: 13px;
  background: var(--preview-bg);
  outline: none;
}

.picker-search input:focus {
  border-color: var(--ink);
  background: var(--panel);
}

.picker-nav {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 4px 0 12px;
}

.picker-major {
  margin-top: 4px;
}

.picker-major-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px 6px;
  border: 0;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-align: left;
}

.picker-major-head:hover {
  background: var(--hover);
}

.picker-major-head .count {
  font-weight: 400;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

.picker-major.collapsed .picker-mid {
  display: none;
}

.picker-mid {
  margin: 0 0 6px;
  padding: 0 0 6px;
  border-bottom: 1px solid var(--line);
}

.picker-mid:last-child {
  border-bottom: none;
}

.picker-mid-head {
  padding: 6px 14px 4px 18px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.picker-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 7px 14px 7px 22px;
  cursor: pointer;
  border-radius: 0;
}

.picker-item:hover {
  background: var(--hover);
}

.picker-item.active {
  background: var(--active);
  color: var(--active-ink);
}

.picker-item .sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
  font-family: var(--mono);
}

.picker-item.active .sub {
  color: rgba(255, 255, 255, 0.65);
}

.picker-empty {
  padding: 20px 16px;
  font-size: 13px;
  color: var(--muted);
}

.lab-params {
  min-height: 0;
  overflow: auto;
  padding: 12px 16px 20px;
  border-left: 1px solid var(--line);
  background: var(--panel);
}

.lab-params .section-title {
  margin-bottom: 4px;
}

.picker-prov {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--muted);
  word-break: break-word;
}

.lab-params .param-field {
  margin: 0;
  min-width: 0;
}

.lab-params .param-field[hidden],
.lab-params .param-field.param-filter-hide {
  display: none !important;
}

/* Shared param / tools field label — matches .section-title tone.
   Exclude .top-check (Visibility / impose flags) — those stay sentence-case chips. */
.lab-params .param-field > label,
.studio-tools label:not(.top-check) > span {
  display: block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 4px;
}

.lab-params .param-field > label.is-zh {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 12px;
  font-weight: 500;
}

.lab-params input,
.lab-params select,
.studio-tools input:not([type="checkbox"]):not([type="range"]):not([type="file"]),
.studio-tools select {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
  background: var(--panel);
  color: var(--ink);
}

.lab-params input:focus,
.lab-params select:focus,
.studio-tools input:focus,
.studio-tools select:focus {
  outline: none;
  border-color: var(--ink);
}

.param-filter {
  display: block;
  margin: 0 0 10px;
}

.param-filter input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
  background: var(--preview-bg);
  color: var(--ink);
}

.param-filter input:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--panel);
}

/* Group headers: same voice as .picker-major-head / .section-title */
.param-group {
  margin: 0 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.param-group + .param-group {
  margin-top: 2px;
  padding-top: 2px;
  border-top: 1px solid var(--line);
}

/* Primary sticky already draws a bottom edge — avoid a double rule. */
.lab-params .param-group--primary + .param-group {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.param-group-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 6px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.param-group-summary::-webkit-details-marker {
  display: none;
}

.param-group-summary::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid var(--muted);
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  transition: transform 0.12s ease;
  flex-shrink: 0;
}

.param-group[open] > .param-group-summary::before {
  transform: rotate(90deg);
}

.param-group-title {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.param-group-count {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.param-group .param-grid {
  padding: 2px 0 10px;
  border-top: none;
}

.param-grid {
  display: grid;
  gap: 10px 8px;
}

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

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

.param-grid--stack {
  grid-template-columns: 1fr;
}

.param-field--wide {
  grid-column: 1 / -1;
}

.lab-params .param-group--primary {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--panel);
  margin-bottom: 0;
  padding-bottom: 2px;
  box-shadow: 0 1px 0 var(--line);
}

.lab-params .param-group--primary .param-grid {
  background: transparent;
}

@media (max-width: 360px) {
  .param-grid--dims,
  .param-grid--pair {
    grid-template-columns: 1fr;
  }
}

.impose-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 10px 0 4px;
  width: 100%;
}

.impose-sol-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.impose-sol-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.impose-solution-select {
  flex: 1;
  min-width: 0;
  max-width: 58%;
}

.impose-solution-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 0;
  max-height: 220px;
  overflow: auto;
}

.impose-solution-list[hidden] {
  display: none !important;
}

.impose-sol-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--preview-bg);
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
}

.impose-sol-card:hover {
  border-color: var(--line-strong);
  background: var(--hover);
}

.impose-sol-card.is-active {
  border-color: var(--ink);
  background: var(--panel);
  box-shadow: inset 2px 0 0 var(--ink);
}

.impose-sol-thumb {
  flex-shrink: 0;
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.impose-sol-sheet {
  fill: #f1f3f4;
  stroke: #5f6368;
  stroke-width: 1;
}

.impose-sol-nest {
  fill: #202124;
  fill-opacity: 0.55;
  stroke: none;
}

.impose-sol-meta {
  min-width: 0;
  flex: 1;
}

.impose-sol-title {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.impose-sol-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.impose-stats {
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--preview-bg);
}

.impose-stats[hidden] {
  display: none !important;
}

.impose-stats-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.impose-stats-head strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.impose-eff-bar {
  margin: 8px 0;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.impose-eff-fill {
  height: 100%;
  background: var(--ink);
  border-radius: inherit;
  min-width: 0;
  transition: width 0.15s ease;
}

.impose-stats-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.45;
}

.impose-stats-list li + li {
  margin-top: 2px;
  color: var(--muted);
}

.impose-stats-warn {
  margin: 0;
  font-size: 12px;
  color: #5d4037;
}

.studio-tools label {
  margin-top: 10px;
}

/* Tools-panel checkboxes: same voice as Visibility LT chips / Inspector opts */
.studio-tools .top-check,
.studio-tools .lt-vis .top-check,
.studio-tools .group-vis .top-check,
.studio-tools .impose-flags .top-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.studio-tools .top-check > span,
.studio-tools .lt-vis .top-check span,
.studio-tools .group-vis .top-check span,
.studio-tools .impose-flags .top-check span {
  display: inline;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 400;
  color: inherit;
}

.studio-tools .top-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--ink);
}

.studio-tools .top-check:hover {
  color: var(--ink);
}

.studio-tools input[type="file"] {
  height: auto;
  padding: 6px 0;
  border: none;
  background: transparent;
}

.studio-tool-btn {
  margin-top: 12px;
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  font: inherit;
  cursor: pointer;
}

.studio-tool-btn:hover {
  border-color: var(--ink);
}

.studio-suggest-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  color: #3e2723;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius);
}

.studio-suggest-bar[hidden] {
  display: none !important;
}

.studio-suggest-bar span {
  flex: 1 1 140px;
}

.studio-suggest-bar button {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--panel);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.studio-suggest-bar button:hover {
  border-color: var(--ink);
  background: var(--hover);
}

.studio-banner {
  margin: 0 0 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  color: #5d4037;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius);
}

.studio-params #params.is-locked {
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

.import-layer-map {
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--preview-bg);
  max-height: 180px;
  overflow: auto;
}

.import-layer-map .ilm-title {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}

.import-layer-map .ilm-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
}

.import-layer-map .ilm-row span {
  font-size: 12px;
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-layer-map select {
  width: 100%;
  height: 28px;
  font-size: 12px;
}

.mono {
  font-family: var(--mono);
}

.preview {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--preview-bg);
}

.canvas-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-shrink: 0;
}

.canvas-bar button {
  height: 28px;
  min-width: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--panel);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.canvas-bar button:hover {
  border-color: var(--ink);
  background: var(--hover);
}

.canvas-bar .zoom-label {
  min-width: 3.5rem;
  font-size: 12px;
  color: var(--muted);
}

.canvas-bar-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}

.canvas-bar-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--ink);
}

.canvas-bar-hint {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}

.canvas-bar-sep {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 2px;
}

.canvas-bar button.is-active {
  border-color: var(--ink);
  background: var(--hover);
  font-weight: 600;
}

.tools-block {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.tools-block-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.lt-vis {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.group-vis {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 10px;
  width: 100%;
}

.group-vis .tools-block-title {
  flex: 1 0 100%;
  margin-bottom: 4px;
}

.lt-vis .top-check,
.group-vis .top-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.pick-inspector {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  min-height: 2.6em;
  white-space: pre-wrap;
}

.pick-inspector.is-active {
  color: var(--ink);
}

.canvas-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  cursor: grab;
  touch-action: none;
  background: var(--preview-bg);
}

.canvas-viewport.is-measure {
  cursor: crosshair;
}

.canvas-viewport.is-panning {
  cursor: grabbing;
}

.canvas-viewport.is-3d {
  cursor: default;
}

.canvas-viewport.is-3d .canvas-stage {
  pointer-events: none;
}

.canvas-stage {
  width: 100%;
  height: 100%;
}

.canvas-3d {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: auto;
  background: #f3f3f3;
}

.canvas-3d canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

.canvas-bar-check input[type="range"] {
  width: 88px;
  vertical-align: middle;
  accent-color: var(--ink);
}

.preview .canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
}

.preview .canvas.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}

.preview .canvas svg {
  width: 100%;
  height: 100%;
  display: block;
  /* Flush with viewport — single chrome edge; paper fill lives in SVG user units */
  background: var(--preview-bg, #f3f3f3);
  border: none;
  border-radius: 0;
  pointer-events: none;
}

/* Vector zoom: keep stroke weight in screen px while viewBox camera moves */
.preview .canvas svg :is(line, path, polyline, circle, ellipse, rect) {
  vector-effect: non-scaling-stroke;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px;
  row-gap: 6px;
  padding: 10px 20px 16px;
  font-size: 12px;
  color: var(--muted);
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.legend #stats {
  flex: 1 1 12rem;
  min-width: 0;
  text-align: right;
}

/* Match geometry/core.js STROKE palette */
.legend .cut::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 6px;
  vertical-align: middle;
  background: #c62828;
}

.legend .crease::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 0;
  margin-right: 6px;
  vertical-align: middle;
  background: transparent;
  border-top: 2px dashed #1565c0;
}

.legend .perfo::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 0;
  margin-right: 6px;
  vertical-align: middle;
  background: transparent;
  border-top: 2px dotted #6a1b9a;
}

.legend .cotation::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 6px;
  vertical-align: middle;
  background: #2e7d32;
}

@media (max-width: 1280px) {
  .layout {
    grid-template-columns:
      minmax(140px, 16%) minmax(220px, 26%) minmax(280px, 1fr) minmax(240px, 28%);
  }

  .lab-grid,
  .studio-grid {
    grid-template-columns: minmax(240px, 260px) 1fr minmax(240px, 280px);
  }
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 160px 220px 1fr 240px;
  }

  .layout .panel:nth-child(1) {
    grid-column: 1;
  }

  .layout .panel:nth-child(2) {
    grid-column: 2;
  }

  .layout .panel-preview {
    grid-column: 1 / -1;
  }

  .layout .panel-params {
    grid-column: 1 / -1;
  }

  .lab-grid,
  .studio-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 240px 1fr 260px;
  }

  .lab-params,
  .studio-params {
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .panel {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .geo-preview {
    height: 280px;
    min-height: 240px;
  }
}

/* —— Mobile chrome (≤720px) —— */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle:hover {
  background: var(--hover);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bars {
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

body.nav-open .nav-toggle-bars {
  background: transparent;
}

body.nav-open .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

body.nav-open .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(32, 33, 36, 0.4);
}

/* Drawer lives on <body> while mobile — keep above backdrop, below nothing critical */
.top-nav.is-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  width: min(300px, 86vw);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  /* --mobile-header-h set by nav-mobile.js (accounts for wrapped search row) */
  top: var(--mobile-header-h, var(--header-h));
  padding: 12px 16px 24px;
  padding-right: max(16px, env(safe-area-inset-right));
  height: auto;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px rgba(32, 33, 36, 0.12);
  transform: translateX(105%);
  transition: transform 0.22s ease, visibility 0.22s ease;
  overflow-y: auto;
  visibility: hidden;
  pointer-events: none;
}

body.nav-open .top-nav.is-drawer {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

/* Beat page-specific header rules (e.g. html.home .top.home-top { z-index: 50 }) */
html body.nav-open header.top,
html.home body.nav-open header.top.home-top {
  z-index: 100 !important;
}

.catalog-mobile-bar,
.studio-mobile-bar {
  display: none;
}

.mobile-bar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.mobile-bar-btn:hover {
  background: var(--hover);
}

.mobile-bar-btn[aria-expanded="true"] {
  background: rgba(60, 64, 67, 0.12);
  border-color: var(--ink);
}

.top .actions {
  margin-left: auto;
  margin-bottom: 0;
}

.top > .lang-toggle {
  margin-left: 4px;
}

.top:not(:has(.actions)):not(:has(.search)) > .lang-toggle {
  margin-left: auto;
}

@media (max-width: 720px) {
  html,
  body {
    overflow-x: hidden;
  }

  .top {
    position: sticky;
    top: 0;
    z-index: 60;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 8px max(12px, env(safe-area-inset-right)) 8px
      max(12px, env(safe-area-inset-left));
    padding-top: max(8px, env(safe-area-inset-top));
  }

  .top h1 {
    flex: 1 1 auto;
    min-width: 0;
  }

  .top .badge {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    order: 5;
  }

  .top > .lang-toggle {
    order: 4;
    margin-left: 0;
  }

  .top:not(:has(.actions)) > .lang-toggle {
    margin-left: auto;
  }

  .top .actions {
    order: 3;
    margin-left: auto;
  }

  .top .search {
    order: 10;
    flex: 1 1 100%;
    width: 100%;
    margin-left: 0;
  }

  .top .search input {
    font-size: 16px;
    height: 40px;
  }

  body.nav-open {
    overflow: hidden;
  }

  .top-nav.is-drawer .nav-link {
    display: block;
    padding: 14px 14px;
    border-radius: 10px;
    font-size: 15px;
    color: var(--muted);
    font-weight: 500;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
  }

  .top-nav.is-drawer .nav-link:hover {
    color: var(--ink);
    background: rgba(60, 64, 67, 0.08);
  }

  .top-nav.is-drawer .nav-link.is-active {
    color: var(--ink);
    background: rgba(60, 64, 67, 0.12);
  }

  .auth-user-label {
    max-width: 72px;
  }

  .catalog-mobile-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding: 8px max(12px, env(safe-area-inset-right)) 8px
      max(12px, env(safe-area-inset-left));
    border-bottom: 1px solid var(--line);
    background: var(--panel);
  }

  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(42vh, 1fr) auto;
  }

  .layout .panel:nth-child(1),
  .layout .panel:nth-child(2),
  .layout .panel-preview,
  .layout .panel-params {
    grid-column: 1;
  }

  .layout .panel:nth-child(1) {
    max-height: 28vh;
  }

  .layout .panel:nth-child(2) {
    max-height: 32vh;
  }

  .layout.is-filters-collapsed {
    grid-template-rows: minmax(48vh, 1fr) auto;
  }

  .layout.is-filters-collapsed .panel:nth-child(1),
  .layout.is-filters-collapsed .panel:nth-child(2) {
    display: none;
  }

  .layout .panel-params {
    max-height: 36vh;
  }

  .geo-preview {
    height: min(48vh, 380px);
    min-height: 220px;
  }

  .studio-mobile-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    padding: 8px max(12px, env(safe-area-inset-right)) 10px
      max(12px, env(safe-area-inset-left));
    border-bottom: 1px solid var(--line);
    background: var(--preview-bg);
  }

  .studio-mobile-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
  }

  .studio-mobile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .studio-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    min-height: 0;
  }

  .studio-grid.is-side-collapsed .studio-side {
    display: none;
  }

  .studio-grid.is-params-collapsed .studio-params {
    display: none;
  }

  .studio-grid.is-side-collapsed.is-params-collapsed .preview {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .studio-grid:not(.is-side-collapsed) .preview,
  .studio-grid:not(.is-params-collapsed) .preview {
    display: none;
  }

  .studio-grid:not(.is-side-collapsed).is-params-collapsed .studio-side,
  .studio-grid.is-side-collapsed:not(.is-params-collapsed) .studio-params {
    min-height: 0;
    max-height: none;
    height: 100%;
  }

  .canvas-bar {
    flex-wrap: wrap;
    gap: 6px;
    max-height: none;
  }

  .canvas-bar-hint {
    display: none;
  }

  .inspector-bar {
    flex-wrap: wrap;
  }
}
