@font-face {
  font-family: "AUP Noto Sans";
  src: url("./fonts/NotoSans-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "AUP Noto Sans";
  src: url("./fonts/NotoSans-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "AUP Noto Sans";
  src: url("./fonts/NotoSans-Italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "AUP Noto Sans";
  src: url("./fonts/NotoSans-BoldItalic.ttf") format("truetype");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

.designer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-group);
  padding: 0.75rem;
  background: var(--surface);
  box-shadow: var(--small-shadow);
}

.designer-entry-recovery {
  margin-top: 1.25rem;
  border: 1px solid #e1b86a;
  border-left: 5px solid var(--brand-gold);
  border-radius: var(--radius-group);
  padding: 1rem 1.1rem;
  background: var(--warning-soft);
}

.designer-entry-recovery[hidden] { display: none; }
.designer-entry-recovery h2 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.designer-entry-recovery > p { color: var(--warning-text); }
.designer-entry-recovery .button-row { margin: 0.9rem 0; }
.designer-entry-recovery .recovery-privacy-note { margin-bottom: 0; font-size: 0.76rem; }

.designer-share-status {
  flex-basis: 100%;
}

.designer-share-status:empty {
  display: none;
}

.designer-share-tools {
  width: 100%;
  min-width: 0;
}

.designer-share-tools summary {
  min-height: 44px;
  align-content: center;
  color: var(--brand-green);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.designer-share-tools-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.65rem;
  padding: 0.1rem 0 0.75rem;
}

.designer-share-tools-body .designer-share-status {
  grid-column: 1 / -1;
}

.designer-share-url {
  display: grid;
  min-width: 220px;
  gap: 0.25rem;
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: 760;
}

.designer-share-url input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  padding: 0.55rem 0.65rem;
  background: var(--group-surface);
  color: var(--muted);
  font: 0.76rem/1.35 "Courier New", Courier, monospace;
  text-overflow: ellipsis;
}

.designer-share-url input:focus-visible { color: var(--ink); text-overflow: clip; }

.selected-template-name {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.content-options-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1rem;
  background: var(--surface);
  box-shadow: var(--small-shadow);
}

.content-options-panel h2 {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
  font-size: 1.1rem;
}

.content-step-number {
  display: inline-grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: var(--brand-green);
  color: #ffffff;
  font-size: 0.78rem;
}

.content-options-panel > p {
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.content-option-list {
  display: grid;
  gap: 0.55rem;
}

.content-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  padding: 0.72rem;
  cursor: pointer;
}

.content-option input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.16rem;
  accent-color: var(--brand-green);
}

.content-option span {
  display: grid;
  gap: 0.1rem;
}

.content-option small {
  color: var(--muted);
}

.content-option-fixed {
  cursor: default;
}

@font-face {
  font-family: "AUP Noto Sans";
  src: url("./fonts/NotoSans-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "AUP Atkinson Hyperlegible Next";
  src: url("./fonts/AtkinsonHyperlegibleNext-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "AUP Atkinson Hyperlegible Next";
  src: url("./fonts/AtkinsonHyperlegibleNext-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "AUP Atkinson Hyperlegible Next";
  src: url("./fonts/AtkinsonHyperlegibleNext-Italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "AUP Atkinson Hyperlegible Next";
  src: url("./fonts/AtkinsonHyperlegibleNext-BoldItalic.ttf") format("truetype");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "AUP Atkinson Hyperlegible Next";
  src: url("./fonts/AtkinsonHyperlegibleNext-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "AUP Bitter";
  src: url("./fonts/Bitter-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "AUP Bitter";
  src: url("./fonts/Bitter-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "AUP Bitter";
  src: url("./fonts/Bitter-Italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "AUP Bitter";
  src: url("./fonts/Bitter-BoldItalic.ttf") format("truetype");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "AUP Nunito";
  src: url("./fonts/Nunito-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "AUP Nunito";
  src: url("./fonts/Nunito-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "AUP Nunito";
  src: url("./fonts/Nunito-Italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "AUP Nunito";
  src: url("./fonts/Nunito-BoldItalic.ttf") format("truetype");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "AUP Lora";
  src: url("./fonts/Lora-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "AUP Lora";
  src: url("./fonts/Lora-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "AUP Lora";
  src: url("./fonts/Lora-Italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "AUP Lora";
  src: url("./fonts/Lora-BoldItalic.otf") format("opentype");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

.designer-section {
  padding: 0.85rem 0 2rem;
}

.prototype-notice {
  margin: 0;
  border-left: 3px solid var(--brand-gold);
  border-radius: 0 8px 8px 0;
  padding: 0.6rem 0.7rem;
  background: var(--warning-soft);
  color: var(--warning-text);
  font-size: var(--font-size-caption);
  line-height: 1.45;
}

.designer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: start;
}

.preview-column {
  min-width: 0;
}

@media (min-width: 761px) and (min-height: 760px) {
  .preview-column {
    position: sticky;
    top: 88px;
  }
}

.preview-card,
.settings-card,
.review-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--small-shadow);
}

.preview-card {
  overflow: hidden;
}

.preview-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 1rem;
}

.preview-heading h2 {
  margin: 0;
  font-size: var(--font-size-module-title);
}

.preview-heading-copy {
  display: grid;
  gap: 0.12rem;
}

.preview-heading-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
}

.preview-heading .eyebrow {
  margin: 0 0 0.08rem;
  font-size: var(--font-size-caption);
}

.preview-utility-row {
  border-top: 1px solid var(--line);
  padding: 0 1rem;
  background: var(--paper);
}

.mobile-preview-toggle {
  display: none;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  color: var(--brand-green);
  background: var(--soft);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.designer-preview-view-options {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0;
  overflow: visible;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.designer-preview-view-options button {
  display: grid;
  width: 92px;
  min-width: 92px;
  min-height: 76px;
  grid-template-rows: 50px auto;
  gap: 0.2rem;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 9px;
  padding: 3px;
  color: var(--muted);
  background: var(--soft);
  font: inherit;
  font-size: var(--font-size-caption);
  font-weight: 780;
  line-height: 1.2;
  cursor: pointer;
}

.designer-preview-view-options button:hover { border-color: #7a9687; }
.designer-preview-view-options button:focus-visible { outline: 3px solid var(--focus-ring-soft); outline-offset: 2px; }
.designer-preview-view-options button[aria-current="true"] { border-color: var(--brand-green); box-shadow: 0 0 0 1px var(--brand-green); }
.designer-preview-view-options button:disabled { opacity: 0.5; cursor: not-allowed; }

.designer-preview-thumbnail {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(145deg, #f4f1e9, #e6e3da);
}

.designer-preview-thumbnail::before {
  width: 55%;
  aspect-ratio: 1.7;
  border: 2px solid #425b4d;
  border-radius: 3px;
  background: #30343b;
  content: "";
  box-shadow: 0 3px 5px rgba(32, 35, 31, 0.16);
}

.designer-preview-thumbnail.is-grid {
  background-color: #fbfaf6;
  background-image:
    linear-gradient(to right, rgba(60, 76, 66, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(60, 76, 66, 0.16) 1px, transparent 1px);
  background-size: 10px 10px;
}

.designer-preview-thumbnail.is-wall::after {
  position: absolute;
  left: 50%;
  bottom: -18%;
  width: 70%;
  height: 116%;
  transform: translateX(-50%);
  border: 1px solid #8d918a;
  background: #ddd9d0;
  content: "";
}

.designer-preview-thumbnail.is-wall::before {
  position: relative;
  z-index: 2;
  width: 34%;
}

.designer-live-preview-stage {
  margin: 0.8rem 1rem 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.designer-preview-panel[hidden] { display: none; }
.designer-preview-panel { background: var(--surface); }
.designer-preview-panel.is-grid { padding: clamp(0.75rem, 1.8vw, 1.1rem); }
.designer-preview-panel.is-wall { padding: 0; }

.designer-scale-stage {
  display: grid;
  place-items: center;
  border-radius: 12px;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: linear-gradient(145deg, #f4f1e9, #e6e3da);
}

.designer-scale-frame {
  position: relative;
  width: min(100%, 680px);
  padding: 0 0 1.65rem 1.65rem;
}

.designer-scale-grid {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid #aab2aa;
  border-radius: 6px;
  background-color: #fbfaf6;
  background-image:
    linear-gradient(to right, rgba(60, 76, 66, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(60, 76, 66, 0.16) 1px, transparent 1px);
  background-size: 10% 10%;
}

.designer-scale-label {
  position: absolute;
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: 780;
}

.designer-scale-label-x { right: calc(50% - 0.85rem); bottom: 0; }
.designer-scale-label-y { left: 0; top: calc(50% - 0.5rem); writing-mode: vertical-rl; transform: rotate(180deg); }

.designer-scale-artwork,
.designer-context-artwork {
  display: grid;
  place-items: center;
  pointer-events: none;
}

.designer-scale-artwork {
  position: absolute;
  max-width: 100%;
  max-height: 100%;
}

.designer-scale-artwork svg,
.designer-context-artwork svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0.8cqi 1.1cqi 2cqi rgba(32, 35, 31, 0.2));
}

.designer-context-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border-block: 1px solid #aab2aa;
  background: #ebe7de;
  container-type: inline-size;
}

.designer-context-background {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.designer-context-wall { fill: #eeeae2; }
.designer-context-ground { fill: #cbc4b8; }
.designer-context-floor { stroke: #9da39d; stroke-width: 1; }
.designer-context-door-frame { fill: #b6b4ae; stroke: #777d78; stroke-width: 0.5; }
.designer-context-door { fill: #ddd9d0; stroke: #777d78; stroke-width: 0.45; }
.designer-context-door-handle { fill: #777d78; }
.designer-context-height-reference { fill: #59645d; font-size: 4.4px; font-weight: 700; }
.designer-context-height-reference line { stroke: #68736c; stroke-width: 0.55; stroke-dasharray: 1.7 1.2; }

.designer-context-artwork {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
}

.designer-context-overview-stage {
  position: absolute;
  z-index: 4;
  right: clamp(0.55rem, 2cqi, 0.9rem);
  bottom: clamp(0.55rem, 2cqi, 0.9rem);
  width: clamp(108px, 24%, 154px);
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border: 1px solid rgba(83, 94, 87, 0.62);
  border-radius: 8px;
  background: #ebe7de;
  box-shadow: 0 5px 16px rgba(32, 35, 31, 0.2);
  container-type: inline-size;
}

.designer-context-overview-stage .designer-context-background {
  width: 100%;
  height: 100%;
}

.designer-context-overview-artwork { z-index: 2; }

.designer-context-overview-label {
  position: absolute;
  z-index: 3;
  right: 0.3rem;
  bottom: 0.25rem;
  border-radius: 999px;
  padding: 0.12rem 0.3rem;
  color: #34453b;
  background: rgba(250, 249, 245, 0.9);
  font-size: clamp(0.48rem, 6cqi, 0.6rem);
  font-weight: 800;
  line-height: 1.2;
}

.designer-context-reference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.75rem 0.75rem;
  color: var(--muted);
  font-size: var(--font-size-caption);
}

.designer-context-reference strong { color: var(--ink); }

.designer-preview-status {
  display: flex;
  min-height: 58px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 1rem;
}

.designer-preview-status p { display: grid; gap: 0.15rem; margin: 0; }
.designer-preview-status strong { font-size: 0.74rem; }
.designer-preview-status span { color: var(--muted); font-size: var(--font-size-caption); line-height: 1.4; }

.preview-stage {
  display: grid;
  place-items: center;
  min-height: clamp(420px, 62vh, 680px);
  padding: clamp(0.75rem, 2vw, 1.4rem);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.88), rgba(238,241,234,0.9)),
    linear-gradient(120deg, rgba(215,168,67,0.16), rgba(73,102,112,0.12));
}

.preview-stage svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
}

.preview-caption {
  min-height: 0;
  margin: 0;
  padding: 0.7rem 1rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.settings-column {
  display: grid;
  gap: 0.9rem;
}

.designer-controls-form {
  display: grid;
  min-width: 0;
  gap: 0.9rem;
}

.settings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-group);
  padding: 0.65rem 0.75rem 0.65rem 1rem;
  background: var(--surface);
}

.settings-toolbar .clear-design {
  min-height: 44px;
  color: var(--brand-terra);
}

.settings-card {
  overflow: hidden;
  margin: 0;
  min-inline-size: 0;
  padding: 0;
}

.settings-card[disabled],
.settings-card[data-disabled="true"] {
  opacity: 0.58;
}

.settings-card > legend {
  float: left;
  width: 100%;
  border-bottom: 1px solid var(--line);
  padding: 0;
}

.settings-card > legend + .step-body {
  clear: both;
}

.step-toggle {
  position: relative;
  display: grid;
  gap: 0.12rem;
  width: 100%;
  border: 0;
  padding: 0.78rem 3rem 0.78rem 1rem;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.step-toggle:hover:not(:disabled) {
  background: var(--soft);
}

.step-toggle:focus-visible {
  outline: 3px solid var(--focus-ring-soft);
  outline-offset: -3px;
}

.step-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  font-weight: 800;
}

.step-summary {
  overflow: hidden;
  padding-left: 2.5rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-chevron {
  position: absolute;
  top: 50%;
  right: 1rem;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--brand-bluegray);
  border-bottom: 2px solid var(--brand-bluegray);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 160ms ease;
}

.step-toggle[aria-expanded="true"] .step-chevron {
  transform: translateY(-20%) rotate(225deg);
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.82rem;
}

.settings-card[data-complete="true"] .step-number {
  background: var(--green);
  color: #ffffff;
  font-size: 0;
}

.settings-card[data-complete="true"] .step-number::before {
  font-size: 0.9rem;
  content: "✓";
}

.step-body {
  padding: 1rem;
}

.step-body[hidden] {
  display: none;
}

.step-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

.step-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 220px);
  min-height: 44px;
  border: 1px solid var(--green);
  border-radius: 8px;
  padding: 0.58rem 0.75rem;
  background: var(--green);
  color: #ffffff;
  font-weight: 780;
  cursor: pointer;
}

.step-next:hover:not(:disabled) {
  background: #244b38;
}

.step-next:disabled {
  border-color: var(--line);
  background: var(--soft);
  color: var(--muted);
  opacity: 0.72;
}

.step-next:focus-visible {
  outline: 2px solid var(--surface);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--green);
}

.settings-card[data-collapsed="true"] {
  box-shadow: 0 5px 16px rgba(32, 35, 31, 0.045);
}

.step-help,
.field-help,
.inline-warning {
  color: var(--muted);
  font-size: 0.86rem;
}

.step-help {
  margin-bottom: 0.9rem;
}

.template-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.template-option {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.55rem;
  min-height: 154px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem;
  background: var(--surface);
  cursor: pointer;
}

.template-option[hidden] {
  display: none;
}

.template-option:hover {
  background: var(--soft);
}

.template-option:has(input:checked) {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
  background: rgba(47, 91, 69, 0.07);
}

.template-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.template-copy {
  display: grid;
  gap: 0.12rem;
  align-content: start;
  text-align: center;
}

.template-option small {
  color: var(--muted);
  font-size: 0.78rem;
}

.template-preview {
  display: grid;
  place-items: center;
  min-height: 78px;
  border-radius: 6px;
  background: linear-gradient(145deg, #f5f7f2, #edf1ea);
}

.template-preview svg {
  display: block;
  width: 100%;
  max-width: 120px;
  height: 76px;
  overflow: visible;
}

.template-sign,
.template-safe-area,
.template-text,
.template-divider,
.template-band {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.template-sign {
  fill: #ffffff;
  stroke: #7c8b81;
  stroke-width: 2;
}

.template-safe-area {
  stroke: #aeb8af;
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}

.template-text {
  stroke: var(--brand-bluegray);
}

.template-text.primary {
  stroke-width: 6;
}

.template-text.secondary {
  stroke-width: 3.5;
}

.template-text.identifier {
  stroke-width: 8;
}

.template-text.band-title {
  stroke: var(--green);
  stroke-width: 5;
}

.template-text.short {
  stroke-width: 2.5;
}

.template-divider {
  stroke: var(--brand-gold);
  stroke-width: 2.5;
}

.template-divider.vertical {
  stroke-width: 2;
}

.template-band {
  fill: rgba(215, 168, 67, 0.18);
  stroke: none;
}

.template-option:has(input:checked) .template-preview {
  background: rgba(47, 91, 69, 0.1);
}

.template-option:has(input:focus-visible) {
  outline: 2px solid var(--surface);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--green);
}

.code-status {
  min-height: 1.35em;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.code-status[data-state="success"] {
  color: var(--green);
}

.code-status[data-state="error"] {
  color: #8b2e1b;
  font-weight: 700;
}

.shape-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.shape-option {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  background: var(--surface);
  cursor: pointer;
}

.shape-option:hover {
  background: var(--soft);
}

.shape-option:has(input:checked) {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
  background: rgba(47, 91, 69, 0.07);
}

.shape-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.shape-option[data-option-disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

.shape-option:has(input:focus-visible),
.swatch-option:has(input:focus-visible) {
  outline: 2px solid var(--surface);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--green);
}

.shape-icon {
  display: block;
  width: 30px;
  height: 30px;
  overflow: visible;
  color: var(--brand-bluegray);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.designer-dimension-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
}

.designer-dimension-control > .field-label {
  grid-column: 1;
}

.designer-dimension-control > select {
  width: 100%;
  min-width: 0;
}

.designer-dimension-steppers {
  display: grid;
  grid-template-columns: repeat(2, minmax(44px, 1fr));
  width: 100%;
  gap: 0.35rem;
}

.designer-dimension-steppers button {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--brand-green);
  background: var(--surface);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 850;
  cursor: pointer;
}

.designer-dimension-steppers button:hover:not(:disabled) {
  border-color: var(--brand-green);
  background: var(--soft);
}

.designer-dimension-steppers button:focus-visible {
  outline: 3px solid var(--focus-ring-soft);
  outline-offset: 2px;
}

.designer-dimension-steppers button:disabled {
  color: #8c9690;
  background: #e8ebe9;
  cursor: not-allowed;
  opacity: 0.65;
}

.size-presets {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.size-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.size-preset {
  min-height: 44px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  padding: 0.48rem 0.35rem;
  background: var(--surface);
  color: var(--ink);
  font-weight: 740;
  cursor: pointer;
}

.size-preset:hover,
.size-preset[aria-pressed="true"] {
  border-color: var(--green);
  background: rgba(47, 91, 69, 0.08);
}

.size-preset[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1px var(--green);
}

.edge-border-group {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nested-options {
  margin: 0;
  min-inline-size: 0;
  border: 0;
  padding: 0;
}

.nested-options > legend {
  margin-bottom: 0.45rem;
  padding: 0;
}

.segmented-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
}

.segmented-options.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented-options label {
  position: relative;
  cursor: pointer;
}

.segmented-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-options label > span {
  display: grid;
  gap: 0.12rem;
  height: 100%;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem;
  background: var(--surface);
  text-align: center;
}

.segmented-options label:hover > span {
  background: var(--soft);
}

.segmented-options input:checked + span {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
  background: rgba(47, 91, 69, 0.08);
}

.segmented-options input:focus-visible + span,
.size-preset:focus-visible {
  outline: 2px solid var(--surface);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--focus-ring);
}

.segmented-options small {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.25;
}

.edge-shape-note {
  margin: 0.85rem 0 0;
}

.dimension-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.field-group {
  display: grid;
  gap: 0.35rem;
}

.field-label {
  font-size: 0.88rem;
  font-weight: 760;
}

.field-label-row,
.field-label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.designer-context-help {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.designer-context-help-trigger {
  display: inline-grid;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: #52685c;
  background: transparent;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.designer-context-help-trigger > span {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid #7d9185;
  border-radius: 50%;
  background: var(--surface);
  font-size: var(--font-size-caption);
  font-weight: 850;
  line-height: 1;
}

.designer-context-help-trigger:hover,
.designer-context-help-trigger[aria-expanded="true"] {
  background: transparent;
}

.designer-context-help-trigger:hover > span,
.designer-context-help-trigger[aria-expanded="true"] > span {
  border-color: var(--brand-green);
  background: var(--soft);
  color: var(--brand-green-dark);
}

.designer-context-help-trigger:focus-visible {
  outline: 3px solid var(--focus-ring-soft);
  outline-offset: 2px;
}

.designer-context-help-popover {
  position: fixed;
  inset: auto;
  display: none;
  box-sizing: border-box;
  width: min(20rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  border: 1px solid #81988c;
  border-radius: 9px;
  padding: 0.7rem 0.78rem;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(21, 32, 27, 0.2);
  font-size: 0.78rem;
  font-weight: 560;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: normal;
}

.designer-context-help-popover:popover-open,
.designer-context-help-popover[data-fallback-open="true"] {
  display: block;
}

.designer-context-help-popover[data-fallback-open="true"] {
  z-index: 90;
}

.edge-shape-note:empty {
  display: none;
}

select,
textarea,
input[type="text"] {
  width: 100%;
  border: 1px solid #bfc7b8;
  border-radius: 8px;
  padding: 0.62rem 0.72rem;
  background: var(--surface);
  color: var(--ink);
}

select:disabled,
input:disabled,
button:disabled {
  cursor: not-allowed;
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.swatch-option {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.38rem;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.35rem;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.swatch-option:hover {
  background: var(--soft);
}

.swatch-option:has(input:checked) {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
  color: var(--ink);
}

.swatch-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.swatch {
  display: block;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(32, 35, 31, 0.3);
  border-radius: 50%;
  background: var(--swatch-color);
}

.text-rows {
  display: grid;
  gap: 0.75rem;
}

.text-step-sections {
  display: grid;
  gap: 0.9rem;
}

.text-row {
  display: grid;
  gap: 0.7rem;
}

.text-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.text-row-header > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.row-requirement {
  border-radius: 999px;
  padding: 0.12rem 0.42rem;
  background: var(--soft);
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: 760;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.row-appearance-grid {
  display: grid;
  gap: 0.7rem;
}

.border-material-controls {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

.border-material-controls[hidden] {
  display: none;
}

.font-family-picker {
  position: relative;
  min-width: 0;
}

.font-family-picker-trigger {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  padding: 0.52rem 0.65rem;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.font-family-picker-trigger:hover,
.font-family-picker.is-open .font-family-picker-trigger {
  background: var(--soft);
}

.font-family-picker-trigger:focus-visible {
  outline: 3px solid var(--focus-ring-soft);
  outline-offset: 2px;
  border-color: var(--green);
}

.font-family-picker-value {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 0.25rem;
  white-space: nowrap;
}

.font-family-picker-option-copy {
  display: grid;
  min-width: 0;
  gap: 0.08rem;
}

.font-family-picker-value strong {
  overflow: hidden;
  font-family: var(--font-family-preview);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.font-family-picker-option-copy strong {
  overflow-wrap: anywhere;
  font-family: var(--font-family-preview);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.15;
}

.font-family-picker-value small {
  overflow: hidden;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: var(--font-size-caption);
  line-height: 1.25;
  text-overflow: ellipsis;
}

.font-family-picker-option-copy small {
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: var(--font-size-caption);
  line-height: 1.25;
}

.font-family-picker-chevron {
  flex: 0 0 auto;
  width: 0.52rem;
  height: 0.52rem;
  margin-right: 0.15rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.14rem) rotate(45deg);
  transition: transform 120ms ease;
}

.font-family-picker.is-open .font-family-picker-chevron {
  transform: translateY(0.12rem) rotate(225deg);
}

.font-family-picker-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.35rem);
  right: 0;
  left: 0;
  overflow-y: auto;
  max-height: min(45dvh, 320px);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.3rem;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(21, 32, 27, 0.16);
  overscroll-behavior: contain;
}

.font-family-picker-list[hidden] {
  display: none;
}

.font-family-picker-option {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  min-width: 0;
  min-height: 50px;
  align-items: center;
  gap: 0.4rem;
  border-radius: 7px;
  padding: 0.48rem 0.55rem;
  cursor: pointer;
}

.font-family-picker-option:hover,
.font-family-picker-option.is-active {
  background: var(--soft);
}

.font-family-picker-option[aria-selected="true"] {
  color: var(--green);
  background: #f4f8f5;
}

.font-family-picker-check {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.sign-text-editor-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.sign-text-editor-shell:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(47, 91, 69, 0.16);
}

.sign-text-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid var(--line);
  padding: 0.3rem;
  background: #f8f7f2;
}

.sign-text-toolbar button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 0.25rem 0.45rem;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.sign-text-toolbar button:hover {
  border-color: var(--line);
  background: var(--soft);
}

.sign-text-toolbar button[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--soft);
  color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}

.sign-text-toolbar .sign-clear-formatting {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.sign-text-toolbar-divider {
  width: 1px;
  height: 24px;
  margin: 0 0.1rem;
  background: var(--line);
}

.sign-underline-icon,
.sign-rich-text-underline {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.sign-rich-text-editor {
  position: relative;
  min-height: 62px;
  padding: 0.78rem 0.8rem;
  outline: none;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.sign-rich-text-input {
  position: relative;
}

.sign-rich-text-placeholder {
  position: absolute;
  top: 0.78rem;
  right: 0.8rem;
  left: 0.8rem;
  color: var(--muted);
  opacity: 0.72;
  pointer-events: none;
}

.sign-rich-text-editor:not([data-empty="true"]) + .sign-rich-text-placeholder {
  display: none;
}

.sign-rich-text-paragraph {
  min-height: 1.45em;
  margin: 0;
}

.sign-rich-text-bold { font-weight: 700; }
.sign-rich-text-italic { font-style: italic; }

.sign-rich-text-help {
  color: var(--muted);
  font-size: 0.72rem;
}

.character-height-stepper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.character-height-stepper button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.character-height-stepper output {
  min-width: 70px;
  text-align: center;
  font-weight: 760;
}

.character-height-tools small {
  color: var(--muted);
}

.row-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 0.38rem;
}

.material-use-finish-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.material-use-finish-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 2rem 0.55rem 0.65rem;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

.material-color-picker {
  min-width: 0;
  margin-top: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.material-color-picker > summary {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  list-style: none;
}

.material-color-picker-header {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0.65rem;
  background: #f8faf7;
}

.material-color-picker > summary::-webkit-details-marker { display: none; }
.material-color-picker[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #f8faf7;
}

.material-color-picker-value {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 760;
}

.material-color-picker-value > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-color-picker-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.material-color-picker[open] .material-color-picker-chevron { transform: rotate(225deg); }
.material-color-options { padding: 0.55rem; }
.material-swatch-disclosure { margin: 0.65rem 0 0; }

.locked-option-value {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.35;
}

.text-color-picker {
  align-self: end;
  margin-top: 0;
}

.secondary-text-color-control {
  display: grid;
  min-width: 0;
  gap: 0.5rem;
}

.additional-text-color-toggle {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 0.55rem;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  background: var(--soft);
  cursor: pointer;
}

.additional-text-color-toggle input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--brand-green);
}

.additional-text-color-toggle > span {
  display: block;
}

.additional-text-color-toggle strong {
  color: var(--ink);
  font-size: 0.74rem;
}

.additional-text-color-toggle:has(input:focus-visible) {
  outline: 3px solid var(--focus-ring-soft);
  outline-offset: 2px;
}

.additional-text-color-toggle[data-activation-feedback="true"] {
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
  animation: additional-text-color-activated 900ms ease-out;
}

@keyframes additional-text-color-activated {
  0%,
  100% {
    background: var(--soft);
    box-shadow: 0 0 0 0 rgba(47, 91, 69, 0);
  }

  35% {
    background: var(--designer-selected-surface);
    box-shadow: 0 0 0 5px rgba(47, 91, 69, 0.16);
  }
}

.row-color-option {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  min-width: 0;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.4rem 0.2rem;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--font-size-caption);
  font-weight: 700;
  cursor: pointer;
}

.row-color-option:hover {
  border-color: #7a9687;
  background: #f8faf7;
}

.row-color-option:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.row-color-option[data-material-availability="backordered"] {
  border-color: #b27a22;
}

.material-availability-label {
  color: var(--warning-text);
  font-size: var(--font-size-caption);
  line-height: 1.15;
}

.row-color-option[data-material-availability="out_of_stock"] .material-availability-label,
.row-color-option[data-material-availability="unassigned"] .material-availability-label {
  color: var(--danger-text);
}

.row-color-option[aria-pressed="true"] {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
  color: var(--ink);
  background: var(--selected-surface);
}

.row-color-option[aria-pressed="true"]::after {
  position: absolute;
  right: 3px;
  bottom: 3px;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  content: "✓";
  font-size: .52rem;
  font-weight: 900;
}

.row-color-option:focus-visible,
.add-line-slot:focus-visible {
  outline: 2px solid var(--surface);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--green);
}

.row-color-swatch {
  width: 27px;
  height: 27px;
  border: 1px solid rgba(32, 35, 31, 0.3);
  border-radius: 50%;
  background: var(--swatch-background, var(--swatch-color));
}

.character-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.character-count[data-count-state="shrinking"] {
  color: #806000;
}

.character-count[data-count-state="limit"] {
  color: var(--danger-text);
}

.sign-text-editor-shell:has(.sign-rich-text-editor[aria-invalid="true"]) {
  border-color: #a63e28;
  box-shadow: 0 0 0 1px #a63e28;
}

.row-validation {
  margin: 0;
  border-left: 3px solid transparent;
  border-radius: 0 7px 7px 0;
  padding: 0.44rem 0.6rem;
  font-size: 0.78rem;
  line-height: 1.4;
}

.row-validation[data-state="ready"] {
  border-left-color: #78a18b;
  background: transparent;
  color: var(--green);
}

.row-validation[data-state="ready"]::before {
  margin-right: .32rem;
  content: "✓";
  font-weight: 900;
}

.row-validation[data-state="incomplete"] {
  border-left-color: var(--line);
  color: var(--muted);
  background: transparent;
}

.row-validation[data-state="error"] {
  border-left-color: #a63e28;
  background: var(--danger-soft);
  color: var(--danger-text);
  font-weight: 700;
}

.remove-row {
  min-height: 44px;
  border: 0;
  padding: 0.25rem 0;
  color: var(--brand-terra);
  background: transparent;
  font-weight: 760;
  cursor: pointer;
}

.add-line-slot {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  border: 1.5px dashed #9aab9d;
  border-radius: 9px;
  padding: 0.75rem 0.8rem;
  background: rgba(245, 248, 242, 0.72);
  color: var(--green);
  text-align: left;
  cursor: pointer;
}

.add-line-slot:hover:not(:disabled) {
  border-color: var(--green);
  background: rgba(47, 91, 69, 0.07);
}

.add-line-slot:disabled {
  border-color: #c8cec5;
  color: var(--muted);
  opacity: 0.72;
}

.add-line-slot > span:last-child {
  display: grid;
  gap: 0.12rem;
}

.add-line-slot small {
  color: var(--muted);
  font-size: 0.74rem;
}

.add-line-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
}

.small-control {
  min-height: 44px;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  padding: 0.55rem 0.75rem;
  background: var(--surface);
  color: var(--ink);
  font-weight: 740;
  cursor: pointer;
}

.small-control:hover:not(:disabled) {
  background: var(--soft);
}

.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.toggle-row input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 0.12rem;
  accent-color: var(--green);
}

.toggle-copy {
  display: grid;
  gap: 0.15rem;
}

.toggle-copy strong {
  line-height: 1.3;
}

.braille-notice {
  margin: 0.85rem 0 0;
  border-left: 3px solid var(--brand-gold);
  padding: 0.65rem 0.75rem;
  background: var(--warning-soft);
  color: var(--warning-text);
  font-size: 0.82rem;
}

.template-policy-notice {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.9rem;
  border-left: 3px solid var(--brand-green);
  padding: 0.75rem;
  background: var(--success-soft);
  color: var(--success-text);
}

.template-policy-notice span {
  font-size: 0.82rem;
  line-height: 1.45;
}

.validation-summary {
  margin-bottom: 0.9rem;
}

.validation-summary[data-state="ready"] {
  color: var(--green);
  font-weight: 760;
}

.validation-summary[data-state="incomplete"] {
  color: var(--muted);
}

.validation-summary[data-state="error"] {
  color: #8b2e1b;
  font-weight: 760;
}

.review-list {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.38rem 0.75rem;
  margin: 0;
}

.review-list dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.review-list dd {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 650;
}

.review-row-appearance {
  display: block;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.review-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.review-actions .button:first-child {
  grid-column: 1 / -1;
}

.message-list {
  margin: 0.65rem 0 0;
  padding-left: 1.2rem;
  color: #8b2e1b;
  font-size: 0.82rem;
}

.message-list:empty {
  display: none;
}

.temporary-color-note {
  margin: 0.65rem 0 0;
  color: var(--brand-bluegray);
  font-size: 0.8rem;
}

@media (max-width: 940px) {
  .template-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .designer-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.95fr);
  }

  .preview-stage {
    min-height: 480px;
  }
}

@media (max-width: 760px) {
  .catalog-group-heading {
    display: grid;
    gap: 0.5rem;
  }

  .catalog-card-featured {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }

  .designer-layout {
    grid-template-columns: 1fr;
  }

  .preview-column {
    position: static;
  }

  .preview-stage {
    min-height: clamp(190px, 30vh, 280px);
    max-height: 32vh;
    padding: 0.55rem;
  }

  .preview-stage svg { max-height: 29vh; }
  .preview-caption:not([hidden]) { display: block; font-size: 0.72rem; }
  .preview-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
  .preview-heading-controls { display: contents; }
  .mobile-preview-toggle { grid-column: 2; grid-row: 1; }
  .designer-preview-view-options {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-end;
    width: 100%;
    padding-top: 0.65rem;
    overflow-x: auto;
  }
  .designer-scale-stage { padding: 1rem 0.65rem; }
  .designer-scale-frame { width: min(100%, 52vh); padding: 0 0 1.5rem 1.5rem; }
  .designer-context-reference { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
  .mobile-preview-toggle { display: inline-flex; align-items: center; }
  .preview-column:has(.preview-card.is-mobile-collapsed) {
    position: sticky;
    z-index: 15;
    top: calc(var(--header-height, 72px) + 0.35rem);
  }
  .preview-card.is-mobile-collapsed .designer-preview-view-options,
  .preview-card.is-mobile-collapsed .designer-live-preview-stage,
  .preview-card.is-mobile-collapsed .designer-preview-status,
  .preview-card.is-mobile-collapsed .preview-stage { display: none; }
  .preview-card.is-mobile-collapsed .preview-utility-row,
  .preview-card.is-mobile-collapsed .preview-caption { display: none; }
  .preview-card.is-mobile-collapsed .preview-heading { border-bottom: 0; }
}

@media (max-width: 520px) {
  .template-catalog-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-page {
    padding-top: 2rem;
  }

  .shape-options,
  .swatch-grid,
  .segmented-options,
  .segmented-options.two-up,
  .dimension-grid,
  .edge-border-group,
  .review-actions {
    grid-template-columns: 1fr;
  }

  .material-use-finish-grid { grid-template-columns: 1fr; }
  .material-color-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .font-family-picker-list {
    position: static;
    max-height: min(50dvh, 300px);
    margin-top: 0.35rem;
    box-shadow: none;
  }

  .swatch-option {
    grid-template-columns: 32px minmax(0, 1fr);
    justify-items: start;
    min-height: 50px;
    text-align: left;
  }

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

  .review-actions .button:first-child {
    grid-column: auto;
  }

  .designer-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .designer-toolbar > .button,
  .designer-share-tools .button {
    width: 100%;
    margin-left: 0;
  }

  .designer-share-tools-body {
    grid-template-columns: 1fr;
  }

  .designer-share-tools-body .designer-share-status {
    grid-column: auto;
  }

  .designer-share-url {
    width: 100%;
    min-width: 0;
  }
}

@media (pointer: coarse) {
  .designer-context-help-trigger > span {
    width: 17px;
    height: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
