.library-entry {
  border: 1px solid #987e50;
  background: #263d39;
  color: #f6eddc;
  padding: 10px 18px;
  font: inherit;
  cursor: pointer;
  border-radius: 4px;
  white-space: nowrap;
}
.heritage-dialog {
  width: min(1080px, 94vw);
  max-height: 88dvh;
  border: 1px solid #b7a17b;
  border-radius: 12px;
  background: #f3eee4;
  color: #2e403d;
  padding: 28px;
  box-shadow: 0 24px 90px #0006;
}
.heritage-dialog::backdrop {
  background: #0d2429aa;
  backdrop-filter: blur(6px);
}
.heritage-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}
.heritage-heading h2 {
  font-size: 28px;
  margin: 6px 0 12px;
}
.heritage-heading p {
  max-width: 600px;
  line-height: 1.7;
  margin: 0;
  color: #67716c;
}
.heritage-heading button {
  font-size: 24px;
  border: 0;
  background: none;
  cursor: pointer;
}
.heritage-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.heritage-tools input {
  flex: 1;
  min-width: 150px;
  background: #fffcf5;
  border: 1px solid #c8bcaa;
  border-radius: 5px;
  padding: 10px;
  color: #263d39;
}
.heritage-tools button {
  border: 1px solid #b8ac97;
  background: transparent;
  padding: 8px 18px;
  border-radius: 20px;
  color: #394e46;
  cursor: pointer;
}
.heritage-tools button[aria-pressed="true"] {
  background: #304e43;
  color: #fff;
}
.heritage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 250px;
  gap: 14px;
}
.heritage-card {
  display: grid;
  grid-template-rows: 158px auto 1fr;
  text-align: left;
  overflow: hidden;
  border: 1px solid #d0c6b7;
  border-radius: 8px;
  background: #faf7ef;
  padding: 0 0 14px;
  color: #253f36;
  cursor: pointer;
  transition: transform 0.15s;
}
.heritage-card:hover {
  transform: translateY(-3px);
  border-color: #9c7940;
}
.heritage-card img {
  width: 100%;
  height: 158px;
  object-fit: contain;
  background: #e2e6df;
}
.song-easter-egg {
  display: block;
  width: 78px;
  height: 34px;
  border-radius: 20px;
}
.song-easter-egg.unlocked {
  display: none;
}
.heritage-info {
  display: block;
  font-size: 17px;
  padding: 12px 14px 5px;
}
.heritage-card small {
  display: block;
  padding: 0 14px;
  color: #7e806e;
}
.heritage-editor {
  margin: 12px 0;
  border: 1px solid #ab9260;
  padding: 12px;
  border-radius: 6px;
}
.heritage-editor summary {
  cursor: pointer;
  font-weight: bold;
}
.heritage-editor p {
  font-size: 12px;
  line-height: 1.6;
}
.heritage-editor label {
  margin-top: 12px;
  font-size: 12px;
}
.heritage-editor output {
  float: right;
}
.heritage-editor input {
  width: 100%;
}
.heritage-editor button {
  padding: 8px;
  background: #efe6d4;
  color: #384b42;
  border: 1px solid #af9c7a;
  border-radius: 3px;
}
.heritage-note {
  font-size: 12px;
  color: #777;
  margin-top: 20px;
}
@media (max-width: 760px) {
  .library-entry {
    padding: 7px 9px;
    font-size: 9px;
    letter-spacing: 0.04em;
  }
  .heritage-dialog {
    padding: 18px;
    width: 94vw;
  }
  .heritage-heading h2 {
    font-size: 23px;
  }
  .heritage-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 238px;
    gap: 10px;
  }
  .heritage-card {
    grid-template-rows: 140px auto 1fr;
  }
  .heritage-card img {
    height: 140px;
  }
  .heritage-heading p {
    font-size: 12px;
  }
  .heritage-info {
    font-size: 15px;
  }
  .heritage-tools {
    gap: 6px;
  }
  .heritage-tools input {
    flex-basis: 100%;
  }
  .masthead {
    position: relative;
  }
  .brand-copy em {
    max-width: 180px;
  }
  .native-ios .masthead {
    padding-top: 14px;
  }
  .native-ios footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
.drawing-actions select {
  max-width: 140px;
  border: 1px solid #78887d;
  border-radius: 0;
  background: #efece0;
  color: #263d39;
  padding: 6px;
  font: inherit;
  font-size: 11px;
}
@media (max-width: 760px) {
  .heritage-editor {
    margin-top: 0;
  }
  .drawing-actions select {
    width: 100%;
    max-width: none;
  }
}
.heritage-editor input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  accent-color: #876933;
}
.control-rail > .heritage-editor {
  grid-column: 1/-1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
#heritageFields label {
  display: block;
  margin: 12px 0;
}
#heritageFields output {
  float: right;
}
#heritageFields input[type="range"] {
  display: block;
  width: 100%;
  padding: 0;
}
#heritageFields input[type="checkbox"] {
  height: auto;
  vertical-align: middle;
}
.model-view-actions select {
  min-width: 0;
  color: #263d39;
  background: #eef0e5;
  border: 1px solid #94a397;
  font-family: inherit;
  font-size: 10px;
}
@media (max-width: 760px) {
  #heritageFields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
  }
  .model-view-actions select {
    font-size: 7px;
    padding: 0;
    height: 18px;
  }
  .heritage-editor summary {
    font-size: 14px;
  }
  .heritage-editor p {
    max-width: 100%;
    font-size: 11px;
  }
  .heritage-editor button {
    margin-top: 10px;
  }
  .heritage-editor input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }
}
.model-import-dialog {
  width: min(720px, 94vw);
  max-height: 90dvh;
  padding: 0;
  border: 1px solid #a48a5d;
  border-radius: 10px;
  background: #f3eee4;
  color: #293d39;
  box-shadow: 0 28px 90px #0007;
}
.model-import-dialog::backdrop {
  background: #0d2429b8;
  backdrop-filter: blur(6px);
}
.model-import-card {
  padding: 24px;
}
.model-import-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}
.model-import-heading small {
  font:
    9px ui-monospace,
    SFMono-Regular,
    monospace;
  letter-spacing: 0.14em;
  color: #8d3429;
}
.model-import-heading h2 {
  margin: 5px 0 0;
  font-size: 24px;
}
.model-import-heading > button {
  border: 0;
  background: none;
  font-size: 24px;
  color: #293d39;
  cursor: pointer;
}
.model-import-status {
  padding: 11px 13px;
  margin: 18px 0;
  background: #e5dfd2;
  border-left: 3px solid #8e7651;
  font-size: 12px;
  line-height: 1.55;
}
.model-import-status.loading {
  border-color: #b8862d;
}
.model-import-status.success {
  border-color: #3f745c;
  background: #e0e9df;
}
.model-import-status.error {
  border-color: #a33b2d;
  background: #eee0da;
  color: #7d281f;
}
.model-import-report {
  border: 1px solid #c4b79f;
  background: #faf7ef;
  padding: 14px;
}
.model-import-report > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.model-import-report > div b {
  font-size: 17px;
}
.model-import-report > div small {
  color: #777;
}
.model-import-report dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 12px 0;
}
.model-import-report dl div {
  padding: 8px;
  background: #ebe5d8;
}
.model-import-report dt {
  font-size: 9px;
  color: #777;
}
.model-import-report dd {
  margin: 4px 0 0;
  font:
    700 15px ui-monospace,
    SFMono-Regular,
    monospace;
}
.model-import-report p,
.model-import-note {
  font-size: 11px;
  line-height: 1.6;
  color: #676b63;
}
.model-import-report details {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #d5ccbd;
}
.model-import-report summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.model-import-report details p {
  margin: 7px 0;
  word-break: break-word;
}
.model-import-report details p b {
  display: inline-block;
  min-width: 52px;
  color: #344e46;
}
.model-import-card fieldset {
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid #c4b79f;
}
.model-import-card legend {
  padding: 0 6px;
  font-weight: 700;
}
.model-import-card fieldset > p {
  margin: 0 0 10px;
  font-size: 11px;
  color: #6f746d;
}
.model-import-card fieldset label {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 8px;
  margin: 7px 0;
  font-size: 11px;
}
.model-import-card fieldset input {
  min-width: 0;
  padding: 8px;
  border: 1px solid #b8ac97;
  background: #fffcf5;
  color: #293d39;
}
.model-import-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.model-import-actions button {
  border: 1px solid #8e806b;
  background: transparent;
  color: #293d39;
  padding: 9px 14px;
  cursor: pointer;
}
.model-import-actions button:first-child {
  margin-right: auto;
  background: #8d3429;
  border-color: #8d3429;
  color: #fff;
}
.model-import-actions button:nth-child(2) {
  background: #345a4d;
  color: #fff;
}
.model-import-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #d3c9b9;
}
.model-view-actions select {
  height: 100%;
}
@media (max-width: 760px) {
  .model-import-card {
    padding: 17px;
  }
  .model-import-heading h2 {
    font-size: 20px;
  }
  .model-import-report dl {
    grid-template-columns: repeat(2, 1fr);
  }
  .model-import-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .model-import-actions button:first-child {
    margin: 0;
    grid-column: 1/-1;
  }
  .model-import-card fieldset label {
    grid-template-columns: 38px 1fr;
  }
}

.editing-heritage label:has(#buildingType),
.editing-heritage label:has(#heightScale),
.editing-heritage label:has(#eaveStyle),
.editing-heritage label:has(#grade) {
  display: none !important;
}
.heritage-toggle {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.control-rail .heritage-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #876933;
  margin: 0;
}
.heritage-extra output {
  font-variant-numeric: tabular-nums;
}
#heritageFields {
  display: none;
}
.heritage-editor p {
  margin: 8px 0;
}
.heritage-editor {
  border: 0;
  border-bottom: 1px solid #c8bcaa;
  border-radius: 0;
  padding: 0 0 12px;
}

.qinian-views {
  position: absolute;
  z-index: 6;
  left: 98px;
  top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 104px);
  gap: 3px;
  padding: 4px;
  background: #f4eee1ee;
  border: 1px solid #b9ab8a;
  box-shadow: 0 3px 12px #182b2312;
  width: max-content;
}
.qinian-views[hidden] {
  display: none !important;
}
.qinian-views button {
  box-sizing: border-box;
  width: 104px;
  height: 34px;
  font: inherit;
  font-size: 11px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #394a42;
  cursor: pointer;
  white-space: nowrap;
}
.qinian-views button[aria-pressed="true"] {
  background: #29433b;
  color: #fff8e5;
}
@media (max-width: 760px) {
  .qinian-views {
    left: 70px;
    top: 7px;
    grid-template-columns: repeat(3, 72px);
    gap: 2px;
    padding: 3px;
  }
  .qinian-views button {
    width: 72px;
    height: 28px;
    padding: 0 2px;
    font-size: 9px;
  }
}
