/*
 * LOUDERR familiar interaction layer.
 *
 * Shared social-app controls, reading hierarchy and task-specific overlays.
 */

:root {
  --ui-gutter: 16px;
  --ui-control: 44px;
  --ui-dialog-radius: 16px;
  --ui-popover-radius: 12px;
  --ui-overlay-border: var(--border-strong);
  --ui-overlay-shadow: 0 24px 72px rgba(0, 0, 0, 0.48);
  --ui-popover-shadow: 0 14px 42px rgba(0, 0, 0, 0.42);
}

/* Quiet chrome lets member content carry the colour. */
.nav-item {
  color: var(--text);
  font-weight: 500;
}

.nav-item.is-active { font-weight: 700; }
.nav-section-label { display: none; }

.feed-scope {
  display: flex;
  gap: 24px;
  width: auto;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.feed-scope::before { display: none; }

.feed-scope button {
  min-height: 48px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
}

.feed-scope button.is-active {
  border-bottom-color: var(--text);
  background: transparent;
  color: var(--text);
}

/* Three lenses of very different length: size to content and let the strip scroll, like feed tabs. */
.feed-scope {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.feed-scope::-webkit-scrollbar { display: none; }

.feed-scope button {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0 2px 10px;
}

.feed-scope button[hidden] { display: none; }

.feed-scope-note {
  margin: 6px 0 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.feed-scope-note[hidden] { display: none; }

#category-strip .category-chip {
  border-radius: 8px;
  background: var(--surface-soft);
  border-color: transparent;
  color: var(--text-secondary);
  font-weight: 600;
}

#category-strip .category-chip.is-active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

#category-strip .category-chip:hover:not(.is-active) {
  background: var(--surface-hover);
  color: var(--text);
}

/* Realtime refreshes must not fade the reading surface out and back in. */
.feed > .drop-card { animation: none; }
.drop-card .author-copy strong { font-size: 14px; }
.drop-card .author-copy small { font-size: 12px; }
.drop-card .drop-description { color: var(--text); }
.drop-card.is-text-only .drop-description { color: var(--text); }
.drop-card .more-button { width: 44px; height: 44px; }
.drop-card .drop-media { border-radius: 4px; }
.drop-card .drop-footer:has(.engagement-line:empty):has(.drop-link[hidden]) { display: none; }

@media (min-width: 821px) {
  html { scrollbar-gutter: stable; }
  .desktop-sidebar { padding: 24px 16px 16px; }
  .desktop-sidebar > .brand { flex-shrink: 0; }
  .primary-nav {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    gap: 12px;
    margin: 24px 0 12px;
    padding: 2px;
  }
  .nav-group { gap: 4px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .nav-you { margin-top: 0; padding-top: 12px; border-top: 1px solid var(--border); }
  .nav-item { height: 48px; min-height: 48px; gap: 8px; padding-inline: 8px; font-size: 16px; border-radius: 8px; }
  .nav-item svg { width: 24px; height: 24px; }
  .create-button { flex-shrink: 0; min-height: 48px; font-size: 15px; }
  .sidebar-account { flex-shrink: 0; min-height: 56px; margin-top: 8px; }
  .desktop-search { border-radius: 8px; }
  body:is([data-view="all"], [data-view="following"], [data-view="saved"], [data-view="mine"], [data-view="drop"], [data-view="topic"]) .main-column {
    width: min(100%, 620px);
  }
  .feed > .drop-card {
    margin-bottom: 16px;
    padding: 16px;
    border-color: var(--border);
    border-radius: 8px;
    box-shadow: none;
  }
  .feed > .drop-card:hover { border-color: var(--border); }
}

@media (max-width: 820px) {
  .feed-scope { justify-content: center; justify-content: safe center; gap: 32px; margin-bottom: 8px; }
  .feed-scope button { min-height: 40px; padding-bottom: 8px; }
  .drop-card .drop-media { border-radius: 0; }
}

/* Keep the Home room rich; let every other destination own its canvas. */
@media (min-width: 821px) {
  .content-grid {
    max-width: 1320px;
    margin-inline: auto;
    padding: 24px 28px 72px;
  }

  :is(
    body[data-view="profile"],
    body[data-view="drop"],
    body[data-view="saved"],
    body[data-view="mine"],
    body[data-view="notifications"],
    body[data-view="flow"]
  ) .content-grid {
    max-width: 980px;
    grid-template-columns: minmax(0, 1fr);
  }

  :is(
    body[data-view="discover"],
    body[data-view="trending"],
    body[data-view="advertise"],
    body[data-view="premium"]
  ) .content-grid {
    max-width: 1120px;
    grid-template-columns: minmax(0, 1fr);
  }

  :is(
    body[data-view="profile"],
    body[data-view="drop"],
    body[data-view="saved"],
    body[data-view="mine"],
    body[data-view="notifications"],
    body[data-view="discover"],
    body[data-view="trending"],
    body[data-view="advertise"],
    body[data-view="premium"],
    body[data-view="flow"]
  ) .right-rail {
    display: none;
  }

  /* Home keeps live context, but the four passive counters do not compete with the Floor. */
  body[data-view="all"] .right-rail .room-stats {
    display: none;
  }
}

/* The intro repeats information already available from How it works. */
.right-rail .explainer-card {
  display: none;
}

/* Native dialogs preserve focus trapping, Escape, and focus restoration. */
html:has(dialog[open]) {
  overflow: hidden;
}

dialog::backdrop,
.utility-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

:is(.sheet-dialog, .small-dialog, .admin-dialog, .utility-dialog) {
  border: 1px solid var(--ui-overlay-border);
  border-radius: var(--ui-dialog-radius);
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: var(--ui-overlay-shadow);
  font-size: 14px;
  line-height: 1.5;
}

:is(.sheet-dialog, .small-dialog, .admin-dialog, .utility-dialog)[open] {
  animation: familiar-dialog-in 160ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes familiar-dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
}

.sheet-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(820px, calc(100dvh - 32px));
}

.profile-dialog {
  width: min(640px, calc(100vw - 32px));
}

.dialog-header {
  min-height: 64px;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

:is(.sheet-dialog, .small-dialog, .admin-dialog, .utility-dialog) h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

:is(.profile-dialog, .admin-dialog) h2 {
  font-size: 22px;
}

:is(.sheet-dialog, .small-dialog, .admin-dialog, .utility-dialog) .dialog-header p,
.small-dialog header p {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.dialog-icon-button {
  width: var(--ui-control);
  height: var(--ui-control);
}

.dialog-icon-button:hover {
  background: var(--surface-hover);
}

.composer-scroll,
.profile-body,
.project-scroll {
  padding: 18px 20px 24px;
}

/* Account navigation remains available while the selected section scrolls. */
#account-dialog .dialog-header {
  grid-template-columns: minmax(0, 1fr) auto 44px;
}

#account-dialog .dialog-header > .dialog-icon-button {
  grid-column: 3;
}

#account-dialog .account-logout {
  grid-column: 2;
  min-height: 44px;
  font-size: 14px;
}

#account-dialog .profile-body {
  scroll-padding-top: 64px;
}

#account-dialog .profile-body:has(#member-account:not([hidden])) {
  padding-top: 0;
}

#account-dialog .account-section-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-raised);
}

#account-dialog .account-section-tabs {
  position: relative;
  --account-fade-left: 0px;
  --account-fade-right: 0px;
  scroll-padding-inline: 24px;
  mask-image: none;
}

#account-dialog .account-section-tabs.can-scroll-back { --account-fade-left: 24px; }
#account-dialog .account-section-tabs.can-scroll-forward { --account-fade-right: 24px; }
#account-dialog .account-section-tabs:is(.can-scroll-back, .can-scroll-forward) {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--account-fade-left), #000 calc(100% - var(--account-fade-right)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--account-fade-left), #000 calc(100% - var(--account-fade-right)), transparent);
}

#account-dialog .account-section-tabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

/* Loading replaces rows above these controls. Avoid moving a target during a tap;
   visibility preserves the current space and restores the tools on errors too. */
#account-security-panel:has(#security-loading:not([hidden])) > :is(.security-block, .security-form-block, .account-actions) {
  visibility: hidden;
}

#account-dialog .enforcement-panel {
  gap: 8px;
  padding: 20px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#account-dialog .enforcement-panel > p {
  font-size: 14px;
}

#account-dialog #enforcement-list {
  gap: 0;
}

#account-dialog .enforcement-card {
  gap: 10px;
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  scroll-margin-top: 8px;
}

#account-dialog .enforcement-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

#account-dialog .enforcement-card > strong {
  font-size: 16px;
  text-transform: none;
}

#account-dialog .enforcement-card small,
#account-dialog .enforcement-state {
  font-size: 13px;
  line-height: 1.5;
}

#account-dialog .enforcement-reference {
  color: var(--text-secondary);
  font-size: 13px;
}

#account-dialog .enforcement-reference summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#account-dialog .enforcement-reference code {
  display: block;
  padding-bottom: 8px;
  font-size: 12px;
  user-select: all;
}

/* Publication feedback stays beside Publish while the draft scrolls independently. */
.composer-dialog .composer {
  display: flex;
  flex-direction: column;
  max-height: min(818px, calc(100dvh - 34px));
}

.composer-dialog .dialog-header {
  flex-shrink: 0;
}

.composer-dialog .composer-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.composer-dialog #form-error {
  flex: 0 0 auto;
  max-height: 30dvh;
  overflow-y: auto;
  overflow-wrap: anywhere;
  margin: 0;
  padding: 12px 16px;
  border-width: 0 0 1px;
  border-radius: 0;
}

.small-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 20px;
}

.small-dialog > header,
.small-dialog > form > header {
  gap: 12px;
}

.small-dialog footer {
  gap: 8px;
  margin-top: 20px;
}

:is(.sheet-dialog, .small-dialog, .admin-dialog, .utility-dialog) :is(
  .publish-button,
  .secondary-button,
  .danger-button,
  .text-button,
  .federated-provider-button
) {
  min-height: var(--ui-control);
  font-size: 14px;
  line-height: 1.4;
}

:is(.sheet-dialog, .small-dialog, .admin-dialog, .utility-dialog) .field {
  gap: 7px;
  margin-top: 16px;
}

:is(.sheet-dialog, .small-dialog, .admin-dialog, .utility-dialog) .field > span {
  font-size: 14px;
  font-weight: 650;
}

:is(.sheet-dialog, .small-dialog, .admin-dialog, .utility-dialog) .field > span small {
  font-size: 12px;
}

:is(.sheet-dialog, .small-dialog, .admin-dialog, .utility-dialog) .field :is(input, select, textarea) {
  min-height: var(--ui-control);
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.5;
}

:is(#report-dialog, #chat-report-dialog, #dm-report-dialog, #profile-report-dialog) .danger-button {
  border-color: var(--danger-panel-border);
  background: var(--danger-soft);
  color: var(--danger-text);
}

:is(#report-dialog, #chat-report-dialog, #dm-report-dialog, #profile-report-dialog) .danger-button:hover {
  border-color: var(--danger);
  background: var(--danger-panel-bg);
}

/* Familiar desktop overflow menus: compact, anchored, and flat. */
.action-menu,
.profile-safety-menu-list,
.emote-picker {
  border: 1px solid var(--ui-overlay-border);
  border-radius: var(--ui-popover-radius);
  background: var(--surface-menu);
  box-shadow: var(--ui-popover-shadow);
}

.action-menu {
  width: 220px;
  padding: 6px;
}

.action-menu button,
.profile-safety-menu-list button {
  min-height: var(--ui-control);
  gap: 11px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.action-menu button svg {
  width: 19px;
  height: 19px;
}

.action-menu .danger-menu-item {
  margin-top: 4px;
  box-shadow: inset 0 1px var(--border);
  color: var(--danger-text);
}

.toast {
  min-height: var(--ui-control);
  display: flex;
  align-items: center;
  padding: 10px 15px;
  font-size: 13px;
  line-height: 1.4;
}

/* A tighter mobile Home exposes the first Drop sooner. */
@media (max-width: 820px) {
  html:has(.action-menu:not([hidden])) {
    overflow: hidden;
  }

  body[data-view="all"] .mobile-search-wrap {
    display: none;
  }

  body[data-view="all"] #board.is-empty .board-content {
    display: none;
  }

  body[data-view="all"] #board.is-empty .board-header {
    min-height: 52px;
    padding: 8px 14px;
  }

  body[data-view="all"] #board.is-empty .board-queue > summary {
    min-height: var(--ui-control);
    padding-block: 8px;
  }

  body[data-view="all"] .feed-section {
    padding-top: 14px;
  }

  .flow-chat-shortcut {
    min-height: var(--ui-control);
  }

  /* Creation stays a dedicated full-screen task on compact screens. */
  .composer-dialog {
    width: 100%;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .composer-dialog .composer {
    height: 100%;
    max-height: 100%;
  }

  .profile-hero {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .profile-hero-avatar {
    width: 64px;
    height: 64px;
    font-size: 20px;
  }

  .profile-identity h1 {
    overflow-wrap: anywhere;
  }

  .profile-actions {
    gap: 8px;
    margin-top: 2px;
  }

  .profile-safety-menu-list {
    right: auto;
    left: 0;
  }

  .profile-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .profile-stats > * {
    min-height: 60px;
    border-bottom: 0;
  }

  .profile-stats > *:nth-child(2) {
    border-right: 1px solid var(--border);
  }

  .profile-dialog {
    height: fit-content;
    max-height: calc(100dvh - 32px);
    margin: auto;
  }

  :is(.sheet-dialog, .small-dialog, .admin-dialog, .utility-dialog) .field :is(input, select, textarea) {
    font-size: 16px;
  }

  .profile-dialog .dialog-header,
  .utility-dialog .dialog-header {
    padding: 10px 14px;
  }

  .profile-body,
  .utility-dialog-body,
  .utility-form {
    padding: 14px 16px 20px;
  }

  .small-dialog {
    width: calc(100vw - 24px);
    padding: 18px;
    border-radius: 14px;
  }

  :is(#report-dialog, #chat-report-dialog, #dm-report-dialog, #profile-report-dialog) footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  :is(#report-dialog, #chat-report-dialog, #dm-report-dialog, #profile-report-dialog) footer > button {
    width: 100%;
  }

  /* app.js anchors this menu on desktop; mobile intentionally becomes a sheet. */
  body:has(.action-menu:not([hidden]))::before {
    content: "";
    position: fixed;
    z-index: 79;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    pointer-events: auto;
  }

  .action-menu:not([hidden]) {
    top: auto !important;
    right: 8px !important;
    bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(72dvh, 560px) !important;
    padding: 6px;
    border-radius: 14px;
    box-shadow: 0 -14px 48px rgba(0, 0, 0, 0.34);
  }

  .action-menu button {
    min-height: 52px;
    padding: 12px 14px;
    font-size: 15px;
  }

  .toast {
    bottom: calc(74px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 600px) {
  .profile-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: var(--ui-dialog-radius);
  }
}

@media (max-width: 620px) {
  .discover-tabs {
    margin-right: 14px;
    margin-left: 14px;
    padding-right: 0;
    padding-left: 0;
    scroll-padding-inline: 12px;
  }

  /* Conversation context remains visible above a familiar bottom sheet. */
  .comments-dialog {
    width: 100%;
    height: min(82dvh, 760px);
    max-height: calc(100dvh - 12px);
    margin: auto 0 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
  }
}

@media (max-width: 360px) {
  .small-dialog {
    width: calc(100vw - 16px);
    padding: 16px;
  }

  :is(#report-dialog, #chat-report-dialog, #dm-report-dialog, #profile-report-dialog) footer {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(.sheet-dialog, .small-dialog, .admin-dialog, .utility-dialog)[open] {
    animation: none;
  }
}

/* Profile identity and saving stay together while editing. */
.profile-edit-toolbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; background: var(--surface-raised); border-bottom: 1px solid var(--border); }
.profile-edit-toolbar h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.profile-edit-toolbar > button { flex: 0 0 auto; min-height: 44px; }
.profile-photo-editor { display: flex; align-items: center; gap: 16px; padding: 8px 0; }
.profile-photo-editor .profile-avatar-wrap { flex: 0 0 auto; margin: 0; }
.profile-photo-editor .profile-upload-field { flex: 1; min-width: 0; margin: 0; padding: 10px; min-height: 44px; }
.profile-photo-editor .upload-field-icon { display: none; }
.profile-photo-editor .upload-field-copy { min-width: 0; }
.profile-photo-editor .upload-field-copy strong { font-size: 14px; }
/* Settings use ordinary rows and one destination at a time. */
#account-dialog:has(#member-account:not([hidden])) .dialog-header { grid-template-columns: 44px minmax(0, 1fr) auto 44px; gap: 8px; }
#account-dialog #account-back { grid-column: 1; grid-row: 1; color: var(--text); }
#account-dialog .dialog-header > .account-close { grid-column: 4; grid-row: 1; }
#account-dialog:has(#member-account[hidden]) .dialog-header > .account-close { grid-column: 3; }
#account-dialog:has(#member-account:not([hidden])) .dialog-header > div { grid-column: 2; grid-row: 1; min-width: 0; }
#account-dialog[data-section="settings"]:has(#member-account:not([hidden])) .dialog-header > div { grid-column: 1 / 4; }
#account-dialog #account-page-title { font-size: 20px; line-height: 1.25; font-weight: 700; outline: none; }
#account-dialog #profile-save { grid-column: 3; grid-row: 1; min-height: 44px; padding: 0 10px; background: none; border: 0; color: var(--text); font-size: 14px; }
#account-dialog:not([data-section="profile"]) #profile-save,
#account-dialog:has(#member-account[hidden]) #profile-save,
#account-dialog:has(#profile-form[hidden]) #profile-save { display: none; }
#account-dialog .profile-body:has(#member-account:not([hidden])) { padding: 14px 20px 24px; scroll-padding-top: 12px; }
#account-dialog .settings-identity { display: flex; gap: 12px; align-items: center; padding: 4px 0 18px; border-bottom: 1px solid var(--border); }
#account-dialog .settings-identity .account-switcher-trigger { font-size: 16px; min-height: 44px; }
#account-dialog .settings-list { display: grid; gap: 0; padding: 8px 0; }
#account-dialog .settings-list button { display: grid; grid-template-columns: 24px minmax(0, 1fr) 16px; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 12px 0; border: 0; border-radius: 0; background: none; color: var(--text); font-size: 15px; font-weight: 550; text-align: left; }
#account-dialog .settings-list button:hover { background: var(--surface-hover); }
#account-dialog .settings-list svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
#account-dialog .settings-list .settings-chevron { width: 16px; height: 16px; transform: rotate(-90deg); color: var(--text-muted); }
#account-dialog .settings-list button:focus-visible, #account-dialog #profile-save:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
#account-dialog .account-shortcuts { display: grid; border-top: 1px solid var(--border); padding: 8px 0; margin: 0; }
#account-dialog .account-shortcuts button { justify-content: flex-start; min-height: 48px; padding: 10px 0; background: none; border: 0; gap: 14px; font-size: 15px; }
#account-dialog .account-logout { display: block; padding: 12px 0; margin-top: 4px; min-height: 48px; }
#account-dialog #account-profile-panel { padding-top: 4px; }
#account-dialog .account-section-panel > .appearance-settings:first-child { margin-top: 0; }
#account-dialog .account-section-panel > p { color: var(--text-muted); line-height: 1.5; margin: 0 0 20px; }
#account-dialog #account-information-panel .account-actions { display: grid; justify-items: start; gap: 14px; }
#account-dialog #account-information-panel #delete-account { margin-top: 20px; }
#account-dialog:has(#member-account:not([hidden])):not([data-section="help"]) :is(.account-help, .account-legal) { display: none; }
.discover-destinations { display: flex; gap: 20px; padding: 8px 0 16px; }
#register-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 14px; }
#register-form fieldset[hidden] { display: none; }
#register-form legend { width: 100%; padding: 0 0 18px; font-size: 22px; font-weight: 700; }
#register-form legend:focus { outline: none; }
#register-form .field { min-width: 0; }
#register-form .field-note { margin: -4px 0 2px; font-size: 13px; }
.registration-progress { margin: 0; color: var(--text-muted); font-size: 13px; }
.registration-actions { display: flex; align-items: center; gap: 16px; }
.registration-actions .publish-button { flex: 1; min-height: 48px; }
.password-input { position: relative; display: block; min-width: 0; }
.password-input > input { width: 100%; min-width: 0; padding-right: 52px; }
.password-input > .password-eye { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.password-eye:hover { color: var(--text); }
.password-eye svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.password-eye [data-eye-open], .password-eye[aria-pressed="true"] [data-eye-closed] { display: none; }
.password-eye[aria-pressed="true"] [data-eye-open] { display: inline; }
#account-dialog input[type="date"] { display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; min-height: 48px; }
#account-dialog input[type="date"]::-webkit-date-and-time-value { text-align: left; min-height: 1.25em; }
#account-dialog #guest-open-settings { display: none; }
@media (max-width: 700px) {
  #account-dialog:has(#guest-account:not([hidden])) { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  #account-dialog:has(#guest-account:not([hidden])) > .profile-form { height: 100%; max-height: none; }
  #account-dialog:has(#guest-account:not([hidden])) .dialog-header { padding: max(12px, env(safe-area-inset-top)) 18px 12px; }
  #account-dialog:has(#guest-account:not([hidden])) .profile-body { padding: 20px 18px max(24px, env(safe-area-inset-bottom)); }
  #account-dialog:has(#guest-account:not([hidden])) .auth-form input { font-size: 16px; }
}
.discover-destinations button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border: 0; background: none; color: var(--text); font-size: 14px; font-weight: 600; }
/* Familiar patterns, 9 September 2026: inline Follow, story ring, own collections, Discover order. */
.drop-header .drop-follow { flex: 0 0 auto; margin-left: auto; min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer; }
.drop-header .drop-follow[aria-busy="true"] { opacity: 0.6; }
.people-row-item.has-story .people-row-avatar { outline-color: var(--accent); }
.profile-posts header { flex-wrap: wrap; row-gap: 8px; }
.profile-self-tabs { display: inline-flex; gap: 6px; margin-left: 10px; }
.profile-self-tabs[hidden] { display: none; }
.profile-self-tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.profile-self-tabs button:hover { background: var(--surface-hover); color: var(--text); }
.profile-self-tabs button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
#discover-search-tools + .discover-tabs { margin-top: 6px; }
.discover-controls[hidden] { display: none; }
.profile-actions .profile-settings-button { display: inline-flex; align-items: center; gap: 6px; }
.profile-actions .profile-settings-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
@keyframes ui-skeleton-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.discover-loading, .chat-loading { position: relative; display: block; min-height: 236px; margin: 0; padding: 0; overflow: hidden; color: transparent; font-size: 0; line-height: 0; text-align: left; }
.discover-loading[hidden], .chat-loading[hidden] { display: none; }
.discover-loading::before, .chat-loading::before {
  content: "";
  position: absolute;
  inset: 8px 0 auto 0;
  height: 220px;
  background-image:
    radial-gradient(circle, var(--surface-soft) 19px, transparent 20px),
    linear-gradient(var(--surface-soft), var(--surface-soft)),
    linear-gradient(var(--surface-soft), var(--surface-soft)),
    linear-gradient(var(--surface-soft), var(--surface-soft));
  background-repeat: no-repeat;
  background-size: 40px 40px, 45% 12px, 100% 130px, 70% 12px;
  background-position: 0 0, 52px 14px, 0 56px, 0 202px;
  animation: ui-skeleton-pulse 1.4s ease-in-out infinite;
}
.chat-loading::before { height: 160px; background-size: 40px 40px, 55% 12px, 40px 40px, 65% 12px; background-position: 0 0, 52px 14px, 0 60px, 52px 74px; }
@media (prefers-reduced-motion: reduce) { .discover-loading::before, .chat-loading::before { animation: none; } }
@media (max-width: 620px) {
  /* Comments open as a half-height sheet, so the post stays in view behind them. */
  .comments-dialog { height: min(64dvh, 560px); }
  .comments-dialog::backdrop { background: rgba(0, 0, 0, 0.32); }
}
.discover-destinations svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
@media (max-width: 700px) {
  #account-dialog:has(#member-account:not([hidden])) { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  #account-dialog:has(#member-account:not([hidden])) > .profile-form { height: 100%; max-height: none; }
  #account-dialog:has(#member-account:not([hidden])) .dialog-header { padding: max(10px, env(safe-area-inset-top)) 12px 10px; }
  #account-dialog:has(#member-account:not([hidden])):not([data-section="settings"]) .dialog-header { grid-template-columns: 44px minmax(0, 1fr) auto; }
  #account-dialog:has(#member-account:not([hidden])):not([data-section="settings"]) .account-close { display: none; }
  #account-dialog .profile-body:has(#member-account:not([hidden])) { padding: 12px 18px max(24px, env(safe-area-inset-bottom)); }
}

/* People results keep a predictable rhythm as bios and screen sizes vary. */
#discover-people-list { grid-auto-rows: 1fr; }
#discover-people-list .person-card { min-height: 96px; padding: 12px; }
#discover-people-list .person-card-copy { align-content: center; }
#discover-people-list .person-card-bio { display: block; margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#discover-people-list[aria-busy="true"] { opacity: .7; }
.people-paging { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.people-paging[hidden] { display: none; }
.people-paging button { min-width: 96px; min-height: 44px; }
.discover-people { scroll-margin-block-start: 80px; }
@media (max-width: 700px) { #discover-people-list .person-card { min-height: 92px; } }
