/* Selected visual target: option 3 "Community Star Map".
   This file intentionally sits after styles.css to move the site closer to the approved mock. */

:root {
  --sm-bg: #eee8ed;
  --sm-bg-warm: #f7e9ef;
  --sm-bg-cool: #e7f0f1;
  --sm-paper: rgba(255, 253, 248, .86);
  --sm-paper-solid: #fffdf8;
  --sm-ink: #32263b;
  --sm-muted: #6e6373;
  --sm-faint: #9a909d;
  --sm-line: rgba(202, 184, 199, .64);
  --sm-line-strong: rgba(170, 146, 168, .78);
  --sm-rose: #c887a8;
  --sm-violet: #807fc9;
  --sm-blue: #a8c9e8;
  --sm-mint: #75d2c9;
  --sm-teal: #4698a8;
  --sm-cream: #fff1d2;
  --sm-shadow: 0 18px 46px rgba(54, 42, 64, .1);
  --sm-soft-shadow: 0 10px 26px rgba(54, 42, 64, .07);
  --sm-grid:
    linear-gradient(90deg, rgba(117, 101, 126, .06) 1px, transparent 1px),
    linear-gradient(rgba(117, 101, 126, .052) 1px, transparent 1px);
}

body {
  color: var(--sm-ink);
  background:
    radial-gradient(circle at 13% 8%, rgba(255, 222, 237, .76), transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(213, 231, 240, .82), transparent 34%),
    radial-gradient(circle at 70% 78%, rgba(200, 238, 232, .42), transparent 30%),
    var(--sm-grid),
    linear-gradient(135deg, var(--sm-bg-warm) 0%, var(--sm-bg) 48%, var(--sm-bg-cool) 100%);
  background-size: auto, auto, auto, 32px 32px, 32px 32px, auto;
}

.app-shell {
  width: min(1520px, calc(100vw - 28px));
  padding: 14px 0 48px;
}

.topbar {
  min-height: 64px;
  grid-template-columns: minmax(218px, auto) minmax(460px, 1fr) auto;
  padding: 8px 12px;
  border: 1px solid var(--sm-line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .22) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px),
    linear-gradient(120deg, rgba(255, 253, 248, .9), rgba(246, 237, 244, .82) 52%, rgba(232, 243, 243, .78));
  background-size: 28px 28px, 28px 28px, auto;
  box-shadow: 0 12px 34px rgba(54, 42, 64, .09);
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-color: rgba(117, 210, 201, .48);
}

.brand strong {
  font-size: 19px;
  color: var(--sm-ink);
}

.brand small {
  color: var(--sm-muted);
}

.main-nav {
  gap: 4px;
}

.nav-button {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 8px;
  color: #574d60;
}

.nav-button:hover,
.nav-button.is-active {
  color: #286c78;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(232, 249, 246, .7));
}

.nav-button::after {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sm-violet), var(--sm-mint));
}

.nav-submenu {
  min-width: 236px;
  padding: 8px;
  border: 1px solid var(--sm-line);
  background: rgba(255, 253, 248, .96);
  box-shadow: 0 18px 44px rgba(54, 42, 64, .14);
  backdrop-filter: blur(14px);
}

.nav-subitem {
  min-height: 72px;
  padding: 11px 12px;
  border-radius: 8px;
}

.nav-subitem small {
  line-height: 1.45;
}

.button,
.icon-button,
.chip-button,
.option-button,
.admin-tab {
  border-radius: 8px;
}

.button {
  min-height: 44px;
  border: 1px solid var(--sm-line);
  background: rgba(255, 253, 248, .9);
  color: #463b4f;
}

.button.primary {
  border-color: rgba(70, 152, 168, .55);
  background: linear-gradient(135deg, #827ed0 0%, #50b9c4 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(70, 152, 168, .24);
}

.button.secondary {
  border-color: rgba(117, 210, 201, .42);
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(239, 253, 250, .88));
  color: #386771;
}

.button.ghost {
  background: transparent;
  box-shadow: none;
}

.button.compact,
.button.secondary.compact {
  min-height: 38px;
  padding: 0 14px;
}

.pill,
.entry-kicker,
.auth-pill,
.palette-brand-action,
.workbench-pick-tag {
  border: 1px solid rgba(117, 210, 201, .38);
  background: linear-gradient(90deg, rgba(235, 233, 255, .88), rgba(227, 249, 245, .88));
  color: #52607d;
  font-weight: 700;
}

/* Homepage: closer to the selected concept, with hero + content-first preview. */
.home-cover {
  min-height: 650px;
  grid-template-columns: minmax(410px, .9fr) minmax(520px, 1.1fr);
  gap: clamp(28px, 5vw, 76px);
  padding: clamp(48px, 6vw, 78px);
  border: 1px solid var(--sm-line);
  background:
    radial-gradient(circle at 24% 30%, rgba(255, 255, 255, .42), transparent 28%),
    radial-gradient(circle at 74% 58%, rgba(190, 235, 229, .38), transparent 34%),
    var(--sm-grid),
    linear-gradient(135deg, #f8e7ee 0%, #eee8ed 50%, #e3eef0 100%);
  background-size: auto, auto, 34px 34px, 34px 34px, auto;
  box-shadow: 0 26px 70px rgba(54, 42, 64, .13);
}

.home-cover::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .46), transparent 36%),
    radial-gradient(circle at 75% 38%, rgba(255, 255, 255, .3), transparent 28%);
}

.home-copy {
  max-width: 610px;
  padding-top: 12px;
}

.home-copy h1 {
  max-width: 630px;
  margin: 20px 0 18px;
  color: #625174;
  background: linear-gradient(135deg, #654e74 0%, #94698b 44%, #4a9aa8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-copy p {
  max-width: 560px;
  color: #5f5666;
}

.home-actions {
  margin-top: 28px;
}

.home-visual {
  min-height: 560px;
}

.home-saturn-art {
  width: min(665px, 100%);
  filter: drop-shadow(0 28px 42px rgba(76, 60, 86, .13));
}

.home-pixel-star {
  color: var(--sm-mint);
  opacity: .9;
  animation: star-map-pulse 2.8s steps(2) infinite;
}

.home-orbit-grid {
  display: grid;
  grid-template-columns: 1.1fr .95fr .95fr;
  gap: 14px;
  margin-top: 16px;
}

.home-orbit-card,
.home-community-preview {
  border: 1px solid var(--sm-line);
  border-radius: 8px;
  background:
    var(--sm-grid),
    linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 253, 248, .74));
  background-size: 24px 24px, 24px 24px, auto;
  box-shadow: var(--sm-soft-shadow);
}

.home-orbit-card {
  min-height: 188px;
  padding: 22px;
}

.home-orbit-card h2,
.home-section-head h2 {
  margin: 10px 0 8px;
  font-size: 22px;
  line-height: 1.22;
  color: var(--sm-ink);
}

.home-orbit-card p {
  margin: 0 0 16px;
  color: var(--sm-muted);
  line-height: 1.65;
}

.home-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-community-preview {
  margin-top: 16px;
  padding: 22px;
}

.home-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.home-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-preview-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 104px;
  padding: 12px;
  border: 1px solid rgba(202, 184, 199, .54);
  border-radius: 8px;
  background: rgba(255, 253, 248, .76);
}

.home-preview-card strong,
.home-preview-card span {
  display: block;
}

.home-preview-card span {
  margin-top: 4px;
  color: var(--sm-muted);
}

.home-preview-thumb {
  width: 82px;
  height: 82px;
  border-radius: 8px;
  border: 1px solid rgba(202, 184, 199, .54);
  background:
    linear-gradient(90deg, rgba(255,255,255,.42) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.36) 1px, transparent 1px),
    linear-gradient(135deg, #e7a6c4, #f4d3df);
  background-size: 12px 12px, 12px 12px, auto;
  box-shadow: inset -4px -4px 0 rgba(50, 38, 59, .07);
}

.home-preview-thumb.is-blue {
  background:
    linear-gradient(90deg, rgba(255,255,255,.42) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.36) 1px, transparent 1px),
    linear-gradient(135deg, #9fc7e7, #d8e4f4);
  background-size: 12px 12px, 12px 12px, auto;
}

.home-preview-thumb.is-mint {
  background:
    linear-gradient(90deg, rgba(255,255,255,.42) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.36) 1px, transparent 1px),
    linear-gradient(135deg, #83d8cc, #d7f2ed);
  background-size: 12px 12px, 12px 12px, auto;
}

/* Shared surfaces: lighter content pages, denser operation pages. */
.panel,
.generator-panel,
.preview-panel,
.workbench-main,
.messages-panel,
.community-panel,
.profile-hero-panel,
.profile-content-panel,
.profile-side-panel,
.professional-panel {
  border: 1px solid var(--sm-line);
  background:
    var(--sm-grid),
    linear-gradient(135deg, rgba(255, 253, 248, .9), rgba(248, 241, 247, .82) 52%, rgba(239, 248, 248, .78));
  background-size: 28px 28px, 28px 28px, auto;
  box-shadow: var(--sm-shadow);
}

.section-block,
.controls-panel,
.export-panel,
.share-panel,
.palette-lock,
.auth-gate,
.route-suggestion,
.profile-form,
.community-stats > div,
.beta-summary-card,
.insight-card,
.policy-card,
.tool-card {
  border: 1px solid rgba(202, 184, 199, .56);
  background: rgba(255, 253, 248, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

/* Generator landing from option 3: horizontal product links with hover copy. */
#view-generate[data-generator-mode="landing"][data-active-stage="upload"] .flow-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: block;
}

#view-generate[data-generator-mode="landing"][data-active-stage="upload"] .generator-panel {
  min-height: 560px;
}

#view-generate[data-generator-mode="landing"][data-active-stage="upload"] .preview-panel {
  display: none;
}

.generator-entry-block .section-heading {
  max-width: 780px;
  margin: 0 auto 20px;
  text-align: center;
}

.generator-entry-block .section-heading h1 {
  font-size: 42px;
}

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

.generator-entry-card {
  min-height: 260px;
  align-content: start;
  padding: 24px;
  border: 1px solid rgba(202, 184, 199, .62);
  background:
    radial-gradient(circle at 88% 12%, rgba(117, 210, 201, .2), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 253, 248, .78));
  box-shadow: var(--sm-soft-shadow);
}

.generator-entry-card::before {
  height: 4px;
  background: linear-gradient(90deg, var(--sm-violet), var(--sm-mint));
}

.generator-entry-card::after {
  display: none;
}

.generator-entry-card strong {
  margin-top: 18px;
  font-size: 28px;
  line-height: 1.18;
}

.generator-entry-card small {
  margin-top: 14px;
  min-height: 72px;
  line-height: 1.7;
  color: var(--sm-muted);
}

.generator-entry-card em {
  margin-top: 22px;
  color: #286c78;
}

.generator-entry-card:hover,
.generator-entry-card:focus-visible,
.community-card:hover,
.my-pattern-card:hover,
.workbench-pick-card:hover,
.palette-brand-card:hover,
.message-inbox-row:hover,
.interaction-message:hover,
.message-user-card:hover {
  border-color: rgba(70, 152, 168, .44);
  background:
    radial-gradient(circle at 88% 12%, rgba(117, 210, 201, .28), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(241, 253, 251, .88));
  box-shadow: 0 18px 40px rgba(54, 42, 64, .1);
  transform: translateY(-1px);
}

#view-generate[data-active-stage="settings"] .flow-grid {
  grid-template-columns: minmax(310px, 360px) minmax(0, 1fr);
}

#view-generate[data-active-stage="settings"] .preview-panel {
  min-height: calc(100dvh - 124px);
}

.preview-card,
.pattern-preview-viewport,
.canvas-shell,
.message-thread,
.table-wrap,
.metric,
.stat-row,
.color-chip,
.palette-card {
  border-color: rgba(202, 184, 199, .58);
  background-color: rgba(255, 253, 248, .76);
}

.pattern-preview-viewport {
  background:
    linear-gradient(45deg, rgba(226, 210, 220, .58) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(226, 210, 220, .58) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(226, 210, 220, .58) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(226, 210, 220, .58) 75%),
    #fffdf8;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  background-size: 18px 18px;
}

/* Community: less vertical bulk, more feed-like. */
.community-layout,
.messages-layout {
  max-width: 1180px;
  margin: 0 auto;
}

.community-head,
.messages-head,
.palette-toolbar {
  min-height: auto;
  padding: 18px 0 14px;
  border-bottom: 1px solid rgba(202, 184, 199, .56);
  background: transparent;
}

.community-head h1,
.messages-head h1,
.palette-toolbar h1 {
  font-size: 36px;
}

.community-head p,
.messages-head p,
.palette-toolbar p {
  max-width: 760px;
}

.community-toolbar {
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 12px;
  margin: 14px 0 10px;
}

.community-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}

.community-stats > div {
  min-height: 64px;
  padding: 10px 14px;
}

.community-stats strong {
  font-size: 24px;
}

.access-note {
  padding: 10px 12px;
  border-color: rgba(200, 135, 168, .26);
  background: rgba(255, 248, 252, .7);
}

.community-feed {
  gap: 12px;
}

.community-card {
  grid-template-columns: 220px minmax(0, 1fr);
  border: 1px solid rgba(202, 184, 199, .58);
  background: rgba(255, 253, 248, .82);
}

.community-cover {
  min-height: 190px;
  border-right: 1px solid rgba(202, 184, 199, .54);
  background:
    linear-gradient(90deg, rgba(117, 210, 201, .08) 1px, transparent 1px),
    linear-gradient(rgba(128, 127, 201, .07) 1px, transparent 1px),
    #f8f2f7;
  background-size: 22px 22px, 22px 22px, auto;
}

.community-card-body {
  padding: 16px;
}

/* Profile: centered avatar and underline tabs like the reference direction. */
.profile-page-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
}

.profile-cover-band {
  height: 132px;
  background:
    radial-gradient(circle at 20% 22%, rgba(255,255,255,.42), transparent 28%),
    var(--sm-grid),
    linear-gradient(135deg, rgba(247, 229, 238, .94), rgba(236, 243, 244, .86));
  background-size: auto, 24px 24px, 24px 24px, auto;
}

.profile-identity {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 10px;
  margin-top: -64px;
  padding: 0 28px 14px;
  text-align: center;
}

.avatar-mark.profile-avatar {
  width: 116px;
  height: 116px;
  border: 5px solid rgba(255, 253, 248, .96);
  font-size: 38px;
}

.profile-title-block h1 {
  font-size: 30px;
}

.profile-meta-line,
.profile-action-row {
  justify-content: center;
}

.profile-stat-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0 24px 18px;
  padding: 12px 0;
  border-width: 1px 0 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.profile-stat-strip > div {
  border: 0;
  border-right: 1px solid rgba(202, 184, 199, .54);
}

.profile-stat-strip > div:last-child {
  border-right: 0;
}

.profile-tabbar {
  border-bottom: 1px solid rgba(202, 184, 199, .56);
}

.profile-tab {
  color: #8b8191;
}

.profile-tab.is-active {
  color: #34263b;
}

.profile-tab.is-active::after {
  background: linear-gradient(90deg, var(--sm-rose), var(--sm-mint));
}

.profile-xp-track,
.usage-bars i {
  background: rgba(202, 184, 199, .38);
}

.profile-xp-track i,
.usage-bars b {
  background: linear-gradient(90deg, var(--sm-violet), var(--sm-mint));
}

/* Messages: list first, only rows that represent messages. */
.messages-panel {
  max-width: 900px;
  margin: 0 auto;
}

.message-inbox-list {
  border: 0;
  background: transparent;
}

.message-inbox-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 78px;
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(202, 184, 199, .56);
  border-radius: 8px;
  background: rgba(255, 253, 248, .82);
}

.message-inbox-avatar,
.message-user-avatar {
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .82), transparent 34%),
    linear-gradient(135deg, var(--sm-violet), var(--sm-mint));
}

.message-inbox-avatar.is-system {
  background: linear-gradient(135deg, var(--sm-rose), var(--sm-violet));
}

.message-inbox-main strong {
  font-size: 17px;
}

.message-inbox-main small {
  font-size: 14px;
}

.message-inbox-meta b {
  background: #d95c86;
}

/* Palette and workbench remain tool-like but inherit the lighter system. */
.palette-brand-grid {
  gap: 12px;
}

.palette-brand-card {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  min-height: 92px;
  border: 1px solid rgba(202, 184, 199, .58);
}

.workbench-layout {
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
}

.toolbar {
  border-bottom-color: rgba(202, 184, 199, .56);
}

.color-filter-panel {
  border-color: rgba(202, 184, 199, .64);
}

.empty-state,
.profile-empty-state {
  border-color: rgba(117, 210, 201, .32);
  background:
    linear-gradient(90deg, rgba(117, 210, 201, .08) 1px, transparent 1px),
    linear-gradient(rgba(128, 127, 201, .065) 1px, transparent 1px),
    rgba(255, 253, 248, .72);
  background-size: 22px 22px, 22px 22px, auto;
}

@keyframes star-map-pulse {
  0%, 100% {
    transform: translateY(0) scale(var(--star-scale, 1));
    opacity: .72;
  }
  50% {
    transform: translateY(-2px) scale(var(--star-scale, 1));
    opacity: 1;
  }
}

@media (max-width: 0px) and (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .home-cover,
  .home-orbit-grid,
  .profile-page-layout,
  #view-generate[data-active-stage="settings"] .flow-grid,
  .workbench-layout {
    grid-template-columns: 1fr;
  }

  .community-layout,
  .messages-layout {
    max-width: none;
  }
}

@media (max-width: 0px) and (max-width: 760px) {
  .app-shell {
    width: min(100vw - 18px, 1520px);
  }

  .home-cover {
    min-height: auto;
    padding: 22px;
  }

  .home-copy h1 {
    font-size: 40px;
  }

  .home-preview-grid,
  .generator-entry-grid,
  .community-toolbar,
  .community-stats,
  .community-card,
  .message-inbox-row,
  .palette-brand-card,
  .home-preview-card {
    grid-template-columns: 1fr;
  }

  .profile-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 0;
  }

  .profile-stat-strip > div {
    border: 1px solid rgba(202, 184, 199, .52);
    border-radius: 8px;
  }
}

/* Strict pass for the selected board: match option 03 hierarchy and proportions. */
.topbar {
  grid-template-columns: auto minmax(420px, 1fr) minmax(240px, 330px) auto;
}

.top-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  min-height: 42px;
  border: 1px solid rgba(202, 184, 199, .56);
  border-radius: 8px;
  background: rgba(255, 253, 248, .82);
  overflow: hidden;
}

.top-search input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 12px;
  color: var(--sm-ink);
  background: transparent;
}

.top-search .icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-left: 1px solid rgba(202, 184, 199, .42);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-cover {
  min-height: 468px;
  align-items: center;
  padding: 42px 46px;
}

.home-copy h1 {
  font-size: clamp(44px, 4.7vw, 68px);
  line-height: 1.05;
  letter-spacing: 0;
}

.home-copy p {
  font-size: 17px;
  line-height: 1.72;
}

.home-visual {
  min-height: 410px;
}

.home-saturn-art {
  width: min(520px, 98%);
}

.home-community-preview {
  margin-top: 14px;
  padding: 18px 20px;
}

.home-section-head {
  margin-bottom: 12px;
}

.home-section-head h2 {
  font-size: 21px;
}

.home-preview-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.home-preview-card {
  display: block;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(202, 184, 199, .56);
  border-radius: 8px;
  background: rgba(255, 253, 248, .82);
}

.home-preview-card > div:not(.home-preview-thumb),
.home-preview-card > span:not(.home-preview-thumb) {
  padding: 10px 12px 12px;
}

.home-preview-card strong {
  font-size: 14px;
}

.home-preview-card span {
  font-size: 12px;
}

.home-preview-thumb {
  width: 100%;
  height: 132px;
  border: 0;
  border-radius: 0;
}

.home-preview-thumb.is-saturn {
  background:
    linear-gradient(rgba(238, 232, 237, .16), rgba(238, 232, 237, .16)),
    url("./assets/home-saturn-mirror-mint.png") center / cover no-repeat,
    #f4eef7;
}

.home-preview-thumb.is-mono {
  background:
    linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.32) 1px, transparent 1px),
    linear-gradient(135deg, #e9e8ef 0%, #8f8898 48%, #f9f7fb 100%);
  background-size: 10px 10px, 10px 10px, auto;
}

#view-generate[data-generator-mode="landing"][data-active-stage="upload"] .generator-panel {
  min-height: 500px;
  padding: 32px;
}

#view-generate[data-generator-mode="landing"] .section-block {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.generator-entry-block .section-heading h1 {
  font-size: 42px;
}

.generator-entry-card {
  min-height: 218px;
  text-align: center;
}

.generator-entry-card strong {
  font-size: 24px;
}

.generator-entry-card small {
  min-height: 58px;
}

.community-panel {
  padding: 18px;
}

.community-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-top: 0;
}

.community-head h1 {
  font-size: 28px;
}

.community-toolbar {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) 168px;
  align-items: center;
}

.community-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.community-filter-tab,
.message-side-item {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--sm-muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.community-filter-tab.is-active,
.community-filter-tab:hover,
.message-side-item.is-active,
.message-side-item:hover {
  color: #6b4f87;
  border-color: rgba(202, 184, 199, .56);
  background: rgba(255, 253, 248, .78);
}

.community-stats,
.access-note {
  display: none;
}

.community-feed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.community-card {
  display: block;
  overflow: hidden;
}

.community-cover {
  width: 100%;
  min-height: 186px;
  border-right: 0;
  border-bottom: 1px solid rgba(202, 184, 199, .54);
}

.community-cover span {
  right: 10px;
  top: 10px;
  left: auto;
  bottom: auto;
  min-width: 30px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 253, 248, .86);
  color: #6b4f87;
  font-size: 12px;
}

.community-card-body {
  padding: 12px 14px 14px;
}

.community-card-title {
  align-items: flex-start;
}

.community-card-title h2 {
  font-size: 16px;
}

.community-card-title p {
  margin-top: 4px;
  font-size: 12px;
}

.community-card-body > p,
.community-card .media-summary,
.community-card .community-tags,
.community-card .workbench-only-note,
.community-card-title .mini-action {
  display: none;
}

.community-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  margin-top: 12px;
}

.community-actions .button {
  min-height: 36px;
  padding: 0 10px;
  font-size: 13px;
}

.community-card .community-actions .button:not([data-post-workbench]):not([data-post-like]):not([data-post-open]) {
  display: none;
}

.profile-page-layout {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1180px;
  margin: 0 auto;
}

.profile-side-panel {
  display: none;
}

.profile-cover-band {
  height: 190px;
}

.profile-identity {
  margin-top: -92px;
}

.avatar-mark.profile-avatar {
  width: 132px;
  height: 132px;
}

.profile-title-block h1 {
  font-size: 32px;
}

.profile-stat-strip {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.my-pattern-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.my-pattern-card,
.profile-post-row {
  display: block;
  overflow: hidden;
}

.my-pattern-thumb {
  width: 100%;
  min-height: 145px;
  border-right: 0;
  border-bottom: 1px solid rgba(202, 184, 199, .54);
}

.my-pattern-info,
.my-pattern-actions {
  padding: 12px;
}

.messages-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  max-width: 1120px;
}

.message-side-nav {
  min-height: 520px;
  padding: 14px;
  border: 1px solid var(--sm-line);
  border-radius: 8px;
  background: rgba(255, 253, 248, .72);
  box-shadow: var(--sm-soft-shadow);
}

.message-side-item {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  text-align: left;
}

.messages-panel {
  max-width: none;
}

.messages-head h1 {
  font-size: 28px;
}

.message-inbox-row {
  min-height: 72px;
  border-radius: 8px;
  background: rgba(255, 253, 248, .84);
}

.admin-layout {
  grid-template-columns: 170px minmax(0, 1fr);
  max-width: 1180px;
  margin: 0 auto;
}

.admin-side {
  padding: 14px;
  border: 1px solid var(--sm-line);
  border-radius: 8px;
  background: rgba(255, 253, 248, .72);
  box-shadow: var(--sm-soft-shadow);
}

.admin-tab {
  width: 100%;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.admin-main .panel-head h1 {
  font-size: 28px;
}

.table-wrap th,
.table-wrap td {
  padding: 12px 14px;
}

@media (max-width: 0px) and (max-width: 1180px) {
  .topbar,
  .community-toolbar,
  .messages-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .home-preview-grid,
  .community-feed,
  .my-pattern-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Final 03 pass: close-match the selected "绀惧尯鏄熷浘" production screens. */
:root {
  --sm-page: #fbf8fb;
  --sm-panel: rgba(255, 255, 255, .78);
  --sm-panel-strong: rgba(255, 255, 255, .92);
  --sm-border: #eadbe4;
  --sm-text: #28213c;
  --sm-soft: #7f738c;
  --sm-blue-violet: #7b79cf;
  --sm-aqua: #65c8cf;
  --sm-pink: #d59ab8;
  --sm-card-shadow: 0 16px 38px rgba(74, 58, 93, .08);
}

html,
body {
  min-height: 100%;
}

body {
  color: var(--sm-text);
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 225, 236, .64), transparent 31%),
    radial-gradient(circle at 84% 10%, rgba(227, 239, 255, .82), transparent 34%),
    radial-gradient(circle at 84% 80%, rgba(219, 249, 245, .42), transparent 30%),
    linear-gradient(90deg, rgba(124, 117, 155, .035) 1px, transparent 1px),
    linear-gradient(rgba(124, 117, 155, .032) 1px, transparent 1px),
    var(--sm-page);
  background-size: auto, auto, auto, 36px 36px, 36px 36px, auto;
}

.app-shell {
  width: min(1480px, calc(100vw - 32px));
  padding: 16px 0 42px;
}

.topbar,
.panel,
.home-cover,
.home-community-preview,
.generator-entry-card,
.message-section-card,
.community-card,
.profile-hero-panel,
.profile-content-panel,
.admin-side,
.admin-main {
  border: 1px solid var(--sm-border) !important;
  border-radius: 8px !important;
  background: var(--sm-panel) !important;
  box-shadow: var(--sm-card-shadow) !important;
  backdrop-filter: blur(18px);
}

.topbar {
  min-height: 62px;
  padding: 9px 13px;
  grid-template-columns: 218px minmax(350px, 1fr) minmax(250px, 360px) auto;
  gap: 14px;
}

.brand {
  gap: 10px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0;
}

.brand small {
  font-size: 12px;
  color: var(--sm-soft);
}

.main-nav {
  justify-content: center;
  gap: 4px;
}

.nav-button {
  min-height: 38px;
  padding: 0 13px;
  color: #57506a;
  border: 0;
  background: transparent;
}

.nav-button.is-active,
.nav-button:hover {
  color: #4c518b;
  background: rgba(235, 241, 255, .84);
}

.nav-submenu {
  top: calc(100% + 7px);
  border-radius: 8px;
}

.nav-subitem {
  min-height: 54px;
  padding: 10px 12px;
}

.nav-subitem small {
  display: none;
}

.top-search {
  min-height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
}

.top-search input {
  font-size: 13px;
}

.top-search .icon-button {
  height: 36px;
}

#clearTestDataBtn,
.auth-pill,
.quota-pill {
  display: none !important;
}

.top-actions {
  gap: 8px;
}

.top-actions .button,
.top-actions .top-avatar-button,
.top-actions .top-message-button {
  min-height: 38px;
  border-radius: 999px;
}

main {
  margin-top: 12px;
}

.home-cover {
  position: relative;
  min-height: 492px;
  padding: 52px 58px;
  grid-template-columns: minmax(420px, .88fr) minmax(520px, 1.12fr);
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .72), transparent 28%),
    radial-gradient(circle at 72% 53%, rgba(206, 226, 255, .46), transparent 36%),
    linear-gradient(90deg, rgba(124, 117, 155, .05) 1px, transparent 1px),
    linear-gradient(rgba(124, 117, 155, .045) 1px, transparent 1px),
    linear-gradient(135deg, #fff7fb 0%, #f7f2fb 46%, #eef9f8 100%) !important;
  background-size: auto, auto, 34px 34px, 34px 34px, auto !important;
}

.home-copy .pill {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 8px;
}

.home-copy h1 {
  margin: 20px 0 16px;
  max-width: 620px;
  font-size: clamp(50px, 5.25vw, 78px);
  line-height: .98;
  color: #29213c;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.home-copy p {
  max-width: 520px;
  font-size: 16px;
  line-height: 1.85;
  color: #6b6075;
}

.home-actions {
  margin-top: 26px;
  gap: 14px;
}

.home-actions .button {
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
}

.button.primary,
.home-actions .button.primary {
  background: linear-gradient(135deg, var(--sm-blue-violet), var(--sm-aqua)) !important;
  border-color: rgba(102, 197, 207, .68) !important;
  box-shadow: 0 12px 28px rgba(111, 117, 204, .22) !important;
}

.button.secondary {
  background: rgba(255, 255, 255, .72) !important;
  border-color: var(--sm-border) !important;
  color: #5f5580 !important;
}

/* Keep manual import aligned with the teal-on-cream manual-creation entry action. */
#view-generate[data-generator-mode="manual"] #manualImportMenuBtn {
  color: #286c78 !important;
  border-color: rgba(185, 130, 158, .34) !important;
  background: #fff5ec !important;
  font-weight: 900;
}

#view-generate[data-generator-mode="manual"] #manualImportMenuBtn:hover,
#view-generate[data-generator-mode="manual"] #manualImportMenuBtn:focus-visible,
#view-generate[data-generator-mode="manual"] #manualImportMenuBtn[aria-expanded="true"] {
  color: #286c78 !important;
  border-color: rgba(185, 109, 149, .5) !important;
  background: #fff8f2 !important;
  box-shadow: 0 0 0 3px rgba(70, 152, 168, .14);
}

.home-visual {
  min-height: 392px;
}

.home-saturn-art {
  width: min(560px, 94%);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 24px 34px rgba(122, 105, 150, .15));
}

.home-pixel-star {
  opacity: .58;
}

.home-community-preview {
  margin-top: 12px;
  padding: 20px 22px;
}

.home-section-head {
  margin-bottom: 14px;
}

.entry-kicker {
  border: 0;
  background: transparent;
  padding: 0;
  color: #5e5274;
}

.home-section-head h2 {
  margin: 3px 0 0;
  font-size: 20px;
  color: #2c2540;
}

.home-preview-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.home-preview-card {
  background: rgba(255, 255, 255, .72) !important;
}

.home-preview-thumb,
.community-cover,
.my-pattern-thumb {
  image-rendering: pixelated;
}

#view-generate[data-generator-mode="landing"][data-active-stage="upload"] .flow-grid {
  display: block;
  max-width: 1040px;
  margin: 0 auto;
}

#view-generate[data-generator-mode="landing"][data-active-stage="upload"] .generator-panel {
  min-height: 520px;
  padding: 44px 46px;
}

#view-generate[data-generator-mode="landing"][data-active-stage="upload"] .section-block {
  padding: 0;
}

#view-generate[data-generator-mode="landing"] .stepper,
#view-generate[data-generator-mode="landing"] .auto-upload-block,
#view-generate[data-generator-mode="landing"] .auth-gate,
#view-generate[data-generator-mode="landing"] .notice,
#view-generate[data-generator-mode="landing"] .route-suggestion {
  display: none !important;
}

.generator-entry-block .section-heading {
  margin: 0 0 26px;
}

.generator-entry-block .section-heading h1 {
  font-size: 40px;
  color: #2d2540;
}

.generator-entry-block .section-heading p {
  color: #7a7084;
}

.generator-entry-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.generator-entry-card {
  position: relative;
  min-height: 202px;
  padding: 34px 26px 24px;
  text-align: center;
  background: rgba(255, 255, 255, .82) !important;
}

.generator-entry-card strong {
  font-size: 22px;
  color: #33283f;
}

.generator-entry-card small {
  display: block;
  min-height: 50px;
  margin: 10px auto 0;
  max-width: 210px;
  color: #7d7285;
  line-height: 1.55;
}

.generator-entry-card em {
  display: none;
}

.generator-entry-tip {
  width: max-content;
  max-width: 100%;
  margin: 20px 0 24px;
  padding: 15px 17px;
  color: #6c6273;
  line-height: 1.6;
  white-space: nowrap;
  overflow-x: auto;
  border: 1px solid var(--sm-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 12px 26px rgba(74, 58, 93, .07);
}

.generator-recent-strip {
  margin-top: 10px;
  padding: 16px;
  border: 1px solid var(--sm-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.generator-recent-strip h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.generator-recent-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.generator-recent-list a,
.generator-recent-list button {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-items: center;
  min-height: 68px;
  padding: 8px;
  color: inherit;
  text-decoration: none;
  text-align: left;
  border: 1px solid rgba(234, 219, 228, .8);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  cursor: pointer;
  font: inherit;
}

.generator-recent-list .home-preview-thumb {
  grid-row: 1 / span 2;
  height: 52px;
  border-radius: 7px;
}

.generator-recent-list strong {
  font-size: 14px;
}

.generator-recent-list small {
  color: #8a8091;
}

.home-preview-card {
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.home-preview-thumb img,
.home-preview-thumb canvas,
.home-preview-thumb .community-cover-image,
.home-preview-thumb .community-cover-empty,
.generator-recent-list .pattern-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-preview-empty,
.generator-recent-empty {
  grid-column: 1 / -1;
  min-height: 92px;
  display: grid;
  place-items: center;
  text-align: center;
}

.community-panel {
  padding: 18px 20px 22px;
}

.community-head {
  margin-bottom: 14px;
}

.community-head h1 {
  font-size: 30px;
}

.community-head h1::after {
  content: none;
}

.community-head p {
  display: none;
}

.community-toolbar {
  grid-template-columns: auto minmax(220px, 1fr) 150px;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 0;
  border-bottom: 0;
}

.community-toolbar .search-input {
  order: 2;
  min-height: 38px;
}

.community-toolbar .select-input {
  order: 3;
  min-height: 38px;
}

.community-filter-tabs {
  order: 1;
  gap: 16px;
}

.community-filter-tab {
  padding: 0 4px;
  border: 0;
  background: transparent !important;
  border-radius: 0;
}

.community-filter-tab.is-active {
  color: #3b3261;
  box-shadow: inset 0 -2px 0 #7b79cf;
}

.community-feed {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.community-card {
  min-width: 0;
  background: rgba(255, 255, 255, .86) !important;
}

.community-cover {
  position: relative;
  min-height: 0;
  height: 205px;
  background: #f7f2f6;
}

.community-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-cover-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #9f94a6;
}

.community-card-menu {
  position: absolute;
  right: 9px;
  top: 9px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 22px;
  border: 1px solid rgba(234, 219, 228, .78);
  border-radius: 6px;
  background: rgba(255, 255, 255, .85);
  color: #81768b;
  font-weight: 800;
}

.community-cover-count {
  position: absolute;
  left: 9px;
  top: 9px;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid rgba(234, 219, 228, .78);
  border-radius: 6px;
  background: rgba(255, 255, 255, .88);
  color: #716779;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.community-card-title {
  display: block;
}

.community-card-title h2 {
  margin: 0 0 6px;
  font-size: 15px;
}

.community-card-title p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  color: #867b8d;
}

.author-link {
  padding: 0;
  color: #655b7a;
  background: transparent;
  border: 0;
}

.community-card-desc,
.community-card .community-tags,
.community-card-title .mini-action,
.community-card .workbench-only-note {
  display: none !important;
}

.community-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.community-card-meta button {
  padding: 0;
  border: 0;
  color: #756b7d;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.community-card-meta button.is-active {
  color: #9b6aac;
}

.community-actions {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 12px;
}

.community-card .community-actions .button:not(.community-start-button) {
  display: none !important;
}

.community-start-button {
  width: 100%;
  min-height: 36px;
}

.profile-page-layout {
  max-width: 1120px;
  gap: 12px;
}

.profile-hero-panel {
  overflow: hidden;
  padding: 0 0 18px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, .72), transparent 28%),
    linear-gradient(135deg, rgba(248, 216, 230, .72), rgba(243, 240, 255, .78) 58%, rgba(232, 250, 247, .76)) !important;
}

.profile-cover-band {
  height: 166px;
  background: transparent;
}

.profile-identity {
  margin: -108px auto 0;
  padding: 0 28px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  max-width: 860px;
  align-items: center;
  gap: 22px;
}

.avatar-mark.profile-avatar {
  width: 118px;
  height: 118px;
  border: 6px solid rgba(255, 255, 255, .92);
  box-shadow: 0 12px 26px rgba(70, 50, 88, .12);
}

.profile-title-block h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.profile-title-block p,
.profile-meta-line {
  font-size: 13px;
  color: #756b7d;
}

.profile-action-row .button {
  width: 38px;
  min-width: 38px;
  padding: 0;
  color: transparent !important;
}

.profile-action-row .button::after {
  content: "缂栬緫";
  color: #665b78;
  font-size: 12px;
}

.profile-stat-strip {
  max-width: 520px;
  margin: 18px auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 0;
  background: transparent;
  box-shadow: none;
}

.profile-stat-strip > div {
  min-height: 50px;
  border: 0;
  background: transparent;
}

.profile-stat-strip span {
  color: #7f738c;
}

.profile-tabbar {
  padding: 0 4px 12px;
  border-bottom: 1px solid rgba(234, 219, 228, .76);
}

.profile-tab {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.profile-tab.is-active {
  color: #5a58a6;
  box-shadow: inset 0 -2px 0 #7b79cf;
}

.my-pattern-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 14px;
}

.my-pattern-card,
.profile-post-row {
  border: 1px solid var(--sm-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
}

.my-pattern-thumb {
  min-height: 150px;
}

.messages-layout {
  max-width: 1080px;
  grid-template-columns: 174px minmax(0, 1fr);
  gap: 14px;
  margin: 0 auto;
}

.message-side-nav {
  min-height: 544px;
  background: rgba(255, 255, 255, .72) !important;
}

.message-side-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-side-item.is-active {
  background: rgba(247, 227, 239, .72) !important;
  color: #7c5e86;
}

.messages-panel {
  padding: 20px;
}

.messages-head {
  display: none;
}

.message-inbox-list {
  display: grid;
  gap: 14px;
}

.message-section-card {
  padding: 18px;
  background: rgba(255, 255, 255, .86) !important;
}

.message-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.message-section-head h2 {
  margin: 0;
  font-size: 18px;
}

.message-section-head small {
  color: #8a8091;
}

.message-inbox-row {
  min-height: 64px;
  padding: 10px 8px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(234, 219, 228, .78);
  background: transparent !important;
  box-shadow: none;
}

.message-inbox-row:last-child {
  border-bottom: 0;
}

.message-inbox-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e9d4e4, #c5e9e9);
}

.message-inbox-main strong {
  font-size: 14px;
}

.message-inbox-main small,
.message-inbox-meta em {
  color: #918897;
}

.admin-layout {
  max-width: 1120px;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 14px;
}

.admin-side {
  background: rgba(255, 255, 255, .72) !important;
}

.admin-tab.is-active {
  background: rgba(226, 246, 244, .82) !important;
  color: #537980;
}

.admin-main {
  padding: 22px;
}

.admin-main .panel-head {
  margin-bottom: 16px;
}

.admin-main .panel-head h1 {
  font-size: 24px;
}

.table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid rgba(234, 219, 228, .76);
  border-radius: 8px;
  background: rgba(255, 255, 255, .8);
}

.table-wrap th {
  background: rgba(250, 245, 249, .88);
  color: #6d6375;
}

.table-wrap td {
  border-top: 1px solid rgba(234, 219, 228, .64);
}

.admin-review-work {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.admin-review-thumb {
  display: block;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid rgba(234, 219, 228, .76);
  border-radius: 7px;
  background: #f6eef4;
}

.admin-review-thumb img,
.admin-review-thumb .community-cover-empty {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-badge.pending {
  color: #b67838;
  background: #fff0dd;
}

.status-badge.rejected {
  color: #d35c66;
  background: #ffe9ed;
}

@media (max-width: 0px) and (max-width: 1180px) {
  .topbar,
  .home-cover,
  .messages-layout,
  .admin-layout,
  .community-toolbar {
    grid-template-columns: 1fr;
  }

  .top-search {
    max-width: none;
  }

  .home-preview-grid,
  .community-feed,
  .my-pattern-list,
  .generator-entry-grid,
  .generator-recent-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 0px) and (max-width: 760px) {
  .app-shell {
    width: min(100vw - 16px, 1480px);
  }

  .home-cover {
    padding: 28px 22px;
  }

  .home-copy h1 {
    font-size: 42px;
  }

  .home-preview-grid,
  .community-feed,
  .my-pattern-list,
  .generator-entry-grid,
  .generator-recent-list,
  .profile-identity,
  .profile-stat-strip {
    grid-template-columns: 1fr;
  }
}

/* Profile page closer to option 03 panel 4. */
#view-my .profile-page-layout {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0 auto;
}

#view-my .profile-hero-panel {
  position: relative;
  min-height: 286px;
  padding: 0;
  overflow: visible;
  border-radius: 8px !important;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, .7), transparent 24%),
    radial-gradient(circle at 84% 12%, rgba(205, 236, 240, .46), transparent 26%),
    linear-gradient(90deg, rgba(255, 255, 255, .18) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px),
    linear-gradient(135deg, rgba(246, 215, 229, .84), rgba(245, 239, 255, .86) 58%, rgba(231, 250, 247, .8)) !important;
  background-size: auto, auto, 30px 30px, 30px 30px, auto !important;
}

#view-my .profile-hero-panel::before,
#view-my .profile-hero-panel::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 4px solid rgba(118, 201, 211, .42);
  transform: rotate(45deg);
  pointer-events: none;
}

#view-my .profile-hero-panel::before {
  right: 118px;
  top: 52px;
}

#view-my .profile-hero-panel::after {
  left: 132px;
  top: 42px;
  width: 10px;
  height: 10px;
  border-color: rgba(213, 154, 184, .38);
}

#view-my .profile-cover-band {
  height: 94px;
  background: transparent !important;
}

#view-my .profile-identity {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: -34px 0 0 76px;
  padding: 0;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
}

#view-my .avatar-mark.profile-avatar {
  width: 118px;
  height: 118px;
  border: 7px solid rgba(255, 255, 255, .9);
  background: linear-gradient(135deg, #faf7fb, #edf6f7);
  box-shadow: 0 16px 30px rgba(80, 60, 96, .14);
}

#view-my .profile-title-block h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  color: #2c2540;
}

#view-my .profile-title-block p {
  margin: 8px 0 0;
  max-width: 420px;
  font-size: 13px;
  line-height: 1.55;
  color: #6f6578;
}

#view-my .profile-meta-line {
  margin-top: 7px;
  gap: 8px;
  font-size: 12px;
  color: #7c7183;
}

#view-my #profileGenderText,
#view-my #profileJoinDate {
  display: none;
}

#view-my .profile-action-row {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 6;
  display: flex;
  gap: 8px;
}

#view-my .profile-action-row .button {
  width: auto;
  min-width: 72px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(101, 88, 126, .34) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .96) !important;
  color: #3f3651 !important;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  opacity: 1 !important;
  visibility: visible !important;
  box-shadow: 0 8px 20px rgba(70, 50, 90, .14) !important;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

#view-my .profile-action-row .button:hover {
  border-color: rgba(101, 88, 126, .58) !important;
  background: #ffffff !important;
  box-shadow: 0 10px 24px rgba(70, 50, 90, .18) !important;
}

#view-my .profile-action-row .profile-logout-button {
  border-color: rgba(190, 117, 140, .34) !important;
  background: rgba(255, 249, 251, .94) !important;
  color: #945269 !important;
  box-shadow: 0 8px 18px rgba(133, 66, 89, .08) !important;
}

#view-my .profile-action-row .profile-logout-button:hover {
  border-color: rgba(177, 83, 112, .58) !important;
  background: #fff4f7 !important;
  color: #843e56 !important;
  box-shadow: 0 10px 22px rgba(133, 66, 89, .13) !important;
}

#view-my .profile-action-row .button:focus-visible {
  outline: 3px solid rgba(111, 189, 201, .42);
  outline-offset: 3px;
}

#view-my .profile-action-row .button::after {
  content: none;
}

#view-my .profile-stat-strip {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 14px 0 0 216px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#view-my .profile-stat-strip > div {
  min-height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
}

#view-my .profile-stat-strip span {
  font-size: 12px;
  color: #7c7183;
}

#view-my .profile-stat-strip strong {
  margin-top: 2px;
  font-size: 17px;
  color: #2d2540;
}

#view-my .profile-rule-box {
  position: relative;
  grid-column: 1 / -1;
  z-index: 30;
  width: 100%;
  max-height: min(560px, calc(100vh - 160px));
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--sm-border);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 24px 62px rgba(74, 58, 93, .18);
}

#view-my .profile-rule-box strong {
  color: #2d2540;
}

#view-my .profile-rule-box span {
  color: #6f6578;
  line-height: 1.65;
}

#view-my .profile-rule-box ul {
  margin: 12px 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

#view-my .profile-rule-box li {
  color: #5f5668;
  font-size: 12px;
}

#view-my .profile-rule-head strong {
  display: block;
  margin-bottom: 0;
}

#view-my .profile-rule-columns {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(520px, 1.28fr);
  gap: clamp(28px, 3vw, 48px);
  align-items: start;
}

#view-my .profile-rule-section h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: #30283f;
}

#view-my .profile-level-table,
#view-my .profile-rule-details .profile-rule-table {
  min-width: 0;
}

#view-my .profile-level-table-head,
#view-my .profile-rule-table-head {
  min-height: 28px;
  display: grid;
  align-items: center;
  color: #8b8291;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  border-bottom: 1px solid rgba(234, 219, 228, .9);
}

#view-my .profile-level-table-head {
  grid-template-columns: 48px minmax(112px, 1fr) 78px;
  gap: 10px;
}

#view-my .profile-level-table-head span:last-child {
  text-align: right;
}

#view-my .profile-level-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  list-style: none;
}

#view-my .profile-level-line {
  display: grid;
  grid-template-columns: 48px minmax(112px, 1fr) 78px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 29px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid rgba(240, 230, 236, .72);
  background: transparent;
  color: #6f6578;
  font-size: 12px;
  line-height: 1.4;
}

#view-my .profile-level-line:last-child {
  border-bottom: 0;
}

#view-my .profile-level-line.is-current {
  color: #30283f;
  font-weight: 900;
}

#view-my .profile-level-line strong,
#view-my .profile-level-line span,
#view-my .profile-level-line small {
  display: inline;
  margin: 0;
  min-width: 0;
  color: inherit;
  line-height: inherit;
  overflow-wrap: anywhere;
}

#view-my .profile-level-line small {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#view-my .profile-rule-details .profile-rule-table {
  display: grid;
  gap: 0;
}

#view-my .profile-rule-table-head,
#view-my .profile-rule-details .profile-rule-row {
  grid-template-columns: minmax(150px, 1.05fr) minmax(145px, .92fr) minmax(180px, 1.2fr);
  column-gap: clamp(16px, 2vw, 28px);
}

#view-my .profile-rule-details .profile-rule-row {
  min-width: 0;
  min-height: 50px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid rgba(240, 230, 236, .78);
  border-radius: 0;
  background: transparent;
  display: grid;
  align-items: start;
}

#view-my .profile-rule-details .profile-rule-row:last-child {
  border-bottom: 0;
}

#view-my .profile-rule-action {
  min-width: 0;
  display: grid;
  gap: 3px;
}

#view-my .profile-rule-details .profile-rule-row strong,
#view-my .profile-rule-details .profile-rule-row span,
#view-my .profile-rule-details .profile-rule-row small,
#view-my .profile-rule-details .profile-rule-row em {
  display: inline;
  margin: 0;
  min-width: 0;
  line-height: 1.35;
  font-size: 12px;
  overflow-wrap: anywhere;
}

#view-my .profile-rule-details .profile-rule-row strong {
  color: #30283f;
}

#view-my .profile-rule-details .profile-rule-row small {
  color: #8b8291;
}

#view-my .profile-rule-details .profile-rule-row em {
  color: #577d93;
  font-style: normal;
  font-weight: 800;
}

#view-my .profile-rule-details .profile-rule-reward,
#view-my .profile-rule-details .profile-rule-limit {
  padding-top: 1px;
}

#view-my .profile-rule-notes {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(234, 219, 228, .78);
}

#view-my .profile-content-panel {
  padding: 0 16px 16px;
  min-height: 260px;
}

#view-my .profile-tabbar {
  min-height: 58px;
  padding: 0;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(234, 219, 228, .78);
}

#view-my .profile-tab-group {
  gap: 28px;
}

#view-my .profile-tab {
  min-height: 58px;
  padding: 0 2px;
  color: #81778a;
  font-size: 15px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#view-my .profile-tab.is-active {
  color: #5d59a8;
  box-shadow: inset 0 -2px 0 #7b79cf;
}

#view-my .profile-tab.is-active::after,
#view-my .profile-tab::after {
  display: none !important;
  content: none !important;
}

#view-my #newPatternBtn {
  display: none;
}

#view-my .my-pattern-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 0 0;
}

/* Personal profile empty states use calm, text-only full-width layout. */
#view-my .my-pattern-list > .empty-state {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 36px clamp(24px, 6vw, 72px);
  color: var(--muted, #756b78);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: .01em;
  text-align: center;
  text-wrap: balance;
}

#view-my .my-pattern-list > .empty-state:not(.compact)::before {
  content: none !important;
  display: none !important;
}

#view-my .my-pattern-list > .profile-empty-state > br {
  display: none;
}

#view-my .my-pattern-list > .empty-state .my-pattern-actions {
  grid-column: auto;
  align-self: center;
  justify-content: center;
  margin-top: 2px;
}

#view-my .my-pattern-card,
#view-my .profile-post-row {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(234, 219, 228, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 24px rgba(74, 58, 93, .06);
}

#view-my .my-pattern-thumb {
  width: 100%;
  min-height: 150px;
  border: 0;
  border-bottom: 1px solid rgba(234, 219, 228, .78);
  border-radius: 0;
}

#view-my .my-pattern-info {
  padding: 10px 12px 12px;
}

#view-my .my-pattern-info h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: #30283f;
}

#view-my .my-pattern-info p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #7f7486;
}

#view-my .my-pattern-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

#view-my .my-pattern-actions .button {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
}

#view-my .profile-side-panel {
  display: grid !important;
  grid-template-columns: minmax(0, 1.85fr) minmax(150px, .7fr) minmax(160px, .8fr);
  align-items: stretch;
  gap: 12px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

#view-my .profile-level-card,
#view-my .profile-points-card,
#view-my .profile-rules-card {
  width: 100%;
  min-height: 86px;
  padding: 16px 18px;
  border: 1px solid var(--sm-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 12px 28px rgba(74, 58, 93, .07);
  color: inherit;
  font: inherit;
  text-align: left;
  appearance: none;
  cursor: pointer;
}

#view-my .profile-rule-trigger:focus-visible {
  outline: 2px solid rgba(128, 127, 201, .42);
  outline-offset: 3px;
}

#view-my .profile-level-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  background: linear-gradient(135deg, rgba(247, 228, 238, .9), rgba(236, 249, 248, .9));
}

#view-my .profile-level-card strong {
  font-size: 18px;
  color: #2d2540;
}

#view-my .profile-level-card #accountLevelName {
  margin: 0;
  color: #6d6375;
  font-size: 13px;
}

#view-my .profile-level-card .profile-level-content {
  display: grid;
  gap: 0;
  margin-left: 0;
  color: inherit;
  font-size: inherit;
  min-width: 0;
}

#view-my .profile-level-card .profile-level-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  margin: 0;
}

#view-my .profile-level-card .profile-xp-meter,
#view-my .profile-level-card .profile-xp-track {
  margin-left: 0;
}

#view-my .profile-level-card .profile-xp-meter {
  width: 100%;
  margin-top: 9px;
  display: grid;
  gap: 5px;
}

#view-my .profile-level-card .profile-xp-meter small {
  color: #7d7285;
  text-align: right;
}

#view-my .profile-level-card .profile-xp-track {
  display: block;
  width: 100%;
  min-width: 118px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(216, 205, 221, .86);
}

#view-my .profile-level-card .profile-xp-track i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7b79cf, #65c8cf);
}

#view-my .profile-points-card {
  display: grid;
  align-content: center;
  gap: 8px;
}

#view-my .profile-points-card span {
  color: #7c7183;
}

#view-my .profile-points-card strong {
  font-size: 26px;
  color: #30283f;
}

#view-my .profile-rules-card {
  display: grid;
  gap: 6px;
  color: #7a7084;
}

#view-my .profile-rules-card strong {
  color: #30283f;
}

#view-my .profile-rules-card span {
  font-size: 12px;
}

#view-my .profile-hidden-usage {
  display: none !important;
}

@media (max-width: 0px) and (max-width: 900px) {
  #view-my .profile-identity {
    margin-left: 24px;
    grid-template-columns: 96px minmax(0, 1fr);
  }

  #view-my .avatar-mark.profile-avatar {
    width: 96px;
    height: 96px;
  }

  #view-my .profile-action-row {
    position: absolute;
    right: 16px;
    top: 16px;
  }

  #view-my .profile-stat-strip {
    margin-left: 24px;
    margin-right: 24px;
    max-width: none;
  }

  #view-my .my-pattern-list,
  #view-my .profile-side-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 0px) and (max-width: 640px) {
  #view-my .profile-action-row {
    right: 12px;
    top: 12px;
  }

  #view-my .profile-action-row .button {
    min-width: 68px;
    min-height: 38px;
    padding: 0 14px;
  }

  #view-my .profile-identity,
  #view-my .profile-stat-strip,
  #view-my .my-pattern-list,
  #view-my .profile-side-panel {
    grid-template-columns: 1fr;
  }

  #view-my .profile-identity,
  #view-my .profile-stat-strip {
    margin-left: 18px;
    margin-right: 18px;
  }

  #view-my .profile-rule-columns,
  #view-my .profile-rule-details .profile-rule-row {
    grid-template-columns: 1fr;
  }

  #view-my .profile-rule-table-head {
    display: none;
  }

  #view-my .profile-rule-details .profile-rule-row {
    gap: 6px;
    padding: 12px 0;
  }

  #view-my .profile-rule-details .profile-rule-reward::before,
  #view-my .profile-rule-details .profile-rule-limit::before {
    display: inline-block;
    width: 72px;
    color: #8b8291;
    font-size: 11px;
    font-weight: 700;
  }

  #view-my .profile-rule-details .profile-rule-reward::before {
    content: "经验 / 积分";
  }

  #view-my .profile-rule-details .profile-rule-limit::before {
    content: "规则说明";
  }
}

@media (min-width: 641px) and (max-width: 980px) {
  #view-my .profile-rule-columns {
    grid-template-columns: 1fr;
  }
}

/* Compact growth strip between the profile summary and content tabs. */
#view-my .profile-side-panel {
  position: relative;
  top: auto;
  z-index: 24;
  width: 100%;
  min-height: 78px;
  padding: 6px 18px;
  display: grid !important;
  grid-template-columns: minmax(360px, 520px) auto;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

#view-my .profile-level-card,
#view-my .profile-points-card,
#view-my .profile-checkin-button {
  min-height: 66px;
  border-radius: 8px !important;
}

#view-my .profile-level-card,
#view-my .profile-points-card {
  position: relative;
  overflow: visible;
  border: 1px solid rgba(225, 211, 223, .92);
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 9px 22px rgba(74, 58, 93, .055);
}

#view-my .profile-level-card {
  min-width: 0;
  padding: 11px 16px;
  background: linear-gradient(135deg, rgba(250, 235, 243, .92), rgba(239, 249, 249, .92));
}

#view-my .profile-level-card .profile-level-content {
  display: grid;
  grid-template-columns: minmax(145px, auto) minmax(180px, 1fr);
  align-items: center;
  gap: 18px;
}

#view-my .profile-level-card .profile-level-heading {
  align-self: center;
  display: grid;
  gap: 3px;
}

#view-my .profile-level-card .profile-level-heading strong {
  font-size: 18px;
  line-height: 1.15;
}

#view-my .profile-level-card .profile-xp-meter {
  width: 100%;
  margin: 0;
  align-self: center;
  display: grid;
  gap: 6px;
}

#view-my .profile-level-card .profile-xp-meter small {
  text-align: center;
  color: #665e70;
  font-size: 12px;
}

#view-my .profile-points-cluster {
  min-width: 240px;
  display: grid;
  grid-template-columns: 112px 116px;
  gap: 10px;
  align-items: stretch;
}

#view-my .profile-points-card {
  width: 112px;
  min-height: 66px;
  padding: 9px 14px;
  align-content: center;
  justify-items: center;
  gap: 2px;
  text-align: center;
}

#view-my .profile-points-card strong {
  font-size: 22px;
  line-height: 1.1;
}

#view-my .profile-checkin-button {
  width: 116px;
  min-width: 116px;
  padding: 0 14px;
  align-self: stretch;
  border: 1px solid rgba(128, 127, 201, .34) !important;
  background: linear-gradient(135deg, #7f7fd0, #65c8cf) !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 9px 20px rgba(104, 124, 192, .16);
}

#view-my .profile-checkin-button:disabled {
  border-color: rgba(193, 187, 199, .72) !important;
  background: #ede8ee !important;
  color: #8d8492 !important;
  box-shadow: none;
  opacity: 1;
}

#view-my .profile-rule-trigger::after {
  content: attr(data-hover-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  z-index: 80;
  min-width: max-content;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(47, 40, 58, .94);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity .16s ease, transform .16s ease;
}

#view-my .profile-rule-trigger:hover::after,
#view-my .profile-rule-trigger:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

#view-my .profile-rule-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 70;
  grid-column: auto;
  width: 100%;
  max-height: min(560px, calc(100vh - 170px));
  margin: 0;
  overflow: auto;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 28px 70px rgba(63, 48, 78, .22);
}

@media (max-width: 0px) and (max-width: 780px) {
  #view-my .profile-side-panel {
    grid-template-columns: 1fr;
    padding: 6px 14px;
  }

  #view-my .profile-level-card .profile-level-content {
    grid-template-columns: minmax(120px, auto) minmax(150px, 1fr);
    gap: 12px;
  }

  #view-my .profile-points-cluster {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #view-my .profile-points-card,
  #view-my .profile-checkin-button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 0px) and (max-width: 480px) {
  #view-my .profile-level-card .profile-level-content {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #view-my .profile-level-card .profile-level-heading {
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 8px;
  }
}

/* Top navigation closer to option 03: compact, light, content-first. */
.app-shell {
  padding-top: 10px;
}

.topbar {
  min-height: 50px !important;
  height: 50px;
  display: grid !important;
  grid-template-columns: 178px minmax(360px, 1fr) 238px 78px !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 6px 10px !important;
  border: 1px solid rgba(235, 220, 229, .86) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: 0 10px 28px rgba(74, 58, 93, .055) !important;
  backdrop-filter: blur(18px);
}

.brand {
  min-width: 0;
  gap: 8px !important;
}

.brand-logo {
  width: 42px !important;
  height: 42px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(239, 168, 174, .58) !important;
  background: #09070a !important;
  object-fit: contain !important;
  object-position: center !important;
  image-rendering: auto !important;
  filter: contrast(1.06) saturate(1.08);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .76), 0 6px 14px rgba(143, 63, 104, .16) !important;
}

.brand span {
  min-width: 0;
  display: block;
}

.brand strong {
  display: block;
  font-size: 14px !important;
  line-height: 1;
  color: #2c2540 !important;
  white-space: nowrap;
}

.brand small {
  display: none !important;
}

.main-nav {
  min-width: 0;
  justify-content: center !important;
  gap: 2px !important;
}

.nav-button {
  min-height: 32px !important;
  height: 32px;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #655d71 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.nav-button::after {
  display: none !important;
}

.nav-button.is-active,
.nav-button:hover,
.nav-menu:hover > .nav-button {
  color: #5b5fac !important;
  background: rgba(235, 240, 255, .78) !important;
}

.nav-menu {
  height: 32px;
  display: flex;
  align-items: center;
}

.nav-submenu {
  top: calc(100% + 8px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  min-width: 142px !important;
  padding: 6px !important;
  border-radius: 8px !important;
}

.nav-subitem {
  min-height: 36px !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  position: relative;
}

.nav-subitem span {
  font-size: 12px !important;
}

.nav-subitem small {
  display: block !important;
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  width: 220px;
  padding: 10px 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(-4px);
  border: 1px solid rgba(235, 220, 229, .88);
  border-radius: 8px;
  color: #6f6578;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 32px rgba(74, 58, 93, .12);
  line-height: 1.55;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
  z-index: 30;
}

.nav-subitem:hover small,
.nav-subitem:focus-visible small {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.top-search {
  width: 238px !important;
  min-height: 30px !important;
  height: 30px !important;
  grid-template-columns: minmax(0, 1fr) 32px !important;
  border-radius: 7px !important;
  border-color: rgba(235, 220, 229, .82) !important;
  background: rgba(255, 255, 255, .66) !important;
  box-shadow: none !important;
}

.top-search input {
  height: 30px !important;
  padding: 0 9px !important;
  font-size: 11px !important;
  color: #6d6375 !important;
}

.top-search input::placeholder {
  color: #aaa0ad;
}

.top-search .icon-button {
  width: 32px !important;
  height: 30px !important;
  min-height: 30px !important;
  font-size: 0 !important;
  color: transparent !important;
  border-left: 1px solid rgba(235, 220, 229, .78) !important;
  background: transparent url("./assets/ui-search.svg") center / 15px 15px no-repeat !important;
}

.top-actions {
  min-width: 0;
  justify-content: flex-end !important;
  gap: 6px !important;
}

.top-actions .button,
.top-avatar-button,
.top-message-button {
  box-shadow: none !important;
}

#loginBtn {
  min-height: 30px !important;
  height: 30px;
  padding: 0 12px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  background: rgba(255, 255, 255, .7) !important;
}

.top-message-button {
  position: relative;
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  color: #5f5670 !important;
  background: rgba(255, 255, 255, .68) !important;
  border-color: rgba(235, 220, 229, .82) !important;
}

.top-message-button::before {
  content: "";
  width: 15px;
  height: 15px;
  display: block;
  background: transparent url("./assets/ui-bell.svg") center / contain no-repeat;
}

.message-badge {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #e783ad;
  font-size: 10px;
  line-height: 1;
}

.top-avatar-button {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1px solid rgba(235, 220, 229, .82) !important;
  background: rgba(255, 255, 255, .72) !important;
}

.avatar-mark.top-avatar {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  font-size: 12px !important;
  border: 0 !important;
}

main {
  margin-top: 10px !important;
}

@media (max-width: 0px) and (max-width: 1040px) {
  .topbar {
    height: auto;
    grid-template-columns: 1fr !important;
  }

  .main-nav {
    justify-content: flex-start !important;
    overflow-x: auto;
  }

  .top-search {
    width: 100% !important;
  }

  .top-actions {
    justify-content: flex-start !important;
  }
}

/* Messages page, matched to the option 03 community-star-map reference. */
#view-messages {
  padding-top: 0 !important;
}

#view-messages .messages-layout {
  width: min(1080px, 100%) !important;
  max-width: 1080px !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: 164px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: start !important;
}

#view-messages .message-side-nav {
  min-height: 520px !important;
  padding: 12px 10px !important;
  border: 1px solid rgba(234, 219, 228, .82) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: 0 16px 42px rgba(91, 74, 106, .055) !important;
  backdrop-filter: blur(18px);
}

#view-messages .message-side-item {
  width: 100% !important;
  min-height: 38px !important;
  margin: 0 0 8px !important;
  padding: 0 10px !important;
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #74697d !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-align: left !important;
  box-shadow: none !important;
}

#view-messages .message-side-item::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1.6px solid currentColor;
  border-radius: 50%;
  opacity: .72;
}

#view-messages .message-side-item:nth-child(1)::before {
  border-radius: 4px;
  box-shadow: inset 0 -5px 0 rgba(124, 121, 207, .16);
}

#view-messages .message-side-item:nth-child(2)::before {
  border-radius: 50%;
  box-shadow: 5px 5px 0 -3px currentColor;
}

#view-messages .message-side-item:nth-child(3)::before {
  border-radius: 5px;
  border-bottom-left-radius: 1px;
}

#view-messages .message-side-item:nth-child(4)::before {
  border-radius: 999px;
  box-shadow: inset 0 -3px 0 rgba(231, 131, 173, .18);
}

#view-messages .message-side-item:nth-child(5)::before {
  border-radius: 4px;
  transform: rotate(45deg) scale(.86);
}

#view-messages .message-side-item.is-active,
#view-messages .message-side-item:hover {
  color: #735d8b !important;
  background: rgba(247, 229, 240, .82) !important;
}

#view-messages .messages-panel {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#view-messages .messages-panel::before,
#view-messages .messages-head {
  display: none !important;
}

#view-messages .message-inbox-list {
  display: grid !important;
  gap: 12px !important;
}

#view-messages .message-section-card {
  padding: 15px 18px 14px !important;
  border: 1px solid rgba(234, 219, 228, .82) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .86) !important;
  box-shadow: 0 16px 42px rgba(91, 74, 106, .055) !important;
}

#view-messages .message-section-head {
  min-height: 30px !important;
  margin: 0 0 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

#view-messages .message-section-head h2 {
  margin: 0 !important;
  color: #332942 !important;
  font-size: 17px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
}

#view-messages .message-section-head small {
  color: #9a90a0 !important;
  font-size: 12px !important;
}

#view-messages .message-section-head .button {
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 12px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: none !important;
}

#view-messages .message-inbox-row {
  width: 100% !important;
  min-height: 60px !important;
  padding: 9px 0 !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(234, 219, 228, .7) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left !important;
}

#view-messages .message-inbox-row:hover {
  background: linear-gradient(90deg, rgba(250, 244, 249, .72), rgba(255, 255, 255, .18)) !important;
}

#view-messages .message-inbox-row:last-child {
  border-bottom: 0 !important;
}

#view-messages .message-inbox-avatar {
  width: 38px !important;
  height: 38px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(255, 255, 255, .9) !important;
  border-radius: 50% !important;
  color: #fff !important;
  background: linear-gradient(135deg, #e8c7dd, #bedfe9) !important;
  box-shadow: 0 8px 18px rgba(91, 74, 106, .12) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

#view-messages .message-inbox-avatar.is-system {
  background: linear-gradient(135deg, #d7c6ee, #aee6e3) !important;
}

#view-messages .message-inbox-main {
  min-width: 0 !important;
  display: grid !important;
  gap: 3px !important;
}

#view-messages .message-inbox-main strong {
  color: #332942 !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
}

#view-messages .message-inbox-main small {
  max-width: 100% !important;
  overflow: hidden !important;
  color: #8f8596 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

#view-messages .message-inbox-meta {
  min-width: 54px !important;
  display: grid !important;
  justify-items: end !important;
  gap: 5px !important;
}

#view-messages .message-inbox-meta em {
  color: #a29aa8 !important;
  font-size: 11px !important;
  font-style: normal !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

#view-messages .message-inbox-meta b {
  min-width: 16px !important;
  height: 16px !important;
  padding: 0 5px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  color: #fff !important;
  background: #e86f9f !important;
  font-size: 10px !important;
  line-height: 1 !important;
  box-shadow: 0 5px 14px rgba(232, 111, 159, .28) !important;
}

#view-messages .message-empty-row {
  min-height: 58px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(226, 205, 220, .8);
  border-radius: 8px;
  color: #9a8fa0;
  background: rgba(255, 250, 253, .64);
  font-size: 12px;
}

#view-messages .message-detail-view,
#view-messages .message-new-chat-panel {
  padding: 16px 18px !important;
  border: 1px solid rgba(234, 219, 228, .82) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .86) !important;
  box-shadow: 0 16px 42px rgba(91, 74, 106, .055) !important;
}

#view-messages .interaction-message,
#view-messages .message-user-card {
  border: 0 !important;
  border-bottom: 1px solid rgba(234, 219, 228, .7) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#view-messages .message-thread-panel,
#view-messages .message-new-chat-panel,
#view-messages .interaction-message-list {
  gap: 10px !important;
}

@media (max-width: 0px) and (max-width: 860px) {
  #view-messages .messages-layout {
    grid-template-columns: 1fr !important;
  }

  #view-messages .message-side-nav {
    min-height: 0 !important;
    display: flex !important;
    gap: 6px !important;
    overflow-x: auto !important;
  }

  #view-messages .message-side-item {
    width: auto !important;
    flex: 0 0 auto !important;
    margin-bottom: 0 !important;
  }
}

/* Generator landing title and compact export actions. */
#view-generate[data-generator-mode="landing"] .generator-entry-block .section-heading {
  margin: 0 auto 26px;
  text-align: center;
}

#view-generate[data-generator-mode="landing"] .generator-entry-block .section-heading h1,
#view-generate[data-generator-mode="landing"] .generator-entry-block .section-heading p {
  text-align: center;
}

.export-menu {
  position: relative;
  width: 100%;
}

.export-menu-trigger.button {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  justify-content: center;
  gap: 8px;
}

.generator-action-row .export-menu-trigger.button {
  min-height: 48px;
}


.export-format-menu {
  position: absolute;
  z-index: 182;
  top: 0;
  right: auto;
  bottom: auto;
  left: 0;
  display: grid;
  gap: 2px;
  width: 112px;
  max-width: calc(100vw - 24px);
  padding: 5px;
  overflow: visible;
  border: 1px solid rgba(202, 184, 199, .76);
  border-radius: 8px;
  background: rgba(255, 253, 250, .99);
  box-shadow: 0 16px 36px rgba(65, 50, 69, .18);
  backdrop-filter: blur(12px);
}

.export-format-menu[hidden] {
  display: none !important;
}

.export-format-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  height: 30px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #4c4051;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.export-format-menu button:hover,
.export-format-menu button:focus-visible {
  border-color: rgba(201, 105, 141, .25);
  outline: 0;
  background: linear-gradient(135deg, #fff2f5, #effafa);
}

.export-format-menu strong {
  font-size: 13px;
  white-space: nowrap;
}

.export-format-menu small {
  color: #887b8d;
  font-size: 11px;
}

/* Readable global feedback states. */
.toast {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(128, 127, 201, .34);
  background: rgba(255, 253, 248, .98) !important;
  color: #403548 !important;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
  box-shadow: 0 16px 38px rgba(64, 51, 67, .18);
}

.toast::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #807fc9;
  box-shadow: 0 0 0 4px rgba(128, 127, 201, .12);
}

.toast.is-success {
  border-color: rgba(69, 159, 151, .42);
  background: #f1fbf8 !important;
  color: #276860 !important;
}

.toast.is-success::before {
  background: #45a89e;
  box-shadow: 0 0 0 4px rgba(69, 168, 158, .13);
}

.toast.is-error {
  border-color: rgba(203, 82, 113, .46);
  background: #fff2f5 !important;
  color: #87334d !important;
}

.toast.is-error::before {
  background: #cb5271;
  box-shadow: 0 0 0 4px rgba(203, 82, 113, .13);
}

/* Hand-drawn interaction symbols based on the supplied heart, bubble and star. */
.community-interaction-button {
  min-width: 38px;
  min-height: 34px;
  padding: 4px 7px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #6f6577;
  line-height: 1;
}

.community-card-meta .community-interaction-button {
  min-width: 42px;
  padding: 2px 3px !important;
}

.community-interaction-button:hover {
  color: #8d668e;
}

.community-interaction-button:focus-visible {
  outline: 2px solid rgba(128, 127, 201, .42);
  outline-offset: 3px;
}

.community-interaction-button.is-active {
  color: #b6658a !important;
}

.community-interaction-button > span {
  min-width: 10px;
  color: currentColor;
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.community-interaction-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  overflow: visible;
}

.community-interaction-icon .interaction-shape {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.community-interaction-icon .interaction-dot {
  fill: currentColor;
}

.community-interaction-button.is-active .interaction-fillable {
  fill: currentColor;
}

.community-interaction-button.is-active .is-heart .interaction-fillable,
.community-interaction-button.is-active .is-star .interaction-fillable {
  stroke-width: 1.65;
}

/* Community posts use a full page, not a modal. */
#view-community-detail {
  margin-top: 14px;
}

.community-detail-page {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 18px 48px;
}

.community-detail-page-nav {
  min-height: 52px;
  padding: 4px 0 14px;
  border-bottom: 1px solid rgba(221, 206, 218, .82);
  display: flex;
  align-items: center;
  gap: 14px;
}

.community-detail-page-nav .button {
  min-height: 36px;
  padding: 0 12px;
}

.community-detail-page-nav > span {
  color: #887d91;
  font-size: 13px;
  font-weight: 750;
}

.community-detail-page-content {
  min-width: 0;
  padding: 28px 0 8px;
}

#view-community-detail .community-detail {
  gap: 18px;
}

#view-community-detail .community-detail-head {
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(228, 215, 224, .78);
}

#view-community-detail .community-detail-head h1 {
  max-width: 760px;
  margin: 0 0 8px;
  color: #30283f;
  font-size: 30px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#view-community-detail .community-detail-head p,
#view-community-detail .community-detail > p {
  margin: 0;
  color: #756b7d;
  line-height: 1.7;
}

#view-community-detail .community-detail > p {
  max-width: 820px;
  font-size: 15px;
}

#view-community-detail .media-summary,
#view-community-detail .community-tags,
#view-community-detail .workbench-only-note {
  display: flex !important;
}

#view-community-detail .media-summary {
  padding: 0;
  border: 0;
  background: transparent;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.community-media-carousel {
  position: relative;
  width: min(560px, 100%);
  min-width: 0;
  margin: 12px auto 0;
}

.community-media-track {
  width: 100%;
  height: min(340px, 36dvh);
  min-height: 220px;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  cursor: grab;
  border: 1px solid rgba(221, 206, 218, .82);
  border-radius: 8px;
  background: rgba(250, 247, 250, .82);
}

.community-media-track::-webkit-scrollbar {
  display: none;
}

.community-media-track.is-dragging {
  scroll-snap-type: none;
  scroll-behavior: auto;
  cursor: grabbing;
  user-select: none;
}

.community-media-slide {
  min-width: 0;
  height: 100%;
  margin: 0;
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: block;
}

.community-media-slide img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: #faf7fa;
}

.community-media-arrow {
  position: absolute;
  z-index: 2;
  top: calc(50% - 28px);
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(221, 206, 218, .9);
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: #51465d;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(64, 51, 67, .14);
}

.community-media-arrow.is-prev {
  left: 12px;
}

.community-media-arrow.is-next {
  right: 12px;
}

.community-media-arrow:disabled {
  opacity: .34;
  cursor: default;
  box-shadow: none;
}

.community-media-arrow:not(:disabled):hover {
  border-color: rgba(128, 127, 201, .52);
  color: #7472bf;
}

.community-media-footer {
  min-height: 34px;
  padding: 8px 2px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #7d7284;
  font-size: 12px;
}

.community-media-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.community-media-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d5cad5;
  cursor: pointer;
}

.community-media-dots button.is-active {
  width: 18px;
  border-radius: 999px;
  background: #8583ca;
}

#view-community-detail .community-media-gallery {
  margin-top: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

#view-community-detail .community-media-gallery figure {
  min-width: 0;
  background: rgba(255, 255, 255, .76);
}

#view-community-detail .community-media-gallery img {
  max-height: 620px;
  object-fit: contain;
  background: #faf7fa;
}

#view-community-detail .community-detail > .community-post-copy {
  max-width: 860px;
  margin: 0;
  color: #111;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
}

#view-community-detail .community-post-intro {
  color: #111;
  white-space: pre-wrap;
}

#view-community-detail .community-post-copy .community-tags {
  display: inline !important;
  margin-left: .35em;
  vertical-align: baseline;
  white-space: normal;
}

#view-community-detail .community-post-copy .community-tags span {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #716c76;
  font-size: 17px;
  font-weight: 400;
  line-height: inherit;
}

#view-community-detail .community-post-copy .community-tags span + span {
  margin-left: .45em;
}

.publish-tag-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.publish-tag-entry .button {
  min-width: 72px;
}

.publish-tag-list {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.publish-tag-list:empty {
  display: none;
}

.publish-tag-chip {
  min-height: 30px;
  max-width: 100%;
  padding: 5px 8px 5px 10px;
  border: 1px solid #dedbe2;
  border-radius: 8px;
  background: #f2f1f4;
  color: #655f6a;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}

.publish-tag-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.publish-tag-chip b {
  color: #968e9b;
  font-size: 16px;
  line-height: 1;
}

.publish-tag-chip:hover {
  border-color: #c9c4cf;
  background: #eae8ed;
}

#view-community-detail .workbench-only-note {
  justify-content: space-between;
  gap: 12px;
}

#view-community-detail .community-actions {
  display: flex;
  flex-wrap: wrap;
  grid-template-columns: none;
  gap: 8px;
  margin-top: 0;
}

#view-community-detail .community-actions .button {
  display: inline-flex !important;
  min-height: 38px;
}

#view-community-detail .community-comments {
  margin-top: 6px;
  padding-top: 18px;
}

.community-detail-comment-box {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(221, 206, 218, .82);
}

@media (max-width: 0px) and (max-width: 700px) {
  .community-detail-page {
    padding-inline: 12px;
  }

  #view-community-detail .community-detail-head {
    align-items: stretch;
    flex-direction: column;
  }

  #view-community-detail .community-detail-head h1 {
    font-size: 24px;
  }

  #view-community-detail .community-media-gallery {
    grid-template-columns: 1fr;
  }

  .community-media-track {
    height: min(420px, 52dvh);
    min-height: 220px;
  }

  .community-media-arrow {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }

  #view-community-detail .workbench-only-note,
  .community-detail-comment-box {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .community-detail-comment-box .button {
    width: 100%;
  }
}

/* Community cards fill each row from left to right, then wrap to the next row. */
#view-community .community-feed {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-auto-flow: row;
  align-items: start;
  gap: 12px;
}

#view-community .community-feed > .community-card {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  align-self: start;
}

#view-community .community-feed > .empty-state {
  width: 100%;
  grid-column: 1 / -1;
}

#view-community .community-cover {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  line-height: 0;
  background: #f7f2f6;
}

#view-community .community-cover-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

#view-community .community-cover-empty {
  min-height: 110px;
  line-height: 1.5;
}

#view-community .community-card-body {
  padding: 9px;
  gap: 6px;
}

#view-community .community-card-title h2 {
  margin-bottom: 5px;
  font-size: 13px;
}

#view-community .community-card-author-row {
  gap: 5px;
  font-size: 10px;
}

#view-community .community-author-link {
  gap: 5px;
  font-size: 11px;
}

#view-community .community-author-following-label {
  font-size: 10px;
}

#view-community .avatar-mark.community-author-avatar {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  font-size: 9px;
}

#view-community .community-card-meta {
  gap: 10px;
  margin-top: 8px;
}

#view-community .community-start-button {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 11px;
}

.community-author-link {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #655b7a;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
}

.community-author-link:hover {
  color: #a15f87;
}

.community-author-link .community-author-following-label {
  color: var(--sm-violet);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.community-author-link:hover .community-author-following-label {
  color: var(--sm-rose);
}

.community-author-link:focus-visible {
  outline: 2px solid rgba(128, 127, 201, .42);
  outline-offset: 3px;
  border-radius: 999px;
}

.avatar-mark.community-author-avatar {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 1px solid rgba(223, 207, 219, .9);
  border-radius: 999px;
  font-size: 10px;
  box-shadow: 0 3px 8px rgba(73, 57, 83, .08);
}

.community-card-author-row,
.community-detail-author-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.community-card-author-row {
  justify-content: space-between;
}

.community-detail-author-row {
  justify-content: flex-start;
}

.community-detail-author-row .community-author-link.is-detail .community-author-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 12px;
}

@media (max-width: 0px) and (max-width: 1200px) {
  #view-community .community-feed {
    column-count: 5;
  }
}

@media (max-width: 0px) and (max-width: 980px) {
  #view-community .community-feed {
    column-count: 4;
  }
}

@media (max-width: 0px) and (max-width: 760px) {
  #view-community .community-feed {
    column-count: 3;
  }
}

@media (max-width: 0px) and (max-width: 560px) {
  #view-community .community-feed {
    column-count: 2;
    column-gap: 10px;
  }
}

@media (max-width: 0px) and (max-width: 360px) {
  #view-community .community-feed {
    column-count: 1;
  }
}

/* Standalone public user profile. Private works, drafts, XP and points stay out of this view. */
#view-user .public-profile-page {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

#view-user .public-profile-nav {
  min-height: 42px;
  display: flex;
  align-items: center;
}

#view-user .public-profile-hero {
  position: relative;
  min-height: 220px;
  padding: 30px 34px 24px;
  overflow: visible;
  background:
    radial-gradient(circle at 14% 16%, rgba(255, 255, 255, .72), transparent 26%),
    radial-gradient(circle at 88% 18%, rgba(203, 238, 239, .46), transparent 28%),
    linear-gradient(135deg, rgba(247, 220, 233, .86), rgba(244, 239, 255, .88) 58%, rgba(231, 250, 247, .82));
}

#view-user .public-profile-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
}

#view-user .public-profile-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}

#view-user .avatar-mark.public-user-avatar {
  width: 112px;
  height: 112px;
  flex: 0 0 112px;
  border: 7px solid rgba(255, 255, 255, .92);
  border-radius: 999px;
  background: linear-gradient(135deg, #faf7fb, #edf6f7);
  font-size: 34px;
  box-shadow: 0 16px 30px rgba(80, 60, 96, .14);
}

#view-user .public-profile-level {
  min-width: max-content;
  padding: 6px 9px;
  border: 1px solid rgba(132, 125, 188, .25);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: #625c9b;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 6px 16px rgba(74, 58, 93, .08);
}

#view-user .public-profile-copy {
  min-width: 0;
}

#view-user .public-profile-copy h1 {
  margin: 0;
  color: #2d2540;
  font-size: 28px;
  line-height: 1.15;
}

#view-user .public-profile-copy p {
  max-width: 520px;
  margin: 9px 0 7px;
  color: #665e70;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

#view-user .public-profile-copy small {
  color: #857a8b;
  font-size: 12px;
}

#view-user .public-profile-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#view-user .public-profile-actions .button {
  width: auto;
  min-width: 76px;
  min-height: 40px;
  padding: 0 15px;
}

#view-user .public-profile-actions .button[aria-pressed="true"] {
  border-color: rgba(126, 125, 199, .4);
  background: rgba(239, 238, 252, .9);
  color: #5f5b9d;
}

#view-user .public-profile-stats {
  width: min(430px, calc(100% - 170px));
  margin: 20px 0 0 170px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

#view-user .public-profile-stats span {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: #786e80;
  font-size: 12px;
}

#view-user .public-profile-stats strong {
  color: #2d2540;
  font-size: 18px;
}

#view-user .public-profile-search {
  padding: 10px 12px;
  border: 1px solid rgba(228, 214, 224, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .86);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(74, 58, 93, .06);
}

#view-user .public-profile-post-panel {
  min-height: 260px;
  padding: 18px;
}

#view-user .public-profile-section-head {
  margin-bottom: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

#view-user .public-profile-section-head h2 {
  margin: 0;
  color: #30283f;
  font-size: 20px;
}

#view-user .public-profile-section-head p {
  margin: 5px 0 0;
  color: #81768a;
  font-size: 12px;
}

#view-user .public-profile-section-head > span {
  color: #7b7182;
  font-size: 13px;
  font-weight: 750;
}

#view-user .public-profile-content-tabs {
  width: max-content;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 4px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border: 1px solid rgba(228, 214, 224, .92);
  border-radius: 10px;
  background: rgba(248, 244, 248, .92);
}

#view-user .public-profile-content-tabs button {
  min-width: 92px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #726879;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

#view-user .public-profile-content-tabs button strong {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .84);
  color: #82778a;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
}

#view-user .public-profile-content-tabs button.is-active {
  background: #fff;
  color: #30283f;
  box-shadow: 0 4px 12px rgba(75, 58, 83, .08);
}

#view-user .public-profile-content-tabs button.is-active strong {
  background: rgba(239, 238, 252, .96);
  color: #625da3;
}

#view-user .public-profile-content-tabs button:focus-visible {
  outline: 2px solid rgba(126, 125, 199, .62);
  outline-offset: 2px;
}

/* Public profile posts use the same compact row-major card scale as Community. */
#view-user .public-user-post-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-auto-flow: row;
  align-items: start;
  gap: 12px;
}

#view-user .public-user-post-grid > .community-card {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  align-self: start;
}

#view-user .public-user-post-grid > .empty-state {
  width: 100%;
  grid-column: 1 / -1;
}

#view-user .public-user-post-grid .community-cover {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  line-height: 0;
}

#view-user .public-user-post-grid .community-cover-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

#view-user .public-user-post-grid .community-cover-empty {
  min-height: 110px;
  line-height: 1.5;
}

#view-user .public-user-post-grid .community-card-body {
  padding: 9px;
  gap: 6px;
}

#view-user .public-user-post-grid .community-card-title h2 {
  margin-bottom: 5px;
  font-size: 13px;
}

#view-user .public-user-post-grid .community-card-author-row {
  gap: 5px;
  font-size: 10px;
}

#view-user .public-user-post-grid .community-author-link {
  gap: 5px;
  font-size: 11px;
}

#view-user .public-user-post-grid .community-author-following-label {
  font-size: 10px;
}

#view-user .public-user-post-grid .avatar-mark.community-author-avatar {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  font-size: 9px;
}

#view-user .public-user-post-grid .community-card-meta {
  gap: 10px;
  margin-top: 8px;
}
@media (max-width: 0px) and (max-width: 900px) {
  #view-user .public-profile-identity {
    grid-template-columns: auto minmax(0, 1fr);
  }

  #view-user .public-profile-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 149px;
  }

  #view-user .public-profile-stats {
    width: min(430px, calc(100% - 149px));
    margin-left: 149px;
  }

  #view-user .public-user-post-grid {
    column-count: 2;
  }
}

@media (max-width: 0px) and (max-width: 620px) {
  #view-user .public-profile-hero {
    padding: 24px 18px 20px;
  }

  #view-user .public-profile-identity {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
    text-align: center;
  }

  #view-user .public-profile-copy p {
    margin-inline: auto;
  }

  #view-user .public-profile-actions {
    grid-column: auto;
    width: 100%;
    padding-left: 0;
    justify-content: center;
  }

  #view-user .public-profile-actions .button {
    flex: 1 1 0;
    min-width: 0;
  }

  #view-user .public-profile-stats {
    width: 100%;
    margin: 20px 0 0;
  }

  #view-user .public-user-post-grid {
    column-count: 1;
    column-gap: 0;
  }
}

/* Workbench source categories. */
.workbench-picker-tabs {
  width: max-content;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid rgba(222, 207, 219, .9);
  border-radius: 8px;
  background: rgba(250, 247, 250, .9);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.workbench-picker-tabs button {
  min-height: 44px;
  padding: 7px 13px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #756b7d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.workbench-picker-tabs button:hover {
  background: rgba(247, 235, 242, .72);
  color: #50475c;
}

.workbench-picker-tabs button.is-active {
  background: #fff;
  color: #5f5b9d;
  box-shadow: 0 5px 14px rgba(71, 56, 86, .09);
}

.workbench-picker-tabs button:focus-visible {
  outline: 2px solid rgba(128, 127, 201, .4);
  outline-offset: 2px;
}

.workbench-picker-tabs span {
  min-width: 22px;
  min-height: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(123, 121, 207, .1);
  color: inherit;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
}

@media (max-width: 0px) and (max-width: 520px) {
  .workbench-picker-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workbench-picker-tabs button {
    min-width: 0;
    padding-inline: 8px;
  }
}

/* Community cover view counter. */
.community-cover .community-cover-views {
  position: absolute;
  z-index: 3;
  right: 8px;
  bottom: 8px;
  left: auto;
  top: auto;
  min-width: 0;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 6px;
  background: rgba(48, 40, 55, .74);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 3px 10px rgba(35, 27, 39, .12);
}

.community-view-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.community-view-icon .community-view-pupil {
  stroke-width: 1.15;
}

.community-cover-views b {
  font: inherit;
  line-height: 1;
}

#view-community .community-cover .community-cover-views,
#view-user .community-cover .community-cover-views {
  right: 7px;
  bottom: 7px;
  min-height: 22px;
  padding: 3px 6px;
  font-size: 10px;
}

/* Identify the post author inside the comment stream. */
.community-comment-head > div {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.community-comment .community-comment-author-badge {
  color: var(--sm-violet);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

/* The legacy message sidebar was removed; the conversation now owns the full content width. */
#view-messages .messages-layout {
  width: min(980px, 100%) !important;
  max-width: 980px !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}

#view-messages .messages-panel {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

#view-messages .messages-head {
  width: 100% !important;
  min-height: 58px !important;
  margin: 0 0 14px !important;
  padding: 0 2px 14px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(222, 207, 219, .82) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#view-messages .message-inbox-list.is-hidden,
#view-messages .message-detail-view.is-hidden,
#view-messages .message-new-chat-panel.is-hidden,
#view-messages .interaction-message-list.is-hidden,
#view-messages .message-thread-panel.is-hidden {
  display: none !important;
}

#view-messages .messages-head h1 {
  margin: 0 0 3px !important;
  font-size: 24px !important;
  line-height: 1.2 !important;
}

#view-messages .messages-head p {
  margin: 0 !important;
  color: #827789 !important;
  font-size: 13px !important;
}

#view-messages .message-back-button {
  flex: 0 0 auto;
}

#view-messages .message-detail-view {
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

#view-messages .message-thread-panel {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 560px !important;
  grid-template-rows: auto minmax(280px, 1fr) auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: hidden !important;
}

#view-messages .message-thread-head {
  min-width: 0 !important;
  min-height: 68px !important;
  padding: 13px 16px !important;
  background: linear-gradient(100deg, rgba(248, 236, 244, .74), rgba(234, 244, 245, .58)) !important;
}

#view-messages .message-thread-head strong,
#view-messages .message-thread-head span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#view-messages .message-thread {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 280px !important;
  padding: 18px !important;
  background: rgba(255, 253, 248, .58) !important;
}

#view-messages .message-composer {
  width: 100% !important;
  min-width: 0 !important;
  padding: 12px 14px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: stretch !important;
  background: rgba(250, 247, 250, .9) !important;
}

#view-messages .message-composer .select-input {
  width: 100% !important;
  min-width: 0 !important;
}

#view-messages .message-composer #messageSharePatternBtn {
  white-space: nowrap;
}

#view-messages .message-composer .textarea-input {
  grid-column: 1 !important;
  grid-row: 2 !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 68px !important;
  resize: vertical;
}

#view-messages .message-composer #messageSendBtn {
  grid-column: 2 !important;
  grid-row: 2 !important;
  min-width: 88px !important;
  justify-self: stretch !important;
}

@media (max-width: 0px) and (max-width: 560px) {
  #view-messages .messages-head h1 {
    font-size: 21px !important;
  }

  #view-messages .message-detail-view,
  #view-messages .message-new-chat-panel {
    border-radius: 7px !important;
  }

  #view-messages .message-thread-panel {
    min-height: 500px !important;
  }

  #view-messages .message-composer .textarea-input,
  #view-messages .message-composer #messageSendBtn {
    grid-column: 1 / -1 !important;
  }

  #view-messages .message-composer #messageSendBtn {
    grid-row: 3 !important;
    min-height: 42px !important;
  }
}
/* Personal works and posts: pinned state and compact overflow actions. */
#view-my .my-pattern-card,
#view-my .profile-post-row {
  position: relative;
  overflow: visible;
}

#view-my .my-pattern-card:has(.profile-card-menu[open]),
#view-my .profile-post-row:has(.profile-card-menu[open]) {
  z-index: 20;
}

.profile-card-corner-controls {
  position: absolute;
  z-index: 8;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.profile-pin-badge,
.community-pinned-badge,
.community-detail-pin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid rgba(117, 102, 184, .28);
  border-radius: 6px;
  background: rgba(248, 245, 255, .94);
  color: #675fa7;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(71, 55, 103, .1);
}

.profile-card-menu {
  position: relative;
}

.profile-card-menu > summary {
  width: 32px;
  height: 27px;
  border: 1px solid rgba(219, 201, 214, .9);
  border-radius: 6px;
  background: rgba(255, 255, 255, .95);
  color: #554b61;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  list-style: none;
  box-shadow: 0 4px 12px rgba(71, 55, 103, .1);
}

.profile-card-menu > summary::-webkit-details-marker {
  display: none;
}

.profile-card-menu > summary:hover,
.profile-card-menu[open] > summary {
  border-color: rgba(112, 101, 184, .52);
  background: #f8f5ff;
  color: #5e58a6;
}

.profile-card-menu > summary:focus-visible {
  outline: 2px solid rgba(112, 101, 184, .42);
  outline-offset: 2px;
}
/* Personal profile overflow triggers stay borderless in every state. */
#view-my .profile-card-menu > summary,
#view-my .profile-card-menu > summary:hover,
#view-my .profile-card-menu[open] > summary,
#view-my .profile-card-menu > summary:focus-visible {
  border: 0 !important;
  outline: 0;
  box-shadow: none;
}

#view-my .profile-card-menu > summary:focus-visible {
  background: #f8f5ff;
  color: #5e58a6;
}

.profile-card-menu-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  width: 142px;
  padding: 5px;
  border: 1px solid rgba(218, 202, 214, .92);
  border-radius: 7px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 14px 34px rgba(61, 47, 76, .16);
  display: grid;
  gap: 1px;
  overflow: visible;
  transform: translateY(var(--profile-card-menu-shift-y, 0px));
}

.profile-card-menu-panel button {
  width: 100%;
  height: 22px;
  min-height: 22px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #413649;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-align: left;
  display: flex;
  align-items: center;
}

.profile-card-menu-panel button:hover,
.profile-card-menu-panel button:focus-visible {
  background: #f6f1f7;
  outline: 0;
}

.profile-card-menu-panel button.is-danger {
  color: #b44f70;
}

.profile-card-menu-panel button.is-danger:hover,
.profile-card-menu-panel button.is-danger:focus-visible {
  background: #fff0f4;
}

.profile-card-menu-panel button:disabled {
  color: #aaa0aa;
  cursor: not-allowed;
}

/* Profile work export stays compact while reusing the full export workflow. */
.profile-card-export-menu {
  position: relative;
  width: 100%;
  height: 22px;
}

.profile-card-export-trigger {
  display: block;
}

.profile-card-export-submenu {
  position: absolute;
  z-index: 45;
  top: -5px;
  right: calc(100% + 6px);
  width: 108px;
  padding: 5px;
  border: 1px solid rgba(218, 202, 214, .92);
  border-radius: 7px;
  background: rgba(255, 255, 255, .99);
  box-shadow: 0 12px 28px rgba(61, 47, 76, .16);
  display: grid;
  gap: 2px;
}

.profile-card-export-submenu[hidden] {
  display: none;
}

.profile-card-export-submenu button {
  height: 32px;
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

@media (width < 640px) {
  .profile-card-export-submenu {
    top: calc(100% + 4px);
    right: 0;
  }
}
.community-pinned-badge {
  position: absolute;
  z-index: 4;
  top: 8px;
  right: 8px;
  pointer-events: none;
}

.community-detail-heading-copy {
  min-width: 0;
}

.community-detail-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.community-detail-title-line h1 {
  min-width: 0;
}

.community-detail-pin-badge {
  flex: 0 0 auto;
  box-shadow: none;
}

@media (max-width: 0px) and (max-width: 560px) {
  .profile-card-menu-panel {
    width: 132px;
  }

  .profile-pin-badge,
  .community-pinned-badge,
  .community-detail-pin-badge {
    min-height: 23px;
    padding: 4px 7px;
    font-size: 11px;
  }
}
/* Compact image attachments for comments and direct messages. */
.inline-image-preview {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  padding: 6px;
  border: 1px solid rgba(218, 202, 214, .9);
  border-radius: 7px;
  background: rgba(255, 255, 255, .9);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
}

.inline-image-preview.is-hidden {
  display: none !important;
}

.inline-image-preview img {
  width: 46px;
  height: 46px;
  border-radius: 5px;
  object-fit: cover;
}

.inline-image-preview span {
  min-width: 0;
  display: grid;
  gap: 0;
  max-height: min(340px, calc(100dvh - 24px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.inline-image-preview strong,
.inline-image-preview small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-image-preview small {
  color: #8a7f8c;
  font-size: 11px;
}

.community-detail-comment-box {
  align-items: stretch;
}

.community-comment-input-wrap {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.community-detail-comment-box #communityCommentInput {
  width: 100%;
  min-height: 56px;
  max-height: 128px;
  resize: vertical;
}

.community-comment-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.community-comment-image {
  display: block;
  width: min(240px, 100%);
  max-height: 260px;
  margin-top: 8px;
  border-radius: 7px;
  object-fit: contain;
  background: #f7f2f6;
}

.direct-message-content {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 7px;
}

.direct-message.is-own .direct-message-content {
  background: #fffaf5;
}

.direct-message-content p {
  padding: 0;
  border: 0;
  background: transparent;
}

.direct-message-image {
  display: block;
  width: min(280px, 100%);
  max-height: 340px;
  border-radius: 7px;
  object-fit: contain;
  background: #f7f2f6;
}

#view-messages .message-composer .message-image-tools {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

#view-messages .message-composer .message-image-tools .inline-image-preview {
  flex: 1 1 auto;
}

#view-messages .message-composer .textarea-input {
  grid-row: 3 !important;
}

#view-messages .message-composer #messageSendBtn {
  grid-row: 3 !important;
}

@media (max-width: 0px) and (max-width: 560px) {
  .community-comment-actions {
    width: 100%;
  }

  .community-comment-actions .button {
    flex: 1 1 0;
  }

  #view-messages .message-composer .message-image-tools {
    flex-wrap: wrap;
  }

  #view-messages .message-composer .message-image-tools .inline-image-preview {
    flex-basis: 100%;
  }

  #view-messages .message-composer .textarea-input {
    grid-row: 3 !important;
  }

  #view-messages .message-composer #messageSendBtn {
    grid-row: 4 !important;
  }
}
/* Direct-message conversation: one title, avatar and bubble for every message. */
#view-messages .message-thread-head {
  display: none !important;
}

#view-messages .message-thread-panel {
  grid-template-rows: minmax(280px, 1fr) auto !important;
}

#view-messages .messages-head p.is-hidden {
  display: none !important;
}

#view-messages .message-thread {
  gap: 14px !important;
  align-content: start;
}

#view-messages .direct-message {
  width: 100%;
  max-width: none;
  justify-self: stretch;
  display: block;
}

#view-messages .direct-message-row {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 9px;
}

#view-messages .direct-message.is-own .direct-message-row {
  justify-content: flex-end;
}

#view-messages .avatar-mark.direct-message-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(214, 199, 212, .9);
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #62576a;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(62, 47, 70, .08);
}

#view-messages .avatar-mark.direct-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#view-messages .direct-message-bubble-column {
  min-width: 0;
  max-width: min(72%, 560px);
  display: grid;
  justify-items: start;
  gap: 4px;
}

#view-messages .direct-message.is-own .direct-message-bubble-column {
  justify-items: end;
}

#view-messages .direct-message-bubble-column time {
  padding-inline: 3px;
  color: #9a909c;
  font-size: 10px;
  line-height: 1.3;
}

#view-messages .direct-message-content,
#view-messages .message-pattern-card {
  width: fit-content;
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(62, 47, 70, .05);
}

#view-messages .direct-message-content {
  padding: 9px 11px;
}

#view-messages .direct-message.is-own .direct-message-content {
  border-color: rgba(147, 195, 211, .58);
  background: rgba(220, 243, 247, .92);
}

#view-messages .direct-message-content p {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

#view-messages .direct-message-image {
  max-width: min(280px, 64vw);
}

@media (max-width: 0px) and (max-width: 560px) {
  #view-messages .message-thread {
    padding-inline: 12px !important;
  }

  #view-messages .avatar-mark.direct-message-avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  #view-messages .direct-message-bubble-column {
    max-width: 78%;
  }
}
/* Global primary actions use the soft rose-to-peach reference gradient. */
.button.primary,
.home-actions .button.primary,
#view-my .profile-checkin-button {
  border-color: rgba(231, 166, 181, .72) !important;
  background: linear-gradient(135deg, #f3c0ce 0%, #fcdbc2 100%) !important;
  color: #4a3240 !important;
  box-shadow: 0 10px 24px rgba(175, 103, 125, .18) !important;
}

.button.primary:not(:disabled):hover,
.home-actions .button.primary:not(:disabled):hover,
#view-my .profile-checkin-button:not(:disabled):hover {
  border-color: rgba(221, 145, 166, .82) !important;
  background: linear-gradient(135deg, #efb7ca 0%, #fad1b7 100%) !important;
  color: #432d39 !important;
  box-shadow: 0 12px 26px rgba(175, 103, 125, .24) !important;
}

.button.primary:not(:disabled):active,
.home-actions .button.primary:not(:disabled):active,
#view-my .profile-checkin-button:not(:disabled):active {
  background: linear-gradient(135deg, #ecb2c5 0%, #f7ccb2 100%) !important;
  box-shadow: 0 5px 13px rgba(175, 103, 125, .18) !important;
}

.button.primary:focus-visible,
.home-actions .button.primary:focus-visible,
#view-my .profile-checkin-button:focus-visible {
  outline: 3px solid rgba(238, 166, 184, .36) !important;
  outline-offset: 2px;
}

.button.primary:disabled {
  border-color: rgba(205, 195, 202, .82) !important;
  background: #eee9ec !important;
  color: #938993 !important;
  box-shadow: none !important;
}
/* Message rhythm: time above, compact text and avatar-aligned bubbles. */
#view-messages .direct-message-row {
  align-items: flex-end;
}

#view-messages .direct-message-bubble-column {
  gap: 3px;
}

#view-messages .direct-message-bubble-column time {
  order: -1;
  font-size: 10px;
  line-height: 1.2;
}

#view-messages .direct-message-content {
  min-height: 38px;
  padding: 8px 10px;
  align-content: center;
}

#view-messages .direct-message-content p {
  font-size: 14px !important;
  line-height: 1.4;
}

#view-messages .message-pattern-card strong {
  font-size: 13px;
  line-height: 1.35;
}

/* Direct messages use the available canvas instead of floating in a narrow center column. */
#view-messages:has(.message-thread-panel:not(.is-hidden)) {
  margin-top: 12px !important;
}

#view-messages .messages-layout:has(.message-thread-panel:not(.is-hidden)) {
  width: min(1280px, 100%) !important;
  max-width: 1280px !important;
}

#view-messages .messages-layout:has(.message-thread-panel:not(.is-hidden)) .messages-head {
  min-height: 52px !important;
  margin-bottom: 10px !important;
  padding: 0 0 10px !important;
}

#view-messages .message-thread-panel:not(.is-hidden) {
  min-height: max(600px, calc(100dvh - 220px)) !important;
}

#view-messages .message-thread-panel:not(.is-hidden) .message-thread {
  padding: 12px 14px !important;
  gap: 12px !important;
}

#view-messages .message-thread-panel:not(.is-hidden) .message-composer {
  padding: 10px 12px !important;
}

#view-messages .message-thread-panel:not(.is-hidden) .direct-message-bubble-column {
  max-width: min(80%, 680px);
}
/* Threaded community comments: avatar, level, one-level indent and inline replies. */
#view-community-detail .community-comments {
  display: grid;
  gap: 0;
  margin-top: 8px;
  padding-top: 20px;
}

#view-community-detail .community-comments > h4 {
  margin: 0 0 8px;
  color: #2d2537;
  font-size: 19px;
}

.community-comment-thread {
  padding: 16px 0;
  border-bottom: 1px solid rgba(225, 214, 222, .76);
}

.community-comment {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.community-comment-avatar-column {
  min-width: 0;
}

.community-comment-author,
.community-comment-author-name {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.avatar-mark.community-comment-avatar {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(224, 210, 220, .9);
  border-radius: 50%;
  background: #fff;
  color: #62586b;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
}

.avatar-mark.community-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-comment-content {
  min-width: 0;
}

.community-comment-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 20px;
}

.community-comment-identity {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.community-comment-author-name {
  color: #8b8290;
  font-size: 12px;
  line-height: 1.25;
}

.community-comment-author-name:hover {
  color: #665e73;
}

.community-comment-level {
  color: #9b7c9b !important;
  font-size: 11px !important;
  font-weight: 800;
  line-height: 1.2;
}

.community-comment .community-comment-author-badge {
  color: #b36f91;
  font-size: 11px;
  font-weight: 800;
}

#view-community-detail .community-comment-body {
  margin: 5px 0 0 !important;
  color: #000 !important;
  font-size: 18px !important;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

#view-community-detail .community-comment-body > span:not(.community-comment-reply-prefix) {
  color: #000 !important;
  font-size: inherit !important;
}

.community-comment-reply-prefix {
  color: #746b78 !important;
  font-size: inherit !important;
}

.community-comment-reply-prefix b {
  color: #6b5d88;
  font-weight: 700;
}

.community-comment-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.community-comment-footer time {
  color: #9b929d;
  font-size: 11px;
  line-height: 1.3;
}

.community-comment-action {
  min-height: 24px;
  padding: 2px 3px;
  border: 0;
  background: transparent;
  color: #8c8290;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font: inherit;
  font-size: 12px;
  line-height: 1;
}

.community-comment-action:hover {
  color: #a56686;
}

.community-comment-action.is-active {
  color: #b6658a;
}

.community-comment-action .community-interaction-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.community-comment-action.is-active .interaction-fillable {
  fill: currentColor;
}

.community-comment-action.is-danger {
  color: #b05b74;
}

.community-comment-replies {
  display: grid;
  gap: 12px;
  margin: 12px 0 0 52px;
  padding-left: 12px;
  border-left: 2px solid rgba(235, 219, 229, .9);
}

.community-comment-replies .community-comment {
  grid-template-columns: 32px minmax(0, 1fr);
}

.community-comment-replies .avatar-mark.community-comment-avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

#view-community-detail .community-comment-replies .community-comment-body {
  color: #000 !important;
  font-size: 17px !important;
}

.community-comment-replies .community-comment-footer {
  margin-top: 5px;
}

.community-comment-reply-notice {
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid rgba(224, 195, 209, .78);
  border-radius: 6px;
  background: rgba(255, 248, 251, .92);
  color: #7d6f7d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.community-comment-reply-notice strong {
  color: #674d6a;
}

.community-comment-reply-notice button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8d7787;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.community-comment-reply-notice button:hover {
  background: #f7eaf0;
  color: #5a4758;
}

@media (max-width: 0px) and (max-width: 560px) {
  .community-comment {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
  }

  .avatar-mark.community-comment-avatar {
    width: 34px;
    height: 34px;
  }

  #view-community-detail .community-comment-body {
    color: #000 !important;
    font-size: 17px !important;
  }

  .community-comment-replies {
    margin-left: 42px;
    padding-left: 9px;
  }
}


/* Full-screen viewing for community post images. */
.community-media-fullscreen-trigger {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: block;
  cursor: zoom-in;
}

.community-media-fullscreen-trigger:focus-visible {
  outline: 3px solid rgba(128, 127, 201, .72);
  outline-offset: -3px;
}

body.community-lightbox-open {
  overflow: hidden;
}

.community-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: center;
  padding: 20px 76px;
}

.community-image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 15, 22, .94);
}

.community-image-lightbox-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
}

.community-image-lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 40px);
  object-fit: contain;
  image-rendering: auto;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

.community-image-lightbox.is-zoomed .community-image-lightbox-stage img {
  cursor: grab;
}

.community-image-lightbox.is-dragging .community-image-lightbox-stage img {
  cursor: grabbing;
}

.community-image-lightbox-close,
.community-image-lightbox-arrow {
  position: fixed;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
  background: rgba(24, 20, 28, .72);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.community-image-lightbox-close {
  top: 18px;
  right: 18px;
  font-size: 30px;
  line-height: 1;
}

.community-image-lightbox-arrow {
  top: calc(50% - 22px);
  font-size: 34px;
  line-height: 1;
}

.community-image-lightbox-arrow.is-prev {
  left: 18px;
}

.community-image-lightbox-arrow.is-next {
  right: 18px;
}

.community-image-lightbox-close:hover,
.community-image-lightbox-arrow:not(:disabled):hover {
  background: rgba(248, 200, 200, .9);
  color: #3f303d;
}

.community-image-lightbox-arrow:disabled {
  opacity: .25;
  cursor: default;
}

.community-image-lightbox-arrow[hidden] {
  display: none !important;
}

.community-image-lightbox-close:focus-visible,
.community-image-lightbox-arrow:focus-visible {
  outline: 3px solid #f8c8c8;
  outline-offset: 3px;
}

@media (max-width: 0px) and (max-width: 640px) {
  .community-image-lightbox {
    padding: 64px 12px 72px;
  }

  .community-image-lightbox-stage img {
    max-height: calc(100dvh - 136px);
  }

  .community-image-lightbox-arrow {
    top: auto;
    bottom: 14px;
  }
}


/* Audit remediation: navigation, focus, compact dialogs and touch access. */
.skip-link {
  position: fixed;
  z-index: 10000;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border: 2px solid #3f2c50;
  border-radius: 6px;
  background: #fff;
  color: #281c31;
  font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

/* The main region is a navigation target, not an interactive control. */
#mainContent:focus,
#mainContent:focus-visible {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.mobile-nav-toggle { display: none; }
.top-message-button.is-hidden,
.top-actions .top-message-button.is-hidden { display: none !important; }
:where(button, a, summary, canvas, [tabindex]):focus-visible {
  outline: 2px solid rgba(82, 94, 104, .46) !important;
  outline-offset: 3px !important;
}

/* Form controls never use the global outer focus ring. */
:where(input, select, textarea):focus,
:where(input, select, textarea):focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea):focus,
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea):focus-visible {
  border-color: rgba(164, 174, 182, .88) !important;
  box-shadow: inset 0 0 0 1px rgba(82, 94, 104, .1), inset 0 1px 0 rgba(255, 255, 255, .82) !important;
}

:where(input[type="checkbox"], input[type="radio"], input[type="range"], input[type="color"]):focus-visible {
  outline: 2px solid rgba(82, 94, 104, .42) !important;
  outline-offset: 2px !important;
}

/* Login fields keep focus visible without the global purple outer ring. */
#loginDialog .text-input:focus,
#loginDialog .text-input:focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
  border-color: rgba(75, 159, 176, .64);
  box-shadow: inset 0 0 0 1px rgba(75, 159, 176, .16), inset 0 1px 0 rgba(255, 255, 255, .82);
}

/* Keep the search input free of the clipped global focus outline. */
.top-search input:focus,
.top-search input:focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}

.top-search:focus-within {
  border-color: rgba(75, 159, 176, .52) !important;
  box-shadow: inset 0 0 0 1px rgba(75, 159, 176, .12) !important;
}
.modal-shell {
  align-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
}
.modal-panel {
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.community-publish-panel {
  display: flex;
  flex-direction: column;
}
.community-publish-panel .modal-actions {
  position: sticky;
  bottom: -1px;
  z-index: 2;
  margin-top: 12px;
  padding: 12px 0 2px;
  background: rgba(255, 253, 248, .98);
}
.button,
.icon-button,
.nav-button,
.nav-subitem,
.profile-tab,
.step,
.chip-button,
.community-interaction-button { min-height: 44px; }
.home-copy h1 {
  max-width: none;
  font-size: clamp(40px, 4vw, 60px);
  line-height: 1.04;
  text-wrap: nowrap;
  overflow-wrap: normal;
}
@media (max-width: 0px) and (max-width: 1100px) {
  .topbar { position: static !important; }
}
@media (max-width: 0px) and (max-width: 760px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 44px !important;
    min-height: 64px;
    padding: 8px 10px !important;
  }
  .brand { min-width: 0; }
  .brand small { display: none; }
  .mobile-nav-toggle {
    display: inline-grid;
    place-content: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(164, 137, 157, .45);
    border-radius: 6px;
    background: rgba(255, 253, 248, .88);
  }
  .mobile-nav-toggle span {
    width: 20px;
    height: 2px;
    background: #3f3245;
  }
  .topbar > .main-nav,
  .topbar > .top-search,
  .topbar > .top-actions { display: none !important; }
  .topbar.is-mobile-open > .main-nav,
  .topbar.is-mobile-open > .top-search,
  .topbar.is-mobile-open > .top-actions {
    display: flex !important;
    grid-column: 1 / -1;
  }
  .topbar.is-mobile-open > .main-nav {
    align-items: stretch;
    flex-direction: column;
    max-height: min(52dvh, 420px);
    overflow-y: auto;
  }
  .topbar.is-mobile-open .nav-menu,
  .topbar.is-mobile-open .nav-button { width: 100%; }
  .topbar.is-mobile-open .nav-submenu {
    position: static;
    width: 100%;
    box-shadow: none;
  }
  .topbar.is-mobile-open > .top-search { width: 100%; }
  .topbar.is-mobile-open > .top-actions { flex-wrap: wrap; }
  .stepper { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .pattern-preview-viewport,
  .canvas-shell { touch-action: pan-x pan-y pinch-zoom !important; }
  .pattern-preview-viewport.is-panning,
  .canvas-shell.is-dragging { touch-action: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Audit remediation: field errors and direct-manipulation touch states. */
.field-error {
  margin: 6px 0 0;
  color: #8e2049;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}
.field-error.is-hidden { display: none !important; }
#patternPreviewCanvas.is-editing,
#workbenchCanvas.is-dragging,
#cropCanvas.is-dragging { touch-action: none !important; }
::placeholder {
  color: #756b78;
  opacity: 1;
}


/* Full-width theme header. */
.app-shell {
  padding-top: 0 !important;
}

.topbar {
  top: 0 !important;
  margin-right: calc(50% - 50vw) !important;
  margin-left: calc(50% - 50vw) !important;
  padding-right: max(10px, calc((100vw - 1480px) / 2 + 10px)) !important;
  padding-left: max(10px, calc((100vw - 1480px) / 2 + 10px)) !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(210, 143, 164, .48) !important;
  border-radius: 0 !important;
  background: #f8c8c8 !important;
  box-shadow: 0 7px 22px rgba(124, 76, 98, .11) !important;
}


/* Generator description: always one line. */
.generator-entry-tip {
  width: max-content !important;
  min-width: max-content !important;
  max-width: none !important;
  white-space: nowrap !important;
  overflow: visible !important;
}


/* Peach-pink home planet palette. */
.home-visual {
  --saturn-mint: #efa8ae;
  --saturn-mint-light: #f8c8c8;
  --saturn-ice: #f5d9dc;
  --saturn-white: #fff8f5;
  --saturn-lavender: #e7b0ba;
  --saturn-periwinkle: #ce899b;
  --saturn-shadow: #b87488;
  --sm-mint: #efa8ae;
  --sm-lavender: #e7b0ba;
}

.home-saturn-art {
  filter: drop-shadow(0 28px 42px rgba(176, 104, 126, .16)) !important;
}

/* Community publishing attachment preview. */
.publish-media-preview {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 2px;
}

.publish-media-preview.is-hidden {
  display: none !important;
}

.publish-media-preview-summary {
  grid-column: 1 / -1;
  margin: 0;
  color: #746b77;
  font-size: 12px;
  font-weight: 600;
}

.publish-media-preview-item {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e4d9e2;
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
}

.publish-media-preview-visual {
  height: 112px;
  display: grid;
  place-items: center;
  background: #faf7fa;
}

.publish-media-preview-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.publish-media-preview-info {
  min-width: 0;
  padding: 8px 34px 8px 9px;
  display: grid;
  gap: 2px;
}

.publish-media-preview-info strong,
.publish-media-preview-info small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-media-preview-info strong {
  color: #3f3544;
  font-size: 12px;
}

.publish-media-preview-info small {
  color: #8a7f8c;
  font-size: 11px;
  font-weight: 500;
}

.publish-media-preview-remove {
  position: absolute;
  right: 6px;
  bottom: 7px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #dccdd9;
  border-radius: 50%;
  background: #fff;
  color: #765d70;
  font: 700 17px/1 sans-serif;
  cursor: pointer;
}

.publish-media-preview-remove:hover,
.publish-media-preview-remove:focus-visible {
  border-color: #c787a5;
  color: #a34d75;
  background: #fff4f8;
}

@media (max-width: 0px) and (max-width: 560px) {
  .publish-media-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .publish-media-preview-visual {
    height: 96px;
  }
}

/* Community post cover selection. */
.publish-media-preview-item.is-cover {
  border-color: #d18aaa;
  box-shadow: 0 0 0 2px rgba(209, 138, 170, .14);
}

.publish-media-cover-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f8c8c8;
  color: #493a45;
  font-size: 11px;
  font-weight: 750;
}

.publish-cover-picker {
  padding-top: 4px;
}

.publish-cover-options {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 9px;
}

.publish-cover-option {
  min-width: 0;
  min-height: 76px;
  padding: 8px;
  border: 1px solid #e2d9e0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  color: #403542;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.publish-cover-option:hover,
.publish-cover-option:focus-visible {
  border-color: #d4a5bb;
  background: #fff8fa;
}

.publish-cover-option.is-selected {
  border-color: #c9799f;
  background: #fff2f6;
  box-shadow: 0 0 0 2px rgba(201, 121, 159, .12);
}

.publish-cover-option-visual {
  width: 60px;
  height: 60px;
  overflow: hidden;
  border-radius: 6px;
  background: #faf7fa;
  display: grid;
  place-items: center;
}

.publish-cover-option-visual img,
.publish-cover-option-visual .pattern-thumb-svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.publish-cover-option-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.publish-cover-option-copy strong,
.publish-cover-option-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publish-cover-option-copy small {
  color: #847986;
  font-size: 11px;
  font-weight: 500;
}

.publish-cover-option > b {
  color: #b45f88;
  font-size: 12px;
}

.publish-cover-empty {
  grid-column: 1 / -1;
}

.community-cover-pattern,
.community-cover-pattern .pattern-thumb-svg {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 0px) and (max-width: 560px) {
  .publish-cover-options {
    grid-template-columns: 1fr;
  }
}

/* Compact pattern choices in community publishing. */
.publish-pattern-list {
  grid-template-columns: repeat(auto-fill, 86px) !important;
  justify-content: start;
  align-items: start;
  gap: 10px;
}

.publish-pattern-item {
  width: 86px;
  min-height: 0;
  padding: 6px;
  grid-template-columns: 1fr;
  grid-template-rows: 72px auto;
  gap: 6px;
  text-align: center;
}

.publish-pattern-item-thumb {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 6px;
  background: #faf7fa;
  display: grid;
  place-items: center;
}

.publish-pattern-item-thumb .pattern-thumb-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.publish-pattern-item strong {
  width: 100%;
  overflow: hidden;
  color: #45394a;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* Header account menu: compact profile, progress and personal destinations. */
.top-user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 140;
}

.top-user-menu.is-hidden {
  display: none !important;
}

.top-user-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 150;
  width: min(320px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid rgba(213, 184, 199, .78);
  border-radius: 8px;
  background: rgba(255, 253, 252, .98);
  box-shadow: 0 18px 44px rgba(78, 54, 76, .18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-7px);
  transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
}

.top-user-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-top: 1px solid rgba(213, 184, 199, .78);
  border-left: 1px solid rgba(213, 184, 199, .78);
  background: #fffdfc;
  transform: rotate(45deg);
}

.top-user-menu.is-open .top-user-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.top-user-summary,
.top-user-level,
.top-user-links button,
.top-user-logout {
  width: 100%;
  border: 0;
  color: #403544;
  font: inherit;
  cursor: pointer;
}

.top-user-shortcuts {
  padding: 10px 0 12px;
  border-bottom: 1px solid rgba(226, 214, 221, .82);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
}

.top-user-shortcuts button {
  min-width: 0;
  min-height: 72px;
  padding: 6px 2px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #403544;
  font: inherit;
  display: grid;
  grid-template-rows: 26px auto auto;
  place-items: center;
  align-content: center;
  gap: 2px;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease;
}

.top-user-shortcuts button:hover,
.top-user-shortcuts button:focus-visible {
  outline: none;
  background: #fff0f3;
  color: #a24f6b;
}

.top-user-shortcuts button:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(181, 96, 126, .34);
}

.top-user-shortcut-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #ba6a88;
}

.top-user-shortcut-icon svg {
  width: 23px;
  height: 23px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-user-shortcuts button > span:nth-child(2) {
  min-width: 0;
  color: currentColor;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.top-user-shortcuts button > strong {
  color: #897d88;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.2;
}
.top-user-summary {
  min-width: 0;
  padding: 2px 2px 12px;
  background: transparent;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.top-user-summary:hover .top-user-summary-copy strong,
.top-user-summary:focus-visible .top-user-summary-copy strong {
  color: #b45f7c;
}

.avatar-mark.top-user-summary-avatar {
  width: 50px;
  height: 50px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #f8d7dc;
  box-shadow: 0 0 0 1px rgba(210, 143, 164, .42);
  font-size: 17px;
}

.top-user-summary-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.top-user-summary-copy strong,
.top-user-summary-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-user-summary-copy strong {
  font-size: 16px;
  line-height: 1.25;
  transition: color .15s ease;
}

.top-user-summary-copy small {
  color: #918591;
  font-size: 11px;
}

.top-user-chevron {
  color: #a59aa6;
  font-size: 20px;
  font-weight: 500;
}

.top-user-level {
  padding: 10px 11px;
  border: 1px solid rgba(220, 189, 202, .7);
  border-radius: 7px;
  background: #fff5f6;
  display: grid;
  gap: 8px;
  text-align: left;
}

.top-user-level:hover,
.top-user-level:focus-visible {
  border-color: #d99aaf;
  background: #fff0f3;
}

.top-user-level-line {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.top-user-level-line strong {
  color: #b65f7e;
  font-size: 13px;
}

.top-user-level-line span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-user-level-line small {
  color: #897e8a;
  font-size: 10px;
  white-space: nowrap;
}

.top-user-xp-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadfe5;
}

.top-user-xp-track i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #d98da8, #8fcfc5);
  transition: width .2s ease;
}

.top-user-stats {
  padding: 13px 4px 12px;
  border-bottom: 1px solid rgba(226, 214, 221, .82);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.top-user-stats > span {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: center;
}

.top-user-stats > span + span {
  border-left: 1px solid rgba(229, 216, 222, .8);
}

.top-user-stats strong {
  color: #3d3341;
  font-size: 17px;
  line-height: 1.2;
}

.top-user-stats small {
  color: #897f8b;
  font-size: 11px;
}

.top-user-links {
  padding: 7px 0;
  display: grid;
  gap: 2px;
}

.top-user-links button {
  min-height: 42px;
  padding: 0 9px;
  border-radius: 6px;
  background: transparent;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.top-user-links button:hover,
.top-user-links button:focus-visible {
  background: #fff1f3;
}

.top-user-links button > span:nth-child(2) {
  font-size: 13px;
  font-weight: 700;
}

.top-user-links button > strong {
  color: #897d88;
  font-size: 12px;
}

.top-user-link-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #ba6a88;
  font-size: 21px;
  line-height: 1;
}

.top-user-logout {
  min-height: 42px;
  padding: 0 10px;
  border-top: 1px solid rgba(226, 214, 221, .82);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #7c6572;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.top-user-logout > span:first-child {
  width: 22px;
  color: #b06982;
  font-size: 20px;
}

.top-user-logout:hover,
.top-user-logout:focus-visible {
  color: #a64769;
  background: #fff5f6;
}

@media (max-width: 0px) and (max-width: 760px) {
  .top-user-popover {
    right: auto;
    left: 0;
  }

  .top-user-popover::before {
    right: auto;
    left: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-user-popover,
  .top-user-xp-track i {
    transition: none;
  }
}


/* Account menu links and personal-page targeting */
.top-user-stats > button {
  min-width: 0;
  padding: 5px 2px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  display: grid;
  gap: 2px;
  text-align: center;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}

.top-user-stats > button + button {
  border-left: 1px solid rgba(229, 216, 222, .8);
}

.top-user-stats > button:hover,
.top-user-stats > button:focus-visible {
  background: #fff0f2;
  color: #a2576f;
  outline: none;
}

.profile-stat-strip > div {
  border-radius: 6px;
  transition: background-color .18s ease, box-shadow .18s ease;
}

.profile-stat-strip > div.is-menu-target {
  background: #fff0f2;
  box-shadow: inset 0 0 0 1px rgba(217, 139, 160, .48);
}

/* Compact profile statistics and public connection lists. */
#view-my .profile-stat-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

#view-my .profile-stat-strip > div,
#view-my .profile-stat-strip > button {
  min-width: 0;
  min-height: 46px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid rgba(202, 184, 199, .54);
  background: transparent;
  color: inherit;
  font: inherit;
  display: grid;
  place-items: center;
  gap: 2px;
  text-align: center;
}

#view-my .profile-stat-strip > :last-child {
  border-right: 0;
}

#view-my .profile-stat-strip > button {
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}

#view-my .profile-stat-strip > button:hover,
#view-my .profile-stat-strip > button:focus-visible,
#view-user .public-profile-stats > button:hover,
#view-user .public-profile-stats > button:focus-visible {
  background: rgba(255, 238, 242, .8);
  color: #a24f6b;
  outline: none;
}

#view-user .public-profile-stats > span,
#view-user .public-profile-stats > button {
  min-width: 0;
  padding: 7px 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #786e80;
  font: inherit;
  font-size: 12px;
  display: grid;
  justify-items: center;
  gap: 3px;
}

#view-user .public-profile-stats > button {
  cursor: pointer;
}

#view-user .public-profile-stats strong {
  color: #2d2540;
  font-size: 18px;
}

.user-connections-panel {
  width: min(620px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 40px));
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto minmax(180px, 1fr);
  border-radius: 8px;
}

.user-connections-head {
  padding: 18px 20px 12px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.user-connections-head h2 {
  margin: 0;
  font-size: 21px;
}

.user-connections-head p {
  margin: 3px 0 0;
  color: #8c8290;
  font-size: 12px;
}

.user-connections-tabs {
  padding: 0 20px;
  border-bottom: 1px solid rgba(220, 205, 216, .82);
  display: flex;
  gap: 26px;
}

.user-connections-tabs button {
  position: relative;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #817585;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.user-connections-tabs button.is-active {
  color: #392f40;
}

.user-connections-tabs button.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: #d67594;
}

.user-connections-search {
  padding: 14px 20px 8px;
}

.user-connections-search .search-input {
  width: 100%;
}

.user-connections-list {
  padding: 4px 20px 18px;
  overflow: auto;
}

.user-connection-row {
  min-width: 0;
  padding: 13px 0;
  border-bottom: 1px solid rgba(225, 213, 221, .72);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.user-connection-main {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.avatar-mark.connection-user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
}

.user-connection-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.user-connection-copy strong,
.user-connection-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-connection-copy strong {
  font-size: 15px;
}

.user-connection-copy small {
  color: #887e8a;
  font-size: 12px;
}

.user-connection-copy em {
  width: fit-content;
  color: #b85f7e;
  font-size: 11px;
  font-style: normal;
}

.user-connection-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.connection-self-label {
  padding: 6px 10px;
  color: #9a909c;
  font-size: 12px;
}

/* Direct-message context menu, quoting and stable composer rows. */
.message-context-menu {
  position: fixed;
  z-index: 1400;
  width: 124px;
  padding: 5px;
  border: 1px solid rgba(216, 196, 207, .92);
  border-radius: 7px;
  background: rgba(255, 253, 252, .98);
  box-shadow: 0 14px 34px rgba(69, 49, 65, .18);
  display: grid;
  gap: 2px;
}

.message-context-menu button {
  min-height: 36px;
  padding: 0 11px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #443847;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.message-context-menu button:hover,
.message-context-menu button:focus-visible {
  background: #fff0f2;
  color: #a24f6b;
  outline: none;
}

#view-messages .direct-message[data-direct-message-id] {
  border-radius: 7px;
  outline: none;
}

#view-messages .direct-message[data-direct-message-id]:focus-visible {
  box-shadow: 0 0 0 2px rgba(211, 125, 153, .4);
}

.direct-message-quote {
  width: 100%;
  margin: 0 0 3px;
  padding: 6px 8px;
  border-left: 3px solid #d896ac;
  border-radius: 4px;
  background: rgba(246, 237, 242, .78);
  display: grid;
  gap: 2px;
}

.direct-message-quote strong {
  color: #8e5670;
  font-size: 11px;
}

.direct-message-quote span {
  overflow: hidden;
  color: #756b77;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.direct-message-recalled {
  padding: 7px 10px;
  border: 1px dashed rgba(197, 180, 192, .84);
  border-radius: 6px;
  color: #968b96;
  font-size: 12px;
  font-style: italic;
}

#view-messages .message-composer {
  grid-template-areas:
    "pattern share"
    "images images"
    "reply reply"
    "text send"
    "error error" !important;
}

#view-messages .message-composer > .select-input { grid-area: pattern !important; }
#view-messages .message-composer > #messageSharePatternBtn { grid-area: share !important; }
#view-messages .message-composer > .message-image-tools { grid-area: images !important; }
#view-messages .message-composer > .message-reply-preview { grid-area: reply !important; }
#view-messages .message-composer > .textarea-input { grid-area: text !important; }
#view-messages .message-composer > #messageSendBtn { grid-area: send !important; }
#view-messages .message-composer > .field-error { grid-area: error !important; }

.message-reply-preview {
  min-width: 0;
  padding: 7px 8px 7px 10px;
  border-left: 3px solid #d889a3;
  border-radius: 5px;
  background: #fff3f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.message-reply-preview > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.message-reply-preview strong,
.message-reply-preview small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-reply-preview strong {
  color: #8f526c;
  font-size: 12px;
}

.message-reply-preview small {
  color: #7d727e;
  font-size: 11px;
}

@media (max-width: 0px) and (max-width: 560px) {
  #view-my .profile-stat-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .user-connections-panel {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .user-connection-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .user-connection-actions {
    padding-left: 62px;
  }

  #view-messages .message-composer {
    grid-template-areas:
      "pattern"
      "share"
      "images"
      "reply"
      "text"
      "error"
      "send" !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }
}


/* Fixed design canvas: shrink continuously to two-thirds, then use horizontal scrolling. */
:root {
  --site-content-scale: 1;
  --site-render-width: 1500px;
  --site-outer-width: max(100vw, 1528px);
  --site-topbar-offset: calc((1500px - var(--site-outer-width)) / 2);
  --site-topbar-inset: calc((var(--site-outer-width) - 1500px) / 2 + 10px);
  --site-header-gap: 14px;
  --site-nav-padding: 16px;
  --site-brand-width: 210px;
  --site-search-width: 238px;
}

html {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

body {
  min-width: var(--site-outer-width);
  overflow-x: visible;
}

.app-shell {
  width: var(--site-render-width) !important;
  max-width: none !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

#mainContent {
  width: 1500px !important;
  max-width: none !important;
  zoom: var(--site-content-scale);
}

.topbar {
  width: var(--site-outer-width) !important;
  min-width: var(--site-outer-width) !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: var(--site-topbar-offset) !important;
  padding-right: var(--site-topbar-inset) !important;
  padding-left: var(--site-topbar-inset) !important;
  grid-template-columns: max-content max-content minmax(max-content, 1fr) !important;
  gap: var(--site-header-gap) !important;
}

.mobile-nav-toggle {
  display: none !important;
}

.brand {
  min-width: var(--site-brand-width) !important;
  white-space: nowrap;
}

.main-nav {
  min-width: max-content;
  justify-content: center !important;
  flex-wrap: nowrap !important;
  overflow: visible !important;
  white-space: nowrap;
}

.nav-button {
  padding-right: var(--site-nav-padding) !important;
  padding-left: var(--site-nav-padding) !important;
}

.topbar-tools {
  min-width: max-content;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--site-header-gap);
  white-space: nowrap;
}

.topbar-tools .top-search {
  width: var(--site-search-width) !important;
  flex: 0 0 var(--site-search-width);
}

.topbar-tools .top-actions {
  min-width: max-content;
  flex: 0 0 auto;
  flex-wrap: nowrap !important;
}

@supports not (zoom: 1) {
  #mainContent {
    transform: scale(var(--site-content-scale));
    transform-origin: top left;
  }
}
/* Keep community sort tabs and their contextual controls in stable rows. */
.community-filter-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(38px, auto) 34px;
  align-items: center;
  gap: 8px;
}

.community-filter-area .community-filter-tabs {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
}

.community-filter-area .community-recommend-refresh,
.community-filter-area .community-period-tabs {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  justify-self: start;
}

.community-filter-area .community-period-tabs {
  width: max-content;
  max-width: 100%;
}
/* Lift the account popover above every page layer only while it is open. */
body.top-user-menu-open .topbar {
  z-index: 30000 !important;
}

body.top-user-menu-open .top-user-menu {
  z-index: 30010;
}

body.top-user-menu-open .top-user-popover {
  z-index: 30020;
}

/* Single-admin governance console. */
#view-admin .admin-layout {
  max-width: 1320px;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: start;
}

#view-admin .admin-side {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

#view-admin .admin-tab {
  min-height: 42px;
  margin: 0;
  border-radius: 8px;
}

#view-admin .admin-main {
  min-width: 0;
  padding: 20px;
}

#view-admin .table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid rgba(207, 193, 198, .72);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
}

#view-admin table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

#view-admin th,
#view-admin td {
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(216, 204, 208, .62);
}

#view-admin thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #5f5661;
  background: #fffaf7;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.admin-kpi-card {
  min-height: 100px;
  padding: 14px;
  border: 1px solid rgba(199, 183, 191, .8);
  border-radius: 8px;
  color: #4f4652;
  background: linear-gradient(145deg, #fffdfb, #f8fbf7);
  text-align: left;
  cursor: pointer;
}

.admin-kpi-card:hover {
  border-color: #78b9b2;
  box-shadow: 0 8px 20px rgba(65, 84, 80, .1);
}

.admin-kpi-card span,
.admin-kpi-card strong {
  display: block;
}

.admin-kpi-card span {
  color: #7c727d;
  font-size: 13px;
}

.admin-kpi-card strong {
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
}

.admin-data-section {
  border-top: 1px solid rgba(216, 204, 208, .72);
}

.admin-section-head,
.admin-section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.admin-section-head h2,
.admin-config-grid h2 {
  margin: 0;
  font-size: 17px;
}

.admin-section-head small,
.admin-section-toolbar small,
.admin-protected-note {
  color: #817782;
}

.button.danger {
  border-color: rgba(181, 75, 91, .35) !important;
  color: #a33c51 !important;
  background: #fff4f3 !important;
}

.button.danger:hover {
  border-color: rgba(181, 75, 91, .62) !important;
  background: #ffe9e6 !important;
}

.status-badge.invited,
.status-badge.reviewing,
.status-badge.appealed {
  color: #8a651d;
  background: #fff6d9;
}

.status-badge.suspended,
.status-badge.revoked,
.status-badge.dismissed,
.status-badge.closed {
  color: #8a4f5a;
  background: #f8e8eb;
}

.admin-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.admin-config-grid section {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(210, 198, 203, .72);
  border-radius: 8px;
  background: #fffdfb;
}

.admin-config-grid table {
  min-width: 0 !important;
  margin-top: 10px;
}

.modal-card.admin-governance-dialog,
.modal-card.admin-reauth-dialog {
  position: relative;
  width: min(620px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(202, 183, 192, .84);
  border-radius: 10px;
  background: #fffdfb;
  box-shadow: 0 26px 70px rgba(47, 39, 49, .22);
}

.modal-card.admin-reauth-dialog {
  width: min(500px, calc(100vw - 40px));
}

.admin-governance-dialog > label,
.admin-governance-dialog fieldset,
.admin-reauth-dialog .inline-field {
  display: grid;
  gap: 7px;
  margin: 14px 0;
}

.admin-governance-dialog input,
.admin-governance-dialog select,
.admin-governance-dialog textarea,
.admin-reauth-dialog input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d5c8cd;
  border-radius: 8px;
  color: #423b45;
  background: #fff;
  outline: none !important;
}

.admin-governance-dialog textarea {
  resize: vertical;
}

.admin-governance-dialog input:focus,
.admin-governance-dialog select:focus,
.admin-governance-dialog textarea:focus,
.admin-reauth-dialog input:focus {
  border-color: #72aaa4;
  box-shadow: 0 0 0 2px rgba(114, 170, 164, .14);
}

.admin-limit-fields {
  padding: 12px;
  border: 1px solid #d8ccd1;
  border-radius: 8px;
}

.admin-limit-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-limit-options label,
.admin-confirm-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.admin-limit-options input,
.admin-confirm-check input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 18px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.modal-actions,
.admin-reauth-dialog .inline-field {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.admin-reauth-dialog .inline-field input {
  flex: 1 1 auto;
}

.admin-reauth-dialog .inline-field button {
  flex: 0 0 auto;
}
/* Profile growth metrics live beside follower stats. */
#view-my .profile-page-layout {
  gap: 4px;
}

#view-my .profile-hero-panel {
  min-height: 238px;
}

#view-my .profile-cover-band {
  height: 78px;
}

#view-my .profile-stat-strip {
  width: calc(100% - 240px);
  max-width: none;
  margin: 6px 24px 10px 216px;
  padding: 0;
  grid-template-columns:
    repeat(3, minmax(88px, 1fr))
    minmax(230px, 260px)
    68px
    112px !important;
  gap: 0 !important;
  align-items: stretch;
}

#view-my .profile-stat-strip > div,
#view-my .profile-stat-strip > button {
  min-height: 50px;
  padding: 3px 10px;
}

#view-my .profile-stat-strip > .profile-level-card,
#view-my .profile-stat-strip > .profile-points-card {
  width: auto;
  min-width: 0;
  min-height: 50px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#view-my .profile-stat-strip > .profile-level-card {
  padding: 3px 10px !important;
  display: grid !important;
  place-items: stretch !important;
  text-align: left;
}

#view-my .profile-level-card .profile-level-content {
  display: grid;
  grid-template-columns: minmax(64px, auto) minmax(120px, 1fr);
  align-items: center;
  gap: 8px;
}

#view-my .profile-level-card .profile-level-heading {
  display: grid;
  gap: 1px;
}

#view-my .profile-level-card .profile-level-heading strong {
  font-size: 16px;
}

#view-my .profile-level-card #accountLevelName {
  font-size: 11px;
}

#view-my .profile-level-card .profile-xp-meter {
  width: 100%;
  margin: 0;
  display: grid;
  gap: 4px;
}

#view-my .profile-level-card .profile-xp-meter small {
  font-size: 11px;
  text-align: left;
}

#view-my .profile-level-card .profile-xp-track {
  min-width: 0;
  height: 5px;
}

#view-my .profile-stat-strip > .profile-points-card {
  padding: 3px 8px !important;
  display: grid !important;
  place-items: center !important;
  align-content: center;
  gap: 1px;
  text-align: center;
}

#view-my .profile-points-card span {
  font-size: 11px;
}

#view-my .profile-points-card strong {
  font-size: 18px;
  line-height: 1.1;
}

#view-my .profile-stat-strip > .profile-checkin-button {
  width: auto;
  min-width: 0;
  min-height: 44px !important;
  margin: 3px 0 3px 8px;
  padding: 0 10px;
  align-self: center;
  border-radius: 8px !important;
  font-size: 12px;
}

#view-my .profile-content-panel {
  margin-top: -2px;
}
/* Align workbench color scroll floor with preview frame. */
#view-workbench .workbench-layout {
  align-items: stretch;
}

#view-workbench .color-filter-panel {
  position: relative;
  top: auto;
  height: auto;
  max-height: none;
  align-self: stretch;
}
/* Missing-bead dialogs use an opaque card over a proper modal scrim. */
#missingBeadDialog,
#missingBeadTargetDialog {
  background: rgba(37, 30, 43, .54);
}

#missingBeadDialog > .missing-bead-dialog,
#missingBeadTargetDialog > .missing-bead-target-dialog {
  position: relative;
  z-index: 1;
  padding: 24px;
  border: 1px solid rgba(203, 184, 201, .92);
  border-radius: 12px;
  background: #fffdfb;
  color: var(--ink);
  box-shadow: 0 26px 70px rgba(47, 39, 49, .28);
}
/* Compact workbench missing-bead drop target. */
#view-workbench .color-filter-panel {
  padding: 12px;
  gap: 8px;
}

#view-workbench .color-filter-panel > .panel-head {
  margin: -2px 0 0;
  padding: 0 0 8px;
  gap: 8px;
}

#view-workbench .color-filter-panel > .panel-head h2 {
  margin: 0 0 2px;
}

#view-workbench .color-filter-panel > .panel-head p {
  margin: 0;
  line-height: 1.4;
}

#view-workbench .workbench-missing-beads {
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  padding: 10px;
  grid-template-rows: none;
  grid-auto-rows: auto;
  gap: 6px;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

#view-workbench .workbench-missing-beads.has-items .workbench-missing-dropzone {
  display: none;
}

#view-workbench .workbench-missing-items {
  max-height: 90px;
}

#view-workbench .workbench-missing-beads.is-dragover {
  border-color: var(--pink-deep);
  background: #fff5ec;
  box-shadow: inset 0 0 0 2px rgba(185, 130, 158, .16);
}
/* Missing-bead profile cards span the profile grid and keep a uniform horizontal layout. */
#view-my .my-pattern-list > .missing-bead-profile-manager,
#view-my .my-pattern-list > .missing-bead-profile-list {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

#view-my .missing-bead-profile-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  grid-auto-flow: row;
  align-items: stretch;
  gap: 12px;
}

#view-my .missing-bead-card {
  width: 100%;
  min-width: 0;
  min-height: 118px;
  height: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

#view-my .missing-bead-card-copy {
  min-width: 0;
  align-content: center;
}

#view-my .missing-bead-card-copy h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-my .missing-bead-card-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

#view-my .missing-bead-card-actions .button {
  min-height: 40px;
  padding: 8px 12px;
  white-space: nowrap;
}

/* Profile reaction and history content opens directly. */
#view-my .profile-reaction-row .profile-content-open-button,
#view-my .profile-history-row .profile-content-open-button {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#view-my .profile-reaction-row .profile-content-open-button:hover h3,
#view-my .profile-history-row .profile-content-open-button:hover h3 {
  color: #5e58a6;
}

#view-my .profile-reaction-row .profile-content-open-button:focus-visible,
#view-my .profile-history-row .profile-content-open-button:focus-visible {
  outline: 2px solid rgba(111, 102, 200, .42);
  outline-offset: -2px;
  background: rgba(245, 242, 255, .72);
}
/* Generator landing cards. */
#view-generate[data-generator-mode="landing"] .generator-entry-grid {
  gap: 16px;
}

#view-generate[data-generator-mode="landing"] .generator-entry-card {
  border-color: rgba(211, 178, 192, .72);
  background:
    radial-gradient(circle at 100% 0, rgba(241, 220, 229, .48), transparent 38%),
    linear-gradient(180deg, rgba(255, 253, 250, .99), rgba(252, 247, 249, .98)) !important;
  box-shadow: 0 10px 26px rgba(91, 61, 80, .075);
}

#view-generate[data-generator-mode="landing"] .generator-entry-card::before {
  height: 3px;
  background: linear-gradient(90deg, rgba(201, 135, 166, .88), rgba(190, 160, 201, .76), rgba(237, 177, 184, .82));
}

#view-generate[data-generator-mode="landing"] .generator-entry-card:hover,
#view-generate[data-generator-mode="landing"] .generator-entry-card:focus-visible {
  border-color: rgba(192, 124, 156, .72);
  background:
    radial-gradient(circle at 100% 0, rgba(241, 215, 226, .58), transparent 40%),
    linear-gradient(180deg, #fffdfb, #fff7f9) !important;
  box-shadow: 0 14px 32px rgba(91, 61, 80, .105);
}

#view-generate[data-generator-mode="landing"] .generator-scene {
  background:
    linear-gradient(90deg, rgba(121, 102, 124, .04) 1px, transparent 1px) 0 0 / 17px 17px,
    linear-gradient(rgba(121, 102, 124, .036) 1px, transparent 1px) 0 0 / 17px 17px,
    linear-gradient(180deg, rgba(255, 252, 249, .74), rgba(251, 246, 248, .58));
}



/* Personal profile content uses a vertical section navigator. */
#view-my .profile-content-panel {
  min-height: 410px;
  padding: 16px;
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  grid-template-rows: max-content max-content max-content;
  column-gap: 16px;
  row-gap: 0;
  align-items: start;
  align-content: start;
}

#view-my .profile-tabbar {
  grid-column: 1;
  grid-row: 1 / 4;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 8px;
  align-self: start;
  display: block;
  border: 1px solid rgba(222, 204, 215, .88);
  border-radius: 8px;
  background: rgba(255, 251, 250, .78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}

#view-my .profile-tab-group {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  grid-auto-rows: 46px;
  gap: 4px;
  overflow: visible;
}

#view-my .profile-tab {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  height: 46px;
  padding: 0 11px 0 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #706676;
  font-size: 14px;
  font-weight: 750;
  text-align: left;
  box-shadow: none;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

#view-my .profile-tab:hover {
  color: #493e52;
  background: rgba(247, 235, 241, .72);
}

#view-my .profile-tab.is-active {
  color: #4d4054;
  background: linear-gradient(90deg, rgba(241, 218, 229, .9), rgba(248, 239, 244, .74));
  box-shadow: inset 3px 0 0 #c887a8;
}

#view-my .profile-tab:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(200, 135, 168, .38);
}

#view-my .profile-tab.is-active:focus-visible {
  box-shadow: inset 3px 0 0 #c887a8, inset 0 0 0 2px rgba(200, 135, 168, .3);
}

#view-my .profile-tab-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-my .profile-tab-count {
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(218, 196, 209, .8);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: #817483;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#view-my .profile-tab.is-active .profile-tab-count {
  border-color: rgba(200, 135, 168, .42);
  background: rgba(255, 253, 252, .9);
  color: #8f4f6e;
}

#view-my .profile-collection-toolbar {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  margin: 0 0 12px;
}

#view-my .profile-category-context {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

#view-my .my-pattern-list {
  grid-column: 2;
  grid-row: 3;
  min-width: 0;
  width: 100%;
  padding-top: 0;
  margin-top: 0;
  align-self: start;
}

#view-my .profile-content-panel.is-direct-content .my-pattern-list {
  grid-row: 1 / 4;
}
/* Export preview confirmation dialog. */
.export-preview-dialog {
  width: min(1240px, calc(100vw - 24px));
  height: min(920px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  padding: 18px;
  grid-template-rows: auto auto auto auto minmax(240px, 1fr) auto auto auto;
  gap: 12px;
  overflow: hidden;
  border-color: rgba(208, 190, 199, .82);
  background: #fffdf9;
}

.export-preview-head {
  padding-right: 2px;
}

.export-preview-head .icon-button {
  flex: 0 0 44px;
  border: 0;
  background: transparent;
}

.export-preview-meta {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(215, 198, 205, .72);
  border-radius: 8px;
  color: #625968;
  background: #fffaf7;
  font-size: 13px;
  line-height: 1.45;
}

.export-preview-options {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.export-preview-toggle-list {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.export-preview-companion-toggle {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid rgba(215, 198, 205, .72);
  border-radius: 8px;
  color: #34283e;
  background: #fffaf7;
  cursor: pointer;
}

.export-preview-companion-toggle input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #c26085;
}

.export-preview-companion-toggle span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.export-preview-companion-toggle strong {
  font-size: 13px;
  line-height: 1.35;
}

.export-preview-companion-toggle small {
  color: #756b7a;
  font-size: 12px;
  line-height: 1.4;
}

/* Author attribution is a quiet secondary choice below the preview. */
.export-preview-author-toggle {
  display: inline-flex;
  width: max-content;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  padding: 2px 1px;
  color: #756b7a;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
}

.export-preview-author-toggle:hover {
  color: #4f4455;
}

.export-preview-author-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #c26085;
}

.export-preview-author-toggle:focus-within {
  outline: 2px solid rgba(194, 96, 133, .42);
  outline-offset: 2px;
  border-radius: 4px;
}

.export-preview-tabs {
  display: inline-grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(84px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(215, 198, 205, .72);
  border-radius: 8px;
  background: #f5eef1;
}

.export-preview-tabs button {
  min-height: 44px;
  padding: 7px 14px;
  border: 0;
  border-radius: 6px;
  color: #756b7a;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.export-preview-tabs button.is-active {
  color: #34283e;
  background: #fffdf9;
  box-shadow: 0 2px 8px rgba(77, 57, 70, .1);
}

.export-preview-tabs button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.export-preview-tabs button:focus-visible,
.export-preview-companion-toggle:focus-within {
  outline: 2px solid rgba(194, 96, 133, .42);
  outline-offset: 2px;
}

.export-preview-viewbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  color: #756b7a;
  font-size: 12px;
}

.export-preview-view-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.export-preview-view-controls .icon-button,
.export-preview-view-controls .chip-button {
  min-width: 34px;
  min-height: 34px;
  padding: 5px 9px;
  border-color: rgba(202, 183, 192, .78);
  background: #fffdf9;
}

.export-preview-view-controls output {
  min-width: 52px;
  color: #34283e;
  font-weight: 750;
  text-align: center;
}

.export-preview-viewport {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(360px, 42dvh);
  max-height: none;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(202, 183, 192, .78);
  border-radius: 8px;
  background-color: #f8f6f5;
  background-image:
    linear-gradient(45deg, rgba(213, 202, 207, .24) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(213, 202, 207, .24) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(213, 202, 207, .24) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(213, 202, 207, .24) 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  overscroll-behavior: contain;
  touch-action: none;
  cursor: grab;
}

.export-preview-loading {
  color: #746a79;
  font-size: 14px;
}

.export-preview-viewport.is-dragging {
  cursor: grabbing;
}

.export-preview-viewport:focus-visible {
  outline: 2px solid rgba(194, 96, 133, .46);
  outline-offset: 2px;
}

.export-preview-image {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100% - 36px);
  max-height: calc(100% - 36px);
  object-fit: contain;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center;
  pointer-events: none;
  user-select: none;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(55, 44, 58, .14);
  will-change: left, top, transform;
}

.export-preview-viewport:not(.is-dragging) .export-preview-image {
  transition: left .12s ease, top .12s ease, transform .12s ease;
}
.export-preview-note {
  margin: 0;
  color: #756b7a;
  font-size: 13px;
  line-height: 1.55;
}

.export-preview-actions {
  margin-top: 0;
}

.export-preview-actions .button {
  min-width: 112px;
}

@media (width < 640px) {
  .export-preview-dialog {
    width: 100%;
    height: calc(100dvh - 24px);
    padding: 14px;
    grid-template-rows: auto auto auto auto minmax(200px, 1fr) auto auto auto;
  }

  .export-preview-options {
    display: grid;
    gap: 8px;
  }

  .export-preview-tabs {
    width: 100%;
  }

  .export-preview-viewport {
    min-height: 200px;
    max-height: 52dvh;
    padding: 10px;
  }

  .export-preview-image {
    max-height: 48dvh;
  }

  .export-preview-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .export-preview-actions .button {
    width: 100%;
    min-width: 0;
  }
}

/* Manual editor floating operation rail */
#view-generate:not([data-generator-mode="manual"]) .manual-floating-toolbar,
#view-generate:not([data-generator-mode="manual"]) .manual-selection-actions {
  display: none !important;
}

.manual-floating-toolbar {
  position: fixed;
  z-index: 72;
  top: 128px;
  left: 18px;
  display: flex;
  width: 54px;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 5px;
  border: 1px solid rgba(201, 105, 141, .28);
  border-radius: 14px;
  background: rgba(255, 253, 250, .97);
  box-shadow: 0 14px 36px rgba(77, 54, 73, .16), 0 2px 8px rgba(77, 54, 73, .08);
  backdrop-filter: blur(14px);
  touch-action: none;
  user-select: none;
}

.manual-floating-toolbar.is-dragging {
  z-index: 74;
  box-shadow: 0 20px 44px rgba(77, 54, 73, .24);
}

.manual-toolbar-button {
  position: relative;
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #56495c;
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.manual-toolbar-button:hover {
  color: #a8476d;
  background: #fff2f5;
  border-color: rgba(201, 105, 141, .22);
}

.manual-toolbar-button:focus-visible,
.manual-selection-actions button:focus-visible,
.manual-toolbar-menu button:focus-visible {
  outline: 3px solid rgba(61, 180, 181, .28);
  outline-offset: 2px;
}

.manual-toolbar-button.is-active,
.manual-toolbar-button[aria-pressed="true"] {
  color: #9f3f66;
  border-color: rgba(201, 105, 141, .35);
  background: linear-gradient(135deg, #fff0f4, #edfafa);
}

.manual-toolbar-button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.manual-toolbar-button svg,
.manual-selection-actions svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.manual-toolbar-button .manual-tool-icon-pipette .manual-pipette-bulb {
  fill: currentColor;
  fill-opacity: .16;
}

.manual-toolbar-button .manual-tool-icon-pipette .manual-pipette-collar {
  fill: currentColor;
  fill-opacity: .1;
}

.manual-toolbar-button .manual-tool-icon-pipette .manual-pipette-tube {
  fill: none;
}

.manual-toolbar-drag-handle {
  color: #1b7f82;
  border-color: rgba(61, 180, 181, .3);
  background: #edf9f8;
  cursor: grab;
}

.manual-toolbar-drag-handle:active,
.manual-floating-toolbar.is-dragging .manual-toolbar-drag-handle {
  cursor: grabbing;
  transform: scale(.96);
}

.manual-toolbar-drag-handle svg {
  fill: currentColor;
  stroke: none;
}

.manual-toolbar-separator {
  width: 30px;
  height: 1px;
  margin: 2px 0;
  background: linear-gradient(90deg, transparent, rgba(118, 92, 113, .23), transparent);
}

.manual-toolbar-flyout-host {
  position: relative;
}

.manual-tool-size {
  position: absolute;
  right: 3px;
  bottom: 2px;
  min-width: 17px;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.1;
  color: #8d6878;
  pointer-events: none;
}

.manual-floating-toolbar .manual-toolbar-menu {
  position: absolute;
  z-index: 76;
  top: 0;
  left: calc(100% + 10px);
  display: none;
  min-width: 190px;
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(201, 105, 141, .28);
  border-radius: 12px;
  background: #fffdfa;
  box-shadow: 0 14px 32px rgba(77, 54, 73, .18);
}

.manual-floating-toolbar .eraser-tool-menu.is-open > .eraser-size-menu,
.manual-floating-toolbar #manualSelectTool.is-open > .manual-selection-menu:not([hidden]),
.manual-floating-toolbar #manualMirrorTool.is-open > .manual-mirror-menu:not([hidden]) {
  display: grid;
}

.manual-floating-toolbar .manual-toolbar-menu button {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #4e4052;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.manual-floating-toolbar .manual-toolbar-menu button:hover,
.manual-floating-toolbar .manual-toolbar-menu button[aria-checked="true"] {
  border-color: rgba(61, 180, 181, .28);
  background: #effaf9;
  color: #176f72;
}

.manual-floating-toolbar .manual-toolbar-menu button small {
  color: #8a7e8d;
  font-size: 12px;
}

.manual-selection-menu button {
  flex-wrap: wrap;
}

.manual-selection-menu button span {
  font-weight: 700;
}

.manual-selection-menu button small {
  width: 100%;
}

.manual-toolbar-button[data-tooltip]::after {
  position: absolute;
  z-index: 80;
  left: calc(100% + 12px);
  top: 50%;
  padding: 5px 8px;
  border-radius: 6px;
  background: #443747;
  color: #fff;
  content: attr(data-tooltip);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(4px, -50%);
  transition: opacity 150ms ease, transform 150ms ease;
}

.manual-toolbar-button[data-tooltip]:hover::after,
.manual-toolbar-button[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.manual-toolbar-flyout-host:has(.manual-toolbar-menu:not([hidden])) > .manual-toolbar-button:hover::after,
.manual-toolbar-flyout-host.is-open > .manual-toolbar-button::after {
  display: none;
}

.manual-selection-actions {
  position: absolute;
  z-index: 73;
  top: var(--manual-selection-anchor-y, 244px);
  left: calc(100% + 10px);
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: min(660px, calc(100vw - 96px));
  padding: 7px;
  border: 1px solid rgba(201, 105, 141, .3);
  border-radius: 13px;
  background: rgba(255, 253, 250, .98);
  box-shadow: 0 12px 32px rgba(77, 54, 73, .18);
  transform: translateY(-50%);
  backdrop-filter: blur(14px);
}

.manual-selection-actions.is-hidden {
  display: none !important;
}

#patternPreviewViewport.has-movable-selection {
  cursor: grab;
}

#patternPreviewViewport.is-selection-moving {
  cursor: grabbing;
}

.manual-selection-count {
  padding: 0 10px;
  color: #6f5e72;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.manual-selection-actions button {
  display: inline-flex;
  min-width: 58px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #594b5d;
  background: transparent;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.manual-selection-actions button:hover {
  color: #9f3f66;
  border-color: rgba(201, 105, 141, .27);
  background: #fff2f5;
}

.manual-selection-actions button.is-active,
.manual-selection-actions button[aria-pressed="true"] {
  color: #176f72;
  border-color: rgba(61, 180, 181, .34);
  background: #edf9f8;
}

.manual-selection-actions button[data-selection-action="done"] {
  color: #176f72;
  background: #edf9f8;
}

.manual-selection-actions svg {
  width: 18px;
  height: 18px;
}

#view-generate[data-generator-mode="manual"] .editor-toolbar {
  padding-left: 0;
}

@media (width < 720px) {
  .manual-floating-toolbar {
    width: 50px;
    padding-inline: 3px;
    transform: scale(.92);
    transform-origin: top left;
  }

  .manual-selection-actions {
    top: var(--manual-selection-anchor-y, 244px);
    left: calc(100% + 8px);
    width: min(280px, calc(100vw - 82px));
    max-width: calc(100vw - 82px);
    flex-wrap: wrap;
    justify-content: flex-start;
    transform: translateY(-50%);
  }

  .manual-selection-count {
    width: 100%;
    text-align: center;
  }

  .manual-selection-actions button {
    min-width: 48px;
  }

  .manual-selection-actions button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

@media (height < 680px) {
  .manual-floating-toolbar {
    gap: 0;
    padding-block: 3px;
    transform: scale(.82);
    transform-origin: top left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .manual-toolbar-button,
  .manual-toolbar-button[data-tooltip]::after {
    transition: none;
  }
}


/* Mount profile progress rules at the document root so profile panels cannot cover the modal. */
body.profile-rule-open {
  overflow: hidden;
}

body > #profileRuleBox:not(.is-hidden) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 50000 !important;
  width: 100% !important;
  height: 100dvh !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 24px !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  display: grid !important;
  place-items: center;
  transform: none !important;
  background: rgba(54, 43, 58, .42) !important;
  box-shadow: none !important;
  clip-path: none !important;
}

body > #profileRuleBox:not(.is-hidden) .profile-rule-dialog {
  width: min(1120px, 100%);
  max-height: calc(100dvh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(224, 201, 214, .96);
  border-radius: 14px;
  background: #fffdfc;
  box-shadow: 0 28px 72px rgba(54, 43, 58, .24);
}

body > #profileRuleBox .profile-rule-head {
  min-height: 58px;
  margin: 0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(234, 219, 228, .9);
  background: #fffdfc;
}

body > #profileRuleBox .profile-rule-head strong {
  margin: 0;
  color: #2d2540;
}

body > #profileRuleBox .profile-rule-close:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(201, 103, 145, .58);
}

body > #profileRuleBox .profile-rule-content {
  min-height: 0;
  padding: 12px 16px 16px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body > #profileRuleBox .profile-rule-box strong,
body > #profileRuleBox strong {
  color: #2d2540;
}

body > #profileRuleBox .profile-rule-box span,
body > #profileRuleBox span {
  color: #6f6578;
  line-height: 1.65;
}

body > #profileRuleBox .profile-rule-columns {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(520px, 1.28fr);
  gap: clamp(28px, 3vw, 48px);
  align-items: start;
}

body > #profileRuleBox .profile-rule-section h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: #30283f;
}

body > #profileRuleBox .profile-level-table-head,
body > #profileRuleBox .profile-rule-table-head {
  min-height: 28px;
  display: grid;
  align-items: center;
  color: #8b8291;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  border-bottom: 1px solid rgba(234, 219, 228, .9);
}

body > #profileRuleBox .profile-level-table-head,
body > #profileRuleBox .profile-level-line {
  grid-template-columns: 48px minmax(112px, 1fr) 78px;
  gap: 10px;
}

body > #profileRuleBox .profile-level-table-head span:last-child,
body > #profileRuleBox .profile-level-line small {
  justify-self: end;
  text-align: right;
}

body > #profileRuleBox .profile-level-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  list-style: none;
}

body > #profileRuleBox .profile-level-line {
  min-height: 29px;
  padding: 4px 0;
  display: grid;
  align-items: center;
  border: 0;
  border-bottom: 1px solid rgba(240, 230, 236, .72);
  background: transparent;
  color: #6f6578;
  font-size: 12px;
  line-height: 1.4;
}

body > #profileRuleBox .profile-level-line:last-child,
body > #profileRuleBox .profile-rule-details .profile-rule-row:last-child {
  border-bottom: 0;
}

body > #profileRuleBox .profile-level-line.is-current {
  color: #30283f;
  font-weight: 900;
}

body > #profileRuleBox .profile-rule-table-head,
body > #profileRuleBox .profile-rule-details .profile-rule-row {
  grid-template-columns: minmax(150px, 1.05fr) minmax(145px, .92fr) minmax(180px, 1.2fr);
  column-gap: clamp(16px, 2vw, 28px);
}

body > #profileRuleBox .profile-rule-details .profile-rule-table {
  display: grid;
  gap: 0;
}

body > #profileRuleBox .profile-rule-details .profile-rule-row {
  min-height: 50px;
  padding: 8px 0;
  display: grid;
  align-items: start;
  border: 0;
  border-bottom: 1px solid rgba(240, 230, 236, .78);
  border-radius: 0;
  background: transparent;
}

body > #profileRuleBox .profile-rule-action {
  min-width: 0;
  display: grid;
  gap: 3px;
}

body > #profileRuleBox .profile-rule-details .profile-rule-row strong,
body > #profileRuleBox .profile-rule-details .profile-rule-row span,
body > #profileRuleBox .profile-rule-details .profile-rule-row small,
body > #profileRuleBox .profile-rule-details .profile-rule-row em {
  min-width: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body > #profileRuleBox .profile-rule-details .profile-rule-row em {
  color: #577d93;
  font-style: normal;
  font-weight: 800;
}

body > #profileRuleBox .profile-rule-notes {
  margin: 10px 0 0;
  padding: 10px 0 0;
  display: grid;
  gap: 7px;
  list-style: none;
  border-top: 1px solid rgba(234, 219, 228, .78);
}

body > #profileRuleBox .profile-rule-notes li {
  color: #5f5668;
  font-size: 12px;
}

@media (width < 900px) {
  body > #profileRuleBox:not(.is-hidden) {
    padding: 10px !important;
  }

  body > #profileRuleBox:not(.is-hidden) .profile-rule-dialog {
    max-height: calc(100dvh - 20px);
  }

  body > #profileRuleBox .profile-rule-columns,
  body > #profileRuleBox .profile-rule-details .profile-rule-row {
    grid-template-columns: 1fr;
  }

  body > #profileRuleBox .profile-rule-table-head {
    display: none;
  }
}

/* Reliable top-level mounting for the complete manual editor toolbar. */
body:not(.manual-editor-active) > .manual-floating-toolbar {
  display: none !important;
}

body.manual-editor-active > .manual-floating-toolbar {
  display: flex !important;
  z-index: 180;
  visibility: visible;
}

body > .manual-floating-toolbar {
  touch-action: manipulation;
}

body > .manual-floating-toolbar .manual-toolbar-drag-handle {
  touch-action: none;
}

.manual-floating-toolbar.is-near-right .manual-toolbar-menu {
  right: calc(100% + 10px);
  left: auto;
}

.manual-floating-toolbar.is-near-right .manual-selection-actions {
  right: calc(100% + 10px);
  left: auto;
}

.manual-floating-toolbar.is-near-right .manual-toolbar-button[data-tooltip]::after {
  right: calc(100% + 12px);
  left: auto;
  transform: translate(-4px, -50%);
}

.manual-floating-toolbar.is-near-right .manual-toolbar-button[data-tooltip]:hover::after,
.manual-floating-toolbar.is-near-right .manual-toolbar-button[data-tooltip]:focus-visible::after {
  transform: translate(0, -50%);
}


/* Community feed cards expose engagement as read-only stats; actions live on the detail page. */
.community-card-published-at {
  display: block;
  margin-top: 4px;
  color: #8b8190;
  font-size: 11px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

#view-community .community-card-author-row,
.global-search-posts .community-card-author-row {
  justify-content: flex-start;
  margin-bottom: 0;
}

.community-card-meta .community-interaction-stat {
  min-width: 42px;
  min-height: 34px;
  padding: 2px 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #756b7d;
  line-height: 1;
  cursor: default;
  user-select: none;
}

.community-interaction-stat > span {
  min-width: 10px;
  color: currentColor;
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

/* Workbench favorites reuse the personal-profile category library. */
#view-workbench .workbench-favorite-organizer {
  margin: -6px 0 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

#view-workbench .workbench-favorite-organizer.is-hidden,
#view-workbench .workbench-favorite-category-context.is-hidden {
  display: none !important;
}

#view-workbench .workbench-favorite-view-tabs {
  width: max-content;
  padding: 3px;
  border: 1px solid rgba(222, 207, 219, .9);
  border-radius: 8px;
  background: rgba(250, 247, 250, .9);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

#view-workbench .workbench-favorite-view-tabs button {
  min-width: 68px;
  min-height: 44px;
  padding: 7px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #756b7d;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}

#view-workbench .workbench-favorite-view-tabs button:hover {
  background: rgba(247, 235, 242, .72);
  color: #50475c;
}

#view-workbench .workbench-favorite-view-tabs button.is-active {
  background: #fff;
  color: #5f5b9d;
  box-shadow: 0 4px 12px rgba(71, 56, 86, .08);
}

#view-workbench .workbench-favorite-view-tabs button:focus-visible,
#view-workbench .workbench-favorite-folder-card:focus-visible,
#view-workbench .workbench-favorite-category-back:focus-visible {
  outline: 2px solid rgba(128, 127, 201, .42);
  outline-offset: 2px;
}

#view-workbench .workbench-favorite-category-context {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

#view-workbench .workbench-favorite-category-back {
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid rgba(222, 207, 219, .9);
  border-radius: 7px;
  background: #fff;
  color: #655a70;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

#view-workbench .workbench-favorite-category-context > span {
  display: grid;
  gap: 2px;
}

#view-workbench .workbench-favorite-category-context strong {
  color: #352c42;
  font-size: 14px;
}

#view-workbench .workbench-favorite-category-context small {
  color: #82778a;
  font-size: 11px;
}

#view-workbench .workbench-favorite-folder-card {
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

#view-workbench .workbench-favorite-folder-card:hover {
  border-color: rgba(185, 130, 158, .55);
  background: #fff9fb;
  box-shadow: var(--small-shadow);
}

#view-workbench .workbench-favorite-folder-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(245, 221, 232, .7);
  color: #bd6f94;
  display: grid;
  place-items: center;
}

#view-workbench .workbench-favorite-folder-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#view-workbench .workbench-favorite-folder-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

#view-workbench .workbench-favorite-folder-copy strong,
#view-workbench .workbench-favorite-folder-copy small {
  overflow-wrap: anywhere;
}

#view-workbench .workbench-favorite-folder-copy strong {
  color: #352c42;
  font-size: 14px;
}

#view-workbench .workbench-favorite-folder-copy small {
  color: #82778a;
  font-size: 11px;
}

#view-workbench .workbench-favorite-folder-chevron {
  color: #9b8fa4;
  font-size: 22px;
  line-height: 1;
}

@media (width < 560px) {
  #view-workbench .workbench-favorite-organizer,
  #view-workbench .workbench-favorite-view-tabs {
    width: 100%;
  }

  #view-workbench .workbench-favorite-view-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Manual generator controls live beside the preview and in the draggable rail. */
#view-generate[data-generator-mode="manual"][data-active-stage="settings"] .flow-grid {
  grid-template-columns: minmax(0, 1fr);
}

#view-generate[data-generator-mode="manual"][data-active-stage="settings"] .generator-panel {
  display: none;
}

#view-generate[data-generator-mode="manual"] .editor-toolbar {
  justify-content: flex-start;
}

#view-generate[data-generator-mode="manual"] .manual-toolbar-width-field {
  min-width: 245px;
  grid-template-columns: auto minmax(180px, 1fr);
}

#view-generate[data-generator-mode="manual"] .manual-toolbar-width-inputs {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) 86px;
  gap: 6px;
}

#view-generate[data-generator-mode="manual"] #saveEditedPatternBtn {
  display: none;
}

.manual-floating-toolbar #manualExportTool.is-open > .manual-export-menu:not([hidden]) {
  display: grid;
}

.manual-floating-toolbar #manualExportTool > .manual-export-menu {
  top: auto;
  bottom: -6px;
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.manual-toolbar-action-button.is-primary-action {
  color: #a23f65;
  border-color: rgba(201, 105, 141, .34);
  background: linear-gradient(135deg, #fff0f4, #fff8ed);
}

.manual-toolbar-action-group {
  display: flex;
  max-height: 190px;
  flex-direction: column;
  gap: 2px;
  opacity: 1;
  overflow: visible;
  transform: translateY(0);
  transform-origin: top center;
  transition: max-height 180ms ease-out, opacity 150ms ease-out, transform 180ms ease-out;
}

.manual-toolbar-action-group.is-collapsed {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-4px);
}

.manual-toolbar-action-toggle svg {
  transition: transform 180ms ease-out;
}

.manual-toolbar-action-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .manual-toolbar-action-group,
  .manual-toolbar-action-toggle svg {
    transition: none;
  }
}

@media (width < 720px) {
  #view-generate[data-generator-mode="manual"] .manual-toolbar-width-field {
    width: 100%;
    min-width: 0;
  }
}
/* Compact generator preview chrome and keep page-scroll gutters beside the canvas. */
#view-generate[data-active-stage="settings"] .preview-panel {
  padding: 14px 16px 16px;
}

#view-generate[data-active-stage="settings"] .preview-panel > .panel-head {
  align-items: center;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

#view-generate[data-active-stage="settings"] .preview-panel > .panel-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

#view-generate[data-active-stage="settings"] .preview-panel > .panel-head p {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

#view-generate[data-active-stage="settings"] .preview-stack {
  gap: 8px;
}

#view-generate[data-active-stage="settings"] .pattern-preview-viewport {
  --generator-preview-fixed-height: clamp(480px, calc(100dvh - 260px), 720px);
  height: var(--generator-preview-fixed-height);
  min-height: var(--generator-preview-fixed-height);
  max-height: var(--generator-preview-fixed-height);
}

#view-generate[data-active-stage="settings"] .pattern-card-title {
  min-height: 34px;
  padding: 2px 8px;
}

#view-generate[data-active-stage="settings"] .preview-zoom-tools {
  gap: 4px;
}

#view-generate[data-active-stage="settings"] .preview-zoom-tools .mini-toggle {
  min-height: 27px;
  padding-inline: 7px;
}

#view-generate[data-active-stage="settings"] .preview-zoom-tools .mini-icon {
  width: 27px;
  min-height: 27px;
}

#view-generate[data-active-stage="settings"] .preview-zoom-tools .zoom-readout {
  min-width: 38px;
}

#view-generate[data-active-stage="settings"] .editor-toolbar {
  min-height: 42px;
  gap: 6px;
  padding: 5px 7px;
  margin-top: 5px;
}

@media (width >= 900px) {
  #view-generate[data-active-stage="settings"] .pattern-preview-viewport {
    width: calc(100% - 160px);
    margin-inline: 80px;
    border-inline: 1px solid rgba(203, 184, 201, .62);
  }
}

@media (720px <= width < 900px) {
  #view-generate[data-active-stage="settings"] .pattern-preview-viewport {
    --generator-preview-fixed-height: clamp(420px, calc(100dvh - 220px), 620px);
    width: calc(100% - 128px);
    margin-inline: 64px;
    border-inline: 1px solid rgba(203, 184, 201, .62);
  }
}

@media (width < 720px) {
  #view-generate[data-active-stage="settings"] .pattern-preview-viewport {
    --generator-preview-fixed-height: clamp(320px, 56dvh, 520px);
  }
}

/* Keep every manual-preview control outside the floating operation rail. */
#view-generate[data-generator-mode="manual"][data-active-stage="settings"] .preview-panel {
  --manual-operation-safe-gutter: 88px;
  padding-inline: var(--manual-operation-safe-gutter);
}

#view-generate[data-generator-mode="manual"][data-active-stage="settings"] .pattern-preview-viewport {
  width: 100%;
  margin-inline: 0;
}
/* Dark manual operation surfaces with bright, high-contrast controls. */
.manual-floating-toolbar,
.manual-selection-actions {
  border-color: rgba(244, 218, 232, .28);
  background: linear-gradient(180deg, rgba(62, 49, 69, .98), rgba(45, 36, 52, .98));
  box-shadow: 0 16px 38px rgba(45, 31, 45, .28), 0 3px 10px rgba(45, 31, 45, .18);
}

.manual-toolbar-button,
.manual-selection-actions button {
  color: #55475c;
  border-color: rgba(236, 218, 229, .9);
  background: #fffafc;
  box-shadow: 0 1px 3px rgba(35, 24, 38, .12);
}

.manual-toolbar-button:hover,
.manual-selection-actions button:hover {
  color: #9f3f66;
  border-color: #e7b6ca;
  background: #fff0f5;
}

.manual-toolbar-button.is-active,
.manual-toolbar-button[aria-pressed="true"],
.manual-selection-actions button.is-active,
.manual-selection-actions button[aria-pressed="true"] {
  color: #8f365b;
  border-color: #df9fba;
  background: linear-gradient(135deg, #ffe8f0, #eefafa);
}

.manual-toolbar-drag-handle {
  color: #176f72;
  border-color: #9edbd8;
  background: #edfafa;
}

.manual-toolbar-separator {
  background: linear-gradient(90deg, transparent, rgba(255, 240, 247, .36), transparent);
}

.manual-selection-count {
  color: #fff4f8;
}

.manual-floating-toolbar .manual-toolbar-menu {
  border-color: rgba(244, 218, 232, .28);
  background: #352b3b;
  box-shadow: 0 16px 36px rgba(35, 24, 38, .3);
}

.manual-floating-toolbar .manual-toolbar-menu button {
  color: #55475c;
  border-color: rgba(236, 218, 229, .88);
  background: #fffafc;
}

.manual-floating-toolbar .manual-toolbar-menu button:hover,
.manual-floating-toolbar .manual-toolbar-menu button[aria-checked="true"] {
  color: #176f72;
  border-color: #9edbd8;
  background: #edfafa;
}

.manual-floating-toolbar .manual-toolbar-menu button small {
  color: #78697c;
}

.manual-toolbar-action-button.is-primary-action {
  color: #94395f;
  border-color: #e2a5bd;
  background: linear-gradient(135deg, #ffe4ed, #fff5e8);
}

.manual-selection-actions button[data-selection-action="done"] {
  color: #176f72;
  border-color: #9edbd8;
  background: #edfafa;
}
/* Profile drafts and history support safe bulk deletion. */
#view-my .profile-bulk-toolbar {
  grid-column: 1 / -1;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(222, 199, 213, .9);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 249, 251, .98), rgba(249, 249, 255, .96));
  box-shadow: 0 8px 22px rgba(75, 55, 83, .055);
}

#view-my .profile-bulk-toolbar > span {
  display: grid;
  gap: 2px;
  color: #332a40;
}

#view-my .profile-bulk-toolbar > span strong {
  font-size: 15px;
  line-height: 1.25;
}

#view-my .profile-bulk-toolbar > span small {
  color: #817686;
  font-size: 12px;
}

#view-my .profile-bulk-toolbar.is-managing {
  border-color: rgba(193, 125, 158, .66);
  background: linear-gradient(90deg, rgba(255, 244, 248, .98), rgba(247, 246, 255, .98));
}

#view-my .profile-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

#view-my .profile-bulk-toolbar .button {
  min-height: 40px;
}

#view-my .draft-pattern-card,
#view-my .profile-history-row {
  position: relative;
}

#view-my .profile-bulk-select {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(190, 157, 177, .88);
  border-radius: 12px;
  background: rgba(255, 253, 251, .96);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(63, 46, 69, .12);
}

#view-my .profile-bulk-select span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid #9d8a99;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

#view-my .profile-bulk-select.is-selected {
  border-color: #bd668f;
  background: #bd668f;
}

#view-my .profile-bulk-select.is-selected span {
  border-color: #fff;
}

#view-my .my-pattern-card.is-bulk-selected,
#view-my .profile-post-row.is-bulk-selected {
  border-color: #bd668f;
  background: rgba(255, 245, 249, .96);
  box-shadow: 0 0 0 2px rgba(189, 102, 143, .16), 0 12px 26px rgba(91, 56, 77, .1);
}

#view-my .is-bulk-managing .my-pattern-thumb,
#view-my .is-bulk-managing .profile-content-open-button {
  cursor: pointer;
}

#view-my #myPatternList.is-bulk-dragging,
#view-my #myPatternList.is-bulk-dragging * {
  user-select: none;
  cursor: crosshair !important;
}

#view-my #myPatternList.is-bulk-dragging,
#view-my #myPatternList.is-bulk-selection-mode {
  touch-action: none;
}

#view-messages #messagePageTitle.is-profile-link {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}

#view-messages #messagePageTitle.is-profile-link:hover,
#view-messages #messagePageTitle.is-profile-link:focus-visible {
  text-decoration-color: currentColor;
  outline: none;
}

#view-messages .direct-message-avatar-link {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

#view-messages .direct-message-avatar-link:hover .direct-message-avatar,
#view-messages .direct-message-avatar-link:focus-visible .direct-message-avatar {
  box-shadow: 0 0 0 3px rgba(189, 102, 143, .2), 0 4px 12px rgba(62, 47, 70, .12);
}

#view-messages .direct-message-avatar-link:focus-visible {
  outline: none;
}

#view-my .profile-history-delete-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  min-width: 54px;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid rgba(202, 93, 122, .36);
  border-radius: 10px;
  background: rgba(255, 247, 249, .96);
  color: #a43f63;
  font-weight: 750;
  cursor: pointer;
}

#view-my .profile-history-delete-button:hover,
#view-my .profile-history-delete-button:focus-visible {
  border-color: #bd668f;
  background: #fff0f5;
  outline: 2px solid rgba(189, 102, 143, .22);
  outline-offset: 2px;
}

#view-my .profile-history-row:not(.is-bulk-managing) .profile-content-open-button {
  padding-right: 56px;
}

@media (width < 720px) {
  #view-my .profile-bulk-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  #view-my .profile-bulk-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #view-my .profile-bulk-actions .button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
  }
}
/* Personal profile shows total views across all of the owner's community works. */
#view-my .profile-stat-strip {
  grid-template-columns:
    repeat(4, minmax(86px, 1fr))
    minmax(310px, 1.72fr)
    minmax(72px, .46fr)
    minmax(104px, .66fr) !important;
  column-gap: 12px !important;
}

#view-my .profile-stat-strip > div strong,
#view-my .profile-stat-strip > button > strong {
  font-variant-numeric: tabular-nums;
}

/* Balance the current level, total experience, next level, points and check-in. */
#view-my .profile-stat-strip > .profile-level-card {
  padding-inline: 4px !important;
}

#view-my .profile-level-card .profile-level-content {
  grid-template-columns: 64px minmax(130px, 1fr) 64px;
  gap: 10px;
}

#view-my .profile-level-card .profile-level-heading,
#view-my .profile-level-card .profile-next-level-heading {
  min-width: 0;
  align-content: center;
}

#view-my .profile-level-card .profile-level-heading strong,
#view-my .profile-level-card .profile-next-level-heading strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

#view-my .profile-level-card .profile-level-heading span,
#view-my .profile-level-card .profile-next-level-heading span {
  overflow: hidden;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-my .profile-level-card .profile-next-level-heading,
#view-my .profile-level-card .profile-next-level-heading strong,
#view-my .profile-level-card .profile-next-level-heading span {
  color: var(--faint);
}

#view-my .profile-level-card .profile-xp-meter {
  min-width: 0;
  gap: 6px;
}

#view-my .profile-level-card .profile-xp-track-row {
  display: block;
  min-width: 0;
}

#view-my .profile-level-card .profile-xp-track {
  width: 100%;
}

#view-my .profile-stat-strip > .profile-points-card {
  margin-left: 4px;
  padding-inline: 8px !important;
}

#view-my .profile-stat-strip > .profile-checkin-button {
  width: 100%;
  margin: 3px 0;
  padding-inline: 12px;
}
/* Compact disclosure menus show labels first and helper text on hover or focus. */
#view-generate[data-generator-mode="manual"] .manual-import-source-menu button,
.export-format-menu button {
  position: relative;
  overflow: visible;
}

#view-generate[data-generator-mode="manual"] .manual-import-source-menu button small,
.export-format-menu button small {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: calc(100% + 8px);
  width: max-content;
  max-width: 210px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #443747;
  box-shadow: 0 8px 20px rgba(55, 42, 58, .18);
  color: #fff !important;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-4px, -50%);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

/* The generator export picker is a detached, compact side-opening operation panel. */

#view-generate[data-generator-mode="manual"] .manual-import-source-menu button:hover small,
#view-generate[data-generator-mode="manual"] .manual-import-source-menu button:focus-visible small,
.export-format-menu button:hover small,
.export-format-menu button:focus-visible small {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}

.export-format-menu.opens-left button small {
  right: calc(100% + 8px);
  left: auto;
  transform: translate(4px, -50%);
}

.export-format-menu.opens-left button:hover small,
.export-format-menu.opens-left button:focus-visible small {
  transform: translate(0, -50%);
}

.manual-floating-toolbar .manual-export-menu button {
  position: relative;
}

.manual-floating-toolbar .manual-export-menu button span {
  padding-right: 86px;
}

.manual-floating-toolbar .manual-toolbar-menu.manual-export-menu button small {
  position: absolute;
  top: 50%;
  right: 10px;
  color: #78697c;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 160ms ease, visibility 160ms ease;
}

.manual-floating-toolbar .manual-toolbar-menu.manual-export-menu button:hover small,
.manual-floating-toolbar .manual-toolbar-menu.manual-export-menu button:focus-visible small {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  #view-generate[data-generator-mode="manual"] .manual-import-source-menu button small,
  .export-format-menu button small,
  .manual-floating-toolbar .manual-toolbar-menu.manual-export-menu button small {
    transition: none;
  }
}


/* Creation hub: two clear creation paths. */
#view-generate[data-generator-mode="landing"] .creation-hub-heading {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto 28px;
}

#view-generate[data-generator-mode="landing"] .creation-hub-heading .entry-kicker {
  margin: 0;
}

#view-generate[data-generator-mode="landing"] .generator-entry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  width: min(100%, 1040px);
  margin-inline: auto;
}

#view-generate[data-generator-mode="landing"] .generator-entry-card {
  min-height: 438px;
  padding: 24px;
  grid-template-rows: 180px auto auto minmax(76px, 1fr) auto;
  text-align: left;
}

.generator-entry-badge {
  width: max-content;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(190, 124, 156, .3);
  border-radius: 999px;
  background: rgba(247, 225, 235, .7);
  color: #8f3f68;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .03em;
}

.generator-entry-badge.is-secondary {
  border-color: rgba(91, 150, 157, .3);
  background: rgba(224, 243, 240, .72);
  color: #37777a;
}

#view-generate[data-generator-mode="landing"] .generator-entry-card strong,
#view-generate[data-generator-mode="landing"] .generator-entry-card small {
  max-width: none;
  margin-inline: 0;
}

/* Keep the one-click title neutral and move recommendation pink to its CTA. */
#view-generate[data-generator-mode="landing"] .generator-entry-card[data-generator-entry="auto"] > strong {
  color: #33283f;
}

#view-generate[data-generator-mode="landing"] .generator-entry-card[data-generator-entry="auto"] > em.generator-entry-action {
  color: #8f3f68;
}

#view-generate[data-generator-mode="landing"] .generator-entry-card em {
  display: inline-grid;
  min-height: 44px;
  margin-top: 4px;
  padding-inline: 16px;
}

#view-generate[data-generator-mode="landing"] .generator-entry-tip {
  width: min(100%, 1040px);
  margin: 20px auto 24px;
  white-space: normal;
  text-align: center;
}

/* Unified share dialog: community remains paused while workbench share links stay available. */
.share-dialog-panel {
  width: min(580px, 100%);
  grid-template-rows: auto auto auto auto auto auto;
}

.share-dialog-pattern {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line, #eadde6);
  border-radius: 10px;
  background: var(--paper-soft, #fff8fb);
  color: var(--ink, #403343);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.share-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.share-choice-button {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line-strong, #dcc8d5);
  border-radius: 12px;
  background: var(--paper, #fffdfb);
  color: var(--ink, #403343);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.share-choice-button:not(.is-community-disabled):hover,
.share-choice-button:not(.is-community-disabled):focus-visible {
  border-color: var(--accent, #c9698d);
  outline: 0;
  background: var(--paper-soft, #fff5f8);
  box-shadow: 0 0 0 3px rgba(201, 105, 141, .14);
}

.share-choice-button strong {
  font-size: 15px;
}

.share-choice-button small {
  color: var(--muted, #817486);
  font-size: 12px;
  line-height: 1.5;
}

.share-dialog-result {
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin-top: 0;
  align-items: stretch;
}

.share-dialog-result .button {
  min-height: 42px;
  white-space: nowrap;
}

.share-dialog-status {
  min-height: 21px;
  margin: 0;
  color: var(--accent-strong, #a94870);
  font-size: 13px;
  font-weight: 700;
}

.share-dialog-note {
  margin: 0;
  color: var(--muted, #817486);
  font-size: 12px;
  line-height: 1.6;
}


@media (prefers-reduced-motion: reduce) {
  .share-choice-button {
    transition: none;
  }
}
/* Homepage: transparent Saturn cutout with higher-contrast stars sampled from its palette. */
#view-home .home-visual {
  background: transparent;
  background-image: none;
}

#view-home .home-cover::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255, 251, 253, .5) 0%, rgba(255, 251, 253, .18) 42%, rgba(255, 251, 253, .02) 72%),
    url("./assets/home-pink-starfield.svg");
  background-position: 0 0, 17px 11px;
  background-size: 100% 100%, 720px 420px;
  background-repeat: no-repeat, repeat;
  opacity: .97;
  pointer-events: none;
}

#view-home .home-copy,
#view-home .home-visual {
  position: relative;
  z-index: 1;
}

@media (width < 760px) {
  #view-home .home-cover::before {
    background-size: 100% 100%, 540px 315px;
    opacity: .93;
  }
}
/* Matching creation CTA motion triggers only over the visible text buttons. */
#view-generate[data-generator-mode="landing"] .generator-entry-card em.generator-entry-action {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform .18s ease-out, border-color .18s ease-out, background-color .18s ease-out, box-shadow .18s ease-out;
}

#view-generate[data-generator-mode="landing"] .generator-entry-action > span {
  position: relative;
  z-index: 1;
}

#view-generate[data-generator-mode="landing"] .generator-entry-action::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 26%, rgba(255, 255, 255, .92) 48%, rgba(232, 178, 204, .34) 56%, transparent 74%);
  transform: translateX(-140%);
}

#view-generate[data-generator-mode="landing"] .generator-entry-card em.generator-entry-action:hover,
#view-generate[data-generator-mode="landing"] .generator-entry-card:focus-visible em.generator-entry-action {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(185, 109, 149, .5);
  background-color: #fff8f2;
  box-shadow: 0 8px 18px rgba(142, 74, 108, .14);
}

#view-generate[data-generator-mode="landing"] .generator-entry-card em.generator-entry-action:hover::before,
#view-generate[data-generator-mode="landing"] .generator-entry-card:focus-visible em.generator-entry-action::before {
  animation: generatorEntrySharedSweep .56s ease-out both;
}

#view-generate[data-generator-mode="landing"] .generator-entry-card:active em.generator-entry-action {
  transform: translateY(0) scale(.98);
  box-shadow: 0 3px 8px rgba(142, 74, 108, .1);
}

@keyframes generatorEntrySharedSweep {
  from { transform: translateX(-140%); }
  to { transform: translateX(140%); }
}

@media (prefers-reduced-motion: reduce) {
  #view-generate[data-generator-mode="landing"] .generator-entry-card em.generator-entry-action,
  #view-generate[data-generator-mode="landing"] .generator-entry-action::before {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}
/* Profile work menus choose the roomier direction and never create a nested scrollbar. */
.profile-card-menu.opens-upward .profile-card-menu-panel {
  top: auto;
  bottom: calc(100% + 6px);
}

.profile-card-export-menu.is-submenu-right .profile-card-export-submenu {
  right: auto;
  left: calc(100% + 6px);
}

.profile-card-export-menu.is-submenu-stacked .profile-card-export-submenu {
  top: calc(100% + 4px);
  right: 0;
  bottom: auto;
  left: auto;
}

.profile-card-export-menu.is-submenu-upward .profile-card-export-submenu {
  top: auto;
  bottom: -5px;
}
/* Auto creation compares the bead preview with the uploaded original in a resizable split pane that reaches the preview card's right edge. */
.original-preview-split {
  --pattern-preview-share: 64%;
  min-width: 0;
}

#view-generate[data-generator-mode="auto"][data-active-stage="settings"] .original-preview-split.is-open {
  display: grid;
  grid-template-columns: minmax(0, var(--pattern-preview-share)) 10px minmax(0, 1fr);
  align-items: stretch;
}

#view-generate[data-generator-mode="auto"][data-active-stage="settings"] .original-preview-split.is-open .pattern-preview-viewport {
  width: 100%;
  margin-inline: 0;
}

.original-preview-toggle {
  min-height: 30px;
  padding-inline: 9px;
  white-space: nowrap;
}

#view-generate:not([data-generator-mode="auto"]) .original-preview-toggle {
  display: none !important;
}

.original-preview-divider {
  position: relative;
  min-width: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}

.original-preview-divider::before {
  content: "";
  position: absolute;
  inset: 0 4px;
  border-radius: 999px;
  background: rgba(194, 82, 120, .3);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.original-preview-divider:hover::before,
.original-preview-divider:focus-visible::before,
.original-preview-split.is-resizing .original-preview-divider::before {
  background: rgba(194, 82, 120, .76);
  box-shadow: 0 0 0 3px rgba(194, 82, 120, .12);
}

.original-preview-divider:focus-visible {
  outline: 2px solid rgba(194, 82, 120, .38);
  outline-offset: 1px;
}

.original-preview-pane {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(203, 184, 201, .72);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: rgba(255, 253, 248, .94);
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
}

.original-preview-pane[hidden],
.original-preview-divider[hidden] {
  display: none !important;
}

.original-preview-pane-head {
  padding: 0 9px;
  border-bottom: 1px solid rgba(203, 184, 201, .58);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.original-preview-pane-head strong {
  font-size: 13px;
}

.original-preview-pane-head button {
  min-height: 26px;
  padding: 2px 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.original-preview-pane-head button:hover,
.original-preview-pane-head button:focus-visible {
  outline: 0;
  background: #f6f1f7;
  color: var(--ink);
}

.original-preview-image-wrap {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #fffdf8;
}

.original-preview-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  user-select: none;
  pointer-events: none;
}

@media (width >= 900px) {
  #view-generate[data-generator-mode="auto"][data-active-stage="settings"] .original-preview-split.is-open {
    width: calc(100% - 80px);
    margin-left: 80px;
    margin-right: 0;
  }
}

@media (720px <= width < 900px) {
  #view-generate[data-generator-mode="auto"][data-active-stage="settings"] .original-preview-split.is-open {
    width: calc(100% - 64px);
    margin-left: 64px;
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .original-preview-divider::before {
    transition: none;
  }
}

/* Manual editing save mode: overwrite the source work or create a named copy. */
.pattern-save-mode-panel {
  width: min(560px, 100%);
}
.pattern-save-mode-current {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid rgba(196, 157, 177, .42);
  border-radius: 12px;
  background: rgba(255, 249, 247, .72);
  color: #6e5f72;
}
.pattern-save-mode-current strong {
  color: #33283f;
}
.pattern-save-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.pattern-save-mode-option {
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(196, 157, 177, .52);
  border-radius: 14px;
  background: rgba(255, 253, 250, .92);
  color: #33283f;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.pattern-save-mode-option strong,
.pattern-save-mode-option span {
  display: block;
}
.pattern-save-mode-option strong {
  margin-bottom: 6px;
  font-size: 17px;
}
.pattern-save-mode-option span {
  color: #746779;
  line-height: 1.55;
}
.pattern-save-mode-option.is-primary {
  border-color: rgba(208, 92, 137, .58);
  background: linear-gradient(135deg, rgba(255, 229, 235, .92), rgba(255, 242, 229, .88));
}
.pattern-save-mode-option:hover {
  border-color: rgba(190, 92, 132, .78);
  box-shadow: 0 8px 20px rgba(91, 58, 82, .1);
}
.pattern-save-mode-option:focus-visible {
  outline: 3px solid rgba(70, 156, 159, .35);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .pattern-save-mode-option {
    transition: none;
  }
}
/* Workbench stays inside the visible page; only long color lists scroll. */
body:has(#view-workbench.is-active) .app-shell {
  padding-bottom: 12px !important;
}

#view-workbench .workbench-layout {
  height: var(--workbench-viewport-height, calc(100dvh - 84px));
  min-height: 0;
  max-height: var(--workbench-viewport-height, calc(100dvh - 84px));
  align-items: stretch;
  overflow: hidden;
}

#view-workbench .workbench-main {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

#view-workbench .workbench-main > .toolbar {
  grid-row: 1;
}

#view-workbench .workbench-pattern-tabs {
  grid-row: 2;
  min-height: 0;
}

#view-workbench .canvas-shell,
#view-workbench #workbenchCanvas {
  height: 100%;
  min-height: 0;
}

#view-workbench .canvas-shell {
  grid-row: 3;
}

#view-workbench .color-filter-panel {
  position: relative;
  top: auto;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  align-self: stretch;
  overflow: hidden;
}

#view-workbench #workbenchColorList {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
}
