/* ==========================================================================
   CSS: NUAM ACCOUNT / AUTH / v1445
   ========================================================================== */

.nuam-account-top-button {
  position: relative;
  flex: 0 0 var(--top-bar-height, 54px);
  width: var(--top-bar-height, 54px);
  height: var(--top-bar-height, 54px);
  min-width: var(--top-bar-height, 54px);
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--accent-primary-border-faint);
  border-radius: var(--nuam-radius-lg);
  background: var(--surface-panel-soft);
  background-image: var(--grain-bg);
  background-size: 20px 20px;
  background-blend-mode: overlay;
  color: var(--text-secondary-bright);
  box-shadow: 0 4px 6px var(--shadow-color-default);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: border-color .22s ease, background-color .22s ease, box-shadow .22s ease;
}

.nuam-account-top-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(110deg, #cdd28d 0%, #89bfd0 34%, #84aafb 58%, #90ee90 78%, #cdd28d 100%);
  background-size: 240% 240%;
  background-position: 0% 50%;
  opacity: 0;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity .28s ease;
  will-change: opacity;
}

.nuam-account-top-button:hover,
.nuam-account-top-button:focus-visible {
  border-color: transparent;
  background-color: var(--surface-panel);
  box-shadow: 0 6px 16px var(--shadow-color-faint);
  outline: none;
}

.nuam-account-top-button:hover::before,
.nuam-account-top-button:focus-visible::before {
  opacity: 1;
  animation: nuam-account-outline-flow 2.2s ease-in-out infinite;
}

@keyframes nuam-account-outline-flow {
  0%, 100% { background-position: 0% 50%; filter: brightness(1); }
  50% { background-position: 100% 50%; filter: brightness(1.15); }
}

.nuam-account-top-icon {
  position: relative;
  z-index: 1;
  width: 21px;
  height: 21px;
  display: block;
}

.nuam-account-top-icon .ti {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  transition: opacity .26s ease, transform .32s cubic-bezier(.22,.8,.25,1);
}

.nuam-account-top-icon-base {
  opacity: 1;
  transform: scale(1);
}

.nuam-account-top-icon-gradient {
  opacity: 0;
  transform: scale(.82);
}

.nuam-account-top-icon-gradient::before {
  color: transparent;
  background: linear-gradient(1deg, #cdd28d, #89bfd0);
  -webkit-background-clip: text;
  background-clip: text;
}

.nuam-account-top-button:hover .nuam-account-top-icon-base,
.nuam-account-top-button:focus-visible .nuam-account-top-icon-base {
  opacity: 0;
  transform: scale(.86);
}

.nuam-account-top-button:hover .nuam-account-top-icon-gradient,
.nuam-account-top-button:focus-visible .nuam-account-top-icon-gradient,
.nuam-account-top-button.is-signed-in .nuam-account-top-icon-gradient {
  opacity: 1;
  transform: scale(1);
}

.nuam-account-top-button.is-signed-in .nuam-account-top-icon-base {
  opacity: .18;
}

/* One-shot attention dimmer for the registration gate.
   The element itself is the transparent cutout around the account button;
   the giant outer shadow darkens everything else without intercepting input. */
.nuam-account-access-dimmer {
  position: fixed;
  z-index: 11940;
  pointer-events: none;
  border-radius: var(--nuam-radius-lg);
  background: transparent;
  box-shadow: 0 0 0 9999px rgba(5, 10, 18, .46);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility 0s linear .24s;
}

.nuam-account-access-dimmer.is-visible {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

/* Persistent guest access callout. Uses the app's existing radius, border, shadow and blue accent tokens. */
.nuam-account-access-notice {
  --nuam-access-notice-arrow-right: 20px;
  position: fixed;
  z-index: 11950;
  width: min(390px, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid rgba(132, 170, 251, .48);
  border-radius: var(--nuam-radius-lg);
  --nuam-access-notice-background: color-mix(in srgb, var(--surface-panel-opaque) 84%, rgb(132, 170, 251) 16%);
  background: var(--nuam-access-notice-background);
  color: var(--text-primary);
  box-shadow: 0 10px 28px var(--shadow-color-default);
  font-family: var(--app-font-family);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.985);
  transform-origin: calc(100% - var(--nuam-access-notice-arrow-right) - 7px) top;
  transition: opacity .22s ease, transform .28s cubic-bezier(.22,.8,.25,1), visibility 0s linear .28s, border-color .2s ease, box-shadow .2s ease;
}

.nuam-account-access-notice::before,
.nuam-account-access-notice::after {
  content: "";
  position: absolute;
  pointer-events: none;
  left: auto;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* Outer triangle is only the arrow border and stays completely above the plaque. */
.nuam-account-access-notice::before {
  right: calc(var(--nuam-access-notice-arrow-right) - 1px);
  bottom: 100%;
  width: 16px;
  height: 9px;
  background: rgba(132, 170, 251, .48);
}

/* Inner triangle uses the exact plaque background. Its base overlaps the plaque
   by one pixel so the plaque's top border cannot draw a line under the arrow. */
.nuam-account-access-notice::after {
  right: var(--nuam-access-notice-arrow-right);
  bottom: calc(100% - 1px);
  width: 14px;
  height: 8px;
  background: var(--nuam-access-notice-background);
}

.nuam-account-access-notice.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.nuam-account-access-notice:hover,
.nuam-account-access-notice:focus-visible {
  border-color: rgba(132, 170, 251, .72);
  box-shadow: 0 12px 34px var(--shadow-color-default), 0 0 0 1px rgba(132, 170, 251, .08);
  outline: none;
}

.nuam-account-access-notice.is-reminded {
  animation: nuam-account-access-notice-remind .42s cubic-bezier(.22,.8,.25,1);
}

@keyframes nuam-account-access-notice-remind {
  0%, 100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(1px) scale(1.012); }
}

@media (max-width: 620px) {
  .nuam-account-access-notice {
    width: min(360px, calc(100vw - 16px));
    padding: 11px 12px;
    font-size: 11px;
  }
}

.nuam-account-modal {
  z-index: 12000;
}

/* Account/auth visibility has one owner. The scoped selector outranks component
   display declarations without per-control visibility overrides. */
.nuam-account-modal [hidden] {
  display: none;
}

.nuam-account-modal-box {
  width: 460px;
  max-width: 100%;
  min-width: 0;
  max-height: min(92vh, 760px);
  overflow: auto;
}

.nuam-account-modal-head {
  align-items: center;
}

.nuam-account-loading {
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-secondary-bright);
  font-size: 13px;
}


.nuam-account-loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent-primary-border-faint);
  border-top-color: var(--accent-secondary);
  border-radius: 50%;
  animation: nuam-account-spinner .7s linear infinite;
}

@keyframes nuam-account-spinner {
  to { transform: rotate(360deg); }
}

.nuam-account-mode-switch {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 14px;
}

.nuam-account-mode-switch > .sort-direction-subtab-btn {
  flex: 1 1 50%;
  min-width: 0;
}


.nuam-auth-flow-copy {
  padding: 10px 11px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--nuam-radius-md);
  background: var(--surface-panel-soft);
  color: var(--text-secondary-bright);
  font-size: 12px;
  line-height: 1.5;
}

.nuam-auth-text-action {
  appearance: none;
  align-self: flex-start;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--accent-secondary);
  font-family: var(--app-font-family);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  transition: color .18s ease, opacity .18s ease;
}

.nuam-auth-text-action:hover,
.nuam-auth-text-action:focus-visible {
  color: var(--accent-primary);
}

.nuam-auth-text-action:focus-visible {
  outline: 1px solid var(--accent-primary-border);
  outline-offset: 3px;
  border-radius: 2px;
}

.nuam-auth-text-action:disabled {
  opacity: .5;
  cursor: wait;
}

.nuam-auth-forgot-password {
  align-self: flex-end;
  margin-top: -4px;
}

.nuam-auth-back-action {
  align-self: center;
  margin-top: 1px;
}

.nuam-auth-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
}


.nuam-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nuam-auth-label {
  color: var(--text-secondary-bright);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.nuam-auth-input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--accent-primary-border-faint);
  border-radius: var(--nuam-radius-md);
  background: var(--surface-panel-soft);
  color: var(--text-primary);
  font-family: var(--app-font-family);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.nuam-auth-password-wrap {
  position: relative;
  width: 100%;
}

.nuam-auth-password-input {
  padding-right: 44px;
}

.nuam-auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: var(--nuam-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nuam-auth-password-toggle .ti {
  font-size: 17px;
  line-height: 1;
}

.nuam-auth-password-toggle:hover,
.nuam-auth-password-toggle:focus-visible {
  color: var(--accent-primary);
  background: var(--state-selected-bg);
}

.nuam-auth-password-toggle:focus-visible {
  outline: 1px solid var(--accent-primary-border);
  outline-offset: 1px;
}

.nuam-auth-input:hover {
  border-color: var(--accent-primary-border);
}

.nuam-auth-input:focus {
  border-color: var(--accent-primary);
  background: var(--surface-panel);
}

.nuam-auth-input.is-invalid,
.nuam-auth-input.is-invalid:hover,
.nuam-auth-input.is-invalid:focus,
.nuam-auth-role-select.is-invalid,
.nuam-auth-role-select.is-invalid:hover {
  border-color: rgba(226, 93, 93, .72);
  box-shadow: 0 0 0 2px rgba(226, 93, 93, .09);
}

.nuam-auth-role-select {
  background-color: var(--surface-panel-soft);
  border-color: var(--accent-primary-border-faint);
}

.nuam-auth-role-select:hover,
.nuam-auth-role-select.open {
  border-color: var(--accent-primary);
}

.nuam-auth-role-select .selected {
  min-height: 42px;
  height: auto;
  padding: 10px 30px 10px 10px;
}

/* Reuse the shared floating custom-select surface, above the account modal. */
.nuam-auth-role-options.custom-select-floating {
  z-index: 12250;
}

.nuam-auth-hint {
  margin-top: -2px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.35;
}

.nuam-auth-primary-btn,
.nuam-auth-secondary-btn {
  width: 100%;
  min-height: 42px;
  margin-top: 3px;
  border-radius: var(--nuam-radius-md);
  font-family: var(--app-font-family);
  font-size: 14px;
  font-weight: 700;
}

.nuam-auth-primary-btn {
  border: 1px solid var(--accent-primary-border);
  background: var(--state-selected-bg);
  color: var(--text-primary);
}

.nuam-auth-primary-btn:hover:not(:disabled) {
  border-color: var(--accent-primary);
}

.nuam-auth-secondary-btn {
  border: 1px solid var(--accent-primary-border-transparent);
  background: var(--surface-panel-soft);
  color: var(--text-primary);
}

.nuam-auth-primary-btn:disabled,
.nuam-auth-secondary-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.nuam-auth-message {
  max-height: 0;
  margin-top: 0;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--nuam-radius-md);
  background: transparent;
  color: var(--text-secondary-bright);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(-5px);
  transition: max-height .26s ease, margin-top .22s ease, padding .22s ease, opacity .2s ease, transform .26s cubic-bezier(.22,.8,.25,1), border-color .2s ease, background-color .2s ease;
}

.nuam-auth-message.is-visible {
  max-height: 96px;
  margin-top: 10px;
  padding: 9px 10px;
  opacity: 1;
  transform: translateY(0);
  border-color: var(--border-subtle);
  background: var(--surface-panel-soft);
}

.nuam-auth-message.is-error {
  color: var(--status-danger);
}

.nuam-auth-message.is-error.is-visible {
  border-color: rgba(226, 93, 93, .28);
  background: rgba(226, 93, 93, .07);
}

.nuam-auth-message.is-success {
  color: var(--status-success, #8fcf9a);
}

.nuam-auth-message.is-success.is-visible {
  border-color: rgba(143, 207, 154, .25);
  background: rgba(143, 207, 154, .06);
}

.nuam-account-card {
  display: flex;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--accent-primary-border-faint);
  border-radius: var(--nuam-radius-lg);
  background: var(--surface-panel-soft);
}

.nuam-account-card-copy {
  width: 100%;
  min-width: 0;
}

.nuam-account-identity-line {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  column-gap: 8px;
}

.nuam-account-card-edit-btn {
  opacity: 0;
  transform: translateX(4px);
  pointer-events: none;
}

.nuam-account-card:hover .nuam-account-card-edit-btn,
.nuam-account-card:focus-within .nuam-account-card-edit-btn {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.nuam-account-name {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nuam-account-email {
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nuam-account-meta-grid {
  display: flex;
  flex-direction: column;
  margin: 12px 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--nuam-radius-lg);
  overflow: hidden;
}

.nuam-account-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  padding: 8px 11px;
  background: var(--surface-panel-soft);
  border-bottom: 1px solid var(--border-subtle);
  box-sizing: border-box;
}

.nuam-account-meta-row:last-child {
  border-bottom: 0;
}


.nuam-account-meta-row > span {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.nuam-account-meta-row > strong {
  min-width: 0;
  max-width: 58%;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* v1337 — inline profile editing lives inside the existing account surfaces. */
.nuam-account-inline-value {
  min-width: 0;
  max-width: 68%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}

.nuam-account-inline-value > strong {
  min-width: 0;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: transform .22s cubic-bezier(.22,.8,.25,1);
}

.nuam-account-inline-actions {
  max-width: 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(5px);
  pointer-events: none;
  transition:
    max-width .24s cubic-bezier(.22,.8,.25,1),
    margin-left .22s ease,
    opacity .18s ease,
    transform .24s cubic-bezier(.22,.8,.25,1);
}

.nuam-account-meta-row.has-inline-actions:hover .nuam-account-inline-actions,
.nuam-account-meta-row.has-inline-actions:focus-within .nuam-account-inline-actions {
  max-width: 64px;
  margin-left: 6px;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.nuam-account-meta-row.has-inline-actions:hover .nuam-account-inline-value > strong,
.nuam-account-meta-row.has-inline-actions:focus-within .nuam-account-inline-value > strong {
  transform: translateX(-3px);
}

.nuam-account-inline-icon-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--nuam-radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--app-font-family);
  line-height: 1;
  cursor: pointer;
  transition:
    color .18s ease,
    background-color .18s ease,
    opacity .18s ease,
    transform .22s cubic-bezier(.22,.8,.25,1);
}

.nuam-account-inline-icon-btn i {
  font-size: 12px;
  line-height: 1;
}

.nuam-account-inline-icon-btn:hover:not(:disabled),
.nuam-account-inline-icon-btn:focus-visible:not(:disabled) {
  color: var(--text-primary);
  background: var(--state-hover-accent-bg);
  outline: none;
}

.nuam-account-inline-icon-btn:disabled {
  opacity: .42;
  cursor: wait;
}

.nuam-account-inline-icon-btn-danger {
  color: var(--status-danger);
}

.nuam-account-inline-icon-btn-danger:hover:not(:disabled),
.nuam-account-inline-icon-btn-danger:focus-visible:not(:disabled) {
  color: var(--text-primary);
  background: var(--status-danger-bg-hover);
}

.nuam-account-row-text-btn {
  width: auto;
  min-width: 0;
  min-height: 28px;
  height: 28px;
  margin: 0 0 0 8px;
  padding: 0 9px;
  border-radius: var(--nuam-radius-md);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.nuam-account-row-text-btn:disabled {
  opacity: .5;
  cursor: wait;
}

/* v1339 — role hover animates without changing flex geometry. */
@media (hover: hover) and (pointer: fine) {
  #nuam-account-role-row .nuam-account-inline-value {
    position: relative;
  }

  #nuam-account-role-row .nuam-account-inline-actions {
    position: absolute;
    top: 50%;
    right: 0;
    width: 28px;
    max-width: none;
    margin-left: 0;
    overflow: visible;
    opacity: 0;
    transform: translate(6px, -50%);
    pointer-events: none;
    transition: opacity .18s ease, transform .24s cubic-bezier(.22,.8,.25,1);
  }

  #nuam-account-role-row:hover .nuam-account-inline-actions,
  #nuam-account-role-row:focus-within .nuam-account-inline-actions {
    max-width: none;
    margin-left: 0;
    opacity: 1;
    transform: translate(0, -50%);
    pointer-events: auto;
  }

  #nuam-account-role-row .nuam-account-inline-value > strong {
    transform: translateX(0);
    will-change: transform;
  }

  #nuam-account-role-row:hover .nuam-account-inline-value > strong,
  #nuam-account-role-row:focus-within .nuam-account-inline-value > strong {
    transform: translateX(-34px);
  }
}

@media (hover: none) {
  .nuam-account-card-edit-btn {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nuam-account-meta-row.has-inline-actions .nuam-account-inline-actions {
    max-width: 64px;
    margin-left: 6px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nuam-account-meta-row.has-inline-actions .nuam-account-inline-value > strong {
    transform: none;
  }
}


.nuam-analytics-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.45;
  cursor: pointer;
}

.nuam-analytics-consent input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 1px 0 0;
  accent-color: var(--accent-secondary);
}

.nuam-analytics-consent-compact {
  color: var(--text-primary);
  font-size: 12px;
}

.nuam-account-analytics-box {
  display: grid;
  gap: 9px;
  margin: 0 0 12px;
  padding: 11px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--nuam-radius-lg);
  background: var(--surface-panel-soft);
}

.nuam-account-analytics-box .nuam-auth-secondary-btn {
  width: 100%;
}

@media (max-width: 760px) {

  .nuam-account-survey-limit-notice.is-mobile {
    left: 50%;
    top: auto;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: max-content;
    max-width: calc(100vw - 24px);
    text-align: center;
    transform: translate(-50%, 8px) scale(.985);
  }
  .nuam-account-survey-limit-notice.is-mobile.is-visible {
    transform: translate(-50%, 0) scale(1);
  }
  .controls-row-top {
    grid-template-columns: var(--nuam-mobile-top-control) minmax(0, 1fr) var(--nuam-mobile-top-control) var(--nuam-mobile-top-control) var(--nuam-mobile-top-control);
  }

  .nuam-account-top-button {
    grid-column: 5;
    width: var(--nuam-mobile-top-control);
    height: var(--nuam-mobile-top-control);
    min-width: var(--nuam-mobile-top-control);
    flex-basis: var(--nuam-mobile-top-control);
    border-radius: var(--nuam-radius-lg);
    font-size: 17px;
    z-index: 1230;
  }

  /* iOS Safari / in-app WebView: anchor the auth modal to the actual visual
     viewport. The JS variables also follow the on-screen keyboard and any
     pre-existing browser zoom, so the right edge cannot end up off-screen. */
  .nuam-account-modal {
    inset: auto;
    left: var(--nuam-account-vv-left, 0px);
    top: var(--nuam-account-vv-top, 0px);
    right: auto;
    bottom: auto;
    width: var(--nuam-account-vv-width, 100dvw);
    height: var(--nuam-account-vv-height, 100dvh);
    max-width: none;
    min-width: 0;
    min-height: 0;
    padding:
      max(var(--nuam-mobile-page-pad, 8px), env(safe-area-inset-top))
      max(var(--nuam-mobile-page-pad, 8px), env(safe-area-inset-right))
      max(var(--nuam-mobile-page-pad, 8px), env(safe-area-inset-bottom))
      max(var(--nuam-mobile-page-pad, 8px), env(safe-area-inset-left));
    overflow: hidden;
    overscroll-behavior: contain;
  }

  @supports not (width: 100dvw) {
    .nuam-account-modal {
      width: var(--nuam-account-vv-width, 100vw);
      height: var(--nuam-account-vv-height, 100vh);
    }
  }

  .nuam-account-modal-box {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: 100%;
    min-height: 0;
    padding: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .nuam-account-modal-head {
    min-width: 0;
  }

  .nuam-account-modal-head .modal-title {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .nuam-account-modal-head .modal-close-icon-btn {
    flex: 0 0 auto;
  }

  .nuam-account-signed-out,
  .nuam-account-signed-in,
  .nuam-account-card,
  .nuam-account-meta-grid,
  .nuam-auth-form,
  .nuam-auth-field {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  /* 16px prevents WebKit from auto-zooming the page when an auth field gets
     focus. That auto-zoom was what left the signed-in modal wider than the
     visible iPhone WebView after registration. */
  .nuam-auth-input {
    font-size: 16px;
  }

  .nuam-account-meta-row {
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 58%);
    gap: 10px;
    min-height: 42px;
    height: auto;
  }

  .nuam-account-meta-row > strong {
    max-width: none;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .nuam-account-mode-switch > button {
    min-height: 40px;
  }
}

.nuam-analytics-notice {
  padding: 9px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--nuam-radius-md);
  background: var(--surface-panel-soft);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.45;
}

/* v1323 — invite-gated beta registration */
.nuam-auth-invite-gate,
.nuam-auth-register-details {
  display: grid;
  gap: 12px;
  min-width: 0;
}


#nuam-register-invite {
  font-variant-numeric: tabular-nums;
}

/* v1445 — public invite registration entry keeps both first-step actions equal. */
.nuam-auth-invite-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.nuam-auth-invite-actions > .button {
  width: 100%;
  min-width: 0;
  margin-top: 3px;
}


/* v1328 — profile controls use the existing floating custom-select and button language. */

/* Multi-role picker is the existing custom-select shell. Its menu is portalled
   to body when open, exactly like the app's floating dropdowns. */
.nuam-role-multiselect .selected {
  min-width: 0;
  white-space: normal;
}

.nuam-role-multiselect-text {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.35;
}

.nuam-role-multiselect-options {
  gap: 2px;
  padding: 6px;
}

.nuam-role-multiselect-options.custom-select-floating {
  z-index: 12250;
  box-sizing: border-box;
  gap: 2px;
  padding: 6px;
  max-width: min(calc(100vw - 16px), 720px);
  overflow-y: hidden;
  scrollbar-gutter: auto;
}

/* v1329 — native scrolling must remain active when the floating role menu is
   viewport-constrained. The menu stays visually identical; this only restores
   the same pan/wheel behavior as other scrollable NUAM floating panels. */
.nuam-role-multiselect-options.custom-select-floating.is-scrollable {
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.nuam-role-multiselect-options.custom-select-floating.is-scrollable > .nuam-role-multiselect-option {
  flex: 0 0 auto;
}

/* Role dropdown scrollbar follows NUAM panel geometry: it exists only when
   scrolling is actually needed, stays inside the panel and rounds only on the
   outer (right) edge with the same radius as the dropdown itself. */
.nuam-role-multiselect-options.custom-select-floating.is-scrollable::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.nuam-role-multiselect-options.custom-select-floating.is-scrollable::-webkit-scrollbar-track {
  background: var(--surface-app);
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  background-clip: padding-box;
  border-top-left-radius: 0;
  border-top-right-radius: var(--nuam-radius-md);
  border-bottom-right-radius: var(--nuam-radius-md);
  border-bottom-left-radius: 0;
}

.nuam-role-multiselect-options.custom-select-floating.is-scrollable::-webkit-scrollbar-thumb {
  background-color: var(--surface-base);
  border: 2px solid var(--surface-app);
  background-clip: padding-box;
  border-top-left-radius: 0;
  border-top-right-radius: var(--nuam-radius-md);
  border-bottom-right-radius: var(--nuam-radius-md);
  border-bottom-left-radius: 0;
}

.nuam-role-multiselect-options.custom-select-floating.is-scrollable::-webkit-scrollbar-button,
.nuam-role-multiselect-options.custom-select-floating.is-scrollable::-webkit-scrollbar-button:single-button,
.nuam-role-multiselect-options.custom-select-floating.is-scrollable::-webkit-scrollbar-button:vertical:start:decrement,
.nuam-role-multiselect-options.custom-select-floating.is-scrollable::-webkit-scrollbar-button:vertical:end:increment {
  display: none;
  width: 0;
  height: 0;
  border: 0;
  background: transparent;
}

.nuam-role-multiselect-options.custom-select-floating.is-scrollable::-webkit-scrollbar-corner {
  background: transparent;
}

.nuam-role-multiselect-option {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: var(--nuam-radius-md);
  cursor: pointer;
  color: var(--text-primary);
}

.nuam-role-multiselect-option:hover {
  background-color: var(--surface-app);
}

.nuam-role-multiselect-option > .playlist-filter-check {
  justify-self: start;
}

.nuam-role-multiselect-option-text {
  min-width: 0;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* One action stack = one spacing rhythm. */
.nuam-account-actions-stack {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.nuam-account-summary-actions {
  display: grid;
  gap: 8px;
}

.nuam-account-action-btn {
  width: 100%;
  margin: 0;
}


/* Destructive action uses the existing saved-item danger palette, with the
   same smooth interactive timing as other NUAM controls. */
.nuam-account-danger-btn {
  border-color: var(--status-danger-border);
  background: var(--status-danger-bg);
  color: var(--text-primary);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.nuam-account-danger-btn:hover:not(:disabled),
.nuam-account-danger-btn:focus-visible:not(:disabled) {
  border-color: var(--status-danger);
  background: var(--status-danger-bg-hover);
  outline: none;
}

.nuam-account-edit-form {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  border: 0;
}

.nuam-account-edit-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.nuam-account-edit-actions > .button {
  width: 100%;
  min-width: 0;
}

@media (max-width: 760px) {
  .nuam-role-multiselect,
  .nuam-account-edit-form,
  .nuam-account-edit-actions,
  .nuam-account-actions-stack,
  .nuam-account-summary-actions {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}

/* v1332 — email verification/recovery uses the existing auth field, message,
   button and text-action language. Only flow layout is added here. */
.nuam-auth-code-step {
  display: grid;
  gap: 11px;
  min-width: 0;
}


.nuam-auth-inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-width: 0;
}

.nuam-auth-code-input {
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: .16em;
}


@media (max-width: 760px) {
  .nuam-auth-code-step,
  .nuam-auth-inline-actions,
  #nuam-account-email-change-form,
  #nuam-account-recovery-email-form,
  #nuam-recovery-signin-form {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}

/* v1337 — keep inline profile values/actions aligned inside the mobile 58% value column. */
@media (max-width: 760px) {
  .nuam-account-meta-row > .nuam-account-inline-value {
    width: 100%;
    max-width: none;
    justify-self: end;
  }

  /* Keep the role edit pencil inside the row even when several long roles are selected. */
  #nuam-account-role-row > .nuam-account-inline-value {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  #nuam-account-role-row .nuam-account-inline-value > strong {
    flex: 1 1 auto;
    min-width: 0;
  }

  #nuam-account-role-row .nuam-account-inline-actions {
    flex: 0 0 auto;
  }
}

/* ==========================================================================
   v1367 — signed-in account tabs / fixed tab rail / local scroll panes
   ========================================================================== */

.nuam-account-modal-box.is-account-signed-in {
  width: 560px;
  height: min(84vh, 760px);
  max-height: min(92vh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.nuam-account-modal-box.is-account-signed-in > .nuam-account-modal-head {
  flex: 0 0 auto;
}

.nuam-account-modal-box.is-account-signed-in > .nuam-account-signed-in {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nuam-account-section-tabs {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 10px;
  padding: 4px;
  box-shadow: 0 8px 22px var(--shadow-color-faint);
}

.nuam-account-section-tabs > .sort-direction-subtab-btn {
  flex: 1 1 50%;
  min-width: 0;
  min-height: 38px;
  font-size: 12px;
  font-weight: 700;
}


.nuam-account-tab-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--nuam-radius-xl);
  background: var(--control-disabled-bg);
}

.nuam-account-section-pane {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 12px;
  background: transparent;
  -webkit-overflow-scrolling: touch;
}


/* Same local panel scrollbar geometry already used by playlist/stats/result panes. */
.nuam-account-section-pane::-webkit-scrollbar {
  width: 12px;
}

.nuam-account-section-pane::-webkit-scrollbar-track {
  background: var(--surface-app);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.nuam-account-section-pane::-webkit-scrollbar-thumb {
  background: var(--surface-base);
  border: 2px solid var(--surface-app);
  border-top-left-radius: 0;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 0;
}

.nuam-account-section-pane::-webkit-scrollbar-button,
.nuam-account-section-pane::-webkit-scrollbar-button:single-button,
.nuam-account-section-pane::-webkit-scrollbar-button:vertical:start:decrement,
.nuam-account-section-pane::-webkit-scrollbar-button:vertical:end:increment {
  display: none;
  width: 0;
  height: 0;
  border: 0;
  background: transparent;
}

.nuam-account-section-pane::-webkit-scrollbar-corner {
  background: var(--surface-app);
}

/* Firefox keeps a local, app-colored scrollbar without introducing a global
   overlay/observer. Chrome/WebKit geometry above remains the visual source. */
@supports (-moz-appearance: none) {
  .nuam-account-section-pane {
    scrollbar-width: thin;
    scrollbar-color: var(--surface-base) var(--surface-app);
  }
}

.nuam-account-profile-section .nuam-account-meta-grid {
  margin-bottom: 0;
}

.nuam-account-profile-section .nuam-account-actions-stack {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .nuam-account-modal-box.is-account-signed-in {
    width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .nuam-account-section-tabs {
    margin-bottom: 8px;
  }

  .nuam-account-section-tabs > .sort-direction-subtab-btn {
    min-height: 40px;
    padding-inline: 10px;
  }

  .nuam-account-tab-stage {
    border-radius: var(--nuam-radius-lg);
  }

  .nuam-account-section-pane {
    padding: 10px;
    scrollbar-gutter: auto;
  }

  .nuam-account-section-pane::-webkit-scrollbar {
    width: 10px;
  }
}

/* ========================================================================
   v1368 — content-height Profile pane + route-only constrained scroll
   ======================================================================== */

@media (min-width: 761px) {
  .nuam-account-modal-box.is-account-signed-in {
    height: auto;
    max-height: min(92vh, 760px);
  }

  .nuam-account-modal-box.is-account-signed-in > .nuam-account-signed-in {
    flex: 0 1 auto;
    overflow: visible;
  }

  .nuam-account-modal-box.is-account-profile-active .nuam-account-tab-stage {
    flex: 0 1 auto;
    min-height: 0;
    max-height: calc(min(92vh, 760px) - 116px);
    overflow: hidden;
  }

  .nuam-account-profile-section {
    height: auto;
    max-height: calc(min(92vh, 760px) - 116px);
    overflow-y: auto;
    scrollbar-gutter: auto;
  }

  .nuam-account-modal-box.is-account-roadmap-active {
    height: min(84vh, 760px);
  }

  .nuam-account-modal-box.is-account-roadmap-active > .nuam-account-signed-in {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .nuam-account-modal-box.is-account-roadmap-active .nuam-account-tab-stage {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }

  .nuam-account-modal-box.is-account-roadmap-active .nuam-account-roadmap-section {
    height: 100%;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  /* Survey is a long, scrollable profile sub-view. Keep the whole scrollbar
     inside the modal instead of letting the content-height profile rules grow
     beyond the visible viewport. */
  .nuam-account-modal-box.is-account-survey-active {
    height: min(84vh, 760px);
  }

  .nuam-account-modal-box.is-account-survey-active > .nuam-account-signed-in {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .nuam-account-modal-box.is-account-survey-active .nuam-account-tab-stage {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }

  .nuam-account-modal-box.is-account-survey-active .nuam-account-profile-section {
    height: 100%;
    max-height: none;
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding-bottom: 14px;
  }
}


/* v1428: compact post-beta survey card shown only in the profile summary */
.nuam-account-postbeta-survey {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
}
.nuam-account-postbeta-survey-text {
  color: var(--text-secondary-bright);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.nuam-account-postbeta-survey .nuam-auth-primary-btn {
  width: auto;
  min-height: 38px;
  margin-top: 0;
  padding-inline: 14px;
  font-size: 13px;
  align-self: flex-start;
}
.nuam-account-meta-row.is-access-locked #nuam-account-telegram-status {
  font-weight: 600;
  opacity: .72;
}

/* v1431: continuation survey keeps its scroll geometry inside the account viewport and reuses app scrollbars. */
.nuam-account-survey-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-bottom: 14px;
}
.nuam-account-survey-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-inline: 2px;
}
.nuam-account-survey-head .nuam-auth-back-action {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px;
}
.nuam-account-survey-kicker,
.nuam-account-survey-section {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.nuam-account-survey-kicker { color: var(--text-muted); }
.nuam-account-survey-section { color: var(--text-secondary-bright); }
.nuam-account-survey-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 18px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.25;
}
.nuam-account-survey-save-state[data-state="error"] { color: var(--status-danger); }
.nuam-account-survey-save-state[data-state="test"] { color: var(--text-secondary); }
.nuam-account-survey-progress {
  position: relative;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: var(--nuam-radius-pill);
  background: var(--accent-primary-border-faint);
}
.nuam-account-survey-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-primary);
  transition: width .18s ease;
}
.nuam-account-survey-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 13px;
  min-height: 235px;
  padding: 16px;
  border-color: var(--accent-primary-border-faint);
  background: var(--surface-panel-soft);
}
.nuam-account-survey-question-number {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.nuam-account-survey-question-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.38;
}
.nuam-account-survey-options {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--nuam-radius-lg);
  background: var(--surface-panel-soft);
}
.nuam-account-survey-option {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  user-select: none;
  transition: background-color .18s ease;
}
.nuam-account-survey-option:last-child { border-bottom: 0; }
.nuam-account-survey-option:hover { background: var(--accent-primary-bg-soft); }
.nuam-account-survey-option:has(.nuam-account-survey-option-input:checked) { background: var(--state-hover-accent-bg); }
.nuam-account-survey-option-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.nuam-account-survey-option-marker {
  position: relative;
  width: 16px;
  height: 16px;
  border: 1px solid var(--accent-primary-border);
  border-radius: 50%;
  box-sizing: border-box;
  background: var(--surface-app);
}
.nuam-account-survey-option:has(input[type="checkbox"]) .nuam-account-survey-option-marker {
  border-radius: var(--nuam-radius-xs);
}
.nuam-account-survey-option-input:checked + .nuam-account-survey-option-marker {
  border-color: var(--state-focus-border);
  background: var(--state-hover-accent-bg);
}
.nuam-account-survey-option:has(input[type="radio"]) .nuam-account-survey-option-input:checked + .nuam-account-survey-option-marker::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--accent-primary);
}
.nuam-account-survey-option:has(input[type="checkbox"]) .nuam-account-survey-option-input:checked + .nuam-account-survey-option-marker::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--accent-primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.nuam-account-survey-option-text {
  min-width: 0;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}
.nuam-account-survey-textarea {
  width: 100%;
  min-height: 96px;
  max-height: 280px;
  margin-top: 7px;
  padding: 12px 13px;
  resize: none;
  overflow-y: hidden;
  line-height: 1.45;
  scrollbar-gutter: stable;
}
/* Match the profile pane scrollbar exactly in Chromium/WebKit. Do not set
   scrollbar-width here: Chromium supports it now and `thin` overrides the
   custom 12px WebKit geometry. */
.nuam-account-survey-textarea::-webkit-scrollbar {
  width: 12px;
}
.nuam-account-survey-textarea::-webkit-scrollbar-track {
  background: var(--surface-app);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}
.nuam-account-survey-textarea::-webkit-scrollbar-thumb {
  background: var(--surface-base);
  border: 2px solid var(--surface-app);
  border-top-left-radius: 0;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 0;
}
.nuam-account-survey-textarea::-webkit-scrollbar-button,
.nuam-account-survey-textarea::-webkit-scrollbar-button:single-button,
.nuam-account-survey-textarea::-webkit-scrollbar-button:vertical:start:decrement,
.nuam-account-survey-textarea::-webkit-scrollbar-button:vertical:end:increment {
  display: none;
  width: 0;
  height: 0;
  border: 0;
  background: transparent;
}
.nuam-account-survey-textarea::-webkit-scrollbar-corner {
  background: var(--surface-app);
}
@supports (-moz-appearance: none) {
  .nuam-account-survey-textarea {
    scrollbar-width: auto;
    scrollbar-color: var(--surface-base) var(--surface-app);
  }
}
.nuam-account-survey-followup {
  display: grid;
  gap: 2px;
  margin-top: 1px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease;
}
.nuam-account-survey-followup.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.nuam-account-survey-followup-label {
  color: var(--text-secondary-bright);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}
.nuam-account-survey-optional {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.3;
}

/* v1434: q4 selection-limit feedback follows the attempted choice instead of hiding below the long option list. */
.nuam-account-survey-limit-notice {
  position: fixed;
  z-index: 100500;
  max-width: min(320px, calc(100vw - 24px));
  padding: 9px 11px;
  border: 1px solid var(--status-danger-border, var(--border-subtle));
  border-radius: var(--nuam-radius-md);
  background: var(--surface-panel-popup);
  background-image: var(--grain-bg);
  background-size: 20px 20px;
  background-blend-mode: overlay;
  box-shadow: var(--nuam-shadow-float, 0 8px 28px rgba(0, 0, 0, .24));
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  color: var(--status-danger);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px) scale(.985);
  transition: opacity .16s ease, transform .16s ease;
}
.nuam-account-survey-limit-notice.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.nuam-account-survey-message {
  min-height: 0;
  margin: 0;
}
.nuam-account-survey-message:not(.is-visible) {
  display: none;
}
.nuam-account-survey-message.is-visible {
  margin-top: 0;
}
.nuam-account-survey-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.nuam-account-survey-actions .button { min-width: 92px; }
.nuam-account-survey-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-height: 180px;
  color: var(--text-muted);
  font-size: 13px;
}
.nuam-account-survey-success-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--accent-primary-border);
  border-radius: 50%;
  background: var(--state-hover-accent-bg);
  color: var(--accent-primary);
  font-size: 20px;
}
.nuam-account-survey-success-copy {
  margin: 0;
  color: var(--text-secondary-bright);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .nuam-account-survey-view { gap: 8px; }
  .nuam-account-survey-card {
    min-height: 0;
    padding: 13px;
  }
  .nuam-account-survey-question-title { font-size: 15px; }
  .nuam-account-survey-option {
    min-height: 42px;
    padding: 9px 10px;
  }
  .nuam-account-survey-option-text { font-size: 12.5px; }
  .nuam-account-survey-textarea {
    min-height: 92px;
    max-height: 240px;
  }
  .nuam-account-survey-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .nuam-account-survey-actions .button {
    width: 100%;
    min-width: 0;
  }
  .nuam-account-survey-actions #nuam-account-survey-submit {
    grid-column: 2;
  }
}

