.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.document-bar {
  max-width: 1510px;
  margin: 0 auto;
  padding: 0 36px 20px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.document-bar > input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #ced7c9;
  padding: 7px 0;
  color: #294e50;
  font:
    20px Georgia,
    serif;
  min-width: 100px;
  flex: 1;
  max-width: 390px;
}
.document-bar > span {
  font-size: 9px;
  color: #8b9486;
  margin-right: auto;
}
.document-bar > button {
  font-size: 11px;
  padding: 8px 12px;
  background: #fffdf6;
}
.document-bar > .primary {
  background: #245c62;
}
.unit-panel {
  padding: 12px 15px;
  margin-bottom: 17px;
}
.unit-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.unit-heading label {
  margin: 0;
  font-size: 11px;
}
.unit-heading select {
  max-width: 225px;
  font-size: 11px;
}
.tile-switcher {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0 10px;
}
.tile-switcher > button {
  position: relative;
  padding: 5px;
  background: #f3f3e9;
  border: 1px solid #dde4d4;
  border-radius: 7px;
  min-width: 0;
}
.tile-switcher > button.active {
  border: 2px solid #42796d;
  padding: 4px;
  background: #e4ecdd;
  box-shadow: 0 0 0 2px #42796d15;
}
.tile-switcher > button > span {
  position: absolute;
  left: 8px;
  top: 8px;
  font-size: 9px;
  font-weight: bold;
  background: #fffef4dd;
  padding: 1px 5px;
  border-radius: 3px;
  color: #315b57;
  z-index: 1;
}
.tile-switcher svg {
  width: 100%;
  height: auto;
  max-height: 100px;
  aspect-ratio: 1;
  display: block;
  pointer-events: none;
}
.tile-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.tile-actions button {
  flex: 1;
  font-size: 9px;
  padding: 6px 8px;
}
.unit-panel .small-note {
  margin: 8px 0 0;
}
.part-color-tools {
  margin-top: 17px;
  padding: 12px;
  background: #edf1e5;
  border-radius: 8px;
}
.part-color-tools .toggle {
  margin: 0;
  font-size: 9px;
  line-height: 1.5;
}
.part-picker-row {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  align-items: center;
}
.part-picker-row select {
  font-size: 10px;
  flex: 1;
  width: 0;
  min-width: 0;
}
.part-picker-row .color-trigger {
  flex: 0 0 62px;
  margin: 0;
  padding: 5px;
  font-size: 8px;
  background: #fffdf5;
}
.part-picker-row .color-trigger i {
  width: 35px;
  height: 24px;
}
.part-picker-row .color-trigger span {
  font-size: 8px;
}
.design-colors .panel-heading h3 {
  font-size: 17px;
}
#designColors {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 10px;
}
#designColors button {
  width: 27px;
  height: 27px;
  border-radius: 5px;
  padding: 0;
  background: var(--color);
  border: 1px solid #0002;
  box-shadow: inset 0 1px 2px #ffffff50;
}
#designColors button:hover {
  outline: 2px solid #b39355;
  outline-offset: 2px;
}
#editor.part-painting [data-id] {
  cursor: crosshair;
}
.picker-targets {
  flex-wrap: wrap;
}
.picker-targets button {
  min-width: 65px;
  flex: 1;
}
.picker-targets button:disabled {
  display: none;
}
.gallery-dialog {
  width: 1100px;
  max-width: calc(100vw - 30px);
  max-height: calc(100dvh - 35px);
  padding: 27px 30px;
  overflow-y: auto;
  background: #f7f5eb;
}
.feature-dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
}
.feature-dialog-heading h2 {
  margin-top: 5px;
  font-size: 29px;
}
.feature-dialog-heading > button {
  font-size: 12px;
  background: #edf0e5;
}
.gallery-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 21px;
}
.gallery-toolbar > p {
  font-size: 11px;
  color: #7e8b7b;
  margin-right: auto;
}
.gallery-toolbar > button {
  font-size: 10px;
  padding: 7px 10px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.gallery-card {
  background: #fffef7;
  border: 1px solid #e0e5d7;
  border-radius: 10px;
  overflow: hidden;
}
.gallery-thumbnail {
  padding: 14px;
  background: #e8e9dd;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-thumbnail svg {
  width: 100%;
  height: 100%;
  box-shadow: 0 4px 12px #304b421b;
  pointer-events: none;
}
.gallery-card-details {
  padding: 13px 14px 15px;
}
.gallery-card-details h3 {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.gallery-card-details p {
  color: #84917e;
  font-size: 9px;
  margin: 7px 0 12px;
}
.gallery-card-details > div {
  display: flex;
  gap: 5px;
}
.gallery-card-details button {
  font-size: 10px;
  padding: 6px 10px;
}
.gallery-delete {
  color: #9e7259;
  margin-left: auto;
  border: 0;
}
.empty-gallery {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
  border: 1px dashed #cbd8c2;
  border-radius: 10px;
  background: #f0f1e5;
}
.empty-gallery > span {
  font-size: 46px;
  color: #a98b4f;
}
.empty-gallery h3 {
  font-size: 25px;
}
.empty-gallery p {
  font-size: 12px;
  color: #7f8d78;
}
.showcase-dialog {
  width: 1250px;
  max-width: calc(100vw - 26px);
  max-height: calc(100dvh - 30px);
  padding: 24px;
  overflow: auto;
  background: #f8f5ec;
}
.showcase-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 25px;
  align-items: start;
}
.scene-view {
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 6px 25px #3c44311a;
  background: #e0d8c7;
  animation: kiln-reveal 0.55s ease both;
}
.scene-view svg {
  width: 100%;
  height: auto;
  display: block;
}
.showcase-settings {
  padding: 4px 0;
}
.showcase-settings > label {
  margin: 13px 0 8px;
}
.showcase-settings label:first-child {
  margin-top: 0;
}
.showcase-settings .wide {
  font-size: 10px;
}
.showcase-dialog .feature-dialog-heading h2 {
  max-width: 850px;
  overflow-wrap: anywhere;
}
@keyframes kiln-reveal {
  from {
    opacity: 0.3;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 1100px) {
  .document-bar {
    padding: 0 20px 18px;
    flex-wrap: wrap;
  }
  .document-bar > span {
    display: none;
  }
  .showcase-layout {
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 18px;
  }
  .gallery-grid {
    gap: 12px;
  }
  .gallery-card-details button {
    padding: 6px 8px;
  }
  .gallery-dialog {
    padding: 23px;
  }
  .tile-switcher {
    gap: 5px;
  }
}
@media (max-width: 820px) {
  .document-bar > input {
    min-width: 200px;
  }
  .document-bar > button {
    font-size: 10px;
  }
  .settings #selectionControls > .part-color-tools {
    grid-column: 1/-1;
    max-width: 400px;
  }
  .showcase-layout {
    grid-template-columns: 1fr;
  }
  .showcase-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
  }
  .showcase-settings > label,
  .showcase-settings > select,
  .showcase-settings > input {
    grid-column: 1/-1;
  }
  .showcase-settings .wide {
    margin-top: 0;
  }
  .showcase-settings > .small-note {
    grid-column: 1/-1;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tile-switcher > button > span {
    left: 5px;
    top: 5px;
  }
  .unit-panel {
    padding: 10px;
  }
  .unit-heading {
    gap: 7px;
  }
  .unit-heading label {
    font-size: 9px;
  }
  .unit-heading select {
    font-size: 10px;
    max-width: 185px;
  }
  .tile-actions button {
    font-size: 8px;
  }
  .gallery-toolbar {
    flex-wrap: wrap;
  }
  .gallery-toolbar > p {
    flex-basis: 100%;
    margin: 0;
  }
  .feature-dialog-heading h2 {
    font-size: 25px;
  }
}
@media (max-width: 500px) {
  .document-bar {
    padding: 0 12px 15px;
    gap: 6px;
  }
  .document-bar > input {
    font-size: 19px;
    max-width: none;
    flex-basis: 100%;
  }
  .document-bar > button {
    padding: 7px 8px;
    flex: 1;
  }
  .unit-heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .unit-heading select {
    max-width: none;
    width: 100%;
  }
  .tile-switcher {
    grid-template-columns: repeat(2, 1fr);
  }
  .tile-switcher svg {
    max-height: 85px;
  }
  .tile-actions {
    gap: 4px;
  }
  .tile-actions button {
    flex-basis: 100%;
  }
  .gallery-dialog,
  .showcase-dialog {
    max-width: calc(100vw - 12px);
    padding: 17px;
  }
  .gallery-grid {
    gap: 9px;
  }
  .gallery-thumbnail {
    padding: 7px;
  }
  .gallery-card-details {
    padding: 10px 8px;
  }
  .gallery-card-details h3 {
    font-size: 15px;
  }
  .gallery-card-details p {
    font-size: 8px;
  }
  .gallery-card-details > div {
    flex-wrap: wrap;
  }
  .gallery-card-details button {
    font-size: 9px;
    padding: 5px 7px;
  }
  .feature-dialog-heading {
    gap: 8px;
    align-items: flex-start;
  }
  .feature-dialog-heading h2 {
    font-size: 22px;
  }
  .feature-dialog-heading > button {
    font-size: 10px;
    padding: 7px;
  }
  .showcase-settings {
    gap: 7px 12px;
  }
  .unit-panel .small-note {
    font-size: 8px;
  }
  .gallery-delete {
    margin-left: 0;
  }
  .gallery-toolbar > button {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene-view {
    animation: none;
  }
}
.preview-surface {
  max-height: none;
  padding: 12px;
}
#fullRepeat {
  aspect-ratio: auto;
}

.repeat-settings {
  display: flex;
  align-items: end;
  gap: 9px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.repeat-settings label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  margin: 0;
}
.repeat-settings input {
  width: 90px;
  padding: 8px;
  border: 1px solid #ccd6c7;
  border-radius: 6px;
  background: #fffef9;
  color: #213f43;
}
.repeat-settings > span:not(.repeat-error) {
  align-self: center;
  margin-top: 18px;
}
.repeat-settings button {
  font-size: 11px;
  padding: 8px 10px;
}
.repeat-error {
  flex-basis: 100%;
  color: #9b493e;
  font-size: 11px;
}
.preview-surface {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 120px;
}
.preview-surface svg {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 460px;
}
#fullRepeat svg {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 540px;
  margin: auto;
}
.archive-link {
  font-size: 12px;
  color: #245c62;
  text-decoration: none;
  margin-left: auto;
  margin-right: 14px;
}
.archive-link:hover {
  text-decoration: underline;
}
@media (max-width: 500px) {
  .intro {
    flex-wrap: wrap;
    gap: 10px;
  }
  .archive-link {
    margin-left: 0;
  }
  .repeat-settings input {
    width: 72px;
  }
  .preview-surface svg {
    max-height: 360px;
  }
}

.selection-modes button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.selection-modes button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.selection-modes .brush-color {
  border: 1px solid #cdd8c5;
  background: #fffdf5;
  padding: 3px 6px;
}
.brush-color i {
  display: block;
  width: 23px;
  height: 23px;
  border-radius: 4px;
  border: 1px solid #0002;
}
.brush-color span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
#editor.part-painting,
#editor.part-painting [data-id] {
  cursor: crosshair;
}
#editor.part-painting [data-paint-index]:hover {
  filter: brightness(1.14);
} /* Compact inspector: tools stay in place; less-used controls expand on demand. */
.inspector {
  padding: 18px 16px;
}
.inspector > .panel-heading {
  padding-bottom: 15px;
  border-bottom: 1px solid #e4e7dc;
  margin-bottom: 15px;
}
.inspector #selectionControls:not([hidden]) {
  display: block;
}
.inspector [hidden],
.color-popover [hidden],
.color-popover[hidden],
.glaze-picker [hidden] {
  display: none !important;
}
.inspector .selected-label {
  margin-bottom: 14px;
}
.inspector .selected-label strong {
  font-size: 13px;
}
.inspector .icon-danger {
  font-size: 10px;
  padding: 4px 6px;
}
.inspector .color-row {
  display: flex;
  gap: 7px;
  margin: 0;
}
.inspector .color-trigger {
  display: flex;
  flex: 1;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 7px 8px;
  min-width: 0;
  background: #fafbf4;
  border: 1px solid #e0e6d8;
  border-radius: 7px;
}
.inspector .color-trigger i {
  display: block;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 5px;
  border: 1px solid #0002;
  box-shadow: none;
}
.inspector .color-trigger span {
  font-size: 10px;
  letter-spacing: 0;
}
.inspector #selectionControls > label {
  font-size: 10px;
  margin: 17px 0 7px;
  display: flex;
  justify-content: space-between;
}
.inspector input[type="range"] {
  margin: 0;
  width: 100%;
}
.inspector #symmetry {
  font-size: 11px;
  padding: 8px;
  margin-bottom: 3px;
}
.inspector-quick-actions {
  display: flex;
  gap: 7px;
  margin: 14px 0 17px;
}
.inspector-quick-actions button {
  flex: 1;
  padding: 7px;
  font-size: 10px;
  background: #f2f5eb;
}
.inspector-disclosure {
  border-top: 1px solid #e3e7dc;
  margin: 0;
}
.inspector-disclosure > summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  list-style: none;
  padding: 13px 1px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #526960;
}
.inspector-disclosure > summary::-webkit-details-marker {
  display: none;
}
.inspector-disclosure > summary:after {
  content: "＋";
  font-size: 15px;
  color: #8a9b86;
}
.inspector-disclosure[open] > summary:after {
  content: "−";
}
.inspector-disclosure > summary:hover {
  color: #245c62;
}
.disclosure-body {
  padding: 0 0 15px;
}
.inspector .part-color-tools {
  margin: 0;
  padding: 0;
  background: none;
}
.inspector .part-color-tools > .small-note {
  display: none;
}
.inspector .part-picker-row {
  flex-direction: column;
  align-items: stretch;
  margin: 0;
}
.inspector .part-picker-row select {
  width: 100%;
  flex: auto;
  padding: 8px;
}
.inspector .part-picker-row .color-trigger {
  flex: auto;
  width: 100%;
  justify-content: flex-start;
  padding: 7px 8px;
}
.inspector .part-picker-row .color-trigger i {
  width: 25px;
  height: 25px;
}
.inspector .part-picker-row .color-trigger span {
  font-size: 10px;
}
.inspector .symmetry-chips {
  margin-top: 15px;
}
.inspector-surface-colors {
  padding: 16px 0;
  border-top: 1px solid #e3e7dc;
}
.inspector-label {
  display: block;
  font-size: 10px;
  color: #7b8b78;
  margin-bottom: 8px;
}
.inspector .design-colors > .panel-heading {
  display: none;
}
.inspector .disclosure-body > label {
  font-size: 10px;
  margin-top: 12px;
}
.inspector .save-motif {
  margin-top: 8px;
}
.inspector .empty-selection {
  font-size: 12px;
  padding: 18px 0;
  margin: 0;
  background: none;
  border: 0;
}
.inspector .pair {
  margin-top: 10px;
}
.inspector .pair button {
  font-size: 10px;
  padding: 7px;
}
/* Local, nonmodal swatches anchored to the clicked colour control. */
.color-popover {
  position: fixed;
  inset: auto;
  margin: 0;
  width: 276px;
  max-width: calc(100vw - 20px);
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  padding: 16px;
  background: #fffef8;
  color: #213f43;
  border: 1px solid #d6dfce;
  border-radius: 12px;
  box-shadow: 0 10px 35px #173e4326;
  font:
    12px/1.5 system-ui,
    sans-serif;
  z-index: 100;
}
.color-popover::backdrop {
  background: transparent;
  pointer-events: none;
}
.popover-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.popover-heading strong {
  font-size: 13px;
}
.popover-heading button {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  background: #edf1e7;
  font-size: 18px;
}
.color-popover label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: #7b8974;
  margin: 13px 0 7px;
}
.color-popover select {
  width: 100%;
  margin: 0;
  padding: 9px 8px;
  border: 1px solid #dce3d3;
  border-radius: 6px;
  background: #f8faf2;
  color: #294f4d;
  font-size: 11px;
}
.popover-wells {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 10px;
}
.popover-swatch {
  padding: 3px;
  height: 40px;
  min-width: 0;
  border: 1px solid #dce4d5;
  border-radius: 6px;
  background: transparent;
}
.popover-swatch i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background: var(--pigment);
  box-shadow: inset 0 0 0 1px #0001;
}
.popover-swatch span {
  display: none;
}
.popover-swatch.chosen {
  outline: 2px solid #b28e54;
  outline-offset: 1px;
}
.popover-wells.compact {
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  margin-top: 0;
}
.compact .popover-swatch {
  height: 25px;
  padding: 2px;
  border-radius: 5px;
}
.color-popover .palette-apply,
.glaze-picker .palette-apply {
  width: 100%;
  padding: 6px 8px;
  margin: 8px 0 0;
  font-size: 10px;
  border: 0;
  background: #edf1e5;
  color: #456b5a;
}
.open-mixer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 13px 0 0;
  margin-top: 15px;
  border: 0;
  border-top: 1px solid #e0e6d8;
  border-radius: 0;
  font-size: 11px;
  text-align: left;
  background: transparent;
  color: #245c62;
}
.open-mixer:hover {
  background: transparent;
  text-decoration: underline;
}

.preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 174px;
  gap: 18px;
  margin-top: 17px;
  align-items: start;
}
.preview-layout .preview-surface {
  margin: 0;
  min-height: 210px;
  align-self: stretch;
}
.preview-controls {
  padding-left: 16px;
  border-left: 1px solid #e2e6d9;
}
.preview-controls .inspector-label {
  margin: 0 0 10px;
}
.preview-controls .repeat-settings {
  margin: 0;
  gap: 7px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.preview-controls .repeat-settings > span:not(.repeat-error) {
  display: none;
}
.preview-controls .repeat-settings label {
  font-size: 9px;
  min-width: 0;
}
.preview-controls .repeat-settings input {
  width: 100%;
  min-width: 0;
  padding: 7px;
}
.preview-controls .repeat-settings button {
  padding: 7px;
  font-size: 10px;
}
.preview-controls .repeat-error {
  grid-column: 1/-1;
  line-height: 1.5;
}
.preview-surface-settings {
  border-top: 1px solid #e2e6d9;
  padding-top: 13px;
  margin-top: 14px;
}
.preview-surface-settings > label {
  font-size: 10px;
  margin: 12px 0 7px;
}
.preview-surface-settings > label:first-child {
  margin-top: 0;
}
.preview-surface-settings input[type="range"] {
  width: 100%;
}
.preview-surface-settings .wide {
  font-size: 10px;
  padding: 8px;
  margin-top: 12px;
}
.repeat-art {
  position: relative;
  display: flex;
  justify-content: center;
  max-width: 100%;
  margin: auto;
  overflow: hidden;
}
.repeat-art svg {
  flex-shrink: 1;
  min-width: 0;
}
.glazed > .repeat-art:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, #fff3, transparent 32%, #ffffff10 66%, transparent);
  box-shadow:
    inset 0 0 0 1px #ffffff50,
    inset 0 0 15px #78957412;
}
@media (max-width: 620px) {
  .preview-layout {
    grid-template-columns: 1fr;
  }
  .preview-controls {
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid #e2e6d9;
  }
  .preview-controls .repeat-settings {
    grid-template-columns: minmax(65px, 1fr) minmax(65px, 1fr) auto auto;
    align-items: end;
  }
  .preview-surface-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 14px;
  }
  .preview-surface-settings .toggle {
    grid-column: 1/-1;
  }
  .preview-surface-settings > label {
    margin-top: 5px;
  }
  .preview-surface-settings .wide {
    grid-column: 1/-1;
  }
  .preview-layout .preview-surface {
    min-height: 150px;
  }
}
.zoom-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: #82907c;
}
.zoom-tools > span {
  font-size: 9px;
  max-width: 210px;
}
.zoom-tools > div {
  display: flex;
  align-items: center;
  gap: 4px;
}
.zoom-tools button {
  padding: 5px 8px;
  font-size: 11px;
  background: #fbfcf5;
}
.zoom-tools output {
  min-width: 40px;
  font-size: 10px;
  text-align: center;
  color: #3b655b;
}
#zoomTools[hidden] {
  display: none;
}
.stage {
  overflow: hidden;
}
#editor {
  touch-action: none;
}
#editor.pan-ready,
#editor.pan-ready [data-id] {
  cursor: grab;
}
#editor.panning,
#editor.panning [data-id] {
  cursor: grabbing;
}
.import-svg {
  font-size: 10px;
  padding: 8px;
  margin: 0 0 14px;
  background: #edf2e4;
}
.object-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 0 0 10px;
}
.object-row {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 6px;
}
.object-row.active {
  border-color: #c7d5ba;
  background: #eff3e7;
}
.object-row.object-hidden .object-select {
  opacity: 0.45;
}
.object-row button {
  font-size: 10px;
  border: 0;
  padding: 5px;
  background: transparent;
}
.object-row .object-select {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.object-select > span {
  display: block;
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 3px;
  background: var(--object-color);
  border: 1px solid #0001;
}
.object-row button[aria-pressed="true"] {
  color: #926d33;
  background: #e9ecdf;
}
.preview-disclosure {
  border-top: 1px solid #e2e6d9;
  margin-top: 14px;
}
.preview-disclosure summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 10px;
  list-style: none;
  padding: 12px 0;
  color: #496c5e;
}
.preview-disclosure summary:after {
  content: "＋";
  font-size: 13px;
}
.preview-disclosure[open] summary:after {
  content: "−";
}
.preview-disclosure summary::-webkit-details-marker {
  display: none;
}
.preview-detail-body > label {
  font-size: 9px;
  margin: 12px 0 6px;
}
.preview-detail-body > label:first-child {
  margin-top: 0;
}
.preview-detail-body select,
.preview-detail-body input[type="number"] {
  width: 100%;
  min-width: 0;
  padding: 7px;
  font-size: 10px;
  color: #315b50;
  background: #fffef8;
  border: 1px solid #dce3d3;
  border-radius: 6px;
}
.preview-detail-body input[type="range"] {
  width: 100%;
}
.preview-detail-body .pair {
  display: flex;
  gap: 6px;
}
.preview-detail-body .pair button {
  flex: 1;
  padding: 8px;
  font-size: 10px;
  background: #ecf1e4;
}
.preview-detail-body .small-note {
  font-size: 9px;
  line-height: 1.6;
}
#printSizeInfo {
  color: #315b50;
  font-weight: 600;
}
@media (max-width: 620px) {
  .zoom-tools {
    flex-wrap: wrap;
  }
  .zoom-tools > span {
    max-width: none;
    font-size: 8px;
  }
  .preview-detail-body {
    max-width: 320px;
  }
  .object-list {
    max-height: 180px;
  }
}
.object-row button svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.border-colors {
  display: flex;
  gap: 6px;
  margin: 12px 0;
}
.border-colors .color-trigger {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  gap: 6px;
  padding: 6px;
  background: #fffef8;
  min-width: 0;
}
.border-colors .color-trigger i {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  box-shadow: none;
  border: 1px solid #0002;
}
.border-colors .color-trigger span {
  font-size: 9px;
}
.region-source {
  display: inline-block;
  color: #537763;
  font-size: 10px;
  margin: -8px 0 15px;
  text-decoration: none;
}
.region-source:hover {
  text-decoration: underline;
}
.region-source[hidden] {
  display: none;
}
.new-tile-dialog {
  width: 1100px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 30px);
  overflow: auto;
  padding: 27px;
  background: #f7f5ec;
  border: 1px solid #d5ddcc;
  border-radius: 14px;
}
.new-tile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 275px;
  gap: 26px;
  align-items: start;
}
.new-tile-choices > label,
.new-tile-options > label {
  font-size: 11px;
  margin: 14px 0 7px;
}
.new-tile-choices > input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d8e0d0;
  border-radius: 7px;
  background: #fffef8;
  color: #254f4b;
  font-size: 13px;
}
.starter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 13px;
}
.starter-heading > span {
  font-size: 9px;
  color: #83917a;
}
.starter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}
.starter-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 7px;
  background: #fffef9;
  min-width: 0;
  border: 1px solid #dde4d3;
  border-radius: 9px;
}
.starter-card > div {
  aspect-ratio: 1;
  overflow: hidden;
  width: 100%;
  border-radius: 5px;
  background: #ececdf;
  pointer-events: none;
}
.starter-card svg {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.starter-card strong {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  margin: 9px 3px 4px;
}
.starter-card > span {
  font-size: 9px;
  color: #829078;
  margin: 0 3px 5px;
  line-height: 1.5;
}
.starter-card.active {
  border: 2px solid #487d67;
  padding: 6px;
  box-shadow: 0 0 0 2px #487d6718;
}
.new-tile-options {
  position: sticky;
  top: 0;
  padding: 14px;
  border: 1px solid #dce3d0;
  border-radius: 9px;
  background: #eef1e4;
}
.new-tile-preview {
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  background: #fffef8;
}
.new-tile-preview svg {
  display: block;
  width: 100%;
  height: 100%;
}
.new-tile-options select {
  width: 100%;
  padding: 9px 7px;
  font-size: 11px;
  border: 1px solid #d6deca;
  border-radius: 6px;
  background: #fffef8;
  color: #315a4f;
}
.new-palette-colors {
  display: flex;
  gap: 5px;
  margin: 9px 0 18px;
}
.new-palette-colors i {
  height: 21px;
  flex: 1;
  border-radius: 4px;
  border: 1px solid #0001;
}
.new-backgrounds {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.new-backgrounds button {
  padding: 3px;
  border-radius: 5px;
  aspect-ratio: 1;
  background: transparent;
}
.new-backgrounds i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--background);
  border: 1px solid #0001;
  border-radius: 3px;
}
.new-backgrounds button.active {
  outline: 2px solid #b78e45;
  outline-offset: 1px;
}
.new-background-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  margin: 10px 0;
  font-size: 10px;
  background: #fffef8;
}
.new-background-custom i {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border: 1px solid #0002;
  border-radius: 4px;
}
.new-tile-options .small-note {
  font-size: 9px;
  line-height: 1.6;
}
.new-tile-options .region-source {
  margin: 5px 0 0;
  font-size: 9px;
}
.new-tile-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid #dce2d0;
  margin-top: 23px;
  padding-top: 16px;
}
.new-tile-footer .small-note {
  margin: 0 0 7px;
  font-size: 10px;
}
.new-tile-footer button {
  font-size: 12px;
  white-space: nowrap;
}
.new-tile-error {
  font-size: 11px;
  color: #9b493c;
  margin: 6px 0 0;
}
.new-tile-dialog [hidden] {
  display: none !important;
}
.glaze-picker.background-only .picker-targets {
  display: none;
}
.header-actions #newTileBtn {
  background: #245c62;
  color: white;
}
@media (max-width: 850px) {
  .new-tile-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 16px;
  }
  .starter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .new-tile-dialog {
    padding: 20px;
  }
  .new-tile-footer {
    align-items: flex-start;
  }
  .new-tile-footer button {
    font-size: 11px;
  }
}
@media (max-width: 600px) {
  .new-tile-layout {
    grid-template-columns: 1fr;
  }
  .new-tile-options {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 15px;
  }
  .new-tile-preview {
    grid-column: 1/-1;
    max-width: 260px;
    justify-self: center;
    width: 100%;
  }
  .new-tile-options > .small-note,
  .new-tile-options > label,
  .new-tile-options > select,
  .new-tile-options > .new-palette-colors,
  .new-backgrounds,
  .new-background-custom,
  .new-tile-options > .region-source {
    grid-column: 1/-1;
  }
  .new-tile-footer {
    flex-direction: column;
    gap: 13px;
  }
  .new-tile-footer > button {
    width: 100%;
  }
  .new-tile-dialog .feature-dialog-heading h2 {
    font-size: 25px;
  }
  .header-actions {
    flex-wrap: wrap;
  }
}

.glaze-picker.background-only #sampleColor {
  display: none;
}
/* The generator is the primary new-work path; examples stay one tab away. */
.generator-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.generator-settings > label {
  display: block;
  font-size: 10px;
  margin: 0;
  min-width: 0;
}
.generator-settings select {
  display: block;
  width: 100%;
  margin-top: 6px;
  font-size: 11px;
  padding: 9px 7px;
}
.generator-settings output {
  float: right;
}
.generator-settings input[type="range"] {
  display: block;
  width: 100%;
  margin-top: 13px;
}
.generator-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.generator-actions button {
  font-size: 11px;
  padding: 10px 13px;
}
.generator-status {
  min-height: 18px;
  font-size: 10px;
  color: #587760;
  margin: 12px 0;
}
.generated-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.generated-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: #fffef8;
  padding: 7px;
  border: 1px solid #dce3d2;
  border-radius: 9px;
  min-width: 0;
}
.generated-card.active {
  border-color: #497e68;
  box-shadow: 0 0 0 2px #497e68;
}
.generated-art {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  width: 100%;
  pointer-events: none;
}
.generated-art > div {
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  background: #ebe9dd;
}
.generated-art svg {
  display: block;
  width: 100%;
  height: 100%;
}
.generated-view-labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 5px;
  margin: 5px 0 9px;
  font-size: 8px;
  color: #84917c;
}
.generated-card > strong {
  font-size: 11px;
  margin: 0 3px 3px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
}
.generated-card > span {
  font-size: 9px;
  margin: 0 3px 5px;
  color: #7d8d77;
}
.candidate-check {
  visibility: hidden;
  color: #47765e;
}
.generated-card.active .candidate-check {
  visibility: visible;
}
.generator-note {
  margin: 14px 0 0;
  font-size: 10px;
  line-height: 1.6;
}
.new-palette-colors:has(.generator-color) {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.generator-color {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 3px;
  min-width: 0;
  border: 1px solid #bacab0;
  border-radius: 6px;
  background: transparent;
  height: 38px;
}
.generator-color i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--swatch);
  opacity: 0.35;
}
.generator-color.active i {
  opacity: 1;
}
.generator-color > span {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  right: 2px;
  bottom: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fffdf4;
  color: #284f44;
  font-size: 10px;
  box-shadow: 0 0 0 1px #0002;
}
.generator-color.active {
  border-color: #426c56;
  box-shadow: 0 0 0 1px #426c56;
}
.generator-color:hover {
  outline: 2px solid #b18a46;
  outline-offset: 2px;
}
@media (max-width: 850px) {
  .creation-modes {
    grid-template-columns: 1fr;
  }
  .creation-mode {
    padding: 12px;
  }
  .creation-mode small {
    font-size: 9px;
  }
  .generated-tiles {
    gap: 9px;
  }
  .generator-actions {
    gap: 6px;
  }
  .generator-actions button {
    padding: 8px;
    font-size: 10px;
  }
}
@media (max-width: 600px) {
  .creation-modes {
    grid-template-columns: 1.2fr 1fr;
    gap: 7px;
  }
  .creation-mode {
    padding: 10px 8px;
    gap: 6px;
  }
  .creation-mode strong {
    font-size: 11px;
  }
  .creation-mark {
    display: none;
  }
  .new-tile-options > #generatorColorHint {
    grid-column: 1/-1;
  }
  .generated-art {
    gap: 4px;
  }
  .generated-card > strong {
    font-size: 10px;
  }
  .generator-settings {
    gap: 12px;
  }
  .new-palette-colors:has(.generator-color) {
    grid-template-columns: repeat(4, 1fr);
  }
}
.style-note {
  margin: 10px 0 0;
  font-size: 10px;
  line-height: 1.6;
  color: #6c7d64;
}
.new-tile-options .background-heading {
  padding-top: 15px;
  border-top: 1px solid #dce3d0;
  margin-top: 17px;
}
.background-heading > span {
  font:
    9px ui-monospace,
    monospace;
  color: var(--muted);
}
.new-backgrounds button {
  position: relative;
}
.new-backgrounds button > span {
  position: absolute;
  right: 1px;
  bottom: 1px;
  background: #fffdf5;
  color: #284f44;
  font-size: 10px;
  line-height: 14px;
  min-width: 14px;
  border-radius: 50%;
}
.new-backgrounds button > span:empty {
  display: none;
}
.new-palette-colors:has(.generator-color) {
  margin-bottom: 10px;
}
.generator-color:not(.active) {
  border-style: dashed;
  box-shadow: none;
}
.generator-color:not(.active) i {
  opacity: 0.28;
}
.new-tile-options #generatorColorHint {
  font-size: 9px;
  line-height: 1.6;
}
.generator-settings select:disabled {
  opacity: 0.65;
  cursor: default;
}
.generator-settings > label:last-child {
  grid-column: 1/-1;
}
.generator-settings > label:last-child input[type="range"] {
  margin-top: 8px;
}
.custom-style-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  padding: 15px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f4e9;
}
.custom-style-controls label {
  display: block;
  font-size: 10px;
  margin: 0;
}
.custom-style-controls output {
  float: right;
}
.custom-style-controls input {
  width: 100%;
  display: block;
  margin-top: 7px;
}
.generator-level {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: #e9ede2;
  border-radius: 7px;
  margin: 18px 0 12px;
  width: fit-content;
}
.generator-level button {
  font-size: 10px;
  border: 0;
  padding: 7px 11px;
}
.generator-level .active {
  background: #fffef8;
  box-shadow: 0 1px 4px #0001;
}
.guide-panel {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px;
  margin: 0 0 15px;
  background: #f5f5ec;
}
.guide-panel h3 {
  font-size: 18px;
}
.guide-panel .small-note {
  font-size: 10px;
  line-height: 1.6;
}
.guide-tools {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.guide-tools label {
  display: block;
  margin: 0;
  font-size: 10px;
}
.guide-tools select {
  display: block;
  margin-top: 5px;
  width: 100%;
  font-size: 10px;
}
.guide-tools input {
  display: block;
  margin-top: 13px;
  width: 100%;
}
.guide-canvas {
  display: block;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  margin: 12px auto;
  border: 1px solid #b8c6ad;
  border-radius: 4px;
  cursor: crosshair;
  overflow: hidden;
  touch-action: none;
}
.guide-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.guide-actions button {
  font-size: 10px;
  padding: 7px 10px;
}
.random-colors {
  display: block;
  width: 100%;
  margin: 8px 0 10px;
  padding: 8px;
  font-size: 11px;
  background: #fffef8;
}
.guide-canvas[hidden] {
  display: none;
}
@media (max-width: 600px) {
  .custom-style-controls {
    gap: 11px;
    padding: 12px;
  }
  .guide-panel {
    padding: 11px;
  }
  .guide-tools {
    grid-template-columns: 1fr 1fr;
  }
  .guide-tools label:last-child {
    grid-column: 1/-1;
  }
  .guide-tools input {
    margin-top: 5px;
  }
  .generator-level button {
    padding: 7px 8px;
    font-size: 9px;
  }
}
.guide-color-sample {
  display: inline-block;
  vertical-align: middle;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  border: 1px solid #0003;
  float: right;
}
.generated-tiles {
  grid-template-columns: 1fr;
}
.single-result {
  padding: 10px;
  cursor: default;
}
.single-result .generated-art {
  grid-template-columns: 1fr;
  max-width: 430px;
  margin: auto;
}
.single-result > strong {
  margin: 12px 3px 4px;
  font-size: 13px;
}
.single-result > span {
  font-size: 10px;
}
.empty-generated-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  min-height: 180px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  background: var(--panel);
  height: 100%;
}
.guide-tools {
  grid-template-columns: 1fr 1fr;
}
.guide-color-desk {
  display: grid;
  grid-template-columns: 112px 130px minmax(90px, 1fr);
  gap: 15px;
  align-items: center;
  padding: 12px 0 16px;
}
.guide-wheel {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  touch-action: none;
  cursor: crosshair;
  flex-shrink: 0;
}
.guide-wheel-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff 0%, #fff0 70%),
    conic-gradient(from 90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  border: 1px solid #0002;
  pointer-events: none;
}
.guide-wheel-cursor {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #0009;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.guide-color-values label {
  display: block;
  margin: 0 0 9px;
  font-size: 10px;
}
.guide-color-values input {
  display: block;
  width: 100%;
  margin-top: 5px;
}
.guide-color-values input[type="text"] {
  padding: 6px 8px;
  font:
    11px ui-monospace,
    monospace;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink);
}
.guide-color-values input[aria-invalid="true"] {
  border-color: #b75643;
}
.guide-used > span {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 8px;
}
.guide-used-colors {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-content: start;
  max-width: 170px;
}
.guide-used-colors button {
  width: 25px;
  height: 25px;
  padding: 0;
  border-radius: 5px;
  background: var(--saved-color);
  border: 1px solid #0003;
}
.guide-used-colors button:hover {
  background: var(--saved-color);
  outline: 2px solid #b99651;
  outline-offset: 2px;
}
.guide-used-colors button[aria-pressed="true"] {
  outline: 2px solid #548875;
  outline-offset: 2px;
}
.guide-used-colors > span {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.6;
}
.guide-wheel:focus-visible {
  outline: 3px solid #d69a49;
  outline-offset: 4px;
}
@media (max-width: 600px) {
  .guide-color-desk {
    grid-template-columns: 100px 1fr;
    gap: 13px;
  }
  .guide-wheel {
    width: 98px;
    height: 98px;
  }
  .guide-used {
    grid-column: 1/-1;
  }
  .guide-used-colors {
    max-width: none;
  }
}
@media (max-width: 600px) {
  .guide-tools label:last-child {
    grid-column: auto;
  }
}
.generator-field {
  min-width: 0;
}
.generator-field > .visual-label {
  margin: 0 0 6px;
}
.generator-field .vc-options .vc-preview {
  height: 65px;
}
.generator-field .vc-rows .vc-preview {
  height: 40px;
}
.new-tile-options #newTilePaletteChoices {
  margin-bottom: 8px;
}
.inspector .symmetry-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 5px;
}
.inspector .symmetry-chips button {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3px;
  font-size: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.symmetry-chips svg {
  width: 42px;
  height: 28px;
}
.inspector .symmetry-chips button.active {
  border-color: var(--teal);
}
.preview-controls .vc-options .vc-preview {
  height: 64px;
}
.preview-controls .vc-dropdown > summary .vc-mini {
  height: 40px;
  width: 45px;
}
.preview-controls .vc-copy small {
  font-size: 8px;
}
.preview-controls .vc-dropdown[open] > .vc-options {
  max-height: 300px;
}
.new-tile-options .vc-dropdown[open] > .vc-options {
  max-height: 240px;
}
.vc-dropdown .vc-option {
  text-transform: none;
  letter-spacing: 0;
}
