.kolumbarium-3d-viewer,
.kolumbarium-3d-viewer * {
  box-sizing: border-box;
}

.kolumbarium-3d-viewer {
  width: 100%;
  margin: 0 auto;
  color: #26221c;
  background: #ebe7df;
  font-family: Arial, Helvetica, sans-serif;
}

.kolumbarium-3d-stage {
  position: relative;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #f4f1ea;
  overflow: hidden;
  box-shadow: 0 18px 70px rgb(74 63 45 / 0.18);
}

.kolumbarium-3d-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.kolumbarium-3d-stage .viewbar,
.kolumbarium-3d-stage .editor {
  position: absolute;
  z-index: 2;
  border: 1px solid rgb(48 43 36 / 0.14);
  background: rgb(255 255 255 / 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgb(58 48 34 / 0.12);
}

.kolumbarium-3d-stage .viewbar {
  top: 14px;
  left: 14px;
  display: flex;
  gap: 7px;
  padding: 7px;
}

.kolumbarium-3d-stage .editor {
  top: 14px;
  right: 14px;
  width: 326px;
  max-height: calc(100% - 28px);
  overflow: auto;
  padding: 12px;
}

.kolumbarium-3d-stage button,
.kolumbarium-3d-stage select,
.kolumbarium-3d-stage input {
  font: 600 13px/1 Arial, Helvetica, sans-serif;
}

.kolumbarium-3d-stage button,
.kolumbarium-3d-stage select {
  height: 34px;
  border: 1px solid rgb(48 43 36 / 0.16);
  background: #fffaf0;
  color: #29251f;
}

.kolumbarium-3d-stage button {
  min-width: 54px;
  cursor: pointer;
}

.kolumbarium-3d-stage button:hover,
.kolumbarium-3d-stage select:hover {
  background: #f3e8d3;
}

.kolumbarium-3d-stage .editor h2,
.kolumbarium-3d-stage .editor h3 {
  margin: 0;
  letter-spacing: 0;
}

.kolumbarium-3d-stage .editor h2 {
  font-size: 15px;
  line-height: 1.2;
}

.kolumbarium-3d-stage .editor h3 {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgb(48 43 36 / 0.12);
  font-size: 13px;
  line-height: 1.2;
}

.kolumbarium-3d-stage .field {
  display: grid;
  grid-template-columns: 112px 1fr 42px;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.2;
}

.kolumbarium-3d-stage .field input[type="range"],
.kolumbarium-3d-stage .field select {
  width: 100%;
}

.kolumbarium-3d-stage .field input[type="color"] {
  width: 100%;
  height: 32px;
  padding: 2px;
  border: 1px solid rgb(48 43 36 / 0.16);
  background: #fffaf0;
}

.kolumbarium-3d-stage .value {
  text-align: right;
  color: #6b5c45;
  font-size: 12px;
  font-weight: 700;
}

.kolumbarium-3d-stage .switch {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
}

.kolumbarium-3d-stage .edit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 9px;
}

.kolumbarium-3d-stage .edit-row select,
.kolumbarium-3d-stage .edit-row button {
  width: 100%;
}

.kolumbarium-3d-stage .grid {
  display: grid;
  grid-template-columns: 32px repeat(4, 1fr);
  gap: 5px;
  margin-top: 9px;
  align-items: stretch;
}

.kolumbarium-3d-stage .grid span {
  display: grid;
  min-height: 28px;
  place-items: center;
  color: #6b5c45;
  font-size: 11px;
  font-weight: 700;
}

.kolumbarium-3d-stage .slot {
  min-width: 0;
  height: 30px;
  padding: 0;
  font-size: 11px;
}

.kolumbarium-3d-stage .slot[data-material="empty"] {
  color: #8a7d69;
  background: #faf7ef;
}

.kolumbarium-3d-stage .slot[data-material="oak"],
.kolumbarium-3d-stage .slot[data-material="rustic"],
.kolumbarium-3d-stage .slot[data-material="paleWood"] {
  background: #d49a5c;
}

.kolumbarium-3d-stage .slot[data-material="stone"] {
  background: #ebe8df;
}

.kolumbarium-3d-stage .slot[data-material="anthracite"] {
  color: #f7f2e8;
  background: #303232;
}

.kolumbarium-3d-stage .actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 7px;
  margin-top: 11px;
}

.kolumbarium-3d-stage .status {
  margin-top: 10px;
  color: #6b5c45;
  font-size: 11px;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .kolumbarium-3d-stage {
    min-height: 720px;
    aspect-ratio: auto;
  }

  .kolumbarium-3d-stage .editor {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    max-height: 48%;
  }

  .kolumbarium-3d-stage .viewbar {
    top: 8px;
    left: 8px;
  }

  .kolumbarium-3d-stage .field {
    grid-template-columns: 108px 1fr 38px;
  }
}

body:has(.kolumbarium-3d-viewer) {
  margin: 0 !important;
  overflow: hidden !important;
}

body:has(.kolumbarium-3d-viewer) .kolumbarium-3d-viewer {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000;
  width: 100vw !important;
  max-width: none !important;
  height: 100vh !important;
  margin: 0 !important;
}

body:has(.kolumbarium-3d-viewer) .kolumbarium-3d-stage {
  width: 100vw !important;
  max-width: none !important;
  height: 100vh !important;
  min-height: 0 !important;
  margin: 0 !important;
  aspect-ratio: auto !important;
  box-shadow: none !important;
}
