/* Member account: compact glass navigation and calm, responsive masonry sections. */
#account [hidden] { display: none !important; }
#account .wrap { padding-top: 7.25rem; }
#account .account-tabs-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin: 0 0 1.65rem;
}
#account .account-tabs {
  position: relative;
  display: flex;
  gap: 3px;
  width: max-content;
  max-width: 100%;
  padding: 3px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  border: 1px solid var(--ywe-edge-control);
  border-radius: 999px;
  background: var(--ywe-surface-opal-control);
  box-shadow: 0 8px 24px rgba(48,38,33,.08), inset 0 1px 0 rgba(255,255,255,.94);
  backdrop-filter: blur(18px) saturate(1.14);
  -webkit-backdrop-filter: blur(18px) saturate(1.14);
}
#account .account-tabs::-webkit-scrollbar { display: none; }
#account .account-tab-indicator {
  position: absolute;
  z-index: 0;
  top: 3px;
  left: 0;
  height: 40px;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 999px;
  background: var(--ywe-surface-opal-selected);
  box-shadow: 0 3px 12px rgba(48,38,33,.11), inset 0 1px 0 #fff;
  pointer-events: none;
  transform: translateX(3px);
  transition: transform var(--dur-emphasis, 460ms) var(--ease-spring, cubic-bezier(0.18,1.16,0.3,1)), width var(--dur-emphasis, 460ms) var(--ease-spring, cubic-bezier(0.18,1.16,0.3,1));
}
#account .account-tab {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  padding: .5rem .72rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: center;
  transition: color var(--dur-quick, 200ms) var(--ease-enter, cubic-bezier(0.364,0,0.164,1));
}
#account .account-tab svg { width: 16px; height: 16px; flex: 0 0 16px; stroke-width: 1.9; }
#account .account-tab:hover,
#account .account-tab[aria-selected="true"] { color: var(--ink); }
#account .account-tab[aria-disabled="true"] { opacity: .42; cursor: not-allowed; }
#account .account-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }

#account .account-panel[hidden] { display: none !important; }
#account .account-panel { animation: accountPanelIn var(--dur-quick, 200ms) var(--ease-enter, cubic-bezier(0.364,0,0.164,1)) both; }
@keyframes accountPanelIn { from { opacity: 0; transform: translateY(4px); } }

#account .overview-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
#account .overview-topline .welcome-name { margin-bottom: .12rem; }
/* CSS columns give each card its natural height without artificial empty space. */
#account .overview-masonry,
#account .communications-masonry {
  columns: 2;
  column-gap: 1rem;
}
#account .overview-masonry > .card,
#account .communications-masonry > .card,
#account .communications-stream > .card {
  display: inline-block;
  width: 100%;
  margin: 0 0 1rem;
  break-inside: avoid;
  vertical-align: top;
}
#account .communications-stream { display: contents; }
#account .banner { margin-top: 0; }
#account .account-session-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
#account .account-session-row strong,
#account .account-session-row span { display: block; }
#account .account-session-row strong { font-size: .78rem; }
#account .account-session-row span { margin-top: .08rem; color: var(--muted); font-size: .72rem; overflow-wrap: anywhere; }

#account .journeys-card { padding: 0; overflow: hidden; }
#account .journeys-card > .card-eyebrow { padding: 1.05rem 1.15rem .75rem; margin: 0; }
#account .journey-list { border-top: 1px solid var(--border); }
#account .journey-row { padding: 1rem 1.15rem 1.05rem; }
#account .journey-row + .journey-row { border-top: 1px solid var(--border); }
#account .journey-heading { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: start; gap: .7rem; }
#account .journey-heading h2 { margin: 0; font-size: .92rem; line-height: 1.3; }
#account .journey-heading p,
#account .journey-preview { display: block; margin: .14rem 0 0; color: var(--muted); font-size: .7rem; line-height: 1.45; }
#account .journey-preview { width: fit-content; text-decoration-thickness: 1px; text-underline-offset: 3px; }
#account .journey-preview:hover { color: var(--ink); }
#account .journey-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--ywe-edge-control); border-radius: 10px; background: var(--ywe-surface-opal-control); color: var(--ink); }
#account .journey-icon svg { width: 16px; height: 16px; }
#account .journey-owned { display: inline-block; margin-top: .35rem; padding: .2rem .43rem; border-radius: 999px; background: #edf6ef; color: #367253; font-size: .56rem; font-weight: 700; white-space: nowrap; }
#account .journey-progress { height: 5px; margin: .8rem 0 .7rem 2.55rem; overflow: hidden; border-radius: 999px; background: #e9e4dd; }
#account .journey-progress span { display: block; height: 100%; border-radius: inherit; background: var(--ink); }
#account .journey-action { width: fit-content; margin: .75rem 0 0 2.55rem; }
#account .journey-progress + .journey-action { margin-top: 0; }
#account .btn.journey-continue { align-self: start; min-height: 28px; padding: .28rem .52rem; border-radius: 999px; font-size: .6rem; line-height: 1.15; white-space: nowrap; }
#account .btn.journey-purchase { min-height: 32px; padding: .4rem .68rem; font-size: .65rem; }

#account .details-layout {
  display: grid;
  grid-template-columns: minmax(220px,.62fr) minmax(0,1.5fr);
  gap: 1rem;
  align-items: start;
}
#account .details-photo { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; }
#account .details-photo .profile-avatar { width: 96px; height: 96px; font-size: 22px; }
#account .details-photo .profile-controls { width: 100%; }
#account .profile-action { min-height: 34px; padding: .35rem .68rem; font-size: .7rem; }
#account .settings-card { padding: 0; overflow: hidden; }
#account .settings-card-head { padding: 1.1rem 1.25rem .85rem; border-bottom: 1px solid var(--border); }
#account .settings-card-head h3 { margin: 0; font-size: 1rem; }
#account .settings-card-head p { margin: .2rem 0 0; color: var(--muted); font-size: .76rem; }
#account .settings-grid { display: grid; grid-template-columns: 1fr 1fr; }
#account .settings-grid .field { display: block; padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); }
#account .settings-grid .field:nth-child(odd) { border-right: 1px solid var(--border); }
#account .settings-grid .field-wide { grid-column: 1 / -1; border-right: 0 !important; }
#account .settings-grid .field > span { display: block; margin-bottom: .35rem; font-size: .71rem; font-weight: 700; }
#account .settings-grid input { width: 100%; min-height: 42px; padding: .6rem .75rem; border: 1px solid #dcd5cc; border-radius: 11px; background: #fff; color: var(--ink); font: inherit; }
#account .settings-grid input:focus { outline: 3px solid var(--ywe-tier-focus-ring); border-color: var(--accent-deep); }
#account .settings-grid input[readonly] { background: #f7f3ed; color: var(--muted); cursor: default; }
#account .field-note { display: block; margin-top: .35rem; color: var(--muted); font-size: .68rem; }
#account .settings-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: .7rem; padding: .85rem 1.25rem 1rem; }

#account .passkeys-card { margin-top: 1rem; padding: 0; overflow: hidden; }
#account .passkeys-card .settings-card-head p { max-width: 34rem; }
#account .pk-body { padding: 1.05rem 1.25rem 1.25rem; }
#account .pk-loading { padding: .5rem 0; color: var(--muted); font-size: .78rem; }
#account .pk-warning { margin: 0 0 .9rem; padding: .7rem .9rem; border-radius: 12px; background: var(--accent-soft); color: var(--muted); font-size: .74rem; line-height: 1.5; }
#account .pk-list { border-top: 1px solid var(--border); }
#account .pk-row { border-bottom: 1px solid var(--border); padding: .85rem 0; }
#account .pk-row:last-child { border-bottom: 0; }
#account .pk-row-main { display: flex; align-items: flex-start; justify-content: space-between; gap: .9rem; flex-wrap: wrap; }
#account .pk-copy { min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
#account .pk-label { font-size: .88rem; }
#account .pk-badge { display: inline-flex; align-items: center; gap: .3rem; width: fit-content; padding: .2rem .55rem; border-radius: 999px; background: #f2ece3; color: var(--muted); font-size: .66rem; font-weight: 600; }
#account .pk-badge svg { width: 12px; height: 12px; }
#account .pk-badge-synced { background: #e6f3ec; color: #357457; }
#account .pk-meta { color: var(--muted); font-size: .7rem; }
#account .pk-row-actions { display: flex; align-items: center; gap: .4rem; flex: none; }
#account .pk-row-actions .btn { min-height: 30px; padding: .3rem .6rem; font-size: .68rem; gap: .3rem; }
#account .pk-row-actions .btn svg { width: 13px; height: 13px; }
#account .pk-remove { color: #8c3e31; border-color: #d9b8b0; }
#account .pk-remove:hover { border-color: #8c3e31; }
#account .pk-row-notice { margin: .55rem 0 0; color: var(--muted); font-size: .7rem; }
#account .pk-row-notice.error { color: #9b3434; }
#account .pk-rename-form { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
#account .pk-rename-input { flex: 1 1 180px; min-height: 36px; padding: .4rem .65rem; border: 1px solid #dcd5cc; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: .78rem; }
#account .pk-rename-input:focus { outline: 3px solid var(--ywe-tier-focus-ring); border-color: var(--accent-deep); }
#account .pk-rename-form .btn { min-height: 34px; padding: .34rem .7rem; font-size: .72rem; }
#account .pk-empty { padding: 0 1.25rem 1.25rem; }
#account .pk-empty p { margin: 0 0 .9rem; color: var(--muted); font-size: .78rem; line-height: 1.5; }
#account .pk-empty-actions,
#account .pk-footer { margin-top: .9rem; }
#account .pk-footer { padding-top: .9rem; border-top: 1px solid var(--border); }
#account .pk-add-form { margin-top: .9rem; padding: .9rem; border: 1px dashed var(--border); border-radius: 13px; background: #faf6f0; }
#account .pk-add-label { display: block; margin-bottom: .7rem; }
#account .pk-add-label span { display: block; margin-bottom: .35rem; font-size: .71rem; font-weight: 700; }
#account .pk-add-label input { width: 100%; min-height: 40px; padding: .55rem .7rem; border: 1px solid #dcd5cc; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: .78rem; }
#account .pk-add-label input:focus { outline: 3px solid var(--ywe-tier-focus-ring); border-color: var(--accent-deep); }
#account .pk-add-actions { display: flex; align-items: center; gap: .5rem; }
#account .pk-add-status { margin: .6rem 0 0; min-height: 1em; color: var(--muted); font-size: .7rem; }
#account .pk-add-status.error { color: #9b3434; }

#account .comm-status-card { display: flex !important; align-items: center; justify-content: space-between; gap: .85rem; }
#account .comm-status-copy { min-width: 0; }
#account .comm-status-title { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .96rem; }
#account .comm-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px rgba(90,161,122,.12); }
#account .comm-status-dot.paused { background: #b57d24; box-shadow: 0 0 0 4px rgba(181,125,36,.12); }
#account .comm-status-dot.unsubscribed,
#account .comm-status-dot.not_subscribed { background: #9a9186; box-shadow: 0 0 0 4px rgba(154,145,134,.12); }
#account .comm-status-detail { margin: .2rem 0 0; color: var(--muted); font-size: .76rem; line-height: 1.45; }
#account .comm-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .42rem; }
#account .comm-pause-select { min-height: 34px; padding: .35rem 1.8rem .35rem .68rem; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,.82); color: var(--ink); font: inherit; font-size: .72rem; }
#account .comm-pause-select:focus-visible { outline: 3px solid var(--ywe-tier-focus-ring); outline-offset: 2px; }
#account .comm-group { padding: 0; overflow: hidden; }
#account .comm-group-head { padding: 1rem 1.15rem .8rem; border-bottom: 1px solid var(--border); }
#account .comm-group-head h3 { display: flex; align-items: center; gap: .48rem; margin: 0; font-size: .96rem; }
#account .comm-group-head svg { width: 17px; height: 17px; color: var(--ink); stroke-width: 1.85; }
#account .comm-group-head p { margin: .22rem 0 0; color: var(--muted); font-size: .73rem; }
#account .comm-row { border-top: 1px solid var(--border); }
#account .comm-row:first-child { border-top: 0; }
#account .comm-row-main { min-height: 62px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .7rem; padding: .72rem 1.15rem; }
#account .comm-copy { min-width: 0; }
#account .comm-label strong { display: block; font-size: .85rem; }
#account .comm-meta { display: block; margin-top: .08rem; color: var(--muted); font-size: .67rem; }
#account .comm-info { display: inline-flex; align-items: center; gap: .2rem; min-height: 28px; margin-top: .18rem; padding: 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .67rem; cursor: pointer; }
#account .comm-info:hover { color: var(--ink); }
#account .comm-info svg { width: 13px; height: 13px; transition: transform var(--dur-quick, 200ms); }
#account .comm-info[aria-expanded="true"] svg { transform: rotate(180deg); }
#account .comm-control { display: flex; flex-direction: column; align-items: flex-end; gap: .12rem; }
#account .comm-description { padding: 0 1.15rem .85rem; color: var(--muted); font-size: .74rem; }
#account .comm-description[hidden] { display: none; }
#account .comm-description p { margin: 0; }
#account .comm-description a { color: var(--ink); text-underline-offset: 2px; }
#account .comm-switch { position: relative; display: inline-flex; width: 42px; height: 24px; flex: none; }
#account .comm-switch input { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; min-inline-size: 0; min-block-size: 0; margin: 0; opacity: 0; cursor: pointer; }
#account .comm-switch-track { display: block; width: 100%; height: 100%; border: 1px solid #c9c2b9; border-radius: 999px; background: #d7d2cb; pointer-events: none; transition: background var(--dur-quick, 200ms), border-color var(--dur-quick, 200ms); }
#account .comm-switch-track::after { content: ''; display: block; width: 18px; height: 18px; margin: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(26,23,18,.24); transition: transform var(--dur-quick, 200ms); }
#account .comm-switch input:checked + .comm-switch-track { border-color: var(--ink); background: var(--ink); box-shadow: 0 2px 7px rgba(26,23,18,.15); }
#account .comm-switch input:checked + .comm-switch-track::after { transform: translateX(18px); }
#account .comm-switch input:focus-visible + .comm-switch-track { outline: 3px solid var(--ywe-tier-focus-ring); outline-offset: 2px; }
#account .comm-switch input:disabled + .comm-switch-track { opacity: .58; cursor: wait; }
#account .comm-save { min-height: 1em; display: inline-flex; align-items: center; gap: .18rem; color: var(--muted); font-size: .62rem; text-align: right; }
#account .comm-save svg { width: 11px; height: 11px; }
#account .comm-save.saved { color: #2d7a51; animation: successDing var(--dur-emphasis, 460ms) var(--ease-spring, cubic-bezier(0.18,1.16,0.3,1)); }
#account .comm-save.error { color: #9b3434; }
#account .comm-empty { padding: 1.35rem; text-align: center; }
#account .comm-empty h3 { margin: 0 0 .35rem; }
#account .comm-empty p { margin: 0 auto .8rem; max-width: 35rem; color: var(--muted); font-size: .78rem; }
#account .comm-loading { padding: 2rem; text-align: center; color: var(--muted); }
#account .comm-danger { background: rgba(255,250,250,.82); border-color: #ead8d3; }
#account .comm-danger h3 { margin: 0 0 .2rem; font-size: .9rem; }
#account .comm-danger p { margin: 0; color: var(--muted); font-size: .73rem; }
#account .comm-danger-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
#account .comm-danger .btn { background: transparent; color: #8c3e31; border-color: #d9b8b0; }
#account .comm-danger [data-comm-action="unsubscribe"] { min-height: 42px; padding: .58rem 1rem; font-size: .78rem; }
#account .preference-context { display: inline-block; width: 100%; margin: 0 0 1rem; padding: .75rem .9rem; break-inside: avoid; border-radius: 13px; background: var(--accent-soft); color: var(--muted); font-size: .74rem; }

#account .telegram-card h2 { display: flex; align-items: center; gap: .45rem; margin: 0; font-size: .96rem; }
#account .telegram-card h2 svg { width: 17px; height: 17px; }
#account .telegram-copy { margin: .7rem 0; font-size: .78rem; line-height: 1.5; }
#account .telegram-actions { gap: .45rem; }
#account .telegram-message { margin-top: .5rem; font-size: .7rem; }

#account .billing-masonry { display: grid; gap: 1rem; margin-top: 1rem; align-items: start; }
#account .billing-masonry { grid-template-columns: minmax(0,1fr); }
#account .billing-help h2 { margin: 0 0 .35rem; font-size: .98rem; }
#account .billing-help p { margin: 0 0 .85rem; color: var(--muted); font-size: .77rem; }
#account .action-note { display: inline-block; margin-left: .55rem; color: var(--muted); font-size: .68rem; }

#account .member-code-section { margin-top: 1.1rem; padding-top: 1.05rem; border-top: 1px solid var(--border); }
#account .member-code-section .card-eyebrow { margin-bottom: .6rem; }
#account .member-code-section .code-explain { margin-bottom: 0; }
#account .member-code-section .code-copy { min-height: 34px; }

#account .hero-perks .perk-next-label {
  display: block;
  grid-column: 1 / -1;
  margin: .08rem 0 0;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.35;
  text-transform: uppercase;
  opacity: .72;
}

/* Compact controls. Primary actions use the same quiet glass as the selected tab. */
#account .btn,
#account .profile-action {
  min-height: 34px;
  padding: .38rem .72rem;
  border-radius: 999px;
  font-size: .72rem;
  line-height: 1;
}
#account .btn-rainbow,
#account .btn-primary,
#account .hero .btn-primary {
  border: 1px solid var(--ywe-edge-control);
  background: var(--ywe-surface-opal-selected);
  color: var(--ink);
  text-shadow: none;
  box-shadow: 0 3px 12px rgba(48,38,33,.1), inset 0 1px 0 rgba(255,255,255,.94);
}
#account .btn-rainbow:hover,
#account .btn-primary:hover,
#account .hero .btn-primary:hover { background: var(--ywe-surface-opal-selected); color: var(--ink); filter: brightness(1.015); transform: translateY(-1px); }
#account .btn.is-loading,
#account .profile-action.is-loading { cursor: wait; }
#account .btn.is-success,
#account .profile-action.is-success { border-color: rgba(62,139,94,.3); background: linear-gradient(135deg, #e8f8ee, #ccefd9); color: #236c45; animation: successDing var(--dur-emphasis, 460ms) var(--ease-spring, cubic-bezier(0.18,1.16,0.3,1)); }
#account .button-spinner { width: 13px; height: 13px; border: 2px solid rgba(26,23,18,.18); border-top-color: var(--ink); border-radius: 50%; animation: buttonSpin .65s linear infinite; }
#account .button-check { width: 14px; height: 14px; }
@keyframes buttonSpin { to { transform: rotate(360deg); } }
@keyframes successDing { 45% { transform: scale(1.045); } }

#account .hero { padding: 1.45rem 1.55rem; gap: 1.1rem 1.5rem; }
#account .hero-tier { font-size: 2.25rem; }
#account .hero-price .amt { font-size: 1.5rem; }
#account .hero-perks { gap: .45rem; }
#account .hero-perks li { font-size: .82rem; }
#account .hero-actions { gap: .5rem; }

@media (max-width: 760px) {
  #account .wrap { padding-top: 5.25rem; padding-bottom: calc(9rem + env(safe-area-inset-bottom)); }
  #account .account-tabs { width: 100%; max-width: none; overflow: visible; scroll-snap-type: none; }
  #account .account-tab { flex: 1 1 0; min-width: 0; min-height: 40px; gap: .28rem; padding-inline: .3rem; font-size: .68rem; }
  #account .account-tab span[data-mobile-label] { font-size: 0; }
  #account .account-tab span[data-mobile-label]::after { content: attr(data-mobile-label); font-size: .68rem; }
  #account .overview-masonry,
  #account .communications-masonry { columns: 1; }
  #account .details-layout,
  #account .billing-masonry { grid-template-columns: 1fr; }
  #account .details-photo { flex-direction: row; align-items: center; }
  #account .details-photo .profile-avatar { width: 78px; height: 78px; flex: 0 0 78px; }
  #account .settings-grid { grid-template-columns: 1fr; }
  #account .settings-grid .field { grid-column: 1; border-right: 0 !important; }
  #account .comm-status-card,
  #account .comm-danger-row { align-items: flex-start; flex-direction: column; }
  #account .comm-actions { justify-content: flex-start; }
}
@media (max-width: 480px) {
  #account .overview-topline { align-items: flex-start; flex-direction: column; }
  #account .account-tab svg { width: 15px; height: 15px; }
  #account .account-session-row { align-items: flex-start; }
  #account .comm-row-main { padding-inline: 1rem; }
  #account .comm-description { padding-inline: 1rem; }
  #account .journey-heading { gap: .55rem; }
  #account .btn.journey-continue { padding-inline: .45rem; }
}
@media (prefers-reduced-motion: reduce) {
  #account .account-panel,
  #account .btn.is-success,
  #account .profile-action.is-success,
  #account .comm-save.saved { animation: none; }
  #account .account-tab-indicator,
  #account .comm-info svg,
  #account .comm-switch-track,
  #account .comm-switch-track::after { transition: none; }
}
