:root {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #27243b;
  background: #f1f0f5;
  --purple: #6952a8;
  --light: #ede8f7;
  --muted: #807c90;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #a18bd2;
  outline-offset: 3px;
}
main {
  max-width: 1280px;
  padding: 35px 48px 22px;
  margin: auto;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.back {
  font-size: 11px;
  text-decoration: none;
  color: #7b748c;
}
h1 {
  font-size: 35px;
  letter-spacing: -1.5px;
  margin: 14px 0 8px;
  font-weight: 800;
}
header p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.demo {
  font-size: 11px;
  border-left: 3px solid #9585b7;
  padding: 6px 10px;
  color: #7b7091;
  align-self: flex-start;
  margin-top: 10px;
  white-space: nowrap;
}
.search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #d1c9df;
  margin: 30px 0 32px;
  min-height: 58px;
  box-shadow: 0 4px 0 #e8e4ef;
}
.search-bar svg {
  height: 23px;
  width: 23px;
  fill: none;
  stroke: #77638f;
  stroke-width: 1.8;
  margin-left: 20px;
  flex-shrink: 0;
}
.search-bar input {
  border: 0;
  background: transparent;
  outline: none;
  padding: 18px;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: #373047;
}
.search-bar input::placeholder {
  color: #a19aa9;
}
.search-bar button {
  background: var(--purple);
  color: #fff;
  border: 0;
  align-self: stretch;
  font-size: 14px;
  font-weight: 600;
  width: 118px;
}
.search-bar button:hover,
.save-button:hover {
  background: #59438f;
}
.workspace {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 44px;
}
.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  margin-bottom: 22px;
}
.section-top h2 {
  font-size: 14px;
  letter-spacing: 1px;
  margin: 0;
}
.quiet {
  border: 0;
  background: transparent;
  color: #8b819c;
  font-size: 11px;
  padding: 7px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.section-top #count {
  font-size: 11px;
  color: #8c8396;
}
.map-section {
  min-width: 0;
}
.floor-plan {
  height: 393px;
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.32fr 1fr;
  grid-template-rows: 1fr 1.05fr 0.62fr;
  gap: 7px;
  padding: 7px;
  background: #aea5bc;
  border: 2px solid #8d839d;
  margin-bottom: 21px;
}
.room {
  border: 0;
  text-align: left;
  position: relative;
  background: #e5e1ec;
  color: #6d657b;
  overflow: hidden;
  padding: 0;
  isolation: isolate;
  transition: background 0.15s;
}
.room:hover {
  background: #dcd3ed;
}
.room.selected {
  background: #d7c5f4;
  color: #4d307e;
  box-shadow: inset 0 0 0 2px #6952a8;
}
.room:focus-visible {
  outline-offset: -4px;
  outline-color: #382652;
}
.bedroom {
  grid-column: 1/3;
  grid-row: 1;
}
.study {
  grid-column: 3;
  grid-row: 1;
}
.living {
  grid-column: 1/3;
  grid-row: 2/4;
}
.kitchen {
  grid-column: 3;
  grid-row: 2;
}
.entry {
  grid-column: 3;
  grid-row: 3;
}
.room-label {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  font-size: 14px;
  font-weight: 600;
}
.room-label small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  min-width: 17px;
  height: 17px;
  background: #f8f6fc88;
  color: #857697;
  font-weight: 400;
  margin-left: 5px;
}
.pin {
  position: absolute;
  right: 13px;
  bottom: 9px;
  color: var(--purple);
  font-size: 21px;
  display: none;
  z-index: 2;
}
.selected .pin {
  display: block;
}
.furniture {
  position: absolute;
  border: 2px solid #b5adc2;
  background: #f3f0f8;
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
}
.bed {
  width: 91px;
  height: 101px;
  right: 25px;
  top: 17px;
  border-radius: 3px;
  background: linear-gradient(
    #f3f0f8 28%,
    #ccc4d8 28%,
    #ddd6e8 34%,
    #e5e0ed 34%
  );
  display: flex;
  gap: 5px;
  justify-content: center;
  padding-top: 6px;
}
.bed i {
  width: 31px;
  height: 17px;
  background: #fff;
  border: 1px solid #bfb6ce;
  border-radius: 3px;
}
.wardrobe {
  width: 70px;
  height: 22px;
  left: 14px;
  bottom: 13px;
  background: repeating-linear-gradient(
    90deg,
    #ece8f2 0 21px,
    #bfb6cc 22px 24px
  );
}
.desk {
  height: 50px;
  width: 76px;
  right: 14px;
  bottom: 14px;
}
.desk:after {
  content: "";
  width: 32px;
  height: 19px;
  border: 2px solid #b5adc2;
  position: absolute;
  left: 18px;
  bottom: -15px;
  background: #d6ccdf;
  border-radius: 4px;
}
.desk i {
  width: 34px;
  height: 22px;
  position: absolute;
  top: 6px;
  left: 19px;
  background: #beb4ce;
  border: 3px solid #e8e2f0;
}
.bookcase {
  width: 27px;
  height: 52px;
  left: 14px;
  bottom: 14px;
  background: repeating-linear-gradient(#f3f0f8 0 14px, #b5adc2 15px 17px);
}
.sofa {
  width: 62px;
  height: 127px;
  left: 15px;
  bottom: 24px;
  border-radius: 7px;
  background: #d0c7dd;
}
.sofa:before {
  content: "";
  position: absolute;
  left: 11px;
  right: -4px;
  top: 13px;
  bottom: 13px;
  border: 2px solid #b5adc2;
  background: linear-gradient(#ece7f3 49%, #b5adc2 50%, #ece7f3 51%);
  border-radius: 5px;
}
.coffee-table {
  width: 56px;
  height: 70px;
  border-radius: 20px;
  left: 49%;
  top: 46%;
  background: #d7cfdf;
  transform: rotate(-4deg);
}
.tv {
  height: 73px;
  width: 17px;
  right: 17px;
  top: 76px;
  background: #bfb4cf;
}
.counter {
  right: 10px;
  top: 15px;
  bottom: 15px;
  width: 33px;
  background: #eeeaf5;
}
.counter:after {
  content: "";
  position: absolute;
  height: 30px;
  width: 64px;
  background: #eeeaf5;
  border: 2px solid #b5adc2;
  bottom: -2px;
  right: 0;
}
.counter i {
  height: 14px;
  width: 14px;
  border: 2px solid #b0a6bf;
  position: absolute;
  left: 7px;
  top: 17px;
  border-radius: 50%;
}
.counter i + i {
  top: 39px;
}
.entry .room-label {
  top: 10px;
  font-size: 13px;
}
.entry-cabinet {
  height: 19px;
  width: 64px;
  left: 12px;
  bottom: 10px;
  background: repeating-linear-gradient(
    90deg,
    #ece8f2 0 29px,
    #bfb6cc 30px 32px
  );
}
.door {
  height: 50px;
  width: 49px;
  border-radius: 50% 0 0 0;
  background: transparent;
  border-right: 0;
  border-bottom: 0;
  right: 13px;
  bottom: -8px;
}
.entrance {
  position: absolute;
  bottom: -29px;
  right: 20px;
  font-size: 10px;
  color: #8d819f;
}
.map-legend {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 10px;
  color: #8e849b;
  margin-top: 35px;
}
.map-legend span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.map-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--purple);
}
.map-note {
  border-left: 2px solid #c9bddb;
  padding-left: 13px;
  margin: 30px 0 0;
  font-size: 12px;
  line-height: 1.9;
  color: #8c809b;
}
.results-section {
  min-width: 0;
  border-left: 1px solid #dbd5e3;
  padding-left: 28px;
}
.results-section .section-top {
  margin-bottom: 12px;
}
.filter-info {
  font-size: 11px;
  color: var(--purple);
  min-height: 24px;
  line-height: 1.7;
}
.results {
  display: flex;
  flex-direction: column;
  max-height: 291px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.item {
  display: flex;
  align-items: center;
  text-align: left;
  width: 100%;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid #e2dce9;
  background: transparent;
  padding: 15px 12px;
  color: #30293d;
}
.item:hover {
  background: #e9e4f1;
}
.item.active {
  background: white;
  box-shadow: inset 3px 0 0 var(--purple);
}
.item-icon {
  width: 30px;
  flex-shrink: 0;
  color: #78648e;
}
.item-icon svg {
  height: 27px;
  width: 27px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.item-text {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.item-text strong {
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.item-text small {
  font-size: 10px;
  color: #8b8099;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-arrow {
  font-size: 20px;
  color: #9889aa;
}
.detail {
  margin-top: 22px;
  border: 1px solid #cdc1df;
  background: #eae3f3;
  padding: 20px 20px 17px;
  position: relative;
  min-height: 154px;
}
.detail:before {
  content: "";
  height: 8px;
  width: 27px;
  background: #9c87bf;
  position: absolute;
  top: -4px;
  left: 20px;
}
.detail .found {
  font-size: 11px;
  color: #8e77ad;
  letter-spacing: 2px;
}
.detail h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  margin: 9px 0;
  overflow-wrap: anywhere;
}
.detail p {
  font-size: 11px;
  line-height: 1.8;
  color: #8b739f;
  margin: 7px 0;
  overflow-wrap: anywhere;
}
.detail-actions {
  display: flex;
  gap: 20px;
  margin-top: 14px;
}
.detail-actions button {
  font-size: 11px;
  border: 0;
  background: transparent;
  color: #67458d;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.detail .delete {
  color: #9985ad;
}
.add-button {
  border: 1px dashed #b7a7cc;
  background: transparent;
  color: #75608e;
  font-size: 12px;
  width: 100%;
  padding: 13px;
  margin-top: 15px;
}
.add-button:hover {
  background: #e6e0ef;
}
.empty {
  padding: 26px 12px;
  font-size: 13px;
  color: #7a6a89;
  line-height: 1.8;
}
.empty strong {
  display: block;
  color: #4c3b61;
  font-size: 17px;
  margin-bottom: 7px;
}
#status {
  font-size: 11px;
  color: #796087;
  line-height: 1.7;
  min-height: 17px;
  margin: 10px 0 0;
}
footer {
  border-top: 1px solid #dcd6e5;
  margin-top: 34px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 13px;
  align-items: center;
  font-size: 10px;
  color: #9a90a5;
}
dialog {
  background: #f9f7fc;
  color: #393047;
  border: 1px solid #b5a4cf;
  max-width: calc(100% - 32px);
  width: 420px;
  padding: 26px;
  box-shadow: 0 14px 70px #28133b33;
}
dialog::backdrop {
  background: #30253e66;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.dialog-head h2 {
  font-size: 21px;
  margin: 0;
}
.dialog-head button {
  border: 0;
  background: none;
  font-size: 25px;
  color: #9f8ab5;
  padding: 0 5px;
}
#item-form label {
  display: grid;
  gap: 9px;
  font-size: 12px;
  color: #7e698e;
  margin-top: 17px;
}
#item-form input,
#item-form select {
  width: 100%;
  padding: 12px;
  border: 1px solid #d0c5dc;
  background: #fff;
  font-size: 14px;
  color: #42344e;
  min-width: 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 25px;
  align-items: center;
  margin-top: 22px;
}
.save-button {
  background: var(--purple);
  border: 0;
  padding: 12px 20px;
  color: #fff;
  font-size: 13px;
}
#form-error {
  font-size: 12px;
  color: #9f465c;
  line-height: 1.6;
}
@media (min-width: 1450px) {
  main {
    padding-top: 46px;
  }
  .search-bar {
    margin-top: 35px;
    margin-bottom: 40px;
  }
  .floor-plan {
    height: 430px;
  }
  .results {
    max-height: 308px;
  }
}
@media (max-width: 850px) {
  main {
    padding: 24px;
  }
  .workspace {
    gap: 25px;
    grid-template-columns: 1.15fr 1fr;
  }
  .results-section {
    padding-left: 20px;
  }
  .floor-plan {
    height: 350px;
  }
  .bed {
    right: 11px;
  }
  .map-legend {
    display: block;
    line-height: 2.2;
  }
  .map-note {
    margin-top: 16px;
  }
  .detail {
    padding: 18px 14px;
  }
  .room-label {
    font-size: 12px;
    left: 10px;
  }
  .room-label small {
    margin-left: 1px;
  }
  .desk {
    width: 55px;
    right: 10px;
  }
  .bookcase {
    display: none;
  }
  .bedroom .room-label {
    top: 11px;
  }
  .bed {
    top: 39px;
    height: 75px;
    width: 69px;
  }
  .wardrobe {
    width: 52px;
  }
  .sofa {
    width: 45px;
  }
  .coffee-table {
    width: 41px;
  }
  .counter {
    width: 25px;
    right: 7px;
  }
  .counter i {
    left: 4px;
  }
  .entry-cabinet {
    width: 46px;
  }
  .entry .room-label {
    font-size: 11px;
  }
}
@media (max-width: 650px) {
  main {
    padding: 20px;
  }
  header {
    align-items: flex-start;
    gap: 5px;
  }
  h1 {
    font-size: 27px;
    margin-top: 14px;
    letter-spacing: -1px;
  }
  header p {
    font-size: 11px;
    line-height: 1.8;
    max-width: 250px;
  }
  .demo {
    font-size: 9px;
    margin-top: 0;
    padding: 3px 0 3px 6px;
  }
  .search-bar {
    margin: 25px 0 25px;
    min-height: 52px;
  }
  .search-bar input {
    font-size: 12px;
    padding: 16px 10px;
  }
  .search-bar svg {
    margin-left: 13px;
    width: 19px;
  }
  .search-bar button {
    font-size: 12px;
    width: 74px;
  }
  .workspace {
    grid-template-columns: 1fr;
    gap: 27px;
  }
  .floor-plan {
    height: 345px;
    max-width: 480px;
    margin-inline: auto;
  }
  .section-top {
    margin-bottom: 15px;
  }
  .map-legend {
    display: flex;
    gap: 12px;
    font-size: 9px;
    line-height: 1.6;
  }
  .map-note {
    display: none;
  }
  .results-section {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid #d8cfdf;
    padding-top: 23px;
  }
  .results {
    max-height: 300px;
  }
  .item {
    padding: 15px 12px;
  }
  .detail {
    margin-top: 22px;
    min-height: 142px;
  }
  .detail h3 {
    font-size: 20px;
  }
  .item-text small {
    font-size: 11px;
  }
  .bed {
    top: 17px;
    width: 86px;
    height: 102px;
    right: 19px;
  }
  .bedroom .room-label {
    top: 16px;
  }
  .room-label {
    font-size: 13px;
    left: 13px;
  }
  .desk {
    width: 73px;
    right: 16px;
  }
  .bookcase {
    display: block;
    width: 22px;
    left: 10px;
  }
  .sofa {
    width: 55px;
  }
  .coffee-table {
    width: 52px;
  }
  .counter {
    width: 32px;
  }
  .entry-cabinet {
    width: 60px;
  }
  .entry .room-label {
    font-size: 12px;
  }
  footer {
    align-items: flex-start;
    margin-top: 25px;
    line-height: 1.7;
  }
  footer .quiet {
    white-space: nowrap;
    padding-top: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .room {
    transition: none;
  }
}
