/* FanMassive fan shell. All rules are scoped to the explicit fan theme root. */
html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  overflow-x: hidden;
  color: #12151c;
  background: #f5f6fa;
  font-family: var(--fm-font-body);
}

#app {
  min-height: 100dvh;
}

[data-fm-role='fan'].fm-fan-shell {
  min-height: 100dvh;
  color: var(--fm-color-text);
  background: var(--fm-color-canvas);
  font-family: var(--fm-font-body);
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

body:has([data-fm-role='fan'].fm-fan-shell) {
  color: var(--fm-color-text);
  background: var(--fm-color-canvas);
}

.fm-auth-shell,
.fm-gate-shell {
  padding-bottom: 0 !important;
}

.fm-auth-shell .fm-fan-main,
.fm-gate-shell .fm-fan-main {
  width: min(100%, 560px);
}

.fm-form-card {
  width: 100%;
  padding: var(--fm-space-5);
  overflow-x: clip;
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-lg);
  background: var(--fm-color-surface);
  box-shadow: var(--fm-shadow-sm);
}

.fm-form-card h1 {
  margin: 0;
  color: var(--fm-color-text);
  font-family: var(--fm-font-display);
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.fm-form-intro,
.fm-form-hint {
  color: var(--fm-color-text-soft);
  line-height: 1.5;
}

.fm-form-hint {
  font-size: 0.8125rem;
}

.fm-auth-tabs {
  margin: var(--fm-space-4) 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-color-canvas);
}

.fm-auth-tab {
  min-width: 0;
  min-height: 44px;
  padding: 0 var(--fm-space-2);
  border: 0;
  border-radius: var(--fm-radius-sm);
  color: var(--fm-color-text-muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.fm-auth-tab.is-active {
  color: #fff;
  background: var(--fm-color-primary);
}

.fm-auth-panel,
.fm-form-stack,
.fm-field-label {
  display: grid;
  gap: var(--fm-space-3);
}

.fm-auth-panel.hidden {
  display: none;
}

.fm-field-label {
  gap: var(--fm-space-1);
  color: var(--fm-color-text-soft);
  font-size: 0.75rem;
  font-weight: 800;
}

.fm-form-control {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0 var(--fm-space-3);
  box-sizing: border-box;
  border: 1px solid var(--fm-color-border-strong);
  border-radius: var(--fm-radius-sm);
  outline: 0;
  color: var(--fm-color-text);
  background: var(--fm-color-canvas);
  font: inherit;
}

.fm-form-control:focus {
  border-color: var(--fm-color-primary);
  box-shadow: 0 0 0 3px var(--fm-color-primary-soft);
}

.fm-consent-line {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: var(--fm-space-2);
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.fm-consent-line input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--fm-color-primary);
}

.fm-form-stack {
  margin-top: var(--fm-space-4);
}

.fm-register-card {
  display: grid;
}

.fm-brand-lockup {
  margin-bottom: 2px;
  color: var(--fm-color-text);
  font-family: var(--fm-font-display);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.fm-brand-accent {
  color: var(--fm-color-primary);
}

.fm-register-eyebrow {
  margin-bottom: var(--fm-space-4);
}

.fm-invite-banner {
  display: flex;
  align-items: center;
  gap: var(--fm-space-3);
  margin-bottom: var(--fm-space-4);
  padding: var(--fm-space-3);
  border-radius: var(--fm-radius-md);
  background: var(--fm-color-primary-soft);
}

.fm-invite-mark {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--fm-color-primary), var(--fm-color-secondary));
}

.fm-invite-mark .fm-icon {
  width: 18px;
  height: 18px;
}

.fm-invite-title {
  margin: 0;
  color: var(--fm-color-primary-strong);
  font-size: 0.8125rem;
  font-weight: 800;
}

.fm-invite-body {
  margin: 2px 0 0;
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
}

.fm-register-form {
  display: grid;
  gap: var(--fm-space-3);
}

.fm-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--fm-space-2);
}

.fm-password-field {
  position: relative;
}

.fm-password-field .fm-form-control {
  padding-right: calc(var(--fm-space-3) + 28px);
}

.fm-password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--fm-radius-sm);
  color: var(--fm-color-text-muted);
  background: transparent;
  cursor: pointer;
}

.fm-password-toggle .fm-icon {
  width: 17px;
  height: 17px;
}

.fm-select-chevron {
  position: relative;
  display: block;
}

.fm-select-chevron select {
  padding-right: calc(var(--fm-space-3) + 22px);
  appearance: none;
}

.fm-select-chevron .fm-icon {
  position: absolute;
  top: 50%;
  right: var(--fm-space-3);
  transform: translateY(-50%) rotate(90deg);
  width: 14px;
  height: 14px;
  color: var(--fm-color-text-muted);
  pointer-events: none;
}

.fm-auth-switch {
  margin: var(--fm-space-4) 0 0;
  text-align: center;
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
}

.fm-auth-switch .fm-link-button {
  color: var(--fm-color-primary);
  font-weight: 800;
}

@media (max-width: 359px) {
  .fm-field-row {
    grid-template-columns: 1fr;
  }
}

.fm-success-message {
  padding: var(--fm-space-3);
  border-left: 4px solid var(--fm-color-secondary);
  color: var(--fm-color-secondary-strong);
  background: #e1f8ee;
}

.fm-notice {
  position: fixed;
  z-index: 50;
  right: var(--fm-space-4);
  bottom: var(--fm-space-4);
  max-width: min(380px, calc(100% - 32px));
  padding: var(--fm-space-3) var(--fm-space-4);
  border: 1px solid var(--fm-color-border);
  border-left: 4px solid var(--fm-color-secondary);
  border-radius: var(--fm-radius-md);
  color: var(--fm-color-text);
  background: var(--fm-color-surface);
  box-shadow: var(--fm-shadow-md);
}

.fm-notice.error {
  border-left-color: var(--fm-status-danger);
}

@media (max-width: 479px) {
  .fm-form-card {
    padding: var(--fm-space-4);
  }
}

.fm-fan-shell *,
.fm-fan-shell *::before,
.fm-fan-shell *::after {
  box-sizing: border-box;
}

.fm-fan-shell button,
.fm-fan-shell a {
  font: inherit;
}

.fm-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.fm-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.fm-skip-link {
  position: fixed;
  top: var(--fm-space-2);
  left: var(--fm-space-2);
  z-index: 100;
  padding: var(--fm-space-3) var(--fm-space-4);
  border-radius: var(--fm-radius-sm);
  color: #fff;
  background: var(--fm-color-primary-strong);
  transform: translateY(-160%);
}

.fm-skip-link:focus {
  transform: translateY(0);
}

.fm-fan-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: calc(64px + env(safe-area-inset-top, 0px));
  padding: calc(var(--fm-space-3) + env(safe-area-inset-top, 0px))
    var(--fm-space-4) var(--fm-space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fm-space-3);
  border-bottom: 1px solid
    color-mix(in srgb, var(--fm-color-border) 82%, transparent);
  background: color-mix(in srgb, var(--fm-color-canvas) 92%, transparent);
  backdrop-filter: blur(14px);
}

.fm-fan-brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--fm-color-text);
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
}

.fm-fan-brand strong {
  color: var(--fm-color-primary);
}

.fm-fan-main {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: var(--fm-space-5) var(--fm-space-4) var(--fm-space-8);
}

.fm-inbox-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--fm-space-4);
  margin-bottom: var(--fm-space-5);
}

.fm-eyebrow {
  margin: 0 0 var(--fm-space-1);
  color: var(--fm-color-primary-strong);
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fm-inbox h1,
.fm-home h1,
.fm-home h2,
.fm-media h1,
.fm-media h2,
.fm-profile h1,
.fm-profile h2,
.fm-state h2,
.fm-message-row h2 {
  letter-spacing: 0;
}

.fm-inbox h1 {
  margin: 0;
  font-family: var(--fm-font-display);
  font-size: clamp(1.75rem, 8vw, 2.25rem);
  line-height: 1.1;
}

.fm-media-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--fm-space-4);
  margin-bottom: var(--fm-space-5);
}

.fm-media-heading h1 {
  margin: 0;
  font-family: var(--fm-font-display);
  font-size: 2rem;
  line-height: 1.1;
}

.fm-media-heading p:last-child {
  margin: var(--fm-space-2) 0 0;
  color: var(--fm-color-text-soft);
  line-height: 1.5;
}

.fm-media-count {
  flex: 0 0 auto;
  padding: var(--fm-space-2) var(--fm-space-3);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-pill);
  color: var(--fm-color-text-soft);
  background: var(--fm-color-surface);
  font-size: 0.75rem;
}

.fm-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fm-space-4);
}

.fm-media-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  background: var(--fm-color-surface);
  box-shadow: var(--fm-shadow-sm);
}

.fm-media-thumbnail {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--fm-color-primary-strong);
  background: linear-gradient(
    145deg,
    var(--fm-color-surface),
    var(--fm-color-border)
  );
}

.fm-media-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fm-media-fallback .fm-icon {
  width: 34px;
  height: 34px;
}

.fm-media-type,
.fm-media-duration {
  position: absolute;
  bottom: var(--fm-space-2);
  padding: 3px var(--fm-space-2);
  border-radius: var(--fm-radius-xs);
  color: #fff;
  background: rgba(10, 12, 16, 0.76);
  font-size: 0.6875rem;
  font-weight: 800;
}

.fm-media-type {
  left: var(--fm-space-2);
}
.fm-media-duration {
  right: var(--fm-space-2);
}

.fm-media-card-copy {
  padding: var(--fm-space-4);
}

.fm-media-card h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.fm-media-creator,
.fm-media-date {
  margin: var(--fm-space-1) 0 0;
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.fm-media-availability {
  margin-top: var(--fm-space-3);
  padding-top: var(--fm-space-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--fm-color-border);
  color: var(--fm-color-secondary-strong);
  font-size: 0.75rem;
}

.fm-media-availability strong {
  color: var(--fm-color-text-soft);
  font-weight: 600;
}

.fm-media-pagination {
  margin-top: var(--fm-space-5);
  display: grid;
  justify-items: center;
  gap: var(--fm-space-3);
}

.fm-media-pagination > .fm-primary-button,
.fm-media-page-error {
  width: min(100%, 320px);
}

.fm-media-page-error {
  text-align: center;
}

.fm-media-page-error p {
  margin: 0 0 var(--fm-space-2);
  color: var(--fm-status-danger);
}

.fm-home-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fm-space-3);
  margin-bottom: var(--fm-space-4);
}

.fm-credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px var(--fm-space-3);
  border-radius: var(--fm-radius-pill);
  color: var(--fm-color-primary-strong);
  background: var(--fm-color-primary-soft);
  font-size: 0.8125rem;
  font-weight: 800;
}

.fm-credit-pill .fm-icon {
  width: 15px;
  height: 15px;
}

.fm-icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--fm-color-text);
  background: var(--fm-color-surface);
  border: 1px solid var(--fm-color-border);
  text-decoration: none;
}

.fm-icon-button .fm-icon {
  width: 18px;
  height: 18px;
}

.fm-icon-button-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fm-status-live);
}

.fm-home-search {
  display: flex;
  align-items: center;
  gap: var(--fm-space-2);
  margin: 0 0 var(--fm-space-4);
  padding: 0 var(--fm-space-3);
  height: 44px;
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-sm);
  color: var(--fm-color-text-muted);
  background: var(--fm-color-surface);
  font-size: 0.8125rem;
  text-decoration: none;
}

.fm-home-search .fm-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.fm-home-module-gap {
  margin-bottom: var(--fm-space-4);
}

.fm-home-module-gap-title {
  margin: 0 0 var(--fm-space-2);
  font-size: 0.875rem;
}

.fm-home-module-gap-card {
  display: flex;
  align-items: center;
  gap: var(--fm-space-3);
  padding: var(--fm-space-3) var(--fm-space-4);
  border: 1.5px dashed var(--fm-color-border-strong);
  border-radius: var(--fm-radius-lg);
  color: var(--fm-color-text-muted);
  background: var(--fm-color-surface);
  font-size: 0.8125rem;
  text-decoration: none;
}

.fm-home-module-gap-card span {
  flex: 1;
}

.fm-home-module-gap-card > .fm-icon:first-child {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.fm-home-module-gap-card > .fm-icon:last-child {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.fm-home-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fm-space-4);
  margin-bottom: var(--fm-space-5);
}

.fm-home h1 {
  max-width: 22ch;
  margin: 0;
  font-family: var(--fm-font-display);
  font-size: 2rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.fm-home-profile-link {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--fm-color-surface);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(
    145deg,
    var(--fm-color-secondary),
    var(--fm-color-primary)
  );
  box-shadow: 0 0 0 2px var(--fm-color-primary-soft);
  font-size: 0.875rem;
  font-weight: 800;
  text-decoration: none;
}

.fm-home-profile-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fm-home-chat {
  position: relative;
  overflow: hidden;
  margin-bottom: var(--fm-space-4);
  padding: var(--fm-space-6);
  border-radius: var(--fm-radius-lg);
  color: #fff;
  background: linear-gradient(
    130deg,
    var(--fm-color-primary-strong),
    var(--fm-color-primary) 72%,
    var(--fm-color-secondary)
  );
  box-shadow: var(--fm-shadow-md);
}

.fm-home-chat::after {
  content: '';
  position: absolute;
  right: -36px;
  bottom: -52px;
  width: 132px;
  height: 132px;
  border: 22px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.fm-home-chat .fm-eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.fm-home-chat h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1.375rem;
}

.fm-home-chat p:not(.fm-eyebrow) {
  position: relative;
  z-index: 1;
  max-width: 44ch;
  margin: var(--fm-space-2) 0 var(--fm-space-4);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.875rem;
  line-height: 1.5;
}

.fm-home-chat .fm-primary-button {
  position: relative;
  z-index: 1;
  width: fit-content;
  color: var(--fm-color-primary-strong);
  background: #fff;
  box-shadow: none;
  text-decoration: none;
}

.fm-home-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fm-space-3);
}

.fm-home-summary {
  min-width: 0;
  padding: var(--fm-space-4);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-lg);
  background: var(--fm-color-surface);
  box-shadow: var(--fm-shadow-sm);
}

.fm-home-summary-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--fm-space-2);
  margin-bottom: var(--fm-space-3);
}

.fm-home-summary h2,
.fm-home-empty h2 {
  margin: 0;
  font-size: 0.875rem;
}

.fm-home-summary-heading > span {
  color: var(--fm-color-text-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  text-align: right;
}

.fm-home-balance {
  margin: 0;
  color: var(--fm-color-text);
  line-height: 1;
}

.fm-home-balance strong {
  display: block;
  max-width: 100%;
  font-size: 2rem;
  overflow-wrap: anywhere;
}

.fm-home-balance span {
  display: block;
  margin-top: var(--fm-space-1);
  color: var(--fm-color-text-muted);
  font-family: var(--fm-font-body);
  font-size: 0.75rem;
  font-weight: 700;
}

.fm-home-latest,
.fm-home-muted,
.fm-home-module-error p {
  margin: 0 0 var(--fm-space-2);
  color: var(--fm-color-text-soft);
  font-size: 0.75rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.fm-home-latest strong,
.fm-home-latest span {
  display: block;
}

.fm-home-latest strong {
  color: var(--fm-color-text);
}

.fm-home-latest span {
  margin-top: 2px;
  color: var(--fm-color-text-muted);
  font-size: 0.6875rem;
}

.fm-home-summary > .fm-text-button,
.fm-home-module-error .fm-text-button {
  min-height: 44px;
  margin: 0 0 -10px -12px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.fm-home-module-error {
  padding-left: var(--fm-space-3);
  border-left: 3px solid var(--fm-status-warning);
}

.fm-home-empty {
  margin-top: var(--fm-space-4);
  padding: var(--fm-space-4);
  border: 1px dashed var(--fm-color-border-strong);
  border-radius: var(--fm-radius-md);
  text-align: center;
}

.fm-home-empty p {
  margin: var(--fm-space-1) 0 0;
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.fm-home-quick-links {
  margin-top: var(--fm-space-4);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fm-space-3);
}

.fm-home-quick-links a {
  min-height: 52px;
  padding: 0 var(--fm-space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--fm-space-2);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  color: var(--fm-color-text);
  background: var(--fm-color-surface);
  font-size: 0.8125rem;
  font-weight: 800;
  text-decoration: none;
}

.fm-profile-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fm-space-4);
  margin-bottom: var(--fm-space-5);
}

.fm-profile h1 {
  margin: 0;
  font-family: var(--fm-font-display);
  font-size: clamp(1.75rem, 8vw, 2.25rem);
  line-height: 1.1;
}

.fm-profile-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--fm-space-5);
  text-align: center;
}

.fm-profile-avatar {
  width: 88px;
  height: 88px;
  margin-bottom: var(--fm-space-3);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid var(--fm-color-surface);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(
    145deg,
    var(--fm-color-secondary),
    var(--fm-color-primary)
  );
  box-shadow:
    0 0 0 2px var(--fm-color-primary-soft),
    var(--fm-shadow-sm);
  font-family: var(--fm-font-display);
  font-size: 1.65rem;
  font-weight: 800;
}

.fm-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fm-profile-identity h2 {
  margin: 0;
  font-size: 1.125rem;
}

.fm-profile-identity p {
  margin: var(--fm-space-1) 0;
  color: var(--fm-color-text-muted);
  font-size: 0.8125rem;
}

.fm-profile-status,
.fm-verified {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 var(--fm-space-2);
  border-radius: var(--fm-radius-pill);
  color: var(--fm-color-secondary-strong);
  background: #e1f8ee;
  font-size: 0.6875rem;
  font-weight: 800;
}

.fm-profile-details {
  margin: 0;
  padding: 0 var(--fm-space-4);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-lg);
  background: var(--fm-color-surface);
  box-shadow: var(--fm-shadow-sm);
}

.fm-profile-details > div {
  min-height: 52px;
  padding: var(--fm-space-3) 0;
  display: grid;
  grid-template-columns: minmax(88px, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: var(--fm-space-3);
  border-bottom: 1px solid var(--fm-color-border);
}

.fm-profile-details > div:last-child {
  border-bottom: 0;
}

.fm-profile-details dt {
  color: var(--fm-color-text-muted);
  font-size: 0.75rem;
}

.fm-profile-details dd {
  min-width: 0;
  margin: 0;
  color: var(--fm-color-text);
  font-size: 0.8125rem;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.fm-verified {
  min-height: 20px;
  margin-left: var(--fm-space-1);
  vertical-align: middle;
}

.fm-profile-form {
  margin-bottom: var(--fm-space-4);
  padding: var(--fm-space-4);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-lg);
  background: var(--fm-color-surface);
}

.fm-profile-form label {
  display: block;
  margin-bottom: var(--fm-space-2);
  font-size: 0.75rem;
  font-weight: 800;
}

.fm-profile-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--fm-space-3);
  border: 1px solid var(--fm-color-border-strong);
  border-radius: var(--fm-radius-sm);
  color: var(--fm-color-text);
  background: var(--fm-color-canvas);
  font: inherit;
}

.fm-profile-form-actions {
  margin-top: var(--fm-space-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--fm-space-2);
}

.fm-form-error {
  margin: 0 0 var(--fm-space-4);
  padding: var(--fm-space-3);
  border-left: 4px solid var(--fm-status-danger);
  color: var(--fm-status-danger);
  background: #ffeaee;
  font-size: 0.8125rem;
  font-weight: 700;
}

.fm-inbox-heading p:last-child {
  margin: var(--fm-space-2) 0 0;
  color: var(--fm-color-text-soft);
  font-size: 0.875rem;
  line-height: 1.5;
}

.fm-unread-summary {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: var(--fm-space-1);
  min-height: 32px;
  padding: var(--fm-space-1) var(--fm-space-3);
  border-radius: var(--fm-radius-pill);
  color: var(--fm-color-primary-strong);
  background: #e8edfc;
  font-size: 0.75rem;
  font-weight: 700;
}

.fm-message-list {
  display: grid;
  gap: var(--fm-space-2);
}

.fm-message-row {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: var(--fm-space-3);
  padding: var(--fm-space-4);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-lg);
  background: var(--fm-color-surface);
  box-shadow: var(--fm-shadow-sm);
}

.fm-message-row.is-unread {
  border-left: 4px solid var(--fm-color-primary);
  background: linear-gradient(110deg, #f7f9ff, var(--fm-color-surface) 42%);
}

.fm-message-mark,
.fm-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fm-color-primary);
  background: #e8edfc;
}

.fm-message-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.fm-message-copy {
  min-width: 0;
}

.fm-message-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--fm-space-3);
}

.fm-message-row h2 {
  min-width: 0;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.fm-message-title-row time {
  flex: 0 0 auto;
  color: var(--fm-color-text-muted);
  font-size: 0.6875rem;
}

.fm-message-row p {
  margin: var(--fm-space-1) 0 0;
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.fm-message-row .fm-message-sender {
  color: var(--fm-color-secondary-strong);
  font-size: 0.6875rem;
  font-weight: 700;
}

.fm-case-status {
  display: inline-flex;
  gap: var(--fm-space-1);
  padding: var(--fm-space-1) var(--fm-space-2);
  border-radius: var(--fm-radius-xs);
  background: #e1f8ee;
  color: var(--fm-color-secondary-strong) !important;
  font-weight: 700;
  text-transform: lowercase;
}

.fm-case-status span {
  font-weight: 500;
}

.fm-unread-dot {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border: 2px solid var(--fm-color-surface);
  border-radius: 50%;
  background: var(--fm-color-primary);
  box-shadow: 0 0 0 1px var(--fm-color-primary);
}

.fm-message-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--fm-space-2);
  margin-top: var(--fm-space-3);
}

.fm-primary-button,
.fm-secondary-button,
.fm-text-button {
  min-height: 44px;
  border-radius: var(--fm-radius-pill);
  cursor: pointer;
  font-weight: 800;
}

.fm-primary-button,
.fm-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--fm-space-2);
  padding: 0 var(--fm-space-4);
}

.fm-primary-button {
  border: 0;
  color: #fff;
  background: linear-gradient(
    95deg,
    var(--fm-color-primary),
    var(--fm-color-primary-strong)
  );
  box-shadow: 0 8px 18px -8px rgba(36, 84, 232, 0.55);
}

.fm-secondary-button {
  border: 1px solid var(--fm-color-border);
  color: var(--fm-color-text);
  background: var(--fm-color-surface);
}

.fm-text-button {
  padding: 0 var(--fm-space-3);
  border: 0;
  color: var(--fm-color-primary-strong);
  background: transparent;
}

.fm-read-status {
  color: var(--fm-color-secondary-strong);
  font-size: 0.75rem;
  font-weight: 800;
}

.fm-state {
  min-height: 320px;
  padding: var(--fm-space-8) var(--fm-space-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-lg);
  background: var(--fm-color-surface);
}

.fm-state-icon {
  width: 56px;
  height: 56px;
  margin-bottom: var(--fm-space-4);
  border-radius: var(--fm-radius-lg);
}

.fm-state-icon .fm-icon {
  width: 24px;
  height: 24px;
}

.fm-state h2 {
  margin: 0;
  font-size: 1.125rem;
}

.fm-registry-state h1,
.fm-support h1,
.fm-support h2 {
  margin: 0;
  letter-spacing: 0;
}

.fm-registry-state h1,
.fm-support h1 {
  font-family: var(--fm-font-display);
  font-size: 2rem;
  line-height: 1.1;
}

.fm-registry-state .fm-eyebrow {
  margin-bottom: var(--fm-space-2);
}

.fm-registry-state > p:not(.fm-eyebrow) {
  max-width: 48ch;
}

.fm-registry-actions {
  display: flex;
  justify-content: center;
  gap: var(--fm-space-2);
}

.fm-registry-actions a,
.fm-link-button,
.fm-support-case a {
  text-decoration: none;
}

.fm-registry-state .fm-registry-note {
  margin-top: calc(var(--fm-space-3) * -1);
  color: var(--fm-color-text-muted);
  font-size: 0.75rem;
}

.fm-support {
  display: grid;
  gap: var(--fm-space-4);
}

.fm-support-heading {
  display: grid;
  gap: var(--fm-space-1);
}

.fm-support-heading h1 {
  margin: 0;
  font-family: var(--fm-font-display);
  font-size: 1.5rem;
  line-height: 1.15;
}

.fm-support-heading > p:last-child {
  max-width: 62ch;
  margin: var(--fm-space-2) 0 0;
  color: var(--fm-color-text-soft);
  line-height: 1.5;
}

.fm-help-teri-tile {
  width: 100%;
  padding: var(--fm-space-3);
  display: flex;
  align-items: center;
  gap: var(--fm-space-3);
  border: 0;
  border-radius: var(--fm-radius-md);
  background: var(--fm-color-primary-soft);
  cursor: pointer;
  text-align: left;
}

.fm-help-teri-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
}

.fm-help-teri-orb {
  --teri-size: 38px;
}

.fm-help-teri-disclosure {
  margin: calc(-1 * var(--fm-space-2)) 0 var(--fm-space-3);
  color: var(--fm-color-text-soft);
  font-size: 0.6875rem;
}

.fm-help-teri-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.fm-help-teri-copy strong {
  color: var(--fm-color-primary-strong);
  font-size: 0.8125rem;
}

.fm-help-teri-copy span {
  color: var(--fm-color-text-soft);
  font-size: 0.75rem;
}

.fm-help-teri-tile > .fm-icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--fm-color-primary);
}

.fm-help-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fm-space-2);
}

.fm-help-topic-tile {
  padding: var(--fm-space-3);
  display: grid;
  justify-items: center;
  gap: 6px;
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  background: var(--fm-color-surface);
  color: var(--fm-color-text);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.fm-help-topic-tile .fm-icon {
  width: 18px;
  height: 18px;
  color: var(--fm-color-primary);
}

.fm-support-ticket {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fm-space-2);
  padding: var(--fm-space-3);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  background: var(--fm-color-canvas);
}

.fm-support-ticket.is-unread {
  border-left: 4px solid var(--fm-color-primary);
}

.fm-support-ticket-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.fm-support-ticket-copy strong {
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.fm-support-ticket-copy span {
  color: var(--fm-color-text-muted);
  font-size: 0.6875rem;
}

.fm-badge {
  flex: 0 0 auto;
  padding: 3px var(--fm-space-2);
  border-radius: var(--fm-radius-xs);
  color: var(--fm-color-secondary-strong);
  background: var(--fm-color-secondary-soft);
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fm-help-report {
  width: 100%;
  justify-content: center;
  gap: var(--fm-space-2);
}

.fm-help-report .fm-icon {
  width: 15px;
  height: 15px;
}

.fm-help-contact-human {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: var(--fm-radius-sm);
  color: #fff;
  background: var(--fm-color-text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.fm-support-panel {
  padding: var(--fm-space-4);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-lg);
  background: var(--fm-color-surface);
  box-shadow: var(--fm-shadow-sm);
}

.fm-support-panel h2 {
  font-size: 1rem;
}

.fm-support-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--fm-space-3);
}

.fm-support-topics,
.fm-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fm-space-2);
}

.fm-support-topics {
  margin-top: var(--fm-space-3);
}

.fm-support-form {
  margin-top: var(--fm-space-4);
  display: grid;
  gap: var(--fm-space-2);
}

.fm-support-form label {
  font-size: 0.75rem;
  font-weight: 800;
}

.fm-support-form textarea {
  width: 100%;
  min-height: 112px;
  padding: var(--fm-space-3);
  resize: vertical;
  border: 1px solid var(--fm-color-border-strong);
  border-radius: var(--fm-radius-sm);
  color: var(--fm-color-text);
  background: var(--fm-color-canvas);
  font: inherit;
  line-height: 1.5;
}

.fm-support-form .fm-primary-button {
  justify-self: start;
}

.fm-support-case,
.fm-support-message {
  margin-top: var(--fm-space-3);
  padding: var(--fm-space-3);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  background: var(--fm-color-canvas);
}

.fm-support-case p,
.fm-support-message p,
.fm-support-message small,
.fm-support-empty {
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.fm-support-list {
  display: grid;
  gap: var(--fm-space-2);
}

.fm-support-message.is-unread {
  border-left: 4px solid var(--fm-color-primary);
}

.fm-state p {
  max-width: 36ch;
  margin: var(--fm-space-2) 0 var(--fm-space-4);
  color: var(--fm-color-text-soft);
  line-height: 1.5;
}

.fm-state-error .fm-state-icon {
  color: var(--fm-status-danger);
  background: #ffeaee;
}

.fm-spinner {
  width: 40px;
  height: 40px;
  margin-bottom: var(--fm-space-4);
  border: 4px solid #e8edfc;
  border-top-color: var(--fm-color-primary);
  border-radius: 50%;
  animation: fm-spin 800ms linear infinite;
}

@keyframes fm-spin {
  to {
    transform: rotate(360deg);
  }
}

.fm-partial-note {
  margin: 0 0 var(--fm-space-3);
  padding: var(--fm-space-3);
  border-left: 4px solid var(--fm-status-warning);
  color: var(--fm-color-text-soft);
  background: #fff8e8;
  font-size: 0.8125rem;
}

.fm-bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: calc(70px + env(safe-area-inset-bottom, 0px));
  padding: var(--fm-space-1)
    max(var(--fm-space-2), env(safe-area-inset-left, 0px))
    env(safe-area-inset-bottom, 0px)
    max(var(--fm-space-2), env(safe-area-inset-right, 0px));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--fm-color-border);
  background: color-mix(in srgb, var(--fm-color-surface) 96%, transparent);
  box-shadow: 0 -8px 24px rgba(10, 12, 16, 0.08);
  backdrop-filter: blur(14px);
}

.fm-bottom-nav-item {
  position: relative;
  min-width: 0;
  min-height: 60px;
  padding: var(--fm-space-1) 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  border-radius: var(--fm-radius-sm);
  color: var(--fm-color-text-muted);
  background: transparent;
  font-size: clamp(0.625rem, 2.8vw, 0.75rem);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.fm-bottom-nav-item::before {
  content: '';
  position: absolute;
  top: 1px;
  width: 24px;
  height: 3px;
  border-radius: var(--fm-radius-pill);
  background: transparent;
}

.fm-bottom-nav-item.is-active {
  color: var(--fm-color-primary);
  font-weight: 800;
}

.fm-bottom-nav-item.is-active::before {
  background: var(--fm-color-primary);
}

.fm-bottom-nav-item:disabled {
  color: color-mix(in srgb, var(--fm-color-text-muted) 55%, white);
  cursor: not-allowed;
}

.fm-nav-indicator {
  position: absolute;
  top: 8px;
  left: calc(50% + 8px);
  width: 8px;
  height: 8px;
  border: 2px solid var(--fm-color-surface);
  border-radius: 50%;
  background: var(--fm-status-live);
}

.fm-fan-notice {
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
}

.fm-chat-shell {
  padding-bottom: 0 !important;
}

.fm-chat-global-header {
  position: relative;
}

.fm-chat-account-actions,
.fm-chat-tools,
.fm-chat-gate-actions {
  display: flex;
  align-items: center;
  gap: var(--fm-space-2);
}

.fm-chat-credits {
  color: var(--fm-color-text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.fm-chat-credits strong {
  color: var(--fm-color-text);
  font-size: 0.875rem;
}

.fm-chat-main {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: var(--fm-space-4);
}

.fm-chat {
  overflow: hidden;
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-lg);
  background: var(--fm-color-surface);
  box-shadow: var(--fm-shadow-md);
}

.fm-chat-creator-header {
  min-height: 72px;
  padding: var(--fm-space-3) var(--fm-space-4);
  display: flex;
  align-items: center;
  gap: var(--fm-space-3);
  border-bottom: 1px solid var(--fm-color-border);
  background: color-mix(in srgb, var(--fm-color-canvas) 88%, transparent);
  backdrop-filter: blur(12px);
}

.fm-chat-home-link {
  min-height: 44px;
  padding: 0 var(--fm-space-2);
  display: inline-flex;
  align-items: center;
  gap: var(--fm-space-1);
  border-radius: var(--fm-radius-sm);
  color: var(--fm-color-text-soft);
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}

.fm-chat-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 2px solid var(--fm-color-surface);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(
    145deg,
    var(--fm-color-secondary),
    var(--fm-color-primary)
  );
  box-shadow: 0 0 0 2px var(--fm-color-primary-soft);
  font-size: 0.75rem;
  font-weight: 800;
}

.fm-chat-presence-dot {
  position: absolute;
  right: -1px;
  bottom: 1px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--fm-color-surface);
  border-radius: 50%;
  background: var(--fm-color-text-muted);
}

.fm-chat-presence-dot.is-online {
  background: var(--fm-color-secondary);
}

.fm-chat-creator-copy {
  min-width: 0;
  flex: 1;
}

.fm-chat-creator-copy h1 {
  margin: 0;
  color: var(--fm-color-text);
  font-size: 0.9375rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.fm-chat-creator-copy p {
  margin: 2px 0 0;
  color: var(--fm-color-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.fm-chat-creator-copy p.is-online {
  color: var(--fm-color-secondary-strong);
}

.fm-chat-creator-header .fm-chat-more {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--fm-color-text-muted);
}

.fm-chat-ai-disclosure {
  padding: 6px var(--fm-space-4);
  border-bottom: 1px solid var(--fm-color-border);
  color: var(--fm-color-text-muted);
  background: var(--fm-color-canvas);
  font-size: 0.6875rem;
  line-height: 1.4;
  text-align: center;
}

.ai-disclosure-badge {
  display: inline-block;
  margin: 0 0 4px;
  padding: 1px 6px;
  border-radius: var(--fm-radius-xs);
  color: var(--fm-color-text-muted);
  background: var(--fm-color-border);
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fm-chat-status {
  min-height: 48px;
  padding: var(--fm-space-2) var(--fm-space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fm-space-3);
  border-bottom: 1px solid var(--fm-color-border);
  color: var(--fm-color-text-soft);
  background: #f7f9ff;
  font-size: 0.75rem;
}

.fm-chat-status strong {
  max-width: 48%;
  color: var(--fm-color-primary-strong);
  font-size: 0.6875rem;
  text-align: right;
}

.fm-chat-status.presence-offline,
.fm-chat-status.presence-reconnect {
  border-left: 4px solid var(--fm-status-warning);
  background: #fff8e8;
}

.fm-chat-tools {
  min-height: 60px;
  padding: var(--fm-space-2) var(--fm-space-4);
  overflow-x: auto;
  border-bottom: 1px solid var(--fm-color-border);
  scrollbar-width: thin;
}

.fm-chat-tools .fm-secondary-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 var(--fm-space-3);
  font-size: 0.75rem;
}

.fm-chat-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(210px, 0.65fr) minmax(0, 1.6fr);
  background: var(--fm-color-canvas);
}

.fm-chat-history {
  min-width: 0;
  max-height: 680px;
  padding: var(--fm-space-3);
  overflow: auto;
  border-right: 1px solid var(--fm-color-border);
  background: var(--fm-color-surface);
}

.fm-chat-panel-heading {
  padding: var(--fm-space-2);
}

.fm-chat-panel-heading h2 {
  margin: 0;
  font-size: 0.9375rem;
  letter-spacing: 0;
}

.fm-chat-history > .conversation-list {
  width: auto;
  min-width: 0;
  height: auto;
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.fm-chat-history .timeline-search,
.fm-chat-shell .intelligence-input {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--fm-space-3);
  border: 1px solid var(--fm-color-border-strong);
  border-radius: var(--fm-radius-sm);
  color: var(--fm-color-text);
  background: var(--fm-color-canvas);
  font: inherit;
}

.fm-chat-history .conv-item {
  min-width: 0;
  margin-top: var(--fm-space-2);
  padding: var(--fm-space-3);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  color: var(--fm-color-text);
  background: var(--fm-color-surface);
  box-shadow: none;
  cursor: pointer;
}

.fm-chat-history .conv-item.active {
  border-color: var(--fm-color-primary);
  background: #f4f7ff;
  box-shadow: inset 3px 0 0 var(--fm-color-primary);
}

.fm-chat-history .conv-head,
.fm-chat-history .conv-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--fm-space-2);
}

.fm-chat-history .conv-head strong,
.fm-chat-history .conv-preview,
.fm-chat-history .conv-meta {
  min-width: 0;
  overflow-wrap: anywhere;
}

.fm-chat-history .conv-head strong {
  font-size: 0.75rem;
}

.fm-chat-history .conv-preview,
.fm-chat-history .conv-meta {
  margin-top: var(--fm-space-1);
  color: var(--fm-color-text-muted);
  font-size: 0.6875rem;
  line-height: 1.4;
}

.fm-chat-history .favorite-btn {
  width: 44px;
  height: 44px;
  margin: -12px -10px -8px 0;
  flex: 0 0 auto;
  border: 0;
  color: var(--fm-color-text-muted);
  background: transparent;
  cursor: pointer;
}

.fm-chat-history .favorite-btn.favorite {
  color: var(--fm-color-primary);
}

.fm-chat-stage {
  min-width: 0;
  height: min(680px, calc(100dvh - 254px));
  min-height: 480px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: linear-gradient(180deg, #f7f8fc, var(--fm-color-canvas));
}

.fm-chat-stage .chat-feed {
  min-height: 0;
  padding: var(--fm-space-5) var(--fm-space-4);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.fm-chat-stage .bubble-row {
  width: 100%;
  margin: var(--fm-space-2) 0;
  display: flex;
}

.fm-chat-stage .bubble-row.user {
  justify-content: flex-end;
}

.fm-chat-stage .chat-bubble {
  width: fit-content;
  max-width: min(78%, 520px);
  padding: var(--fm-space-3) var(--fm-space-4);
  border: 1px solid var(--fm-color-border);
  border-radius: 16px 16px 16px 5px;
  color: var(--fm-color-text);
  background: var(--fm-color-surface);
  box-shadow: var(--fm-shadow-sm);
  overflow-wrap: anywhere;
}

.fm-chat-stage .chat-bubble.user {
  border-color: var(--fm-color-primary);
  border-radius: 16px 16px 5px 16px;
  color: #fff;
  background: var(--fm-color-primary);
}

.fm-chat-stage .bubble-text {
  font-size: 0.875rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.fm-chat-stage .timestamp,
.fm-chat-stage .performance-cue,
.fm-chat-stage .typing-label {
  margin-top: var(--fm-space-1);
  color: var(--fm-color-text-muted);
  font-size: 0.6875rem;
}

.fm-chat-stage .chat-bubble.user .timestamp {
  color: rgba(255, 255, 255, 0.75);
}

.fm-chat-stage .message-actions {
  margin-top: var(--fm-space-2);
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.fm-chat-stage .message-action {
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--fm-space-2);
  border: 0;
  border-radius: var(--fm-radius-sm);
  color: var(--fm-color-text-muted);
  background: transparent;
  font-size: 0.6875rem;
  cursor: pointer;
}

.fm-chat-stage .message-action.active {
  color: var(--fm-color-primary-strong);
  background: var(--fm-color-primary-soft);
}

.fm-chat-stage .typing {
  display: inline-flex;
  gap: 4px;
  margin-left: var(--fm-space-2);
}

.fm-chat-stage .typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fm-color-primary);
  animation: fm-chat-typing 900ms ease-in-out infinite alternate;
}

.fm-chat-stage .typing span:nth-child(2) {
  animation-delay: 150ms;
}
.fm-chat-stage .typing span:nth-child(3) {
  animation-delay: 300ms;
}

@keyframes fm-chat-typing {
  to {
    opacity: 0.35;
    transform: translateY(-3px);
  }
}

.fm-chat-stage .fm-empty-state {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--fm-color-text-soft);
  text-align: center;
}

.fm-chat-stage .fm-empty-state h4,
.fm-chat-stage .fm-empty-state p {
  margin: 0;
}

.fm-chat-stage .fm-empty-state p {
  max-width: 34ch;
  margin-top: var(--fm-space-2);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.fm-chat-composer {
  padding: var(--fm-space-3);
  border-top: 1px solid var(--fm-color-border);
  background: var(--fm-color-surface);
}

.fm-chat-composer .fm-composer-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--fm-space-2);
}

.fm-chat-composer .fm-form-control {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 var(--fm-space-4);
  border: 1px solid var(--fm-color-border-strong);
  border-radius: var(--fm-radius-pill);
  color: var(--fm-color-text);
  background: var(--fm-color-canvas);
  font: inherit;
}

.fm-chat-composer .fm-primary-button.fm-composer-send {
  width: 46px;
  min-width: 46px;
  min-height: 46px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--fm-color-text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.fm-chat-composer .fm-primary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fm-composer-send .fm-icon {
  width: 17px;
  height: 17px;
}

.fm-chat-shell .fm-chat-intelligence {
  position: static;
  grid-column: 1 / -1;
  right: auto;
  bottom: auto;
  left: auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  max-height: 620px;
  overflow: auto;
  border-top: 1px solid var(--fm-color-border);
  color: var(--fm-color-text);
  background: var(--fm-color-surface);
  box-shadow: none;
  transform: none;
}

.fm-chat-shell .fm-chat-intelligence.collapsed {
  display: none;
}

.fm-chat-shell .fm-chat-intelligence-inner {
  padding: var(--fm-space-5);
}

.fm-chat-shell .fm-panel-head,
.fm-chat-shell .fm-panel-grid {
  display: grid;
  gap: var(--fm-space-3);
}

.fm-chat-shell .fm-panel-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.fm-chat-shell .fm-panel-head h3,
.fm-chat-shell .intelligence-card h4 {
  margin: 0;
  font-family: var(--fm-font-body);
  letter-spacing: 0;
}

.fm-chat-shell .fm-panel-head h3 {
  font-size: 1rem;
  line-height: 1.25;
}

.fm-chat-shell .intelligence-card h4 {
  font-size: 0.8125rem;
}

.fm-chat-shell .intelligence-card p,
.fm-chat-shell .intelligence-card li,
.fm-chat-shell .intelligence-card span,
.fm-chat-shell .intelligence-card em {
  font-size: 0.75rem;
  line-height: 1.45;
}

.fm-chat-shell .fm-panel-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: var(--fm-space-4);
}

.fm-chat-shell .intelligence-card {
  min-width: 0;
  padding: var(--fm-space-4);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  background: var(--fm-color-canvas);
  overflow-wrap: anywhere;
}

.fm-chat-shell .fm-secondary-button,
.fm-chat-shell .chip,
.fm-chat-shell .search-result,
.fm-chat-shell .nav-action,
.fm-chat-shell .related-conversation {
  min-height: 44px;
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-sm);
  color: var(--fm-color-text);
  background: var(--fm-color-surface);
  font: inherit;
  cursor: pointer;
}

.fm-planet-jia-card {
  margin: var(--fm-space-5) 0;
  padding: var(--fm-space-4);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  background: var(--fm-color-surface);
}

.fm-planet-jia-card h2 {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--fm-color-text);
}

.fm-planet-jia-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fm-space-2);
  margin: 0 0 var(--fm-space-2);
}

.fm-planet-jia-card-head .fm-icon-button {
  width: 32px;
  height: 32px;
}

.fm-planet-jia-card-head .fm-icon-button .fm-icon {
  width: 15px;
  height: 15px;
}

.fm-planet-jia-notifications {
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-2);
  margin-top: var(--fm-space-3);
  padding-top: var(--fm-space-3);
  border-top: 1px solid var(--fm-color-border);
}

.fm-planet-jia-notification-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--fm-space-2) var(--fm-space-3);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-color-canvas);
  color: var(--fm-color-text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.fm-planet-jia-notification-item strong {
  font-size: 0.8125rem;
}

.fm-planet-jia-notification-item span {
  font-size: 0.75rem;
  color: var(--fm-color-text-soft);
}

.fm-planet-jia-notification-unread {
  border-color: var(--fm-status-live);
}

.fm-planet-jia-notice {
  margin: var(--fm-space-3) var(--fm-space-4) 0;
  padding: var(--fm-space-3);
  border: 1px solid var(--fm-status-live);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-color-surface);
}

.fm-planet-jia-notice strong {
  display: block;
  font-size: 0.8125rem;
  color: var(--fm-color-text);
}

.fm-planet-jia-notice p {
  margin: var(--fm-space-1) 0 var(--fm-space-2);
  font-size: 0.8125rem;
  color: var(--fm-color-text-soft);
}

.fm-planet-jia-creator-panel {
  margin: 0 var(--fm-space-4) var(--fm-space-3);
  padding: var(--fm-space-3);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-color-canvas);
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-2);
}

.fm-planet-jia-creator-request-form textarea {
  width: 100%;
  min-height: 72px;
  padding: var(--fm-space-2);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-color-surface);
  color: var(--fm-color-text);
  font: inherit;
  resize: vertical;
}

.fm-planet-jia-creator-offer,
.fm-planet-jia-creator-lock {
  font-size: 0.8125rem;
  color: var(--fm-color-text-soft);
}

.fm-planet-jia-creator-offer p,
.fm-planet-jia-creator-lock p {
  margin: var(--fm-space-1) 0;
}

.fm-planet-jia-card p {
  margin: 0 0 var(--fm-space-3);
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
}

.fm-planet-jia-panel {
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-3);
}

.fm-planet-jia-chat-log {
  max-height: 320px;
  overflow-y: auto;
  padding: var(--fm-space-3);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  background: var(--fm-color-canvas);
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-2);
}

.fm-planet-jia-message {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--fm-color-text);
}

.fm-planet-jia-message-fan {
  align-self: flex-end;
  color: var(--fm-color-text-soft);
}

.fm-planet-jia-cost {
  color: var(--fm-color-text-muted);
  font-size: 0.6875rem;
}

.fm-planet-jia-chat-form {
  display: flex;
  gap: var(--fm-space-2);
}

.fm-planet-jia-chat-form input {
  flex: 1;
  min-height: 44px;
  padding: 0 var(--fm-space-3);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-color-canvas);
  color: var(--fm-color-text);
  font: inherit;
}

.fm-planet-jia-cast {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fm-space-2);
}

.fm-planet-jia-cast-chip {
  padding: 3px var(--fm-space-2);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-pill);
  font-size: 0.6875rem;
  color: var(--fm-color-text-soft);
}

@media (prefers-reduced-motion: reduce) {
  .fm-planet-jia-panel * {
    animation: none !important;
    transition: none !important;
  }
}

.fm-drawer-overlay {
  position: fixed;
  z-index: 70;
  inset: 0;
  padding: var(--fm-space-4);
  display: grid;
  place-items: center;
  background: rgba(10, 12, 16, 0.48);
}

.fm-context-drawer {
  width: min(100%, 760px);
  max-height: calc(100dvh - 32px);
  padding: var(--fm-space-5);
  overflow-y: auto;
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-lg);
  color: var(--fm-color-text);
  background: var(--fm-color-surface);
  box-shadow: var(--fm-shadow-md);
}

.fm-context-drawer .fm-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--fm-space-3);
}

.fm-context-drawer h3,
.fm-context-drawer h4 {
  margin: 0;
  letter-spacing: 0;
}

.fm-drawer-grid {
  margin-top: var(--fm-space-4);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fm-space-3);
}

.fm-drawer-section,
.fm-drawer-meta {
  min-width: 0;
  padding: var(--fm-space-3);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  background: var(--fm-color-canvas);
  overflow-wrap: anywhere;
}

.fm-drawer-section p,
.fm-drawer-chip span,
.fm-drawer-meta p {
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.fm-drawer-chip {
  margin-top: var(--fm-space-2);
  display: grid;
  gap: var(--fm-space-1);
}

.fm-drawer-meta {
  margin-top: var(--fm-space-3);
}

@media (max-width: 599px) {
  .fm-drawer-overlay {
    padding: var(--fm-space-2);
  }

  .fm-context-drawer {
    max-height: calc(100dvh - 16px);
    padding: var(--fm-space-4);
  }

  .fm-drawer-grid {
    grid-template-columns: 1fr;
  }
}

.fm-chat-shell .fm-chat-relationship {
  border-top: 1px solid var(--fm-color-border);
  background: var(--fm-color-surface);
}

.fm-chat-shell .fm-chat-relationship > summary {
  min-height: 52px;
  padding: 0 var(--fm-space-4);
  display: flex;
  align-items: center;
  color: var(--fm-color-primary-strong);
  font-size: 0.8125rem;
  font-weight: 800;
  cursor: pointer;
}

.fm-chat-shell .relationship-dashboard {
  padding: 0 var(--fm-space-4) var(--fm-space-4);
}

.fm-chat-shell .relationship-grid,
.fm-chat-shell .relationship-extended,
.fm-chat-shell .memory-grid,
.fm-chat-shell .milestone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--fm-space-3);
}

.fm-chat-shell .relationship-card,
.fm-chat-shell .memory-card,
.fm-chat-shell .milestone-card {
  min-width: 0;
  padding: var(--fm-space-3);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  background: var(--fm-color-canvas);
  overflow-wrap: anywhere;
}

.fm-chat-shell.reading-mode .fm-chat-history,
.fm-chat-shell.reading-mode .fm-chat-tools,
.fm-chat-shell.reading-mode .fm-chat-intelligence,
.fm-chat-shell.reading-mode .fm-chat-relationship {
  display: none;
}

.fm-chat-shell.reading-mode .fm-chat-layout {
  grid-template-columns: minmax(0, 1fr);
}

.fm-chat-gate h1 {
  margin: 0;
  font-family: var(--fm-font-display);
  font-size: 1.75rem;
  letter-spacing: 0;
}

.fm-chat-gate .gate-list {
  width: min(100%, 480px);
  margin: 0 0 var(--fm-space-4);
  padding: 0;
  color: var(--fm-color-text-soft);
  list-style: none;
  text-align: left;
}

.fm-chat-gate .gate-list li {
  padding: var(--fm-space-2) 0;
  border-bottom: 1px solid var(--fm-color-border);
}

.fm-chat-gate-actions {
  flex-wrap: wrap;
  justify-content: center;
}

.fm-chat-shell + .fm-fan-notice {
  bottom: var(--fm-space-4);
}

@media (min-width: 760px) {
  .fm-fan-header {
    padding-right: max(var(--fm-space-6), calc((100vw - 680px) / 2));
    padding-left: max(var(--fm-space-6), calc((100vw - 680px) / 2));
  }

  .fm-fan-main {
    padding-top: var(--fm-space-8);
  }

  .fm-bottom-nav {
    right: 50%;
    left: auto;
    width: min(100%, 680px);
    transform: translateX(50%);
    border-right: 1px solid var(--fm-color-border);
    border-left: 1px solid var(--fm-color-border);
    border-radius: var(--fm-radius-lg) var(--fm-radius-lg) 0 0;
  }

  .fm-chat-global-header {
    padding-right: max(var(--fm-space-6), calc((100vw - 1120px) / 2));
    padding-left: max(var(--fm-space-6), calc((100vw - 1120px) / 2));
  }
}

@media (max-width: 759px) {
  .fm-chat-main {
    padding: 0;
  }

  .fm-chat {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .fm-chat-layout {
    display: flex;
    flex-direction: column;
  }

  .fm-chat-stage {
    order: 1;
    height: max(480px, calc(100dvh - 244px));
  }

  .fm-chat-history {
    order: 2;
    max-height: 260px;
    border-top: 1px solid var(--fm-color-border);
    border-right: 0;
  }

  .fm-chat-shell .fm-chat-intelligence {
    order: 3;
  }

  .fm-chat-shell .fm-panel-grid,
  .fm-chat-shell .relationship-grid,
  .fm-chat-shell .relationship-extended,
  .fm-chat-shell .memory-grid,
  .fm-chat-shell .milestone-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 359px) {
  .fm-fan-main {
    padding-right: var(--fm-space-3);
    padding-left: var(--fm-space-3);
  }

  .fm-inbox-heading {
    display: block;
  }

  .fm-media-heading {
    display: block;
  }

  .fm-media-count {
    display: inline-block;
    margin-top: var(--fm-space-3);
  }

  .fm-media-grid {
    grid-template-columns: 1fr;
  }

  .fm-home-summary-grid {
    grid-template-columns: 1fr;
  }

  .fm-home h1 {
    font-size: 1.5rem;
  }

  .fm-home-profile-link {
    width: 44px;
    height: 44px;
  }

  .fm-home-balance strong {
    font-size: 1.75rem;
  }

  .fm-home-chat {
    padding: var(--fm-space-5) var(--fm-space-4);
  }

  .fm-chat-account-actions .fm-chat-credits {
    display: none;
  }

  .fm-chat-creator-header {
    gap: var(--fm-space-2);
    padding-right: var(--fm-space-3);
    padding-left: var(--fm-space-3);
  }

  .fm-chat-home-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .fm-chat-home-link {
    width: 44px;
    flex: 0 0 44px;
    padding: 0;
    justify-content: center;
  }

  .fm-chat-creator-header .fm-secondary-button {
    padding: 0 var(--fm-space-3);
  }

  .fm-profile-title-row {
    align-items: flex-start;
  }

  .fm-profile-title-row .fm-secondary-button {
    padding: 0 var(--fm-space-3);
  }

  .fm-unread-summary {
    margin-top: var(--fm-space-3);
  }

  .fm-message-row {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: var(--fm-space-3);
  }

  .fm-message-mark {
    width: 36px;
    height: 36px;
  }

  .fm-unread-dot {
    position: absolute;
    top: var(--fm-space-3);
    right: var(--fm-space-3);
  }

  .fm-message-title-row {
    display: block;
    padding-right: var(--fm-space-3);
  }

  .fm-message-title-row time {
    display: block;
    margin-top: 2px;
  }
}

/* Batch G Section B/C/E: Creator Fan Hub (storefront), purchase confirmation, tips. */

.fm-creator-hero {
  padding: var(--fm-space-5);
  margin-bottom: var(--fm-space-5);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-lg);
  background: var(--fm-color-surface);
  box-shadow: var(--fm-shadow-sm);
}

.fm-creator-hero-identity {
  display: flex;
  align-items: center;
  gap: var(--fm-space-4);
}

.fm-creator-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--fm-color-primary), var(--fm-color-secondary));
  font-family: var(--fm-font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.fm-creator-hero-identity h1 {
  margin: 0;
  font-family: var(--fm-font-display);
  font-size: 1.75rem;
  line-height: 1.15;
}

.fm-creator-tagline {
  margin: var(--fm-space-1) 0 0;
  color: var(--fm-color-text-soft);
}

.fm-creator-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fm-space-2);
  margin-top: var(--fm-space-4);
}

.fm-creator-gift-hint,
.fm-creator-bio,
.fm-creator-ai-disclosure {
  margin: var(--fm-space-3) 0 0;
  color: var(--fm-color-text-soft);
  line-height: 1.5;
}

.fm-creator-ai-disclosure {
  padding: var(--fm-space-2) var(--fm-space-3);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-color-primary-soft);
  font-size: 0.8125rem;
}

.fm-creator-tip {
  padding: var(--fm-space-4) var(--fm-space-5);
  margin-bottom: var(--fm-space-5);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-lg);
  background: var(--fm-color-surface);
}

.fm-creator-tip h2 {
  margin: 0 0 var(--fm-space-1);
  font-family: var(--fm-font-display);
  font-size: 1.125rem;
}

.fm-creator-tip p {
  margin: 0 0 var(--fm-space-3);
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
}

.fm-inline-form {
  display: flex;
  gap: var(--fm-space-2);
}

.fm-inline-form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 var(--fm-space-3);
  height: 44px;
  border: 1px solid var(--fm-color-border-strong);
  border-radius: var(--fm-radius-sm);
  color: var(--fm-color-text);
  background: var(--fm-color-canvas);
}

.fm-offer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fm-space-4);
}

.fm-offer-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  background: var(--fm-color-surface);
  box-shadow: var(--fm-shadow-sm);
}

.fm-offer-thumbnail {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  color: var(--fm-color-primary-strong);
  background: linear-gradient(145deg, var(--fm-color-surface), var(--fm-color-border));
}

.fm-offer-thumbnail .fm-media-type {
  position: absolute;
  left: var(--fm-space-2);
  bottom: var(--fm-space-2);
  padding: 3px var(--fm-space-2);
  border-radius: var(--fm-radius-xs);
  color: #fff;
  background: rgba(10, 12, 16, 0.76);
  font-size: 0.6875rem;
  font-weight: 800;
}

.fm-offer-card-copy {
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-1);
  padding: var(--fm-space-4);
  flex: 1 1 auto;
}

.fm-offer-card-copy h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.fm-offer-description {
  margin: 0;
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
}

.fm-offer-price {
  margin: var(--fm-space-2) 0 0;
  display: flex;
  align-items: baseline;
  gap: var(--fm-space-2);
}

.fm-offer-price span {
  color: var(--fm-color-text-soft);
  font-size: 0.75rem;
}

.fm-offer-meta {
  margin: 0;
  color: var(--fm-color-text-soft);
  font-size: 0.75rem;
}

.fm-offer-card-copy .fm-primary-button {
  margin-top: var(--fm-space-3);
}

.fm-purchase-confirm {
  width: min(100%, 480px);
  max-height: calc(100dvh - 32px);
  padding: var(--fm-space-5);
  overflow-y: auto;
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-lg);
  color: var(--fm-color-text);
  background: var(--fm-color-surface);
  box-shadow: var(--fm-shadow-md);
}

.fm-purchase-summary {
  margin: var(--fm-space-4) 0;
  display: grid;
  gap: var(--fm-space-2);
}

.fm-purchase-summary div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--fm-space-3);
  padding-bottom: var(--fm-space-2);
  border-bottom: 1px solid var(--fm-color-border);
}

.fm-purchase-summary dt {
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
}

.fm-purchase-summary dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.fm-purchase-warning {
  margin: 0 0 var(--fm-space-4);
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
}

.fm-purchase-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--fm-space-3);
}

@media (max-width: 599px) {
  .fm-offer-grid {
    grid-template-columns: 1fr;
  }

  .fm-creator-hero-identity {
    align-items: flex-start;
  }

  .fm-purchase-confirm-actions {
    flex-direction: column-reverse;
  }

  .fm-purchase-confirm-actions button {
    width: 100%;
  }
}

/* Batch G Section D/E: Order history/detail, live-admission card. */

.fm-creator-live {
  padding: var(--fm-space-4) var(--fm-space-5);
  margin-bottom: var(--fm-space-5);
  border: 1px solid var(--fm-color-primary);
  border-radius: var(--fm-radius-lg);
  background: var(--fm-color-primary-soft);
}

.fm-creator-live h2 {
  display: flex;
  align-items: center;
  gap: var(--fm-space-2);
  margin: 0 0 var(--fm-space-2);
  font-family: var(--fm-font-display);
  font-size: 1.125rem;
}

.fm-creator-live p {
  margin: 0 0 var(--fm-space-2);
}

.fm-creator-live .fm-primary-button {
  margin-top: var(--fm-space-2);
}

/* Close OR-54 (corrected): FanMassive token-package wallet funding. */
.fm-token-packages {
  margin: var(--fm-space-5) 0;
}

.fm-home-module-notice {
  padding: var(--fm-space-3);
  margin-bottom: var(--fm-space-3);
  border-left: 3px solid var(--fm-color-accent, var(--fm-status-warning));
  background: var(--fm-color-surface);
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
  border-radius: var(--fm-radius-md);
}

.fm-token-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--fm-space-3);
}

.fm-token-package-card {
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-2);
  padding: var(--fm-space-4);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  background: var(--fm-color-surface);
}

.fm-token-package-card h3 {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--fm-color-text);
}

.fm-token-package-card p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--fm-color-text-soft);
}

.fm-token-package-price {
  font-weight: 700;
  color: var(--fm-color-text);
}

.fm-order-list {
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-3);
}

.fm-order-card {
  overflow: hidden;
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  background: var(--fm-color-surface);
}

.fm-order-summary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fm-space-3);
  padding: var(--fm-space-4);
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.fm-order-summary-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fm-order-summary-main strong {
  overflow-wrap: anywhere;
}

.fm-order-summary-main span {
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
}

.fm-order-summary-meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--fm-space-3);
}

.fm-order-status {
  padding: 3px var(--fm-space-2);
  border-radius: var(--fm-radius-pill);
  border: 1px solid var(--fm-color-border);
  color: var(--fm-color-text-soft);
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

.fm-order-detail {
  padding: 0 var(--fm-space-4) var(--fm-space-4);
  border-top: 1px solid var(--fm-color-border);
}

.fm-order-detail .fm-purchase-summary {
  margin-top: var(--fm-space-3);
}

.fm-order-bundle {
  margin: var(--fm-space-3) 0;
}

.fm-order-bundle h3 {
  margin: 0 0 var(--fm-space-2);
  font-size: 0.875rem;
}

.fm-order-bundle ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-1);
}

.fm-order-bundle li {
  display: flex;
  justify-content: space-between;
  padding: var(--fm-space-2) var(--fm-space-3);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-sm);
  font-size: 0.8125rem;
}

.fm-order-actions {
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-3);
  margin-top: var(--fm-space-3);
}

.fm-order-action-form {
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-2);
}

.fm-order-action-form input,
.fm-order-action-form textarea {
  padding: var(--fm-space-2) var(--fm-space-3);
  border: 1px solid var(--fm-color-border-strong);
  border-radius: var(--fm-radius-sm);
  color: var(--fm-color-text);
  background: var(--fm-color-canvas);
  font: inherit;
}

.fm-order-report-actions {
  display: flex;
  gap: var(--fm-space-3);
}

.fm-order-report-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--fm-space-2);
}

@media (max-width: 599px) {
  .fm-order-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--fm-space-2);
  }

  .fm-order-summary-meta {
    align-self: stretch;
    justify-content: space-between;
  }
}

/* Complete Personalized-Video Fan and Administrator UI Workflows batch (OR-36) */

.fm-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--fm-space-2);
  margin-bottom: var(--fm-space-3);
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
}

.fm-back-link:hover {
  color: var(--fm-color-primary-strong);
}

.fm-back-link .fm-icon {
  width: 16px;
  height: 16px;
}

.fm-media-pv-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fm-space-3);
  margin: var(--fm-space-3) 0;
  padding: var(--fm-space-4);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  color: inherit;
  background: var(--fm-color-surface);
  text-decoration: none;
}

.fm-media-pv-entry:hover {
  border-color: var(--fm-color-primary);
}

.fm-media-pv-entry-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fm-media-pv-entry-copy span:last-child {
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
}

.fm-pv-list {
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-3);
}

.fm-pv-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fm-space-3);
  padding: var(--fm-space-4);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-md);
  color: inherit;
  background: var(--fm-color-surface);
  box-shadow: var(--fm-shadow-sm);
  text-decoration: none;
}

.fm-pv-card:hover {
  border-color: var(--fm-color-primary);
}

.fm-pv-card-copy {
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-2);
  min-width: 0;
}

.fm-pv-card-prompt {
  display: -webkit-box;
  overflow: hidden;
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.fm-pv-status {
  display: inline-flex;
  align-items: center;
  gap: var(--fm-space-2);
  align-self: flex-start;
  padding: 3px var(--fm-space-2);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-pill);
  color: var(--fm-color-text-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.fm-pv-status .fm-icon {
  width: 14px;
  height: 14px;
}

.fm-pv-status-warn {
  border-color: var(--fm-status-warning);
  color: var(--fm-status-warning);
}

.fm-pv-status-success {
  border-color: var(--fm-status-success, var(--fm-color-secondary-strong));
  color: var(--fm-status-success, var(--fm-color-secondary-strong));
}

.fm-pv-status-off {
  color: var(--fm-color-text-muted);
}

.fm-pv-header-card {
  padding: var(--fm-space-5);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-lg);
  background: var(--fm-color-surface);
  box-shadow: var(--fm-shadow-sm);
}

.fm-pv-header-card h2 {
  margin: 0 0 var(--fm-space-2);
  font-family: var(--fm-font-display);
}

.fm-pv-prompt {
  color: var(--fm-color-text-soft);
  font-style: italic;
}

.fm-panel-card {
  margin-top: var(--fm-space-4);
  padding: var(--fm-space-5);
  border: 1px solid var(--fm-color-border);
  border-radius: var(--fm-radius-lg);
  background: var(--fm-color-surface);
}

.fm-panel-card h3 {
  margin: 0 0 var(--fm-space-2);
  font-family: var(--fm-font-display);
}

.fm-pv-consent-form {
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-3);
  margin-top: var(--fm-space-4);
}

.fm-pv-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--fm-space-3);
  font-size: 0.875rem;
  line-height: 1.45;
}

.fm-pv-checkbox input {
  margin-top: 3px;
  accent-color: var(--fm-color-primary);
}

.fm-pv-source-media-list {
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-2);
  margin: var(--fm-space-3) 0 0;
  padding: 0;
  list-style: none;
}

.fm-pv-upload-form {
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-2);
  margin-top: var(--fm-space-4);
}

.fm-pv-upload-hint {
  margin: 0;
  color: var(--fm-color-text-soft);
  font-size: 0.75rem;
}

.fm-pv-blocker-list {
  display: flex;
  flex-direction: column;
  gap: var(--fm-space-2);
  margin: var(--fm-space-3) 0 0;
  padding: 0;
  list-style: none;
}

.fm-pv-blocker-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--fm-space-2);
  color: var(--fm-status-warning);
  font-size: 0.875rem;
}

.fm-pv-blocker-list .fm-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.fm-pv-ready-note {
  display: flex;
  align-items: center;
  gap: var(--fm-space-2);
  color: var(--fm-status-success, var(--fm-color-secondary-strong));
  font-size: 0.875rem;
}

.fm-pv-verification-status {
  margin-top: var(--fm-space-3);
  color: var(--fm-color-text-soft);
  font-size: 0.8125rem;
}

.fm-pv-continue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fm-space-3);
  margin-top: var(--fm-space-4);
}

@media (max-width: 479px) {
  .fm-pv-card,
  .fm-media-pv-entry {
    flex-direction: column;
    align-items: flex-start;
  }

  .fm-pv-continue-actions {
    flex-direction: column;
  }

  .fm-pv-continue-actions button {
    width: 100%;
  }
}
