.owner-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.owner-identity:hover { background: #364a46; }
.owner-identity span { overflow-wrap: anywhere; }
@media (max-width: 670px) {
  .owner-identity { width: 44px; justify-content: center; }
  .owner-identity span { display: none; }
  .mast .identity { gap: 0; }
}

.identity-dialog {
  width: min(440px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: clamp(20px, 4vw, 28px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--strong-rule);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/1.45 var(--text, Golos, sans-serif);
}
.identity-dialog::backdrop { background: #19262b7a; }
.identity-dialog [hidden] { display: none; }
.identity-dialog .identity-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.identity-heading > div { min-width: 0; }
.identity-dialog h2 { margin: 0; padding: 0; font: 700 26px/1.2 var(--heading, Manrope, sans-serif); letter-spacing: -.035em; }
.identity-dialog h2:focus { outline: none; }
.identity-dialog p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.identity-dialog #identity-email { margin-top: 6px; overflow-wrap: anywhere; }
.identity-dialog button { font-family: inherit; cursor: pointer; }
.identity-close {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  height: 44px;
  padding: 0;
  border: 1px solid var(--strong-rule);
  border-radius: 5px;
  background: transparent;
  color: var(--link, var(--steel));
}
.identity-close:hover, .identity-sections button:hover { background: var(--tint, #e4ebef); }
.identity-dialog :is(input,button):focus-visible { outline: 2px solid var(--focus, var(--steel)); outline-offset: 3px; }
.identity-sections { display: grid; margin-top: 24px; }
.identity-sections button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 4px;
  border: 0;
  border-top: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-align: start;
}
.identity-sections button::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  transform: rotate(45deg);
  border: solid var(--muted);
  border-width: 1.5px 1.5px 0 0;
}
.identity-password { display: grid; gap: 16px; margin: 24px 0 0; }
.identity-password label { display: block; margin-bottom: 6px; color: var(--ink); font-size: 14px; font-weight: 600; }
.identity-password input[type="password"] {
  width: 100%;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid var(--strong-rule);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.identity-dialog #identity-hint { margin-top: 5px; }
.identity-password input[aria-invalid="true"] { border-color: #982f25; }
.identity-submit {
  justify-self: start;
  min-height: 44px;
  margin-top: 4px;
  padding: 10px 18px;
  border: 0;
  border-radius: 5px;
  background: var(--brand, #a43c26);
  color: white;
  font-size: 14px;
  font-weight: 600;
}
.identity-submit:hover { background: var(--brand-hover, #88311f); }
.identity-submit:disabled { background: #dce0df; color: #4e5960; cursor: default; }
.identity-dialog #identity-feedback:not(:empty) { margin-top: 16px; }
.identity-dialog #identity-feedback[data-error] { color: #982f25; }
.identity-retry { min-height: 44px; padding: 4px 0; border: 0; background: transparent; color: var(--link, var(--steel)); font-size: 14px; }
