.lgs-shell {
  --lgs-text: #faf9f7;
  --lgs-muted: #c4bdb4;
  --lgs-line: #494440;
  color-scheme: dark;
  color: var(--lgs-text);
}

.lg-century .lgs-home {
  --lgs-line: rgb(250 249 247 / 26%);
  margin: 0;
  padding: 0 0 5px;
  background: #121212;
  scroll-margin-top: 88px;
}

.lgs-form {
  box-sizing: border-box;
  max-width: 100%;
  margin: 0;
  padding: 17px 19px 19px;
  background: linear-gradient(155deg, #302c28, #211f1d 63%);
  border: 1px solid #514a43;
  border-radius: 9px;
  box-shadow: 0 18px 46px rgb(0 0 0 / .35), 0 4px 12px rgb(0 0 0 / .22);
}

.lgs-home .lgs-form {
  width: min(89%, 1120px);
  margin-inline: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.lgs-results {
  --lgs-text: #121212;
  --lgs-muted: #57534e;
  --lgs-line: #bab5ae;
  margin-block: 0 30px;
  color-scheme: light;
}

.lgs-results .lgs-form {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.lgs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 14px;
}

.lgs-title {
  font-family: var(--lg-heading-font, inherit);
  font-size: 16px;
  font-weight: 550;
  line-height: 1.35;
}

.lgs-deal {
  display: flex;
  gap: 2px;
  border: 1px solid var(--lgs-line);
  border-radius: 5px;
  padding: 2px;
  margin: 0;
  min-inline-size: 0;
}

.lgs-deal label {
  position: relative;
  cursor: pointer;
}

.lgs-deal input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.lgs-deal span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding-inline: 12px;
  border-radius: 3px;
  font-size: 13px;
  line-height: 1.2;
}

.lgs-deal input:checked + span {
  background: #4a433b;
  color: var(--lgs-text);
}

.lgs-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.14fr) minmax(0, .92fr) repeat(2, minmax(0, .93fr)) minmax(112px, .75fr);
  gap: 7px;
}

.lgs-field {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 62px;
  box-sizing: border-box;
  padding: 2px 0 0;
  border: 1px solid var(--lgs-line);
  border-radius: 4px;
  background: #252220;
}

.lgs-field > span {
  display: block;
  padding-inline: 12px;
  color: var(--lgs-muted);
  font-size: 12px;
  line-height: 1.2;
}

.lgs-field :is(select, input) {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 30px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--lgs-text);
  font: inherit;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.lgs-field select {
  appearance: none;
  cursor: pointer;
  padding-inline-end: 25px;
}

.lgs-field option { background: #272421; }
.lgs-field input::placeholder { color: var(--lgs-muted); opacity: 1; }
.lgs-field input[type="number"] { appearance: textfield; }
.lgs-field input::-webkit-inner-spin-button,
.lgs-field input::-webkit-outer-spin-button { appearance: none; margin: 0; }

.lgs-select::after {
  content: "";
  position: absolute;
  inset-inline-end: 12px;
  bottom: 16px;
  width: 6px;
  height: 6px;
  border: solid #d0c2ad;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
  pointer-events: none;
}

.lgs-field:focus-within { border-color: #cfbda5; }
.lgs-field :is(select, input):focus { outline: none; }
.lgs-deal input:focus-visible + span,
.lgs-form :is(button, a):focus-visible { outline: 2px solid #cfbda5; outline-offset: 2px; }

.lgs-form button.lgs-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 48px;
  margin: 0;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #efe9df;
  color: #24201c;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}

.lgs-form button.lgs-submit:hover { background: #fffaf1; }
.lgs-submit span {
  display: block;
  position: relative;
  width: 17px;
  border-top: 1px solid currentColor;
}

.lgs-submit span::after {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 1px 1px 0 0;
  transform: translateY(-56%) rotate(45deg);
}

.lgs-form .lgs-reset {
  display: inline-block;
  margin-top: 12px;
  color: var(--lgs-text);
  font-size: 13px;
  text-underline-offset: 3px;
}

@media (min-width: 930px) and (max-width: 1099px) {
  .lgs-field :is(select, input) { font-size: 13px; }
}

@media (max-width: 929px) {
  .lgs-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  .lgs-form { padding: 11px; }
  .lgs-toolbar { margin-bottom: 9px; }
  .lgs-title { font-size: 14px; }
  .lgs-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lgs-city, .lgs-submit { grid-column: 1 / -1; }
  .lgs-field { min-height: 54px; }
  .lgs-field :is(select, input) { font-size: 16px; }
}

@media (forced-colors: active) {
  .lgs-deal input:checked + span { outline: 1px solid SelectedItem; }
}

.lgs-home .lgs-toolbar { margin-bottom: 5px; }

.lgs-home .lgs-deal {
  gap: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.lgs-home .lgs-deal span {
  padding-inline: 1px;
  border-block-end: 1px solid transparent;
  border-radius: 0;
  color: var(--lgs-muted);
}

.lgs-home .lgs-deal input:checked + span {
  border-color: currentColor;
  background: transparent;
  color: var(--lgs-text);
}

.lgs-home .lgs-fields {
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 1.18fr) minmax(0, .88fr) minmax(0, 1.2fr) auto;
  gap: 0;
  border-block: 1px solid var(--lgs-line);
}

.lgs-home .lgs-fields > :not(:first-child) { border-inline-start: 1px solid var(--lgs-line); }
.lgs-home .lgs-fields > .lgs-city { padding-inline-start: 1px; }

.lgs-home .lgs-field,
.lgs-home .lgs-budget {
  min-width: 0;
  min-height: 59px;
  padding: 5px clamp(9px, 1.5vw, 18px);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.lgs-home .lgs-budget {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.lgs-home .lgs-field > span,
.lgs-home .lgs-budget > span {
  padding: 0;
  color: var(--lgs-muted);
  font-size: 12px;
  line-height: 1.2;
}

.lgs-home .lgs-field :is(select, input) { min-height: 34px; padding: 0; }
.lgs-home .lgs-field select { padding-inline-end: 16px; }
.lgs-home .lgs-select::after { inset-inline-end: clamp(9px, 1.5vw, 18px); }

.lgs-budget-range {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.lgs-budget-range::before {
  content: "";
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: 50%;
  width: 7px;
  border-block-start: 1px solid var(--lgs-muted);
  transform: translateX(-50%);
  pointer-events: none;
}

.lgs-home .lgs-budget .lgs-price { min-height: 0; padding: 0; }

.lgs-home .lgs-field :is(select, input):focus-visible {
  outline: 1px solid var(--lgs-text);
  outline-offset: 2px;
}

.lgs-home .lgs-form button.lgs-submit {
  min-width: 112px;
  padding-inline: 20px;
  border-radius: 0;
  background: transparent;
  color: var(--lgs-text);
  font-weight: 600;
}

.lgs-home .lgs-form button.lgs-submit:hover { background: rgb(250 249 247 / 7%); }

@media (max-width: 700px) {
  .lgs-home .lgs-form { width: calc(100% - 28px); }
  .lgs-home .lgs-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lgs-home .lgs-fields > .lgs-city { grid-column: auto; }
  .lgs-home .lgs-fields > :is(.lgs-beds, .lgs-submit) { border-inline-start: 0; }
  .lgs-home .lgs-fields > :is(.lgs-beds, .lgs-budget, .lgs-submit) { border-block-start: 1px solid var(--lgs-line); }
  .lgs-home .lgs-fields > .lgs-submit { grid-column: 1 / -1; }
  .lgs-home .lgs-fields > .lgs-beds { padding-inline-start: 1px; }
}

@media (max-width: 540px), (pointer: coarse) {
  .lgs-home .lgs-deal span,
  .lgs-home .lgs-field :is(select, input) { min-height: 44px; }
  .lgs-home .lgs-field :is(select, input) { font-size: 16px; }
  .lgs-home .lgs-select::after { bottom: 22px; }
  .lgs-home .lgs-form button.lgs-submit { min-width: 0; }
}

@media (max-width: 360px) {
  .lgs-home .lgs-fields > :is(.lgs-city, .lgs-budget) { grid-column: 1 / -1; }
  .lgs-home .lgs-fields > :is(.lgs-kind, .lgs-budget) { border-inline-start: 0; padding-inline-start: 1px; }
  .lgs-home .lgs-fields > .lgs-kind { border-block-start: 1px solid var(--lgs-line); }
  .lgs-home .lgs-fields > .lgs-beds { border-inline-start: 1px solid var(--lgs-line); padding-inline-start: 9px; }
}

.lgs-results .lgs-fields {
  gap: 0;
  border-block: 1px solid var(--lgs-line);
}

.lgs-results .lgs-field {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.lgs-results .lgs-fields > .lgs-field {
  border-inline-end: 1px solid var(--lgs-line);
}

.lgs-results .lgs-select::after { border-color: var(--lgs-muted); }
.lgs-results .lgs-field option { background: #faf9f7; }
.lgs-results .lgs-field :is(input, select):focus-visible {
  outline: 1px solid var(--lgs-text);
  outline-offset: -3px;
}

.lgs-results .lgs-deal input:checked + span,
.lgs-results .lgs-form button.lgs-submit {
  color: #faf9f7;
  background: #121212;
}

.lgs-results .lgs-form button.lgs-submit { border-radius: 0; }
.lgs-results .lgs-form button.lgs-submit:hover { background: #34312e; }

.lgs-results .lgs-ref {
  flex: 0 1 190px;
  min-height: 48px;
  border-block-end: 1px solid var(--lgs-line);
}

.lgs-more { border-block-end: 1px solid var(--lgs-line); }

.lgs-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding-inline: 1px;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
}

.lgs-more summary::-webkit-details-marker { display: none; }
.lgs-more summary::after { content: "+"; font-size: 20px; font-weight: 400; }
.lgs-more[open] summary::after { content: "−"; }

.lgs-more-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: clamp(12px, 3vw, 34px);
  padding-block: 4px 12px;
}

.lgs-more-fields .lgs-check {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.lgs-more-fields input[type="checkbox"] {
  flex: none;
  inline-size: 16px;
  block-size: 16px;
  accent-color: #121212;
}

.lgs-results .lgs-distance {
  flex: 0 1 190px;
  min-height: 50px;
  border-block-end: 1px solid var(--lgs-line);
}

.lg-es-card .lg-es-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 7px;
  margin-top: 8px;
  color: #504c47;
  font-size: 12px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.lg-es-facts > span { white-space: nowrap; }
.lg-es-facts > span + span::before { content: "·"; margin-inline-end: 7px; }

.lg-geography .lgs-city-link {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #aaa49c;
  text-decoration-thickness: 1px;
}

.lg-geography .lgs-city-link:hover { text-decoration-color: currentColor; }

@media (max-width: 929px) {
  .lgs-results .lgs-fields > .lgs-price {
    border-block-start: 1px solid var(--lgs-line);
  }
}

@media (max-width: 540px) {
  .lgs-results .lgs-fields > :is(.lgs-city, .lgs-beds, .lgs-price:nth-child(5)) { border-inline-end: 0; }
  .lgs-results .lgs-fields > :is(.lgs-kind, .lgs-beds) { border-block-start: 1px solid var(--lgs-line); }
  .lgs-results .lgs-ref { flex-basis: 100%; }
  .lgs-results .lgs-distance { flex-basis: 100%; }
  .lgs-results .lgs-field :is(input, select) { min-height: 38px; }
}
