.header-actions #account-open {
  padding-inline: 13px;
  color: var(--accent);
  background: var(--selected-surface);
  border-color: transparent;
}
#account-dialog {
  box-sizing: border-box;
  width: min(440px, calc(100vw - 28px));
  max-width: none;
  max-height: min(88vh, 760px);
  max-height: min(88dvh, 760px);
  margin: auto;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 70px rgb(11 26 40 / 22%);
  overflow: auto;
  overscroll-behavior: contain;
}
html:has(#account-dialog[open]) { overflow: hidden; }
.account-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.account-heading h2 {
  align-self: center;
  font-size: clamp(22px, 3.2vw, 28px);
  line-height: 1.18;
  font-weight: 720;
  letter-spacing: -.035em;
  margin: 0;
}
.account-heading h2:focus { outline: none; }
#account-dialog button {
  font-family: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
}
#account-dialog button:disabled { opacity: .63; cursor: wait; }
.account-close {
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
}
#account-dialog .account-close { font-size: 24px; font-weight: 400; }
.account-content, .account-form { display: grid; min-width: 0; gap: 14px; }
.account-content { margin-top: 16px; }
.account-content .account-note, .account-content .account-status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.account-status:empty { display: none; }
.account-content .account-status { color: var(--accent); font-weight: 650; }
.account-content .account-status.is-error { color: var(--warm); }
.account-field { display: grid; gap: 6px; font-size: 14px; font-weight: 650; }
.account-field input {
  width: 100%; min-width: 0;
  min-height: 46px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 450;
}
.account-field .account-note { font-size: 13px; font-weight: 450; }
.account-primary, .account-secondary, .account-text {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line); border-radius: 10px;
}
.account-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.account-secondary { background: var(--surface-soft); color: var(--ink); }
.account-text {
  justify-self: center; padding: 6px;
  border: 0; color: var(--accent); background: transparent;
  text-decoration: underline; text-underline-offset: 3px;
}
.account-switch {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 6px;
  border-top: 1px solid var(--line); padding-top: 8px;
  font-size: 14px;
}
.account-identity { display: grid; gap: 3px; overflow-wrap: anywhere; }
.account-identity strong { font-size: 18px; }
.account-identity span { color: var(--muted); font-size: 14px; }
.account-profile { border-top: 1px solid var(--line); padding-top: 18px; gap: 20px; }
.account-interests { margin: 0; min-width: 0; padding: 0; border: 0; }
.account-interests legend { padding: 0; font-size: 16px; font-weight: 700; }
.account-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.account-choice {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line);
  cursor: pointer; font-size: 13px; font-weight: 600;
}
.account-choice:has(:checked) {
  color: var(--accent); background: var(--selected-surface); border-color: var(--accent);
}
.account-choice input, .account-sharing input { margin: 0; flex: none; accent-color: var(--accent); }
.account-sharing {
  display: flex; align-items: flex-start; gap: 10px;
  border-block-start: 1px solid var(--line); padding-block-start: 16px; cursor: pointer;
}
.account-sharing input { margin-top: 4px; width: 16px; height: 16px; }
.account-sharing > span { display: grid; gap: 5px; }
.account-sharing strong { font-size: 15px; }
.account-sharing span span { color: var(--muted); font-size: 13px; line-height: 1.5; }
@media (max-width: 580px) {
  .header-actions #account-open { width: 44px; padding: 0; }
  .header-actions #account-open span { display: none; }
}
@media (max-width: 440px) {
  .header-actions .history-link { min-width: 44px; }
  .header-actions .history-link span { display: none; }
}
@media (max-width: 355px) {
  .header-actions .lang .ic { display: none; }
}
.account-edit { border-block: 1px solid var(--line); }
.account-edit summary { padding: 14px 0; min-height: 48px; font-weight: 650; color: var(--accent); cursor: pointer; }
.account-edit .account-profile { border: 0; padding: 0 0 18px; }
.account-suggestions[hidden],
.home-outing-focused #account-recommendations,
body:has(#saved[aria-current="page"], #discover[aria-current="page"], #nav-create[aria-current="page"]) #account-recommendations {
  display: none;
}
#account-recommendations {
  padding-block: clamp(18px, 3vw, 32px);
  border-top: 1px solid var(--line);
}
.account-suggestions h2, .account-suggestions h3 {
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.2;
}
.account-suggestions h2 { font-size: clamp(22px, 2.4vw, 31px); letter-spacing: -.035em; }
.account-suggestions h3 { font-size: 17px; }
.account-places {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr));
  gap: 10px;
}
.account-place {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  width: 100%;
  min-height: 80px;
  text-align: start;
  padding: 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
}
.account-place:hover, .account-place:focus-visible { background: var(--selected-surface); border-color: var(--accent); }
.account-place-copy { flex: 1; min-width: 0; display: grid; gap: 3px; overflow-wrap: anywhere; }
.account-place-copy strong { font-size: 16px; line-height: 1.24; font-weight: 690; }
.account-place-area { color: var(--muted); font-size: 12px; font-weight: 600; }
.account-place-reason { color: var(--accent); font-size: 12px; font-weight: 550; line-height: 1.4; }
.account-place-photo { width: 62px; height: 62px; border-radius: 8px; object-fit: cover; }
.account-more-places { margin-top: 5px; }
.account-more-places summary, .account-retry {
  font: inherit; font-size: 14px; font-weight: 650; color: var(--accent); cursor: pointer;
}
.account-more-places summary { width: fit-content; min-height: 44px; padding: 12px 4px; }
.account-retry { min-height: 44px; border: 0; background: transparent; padding: 8px 0; text-decoration: underline; }
#account-dialog .account-places { grid-template-columns: minmax(0,1fr); gap: 6px; }
#account-dialog .account-place { gap: 8px; min-height: 64px; padding: 8px; }
#account-dialog .account-place-copy strong { font-size: 14px; }
#account-dialog .account-place-photo { width: 42px; height: 42px; }
@media (max-width: 580px) {
  #account-recommendations .account-places { grid-template-columns: minmax(0, 1fr); }
  #account-recommendations .account-place { min-height: 68px; padding: 8px; }
  #account-recommendations .account-place-photo { width: 49px; height: 49px; }
}
