.myProperty {
  width: min(1120px, calc(100% - 48px));
  min-height: calc(100dvh - 92px);
  margin: 0 auto;
  padding: 128px 0 56px;
}

body[page="myproperty"] {
  padding-top: 0;
}

.myProperty__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #ded7cf;
}

.myProperty__eyebrow {
  margin: 0 0 8px;
  color: #937a5f;
  font-size: 13px;
  font-weight: 700;
}

.myProperty h1 {
  margin: 0;
  color: #3f3b36;
  font-size: 30px;
  font-weight: 700;
}

.myProperty__header > p:last-child {
  margin: 0;
  color: #766f66;
  font-size: 14px;
}

.myProperty__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 28px;
}

.propertyCard {
  overflow: hidden;
  background: #fffdfa;
  border: 1px solid #e4ddd4;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgb(91 74 52 / 8%);
}

.propertyCard__photo {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  color: #aa987f;
  background: #eee8dd center / cover no-repeat;
}

.propertyCard__photo .material-symbols-outlined {
  font-size: 34px;
}

.propertyCard__body {
  padding: 16px;
}

.propertyCard__meta,
.propertyCard__roles {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.propertyCard__meta {
  align-items: center;
  justify-content: space-between;
}

.propertyCard h2 {
  margin: 13px 0 8px;
  overflow: hidden;
  color: #413e39;
  font-size: 17px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.propertyCard__address {
  min-height: 40px;
  margin: 0;
  color: #756f67;
  font-size: 13px;
  line-height: 1.55;
}

.propertyCard__rent {
  margin: 16px 0;
  color: #846a4e;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.propertyCard__rent small {
  margin-left: 3px;
  color: #8d877f;
  font-size: 12px;
  font-weight: 400;
}

.propertyCard__footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  padding-top: 13px;
  border-top: 1px solid #eee8e0;
}

.propertyCard__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  color: #5e554a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  background: #f4f0ea;
  border: 1px solid #e3d9cc;
  border-radius: 5px;
}

.propertyCard__action:hover {
  color: #fff;
  background: #8b7154;
  border-color: #8b7154;
}

.propertyCard__action .material-symbols-outlined {
  font-size: 17px;
}

.propertyTag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: #6d655d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  background: #f1ede7;
  border-radius: 4px;
}

.propertyTag--status-published { color: #477a59; background: #e5f0e7; }
.propertyTag--status-draft { color: #826b46; background: #f4eddd; }
.propertyTag--status-paused { color: #9a665e; background: #f6e8e5; }
.propertyTag--manager { color: #8b6727; background: #fbf1d7; }
.propertyTag--readonly { color: #785a55; background: #f5e9e7; }

.myProperty__empty {
  grid-column: 1 / -1;
  padding: 72px 24px;
  color: #756f67;
  text-align: center;
  background: rgb(255 253 250 / 76%);
  border: 1px dashed #d9d0c5;
  border-radius: 8px;
}

.propertyEditor {
  width: min(960px, 100%);
  margin: 0 auto;
  padding-top: 28px;
}

.propertyEditor__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.propertyEditor__back,
.propertyEditor__public {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #655b4f;
  font-size: 14px;
  font-weight: 700;
}

.propertyEditor__public { color: #806a50; }
.propertyEditor__topbar .material-symbols-outlined { font-size: 19px; }

/* 我的出租編輯頁特有的區塊容器；欄位本身仍沿用 setting.css 共用規格。 */
.propertyEditor .settingPart {
  display: block;
  margin-bottom: 30px;
  padding: 30px;
  background-color: #fff;
}

.propertyEditor .settingPart > .settingField:hover,
.propertyEditor .settingPart > .settingField:focus-within {
  background: rgb(253 246 241);
}

.propertyEditor [data-property-self-viewing-slots][hidden] {
  display: none;
}

.propertyEditor .settingField--editor {
  max-width: none;
}

.propertyEditor .settingField--editor .tox-tinymce {
  border: 1px solid #d7cec3;
  border-radius: 0;
}

.propertyEditor .settingField--editor .tox-editor-header {
  background-color: #f9f9f9;
  border-bottom: 1px solid #e1d9cf;
  box-shadow: none;
}

/* 可搜尋 select：保留原生 select 作為表單值，視覺操作交由搜尋按鈕與彈窗完成。 */
.propertySearchSelect__native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.propertySearchSelect__trigger {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  padding: 0 8px;
  color: #4d4235;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-bottom: 2px solid #d5cdc4;
}

.propertySearchSelect__trigger > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.propertySearchSelect__trigger:hover,
.propertySearchSelect__trigger:focus-visible {
  color: #996e2e;
  border-bottom-color: #a77936;
  outline: 0;
}

.propertySearchSelect__trigger:disabled {
  color: #aaa296;
  cursor: not-allowed;
}

.propertySearchSelect__trigger .material-symbols-outlined {
  flex: 0 0 auto;
  font-size: 22px;
}

.propertySearchSelectModal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(28 24 19 / 52%);
}

.propertySearchSelectModal__wrap {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(620px, 100%);
  max-height: min(680px, calc(100dvh - 48px));
  overflow: hidden;
  background: #fffdf9;
  border: 1px solid #d9cdbd;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgb(38 29 17 / 30%);
}

.propertySearchSelectModal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid #ece4d9;
}

.propertySearchSelectModal__header h2 {
  margin: 0;
  color: #4c4032;
  font-size: 19px;
}

.propertySearchSelectModal__close {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #795c30;
  cursor: pointer;
  background: #f7f0e6;
  border: 1px solid #dfd1b8;
  border-radius: 6px;
}

.propertySearchSelectModal__search {
  width: calc(100% - 40px);
  margin: 14px 20px;
  padding: 11px 13px;
  color: #42382d;
  font: inherit;
  background: #fff;
  border: 1px solid #d8cec0;
  border-radius: 7px;
}

.propertySearchSelectModal__options {
  min-height: 0;
  padding: 0 12px 12px;
  overflow-y: auto;
}

.propertySearchSelectModal__option {
  display: block;
  width: 100%;
  padding: 12px 10px;
  color: #4c4237;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #eee7dd;
}

.propertySearchSelectModal__option:hover,
.propertySearchSelectModal__option:focus-visible,
.propertySearchSelectModal__option.is-selected {
  color: #8c622a;
  background: #fbf3e5;
  outline: 0;
}

.propertySearchSelectModal__empty {
  margin: 20px 8px;
  color: #978b7d;
  text-align: center;
}

@media screen and (max-width: 640px) {
  .propertyEditor .settingPart {
    padding: 15px;
  }

  .propertySearchSelectModal {
    align-items: end;
    padding: 12px;
  }

  .propertySearchSelectModal__wrap {
    max-height: min(76dvh, 680px);
    border-radius: 12px 12px 8px 8px;
  }
}

.propertyDepositControl {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
}

.propertyDepositControl select {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}

.propertyDepositControl input {
  flex: 0 1 120px;
  min-width: 0;
}

.propertyDepositControl small {
  flex: 0 0 auto;
  color: #6d655c;
  font-size: 14px;
  font-weight: 700;
}

.propertyEditor__statusSwitch {
  display: flex;
  width: fit-content;
  overflow: hidden;
  margin: 0 auto;
  border: 1px solid #d7cec3;
  border-radius: 5px;
}

/* 房源狀態沿用共用完成度元件，但保留比個人資料頁更緊湊的區塊節奏。 */
.propertyEditor .propertyCompletion {
  margin-bottom: 18px;
}

.propertyEditor__statusSwitch button {
  min-width: 84px;
  height: 38px;
  padding: 0 14px;
  color: #756c61;
  font: 700 14px / 1 Arial, "Noto Sans TC", sans-serif;
  letter-spacing: 0;
  cursor: pointer;
  background: #fff;
  border: 0;
}

.propertyEditor__statusSwitch button + button {
  border-left: 1px solid #d7cec3;
}

.propertyEditor__statusSwitch button.is-active {
  color: #fff;
  background: #8b7154;
}

.propertyEditor__statusSwitch button:disabled,
.propertyEditor .settingActionBar [data-property-save]:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  pointer-events: none;
}

.propertyEditor .settingActionBar [data-property-save].is-draft {
  background-color: #5ca14e;
}

.propertyEditor .settingActionBar [data-property-save].is-published {
  background-color: #cc5642;
}

.propertyCover {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 10px 20px 24px;
}

.propertyCover > .settingField__label { justify-self: stretch; }
.propertyCover > small { color: #92877a; font-size: 13px; text-align: center; }

.propertyAdvanced .settingField__label {
  color: #5a5148;
}


@media (max-width: 900px) {
  .myProperty__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .myProperty { width: min(100% - 32px, 560px); padding: 92px 0 36px; }
  .myProperty__header { display: block; }
  .myProperty__header > p:last-child { margin-top: 10px; }
  .myProperty__grid { grid-template-columns: 1fr; gap: 14px; padding-top: 18px; }
  .propertyEditor .settingPart { padding: 20px; }
}
