@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");
:root {
  font-family: "DM Sans", system-ui, sans-serif;
  color: #29372e;
  background: #f5f4ee;
  font-synthesis: none;
  --green: #244b38;
  --muted: #81877a;
  --line: #e5e6dd;
  --accent: #cbe080;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  transition:
    background 0.15s,
    transform 0.15s;
}
button:active {
  transform: translateY(1px);
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid #82a94f;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.3;
  cursor: default;
}
button:disabled:active {
  transform: none;
}
.topbar {
  height: 78px;
  background: #182c25;
  color: #f7f6ed;
  padding: 0 3.2%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #365044;
}
.brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -1.5px;
}
.brandmark {
  background: #d0df9c;
  color: #1e3929;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 29px;
  font-weight: 400;
}
.brand-dot {
  color: #ccdf8d;
}
.edition {
  border-left: 1px solid #506055;
  letter-spacing: 1.7px;
  font:
    9px "DM Sans",
    sans-serif;
  margin-left: 7px;
  padding-left: 20px;
  color: #a7b3a4;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.local-status {
  font-size: 11px;
  color: #b3c4b4;
  margin-right: 15px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.local-status i,
.view-badge i {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #c6db8c;
  border-radius: 50%;
}
.button {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 13px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 37px;
}
.button.ghost {
  color: #d9e2d7;
  border-color: #4a5c50;
  background: transparent;
}
.button.light {
  background: #e0e9ce;
  color: #233a2b;
}
.button.secondary {
  background: #fff;
  border-color: #dedfd4;
  color: #40533e;
}
.button.primary {
  background: #274d38;
  color: #fafbf3;
}
.button:hover {
  filter: brightness(0.96);
}
.full {
  width: 100%;
}
main {
  max-width: 1680px;
  margin: auto;
  padding: 35px 3.2% 0;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: #788270;
}
.intro h1 {
  font:
    500 clamp(26px, 2.8vw, 39px)/1.2 "Space Grotesk",
    sans-serif;
  letter-spacing: -1.6px;
  margin: 9px 0;
}
.intro h1 > span {
  color: #83a04b;
}
.intro p {
  font-size: 12px;
  color: #7c8375;
  margin: 10px 0 0;
}
.project-tag {
  display: flex;
  gap: 15px;
  align-items: center;
  font-size: 8px;
  letter-spacing: 1.5px;
  line-height: 2;
  color: #8b9283;
}
.project-tag strong {
  font:
    500 15px "Space Grotesk",
    sans-serif;
  color: #344332;
  letter-spacing: 0;
}
.tiny-grid {
  font-size: 39px;
  color: #83966c;
}
.studio {
  display: grid;
  grid-template-columns: 268px minmax(320px, 1fr) 248px;
  gap: 20px;
  align-items: start;
}
.sidebar,
.workspace {
  background: #fdfdf8;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.sidebar section {
  padding: 21px 18px;
  border-bottom: 1px solid var(--line);
}
.sidebar section:last-of-type {
  border-bottom: 0;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 7px;
}
h2 {
  font-family: "Space Grotesk", sans-serif;
}
.section-title h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
}
.section-title h2 > span {
  font:
    10px "DM Sans",
    sans-serif;
  color: #9b9f8e;
  margin-right: 7px;
}
.tag {
  font-size: 7px;
  letter-spacing: 1px;
  color: #8b917d;
  white-space: nowrap;
}
.size-fields {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: 5px;
  align-items: end;
}
label {
  font-size: 10px;
  color: #747d6c;
  display: block;
}
input[type="number"],
select {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid #dedfd3;
  border-radius: 5px;
  background: #f9faf4;
  color: #354630;
  padding: 10px;
  font-size: 11px;
  margin-top: 6px;
}
input[type="number"] {
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  padding: 9px 10px;
}
.swap {
  height: 40px;
  border: 0;
  background: none;
  color: #8e9883;
  font-size: 20px;
}
.dimension-presets {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  gap: 6px;
}
.dimension-presets button {
  border: 1px solid #e3e5d9;
  border-radius: 4px;
  background: transparent;
  color: #7e8773;
  font-size: 9px;
  padding: 5px 7px;
}
.dimension-presets button.active {
  background: #edf1de;
  color: #45612d;
  border-color: #cbd7ae;
}
select {
  margin-top: 0;
  padding-right: 4px;
}
.pattern-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
  max-height: 244px;
  overflow: auto;
  padding: 2px 3px 3px 1px;
  scrollbar-width: thin;
  scrollbar-color: #d4dcc6 transparent;
}
.pattern-card {
  border: 1px solid #e1e4d7;
  background: #f5f6ed;
  padding: 5px;
  border-radius: 5px;
  min-width: 0;
  text-align: center;
  color: #79806e;
}
.pattern-card.active {
  border-color: #648145;
  background: #eef3e0;
  box-shadow: 0 0 0 1px #648145;
}
.pattern-card canvas {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
}
.pattern-card span {
  display: block;
  font-size: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 5px;
}
.pattern-card.active span {
  color: #3b572c;
  font-weight: 700;
}
.helper {
  font-size: 10px;
  line-height: 1.7;
  color: #8b9080;
  margin: 10px 0 0;
}
.range-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 19px;
  color: #647057;
}
.range-label output {
  background: #edf1e3;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 9px;
  color: #6a7c52;
}
input[type="range"] {
  accent-color: #496e36;
  height: 3px;
  width: 100%;
  margin: 14px 0 7px;
  display: block;
}
.range-ends {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  color: #a0a38e;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}
.field-row select {
  margin-top: 6px;
  font-size: 10px;
}
.seed-row {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-top: 15px;
}
.seed-row label {
  flex: 1;
  min-width: 0;
}
.seed-row input {
  font-size: 12px;
  height: 37px;
}
.seed-row button {
  height: 37px;
}
.brushes {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.brush {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 5px;
  padding: 7px;
  color: #69765d;
  font-size: 10px;
}
.brush.active {
  background: #eff3e4;
  border-color: #d4dec0;
  color: #3b552b;
}
.block-swatch {
  width: 25px;
  height: 25px;
  flex: none;
  border-radius: 3px;
  box-shadow:
    inset 0 2px 0 #ffffff22,
    inset 0 -3px 0 #0002;
  border: 1px solid #0001;
  image-rendering: pixelated;
}
.brush .key {
  margin-left: auto;
  font-size: 8px;
  color: #a0aa90;
  border: 1px solid #dfe5d3;
  border-radius: 3px;
  padding: 2px 4px;
}
.workspace-heading {
  padding: 24px 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.workspace-heading .eyebrow {
  font-size: 8px;
}
.workspace-heading h2 {
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.8px;
  margin: 6px 0 0;
}
.view-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 7px;
  letter-spacing: 1px;
  color: #88977c;
  border: 1px solid #e4e9db;
  border-radius: 4px;
  padding: 7px;
  white-space: nowrap;
}
.view-badge i {
  background: #89a766;
  width: 4px;
  height: 4px;
}
.toolbar {
  margin: 0 18px;
  border: 1px solid #e4e7dc;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #fafbf5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
}
.tool-group {
  display: flex;
  gap: 2px;
  border-right: 1px solid #e5e7de;
  padding-right: 7px;
}
.tool {
  background: none;
  border: 0;
  color: #929a87;
  min-width: 29px;
  height: 29px;
  font-size: 17px;
  border-radius: 4px;
  padding: 3px 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.tool span {
  font-size: 9px;
}
.tool.active {
  background: #e7edd9;
  color: #426132;
}
.toolbar-end {
  margin-left: auto;
  display: flex;
  gap: 10px;
}
.toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  color: #808b74;
  cursor: pointer;
  white-space: nowrap;
}
.toggle input {
  accent-color: #56713c;
  width: 12px;
  height: 12px;
  margin: 0;
}
.canvas-frame {
  height: 565px;
  position: relative;
  margin: 0 18px;
  overflow: auto;
  background-color: #e8ecdf;
  background-image:
    linear-gradient(#70864b0a 1px, transparent 1px),
    linear-gradient(90deg, #70864b0a 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid #dce1d1;
  display: grid;
  place-items: center;
  padding: 36px 30px 50px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #b7c4a3 #e8ecdf;
}
.canvas-wrap {
  position: relative;
  flex: none;
  margin: auto;
}
#floor {
  display: block;
  image-rendering: pixelated;
  touch-action: none;
  cursor: crosshair;
  box-shadow:
    0 9px 20px #293d2526,
    0 0 0 1px #3c4f2830;
}
.ruler-x {
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 13px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.ruler-y {
  position: absolute;
  left: -22px;
  top: 0;
  bottom: 0;
  width: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}
.ruler-x span,
.ruler-y span {
  font:
    8px "DM Sans",
    sans-serif;
  color: #879576;
  text-align: center;
}
.canvas-note {
  position: absolute;
  bottom: 14px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  font-size: 8px;
  color: #8c987e;
  letter-spacing: 0.5px;
}
.north {
  font-size: 11px;
}
.canvas-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 18px;
  padding: 10px 0;
  border-bottom: 1px solid #e9ece1;
  font-size: 9px;
  color: #8b967e;
  gap: 5px;
}
.canvas-status > span {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.canvas-status strong {
  font-weight: 500;
  color: #637650;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #94a778;
  margin-right: 3px;
}
.status-divider {
  margin: 0 5px;
  color: #c7cdbd;
}
.zoom {
  display: flex;
  align-items: center;
  gap: 6px;
}
.zoom button {
  border: 0;
  background: none;
  font-size: 14px;
  color: #7d8e6d;
  min-width: 22px;
  min-height: 27px;
}
.zoom #zoomReset {
  font-size: 9px;
}
.workspace-bottom {
  padding: 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.workspace-bottom .eyebrow {
  font-size: 8px;
}
.workspace-bottom p {
  font-size: 10px;
  color: #8c947e;
  margin: 6px 0 0;
}
.workspace-bottom button {
  font-size: 9px;
}
.tip {
  display: flex;
  gap: 12px;
  background: #f1f3e7;
  border-top: 1px solid #e8ecdf;
  padding: 16px 22px;
  color: #98a777;
}
.tip > span {
  font-size: 22px;
}
.tip p {
  font-size: 10px;
  line-height: 1.7;
  color: #8b967c;
  margin: 0;
}
.tip strong {
  color: #667a50;
  font-weight: 500;
}
.materials .section-title {
  margin-bottom: 7px;
}
.materials .tag {
  font-size: 6px;
  letter-spacing: 0.7px;
}
.material {
  padding: 19px 0;
  border-bottom: 1px solid #e9ece0;
  display: flex;
  align-items: start;
  gap: 10px;
}
.material .block-swatch {
  width: 33px;
  height: 33px;
}
.material-details {
  flex: 1;
  min-width: 0;
}
.material-name {
  font-size: 10px;
  font-weight: 500;
  color: #56664a;
  line-height: 1.5;
}
.material-quantity {
  font-family: "Space Grotesk", sans-serif;
  font-size: 19px;
  color: #344a2f;
  margin-top: 6px;
}
.material-quantity small {
  font:
    9px "DM Sans",
    sans-serif;
  color: #929b85;
}
.material-stacks {
  font-size: 9px;
  color: #9aa38d;
  margin-top: 3px;
}
.material-bar {
  height: 3px;
  background: #edf0e4;
  margin-top: 10px;
  border-radius: 3px;
  overflow: hidden;
}
.material-bar span {
  display: block;
  height: 100%;
  background: #9fb57e;
}
.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #869175;
  margin: 18px 0;
}
.total-row strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  color: #49643a;
}
.materials .button {
  font-size: 9px;
}
.materials h3 {
  font:
    500 18px/1.4 "Space Grotesk",
    sans-serif;
  color: #495e3b;
  letter-spacing: -0.4px;
  margin: 10px 0;
}
.materials .primary {
  margin-top: 18px;
}
.export-toggle {
  justify-content: center;
  margin-top: 10px;
  font-size: 8px;
}
.material-footnote {
  padding: 19px;
  display: flex;
  align-items: start;
  gap: 9px;
  color: #94a27b;
}
.material-footnote p {
  font-size: 9px;
  line-height: 1.7;
  color: #9aa28e;
  margin: 0;
}
.material-footnote > span {
  font-size: 20px;
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  color: #a2a790;
  font-size: 9px;
  gap: 15px;
}
.footer-brand {
  font:
    600 17px "Space Grotesk",
    sans-serif;
  letter-spacing: -0.7px;
  color: #8b9879;
}
.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;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #203e2d;
  color: #f4f8eb;
  padding: 12px 20px;
  border: 1px solid #6d8251;
  border-radius: 7px;
  font-size: 12px;
  box-shadow: 0 8px 30px #172b2033;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 10;
  max-width: 90vw;
}
#toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (min-width: 1500px) {
  .studio {
    grid-template-columns: 290px minmax(0, 1fr) 270px;
  }
  .canvas-frame {
    height: 640px;
  }
  .pattern-gallery {
    max-height: 270px;
  }
}
@media (max-width: 1180px) {
  .studio {
    grid-template-columns: 245px minmax(0, 1fr);
  }
  .materials {
    grid-column: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: -1px;
  }
  .materials section {
    border-bottom: 0;
  }
  .materials section + section {
    border-left: 1px solid var(--line);
  }
  .material-footnote {
    grid-column: 1/-1;
    border-top: 1px solid var(--line);
  }
  .materials section:first-child {
    grid-row: span 2;
  }
  .material-footnote {
    grid-column: 2;
  }
  .config {
    grid-row: span 2;
  }
  .edition {
    display: none;
  }
  .canvas-frame {
    height: 580px;
  }
  .view-badge {
    display: none;
  }
}
@media (max-width: 780px) {
  main {
    padding: 26px 16px 0;
  }
  .topbar {
    padding: 0 16px;
    height: 67px;
  }
  .brand {
    font-size: 24px;
  }
  .brandmark {
    width: 29px;
    height: 29px;
    font-size: 25px;
  }
  .local-status {
    display: none;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions .button {
    font-size: 9px;
    padding: 8px;
  }
  .intro {
    margin-bottom: 23px;
  }
  .intro h1 {
    font-size: 29px;
  }
  .intro p {
    font-size: 11px;
    max-width: 290px;
    line-height: 1.6;
  }
  .project-tag {
    display: none;
  }
  .studio {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 12px;
  }
  .sidebar section {
    padding: 17px 13px;
  }
  .workspace-heading {
    padding: 18px 15px;
  }
  .workspace-heading h2 {
    font-size: 20px;
  }
  .toolbar {
    margin: 0 10px;
    padding: 5px;
    gap: 5px;
    flex-wrap: wrap;
  }
  .tool span {
    display: none;
  }
  .toolbar-end {
    gap: 7px;
  }
  .toggle {
    font-size: 8px;
  }
  .canvas-frame {
    margin: 0 10px;
    height: 470px;
    padding: 32px 27px 45px;
  }
  .canvas-status {
    margin: 0 10px;
    align-items: start;
  }
  .canvas-status > span {
    font-size: 8px;
    max-width: 160px;
  }
  #coordinates {
    display: none;
  }
  .workspace-bottom {
    padding: 16px;
    flex-wrap: wrap;
  }
  .workspace-bottom p {
    font-size: 9px;
  }
  .tip {
    padding: 13px;
  }
  .materials {
    display: block;
  }
  .materials section + section {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  footer {
    font-size: 8px;
    flex-wrap: wrap;
  }
  footer > span:last-child {
    display: none;
  }
}
@media (max-width: 580px) {
  .studio {
    display: flex;
    flex-direction: column;
  }
  .studio > * {
    width: 100%;
  }
  .workspace {
    order: -1;
  }
  .intro .eyebrow {
    font-size: 8px;
  }
  .intro h1 {
    font-size: 28px;
  }
  .workspace-heading h2 {
    font-size: 22px;
  }
  .toolbar-end {
    margin-left: auto;
  }
  .canvas-frame {
    height: 430px;
  }
  .canvas-status > span {
    max-width: none;
  }
  #coordinates {
    display: inline;
  }
  .workspace-bottom {
    padding: 15px;
  }
  .workspace-bottom .eyebrow {
    font-size: 7px;
  }
  .tip {
    display: none;
  }
  .config {
    display: grid;
    grid-template-columns: 1fr;
  }
  .config section {
    padding: 20px;
  }
  .pattern-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-height: 280px;
  }
  .pattern-card span {
    font-size: 9px;
  }
  .pattern-gallery canvas {
    max-height: 70px;
  }
  .config .helper {
    font-size: 11px;
  }
  .materials {
    display: grid;
    grid-template-columns: 1fr;
  }
  .materials section {
    padding: 20px;
  }
  .materials section:first-child {
    grid-row: auto;
  }
  .materials .material-footnote {
    grid-column: 1;
  }
  .header-actions .ghost {
    display: none;
  }
  .brand {
    font-size: 24px;
  }
  .brushes {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .brush {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding: 10px 5px;
    gap: 7px;
    font-size: 9px;
  }
  .brush .key {
    display: none;
  }
  .brush span:not(.block-swatch):not(.key) {
    width: 100%;
  }
  .materials h3 {
    font-size: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Material selection and original Minecraft texture previews. */
.block-swatch {
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: none;
  border-radius: 2px;
}
.material-picker {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 14px;
}
.picker-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
  margin: 8px 0 10px;
}
.picker-heading > span {
  font-size: 10px;
  color: #6d8058;
}
.text-button {
  font-size: 9px;
  background: none;
  border: 0;
  color: #4c7038;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.color-choices {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 20px;
  padding: 3px;
}
.color-choice {
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid #0002;
  border-radius: 3px;
}
.color-choice.active {
  outline: 2px solid #73924e;
  outline-offset: 2px;
}
.dye-toggle {
  white-space: normal;
  line-height: 1.5;
  margin: 0 0 12px;
}
.material-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.material-option {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #e1e5d7;
  background: #fafbf5;
  padding: 7px 5px;
  border-radius: 4px;
  color: #66765a;
  text-align: left;
  min-width: 0;
  font-size: 9px;
  line-height: 1.4;
}
.material-option .block-swatch {
  width: 28px;
  height: 28px;
}
.material-option.active {
  border-color: #7c985b;
  background: #edf3df;
  box-shadow: 0 0 0 1px #7c985b;
}
.view-controls {
  margin: 0 18px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.view-tabs {
  display: flex;
  gap: 3px;
  background: #edf1e3;
  border-radius: 5px;
  padding: 3px;
}
.view-tabs button {
  background: none;
  border: 0;
  color: #7e8b6e;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 10px;
}
.view-tabs button.active {
  background: #fff;
  color: #3f5f2d;
  box-shadow: 0 1px 3px #182c2512;
}
#textureStatus {
  font-size: 8px;
  color: #8c987d;
}
.comparison-reference {
  position: relative;
  margin: auto;
  min-width: 0;
}
.comparison-reference[hidden],
.comparison-caption[hidden] {
  display: none;
}
.comparison-reference canvas {
  display: block;
  image-rendering: pixelated;
  box-shadow:
    0 9px 20px #293d2526,
    0 0 0 1px #3c4f2830;
}
.comparison-caption {
  position: absolute;
  top: -42px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 8px;
  color: #6c7e56;
  letter-spacing: 1px;
  white-space: nowrap;
}
.canvas-frame.comparing {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 60px;
}
@media (max-width: 780px) {
  .view-controls {
    margin: 0 10px 10px;
  }
  .view-tabs button {
    font-size: 9px;
    padding: 7px 9px;
  }
  .canvas-frame.comparing {
    gap: 18px;
  }
  .comparison-caption {
    font-size: 6px;
    letter-spacing: 0.5px;
  }
}
@media (max-width: 580px) {
  .material-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .material-option {
    font-size: 10px;
    flex-direction: column;
    text-align: center;
    padding: 10px 5px;
  }
  .color-choices {
    gap: 9px;
  }
  .color-choice {
    max-height: 35px;
  }
  .material-option .block-swatch {
    width: 40px;
    height: 40px;
  }
  .view-tabs button {
    font-size: 10px;
  }
  .view-controls {
    gap: 7px;
  }
  #textureStatus {
    font-size: 8px;
  }
}
.image-entry {
  margin: 0 0 15px;
  font-size: 10px !important;
  border-style: dashed !important;
  background: #f0f4e5 !important;
  color: #58723f !important;
}
#imageDialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  border: 1px solid #d8dfcc;
  border-radius: 12px;
  padding: 26px;
  background: #fafbf4;
  color: #37472e;
  box-shadow: 0 20px 80px #172b2044;
}
#imageDialog::backdrop {
  background: #15291ed9;
  backdrop-filter: blur(3px);
}
.import-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.import-heading h2 {
  font-size: 25px;
  font-weight: 500;
  margin: 8px 0 0;
  letter-spacing: -0.7px;
}
.import-heading .tool {
  font-size: 27px;
}
.import-description {
  font-size: 12px;
  line-height: 1.7;
  color: #7a866c;
  margin: 12px 0 22px;
}
.import-previews {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.import-previews figure {
  margin: 0;
  min-width: 0;
}
.import-previews figcaption {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #82916f;
  margin: 0 0 10px;
}
.image-preview-frame {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e5e9dc;
  background-image: conic-gradient(
    #d5ddc9 25%,
    transparent 0 50%,
    #d5ddc9 0 75%,
    transparent 0
  );
  background-size: 16px 16px;
  border: 1px solid #dce3d0;
  border-radius: 6px;
  overflow: hidden;
  padding: 12px;
}
.image-preview-frame img,
.image-preview-frame canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.image-preview-frame canvas {
  image-rendering: pixelated;
}
.import-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
  margin-top: 20px;
}
.import-options .field-row {
  margin: 0;
  grid-row: span 2;
  align-content: start;
}
.import-options select {
  margin-top: 7px;
  font-size: 11px;
}
.import-options label {
  font-size: 11px;
}
.import-footer {
  margin-top: 23px;
  padding-top: 18px;
  border-top: 1px solid #e0e6d6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.import-footer p {
  font-size: 11px;
  color: #7c8a6d;
  margin: 0;
}
.import-footer .helper {
  font-size: 9px;
  margin-top: 6px;
  line-height: 1.6;
}
.import-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
#importSummary {
  font-weight: 600;
}
select:disabled,
input:disabled {
  opacity: 0.45;
  cursor: default;
}
@media (max-width: 580px) {
  #imageDialog {
    padding: 18px;
    max-height: calc(100dvh - 24px);
  }
  .import-heading h2 {
    font-size: 20px;
  }
  .image-preview-frame {
    height: 165px;
    padding: 7px;
  }
  .import-previews {
    gap: 9px;
  }
  .import-previews figcaption {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .import-options {
    gap: 12px;
  }
  .import-options .field-row {
    grid-column: 1/-1;
    grid-row: auto;
  }
  .import-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .import-actions {
    justify-content: end;
  }
  .import-description {
    font-size: 11px;
  }
}
.image-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.workspace-heading > div {
  min-width: 0;
}
.workspace-heading h2 {
  overflow-wrap: anywhere;
}
#styleSearch {
  display: block;
  width: 100%;
  border: 1px solid #dedfd3;
  border-radius: 5px;
  padding: 9px 10px;
  margin: 9px 0 0;
  background: #f9faf4;
  color: #354630;
  font:
    11px "DM Sans",
    system-ui,
    sans-serif;
  min-width: 0;
}
#styleSearch::placeholder {
  color: #9aa38c;
}
.empty-gallery {
  grid-column: 1/-1;
  padding: 10px 0;
}
.palette-browser {
  margin: 10px 0 15px;
}
.palette-browser select {
  font-size: 10px;
  background: #f4f7eb;
}
.palette-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 200px;
  overflow: auto;
  padding: 2px 3px 3px 1px;
  margin-top: 10px;
  scrollbar-width: thin;
  scrollbar-color: #d4dcc6 transparent;
}
.palette-card {
  min-width: 0;
  border: 1px solid #e1e4d7;
  background: #f7f9ef;
  border-radius: 5px;
  padding: 5px;
  color: #7c896b;
  text-align: left;
}
.palette-card.active {
  border-color: #6c8b4c;
  box-shadow: 0 0 0 1px #6c8b4c;
  background: #edf3df;
}
.palette-card > span:last-child {
  display: block;
  font-size: 8px;
  line-height: 1.5;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.palette-strip {
  display: flex;
  overflow: hidden;
  border-radius: 2px;
  height: 26px;
}
.palette-strip > span {
  flex: 1;
  background-size: 100% auto;
  background-position: top;
  image-rendering: pixelated;
}
.palette-browser .helper {
  font-size: 9px;
}
@media (max-width: 580px) {
  .palette-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 185px;
  }
  .palette-card > span:last-child {
    font-size: 9px;
  }
  .palette-strip {
    height: 32px;
  }
}
.studio-tabs {
  display: flex;
  gap: 5px;
  align-items: center;
  border-bottom: 1px solid #dce2d2;
  margin: 0 0 28px;
  padding-bottom: 12px;
}
.studio-tabs button {
  display: flex;
  align-items: center;
  gap: 7px;
  font:
    500 13px "Space Grotesk",
    system-ui,
    sans-serif;
  background: none;
  color: #859273;
  border: 1px solid transparent;
  padding: 11px 20px;
  border-radius: 6px;
}
.studio-tabs button.active {
  background: #264b37;
  color: #f6f8ed;
  border-color: #264b37;
}
.studio-tabs > span {
  margin-left: auto;
  color: #9aa38d;
  font-size: 9px;
}
.glass-controls[hidden] {
  display: none;
}
.glass-controls {
  margin-top: 16px;
}
.glass-controls > label {
  margin-top: 12px;
}
.glass-controls select {
  margin-top: 6px;
}
.glass-mode .canvas-frame {
  background-color: #dbe5e6;
  background-image:
    linear-gradient(#637e890c 1px, transparent 1px),
    linear-gradient(90deg, #637e890c 1px, transparent 1px);
}
.glass-mode .intro h1 > span {
  color: #7395b5;
}
.glass-mode .canvas-note {
  color: #718997;
}
.brush-row {
  display: flex;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
  border-radius: 5px;
}
.brush-row .brush {
  flex: 1;
  min-width: 0;
  padding: 7px 5px;
  gap: 6px;
}
.brush-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.drag-grip {
  color: #a4ae95;
  font-size: 17px;
  flex: none;
  cursor: grab;
}
.brush[draggable="true"] {
  cursor: grab;
}
.brush[draggable="true"]:active {
  cursor: grabbing;
}
.brush-row.dragging {
  opacity: 0.45;
}
.brush-row.drop-target {
  outline: 2px dashed #648745;
  outline-offset: 3px;
  background: #e7efd7;
}
.brush-swap {
  width: 29px;
  flex: 0 0 29px;
  min-width: 0;
  appearance: none;
  text-align: center;
  padding: 4px;
  border-color: #e1e6d8;
  background: #f4f7eb;
  color: #78915a;
  font-size: 13px;
  cursor: pointer;
}
.brushes {
  display: grid;
  grid-template-columns: 1fr !important;
}
.brush-row .brush .key {
  flex: none;
}
.brush-row .brush-name {
  font-size: 10px;
  text-align: left;
}
.brush-row .brush {
  flex-wrap: nowrap;
  text-align: left;
  justify-content: start;
}
.brush-row .brush span:not(.block-swatch):not(.key) {
  width: auto;
}
@media (max-width: 580px) {
  .studio-tabs {
    margin-bottom: 22px;
    flex-wrap: wrap;
  }
  .studio-tabs button {
    padding: 10px 17px;
  }
  .studio-tabs > span {
    font-size: 8px;
    margin-left: auto;
    max-width: 140px;
    text-align: right;
    line-height: 1.5;
  }
  .brush-row .brush {
    padding: 9px 7px;
  }
  .brush-row .brush .block-swatch {
    width: 28px;
    height: 28px;
  }
  .brush-row .brush .key {
    display: inline-block;
  }
  .brush-row .brush-name {
    font-size: 11px;
  }
  .brush-swap {
    width: 35px;
    flex-basis: 35px;
  }
  .glass-mode .workspace-heading h2 {
    font-size: 21px;
  }
}

[hidden] {
  display: none !important;
}

/* Architectural workspace */
.wall-studio {
  display: grid;
  grid-template-columns: 260px minmax(340px, 1fr) 270px;
  gap: 22px;
  align-items: start;
}
.wall-studio .sidebar {
  min-width: 0;
}
.wall-studio select,
.wall-studio input[type="search"] {
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffef9;
  color: var(--green);
}
.wall-kind,
.view-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #eeefe7;
  border-radius: 8px;
}
.wall-kind button,
.view-tabs button {
  flex: 1;
  border: 0;
  background: none;
  padding: 9px;
  border-radius: 5px;
  color: var(--muted);
}
.wall-kind button.active,
.view-tabs button.active {
  background: var(--green);
  color: #fff;
}
.wall-style-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 12px 0;
}
.wall-style {
  background: #f8f8f1;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 7px;
  text-align: left;
  font-size: 11px;
  min-height: 48px;
  color: var(--green);
}
.wall-style.active {
  background: #eaf0dc;
  border-color: #91ad6d;
  box-shadow: inset 3px 0 #608245;
}
.wall-checks {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}
.wall-checks label {
  margin: 0;
}
.wall-material-details {
  margin-top: 16px;
  font-size: 12px;
}
.wall-material-details summary {
  cursor: pointer;
  line-height: 1.6;
}
#wallRoleMaterials label,
.wall-piece-options label {
  display: block;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
}
#wallRoleMaterials select,
.wall-piece-options select {
  margin-top: 5px;
}
.wall-view-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 20px 14px;
}
.wall-view-controls > label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.wall-view-controls select {
  max-width: 200px;
  font-size: 11px;
}
.wall-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.wall-canvas-frame {
  position: relative;
  background: radial-gradient(ellipse at center, #eef0e3, #f9f9f3);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
#wallCanvas {
  display: block;
  width: 100%;
  height: 560px;
  touch-action: none;
}
.wall-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #f5f4eeec;
  color: var(--green);
  font-size: 13px;
  cursor: pointer;
}
.wall-selection {
  padding: 20px 24px;
  background: #eef1e5;
  border-block: 1px solid var(--line);
  min-height: 112px;
}
.wall-selection h3 {
  margin: 8px 0;
}
.wall-selection code {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.wall-selection p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.wall-build-guide,
.wall-inventory {
  padding: 24px;
}
.wall-build-guide {
  border-bottom: 1px solid var(--line);
}
.wall-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wall-export-actions .button {
  font-size: 11px;
  padding: 11px 13px;
}
.wall-inventory .section-title {
  gap: 8px;
}
.wall-inventory .button {
  font-size: 10px;
  padding: 8px;
}
.wall-inventory #wallInventory {
  max-height: 350px;
  overflow: auto;
}
.wall-inventory #wallInventory > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.wall-inventory strong {
  white-space: nowrap;
}
.wall-inventory small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  text-align: right;
}
.wall-piece-library {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 12px 0;
  max-height: 535px;
  overflow: auto;
  padding: 2px;
}
.wall-piece {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9faf4;
  padding: 3px;
  color: var(--green);
  min-width: 0;
}
.wall-piece.active {
  border-color: #74925a;
  background: #eaf0dc;
}
.wall-piece canvas {
  width: 100%;
  max-width: 72px;
  height: 58px;
  object-fit: contain;
  image-rendering: pixelated;
}
.wall-piece span {
  font-size: 9px;
  line-height: 1.35;
  padding: 0 2px 5px;
  overflow-wrap: anywhere;
}
.wall-library #wallCategory {
  margin-top: 8px;
}
.wall-library h3 {
  font-size: 15px;
  margin: 10px 0 20px;
}
.wall-piece-options {
  margin-bottom: 18px;
}
.wall-status {
  flex-wrap: wrap;
  gap: 8px;
}
.wall-mode .topnav {
  gap: 5px;
}
@media (min-width: 1600px) {
  .wall-studio {
    grid-template-columns: 280px minmax(400px, 1fr) 300px;
  }
  #wallCanvas {
    height: 660px;
  }
}
@media (max-width: 1180px) {
  .wall-studio {
    grid-template-columns: 230px minmax(300px, 1fr);
    gap: 16px;
  }
  .wall-library {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
  }
  .wall-piece-library {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    max-height: 260px;
  }
  .wall-toolbar .tool span {
    display: none;
  }
}
@media (max-width: 740px) {
  .wall-studio {
    display: flex;
    flex-direction: column;
  }
  .wall-config,
  .wall-workspace,
  .wall-library {
    width: 100%;
  }
  .wall-config {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }
  .wall-library {
    display: block;
  }
  .wall-piece-library {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-height: 330px;
  }
  #wallCanvas {
    height: 430px;
  }
  .wall-view-controls {
    flex-wrap: wrap;
  }
  .wall-toolbar {
    padding: 10px;
  }
  .wall-selection,
  .wall-build-guide,
  .wall-inventory {
    padding: 18px;
  }
  .wall-status {
    font-size: 10px;
  }
  .wall-workspace {
    order: -1;
  }
  .wall-style-gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}
