.tm-account {
  width: min(calc(100% - 40px), 760px);
  margin: 64px auto 96px;
  color: var(--ink);
}
.tm-account--wide {
  width: min(calc(100% - 40px), 1040px);
}
.tm-account__head {
  padding-bottom: 20px;
  border-bottom: 2px solid var(--ink);
}
.tm-account__head h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.3;
}
.tm-account__head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.tm-account__steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.tm-account__steps li {
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.tm-account__steps li + li {
  border-left: 1px solid var(--border);
}
.tm-account__steps .is-active {
  color: var(--ink);
  font-weight: 700;
  border-bottom: 2px solid var(--accent);
}
.tm-form {
  display: grid;
}

.login-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.tm-form__section {
  padding: 0 0 28px;
}
.tm-form__section--account {
  padding-top: 30px;
}
.tm-form__section + .tm-form__section {
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.tm-form__section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
}
.tm-form__section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.35;
}
.tm-form__section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.tm-form--agreements > .tm-check--all {
  min-height: 52px;
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--border);
}
.tm-form--agreements .tm-agreement {
  display: grid;
  gap: 14px;
  padding-bottom: 30px;
  padding-top: 30px;
}
.tm-form--agreements .tm-agreement h2 {
  margin: 0;
}
.tm-form__guide {
  margin: -10px 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.tm-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}
.tm-form__grid--signup-simple {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 760px;
}
.tm-field {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}
.tm-field--full {
  grid-column: 1/-1;
}
.tm-field label,
.tm-field > span:first-child {
  font-size: 13px;
  font-weight: 700;
}
.tm-field input,
.tm-field select,
.tm-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.tm-field textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
}
.tm-agreement-content {
  max-height: 240px;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--border-strong);
  background: #f8fafb;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.tm-agreement-content :where(img, table) {
  max-width: 100%;
}
.tm-agreement-content img {
  height: auto;
}
.tm-agreement-content :where(p, ul, ol) {
  margin: 0 0 10px;
}
.tm-field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.tm-field small[data-pass-message] {
  min-height: 18px;
}
.tm-btn[hidden],
.tm-field small[hidden] {
  display: none;
}
.tm-field input[readonly],
.tm-field select:disabled {
  background: #f4f7f8;
  color: var(--muted);
}
.tm-field > strong {
  display: flex;
  min-height: 46px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.tm-my-layout > [class*="user-travel-profile-v1"] {
  grid-column: 2;
  min-width: 0;
}
.tm-travel-profile {
  padding-top: 38px;
  border-top: 2px solid var(--ink);
}
.tm-account__head--sub {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--border);
}
.tm-account__head--sub h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.35;
}
.tm-account__head--sub p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}
.tm-travel-profile .tm-form__section {
  padding-top: 26px;
}
.tm-form__actions {
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.tm-form__actions .tm-btn {
  min-width: 132px;
}
.tm-field__line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.tm-field__line--phone {
  grid-template-columns: minmax(0, 1fr) auto;
}
.tm-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.55;
}
.tm-check input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--accent);
}
.tm-check--agreement {
  padding: 2px 0 4px;
}
.tm-form__actions {
  display: flex;

  gap: 8px;
}
.tm-login {
  width: min(calc(100% - 40px), 440px);
}
.tm-login .tm-form__actions {
  display: grid;
}
.tm-account__links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
}
.tm-account__links a {
  color: var(--ink);
  font-weight: 700;
}
.tm-account__notice {
  padding: 18px;
  border-left: 3px solid var(--sky);
  background: var(--sky-soft);
  font-size: 13px;
  line-height: 1.6;
}
.tm-account__message {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}
.tm-complete {
  padding: 56px 0;
  text-align: center;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--border);
}
.tm-complete h1 {
  margin: 0 0 12px;
  font-size: 30px;
}
.tm-complete p {
  margin: 0 0 28px;
  color: var(--muted);
}
.tm-address-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
}
.tm-address-layer[hidden] {
  display: none;
}
.tm-address-layer__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: hsl(209 61% 16% / 0.38);
}
.tm-address-layer__dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(460px, calc(100% - 32px));
  height: min(620px, calc(100% - 64px));
  padding-top: 48px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: var(--surface);
  box-shadow: 0 20px 60px hsl(209 61% 16% / 0.2);
  transform: translate(-50%, -50%);
}
.tm-address-layer__close {
  position: absolute;
  z-index: 1;
  top: 2px;
  right: 2px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}
.tm-address-layer__close::before,
.tm-address-layer__close::after {
  position: absolute;
  top: 21px;
  left: 12px;
  width: 20px;
  height: 1px;
  background: var(--ink);
  content: "";
}
.tm-address-layer__close::before {
  transform: rotate(45deg);
}
.tm-address-layer__close::after {
  transform: rotate(-45deg);
}
.tm-address-layer__frame {
  width: 100%;
  height: 100%;
}
@media (max-width: 767px) {
  .tm-account {
    width: min(calc(100% - 32px), 760px);
    margin: 36px auto 72px;
  }
  .tm-account__head h1 {
    font-size: 24px;
  }
  .tm-form__grid {
    grid-template-columns: 1fr;
  }
  .tm-form__section--account,
  .tm-form__section + .tm-form__section {
    padding-top: 24px;
  }
  .tm-form__section-head,
  .tm-account__head--sub {
    display: block;
  }
  .tm-form__section-head p,
  .tm-account__head--sub p {
    margin-top: 7px;
    text-align: left;
  }
  .tm-my-layout > [class*="user-travel-profile-v1"] {
    grid-column: auto;
  }
  .tm-travel-profile {
    padding-top: 28px;
  }
  .tm-field--full {
    grid-column: auto;
  }
  .tm-form__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .tm-login .tm-form__actions {
    grid-template-columns: 1fr;
  }
  .tm-btn {
    padding: 0 14px;
  }
  .tm-field__line {
    grid-template-columns: 1fr;
  }
  .tm-field__line .tm-btn {
    width: 100%;
  }
  .tm-field__line--address {
    grid-template-columns: minmax(0, 1fr) 104px;
  }
  .tm-address-layer__dialog {
    height: calc(100% - 32px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tm-address-layer * {
    scroll-behavior: auto;
    transition: none;
  }
}
