:root {
  color-scheme: light;
  --ink: #27322f;
  --muted: #7f8984;
  --line: #e6e9e2;
  --paper: #fbfcf8;
  --canvas: #f1f3eb;
  --sage: #a9c8b6;
  --sage-dark: #537b68;
  --peach: #eabda7;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% 3%, rgba(231, 237, 221, 0.72), transparent 34rem),
    #fbfcf8;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.page-shell {
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
}

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(39, 50, 47, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.8px;
}

.brand-mark {
  display: grid;
  width: 23px;
  height: 23px;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  transform: rotate(-8deg);
}

.brand-mark span {
  border-radius: 3px;
  background: #9dbca8;
}

.brand-mark span:nth-child(2) {
  background: #e9c0a9;
}

.brand-mark span:nth-child(3) {
  background: #c9b8d9;
}

.brand-mark span:nth-child(4) {
  background: #e4d5a8;
}

.edition-pill,
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #738079;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}

.edition-pill {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.62);
}

.edition-pill span,
.live-pill span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8dbba0;
  box-shadow: 0 0 0 3px rgba(141, 187, 160, 0.16);
}

.intro {
  max-width: 720px;
  margin: 42px auto 30px;
  text-align: center;
}

.eyebrow,
.model-kicker,
.panel-kicker {
  margin: 0;
  color: #81958a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin: 15px 0 13px;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(38px, 5vw, 57px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -3px;
}

h1 span {
  color: #86a992;
}

.intro-copy {
  max-width: 490px;
  margin: 0 auto;
  color: #7b8580;
  font-size: 15px;
  line-height: 1.65;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(310px, 0.78fr);
  align-items: stretch;
  gap: 20px;
  margin-bottom: 32px;
}

.model-panel,
.build-panel {
  border: 1px solid #e8eae4;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 38px rgba(67, 79, 69, 0.045);
}

.model-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 23px 24px 18px;
}

.model-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.model-kicker {
  margin-bottom: 5px;
  font-size: 9px;
  letter-spacing: 1.6px;
}

.model-heading h2,
.build-panel h2 {
  margin-bottom: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.placement-hint {
  margin: 9px 0 -3px;
  color: #8b958e;
  font-size: 10px;
  line-height: 1.45;
}

.placement-hint.is-armed {
  color: #5d8068;
  font-weight: 600;
}

.model-tools {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(224, 230, 221, 0.92);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 14px rgba(57, 70, 59, 0.06);
  backdrop-filter: blur(8px);
}

.mode-button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #87938a;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.mode-button span {
  font-size: 14px;
  font-weight: 400;
}

.mode-button.is-active {
  background: #e9f0e9;
  color: #54725c;
}

.mode-button:focus-visible,
.clear-selection:focus-visible,
.eraser-button:focus-visible,
.clear-paint:focus-visible,
.preview-mode-button:focus-visible,
.advanced-toggle:focus-visible,
.dialog-close:focus-visible {
  outline: 3px solid rgba(145, 179, 155, 0.35);
  outline-offset: 2px;
}

.live-pill {
  font-size: 9px;
  letter-spacing: 0.8px;
}

.canvas-wrap {
  position: relative;
  height: clamp(300px, 34vw, 390px);
  min-height: 280px;
  margin-top: 15px;
  overflow: hidden;
  border: 1px solid #eaede5;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 51% 63%, rgba(255, 255, 255, 0.85), transparent 47%),
    linear-gradient(145deg, #f5f6f0, #edf1e9);
}

#model-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#model-canvas:active {
  cursor: grabbing;
}

#model-canvas.selecting {
  cursor: crosshair;
}

.canvas-hint {
  position: absolute;
  right: 12px;
  bottom: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #929b94;
  font-size: 10px;
  pointer-events: none;
}

.mouse-icon {
  width: 10px;
  height: 13px;
  border: 1px solid #a4ada6;
  border-radius: 6px;
}

.canvas-hint > span:nth-child(3) {
  color: #bec4bd;
}

.model-footer {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding-top: 19px;
}

.model-footer > div:first-child {
  display: grid;
  gap: 4px;
}

.metric-label {
  color: #919b94;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.1px;
}

.model-footer strong {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.metric-divider {
  padding: 0 4px;
  color: #bac1ba;
  font-size: 14px;
  font-weight: 400;
}

.progress-wrap {
  display: grid;
  gap: 6px;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf0e9;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #accbb8, #d3c4dc);
  transition: width 350ms ease;
}

#progress-label {
  color: #8b958e;
  font-size: 10px;
}


.build-panel {
  padding: 25px 23px 20px;
}

.panel-kicker {
  margin-bottom: 9px;
  font-size: 9px;
}

.build-panel h2 {
  font-size: 21px;
}

.panel-copy {
  margin: 8px 0 18px;
  color: #838d86;
  font-size: 12px;
  line-height: 1.6;
}

.price-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 13px;
  border: 1px solid #e8ece4;
  border-radius: 10px;
  background: #fafbf7;
}

.price-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  background: #eaf1e9;
  color: #799780;
  font-size: 16px;
}

.price-description {
  color: #626e66;
  font-size: 12px;
  font-weight: 600;
}

.price-card strong {
  margin-left: auto;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 17px;
}

.quantity-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px 8px;
  margin-top: 14px;
}

.quantity-control > label {
  color: #56635b;
  font-size: 10px;
  font-weight: 600;
}

.quantity-control > span {
  grid-column: 1 / -1;
  color: #929b94;
  font-size: 9px;
}

.selection-count {
  display: grid;
  min-width: 54px;
  height: 32px;
  align-items: center;
  justify-items: center;
  padding: 0 10px;
  border: 1px solid #e5e9e1;
  border-radius: 8px;
  background: white;
}

.selection-count output {
  color: #405348;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.clear-selection {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid #e5e9e1;
  border-radius: 8px;
  background: #fafbf8;
  color: #718077;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.clear-selection:not(:disabled):hover {
  background: #edf3ed;
  color: var(--sage-dark);
}

.clear-selection:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.name-label {
  display: block;
  margin: 17px 0 7px;
  color: #56635b;
  font-size: 10px;
  font-weight: 600;
}

.name-label span {
  color: #a0a8a1;
  font-weight: 400;
}

.name-input {
  width: 100%;
  height: 39px;
  padding: 0 11px;
  border: 1px solid #e5e9e1;
  border-radius: 8px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.name-input::placeholder {
  color: #b0b7b1;
}

.name-input:focus {
  border-color: #abc5b1;
  box-shadow: 0 0 0 3px rgba(169, 200, 182, 0.18);
}

.paint-toggle {
  position: relative;
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  padding: 0 2px;
  cursor: pointer;
}

.toggle-copy {
  display: grid;
  gap: 4px;
  margin-right: auto;
}

.toggle-copy strong {
  color: #56635b;
  font-size: 11px;
}

.toggle-copy small {
  color: #929b94;
  font-size: 9px;
}

.paint-price {
  margin-right: 5px;
  color: #89948c;
  font-size: 10px;
  font-weight: 600;
}

.paint-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch {
  position: relative;
  width: 31px;
  height: 18px;
  flex: 0 0 31px;
  border-radius: 99px;
  background: #e3e8e1;
  transition: background 160ms ease;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(50, 60, 52, 0.16);
  content: "";
  transition: transform 160ms ease;
}

.paint-toggle input:checked + .switch {
  background: #91b39b;
}

.paint-toggle input:checked + .switch::after {
  transform: translateX(13px);
}

.paint-toggle input:focus-visible + .switch {
  outline: 3px solid rgba(145, 179, 155, 0.35);
}

.editor-heading,
.builder-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-heading {
  margin-bottom: 10px;
  color: #66736a;
  font-size: 10px;
  font-weight: 600;
}

.editor-size {
  color: #a2aaa3;
  font-size: 9px;
  font-weight: 400;
}

.editor-body {
  display: flex;
  align-items: center;
  gap: 13px;
}

.paint-palette {
  display: grid;
  grid-template-columns: repeat(2, 24px);
  gap: 7px;
}

.paint-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
}

.eraser-button {
  display: grid;
  min-width: 48px;
  height: 44px;
  align-content: center;
  justify-items: center;
  gap: 2px;
  padding: 3px 5px;
  border: 1px solid #e5e9e1;
  border-radius: 8px;
  background: #fafbf8;
  color: #718077;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
}

.eraser-button > span:first-child {
  font-size: 15px;
  line-height: 14px;
}

.eraser-button.is-active {
  border-color: #b5cbb9;
  background: #e9f0e9;
  color: #54725c;
}

.brush-control {
  display: grid;
  width: 78px;
  gap: 8px;
}

.brush-control-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  color: #66736a;
  font-size: 9px;
}

.brush-control-heading output {
  color: #8b958e;
  font-size: 8px;
  white-space: nowrap;
}

.brush-control input {
  width: 100%;
  margin: 0;
  accent-color: #6f9279;
  cursor: pointer;
}

.palette-swatch {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}

.palette-swatch[aria-pressed="true"] {
  border-color: #536b5a;
  box-shadow: 0 0 0 2px #fff inset;
}

.clear-paint {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 10px 0 0 auto;
  padding: 0 10px;
  border: 1px solid #eadfdb;
  border-radius: 8px;
  background: #fff9f7;
  color: #966f65;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
}

.clear-paint > span {
  font-size: 14px;
  line-height: 1;
}

.clear-paint:not(:disabled):hover {
  border-color: #d9beb6;
  background: #f9eeea;
  color: #80584e;
}

.clear-paint:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.add-button {
  display: flex;
  width: 100%;
  min-height: 47px;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  background: #6f9279;
  color: white;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.add-button:hover {
  transform: translateY(-1px);
  background: #5e8069;
}

.add-button:active {
  transform: translateY(0);
}

.add-button:disabled {
  background: #bbc5bd;
  cursor: not-allowed;
}

#button-price {
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 11px;
}

.demo-note {
  display: flex;
  gap: 6px;
  margin: 10px 0 17px;
  color: #909a92;
  font-size: 9px;
  line-height: 1.5;
}

.demo-note span {
  color: #96ad9a;
}

.builder-list {
  padding-top: 13px;
  border-top: 1px solid #edf0ea;
}

.builder-list-heading {
  color: #66736a;
  font-size: 10px;
  font-weight: 700;
}

.builder-list-heading span:last-child {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #f0f3ed;
  color: #7d8d80;
  font-size: 9px;
}

#builder-list-copy {
  margin: 7px 0 0;
  color: #9aa29b;
  font-size: 9px;
}

.builder-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.builder-chip {
  padding: 5px 8px;
  border-radius: 99px;
  background: #f1f4ee;
  color: #708074;
  font-size: 9px;
}

.piece-dialog {
  width: min(820px, calc(100% - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--ink);
}

.piece-dialog::backdrop {
  background: rgba(38, 49, 43, 0.38);
  backdrop-filter: blur(5px);
}

.dialog-shell {
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  border: 1px solid #e8eae4;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 90px rgba(37, 50, 41, 0.2);
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 21px 24px 15px;
}

.dialog-heading .panel-kicker {
  margin-bottom: 5px;
}

.dialog-heading h2 {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 20px;
  letter-spacing: -0.6px;
}

.dialog-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #e8ece5;
  border-radius: 50%;
  background: #fafbf8;
  color: #7b8980;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.dialog-content {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 20px;
  padding: 0 24px 17px;
}

.piece-preview-area {
  position: relative;
  min-width: 0;
  height: 300px;
  overflow: hidden;
  border: 1px solid #e8ede5;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 50% 58%, rgba(255, 255, 255, 0.95), transparent 54%),
    linear-gradient(145deg, #f4f6ef, #ebf0e8);
}

#piece-preview {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

#piece-preview.is-filling {
  cursor: cell;
}

#piece-preview.is-rotating {
  cursor: grab;
}

#piece-preview.is-rotating:active {
  cursor: grabbing;
}

.preview-tools {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(225, 231, 222, 0.9);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
}

.preview-mode-button {
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #87938a;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.preview-mode-button.is-active {
  background: #e9f0e9;
  color: #54725c;
}

.preview-hint {
  position: absolute;
  left: 10px;
  bottom: 9px;
  color: #929b94;
  font-size: 9px;
  pointer-events: none;
}

.piece-editor {
  min-width: 0;
  padding: 5px 0 0;
}

.piece-editor .editor-heading {
  margin-bottom: 12px;
}

.piece-editor .paint-palette {
  grid-template-columns: repeat(2, 27px);
  gap: 8px;
}

.piece-editor .palette-swatch {
  width: 27px;
  height: 27px;
}

.advanced-section {
  margin-top: 14px;
  border-top: 1px solid #edf0ea;
}

.advanced-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 8px;
  border: 0;
  background: none;
  color: #6c7b70;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.advanced-toggle span:last-child {
  color: #91aa96;
  font-size: 14px;
  transition: transform 150ms ease;
}

.advanced-toggle[aria-expanded="true"] span:last-child {
  transform: rotate(180deg);
}

.hex-panel label {
  display: block;
  margin: 4px 0 6px;
  color: #88938b;
  font-size: 9px;
}

.hex-controls {
  display: flex;
  gap: 6px;
}

.hex-controls input {
  width: 0;
  min-width: 0;
  flex: 1;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #e4e9e1;
  border-radius: 7px;
  outline: 0;
  color: #526258;
  font-family: monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.hex-controls input:focus {
  border-color: #9fbea6;
  box-shadow: 0 0 0 3px rgba(169, 200, 182, 0.18);
}

.hex-controls button {
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: #e9f0e9;
  color: #587360;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.hex-error {
  display: block;
  min-height: 13px;
  margin-top: 4px;
  color: #ad6d61;
  font-size: 9px;
}

.piece-editor .clear-paint {
  margin-top: 10px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 24px;
  border-top: 1px solid #edf0ea;
  background: #fcfdfa;
}

.dialog-price {
  color: #869188;
  font-size: 10px;
}

.dialog-price strong {
  padding-left: 4px;
  color: #536c5a;
}

.dialog-actions > div {
  display: flex;
  gap: 8px;
}

.cancel-button,
.confirm-button {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.cancel-button {
  border: 1px solid #e5e9e2;
  background: white;
  color: #77837a;
}

.confirm-button {
  border: 0;
  background: #6f9279;
  color: white;
}

.confirm-button:disabled {
  background: #c4cec5;
  cursor: not-allowed;
}

.dialog-demo-note {
  margin: 0;
  padding: 0 24px 14px;
  color: #9aa39b;
  font-size: 9px;
  text-align: right;
}

.page-footer {
  margin: 0 0 24px;
  padding: 19px 22px 13px;
  border: 1px solid #e8eae4;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 38px rgba(67, 79, 69, 0.035);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr 1fr auto;
  align-items: center;
  gap: 28px;
}

.footer-brand {
  font-size: 15px;
}

.footer-brand .brand-mark {
  width: 19px;
  height: 19px;
}

.footer-brand-block p,
.footer-project p {
  margin: 8px 0 0;
  color: #89938b;
  font-size: 10px;
  line-height: 1.55;
}

.footer-heading {
  color: #87968b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.footer-project p {
  max-width: 230px;
  margin-top: 6px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: #69786e;
  font-size: 10px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--sage-dark);
}

.footer-links a span {
  padding-left: 4px;
  color: #94b19a;
}

.footer-demo {
  display: grid;
  grid-template-columns: 7px auto;
  align-items: center;
  gap: 0 7px;
  padding: 10px 12px;
  border: 1px solid #e8ece5;
  border-radius: 9px;
  background: #fafbf8;
  color: #738079;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.footer-demo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a8c7b0;
  box-shadow: 0 0 0 3px rgba(168, 199, 176, 0.16);
}

.footer-demo small {
  grid-column: 2;
  margin-top: 5px;
  color: #9aa39b;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 17px;
  padding-top: 12px;
  border-top: 1px solid #edf0ea;
  color: #a0a8a1;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
}

.footer-bottom span:last-child span {
  padding-left: 4px;
  color: #9bb69f;
}

.toast {
  position: fixed;
  z-index: 5;
  right: 24px;
  bottom: 24px;
  max-width: calc(100vw - 48px);
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  background: #425d4a;
  box-shadow: 0 10px 28px rgba(39, 50, 47, 0.2);
  color: white;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .page-shell {
    width: min(700px, calc(100% - 36px));
  }

  .intro {
    margin-top: 48px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .build-panel {
    padding: 23px;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .footer-demo {
    justify-self: start;
  }

  .paint-palette {
    grid-template-columns: repeat(4, 24px);
  }

  .dialog-content {
    gap: 14px;
    padding-right: 18px;
    padding-left: 18px;
  }

  .dialog-heading {
    padding-right: 18px;
    padding-left: 18px;
  }

  .dialog-actions {
    padding-right: 18px;
    padding-left: 18px;
  }

  .dialog-demo-note {
    padding-right: 18px;
    padding-left: 18px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: calc(100% - 28px);
  }

  .topbar {
    height: 68px;
  }

  .brand {
    font-size: 16px;
  }

  .edition-pill {
    padding: 8px 9px;
    font-size: 8px;
    letter-spacing: 0.6px;
  }

  .intro {
    margin: 34px auto 24px;
  }

  h1 {
    font-size: 39px;
    letter-spacing: -2px;
  }

  .intro-copy {
    max-width: 340px;
    font-size: 13px;
  }

  .model-panel {
    padding: 17px 13px 14px;
  }

  .model-heading h2 {
    font-size: 17px;
  }

  .live-pill {
    font-size: 8px;
  }

  .canvas-wrap {
    height: 300px;
    min-height: 260px;
  }

  .piece-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
  }

  .dialog-shell {
    max-height: calc(100dvh - 20px);
  }

  .dialog-content {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .piece-preview-area {
    height: 190px;
  }

  .piece-editor .paint-palette {
    grid-template-columns: repeat(3, 27px);
  }

  .paint-tools {
    gap: 9px;
  }

  .brush-control {
    width: 74px;
  }

  .dialog-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .dialog-actions > div {
    width: 100%;
  }

  .dialog-actions button {
    flex: 1;
  }
}

@media (max-width: 360px) {
  .piece-editor .paint-palette {
    grid-template-columns: repeat(2, 27px);
    gap: 7px;
  }

  .paint-tools {
    gap: 8px;
  }

  .brush-control {
    width: 66px;
  }

  .canvas-hint {
    right: 8px;
    bottom: 8px;
    gap: 5px;
    font-size: 8px;
  }

  .model-footer {
    grid-template-columns: auto minmax(80px, 1fr);
    gap: 12px;
  }

  .page-footer {
    padding: 17px 15px 12px;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 17px 12px;
  }

  .footer-brand-block p,
  .footer-project p {
    font-size: 9px;
  }

  .footer-demo {
    padding: 8px 9px;
  }

  .footer-bottom {
    font-size: 7px;
    letter-spacing: 0.5px;
  }

  .footer-bottom span:last-child {
    text-align: right;
  }
}

.topbar {
  gap: 22px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.topbar-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #87938a;
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.topbar-nav a:hover,
.topbar-nav a[aria-current] {
  background: #edf2eb;
  color: #55725d;
}

#home-view[hidden],
#auction-view[hidden],
#museum-view[hidden],
#featured-project[hidden],
.auction-round[hidden] {
  display: none !important;
}

.featured-project {
  margin: 34px auto 26px;
  padding: 25px;
  border: 1px solid #e5e2e9;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(221, 211, 232, 0.36), transparent 44%),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 42px rgba(67, 64, 79, 0.07);
}

.featured-heading,
.featured-content,
.featured-metrics,
.leader-preview-bid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.featured-heading h2 {
  margin: 0;
  color: #4f6255;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 24px;
  letter-spacing: -0.8px;
}

.featured-heading p:last-child {
  margin: 6px 0 0;
  color: #87918a;
  font-size: 11px;
  line-height: 1.5;
}

.featured-countdown {
  display: grid;
  min-width: 118px;
  gap: 5px;
  justify-items: end;
  color: #8b7a9a;
}

.featured-countdown span,
.featured-metrics > div > span,
.leader-preview-bid span {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
}

.featured-countdown strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.featured-content {
  align-items: stretch;
  margin-top: 20px;
}

.featured-project.is-waiting .featured-content {
  justify-content: center;
}

.featured-build {
  flex: 1 1 64%;
  min-width: 0;
}

.featured-canvas-wrap {
  position: relative;
  height: 370px;
  overflow: hidden;
  border: 1px solid #e8e8e2;
  border-radius: 13px;
  background:
    radial-gradient(ellipse at 50% 82%, rgba(226, 220, 235, 0.38), transparent 58%),
    #fafaf7;
}

#featured-canvas,
#leader-preview-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#featured-canvas {
  cursor: crosshair;
}

#featured-canvas.is-rotating {
  cursor: grab;
}

#featured-canvas.is-rotating:active {
  cursor: grabbing;
}

.featured-metrics {
  justify-content: flex-start;
  gap: 24px;
  padding: 14px 4px 0;
}

.featured-metrics > div,
.leader-preview-bid > div {
  display: grid;
  gap: 4px;
}

.featured-metrics > div > span,
.leader-preview-bid span {
  color: #96a097;
}

.featured-metrics strong,
.leader-preview-bid strong {
  color: #53665a;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.featured-metrics p {
  margin: 0 0 0 auto;
  color: #8a948d;
  font-size: 10px;
  text-align: right;
}

.leader-preview-card {
  display: flex;
  flex: 0 0 290px;
  flex-direction: column;
  padding: 17px;
  border: 1px solid #e8eae4;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.85);
}

.featured-project.is-waiting .leader-preview-card {
  flex: 0 1 390px;
}

.leader-preview-card h3 {
  margin: 0 0 10px;
  color: #526258;
  font-size: 15px;
}

.leader-preview-model {
  position: relative;
  height: 173px;
  overflow: hidden;
  border-radius: 10px;
  background: #f9f9f6;
}

.leader-preview-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #a0a89f;
  font-size: 10px;
  pointer-events: none;
}

.leader-preview-empty[hidden] {
  display: none;
}

.leader-preview-rotate {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  color: #8a948d;
  font-size: 8px;
  pointer-events: none;
}

.leader-preview-bid {
  align-items: flex-start;
  margin-top: 12px;
}

.leader-preview-bid strong {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#leader-preview-shape {
  min-height: 31px;
  margin: 12px 0;
  color: #89938c;
  font-size: 10px;
  line-height: 1.45;
}

.leader-preview-card > a {
  margin-top: auto;
  text-decoration: none;
}

.featured-local-note {
  margin: 15px 0 0;
  color: #99a198;
  font-size: 9px;
  line-height: 1.5;
}

.draft-live-note {
  margin: 0;
  color: #87918a;
  font-size: 9px;
  line-height: 1.45;
}

.featured-project[hidden] {
  display: none;
}

.auction-view {
  min-height: calc(100vh - 107px);
  padding-bottom: 48px;
}

.museum-view {
  min-height: calc(100vh - 82px);
  padding-bottom: 56px;
}

.museum-intro {
  max-width: 720px;
  margin: 35px auto 42px;
  text-align: center;
}

.museum-intro h1 {
  margin: 12px 0;
  color: #26332e;
  font-size: clamp(36px, 4.5vw, 50px);
  letter-spacing: -2.5px;
  line-height: 1.05;
}

.museum-intro h1 span {
  color: #8db29b;
}

.museum-intro .intro-copy {
  margin: 15px auto 0;
}

.museum-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
}

.museum-heading h2 {
  margin: 4px 0 0;
  color: #4f6255;
  font-size: 23px;
}

.museum-heading > span {
  color: #89938c;
  font-size: 11px;
}

.museum-empty {
  padding: 36px 20px;
  border: 1px dashed #dce3da;
  border-radius: 15px;
  color: #88948b;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.museum-empty[hidden] {
  display: none;
}

.museum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 18px;
}

.museum-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid #e5e9e2;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(67, 79, 67, 0.05);
}

.museum-card-heading,
.museum-progress-label,
.museum-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.museum-card-heading h3 {
  margin: 0;
  color: #4f6255;
  font-size: 17px;
}

.museum-status {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 999px;
  background: #f7f0e2;
  color: #a18755;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.museum-status.is-complete {
  background: #e9f2eb;
  color: #5c8066;
}

.museum-canvas-wrap {
  position: relative;
  height: 230px;
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid #e8ebe5;
  border-radius: 11px;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(226, 220, 235, 0.3), transparent 60%),
    #fafaf7;
}

.museum-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: manipulation;
}

.museum-canvas-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.88);
  color: #87938a;
  font-size: 8px;
  pointer-events: none;
}

.museum-progress {
  margin-top: 15px;
}

.museum-progress-label {
  margin-bottom: 7px;
}

.museum-progress-label span {
  color: #96a097;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
}

.museum-progress-label strong {
  color: #53665a;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.museum-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf0eb;
}

.museum-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b6cdbb, #b7a5ca);
  transition: width 180ms ease;
}

.museum-creator {
  margin: 14px 0 6px;
  color: #65756a;
  font-size: 10px;
  font-weight: 650;
}

.museum-description {
  min-height: 34px;
  margin: 0;
  color: #88938b;
  font-size: 10px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.museum-card-footer {
  margin-top: 14px;
}

.museum-card-footer > span {
  color: #96a097;
  font-size: 9px;
}

.museum-card-footer .auction-secondary-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 9px;
}

.auction-intro {
  max-width: 760px;
  margin: 35px auto 31px;
  text-align: center;
}

.auction-back {
  display: inline-block;
  margin-bottom: 30px;
  color: #75847a;
  font-size: 11px;
  text-decoration: none;
}

.auction-back:hover {
  color: var(--sage-dark);
}

.auction-intro h1 {
  margin: 14px 0 12px;
  font-size: clamp(36px, 4.5vw, 50px);
}

.auction-demo-badge {
  display: inline-flex;
  margin-top: 17px;
  padding: 8px 11px;
  border: 1px solid #e9e8dc;
  border-radius: 999px;
  background: rgba(246, 246, 236, 0.78);
  color: #85836d;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.auction-round {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid #e8eae4;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 38px rgba(67, 79, 69, 0.045);
}

.auction-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.auction-card-heading h2,
.auction-result h2 {
  margin: 7px 0 0;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.6px;
}

.auction-status-pill {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid #e2ebe1;
  border-radius: 999px;
  background: #f6faf5;
  color: #698772;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.9px;
}

.auction-copy {
  max-width: 660px;
  margin: 11px 0 0;
  color: #7f8983;
  font-size: 12px;
  line-height: 1.65;
}

.auction-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 24px 0 21px;
  border: 1px solid #edf0ea;
  border-radius: 12px;
  background: #fbfcf9;
}

.auction-stats > div {
  display: grid;
  gap: 7px;
  padding: 15px 17px;
}

.auction-stats > div + div {
  border-left: 1px solid #edf0ea;
}

.auction-stats span {
  color: #98a198;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
}

.auction-stats strong {
  overflow: hidden;
  color: #506657;
  font-size: 16px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bid-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr);
  gap: 9px 14px;
  max-width: 670px;
}

.bid-form > label {
  color: #75827a;
  font-size: 10px;
  font-weight: 650;
}

.bid-form > input {
  width: 100%;
  min-width: 0;
  height: 39px;
  padding: 0 11px;
  border: 1px solid #e4e9e1;
  border-radius: 8px;
  outline: 0;
  color: #526258;
  background: #fff;
  font-size: 11px;
}

.bid-form > input:focus,
.bid-amount-wrap:focus-within {
  border-color: #9fbea6;
  box-shadow: 0 0 0 3px rgba(169, 200, 182, 0.16);
}

.bid-controls {
  display: flex;
  gap: 8px;
}

.bid-amount-wrap {
  display: flex;
  min-width: 0;
  height: 40px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #e4e9e1;
  border-radius: 8px;
  background: white;
  color: #718078;
}

.bid-amount-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #526258;
  font-size: 12px;
}

.auction-primary-button,
.auction-secondary-button {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.auction-primary-button {
  border: 0;
  background: #6f9279;
  color: white;
}

.auction-primary-button:hover:not(:disabled) {
  background: #5d8068;
  transform: translateY(-1px);
}

.auction-secondary-button {
  border: 1px solid #e3e8e0;
  background: white;
  color: #76847a;
}

.auction-secondary-button:hover:not(:disabled) {
  background: #f5f8f3;
}

.auction-primary-button:disabled,
.auction-secondary-button:disabled,
.shape-option:disabled,
.voxel-tool:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auction-feedback,
.voxel-feedback {
  grid-column: 1 / -1;
  min-height: 14px;
  margin: 0;
  color: #718575;
  font-size: 10px;
}

.auction-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid #edf0ea;
}

.auction-card-footer p {
  margin: 0;
  color: #9aa39b;
  font-size: 9px;
  line-height: 1.5;
}

.shape-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
  margin-top: 23px;
}

.shape-option {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 166px;
  padding: 15px 9px;
  border: 1px solid #e8ebe5;
  border-radius: 13px;
  background: #fcfdfa;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.shape-option:hover:not(:disabled) {
  transform: translateY(-2px);
}

.shape-option.is-selected {
  border-color: #c5b6d2;
  background: #faf7fc;
  box-shadow: 0 0 0 2px rgba(203, 187, 216, 0.14);
}

.shape-option strong {
  color: #4f6255;
  font-size: 11px;
}

.shape-option small {
  color: #929b94;
  font-size: 9px;
}

.shape-option-preview {
  display: block;
  width: 100%;
  height: 84px;
}

.shape-create-preview {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border: 1px dashed #c8bdcf;
  border-radius: 12px;
  color: #907da0;
  font-size: 37px;
  font-weight: 300;
}

.shape-option-create.is-selected .shape-create-preview {
  border-color: #a995bc;
  background: rgba(203, 187, 216, 0.14);
}

.shape-icon {
  position: relative;
  display: block;
  width: 76px;
  height: 70px;
}

.shape-icon::before,
.shape-icon::after,
.shape-icon i {
  position: absolute;
  display: block;
  content: "";
}

.shape-lighthouse::before {
  left: 29px;
  bottom: 6px;
  width: 20px;
  height: 38px;
  border: 2px solid #b9a7ca;
  border-radius: 5px 5px 2px 2px;
  background: #e4d9eb;
  clip-path: polygon(16% 0, 84% 0, 100% 100%, 0 100%);
}

.shape-lighthouse::after {
  left: 25px;
  bottom: 43px;
  width: 28px;
  height: 12px;
  border: 2px solid #ad9abc;
  border-radius: 4px 4px 1px 1px;
  background: #e8cba9;
}

.shape-lighthouse i {
  left: 35px;
  bottom: 55px;
  width: 8px;
  height: 8px;
  border-radius: 50% 50% 0 0;
  background: #d2bfdc;
}

.shape-house::before {
  left: 18px;
  bottom: 7px;
  width: 40px;
  height: 30px;
  border: 2px solid #b9a7ca;
  border-radius: 3px;
  background: #e7dcec;
}

.shape-house::after {
  left: 15px;
  bottom: 32px;
  width: 42px;
  height: 30px;
  background: #d1c0dc;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.shape-house i {
  left: 34px;
  bottom: 7px;
  z-index: 1;
  width: 10px;
  height: 18px;
  border-radius: 5px 5px 0 0;
  background: #f4ead8;
}

.shape-tree::before {
  left: 32px;
  bottom: 5px;
  width: 13px;
  height: 28px;
  border-radius: 5px;
  background: #b78e77;
}

.shape-tree::after {
  left: 18px;
  bottom: 24px;
  width: 43px;
  height: 43px;
  border-radius: 48% 52% 45% 55%;
  background: #bed3c0;
  box-shadow: -11px 9px 0 -4px #cbdcc9, 11px 9px 0 -4px #a9c5ac;
}

.shape-flower::before {
  left: 36px;
  bottom: 5px;
  width: 4px;
  height: 36px;
  border-radius: 3px;
  background: #a8c4ad;
}

.shape-flower::after {
  left: 27px;
  bottom: 35px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #e9c9ba;
  box-shadow: 0 -11px 0 -4px #e9c9ba, 0 11px 0 -4px #e9c9ba, 11px 0 0 -4px #e9c9ba, -11px 0 0 -4px #e9c9ba;
}

.shape-flower i {
  left: 34px;
  bottom: 42px;
  z-index: 1;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e5c987;
}

.voxel-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 195px;
  gap: 18px;
}

.artwork-description-label {
  display: grid;
  gap: 7px;
  margin: 16px 0;
  color: #75827a;
  font-size: 10px;
  font-weight: 650;
}

.artwork-description-label textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid #e3e8e0;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
}

.artwork-description-label textarea:focus {
  outline: 0;
  border-color: #9fbea6;
  box-shadow: 0 0 0 3px rgba(169, 200, 182, 0.16);
}

.artwork-description-label small {
  color: #9aa39b;
  font-size: 9px;
  font-weight: 400;
  margin-top: 19px;
}

.voxel-canvas-wrap {
  position: relative;
  min-width: 0;
  height: 430px;
  overflow: hidden;
  border: 1px solid #e8e8e2;
  border-radius: 13px;
  background:
    radial-gradient(ellipse at 50% 82%, rgba(226, 220, 235, 0.38), transparent 58%),
    #fafaf7;
}

.voxel-canvas-toolbar {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.voxel-canvas-toolbar > * {
  pointer-events: auto;
}

#auction-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

#auction-canvas.is-rotating {
  cursor: grab;
}

#auction-canvas.is-rotating:active {
  cursor: grabbing;
}

#auction-canvas.is-removing {
  cursor: crosshair;
}

.voxel-canvas-hint {
  position: absolute;
  bottom: 10px;
  left: 12px;
  padding: 6px 9px;
  border: 1px solid rgba(234, 237, 230, 0.9);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
  color: #8c958e;
  font-size: 9px;
  pointer-events: none;
}

.voxel-zoom-tools {
  display: flex;
  min-height: 37px;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(224, 230, 221, 0.92);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 14px rgba(57, 70, 59, 0.06);
  backdrop-filter: blur(8px);
}

.voxel-zoom-tools button {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #776487;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.voxel-zoom-tools button:hover {
  background: #eee8f3;
}

.voxel-zoom-tools output {
  min-width: 39px;
  color: #7b6c89;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
}

.voxel-controls {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 15px;
  padding: 16px 14px;
  border: 1px solid #edf0ea;
  border-radius: 12px;
  background: #fcfdfa;
}

.voxel-count {
  display: grid;
  gap: 6px;
}

.voxel-count > span {
  color: #98a198;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.voxel-count strong {
  color: #5a7060;
  font-size: 22px;
  font-weight: 600;
}

.voxel-count i {
  padding: 0 5px;
  color: #a4ada5;
  font-size: 14px;
  font-style: normal;
}

.layer-control {
  display: grid;
  gap: 9px;
}

.layer-control label {
  color: #718078;
  font-size: 10px;
}

.layer-control label strong {
  color: #867397;
}

.layer-control input {
  width: 100%;
  accent-color: #9e88b1;
}

.layer-control small {
  color: #9aa39b;
  font-size: 9px;
  line-height: 1.5;
}

.voxel-tool-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 4px;
  border: 1px solid #e8ebe5;
  border-radius: 9px;
  background: white;
}

.voxel-tool {
  min-height: 31px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #87938a;
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
}

.voxel-tool.is-active {
  background: #eee8f3;
  color: #776487;
}

.voxel-undo {
  min-height: 34px;
  padding: 0 8px;
  font-size: 9px;
}

.voxel-feedback {
  min-height: 29px;
  color: #ad6d68;
  line-height: 1.45;
}

.voxel-publish {
  width: 100%;
  margin-top: auto;
}

.voxel-footer-note {
  margin: 12px 0 0;
  color: #9aa39b;
  font-size: 9px;
  line-height: 1.5;
}

.auction-result {
  text-align: center;
}

.auction-result .auction-copy {
  margin: 12px auto 20px;
}

.auction-result-shape {
  width: 95px;
  height: 95px;
  margin: 0 auto 20px;
  border-radius: 26px;
  background-color: #e8e0ee;
  background-image:
    linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, 0.65) 46%, transparent 54%),
    linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.45) 46%, transparent 54%);
  box-shadow: inset 0 0 0 1px rgba(141, 114, 161, 0.12);
}

@media (max-width: 860px) {
  .featured-content {
    flex-direction: column;
  }

  .leader-preview-card {
    flex: 1 1 auto;
  }

  .leader-preview-model {
    height: 210px;
  }

  .auction-round {
    padding: 22px;
  }

  .voxel-editor {
    grid-template-columns: minmax(0, 1fr) 175px;
    gap: 12px;
  }

  .voxel-canvas-wrap {
    height: 400px;
  }
}

@media (max-width: 560px) {
  .museum-view {
    padding-bottom: 35px;
  }

  .museum-intro {
    margin: 22px auto 30px;
  }

  .museum-intro h1 {
    font-size: 37px;
    letter-spacing: -2px;
  }

  .museum-heading h2 {
    font-size: 19px;
  }

  .museum-card {
    padding: 13px;
  }

  .museum-canvas-wrap {
    height: 205px;
  }

  .museum-card-footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .featured-project {
    margin-top: 24px;
    padding: 16px 13px;
    border-radius: 15px;
  }

  .featured-heading {
    align-items: flex-start;
    gap: 8px;
  }

  .featured-heading h2 {
    font-size: 19px;
  }

  .featured-heading p:last-child {
    max-width: 230px;
    font-size: 9px;
  }

  .featured-countdown {
    min-width: 87px;
  }

  .featured-countdown strong {
    font-size: 14px;
  }

  .featured-canvas-wrap {
    height: min(350px, 94vw);
  }

  .featured-metrics {
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .featured-metrics p {
    flex-basis: 100%;
    margin-left: 0;
    text-align: left;
  }

  .leader-preview-card {
    padding: 13px;
  }

  .leader-preview-model {
    height: 190px;
  }

  .topbar {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    gap: 5px 8px;
    padding: 10px 0;
  }

  .edition-pill {
    display: none;
  }

  .topbar-nav {
    gap: 1px;
  }

  .topbar-nav a {
    padding: 8px 9px;
    font-size: 10px;
  }

  .auction-view {
    min-height: calc(100vh - 78px);
  }

  .auction-intro {
    margin-top: 22px;
  }

  .auction-back {
    margin-bottom: 24px;
  }

  .auction-intro h1 {
    font-size: 37px;
    letter-spacing: -2px;
  }

  .auction-demo-badge {
    font-size: 7px;
    letter-spacing: 0.45px;
  }

  .auction-round {
    padding: 18px 15px;
  }

  .auction-card-heading h2,
  .auction-result h2 {
    font-size: 19px;
  }

  .auction-status-pill {
    padding: 7px 8px;
    font-size: 7px;
    letter-spacing: 0.5px;
  }

  .auction-stats {
    grid-template-columns: 1fr 1fr;
  }

  .auction-stats > div {
    padding: 12px;
  }

  .auction-stats > div:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid #edf0ea;
    border-left: 0;
  }

  .bid-form {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .bid-form > input {
    margin-bottom: 5px;
  }

  .bid-controls .auction-primary-button {
    flex: 0 0 auto;
  }

  .auction-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .auction-card-footer .auction-primary-button,
  .auction-card-footer .auction-secondary-button {
    width: 100%;
  }

  .shape-options {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .shape-option {
    min-height: 156px;
  }

  .voxel-editor {
    grid-template-columns: 1fr;
  }

  .voxel-canvas-wrap {
    height: min(390px, 95vw);
  }

  .voxel-canvas-toolbar {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 5px;
  }

  .voxel-tool-group {
    gap: 2px;
    padding: 3px;
  }

  .voxel-tool {
    min-height: 29px;
    padding: 0 5px;
    font-size: 8px;
  }

  .voxel-zoom-tools {
    min-height: 35px;
    gap: 1px;
    padding: 2px;
  }

  .voxel-zoom-tools button {
    width: 26px;
    height: 27px;
  }

  .voxel-zoom-tools output {
    min-width: 35px;
    font-size: 7px;
  }

  .voxel-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .voxel-count,
  .layer-control {
    grid-column: span 1;
  }

  .voxel-tool-group,
  .voxel-undo,
  .voxel-feedback,
  .voxel-publish {
    grid-column: 1 / -1;
  }
}

.waiting-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.waiting-room {
  display: flex;
  flex: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 0 48px;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.waiting-room h1 {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: clamp(36px, 6vw, 58px);
  letter-spacing: -2.4px;
  line-height: 1.02;
}

.waiting-room h1 span {
  color: #8db29b;
}

.waiting-room .intro-copy {
  margin: 20px auto 0;
}

.waiting-blocks {
  display: grid;
  width: 66px;
  height: 66px;
  margin-bottom: 26px;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  transform: rotate(-8deg);
}

.waiting-blocks span {
  border-radius: 4px;
  background: #e6ebe1;
  animation: waiting-pulse 2.7s ease-in-out infinite;
}

.waiting-blocks span:nth-child(3n + 1) { background: #9dbca8; }
.waiting-blocks span:nth-child(3n + 2) { background: #e9c0a9; }
.waiting-blocks span:nth-child(4n) { background: #c9b8d9; }
.waiting-blocks span:nth-child(2) { animation-delay: 0.3s; }
.waiting-blocks span:nth-child(4) { animation-delay: 0.6s; }
.waiting-blocks span:nth-child(6) { animation-delay: 0.9s; }
.waiting-blocks span:nth-child(8) { animation-delay: 1.2s; }

@keyframes waiting-pulse {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.35; transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  .waiting-blocks span { animation: none; }
}

.waiting-form {
  display: grid;
  width: min(100%, 470px);
  margin-top: 34px;
  padding: 20px;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 14px 40px rgba(53, 70, 61, 0.06);
  text-align: left;
}

.waiting-label {
  color: #5f7166;
  font-size: 12px;
  font-weight: 700;
}

.waiting-input-row {
  display: flex;
  gap: 8px;
}

.waiting-input-row input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 13px;
  border: 1px solid #e1e6de;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  font-size: 14px;
}

.waiting-input-row input:focus {
  outline: 0;
  border-color: #9fbea6;
  box-shadow: 0 0 0 3px rgba(169, 200, 182, 0.18);
}

.waiting-submit {
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--sage-dark);
  color: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.waiting-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.waiting-consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: #86918a;
  font-size: 11px;
  line-height: 1.5;
}

.waiting-consent input {
  margin-top: 2px;
  accent-color: var(--sage-dark);
}

.waiting-feedback {
  min-height: 17px;
  margin: 0;
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 600;
}

.waiting-feedback.is-error {
  color: #ad6d68;
}

.waiting-footer {
  padding: 22px 0 30px;
  border-top: 1px solid rgba(39, 50, 47, 0.08);
  color: #9aa39b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
}

@media (max-width: 560px) {
  .waiting-room {
    padding-top: 38px;
  }

  .waiting-input-row {
    flex-direction: column;
  }

  .waiting-input-row input {
    flex: none;
  }

  .waiting-submit {
    width: 100%;
  }
}

.purchase-consent {
  padding: 12px 24px 0;
}

.bid-consent {
  margin-top: 4px;
}

.purchase-consent a,
.bid-consent a {
  color: inherit;
  text-decoration: underline;
}

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  line-height: 1.65;
}

.legal-page h1 {
  margin: 4px 0 6px;
  font-size: clamp(30px, 5vw, 44px);
}

.legal-page h2 {
  margin: 30px 0 8px;
  font-size: 18px;
}

.legal-page ul {
  padding-left: 20px;
}

.legal-page a,
.legal-footer a,
.waiting-legal a {
  color: var(--sage-dark);
}

.legal-updated {
  margin: 0;
  color: #86918a;
  font-size: 13px;
}

.legal-footer {
  padding: 0 20px 32px;
  color: #86918a;
  font-size: 13px;
  text-align: center;
}

.waiting-legal {
  display: block;
  margin-top: 6px;
  font-size: 11px;
}
