/* Rimoly account and settings views. Deliberately isolated from every other overlay. */
body.dark #area-overlay.account-open,
body.dark #area-overlay.settings-hub-open {
  --account-muted: #b5bcc2;
}

#area-overlay.account-open,
#area-overlay.settings-hub-open {
  --account-accent: var(--red, #c92832);
  --account-surface: var(--paper, #f7f8f9);
  --account-ink: var(--ink, #17191b);
  --account-muted: var(--muted, #687078);
  --account-line: var(--line, #e2e5e8);
  --account-soft: color-mix(in srgb, var(--account-ink) 4%, var(--account-surface));
}

#area-overlay.account-open .modal,
#area-overlay.settings-hub-open .modal {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--account-surface);
  color: var(--account-ink);
}

#area-overlay.account-open .modal-header,
#area-overlay.settings-hub-open .modal-header {
  position: relative;
  z-index: 3;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  background: var(--account-surface);
  color: var(--account-ink);
  border-bottom: 1px solid var(--account-line);
}

#area-overlay.account-open .account-area-header,
#area-overlay.settings-hub-open .account-area-header {
  display: flex;
  align-items: center;
  min-width: 0;
}

#area-overlay.account-open #area-title,
#area-overlay.settings-hub-open #area-title {
  min-width: 0;
  margin: 0;
  color: inherit;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#area-overlay.account-open .account-header-actions {
  display: flex;
  align-items: center;
  gap: .15rem;
  margin-left: auto;
}

#area-overlay.account-open .account-header-action,
#area-overlay.settings-hub-open .account-back-action {
  display: inline-grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: var(--account-ink);
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease, transform .16s ease;
}

#area-overlay.account-open .account-header-action:hover,
#area-overlay.settings-hub-open .account-back-action:hover {
  background: color-mix(in srgb, var(--account-accent) 9%, transparent);
  color: var(--account-accent);
}

#area-overlay.account-open .account-header-action svg,
#area-overlay.settings-hub-open .account-back-action svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#area-overlay.settings-hub-open .account-back-action {
  flex: 0 0 40px;
  width: 40px;
  margin-left: -.35rem;
  color: var(--account-accent);
}

#area-overlay.settings-hub-open .settings-reference > .settings-back {
  display: none;
}

#area-overlay.account-open .modal-close,
#area-overlay.settings-hub-open .modal-close {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--account-line);
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

#area-overlay.account-open .modal-close svg,
#area-overlay.settings-hub-open .modal-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

#area-overlay.account-open .modal-body,
#area-overlay.settings-hub-open .modal-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: var(--account-surface);
  color: var(--account-ink);
}

#area-overlay.account-open .account-reference,
#area-overlay.settings-hub-open .settings-reference {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding: .85rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
}

/* Account profile */
#area-overlay.account-open .account-profile {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: .25rem .85rem;
  min-width: 0;
  padding: .35rem 0 1rem;
}

#area-overlay.account-open .account-avatar {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 62px;
  height: 62px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--account-ink) 10%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--account-accent) 12%, var(--account-surface));
  color: var(--account-accent);
  font-size: 1.55rem;
  font-weight: 850;
}

#area-overlay.account-open .account-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#area-overlay.account-open .account-avatar-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

#area-overlay.account-open .account-avatar-fallback[hidden] {
  display: none;
}

#area-overlay.account-open .account-photo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .2rem .75rem;
  min-width: 0;
  margin-top: .1rem;
}

#area-overlay.account-open .account-photo-action {
  min-height: 38px;
  border: 0;
  padding: .35rem 0;
  background: transparent;
  color: var(--account-accent);
  font: 750 .82rem 'DM Sans', sans-serif;
  cursor: pointer;
}

#area-overlay.account-open .account-photo-action:hover {
  text-decoration: underline;
}

#area-overlay.account-open .account-photo-remove {
  color: #a30e25;
}

#area-overlay.account-open .account-photo-status {
  flex: 1 0 100%;
  color: var(--account-muted);
  font-size: .75rem;
}

#area-overlay.account-open .account-photo-permission-note {
  flex: 1 0 100%;
  color: var(--account-muted);
  font-size: .75rem;
}

#area-overlay.account-open .account-profile-copy {
  min-width: 0;
}

#area-overlay.account-open .account-profile-copy h2 {
  min-width: 0;
  margin: 0;
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#area-overlay.account-open .account-stats {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  margin-top: .22rem;
  color: var(--account-muted);
  font-size: .88rem;
}

#area-overlay.account-open .account-stats strong {
  color: var(--account-ink);
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
}

#area-overlay.account-open .account-profile-meta {
  grid-column: 1 / -1;
  display: grid;
  gap: .3rem;
  min-width: 0;
  margin-top: .55rem;
}

#area-overlay.account-open .account-profile-meta p {
  display: flex;
  align-items: flex-start;
  gap: .52rem;
  min-width: 0;
  margin: 0;
  color: var(--account-muted);
  font-size: .9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

#area-overlay.account-open .account-profile-meta svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: .05rem;
  fill: none;
  stroke: var(--account-accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Utilities and existing optional capability-based sections */
#area-overlay.account-open .account-utilities {
  display: grid;
  margin: 0 0 .85rem;
  border-top: 1px solid var(--account-line);
  border-bottom: 1px solid var(--account-line);
}

#area-overlay.account-open .account-utilities .settings-menu-item {
  border: 0;
}

#area-overlay.account-open .account-reference .settings-menu-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  align-items: center;
  gap: .75rem;
  width: 100%;
  min-width: 0;
  min-height: 68px;
  border: 0;
  border-bottom: 1px solid var(--account-line);
  border-radius: 0;
  padding: .65rem .1rem;
  background: transparent;
  color: var(--account-ink);
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}

#area-overlay.account-open .account-reference .settings-menu-item:hover {
  background: color-mix(in srgb, var(--account-accent) 5%, transparent);
}

#area-overlay.account-open .account-reference .settings-menu-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--account-accent) 10%, var(--account-surface));
  color: var(--account-accent);
}

#area-overlay.account-open .account-reference .settings-menu-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#area-overlay.account-open .account-reference .settings-menu-copy {
  min-width: 0;
}

#area-overlay.account-open .account-reference .settings-menu-copy strong,
#area-overlay.account-open .account-reference .settings-menu-copy small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

#area-overlay.account-open .account-reference .settings-menu-copy strong {
  font-size: .96rem;
  line-height: 1.3;
}

#area-overlay.account-open .account-reference .settings-menu-copy small {
  margin-top: .15rem;
  color: var(--account-muted);
  font-size: .78rem;
  line-height: 1.35;
}

#area-overlay.account-open .account-reference .settings-menu-arrow {
  color: var(--account-muted);
  font-size: 1.35rem;
  line-height: 1;
  text-align: center;
}

/* Own listings: compact stacked rows with a strong photo + readable title. */
#area-overlay.account-open .account-profile-rating {
  min-height: 44px;
  border: 1px solid var(--account-line);
  border-radius: 7px;
  padding: .35rem .7rem;
  background: var(--account-soft);
  color: var(--account-accent);
  font: inherit;
  cursor: pointer;
}

#area-overlay.account-open .account-listings {
  min-width: 0;
  margin-top: .35rem;
}

#area-overlay.account-open .account-listings-count {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .65rem;
  min-height: 44px;
  border-top: 1px solid var(--account-line);
  padding: .7rem 0 .4rem;
  color: var(--account-muted);
  font-size: .82rem;
  font-weight: 700;
}

#area-overlay.account-open .account-listings-count strong {
  color: var(--account-ink);
  font-size: 1rem;
  font-weight: 850;
}

#area-overlay.account-open .account-listings-feed {
  display: grid;
  gap: .65rem;
  min-width: 0;
}

#area-overlay.account-open article.account-listing {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .65rem;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--account-ink) 16%, var(--account-line));
  border-radius: 12px;
  padding: .75rem;
  background: color-mix(in srgb, var(--account-ink) 2.5%, var(--account-surface));
  box-shadow: 0 2px 8px color-mix(in srgb, var(--account-ink) 7%, transparent);
}

#area-overlay.account-open .account-listing-open {
  display: grid;
  grid-template-columns: minmax(108px, 34%) minmax(0, 1fr);
  align-items: start;
  gap: .8rem;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

#area-overlay.account-open .account-listing-photo {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1.22 / 1;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: color-mix(in srgb, var(--account-muted) 15%, var(--account-surface));
}

#area-overlay.account-open .account-listing-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .22s ease;
}

#area-overlay.account-open .account-listing-photo img[hidden] {
  display: none;
}

#area-overlay.account-open .account-listing-open:hover .account-listing-photo img {
  transform: scale(1.025);
}

#area-overlay.account-open .account-photo-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--account-muted);
  font-size: .85rem;
  text-align: center;
}

#area-overlay.account-open .account-photo-count {
  position: absolute;
  right: .38rem;
  bottom: .38rem;
  display: inline-grid;
  min-width: 27px;
  min-height: 27px;
  place-items: center;
  border-radius: 5px;
  padding: .15rem .4rem;
  background: rgb(24 27 29 / 78%);
  color: #fff;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1;
}

#area-overlay.account-open .account-listing-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: .05rem 0;
}

#area-overlay.account-open .account-listing-location {
  min-width: 0;
  color: var(--account-muted);
  font-family: Roboto, Arial, sans-serif;
  font-size: .95rem;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#area-overlay.account-open .account-listing-title {
  display: block;
  min-width: 0;
  margin-top: .17rem;
  color: var(--account-ink);
  font-family: Roboto, Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#area-overlay.account-open .account-listing-price {
  display: block;
  min-width: 0;
  margin-top: .35rem;
  color: var(--account-accent);
  font-family: Roboto, Arial, sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#area-overlay.account-open .account-listing-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem 1rem;
  min-width: 0;
  min-height: 28px;
  padding: 0 .1rem;
  color: var(--account-ink);
}

#area-overlay.account-open .account-listing-stat {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-width: 0;
  color: inherit;
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1.25;
}

#area-overlay.account-open .account-listing-stat svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#area-overlay.account-open .account-listing-status {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-top: .38rem;
  border-radius: 999px;
  padding: .22rem .55rem;
  background: color-mix(in srgb, var(--account-accent) 10%, var(--account-surface));
  color: var(--account-accent);
  font-size: .73rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#area-overlay.account-open .account-listing-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .4rem;
}

#area-overlay.account-open .account-listing-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--account-line);
  border-radius: 999px;
  padding: .45rem .35rem;
  background: transparent;
  color: var(--account-ink);
  font: 800 1rem/1.2 'DM Sans', sans-serif;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s ease;
}

#area-overlay.account-open .account-listing-actions button:hover {
  transform: translateY(-1px);
}

#area-overlay.account-open .account-listing-actions .account-action-reserve {
  border-color: color-mix(in srgb, #9a651c 52%, var(--account-line));
  color: #805417;
}

#area-overlay.account-open .account-listing-actions .account-action-reserve:hover {
  border-color: #9a651c;
  background: color-mix(in srgb, #9a651c 8%, transparent);
  color: #70470e;
}

#area-overlay.account-open .account-listing-actions .account-action-edit {
  border-color: color-mix(in srgb, #426f99 52%, var(--account-line));
  color: #426f99;
}

#area-overlay.account-open .account-listing-actions .account-action-edit:hover {
  border-color: #426f99;
  background: color-mix(in srgb, #426f99 8%, transparent);
  color: #345d84;
}

#area-overlay.account-open .account-listing-actions .account-action-delete {
  border-color: color-mix(in srgb, #a34d53 52%, var(--account-line));
  color: #98434a;
}

#area-overlay.account-open .account-listing-actions .account-action-delete:hover {
  border-color: #a34d53;
  background: color-mix(in srgb, #a34d53 8%, transparent);
  color: #84383f;
}

/* Composed loading, retry and empty states */
#area-overlay.account-open .account-state {
  display: grid;
  min-height: min(38vh, 280px);
  place-content: center;
  justify-items: center;
  gap: .55rem;
  padding: 1.75rem 1rem;
  color: var(--account-muted);
  text-align: center;
}

#area-overlay.account-open .account-state strong {
  color: var(--account-ink);
  font-size: 1.04rem;
}

#area-overlay.account-open .account-state p {
  max-width: 34ch;
  margin: 0;
  font-size: .88rem;
  line-height: 1.5;
}

#area-overlay.account-open .account-state[aria-busy="true"] {
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--account-muted) 10%, transparent), transparent);
  background-size: 200% 100%;
  animation: rimoly-account-loading 1.5s ease-in-out infinite;
}

#area-overlay.account-open .account-state button {
  min-height: 44px;
  margin-top: .25rem;
  border: 1px solid var(--account-accent);
  border-radius: 8px;
  padding: .55rem .9rem;
  background: transparent;
  color: var(--account-accent);
  font: 800 .86rem 'DM Sans', sans-serif;
  cursor: pointer;
}

#area-overlay.account-open .account-state button:hover {
  background: var(--account-accent);
  color: var(--account-surface);
}

/* Settings hub: uninterrupted, full-width rows like a native settings list. */
#area-overlay.settings-hub-open .settings-reference {
  padding: 0 1rem calc(1.25rem + env(safe-area-inset-bottom));
}

#area-overlay.settings-hub-open .settings-hero {
  margin: .85rem 0 .35rem;
  border: 0;
  border-radius: 9px;
  padding: .85rem 1rem;
  background: color-mix(in srgb, var(--account-accent) 9%, var(--account-surface));
  color: var(--account-ink);
}

#area-overlay.settings-hub-open .settings-hero strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

#area-overlay.settings-hub-open .settings-hero span {
  display: block;
  margin-top: .16rem;
  color: var(--account-muted);
  font-size: .8rem;
  overflow-wrap: anywhere;
}

#area-overlay.settings-hub-open .settings-menu {
  display: grid;
  gap: 0;
  min-width: 0;
}

#area-overlay.settings-hub-open .settings-menu-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 22px;
  align-items: center;
  gap: .8rem;
  width: 100%;
  min-width: 0;
  min-height: 73px;
  border: 0;
  border-bottom: 1px solid var(--account-line);
  border-radius: 0;
  padding: .65rem .1rem;
  background: transparent;
  color: var(--account-ink);
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}

#area-overlay.settings-hub-open .settings-menu-item:hover {
  background: color-mix(in srgb, var(--account-accent) 5%, transparent);
}

#area-overlay.settings-hub-open .settings-menu-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  color: var(--account-accent);
}

#area-overlay.settings-hub-open .settings-menu-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#area-overlay.settings-hub-open .settings-menu-copy {
  min-width: 0;
}

#area-overlay.settings-hub-open .settings-menu-copy strong {
  display: block;
  min-width: 0;
  font-size: 1.03rem;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#area-overlay.settings-hub-open .settings-menu-copy small {
  display: block;
  min-width: 0;
  margin-top: .15rem;
  color: var(--account-muted);
  font-size: .84rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#area-overlay.settings-hub-open .settings-menu-arrow {
  color: var(--account-muted);
  font-size: 1.35rem;
  text-align: center;
}

#area-overlay.settings-hub-open .settings-menu-item.is-danger .settings-menu-icon,
#area-overlay.settings-hub-open .settings-menu-item.is-danger .settings-menu-copy strong {
  color: var(--account-accent);
}

#area-overlay.account-open :is(button, [tabindex]):focus-visible,
#area-overlay.settings-hub-open :is(button, [tabindex]):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--account-accent) 70%, var(--account-surface));
  outline-offset: 2px;
}

#area-overlay.account-open button:disabled,
#area-overlay.settings-hub-open button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

body.dark #area-overlay.account-open,
body.dark #area-overlay.settings-hub-open {
  --account-surface: var(--paper, #202326);
  --account-ink: var(--ink, #f1f3f4);
  --account-muted: var(--muted, #b5bcc2);
  --account-line: var(--line, #45494d);
}

body.dark #area-overlay.account-open .account-listing-actions button,
body.dark #area-overlay.settings-hub-open .settings-menu-item {
  color: var(--account-ink);
}

body.dark #area-overlay.account-open article.account-listing {
  border-color: color-mix(in srgb, var(--account-ink) 20%, var(--account-line));
  background: color-mix(in srgb, var(--account-ink) 4%, var(--account-surface));
  box-shadow: 0 3px 12px rgb(0 0 0 / 18%);
}

body.dark #area-overlay.account-open .account-listing-actions .account-action-reserve {
  border-color: color-mix(in srgb, #d7ae68 58%, var(--account-line));
  background: transparent;
  color: #d7ae68;
}

body.dark #area-overlay.account-open .account-listing-actions .account-action-reserve:hover {
  border-color: #d7ae68;
  background: color-mix(in srgb, #d7ae68 12%, transparent);
  color: #e4c487;
}

body.dark #area-overlay.account-open .account-listing-actions .account-action-edit {
  border-color: color-mix(in srgb, #8aafd2 58%, var(--account-line));
  background: transparent;
  color: #a5c5e4;
}

body.dark #area-overlay.account-open .account-listing-actions .account-action-edit:hover {
  border-color: #8aafd2;
  background: color-mix(in srgb, #8aafd2 12%, transparent);
  color: #c0d8ef;
}

body.dark #area-overlay.account-open .account-listing-actions .account-action-delete {
  border-color: color-mix(in srgb, #d58a8f 58%, var(--account-line));
  background: transparent;
  color: #e1a1a5;
}

body.dark #area-overlay.account-open .account-listing-actions .account-action-delete:hover {
  border-color: #d58a8f;
  background: color-mix(in srgb, #d58a8f 12%, transparent);
  color: #efb7ba;
}

body #area-overlay.account-open .account-listing-actions button:disabled {
  opacity: .72;
  transform: none;
  cursor: wait;
}

body #area-overlay.account-open .account-listing-actions button[aria-busy="true"] {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, currentColor 24%, transparent);
}

body #area-overlay.account-open .account-listing-actions button:disabled:not([aria-busy="true"]) {
  opacity: .55;
  cursor: not-allowed;
}

body.dark #area-overlay.account-open .account-listing-status,
body.dark #area-overlay.account-open .account-reference .settings-menu-icon {
  background: color-mix(in srgb, var(--account-accent) 17%, var(--account-surface));
}

body.dark #area-overlay.account-open .account-state[aria-busy="true"] {
  background-image: linear-gradient(90deg, transparent, rgb(255 255 255 / 7%), transparent);
}

@media (max-width: 700px) {
  #area-overlay.account-open,
  #area-overlay.settings-hub-open {
    z-index: 430;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
    padding: 0 0 calc(84px + env(safe-area-inset-bottom));
    background: var(--account-surface);
  }

  #area-overlay.account-open .modal,
  #area-overlay.settings-hub-open .modal {
    width: 100%;
    max-width: none;
    height: calc(100dvh - 84px - env(safe-area-inset-bottom));
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }

  #area-overlay.account-open .modal-header,
  #area-overlay.settings-hub-open .modal-header {
    position: sticky;
    top: 0;
    min-height: 60px;
    padding: max(.5rem, env(safe-area-inset-top)) .8rem .55rem;
  }

  #area-overlay.account-open #area-title,
  #area-overlay.settings-hub-open #area-title {
    font-size: 1.25rem;
  }

  #area-overlay.account-open .modal-close,
  #area-overlay.settings-hub-open .modal-close {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  #area-overlay.account-open .account-reference {
    padding: .7rem .85rem calc(1rem + env(safe-area-inset-bottom));
  }

  #area-overlay.settings-hub-open .settings-reference {
    padding: 0 .85rem calc(1rem + env(safe-area-inset-bottom));
  }

  #area-overlay.account-open .account-profile {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: .2rem .7rem;
    padding-top: .25rem;
  }

  #area-overlay.account-open .account-avatar {
    width: 56px;
    height: 56px;
  }

  #area-overlay.account-open .account-listing-open {
    grid-template-columns: minmax(112px, 37%) minmax(0, 1fr);
    gap: .68rem;
  }

  #area-overlay.account-open .account-listing-stats {
    gap: .45rem .85rem;
    padding-inline: .05rem;
  }

  #area-overlay.account-open .account-listing-stat {
    font-size: .78rem;
  }

  #area-overlay.settings-hub-open .settings-menu-item {
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    gap: .58rem;
    min-height: 70px;
  }

  #area-overlay.settings-hub-open .settings-menu-icon {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 360px) {
  #area-overlay.account-open .account-reference,
  #area-overlay.settings-hub-open .settings-reference {
    padding-right: .65rem;
    padding-left: .65rem;
  }

  #area-overlay.account-open .account-listing-open {
    grid-template-columns: minmax(96px, 35%) minmax(0, 1fr);
    gap: .55rem;
  }

  #area-overlay.account-open .account-listing-actions {
    gap: .28rem;
  }

  #area-overlay.account-open .account-listing-actions button {
    padding-right: .2rem;
    padding-left: .2rem;
    font-size: .875rem;
  }

  #area-overlay.account-open .account-listing-stats {
    gap: .4rem .7rem;
  }

  #area-overlay.account-open .account-listing-stat {
    gap: .28rem;
    font-size: .75rem;
  }

  #area-overlay.settings-hub-open .settings-menu-copy strong {
    font-size: .97rem;
  }

  #area-overlay.settings-hub-open .settings-menu-copy small {
    font-size: .78rem;
  }
}

@media (min-width: 701px) {
  #area-overlay.account-open .modal,
  #area-overlay.settings-hub-open .modal {
    width: min(100%, 620px);
    max-height: min(86dvh, 900px);
    border: 1px solid var(--account-line);
    border-radius: 16px;
    box-shadow: 0 20px 70px rgb(15 18 20 / 27%);
  }

  #area-overlay.account-open .modal-header,
  #area-overlay.settings-hub-open .modal-header {
    min-height: 66px;
    padding: .75rem 1.15rem;
  }

  #area-overlay.account-open .account-reference,
  #area-overlay.settings-hub-open .settings-reference {
    padding-right: 1.2rem;
    padding-left: 1.2rem;
  }

  #area-overlay.account-open .account-listing-open {
    grid-template-columns: 148px minmax(0, 1fr);
  }
}

@keyframes rimoly-account-loading {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  #area-overlay.account-open *,
  #area-overlay.account-open *::before,
  #area-overlay.account-open *::after,
  #area-overlay.settings-hub-open *,
  #area-overlay.settings-hub-open *::before,
  #area-overlay.settings-hub-open *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
