html.lq-dialog-visible,
html.lq-dialog-visible body {
  overflow: hidden;
}

.lq-dialog {
  --lq-ink: #152a42;
  --lq-muted: #536675;
  --lq-line: #d3dce1;
  --lq-action: #ae3822;
  width: min(35rem, calc(100% - 2rem));
  max-width: none;
  max-height: none;
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 1.1rem;
  background: #fff;
  color: var(--lq-ink);
  box-shadow: 0 22px 85px #07162840;
  font: 400 1rem/1.56 "Barlow", "PingFang SC", "Microsoft YaHei", sans-serif;
  text-align: left;
}

.lq-dialog:not([open]) { display: none; }
.lq-dialog::backdrop { background: rgb(9 24 40 / 58%); }
.lq-dialog *, .lq-dialog *::before, .lq-dialog *::after { box-sizing: border-box; }
.lq-dialog :is(h2,h3,p,dl,dd,ul) { margin: 0; }
.lq-dialog [hidden] { display: none !important; }
.lq-dialog :is(button,input,textarea) { font: inherit; }
.lq-dialog button { cursor: pointer; }
.lq-dialog :is(button,input,textarea):focus-visible { outline: 3px solid #287cac; outline-offset: 2px; }
.lq-dialog h2:focus { outline: 0; }

.lq-shell {
  display: flex;
  flex-direction: column;
  max-height: 91vh;
  max-height: 91dvh;
}

.lq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  gap: 1rem;
  border-bottom: 1px solid var(--lq-line);
  padding: 1.45rem 1.65rem 1.15rem;
}

.lq-dialog .lq-property {
  color: var(--lq-muted);
  font-size: .875rem;
  margin-bottom: .25rem;
}

.lq-header h2 { color: var(--lq-ink); font-size: 1.65rem; font-weight: 750; line-height: 1.25; }
.lq-close {
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--lq-line);
  background: #fff;
  color: var(--lq-ink);
  border-radius: 50%;
}
.lq-dialog .lq-close { font: 400 1.6rem/1 Arial, sans-serif; }
.lq-close:hover { background: #eff3f5; }
.lq-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1.35rem 1.65rem 1.65rem;
  scrollbar-width: thin;
}
.lq-dialog .lq-notice {
  padding: .65rem .85rem;
  border-left: .2rem solid #9eafbd;
  margin-bottom: 1.1rem;
  background: #f0f4f6;
  color: #3f5364;
  font-size: .875rem;
}
.lq-form { display: grid; gap: 1rem; margin: 0; }
.lq-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.lq-field { min-width: 0; }
.lq-field label { display: block; font-weight: 650; font-size: .9375rem; margin-bottom: .35rem; }
.lq-optional, .lq-help { color: var(--lq-muted); font-weight: 400; font-size: .8125rem; }
.lq-optional { margin-left: .2rem; }
.lq-help, .lq-field-error { display: block; margin-top: .27rem; }
.lq-control { position: relative; display: flex; align-items: center; }
.lq-dialog .lq-control :is(input,textarea) {
  appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 2.85rem;
  padding: .63rem .75rem;
  border: 1px solid #b5c1c9;
  background: #fff;
  color: var(--lq-ink);
  border-radius: .48rem;
  font-size: 1rem;
  line-height: 1.4;
}
.lq-dialog .lq-control textarea { resize: vertical; min-height: 3.75rem; }
.lq-dialog .lq-control :is(input,textarea)::placeholder { color: #687882; }
.lq-dialog #lq-rent { padding-right: 3.25rem; }
.lq-dialog #lq-years { padding-right: 2.25rem; }
.lq-suffix { position: absolute; right: .75rem; pointer-events: none; color: var(--lq-muted); font-size: .875rem; }
.lq-dialog .lq-control [aria-invalid="true"] { border-color: #a93324; }
.lq-field-error, .lq-save-error { color: #a02d1e; font-size: .875rem; }
.lq-dialog .lq-primary {
  display: block;
  width: 100%;
  padding: .8rem 1.1rem;
  border: 0;
  border-radius: .5rem;
  color: #fff;
  background: var(--lq-action);
  font-weight: 680;
}
.lq-dialog .lq-primary:hover { background: #952e1b; }
.lq-dialog button:disabled { cursor: default; opacity: .65; }
.lq-dialog .lq-control input:read-only { background: #eff3f5; color: #465c6d; }
.lq-account { display: flex; align-items: center; flex-wrap: wrap; column-gap: 1rem; margin-top: 1.25rem; padding-top: .65rem; border-top: 1px solid var(--lq-line); color: var(--lq-muted); font-size: .875rem; }
.lq-account-error:not(:empty) { width: 100%; color: #a02d1e; }
.lq-dialog .lq-link { min-height: 2.75rem; padding: .45rem .25rem; border: 0; background: transparent; color: #375a73; font-size: .9rem; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.lq-account .lq-link { margin-left: auto; }
.lq-list-status, .lq-loading { color: var(--lq-muted); font-size: .92rem; }
.lq-dialog .lq-list-status { margin-top: .6rem; }
.lq-dialog .lq-loading { margin-bottom: .75rem; }
.lq-dialog .lq-empty { color: var(--lq-muted); margin: .25rem 0 1.4rem; }
.lq-amount-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-radius: .6rem;
  padding: 1rem 1.1rem;
  background: #edf2f5;
}
.lq-amount-box > div { min-width: 0; }
.lq-amount-box span { color: var(--lq-muted); font-size: .875rem; }
.lq-amount-box p { line-height: 1.3; }
.lq-amount { font-size: 2rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; margin-right: .35rem; }
.lq-dialog .lq-edit {
  flex: none;
  min-height: 2.75rem;
  padding: .4rem .65rem;
  border: 1px solid #a5b4c0;
  border-radius: .45rem;
  background: #fff;
  color: var(--lq-ink);
  font-weight: 600;
  font-size: .875rem;
}
.lq-dialog .lq-local-note { color: var(--lq-muted); font-size: .8125rem; margin: .4rem 0 1rem; }
.lq-details > div { display: grid; grid-template-columns: 7rem 1fr; gap: .75rem; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid #e3e9ec; }
.lq-details dt { color: var(--lq-muted); font-size: .9rem; }
.lq-details dd { overflow-wrap: anywhere; white-space: pre-wrap; }
.lq-transfer { margin-top: .65rem; }
.lq-transfer .lq-link { padding-left: 0; }
.lq-transfer .lq-transfer-status:not(:empty) { margin-top: .55rem; color: var(--lq-ink); font-size: .875rem; }
.lq-transfer-url { display: block; width: 100%; margin-top: .4rem; border: 1px solid var(--lq-line); border-radius: .45rem; padding: .6rem .7rem; color: var(--lq-ink); background: #f4f7f8; }
.lq-examples { margin-top: 1.5rem; }
.lq-list-only { margin-top: 0; }
.lq-examples-title { display: flex; align-items: center; gap: .55rem; }
.lq-examples h3 { font-size: 1.05rem; font-weight: 700; }
.lq-examples-title span { font-size: .8125rem; color: var(--lq-muted); }
.lq-examples ul { list-style: none; padding: 0; }
.lq-examples li { padding: .55rem .05rem; border-bottom: 1px solid #e3e9ec; }
.lq-examples li span { color: var(--lq-muted); font-size: .875rem; }

@media (max-width: 38rem) {
  .lq-dialog {
    width: 100%;
    inset: auto 0 0;
    margin: 0;
    border-radius: 1rem 1rem 0 0;
  }
  .lq-shell { max-height: 93vh; max-height: 93dvh; }
  .lq-header { padding: 1rem 1.15rem .85rem; }
  .lq-header h2 { font-size: 1.45rem; }
  .lq-body { padding: .95rem 1.15rem max(1.3rem, env(safe-area-inset-bottom)); }
  .lq-pair { gap: .7rem; }
  .lq-details > div { grid-template-columns: 6.4rem 1fr; }
}

@media (max-width: 23rem) {
  .lq-contacts { grid-template-columns: 1fr; }
}
