/* ==========================================================================
   Refined Warm-Paper & Soft Jade-Teal Design Tokens
   Light Base: #FFFCF0 | Dark Base: #100F0F — Zero Harsh Black-Bg Active States
   ========================================================================== */

:root,
[data-theme="light"] {
  --fx-paper: #FFFCF0;
  --fx-base-50: #F7F4E8;
  --fx-base-100: #EFECE0;
  --fx-base-150: #E5E1D4;
  --fx-base-200: #D8D4C6;
  --fx-base-300: #BDB8A9;
  --fx-base-500: #878580;
  --fx-base-600: #6F6E69;
  --fx-base-700: #52504C;
  --fx-base-800: #3D3B38;
  --fx-ink: #1C1B1A;

  --fx-border: rgba(61, 59, 56, 0.12);
  --fx-border-strong: rgba(61, 59, 56, 0.24);
  --fx-muted: #6F6E69;

  /* Refined Muted Accents */
  --fx-accent: #1F7A70;
  --fx-accent-hover: #19665D;
  --fx-accent-soft: rgba(31, 122, 112, 0.11);
  --fx-accent-border: rgba(31, 122, 112, 0.36);

  --fx-red: #AF3029;
  --fx-orange: #B8541A;
  --fx-yellow: #AD8301;
  --fx-green: #5B7810;
  --fx-cyan: #1F7A70;
  --fx-blue: #205EA6;
  --fx-purple: #5E409D;
  --fx-magenta: #A02F6F;

  --fx-red-soft: rgba(175, 48, 41, 0.09);
  --fx-orange-soft: rgba(184, 84, 26, 0.10);
  --fx-yellow-soft: rgba(173, 131, 1, 0.11);
  --fx-green-soft: rgba(91, 120, 16, 0.11);
  --fx-cyan-soft: rgba(31, 122, 112, 0.11);
  --fx-blue-soft: rgba(32, 94, 166, 0.10);
  --fx-purple-soft: rgba(94, 64, 157, 0.10);
  --fx-magenta-soft: rgba(160, 47, 111, 0.10);

  --fx-mark-bg: rgba(173, 131, 1, 0.22);
  --fx-on-accent: #FFFCF0;
  --fx-shadow: 0 6px 22px rgba(28, 27, 26, 0.07);
  --fx-card-shadow: 0 1px 3px rgba(28, 27, 26, 0.06);
  color-scheme: light;
}

[data-theme="dark"] {
  --fx-paper: #100F0F;
  --fx-base-50: #191817;
  --fx-base-100: #232220;
  --fx-base-150: #2E2D2A;
  --fx-base-200: #3B3936;
  --fx-base-300: #575653;
  --fx-base-500: #878580;
  --fx-base-600: #9F9D96;
  --fx-base-700: #B7B5AC;
  --fx-base-800: #CECDC3;
  --fx-ink: #F2F0E5;

  --fx-border: rgba(206, 205, 195, 0.12);
  --fx-border-strong: rgba(206, 205, 195, 0.26);
  --fx-muted: #9F9D96;

  --fx-accent: #3AA99F;
  --fx-accent-hover: #49B8AE;
  --fx-accent-soft: rgba(58, 169, 159, 0.16);
  --fx-accent-border: rgba(58, 169, 159, 0.42);

  --fx-red: #D14D41;
  --fx-orange: #DA702C;
  --fx-yellow: #D0A215;
  --fx-green: #879A39;
  --fx-cyan: #3AA99F;
  --fx-blue: #4385BE;
  --fx-purple: #8B7EC8;
  --fx-magenta: #CE5D97;

  --fx-red-soft: rgba(209, 77, 65, 0.15);
  --fx-orange-soft: rgba(218, 112, 44, 0.15);
  --fx-yellow-soft: rgba(208, 162, 21, 0.16);
  --fx-green-soft: rgba(135, 154, 57, 0.16);
  --fx-cyan-soft: rgba(58, 169, 159, 0.16);
  --fx-blue-soft: rgba(67, 133, 190, 0.15);
  --fx-purple-soft: rgba(139, 126, 200, 0.15);
  --fx-magenta-soft: rgba(206, 93, 151, 0.15);

  --fx-mark-bg: rgba(208, 162, 21, 0.28);
  --fx-on-accent: #100F0F;
  --fx-shadow: 0 12px 32px rgba(0, 0, 0, 0.50);
  --fx-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--fx-paper);
  color: var(--fx-ink);
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  overflow-x: clip;
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out);
}

mark.fx-hit {
  background-color: var(--fx-mark-bg);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}

.is-viewed-item {
  opacity: 0.56;
  background-color: var(--fx-paper) !important;
  border-style: dashed !important;
}

.is-viewed-item h3,
.is-viewed-item .v1-card-title,
.is-viewed-item .v5-card-title {
  color: var(--fx-base-500) !important;
  font-weight: 540 !important;
}

.fx-viewed-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: var(--fx-base-100);
  color: var(--fx-base-600);
  margin-left: 6px;
  vertical-align: middle;
}

.fx-cached-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 620;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: var(--fx-green-soft);
  color: var(--fx-green);
  margin-left: 5px;
  vertical-align: middle;
}

/* ==========================================================================
   Unified Clean Portal Top Bar & Collapsible Filter / Menu Popover
   Guarantees "后台管理" & "筛选" are 100% visible on mobile without clipping!
   ========================================================================== */
.fx-portal-topbar {
  position: sticky;
  top: 0;
  z-index: 820;
  background-color: var(--fx-paper);
  border-bottom: 1px solid var(--fx-border);
  padding: calc(8px + var(--safe-top)) 16px 8px;
}

.fx-portal-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fx-portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.fx-portal-logo {
  font-size: 16.5px;
  font-weight: 720;
  letter-spacing: -0.02em;
  color: var(--fx-ink);
  white-space: nowrap;
}

.fx-portal-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  position: relative;
}

.fx-nav-pill {
  appearance: none;
  border: 1px solid var(--fx-border);
  background-color: var(--fx-base-50);
  color: var(--fx-base-800);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  min-height: 36px;
  padding: 5px 11px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.fx-nav-pill:hover {
  background-color: var(--fx-base-100);
  color: var(--fx-ink);
}

.fx-nav-pill.is-active {
  background-color: var(--fx-accent-soft);
  border-color: var(--fx-accent-border);
  color: var(--fx-accent);
  font-weight: 660;
}

.fx-nav-pill.is-admin-entry {
  background-color: var(--fx-accent);
  border-color: var(--fx-accent);
  color: #FFFCF0;
  font-weight: 660;
}

.fx-nav-pill.is-admin-entry:hover {
  background-color: var(--fx-accent-hover);
}

.fx-more-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 236px;
  background-color: var(--fx-paper);
  border: 1px solid var(--fx-border-strong);
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--fx-shadow);
  z-index: 860;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fx-more-item {
  appearance: none;
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fx-ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 560;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fx-more-item:hover {
  background-color: var(--fx-base-50);
}

.fx-collapsible-drawer {
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Desktop Floating Edition Dock (Hidden on Mobile to keep screen clean) */
.edition-dock {
  position: fixed;
  left: 14px;
  bottom: calc(14px + var(--safe-bottom));
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-border);
  border-radius: 999px;
  box-shadow: var(--fx-shadow);
  font-size: 12.5px;
}

body[data-edition="v5"] .edition-dock {
  bottom: calc(38px + var(--safe-bottom));
}

.edition-dock a {
  color: var(--fx-base-600);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 560;
  white-space: nowrap;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.edition-dock a:hover {
  color: var(--fx-ink);
  background-color: var(--fx-base-100);
}

.edition-dock a[aria-current="page"] {
  background-color: var(--fx-paper);
  color: var(--fx-accent);
  font-weight: 660;
  box-shadow: var(--fx-card-shadow);
}

@media (max-width: 768px) {
  .edition-dock {
    display: none !important;
  }
}

.fx-btn:active,
.fx-nav-pill:active,
.fx-toggle-chip:active,
.fx-kw-pill:active {
  transform: scale(0.985);
}

h1, h2, h3 {
  text-wrap: balance;
}

.fx-svg-ico {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Shared Auth Modal & Form Primitives */
html.has-fx-overlay,
html.has-fx-overlay body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.fx-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(16, 15, 15, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overscroll-behavior: contain;
}

.fx-modal-card {
  width: 100%;
  max-width: 396px;
  background-color: var(--fx-paper);
  border: 1px solid var(--fx-border-strong);
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: var(--fx-shadow);
}

.fx-modal-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 680;
}

.fx-modal-card p {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--fx-base-600);
}

.fx-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--fx-base-800);
}

.fx-field input,
.fx-field select,
.fx-field textarea {
  font-family: inherit;
  font-size: 16px;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid var(--fx-border-strong);
  background-color: var(--fx-base-50);
  color: var(--fx-ink);
  outline: none;
}

.fx-field input:focus,
.fx-field select:focus,
.fx-field textarea:focus {
  border-color: var(--fx-accent);
  background-color: var(--fx-paper);
}

.fx-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* Buttons — Refined Jade-Teal Primary, Zero Harsh Black-Bg */
.fx-btn {
  appearance: none;
  border: 1px solid var(--fx-border-strong);
  background-color: var(--fx-paper);
  color: var(--fx-base-800);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.fx-btn:hover {
  background-color: var(--fx-base-100);
  color: var(--fx-ink);
}

.fx-btn-solid {
  background-color: var(--fx-accent);
  border-color: var(--fx-accent);
  color: #FFFCF0;
}

.fx-btn-solid:hover {
  background-color: var(--fx-accent-hover);
  border-color: var(--fx-accent-hover);
  color: #FFFCF0;
}

html[data-theme="dark"] .fx-btn-solid,
html[data-theme="dark"] .fx-nav-pill.is-admin-entry,
html[data-theme="dark"] .fx-comm-fab-btn {
  background-color: #1B7269;
  border-color: #24837B;
  color: #FFFCF0;
}

html[data-theme="dark"] .fx-btn-solid:hover,
html[data-theme="dark"] .fx-nav-pill.is-admin-entry:hover,
html[data-theme="dark"] .fx-comm-fab-btn:hover {
  background-color: #22877C;
  border-color: #2F998E;
  color: #FFFCF0;
}

html[data-theme="dark"] .fx-btn-danger-outline {
  border-color: rgba(209, 77, 65, 0.52);
  background-color: rgba(209, 77, 65, 0.10);
  color: var(--fx-red);
}

.fx-btn-danger-solid {
  background-color: var(--fx-red);
  border-color: var(--fx-red);
  color: #FFFCF0;
  font-weight: 660;
  box-shadow: 0 3px 10px rgba(175, 48, 41, 0.24);
}

.fx-btn-danger-solid:hover {
  background-color: #94251F;
  border-color: #94251F;
  color: #FFFCF0;
}

html[data-theme="dark"] .fx-btn-danger-solid {
  background-color: #D14D41;
  border-color: #D14D41;
  color: #FFFCF0;
  box-shadow: 0 3px 12px rgba(209, 77, 65, 0.32);
}

html[data-theme="dark"] .fx-btn-danger-solid:hover {
  background-color: #E06256;
  border-color: #E06256;
  color: #FFFCF0;
}

.fx-btn-danger-outline {
  border-color: rgba(175, 48, 41, 0.42);
  background-color: rgba(175, 48, 41, 0.06);
  color: var(--fx-red);
}

.fx-btn-danger-outline:hover {
  border-color: var(--fx-red);
  background-color: rgba(175, 48, 41, 0.14);
  color: var(--fx-red);
}

.fx-btn:disabled {
  opacity: 0.44;
  cursor: not-allowed;
}

.fx-btn-compact {
  min-height: 29px;
  padding: 3px 9px;
  font-size: 12px;
  border-radius: 7px;
  font-weight: 600;
}

.fx-reader-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-bottom: 13px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--fx-base-150);
}

.fx-reader-bot-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--fx-base-150);
}

.fx-toast {
  position: fixed;
  top: calc(56px + var(--safe-top));
  left: 50%;
  transform: translate(-50%, -10px) scale(0.96);
  opacity: 0;
  z-index: 2000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--fx-paper);
  color: var(--fx-ink);
  border: 1px solid var(--fx-border-strong);
  padding: 7px 15px 7px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 28px rgba(28, 27, 26, 0.13);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: calc(100vw - 28px);
  pointer-events: none;
  transition: opacity 200ms var(--ease-out), transform 220ms var(--ease-out);
}

.fx-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.fx-toast.is-leaving {
  opacity: 0;
  transform: translate(-50%, -6px) scale(0.97);
}

.fx-toast-ico {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: var(--fx-accent-soft);
  color: var(--fx-accent);
}

.fx-toast.is-error .fx-toast-ico {
  background-color: var(--fx-red-soft);
  color: var(--fx-red);
}

.fx-toast.is-error {
  border-color: rgba(175, 48, 41, 0.34);
}

.fx-toast.is-info .fx-toast-ico {
  background-color: var(--fx-base-100);
  color: var(--fx-base-600);
}

.fx-toast-svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fx-toast-txt {
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keyword Memory Pills — Soft Tinted Active State */
.fx-kw-check-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.fx-kw-pill {
  appearance: none;
  border: 1px solid var(--fx-border);
  background-color: var(--fx-paper);
  color: var(--fx-base-600);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 560;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.fx-kw-pill.is-checked {
  background-color: var(--fx-accent-soft);
  border-color: var(--fx-accent-border);
  color: var(--fx-accent);
  font-weight: 660;
}

.fx-kw-pill .fx-kw-cnt {
  font-size: 11px;
  opacity: 0.8;
}

.fx-filter-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-border);
  border-radius: 11px;
}

.fx-mini-sel,
.fx-mini-inp {
  font-family: inherit;
  font-size: 13px;
  min-height: 34px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--fx-border-strong);
  background-color: var(--fx-paper);
  color: var(--fx-ink);
  outline: none;
}

.fx-mini-inp:focus,
.fx-mini-sel:focus {
  border-color: var(--fx-accent);
}

.fx-toggle-chip {
  appearance: none;
  border: 1px solid var(--fx-border-strong);
  background-color: var(--fx-paper);
  color: var(--fx-base-800);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 580;
  min-height: 34px;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.fx-toggle-chip.is-on {
  border-color: var(--fx-accent-border);
  background-color: var(--fx-accent-soft);
  color: var(--fx-accent);
  font-weight: 660;
}

/* Shared Article Detail Reader Modal */
.fx-reader-card {
  width: 100%;
  max-width: 780px;
  max-height: 88dvh;
  background-color: var(--fx-paper);
  border: 1px solid var(--fx-border-strong);
  border-radius: 16px;
  box-shadow: var(--fx-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fx-reader-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--fx-border);
  background-color: var(--fx-base-50);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fx-reader-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 20px 24px 28px;
  -webkit-overflow-scrolling: touch;
}

.fx-reader-loading {
  padding: 28px 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--fx-base-600);
}

.fx-reader-loading-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fx-muted);
  letter-spacing: 0.02em;
}

.fx-orbital-loader {
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fx-orbital-loader > span:nth-child(1) {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--fx-base-200);
  border-top-color: var(--fx-accent);
  border-right-color: var(--fx-accent);
  animation: fx-spin 0.9s cubic-bezier(0.45, 0.1, 0.55, 0.9) infinite;
}

.fx-orbital-loader > span:nth-child(2) {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1.8px solid transparent;
  border-bottom-color: var(--fx-accent-border);
  border-left-color: var(--fx-accent-border);
  animation: fx-spin-rev 1.25s linear infinite;
}

.fx-orbital-loader > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--fx-accent);
  animation: fx-dot-pulse 1.2s ease-in-out infinite;
}

.fx-reader-skel-lines {
  width: 100%;
  max-width: 560px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fx-inline-loader {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--fx-muted);
}

.fx-loader-dots {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
}

.fx-loader-dots > i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--fx-accent);
  animation: fx-dot-pulse 1.1s ease-in-out infinite;
}

.fx-loader-dots > i:nth-child(2) {
  animation-delay: 0.16s;
}

.fx-loader-dots > i:nth-child(3) {
  animation-delay: 0.32s;
}

.fx-skel-card {
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-border);
  border-radius: 13px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.fx-skel-card.is-compact {
  background-color: var(--fx-paper);
  padding: 12px 13px;
  gap: 7px;
}

.fx-skel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fx-skel-bar {
  display: block;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--fx-base-100) 0%,
    var(--fx-base-150) 45%,
    var(--fx-base-100) 90%
  );
  background-size: 220% 100%;
  animation: fx-shimmer 1.35s ease-in-out infinite;
}

.fx-skel-bar.is-title {
  height: 14px;
}

.fx-skel-bar.is-w20 { width: 22%; }
.fx-skel-bar.is-w35 { width: 36%; }
.fx-skel-bar.is-w65 { width: 64%; }
.fx-skel-bar.is-w75 { width: 76%; }
.fx-skel-bar.is-w90 { width: 89%; }
.fx-skel-bar.is-w95 { width: 95%; }

.fx-spinner {
  width: 26px;
  height: 26px;
  margin: 0 auto 12px;
  border: 2.5px solid var(--fx-base-200);
  border-top-color: var(--fx-accent);
  border-radius: 50%;
  animation: fx-spin 0.75s linear infinite;
}

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

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

@keyframes fx-dot-pulse {
  0%, 100% { opacity: 0.32; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1.12); }
}

@keyframes fx-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.fx-reader-para {
  margin: 0 0 13px;
  font-size: 16px;
  line-height: 1.82;
  color: var(--fx-ink);
  overflow-wrap: anywhere;
}

.fx-reader-step-m1 .fx-reader-para {
  font-size: 14.5px;
}

.fx-reader-large .fx-reader-para,
.fx-reader-step-1 .fx-reader-para {
  font-size: 18px;
}

.fx-reader-step-2 .fx-reader-para {
  font-size: 20px;
}

.fx-reader-step-3 .fx-reader-para {
  font-size: 22px;
}

@media (max-width: 768px) {
  .fx-mini-inp,
  .fx-mini-sel {
    font-size: 16px;
    min-height: 38px;
  }
  .fx-reader-card {
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
  }
  .fx-reader-scroll {
    padding: 16px 15px calc(24px + var(--safe-bottom));
  }
  .fx-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .fx-modal-card {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
    padding: 22px 18px calc(24px + var(--safe-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Visual Telemetry & Analytics Suite (Soft Elevated Segmented Controls)
   ========================================================================== */
.fx-ana-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fx-ana-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 13px 16px;
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-border);
  border-radius: 13px;
}

.fx-ana-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
  gap: 10px;
}

.fx-ana-kpi {
  background-color: var(--fx-paper);
  border: 1px solid var(--fx-border);
  border-radius: 12px;
  padding: 13px 15px;
  box-shadow: var(--fx-card-shadow);
}

.fx-ana-kpi-label {
  font-size: 12px;
  color: var(--fx-base-600);
  margin-bottom: 3px;
}

.fx-ana-kpi-val {
  font-size: 21px;
  font-weight: 740;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--fx-ink);
}

.fx-ana-kpi-sub {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--fx-base-600);
}

.fx-ana-row-split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

.fx-ana-row-tri {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.fx-ana-panel {
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-border);
  border-radius: 14px;
  padding: 16px 18px;
  min-width: 0;
}

.fx-ana-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.fx-ana-panel-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Segmented Control — Elevated Warm Card Active State (Zero Black-Bg!) */
.fx-ana-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  background-color: var(--fx-base-100);
  border: 1px solid var(--fx-border);
  border-radius: 9px;
  padding: 3px;
}

.fx-ana-seg-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fx-base-600);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 580;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.fx-ana-seg-btn.is-active {
  background-color: var(--fx-paper);
  border-color: var(--fx-accent-border);
  color: var(--fx-accent);
  font-weight: 680;
  box-shadow: var(--fx-card-shadow);
}

.fx-rank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fx-rank-item {
  background-color: var(--fx-paper);
  border: 1px solid var(--fx-border);
  border-radius: 10px;
  padding: 10px 13px;
  cursor: pointer;
  transition: border-color 140ms var(--ease-out);
}

.fx-rank-item:hover {
  border-color: var(--fx-accent-border);
}

.fx-rank-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fx-rank-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 260px;
}

.fx-rank-badge {
  flex-shrink: 0;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 720;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--fx-base-100);
  color: var(--fx-base-800);
}

.fx-rank-badge.is-1 {
  background-color: var(--fx-orange-soft);
  color: var(--fx-orange);
  border: 1px solid rgba(184, 84, 26, 0.32);
}

.fx-rank-badge.is-2 {
  background-color: var(--fx-cyan-soft);
  color: var(--fx-cyan);
  border: 1px solid var(--fx-accent-border);
}

.fx-rank-badge.is-3 {
  background-color: var(--fx-purple-soft);
  color: var(--fx-purple);
  border: 1px solid rgba(94, 64, 157, 0.3);
}

.fx-rank-metrics {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 12px;
}

.fx-metric-pill {
  padding: 2px 8px;
  border-radius: 6px;
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-border);
  color: var(--fx-base-800);
  font-weight: 560;
  white-space: nowrap;
}

.fx-heat-track {
  margin-top: 7px;
  height: 6px;
  border-radius: 999px;
  background-color: var(--fx-base-100);
  overflow: hidden;
}

.fx-heat-fill {
  height: 100%;
  border-radius: 999px;
  background-color: var(--fx-accent);
  transition: width 240ms var(--ease-out);
}

.fx-hbar-row {
  margin-bottom: 8px;
}

.fx-hbar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 3px;
  gap: 8px;
}

.fx-hbar-track {
  height: 7px;
  border-radius: 999px;
  background-color: var(--fx-base-100);
  overflow: hidden;
}

.fx-hbar-fill {
  height: 100%;
  border-radius: 999px;
}

.fx-donut-block {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--fx-border);
}

.fx-donut-block:last-child {
  border-bottom: 0;
}

@media (max-width: 980px) {
  .fx-ana-row-split,
  .fx-ana-row-tri {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Desktop Right-Click Context Menu & Mobile Long-Press Quick Report Sheet */
.fx-ctx-menu {
  position: fixed;
  z-index: 1090;
  min-width: 214px;
  max-width: 280px;
  background-color: var(--fx-paper);
  border: 1px solid var(--fx-border-strong);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--fx-shadow);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fx-ctx-menu[hidden] {
  display: none !important;
}

.fx-ctx-item {
  appearance: none;
  width: 100%;
  min-height: 36px;
  padding: 7px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fx-ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 560;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background-color 120ms var(--ease-out);
}

.fx-ctx-item:hover {
  background-color: var(--fx-base-50);
}

.fx-ctx-item.is-danger {
  color: var(--fx-red);
}

.fx-ctx-item.is-accent {
  color: var(--fx-accent);
  font-weight: 640;
}

.fx-ctx-sep {
  height: 1px;
  background-color: var(--fx-border);
  margin: 4px 6px;
}

.fx-quick-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1085;
  background-color: rgba(16, 15, 15, 0.46);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.fx-quick-sheet-backdrop[hidden] {
  display: none !important;
}

.fx-quick-sheet {
  width: 100%;
  max-width: 400px;
  background-color: var(--fx-paper);
  border: 1px solid var(--fx-border-strong);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: var(--fx-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 768px) {
  .fx-quick-sheet-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .fx-quick-sheet {
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
    padding: 18px 16px calc(18px + var(--safe-bottom));
  }
}

.fx-quick-word-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fx-quick-word-chip {
  appearance: none;
  border: 1px solid var(--fx-border-strong);
  background-color: var(--fx-base-50);
  color: var(--fx-base-800);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 560;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-quick-word-chip:hover,
.fx-quick-word-chip.is-picked {
  background-color: var(--fx-accent-soft);
  border-color: var(--fx-accent-border);
  color: var(--fx-accent);
  font-weight: 640;
}

/* Mobile Card Long-Press Selection Suppression vs Reader Body Appropriate Text Selection */
@media (hover: none), (pointer: coarse), (max-width: 900px) {
  .v1-card,
  .v1-card *,
  .v5-card,
  .v5-card *,
  .fx-touch-report-card,
  .fx-touch-report-card *,
  .fx-sheet-card,
  .fx-sheet-card label,
  .fx-sheet-card div,
  .fx-sheet-card span,
  .fx-sheet-card button {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
  }
  .fx-sheet-card input,
  .fx-sheet-card textarea {
    -webkit-user-select: text !important;
    user-select: text !important;
  }
}

body[data-card-touch="1"] .v1-card,
body[data-card-touch="1"] .v1-card *,
body[data-card-touch="1"] .v5-card,
body[data-card-touch="1"] .v5-card *,
body[data-card-touch="1"] .fx-touch-report-card,
body[data-card-touch="1"] .fx-touch-report-card * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

.fx-reader-digest-preview {
  margin: 8px 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background-color: var(--fx-base-50);
  border-left: 3px solid var(--fx-accent);
  color: var(--fx-ink);
  font-size: 14.5px;
  line-height: 1.72;
}

.fx-mine-sec-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.fx-mine-sec-ico {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: var(--fx-accent-soft);
  color: var(--fx-accent);
  border: 1px solid var(--fx-border);
}

.fx-mine-sec-ico svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.fx-mine-sec-ico.is-teal {
  background-color: var(--fx-accent-soft);
  color: var(--fx-accent);
}

.fx-mine-sec-ico.is-orange {
  background-color: var(--fx-orange-soft);
  color: var(--fx-orange);
}

.fx-mine-sec-ico.is-red {
  background-color: var(--fx-red-soft);
  color: var(--fx-red);
}

.fx-mine-sec-ico.is-purple {
  background-color: var(--fx-purple-soft);
  color: var(--fx-purple);
}

.fx-mine-sec-ico.is-blue {
  background-color: var(--fx-blue-soft);
  color: var(--fx-blue);
}

.fx-mine-sec-ico.is-green {
  background-color: var(--fx-green-soft);
  color: var(--fx-green);
}

.fx-mine-btn-ico {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
  opacity: 0.88;
}

.fx-mine-cnt-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-border);
  color: var(--fx-base-800);
  white-space: nowrap;
}

.fx-mine-sec-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.fx-reader-selectable,
.fx-reader-selectable .fx-reader-para {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

.fx-reader-sel-bar {
  position: sticky;
  bottom: 8px;
  z-index: 6;
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 11px;
  background-color: var(--fx-paper);
  border: 1.5px solid var(--fx-accent);
  box-shadow: var(--fx-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.fx-reader-sel-bar[hidden] {
  display: none !important;
}

.fx-reader-sel-txt {
  font-size: 12.5px;
  font-weight: 640;
  color: var(--fx-accent);
}

.fx-reader-sel-acts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Polished Admin Feedback Review Cards (Clear Hierarchy + Right-Aligned Actions)
   ========================================================================== */
.fx-fb-review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fx-fb-card {
  background-color: var(--fx-paper);
  border: 1px solid var(--fx-border);
  border-radius: 12px;
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 140ms var(--ease-out);
}

.fx-fb-card.is-pending {
  border-color: rgba(188, 82, 21, 0.36);
  background-color: var(--fx-base-50);
}

.fx-fb-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.fx-fb-info-col {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fx-fb-headline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.fx-fb-st-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 680;
  line-height: 1.3;
  white-space: nowrap;
}

.fx-fb-st-pill.is-approved {
  background-color: var(--fx-green-soft);
  color: var(--fx-green);
}

.fx-fb-st-pill.is-rejected {
  background-color: var(--fx-base-100);
  color: var(--fx-muted);
}

.fx-fb-st-pill.is-pending {
  background-color: var(--fx-yellow-soft);
  color: var(--fx-yellow);
}

.fx-fb-kind-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 620;
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-border);
  color: var(--fx-base-800);
  white-space: nowrap;
}

.fx-fb-target-word {
  font-size: 15px;
  font-weight: 720;
  color: var(--fx-ink);
  word-break: break-all;
}

.fx-fb-meta-line {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--fx-muted);
}

.fx-fb-effect-txt {
  color: var(--fx-base-800);
  font-weight: 560;
}

.fx-fb-actions-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.fx-fb-pending-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--fx-border-strong);
}

.fx-fb-pending-inputs {
  flex: 1 1 300px;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

/* ==========================================================================
   Mobile Bottom Menu Bar (#fx-mobile-tabbar) & Personal Center (#fx-mobile-mine-stage)
   ========================================================================== */
.fx-mobile-tabbar,
.fx-mine-stage {
  display: none;
}

@media (min-width: 769px) {
  .fx-mobile-tabbar,
  .fx-mine-stage {
    display: none !important;
  }
}

@media (max-width: 768px) {
  /* Bottom Tab 1 handles layout display & one-tap switching on mobile, keeping topbar ultra-clean */
  .fx-portal-topbar [data-action="switch-edition"] {
    display: none !important;
  }

  .fx-mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 910;
    min-height: calc(56px + var(--safe-bottom));
    padding: 4px 10px calc(5px + var(--safe-bottom));
    background-color: var(--fx-paper);
    border-top: 1px solid var(--fx-border-strong);
    box-shadow: 0 -4px 18px rgba(16, 15, 15, 0.06);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 6px;
  }

  .fx-mobile-tab-item {
    appearance: none;
    flex: 1 1 0;
    min-width: 0;
    min-height: 46px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--fx-muted);
    font-family: inherit;
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out), transform 120ms var(--ease-out);
  }

  .fx-mobile-tab-item:active {
    transform: scale(0.975);
  }

  .fx-mobile-tab-item.is-active {
    color: var(--fx-accent);
    background-color: var(--fx-accent-soft);
  }

  .fx-mobile-tab-ico-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
  }

  .fx-tab-ico-svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
  }

  .fx-mobile-tab-lbl-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    max-width: 100%;
  }

  .fx-mobile-tab-lbl {
    font-size: 11.5px;
    font-weight: 640;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .fx-mobile-tab-swap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background-color: var(--fx-paper);
    border: 1px solid var(--fx-accent-border);
    color: var(--fx-accent);
    flex-shrink: 0;
  }

  .fx-tab-swap-svg {
    width: 11px;
    height: 11px;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
  }

  /* When switching to "我的", cleanly hide Home feed elements and show scrollable Mine stage */
  body[data-mobile-tab="mine"] .fx-portal-topbar,
  body[data-mobile-tab="mine"] #fx-guest-limit-banner,
  body[data-mobile-tab="mine"] #v1-view-portal,
  body[data-mobile-tab="mine"] #v5-board,
  body[data-mobile-tab="mine"] #v5-notice-strip {
    display: none !important;
  }

  body[data-mobile-tab="mine"] .v1-stage {
    padding: 0;
  }

  .fx-mine-stage:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 11px;
    width: 100%;
    padding: calc(14px + var(--safe-top)) 13px calc(80px + var(--safe-bottom));
  }
}

/* 「我的」卡片样式：手机端底部 Tab 页与电脑端右侧抽屉共用 */
  .fx-mine-card {
    background-color: var(--fx-paper);
    border: 1px solid var(--fx-border);
    border-radius: 14px;
    padding: 13px 14px;
    box-shadow: var(--fx-card-shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .fx-mine-hero {
    background-color: var(--fx-base-50);
    border-color: var(--fx-border-strong);
  }

  .fx-mine-hero-top {
    display: flex;
    align-items: center;
    gap: 11px;
  }

  .fx-mine-avatar {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background-color: var(--fx-accent-soft);
    border: 1.5px solid var(--fx-accent-border);
    color: var(--fx-accent);
    font-family: inherit;
    font-size: 19px;
    font-weight: 720;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .fx-mine-avatar.is-editable {
    appearance: none;
    cursor: pointer;
    transition: transform 160ms var(--ease-out), border-color 160ms var(--ease-out), box-shadow 180ms var(--ease-out);
  }

  .fx-mine-avatar.is-editable:hover {
    transform: translateY(-1px) scale(1.03);
    border-color: var(--fx-accent);
    box-shadow: 0 4px 12px var(--fx-accent-soft);
  }

  .fx-mine-avatar.is-just-updated {
    animation: fx-avatar-ring-pop 520ms var(--ease-out);
  }

  .fx-avatar-cam-badge {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background-color: var(--fx-accent);
    color: var(--fx-on-accent);
    border: 2px solid var(--fx-base-50);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }

  .fx-avatar-cam-badge svg {
    width: 9.5px;
    height: 9.5px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .fx-mine-hero-meta {
    min-width: 0;
    flex: 1 1 auto;
  }

  .fx-mine-hero-name {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--fx-ink);
  }

  .fx-mine-hero-sub {
    margin-top: 2px;
    font-size: 12px;
    color: var(--fx-muted);
    line-height: 1.4;
  }

  .fx-mine-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .fx-mine-sec-title {
    margin: 0;
    font-size: 14px;
    font-weight: 680;
    color: var(--fx-ink);
  }

  .fx-mine-mini-btn {
    min-height: 26px;
    padding: 2px 9px;
    font-size: 11.5px;
  }

  .fx-mine-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .fx-mine-stat-cell {
    background-color: var(--fx-base-50);
    border: 1px solid var(--fx-border);
    border-radius: 10px;
    padding: 8px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .fx-mine-stat-val {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--fx-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .fx-mine-stat-lbl {
    font-size: 11px;
    color: var(--fx-muted);
  }

  .fx-mine-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .fx-mine-list-row {
    appearance: none;
    width: 100%;
    text-align: left;
    border: 1px solid var(--fx-border);
    border-radius: 9px;
    background-color: var(--fx-base-50);
    color: var(--fx-ink);
    font-family: inherit;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .fx-mine-list-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .fx-mine-list-meta {
    font-size: 11.5px;
    color: var(--fx-muted);
  }

  .fx-mine-empty {
    font-size: 12.5px;
    color: var(--fx-muted);
    line-height: 1.45;
    padding: 4px 0;
  }

  .fx-mine-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .fx-mine-mute-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 10px;
    border-radius: 999px;
    background-color: var(--fx-base-50);
    border: 1px solid var(--fx-border-strong);
    font-size: 12.5px;
    color: var(--fx-ink);
  }

  .fx-mine-mute-del {
    appearance: none;
    border: 0;
    border-radius: 999px;
    background-color: var(--fx-accent-soft);
    color: var(--fx-accent);
    font-family: inherit;
    font-size: 11px;
    font-weight: 640;
    padding: 2px 7px;
    cursor: pointer;
  }

  .fx-mine-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .fx-mine-tickets {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .fx-mine-sub-cap {
    font-size: 11.5px;
    color: var(--fx-muted);
    margin-top: 2px;
  }

  .fx-mine-ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12.5px;
    padding: 6px 9px;
    border-radius: 8px;
    background-color: var(--fx-base-50);
    border: 1px solid var(--fx-border);
  }

  .fx-mine-ticket-st {
    font-size: 11.5px;
    font-weight: 640;
    color: var(--fx-yellow);
  }

  .fx-mine-ticket-st.is-approved {
    color: var(--fx-green);
  }

  .fx-mine-ticket-st.is-rejected {
    color: var(--fx-muted);
  }

/* ==========================================================================
   顶栏日夜切换图标按钮（☀ 日间 / 🌙 夜间），v1 与 v5 共用，位于「筛选」左侧
   ========================================================================== */
.fx-theme-icon-btn {
  min-width: 36px;
  padding: 5px 0;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

.fx-mine-entry-btn .fx-tab-ico-svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* 电脑端「我的」入口与右侧抽屉（手机端用底部 Tab，不显示） */
.fx-mine-drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(16, 15, 15, 0.32);
}

.fx-mine-drawer-mask[hidden] {
  display: none !important;
}

.fx-mine-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1001;
  width: min(420px, 92vw);
  background-color: var(--fx-base-50);
  border-left: 1px solid var(--fx-border-strong);
  box-shadow: var(--fx-shadow);
  display: flex;
  flex-direction: column;
}

.fx-mine-drawer[hidden] {
  display: none !important;
}

.fx-mine-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--fx-border);
  background-color: var(--fx-paper);
}

.fx-mine-drawer-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--fx-ink);
}

.fx-mine-drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

/* 账号设置：头像预设与改密表单 */
.fx-mine-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}

.fx-avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.fx-avatar-opt {
  appearance: none;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1.5px solid var(--fx-border);
  background-color: var(--fx-paper);
  font-size: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fx-avatar-opt.is-picked {
  border-color: var(--fx-accent);
  background-color: var(--fx-accent-soft);
}

.fx-pwd-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fx-pwd-form input {
  min-height: 38px;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid var(--fx-border-strong);
  background-color: var(--fx-paper);
  color: var(--fx-ink);
  font-family: inherit;
  font-size: 15px;
}

.fx-pwd-msg {
  font-size: 12.5px;
  min-height: 16px;
}

.fx-default-pwd-banner {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--fx-red);
  color: var(--fx-red);
  background-color: var(--fx-paper);
  font-size: 12.5px;
  font-weight: 640;
}

@media (max-width: 768px) {
  .fx-mine-entry-btn {
    display: none !important;
  }
}

/* 窄屏顶栏：v5 搜索框单独成第二行，按钮只保留图标级宽度，360px 手机也不挤 */
@media (max-width: 600px) {
  .fx-portal-topbar {
    padding: calc(6px + var(--safe-top)) 10px 6px;
  }

  .fx-portal-actions {
    gap: 5px;
  }

  .fx-nav-pill {
    min-height: 34px;
    padding: 4px 9px;
    font-size: 12.5px;
  }

  .fx-theme-icon-btn {
    min-width: 34px;
    padding: 4px 0;
  }

  body[data-edition="v5"] .fx-portal-topbar-inner {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  body[data-edition="v5"] #v5-search-form {
    order: 2;
    flex: 1 1 100% !important;
    max-width: none !important;
  }

  body[data-edition="v5"] .fx-portal-actions {
    order: 1;
    margin-left: auto;
  }

  body[data-edition="v5"] .v5-mobile-brand {
    order: 0;
    display: inline-flex;
  }

  body[data-edition="v5"] #v5-search-form .fx-portal-logo {
    display: none;
  }
}

@media (max-width: 380px) {
  .fx-nav-pill {
    padding: 4px 7px;
  }

  .fx-portal-logo {
    font-size: 15px;
  }
}

/* 超窄屏（≤420px）收起顶栏「后台管理」，管理员可从底部「我的」→「进入后台管理」进入 */
@media (max-width: 420px) {
  .fx-portal-actions .fx-nav-pill.is-admin-entry {
    display: none !important;
  }
}

.v5-mobile-brand {
  display: none;
  align-items: center;
}

/* ==========================================================================
   点击头像呼出的独立「更换头像」弹层 + 日夜过渡动画（View Transition + 平滑回退）
   ========================================================================== */
.fx-avatar-modal-card {
  max-width: 344px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fx-pop-card 190ms var(--ease-out);
}

.fx-avatar-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 15px;
  color: var(--fx-ink);
}

.fx-avatar-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 6px 0 2px;
}

.fx-avatar-preview-lg {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background-color: var(--fx-accent-soft);
  border: 2px solid var(--fx-accent-border);
  color: var(--fx-accent);
  font-size: 32px;
  font-weight: 720;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 6px 18px var(--fx-accent-soft);
}

.fx-avatar-preview-lg.is-pop {
  animation: fx-avatar-ring-pop 280ms var(--ease-out);
}

.fx-avatar-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

@keyframes fx-pop-card {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fx-avatar-ring-pop {
  0% { transform: scale(0.90); }
  55% { transform: scale(1.07); box-shadow: 0 0 0 6px var(--fx-accent-soft); }
  100% { transform: scale(1); }
}

/* ☀ / 🌙 图标旋转弹跳动画 */
.fx-theme-icon-btn.is-spinning {
  animation: fx-theme-spin 420ms var(--ease-out);
}

@keyframes fx-theme-spin {
  0% { transform: rotate(-76deg) scale(0.66); opacity: 0.55; }
  65% { transform: rotate(10deg) scale(1.08); opacity: 1; }
  100% { transform: rotate(0deg) scale(1); opacity: 1; }
}

/* View Transitions API 圆形扩散遮罩层 */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 9999;
}

/* 不支持 View Transitions 时的平滑色彩过渡（仅在切换瞬间 460ms 激活，不影响日常悬停响应） */
html.is-theme-transitioning,
html.is-theme-transitioning body,
html.is-theme-transitioning .fx-portal-topbar,
html.is-theme-transitioning .v1-card,
html.is-theme-transitioning .v5-lane,
html.is-theme-transitioning .v5-card,
html.is-theme-transitioning .v5-notice-strip,
html.is-theme-transitioning .fx-mine-card,
html.is-theme-transitioning .fx-mine-drawer,
html.is-theme-transitioning .fx-mine-drawer-head,
html.is-theme-transitioning .fx-collapsible-drawer,
html.is-theme-transitioning .fx-mobile-tabbar,
html.is-theme-transitioning .adm-section,
html.is-theme-transitioning .adm-sidebar {
  transition:
    background-color 320ms var(--ease-out),
    color 320ms var(--ease-out),
    border-color 320ms var(--ease-out),
    box-shadow 320ms var(--ease-out) !important;
}

@media (prefers-reduced-motion: reduce) {
  .fx-skel-bar,
  .fx-orbital-loader > span,
  .fx-orbital-loader > i,
  .fx-loader-dots > i,
  .fx-theme-icon-btn.is-spinning {
    animation: none !important;
  }
}

/* ==========================================================================
   只读全站屏蔽词标签 & 首页弹窗公告（含「不再显示」变灰禁用态 + 已阅读按钮）
   ========================================================================== */
.fx-mine-ro-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 560;
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-border);
  color: var(--fx-base-800);
}

.fx-mine-ro-chip.is-word {
  background-color: var(--fx-red-soft);
  border-color: rgba(175, 48, 41, 0.24);
  color: var(--fx-red);
}

.fx-ann-card {
  position: relative;
  max-width: 456px;
  width: min(92vw, 456px);
  padding: 22px 22px 18px;
  border-radius: 18px;
  border: 1px solid var(--fx-border-strong);
  border-top: 3.5px solid var(--fx-accent);
  background-color: var(--fx-paper);
  box-shadow: 0 20px 46px rgba(16, 15, 15, 0.2), 0 2px 8px rgba(16, 15, 15, 0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  animation: fx-pop-card 210ms var(--ease-out);
}

.fx-ann-card.is-warn {
  border-top-color: #D0A215;
}

.fx-ann-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fx-ann-head-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.fx-ann-emblem {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background-color: var(--fx-accent-soft);
  border: 1px solid var(--fx-accent-border);
  color: var(--fx-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fx-ann-emblem.is-warn {
  background-color: rgba(208, 162, 21, 0.16);
  border-color: rgba(208, 162, 21, 0.45);
  color: #9A6F04;
}

html[data-theme="dark"] .fx-ann-emblem.is-warn {
  color: #F0C445;
}

.fx-ann-emblem svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.fx-ann-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fx-ann-eyebrow {
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.04em;
  color: var(--fx-accent);
}

.fx-ann-eyebrow.is-warn {
  color: #9A6F04;
}

html[data-theme="dark"] .fx-ann-eyebrow.is-warn {
  color: #F0C445;
}

.fx-ann-title {
  margin: 0;
  font-size: 17.5px;
  font-weight: 740;
  letter-spacing: -0.01em;
  color: var(--fx-ink);
  line-height: 1.3;
}

.fx-ann-close-x {
  appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--fx-border);
  background-color: var(--fx-base-50);
  color: var(--fx-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.fx-ann-close-x:hover {
  background-color: var(--fx-base-100);
  color: var(--fx-ink);
}

.fx-ann-close-x svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  fill: none;
}

.fx-ann-exp-box {
  padding: 11px 14px;
  border-radius: 12px;
  background-color: #FDF5D9;
  border: 1px solid #D0A215;
  color: #6B4D00;
  font-size: 13px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

html[data-theme="dark"] .fx-ann-exp-box {
  background-color: #2C230E;
  border-color: #D0A215;
  color: #F0C445;
}

.fx-ann-surface {
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-border);
  border-left: 3px solid var(--fx-accent);
  border-radius: 12px;
  padding: 14px 16px;
}

.fx-ann-card.is-warn .fx-ann-surface {
  border-left-color: #D0A215;
}

.fx-ann-body {
  max-height: 44dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
  line-height: 1.74;
  color: var(--fx-base-800);
}

.fx-ann-body p {
  margin: 0;
  color: var(--fx-ink);
  font-size: 14px;
  line-height: 1.74;
  letter-spacing: 0.01em;
}

.fx-ann-clause-item {
  position: relative;
  padding-left: 14px;
}

.fx-ann-clause-item::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background-color: var(--fx-accent);
  opacity: 0.78;
}

.fx-ann-foot {
  padding-top: 12px;
  border-top: 1px solid var(--fx-border);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.fx-ann-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fx-ann-nomore-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 8px;
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-border);
  font-size: 12.5px;
  font-weight: 580;
  color: var(--fx-base-800);
  cursor: pointer;
  user-select: none;
  transition: border-color 140ms var(--ease-out), background-color 140ms var(--ease-out);
}

.fx-ann-nomore-wrap:not(.is-locked):hover {
  border-color: var(--fx-accent-border);
  background-color: var(--fx-accent-soft);
}

.fx-ann-nomore-wrap input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--fx-accent);
  cursor: pointer;
}

.fx-ann-nomore-wrap.is-locked {
  opacity: 0.48;
  color: var(--fx-muted);
  cursor: not-allowed;
}

.fx-ann-nomore-wrap.is-locked input[type="checkbox"] {
  cursor: not-allowed;
  pointer-events: none;
}

.fx-ann-ack-btn {
  min-width: 112px;
  min-height: 37px;
  padding: 6px 18px;
  border-radius: 10px;
  font-weight: 680;
  gap: 6px;
}

.fx-ann-ack-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.fx-ann-lock-note {
  font-size: 11.5px;
  color: #9A6F04;
  line-height: 1.45;
}

html[data-theme="dark"] .fx-ann-lock-note {
  color: #E5B82E;
}

/* Guest Read-Only Permission Lock Styling (Grayed-Out Non-Viewing Entry Points) */
.is-guest-locked {
  opacity: 0.54 !important;
  background-color: var(--fx-base-100) !important;
  border-color: var(--fx-border) !important;
  color: var(--fx-muted) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

.fx-more-item.is-guest-locked,
.fx-ctx-item.is-guest-locked {
  background-color: transparent !important;
  opacity: 0.56 !important;
}

.fx-more-item.is-guest-locked:hover,
.fx-ctx-item.is-guest-locked:hover {
  background-color: var(--fx-base-50) !important;
}

.v1-spotlight-box.is-guest-locked-box {
  background-color: var(--fx-base-100) !important;
  border-color: var(--fx-border) !important;
  opacity: 0.72;
  cursor: not-allowed;
}

.v1-spotlight-box.is-guest-locked-box input,
.v1-spotlight-box.is-guest-locked-box select,
#v5-search-form .v5-filter-input.is-guest-locked-inp {
  color: var(--fx-muted) !important;
  cursor: not-allowed !important;
}

.fx-mine-card.is-guest-locked-card {
  opacity: 0.72;
  background-color: var(--fx-base-50);
  cursor: pointer;
}

.fx-guest-lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  background-color: var(--fx-base-100);
  border: 1px solid var(--fx-border);
  color: var(--fx-muted);
  white-space: nowrap;
}

/* Guest Restriction Status Banner & Mine Status Pill */
.fx-guest-limit-banner {
  margin: 0 0 12px;
  padding: 9px 13px;
  border-radius: 11px;
  border: 1px solid rgba(184, 84, 26, 0.34);
  background-color: rgba(218, 112, 44, 0.09);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.fx-guest-limit-banner.is-v5 {
  margin: 6px 12px 2px;
  padding: 7px 12px;
}

.fx-guest-limit-banner.is-closed {
  border-color: rgba(175, 48, 41, 0.42);
  background-color: rgba(209, 77, 65, 0.1);
}

html[data-theme="dark"] .fx-guest-limit-banner {
  border-color: rgba(218, 112, 44, 0.44);
  background-color: rgba(218, 112, 44, 0.13);
}

html[data-theme="dark"] .fx-guest-limit-banner.is-closed {
  border-color: rgba(209, 77, 65, 0.5);
  background-color: rgba(209, 77, 65, 0.16);
}

.fx-guest-limit-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.fx-guest-limit-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background-color: rgba(218, 112, 44, 0.18);
  color: var(--fx-orange);
  flex-shrink: 0;
}

.fx-guest-limit-banner.is-closed .fx-guest-limit-badge {
  background-color: rgba(209, 77, 65, 0.2);
  color: var(--fx-red);
}

.fx-guest-limit-text {
  font-size: 12.5px;
  font-weight: 560;
  color: var(--fx-ink);
  line-height: 1.4;
}

.fx-guest-limit-cta {
  min-height: 28px;
  padding: 3px 11px;
  font-size: 12px;
  flex-shrink: 0;
}

.fx-mine-guest-status {
  margin-top: 10px;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px dashed rgba(184, 84, 26, 0.4);
  background-color: rgba(218, 112, 44, 0.08);
  font-size: 12px;
  line-height: 1.45;
  color: var(--fx-orange);
  font-weight: 580;
}

.fx-mine-guest-status.is-closed {
  border-color: rgba(175, 48, 41, 0.45);
  background-color: rgba(209, 77, 65, 0.09);
  color: var(--fx-red);
}

/* Article Reading Value Tier Badges */
.fx-val-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 720;
  border: 1px solid var(--fx-border);
}

.fx-val-badge.is-high_action {
  background-color: rgba(102, 128, 11, 0.14);
  border-color: rgba(102, 128, 11, 0.38);
  color: var(--fx-green);
}

.fx-val-badge.is-high_value {
  background-color: var(--fx-cyan-soft);
  border-color: var(--fx-accent-border);
  color: var(--fx-cyan);
}

.fx-val-badge.is-readable {
  background-color: var(--fx-base-100);
  border-color: var(--fx-border-strong);
  color: var(--fx-base-800);
}

.fx-val-badge.is-clickbait,
.fx-val-badge.is-spam_muted {
  background-color: rgba(209, 77, 65, 0.12);
  border-color: rgba(209, 77, 65, 0.4);
  color: var(--fx-red);
}

.fx-val-badge.is-pending {
  background-color: var(--fx-base-100);
  color: var(--fx-muted);
}

/* Draggable Edge-Snapping & Auto-Minimizing Circular Floating Bubble ("交流群") */
@keyframes fxCommBubbleIntro {
  0% {
    opacity: 0;
    transform: scale(0.56);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fxCommBubbleFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes fxCommHaloPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.52;
  }
  75%, 100% {
    transform: scale(1.42);
    opacity: 0;
  }
}

@keyframes fxCommMiniBreathR {
  0%, 78%, 100% {
    transform: translateX(6px);
  }
  88% {
    transform: translateX(3px);
  }
}

@keyframes fxCommMiniBreathL {
  0%, 78%, 100% {
    transform: translateX(-6px);
  }
  88% {
    transform: translateX(-3px);
  }
}

@keyframes fxCommMenuPop {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0.88);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

@keyframes fxCommMenuPopStatic {
  0% {
    opacity: 0;
    transform: scale(0.88);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fxCommItemIn {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.fx-comm-fab {
  position: fixed;
  z-index: 910;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: left 280ms cubic-bezier(0.22, 1, 0.36, 1), top 280ms cubic-bezier(0.22, 1, 0.36, 1);
  animation: fxCommBubbleIntro 420ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fx-comm-fab[data-dock-side="left"] {
  justify-content: flex-start;
}

.fx-comm-fab.is-dragging {
  transition: none !important;
}

.fx-comm-fab-bob {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: inherit;
  pointer-events: none;
}

.fx-comm-fab:not(.is-minimized):not(.is-open):not(.is-dragging) .fx-comm-fab-bob {
  animation: fxCommBubbleFloat 3.1s ease-in-out infinite;
}

.fx-comm-fab-btn {
  position: relative;
  appearance: none;
  pointer-events: auto;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 2px solid var(--fx-paper);
  background-color: var(--fx-accent);
  color: #FFFCF0;
  box-shadow: 0 8px 22px rgba(16, 15, 15, 0.24), 0 0 0 1px var(--fx-accent-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: visible;
  cursor: grab;
  touch-action: none;
  transition:
    width 280ms cubic-bezier(0.22, 1, 0.36, 1),
    height 280ms cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 280ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 220ms var(--ease-out),
    background-color 160ms var(--ease-out),
    box-shadow 220ms var(--ease-out);
}

.fx-comm-fab-halo {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid var(--fx-accent);
  pointer-events: none;
  opacity: 0;
}

.fx-comm-fab:not(.is-minimized):not(.is-open):not(.is-dragging) .fx-comm-fab-halo {
  animation: fxCommHaloPulse 2.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.fx-comm-fab-full,
.fx-comm-fab-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out);
}

.fx-comm-fab-full {
  gap: 2px;
  opacity: 1;
  transform: scale(1);
}

.fx-comm-fab-mini {
  position: absolute;
  inset: 0;
  gap: 1px;
  opacity: 0;
  transform: scale(0.72);
}

.fx-comm-fab-mini-ico {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.fx-comm-fab-mini-lbl {
  font-size: 10px;
  font-weight: 740;
  line-height: 1.05;
  letter-spacing: 0;
}

/* Idle Unclicked State: Minimize & Hug Viewport Border Flush (0px gap) */
.fx-comm-fab.is-minimized:not(.is-open):not(.is-dragging):not(.is-peek) .fx-comm-fab-btn {
  width: 28px;
  height: 46px;
  opacity: 0.88;
  box-shadow: 0 4px 14px rgba(16, 15, 15, 0.2), 0 0 0 1px var(--fx-accent-border);
}

.fx-comm-fab[data-dock-side="right"].is-minimized:not(.is-open):not(.is-dragging):not(.is-peek) .fx-comm-fab-btn {
  border-radius: 23px 0 0 23px;
  border-right-width: 0;
  transform: translateX(6px);
  animation: fxCommMiniBreathR 3.8s ease-in-out infinite;
}

.fx-comm-fab[data-dock-side="left"].is-minimized:not(.is-open):not(.is-dragging):not(.is-peek) .fx-comm-fab-btn {
  border-radius: 0 23px 23px 0;
  border-left-width: 0;
  transform: translateX(-6px);
  animation: fxCommMiniBreathL 3.8s ease-in-out infinite;
}

.fx-comm-fab.is-minimized:not(.is-open):not(.is-dragging):not(.is-peek) .fx-comm-fab-full {
  opacity: 0;
  transform: scale(0.68);
}

.fx-comm-fab.is-minimized:not(.is-open):not(.is-dragging):not(.is-peek) .fx-comm-fab-mini {
  opacity: 1;
  transform: scale(1);
}

.fx-comm-fab:not(.is-minimized) .fx-comm-fab-btn:hover,
.fx-comm-fab.is-peek .fx-comm-fab-btn:hover {
  transform: scale(1.05);
}

.fx-comm-fab.is-dragging .fx-comm-fab-btn {
  cursor: grabbing;
  transform: scale(1.08);
  box-shadow: 0 12px 28px rgba(16, 15, 15, 0.34), 0 0 0 2px var(--fx-accent);
}

.fx-comm-fab.is-open .fx-comm-fab-btn {
  background-color: var(--fx-ink);
  color: var(--fx-paper);
}

.fx-comm-fab-ico {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fx-comm-fab.is-open .fx-comm-fab-ico {
  transform: rotate(90deg);
}

.fx-comm-fab-lbl {
  font-size: 10.5px;
  font-weight: 720;
  line-height: 1.05;
  letter-spacing: 0.01em;
  pointer-events: none;
}

.fx-comm-fab-menu {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 162px;
  padding: 8px;
  border-radius: 13px;
  background-color: var(--fx-paper);
  border: 1px solid var(--fx-border-strong);
  box-shadow: var(--fx-shadow);
  pointer-events: auto;
  z-index: 912;
  transform-origin: right center;
  animation: fxCommMenuPop 230ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fx-comm-fab-menu[hidden] {
  display: none !important;
}

.fx-comm-fab[data-dock-side="right"] .fx-comm-fab-menu {
  right: calc(100% + 10px);
  transform-origin: right center;
}

.fx-comm-fab[data-dock-side="left"] .fx-comm-fab-menu {
  left: calc(100% + 10px);
  transform-origin: left center;
}

.fx-comm-fab.is-near-bottom .fx-comm-fab-menu {
  top: auto;
  bottom: 0;
  transform: none;
  animation-name: fxCommMenuPopStatic;
}

.fx-comm-fab.is-near-top .fx-comm-fab-menu {
  top: 0;
  transform: none;
  animation-name: fxCommMenuPopStatic;
}

.fx-comm-menu-item {
  appearance: none;
  width: 100%;
  border: 1px solid var(--fx-border);
  background-color: var(--fx-base-50);
  color: var(--fx-ink);
  border-radius: 9px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  animation: fxCommItemIn 220ms var(--ease-out) backwards;
  transition: border-color 140ms var(--ease-out), background-color 140ms var(--ease-out), transform 120ms var(--ease-out);
}

.fx-comm-menu-item:nth-child(2) {
  animation-delay: 45ms;
}

.fx-comm-menu-item:hover {
  border-color: var(--fx-accent);
  background-color: var(--fx-accent-soft);
  transform: translateY(-1px);
}

.fx-comm-menu-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: var(--fx-accent-soft);
  color: var(--fx-accent);
}

.fx-comm-menu-item.is-contact .fx-comm-menu-ico {
  background-color: var(--fx-orange-soft);
  color: var(--fx-orange);
}

.fx-comm-menu-ico svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.fx-comm-menu-txt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.fx-comm-menu-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--fx-ink);
  white-space: nowrap;
}

.fx-comm-menu-sub {
  font-size: 11px;
  color: var(--fx-muted);
  white-space: nowrap;
}

/* Community QR & Mobile WeChat Jump Modal */
.fx-comm-qr-card {
  max-width: 372px;
  width: min(92vw, 372px);
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 16px 16px 15px;
}

.fx-comm-qr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fx-comm-qr-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 4px;
  border-radius: 10px;
  background-color: var(--fx-base-100);
  border: 1px solid var(--fx-border);
}

.fx-comm-qr-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fx-base-600);
  font-family: inherit;
  font-size: 13px;
  font-weight: 640;
  padding: 6px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.fx-comm-qr-tab.is-active {
  background-color: var(--fx-paper);
  border-color: var(--fx-accent-border);
  color: var(--fx-accent);
  font-weight: 720;
  box-shadow: var(--fx-card-shadow);
}

.fx-comm-qr-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-border);
  border-radius: 12px;
  padding: 10px;
  overflow: hidden;
}

.fx-comm-qr-img {
  display: block;
  max-width: 100%;
  max-height: min(50vh, 330px);
  width: auto;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  -webkit-touch-callout: default !important;
  user-select: auto !important;
  -webkit-user-select: auto !important;
}

.fx-comm-qr-hint {
  font-size: 12px;
  line-height: 1.48;
  color: var(--fx-muted);
  text-align: center;
}

.fx-comm-qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.fx-comm-qr-actions .fx-btn {
  flex: 1 1 130px;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

body[data-admin-active="1"] .fx-comm-fab,
body[data-admin-active="1"] .fx-mobile-tabbar {
  display: none !important;
}

@media (max-width: 640px) {
  .fx-comm-fab,
  .fx-comm-fab-btn {
    width: 50px;
    height: 50px;
  }

  .fx-comm-fab.is-minimized:not(.is-open):not(.is-dragging):not(.is-peek) .fx-comm-fab-btn {
    width: 26px;
    height: 44px;
  }

  .fx-comm-fab-lbl {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fx-comm-fab,
  .fx-comm-fab-bob,
  .fx-comm-fab-halo,
  .fx-comm-fab-btn,
  .fx-comm-fab-menu,
  .fx-comm-menu-item {
    animation: none !important;
  }
}
