.auth-pending .app-shell,
.auth-pending .mobile-nav {
  display: none !important;
}
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: auto;
  background: #fff7ec;
  padding: 32px 20px;
  display: grid;
  place-items: center;
}
.auth-gate[hidden] {
  display: none;
}
.auth-back { border: 0; background: transparent; padding: 8px 0; margin-bottom: 12px; text-decoration: underline; }
.auth-card,
.cloud-panel {
  color: #443c38;
  font-family: Nunito, sans-serif;
  line-height: 1.5;
}
.auth-card {
  width: min(100%, 440px);
  margin: auto;
  padding: 32px;
  background: #fffdf7;
  border: 1px solid #d8ceba;
  border-radius: 24px;
  box-shadow: 5px 7px 0 #e8dfcb;
}
.auth-brand {
  font:
    40px DynaPuff,
    sans-serif;
  color: #a82e3c;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-brand img {
  width: 44px;
}
.auth-card .consent-choice { display: flex; align-items: flex-start; gap: 12px; font-weight: 600; text-align: left; font-size: 14px; }
.auth-card .consent-choice input { width: 20px; height: 20px; flex: 0 0 20px; padding: 0; margin-top: 3px; accent-color: #c90839; }
.auth-policy-links { font-size: 13px; }
.auth-card a, .account-privacy a { color: #a82e3c; text-underline-offset: 3px; }
.ai-consent-dialog { padding: 0; border: 0; background: transparent; max-width: min(94vw, 510px); max-height: 90dvh; overflow: auto; }
.ai-consent-dialog::backdrop { background: #33292099; }
.ai-consent-dialog .auth-card { box-sizing: border-box; width: 100%; box-shadow: none; }
.account-privacy { border-top: 1px solid #d8ceba; padding-top: 16px; margin-top: 24px; }
.auth-eyebrow {
  color: #9b4251;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.auth-card h1,
.cloud-panel h2 {
  font-family: DynaPuff, sans-serif;
  font-size: 26px;
  line-height: 1.3;
}
.auth-card label,
.cloud-panel label {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  font-weight: 700;
}
.auth-card input,
.cloud-panel input {
  box-sizing: border-box;
  width: 100%;
  padding: 12px;
  border: 1px solid #a99b8b;
  border-radius: 10px;
  background: #fffefa;
  font: inherit;
  color: inherit;
}
.auth-card button,
.cloud-panel button {
  cursor: pointer;
  border: 1px solid #b5a792;
  border-radius: 12px;
  padding: 11px 16px;
  background: #fffdf7;
  color: #443c38;
  font:
    700 14px Nunito,
    sans-serif;
}
.auth-card button:disabled,
.cloud-panel button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.auth-card button:focus-visible,
.cloud-panel button:focus-visible {
  outline: 3px solid #a68ac4;
  outline-offset: 3px;
}
.auth-card .cloud-primary,
.cloud-panel .cloud-primary {
  background: #ae3547;
  color: white;
  border-color: #8f2638;
}
.auth-card form button {
  width: 100%;
  margin-top: 12px;
}
.auth-alternatives {
  display: grid;
  gap: 9px;
  margin: 16px 0;
}
.auth-card { box-sizing: border-box; }
.auth-card .auth-link {
  border: 0;
  background: transparent;
  border-radius: 4px;
  padding: 6px 2px;
  color: #a82e3c;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}
.auth-card .auth-back { margin-bottom: 20px; font-size: 13px; }
.auth-description { color: #70625b; margin-bottom: 22px; }
.auth-password { position: relative; display: flex; align-items: center; }
.auth-password input { padding-right: 52px; min-width: 0; }
.auth-card form .auth-password-toggle {
  position: absolute; right: 4px; width: 44px; height: 44px; margin: 0; padding: 8px;
  min-height: 44px;
}
.auth-password-toggle .icon { width: 24px; height: 24px; display: block; }
.auth-forgot { text-align: right; margin-top: -6px; }
.auth-card form .auth-forgot button { width: auto; margin: 0; font-size: 13px; }
.auth-divider { display: flex; gap: 14px; align-items: center; color: #70625b; font-size: 13px; margin: 16px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #ded4c4; }
.auth-google { width: 100%; }
.auth-navigation { text-align: center; margin-top: 16px; font-size: 14px; }
.auth-navigation p { margin: 8px 0; }
.auth-otp-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.auth-policy-links { text-align: center; border-top: 1px solid #e8dfd0; padding-top: 18px; margin-top: 20px; color: #70625b; }
.auth-status:empty { display: none; }
.auth-card input:focus-visible, .auth-card a:focus-visible { outline: 3px solid #a68ac4; outline-offset: 3px; }
.auth-card input[name="token"] { letter-spacing: .35em; font-size: 22px; }
.onboarding-pending .app-shell, .onboarding-pending .mobile-nav { visibility: hidden; }
.onboarding-gate { z-index: 1001; display: block; padding: 28px; }
.onboarding-shell { display: grid; grid-template-rows: auto 1fr auto; width: min(100%, 1440px); min-height: calc(100svh - 56px); margin: 0 auto; }
.onboarding-header { padding: 28px 36px 12px; }
.onboarding-brand { font-size: 42px; letter-spacing: -1.5px; gap: 4px; }
.onboarding-brand .brand-cherries { width: 34px; height: 42px; object-fit: contain; }
.onboarding-nav { display: flex; align-items: center; margin-left: auto; }
.onboarding-nav > button { border: 0; padding: 10px 0; background: transparent; color: var(--ink); font: 700 16px var(--font-body); cursor: pointer; }
.onboarding-main { display: grid; place-items: center; padding: 20px 0; }
.onboarding-content { width: min(100%, 440px); }
.onboarding-content > .onboarding-back { margin: 0 0 12px; padding: 8px 0; border: 0; background: transparent; color: #a82e3c; font: 700 14px Nunito, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.onboarding-card { width: 100%; margin: 0; }
.onboarding-card h1 { margin-top: 8px; }
.onboarding-footer { justify-content: center; }
.onboarding-card progress { display: block; width: 100%; height: 6px; margin: 0 0 14px; accent-color: #ae3547; }
.onboarding-card form button:disabled { opacity: .48; cursor: not-allowed; }
.onboarding-options { border: 0; margin: 20px 0; padding: 0; display: grid; gap: 10px; }
.auth-card .onboarding-options label { display: flex; align-items: center; gap: 12px; border: 1px solid #d8ceba; border-radius: 12px; padding: 12px 14px; margin: 0; cursor: pointer; }
.onboarding-options label:has(input:checked) { background: #fbe9e9; border-color: #ae3547; }
.auth-card .onboarding-options input { width: 18px; height: 18px; margin: 0; accent-color: #ae3547; }
@media (max-width: 760px) {
  .onboarding-gate { padding: 0; }
  .onboarding-shell { min-height: 100svh; }
  .onboarding-header { padding: 22px 22px 12px; }
  .onboarding-brand { font-size: 34px; }
  .onboarding-brand .brand-cherries { width: 27px; height: 34px; }
  .onboarding-main { padding: 16px 22px; }
  .onboarding-footer { padding: 16px max(6px, env(safe-area-inset-left)) calc(20px + env(safe-area-inset-bottom)); }
}
.profile-identity, .profile-card {
  padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-card);
  background: var(--surface); color: var(--ink); font-family: var(--font-body, Nunito, sans-serif); line-height: 1.55;
}
.profile-identity { display: flex; align-items: center; gap: 18px; margin-bottom: 32px; background: var(--accent-soft); }
.profile-avatar { display: grid; place-items: center; flex: 0 0 64px; width: 64px; height: 64px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); }
.profile-avatar .icon { width: 32px; height: 32px; }
.profile-identity > div { min-width: 0; flex: 1; }
.profile-identity h2 { font: 700 18px/1.4 Nunito, sans-serif; margin: 4px 0; overflow-wrap: anywhere; }
.profile-identity p, .profile-card p { font-size: 13px; color: var(--muted); }
.profile-identity p { margin: 0; }
.profile-identity .plan-badge { flex-shrink: 0; font-size: 12px; }
.profile-style { margin-bottom: 32px; }
.profile-section-heading, .profile-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.profile-section-heading { margin-bottom: 18px; }
.profile-section-heading h2, .profile-card h2 { margin: 0 0 6px; font: 500 25px/1.3 var(--font-display); color: var(--accent); }
.profile-card-heading { margin-bottom: 20px; }
.profile-card-heading .eyebrow { margin-bottom: 6px; }
.profile-section-heading > .icon, .profile-card-heading > .icon { width: 30px; height: 30px; opacity: .65; }
.profile-settings { display: grid; gap: 22px; }
.profile-card .quota-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 20px; }
.profile-card .quota-grid div { padding: 16px 12px; background: var(--canvas); border-color: var(--border); }
.profile-card .quota-grid dt { font-size: 12px; color: var(--muted); }
.profile-card .quota-grid dd { margin-top: 8px; line-height: 1.4; }
.profile-card .quota-grid strong { font-size: 24px; font-weight: 800; }
.profile-card .quota-grid dd span { color: var(--muted); font-size: 12px; font-weight: 600; }
.profile-card button { border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); padding: 10px 16px; min-height: 44px; font: 700 13px Nunito, sans-serif; cursor: pointer; }
.profile-card button:disabled { opacity: .55; cursor: wait; }
.profile-card button:focus-visible, .profile-card summary:focus-visible, .profile-card input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.profile-card button.cloud-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.profile-card button.cloud-danger { border-color: #a52238; color: #a52238; }
.profile-card a { color: var(--accent); text-underline-offset: 3px; }
.profile-pro { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-radius: 16px; background: var(--creative-surface); padding: 20px; }
.profile-pro h3 { margin: 0; font-size: 15px; }
.profile-pro p { margin: 6px 0; }
.profile-pro small { font-size: 11px; color: var(--muted); }
.profile-pro button { flex-shrink: 0; }
.billing-history-disclosure { margin-top: 16px; }
.payment-history { display: grid; }
.payment-history-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); font-size: 13px; }
.payment-history-row > div:last-child { text-align: right; white-space: nowrap; }
.payment-history-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.profile-empty-history { margin: 0 0 16px; padding: 14px; background: var(--canvas); border-radius: 12px; }
.profile-card .profile-text-button { background: transparent; border: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; padding-left: 0; margin-top: 8px; }
.profile-disclosure { border-top: 1px solid var(--border); }
.profile-disclosure summary { display: flex; align-items: center; gap: 14px; padding: 18px 0; cursor: pointer; list-style: none; font-size: 14px; font-weight: 700; }
.profile-disclosure summary::-webkit-details-marker { display: none; }
.profile-disclosure summary > span { flex: 1; }
.profile-disclosure summary::after { content: "+"; font-size: 22px; color: var(--muted); font-weight: 400; }
.profile-disclosure[open] summary::after { content: "−"; }
.profile-disclosure small, .profile-action-row small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 3px; }
.profile-detail-body { padding-bottom: 20px; }
.profile-detail-body label { display: grid; gap: 8px; font-size: 13px; margin: 20px 0 12px; }
.profile-detail-body input { padding: 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; min-width: 0; width: 100%; box-sizing: border-box; background: var(--surface); color: var(--ink); }
.profile-answers { display: grid; gap: 14px; margin: 0; font-size: 13px; }
.profile-answers dt { color: var(--muted); }
.profile-answers dd { margin: 4px 0 0; font-weight: 700; }
.profile-action-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px 0; border-top: 1px solid var(--border); font-size: 14px; }
.profile-logout { padding-bottom: 0; }
.profile-status:empty { display: none; }
.profile-inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
body.auth-route .app-shell, body.auth-route .mobile-nav { display: none !important; }
@media (max-width: 600px) {
  .profile-identity, .profile-card { padding: 20px 18px; }
  .profile-identity { flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
  .profile-identity > div { flex-basis: calc(100% - 64px); }
  .profile-identity .plan-badge { margin-left: 64px; }
  .profile-avatar { width: 52px; height: 52px; flex-basis: 52px; }
  .profile-card .quota-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-pro { align-items: flex-start; flex-direction: column; padding: 16px; gap: 12px; }
  .profile-card .profile-pro .cloud-primary { width: 100%; }
  .profile-action-row { grid-template-columns: 24px minmax(0, 1fr); }
  .profile-action-row > button { grid-column: 2; justify-self: start; }
}
.auth-status {
  font-size: 14px;
  min-height: 24px;
  overflow-wrap: anywhere;
  color: #8b263b;
}
.account-dialog {
  width: min(92vw, 590px);
  max-height: 88dvh;
  overflow: auto;
  border: 1px solid #b8a48d;
  border-radius: 24px;
  background: #fffaf0;
  padding: 0;
  box-shadow: 6px 8px 0 #8e79654d;
}
.account-dialog::backdrop {
  background: #35232a77;
}
.cloud-panel {
  padding: 28px;
  position: relative;
}
.cloud-panel .cloud-close {
  position: absolute;
  right: 14px;
  top: 14px;
  font-size: 24px;
  padding: 0 10px;
}
.cloud-panel h2 {
  padding-right: 26px;
}
.quota-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.quota-grid div {
  padding: 12px;
  border: 1px solid #d9cdb8;
  border-radius: 14px;
  background: #fffdf8;
}
.quota-grid dt {
  font-size: 13px;
}
.quota-grid dd {
  margin: 0;
  font-weight: 800;
}
.plan-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  background: #e2e8cc;
}
.pro-offer {
  padding: 16px;
  background: #ede3f2;
  border-radius: 16px;
  margin: 18px 0;
}
.pro-offer h3 {
  margin: 0;
}
.cloud-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}
.cloud-journal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
}
.cloud-panel .cloud-danger {
  color: #a52238;
  border-color: #a52238;
}
.local-profile {
  cursor: pointer;
  background: #fff7ec;
  border: 1px solid #bba98e;
}
.local-profile:focus-visible {
  outline: 3px solid #a68ac4;
}
@media (max-width: 480px) {
  .auth-card {
    padding: 24px 18px;
  }
  .auth-gate {
    padding: 20px 14px;
  }
  .auth-gate.onboarding-gate {
    padding: 0;
  }
  .cloud-panel {
    padding: 24px 18px;
  }
  .quota-grid {
    gap: 8px;
  }
}
