.workspace-page {
  --popup-control-border: var(--popup-border-strong);
  --popup-focus: var(--color-forest);
  --workspace-soft-surface: var(--popup-bg-soft);
  --workspace-hover-surface: var(--popup-hover);
  --workspace-close-hover-surface: var(--popup-close-hover-bg, var(--sort-control-bg));
  --workspace-profile-hover-surface: var(--intent-surface-raised);
  --workspace-profile-hover-strong: var(--workspace-hover-surface);
  --workspace-control-bg: var(--intent-surface-page);
  --workspace-control-bg-focus: color-mix(in srgb, var(--intent-surface-raised) 72%, var(--intent-surface-page));
  --workspace-control-bg-readonly: color-mix(in srgb, var(--intent-surface-sunken) 68%, var(--intent-surface-page));
  --workspace-control-border: color-mix(in srgb, var(--intent-text-primary) 18%, var(--intent-surface-line));
  --workspace-focus-ring: color-mix(in srgb, var(--color-forest) 14%, transparent);
  --workspace-field-border-active: var(--color-forest);
  --workspace-edge-gutter: clamp(24px, 2vw, 36px);
  --workspace-settings-nav-width: clamp(132px, 10vw, 158px);
  --workspace-settings-content-width: min(100%, 780px);
  --workspace-settings-gap: clamp(14px, 1.4vw, 26px);
  --workspace-settings-nav-offset: 40px;
  --workspace-settings-nav-nudge: 0px;
  --workspace-settings-title-font: var(--font-display);
  min-height: 100vh;
  margin: 0;
  background: var(--intent-surface-page);
  color: var(--intent-text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.workspace-page *,
.workspace-page *::before,
.workspace-page *::after {
  box-sizing: border-box;
}

.workspace-page a {
  color: inherit;
  text-decoration: none;
}

.workspace-page button,
.workspace-page input,
.workspace-page textarea {
  font: inherit;
}

.workspace-page .site-footer__locale-cancel,
.workspace-page .site-footer__locale-save {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.workspace-page .site-footer__locale-modal-overlay,
.workspace-page .site-footer__locale-modal {
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}

.workspace-shell {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  min-height: 100vh;
}

@media (min-width: 881px) {
  html:has(> body.workspace-dashboard-page) {
    height: 100%;
    overflow: hidden;
  }

  body.workspace-dashboard-page {
    position: fixed;
    inset: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.workspace-dashboard-page .workspace-shell {
    min-height: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  body.workspace-dashboard-page .workspace-sidebar,
  body.workspace-dashboard-page .workspace-main {
    max-height: 100vh;
    max-height: 100dvh;
  }
}

.workspace-sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  overflow: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 18px 12px;
  border-right: 1px solid var(--intent-surface-line);
  background: var(--intent-surface-page);
}

.workspace-sidebar-scrim {
  display: none;
}

.workspace-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 221px;
  margin: 0 auto;
}

.workspace-brand__mark {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.workspace-brand__mark img {
  width: 109px;
  max-width: 100%;
  display: block;
}

.workspace-sidebar__toggle {
  position: relative;
  isolation: isolate;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.workspace-sidebar__toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--workspace-close-hover-surface);
  opacity: 0;
  transform: scale(.94);
  transition:
    opacity var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard);
  z-index: 0;
}

.workspace-sidebar__toggle:hover,
.workspace-sidebar__toggle:focus-visible {
  background: transparent;
  filter: none;
  box-shadow: none;
  outline: none;
}

.workspace-sidebar__toggle:hover::before,
.workspace-sidebar__toggle:focus-visible::before {
  opacity: 1;
  animation: header-auth-close-bounce 0.28s cubic-bezier(0.23, 1.3, 0.32, 1) both;
}

.workspace-sidebar__toggle img {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
}

@media (min-width: 861px) {
  .workspace-shell.is-sidebar-collapsed {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .workspace-shell.is-sidebar-collapsed .workspace-sidebar {
    z-index: 70;
    overflow: visible;
    gap: 8px;
    padding: 10px 8px 12px;
  }

  .workspace-shell.is-sidebar-collapsed .workspace-brand {
    justify-content: center;
    width: auto;
  }

  .workspace-shell.is-sidebar-collapsed .workspace-sidebar__toggle {
    width: 38px;
    height: 38px;
  }

  .workspace-shell.is-sidebar-collapsed .workspace-brand__mark,
  .workspace-shell.is-sidebar-collapsed .workspace-profile-card__copy,
  .workspace-shell.is-sidebar-collapsed .workspace-profile-card__more,
  .workspace-shell.is-sidebar-collapsed .workspace-mode,
  .workspace-shell.is-sidebar-collapsed .workspace-nav__eyebrow,
  .workspace-shell.is-sidebar-collapsed .workspace-service-link__copy,
  .workspace-shell.is-sidebar-collapsed .workspace-nav__item span,
  .workspace-shell.is-sidebar-collapsed .workspace-nav__item strong,
  .workspace-shell.is-sidebar-collapsed .workspace-nav__item small {
    display: none;
  }

  .workspace-shell.is-sidebar-collapsed .workspace-profile-card {
    position: relative;
    display: flex;
    justify-content: center;
    width: auto;
    margin: 0;
    padding: 6px;
    background: transparent;
    overflow: visible;
  }

  .workspace-shell.is-sidebar-collapsed .workspace-avatar {
    width: 32px;
    height: 32px;
  }

  .workspace-shell.is-sidebar-collapsed .workspace-nav {
    width: 100%;
    gap: 4px;
    justify-items: center;
  }

  .workspace-shell.is-sidebar-collapsed .workspace-service-links {
    width: 100%;
    justify-items: center;
  }

  .workspace-shell.is-sidebar-collapsed .workspace-nav__item,
  .workspace-shell.is-sidebar-collapsed .workspace-service-link {
    position: relative;
    grid-template-columns: 1fr;
    justify-items: center;
    width: 32px;
    min-height: 32px;
    height: 32px;
    padding: 7px;
    overflow: visible;
  }

  .workspace-shell.is-sidebar-collapsed .workspace-service-link__copy {
    display: none;
  }

  .workspace-shell.is-sidebar-collapsed .workspace-service-link__icon {
    width: auto;
    height: auto;
    background: transparent;
  }

  .workspace-shell.is-sidebar-collapsed .workspace-nav__item::before,
  .workspace-shell.is-sidebar-collapsed .workspace-nav__item::after,
  .workspace-shell.is-sidebar-collapsed .workspace-profile-card::before,
  .workspace-shell.is-sidebar-collapsed .workspace-profile-card::after,
  .workspace-shell.is-sidebar-collapsed .workspace-service-link::before,
  .workspace-shell.is-sidebar-collapsed .workspace-service-link::after {
    position: absolute;
    top: 50%;
    opacity: 0;
    pointer-events: none;
    transition:
      opacity var(--duration-fast) var(--ease-standard),
      transform var(--duration-fast) var(--ease-standard);
    z-index: 12;
  }

  .workspace-shell.is-sidebar-collapsed .workspace-nav__item::before,
  .workspace-shell.is-sidebar-collapsed .workspace-profile-card::before,
  .workspace-shell.is-sidebar-collapsed .workspace-service-link::before {
    content: "";
    left: calc(100% + 5px);
    width: 8px;
    height: 8px;
    background: var(--color-ink);
    transform: translateY(-50%) rotate(45deg) scale(.85);
  }

  .workspace-shell.is-sidebar-collapsed .workspace-nav__item::after,
  .workspace-shell.is-sidebar-collapsed .workspace-profile-card::after,
  .workspace-shell.is-sidebar-collapsed .workspace-service-link::after {
    content: attr(data-tooltip);
    left: calc(100% + 10px);
    border-radius: var(--radius-pill);
    background: var(--color-ink);
    color: var(--popup-bg);
    padding: 6px 10px;
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    transform: translateY(-50%) translateX(-4px);
  }

  .workspace-shell.is-sidebar-collapsed .workspace-nav__item:hover::before,
  .workspace-shell.is-sidebar-collapsed .workspace-nav__item:hover::after,
  .workspace-shell.is-sidebar-collapsed .workspace-nav__item:focus-visible::before,
  .workspace-shell.is-sidebar-collapsed .workspace-nav__item:focus-visible::after,
  .workspace-shell.is-sidebar-collapsed .workspace-profile-card:hover::before,
  .workspace-shell.is-sidebar-collapsed .workspace-profile-card:hover::after,
  .workspace-shell.is-sidebar-collapsed .workspace-profile-card:focus-visible::before,
  .workspace-shell.is-sidebar-collapsed .workspace-profile-card:focus-visible::after,
  .workspace-shell.is-sidebar-collapsed .workspace-service-link:hover::before,
  .workspace-shell.is-sidebar-collapsed .workspace-service-link:hover::after,
  .workspace-shell.is-sidebar-collapsed .workspace-service-link:focus-visible::before,
  .workspace-shell.is-sidebar-collapsed .workspace-service-link:focus-visible::after {
    opacity: 1;
  }

  .workspace-shell.is-sidebar-collapsed .workspace-nav__item:hover::before,
  .workspace-shell.is-sidebar-collapsed .workspace-nav__item:focus-visible::before,
  .workspace-shell.is-sidebar-collapsed .workspace-profile-card:hover::before,
  .workspace-shell.is-sidebar-collapsed .workspace-profile-card:focus-visible::before,
  .workspace-shell.is-sidebar-collapsed .workspace-service-link:hover::before,
  .workspace-shell.is-sidebar-collapsed .workspace-service-link:focus-visible::before {
    transform: translateY(-50%) rotate(45deg) scale(1);
  }

  .workspace-shell.is-sidebar-collapsed .workspace-nav__item:hover::after,
  .workspace-shell.is-sidebar-collapsed .workspace-nav__item:focus-visible::after,
  .workspace-shell.is-sidebar-collapsed .workspace-profile-card:hover::after,
  .workspace-shell.is-sidebar-collapsed .workspace-profile-card:focus-visible::after,
  .workspace-shell.is-sidebar-collapsed .workspace-service-link:hover::after,
  .workspace-shell.is-sidebar-collapsed .workspace-service-link:focus-visible::after {
    transform: translateY(-50%) translateX(0);
  }
}

.workspace-profile-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  width: 221px;
  min-height: 54px;
  margin: 0 auto;
  padding: 8px 10px;
  border-radius: 14px;
  background: transparent;
  transition: background-color var(--duration-fast) var(--ease-standard);
}

.workspace-profile-card:hover,
.workspace-profile-card:focus-visible,
.workspace-profile-card.is-active {
  background: var(--workspace-hover-surface);
  outline: none;
}

.workspace-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--intent-brand-primary);
  color: var(--intent-brand-on);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
}

.workspace-avatar.has-image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: transparent;
}

.workspace-avatar.jp-profile-avatar-art {
  overflow: hidden;
}

.workspace-profile-card__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workspace-profile-card__copy strong,
.workspace-profile-card__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-profile-card__copy strong {
  font-family: var(--font-display);
  font-size: 13.5px;
  line-height: 1.08;
  font-weight: 600;
}

.workspace-profile-card__copy small {
  color: var(--intent-text-secondary);
  font-weight: 700;
  font-size: 11.5px;
}

.workspace-profile-card__more {
  width: 20px;
  height: 20px;
  justify-self: end;
  object-fit: contain;
  opacity: 1;
}

.workspace-mode {
  display: grid;
  grid-template-columns: minmax(68px, 1.2fr) minmax(46px, .8fr);
  gap: 2px;
  padding: 3px;
  width: 221px;
  margin: 0 auto;
  border-radius: var(--radius-pill);
  background: var(--popup-bg);
}

.workspace-mode__button {
  border: 0;
  border-radius: var(--radius-pill);
  min-height: 30px;
  padding: 4px 6px;
  background: transparent;
  color: var(--intent-text-secondary);
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}

.workspace-mode__button.is-active {
  background: var(--intent-cta-ink);
  color: var(--intent-text-on-brand);
}

.workspace-nav {
  display: grid;
  gap: 2px;
  justify-items: center;
}

.workspace-mode__button[hidden],
.workspace-nav[hidden],
.workspace-nav__item[hidden],
.workspace-page [data-commerce-seller-surface][hidden] {
  display: none !important;
}

.workspace-nav__eyebrow {
  width: 221px;
  margin: 2px auto 0;
  color: var(--intent-text-secondary);
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.workspace-nav__eyebrow:not(:first-child) {
  margin-top: 8px;
}

.workspace-nav__item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 221px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 13px;
  color: var(--intent-text-primary);
  font-size: 12px;
  font-weight: 700;
  transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}

.workspace-nav__item:hover,
.workspace-nav__item:focus-visible,
.workspace-nav__item.is-active {
  background-color: var(--workspace-hover-surface);
  color: var(--intent-text-primary);
  outline: none;
}

.workspace-nav__item.is-active {
  color: var(--intent-text-primary);
}

.workspace-nav__item img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.workspace-service-links {
  display: grid;
  gap: 8px;
  width: 221px;
  margin: 0 auto;
}

/* Prominent Shop + Journal quick links directly under the profile card */
.workspace-service-links--quick {
  gap: 3px;
  margin-top: -5px;
}

.workspace-service-link.workspace-service-link--hero {
  min-height: 54px;
  background: transparent;
}

.workspace-service-link--hero .workspace-service-link__copy strong {
  font-size: 13px;
}

/* Ensure the [hidden] attribute wins over the grid display on gated controls
   (Listings quick-link until a first listing; Personal/Seller switch until a shop exists). */
.workspace-service-link[hidden],
.workspace-mode[hidden] {
  display: none;
}

/* Orders — Rozetka-style expandable order cards, JediPic styling */
.workspace-order-list {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.workspace-order {
  border-radius: 14px;
  background: var(--intent-surface-raised);
  overflow: hidden;
}

.workspace-order--cancelled {
  opacity: 0.82;
}

.workspace-order__summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.workspace-order__summary::-webkit-details-marker {
  display: none;
}

.workspace-order__head {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.workspace-order__title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.workspace-order__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
}

.workspace-order--cancelled .workspace-order__num {
  text-decoration: line-through;
}

.workspace-order__when {
  color: var(--intent-text-secondary);
  font-weight: 700;
  font-size: 11.5px;
}

.workspace-order__state {
  font-weight: 800;
  font-size: 12px;
}

.workspace-order__state--done {
  color: var(--intent-feedback-success);
}

.workspace-order__state--active {
  color: var(--intent-text-primary);
}

.workspace-order__state--cancelled {
  color: var(--intent-text-secondary);
}

.workspace-order__thumbs {
  display: inline-flex;
  gap: 5px;
}

.workspace-order__thumb {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background-color: var(--intent-surface-page);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  flex: 0 0 auto;
}

.workspace-order__thumb--more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  color: var(--intent-text-secondary);
}

.workspace-order__arrow {
  width: 14px;
  height: 14px;
  object-fit: contain;
  transition: transform var(--duration-fast) var(--ease-standard);
}

.workspace-order[open] .workspace-order__arrow {
  transform: rotate(180deg);
}

.workspace-order__body {
  padding: 0 14px 14px;
}

.workspace-order__detail {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 16px;
  padding-top: 12px;
  margin-top: 2px;
  border-top: 1px solid var(--intent-surface-line);
}

.workspace-order__side {
  display: grid;
  gap: 10px;
  align-content: start;
}

.workspace-order__meta {
  display: grid;
  gap: 6px;
  margin: 0;
}

.workspace-order__meta-row {
  display: grid;
  gap: 1px;
}

.workspace-order__meta-row dt {
  font-size: 11px;
  font-weight: 700;
  color: var(--intent-text-secondary);
}

.workspace-order__meta-row dd {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
}

.workspace-order__main {
  display: grid;
  gap: 12px;
  align-content: start;
}

.workspace-order__lines {
  display: grid;
  gap: 10px;
}

.workspace-order__line {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.workspace-order__line .workspace-order__thumb {
  width: 44px;
  height: 44px;
}

.workspace-order__line-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workspace-order__line-copy strong {
  font-size: 12.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-order__line-copy small {
  color: var(--intent-text-secondary);
  font-weight: 700;
  font-size: 11.5px;
}

.workspace-order__breakdown {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--intent-surface-line);
}

.workspace-order__sum-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--intent-text-secondary);
}

.workspace-order__sum-row dt,
.workspace-order__sum-row dd {
  margin: 0;
}

.workspace-order__sum-row.is-total {
  color: var(--intent-text-primary);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
}

.workspace-order__problem {
  justify-self: start;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-weight: 800;
  font-size: 12.5px;
  color: var(--intent-feedback-alert);
}

@media (min-width: 881px) {
  body.workspace-dashboard-page .fixed-header {
    display: none;
  }
}

@media (max-width: 860px) {
  .workspace-order__detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .workspace-order__summary {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 8px;
  }
  .workspace-order__thumbs {
    grid-column: 1 / -1;
  }
}

/* Personal offers in the Notifications feed (distinguished by their pill only) */
.workspace-status-pill.workspace-status-pill--offer {
  background: var(--intent-brand-primary);
  color: var(--intent-brand-on);
}

/* Notifications — calm single-column feed with breathing room */
.workspace-notify-feed {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.workspace-notify-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--intent-surface-raised);
}

.workspace-notify-card__copy {
  display: grid;
  justify-items: start;
  gap: 6px;
  min-width: 0;
}

.workspace-notify-card__copy h3 {
  margin: 0;
  font-family: var(--font-heading, var(--font-display));
  font-size: 15px;
  line-height: 1.25;
}

.workspace-notify-card__copy p {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--intent-text-secondary);
}

.workspace-notify-card__action {
  justify-self: end;
}

.workspace-notify-card__action--stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.workspace-section-subtitle {
  margin: 18px 0 0;
  font-family: var(--font-heading, var(--font-display));
  font-size: 18px;
  line-height: 1.2;
}

@media (max-width: 560px) {
  .workspace-notify-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .workspace-notify-card__action {
    justify-self: start;
  }
  .workspace-notify-card__action--stack {
    justify-content: flex-start;
  }
  .workspace-overview-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
  }
  .workspace-overview-banner__cta {
    width: 100%;
    text-align: center;
  }
  .workspace-launcher {
    padding: 14px 12px 8px;
  }
  .workspace-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .workspace-overview-next__grid {
    grid-template-columns: 1fr;
  }
  .workspace-checkgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Journal — compact story cards */
.workspace-journal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.workspace-journal-head .workspace-button {
  flex: 0 0 auto;
  gap: 6px;
}

.workspace-journal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.workspace-journal-head .workspace-button img {
  width: 15px;
  height: 15px;
}

.workspace-button--dark img {
  filter: brightness(0) invert(1);
  opacity: 0.94;
}

.workspace-story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.workspace-story-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--intent-text-primary) 8%, transparent);
  border-radius: 14px;
  background: var(--intent-surface-raised);
  box-shadow: none;
}

.workspace-story-card__media {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--intent-surface-raised) 86%, var(--color-cream)) 0%,
      color-mix(in srgb, var(--intent-surface-sunken) 72%, var(--color-sand-dark)) 100%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--intent-text-primary) 5%, transparent);
}

.workspace-story-card__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workspace-story-card__media-fallback {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  background: color-mix(in srgb, var(--intent-surface-sunken) 78%, var(--intent-surface-raised));
}

.workspace-story-card__media-empty-asset {
  display: block;
  width: 92px;
  max-width: 54%;
  height: auto;
  max-height: 72px;
  object-fit: contain;
}

.workspace-story-card__media-empty-text {
  color: color-mix(in srgb, var(--intent-text-secondary) 86%, transparent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.workspace-story-card__body {
  display: grid;
  gap: 8px;
  padding: 2px 4px 4px;
}

.workspace-story-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.workspace-story-card__head h3 {
  margin: 0;
  font-family: var(--font-heading, var(--font-display));
  font-size: 15px;
  line-height: 1.25;
}

.workspace-story-card__status {
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--intent-surface-page);
  color: var(--intent-text-secondary);
}

.workspace-story-card__status--published {
  background: color-mix(in srgb, var(--intent-feedback-success) 16%, var(--intent-surface-page));
  color: var(--intent-feedback-success);
}

.workspace-story-card__status--review {
  background: color-mix(in srgb, var(--intent-feedback-warning) 26%, var(--intent-surface-page));
  color: var(--intent-text-primary);
}

.workspace-story-card__preview {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--intent-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.workspace-story-card__meta {
  font-size: 11px;
  font-weight: 700;
  color: var(--intent-text-secondary);
}

.workspace-story-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.workspace-story-card__actions .workspace-button {
  min-height: 36px;
  padding: 0 14px;
  gap: 6px;
}

.workspace-story-card__actions .workspace-button img {
  width: 15px;
  height: 15px;
}

.workspace-story-card__actions .workspace-icon-button {
  position: relative;
  z-index: 0;
  width: 46px;
  height: 46px;
  min-width: 46px;
  background: transparent;
  overflow: visible;
}

.workspace-story-card__actions .workspace-icon-button img {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
}

.workspace-story-card__actions .workspace-story-card__delete img {
  width: 22px;
  height: 22px;
  filter: brightness(0);
  transition: filter var(--duration-fast) var(--ease-standard);
}

.workspace-story-card__actions .workspace-story-card__delete:hover::before,
.workspace-story-card__actions .workspace-story-card__delete:focus-visible::before {
  background: var(--color-alert-red);
}

.workspace-story-card__actions .workspace-story-card__delete:hover img,
.workspace-story-card__actions .workspace-story-card__delete:focus-visible img {
  filter: brightness(0) invert(1);
}

.workspace-story-card__actions .workspace-icon-button::before {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: 0;
  border-radius: inherit;
  background: var(--workspace-close-hover-surface);
  opacity: 0;
  transform: scale(.94);
  pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease-standard);
}

.workspace-story-card__actions .workspace-icon-button:hover,
.workspace-story-card__actions .workspace-icon-button:focus-visible {
  background: transparent;
  animation: none;
  filter: none;
}

.workspace-story-card__actions .workspace-icon-button:hover::before,
.workspace-story-card__actions .workspace-icon-button:focus-visible::before {
  opacity: 1;
  animation: header-auth-close-bounce 0.28s cubic-bezier(0.23, 1.3, 0.32, 1) both;
}

/* Order review — inline star rating */
.workspace-order__review {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--intent-text-secondary);
  font-weight: 700;
}

.workspace-order__stars {
  display: inline-flex;
  gap: 2px;
}

.workspace-order__star {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  color: var(--intent-surface-line);
}

.workspace-order__star.is-on {
  color: var(--intent-feedback-warning);
}

.workspace-order__star[disabled] {
  cursor: default;
}

.workspace-service-link {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 221px;
  min-height: 42px;
  padding: 7px 12px;
  border-radius: 14px;
  color: var(--intent-text-primary);
  transition: background-color var(--duration-fast) var(--ease-standard);
}

.workspace-service-link:hover,
.workspace-service-link:focus-visible,
.workspace-service-link.is-active {
  background: var(--workspace-hover-surface);
  outline: none;
}

.workspace-service-link img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.workspace-service-link__copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.workspace-service-link__copy strong,
.workspace-service-link__copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-service-link__copy strong {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}

.workspace-service-link__copy small {
  color: var(--intent-text-secondary);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.15;
}

.workspace-nav__item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-nav__item strong,
.workspace-nav__item small {
  justify-self: end;
  border-radius: var(--radius-pill);
  background: var(--control-disabled-bg);
  color: var(--auth-disabled-text);
  box-shadow: none;
  padding: 3px 8px;
  font-size: 10.5px;
  line-height: 1.2;
}

.workspace-nav__item.is-active strong,
.workspace-nav__item.is-active small {
  background: var(--control-disabled-bg);
  color: var(--auth-disabled-text);
}

.workspace-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 470px);
  align-items: center;
  gap: 10px;
  min-height: 64px;
  height: 64px;
  padding: 8px var(--workspace-edge-gutter);
  border-bottom: 1px solid var(--intent-surface-line);
  background: var(--intent-surface-page);
}

.workspace-topbar__title {
  display: grid;
  align-content: center;
  gap: 1px;
  min-height: 0;
}

.workspace-kicker {
  margin: 0;
  color: var(--intent-text-secondary);
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.workspace-topbar h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(14px, .95vw, 15px);
  line-height: 1;
  font-weight: 600;
}

.workspace-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 470px;
  min-width: 260px;
  height: 46px;
  box-sizing: border-box;
  justify-self: end;
}

.workspace-page .workspace-search__input {
  width: 100%;
  height: 46px;
  min-width: 0;
  padding: 0 18px 0 58px;
  border: 1.5px solid color-mix(in srgb, var(--color-ink) 16%, transparent);
  border-radius: 999px;
  background: var(--color-cream);
  color: var(--color-ink);
  font: 700 14px/1.2 var(--font-heading);
  outline: 0;
  box-sizing: border-box;
  appearance: none;
  box-shadow: none;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.workspace-page .workspace-search__input::-webkit-search-cancel-button,
.workspace-page .workspace-search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.workspace-page .workspace-search__input::placeholder {
  color: var(--color-ink-muted);
  opacity: 1;
}

.workspace-page .workspace-search__input:focus,
.workspace-page .workspace-search__input:focus-visible {
  border-color: var(--popup-focus, var(--color-forest));
  outline: none !important;
  box-shadow: none;
}

.workspace-page .workspace-search__button {
  position: absolute;
  top: 4px;
  left: 4px;
  bottom: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--color-forest);
  color: var(--color-cream);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.16s ease;
}

.workspace-search__button-icon {
  width: 17px;
  height: 17px;
  display: block;
  object-fit: contain;
}

.workspace-search__button:hover,
.workspace-search__button:focus-visible {
  background: color-mix(in srgb, var(--color-forest) 90%, var(--color-ink));
  box-shadow: none;
  transform: none;
}

.workspace-search__button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-forest) 24%, transparent);
  outline-offset: 3px;
}

/* Global workspace search — results dropdown */
.workspace-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: min(440px, 70vh);
  overflow-y: auto;
  padding: 8px;
  border-radius: 16px;
  background: var(--intent-surface-raised);
  box-shadow: var(--popup-shadow);
}

.workspace-search-results__empty {
  padding: 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--intent-text-secondary);
  text-align: center;
}

.workspace-search-results__group {
  padding: 4px 0;
}

.workspace-search-results__group + .workspace-search-results__group {
  border-top: 1px solid var(--intent-surface-line);
}

.workspace-search-results__label {
  margin: 4px 8px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--intent-text-secondary);
}

.workspace-search-results__item {
  display: grid;
  gap: 1px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.workspace-search-results__item:hover,
.workspace-search-results__item:focus-visible,
.workspace-search-results__item.is-active {
  background: var(--intent-surface-page);
  outline: none;
}

.workspace-search-results__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--intent-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-search-results__sub {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--intent-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-view {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px var(--workspace-edge-gutter) 88px;
  overflow: auto;
}

.workspace-view--messages,
.workspace-view--thread {
  align-content: stretch;
  grid-auto-rows: minmax(0, 1fr);
  padding-top: 0;
  padding-bottom: 0;
}

.workspace-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 12px 18px 13px;
  border-top: 1px solid var(--intent-surface-line);
  border-radius: 20px 20px 0 0;
  background: var(--intent-surface-page);
  color: var(--intent-text-secondary);
  font-size: 11.5px;
  font-weight: 700;
}

.workspace-footer__locale,
.workspace-footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.workspace-footer nav {
  justify-content: flex-end;
}

.workspace-footer__locale {
  position: relative;
}

.workspace-footer__locale .site-footer__locale-trigger {
  min-height: 36px;
  padding: 0 12px;
  gap: 10px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--intent-text-primary);
  font-size: 12px;
}

.workspace-footer__locale .site-footer__locale-trigger:hover,
.workspace-footer__locale .site-footer__locale-trigger:focus-visible,
.workspace-footer__locale .site-footer__locale-trigger[aria-expanded="true"] {
  background-color: var(--workspace-hover-surface);
}

.workspace-footer__locale .site-footer__locale-icon,
.workspace-footer__locale .site-footer__locale-pill {
  color: inherit;
}

.workspace-footer__locale .site-footer__locale-divider {
  color: var(--intent-text-secondary);
}

.workspace-footer a {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0;
  border-radius: var(--radius-pill);
  color: var(--intent-text-secondary);
  transition: color var(--duration-fast) var(--ease-standard);
}

.workspace-footer a:hover,
.workspace-footer a:focus-visible {
  color: var(--intent-text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.workspace-footer a:focus-visible {
  outline: none;
}

.workspace-footer__copyright {
  color: var(--intent-text-secondary);
}

.workspace-panel,
.workspace-card,
.workspace-thread {
  border-radius: 18px;
  background: var(--intent-surface-raised);
}

.workspace-panel {
  padding: 10px;
}

.workspace-grid {
  display: grid;
  gap: 8px;
}

/* Overview — finish-profile nudge banner */
.workspace-overview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: var(--intent-surface-raised);
  text-decoration: none;
  color: var(--intent-text-primary);
}

.workspace-overview-banner__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workspace-overview-banner__copy strong {
  font-family: var(--font-heading, var(--font-display));
  font-size: 14px;
}

.workspace-overview-banner__copy small {
  font-size: 12px;
  font-weight: 700;
  color: var(--intent-text-secondary);
}

.workspace-overview-banner__cta {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--intent-cta-ink);
  color: var(--intent-text-on-brand);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
}

/* Overview — merged stat + navigation tiles */
.workspace-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.workspace-tile {
  display: grid;
  justify-items: start;
  gap: 3px;
  padding: 15px 16px 14px;
  border-radius: 16px;
  background: var(--intent-surface-raised);
  text-decoration: none;
  color: var(--intent-text-primary);
  transition: transform var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}

.workspace-tile:hover,
.workspace-tile:focus-visible {
  box-shadow: var(--homepage-card-hover-shadow, var(--shadow-card-hover));
  outline: none;
}

.workspace-tile__icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border-radius: var(--radius-pill);
  background: var(--intent-surface-page);
}

.workspace-tile__icon img {
  width: 18px;
  height: 18px;
}

.workspace-tile__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.05;
}

.workspace-tile__label {
  font-family: var(--font-heading, var(--font-display));
  font-weight: 600;
  font-size: 14px;
}

.workspace-tile__hint {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--intent-text-secondary);
}

.workspace-overview-next {
  display: grid;
  gap: 12px;
}

.workspace-overview-next__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.workspace-overview-next__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.workspace-overview-next__card {
  display: grid;
  align-content: space-between;
  gap: 14px;
  min-height: 158px;
  padding: 16px;
  border-radius: 16px;
  background: var(--intent-surface-raised);
  color: var(--intent-text-primary);
  text-decoration: none;
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.workspace-overview-next__card:hover,
.workspace-overview-next__card:focus-visible {
  background: var(--workspace-hover-surface);
  box-shadow: var(--homepage-card-hover-shadow, var(--shadow-card-hover));
  outline: none;
}

.workspace-overview-next__card-top {
  display: grid;
  gap: 8px;
}

.workspace-overview-next__icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--intent-surface-page);
}

.workspace-overview-next__icon img {
  width: 18px;
  height: 18px;
}

.workspace-overview-next__card strong {
  font-family: var(--font-heading, var(--font-display));
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
}

.workspace-overview-next__card small {
  color: var(--intent-text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
}

.workspace-overview-next__meta {
  color: var(--intent-brand-primary-strong);
  font-size: 11.5px;
  font-weight: 900;
}

/* Accordion sections (Profile and other grouped account surfaces) */
.workspace-stack {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.workspace-acc-form {
  display: grid;
  gap: 14px;
}

.workspace-acc {
  border-radius: 20px;
  background: transparent;
  box-shadow: 0 1px 0 var(--intent-surface-line);
  overflow: hidden;
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.workspace-acc:not([open]) {
  border-radius: var(--radius-pill);
}

.workspace-acc:not([open]):hover {
  box-shadow: none;
}

.workspace-acc[open]:hover {
  background: var(--workspace-profile-hover-surface);
  box-shadow: none;
}

.workspace-acc__head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  border-radius: inherit;
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard);
}

.workspace-acc[open] > .workspace-acc__head {
  border-radius: var(--radius-pill);
}

.workspace-acc__head:hover {
  background: var(--workspace-profile-hover-surface);
}

.workspace-acc[open]:hover > .workspace-acc__head {
  background: transparent;
}

.workspace-acc[open]:hover .workspace-input:not(:focus-within) > span:not(.jp-date-field) {
  background: var(--workspace-profile-hover-surface);
}

.workspace-acc__head:focus-visible {
  outline: 2px solid var(--workspace-field-border-active);
  outline-offset: -2px;
}

.workspace-acc__head::-webkit-details-marker {
  display: none;
}

.workspace-acc__title {
  font-family: var(--font-heading, var(--font-display));
  font-weight: 600;
  font-size: 17px;
  color: var(--intent-text-primary);
}

.workspace-acc__meta {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--intent-text-secondary);
}

.workspace-acc__chev {
  margin-left: auto;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  display: block;
  transform: rotate(0deg);
  transform-origin: center;
  transition: transform 0.42s cubic-bezier(0.18, 1, 0.2, 1);
}

.workspace-acc[open] > .workspace-acc__head .workspace-acc__chev {
  transform: rotate(180deg);
}

.workspace-acc__body {
  display: grid;
  gap: 18px;
  padding: 0 22px 22px;
}

.workspace-acc-form .workspace-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.workspace-account-hero__id {
  display: grid;
  gap: 2px;
}

.workspace-account-hero__id strong {
  font-family: var(--font-heading, var(--font-display));
  font-size: 15px;
  font-weight: 600;
}

.workspace-account-hero__id small {
  font-size: 12px;
  font-weight: 600;
  color: var(--intent-text-secondary);
}

/* Settings/account groups — quiet flat sections */
.workspace-group {
  padding: 4px 0 18px;
  border-radius: 0;
  background: transparent;
}

.workspace-group__title {
  margin: 0 0 14px;
  font-family: var(--font-heading, var(--font-display));
  font-weight: 600;
  font-size: 16px;
  color: var(--intent-text-primary);
}

.workspace-group__switches {
  display: grid;
  gap: 10px;
}

.workspace-account-board {
  display: grid;
  gap: 10px;
  padding: 2px 0 16px;
  border-bottom: 1px solid var(--intent-surface-line);
}

.workspace-account-board__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 18px;
}

.workspace-account-board__head .workspace-section-title,
.workspace-account-board__head .workspace-section-copy {
  margin-left: 0;
}

.workspace-account-board__score {
  display: grid;
  justify-items: stretch;
  gap: 6px;
  min-width: 142px;
  padding-top: 3px;
}

.workspace-account-board__score strong {
  display: block;
  color: var(--intent-text-primary);
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
  text-align: right;
}

.workspace-account-board__score small {
  display: block;
  color: var(--intent-text-secondary);
  font-size: 10.5px;
  font-weight: 850;
  text-align: right;
  text-transform: uppercase;
}

.workspace-account-board__score i {
  --workspace-account-score: 0;
  display: block;
  height: 6px;
  border-radius: var(--radius-pill);
  background:
    linear-gradient(
      90deg,
      var(--intent-brand-primary) calc((var(--workspace-account-score) / 3) * 100%),
      var(--workspace-soft-surface) 0
    );
}

.workspace-account-board__list {
  display: grid;
  gap: 0;
}

.workspace-account-board__row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 0;
  border-top: 1px solid var(--intent-surface-line);
}

.workspace-account-board__row:first-child {
  border-top: 0;
}

.workspace-account-board__row--good .workspace-account-board__status {
  color: var(--intent-brand-primary-strong);
}

.workspace-account-board__row--warn .workspace-account-board__status {
  color: var(--intent-feedback-alert);
}

.workspace-account-board__row--muted {
  opacity: 0.82;
}

.workspace-account-board__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: transparent;
}

.workspace-account-board__icon img {
  width: 19px;
  height: 19px;
  display: block;
}

.workspace-account-board__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.workspace-account-board__title {
  color: var(--intent-text-secondary);
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.workspace-account-board__status {
  color: var(--intent-text-primary);
  font-size: 13.5px;
  font-weight: 850;
  line-height: 1.2;
}

.workspace-account-board__copy small {
  color: var(--intent-text-secondary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.workspace-account-board__action {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.workspace-account-board__action .workspace-button {
  min-width: 0;
  min-height: 34px;
  padding: 0 12px;
  font-size: 11.5px;
}

.workspace-settings-shell {
  display: grid;
  grid-template-columns: minmax(132px, var(--workspace-settings-nav-width)) minmax(0, var(--workspace-settings-content-width));
  gap: var(--workspace-settings-gap);
  align-items: start;
  justify-content: start;
  max-width: calc(var(--workspace-settings-nav-width) + var(--workspace-settings-gap) + 780px);
  width: 100%;
  margin: 0 0 0 calc(var(--workspace-settings-nav-offset) - var(--workspace-edge-gutter));
}

.workspace-settings-nav {
  position: sticky;
  top: 8px;
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  padding-top: 0;
  transform: translateX(var(--workspace-settings-nav-nudge));
}

.workspace-settings-nav__item {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 7px 0 10px;
  color: var(--intent-text-primary);
  font-family: var(--font-heading);
  font-size: 11.8px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

.workspace-settings-nav__item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: transparent;
  transition: background-color var(--duration-fast) var(--ease-standard);
}

.workspace-settings-nav__item:hover,
.workspace-settings-nav__item:focus-visible {
  color: var(--intent-brand-primary-strong);
}

.workspace-settings-nav__item.is-active::after {
  background: var(--intent-cta-ink);
}

.workspace-settings-main {
  display: grid;
  gap: 30px;
  min-width: 0;
  width: var(--workspace-settings-content-width);
  max-width: 100%;
}

.workspace-settings-hero {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.workspace-settings-hero h2 {
  margin: 0;
  color: var(--intent-text-primary);
  /* Keep settings page titles on the JediPic display face; size/weight are tuned separately. */
  font-family: var(--workspace-settings-title-font);
  font-size: clamp(23px, 1.55vw, 29px);
  font-weight: 700;
  line-height: 1.08;
}

.workspace-settings-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--intent-text-primary);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.32;
}

.workspace-settings-form {
  display: grid;
  gap: 34px;
  min-width: 0;
  width: 100%;
}

.workspace-settings-section {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 780px;
}

.workspace-settings-section h3 {
  margin: 0;
  color: var(--intent-text-primary);
  font-family: var(--workspace-settings-title-font);
  font-size: 18.5px;
  font-weight: 700;
  line-height: 1.2;
}

.workspace-settings-section h4 {
  margin: 0 0 10px;
  color: var(--intent-text-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.workspace-settings-fields {
  display: grid;
  gap: 19px;
  width: min(100%, 704px);
  max-width: 100%;
}

.workspace-settings-fields .workspace-input--wide,
.workspace-settings-fields .workspace-form__actions {
  grid-column: auto;
}

.workspace-settings-photo-row,
.workspace-settings-inline-actions,
.workspace-settings-heading-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.workspace-settings-heading-row {
  justify-content: space-between;
  max-width: 760px;
}

.workspace-settings-help {
  max-width: 680px;
  margin: -6px 0 0;
  color: var(--intent-text-secondary);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.workspace-settings-subsection {
  display: grid;
  gap: 8px;
}

.workspace-settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  min-height: 66px;
  max-width: 780px;
  padding: 9px 0;
}

.workspace-settings-row + .workspace-settings-row,
.workspace-settings-check + .workspace-settings-check,
.workspace-settings-radio + .workspace-settings-radio {
  margin-top: 4px;
}

.workspace-settings-row__copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.workspace-settings-row__copy strong,
.workspace-settings-check strong,
.workspace-settings-radio strong {
  color: var(--intent-text-primary);
  font-family: var(--font-heading);
  font-size: 14.5px;
  font-weight: 740;
  line-height: 1.25;
}

.workspace-settings-row__copy small,
.workspace-settings-check small,
.workspace-settings-radio small {
  display: block;
  max-width: 600px;
  color: var(--intent-text-secondary);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 520;
  line-height: 1.35;
}

.workspace-settings-row__action {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.workspace-settings-row__action .workspace-input--compact {
  width: min(220px, 100%);
  padding-top: 8px;
}

.workspace-settings-row__action .workspace-input--compact select {
  height: 46px;
  line-height: 46px;
}

.workspace-settings-row.is-muted {
  opacity: 0.72;
}

.workspace-settings-row.is-danger .workspace-settings-row__copy strong {
  color: var(--intent-feedback-alert);
}

.workspace-settings-row--toggle {
  cursor: pointer;
}

.workspace-switch--inline {
  grid-column: auto;
  display: inline-flex;
  align-items: center;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.workspace-switch--inline > span:not(.workspace-switch__control) {
  display: none;
}

.workspace-settings-check,
.workspace-settings-radio {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  max-width: 760px;
  min-height: 48px;
  cursor: pointer;
}

.workspace-settings-check input,
.workspace-settings-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.workspace-settings-check__box,
.workspace-settings-radio__mark {
  position: relative;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 8px;
  background: var(--intent-surface-page);
  box-shadow: inset 0 0 0 1.5px var(--control-border-resting, var(--popup-control-border));
}

.workspace-settings-radio__mark {
  border-radius: var(--radius-pill);
}

.workspace-settings-check input:checked + .workspace-settings-check__box,
.workspace-settings-radio input:checked + .workspace-settings-radio__mark {
  background: var(--intent-brand-primary);
  box-shadow: inset 0 0 0 1.5px var(--intent-brand-primary);
}

.workspace-settings-check input:checked + .workspace-settings-check__box::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 6px;
  height: 11px;
  border-right: 2px solid var(--intent-brand-on);
  border-bottom: 2px solid var(--intent-brand-on);
  transform: rotate(45deg);
}

.workspace-settings-radio input:checked + .workspace-settings-radio__mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: var(--radius-pill);
  background: var(--intent-brand-on);
}

.workspace-settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  max-width: 760px;
  margin-top: -8px;
}

.workspace-settings-tabs span {
  position: relative;
  padding-bottom: 7px;
  color: var(--intent-text-primary);
  font-size: 15px;
  font-weight: 850;
}

.workspace-settings-tabs span.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--intent-cta-ink);
}

.workspace-recommendation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 20px;
  max-width: 860px;
}

.workspace-recommendation-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--intent-surface-page);
  color: var(--intent-text-primary);
  text-align: left;
  border: 0 solid transparent;
  box-shadow: none;
  transition:
    opacity var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.workspace-recommendation-card__link,
.workspace-recommendation-card__body a {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.workspace-recommendation-tile__media {
  position: relative;
  display: grid;
  align-items: end;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  background:
    linear-gradient(145deg,
      color-mix(in srgb, var(--intent-surface-page) 88%, var(--intent-brand-primary)) 0%,
      var(--intent-surface-sunken) 52%,
      color-mix(in srgb, var(--intent-surface-line) 58%, var(--intent-surface-page)) 100%);
  background-position: center;
  background-size: cover;
  box-shadow:
    inset 0 0 0 1px var(--intent-surface-line);
}

.workspace-recommendation-tile__media.has-image {
  background-color: var(--intent-surface-sunken);
}

.workspace-recommendation-tile__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to top, color-mix(in srgb, var(--intent-text-primary) 18%, transparent), transparent);
  pointer-events: none;
}

.workspace-recommendation-tile__media-label {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: calc(100% - 20px);
  margin: 10px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--intent-surface-page) 84%, transparent);
  color: var(--intent-brand-primary-strong);
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.workspace-recommendation-card__body {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  padding: 0 2px 2px;
}

.workspace-recommendation-card strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--intent-text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-recommendation-card__signal {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--intent-cta-ink);
  color: var(--intent-surface-page);
  font: inherit;
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard);
}

.workspace-recommendation-card__signal-icon {
  position: relative;
  display: inline-flex;
  width: 14px;
  height: 14px;
  align-items: center;
  justify-content: center;
  background: var(--intent-surface-page);
  transition: transform var(--duration-fast) var(--ease-standard);
  -webkit-mask: url("/assets/header-icons/check-toggle.svg") center / contain no-repeat;
  mask: url("/assets/header-icons/check-toggle.svg") center / contain no-repeat;
}

.workspace-recommendation-card__signal:hover {
  transform: scale(1.1);
}

.workspace-recommendation-card__signal.is-off {
  background: var(--color-ink);
}

.workspace-recommendation-card__signal.is-off .workspace-recommendation-card__signal-icon {
  -webkit-mask: url("/assets/header-icons/close.svg") center / contain no-repeat;
  mask: url("/assets/header-icons/close.svg") center / contain no-repeat;
}

.workspace-recommendation-card:hover {
  box-shadow:
    var(--homepage-card-hover-shadow, var(--shadow-card-hover));
}

.workspace-recommendation-card__link:focus-visible,
.workspace-recommendation-card__body a:focus-visible {
  outline: none;
}

.workspace-recommendation-card__link:focus-visible .workspace-recommendation-tile__media,
.workspace-recommendation-card__body a:focus-visible strong,
.workspace-recommendation-card__signal:focus-visible {
  box-shadow:
    inset 0 0 0 1px var(--intent-surface-line);
}

.workspace-recommendation-card__signal:focus-visible {
  box-shadow: none;
  outline: 2px solid var(--workspace-focus-ring);
  outline-offset: 2px;
}

.workspace-recommendation-card.is-muted {
  opacity: 0.62;
}

.workspace-recommendation-source-list {
  display: grid;
  gap: 4px;
  max-width: 760px;
}

.workspace-recommendation-empty {
  display: grid;
  gap: 12px;
  max-width: 680px;
  padding: 22px;
  border-radius: 16px;
  background: var(--intent-surface-page);
  box-shadow: inset 0 0 0 1px var(--intent-surface-line);
}

.workspace-recommendation-empty strong {
  color: var(--intent-text-primary);
  font-size: 16px;
  font-weight: 850;
}

.workspace-recommendation-empty small {
  max-width: 560px;
  color: var(--intent-text-secondary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.workspace-recommendation-empty .workspace-button {
  width: fit-content;
}

.workspace-settings-savebar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 0 0;
  background: var(--intent-surface-page);
}

/* Personalization checkboxes (interests, pets, household) */
.workspace-acc__note {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--intent-text-secondary);
}

.workspace-checkgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}

.workspace-check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--intent-text-primary);
}

.workspace-check--tile {
  min-height: 52px;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  background: var(--intent-surface-page);
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.workspace-check--tile:hover,
.workspace-check--tile:focus-within {
  background: var(--workspace-profile-hover-strong);
}

.workspace-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.workspace-check__box {
  position: relative;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: var(--intent-surface-page);
  box-shadow: inset 0 0 0 1.5px var(--intent-surface-line);
  transition: background var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}

.workspace-check--tile .workspace-check__box {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--intent-surface-page);
  box-shadow: inset 0 0 0 1.5px var(--control-border-resting, var(--popup-control-border));
}

.workspace-check input:checked + .workspace-check__box {
  background: var(--intent-brand-primary);
  box-shadow: inset 0 0 0 1.5px var(--intent-brand-primary);
}

.workspace-check:not(.workspace-check--tile) input:checked + .workspace-check__box::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border-right: 2px solid var(--intent-brand-on);
  border-bottom: 2px solid var(--intent-brand-on);
  transform: rotate(45deg);
}

.workspace-check--tile input:checked + .workspace-check__box::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: var(--radius-pill);
  background: var(--intent-brand-on);
}

.workspace-check--tile input:checked ~ .workspace-check__label {
  color: var(--intent-brand-primary-strong);
}

.workspace-check__label {
  min-width: 0;
  line-height: 1.25;
}

.workspace-check input:focus-visible + .workspace-check__box {
  box-shadow: inset 0 0 0 1.5px var(--intent-brand-primary), 0 0 0 3px var(--workspace-focus-ring);
}

@media (max-width: 560px) {
  .workspace-checkgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .workspace-check--tile {
    min-height: 56px;
    padding: 10px;
  }
}

.workspace-check-list {
  display: grid;
  gap: 13px;
}

.workspace-check--row {
  align-items: flex-start;
}

.workspace-check--row .workspace-check__box {
  margin-top: 1px;
}

.workspace-check__copy {
  display: grid;
  gap: 2px;
}

.workspace-check__copy strong {
  font-size: 13.5px;
  font-weight: 700;
}

.workspace-check__copy small {
  font-size: 12px;
  font-weight: 600;
  color: var(--intent-text-secondary);
}

.workspace-check.is-locked {
  cursor: not-allowed;
  opacity: 0.55;
}

.workspace-locked-note {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--intent-text-secondary);
}

/* Confirmation dialog (destructive actions) */
.workspace-confirm {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: color-mix(in srgb, var(--color-ink) 38%, transparent);
}

.workspace-confirm__panel {
  width: min(390px, calc(100vw - 32px));
  padding: 20px 18px 18px;
  border-radius: 16px;
  background: var(--intent-surface-raised);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--color-ink) 14%, transparent);
}

.workspace-confirm__title {
  margin: 0 0 11px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.06;
  color: var(--intent-text-primary);
}

.workspace-confirm__message {
  max-width: 334px;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.34;
  color: var(--intent-text-secondary);
}

.workspace-confirm__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  margin-top: 22px;
}

.workspace-confirm__actions--single {
  justify-content: flex-end;
}

.workspace-confirm--info .workspace-confirm__panel,
.workspace-confirm--form .workspace-confirm__panel {
  width: min(408px, calc(100vw - 32px));
}

.workspace-confirm--info .workspace-confirm__message,
.workspace-confirm--form .workspace-confirm__message {
  max-width: 352px;
}

.workspace-confirm__form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.workspace-confirm__field {
  display: grid;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  color: var(--intent-text-secondary);
  text-transform: uppercase;
}

.workspace-confirm__field input {
  width: 100%;
  min-height: 46px;
  border: 1.5px solid var(--workspace-control-border);
  border-radius: 16px;
  background: var(--workspace-control-bg);
  color: var(--intent-text-primary);
  font: 700 16px/1.2 var(--font-body);
  padding: 0 14px;
  box-sizing: border-box;
  outline: none;
}

.workspace-confirm__field input:focus {
  border-color: var(--workspace-focus-border);
  box-shadow: 0 0 0 4px var(--workspace-focus-ring);
}

.workspace-confirm__status {
  min-height: 18px;
  margin: 0;
  color: var(--intent-feedback-alert);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
}

.workspace-confirm--info .workspace-confirm__status {
  color: var(--intent-text-secondary);
}

.workspace-confirm__inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-top: 6px;
  color: var(--intent-brand-primary);
  font-weight: 850;
}

.workspace-page .workspace-confirm .workspace-button {
  --workspace-button-hover-scale: 1.035;
  position: relative;
  z-index: 0;
  min-width: 104px;
  min-height: 41px;
  height: 41px;
  padding: 0 17px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  color: var(--intent-text-primary);
  isolation: isolate;
}

.workspace-page .workspace-confirm [data-confirm-cancel] {
  min-width: 118px;
}

.workspace-page .workspace-confirm .workspace-button::before {
  inset: 0;
  background: transparent;
  box-shadow: none;
  transition:
    transform var(--duration-fast) var(--ease-standard),
    background var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.workspace-page .workspace-confirm .workspace-button:hover::before,
.workspace-page .workspace-confirm .workspace-button:focus-visible::before {
  transform: scale(var(--workspace-button-hover-scale));
}

.workspace-page .workspace-confirm [data-confirm-cancel]::before {
  background: transparent;
}

.workspace-page .workspace-confirm [data-confirm-cancel]:hover::before,
.workspace-page .workspace-confirm [data-confirm-cancel]:focus-visible::before {
  background: var(--intent-surface-raised);
  box-shadow: var(--homepage-card-hover-shadow, var(--shadow-card-hover));
}

.workspace-page .workspace-confirm .workspace-button--danger {
  color: var(--intent-text-on-brand);
  -webkit-text-fill-color: var(--intent-text-on-brand);
}

.workspace-page .workspace-confirm .workspace-button--dark {
  color: var(--intent-text-on-brand);
  -webkit-text-fill-color: var(--intent-text-on-brand);
}

.workspace-page .workspace-confirm .workspace-button--danger::before {
  background: var(--intent-cta-ink);
  box-shadow: none;
}

.workspace-page .workspace-confirm .workspace-button--dark::before {
  background: var(--intent-cta-ink);
  box-shadow: none;
}

.workspace-page .workspace-confirm .workspace-button--danger:hover::before,
.workspace-page .workspace-confirm .workspace-button--danger:focus-visible::before {
  background: var(--intent-cta-ink);
  box-shadow: none;
}

.workspace-page .workspace-confirm .workspace-button--dark:hover::before,
.workspace-page .workspace-confirm .workspace-button--dark:focus-visible::before {
  background: var(--intent-cta-ink);
  box-shadow: none;
}

.workspace-confirm--signout {
  z-index: var(--z-modal-front, 13000);
  padding: 72px 20px;
  background: var(--popup-overlay);
  backdrop-filter: blur(6px);
}

.workspace-confirm--signout .workspace-confirm__panel {
  position: relative;
  overflow: visible;
  width: min(486px, calc(100vw - 112px));
  padding: 30px 34px 32px;
  border: 1px solid var(--popup-border);
  border-radius: 28px;
  background: var(--popup-bg);
  box-shadow: var(--popup-shadow);
}

.workspace-confirm--signout .workspace-confirm__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--color-ink);
  font-size: var(--popup-title-size, 25px);
  font-weight: var(--popup-title-weight, 600);
  line-height: var(--popup-title-line-height, 1.16);
}

.workspace-confirm--signout .workspace-confirm__title-icon {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  display: block;
  object-fit: contain;
  filter: none;
}

.workspace-confirm--signout .workspace-confirm__message {
  max-width: 390px;
  margin-top: 12px;
  color: var(--color-ink-soft);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.48;
}

.workspace-confirm--signout .workspace-confirm__actions {
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
}

.workspace-page .workspace-confirm--signout .workspace-button {
  min-height: 48px;
  height: 48px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 800;
}

.workspace-page .workspace-confirm--signout [data-confirm-cancel] {
  --workspace-button-hover-scale: 1;
  min-width: 152px;
}

.workspace-page .workspace-confirm--signout [data-confirm-cancel]:hover::before,
.workspace-page .workspace-confirm--signout [data-confirm-cancel]:focus-visible::before {
  transform: scale(1);
}

.workspace-page .workspace-confirm--signout .workspace-button--dark {
  --workspace-button-hover-scale: 1.045;
  min-width: 118px;
}

.workspace-confirm--signout .workspace-confirm__close {
  position: absolute;
  top: 0;
  left: calc(100% + var(--popup-close-offset, 10px));
  right: auto;
  z-index: 4;
  width: var(--popup-close-width, 78px);
  height: var(--popup-close-height, 55px);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--popup-bg);
  box-shadow: var(--popup-shadow-soft);
  cursor: pointer;
  transition: background-color 0.24s ease, filter 0.24s ease;
  will-change: transform;
}

.workspace-confirm--signout .workspace-confirm__close .header-auth-close-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--popup-close-icon-size, 17px);
  height: var(--popup-close-icon-size, 17px);
  max-width: none;
  display: block;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.workspace-confirm--signout .workspace-confirm__close:hover,
.workspace-confirm--signout .workspace-confirm__close:focus-visible {
  background: var(--popup-close-hover-bg, var(--sort-control-bg));
  animation: header-auth-close-bounce 0.28s cubic-bezier(0.23, 1.3, 0.32, 1) both;
  filter: var(--popup-close-hover-filter);
}

.workspace-confirm--signout .workspace-confirm__close:focus-visible {
  outline: 2px solid var(--popup-focus);
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .workspace-confirm__panel {
    padding: 20px 18px 18px;
    border-radius: 16px;
  }

  .workspace-confirm__actions {
    justify-content: space-between;
    gap: 0;
  }

  .workspace-page .workspace-confirm .workspace-button {
    flex: 0 0 auto;
    min-width: 104px;
    min-height: 41px;
    height: 41px;
    padding: 0 17px;
    font-size: 14px;
  }

  .workspace-page .workspace-confirm [data-confirm-cancel] {
    min-width: 118px;
  }
}

@media (max-width: 680px) {
  .workspace-confirm--signout {
    align-items: center;
    padding: calc(72px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .workspace-confirm--signout .workspace-confirm__panel {
    width: min(420px, 100%);
    padding: 28px 22px 24px;
    border-radius: 24px;
  }

  .workspace-confirm--signout .workspace-confirm__close {
    top: calc(-1 * (var(--popup-close-height, 55px) + 8px));
    left: auto;
    right: 0;
    width: var(--popup-close-width, 78px);
    height: var(--popup-close-height, 55px);
  }

  .workspace-page .workspace-confirm--signout .workspace-button {
    min-height: 48px;
    height: 48px;
    padding: 0 18px;
    font-size: 15px;
  }

  .workspace-page .workspace-confirm--signout [data-confirm-cancel] {
    min-width: 144px;
  }
}

@media (max-width: 420px) {
  .workspace-confirm--signout .workspace-confirm__panel {
    padding: 26px 18px 22px;
  }

  .workspace-confirm--signout .workspace-confirm__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .workspace-page .workspace-confirm--signout .workspace-button {
    min-height: 46px;
    height: 46px;
    padding: 0 14px;
    font-size: 14px;
  }

  .workspace-page .workspace-confirm--signout [data-confirm-cancel] {
    min-width: 0;
  }

  .workspace-page .workspace-confirm--signout .workspace-button--dark {
    min-width: 104px;
  }
}

/* Launcher (Gift Rooms and other "open the full page" tabs) */
.workspace-launcher {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
  padding: 26px 16px 12px;
}

.workspace-launcher__icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--intent-surface-page);
}

.workspace-launcher__icon img {
  width: 26px;
  height: 26px;
}

.workspace-launcher__copy {
  display: grid;
  gap: 6px;
}

.workspace-launcher__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.workspace-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.1;
  font-weight: 560;
}

.workspace-section-copy {
  margin: 6px 0 0;
  color: var(--intent-text-secondary);
  font-size: 12.5px;
  line-height: 1.45;
}

.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}

.workspace-message-context .workspace-actions {
  gap: 6px;
  margin-top: 4px;
}

.workspace-message-context .workspace-button {
  min-height: 42px;
  height: 42px;
  padding: 0 14px;
  font-size: 13.2px;
}

.workspace-page .workspace-button {
  --workspace-button-hover-scale: 1.026;
  position: relative;
  z-index: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--intent-text-primary);
  min-height: 46px;
  height: 46px;
  max-width: 100%;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.workspace-button::before {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: -1;
  border-radius: inherit;
  background: var(--intent-surface-page);
  box-shadow: inset 0 0 0 3px var(--intent-cta-ink);
  transition: transform var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}

.workspace-button:hover::before,
.workspace-button:focus-visible::before {
  transform: scale(var(--workspace-button-hover-scale));
}

.workspace-button:focus-visible {
  outline: none;
}

.workspace-page .workspace-button--dark {
  color: var(--intent-text-on-brand);
}

.workspace-button--dark::before {
  background: var(--intent-cta-ink);
  box-shadow: none;
}

.workspace-button--dark:hover::before,
.workspace-button--dark:focus-visible::before {
  background: var(--intent-cta-ink);
}

.workspace-button[disabled],
.workspace-button.is-disabled {
  cursor: not-allowed;
  color: var(--auth-disabled-text);
  opacity: 1;
}

.workspace-button[disabled]::before,
.workspace-button.is-disabled::before {
  inset: 0;
  background: var(--control-disabled-bg);
  box-shadow: none;
  transform: none;
}

.workspace-card-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.workspace-card-row--flat {
  gap: 10px;
}

.workspace-card-row--flat .workspace-card {
  border-radius: 16px;
  background: transparent;
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.workspace-card-row--flat .workspace-card:hover,
.workspace-card-row--flat .workspace-card:focus-within {
  background: transparent;
  box-shadow: var(--homepage-card-hover-shadow, var(--shadow-card-hover));
}

.workspace-card-row--flat .workspace-card__icon {
  background: transparent;
}

.workspace-card-row--compact + .workspace-panel {
  margin-top: 12px;
}

.workspace-card {
  min-height: 88px;
  padding: 9px;
  display: grid;
  align-content: space-between;
  gap: 7px;
}

.workspace-card__icon {
  width: 26px;
  height: 26px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.workspace-card__icon img {
  width: 17px;
  height: 17px;
}

.workspace-card h2,
.workspace-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13.25px;
  line-height: 1.12;
  font-weight: 540;
}

.workspace-card p {
  margin: 6px 0 0;
  color: var(--intent-text-secondary);
  font-size: 11.35px;
  line-height: 1.34;
}

.workspace-card.is-locked {
  opacity: .82;
}

.workspace-lock {
  display: inline-flex;
  justify-self: start;
  border-radius: var(--radius-pill);
  background: var(--popup-bg);
  padding: 6px 10px;
  color: var(--intent-text-secondary);
  font-size: 12px;
  font-weight: 900;
}

.workspace-message-shell {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr) 314px;
  gap: 0;
  align-items: stretch;
  min-height: 0;
}

.workspace-message-shell--list {
  grid-template-columns: 188px minmax(0, 1fr);
  height: 100%;
  gap: 0;
}

.workspace-folder-panel,
.workspace-message-context,
.workspace-list-panel {
  overflow: hidden;
}

.workspace-folder-panel {
  width: 188px;
  padding: 8px 12px 8px 0;
  position: sticky;
  top: 64px;
  border-radius: 0;
  background: transparent;
}

.workspace-folder {
  width: 100%;
  border: 0;
  min-height: 36px;
  height: 36px;
  border-radius: 12px;
  background: transparent;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--intent-text-secondary);
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.workspace-folder:hover,
.workspace-folder:focus-visible,
.workspace-folder.is-active {
  background-color: var(--workspace-hover-surface);
  color: var(--intent-text-primary);
  outline: none;
}

.workspace-message-shell--list .workspace-folder-panel {
  align-self: stretch;
  height: 100%;
  padding-top: 10px;
  padding-right: 12px;
  border-right: 1px solid var(--intent-surface-line);
}

.workspace-list-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.workspace-message-shell--list .workspace-list-panel {
  border-radius: 0;
  background: transparent;
}

.workspace-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 70px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--intent-surface-line);
}

.workspace-select-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--radius-pill);
  min-height: 36px;
  padding: 0 11px;
  background: var(--workspace-soft-surface);
  color: var(--intent-text-secondary);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

.workspace-select-all:hover,
.workspace-select-all:focus-within {
  background: var(--workspace-hover-surface);
}

.workspace-select-all input {
  width: 24px;
  height: 24px;
  margin: 0;
  border: 2px solid color-mix(in srgb, var(--intent-text-primary) 42%, transparent);
  border-radius: 50%;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}

.workspace-select-all input:checked {
  border-color: var(--intent-brand-primary);
  background:
    radial-gradient(circle at center, var(--intent-text-on-brand) 0 36%, transparent 39%),
    var(--intent-brand-primary);
}

.workspace-select-all input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--intent-brand-primary) 22%, transparent);
}

.workspace-tool {
  border: 0;
  background: transparent;
  border-radius: var(--radius-pill);
  min-height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--intent-text-primary);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.workspace-tool__icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.workspace-tool__icon--trash {
  -webkit-mask-image: url("/assets/gift-room-icons/trash.svg");
  mask-image: url("/assets/gift-room-icons/trash.svg");
}

.workspace-tool__icon--restore {
  -webkit-mask-image: url("/assets/gift-room-icons/shared/refresh.svg");
  mask-image: url("/assets/gift-room-icons/shared/refresh.svg");
}

.workspace-tool--restore {
  color: var(--intent-brand-primary);
}

.workspace-tool--danger {
  color: color-mix(in srgb, var(--color-alert-red) 84%, var(--intent-cta-ink));
}

.workspace-tool:hover,
.workspace-tool:focus-visible {
  background-color: var(--workspace-hover-surface);
  outline: none;
}

.workspace-tool--soft {
  background: var(--workspace-soft-surface);
}

.workspace-tool--soft:hover,
.workspace-tool--soft:focus-visible {
  background-color: var(--workspace-hover-surface);
}

.workspace-tool[disabled] {
  cursor: not-allowed;
  color: var(--intent-text-secondary);
  opacity: .62;
}

.workspace-tool[disabled]:hover,
.workspace-tool[disabled]:focus-visible {
  background: transparent;
}

.workspace-message-list {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  grid-auto-rows: max-content;
}

.workspace-message-list--empty {
  align-content: center;
}

.workspace-message-list--empty .workspace-empty {
  align-self: center;
}

.workspace-message-row {
  border: 0;
  border-bottom: 1px solid var(--intent-surface-line);
  background: transparent;
  display: grid;
  grid-template-columns: 32px 28px 36px minmax(96px, 150px) minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 9px 12px;
  text-align: left;
  color: var(--intent-text-primary);
  cursor: pointer;
}

.workspace-message-row:hover,
.workspace-message-row:focus-visible,
.workspace-message-row.is-active {
  background-color: var(--workspace-hover-surface);
  outline: none;
}

.workspace-message-row__check {
  width: 32px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workspace-message-row__star {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workspace-message-row__check input {
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid color-mix(in srgb, var(--intent-text-primary) 38%, transparent);
  border-radius: 50%;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}

.workspace-message-row__check input:checked {
  border-color: var(--intent-brand-primary);
  background:
    radial-gradient(circle at center, var(--intent-text-on-brand) 0 35%, transparent 38%),
    var(--intent-brand-primary);
}

.workspace-message-row__check input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--intent-brand-primary) 20%, transparent);
}

.workspace-message-row__star {
  border: 0;
  background: transparent;
  color: var(--intent-text-secondary);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.workspace-message-row__star.is-on {
  color: var(--intent-feedback-warning);
}

.workspace-message-row__avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--intent-surface-raised);
  box-shadow: inset 0 0 0 1px var(--intent-surface-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--intent-brand-primary-strong);
}

.workspace-message-row__avatar.has-image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: transparent;
}

.workspace-message-row__avatar.jp-profile-avatar-art {
  overflow: hidden;
}

.workspace-message-row__name,
.workspace-message-row__subject,
.workspace-message-row__date {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-message-row__name {
  font-size: 13px;
  font-weight: 800;
}

.workspace-message-row__subject {
  color: var(--intent-text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.workspace-message-row__date {
  color: var(--intent-text-secondary);
  font-size: 11.5px;
  font-weight: 800;
}

.workspace-message-row.is-unread .workspace-message-row__name,
.workspace-message-row.is-unread .workspace-message-row__subject {
  color: var(--intent-text-primary);
  font-weight: 900;
}

.workspace-thread {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.workspace-thread__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--intent-surface-line);
}

.workspace-thread__head .workspace-thread__title {
  flex: 1 1 auto;
}

.workspace-thread__head-actions {
  flex: 0 1 auto;
}

/* Close (X / Back) lives at the head's leading edge. */
.workspace-thread__close {
  flex: 0 0 auto;
  order: -1;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 50%;
}

.workspace-thread__close .workspace-button__label {
  display: none;
}

.workspace-thread__close .workspace-thread__close-icon {
  display: block;
  flex: 0 0 auto;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  background-color: currentColor;
  -webkit-mask: url("/assets/gift-room-icons/shared/arrow-left.svg") center / contain no-repeat;
  mask: url("/assets/gift-room-icons/shared/arrow-left.svg") center / contain no-repeat;
}

.workspace-thread__title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace-thread__title-copy {
  min-width: 0;
  overflow: hidden;
}

.workspace-thread__avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  /* The wide-desktop thread head is space-constrained; show the avatar
     where the head has room (single-column at <=1180px and on mobile). */
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--workspace-soft-surface);
  color: var(--intent-text-primary);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  background-size: cover;
  background-position: center;
}

@media (max-width: 1180px) {
  .workspace-thread__avatar {
    display: inline-flex;
  }
}

.workspace-thread__head h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 12px;
  line-height: 1.16;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-thread__head-actions {
  display: grid;
  grid-template-columns: minmax(0, 220px) auto;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  min-width: 0;
}

/* Thread-head buttons carry an icon (mobile) + a text label (desktop). */
.workspace-button__icon {
  display: none;
}

.workspace-thread__head-actions .workspace-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.workspace-thread__mobile-actions {
  display: none;
}

.workspace-thread__search {
  min-width: 0;
  position: relative;
  display: block;
}

.workspace-thread__search input {
  width: 100%;
  height: 34px;
  padding: 0 38px 0 14px;
  border: 1.5px solid var(--popup-border-strong);
  border-radius: var(--radius-pill);
  background: var(--popup-bg);
  color: var(--intent-text-primary);
  font-family: var(--font-body);
  font-size: 12px;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--intent-cta-ink) 5%, transparent),
    0 1px 0 color-mix(in srgb, var(--intent-cta-ink) 5%, transparent);
}

.workspace-thread__search input::placeholder {
  color: var(--intent-text-secondary);
}

.workspace-thread__search input::-webkit-search-decoration,
.workspace-thread__search input::-webkit-search-cancel-button,
.workspace-thread__search input::-webkit-search-results-button,
.workspace-thread__search input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.workspace-thread__search input:focus {
  outline: none;
  border-color: var(--workspace-field-border-active);
  box-shadow: 0 0 0 3px var(--workspace-focus-ring);
}

.workspace-thread__search-clear {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 50%;
  right: 7px;
  z-index: 2;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--intent-text-secondary);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}

.workspace-thread__search-clear[hidden] {
  display: none !important;
}

.workspace-thread__search-clear span {
  width: 11px;
  height: 11px;
  display: block;
  background: url("/assets/header-icons/close.svg") center / contain no-repeat;
  opacity: .74;
}

.workspace-thread__search-clear:hover,
.workspace-thread__search-clear:focus-visible {
  color: var(--intent-text-primary);
  background: color-mix(in srgb, var(--intent-cta-ink) 8%, transparent);
  outline: 0;
}

.workspace-thread__search-clear:hover span,
.workspace-thread__search-clear:focus-visible span {
  opacity: 1;
}

.workspace-thread__head-actions .workspace-button {
  --workspace-button-hover-scale: 1.018;
  min-height: 46px;
  height: 46px;
  padding: 0 16px;
  font-size: 12.5px;
}

.workspace-thread__head-actions .workspace-button::before {
  inset: 3px;
  box-shadow: inset 0 0 0 2px var(--intent-cta-ink);
}

.workspace-bubble[hidden] {
  display: none;
}

.workspace-thread__body.is-search-empty::after {
  content: "No messages match your search.";
  justify-self: center;
  padding: 18px 8px;
  color: var(--intent-text-secondary);
  font-size: 12.5px;
  font-weight: 700;
}

.workspace-thread__meta {
  margin-top: 5px;
  color: var(--intent-text-secondary);
  font-size: 10.5px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-thread__body {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  padding: 10px 14px;
  display: grid;
  gap: 8px;
  align-content: start;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.workspace-bubble {
  position: relative;
  --workspace-bubble-transcript-bg: var(--color-ink);
  --workspace-bubble-transcript-hover-bg: color-mix(in srgb, var(--color-ink) 88%, var(--intent-surface-page));
  width: min(680px, 88%);
  max-width: 100%;
  padding: 9px 11px;
  border-radius: 14px;
  background: var(--popup-bg);
  color: var(--intent-text-primary);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.workspace-bubble--me {
  justify-self: end;
  --workspace-bubble-transcript-bg: var(--intent-cta-ink);
  --workspace-bubble-transcript-hover-bg: color-mix(in srgb, var(--intent-cta-ink) 88%, var(--intent-surface-page));
  background: var(--intent-cta-ink);
  color: var(--intent-text-on-brand);
  border-bottom-right-radius: 6px;
}

.workspace-msg--them .workspace-bubble {
  border-bottom-left-radius: 6px;
}

.workspace-bubble__reply {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  padding: 7px;
  border-radius: 14px;
  background: color-mix(in srgb, currentColor 8%, transparent);
  color: inherit;
}

.workspace-bubble__reply--compact {
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
  background: transparent;
}

.workspace-bubble__reply--compact .workspace-bubble__reply-author {
  display: none;
}

.workspace-bubble__reply-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--workspace-soft-surface);
  color: var(--intent-text-primary);
  font-family: var(--font-heading);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  background-size: cover;
  background-position: center;
}

.workspace-bubble__reply-avatar.has-image {
  color: transparent;
  font-size: 0;
}

.workspace-bubble__reply-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.workspace-bubble__reply-author,
.workspace-bubble__reply-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-bubble__reply-author {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
}

.workspace-bubble__reply-text {
  font-size: 12px;
  font-weight: 700;
  opacity: .78;
}

.workspace-bubble__time {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
}

.workspace-bubble__reply-button {
  appearance: none;
  min-height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: color-mix(in srgb, currentColor 12%, transparent);
  color: inherit;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.workspace-bubble__reply-button:hover,
.workspace-bubble__reply-button:focus-visible {
  background: color-mix(in srgb, currentColor 18%, transparent);
  outline: none;
}

.workspace-bubble__reply-icon {
  display: block;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  background: url("/assets/gift-room-icons/shared/arrow-back-up.svg") center / contain no-repeat;
}

.workspace-bubble--me .workspace-bubble__reply-icon {
  filter: brightness(0) invert(1);
}

.workspace-bubble__time-label {
  opacity: .7;
}

.workspace-bubble__receipt {
  display: inline-flex;
  align-items: center;
  color: color-mix(in srgb, currentColor 55%, transparent);
}

.workspace-bubble__receipt.is-read {
  color: var(--intent-feedback-success);
}

.workspace-bubble__check {
  width: 13px;
  height: 9px;
}

.workspace-bubble__receipt .workspace-bubble__check + .workspace-bubble__check {
  margin-left: -5px;
}

/* ---- Message rows: sender avatar + bubble, grouped by run ---------- */
.workspace-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: fit-content;
  max-width: 86%;
}

.workspace-msg--them {
  margin-right: auto;
}

.workspace-msg--me {
  margin-left: auto;
  flex-direction: row-reverse;
}

/* Tighten spacing within a run from the same sender. */
.workspace-msg + .workspace-msg.is-run-start {
  margin-top: 2px;
}

.workspace-msg__avatar {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--workspace-soft-surface);
  color: var(--intent-text-primary);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  background-size: cover;
  background-position: center;
  user-select: none;
}

.workspace-msg__avatar.has-image {
  color: transparent;
  font-size: 0;
}

.workspace-msg__avatar.jp-profile-avatar-art {
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.workspace-msg__avatar--spacer {
  background: transparent;
  visibility: hidden;
}

.workspace-msg .workspace-bubble {
  width: auto;
  max-width: 100%;
}

.workspace-bubble__author {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--intent-brand-primary);
}

/* ---- Voice message bubble ----------------------------------------- */
.workspace-bubble-audio {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 168px;
}

.workspace-bubble-audio-block {
  display: block;
  min-width: min(240px, 100%);
}

.workspace-bubble-audio__play {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: color-mix(in srgb, currentColor 16%, transparent);
  color: inherit;
}

.workspace-bubble-audio__play svg {
  width: 16px;
  height: 16px;
}

.workspace-bubble-audio__wave {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
  min-width: 60px;
}

.workspace-bubble-audio__wave span {
  flex: 1 1 auto;
  min-width: 2px;
  border-radius: 2px;
  background: color-mix(in srgb, currentColor 42%, transparent);
}

.workspace-bubble-audio.is-playing .workspace-bubble-audio__wave span {
  background: color-mix(in srgb, currentColor 72%, transparent);
}

.workspace-bubble-audio__time {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 800;
  opacity: .8;
}

.workspace-bubble-audio__transcript-toggle {
  position: absolute;
  left: -36px;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--workspace-bubble-transcript-bg, var(--color-ink));
  color: var(--intent-surface-page, var(--color-cream));
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--color-ink) 14%, transparent);
}

.workspace-msg--them .workspace-bubble[data-audio-bubble="true"] {
  margin-left: 42px;
}

.workspace-bubble-audio__transcript-toggle img {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.workspace-bubble-audio__transcript-toggle:hover,
.workspace-bubble-audio__transcript-toggle:focus-visible,
.workspace-bubble-audio__transcript-toggle[aria-expanded="true"] {
  background: var(--workspace-bubble-transcript-hover-bg, color-mix(in srgb, var(--color-ink) 88%, var(--intent-surface-page)));
  outline: 0;
}

.workspace-bubble-audio__transcript {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.workspace-bubble-audio__transcript[hidden] {
  display: none;
}

.workspace-bubble-audio__transcript.is-empty {
  opacity: 0;
}

/* ---- Typing indicator --------------------------------------------- */
.workspace-typing {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: fit-content;
  margin-right: auto;
}

.workspace-typing[hidden] {
  display: none;
}

.workspace-typing__avatar {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--workspace-soft-surface);
  color: var(--intent-text-primary);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  background-size: cover;
  background-position: center;
}

.workspace-typing__bubble {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 11px 13px;
  border-radius: 14px;
  background: var(--popup-bg);
}

.workspace-typing__bubble i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--intent-text-secondary) 70%, transparent);
  animation: workspace-typing-bounce 1.2s infinite ease-in-out;
}

.workspace-typing__bubble i:nth-child(2) { animation-delay: .15s; }
.workspace-typing__bubble i:nth-child(3) { animation-delay: .3s; }

@keyframes workspace-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ---- Recording bar (voice capture) -------------------------------- */
.workspace-composer.is-recording textarea,
.workspace-composer.is-recording .workspace-composer__actions {
  display: none;
}

.workspace-recording {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 8px 8px 8px 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-cream);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--color-ink) 14%, transparent);
}

.workspace-recording__dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-alert-red);
  animation: workspace-recording-pulse 1s infinite ease-in-out;
}

@keyframes workspace-recording-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.8); }
}

.workspace-recording__time {
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: currentColor;
}

.workspace-recording__wave {
  position: relative;
  flex: 1 1 auto;
  min-width: 86px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  padding: 0 2px;
  border-radius: var(--radius-pill);
  background: transparent;
  overflow: hidden;
}

.workspace-recording__wave::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 50%;
  border-top: 2px dotted color-mix(in srgb, var(--color-cream) 48%, transparent);
  transform: translateY(-50%);
}

.workspace-recording__wave i {
  position: relative;
  z-index: 1;
  flex: 0 0 3px;
  width: 3px;
  height: var(--recording-bar-h, 14px);
  max-height: 34px;
  border-radius: var(--radius-pill);
  background: var(--color-cream);
  opacity: 0.92;
  animation: workspace-recording-wave 0.82s ease-in-out infinite;
  animation-delay: var(--recording-bar-delay, 0s);
}

.workspace-recording__wave i:nth-child(2) { height: 16px; animation-delay: 0.08s; }
.workspace-recording__wave i:nth-child(3) { height: 22px; animation-delay: 0.16s; }
.workspace-recording__wave i:nth-child(4) { height: 14px; animation-delay: 0.24s; }
.workspace-recording__wave i:nth-child(5) { height: 18px; animation-delay: 0.32s; }

@keyframes workspace-recording-wave {
  0%, 100% { transform: scaleY(0.68); opacity: 0.48; }
  50% { transform: scaleY(1); opacity: 1; }
}

.workspace-recording__hint {
  display: none;
}

.workspace-recording__cancel {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-cream) 13%, transparent);
  color: var(--color-cream);
  font-weight: 700;
  font-size: 0;
  cursor: pointer;
  padding: 0;
}

.workspace-recording__cancel::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.workspace-recording__cancel:hover,
.workspace-recording__cancel:focus-visible {
  background: color-mix(in srgb, var(--color-cream) 20%, transparent);
  outline: 0;
}

.workspace-recording__send {
  flex: 0 0 auto;
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  min-height: 38px;
  height: 38px;
  aspect-ratio: 1 / 1;
  padding: 0;
  border-radius: 50%;
  box-sizing: border-box;
  background: var(--color-cream);
  color: var(--color-ink);
}

.workspace-recording__send::before {
  display: none;
}

.workspace-recording__send::after {
  content: "";
  width: 18px;
  height: 15px;
  display: inline-block;
  background: currentColor;
  -webkit-mask: url("/assets/gift-room-icons/shared/send.svg") center / contain no-repeat;
  mask: url("/assets/gift-room-icons/shared/send.svg") center / contain no-repeat;
  transform: translateX(-2px);
}

.workspace-attach__btn.is-recording {
  color: var(--color-alert-red, #d4524a);
}

.workspace-composer {
  --workspace-composer-action-height: 46px;
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding: 7px 10px 5px;
  border-top: 1px solid var(--intent-surface-line);
  background: var(--intent-surface-page);
}

.workspace-composer textarea {
  width: 100%;
  min-height: 62px;
  max-height: 170px;
  resize: none;
  overflow-y: hidden;
  border-radius: 20px;
  border: 1.5px solid var(--popup-border-strong);
  background: var(--popup-bg);
  padding: 10px 15px;
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 12.75px;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-ink) 4%, transparent);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.workspace-composer textarea::placeholder {
  color: color-mix(in srgb, var(--color-ink-soft) 54%, transparent);
}

.workspace-composer textarea:focus {
  outline: none;
  border-color: var(--workspace-field-border-active);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--color-ink) 4%, transparent),
    0 0 0 3px var(--workspace-focus-ring);
}

.workspace-composer.is-error textarea,
.workspace-composer textarea[aria-invalid="true"] {
  border-color: var(--color-alert-red) !important;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--color-ink) 4%, transparent),
    0 0 0 3px color-mix(in srgb, var(--color-alert-red) 11%, transparent) !important;
}

.workspace-composer.is-error textarea:focus,
.workspace-composer textarea[aria-invalid="true"]:focus {
  border-color: var(--color-alert-red) !important;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--color-ink) 4%, transparent),
    0 0 0 3px color-mix(in srgb, var(--color-alert-red) 11%, transparent) !important;
}

.workspace-composer__reply {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--intent-surface-line);
  border-radius: 16px;
  background: var(--popup-bg);
}

.workspace-composer__reply[hidden] {
  display: none !important;
}

.workspace-composer__reply > .workspace-msg__avatar {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  font-size: 11px;
}

.workspace-composer__reply-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  color: var(--intent-text-primary);
}

.workspace-composer__reply-copy > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-heading);
  font-size: 13px;
  line-height: 1.15;
}

.workspace-composer__reply .workspace-bubble__reply {
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.workspace-composer__reply-clear {
  appearance: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--intent-text-primary) 8%, transparent);
  color: var(--intent-text-primary);
  cursor: pointer;
}

.workspace-composer__reply-clear span {
  display: block;
  width: 13px;
  height: 13px;
  background: url("/assets/gift-room-icons/shared/x.svg") center / contain no-repeat;
}

.workspace-composer__reply-clear:hover,
.workspace-composer__reply-clear:focus-visible {
  background: color-mix(in srgb, var(--intent-text-primary) 13%, transparent);
  outline: none;
}

.workspace-composer__actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-end;
}

.workspace-attach {
  display: flex;
  gap: 8px;
  align-items: center;
}

.workspace-attach button {
  position: relative;
  z-index: 0;
  box-sizing: border-box;
  flex: 0 0 var(--workspace-composer-action-height);
  width: var(--workspace-composer-action-height);
  min-width: var(--workspace-composer-action-height);
  max-width: var(--workspace-composer-action-height);
  height: var(--workspace-composer-action-height);
  min-height: var(--workspace-composer-action-height);
  max-height: var(--workspace-composer-action-height);
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 50%;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-standard);
}

.workspace-attach button:hover,
.workspace-attach button:focus-visible {
  background: transparent;
  outline: none;
}

.workspace-attach img {
  width: 20px;
  height: 20px;
}

/* Composer attach buttons (icon-only) */
.workspace-attach .workspace-attach__btn {
  box-sizing: border-box;
  flex: 0 0 var(--workspace-composer-action-height);
  width: var(--workspace-composer-action-height);
  min-width: var(--workspace-composer-action-height);
  max-width: var(--workspace-composer-action-height);
  min-height: var(--workspace-composer-action-height);
  max-height: var(--workspace-composer-action-height);
  height: var(--workspace-composer-action-height);
  aspect-ratio: 1 / 1;
  gap: 0;
  padding: 0;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  color: var(--intent-text-primary);
  box-shadow: none;
}

.workspace-attach .workspace-attach__btn img,
.workspace-attach .workspace-attach__btn svg {
  display: none;
}

.workspace-attach .workspace-attach__btn::before {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: -1;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 3px var(--intent-cta-ink);
  transition: transform var(--duration-fast) var(--ease-standard);
}

.workspace-attach .workspace-attach__btn:hover::before,
.workspace-attach .workspace-attach__btn:focus-visible::before {
  transform: scale(var(--workspace-button-hover-scale, 1.026));
}

.workspace-attach .workspace-attach__btn::after {
  content: "";
  order: -1;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: block;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.workspace-attach .workspace-attach__btn[data-attach-product]::after,
.workspace-attach .workspace-attach__btn[data-chat-attach="product"]::after,
.workspace-attach .workspace-attach__btn[data-external-chat-attach="product"]::after {
  background-image: url("/assets/gift-room-icons/shared/heart.svg");
}

.workspace-attach .workspace-attach__btn[data-attach-photo]::after,
.workspace-attach .workspace-attach__btn[data-chat-attach="photo"]::after,
.workspace-attach .workspace-attach__btn[data-external-chat-attach="photo"]::after {
  background-image: url("/assets/gift-room-icons/shared/photo.svg");
}

.workspace-attach .workspace-attach__btn[data-record-voice]::after,
.workspace-attach .workspace-attach__btn[data-chat-attach="voice"]::after,
.workspace-attach .workspace-attach__btn[data-external-chat-attach="voice"]::after {
  background-image: url("/assets/gift-room-icons/shared/microphone.svg");
}

.workspace-attach .workspace-attach__btn[data-suggest-gift]::after,
.workspace-attach .workspace-attach__btn[data-chat-attach="gift"]::after {
  background-image: url("/assets/gift-room-icons/shared/gift.svg");
}

.workspace-composer__actions > .workspace-button {
  box-sizing: border-box;
  flex: 0 0 var(--workspace-composer-action-height);
  width: var(--workspace-composer-action-height);
  min-width: var(--workspace-composer-action-height);
  max-width: var(--workspace-composer-action-height);
  min-height: var(--workspace-composer-action-height);
  max-height: var(--workspace-composer-action-height);
  height: var(--workspace-composer-action-height);
  aspect-ratio: 1 / 1;
  padding: 0;
  border-radius: 50%;
  font-size: 13px;
}

.workspace-composer__send {
  gap: 0;
  border-radius: 50%;
}

.workspace-composer__send-icon {
  display: none;
}

.workspace-composer__send::after {
  content: "";
  order: -1;
  flex: 0 0 auto;
  width: 18px;
  height: 15px;
  display: inline-block;
  background: url("/assets/gift-room-icons/shared/send.svg") center / contain no-repeat;
  filter: brightness(0) invert(1);
  transform: translateX(-2px);
}

.workspace-attach .workspace-attach__btn span {
  display: none;
}

/* Rich message bubbles — shared product / photo */
.workspace-bubble--rich {
  width: min(320px, 88%);
  display: grid;
  gap: 8px;
}

.workspace-bubble__text {
  display: block;
}

.workspace-bubble__image {
  display: block;
  width: 100%;
  border-radius: 10px;
}

.workspace-bubble-product {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  background: var(--intent-surface-raised);
  color: var(--intent-text-primary);
  text-decoration: none;
}

.workspace-bubble-product__thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background-color: var(--intent-surface-page);
  background-size: cover;
  background-position: center;
}

.workspace-bubble-product__copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.workspace-bubble-product__copy strong {
  font-size: 12.5px;
  color: var(--intent-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-bubble-product__copy small {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12.5px;
  color: var(--intent-feedback-success);
}

.workspace-bubble-product__store {
  font-size: 11px;
  font-weight: 700;
  color: var(--intent-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Product picker modal (share a saved idea) */
.workspace-picker {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: color-mix(in srgb, var(--intent-text-primary) 34%, transparent);
}

.workspace-picker__panel {
  position: relative;
  width: min(420px, 100%);
  max-height: min(620px, 90vh);
  display: flex;
  flex-direction: column;
  background: var(--intent-surface-raised);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--popup-shadow);
}

.workspace-picker__close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.workspace-picker__head h2 {
  margin: 0;
  font-family: var(--font-heading, var(--font-display));
  font-size: 19px;
}

.workspace-picker__head p {
  margin: 4px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--intent-text-secondary);
}

.workspace-picker__list {
  margin-top: 14px;
  display: grid;
  gap: 6px;
  overflow-y: auto;
}

.workspace-picker__row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background var(--duration-fast) var(--ease-standard);
}

.workspace-picker__row:hover,
.workspace-picker__row:focus-visible {
  background: var(--intent-surface-page);
  outline: none;
}

.workspace-picker__thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: var(--intent-surface-page);
  background-size: cover;
  background-position: center;
}

.workspace-picker__thumb--gift {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--intent-cta-ink) 6%, transparent);
}

.workspace-picker__thumb--gift img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.workspace-picker__copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.workspace-picker__copy strong {
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-picker__copy small {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  color: var(--intent-feedback-success);
}

.workspace-picker--invite .workspace-picker__frame {
  width: min(520px, calc(100vw - 112px));
  max-height: min(640px, calc(100vh - 72px));
  max-height: min(640px, calc(100dvh - 72px));
  position: relative;
  transform: translateY(var(--workspace-picker-sheet-drag-y, 0px));
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.workspace-picker--invite .workspace-picker__panel {
  width: 100%;
  max-height: inherit;
  gap: 14px;
  padding: 26px 26px 0;
  border-radius: 28px;
  background: var(--popup-bg);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.workspace-picker--invite .workspace-picker__panel::-webkit-scrollbar {
  display: none;
}

.workspace-picker--invite .workspace-picker__close.header-auth-close {
  position: absolute;
  top: 0;
  right: auto;
  left: calc(100% + var(--popup-close-offset, 10px));
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--popup-close-width, 78px);
  height: var(--popup-close-height, 55px);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--popup-bg);
  box-shadow: var(--popup-shadow-soft);
  cursor: pointer;
  transition: background-color 0.24s ease, filter 0.24s ease;
}

.workspace-picker--invite .workspace-picker__close.header-auth-close::before,
.workspace-picker--invite .workspace-picker__close.header-auth-close::after {
  content: none;
}

.workspace-picker--invite .workspace-picker__close .header-auth-close-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--popup-close-icon-size, 17px);
  height: var(--popup-close-icon-size, 17px);
  max-width: none;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.workspace-picker--invite .workspace-picker__close.header-auth-close:hover,
.workspace-picker--invite .workspace-picker__close.header-auth-close:focus-visible {
  background: var(--popup-close-hover-bg, var(--sort-control-bg));
  animation: header-auth-close-bounce 0.28s cubic-bezier(0.23, 1.3, 0.32, 1) both;
  filter: var(--popup-close-hover-filter);
  outline: none;
}

.workspace-picker__sheet-grip {
  display: none;
}

.workspace-picker__sheet-grip span {
  display: none;
}

.workspace-picker--invite .workspace-picker__head {
  padding-right: 24px;
}

.workspace-picker--invite .workspace-picker__head h2 {
  color: var(--color-ink);
  font-family: var(--popup-title-font, var(--font-display));
  font-size: var(--popup-title-size, 25px);
  font-weight: var(--popup-title-weight, 600);
  line-height: var(--popup-title-line-height, 1.16);
}

.workspace-picker--invite .workspace-picker__head p {
  max-width: 430px;
  margin-top: 8px;
  color: var(--color-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.42;
}

.workspace-picker--gift-suggest .workspace-picker__panel {
  width: min(520px, 100%);
}

.workspace-picker--gift-suggest .workspace-picker__list {
  gap: 8px;
}

.workspace-picker--gift-suggest .workspace-picker__row {
  grid-template-columns: 46px minmax(0, 1fr);
  min-height: 62px;
  padding: 9px 12px;
  border: 1.5px solid var(--intent-surface-line);
  border-radius: 18px;
  background: var(--popup-bg);
  transition: border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}

.workspace-picker--gift-suggest .workspace-picker__row:hover,
.workspace-picker--gift-suggest .workspace-picker__row:focus-visible {
  border-color: var(--color-forest);
  background: var(--popup-bg);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--color-ink) 8%, transparent);
  transform: translateY(-1px);
}

.workspace-picker--gift-suggest .workspace-picker__thumb {
  width: 46px;
  height: 46px;
}

.workspace-invite-demo {
  display: grid;
  gap: 16px;
  margin-top: 0;
}

.workspace-invite-field {
  position: relative;
  display: block;
  padding-top: 7px;
  color: var(--intent-text-primary);
}

.workspace-invite-field > span:not(.workspace-invite-select-shell),
.workspace-invite-link > span {
  position: absolute;
  top: 1px;
  left: 22px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 44px);
  padding: 0 6px;
  border-radius: 999px;
  background: var(--popup-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  white-space: nowrap;
  pointer-events: none;
}

.workspace-invite-field input,
.workspace-invite-field select {
  width: 100%;
  height: 52px;
  min-height: 52px;
  border: 1.5px solid var(--popup-border-strong);
  border-radius: var(--radius-pill);
  background: var(--popup-bg);
  color: var(--intent-text-primary);
  padding: 0 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 52px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-ink) 4%, transparent);
  outline: 2px solid transparent;
  outline-offset: 0;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, outline-color 0.2s ease;
}

.workspace-invite-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 48px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.workspace-invite-field--select select {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  opacity: 0;
}

.workspace-invite-select-shell {
  width: 100%;
  height: 52px;
  min-height: 52px;
  border: 1.5px solid var(--popup-border-strong);
  border-radius: var(--radius-pill);
  background: var(--popup-bg);
  color: var(--intent-text-primary);
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 52px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-ink) 4%, transparent);
  box-sizing: border-box;
  pointer-events: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.workspace-invite-select-shell img {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: block;
}

.workspace-invite-field--select select:focus + .workspace-invite-select-shell {
  border-color: var(--workspace-field-border-active);
  box-shadow: 0 0 0 3px var(--workspace-focus-ring);
}

.workspace-invite-field input:focus,
.workspace-invite-field select:focus {
  outline: none;
  border-color: var(--workspace-field-border-active);
  box-shadow: 0 0 0 3px var(--workspace-focus-ring);
}

.workspace-invite-link {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 16px 10px 12px 22px;
  border: 1.5px solid var(--popup-border-strong);
  border-radius: 24px;
  background: var(--popup-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-ink) 4%, transparent);
  box-sizing: border-box;
}

.workspace-invite-link > span {
  top: -7px;
}

.workspace-invite-link code {
  color: var(--intent-text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.workspace-invite-copy {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}

.workspace-invite-copy img {
  width: 17px;
  height: 17px;
  display: block;
}

.workspace-invite-copy:hover,
.workspace-invite-copy:focus-visible {
  background: var(--intent-surface-raised);
  box-shadow: var(--homepage-card-hover-shadow, var(--shadow-card-hover));
  outline: none;
  transform: translateY(-1px);
}

.workspace-invite-note {
  margin: 0;
  color: var(--intent-text-secondary);
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1.42;
}

.workspace-invite-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 86px;
  margin: 2px -26px 0;
  padding: 18px 26px 22px;
  border-top: 1px solid var(--color-line);
  border-radius: 0 0 28px 28px;
  background: var(--popup-bg);
  overflow: hidden;
}

.workspace-page .workspace-invite-actions .workspace-button {
  width: 178px;
  min-width: 178px;
  min-height: 56px;
  height: 56px;
  font-size: 1.02rem;
  font-weight: 750;
}

.workspace-page .workspace-invite-actions .workspace-invite-cancel {
  color: var(--intent-text-primary);
  font-family: var(--font-heading);
  box-shadow: none;
  filter: none;
  transition: box-shadow var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}

.workspace-page .workspace-invite-actions .workspace-invite-cancel::before {
  background: transparent;
  box-shadow: none;
}

.workspace-page .workspace-invite-actions .workspace-invite-cancel:hover,
.workspace-page .workspace-invite-actions .workspace-invite-cancel:focus-visible {
  background: var(--popup-bg);
  box-shadow: var(--shadow-card-hover);
  outline: none;
}

.workspace-page .workspace-invite-actions .workspace-invite-cancel:hover::before,
.workspace-page .workspace-invite-actions .workspace-invite-cancel:focus-visible::before {
  background: var(--popup-bg);
  box-shadow: none;
}

.workspace-page .workspace-invite-actions .workspace-button--dark::before {
  inset: 0;
}

@media (max-width: 720px), (pointer: coarse) {
  .workspace-picker--invite {
    align-items: flex-end;
    justify-content: center;
    padding: calc(env(safe-area-inset-top, 0px) + 84px) 0 0;
  }

  .workspace-picker--invite .workspace-picker__frame {
    width: 100%;
    max-height: calc(100vh - (env(safe-area-inset-top, 0px) + 84px));
    max-height: calc(100dvh - (env(safe-area-inset-top, 0px) + 84px));
  }

  .workspace-picker--invite .workspace-picker__panel {
    padding: 0 20px;
    border-radius: 22px 22px 0 0;
  }

  .workspace-picker--invite.is-sheet-dragging .workspace-picker__frame {
    transition: none;
  }

  .workspace-picker--invite.is-sheet-settling .workspace-picker__frame,
  .workspace-picker--invite.is-sheet-closing .workspace-picker__frame {
    transition: transform 0.19s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .workspace-picker__sheet-grip {
    display: flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    -webkit-appearance: none;
    width: calc(100% + 40px);
    min-height: 44px;
    margin: 0 -20px;
    border: 0;
    border-radius: 22px 22px 0 0;
    background: var(--popup-bg);
    color: inherit;
    cursor: grab;
    touch-action: none;
    user-select: none;
  }

  .workspace-picker__sheet-grip span {
    display: block;
    width: var(--popup-sheet-grip-width, 48px);
    height: var(--popup-sheet-grip-thickness, 5px);
    border-radius: var(--radius-pill);
    background: var(--popup-sheet-grip-color);
  }

  .workspace-picker--invite.is-sheet-dragging .workspace-picker__sheet-grip {
    cursor: grabbing;
  }

  .workspace-picker--invite .workspace-picker__close.header-auth-close {
    display: none;
  }

  body.is-workspace-invite-open .workspace-thread__close {
    visibility: hidden;
    pointer-events: none;
  }

  .workspace-picker--invite .workspace-picker__head {
    padding: 0;
  }

  .workspace-picker--invite .workspace-picker__head h2 {
    font-size: 25px;
  }

  .workspace-picker--invite .workspace-picker__head p {
    font-size: 14px;
    line-height: 1.42;
  }

  .workspace-invite-demo {
    gap: 18px;
  }

  .workspace-invite-field input,
  .workspace-invite-field select {
    height: 52px;
    min-height: 52px;
    line-height: 52px;
  }

  .workspace-invite-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    min-height: 78px;
    margin: 2px -20px 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border-radius: 0;
  }

  .workspace-page .workspace-invite-actions .workspace-button,
  .workspace-page .workspace-invite-actions .workspace-invite-cancel {
    width: auto;
    min-height: 52px;
    height: 52px;
    font-size: 0.92rem;
  }

  .workspace-page .workspace-invite-actions .workspace-invite-cancel {
    min-width: 116px;
  }

  .workspace-page .workspace-invite-actions .workspace-button--dark {
    min-width: 152px;
  }
}

.workspace-message-context {
  width: 314px;
  padding: 8px 0 8px 12px;
  position: sticky;
  top: 64px;
  display: grid;
  gap: 8px;
}

.workspace-message-shell--thread {
  height: 100%;
  min-height: 0;
  gap: 0;
  align-items: stretch;
}

.workspace-message-shell--thread .workspace-folder-panel {
  align-self: stretch;
  height: 100%;
  padding-top: 10px;
  padding-right: 12px;
  border-right: 1px solid var(--intent-surface-line);
}

.workspace-message-shell--thread .workspace-thread {
  border-radius: 0;
  border-right: 1px solid var(--intent-surface-line);
  min-height: 0;
  background: transparent;
}

.workspace-message-shell--thread .workspace-message-context {
  align-self: stretch;
  border-radius: 0;
  background: transparent;
  padding: 8px 0 8px 12px;
  border-left: 1px solid var(--intent-surface-line);
}

.workspace-context-profile {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.workspace-context-profile strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14.5px;
  line-height: 1.1;
  font-weight: 540;
}

.workspace-context-profile small {
  color: var(--intent-text-secondary);
  font-weight: 800;
}

.workspace-context-block {
  border-top: 1px solid var(--intent-surface-line);
  padding-top: 9px;
}

.workspace-context-block h3 {
  margin: 0 0 5px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--intent-text-secondary);
}

.workspace-context-block p {
  margin: 0;
  color: var(--intent-text-secondary);
  font-size: 12px;
  line-height: 1.42;
}

.workspace-sync-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--intent-surface-line);
  border-radius: 12px;
  background: var(--workspace-soft-surface);
}

.workspace-sync-preview span,
.workspace-sync-last {
  color: var(--intent-text-secondary);
  font-size: 11.5px;
  font-weight: 800;
}

.workspace-sync-preview strong {
  color: var(--intent-text-primary);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.workspace-sync-last {
  display: block;
  margin-top: 6px;
  line-height: 1.35;
}

.workspace-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workspace-pill {
  border-radius: var(--radius-pill);
  background: var(--workspace-soft-surface);
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--intent-text-secondary);
}

.workspace-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 96px;
  padding: 14px;
  text-align: center;
  color: var(--intent-text-secondary);
}

.workspace-empty h2 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--intent-text-primary);
  font-size: 18px;
}

.workspace-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 9px;
  align-items: start;
}

.workspace-panel--compact {
  padding: 10px;
}

.workspace-panel--flat {
  border-radius: 0;
  background: transparent;
  padding: 10px 0;
}

.workspace-two-column--flat {
  gap: 0;
  align-items: stretch;
}

.workspace-two-column--flat > .workspace-panel,
.workspace-two-column--flat > .workspace-card {
  border-radius: 0;
  background: transparent;
}

.workspace-two-column--flat > .workspace-panel {
  padding: 10px 18px 10px 0;
}

.workspace-two-column--flat > .workspace-card {
  min-height: 0;
  padding: 10px 0 10px 18px;
  border-left: 1px solid var(--intent-surface-line);
}

.workspace-account-hero {
  display: grid;
  grid-template-columns: 48px auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.workspace-account-hero__change {
  --workspace-button-hover-scale: 1.035;
  min-width: 94px;
  min-height: 42px;
  height: 42px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 850;
}

.workspace-account-hero__change::before {
  inset: 0;
  background: var(--filter-pill-bg);
  box-shadow: none;
}

.workspace-account-hero__change:hover,
.workspace-account-hero__change:focus-visible {
  color: var(--intent-text-primary);
}

.workspace-account-hero__change:hover::before,
.workspace-account-hero__change:focus-visible::before {
  background: var(--filter-pill-bg);
  transform: scale(var(--workspace-button-hover-scale));
}

.workspace-avatar--large {
  width: 48px;
  height: 48px;
  font-size: 19px;
}

.workspace-avatar--interactive {
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.workspace-avatar--interactive:hover,
.workspace-avatar--interactive:focus-visible {
  outline: 0;
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--intent-brand-primary) 24%, transparent);
}

.workspace-public-profile-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--intent-surface-page);
  box-shadow: inset 0 0 0 1px var(--intent-surface-line);
}

.workspace-public-profile-preview__head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.workspace-public-profile-preview__cover-control {
  position: relative;
  min-width: 0;
}

.workspace-public-profile-preview__cover {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 16 / 8.1;
  min-height: 104px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 16px 18px;
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px dashed var(--popup-border-strong);
  border-radius: 14px;
  background-color: var(--popup-bg-soft);
  background-image:
    linear-gradient(135deg,
      color-mix(in srgb, var(--intent-brand-primary) 20%, transparent),
      color-mix(in srgb, var(--intent-feedback-warning) 18%, transparent));
  background-position: center;
  background-size: cover;
  color: var(--intent-text-primary);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.workspace-public-profile-preview__cover.is-draggable {
  cursor: grab;
  touch-action: none;
}

.workspace-public-profile-preview__cover.is-repositioning {
  cursor: grabbing;
}

.workspace-public-profile-preview__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: color-mix(in srgb, var(--color-ink) 48%, transparent);
  transition: opacity var(--duration-fast) var(--ease-standard);
}

.workspace-public-profile-preview__cover.is-loaded::before {
  opacity: 1;
}

.workspace-public-profile-preview__cover:hover,
.workspace-public-profile-preview__cover:focus-within {
  border-color: var(--intent-surface-line-strong);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--intent-surface-line) 58%, transparent),
    0 10px 26px color-mix(in srgb, var(--color-ink) 10%, transparent);
}

.workspace-public-profile-preview__cover-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
  width: fit-content;
  max-width: min(100%, 280px);
  pointer-events: none;
}

.workspace-public-profile-preview__cover-copy strong {
  color: var(--intent-text-primary);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.1;
}

.workspace-public-profile-preview__cover-copy small {
  color: var(--intent-text-secondary);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.2;
}

.workspace-public-profile-preview__cover.is-loaded .workspace-public-profile-preview__cover-copy strong,
.workspace-public-profile-preview__cover.is-loaded .workspace-public-profile-preview__cover-copy small {
  color: var(--intent-text-on-brand);
}

.workspace-public-profile-preview input.workspace-public-profile-preview__cover-file[hidden] {
  display: none;
}

.workspace-public-profile-preview__cover-handle {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--intent-surface-raised) 92%, transparent);
  color: var(--intent-text-primary);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--color-ink) 14%, transparent);
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition:
    opacity var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.workspace-public-profile-preview__cover.is-loaded .workspace-public-profile-preview__cover-handle {
  opacity: 1;
  transform: translateY(0);
}

.workspace-public-profile-preview__cover-handle img {
  width: 18px;
  height: 18px;
  display: block;
}

.workspace-public-profile-preview__cover-upload {
  position: absolute;
  top: 12px;
  right: 62px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--intent-surface-raised) 92%, transparent);
  color: var(--intent-text-primary);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--color-ink) 14%, transparent);
  transition:
    opacity var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard);
}

.workspace-public-profile-preview__cover-upload img {
  width: 16px;
  height: 16px;
  display: block;
  filter: brightness(0);
  transition: filter var(--duration-fast) var(--ease-standard);
}

.workspace-public-profile-preview__cover-upload:hover,
.workspace-public-profile-preview__cover-upload:focus-visible {
  outline: 0;
  background: var(--intent-cta-ink);
  color: var(--intent-text-on-brand);
}

.workspace-public-profile-preview__cover-upload:hover img,
.workspace-public-profile-preview__cover-upload:focus-visible img {
  filter: brightness(0) invert(1);
}

.workspace-public-profile-preview__cover-upload:disabled {
  opacity: 0;
  pointer-events: none;
}

.workspace-public-profile-preview__cover-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--intent-surface-raised) 92%, transparent);
  cursor: pointer;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--color-ink) 14%, transparent);
  transition:
    opacity var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard);
}

.workspace-public-profile-preview__cover-remove img {
  width: 17px;
  height: 17px;
  display: block;
  filter: brightness(0);
  transition: filter var(--duration-fast) var(--ease-standard);
}

.workspace-public-profile-preview__cover-remove:hover,
.workspace-public-profile-preview__cover-remove:focus-visible {
  outline: 0;
  background: var(--color-alert-red);
}

.workspace-public-profile-preview__cover-remove:hover img,
.workspace-public-profile-preview__cover-remove:focus-visible img {
  filter: brightness(0) invert(1);
}

.workspace-public-profile-preview__cover-remove:disabled {
  opacity: 0;
  pointer-events: none;
}

.workspace-public-profile-preview__avatar {
  align-self: start;
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-forest);
  color: var(--color-cream);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.workspace-public-profile-preview__avatar.has-image {
  overflow: hidden;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: transparent;
  font-size: 0;
}

.workspace-public-profile-preview__avatar.jp-profile-avatar-art {
  background: transparent !important;
  box-shadow: none;
  padding: 0;
}

.workspace-public-profile-preview__identity {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-self: start;
}

.workspace-public-profile-preview strong,
.workspace-public-profile-preview small,
.workspace-public-profile-preview p,
.workspace-public-profile-preview__site {
  min-width: 0;
}

.workspace-public-profile-preview strong {
  overflow: hidden;
  color: var(--intent-text-primary);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-public-profile-preview small,
.workspace-public-profile-preview__site {
  color: var(--intent-text-secondary);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}

.workspace-public-profile-preview p {
  margin: 7px 0 0;
  max-width: 58ch;
  color: var(--intent-text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.34;
}

.workspace-public-profile-preview__site {
  display: inline-flex;
  overflow-wrap: anywhere;
}

@keyframes header-auth-close-bounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@keyframes workspace-sidebar-mobile-in {
  from { transform: translateX(calc(-100% - 12px)); }
  to { transform: translateX(0); }
}

.workspace-avatar-dialog {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal-front, 13000);
  display: grid;
  place-items: center;
  padding: 22px;
  background: var(--popup-overlay);
}

.workspace-avatar-dialog__panel {
  width: min(460px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: visible;
  display: grid;
  gap: 18px;
  padding: 30px 34px 34px;
  border-radius: 26px;
  background: var(--popup-bg);
  box-shadow: var(--popup-shadow);
  position: relative;
}

.workspace-avatar-dialog__close {
  position: absolute;
  top: 0;
  left: calc(100% + var(--popup-close-offset, 10px));
  right: auto;
  width: var(--popup-close-width, 78px);
  height: var(--popup-close-height, 55px);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--popup-bg);
  box-shadow: var(--popup-shadow-soft);
  cursor: pointer;
  z-index: 2;
  transition: background-color 0.24s ease, filter 0.24s ease;
  will-change: transform;
}

.workspace-avatar-dialog__close .header-auth-close-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--popup-close-icon-size, 17px);
  height: var(--popup-close-icon-size, 17px);
  display: block;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.workspace-avatar-dialog__close:hover,
.workspace-avatar-dialog__close:focus-visible {
  background: var(--popup-close-hover-bg, var(--sort-control-bg));
  animation: header-auth-close-bounce 0.28s cubic-bezier(0.23, 1.3, 0.32, 1) both;
  filter: var(--popup-close-hover-filter);
}

.workspace-avatar-dialog__close:focus-visible {
  outline: 2px solid var(--popup-focus);
  outline-offset: 2px;
}

@media (max-width: 860px), (pointer: coarse) {
  .workspace-avatar-dialog__close {
    display: none !important;
  }
}

.workspace-avatar-dialog__panel::before {
  content: none;
  display: none;
}

.workspace-avatar-dialog__head {
  display: block;
  text-align: center;
}

.workspace-avatar-dialog__head h2 {
  margin: 0;
  font-family: var(--popup-title-font, var(--font-display));
  font-size: var(--popup-title-size, 25px);
  font-weight: var(--popup-title-weight, 600);
  line-height: var(--popup-title-line-height, 1.16);
  letter-spacing: var(--popup-title-letter-spacing, 0);
}

.workspace-avatar-dialog__head p {
  max-width: 360px;
  margin: 12px auto 0;
  color: var(--intent-text-primary);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.38;
}

.workspace-avatar-dialog__preview {
  width: 92px;
  height: 92px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--intent-brand-primary);
  color: var(--intent-brand-on);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 850;
  overflow: hidden;
}

.workspace-avatar-dialog__dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 18px;
  min-height: 264px;
  padding: 28px 24px;
  border: 1.5px dashed color-mix(in srgb, var(--color-forest) 42%, var(--popup-border));
  border-radius: 24px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--color-forest) 9%, var(--popup-bg)), color-mix(in srgb, var(--color-sand-dark) 9%, var(--popup-bg)) 58%, var(--popup-bg));
  color: var(--color-ink);
  cursor: pointer;
  text-align: center;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--popup-bg) 66%, transparent),
    0 12px 28px color-mix(in srgb, var(--color-ink) 5%, transparent);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.workspace-avatar-dialog__dropzone:hover,
.workspace-avatar-dialog__dropzone:focus-visible {
  outline: 0;
  border-color: var(--color-forest);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--color-forest) 12%, var(--popup-bg)), color-mix(in srgb, var(--color-sand-dark) 12%, var(--popup-bg)) 58%, var(--popup-bg));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--color-forest) 16%, transparent),
    0 18px 38px color-mix(in srgb, var(--color-ink) 11%, transparent);
  transform: translateY(-1px);
}

.workspace-avatar-dialog__frame {
  position: relative;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  box-shadow: none;
}

.workspace-avatar-dialog__frame-icon {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--color-forest);
  outline: 5px solid var(--popup-bg);
  box-shadow: none;
}

.workspace-avatar-dialog__frame-icon::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--color-cream);
  -webkit-mask: url("/assets/admin-icons/image.svg") center / contain no-repeat;
  mask: url("/assets/admin-icons/image.svg") center / contain no-repeat;
}

.workspace-avatar-dialog__dropzone-copy {
  display: grid;
  gap: 7px;
}

.workspace-avatar-dialog__dropzone-copy strong {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 850;
  line-height: 1.15;
}

.workspace-avatar-dialog__dropzone-copy span {
  color: var(--color-ink-soft);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.35;
}

.workspace-avatar-dialog__options {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.workspace-avatar-dialog__actions {
  width: min(420px, 100%);
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.workspace-avatar-dialog__actions .workspace-button {
  width: 100%;
  min-height: 50px;
  height: 50px;
  padding-inline: 18px;
  font-size: 15px;
  font-weight: 700;
}

.workspace-avatar-dialog__choose {
  color: var(--color-ink);
}

.workspace-avatar-dialog__choose::before {
  background: var(--popup-bg);
  box-shadow: inset 0 0 0 2px var(--color-ink);
}

.workspace-avatar-dialog__button-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("/assets/admin-icons/image.svg") center / contain no-repeat;
  mask: url("/assets/admin-icons/image.svg") center / contain no-repeat;
}

.workspace-avatar-dialog__save {
  color: var(--color-cream);
}

.workspace-avatar-dialog__save::before {
  background: var(--color-ink);
  box-shadow: none;
}

.workspace-avatar-dialog__save:not(:disabled):not(.is-disabled):hover::before,
.workspace-avatar-dialog__save:not(:disabled):not(.is-disabled):focus-visible::before {
  background: var(--color-ink);
  transform: scale(1.04);
}

.workspace-avatar-dialog__save:disabled,
.workspace-avatar-dialog__save.is-disabled {
  color: var(--color-cream);
}

.workspace-avatar-dialog__save:disabled::before,
.workspace-avatar-dialog__save.is-disabled::before {
  background: var(--color-ink);
  box-shadow: none;
  transform: none;
}

.workspace-avatar-dialog__save.is-ready:not(:disabled):not(.is-disabled) {
  background: var(--color-ink);
  color: var(--color-cream);
}

.workspace-avatar-dialog__save.is-ready:not(:disabled):not(.is-disabled)::before {
  background: var(--color-ink);
  box-shadow: none;
}

/* Avatar cropper — drag to reposition + zoom, circular crop */
.workspace-avatar-cropper {
  display: grid;
  gap: 15px;
  justify-items: center;
  padding: 4px 0 4px;
}

.workspace-avatar-cropper__stage {
  position: relative;
  width: 220px;
  height: 220px;
  max-width: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 0;
  background: var(--intent-surface-page);
  background-size: cover;
  background-position: center;
  box-shadow:
    inset 0 0 0 1px var(--intent-surface-line),
    0 12px 26px color-mix(in srgb, var(--color-ink) 5%, transparent);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  transition: box-shadow var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}

.workspace-avatar-cropper__stage:hover,
.workspace-avatar-cropper__stage:focus-visible {
  outline: none;
  box-shadow:
    inset 0 0 0 1px var(--intent-surface-line-strong),
    0 15px 32px color-mix(in srgb, var(--color-ink) 8%, transparent);
}

.workspace-avatar-cropper__stage.has-photo {
  cursor: grab;
}

.workspace-avatar-cropper__stage.has-photo:active {
  cursor: grabbing;
}

.workspace-avatar-cropper__img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.workspace-avatar-cropper__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--intent-text-secondary);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.1;
  text-align: center;
}

.workspace-avatar-cropper__placeholder[hidden] {
  display: none;
}

.workspace-avatar-cropper__empty-art {
  width: 84px;
  height: 84px;
  display: block;
  color: var(--intent-text-secondary);
  opacity: 0.82;
}

.workspace-avatar-cropper__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 3px var(--intent-surface-raised),
    inset 0 0 0 5px var(--intent-surface-line);
  pointer-events: none;
}

.workspace-avatar-cropper__zoom {
  --workspace-avatar-zoom-progress: 0%;
  width: 220px;
  max-width: 100%;
  height: 34px;
  margin: -2px 0 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.workspace-avatar-cropper__zoom:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--color-forest) 34%, transparent);
  outline-offset: 2px;
}

.workspace-avatar-cropper__zoom::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: var(--radius-pill);
  background:
    linear-gradient(
      90deg,
      var(--color-ink) 0 var(--workspace-avatar-zoom-progress),
      color-mix(in srgb, var(--color-ink) 10%, var(--intent-surface-page)) var(--workspace-avatar-zoom-progress) 100%
    );
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-ink) 12%, transparent);
}

.workspace-avatar-cropper__zoom::-webkit-slider-thumb {
  width: 26px;
  height: 26px;
  margin-top: -9px;
  border: 3px solid var(--popup-bg);
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-ink);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--color-ink) 18%, transparent),
    0 6px 15px color-mix(in srgb, var(--color-ink) 18%, transparent);
}

.workspace-avatar-cropper__zoom::-moz-range-track {
  height: 8px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-ink) 10%, var(--intent-surface-page));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-ink) 12%, transparent);
}

.workspace-avatar-cropper__zoom::-moz-range-progress {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-ink);
}

.workspace-avatar-cropper__zoom::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid var(--popup-bg);
  border-radius: 50%;
  background: var(--color-ink);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--color-ink) 18%, transparent),
    0 6px 15px color-mix(in srgb, var(--color-ink) 18%, transparent);
}

.workspace-avatar-cropper__zoom[disabled] {
  cursor: not-allowed;
}

.workspace-avatar-cropper__zoom[disabled]::-webkit-slider-runnable-track {
  background: color-mix(in srgb, var(--color-ink) 8%, var(--intent-surface-page));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-ink) 10%, transparent);
}

.workspace-avatar-cropper__zoom[disabled]::-webkit-slider-thumb {
  border: 3px solid var(--popup-bg);
  background: var(--color-ink);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--color-ink) 18%, transparent),
    0 5px 13px color-mix(in srgb, var(--color-ink) 16%, transparent);
}

.workspace-avatar-cropper__zoom[disabled]::-moz-range-track {
  background: color-mix(in srgb, var(--color-ink) 8%, var(--intent-surface-page));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-ink) 10%, transparent);
}

.workspace-avatar-cropper__zoom[disabled]::-moz-range-progress {
  background: transparent;
}

.workspace-avatar-cropper__zoom[disabled]::-moz-range-thumb {
  border: 3px solid var(--popup-bg);
  background: var(--color-ink);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--color-ink) 18%, transparent),
    0 5px 13px color-mix(in srgb, var(--color-ink) 16%, transparent);
}

.workspace-avatar-cropper__hint {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--intent-text-secondary);
  text-align: center;
}

.workspace-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.workspace-fields--tight {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workspace-field {
  border-radius: 12px;
  background: var(--intent-surface-page);
  padding: 8px;
}

.workspace-field span {
  display: block;
  color: var(--intent-text-secondary);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 5px;
}

.workspace-field strong {
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.workspace-field small {
  display: block;
  margin-top: 4px;
  color: var(--intent-text-secondary);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.25;
}

.workspace-two-column--flat .workspace-fields,
.workspace-two-column--flat .workspace-list-stack,
.workspace-two-column--flat .workspace-mini-list {
  margin-top: 10px;
}

.workspace-two-column--flat .workspace-field {
  border-radius: 0;
  background: transparent;
  padding: 10px 0;
  border-bottom: 1px solid var(--intent-surface-line);
}

.workspace-two-column--flat .workspace-field span {
  margin-bottom: 4px;
}

.workspace-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 8px;
  margin-top: 10px;
}

.workspace-form--single {
  grid-template-columns: 1fr;
}

.workspace-input {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding-top: 9px;
}

.workspace-input--wide,
.workspace-form__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-input > span:not(.jp-date-field) {
  position: absolute;
  top: 2px;
  left: 22px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 36px);
  border-radius: var(--radius-pill);
  background: var(--workspace-control-bg);
  padding: 0 6px;
  color: var(--color-ink-soft);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.workspace-input > .jp-date-field {
  width: 100%;
}

.workspace-input small {
  margin-left: 10px;
  color: var(--intent-text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
}

.workspace-input__counter {
  justify-self: end;
  margin: 0 18px 0 0;
}

.workspace-input__error {
  color: var(--color-alert-red);
}

.workspace-input input,
.workspace-input select,
.workspace-input textarea {
  min-width: 0;
  width: 100%;
  border: 1.5px solid var(--workspace-control-border);
  background: var(--workspace-control-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.workspace-input input,
.workspace-input select {
  height: 52px;
  border-radius: 999px;
  padding: 0 23px;
  line-height: 52px;
}

.workspace-input textarea {
  min-height: 112px;
  resize: vertical;
  border-radius: 24px;
  padding: 20px 23px 14px;
  line-height: 1.45;
}

.workspace-input textarea.workspace-profile-bio-input {
  height: 196px;
  min-height: 196px;
  resize: none;
}

[data-journal-draft-form] .workspace-input textarea {
  border-radius: 8px;
}

.workspace-journal-cover-control__grid {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(220px, 1fr);
  gap: 10px;
}

.workspace-journal-cover-preview {
  position: relative;
  isolation: isolate;
  min-height: 180px;
  overflow: hidden;
  border: 1.5px dashed var(--popup-border-strong);
  border-radius: 18px;
  background-color: var(--popup-bg-soft);
  background-position: center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  padding: 18px;
  cursor: pointer;
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.workspace-journal-cover-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--popup-bg) 76%, transparent);
  transition: background var(--duration-fast) var(--ease-standard);
}

.workspace-journal-cover-preview.is-loaded::before {
  background: color-mix(in srgb, var(--color-ink) 52%, transparent);
}

.workspace-journal-cover-preview:hover,
.workspace-journal-cover-preview:focus-within {
  border-color: var(--intent-surface-line-strong);
  box-shadow: var(--homepage-card-hover-shadow, var(--shadow-card-hover));
}

.workspace-journal-cover-preview strong,
.workspace-journal-cover-preview small {
  position: relative;
  z-index: 1;
  margin: 0;
}

.workspace-journal-cover-preview strong {
  color: var(--intent-text-primary);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.1;
}

.workspace-journal-cover-preview.is-loaded strong,
.workspace-journal-cover-preview.is-loaded small {
  color: var(--intent-text-on-brand);
}

.workspace-journal-cover-preview small,
.workspace-journal-cover-url small {
  margin-left: 0;
}

.workspace-input input.workspace-journal-cover-preview__file {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.workspace-journal-cover-url {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.workspace-journal-cover-url small {
  color: var(--intent-text-secondary);
  font-size: 11.5px;
  font-weight: 800;
}

.workspace-input input::placeholder,
.workspace-input textarea::placeholder {
  color: color-mix(in srgb, var(--color-ink-soft) 54%, transparent);
}

.workspace-input select {
  padding-right: 54px;
  background-image: url("/assets/header-icons/chevron-account.svg");
  background-position: right 22px center;
  background-size: 12px 12px;
  background-repeat: no-repeat;
}

.workspace-input input[readonly],
.workspace-input textarea[readonly] {
  color: var(--color-ink-soft);
  background-color: var(--workspace-control-bg-readonly);
}

.workspace-input.is-filled input,
.workspace-input.is-filled select,
.workspace-input.is-filled textarea {
  border-color: var(--workspace-control-border);
  box-shadow: none;
}

.workspace-input.is-error > span:not(.jp-date-field),
.workspace-input.is-error .workspace-input__error {
  color: var(--color-alert-red);
}

.workspace-input:focus-within > span:not(.jp-date-field) {
  background: var(--workspace-control-bg-focus);
}

.workspace-input.is-error input,
.workspace-input.is-error select,
.workspace-input.is-error textarea {
  border-color: var(--color-alert-red) !important;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--color-alert-red) 11%, transparent) !important;
  transition: box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.workspace-input input:focus,
.workspace-input select:focus,
.workspace-input textarea:focus {
  outline: none;
  border-color: var(--workspace-field-border-active);
  background-color: var(--workspace-control-bg-focus);
  box-shadow:
    0 0 0 3px var(--workspace-focus-ring);
}

.workspace-input.is-error input:focus,
.workspace-input.is-error select:focus,
.workspace-input.is-error textarea:focus {
  border-color: var(--color-alert-red) !important;
  background-color: var(--workspace-control-bg-focus);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--color-alert-red) 11%, transparent) !important;
}

.workspace-gender {
  --workspace-gender-active: var(--workspace-field-border-active, var(--color-forest));
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  min-inline-size: 0;
  margin: 0;
  border: 0;
  padding: 12px 0 0;
}

.workspace-gender legend {
  position: absolute;
  top: 0;
  left: 22px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  background: var(--workspace-control-bg);
  padding: 0 6px;
  color: var(--color-ink-soft);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.workspace-gender__choices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  min-height: 52px;
  padding: 12px 14px 0;
}

.workspace-gender__choice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  color: var(--color-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.workspace-gender__choice input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  border: 0;
  padding: 0;
  opacity: 0;
  appearance: auto;
  -webkit-appearance: radio;
  box-shadow: none;
  pointer-events: none;
}

.workspace-gender__mark {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 1.5px solid var(--workspace-control-border);
  border-radius: 50%;
  background: var(--workspace-control-bg);
  box-shadow: none;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.workspace-gender__choice:hover .workspace-gender__mark,
.workspace-gender__choice:focus-within .workspace-gender__mark {
  border-color: var(--workspace-gender-active);
  box-shadow: 0 0 0 3px var(--workspace-focus-ring);
}

.workspace-gender__choice input[type="radio"]:checked + .workspace-gender__mark {
  border-color: var(--workspace-gender-active);
  background:
    radial-gradient(circle, var(--intent-text-on-brand) 0 4px, transparent 4.5px),
    var(--workspace-gender-active);
}

.workspace-gender__custom {
  display: block;
}

.workspace-gender__custom.is-hidden {
  display: none;
}

.workspace-gender__custom input {
  width: 100%;
}

.workspace-gender__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.workspace-gender.is-error .workspace-gender__choice .workspace-gender__mark {
  box-shadow: none !important;
}

.workspace-gender.is-error .workspace-gender__choice input[type="radio"]:not(:checked) + .workspace-gender__mark {
  border-color: var(--workspace-control-border) !important;
}

.workspace-gender.is-error .workspace-gender__choice input[type="radio"]:checked + .workspace-gender__mark {
  border-color: var(--workspace-gender-active) !important;
}

.workspace-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.workspace-form-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: transparent;
  color: var(--intent-text-secondary);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.42;
  box-shadow: inset 0 0 0 1px var(--intent-surface-line);
}

.workspace-form-note strong {
  color: var(--intent-text-primary);
  font-weight: 900;
}

.workspace-form-subhead {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: var(--intent-text-primary);
}

.workspace-public-profile-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.workspace-public-profile-link span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.workspace-public-profile-link strong {
  color: var(--intent-text-primary);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.workspace-public-profile-link small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--intent-text-secondary);
}

.workspace-public-profile-link .workspace-button {
  --workspace-button-hover-scale: 1.035;
  flex: 0 0 auto;
  min-width: 86px;
  min-height: 40px;
  height: 40px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: var(--intent-text-on-brand);
  -webkit-text-fill-color: var(--intent-text-on-brand);
  font-size: 14px;
}

.workspace-public-profile-link .workspace-button::before {
  inset: 0;
  background: var(--intent-cta-ink);
  box-shadow: none;
}

.workspace-public-profile-link .workspace-button:hover::before,
.workspace-public-profile-link .workspace-button:focus-visible::before {
  transform: scale(var(--workspace-button-hover-scale));
  background: var(--intent-cta-ink);
  box-shadow: none;
}

.workspace-switch {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 87px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--intent-surface-line);
}

.workspace-switch > span:not(.workspace-switch__control) {
  order: 1;
}

.workspace-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.workspace-switch__control {
  order: 2;
  position: relative;
  width: 87px;
  height: 44px;
  border-radius: var(--radius-pill);
  pointer-events: none;
  flex: 0 0 auto;
}

.workspace-switch__control::before {
  content: "";
  position: absolute;
  top: 4px;
  right: 0;
  left: 0;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--workspace-control-bg);
  outline: 2px solid var(--color-ink);
  outline-offset: -2px;
  transition: background-color 0.2s ease, outline-color 0.2s ease;
}

.workspace-switch__control::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 4px;
  z-index: 2;
  width: 54px;
  height: 28px;
  border-radius: 14px;
  background: var(--color-ink);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease;
}

.workspace-switch__icon {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: block;
  width: 17px;
  height: 17px;
  color: var(--color-ink);
  background: currentColor;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.2s ease;
}

.workspace-switch__icon--off {
  right: 11px;
  opacity: 1;
  -webkit-mask: url("/assets/header-icons/close.svg") center / contain no-repeat;
  mask: url("/assets/header-icons/close.svg") center / contain no-repeat;
}

.workspace-switch__icon--on {
  left: 8px;
  width: 17px;
  height: 14px;
  color: var(--popup-bg);
  -webkit-mask: url("/assets/header-icons/check-toggle.svg") center / contain no-repeat;
  mask: url("/assets/header-icons/check-toggle.svg") center / contain no-repeat;
}

.workspace-switch input:checked + .workspace-switch__control::before {
  background: var(--color-forest);
  outline-color: var(--color-forest);
}

.workspace-switch input:checked + .workspace-switch__control::after {
  background: var(--workspace-control-bg-focus);
  transform: translateX(25px);
}

.workspace-switch input:checked + .workspace-switch__control .workspace-switch__icon--off {
  opacity: 0;
}

.workspace-switch input:checked + .workspace-switch__control .workspace-switch__icon--on {
  opacity: 1;
}

.workspace-switch strong,
.workspace-switch small {
  display: block;
}

.workspace-switch small {
  margin-top: 2px;
  color: var(--intent-text-secondary);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.35;
}

.workspace-settings-row--toggle .workspace-switch--inline {
  grid-column: auto;
  display: inline-flex;
  align-items: center;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.workspace-settings-row--toggle .workspace-switch--inline > span:not(.workspace-switch__control) {
  display: none;
}

.workspace-card--stack {
  align-content: start;
}

.workspace-card--form {
  min-height: 0;
}

.workspace-journal-editor-layout {
  display: grid;
  gap: 12px;
}

.workspace-journal-editor-panel {
  padding: clamp(14px, 2vw, 22px);
}

.workspace-journal-editor-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.workspace-journal-editor-layout .workspace-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 10px;
}

.workspace-journal-editor-layout .workspace-form .workspace-input:not(.workspace-input--wide) {
  grid-column: span 2;
}

.workspace-journal-editor-layout [data-journal-draft-form] textarea[name="body"] {
  min-height: 320px;
}

.workspace-mini-list,
.workspace-list-stack {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.workspace-mini-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 13px;
  background: var(--intent-surface-page);
  padding: 9px 11px;
  font-size: 11.5px;
  font-weight: 900;
}

.workspace-two-column--flat .workspace-mini-list {
  gap: 6px;
}

.workspace-two-column--flat .workspace-mini-list span {
  border-radius: 13px;
  background: var(--intent-surface-page);
  padding: 9px 11px;
}

.workspace-mini-list small {
  color: var(--intent-text-secondary);
  font-weight: 900;
}

.workspace-mini-list--preferences {
  gap: 10px;
  margin-top: 10px;
}

.workspace-mini-list--preferences span {
  min-height: 60px;
  padding: 15px 18px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  line-height: 1.2;
}

.workspace-mini-list--preferences small {
  font-size: 15px;
}

.workspace-list-card {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-radius: 13px;
  background: transparent;
  padding: 8px;
}

.workspace-two-column--flat .workspace-list-stack {
  gap: 0;
}

.workspace-two-column--flat .workspace-list-card {
  position: relative;
  align-items: flex-start;
  border-radius: 16px;
  background: transparent;
  padding: 12px 10px;
  margin: 0 -10px;
  border-bottom: 1px solid var(--intent-surface-line);
  transition:
    background var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.workspace-two-column--flat .workspace-list-card:hover,
.workspace-two-column--flat .workspace-list-card:focus-within {
  background: transparent;
  box-shadow: var(--homepage-card-hover-shadow, var(--shadow-card-hover));
}

.workspace-list-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.1;
}

.workspace-list-card p,
.workspace-list-card small {
  display: block;
  margin: 5px 0 0;
  color: var(--intent-text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
}

.workspace-list-card__actions {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.workspace-list-card--danger {
  border-color: color-mix(in srgb, var(--intent-feedback-alert) 24%, var(--workspace-panel-border));
}

.workspace-switch.is-locked {
  opacity: 0.72;
}

.workspace-list-card--notification .workspace-list-card__actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace-icon-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--intent-text-primary);
  cursor: pointer;
  transition: none;
}

.workspace-icon-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: var(--workspace-close-hover-surface);
  opacity: 0;
  transform: scale(.94);
  pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease-standard);
}

.workspace-icon-button:hover,
.workspace-icon-button:focus-visible {
  background-color: transparent;
  filter: none;
  outline: none;
}

.workspace-icon-button:hover::before,
.workspace-icon-button:focus-visible::before {
  opacity: 1;
  animation: header-auth-close-bounce 0.28s cubic-bezier(0.23, 1.3, 0.32, 1) both;
}

.workspace-icon-button img {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  display: block;
  transform: none;
  transition: none;
}

.workspace-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--workspace-soft-surface);
  color: var(--intent-text-primary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.workspace-status-pill--blocked {
  color: var(--color-alert-red);
}

.workspace-page .workspace-button--block-toggle {
  --workspace-block-toggle-color: color-mix(in srgb, var(--color-alert-red) 84%, var(--intent-cta-ink));
  color: var(--workspace-block-toggle-color);
}

.workspace-button--block-toggle::before {
  box-shadow: inset 0 0 0 3px var(--workspace-block-toggle-color);
}

.workspace-page .workspace-button--block-toggle.is-blocked {
  --workspace-block-toggle-color: var(--intent-brand-primary);
}

.workspace-page .workspace-button--restore {
  color: var(--intent-brand-primary);
}

.workspace-button--restore::before {
  box-shadow: inset 0 0 0 3px var(--intent-brand-primary);
}

.workspace-page .workspace-button--danger-outline {
  --workspace-danger-outline-color: color-mix(in srgb, var(--color-alert-red) 84%, var(--intent-cta-ink));
  color: var(--workspace-danger-outline-color);
}

.workspace-button--danger-outline::before {
  box-shadow: inset 0 0 0 3px var(--workspace-danger-outline-color);
}

.workspace-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.workspace-chip-grid--cookie {
  width: min(100%, 520px);
  min-height: 62px;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: stretch;
  padding: 5px;
  border-radius: var(--radius-pill);
  background: var(--workspace-control-bg);
  box-shadow: inset 0 0 0 1.5px var(--workspace-control-border);
}

.workspace-chip {
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--workspace-soft-surface);
  color: var(--intent-text-primary);
  min-height: 32px;
  padding: 0 11px;
  font-weight: 900;
  cursor: pointer;
}

.workspace-chip-grid--cookie .workspace-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1 1 0;
  justify-content: center;
  gap: 0;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  overflow: hidden;
  background: transparent;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 650;
  line-height: 1;
  transition:
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.workspace-chip-grid--cookie .workspace-chip::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 14px;
  flex: 0 0 0;
  background: currentColor;
  opacity: 0;
  transform: translateX(4px) scale(0.82);
  transition: opacity 0.2s ease, transform 0.2s ease;
  -webkit-mask: url("/assets/header-icons/check-toggle.svg") center / contain no-repeat;
  mask: url("/assets/header-icons/check-toggle.svg") center / contain no-repeat;
}

.workspace-chip:hover,
.workspace-chip:focus-visible,
.workspace-chip.is-active {
  background-color: var(--workspace-hover-surface);
  outline: none;
}

.workspace-chip-grid--cookie .workspace-chip:hover,
.workspace-chip-grid--cookie .workspace-chip:focus-visible {
  background-color: var(--workspace-hover-surface);
}

.workspace-chip-grid--cookie .workspace-chip:focus-visible {
  box-shadow: inset 0 0 0 2px var(--workspace-focus-ring);
}

.workspace-chip-grid--cookie .workspace-chip.is-active,
.workspace-chip-grid--cookie .workspace-chip.is-active:hover,
.workspace-chip-grid--cookie .workspace-chip.is-active:focus-visible {
  background: var(--color-ink);
  color: var(--intent-text-on-brand);
  box-shadow: none;
}

.workspace-chip-grid--cookie .workspace-chip.is-active::before {
  width: 18px;
  flex-basis: 18px;
  margin-right: 8px;
  opacity: 1;
  transform: translateX(0) scale(1);
}

.workspace-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: fit-content;
  min-width: min(248px, calc(100vw - 40px));
  max-width: min(493px, calc(100vw - 40px));
  min-height: 46px;
  transform: translate(-50%, 20px) scale(0.94);
  opacity: 0;
  filter: blur(4px);
  pointer-events: none;
  z-index: 11000;
  border-radius: var(--radius-pill);
  background: var(--color-forest);
  color: var(--intent-text-on-brand);
  outline: 1px solid var(--color-forest-dark);
  outline-offset: -1px;
  padding: 11px 32px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  box-shadow:
    0 24px 56px color-mix(in srgb, var(--color-forest-dark) 52%, transparent),
    0 4px 16px color-mix(in srgb, var(--color-ink) 16%, transparent);
  transition: opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1), transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), filter 0.34s ease;
}

.workspace-toast.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translate(-50%, 0) scale(1);
}

@media (max-width: 1180px) {
  .workspace-shell {
    grid-template-columns: 258px minmax(0, 1fr);
  }

  .workspace-message-shell,
  .workspace-message-shell--list {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .workspace-message-context {
    position: static;
    grid-column: 2;
    width: 100%;
  }
  .workspace-thread__head {
    grid-template-columns: 1fr;
  }
  .workspace-thread__head-actions {
    justify-self: stretch;
    max-width: none;
  }
  .workspace-card-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .workspace-overview-next__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px), (pointer: coarse) {
  body.workspace-dashboard-page .fixed-header .header-mobile-414 {
    display: block !important;
    pointer-events: none !important;
  }

  body.workspace-dashboard-page .fixed-header .header-mobile-top,
  body.workspace-dashboard-page .fixed-header .header-mobile-divider,
  body.workspace-dashboard-page .fixed-header .header-mobile-search-page,
  body.workspace-dashboard-page .fixed-header .header-mobile-search {
    pointer-events: none;
  }

  body.workspace-dashboard-page .fixed-header.is-mobile-414 {
    height: 0 !important;
    min-height: 0 !important;
  }

  body.workspace-dashboard-page .fixed-header .header-desktop-shell,
  body.workspace-dashboard-page .fixed-header .header-mobile-top,
  body.workspace-dashboard-page .fixed-header .header-mobile-divider {
    display: none !important;
  }

  body.workspace-dashboard-page .fixed-header .header-mobile-search-page,
  body.workspace-dashboard-page .fixed-header .header-mobile-search {
    display: none !important;
  }

  body.workspace-dashboard-page .fixed-header {
    height: auto;
    min-height: 0;
    pointer-events: auto;
  }

  body.workspace-dashboard-page .fixed-header::before,
  body.workspace-dashboard-page .fixed-header::after {
    display: none !important;
  }

  body.workspace-dashboard-page .fixed-header .header-mobile-bottom-bar {
    pointer-events: auto !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100%;
    max-width: 100%;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 120 !important;
    transform: none !important;
    height: var(--mobile-bottom-nav-height, 72px);
    min-height: var(--mobile-bottom-nav-height, 72px);
  }

  body.workspace-dashboard-page .fixed-header .header-mobile-bottom-bar::before {
    pointer-events: none;
  }

  body.workspace-dashboard-page .fixed-header .header-mobile-bottom-bar,
  body.workspace-dashboard-page .fixed-header .header-mobile-bottom-bar * {
    pointer-events: auto !important;
  }

  body.workspace-dashboard-page .fixed-header.is-mobile-search-page-open .header-mobile-bottom-bar {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  body.workspace-dashboard-page .workspace-view {
    padding-bottom: calc(12px + var(--mobile-bottom-nav-height, 72px));
  }

  body.workspace-dashboard-page .workspace-footer {
    padding-bottom: calc(16px + var(--mobile-bottom-nav-height, 72px));
  }

  body.workspace-page.is-workspace-nav-open {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .workspace-shell {
    display: block;
  }

  .workspace-sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    background: color-mix(in srgb, var(--color-ink) 34%, transparent);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-fast) var(--ease-standard);
  }

  .workspace-shell.is-mobile-nav-open .workspace-sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .workspace-sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    max-height: 100vh;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--intent-surface-line);
    padding: 8px 11px;
    gap: 7px;
    box-shadow: none;
  }

  .workspace-shell.is-mobile-nav-open .workspace-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(84vw, 318px);
    max-width: calc(100vw - 30px);
    height: 100vh;
    height: 100dvh;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 18px calc(18px + env(safe-area-inset-bottom, 0px));
    border-right: 1px solid var(--intent-surface-line);
    border-bottom: 0;
    box-shadow: 0 24px 56px color-mix(in srgb, var(--color-ink) 22%, transparent);
    animation: workspace-sidebar-mobile-in 0.24s var(--ease-standard) both;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .workspace-sidebar > :not(.workspace-brand) {
    display: none;
  }

  .workspace-account-board__head {
    display: grid;
    gap: 10px;
  }

  .workspace-account-board__score {
    justify-items: stretch;
    width: min(100%, 180px);
    min-width: 0;
  }

  .workspace-account-board__score strong,
  .workspace-account-board__score small {
    text-align: left;
  }

  .workspace-account-board__row {
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
  }

  .workspace-account-board__action {
    grid-column: 2;
    justify-content: flex-start;
    padding-top: 2px;
  }

  .workspace-settings-shell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: none;
    margin: 0;
  }

  .workspace-settings-nav {
    position: static;
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 0 0 8px;
    scroll-padding-inline: 12px;
    -webkit-overflow-scrolling: touch;
    transform: none;
  }

  .workspace-settings-nav__item {
    flex: 0 0 auto;
    font-size: 12px;
    white-space: nowrap;
  }

  .workspace-settings-main {
    gap: 22px;
  }

  .workspace-settings-hero h2 {
    font-size: 24px;
  }

  .workspace-settings-hero p {
    font-size: 14.5px;
  }

  .workspace-settings-form {
    gap: 24px;
  }

  .workspace-settings-section {
    gap: 12px;
  }

  .workspace-settings-section h3 {
    font-size: 19px;
  }

  .workspace-settings-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 10px 0;
  }

  .workspace-settings-row__action {
    justify-content: flex-start;
  }

  .workspace-settings-row--toggle {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .workspace-settings-row--toggle .workspace-switch {
    justify-self: end;
  }

  .workspace-settings-tabs {
    gap: 16px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .workspace-settings-tabs span {
    flex: 0 0 auto;
    font-size: 13px;
  }

  .workspace-recommendation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .workspace-settings-heading-row {
    align-items: flex-start;
  }

  .workspace-brand {
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    gap: 10px;
  }

  .workspace-brand .workspace-sidebar__toggle {
    display: inline-flex;
    order: -1;
    flex: 0 0 auto;
  }

  .workspace-shell.is-mobile-nav-open .workspace-profile-card {
    display: grid;
  }

  .workspace-shell.is-mobile-nav-open .workspace-service-links {
    display: grid;
  }

  .workspace-shell.is-mobile-nav-open .workspace-mode,
  .workspace-shell.is-mobile-nav-open .workspace-nav {
    display: grid;
  }

  .workspace-topbar {
    position: static;
    grid-template-columns: 1fr;
    min-height: auto;
    height: auto;
    padding: 12px 15px;
  }

  .workspace-search {
    max-width: none;
    min-width: 0;
  }

  .workspace-main {
    min-height: auto;
    height: auto;
    overflow: visible;
  }

  .workspace-view {
    padding: 12px 15px;
    overflow: visible;
  }

  .workspace-footer {
    display: grid;
    justify-items: start;
    padding: 12px;
    border-radius: 20px 20px 0 0;
  }

  .workspace-footer__locale,
  .workspace-footer nav {
    justify-content: flex-start;
  }

  .workspace-message-shell,
  .workspace-message-shell--list,
  .workspace-two-column {
    grid-template-columns: 1fr;
  }

  .workspace-two-column--flat {
    gap: 12px;
  }

  .workspace-two-column--flat > .workspace-panel {
    padding-right: 0;
  }

  .workspace-two-column--flat > .workspace-card {
    padding-left: 0;
    padding-top: 12px;
    border-left: 0;
    border-top: 1px solid var(--intent-surface-line);
  }

  .workspace-folder-panel,
  .workspace-message-context {
    position: static;
  }

  .workspace-message-shell--list .workspace-folder-panel {
    margin-right: 0;
    padding-right: 0;
    border-right: 0;
  }

  .workspace-message-context {
    grid-column: auto;
  }

  .workspace-message-shell--thread .workspace-folder-panel {
    display: none;
  }

  .workspace-message-shell--thread .workspace-thread {
    order: 1;
    display: flex;
    height: min(680px, calc(100dvh - 220px));
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
  }

  .workspace-message-shell--thread .workspace-message-context {
    order: 2;
  }

  .workspace-message-row {
    grid-template-columns: 30px 44px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 2px;
    min-height: 64px;
    padding-block: 8px;
    align-items: center;
  }

  .workspace-message-row__check {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 30px;
    min-height: 44px;
  }

  .workspace-message-row__star {
    display: none;
  }

  .workspace-message-row__avatar {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 44px;
    height: 44px;
    align-self: center;
    justify-self: center;
  }

  .workspace-message-row__name {
    grid-column: 3;
    grid-row: 1;
    align-self: end;
    min-width: 0;
    font-size: 14.5px;
    line-height: 1.08;
  }

  .workspace-message-row__subject {
    display: block;
    grid-column: 3;
    grid-row: 2;
    align-self: start;
    min-width: 0;
    margin-top: 2px;
    font-size: 11.5px;
    line-height: 1.25;
  }

  .workspace-message-row__date {
    grid-column: 4;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .workspace-thread__head {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: center;
  }

  .workspace-thread__head-actions {
    justify-self: stretch;
    max-width: none;
  }

  .workspace-thread__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .workspace-composer {
    position: static;
    bottom: auto;
    z-index: 2;
    border-radius: 0 0 20px 20px;
    background: var(--intent-surface-page);
  }

  .workspace-fields,
  .workspace-form,
  .workspace-card-row {
    grid-template-columns: 1fr;
  }

  .workspace-journal-editor-layout .workspace-form,
  .workspace-journal-cover-control__grid {
    grid-template-columns: 1fr;
  }

  .workspace-journal-editor-layout .workspace-form .workspace-input:not(.workspace-input--wide) {
    grid-column: 1 / -1;
  }

  .workspace-account-hero {
    grid-template-columns: 44px auto minmax(0, 1fr);
    gap: 10px;
  }

  .workspace-avatar--large {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

@media (max-width: 560px) {
  .workspace-search {
    height: 42px;
  }

  .workspace-page .workspace-search__input {
    height: 42px;
    padding: 0 17px 0 54px;
    font-size: 13px;
  }

  .workspace-page .workspace-search__button {
    top: 4px;
    left: 4px;
    bottom: 4px;
    width: 34px;
    min-width: 34px;
  }

  .workspace-search__button-icon {
    width: 15px;
    height: 15px;
  }

  .workspace-nav__item {
    min-height: 38px;
  }

  .workspace-thread__head {
    gap: 7px;
    padding: 8px 10px;
  }

  .workspace-public-profile-preview {
    padding: 14px;
  }

  .workspace-public-profile-preview__head {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
  }

  .workspace-public-profile-preview__avatar {
    width: 52px;
    height: 52px;
  }

  .workspace-public-profile-preview__cover {
    min-height: 86px;
    padding: 14px;
  }

  .workspace-public-profile-link {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .workspace-public-profile-link .workspace-button {
    justify-self: start;
  }

  .workspace-public-profile-preview__cover-remove {
    top: 9px;
    right: 9px;
    width: 38px;
    height: 38px;
  }

  .workspace-public-profile-preview__cover-upload {
    top: 9px;
    right: 55px;
    height: 38px;
    padding: 0 11px;
    font-size: 11.5px;
  }

  .workspace-public-profile-preview__cover-upload img {
    width: 15px;
    height: 15px;
  }

  .workspace-thread__head-actions {
    grid-template-columns: minmax(68px, 1fr) auto auto;
    gap: 4px;
  }

  .workspace-thread__search {
    min-width: 0;
  }

  .workspace-thread__search input {
    height: 40px;
    padding: 0 34px 0 13px;
    font-size: 12px;
  }

  .workspace-thread__head-actions .workspace-button {
    width: auto;
    min-height: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 12px;
  }

  .workspace-bubble {
    width: 100%;
  }

  .workspace-composer__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .workspace-attach {
    gap: 5px;
    min-width: 0;
  }

  .workspace-attach img {
    width: 16px;
    height: 16px;
  }

  .workspace-attach .workspace-attach__btn {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    min-height: 44px;
    max-height: 44px;
    height: 44px;
    aspect-ratio: 1 / 1;
    gap: 0;
    padding: 0;
    border-radius: 50%;
    font-size: 11.2px;
  }

  .workspace-composer__actions > .workspace-button {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    min-height: 44px;
    max-height: 44px;
    height: 44px;
    aspect-ratio: 1 / 1;
    padding: 0;
    border-radius: 50%;
    font-size: 12.5px;
  }

  .workspace-composer textarea {
    min-height: 62px;
  }

  .workspace-avatar-dialog {
    --workspace-avatar-mobile-top: clamp(84px, 13dvh, 128px);
    padding: calc(env(safe-area-inset-top, 0px) + var(--workspace-avatar-mobile-top)) 0 0;
    place-items: end stretch;
    overflow: hidden;
  }

  .workspace-avatar-dialog__close {
    display: none;
    top: 8px;
    left: auto;
    right: 14px;
    width: 44px;
    height: 44px;
    background: transparent;
    box-shadow: none;
    filter: none;
    z-index: 4;
  }

  .workspace-avatar-dialog__panel {
    width: 100%;
    max-width: 100%;
    height: calc(100vh - (env(safe-area-inset-top, 0px) + var(--workspace-avatar-mobile-top)));
    height: calc(100dvh - (env(safe-area-inset-top, 0px) + var(--workspace-avatar-mobile-top)));
    max-height: none;
    display: flex;
    flex-direction: column;
    gap: 19px;
    padding: 0 20px calc(22px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translateY(0);
    transition: transform 0.19s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .workspace-avatar-dialog.is-sheet-dragging .workspace-avatar-dialog__panel {
    transform: translateY(var(--workspace-avatar-sheet-drag-y, 0px));
    transition: none;
  }

  .workspace-avatar-dialog.is-sheet-settling .workspace-avatar-dialog__panel,
  .workspace-avatar-dialog.is-sheet-closing .workspace-avatar-dialog__panel {
    transform: translateY(var(--workspace-avatar-sheet-drag-y, 0px));
  }

  .workspace-avatar-dialog__panel::before {
    content: "";
    display: block;
    position: sticky;
    top: 0;
    z-index: 1;
    flex: 0 0 44px;
    min-height: 44px;
    width: calc(100% + 40px);
    margin: 0 -20px;
    border-radius: var(--popup-sheet-radius, 22px 22px 0 0);
    background: var(--popup-sheet-grip-pseudo-bg);
    cursor: grab;
    touch-action: none;
    user-select: none;
  }

  .workspace-avatar-dialog__head {
    flex: 0 0 auto;
  }

  .workspace-avatar-dialog__head h2 {
    font-size: var(--popup-title-size, 25px);
    line-height: var(--popup-title-line-height, 1.16);
  }

  .workspace-avatar-dialog__options {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 -6px;
    padding: 0 6px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .workspace-avatar-dialog__preview {
    width: 84px;
    height: 84px;
    font-size: 24px;
  }

  .workspace-avatar-dialog__dropzone {
    flex: 0 0 auto;
    min-height: 236px;
    padding: 24px 18px;
    border-radius: 22px;
  }

  .workspace-avatar-dialog__frame {
    padding: 0;
  }

  .workspace-avatar-dialog__frame-icon {
    right: 5px;
    bottom: 5px;
    width: 30px;
    height: 30px;
  }

  .workspace-avatar-dialog__frame-icon::before {
    inset: 7px;
  }

  .workspace-avatar-dialog__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    flex: 0 0 auto;
  }

  .workspace-avatar-dialog__actions .workspace-button {
    width: 100%;
  }

  .workspace-composer__actions .workspace-button {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    padding: 0;
    border-radius: 50%;
  }

  .workspace-footer a {
    min-height: 34px;
    padding: 0 8px;
  }

  .workspace-footer__locale .site-footer__locale-trigger {
    min-height: 34px;
    padding-inline: 10px;
  }
}

/* ============================================================
   Mobile dashboard polish — visible header, in-header search,
   folder chips and chat fit.
   The shared site header paints a cream `.header-mobile-414`
   panel across the top on touch / narrow layouts. With its inner
   content hidden it still left a 68px cream block (pointer-events
   off) covering the workspace's own app bar — so the menu button
   read as "there but invisible" and the search dropped below it.
   Neutralise that block (its only live child here is the fixed
   bottom nav, which keeps working at height:0) and tidy the rest.
   ============================================================ */
@media (max-width: 880px), (pointer: coarse) {
  body.workspace-dashboard-page .fixed-header .header-mobile-414 {
    background: transparent !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  /* The locale + copyright/links footer is desktop chrome; hide it on the
     phone where the bottom nav already covers navigation. */
  body.workspace-dashboard-page .workspace-footer {
    display: none;
  }

  /* App bar: menu button + logo on the left, search filling the rest —
     the search now lives up here next to the logo, not on its own row. */
  .workspace-sidebar {
    padding: 8px 14px;
    gap: 10px;
  }

  .workspace-brand .workspace-sidebar__toggle {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
  }

  .workspace-brand .workspace-brand__mark {
    flex: 0 0 auto;
  }

  .workspace-brand .workspace-brand__mark img {
    width: 88px;
  }

  /* In the open drawer the logo can return to full size. */
  .workspace-shell.is-mobile-nav-open .workspace-brand .workspace-brand__mark img {
    width: 109px;
  }

  .workspace-brand .workspace-search {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    margin-left: 4px;
  }

  /* The app bar's search is for the workspace; the open drawer has its own
     navigation, so hide the search there to keep the drawer clean. */
  .workspace-shell.is-mobile-nav-open .workspace-brand .workspace-search {
    display: none;
  }

  /* Topbar now only carries the page title; let it sit tight under the bar. */
  .workspace-topbar {
    grid-template-columns: 1fr;
    align-items: center;
    gap: 4px;
    padding: 9px 15px;
  }

  .workspace-topbar__title {
    min-width: 0;
  }

  .workspace-kicker,
  .workspace-topbar h1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  /* Messages: folders become a horizontal, swipeable chip row instead
     of a tall vertical list that pushed the conversations off-screen. */
  .workspace-message-shell--list .workspace-folder-panel {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 2px 0 10px;
    border-right: 0;
    border-bottom: 1px solid var(--intent-surface-line);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .workspace-message-shell--list .workspace-folder-panel::-webkit-scrollbar {
    display: none;
  }

  .workspace-message-shell--list .workspace-folder {
    width: auto;
    flex: 0 0 auto;
    height: 34px;
    min-height: 34px;
    padding: 0 13px;
    gap: 7px;
    border-radius: 999px;
    background: var(--workspace-soft-surface);
  }

  .workspace-message-shell--list .workspace-folder.is-active {
    background: var(--intent-cta-ink);
    color: var(--intent-text-on-brand);
  }

  .workspace-message-shell--list .workspace-folder.is-active strong {
    color: inherit;
  }

  /* Bulk actions: one nowrap, swipeable row rather than wrapping lines. */
  .workspace-message-shell--list .workspace-toolbar {
    flex-wrap: nowrap;
    min-height: 0;
    gap: 6px;
    padding: 8px 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .workspace-message-shell--list .workspace-toolbar::-webkit-scrollbar {
    display: none;
  }

  .workspace-message-shell--list .workspace-select-all,
  .workspace-message-shell--list .workspace-tool {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* Chat: the thread fills the screen so the composer sits just above the
     bottom nav — no stray panel peeking underneath. */
  .workspace-message-shell--thread .workspace-thread {
    height: min(720px, calc(100dvh - 132px - var(--mobile-bottom-nav-height, 72px)));
  }

  /* The conversation-details panel is desktop side content; on a phone the
     chat itself is the screen, so drop it here (keeps things clean). */
  .workspace-message-shell--thread .workspace-message-context {
    display: none;
  }

  /* Composer actions: icon-only attach buttons so the row never overflows
     and the Send button is always fully visible. */
  .workspace-composer__actions {
    gap: 6px;
  }

  .workspace-attach {
    gap: 6px;
    flex: 0 1 auto;
    min-width: 0;
  }

  .workspace-attach .workspace-attach__btn {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    min-height: 44px;
    max-height: 44px;
    height: 44px;
    aspect-ratio: 1 / 1;
    padding: 0;
    gap: 0;
    border-radius: 50%;
    justify-content: center;
    box-shadow: none;
  }

  .workspace-attach .workspace-attach__btn span {
    display: none;
  }

  .workspace-attach .workspace-attach__btn img,
  .workspace-attach .workspace-attach__btn svg {
    width: 18px;
    height: 18px;
  }

  .workspace-composer__actions > .workspace-button {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    min-height: 44px;
    max-height: 44px;
    height: 44px;
    aspect-ratio: 1 / 1;
    padding: 0;
    border-radius: 50%;
  }

  /* ----------------------------------------------------------------
     Full-screen conversation on mobile.
     An open chat hides the workspace app bar, the bottom nav and the
     footer, then fills the viewport: header + messages + composer, with
     an X in the header to close back to the inbox. Like a real messenger.
     ---------------------------------------------------------------- */
  body.workspace-dashboard-page.is-thread-open {
    overflow: hidden;
  }

  body.workspace-dashboard-page.is-thread-open .workspace-sidebar,
  body.workspace-dashboard-page.is-thread-open .workspace-topbar,
  body.workspace-dashboard-page.is-thread-open .workspace-footer {
    display: none !important;
  }

  body.workspace-dashboard-page.is-thread-open .fixed-header .header-mobile-bottom-bar {
    display: none !important;
  }

  body.workspace-dashboard-page.is-thread-open .workspace-main {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  body.workspace-dashboard-page.is-thread-open .workspace-view {
    height: 100dvh;
    min-height: 0;
    padding: 0;
  }

  body.is-thread-open .workspace-message-shell--thread {
    height: 100dvh;
  }

  body.is-thread-open .workspace-message-shell--thread .workspace-thread {
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  /* Conversation header acts as the app bar: [X]  avatar + name  [unread] */
  .workspace-thread__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-areas:
      "title close"
      "tools tools"
      "mobile mobile";
    align-items: center;
    gap: 8px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px;
    background: var(--intent-surface-page);
  }

  .workspace-thread__head .workspace-thread__title {
    grid-area: title;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
    min-height: 48px;
    min-width: 0;
  }

  .workspace-thread__avatar {
    width: 44px;
    height: 44px;
    font-size: 13px;
  }

  .workspace-thread__title-copy {
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 44px;
  }

  .workspace-thread__head h2 {
    font-size: 16px;
    line-height: 1.08;
  }

  .workspace-thread__meta {
    margin-top: 0;
    font-size: 11.5px;
    line-height: 1.25;
  }

  /* Full-screen chat keeps the core thread tools reachable: close in the title
     row, then search + unread, then compact context actions. */
  body.is-thread-open .workspace-thread__head-actions {
    grid-area: tools;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    width: 100%;
    margin-left: 0;
    max-width: none;
  }

  body.is-thread-open .workspace-thread__head-actions .workspace-thread__search input {
    height: 36px;
    padding: 0 38px 0 12px;
    font-size: 11.5px;
  }

  body.is-thread-open .workspace-thread__head-actions .workspace-button {
    width: auto;
    min-width: 74px;
    min-height: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    justify-content: center;
  }

  body.is-thread-open .workspace-thread__head-actions .workspace-button__icon {
    display: none;
    width: 16px;
    height: 16px;
  }

  body.is-thread-open .workspace-thread__mobile-actions {
    grid-area: mobile;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 6px;
    min-width: 0;
    width: 100%;
    padding-top: 2px;
    overflow: visible;
  }

  body.is-thread-open .workspace-thread__mobile-actions::-webkit-scrollbar {
    display: none;
  }

  body.is-thread-open .workspace-thread__mobile-actions .workspace-button {
    min-width: 0;
    min-height: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    white-space: nowrap;
    justify-content: center;
  }

  .workspace-thread__head .workspace-button__label {
    display: inline;
  }

  body.is-thread-open .workspace-thread__close .workspace-button__label {
    display: none;
  }

  .workspace-thread__close {
    grid-area: close;
    justify-self: end;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;        /* always a circle (square box + 50%) */
    background: transparent;
    overflow: hidden;
    transition: background-color var(--duration-fast, 0.15s) var(--ease-standard, ease);
  }

  .workspace-thread__close::before {
    display: none;            /* no ghost ring; we control bg directly */
  }

  /* Back arrow, recoloured via CSS mask — sized for clear tap. */
  .workspace-thread__close .workspace-thread__close-icon {
    display: block;
    flex: 0 0 auto;
    width: 20px;
    min-width: 20px;
    height: 20px;
    min-height: 20px;
    background-color: var(--intent-text-primary);
    -webkit-mask: url("/assets/gift-room-icons/shared/arrow-left.svg") center / contain no-repeat;
    mask: url("/assets/gift-room-icons/shared/arrow-left.svg") center / contain no-repeat;
  }

  /* Hover / press: black circle, page-cream X. */
  .workspace-thread__close:hover,
  .workspace-thread__close:focus-visible,
  .workspace-thread__close:active {
    background: var(--intent-cta-ink);
    outline: none;
  }

  .workspace-thread__close:hover .workspace-thread__close-icon,
  .workspace-thread__close:focus-visible .workspace-thread__close-icon,
  .workspace-thread__close:active .workspace-thread__close-icon {
    background-color: var(--intent-surface-page);
  }

  /* Composer clears the home-indicator area now that the nav is gone. */
  body.is-thread-open .workspace-composer {
    padding-bottom: calc(7px + env(safe-area-inset-bottom, 0px));
  }
}

/* Public profile @handle availability indicator (live "name taken" feedback) */
.workspace-handle-status {
  margin-top: 4px;
  font-weight: 700;
}
.workspace-handle-status[data-state="checking"] {
  color: var(--intent-text-secondary, var(--color-ink-soft));
}
.workspace-handle-status[data-state="available"] {
  color: var(--color-forest);
}
.workspace-handle-status[data-state="taken"] {
  color: var(--intent-feedback-alert-strong, var(--color-alert-red));
}

/* ============================================================
   LOADING STATES — first-paint skeleton for the workspace view.
   user-dashboard.html renders the entire [data-workspace-view]
   pane from the deferred user-dashboard.js; this placeholder
   fills the gap until the first render() replaces the pane.
   Shown only while <body> carries .is-workspace-preparing
   (a 4500ms inline failsafe drops the class if JS never runs).
   Surfaces come from styles/components/skeleton.css (.jp-skeleton).
*/
.workspace-view-skeleton {
  display: none;
}

body.is-workspace-preparing .workspace-view-skeleton {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 6px 0 18px;
}

.workspace-view-skeleton__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 430px;
}

.workspace-view-skeleton__title {
  width: 46%;
}

.workspace-view-skeleton__lead {
  width: 74%;
}

.workspace-view-skeleton__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.workspace-view-skeleton__card {
  height: 168px;
}

.workspace-view-skeleton__rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
}

@media (max-width: 720px) {
  .workspace-view-skeleton__grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .workspace-view-skeleton__card {
    height: 128px;
  }
}
